Add errno.h
[oweals/busybox.git] / cmdedit.c
index 0765ca3ce29cf3e2c14191c835de807e5d41d58a..12c78dc763243f4533f746a12c5f6ccb50eeb1de 100644 (file)
--- a/cmdedit.c
+++ b/cmdedit.c
 #include <signal.h>
 
 
-#define  MAX_HISTORY   15              /* Maximum length of the linked list for the command line history */
+static const int MAX_HISTORY = 15;             /* Maximum length of the linked list for the command line history */
+
+enum {
+       ESC = 27,
+       DEL = 127,
+};
 
-#define ESC    27
-#define DEL    127
 #define member(c, s) ((c) ? ((char *)strchr ((s), (c)) != (char *)NULL) : 0)
 #define whitespace(c) (((c) == ' ') || ((c) == '\t'))
 
@@ -147,7 +150,7 @@ static void cmdedit_reset_term(void)
 static void clean_up_and_die(int sig)
 {
        cmdedit_reset_term();
-       fprintf(stdout, "\n");
+       printf("\n");
        if (sig!=SIGINT)
                exit(EXIT_SUCCESS);
 }