projects
/
YACASL2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ソースファイルが指定されない場合のエラーメッセージを変更
[YACASL2.git]
/
test
/
unit
/
print_cmdtype_code_hash
/
print_cmdtype_code.c
diff --git
a/test/unit/print_cmdtype_code_hash/print_cmdtype_code.c
b/test/unit/print_cmdtype_code_hash/print_cmdtype_code.c
index
b10db02
..
ba26a74
100644
(file)
--- a/
test/unit/print_cmdtype_code_hash/print_cmdtype_code.c
+++ b/
test/unit/print_cmdtype_code_hash/print_cmdtype_code.c
@@
-4,23
+4,29
@@
void print_cmdtype_code()
{
int i;
void print_cmdtype_code()
{
int i;
- CMD
CODE
TAB *np;
- for(i = 0; i < c
mdcode
size; i++){
+ CMDTAB *np;
+ for(i = 0; i < c
omet2cmd
size; i++){
np = cmdtype_code[i];
while(np != NULL) {
fprintf(stdout, "(%2d) - %s\t0%02o\t#%04X\n",
np = cmdtype_code[i];
while(np != NULL) {
fprintf(stdout, "(%2d) - %s\t0%02o\t#%04X\n",
- i, np->c
ca->cmd, np->cca->type, np->cca
->code);
+ i, np->c
md->name, np->cmd->type, np->cmd
->code);
np = np->next;
}
}
}
int main(){
np = np->next;
}
}
}
int main(){
+ /* エラーの初期化 */
+ cerr = malloc_chk(sizeof(CERR), "cerr");
+ /* ハッシュ表作成 */
create_cmdtype_code();
create_cmdtype_code();
+ /* ハッシュ表表示 */
print_cmdtype_code();
print_cmdtype_code();
+ /* ハッシュ表解放 */
free_cmdtype_code();
free_cmdtype_code();
- if(cerrno != 0) {
- printf("\terror - %d: %s\n", cerrno, cerrmsg);
+ /* エラーの表示 */
+ if(cerr->num != 0) {
+ printf("\terror - %d: %s\n", cerr->num, cerr->msg);
freecerr();
exit(-1);
}
freecerr();
exit(-1);
}