From ee7e00dc580c4e8075ab0776aeb3526c2c22f2b6 Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Thu, 14 Feb 2019 15:07:36 +0000 Subject: win32: add a function to remove CRs from a text buffer --- shell/ash.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'shell') 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) s = sstrdup(s); #if ENABLE_PLATFORM_MINGW32 - { - char *t, *u; - - for (t=u=s; *t; ++t) { - if (*t != '\r') { - *u++ = *t; - } - } - *u = '\0'; - } + remove_cr(s, strlen(s)+1); #endif setinputstring(s); setstackmark(&smark); -- cgit v1.2.3-55-g6feb