diff options
| author | Ron Yorston <rmy@pobox.com> | 2018-05-13 08:15:58 +0100 |
|---|---|---|
| committer | Ron Yorston <rmy@pobox.com> | 2018-05-13 08:15:58 +0100 |
| commit | 3ce461fdf3b7adfd44ea058fa0c5ca6d91a5bc5d (patch) | |
| tree | a527d0db15f34a137fc11df5538c7f2f7c6d72de /coreutils | |
| parent | 6f7d1af269eed4b42daeb9c6dfd2ba62f9cd47e4 (diff) | |
| parent | d80eecb86812c1fbda652f9b995060c26ba0b155 (diff) | |
| download | busybox-w32-3ce461fdf3b7adfd44ea058fa0c5ca6d91a5bc5d.tar.gz busybox-w32-3ce461fdf3b7adfd44ea058fa0c5ca6d91a5bc5d.tar.bz2 busybox-w32-3ce461fdf3b7adfd44ea058fa0c5ca6d91a5bc5d.zip | |
Merge branch 'busybox' into merge
Diffstat (limited to 'coreutils')
| -rw-r--r-- | coreutils/cat.c | 6 | ||||
| -rw-r--r-- | coreutils/test.c | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/coreutils/cat.c b/coreutils/cat.c index 5f02233ca..fb735f994 100644 --- a/coreutils/cat.c +++ b/coreutils/cat.c | |||
| @@ -112,10 +112,10 @@ static int catv(unsigned opts, char **argv) | |||
| 112 | int retval = EXIT_SUCCESS; | 112 | int retval = EXIT_SUCCESS; |
| 113 | int fd; | 113 | int fd; |
| 114 | #if ENABLE_FEATURE_CATN | 114 | #if ENABLE_FEATURE_CATN |
| 115 | unsigned lineno = 0; | 115 | bool eol_seen = (opts & (CAT_OPT_n|CAT_OPT_b)); |
| 116 | unsigned eol_char = (opts & (CAT_OPT_n|CAT_OPT_b)) ? '\n' : 0x100; | 116 | unsigned eol_char = (eol_seen ? '\n' : 0x100); |
| 117 | unsigned skip_num_on = (opts & CAT_OPT_b) ? '\n' : 0x100; | 117 | unsigned skip_num_on = (opts & CAT_OPT_b) ? '\n' : 0x100; |
| 118 | bool eol_seen = 1; | 118 | unsigned lineno = 0; |
| 119 | #endif | 119 | #endif |
| 120 | 120 | ||
| 121 | BUILD_BUG_ON(CAT_OPT_e != VISIBLE_ENDLINE); | 121 | BUILD_BUG_ON(CAT_OPT_e != VISIBLE_ENDLINE); |
diff --git a/coreutils/test.c b/coreutils/test.c index 824ce3b5a..ddb66ddce 100644 --- a/coreutils/test.c +++ b/coreutils/test.c | |||
| @@ -313,6 +313,9 @@ static const struct operator_t ops_table[] = { | |||
| 313 | { /* "-L" */ FILSYM , UNOP }, | 313 | { /* "-L" */ FILSYM , UNOP }, |
| 314 | { /* "-S" */ FILSOCK , UNOP }, | 314 | { /* "-S" */ FILSOCK , UNOP }, |
| 315 | { /* "=" */ STREQ , BINOP }, | 315 | { /* "=" */ STREQ , BINOP }, |
| 316 | /* "==" is bashism, http://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html | ||
| 317 | * lists only "=" as comparison operator. | ||
| 318 | */ | ||
| 316 | { /* "==" */ STREQ , BINOP }, | 319 | { /* "==" */ STREQ , BINOP }, |
| 317 | { /* "!=" */ STRNE , BINOP }, | 320 | { /* "!=" */ STRNE , BINOP }, |
| 318 | { /* "<" */ STRLT , BINOP }, | 321 | { /* "<" */ STRLT , BINOP }, |
| @@ -357,6 +360,7 @@ static const char ops_texts[] ALIGN1 = | |||
| 357 | "-L" "\0" | 360 | "-L" "\0" |
| 358 | "-S" "\0" | 361 | "-S" "\0" |
| 359 | "=" "\0" | 362 | "=" "\0" |
| 363 | /* "==" is bashism */ | ||
| 360 | "==" "\0" | 364 | "==" "\0" |
| 361 | "!=" "\0" | 365 | "!=" "\0" |
| 362 | "<" "\0" | 366 | "<" "\0" |
