svn commit: [25911] trunk/busybox/shell

vda at busybox.net vda at busybox.net
Tue Mar 31 19:36:58 UTC 2009


Author: vda
Date: 2009-03-31 19:36:58 +0000 (Tue, 31 Mar 2009)
New Revision: 25911

Log:
ash: add/improve comments, no code changes



Modified:
   trunk/busybox/shell/ash.c


Changeset:
Modified: trunk/busybox/shell/ash.c
===================================================================
--- trunk/busybox/shell/ash.c	2009-03-31 19:18:17 UTC (rev 25910)
+++ trunk/busybox/shell/ash.c	2009-03-31 19:36:58 UTC (rev 25911)
@@ -12618,14 +12618,16 @@
 		}
 		if (c == '\n')
 			break;
+		/* $IFS splitting */
+/* http://www.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_05	*/
 		is_ifs = strchr(ifs, c);
 		if (startword && is_ifs) {
 			if (isspace(c))
 				continue;
-			/* non-space ifs char */
+			/* it is a non-space ifs char */
 			startword--;
 			if (startword == 1) /* first one? */
-				continue;
+				continue; /* yes, it is not next word yet */
 		}
 		startword = 0;
 		if (ap[1] != NULL && is_ifs) {
@@ -12634,7 +12636,7 @@
 			beg = stackblock();
 			setvar(*ap, beg, 0);
 			ap++;
-			/* can we skip one non-space ifs? (2: yes) */
+			/* can we skip one non-space ifs char? (2: yes) */
 			startword = isspace(c) ? 2 : 1;
 			STARTSTACKSTR(p);
 			continue;



More information about the busybox-cvs mailing list