aboutsummaryrefslogtreecommitdiff
path: root/toys/posix/nl.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2018-08-26 14:16:49 -0500
committerRob Landley <rob@landley.net>2018-08-26 14:16:49 -0500
commit009b55edc4bad5b46ace88f3c255bbff8671d137 (patch)
treef4f856ef871104e37a5d123aa3ec3d01246c9e10 /toys/posix/nl.c
parent1aaef2d2b72800a5c6bedae04941304ce8e153be (diff)
downloadtoybox-009b55edc4bad5b46ace88f3c255bbff8671d137.tar.gz
Convert more commands to the new option/GLOBALS code style.
Diffstat (limited to 'toys/posix/nl.c')
-rw-r--r--toys/posix/nl.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/toys/posix/nl.c b/toys/posix/nl.c
index 9b02bfaa..32848332 100644
--- a/toys/posix/nl.c
+++ b/toys/posix/nl.c
@@ -7,7 +7,7 @@
* This implements a subset: only one logical page (-ip), no sections (-dfh).
* todo: -lv
-USE_NL(NEWTOY(nl, "v#<1=1l#b:n:s:w#<0=6E", TOYFLAG_BIN))
+USE_NL(NEWTOY(nl, "v#<1=1l#w#<0=6Eb:n:s:", TOYFLAG_BIN))
config NL
bool "nl"
@@ -29,12 +29,8 @@ config NL
#include "toys.h"
GLOBALS(
- long w;
- char *s;
- char *n;
- char *b;
- long l;
- long v;
+ char *s, *n, *b;
+ long w, l, v;
// Count of consecutive blank lines for -l has to persist between files
long lcount;