diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2005-12-10 20:13:54 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2005-12-10 20:13:54 +0000 |
commit | d77b781c1f0f0913b252c8f207f5518e77733dc3 (patch) | |
tree | 08eae1b6ca8943a14424799fba78e2508ca5f3cd | |
parent | 377bdaff3be5e6598d17b8c32fddad73015f54ab (diff) | |
download | busybox-w32-d77b781c1f0f0913b252c8f207f5518e77733dc3.tar.gz busybox-w32-d77b781c1f0f0913b252c8f207f5518e77733dc3.tar.bz2 busybox-w32-d77b781c1f0f0913b252c8f207f5518e77733dc3.zip |
- remove unused variable have_read_stdin
- use FLAG_WIDTH
-rw-r--r-- | coreutils/fold.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/coreutils/fold.c b/coreutils/fold.c index e45a75b33..8f74ed88d 100644 --- a/coreutils/fold.c +++ b/coreutils/fold.c | |||
@@ -48,16 +48,10 @@ static int adjust_column(int column, char c) | |||
48 | extern int fold_main(int argc, char **argv) | 48 | extern int fold_main(int argc, char **argv) |
49 | { | 49 | { |
50 | char *w_opt; | 50 | char *w_opt; |
51 | |||
52 | /* If nonzero, at least one of the files we read was standard input. */ | ||
53 | int have_read_stdin = 0; | ||
54 | |||
55 | int width = 80; | 51 | int width = 80; |
56 | int i; | 52 | int i; |
57 | int errs = 0; | 53 | int errs = 0; |
58 | 54 | ||
59 | have_read_stdin = 0; | ||
60 | |||
61 | /* Turn any numeric options into -w options. */ | 55 | /* Turn any numeric options into -w options. */ |
62 | for (i = 1; i < argc; i++) { | 56 | for (i = 1; i < argc; i++) { |
63 | char const *a = argv[i]; | 57 | char const *a = argv[i]; |
@@ -77,7 +71,7 @@ extern int fold_main(int argc, char **argv) | |||
77 | } | 71 | } |
78 | 72 | ||
79 | flags = bb_getopt_ulflags(argc, argv, "bsw:", &w_opt); | 73 | flags = bb_getopt_ulflags(argc, argv, "bsw:", &w_opt); |
80 | if (flags & 4) | 74 | if (flags & FLAG_WIDTH) |
81 | width = bb_xgetlarg(w_opt, 10, 1, 10000); | 75 | width = bb_xgetlarg(w_opt, 10, 1, 10000); |
82 | 76 | ||
83 | argv += optind; | 77 | argv += optind; |
@@ -112,7 +106,7 @@ rescan: | |||
112 | 106 | ||
113 | if (column > width) { | 107 | if (column > width) { |
114 | /* This character would make the line too long. | 108 | /* This character would make the line too long. |
115 | Print the line plus a newline, and make this character | 109 | Print the line plus a newline, and make this character |
116 | start the next line. */ | 110 | start the next line. */ |
117 | if (flags & FLAG_BREAK_SPACES) { | 111 | if (flags & FLAG_BREAK_SPACES) { |
118 | /* Look for the last blank. */ | 112 | /* Look for the last blank. */ |
@@ -167,3 +161,4 @@ rescan: | |||
167 | 161 | ||
168 | bb_fflush_stdout_and_exit(errs); | 162 | bb_fflush_stdout_and_exit(errs); |
169 | } | 163 | } |
164 | /* vi: set sw=4 ts=4: */ | ||