X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?p=YACASL2.git;a=blobdiff_plain;f=include%2Fcerr.h;h=f651c7d0aeab20f0d0d352339aba139a06745a31;hp=828d03e848c6664f6505c5f5a5ca950ffca341da;hb=3ea92ba68cb320156d5bc7fe92f5e5fa0c150635;hpb=b591284405a5b29213db6250c830e1f63d11a4f0 diff --git a/include/cerr.h b/include/cerr.h index 828d03e..f651c7d 100644 --- a/include/cerr.h +++ b/include/cerr.h @@ -16,20 +16,29 @@ extern int cerrno; /* エラーメッセージ */ extern char *cerrmsg; -/* エラーコードリスト */ +/* エラーコード配列 */ typedef struct { int num; char *msg; } CERRARRAY; +/* エラーコードリスト */ +typedef struct _CERRLIST { + struct _CERRLIST *next; + CERRARRAY *err; +} CERRLIST; + /* エラーメッセージ */ -extern CERRARRAY cerr[]; +extern CERRLIST *cerr; enum { CERRSTRSIZE = 10, /* エラーメッセージ中に挿入できる文字列のサイズ */ CERRMSGSIZE = 70, /* エラーメッセージのサイズ */ }; +/* エラーを追加する */ +void addcerrlist(int cerrc, CERRARRAY cerrv[]); + /* エラー番号とエラーメッセージを設定 */ void setcerr(int num, const char *str);