| 2271 | // |
| 2272 | |
| 2273 | static int nextchar() |
| 2274 | { |
| 2275 | position++; |
| 2276 | line_position++; |
| 2277 | const SSHORT c = get_char(input_file); |
| 2278 | if (c == '\n') |
| 2279 | { |
| 2280 | line_global++; |
| 2281 | prior_line_position = line_position; |
| 2282 | line_position = 0; |
| 2283 | } |
| 2284 | |
| 2285 | // For silly fortran, mark the first token in a statement so |
| 2286 | // we can decide to start the database field substitution string |
| 2287 | // with a continuation indicator if appropriate. |
| 2288 | |
| 2289 | if (line_position == 1) |
| 2290 | { |
| 2291 | first_position = true; |
| 2292 | |
| 2293 | // If the first character on a Fortran line is a tab, bump up the |
| 2294 | // position indicator. |
| 2295 | |
| 2296 | #ifdef GPRE_FORTRAN |
| 2297 | if (gpreGlob.sw_language == lang_fortran && c == '\t') |
| 2298 | line_position = 7; |
| 2299 | #endif |
| 2300 | } |
| 2301 | |
| 2302 | // if this is a continuation line, the next token is not |
| 2303 | // the start of a statement. |
| 2304 | |
| 2305 | #ifdef GPRE_FORTRAN |
| 2306 | if (gpreGlob.sw_language == lang_fortran && line_position == 6 && c != ' ' && c != '0') |
| 2307 | { |
| 2308 | first_position = false; |
| 2309 | } |
| 2310 | #endif |
| 2311 | |
| 2312 | #ifdef GPRE_COBOL |
| 2313 | if (gpreGlob.sw_language == lang_cobol && |
| 2314 | (!isAnsiCobol(gpreGlob.sw_cob_dialect) && line_position == 1 && c == '-') || |
| 2315 | (isAnsiCobol(gpreGlob.sw_cob_dialect) && line_position == 7 && c == '-')) |
| 2316 | { |
| 2317 | first_position = false; |
| 2318 | } |
| 2319 | #endif |
| 2320 | |
| 2321 | if (position > traced_position) |
| 2322 | { |
| 2323 | traced_position = position; |
| 2324 | fputc(c, trace_file); |
| 2325 | } |
| 2326 | |
| 2327 | return c; |
| 2328 | } |
| 2329 | |
| 2330 |
no test coverage detected