X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=coreutils%2Fnl.c;h=c2f8b10423be1867a58c0b4792840934063fc745;hb=00bd76728d44901a260f2dcdbeed52b3c85d6b6b;hp=9f303fe6c3a0f046ed598f684c10bc5d6f657b12;hpb=4eed2c6c5092ed95b8ee6d994106c54a9fc6ed3e;p=oweals%2Fbusybox.git diff --git a/coreutils/nl.c b/coreutils/nl.c index 9f303fe6c..c2f8b1042 100644 --- a/coreutils/nl.c +++ b/coreutils/nl.c @@ -8,7 +8,7 @@ //config: bool "nl (4.3 kb)" //config: default y //config: help -//config: nl is used to number lines of files. +//config: nl is used to number lines of files. //applet:IF_NL(APPLET(nl, BB_DIR_USR_BIN, BB_SUID_DROP)) @@ -57,14 +57,13 @@ int nl_main(int argc UNUSED_PARAM, char **argv) "starting-line-number\0"Required_argument "v" "number-width\0" Required_argument "w" ; - - applet_long_options = nl_longopts; #endif ns.width = 6; ns.start = 1; ns.inc = 1; ns.sep = "\t"; - getopt32(argv, "pw:+s:v:+i:+b:", &ns.width, &ns.sep, &ns.start, &ns.inc, &opt_b); + getopt32long(argv, "pw:+s:v:+i:+b:", nl_longopts, + &ns.width, &ns.sep, &ns.start, &ns.inc, &opt_b); ns.all = (opt_b[0] == 'a'); ns.nonempty = (opt_b[0] == 't'); ns.empty_str = xasprintf("%*s\n", ns.width + (int)strlen(ns.sep), "");