diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-11-02 22:09:37 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2006-11-02 22:09:37 +0000 |
commit | 9d4533ede123cf05eb66a00997ede9c64e579b4d (patch) | |
tree | b94af7c76d4f44472930795a9aff1f8339bc281f | |
parent | dd539f76877000e333796da8f30ea760c080a69a (diff) | |
download | busybox-w32-9d4533ede123cf05eb66a00997ede9c64e579b4d.tar.gz busybox-w32-9d4533ede123cf05eb66a00997ede9c64e579b4d.tar.bz2 busybox-w32-9d4533ede123cf05eb66a00997ede9c64e579b4d.zip |
Fix kbuild bugs noticed by Bernhard Fischer <rep.nop@aon.at>
-rw-r--r-- | networking/Config.in | 10 | ||||
-rw-r--r-- | shell/Config.in | 1 | ||||
-rw-r--r-- | shell/cmdedit.c | 18 |
3 files changed, 14 insertions, 15 deletions
diff --git a/networking/Config.in b/networking/Config.in index f9ea56488..3dfd80b3d 100644 --- a/networking/Config.in +++ b/networking/Config.in | |||
@@ -53,7 +53,7 @@ config FTPPUT | |||
53 | config FEATURE_FTPGETPUT_LONG_OPTIONS | 53 | config FEATURE_FTPGETPUT_LONG_OPTIONS |
54 | bool "Enable long options in ftpget/ftpput" | 54 | bool "Enable long options in ftpget/ftpput" |
55 | default n | 55 | default n |
56 | depends on GETOPT_LONG && (CONFIG_FTPGET || FTPPUT) | 56 | depends on GETOPT_LONG && (FTPGET || FTPPUT) |
57 | help | 57 | help |
58 | Support long options for the ftpget/ftpput applet. | 58 | Support long options for the ftpget/ftpput applet. |
59 | 59 | ||
@@ -239,20 +239,20 @@ config FEATURE_IFUPDOWN_IP_BUILTIN | |||
239 | help | 239 | help |
240 | Use the busybox iproute "ip" applet to implement "ifupdown". | 240 | Use the busybox iproute "ip" applet to implement "ifupdown". |
241 | 241 | ||
242 | If leave this disabled, you must install the full-blown iproute2 | 242 | If left disabled, you must install the full-blown iproute2 |
243 | utility or the "ifup" and "ifdown" applets will not work. | 243 | utility or the "ifup" and "ifdown" applets will not work. |
244 | 244 | ||
245 | config FEATURE_IFUPDOWN_IP_BUILTIN | 245 | config FEATURE_IFUPDOWN_IFCONFIG_BUILTIN |
246 | bool "Use busybox ifconfig and route applets" | 246 | bool "Use busybox ifconfig and route applets" |
247 | default y | 247 | default y |
248 | depends on IFUPDOWN && !CONFIG_FEATURE_IFUPDOWN_IP | 248 | depends on IFUPDOWN && !FEATURE_IFUPDOWN_IP |
249 | select IFCONFIG | 249 | select IFCONFIG |
250 | select ROUTE | 250 | select ROUTE |
251 | help | 251 | help |
252 | Use the busybox iproute "ifconfig" and "route" applets to | 252 | Use the busybox iproute "ifconfig" and "route" applets to |
253 | implement the "ifup" and "ifdown" utilities. | 253 | implement the "ifup" and "ifdown" utilities. |
254 | 254 | ||
255 | If leave this disabled, you must install the full-blown ifconfig | 255 | If left disabled, you must install the full-blown ifconfig |
256 | and route utilities, or the "ifup" and "ifdown" applets will not | 256 | and route utilities, or the "ifup" and "ifdown" applets will not |
257 | work. | 257 | work. |
258 | 258 | ||
diff --git a/shell/Config.in b/shell/Config.in index 0e25bedcb..9ac233155 100644 --- a/shell/Config.in +++ b/shell/Config.in | |||
@@ -257,6 +257,7 @@ config FEATURE_COMMAND_EDITING_VI | |||
257 | 257 | ||
258 | config FEATURE_COMMAND_HISTORY | 258 | config FEATURE_COMMAND_HISTORY |
259 | int "History size" | 259 | int "History size" |
260 | range 0 99999 | ||
260 | default 15 | 261 | default 15 |
261 | depends on FEATURE_COMMAND_EDITING | 262 | depends on FEATURE_COMMAND_EDITING |
262 | help | 263 | help |
diff --git a/shell/cmdedit.c b/shell/cmdedit.c index 35a8d5e27..dda6f6958 100644 --- a/shell/cmdedit.c +++ b/shell/cmdedit.c | |||
@@ -83,12 +83,10 @@ | |||
83 | #ifndef CONFIG_FEATURE_COMMAND_HISTORY | 83 | #ifndef CONFIG_FEATURE_COMMAND_HISTORY |
84 | #define MAX_HISTORY 15 | 84 | #define MAX_HISTORY 15 |
85 | #else | 85 | #else |
86 | #define MAX_HISTORY CONFIG_FEATURE_COMMAND_HISTORY | 86 | #define MAX_HISTORY (CONFIG_FEATURE_COMMAND_HISTORY + 0) |
87 | #endif | 87 | #endif |
88 | 88 | ||
89 | #if MAX_HISTORY < 1 | 89 | #if MAX_HISTORY > 0 |
90 | #warning cmdedit: You set MAX_HISTORY < 1. The history algorithm switched off. | ||
91 | #else | ||
92 | static char *history[MAX_HISTORY+1]; /* history + current */ | 90 | static char *history[MAX_HISTORY+1]; /* history + current */ |
93 | /* saved history lines */ | 91 | /* saved history lines */ |
94 | static int n_history; | 92 | static int n_history; |
@@ -1166,7 +1164,7 @@ static void input_tab(int *lastWasTab) | |||
1166 | } | 1164 | } |
1167 | #endif /* CONFIG_FEATURE_COMMAND_TAB_COMPLETION */ | 1165 | #endif /* CONFIG_FEATURE_COMMAND_TAB_COMPLETION */ |
1168 | 1166 | ||
1169 | #if MAX_HISTORY >= 1 | 1167 | #if MAX_HISTORY > 0 |
1170 | static void get_previous_history(void) | 1168 | static void get_previous_history(void) |
1171 | { | 1169 | { |
1172 | if(command_ps[0] != 0 || history[cur_history] == 0) { | 1170 | if(command_ps[0] != 0 || history[cur_history] == 0) { |
@@ -1529,7 +1527,7 @@ prepare_to_die: | |||
1529 | printf("\033[H"); | 1527 | printf("\033[H"); |
1530 | redraw(0, len-cursor); | 1528 | redraw(0, len-cursor); |
1531 | break; | 1529 | break; |
1532 | #if MAX_HISTORY >= 1 | 1530 | #if MAX_HISTORY > 0 |
1533 | case CNTRL('N'): | 1531 | case CNTRL('N'): |
1534 | vi_case( case CNTRL('N')|vbit: ) | 1532 | vi_case( case CNTRL('N')|vbit: ) |
1535 | vi_case( case 'j'|vbit: ) | 1533 | vi_case( case 'j'|vbit: ) |
@@ -1730,7 +1728,7 @@ prepare_to_die: | |||
1730 | input_tab(&lastWasTab); | 1728 | input_tab(&lastWasTab); |
1731 | break; | 1729 | break; |
1732 | #endif | 1730 | #endif |
1733 | #if MAX_HISTORY >= 1 | 1731 | #if MAX_HISTORY > 0 |
1734 | case 'A': | 1732 | case 'A': |
1735 | /* Up Arrow -- Get previous command from history */ | 1733 | /* Up Arrow -- Get previous command from history */ |
1736 | if (cur_history > 0) { | 1734 | if (cur_history > 0) { |
@@ -1838,7 +1836,7 @@ rewrite_line: | |||
1838 | setTermSettings(0, (void *) &initial_settings); | 1836 | setTermSettings(0, (void *) &initial_settings); |
1839 | handlers_sets &= ~SET_RESET_TERM; | 1837 | handlers_sets &= ~SET_RESET_TERM; |
1840 | 1838 | ||
1841 | #if MAX_HISTORY >= 1 | 1839 | #if MAX_HISTORY > 0 |
1842 | /* Handle command history log */ | 1840 | /* Handle command history log */ |
1843 | /* cleanup may be saved current command line */ | 1841 | /* cleanup may be saved current command line */ |
1844 | if (len> 0) { /* no put empty line */ | 1842 | if (len> 0) { /* no put empty line */ |
@@ -1859,13 +1857,13 @@ rewrite_line: | |||
1859 | num_ok_lines++; | 1857 | num_ok_lines++; |
1860 | #endif | 1858 | #endif |
1861 | } | 1859 | } |
1862 | #else /* MAX_HISTORY < 1 */ | 1860 | #else /* MAX_HISTORY == 0 */ |
1863 | #if defined(CONFIG_FEATURE_SH_FANCY_PROMPT) | 1861 | #if defined(CONFIG_FEATURE_SH_FANCY_PROMPT) |
1864 | if (len > 0) { /* no put empty line */ | 1862 | if (len > 0) { /* no put empty line */ |
1865 | num_ok_lines++; | 1863 | num_ok_lines++; |
1866 | } | 1864 | } |
1867 | #endif | 1865 | #endif |
1868 | #endif /* MAX_HISTORY >= 1 */ | 1866 | #endif /* MAX_HISTORY > 0 */ |
1869 | if (break_out > 0) { | 1867 | if (break_out > 0) { |
1870 | command[len++] = '\n'; /* set '\n' */ | 1868 | command[len++] = '\n'; /* set '\n' */ |
1871 | command[len] = 0; | 1869 | command[len] = 0; |