MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / pass2

Function pass2

src/gpre/gpre.cpp:2429–2677  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2427//
2428
2429static void pass2( SLONG start_position)
2430{
2431 SSHORT c = 0;
2432
2433 // FSG 14.Nov.2000
2434 if (sw_verbose) {
2435 fprintf(stderr, "*********************** PASS 2 ***************************\n");
2436 }
2437
2438 bool suppress_output = false;
2439
2440 const bool sw_block_comments = gpreGlob.sw_language == lang_c ||
2441 isLangCpp(gpreGlob.sw_language) || gpreGlob.sw_language == lang_pascal;
2442
2443 // Put out a distintive module header
2444
2445 if (!sw_first)
2446 {
2447 sw_first = true;
2448 for (int i = 0; i < 5; ++i)
2449 {
2450 fprintf(gpreGlob.out_file,
2451 "%s********** Preprocessed module -- do not edit **************%s\n",
2452 comment_start, comment_stop);
2453 }
2454 fprintf(gpreGlob.out_file,
2455 "%s**************** gpre version %s *********************%s\n",
2456 comment_start, FB_VERSION, comment_stop);
2457 }
2458
2459#ifdef GPRE_ADA
2460 if ((gpreGlob.sw_language == lang_ada) &&
2461 (gpreGlob.ada_flags & gpreGlob.ADA_create_database))
2462 {
2463 fprintf(gpreGlob.out_file, "with unchecked_conversion;\nwith system;\n");
2464 }
2465#endif
2466
2467 // Let's prepare for worst case: a lot of small dirs, many "\" to duplicate.
2468 char backlash_fixed_file_name[MAXPATHLEN + MAXPATHLEN];
2469 { // scope
2470 char* p = backlash_fixed_file_name;
2471 for (const char* q = file_name; *q;)
2472 {
2473 if ((*p++ = *q++) == '\\')
2474 *p++ = '\\';
2475 }
2476 *p = 0;
2477 } // scope
2478
2479 //if (sw_lines)
2480 // fprintf (gpreGlob.out_file, "#line 1 \"%s\"\n", backlash_fixed_file_name);
2481
2482 SLONG line = 0;
2483 bool line_pending = sw_lines;
2484 SLONG current = 1 + start_position;
2485 SLONG column = 0;
2486

Callers 9

pass2Method · 0.85
pass2Method · 0.85
pass2Method · 0.85
pass2Method · 0.85
pass2Method · 0.85
pass2Method · 0.85
pass2Method · 0.85
compile_moduleFunction · 0.85
pass2RseMethod · 0.85

Calls 7

isLangCppFunction · 0.85
get_charFunction · 0.85
CPR_errorFunction · 0.85
putcFunction · 0.85
fputsFunction · 0.85
return_charFunction · 0.85
isAnsiCobolFunction · 0.85

Tested by

no test coverage detected