[project @ 2002-10-29 10:53:42 by simonpj]
[ghc-hetmet.git] / ghc / utils / unlit / unlit.c
index 17cac8b..ab3186a 100644 (file)
@@ -41,6 +41,7 @@
  */
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <ctype.h>
 
 #define NULLSTR        ((char *)0)
@@ -283,7 +284,7 @@ FILE *ostream; {
  *
  * Main program.  Processes command line arguments, looking for leading:
  *  -q  quiet mode - do not complain about bad literate script files
- *  -n  noisy mpde - complain about bad literate script files.
+ *  -n  noisy mode - complain about bad literate script files.
  *  -r  remove cpp droppings in output.
  * Expects two additional arguments, a file name for the input and a file
  * name for the output file.  These two names must normally be distinct.
@@ -349,7 +350,7 @@ char **argv; {
 
     /* Prefix the output with line pragmas */
     if (prefix_str) {
-      fprintf(ostream, "# 1 \"%s\"\n{-# LINE 1 \"%s\" #-}\n", prefix_str, prefix_str);
+      fprintf(ostream, "#line 1 \"%s\"\n{-# LINE 1 \"%s\" #-}\n", prefix_str, prefix_str);
     }
 
     unlit(file, istream, ostream);