X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=ao_cmd.c;h=91abe7f08837c6d321aecc038c868d6daf7ee1aa;hp=7722c598b592b3615b7575bafa069546c9602dde;hb=819f1de8dd6010fae050bcef930943c7923929f9;hpb=d1887ded41a5bfec8e10e9fd736fa9444b9b6222 diff --git a/ao_cmd.c b/ao_cmd.c index 7722c598..91abe7f0 100644 --- a/ao_cmd.c +++ b/ao_cmd.c @@ -152,9 +152,8 @@ ao_cmd_hex(void) ao_cmd_status = r; } -#if 0 -static void -decimal(void) +void +ao_cmd_decimal(void) { __xdata uint8_t r = ao_cmd_lex_error; @@ -162,7 +161,7 @@ decimal(void) ao_cmd_white(); for(;;) { if ('0' <= ao_cmd_lex_c && ao_cmd_lex_c <= '9') - ao_cmd_lex_i = (ao_cmd_lex_i * 10 ) | (ao_cmd_lex_c - '0'); + ao_cmd_lex_i = (ao_cmd_lex_i * 10) + (ao_cmd_lex_c - '0'); else break; r = ao_cmd_success; @@ -171,7 +170,6 @@ decimal(void) if (r != ao_cmd_success) ao_cmd_status = r; } -#endif static void eol(void) @@ -216,7 +214,7 @@ echo(void) static const uint8_t help_txt[] = "All numbers are in hex"; -#define NUM_CMDS 8 +#define NUM_CMDS 10 static __code struct ao_cmds *__xdata (ao_cmds[NUM_CMDS]); static __xdata uint8_t ao_ncmds;