From 59ab025363d884deb2013dcaae6c968585a6ec72 Mon Sep 17 00:00:00 2001 From: Mark Whitley Date: Tue, 23 Jan 2001 22:30:04 +0000 Subject: #define -> static const int. Also got rid of some big static buffers. --- shell/cmdedit.c | 9 ++++++--- shell/lash.c | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'shell') diff --git a/shell/cmdedit.c b/shell/cmdedit.c index 722a36a50..12c78dc76 100644 --- a/shell/cmdedit.c +++ b/shell/cmdedit.c @@ -44,10 +44,13 @@ #include -#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')) diff --git a/shell/lash.c b/shell/lash.c index 52c87ee7f..b9685ab31 100644 --- a/shell/lash.c +++ b/shell/lash.c @@ -64,8 +64,8 @@ #include #include "cmdedit.h" -#define MAX_LINE 256 /* size of input buffer for cwd data */ -#define MAX_READ 128 /* size of input buffer for `read' builtin */ +static const int MAX_LINE = 256; /* size of input buffer for cwd data */ +static const int MAX_READ = 128; /* size of input buffer for `read' builtin */ #define JOB_STATUS_FORMAT "[%d] %-22s %.40s\n" extern size_t NUM_APPLETS; -- cgit v1.2.3