diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-04-17 10:46:01 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-04-17 10:46:01 +0000 |
commit | f0e8173762a14d7675dbc7a12ed11b31b7691c9f (patch) | |
tree | 298ca397f3026dc63706486478be6f8b74ca5e57 /Src/text.c | |
parent | fcca6c721cde7780c91912aba0afbd44bd1818d5 (diff) | |
download | zsh-f0e8173762a14d7675dbc7a12ed11b31b7691c9f.tar.gz zsh-f0e8173762a14d7675dbc7a12ed11b31b7691c9f.tar.xz zsh-f0e8173762a14d7675dbc7a12ed11b31b7691c9f.zip |
display newlines as spaces in job-texts (10788)
Diffstat (limited to 'Src/text.c')
-rw-r--r-- | Src/text.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Src/text.c b/Src/text.c index ab6ca5eb9..8823a69bc 100644 --- a/Src/text.c +++ b/Src/text.c @@ -58,6 +58,7 @@ static void taddstr(char *s) { int sl = strlen(s); + char c; while (tptr + sl >= tlim) { int x = tptr - tbuf; @@ -68,8 +69,8 @@ taddstr(char *s) tlim = tbuf + tsiz; tptr = tbuf + x; } - strcpy(tptr, s); - tptr += sl; + while ((c = *s++)) + *tptr++ = (c == '\n' ? ' ' : c); } /**/ |