}
}
- if(strlen(cmd_buffer[cmd_buf_loc]) != 0)
+ if (A_STRLEN(cmd_buffer[cmd_buf_loc]) != 0)
{
- strcpy(cmd_line, cmd_buffer[cmd_buf_loc]);
- *i = strlen(cmd_buffer[cmd_buf_loc]);
+ A_STRCPY(cmd_line, cmd_buffer[cmd_buf_loc]);
+ *i = A_STRLEN(cmd_buffer[cmd_buf_loc]);
zm_uart_send("\r>", 2);
zm_uart_send(cmd_line, *i);
}
//Filter duplicated string in command history
if (strcmp(cmd_buffer[(cmd_buf_ptr==0)?(COMMAND_BUFFER_SIZE-1):(cmd_buf_ptr-1)], cmd_line) != 0)
{
- strcpy(cmd_buffer[cmd_buf_ptr++], cmd_line);
+ A_STRCPY(cmd_buffer[cmd_buf_ptr++], cmd_line);
}
}
if (cmd_buf_ptr >= COMMAND_BUFFER_SIZE)
}
cmd_str[k*DB_MAX_COMMAND_LENGTH + j] = 0;
}
- return (int)strlen(cmd_str);
+ return (int)A_STRLEN(cmd_str);
}
int db_ascii_to_hex(char* num_str, unsigned long* hex_num)
i = 0;
- zm_uart_send(ATH_DEBUGGER_VERSION_STR, strlen(ATH_DEBUGGER_VERSION_STR));
- zm_uart_send(ATH_COMMAND_LIST_STR, strlen(ATH_COMMAND_LIST_STR));
+ zm_uart_send(ATH_DEBUGGER_VERSION_STR,
+ A_STRLEN(ATH_DEBUGGER_VERSION_STR));
+ zm_uart_send(ATH_COMMAND_LIST_STR,
+ A_STRLEN(ATH_COMMAND_LIST_STR));
while (command_table[i].cmd_func)
{
- zm_uart_send(command_table[i].cmd_str, strlen(command_table[i].cmd_str));
+ zm_uart_send(command_table[i].cmd_str,
+ A_STRLEN(command_table[i].cmd_str));
zm_uart_send("\t", 1);
- zm_uart_send(command_table[i].help_str, strlen(command_table[i].help_str));
+ zm_uart_send(command_table[i].help_str,
+ A_STRLEN(command_table[i].help_str));
zm_uart_send("\n\r", 2);
i++;
}
db_hex_to_ascii(val, val_str);
db_hex_to_ascii(addr, addr_str);
- zm_uart_send(addr_str, strlen(addr_str));
+ zm_uart_send(addr_str, A_STRLEN(addr_str));
zm_uart_send(" : ", 3);
- zm_uart_send(val_str, strlen(val_str));
+ zm_uart_send(val_str, A_STRLEN(val_str));
zm_uart_send("\n\r", 2);
return 0;
char val_str[20];
char addr_str[20];
- if ((strlen(param2) > 0) &&
+ if ((A_STRLEN(param2) > 0) &&
(db_ascii_to_hex(param1, &addr) != -1) &&
(db_ascii_to_hex(param2, &val) != -1))
{
db_hex_to_ascii(val, val_str);
db_hex_to_ascii(addr, addr_str);
- zm_uart_send(addr_str, strlen(addr_str));
+ zm_uart_send(addr_str, A_STRLEN(addr_str));
zm_uart_send(" : ", 3);
- zm_uart_send(val_str, strlen(val_str));
+ zm_uart_send(val_str, A_STRLEN(val_str));
zm_uart_send("\n\r", 2);
return 0;