diff toys/catv.c @ 186:25447caf1b4b

Change command main() functions to return void, and exit(toys.exitval) from the toybox infrastructure instead. Eliminates a return call from each command.
author Rob Landley <rob@landley.net>
date Thu, 29 Nov 2007 18:14:37 -0600
parents 29e2051296fd
children c983a0af6d4e
line wrap: on
line diff
--- a/toys/catv.c	Thu Nov 29 17:49:50 2007 -0600
+++ b/toys/catv.c	Thu Nov 29 18:14:37 2007 -0600
@@ -34,21 +34,19 @@
 			}
 			if (c < 32) {
 				if (c == 10) {
-					if (toys.optflags & 1) putchar('$');
+					if (toys.optflags & 1) xputc('$');
 				} else if (toys.optflags & (c==9 ? 2 : 4)) {
 					printf("^%c", c+'@');
 					continue;
 				}
 			}
-			putchar(c);
+			xputc(c);
 		}
 	}
 }
 
-int catv_main(void)
+void catv_main(void)
 {
 	toys.optflags^=4;
 	loopfiles(toys.optargs, do_catv);
-
-	return toys.exitval;
 }