* added compilers lcc and bcc (linux86)
[mascara-docs.git] / compilers / linux86-0.16.17 / bcc / input.c
bloba17af4a9c1727609729f4a4e1cc9546092d7bd1c
1 /* input.c - input for bcc */
3 /* Copyright (C) 1992 Bruce Evans */
5 #define ARBITRARY_BACKSLASH_NEWLINES_NOT
6 #define INSERT_BACKSLASH_NEWLINES_NOT
8 #include "bcc.h"
9 #include "gencode.h"
10 #include "output.h"
11 #include "os.h"
12 #include "sc.h"
13 #include "scan.h"
14 #include "table.h"
16 #undef EXTERN
17 #define EXTERN
18 #include "input.h"
20 #define INBUFSIZE 2048
21 #define NO_EOFHACK
23 struct fbufstruct /* file buffer structure */
25 struct fcbstruct fcb; /* status after opening an include sub-file */
26 char *fname; /* file name */
27 bool_t fname_malloced; /* nonzero if fname was malloced */
28 char pushback[3]; /* allows pushback to 2 before start of fbuf
29 * XXX 3 chars before?
30 * XXX should do everything in fbuf */
31 char fbuf[INBUFSIZE + 1]; /* buffer to read into */
34 #ifdef BUILTIN_CPP
35 struct inclist /* list of include file directories */
37 char *incdirname;
38 struct inclist *incnext;
41 PRIVATE char filemacro[] = "__FILE__";
42 PRIVATE struct inclist incabsolute; /* dummy list for absolute names */
43 /* depends on zero (NULL) init */
44 PRIVATE struct inclist incfirst;
45 /* begin include searches here for "" */
46 /* at next in list for <> */
47 /* -I directories are put in list */
48 /* between first and last */
49 PRIVATE struct inclist inclast =
51 #ifdef DEFAULT_INCLUDE_DIR
52 DEFAULT_INCLUDE_DIR,
53 #endif
54 NULL,
56 PRIVATE fastin_t inclevel; /* nest level of include files */
57 /* depends on zero init */
58 #endif
59 PRIVATE struct fbufstruct *inputbuf; /* current input file buffer */
60 /* its fcb only to date in includes */
61 /* depends on zero (NULL) init */
62 PRIVATE bool_t suppress_line_numbers;
64 #ifdef ARBITRARY_BACKSLASH_NEWLINES
65 FORWARD void backslash P((void));
66 #endif
67 #ifdef BUILTIN_CPP
68 FORWARD void definefile P((char *fname));
69 FORWARD void leaveinclude P((void));
70 #endif
71 FORWARD void inputinit P((char *fname, fd_t fd));
72 FORWARD void usage P((void));
74 #ifdef ARBITRARY_BACKSLASH_NEWLINES
75 PRIVATE void backslash()
77 static unsigned nbackslash;
79 if (nbackslash != 0)
80 --nbackslash;
81 more:
82 ++nbackslash;
83 while (*(lineptr + 1) == '\\')
85 ++nbackslash;
86 ++lineptr;
88 if (*(lineptr + 1) != EOL)
90 if (--nbackslash != 0)
91 *--lineptr = '\\'; /* force look at current backslash again */
92 return;
94 ch = *++lineptr;
95 more1:
96 if (!eofile && lineptr >= input.limit)
97 skipeol();
98 if (ch == EOL)
100 --nbackslash;
101 if (eofile)
102 eofin("backslash-newline");
103 else
105 skipeol();
106 if (ch == EOL && !eofile && lineptr >= input.limit)
107 skipeol();
108 #ifdef COEOL /* XXX - this should go through specialchar() */
109 if (ch == COEOL)
111 ch = *++lineptr;
112 if (ch == EOL && !eofile && lineptr >= input.limit)
113 skipeol();
115 #endif
117 if (ch == '\\')
118 goto more;
119 if (nbackslash != 0 && ch == EOL && !eofile)
120 goto more1;
121 if (nbackslash != 0)
123 ch = *--lineptr = '\\';
124 if (--nbackslash != 0)
125 ch = *--lineptr = '\\';
127 return;
129 if (ch == '\\')
130 goto more;
131 if (ch == EOL && !eofile)
132 goto more1;
133 ch = *--lineptr = '\\'; /* pushback */
134 if (--nbackslash != 0)
135 ch = *--lineptr = '\\';
137 #endif
139 PUBLIC void closein()
141 #ifdef FAKE_INBUFSIZE_1
142 fclose(input.fp);
143 #else
144 close(input.fd);
145 #endif
146 #ifdef BUILTIN_CPP
147 while (inclevel != 0)
148 leaveinclude();
149 #endif
152 #ifdef BUILTIN_CPP
153 PRIVATE void definefile(fname)
154 char *fname;
156 char *def;
158 def = ourmalloc(sizeof filemacro - 1 + 2 + strlen(fname) + 1 + 1);
159 strcpy(def, filemacro);
160 strcat(def, "=\"");
161 strcat(def, fname);
162 strcat(def, "\"");
163 definestring(def);
164 ourfree(def);
166 #endif
168 PUBLIC void errorloc()
170 register struct fbufstruct *infbuf;
172 if ((infbuf = inputbuf) == NULL)
173 return;
174 outstr(infbuf->fname);
175 outbyte(':');
176 if (eofile)
177 outstr("eof");
178 else
180 outudec(input.linenumber);
181 outbyte('.');
182 #ifdef BUILTIN_CPP
183 if (maclevel == 0)
184 outudec((unsigned) (lineptr - inputbuf->fbuf) - input.lineoffset);
185 else
187 outudec((unsigned) (savedlineptr() - inputbuf->fbuf)
188 - input.lineoffset);
189 outstr(" (macro level ");
190 outudec((unsigned) maclevel);
191 outbyte(')');
193 #else
194 outudec((unsigned) (lineptr - inputbuf->fbuf) - input.lineoffset);
195 #endif
197 infbuf->fcb.includer = input.includer;
198 while ((infbuf = infbuf->fcb.includer) != NULL)
200 outstr(" (from ");
201 outstr(infbuf->fname);
202 outbyte(':');
203 outudec(infbuf->fcb.linenumber);
204 outbyte(')');
206 outstr(": ");
209 /* gch1() - get next char, advance ptr (only works on current line) */
211 PUBLIC void gch1()
213 if (SYMOFCHAR(ch = *++lineptr) != SPECIALCHAR)
214 return;
215 specialchar();
218 #ifdef BUILTIN_CPP
219 /* process #include */
221 PUBLIC void include()
223 char *dirnameptr;
224 char *dirnamend;
225 unsigned dirnamelen;
226 fd_t fd;
227 char *fnameptr;
228 char *fullnameptr;
229 struct inclist *incptr;
230 char terminator;
232 while (blanksident())
234 if ((gsymptr = findlorg(gsname)) == NULL ||
235 gsymptr->flags != DEFINITION)
236 break;
237 entermac();
239 if ((terminator = ch) == '<')
240 terminator = '>';
241 else if (terminator != '"')
243 error("bad file name");
244 return;
246 gch1();
247 fnameptr = charptr;
248 while (TRUE)
250 if (ch == EOL) /* no escapes in file names */
251 break;
252 if (ch == terminator)
254 gch1();
255 blanks();
256 break;
258 if (charptr >= chartop)
259 fnameptr = growobject(fnameptr, 1);
260 #ifdef TS
261 ++ts_n_filename;
262 ++ts_s_filename;
263 ++ts_s_filename_tot;
264 #endif
265 *charptr++ = ch;
266 gch1();
268 if (charptr >= chartop)
269 fnameptr = growobject(fnameptr, 1);
270 #ifdef TS
271 ++ts_n_filename_term;
272 ++ts_s_filename_term;
273 ++ts_s_filename_tot;
274 #endif
275 *charptr++ = 0;
276 dirnamend = NULL;
277 if (isabspath(fnameptr, &ch))
278 incptr = &incabsolute;
279 else
281 incptr = &incfirst;
282 if (terminator == '>')
283 incptr = incptr->incnext;
284 else
286 dirnameptr = inputbuf->fname;
287 if ((dirnamend = strrchr(dirnameptr, DIRCHAR)) == NULL)
288 incptr->incdirname = NULL;
289 else
291 *dirnamend = 0;
292 incptr->incdirname = dirnameptr;
298 if (incptr->incdirname == NULL)
300 fullnameptr = ourmalloc(strlen(fnameptr) + 1);
301 #ifdef TS
302 ++ts_n_pathname;
303 ts_s_pathname += strlen(fnameptr) + 1;
304 ts_s_pathname_tot += strlen(fnameptr) + 1;
305 #endif
306 strcpy(fullnameptr, fnameptr);
308 else
310 dirnamelen = strlen(incptr->incdirname);
311 fullnameptr = ourmalloc(dirnamelen + (int) (charptr - fnameptr)
312 + 2);
313 /* 2 extra for null and maybe DIRCHAR */
314 #ifdef TS
315 ++ts_n_pathname;
316 ts_s_pathname += dirnamelen + (charptr - fnameptr) + 2;
317 ts_s_pathname_tot += dirnamelen + (charptr - fnameptr) + 2;
318 #endif
319 dirnameptr = fullnameptr + dirnamelen;
320 strcpy(fullnameptr, incptr->incdirname);
321 if (*fullnameptr != 0 && *(dirnameptr - 1) != DIRCHAR)
322 strcat(fullnameptr, DIRSTRING);
323 strcat(fullnameptr, fnameptr);
324 if (dirnamend != NULL)
326 *dirnamend = DIRCHAR;
327 dirnamend = NULL;
330 fd = open(fullnameptr, 0);
331 if (fd >= 0)
333 #ifdef TS
334 ts_s_filename_tot -= charptr - fnameptr;
335 #endif
336 charptr = fnameptr;
337 input.lineptr = lineptr;
338 inputbuf->fcb = input;
339 ++inclevel; /* XXX - will run out of memory before overflow */
340 inputinit(fullnameptr, fd);
341 inputbuf->fname_malloced = TRUE;
342 return;
344 #ifdef TS
345 ts_s_pathname_tot -= strlen(fullnameptr) + 1;
346 #endif
347 ourfree(fullnameptr);
349 while ((incptr = incptr->incnext) != NULL);
351 fullnameptr = ourmalloc(strlen(fnameptr) + 40);
352 strcpy(fullnameptr, "cannot find include file ");
353 strcat(fullnameptr, fnameptr);
354 error(fullnameptr);
355 ourfree(fullnameptr);
357 #ifdef TS
358 ts_s_filename_tot -= charptr - fnameptr;
359 #endif
360 charptr = fnameptr;
362 #endif
364 /* initialise current input file */
366 PRIVATE void inputinit(fname, fd)
367 char *fname;
368 fd_t fd;
370 register struct fbufstruct *newinputbuf;
372 /* don't allocate after saying input.includer = inputbuf (to save a reg)
373 * or an error in the alloc would cycle trying to print the include list
375 newinputbuf = (struct fbufstruct *) ourmalloc(sizeof *inputbuf);
376 #ifdef TS
377 ++ts_n_inputbuf;
378 ts_s_inputbuf += sizeof *inputbuf;
379 ts_s_inputbuf_tot += sizeof *inputbuf;
380 #endif
381 input.fd = fd;
382 #ifdef FAKE_INBUFSIZE_1
383 input.fp = fdopen(fd, "r");
384 #endif
385 input.linenumber = 0;
386 input.lineoffset = 0;
387 input.includer = inputbuf;
388 inputbuf = newinputbuf;
389 newinputbuf->fname = fname;
390 newinputbuf->fname_malloced = FALSE;
391 #ifdef BUILTIN_CPP
392 undefinestring(filemacro);
393 definefile(fname);
394 if (orig_cppmode && !suppress_line_numbers)
395 outcpplinenumber(1, fname, input.includer == NULL ? "" : " 1");
396 #endif
397 *(input.limit = newinputbuf->fbuf) = EOL;
399 /* dummy line so processing can start with skipline() */
400 ch = *(lineptr = newinputbuf->fbuf - 1) = EOL;
403 PUBLIC void linecontol()
405 char linename[256];
406 char * ptr;
407 int i=0;
409 blanks();
410 input.linenumber = atoi(lineptr)-1;
411 while( SYMOFCHAR(ch) == INTCONST ) gch1();
412 blanks();
413 if( ch != '"' ) return;
414 for(ptr=lineptr+1; *ptr
415 && *ptr != EOL
416 && *ptr != '"'
417 && i<sizeof(linename)-1; i++, ptr++)
418 linename[i] = *ptr;
419 linename[i] = '\0';
421 if (inputbuf->fname_malloced)
423 #ifdef TS
424 ts_s_pathname_tot -= strlen(inputbuf->fname) + 1;
425 #endif
426 ourfree(inputbuf->fname);
428 inputbuf->fname_malloced = TRUE;
429 ptr = ourmalloc(strlen(linename)+1);
430 strcpy(ptr, linename);
431 inputbuf->fname = ptr;
433 ptr=lineptr;
434 #ifdef BUILTIN_CPP
435 undefinestring(filemacro);
436 definefile(inputbuf->fname);
437 #endif
438 ch = *(lineptr = ptr);
441 #ifdef BUILTIN_CPP
442 /* switch from include file to file which included it */
444 PRIVATE void leaveinclude()
446 --inclevel;
447 if (inputbuf->fname_malloced)
449 #ifdef TS
450 ts_s_pathname_tot -= strlen(inputbuf->fname) + 1;
451 #endif
452 ourfree(inputbuf->fname);
454 #ifdef TS
455 ts_s_inputbuf_tot -= sizeof *inputbuf;
456 #endif
457 ourfree((char *) inputbuf);
458 #ifndef NO_EOFHACK
459 if(input.fd>=0)
460 #endif
461 close(input.fd);
462 #ifdef FAKE_INBUFSIZE_1
463 fclose(input.fp);
464 #endif
465 inputbuf = input.includer;
466 input = inputbuf->fcb;
467 undefinestring(filemacro);
468 definefile(inputbuf->fname);
469 ch = *(lineptr = input.lineptr);
470 skipline();
471 if (orig_cppmode && !suppress_line_numbers)
472 outcpplinenumber(input.linenumber, inputbuf->fname, " 2");
474 #endif
476 /* open input and output files and get options */
478 PUBLIC void openio(argc, argv)
479 int argc;
480 char *argv[];
482 register char *arg;
483 int argn;
484 fd_t fd;
485 char *fname;
486 #ifdef BUILTIN_CPP
487 struct inclist *incnew;
488 struct inclist *incptr;
489 #endif
490 bool_t flag[128];
492 #if 0
493 lineptr = "\n"; /* empty line in case error message */
494 #endif
495 fd = 0; /* standard input */
496 memset(flag, 0, sizeof flag);
497 #ifdef I80386
498 flag['3'] = sizeof (int) >= 4;
499 #endif
500 fname = "stdin";
501 #ifdef BUILTIN_CPP
502 (incptr = &incfirst)->incnext = &inclast;
503 #endif
504 initout();
505 for (argn = 1; argn < argc; ++argn)
507 arg = argv[argn];
508 if (*arg != '-')
510 if (fd != 0)
511 fatalerror("more than one input file");
512 fname = arg;
513 if ((fd = open(arg, 0)) < 0)
514 fatalerror("cannot open input");
516 else
517 switch (arg[1])
519 #ifdef I8088
520 case '0': /* generate 16-bit code */
521 #endif
522 #ifdef I80386
523 case '3': /* generate 32-bit code */
524 #endif
525 case 'c': /* caller saves */
526 #ifdef DBNODE
527 case 'd': /* print debugging information in asm output */
528 #endif
529 #ifdef BUILTIN_CPP
530 case 'E': /* acting as cpp */
531 #endif
532 case 'f': /* pass first argument in register */
533 #ifdef DYNAMIC_LONG_ORDER
534 case 'l': /* long big-endian */
535 #endif
536 case 'P': /* if acting as cpp, suppress line numbers */
537 #ifdef POSINDEPENDENT
538 case 'p': /* generate almost-position-independent code */
539 #endif
540 case 't': /* print source code in asm output */
541 case 'w': /* watch location counter */
542 case 'O': /* Optimisation. */
543 if (arg[2] == 0)
544 flag[(int)arg[1]] = TRUE;
545 else if (arg[2] == '-' && arg[3] == 0)
546 flag[(int)arg[1]] = FALSE;
547 else
548 usage();
549 if (arg[1] == '0') /* flag 0 is negative logic flag 3 */
550 flag['3'] = TRUE + FALSE - flag['0'];
551 break;
552 #ifdef BUILTIN_CPP
553 case 'D':
554 definestring(arg + 2);
555 break;
556 case 'I':
557 (incnew = (struct inclist *) ourmalloc(sizeof *incnew))
558 ->incdirname = arg + 2;
559 #ifdef TS
560 ++ts_n_includelist;
561 ts_s_includelist += sizeof *incnew;
562 #endif
563 incnew->incnext = incptr->incnext;
564 incptr = incptr->incnext = incnew;
565 break;
566 case 'U':
567 undefinestring(arg + 2);
568 break;
569 #endif
570 case 'o':
571 if (arg[2] != 0 || ++argn >= argc)
572 usage();
573 openout(argv[argn]);
574 break;
575 default:
576 usage();
577 break;
580 #ifdef BUILTIN_CPP
581 #ifdef I8088
582 #ifdef I80386
583 if (flag['3'])
585 i386_32 = TRUE;
586 definestring("__AS386_32__");
587 definestring("__i386__");
589 else
590 #endif
592 definestring("__AS386_16__");
593 definestring("__8086__");
595 #endif
596 #ifdef MC6809
597 definestring("__AS09__");
598 #endif
599 if (flag['c'])
601 callersaves = TRUE;
602 definestring("__CALLER_SAVES__");
604 #ifdef DBNODE
605 dbnodeon = flag['d'];
606 #endif
607 orig_cppmode = cppmode = flag['E'];
608 if (flag['f'])
610 arg1inreg = TRUE;
611 #ifdef I8088
612 definestring("__FIRST_ARG_IN_AX__");
613 #endif
614 #ifdef MC6808
615 definestring("__FIRST_ARG_IN_X__");
616 #endif
618 arg1op = arg1inreg ? ROOTLISTOP : LISTOP;
619 #ifdef DYNAMIC_LONG_ORDER
620 if (flag['l'])
622 long_big_endian = TRUE;
623 definestring("__LONG_BIG_ENDIAN__");
625 #endif
626 suppress_line_numbers = flag['P'];
627 #ifdef POSINDEPENDENT
628 if (flag['p'])
630 posindependent = TRUE;
631 definestring("__POS_INDEPENDENT__");
633 #endif
634 if (flag['O'])
636 optimise = TRUE;
637 definestring("__OPTIMISED__");
639 #ifdef NOFLOAT
640 definestring("__HAS_NO_FLOATS__");
641 #endif
643 #else /* !BUILTIN_CPP */
645 #ifdef I80386
646 if (flag['3']) i386_32 = TRUE;
647 #endif
648 if (flag['c']) callersaves = TRUE;
649 #ifdef DBNODE
650 dbnodeon = flag['d'];
651 #endif
652 if (flag['f']) arg1inreg = TRUE;
653 arg1op = arg1inreg ? ROOTLISTOP : LISTOP;
654 #ifdef DYNAMIC_LONG_ORDER
655 if (flag['l']) long_big_endian = TRUE;
656 #endif
657 suppress_line_numbers = flag['P'];
658 #ifdef POSINDEPENDENT
659 if (flag['p']) posindependent = TRUE;
660 #endif
661 if (flag['O']) optimise = TRUE;
663 #endif
664 ctext = flag['t'];
665 #ifdef DBNODE
666 if (ctext) dbnodeon = 1;
667 #endif
668 watchlc = flag['w'];
669 setoutbufs();
670 inputinit(fname, fd);
673 /* advance over EOL sentinel to new line */
675 PUBLIC void skipeol()
677 #ifdef FAKE_INBUFSIZE_1
678 static int ich;
679 #endif
680 #ifdef INSERT_BACKSLASH_NEWLINES
681 static int bs_state;
682 static bool_t skip_printing_nl;
683 #endif
684 int nread;
685 debug(7, "skipeol %s:%d", inputbuf->fname, input.linenumber);
687 if (eofile)
688 return;
689 if (lineptr < input.limit)
691 ++input.linenumber;
692 ch = *++lineptr;
693 if (ctext && !asmmode)
695 comment();
696 outudec(input.linenumber);
697 outbyte(' ');
698 outline(lineptr);
700 #ifdef BUILTIN_CPP
701 #ifndef ASM_BARE
702 if (!virtual_nl && (orig_cppmode || asmmode))
703 #else
704 if (orig_cppmode && !asmmode)
705 #endif
706 #ifdef INSERT_BACKSLASH_NEWLINES
707 if (!skip_printing_nl)
708 #endif
709 outbyte('\n');
710 #else /* !BUILTIN_CPP */
711 if (asmmode)
712 #ifdef INSERT_BACKSLASH_NEWLINES
713 if (!skip_printing_nl)
714 #endif
715 outbyte('\n');
716 #endif
718 #ifdef INSERT_BACKSLASH_NEWLINES
719 if (bs_state == 1 && *(lineptr - 1) == EOL)
720 #endif
721 input.lineoffset = (int) (lineptr - inputbuf->fbuf);
722 return;
724 input.lineoffset -= (int) (lineptr - inputbuf->fbuf);
725 #ifdef FAKE_INBUFSIZE_1
726 lineptr = inputbuf->fbuf;
727 #ifdef INSERT_BACKSLASH_NEWLINES
728 switch (bs_state)
730 case0:
731 case 0:
732 bs_state = nread = (ich = getc(input.fp)) == EOF ? 0 : 1;
733 skip_printing_nl = FALSE;
734 break;
735 case 1:
736 if (ich == '\\')
737 goto case0; /* avoid chance of splitting \EOL */
738 ich = '\\';
739 nread = 1;
740 bs_state = 2;
741 ++input.lineoffset;
742 break;
743 case 2:
744 ich = EOL;
745 nread = 1;
746 bs_state = 0;
747 skip_printing_nl = TRUE;
748 ++input.lineoffset;
749 --input.linenumber;
750 break;
752 #else
753 nread = (ich = getc(input.fp)) == EOF ? 0 : 1;
754 #endif
755 *lineptr = ich;
756 #else
757 #ifndef NO_EOFHACK
758 if(input.fd<0)
759 nread=0;
760 else
762 #endif
763 nread = read(input.fd, lineptr = inputbuf->fbuf, INBUFSIZE);
764 #ifndef NO_EOFHACK
765 #ifdef BUILTIN_CPP
766 if( nread == 0 && inclevel > 0 )
768 close(input.fd);
769 input.fd = -1;
770 memcpy(inputbuf->fbuf, "\n", 1);
771 nread = 1;
773 #endif
775 #endif
776 #endif
777 if (nread < 0)
778 fatalerror("input error");
779 *(input.limit = lineptr + nread) = EOL;
780 ch = *lineptr;
781 if (nread == 0)
783 #ifdef BUILTIN_CPP
784 if (inclevel == 0)
786 eofile = TRUE;
787 checknotinif();
789 else
791 leaveinclude();
792 skipeol();
794 #else
795 eofile = TRUE;
796 #endif
797 return;
799 if (ctext && !asmmode)
801 comment();
802 outudec(input.linenumber);
803 outbyte(' ');
804 outline(lineptr);
808 PUBLIC void specialchar()
810 #ifdef BUILTIN_CPP
811 if (maclevel != 0)
813 if (ch == EOL) /* it might also be backslash or COEOL */
814 leavemac();
815 if (ch != EOL)
816 return;
818 #endif
819 more:
820 #ifdef ARBITRARY_BACKSLASH_NEWLINES
821 if (ch == '\\')
822 backslash();
823 #endif
824 if (!eofile && lineptr >= input.limit)
826 skipeol();
827 #ifdef ARBITRARY_BACKSLASH_NEWLINES
828 if (ch == '\\')
829 backslash();
830 #endif
832 #ifndef ARBITRARY_BACKSLASH_NEWLINES
833 if (ch == '\\')
835 if (*(lineptr + 1) == EOL)
837 if (lineptr + 1 >= input.limit)
839 ++lineptr;
840 skipeol();
841 ch = *--lineptr = '\\'; /* pushback */
843 if (*(lineptr + 1) == EOL)
845 if (eofile)
846 eofin("backslash-newline");
847 else
849 ++lineptr;
850 skipeol();
851 if (SYMOFCHAR(ch) == SPECIALCHAR)
853 #ifdef COEOL
854 if (ch != COEOL
855 || SYMOFCHAR(ch = *++lineptr) == SPECIALCHAR)
856 #endif
857 goto more;
862 #endif
864 #ifdef COEOL
865 if (ch == EOL && !eofile)
867 if (*(lineptr + 1) == EOL && lineptr + 1 >= input.limit)
869 ++lineptr;
870 skipeol(); /* refill buffer */
871 ch = *--lineptr = EOL; /* pushback */
873 if (*(lineptr + 1) == COEOL)
874 *++lineptr = EOL; /* discard COEOL */
876 #endif
879 PRIVATE void usage()
881 fatalerror(
882 #ifdef BUILTIN_CPP
883 # ifdef MC6809
884 "usage: cc1 [-cdfptw[-]] [-Ddefine] [-Iincdir] [-Uundef] [-o outfile] [infile]"
885 # else
886 # ifdef I80386
887 "usage: cc1 [-03cdfltw[-]] [-Ddefine] [-Iincdir] [-Uundef] [-o outfile] [infile]"
888 # else
889 "usage: cc1 [-cdfltw[-]] [-Ddefine] [-Iincdir] [-Uundef] [-o outfile] [infile]"
890 # endif
891 # endif
892 #else
893 # ifdef I80386
894 "usage: cc1 [-03cdfltw[-]] [-o outfile] [infile]"
895 # else
896 "usage: cc1 [-cdfltw[-]] [-o outfile] [infile]"
897 # endif
898 #endif