-/* エラー番号とエラーメッセージを設定する */
-void setcerr(int num, const char *str)
+CERR *cerr;
+
+CERRLIST *cerrlist = NULL;
+
+void addcerrlist(int cerrc, CERR cerrv[])
+{
+ int i;
+ CERRLIST *p = NULL, *q = malloc_chk(sizeof(CERRLIST), "cerrlist");
+
+ assert(cerrc > 0 && cerrv != NULL);
+ for(i = 0; i < cerrc; i++) {
+ if(p == NULL) {
+ p = q;
+ } else {
+ p = p->next = malloc_chk(sizeof(CERRLIST), "cerrlist.next");
+ }
+ p->cerr = &cerrv[i];
+ p->next = NULL;
+ }
+ p->next = cerrlist;
+ cerrlist = q;
+}
+
+void printcerrlist()