+/* 現在のエラーを設定する */
+void setcerr(int num, const char *str)
+{
+ cerr->num = num;
+ cerr->msg = malloc_chk(CERRMSGSIZE + 1, "cerr.msg");
+ if(str != NULL && strlen(str) <= CERRSTRSIZE) {
+ sprintf(cerr->msg, "%s: %s", str, getcerrmsg(cerr->num));
+ } else {
+ strcpy(cerr->msg, getcerrmsg(cerr->num));
+ }
+}
+
+/* エラーリストから、エラー番号に対応するメッセージを返す */