X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?p=YACASL2.git;a=blobdiff_plain;f=src%2Ftoken.c;h=8c497634428361597e46d21a47f70e04e1ffc399;hp=22f33ba0c7c33c6c590caa7a8bfbdccea4321532;hb=86e559d164166966a797a1e5855871d48e087ddd;hpb=58b56a6373dbd2b2ce8d30f7661ff15f584fb03f diff --git a/src/token.c b/src/token.c index 22f33ba..8c49763 100644 --- a/src/token.c +++ b/src/token.c @@ -94,24 +94,6 @@ void addcerrlist_tok() addcerrlist(ARRAYSIZE(cerr_opdtok), cerr_opdtok); } -char *strip_casl2_comment(char *s) -{ - int i; - bool quoting = false; - - for(i = 0; s[i]; i++) { - /* 「'」で囲まれた文字列の場合。「''」は無視 */ - if(s[i] == '\'' && s[i+1] != '\'' && (quoting == false || s[i-1] != '\'')) { - quoting = !quoting; - /* 「'」で囲まれた文字列でない場合、文字列末尾の「;」以降を削除 */ - } else if(quoting == false && s[i] == ';') { - s[i] = '\0'; - break; - } - } - return s; -} - CMDLINE *linetok(const char *line) { char *tok = NULL, *p = NULL;