Another place where error reporting hadn't caught up to 16-bit

character strings; added a js_DeflateString call.  Thanks to gcc 2.8.1
for catching this - it complained about "char format, different type
arg (arg 4)" - which means that it looked in the (printf-style) format
string and checked type against it.  Wow.
This commit is contained in:
mccabe 1998-05-01 01:39:51 +00:00
Родитель a4b3627745
Коммит cc35c93a1f
2 изменённых файлов: 8 добавлений и 2 удалений

Просмотреть файл

@ -514,7 +514,10 @@ js_ReportCompileError(JSContext *cx, JSTokenStream *ts, const char *format,
fprintf(stderr, "%s, ", ts->filename);
if (ts->lineno)
fprintf(stderr, "line %u: ", ts->lineno);
fprintf(stderr, "%s:\n%s\n", message, ts->linebuf.base);
fprintf(stderr, "%s:\n%s\n",message,
js_DeflateString(cx, ts->linebuf.base,
ts->linebuf.limit - ts->linebuf.base));
#endif
}
if (lastc == '\n')

Просмотреть файл

@ -518,7 +518,10 @@ js_ReportCompileError(JSContext *cx, JSTokenStream *ts, const char *format,
fprintf(stderr, "%s, ", ts->filename);
if (ts->lineno)
fprintf(stderr, "line %u: ", ts->lineno);
fprintf(stderr, "%s:\n%s\n", message, ts->linebuf.base);
fprintf(stderr, "%s:\n%s\n",message,
js_DeflateString(cx, ts->linebuf.base,
ts->linebuf.limit - ts->linebuf.base));
#endif
}
if (lastc == '\n')