aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorvda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2007-04-08 16:07:02 +0000
committervda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2007-04-08 16:07:02 +0000
commit9bb500e5d36c2c5945b611c4c2064e03a6ff9660 (patch)
tree8e69bb572dbb2636689a15b21d7a646e942b5091 /shell
parenta90d14bdbfab265b227e483c71dad87b7e1c3c1b (diff)
downloadbusybox-w32-9bb500e5d36c2c5945b611c4c2064e03a6ff9660.tar.gz
busybox-w32-9bb500e5d36c2c5945b611c4c2064e03a6ff9660.tar.bz2
busybox-w32-9bb500e5d36c2c5945b611c4c2064e03a6ff9660.zip
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 git-svn-id: svn://busybox.net/trunk/busybox@18366 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c11
-rw-r--r--shell/lash.c3
2 files changed, 10 insertions, 4 deletions
diff --git a/shell/ash.c b/shell/ash.c
index a5ffaaf8e..950cdaa02 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -6967,6 +6967,11 @@ tokname(int tok)
6967{ 6967{
6968 static char buf[16]; 6968 static char buf[16];
6969 6969
6970//try this:
6971//if (tok < TSEMI) return tokname_array[tok] + 1;
6972//sprintf(buf, "\"%s\"", tokname_array[tok] + 1);
6973//return buf;
6974
6970 if (tok >= TSEMI) 6975 if (tok >= TSEMI)
6971 buf[0] = '"'; 6976 buf[0] = '"';
6972 sprintf(buf + (tok >= TSEMI), "%s%c", 6977 sprintf(buf + (tok >= TSEMI), "%s%c",
@@ -6978,15 +6983,15 @@ tokname(int tok)
6978static int 6983static int
6979pstrcmp(const void *a, const void *b) 6984pstrcmp(const void *a, const void *b)
6980{ 6985{
6981 return strcmp((const char *) a, (*(const char *const *) b) + 1); 6986 return strcmp((char*) a, (*(char**) b) + 1);
6982} 6987}
6983 6988
6984static const char *const * 6989static const char *const *
6985findkwd(const char *s) 6990findkwd(const char *s)
6986{ 6991{
6987 return bsearch(s, tokname_array + KWDOFFSET, 6992 return bsearch(s, tokname_array + KWDOFFSET,
6988 (sizeof(tokname_array) / sizeof(const char *)) - KWDOFFSET, 6993 (sizeof(tokname_array) / sizeof(char *)) - KWDOFFSET,
6989 sizeof(const char *), pstrcmp); 6994 sizeof(char *), pstrcmp);
6990} 6995}
6991 6996
6992/* 6997/*
diff --git a/shell/lash.c b/shell/lash.c
index 58d770fd8..192900bb6 100644
--- a/shell/lash.c
+++ b/shell/lash.c
@@ -716,11 +716,12 @@ static char * strsep_space(char *string, int * ix)
716 716
717static int expand_arguments(char *command) 717static int expand_arguments(char *command)
718{ 718{
719 static const char out_of_space[] = "out of space during expansion";
720
719 int total_length = 0, length, i, retval, ix = 0; 721 int total_length = 0, length, i, retval, ix = 0;
720 expand_t expand_result; 722 expand_t expand_result;
721 char *tmpcmd, *cmd, *cmd_copy; 723 char *tmpcmd, *cmd, *cmd_copy;
722 char *src, *dst, *var; 724 char *src, *dst, *var;
723 const char * const out_of_space = "out of space during expansion";
724 int flags = GLOB_NOCHECK 725 int flags = GLOB_NOCHECK
725#ifdef GLOB_BRACE 726#ifdef GLOB_BRACE
726 | GLOB_BRACE 727 | GLOB_BRACE