aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn L McGrath <bug1@ihug.co.nz>2004-02-22 11:13:28 +0000
committerGlenn L McGrath <bug1@ihug.co.nz>2004-02-22 11:13:28 +0000
commit7fc504c6f7ecd1c64387470c38af6f903c013218 (patch)
tree10cbb5dc5a5f461a728c053d3a72dcbd158bb571
parent90ed9a0eb6ebfe2ecd5d5da19d30009a0ac90b59 (diff)
downloadbusybox-w32-7fc504c6f7ecd1c64387470c38af6f903c013218.tar.gz
busybox-w32-7fc504c6f7ecd1c64387470c38af6f903c013218.tar.bz2
busybox-w32-7fc504c6f7ecd1c64387470c38af6f903c013218.zip
Vodz. last_patch_128
- declare applet_using as static from applets.c - small correction to cmdedit, previous version cleared history after Ctrl-C - small spelling correction (by Friedrich Lobenstock)
-rw-r--r--applets/applets.c2
-rw-r--r--shell/cmdedit.c14
2 files changed, 9 insertions, 7 deletions
diff --git a/applets/applets.c b/applets/applets.c
index 8bb36dd6a..9dc69f36f 100644
--- a/applets/applets.c
+++ b/applets/applets.c
@@ -37,7 +37,7 @@
37#undef PROTOTYPES 37#undef PROTOTYPES
38#include "applets.h" 38#include "applets.h"
39 39
40struct BB_applet *applet_using; 40static struct BB_applet *applet_using;
41 41
42/* The -1 arises because of the {0,NULL,0,-1} entry above. */ 42/* The -1 arises because of the {0,NULL,0,-1} entry above. */
43const size_t NUM_APPLETS = (sizeof (applets) / sizeof (struct BB_applet) - 1); 43const size_t NUM_APPLETS = (sizeof (applets) / sizeof (struct BB_applet) - 1);
diff --git a/shell/cmdedit.c b/shell/cmdedit.c
index c0fa1b255..bf945f7e7 100644
--- a/shell/cmdedit.c
+++ b/shell/cmdedit.c
@@ -1290,7 +1290,7 @@ int cmdedit_read_input(char *prompt, char command[BUFSIZ])
1290 put_prompt(); 1290 put_prompt();
1291#else 1291#else
1292 len = 0; 1292 len = 0;
1293 break_out = -1; /* for control traps */ 1293 break_out = -1; /* to control traps */
1294#endif 1294#endif
1295 break; 1295 break;
1296 case 4: 1296 case 4:
@@ -1304,7 +1304,8 @@ prepare_to_die:
1304 /* cmdedit_reset_term() called in atexit */ 1304 /* cmdedit_reset_term() called in atexit */
1305 exit(EXIT_SUCCESS); 1305 exit(EXIT_SUCCESS);
1306#else 1306#else
1307 len = break_out = -1; /* for control stoped jobs */ 1307 /* to control stopped jobs */
1308 len = break_out = -1;
1308 break; 1309 break;
1309#endif 1310#endif
1310 } else { 1311 } else {
@@ -1430,12 +1431,12 @@ rewrite_line:
1430 break; 1431 break;
1431 case '1': 1432 case '1':
1432 case 'H': 1433 case 'H':
1433 /* Home (Ctrl-A) */ 1434 /* <Home> */
1434 input_backward(cursor); 1435 input_backward(cursor);
1435 break; 1436 break;
1436 case '4': 1437 case '4':
1437 case 'F': 1438 case 'F':
1438 /* End (Ctrl-E) */ 1439 /* <End> */
1439 input_end(); 1440 input_end();
1440 break; 1441 break;
1441 default: 1442 default:
@@ -1496,10 +1497,11 @@ rewrite_line:
1496#if MAX_HISTORY >= 1 1497#if MAX_HISTORY >= 1
1497 /* Handle command history log */ 1498 /* Handle command history log */
1498 /* cleanup may be saved current command line */ 1499 /* cleanup may be saved current command line */
1499 free(history[MAX_HISTORY]);
1500 history[MAX_HISTORY] = 0;
1501 if (len> 0) { /* no put empty line */ 1500 if (len> 0) { /* no put empty line */
1502 int i = n_history; 1501 int i = n_history;
1502
1503 free(history[MAX_HISTORY]);
1504 history[MAX_HISTORY] = 0;
1503 /* After max history, remove the oldest command */ 1505 /* After max history, remove the oldest command */
1504 if (i >= MAX_HISTORY) { 1506 if (i >= MAX_HISTORY) {
1505 free(history[0]); 1507 free(history[0]);