aboutsummaryrefslogtreecommitdiff
path: root/shell/shell_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/shell_common.c')
-rw-r--r--shell/shell_common.c28
1 files changed, 12 insertions, 16 deletions
diff --git a/shell/shell_common.c b/shell/shell_common.c
index 653154e34..55617b167 100644
--- a/shell/shell_common.c
+++ b/shell/shell_common.c
@@ -210,15 +210,17 @@ shell_builtin_read(void FAST_FUNC (*setvar)(const char *name, const char *val),
210 c = buffer[bufpos]; 210 c = buffer[bufpos];
211 if (c == '\0' || (ENABLE_PLATFORM_MINGW32 && c == '\r')) 211 if (c == '\0' || (ENABLE_PLATFORM_MINGW32 && c == '\r'))
212 continue; 212 continue;
213 if (backslash) { 213 if (!(read_flags & BUILTIN_READ_RAW)) {
214 backslash = 0; 214 if (backslash) {
215 if (c != '\n') 215 backslash = 0;
216 goto put; 216 if (c != '\n')
217 continue; 217 goto put;
218 } 218 continue;
219 if (!(read_flags & BUILTIN_READ_RAW) && c == '\\') { 219 }
220 backslash = 1; 220 if (c == '\\') {
221 continue; 221 backslash = 1;
222 continue;
223 }
222 } 224 }
223 if (c == '\n') 225 if (c == '\n')
224 break; 226 break;
@@ -408,13 +410,7 @@ shell_builtin_ulimit(char **argv)
408 /* In case getopt was already called: 410 /* In case getopt was already called:
409 * reset the libc getopt() function, which keeps internal state. 411 * reset the libc getopt() function, which keeps internal state.
410 */ 412 */
411#ifdef __GLIBC__ 413 GETOPT_RESET();
412 optind = 0;
413#else /* BSD style */
414 optind = 1;
415 /* optreset = 1; */
416#endif
417 /* optarg = NULL; opterr = 0; optopt = 0; - do we need this?? */
418 414
419 argc = 1; 415 argc = 1;
420 while (argv[argc]) 416 while (argv[argc])