@@ -60,7 +60,7 @@ void embedded_cli_init(struct embedded_cli *cli, const char *prompt,
6060
6161static void cli_ansi (struct embedded_cli * cli , size_t n , char code )
6262{
63- char buffer [5 ] = {'\x1b' , '[' , (char ) ('0' + (n % 10 )), code , '\0' };
63+ char buffer [5 ] = {'\x1b' , '[' , (char )('0' + (n % 10 )), code , '\0' };
6464 cli_puts (cli , buffer );
6565}
6666
@@ -143,7 +143,7 @@ const char *embedded_cli_get_history(struct embedded_cli *cli,
143143
144144 // Search back through the history buffer for `history_pos` entry
145145 for (int i = 0 ; i < history_pos ; i ++ ) {
146- int len = (int ) strlen (& cli -> history [pos ]);
146+ int len = (int )strlen (& cli -> history [pos ]);
147147 if (len == 0 )
148148 return NULL ;
149149 pos += len + 1 ;
@@ -205,7 +205,7 @@ bool embedded_cli_insert_char(struct embedded_cli *cli, char ch)
205205 // printf("Inserting char %d 0x%x '%c'\n", ch, ch, ch);
206206 if (cli -> have_csi ) {
207207 if (ch >= '0' && ch <= '9' && cli -> counter < 100 ) {
208- cli -> counter = (cli -> counter * 10 ) + (size_t ) (ch - '0' );
208+ cli -> counter = (cli -> counter * 10 ) + (size_t )(ch - '0' );
209209 // printf("cli->counter -> %d\n", cli->counter);
210210 } else {
211211 if (cli -> counter == 0 )
@@ -374,7 +374,8 @@ bool embedded_cli_insert_char(struct embedded_cli *cli, char ch)
374374 break ;
375375 case '\x15' : // Ctrl-U
376376 // move back data after cursor, including last \0
377- memmove (cli -> buffer , cli -> buffer + cli -> cursor , cli -> len - cli -> cursor + 1 );
377+ memmove (cli -> buffer , cli -> buffer + cli -> cursor ,
378+ cli -> len - cli -> cursor + 1 );
378379 cli -> len = cli -> len - cli -> cursor ;
379380 // clear from beggining of buffer,
380381 // print buffer again and move back to start
0 commit comments