aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-03-24 14:06:51 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-03-24 14:06:51 +0000
commit5b27fbe990d868441452c474e5b14e94f8bc8335 (patch)
treec6a7e85b1d6d1c8e18089c3f7d83e392cf04448f /shell
parentb5b45a91f0f2d3f57864b49eb3126c9eb6a2b1eb (diff)
downloadbusybox-w32-5b27fbe990d868441452c474e5b14e94f8bc8335.tar.gz
busybox-w32-5b27fbe990d868441452c474e5b14e94f8bc8335.tar.bz2
busybox-w32-5b27fbe990d868441452c474e5b14e94f8bc8335.zip
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')
-rw-r--r--shell/msh.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/shell/msh.c b/shell/msh.c
index 41f4cc60d..d9dd3efb2 100644
--- a/shell/msh.c
+++ b/shell/msh.c
@@ -1191,23 +1191,22 @@ static int isassign(const char *s)
1191 unsigned char c; 1191 unsigned char c;
1192 DBGPRINTF7(("ISASSIGN: enter, s=%s\n", s)); 1192 DBGPRINTF7(("ISASSIGN: enter, s=%s\n", s));
1193 1193
1194 /* no isalpha() - we shouldn't use locale */
1195 c = *s; 1194 c = *s;
1196 if (c != '_' 1195 /* no isalpha() - we shouldn't use locale */
1197 && (unsigned)((c|0x20) - 'a') > 25 /* not letter */ 1196 /* c | 0x20 - lowercase (Latin) letters */
1198 ) { 1197 if (c != '_' && (unsigned)((c|0x20) - 'a') > 25)
1198 /* not letter */
1199 return 0; 1199 return 0;
1200 } 1200
1201 while (1) { 1201 while (1) {
1202 c = *++s; 1202 c = *++s;
1203 if (c == '\0')
1204 return 0;
1205 if (c == '=') 1203 if (c == '=')
1206 return 1; 1204 return 1;
1207 c |= 0x20; /* lowercase letters, doesn't affect numbers */ 1205 if (c == '\0')
1206 return 0;
1208 if (c != '_' 1207 if (c != '_'
1209 && (unsigned)(c - '0') > 9 /* not number */ 1208 && (unsigned)(c - '0') > 9 /* not number */
1210 && (unsigned)(c - 'a') > 25 /* not letter */ 1209 && (unsigned)((c|0x20) - 'a') > 25 /* not letter */
1211 ) { 1210 ) {
1212 return 0; 1211 return 0;
1213 } 1212 }