FreeCalypso > hg > freecalypso-tools
diff rvinterf/tmsh/audiocmd.c @ 166:2e1be0fc150e
fc-tmsh: ETM_AUDIO commands are just aul/aus/aur/auw, not audio <subcmd>
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 19 Mar 2017 17:17:57 +0000 |
parents | 86e4d8aea021 |
children | 6e4120cdb456 |
line wrap: on
line diff
--- a/rvinterf/tmsh/audiocmd.c Sun Mar 19 08:00:29 2017 +0000 +++ b/rvinterf/tmsh/audiocmd.c Sun Mar 19 17:17:57 2017 +0000 @@ -69,40 +69,3 @@ send_etm_cmd(cmdpkt, 3); return(0); } - -static struct cmdtab { - char *cmd; - int minargs; - int maxargs; - int (*func)(); -} audio_cmds[] = { - {"load", 1, 1, cmd_audio_load}, - {"read", 1, 1, cmd_audio_read}, - {"save", 1, 1, cmd_audio_save}, - {0, 0, 0, 0} -}; - -cmd_audio(argc, argv) - char **argv; -{ - struct cmdtab *tp; - int extargs; - - for (tp = audio_cmds; tp->cmd; tp++) - if (!strcmp(tp->cmd, argv[1])) - break; - if (!tp->func) { - printf("error: no such audio command\n"); - return(ERROR_USAGE); - } - extargs = argc - 2; - if (extargs > tp->maxargs) { - printf("error: too many arguments\n"); - return(ERROR_USAGE); - } - if (extargs < tp->minargs) { - printf("error: too few arguments\n"); - return(ERROR_USAGE); - } - return tp->func(argc - 1, argv + 1); -}