summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko2009-03-31 19:36:58 +0000
committerDenis Vlasenko2009-03-31 19:36:58 +0000
commitf6fbd62760252f90ce95212f5cc33f8204159410 (patch)
treec93d4e2de96c2c8fbd51c9e94348d2e7bede0570
parent46aeab9a349d097307a87d7dfde3057f9e4e6722 (diff)
downloadbusybox-f6fbd62760252f90ce95212f5cc33f8204159410.zip
busybox-f6fbd62760252f90ce95212f5cc33f8204159410.tar.gz
ash: add/improve comments, no code changes
-rw-r--r--shell/ash.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 1de989e..b63a243 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -12618,14 +12618,16 @@ readcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
}
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 @@ readcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
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;