super-filthy hack to allow pas2c to fallback to writing to stderr.
authorsheepluva
Sat, 29 Nov 2014 18:13:49 +0100
changeset 10575 13b1e9008f4b
parent 10574 1636b0efa415
child 10576 c23f13a65638
super-filthy hack to allow pas2c to fallback to writing to stderr.
project_files/hwc/rtl/fileio.c
--- a/project_files/hwc/rtl/fileio.c	Sat Nov 29 17:33:51 2014 +0100
+++ b/project_files/hwc/rtl/fileio.c	Sat Nov 29 18:13:49 2014 +0100
@@ -162,7 +162,11 @@
 
 void __attribute__((overloadable)) fpcrtl_writeLn(File f, string255 s) {
     FIX_STRING(s);
-    fprintf(f->fp, "%s\n", s.str);
+    // filthy hack to write to stderr
+    if (!f->fp)
+        fprintf(stderr, "%s\n", s.str);
+    else
+        fprintf(f->fp, "%s\n", s.str);
 }
 
 void __attribute__((overloadable)) fpcrtl_writeLn(FILE *f, string255 s) {