summaryrefslogtreecommitdiff
path: root/shell/msh.c
diff options
context:
space:
mode:
authorDenis Vlasenko2007-03-24 14:06:51 +0000
committerDenis Vlasenko2007-03-24 14:06:51 +0000
commit5b27fbe990d868441452c474e5b14e94f8bc8335 (patch)
treec6a7e85b1d6d1c8e18089c3f7d83e392cf04448f /shell/msh.c
parentb5b45a91f0f2d3f57864b49eb3126c9eb6a2b1eb (diff)
downloadbusybox-5b27fbe990d868441452c474e5b14e94f8bc8335.zip
busybox-5b27fbe990d868441452c474e5b14e94f8bc8335.tar.gz
dc: use common_bufsiz1 for evaluation stack
msh: fix "underscore bug" (a_b=1111 didn't work) dnsd: openlog(), so that applet's name is logged
Diffstat (limited to 'shell/msh.c')
-rw-r--r--shell/msh.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/shell/msh.c b/shell/msh.c
index 41f4cc6..d9dd3ef 100644
--- a/shell/msh.c
+++ b/shell/msh.c
@@ -1191,23 +1191,22 @@ static int isassign(const char *s)
unsigned char c;
DBGPRINTF7(("ISASSIGN: enter, s=%s\n", s));
- /* no isalpha() - we shouldn't use locale */
c = *s;
- if (c != '_'
- && (unsigned)((c|0x20) - 'a') > 25 /* not letter */
- ) {
+ /* no isalpha() - we shouldn't use locale */
+ /* c | 0x20 - lowercase (Latin) letters */
+ if (c != '_' && (unsigned)((c|0x20) - 'a') > 25)
+ /* not letter */
return 0;
- }
+
while (1) {
c = *++s;
- if (c == '\0')
- return 0;
if (c == '=')
return 1;
- c |= 0x20; /* lowercase letters, doesn't affect numbers */
+ if (c == '\0')
+ return 0;
if (c != '_'
&& (unsigned)(c - '0') > 9 /* not number */
- && (unsigned)(c - 'a') > 25 /* not letter */
+ && (unsigned)((c|0x20) - 'a') > 25 /* not letter */
) {
return 0;
}