19 /*****************************************************************************/
21 /*****************************************************************************/
25 /* Input line stuff */
26 char linebuf [LINESIZE];
30 /* Input file table and number of open input files */
31 struct filent filetab[MAXFILES];
34 /* Current input file stream data */
41 /*****************************************************************************/
43 /*****************************************************************************/
48 /* Get the next char in input stream (the one behind the current one) */
53 return lptr[1] & 0xFF;
60 /* Get the current character in the input stream and advance line
61 * pointer (unless already at end of line).
67 return (*lptr++ & 0xFF);
74 /* Get the current character in the input stream and advance line
75 * pointer (no end of line check is performed).
78 return (*lptr++ & 0xFF);
84 /* Reset input line pointer, clear input line */
92 static void CloseInclude (void)
93 /* Close an include file and switch to the higher level file. Set inp to NULL
94 * if this was the main file.
102 /* Leave the include file */
105 inp = (pftab = &filetab[--ifile])->f_iocb;
116 /* Get a line from the current input. Returns -1 on end of file. */
126 /* If there is no file open, bail out */
131 /* Read lines until we get one with real contents */
134 while (!Done && Len < LINESIZE) {
136 while (fgets (line + Len, LINESIZE - Len, inp) == 0) {
141 /* Leave the current file */
144 /* If this was the last file, bail out */
150 /* We got a new line */
153 /* Remove the trailing newline if we have one */
154 Part = strlen (line + Len);
157 while (Len > 0 && line [Len-1] == '\n') {
162 /* Output the source line in the generated assembler file
165 if (IncSource && line[Start] != '\0') {
166 AddCodeLine ("; %s", line+Start);
169 /* Check if we have a line continuation character at the end. If not,
172 if (Len > 0 && line[Len-1] == '\\') {
173 line[Len-1] = '\n'; /* Replace by newline */