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
828d03e
..
f651c7d
100644
(file)
--- a/
include/cerr.h
+++ b/
include/cerr.h
@@
-16,20
+16,29
@@
extern int cerrno;
/* エラーメッセージ */
extern char *cerrmsg;
/* エラーメッセージ */
extern char *cerrmsg;
-/* エラーコード
リスト
*/
+/* エラーコード
配列
*/
typedef struct {
int num;
char *msg;
} CERRARRAY;
typedef struct {
int num;
char *msg;
} CERRARRAY;
+/* エラーコードリスト */
+typedef struct _CERRLIST {
+ struct _CERRLIST *next;
+ CERRARRAY *err;
+} CERRLIST;
+
/* エラーメッセージ */
/* エラーメッセージ */
-extern CERR
ARRAY cerr[]
;
+extern CERR
LIST *cerr
;
enum {
CERRSTRSIZE = 10, /* エラーメッセージ中に挿入できる文字列のサイズ */
CERRMSGSIZE = 70, /* エラーメッセージのサイズ */
};
enum {
CERRSTRSIZE = 10, /* エラーメッセージ中に挿入できる文字列のサイズ */
CERRMSGSIZE = 70, /* エラーメッセージのサイズ */
};
+/* エラーを追加する */
+void addcerrlist(int cerrc, CERRARRAY cerrv[]);
+
/* エラー番号とエラーメッセージを設定 */
void setcerr(int num, const char *str);
/* エラー番号とエラーメッセージを設定 */
void setcerr(int num, const char *str);