X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?p=YACASL2.git;a=blobdiff_plain;f=src%2Fcerr.c;h=dca936535cffe9d05994283907945f9f2f77e68d;hp=74dec44d884b4116515011e53fc8c51d39d75f3f;hb=e07b6371cc8a59c6793a895e968ff2c6cf28181b;hpb=cc884e475afe3f48804b35336e68bce4088be61a diff --git a/src/cerr.c b/src/cerr.c index 74dec44..dca9365 100644 --- a/src/cerr.c +++ b/src/cerr.c @@ -1,10 +1,5 @@ -#include "casl2.h" +#include "cerr.h" -/* エラーコードリスト */ -typedef struct { - int num; - char *msg; -} CERRARRAY; CERRARRAY cerr[] = { { 101, "label already defined" }, { 102, "label table is full" }, @@ -37,21 +32,6 @@ CERRARRAY cerr[] = { { 207, "Stack Pointer (SP) - out of COMET II memory" }, }; -/* WORD値を文字列に変換 */ -char *wtoa(WORD word) -{ - char *p = malloc(6), *q = malloc(6); - int i = 0, j; - do{ - *(p + i++) = word % 10 + '0'; - } while((word /= 10) > 0); - for(j = 0; j < i; j++) { - *(q + j) = *(p + (i - 1) - j); - } - *(q + j + 1) = '\0'; - return q; -} - /* エラー番号とエラーメッセージを設定する */ void setcerr(int num, const char *val) {