More minor patches
authorErik Andersen <andersen@codepoet.org>
Sun, 9 Apr 2000 18:24:05 +0000 (18:24 -0000)
committerErik Andersen <andersen@codepoet.org>
Sun, 9 Apr 2000 18:24:05 +0000 (18:24 -0000)
 -Erik

Makefile
busybox.def.h
cmdedit.c
shell/cmdedit.c

index 38d518e..1f03754 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -27,9 +27,7 @@ BUILDTIME := $(shell TZ=UTC date --utc "+%Y.%m.%d-%H:%M%z")
 # eg: `make DODEBUG=true tests'
 DODEBUG = false
 
-# If you want a static binary, turn this on.  I can't think
-# of many situations where anybody would ever want it static, 
-# but...
+# If you want a static binary, turn this on.
 DOSTATIC = false
 
 # This will choke on a non-debian system
index b05f17a..cb86412 100644 (file)
@@ -29,7 +29,7 @@
 #define BB_FREE
 //#define BB_FREERAMDISK
 //#define BB_FSCK_MINIX
-//#define BB_GREP
+#define BB_GREP
 #define BB_GUNZIP
 #define BB_GZIP
 //#define BB_HALT
index b3e7fd5..2c16276 100644 (file)
--- a/cmdedit.c
+++ b/cmdedit.c
@@ -281,6 +281,14 @@ extern int cmdedit_read_input(char* prompt, int inputFd, int outputFd,
                if ((ret = read(inputFd, &c, 1)) < 1)
                        return ret;
 
+               fprintf(stderr, "\n\nkey=%d (%c)\n\n", c, c);
+               /* Go to the next line */
+               xwrite(outputFd, "\n", 1);
+               /* Rewrite the prompt */
+               xwrite(outputFd, prompt, strlen(prompt));
+               /* Rewrite the command */
+               xwrite(outputFd, parsenextc, len);
+
                switch (c) {
                case 1:
                        /* Control-a -- Beginning of line */
@@ -514,10 +522,17 @@ extern int cmdedit_read_input(char* prompt, int inputFd, int outputFd,
                                                        len--;
                                                }
                                                break;
+
+                                       //case '5': case '6': /* pgup/pgdown */
+
+                                       case '7':
+                                               /* rxvt home */
                                        case '1':
                                                /* Home (Ctrl-A) */
                                                input_home(outputFd, &cursor);
                                                break;
+                                       case '8':
+                                               /* rxvt END */
                                        case '4':
                                                /* End (Ctrl-E) */
                                                input_end(outputFd, &cursor, len);
index b3e7fd5..2c16276 100644 (file)
@@ -281,6 +281,14 @@ extern int cmdedit_read_input(char* prompt, int inputFd, int outputFd,
                if ((ret = read(inputFd, &c, 1)) < 1)
                        return ret;
 
+               fprintf(stderr, "\n\nkey=%d (%c)\n\n", c, c);
+               /* Go to the next line */
+               xwrite(outputFd, "\n", 1);
+               /* Rewrite the prompt */
+               xwrite(outputFd, prompt, strlen(prompt));
+               /* Rewrite the command */
+               xwrite(outputFd, parsenextc, len);
+
                switch (c) {
                case 1:
                        /* Control-a -- Beginning of line */
@@ -514,10 +522,17 @@ extern int cmdedit_read_input(char* prompt, int inputFd, int outputFd,
                                                        len--;
                                                }
                                                break;
+
+                                       //case '5': case '6': /* pgup/pgdown */
+
+                                       case '7':
+                                               /* rxvt home */
                                        case '1':
                                                /* Home (Ctrl-A) */
                                                input_home(outputFd, &cursor);
                                                break;
+                                       case '8':
+                                               /* rxvt END */
                                        case '4':
                                                /* End (Ctrl-E) */
                                                input_end(outputFd, &cursor, len);