-int error(lex_file *file, int status, const char *msg, ...) {
- char bu[1024*4]; /* enough? */
- char fu[1024*4]; /* enough? */
- va_list va;
-
- if (error_total + 1 > error_max) {
- fprintf(stderr, "%d errors and more following, bailing\n", error_total);
- exit (-1);
- }
- error_total ++;
-/* color */
-# ifndef WIN32
- sprintf (bu, "\033[0;%dm%s \033[0;%dm %s:%d ", error_color[status-SHRT_MAX], error_list[status-SHRT_MAX], error_color[(status-1)-SHRT_MAX], file->name, file->line);
+void vprintmsg(int level, const char *name, size_t line, const char *msgtype, const char *msg, va_list ap)
+{
+#ifndef WIN32
+ fprintf (stderr, "\033[0;%dm%s:%d: \033[0;%dm%s: \033[0m", CON_CYAN, name, (int)line, levelcolor[level], msgtype);