The CommandProcessor is the interface to install a run-time menu into an embedded system.
Dependents: A_CANAdapter USB2I2C
Diff: CommandProcessor.c
- Revision:
- 13:e1880be590c4
- Parent:
- 12:a8c56bf811b9
- Child:
- 14:7971c8bd3f11
diff -r a8c56bf811b9 -r e1880be590c4 CommandProcessor.c --- a/CommandProcessor.c Sun May 29 20:40:04 2011 +0000 +++ b/CommandProcessor.c Wed Jun 15 12:50:56 2011 +0000 @@ -54,7 +54,7 @@ static char *buffer; // buffer space must be allocated based on the longest command -static int longestCommand = 0; +static size_t longestCommand = 0; static struct { CMD_T *SignOnBanner; @@ -86,7 +86,7 @@ static int myisprint(int c); static void mystrcat(char *dst, char *src); static char mytolower(char a); -int mystrnicmp(const char *l, const char *r, size_t n); +static int mystrnicmp(const char *l, const char *r, size_t n); static CMDP_T CommandProcessor = { CommandProcessor_Init, @@ -482,7 +482,7 @@ break; default: if (myisprint(c) && keycount < cfg.bufferSize) { - buffer[keycount++] = c; + buffer[keycount++] = (char)c; buffer[keycount] = '\0'; if (CommandMatches(buffer, FALSE, &cbk, ¶ms)) cfg.putch(c); @@ -603,4 +603,3 @@ else return FALSE; } -