7 /* エラー番号とエラーメッセージを設定する */
8 void setcerr(int num, const char *val)
11 cerrmsg = malloc(MSGSIZE + 1);
14 strcat(cerrmsg, ": ");
15 strcat(cerrmsg, getcerrmsg(cerrno));
17 strcpy(cerrmsg, getcerrmsg(cerrno));
22 char *getcerrmsg(int num)
28 if((ptr = &cerr[i++])->num == num) {
31 } while(ptr->num > 0);
32 return "unkown error";
40 if(strlen(cerrmsg) > 0) {