4 int compare_code(const void *a, const void *b)
6 return (**(const CMDTYPECODE **)a).code - (**(const CMDTYPECODE **)b).code;
9 /* 命令コードがキーのハッシュ表を表示する */
10 void print_code_type()
15 ar = malloc(sizeof(*ar) * cmdtypecodesize);
16 for(i = 0; i < cmdtabsize; i++) {
19 ar[j++] = np->cmdtypecode;
23 qsort(ar, cmdtypecodesize, sizeof(*ar), (int (*)(const void*, const void*))compare_code);
24 for(i = 0; i < cmdtypecodesize; i++) {
25 fprintf(stdout, "#%04X\t0%02o\t%s\n", ar[i]->code, ar[i]->type, ar[i]->cmd);
32 cerr = malloc_chk(sizeof(CERR), "cerr");
41 printf("\terror - %d: %s\n", cerr->num, cerr->msg);