Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 6886
b: refs/heads/master
c: 964267e
h: refs/heads/master
v: v3
  • Loading branch information
Egry Gabor authored and Linus Torvalds committed Sep 5, 2005
1 parent ddd99a0 commit 499d37a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c196eff3060270f155343b63ef3d06f31ccfcd2e
refs/heads/master: 964267e627966ffa018fc4a3e19e6bad337a9125
7 changes: 6 additions & 1 deletion trunk/scripts/kconfig/kxgettext.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ static char *escape(const char* text, char *bf, int len)
{
char *bfp = bf;
int multiline = strchr(text, '\n') != NULL;
int eol = 0;
int textlen = strlen(text);

if ((textlen > 0) && (text[textlen-1] == '\n'))
eol = 1;

*bfp++ = '"';
--len;
Expand Down Expand Up @@ -43,7 +48,7 @@ static char *escape(const char* text, char *bf, int len)
--len;
}

if (multiline)
if (multiline && eol)
bfp -= 3;

*bfp++ = '"';
Expand Down

0 comments on commit 499d37a

Please sign in to comment.