diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-10-03 21:00:06 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2006-10-03 21:00:06 +0000 |
commit | 67b23e6043d8e2b30b0bf3bc105b8583c2a26db5 (patch) | |
tree | edb58560b444979051b42ab7f0c0c718f7459754 /editors/sed.c | |
parent | 40920825d59874cf285390434486e88c8498d2d8 (diff) | |
download | busybox-w32-67b23e6043d8e2b30b0bf3bc105b8583c2a26db5.tar.gz busybox-w32-67b23e6043d8e2b30b0bf3bc105b8583c2a26db5.tar.bz2 busybox-w32-67b23e6043d8e2b30b0bf3bc105b8583c2a26db5.zip |
getopt_ulflags -> getopt32.
It is impossible to formulate sane ABI based on
size of ulong because it can be 32-bit or 64-bit.
Basically it means that you cannot portably use
more that 32 option chars in one call anyway...
Make it explicit.
Diffstat (limited to 'editors/sed.c')
-rw-r--r-- | editors/sed.c | 10 |
1 files changed, 5 insertions, 5 deletions
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] */ |