diff options
author | Ron Yorston <rmy@pobox.com> | 2019-02-14 15:07:36 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2019-02-14 15:07:36 +0000 |
commit | ee7e00dc580c4e8075ab0776aeb3526c2c22f2b6 (patch) | |
tree | b934dcdb7b9d27767c5336ad287408242c426b2f /shell | |
parent | 6312c005522de47dcaf442f613065415bcbd8ef7 (diff) | |
download | busybox-w32-ee7e00dc580c4e8075ab0776aeb3526c2c22f2b6.tar.gz busybox-w32-ee7e00dc580c4e8075ab0776aeb3526c2c22f2b6.tar.bz2 busybox-w32-ee7e00dc580c4e8075ab0776aeb3526c2c22f2b6.zip |
win32: add a function to remove CRs from a text buffer
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ash.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/shell/ash.c b/shell/ash.c index 735364962..29130db0e 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -13619,16 +13619,7 @@ evalstring(char *s, int flags) | |||
13619 | 13619 | ||
13620 | s = sstrdup(s); | 13620 | s = sstrdup(s); |
13621 | #if ENABLE_PLATFORM_MINGW32 | 13621 | #if ENABLE_PLATFORM_MINGW32 |
13622 | { | 13622 | remove_cr(s, strlen(s)+1); |
13623 | char *t, *u; | ||
13624 | |||
13625 | for (t=u=s; *t; ++t) { | ||
13626 | if (*t != '\r') { | ||
13627 | *u++ = *t; | ||
13628 | } | ||
13629 | } | ||
13630 | *u = '\0'; | ||
13631 | } | ||
13632 | #endif | 13623 | #endif |
13633 | setinputstring(s); | 13624 | setinputstring(s); |
13634 | setstackmark(&smark); | 13625 | setstackmark(&smark); |