diff --git a/qbsp/globals.c b/qbsp/globals.c index 933ae4d3..694b95d8 100644 --- a/qbsp/globals.c +++ b/qbsp/globals.c @@ -104,9 +104,6 @@ const char *rgszErrors[cErrors] = { "Internal error: invalid memory %i type in AllocMem", "Too many points on winding (%d)", "Out of memory", - "line %d: Line is incomplete", - "line %d: EOF inside quoted token", - "line %d: Token too large", "Clipnodes in map exceed " stringify(MAX_BSP_CLIPNODES), "Internal error: Detail cluster mismatch", }; diff --git a/qbsp/parser.c b/qbsp/parser.c index 79808ec6..239dbc53 100644 --- a/qbsp/parser.c +++ b/qbsp/parser.c @@ -47,12 +47,12 @@ ParseToken(parser_t *p, parseflags_t flags) while (*p->pos <= 32) { if (!*p->pos) { if (flags & PARSE_SAMELINE) - Error(errLineIncomplete, p->linenum); + Error_("line %d: Line is incomplete", p->linenum); return false; } if (*p->pos++ == '\n') { if (flags & PARSE_SAMELINE) - Error(errLineIncomplete, p->linenum); + Error_("line %d: Line is incomplete", p->linenum); p->linenum++; } } @@ -64,16 +64,16 @@ ParseToken(parser_t *p, parseflags_t flags) while (*p->pos && *p->pos != '\n') { *token_p++ = *p->pos++; if (token_p > &p->token[MAXTOKEN - 1]) - Error(errTokenTooLarge, p->linenum); + Error_("line %d: Token too large", p->linenum); } goto out; } if (flags & PARSE_SAMELINE) - Error(errLineIncomplete, p->linenum); + Error_("line %d: Line is incomplete", p->linenum); while (*p->pos++ != '\n') if (!*p->pos) { if (flags & PARSE_SAMELINE) - Error(errLineIncomplete, p->linenum); + Error_("line %d: Line is incomplete", p->linenum); return false; } goto skipspace; @@ -88,17 +88,17 @@ ParseToken(parser_t *p, parseflags_t flags) p->pos++; while (*p->pos != '"') { if (!*p->pos) - Error(errEOFInQuotes, p->linenum); + Error_("line %d: EOF inside quoted token", p->linenum); *token_p++ = *p->pos++; if (token_p > &p->token[MAXTOKEN - 1]) - Error(errTokenTooLarge, p->linenum); + Error_("line %d: Token too large", p->linenum); } p->pos++; } else while (*p->pos > 32) { *token_p++ = *p->pos++; if (token_p > &p->token[MAXTOKEN - 1]) - Error(errTokenTooLarge, p->linenum); + Error_("line %d: Token too large", p->linenum); } out: *token_p = 0; diff --git a/qbsp/warnerr.h b/qbsp/warnerr.h index 382f97e5..0349ddee 100644 --- a/qbsp/warnerr.h +++ b/qbsp/warnerr.h @@ -75,10 +75,6 @@ enum { errInvalidMemType, // 50 errTooManyPoints, errOutOfMemory, - errLineIncomplete, - errEOFInQuotes, - errTokenTooLarge, - errLowLeakCount, errTooManyClipnodes, errDetailClusterMismatch, cErrors