diff options
author | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-12-24 15:23:28 +0000 |
---|---|---|
committer | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-12-24 15:23:28 +0000 |
commit | b4a886ea79cb37f418cf8ed9a9bc3f798a8e8652 (patch) | |
tree | 283bf4908f787f50a90cb84c014a580485307a9b /shell | |
parent | 8fce88b1485f92beaf4bb114d4b2b1195a898461 (diff) | |
download | busybox-w32-b4a886ea79cb37f418cf8ed9a9bc3f798a8e8652.tar.gz busybox-w32-b4a886ea79cb37f418cf8ed9a9bc3f798a8e8652.tar.bz2 busybox-w32-b4a886ea79cb37f418cf8ed9a9bc3f798a8e8652.zip |
random tiny size savings
git-svn-id: svn://busybox.net/trunk/busybox@17070 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ash.c | 16 | ||||
-rw-r--r-- | shell/msh.c | 8 |
2 files changed, 8 insertions, 16 deletions
diff --git a/shell/ash.c b/shell/ash.c index 2de61dad9..e8f7d30bd 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -11893,17 +11893,11 @@ static int helpcmd(int argc, char **argv) | |||
11893 | } | 11893 | } |
11894 | } | 11894 | } |
11895 | #ifdef CONFIG_FEATURE_SH_STANDALONE_SHELL | 11895 | #ifdef CONFIG_FEATURE_SH_STANDALONE_SHELL |
11896 | { | 11896 | for (i = 0; i < NUM_APPLETS; i++) { |
11897 | extern const struct BB_applet applets[]; | 11897 | col += out1fmt("%c%s", ((col == 0) ? '\t' : ' '), applets[i].name); |
11898 | extern const size_t NUM_APPLETS; | 11898 | if (col > 60) { |
11899 | 11899 | out1fmt("\n"); | |
11900 | for (i = 0; i < NUM_APPLETS; i++) { | 11900 | col = 0; |
11901 | |||
11902 | col += out1fmt("%c%s", ((col == 0) ? '\t' : ' '), applets[i].name); | ||
11903 | if (col > 60) { | ||
11904 | out1fmt("\n"); | ||
11905 | col = 0; | ||
11906 | } | ||
11907 | } | 11901 | } |
11908 | } | 11902 | } |
11909 | #endif | 11903 | #endif |
diff --git a/shell/msh.c b/shell/msh.c index 45ca3df81..d4f534551 100644 --- a/shell/msh.c +++ b/shell/msh.c | |||
@@ -3243,8 +3243,8 @@ static int dohelp(struct op *t) | |||
3243 | int col; | 3243 | int col; |
3244 | const struct builtincmd *x; | 3244 | const struct builtincmd *x; |
3245 | 3245 | ||
3246 | printf("\nBuilt-in commands:\n"); | 3246 | puts("\nBuilt-in commands:\n" |
3247 | printf("-------------------\n"); | 3247 | "-------------------"); |
3248 | 3248 | ||
3249 | for (col = 0, x = builtincmds; x->builtinfunc != NULL; x++) { | 3249 | for (col = 0, x = builtincmds; x->builtinfunc != NULL; x++) { |
3250 | if (!x->name) | 3250 | if (!x->name) |
@@ -3259,8 +3259,6 @@ static int dohelp(struct op *t) | |||
3259 | { | 3259 | { |
3260 | int i; | 3260 | int i; |
3261 | const struct BB_applet *applet; | 3261 | const struct BB_applet *applet; |
3262 | extern const struct BB_applet applets[]; | ||
3263 | extern const size_t NUM_APPLETS; | ||
3264 | 3262 | ||
3265 | for (i = 0, applet = applets; i < NUM_APPLETS; applet++, i++) { | 3263 | for (i = 0, applet = applets; i < NUM_APPLETS; applet++, i++) { |
3266 | if (!applet->name) | 3264 | if (!applet->name) |
@@ -3274,7 +3272,7 @@ static int dohelp(struct op *t) | |||
3274 | } | 3272 | } |
3275 | } | 3273 | } |
3276 | #endif | 3274 | #endif |
3277 | printf("\n\n"); | 3275 | puts("\n"); |
3278 | return EXIT_SUCCESS; | 3276 | return EXIT_SUCCESS; |
3279 | } | 3277 | } |
3280 | 3278 | ||