svn commit: trunk/busybox/coreutils

aldot at busybox.net aldot at busybox.net
Sat Dec 10 20:13:55 UTC 2005


Author: aldot
Date: 2005-12-10 12:13:54 -0800 (Sat, 10 Dec 2005)
New Revision: 12829

Log:
- remove unused variable have_read_stdin
- use FLAG_WIDTH


Modified:
   trunk/busybox/coreutils/fold.c


Changeset:
Modified: trunk/busybox/coreutils/fold.c
===================================================================
--- trunk/busybox/coreutils/fold.c	2005-12-10 19:30:34 UTC (rev 12828)
+++ trunk/busybox/coreutils/fold.c	2005-12-10 20:13:54 UTC (rev 12829)
@@ -48,16 +48,10 @@
 extern int fold_main(int argc, char **argv)
 {
 	char *w_opt;
-
-	/* If nonzero, at least one of the files we read was standard input. */
-	int have_read_stdin = 0;
-
 	int width = 80;
 	int i;
 	int errs = 0;
 
-	have_read_stdin = 0;
-
 	/* Turn any numeric options into -w options.  */
 	for (i = 1; i < argc; i++) {
 		char const *a = argv[i];
@@ -77,7 +71,7 @@
 	}
 
 	flags = bb_getopt_ulflags(argc, argv, "bsw:", &w_opt);
-	if (flags & 4)
+	if (flags & FLAG_WIDTH)
 		width = bb_xgetlarg(w_opt, 10, 1, 10000);
 
 	argv += optind;
@@ -112,7 +106,7 @@
 
 				if (column > width) {
 					/* This character would make the line too long.
-			 		  Print the line plus a newline, and make this character
+					   Print the line plus a newline, and make this character
 					   start the next line. */
 					if (flags & FLAG_BREAK_SPACES) {
 						/* Look for the last blank. */
@@ -167,3 +161,4 @@
 
 	bb_fflush_stdout_and_exit(errs);
 }
+/* vi: set sw=4 ts=4: */




More information about the busybox-cvs mailing list