summaryrefslogtreecommitdiff
path: root/shell/ash.c
diff options
context:
space:
mode:
authorDenis Vlasenko2007-04-08 16:07:02 +0000
committerDenis Vlasenko2007-04-08 16:07:02 +0000
commit240a1cfbbe6cf42e8013ce06cb567b3f28c8727f (patch)
tree8e69bb572dbb2636689a15b21d7a646e942b5091 /shell/ash.c
parent5694d5f8d22be2f5be53b2d0ce2e0283ef57d93f (diff)
downloadbusybox-240a1cfbbe6cf42e8013ce06cb567b3f28c8727f.zip
busybox-240a1cfbbe6cf42e8013ce06cb567b3f28c8727f.tar.gz
add some missed statics on constant objects.
fix few #ifndef ENABLE_xxx # size busybox_old busybox_unstripped text data bss dec hex filename 677152 2920 18208 698280 aa7a8 busybox_old 676420 2920 18208 697548 aa4cc busybox_unstripped
Diffstat (limited to 'shell/ash.c')
-rw-r--r--shell/ash.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/shell/ash.c b/shell/ash.c
index a5ffaaf..950cdaa 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -6967,6 +6967,11 @@ tokname(int tok)
{
static char buf[16];
+//try this:
+//if (tok < TSEMI) return tokname_array[tok] + 1;
+//sprintf(buf, "\"%s\"", tokname_array[tok] + 1);
+//return buf;
+
if (tok >= TSEMI)
buf[0] = '"';
sprintf(buf + (tok >= TSEMI), "%s%c",
@@ -6978,15 +6983,15 @@ tokname(int tok)
static int
pstrcmp(const void *a, const void *b)
{
- return strcmp((const char *) a, (*(const char *const *) b) + 1);
+ return strcmp((char*) a, (*(char**) b) + 1);
}
static const char *const *
findkwd(const char *s)
{
return bsearch(s, tokname_array + KWDOFFSET,
- (sizeof(tokname_array) / sizeof(const char *)) - KWDOFFSET,
- sizeof(const char *), pstrcmp);
+ (sizeof(tokname_array) / sizeof(char *)) - KWDOFFSET,
+ sizeof(char *), pstrcmp);
}
/*