# HG changeset patch
# User sheepluva
# Date 1417281229 -3600
# Node ID 13b1e9008f4bec905ac09eed3611f7ddf506cfda
# Parent  1636b0efa4152a677eff2a4bfe24261d8c30b6b3
super-filthy hack to allow pas2c to fallback to writing to stderr.

diff -r 1636b0efa415 -r 13b1e9008f4b 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) {