misc/lemon.c
changeset 830 b15b3c3b5c4a
parent 829 7b3c3ae9e5a9
child 831 80e47b096ecd
--- a/misc/lemon.c	Fri Feb 12 13:40:25 2010 -0500
+++ b/misc/lemon.c	Sat Feb 13 01:04:55 2010 -0500
@@ -1344,6 +1344,15 @@
 #define LINEWIDTH      79 /* Max width of any output line */
 #define PREFIXLIMIT    30 /* Max width of the prefix on each line */
 void ErrorMsg(const char *filename, int lineno, const char *format, ...){
+#if __MOJOSHADER__
+  va_list ap;
+  fprintf(stderr, "%s:%d: ", filename, lineno);
+  va_start(ap, format);
+  vfprintf(stderr,format,ap);
+  va_end(ap);
+  fprintf(stderr, "\n");
+  fflush(stderr);
+#else
   char errmsg[ERRMSGSIZE];
   char prefix[PREFIXLIMIT+10];
   int errmsgsize;
@@ -1380,6 +1389,7 @@
     fprintf(stdout,"%s%.*s\n",prefix,end,&errmsg[base]);
     base = restart;
   }
+#endif
 }
 /**************** From the file "main.c" ************************************/
 /*