[project @ 1999-07-29 09:08:26 by simonmar]
[ghc-hetmet.git] / ghc / utils / hscpp / hscpp.prl
index 802e9ed..fb1bf46 100644 (file)
@@ -36,16 +36,15 @@ open(INPIPE, "$Cpp @args - <$file |")
 
 while (<INPIPE>) {
 
-    print STDERR $_;
+    s/^#\s*line\s+(\d+)\s+\"\"$/\{\-# LINE \1 \"$file\" \-\}/;
+    s/^#\s*(\d+)\s+\"\".*/\{\-# LINE \1 \"$file\" \-\}/;
 
 # line directives come in flavo[u]rs:
+
 #   s/^#\s*line\s+\d+$/\{\-# LINE \-\}/;   IGNORE THIS ONE FOR NOW
     s/^#\s*line\s+(\d+)\s+(\".+\")$/\{\-# LINE \1 \2 \-\}/;
     s/^#\s*(\d+)\s+(\".*\").*/\{\-# LINE \1 \2 \-\}/;
 
-    s/^#\s*(\d+)\s+(\"\").*//;  # these are a result of our using stdin in
-                               # the $(CPP) command line above.
-
     print $_;
 }