aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorvda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2007-03-24 14:06:51 +0000
committervda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2007-03-24 14:06:51 +0000
commit65dffc48de553ce08c0083482d3ec7e71b25c151 (patch)
treec6a7e85b1d6d1c8e18089c3f7d83e392cf04448f /shell
parent4ff05ea28bef62c4fafce789f07a02735af40f9e (diff)
downloadbusybox-w32-65dffc48de553ce08c0083482d3ec7e71b25c151.tar.gz
busybox-w32-65dffc48de553ce08c0083482d3ec7e71b25c151.tar.bz2
busybox-w32-65dffc48de553ce08c0083482d3ec7e71b25c151.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 git-svn-id: svn://busybox.net/trunk/busybox@18225 69ca8d6d-28ef-0310-b511-8ec308f3f277
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 }