diff options
author | Keith Packard <keithp@keithp.com> | 2009-04-29 17:46:56 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2009-04-29 17:46:56 -0700 |
commit | de7814c738488c2c16c6216c93fa78128895e5d5 (patch) | |
tree | 07a295d9f3786623e382a92bbab811ac19a78016 /ao_cmd.c | |
parent | 4ae74fffb939d67424efa3e7f433637f1f920ebc (diff) |
Use 'char' instead of 'uint8_t' for character data
String and character constants are of char type, so using uint8_t causes
promotion to 16-bit types when comparing the two.
Diffstat (limited to 'ao_cmd.c')
-rw-r--r-- | ao_cmd.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -18,20 +18,20 @@ #include "ao.h" __xdata uint16_t ao_cmd_lex_i; -__xdata uint8_t ao_cmd_lex_c; +__xdata char ao_cmd_lex_c; __xdata enum ao_cmd_status ao_cmd_status; static __xdata uint8_t lex_echo; #define CMD_LEN 32 -static __xdata uint8_t cmd_line[CMD_LEN]; +static __xdata char cmd_line[CMD_LEN]; static __xdata uint8_t cmd_len; static __xdata uint8_t cmd_i; static void put_string(char *s) { - __xdata uint8_t c; + __xdata char c; while (c = *s++) putchar(c); } @@ -39,7 +39,7 @@ put_string(char *s) static void readline(void) { - __xdata uint8_t c; + __xdata char c; if (lex_echo) put_string("> "); cmd_len = 0; @@ -212,7 +212,7 @@ echo(void) lex_echo = ao_cmd_lex_i != 0; } -static const uint8_t help_txt[] = "All numbers are in hex"; +static const char help_txt[] = "All numbers are in hex"; #define NUM_CMDS 11 @@ -256,7 +256,7 @@ ao_cmd_register(__code struct ao_cmds *cmds) void ao_cmd(void *parameters) { - __xdata uint8_t c; + __xdata char c; __xdata uint8_t cmd, cmds; __code struct ao_cmds * __xdata cs; void (*__xdata func)(void); |