diff options
Diffstat (limited to 'editors')
-rw-r--r-- | editors/awk.c | 4 | ||||
-rw-r--r-- | editors/patch.c | 2 | ||||
-rw-r--r-- | editors/sed.c | 10 |
3 files changed, 8 insertions, 8 deletions
diff --git a/editors/awk.c b/editors/awk.c index b46f25c0a..c1b56d9e5 100644 --- a/editors/awk.c +++ b/editors/awk.c | |||
@@ -2634,7 +2634,7 @@ static rstream *next_input_file(void) | |||
2634 | 2634 | ||
2635 | int awk_main(int argc, char **argv) | 2635 | int awk_main(int argc, char **argv) |
2636 | { | 2636 | { |
2637 | unsigned long opt; | 2637 | unsigned opt; |
2638 | char *opt_F, *opt_v, *opt_W; | 2638 | char *opt_F, *opt_v, *opt_W; |
2639 | char *s, *s1; | 2639 | char *s, *s1; |
2640 | int i, j, c, flen; | 2640 | int i, j, c, flen; |
@@ -2691,7 +2691,7 @@ keep_going: | |||
2691 | free(s); | 2691 | free(s); |
2692 | } | 2692 | } |
2693 | 2693 | ||
2694 | opt = bb_getopt_ulflags(argc, argv, "F:v:f:W:", &opt_F, &opt_v, &programname, &opt_W); | 2694 | opt = getopt32(argc, argv, "F:v:f:W:", &opt_F, &opt_v, &programname, &opt_W); |
2695 | if (opt & 0x1) setvar_s(V[FS], opt_F); // -F | 2695 | if (opt & 0x1) setvar_s(V[FS], opt_F); // -F |
2696 | if (opt & 0x2) if (!is_assignment(opt_v)) bb_show_usage(); // -v | 2696 | if (opt & 0x2) if (!is_assignment(opt_v)) bb_show_usage(); // -v |
2697 | if (opt & 0x4) { // -f | 2697 | if (opt & 0x4) { // -f |
diff --git a/editors/patch.c b/editors/patch.c index a710d8224..c18659eda 100644 --- a/editors/patch.c +++ b/editors/patch.c | |||
@@ -85,7 +85,7 @@ int patch_main(int argc, char **argv) | |||
85 | 85 | ||
86 | { | 86 | { |
87 | char *p, *i; | 87 | char *p, *i; |
88 | ret = bb_getopt_ulflags(argc, argv, "p:i:", &p, &i); | 88 | ret = getopt32(argc, argv, "p:i:", &p, &i); |
89 | if (ret & 1) | 89 | if (ret & 1) |
90 | patch_level = bb_xgetlarg(p, 10, -1, USHRT_MAX); | 90 | patch_level = bb_xgetlarg(p, 10, -1, USHRT_MAX); |
91 | if (ret & 2) { | 91 | if (ret & 2) { |
diff --git a/editors/sed.c b/editors/sed.c index 201665209..7dba8b456 100644 --- a/editors/sed.c +++ b/editors/sed.c | |||
@@ -1109,7 +1109,7 @@ static void add_files_link(llist_t *opt_f) | |||
1109 | 1109 | ||
1110 | int sed_main(int argc, char **argv) | 1110 | int sed_main(int argc, char **argv) |
1111 | { | 1111 | { |
1112 | unsigned long opt; | 1112 | unsigned opt; |
1113 | llist_t *opt_e, *opt_f; | 1113 | llist_t *opt_e, *opt_f; |
1114 | int status = EXIT_SUCCESS; | 1114 | int status = EXIT_SUCCESS; |
1115 | 1115 | ||
@@ -1126,8 +1126,8 @@ int sed_main(int argc, char **argv) | |||
1126 | 1126 | ||
1127 | /* do normal option parsing */ | 1127 | /* do normal option parsing */ |
1128 | opt_e = opt_f = NULL; | 1128 | opt_e = opt_f = NULL; |
1129 | bb_opt_complementally = "e::f::"; /* can occur multiple times */ | 1129 | opt_complementary = "e::f::"; /* can occur multiple times */ |
1130 | opt = bb_getopt_ulflags(argc, argv, "irne:f:", &opt_e, &opt_f); | 1130 | opt = getopt32(argc, argv, "irne:f:", &opt_e, &opt_f); |
1131 | if (opt & 0x1) { // -i | 1131 | if (opt & 0x1) { // -i |
1132 | bbg.in_place++; | 1132 | bbg.in_place++; |
1133 | atexit(cleanup_outname); | 1133 | atexit(cleanup_outname); |
@@ -1135,11 +1135,11 @@ int sed_main(int argc, char **argv) | |||
1135 | if (opt & 0x2) bbg.regex_type|=REG_EXTENDED; // -r | 1135 | if (opt & 0x2) bbg.regex_type|=REG_EXTENDED; // -r |
1136 | if (opt & 0x4) bbg.be_quiet++; // -n | 1136 | if (opt & 0x4) bbg.be_quiet++; // -n |
1137 | if (opt & 0x8) { // -e | 1137 | if (opt & 0x8) { // -e |
1138 | /* getopt_ulflags reverses order of arguments, handle it */ | 1138 | /* getopt32 reverses order of arguments, handle it */ |
1139 | add_cmds_link(opt_e); | 1139 | add_cmds_link(opt_e); |
1140 | } | 1140 | } |
1141 | if (opt & 0x10) { // -f | 1141 | if (opt & 0x10) { // -f |
1142 | /* getopt_ulflags reverses order of arguments, handle it */ | 1142 | /* getopt32 reverses order of arguments, handle it */ |
1143 | add_files_link(opt_f); | 1143 | add_files_link(opt_f); |
1144 | } | 1144 | } |
1145 | /* if we didn't get a pattern from -e or -f, use argv[optind] */ | 1145 | /* if we didn't get a pattern from -e or -f, use argv[optind] */ |