1 #ifndef YACASL2_CERR_H_INCLUDED
2 #define YACASL2_CERR_H_INCLUDED
11 #define ARRAYSIZE(array) (sizeof(array)/sizeof(array[0]))
14 /* mallocを実行し、メモリを確保できない場合は */
16 void *malloc_chk(size_t size, char *tag);
21 char *msg; /* エラーメッセージ */
28 typedef struct _CERRLIST {
29 struct _CERRLIST *next;
33 extern CERRLIST *cerrlist;
36 CERRSTRSIZE = 10, /* エラーメッセージ中に挿入できる文字列のサイズ */
37 CERRMSGSIZE = 70, /* エラーメッセージのサイズ */
41 bool addcerrlist(int cerrc, CERR cerrv[]);
43 /* エラー番号とエラーメッセージを設定 */
44 void setcerr(int num, const char *str);
47 char *getcerrmsg(int num);