projects
/
YACASL2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
グローバル変数のリファクタリング
[YACASL2.git]
/
include
/
cerr.h
diff --git
a/include/cerr.h
b/include/cerr.h
index
e6e8ddf
..
ee44ee4
100644
(file)
--- a/
include/cerr.h
+++ b/
include/cerr.h
@@
-15,6
+15,10
@@
/* エラーを出力して終了 */
void *malloc_chk(size_t size, char *tag);
/* エラーを出力して終了 */
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);
/* malloc_chkを実行してメモリを確保してから、 */
/* コピーした文字列を返す */
char *strdup_chk(const char *s, char *tag);
@@
-41,6
+45,9
@@
enum {
CERRMSGSIZE = 70, /* エラーメッセージのサイズ */
};
CERRMSGSIZE = 70, /* エラーメッセージのサイズ */
};
+/* エラーの初期化 */
+void cerr_init();
+
/* エラーリストを作成・追加する */
bool addcerrlist(int cerrc, CERR cerrv[]);
/* エラーリストを作成・追加する */
bool addcerrlist(int cerrc, CERR cerrv[]);