changeset 72:116405f248cb

Comment and whitespace cleanups
author Rob Landley <rob@landley.net>
date Sat, 20 Jan 2007 22:41:29 -0500
parents 40103a3ddcb0
children fb56ba93afa3
files toys/echo.c
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/toys/echo.c	Sat Jan 20 21:32:47 2007 -0500
+++ b/toys/echo.c	Sat Jan 20 22:41:29 2007 -0500
@@ -14,7 +14,9 @@
 		arg = toys.optargs[i];
 		if (!arg) break;
 		if (i++) xputc(' ');
-		
+
+		// Handle -e
+	
 		if (toys.optflags&2) {
 			int c, j = 0;
 			for (;;) {
@@ -24,6 +26,7 @@
 					char *found;
 					int d = arg[j++];
 
+					// handle \escapes
 
 					if (d) {
 						found = strchr(from, d);
@@ -34,14 +37,13 @@
 							while (arg[j]>='0' && arg[j]<='7')
 								c = (c*8)+arg[j++]-'0';
 						}
-						// \0123
 					}
 				}
 				xputc(c);
 			}
-			// \\ thingy
 		} else xprintf("%s", arg);
 	}
+
 	// Output "\n" if no -n
 	if (!(toys.optflags&1)) xputc('\n');
 done: