[BusyBox-cvs] busybox/shell cmdedit.c,1.86,1.87
Glenn McGrath
bug1 at busybox.net
Thu Jan 22 12:42:26 UTC 2004
Update of /var/cvs/busybox/shell
In directory nail:/tmp/cvs-serv5276/shell
Modified Files:
cmdedit.c
Log Message:
last_patch_124 from Vodz, fix an ash bug when alt-1 was pressed, debian
bug #228915
Index: cmdedit.c
===================================================================
RCS file: /var/cvs/busybox/shell/cmdedit.c,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -d -r1.86 -r1.87
--- cmdedit.c 14 Jan 2004 09:34:51 -0000 1.86
+++ cmdedit.c 22 Jan 2004 12:42:23 -0000 1.87
@@ -45,6 +45,7 @@
#include "../shell/cmdedit.h"
+
#ifdef CONFIG_LOCALE_SUPPORT
#define Isprint(c) isprint((c))
#else
@@ -80,11 +81,7 @@
#endif
#ifdef CONFIG_FEATURE_GETUSERNAME_AND_HOMEDIR
-# ifndef TEST
-# include "pwd_.h"
-# else
-# include <pwd.h>
-# endif /* TEST */
+#include "pwd_.h"
#endif /* advanced FEATURES */
@@ -1377,6 +1374,14 @@
if (safe_read(0, &c, 1) < 1)
goto prepare_to_die;
}
+ if (c >= '1' && c <= '9') {
+ unsigned char dummy;
+
+ if (safe_read(0, &dummy, 1) < 1)
+ goto prepare_to_die;
+ if(dummy != '~')
+ c = 0;
+ }
switch (c) {
#ifdef CONFIG_FEATURE_COMMAND_TAB_COMPLETION
case '\t': /* Alt-Tab */
@@ -1429,15 +1434,9 @@
input_end();
break;
default:
- if (!(c >= '1' && c <= '9'))
- c = 0;
+ c = 0;
beep();
}
- if (c >= '1' && c <= '9')
- do
- if (safe_read(0, &c, 1) < 1)
- goto prepare_to_die;
- while (c != '~');
break;
}
More information about the busybox-cvs
mailing list