static int default_help (void) { int i; t_printf ("\n" BOLD_GREEN("TinyShell available commands:") "\n"); for (i = 0; commands[i].command_name != 0; i++) { t_printf(BOLD_YELLOW("%s") " - " BOLD_CYAN("%s\n"), commands[i].command_name, (commands[i].description==0)? "No desc. available" : commands[i].description); } t_printf ("\r\n"); return 0; }
static int default_help (void) { int i; USART_fputs ("\r\n" BOLD_GREEN("TinyShell available commands:") "\r\n", DBGU_USART); for (i = 0; commands[i].command_name != 0; i++) { USART_fprintf(DBGU_USART, BOLD_YELLOW("%s") " - " BOLD_CYAN("%s\r\n"), commands[i].command_name, (commands[i].description==0)? "No desc. available" : commands[i].description); } USART_fputs ("\r\n",DBGU_USART); return 0; }
int help(void) { int i = 0; // Print some header text. ns_printf("\n" BOLD_GREEN("NanoShell available commands:") "\n"); ns_printf("------------------\n"); for (i = 0; commands[i].command_name != 0; i++) { // Print the command name and the brief description. ns_printf(BOLD_YELLOW("%s") " - " BOLD_CYAN("%s\n"), commands[i].command_name, (commands[i].pcHelp==0)? "No Help. available" : commands[i].pcHelp); } ns_printf ("\r\n"); return 0; }