X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?p=YACASL2.git;a=blobdiff_plain;f=include%2Fcerr.h;h=ee44ee429abc732d8cfcdea44acb0eaf4f760598;hp=e6e8ddf06da126002216ad4a024c1cdb6d1e92f2;hb=288d61424576d1aae956ea8e4b5fb89dc25909db;hpb=650f92bf8dfdd0095db993f71f9e3867e7119acc diff --git a/include/cerr.h b/include/cerr.h index e6e8ddf..ee44ee4 100644 --- a/include/cerr.h +++ b/include/cerr.h @@ -15,6 +15,10 @@ /* エラーを出力して終了 */ void *malloc_chk(size_t size, char *tag); +/* callocを実行し、メモリを確保できない場合は */ +/* エラーを出力して終了 */ +void *calloc_chk(size_t nmemb, size_t size, char *tag); + /* malloc_chkを実行してメモリを確保してから、 */ /* コピーした文字列を返す */ char *strdup_chk(const char *s, char *tag); @@ -41,6 +45,9 @@ enum { CERRMSGSIZE = 70, /* エラーメッセージのサイズ */ }; +/* エラーの初期化 */ +void cerr_init(); + /* エラーリストを作成・追加する */ bool addcerrlist(int cerrc, CERR cerrv[]);