X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?p=YACASL2.git;a=blobdiff_plain;f=src%2Fword.c;h=e11b73017a7858a4718ecdf63181e795c33234cc;hp=bae1e82a9d2df0fa32fa02e3cdb49b8e009517bb;hb=8808be96beb5502d13c0cd957b9fc3cec72ac6e3;hpb=ea0991b89b1bfe8e1bfa33a2ffec979e702a06dc diff --git a/src/word.c b/src/word.c index bae1e82..e11b730 100644 --- a/src/word.c +++ b/src/word.c @@ -25,15 +25,6 @@ WORD n2word(const char *str); */ WORD h2word(const char *str); -/** - * @brief wordのエラー定義 - */ -static CERR cerr_word[] = { - { 114, "not integer" }, - { 115, "not hex" }, - { 116, "out of hex range" }, -}; - WORD n2word(const char *str) { assert(isdigit(str[0]) || str[0] == '-'); @@ -73,7 +64,31 @@ WORD h2word(const char *str) return w; } +/** + * @brief wordのエラー定義 + */ +static CERR cerr_word[] = { + { 114, "not integer" }, + { 115, "not hex" }, + { 116, "out of hex range" }, +}; + +/** + * @brief ファイル読み込みのエラー定義 + */ +static CERR cerr_load[] = { + { 210, "load - memory overflow" }, + { 211, "object file not specified" }, + { 212, "invalid option" }, + { 213, "invalid argument" }, +}; + /* word.hで定義された関数群 */ +void addcerrlist_load() +{ + addcerrlist(ARRAYSIZE(cerr_load), cerr_load); +} + void addcerrlist_word() { addcerrlist(ARRAYSIZE(cerr_word), cerr_word);