-/*
- * This code was written in haste for a frobbed BSD 4.2.
- * I have a flight to catch: will someone please do proper
- * error checks? - Dean.
- */
- int pid;
- char temporary_file_name [12];
- int fd;
- union wait status;
-
- (void)strcpy (temporary_file_name, "#appXXXXXX");
- (void)mktemp (temporary_file_name);
- pid = vfork ();
- if (pid == -1)
- {
- as_perror ("Vfork failed", file_name);
- _exit (144);
- }
- if (pid == 0)
- {
- (void)dup2 (file_handle, fileno(stdin));
- fd = open (temporary_file_name, O_WRONLY + O_TRUNC + O_CREAT, 0666);
- if (fd == -1)
- {
- (void)write(2,"Can't open temporary\n",21);
- _exit (99);
- }
- (void)dup2 (fd, fileno(stdout));
-/* JF for testing #define PREPROCESSOR "/lib/app" */
-#define PREPROCESSOR "./app"
- execl (PREPROCESSOR, PREPROCESSOR, 0);
- execl ("app","app",0);
- (void)write(2,"Exec of app failed. Get help.\n",31);
- (void)unlink(temporary_file_name);
- _exit (11);
- }
- (void)wait (& status);
- if (status.w_status & 0xFF00) /* JF was 0xF000, was wrong */
+ as_bad (_("Can't open %s for reading."), file_name);
+ as_perror ("%s", file_name);
+ return;
+ }
+
+ c = getc (f_in);
+ if (c == '#')
+ { /* Begins with comment, may not want to preprocess */
+ c = getc (f_in);
+ if (c == 'N')