diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2017-04-05 18:31:19 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2017-04-05 18:31:19 +0200 |
commit | e7ac7abf06c90e19525484bf3da97fe9b435f185 (patch) | |
tree | 2aefb1e5b21b70322636e356137d29794744336b /coreutils/nl.c | |
parent | d88f94a5df3a2edb8ba56fab5c13674b452f87ab (diff) | |
download | busybox-w32-e7ac7abf06c90e19525484bf3da97fe9b435f185.tar.gz busybox-w32-e7ac7abf06c90e19525484bf3da97fe9b435f185.tar.bz2 busybox-w32-e7ac7abf06c90e19525484bf3da97fe9b435f185.zip |
nl: use CONFIG_NL, not CONFIG_UNIQ
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils/nl.c')
-rw-r--r-- | coreutils/nl.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/coreutils/nl.c b/coreutils/nl.c index 97931f334..a86746974 100644 --- a/coreutils/nl.c +++ b/coreutils/nl.c | |||
@@ -8,9 +8,9 @@ | |||
8 | //config: help | 8 | //config: help |
9 | //config: nl is used to number lines of files. | 9 | //config: nl is used to number lines of files. |
10 | 10 | ||
11 | //applet:IF_UNIQ(APPLET(nl, BB_DIR_USR_BIN, BB_SUID_DROP)) | 11 | //applet:IF_NL(APPLET(nl, BB_DIR_USR_BIN, BB_SUID_DROP)) |
12 | 12 | ||
13 | //kbuild:lib-$(CONFIG_UNIQ) += nl.o | 13 | //kbuild:lib-$(CONFIG_NL) += nl.o |
14 | 14 | ||
15 | //usage:#define nl_trivial_usage | 15 | //usage:#define nl_trivial_usage |
16 | //usage: "[OPTIONS] [FILE]..." | 16 | //usage: "[OPTIONS] [FILE]..." |
@@ -56,7 +56,6 @@ void FAST_FUNC print_numbered_lines(struct number_state *ns, const char *filenam | |||
56 | int nl_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 56 | int nl_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
57 | int nl_main(int argc UNUSED_PARAM, char **argv) | 57 | int nl_main(int argc UNUSED_PARAM, char **argv) |
58 | { | 58 | { |
59 | unsigned opt; | ||
60 | struct number_state ns; | 59 | struct number_state ns; |
61 | const char *opt_b = "t"; | 60 | const char *opt_b = "t"; |
62 | enum { | 61 | enum { |
@@ -83,10 +82,10 @@ int nl_main(int argc UNUSED_PARAM, char **argv) | |||
83 | ns.start = 1; | 82 | ns.start = 1; |
84 | ns.inc = 1; | 83 | ns.inc = 1; |
85 | ns.sep = "\t"; | 84 | ns.sep = "\t"; |
86 | opt = getopt32(argv, "pw:+s:v:+i:+b:", &ns.width, &ns.sep, &ns.start, &ns.inc, &opt_b); | 85 | getopt32(argv, "pw:+s:v:+i:+b:", &ns.width, &ns.sep, &ns.start, &ns.inc, &opt_b); |
87 | ns.all = (opt_b[0] == 'a'); | 86 | ns.all = (opt_b[0] == 'a'); |
88 | ns.nonempty = (opt_b[0] == 't'); | 87 | ns.nonempty = (opt_b[0] == 't'); |
89 | ns.empty_str = xasprintf("%*s\n", ns.width + strlen(ns.sep), ""); | 88 | ns.empty_str = xasprintf("%*s\n", ns.width + (int)strlen(ns.sep), ""); |
90 | 89 | ||
91 | argv += optind; | 90 | argv += optind; |
92 | if (!*argv) | 91 | if (!*argv) |