aboutsummaryrefslogtreecommitdiff
path: root/editors/sed.c
diff options
context:
space:
mode:
Diffstat (limited to 'editors/sed.c')
-rw-r--r--editors/sed.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/editors/sed.c b/editors/sed.c
index e10078b7c..d6e25aedc 100644
--- a/editors/sed.c
+++ b/editors/sed.c
@@ -68,8 +68,8 @@
68//applet:IF_SED(APPLET(sed, BB_DIR_BIN, BB_SUID_DROP)) 68//applet:IF_SED(APPLET(sed, BB_DIR_BIN, BB_SUID_DROP))
69 69
70//usage:#define sed_trivial_usage 70//usage:#define sed_trivial_usage
71//usage: "[-inrE] [-f FILE]... [-e CMD]... [FILE]...\n" 71//usage: "[-i[SFX]] [-nrE] [-f FILE]... [-e CMD]... [FILE]...\n"
72//usage: "or: sed [-inrE] CMD [FILE]..." 72//usage: "or: sed [-i[SFX]] [-nrE] CMD [FILE]..."
73//usage:#define sed_full_usage "\n\n" 73//usage:#define sed_full_usage "\n\n"
74//usage: " -e CMD Add CMD to sed commands to be executed" 74//usage: " -e CMD Add CMD to sed commands to be executed"
75//usage: "\n -f FILE Add FILE contents to sed commands to be executed" 75//usage: "\n -f FILE Add FILE contents to sed commands to be executed"
@@ -1512,21 +1512,21 @@ int sed_main(int argc UNUSED_PARAM, char **argv)
1512 /* do normal option parsing */ 1512 /* do normal option parsing */
1513 opt_e = opt_f = NULL; 1513 opt_e = opt_f = NULL;
1514 opt_i = NULL; 1514 opt_i = NULL;
1515 opt_complementary = "nn"; /* count -n */
1516
1517 IF_LONG_OPTS(applet_long_options = sed_longopts);
1518
1519 /* -i must be first, to match OPT_in_place definition */ 1515 /* -i must be first, to match OPT_in_place definition */
1520 /* -E is a synonym of -r: 1516 /* -E is a synonym of -r:
1521 * GNU sed 4.2.1 mentions it in neither --help 1517 * GNU sed 4.2.1 mentions it in neither --help
1522 * nor manpage, but does recognize it. 1518 * nor manpage, but does recognize it.
1523 */ 1519 */
1524 opt = getopt32(argv, "i::rEne:*f:*", &opt_i, &opt_e, &opt_f, 1520 opt = getopt32long(argv, "^"
1525 &G.be_quiet); /* counter for -n */ 1521 "i::rEne:*f:*"
1522 "\0" "nn"/*count -n*/,
1523 sed_longopts,
1524 &opt_i, &opt_e, &opt_f,
1525 &G.be_quiet); /* counter for -n */
1526 //argc -= optind; 1526 //argc -= optind;
1527 argv += optind; 1527 argv += optind;
1528 if (opt & OPT_in_place) { // -i 1528 if (opt & OPT_in_place) { // -i
1529 atexit(cleanup_outname); 1529 die_func = cleanup_outname;
1530 } 1530 }
1531 if (opt & (2|4)) 1531 if (opt & (2|4))
1532 G.regex_type |= REG_EXTENDED; // -r or -E 1532 G.regex_type |= REG_EXTENDED; // -r or -E