| 127 | } /* EatWhitespace */ |
| 128 | |
| 129 | static int EatComment( FILE *InFile ) |
| 130 | /* ------------------------------------------------------------------------ ** |
| 131 | * Scan to the end of a comment. |
| 132 | * |
| 133 | * Input: InFile - Input source. |
| 134 | * |
| 135 | * Output: The character that marks the end of the comment. Normally, |
| 136 | * this will be a newline, but it *might* be an EOF. |
| 137 | * |
| 138 | * Notes: Because the config files use a line-oriented grammar, we |
| 139 | * explicitly exclude the newline character from the list of |
| 140 | * whitespace characters. |
| 141 | * - Note that both EOF (-1) and the nul character ('\0') are |
| 142 | * considered end-of-file markers. |
| 143 | * |
| 144 | * ------------------------------------------------------------------------ ** |
| 145 | */ |
| 146 | { |
| 147 | int c; |
| 148 | |
| 149 | for( c = getc( InFile ); ('\n'!=c) && (EOF!=c) && (c>0); c = getc( InFile ) ) |
| 150 | ; |
| 151 | return( c ); |
| 152 | } /* EatComment */ |
| 153 | |
| 154 | static int Continuation( char *line, int pos ) |
| 155 | /* ------------------------------------------------------------------------ ** |