diff options
author | Ron Yorston <rmy@pobox.com> | 2017-05-29 14:20:10 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2017-05-29 14:34:28 +0100 |
commit | da4f331955bed8afda670afcd58d524a04a0faa9 (patch) | |
tree | f6a3879aefdd714240f8c022375f687b512d2238 /shell/shell_common.c | |
parent | 74163a535fd21f5fcca4c052d2e7c192d3e264fa (diff) | |
parent | 6683d1cbb44859f549f87f882545b84b9369585c (diff) | |
download | busybox-w32-da4f331955bed8afda670afcd58d524a04a0faa9.tar.gz busybox-w32-da4f331955bed8afda670afcd58d524a04a0faa9.tar.bz2 busybox-w32-da4f331955bed8afda670afcd58d524a04a0faa9.zip |
Merge branch 'busybox' into merge
Diffstat (limited to 'shell/shell_common.c')
-rw-r--r-- | shell/shell_common.c | 28 |
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]) |