home *** CD-ROM | disk | FTP | other *** search
- *** flex/main.c Fri Oct 12 10:56:35 1990
- --- main.c Fri Nov 23 13:39:07 1990
- ***************
- *** 104,109 ****
- --- 104,110 ----
- static int outfile_created = 0;
- static int use_stdout;
- static char *skelname = NULL;
- + static int initialized = 0;
-
-
- int main( argc, argv )
- ***************
- *** 243,249 ****
- flexfatal( "error occurred when closing backtracking file" );
- }
-
- ! if ( printstats )
- {
- endtime = flex_gettime();
-
- --- 244,250 ----
- flexfatal( "error occurred when closing backtracking file" );
- }
-
- ! if ( printstats && initialized )
- {
- endtime = flex_gettime();
-
- ***************
- *** 372,382 ****
- fprintf( stderr, " %d total table entries needed\n", tblsiz );
- }
-
- - #ifndef VMS
- exit( status );
- - #else
- - exit( status + 1 );
- - #endif
- }
-
-
- --- 373,379 ----
- ***************
- *** 395,400 ****
- --- 392,402 ----
- {
- int i, sawcmpflag;
- char *arg, *flex_gettime(), *mktemp();
- + #ifndef SHORT_FILE_NAMES
- + char *backtrack_fn = "lex.backtrack";
- + #else
- + char *backtrack_fn = "lex.bck";
- + #endif
-
- printstats = syntaxerror = trace = spprdflt = interactive = caseins = fa
- lse;
- backtrack_report = performance_report = ddebug = fulltbl = fullspd = fal
- se;
- ***************
- *** 407,414 ****
- --- 409,428 ----
-
- csize = DEFAULT_CSIZE;
-
- + #ifndef VMSCMDLN
- +
- program_name = argv[0];
-
- + /* If GCC doesn't use the VAXCRTL cmdline parsing this should be #ifdef VAXC
- */
- + #ifdef VMS
- + { /* Fixup the grotesque argv[0] */
- + char *p;
- + if (NULL != (p = strrchr (argv[0], '.'))) *p = '\0';
- + if (NULL != (p = strrchr (argv[0], ']'))) program_name = p + 1;
- + }
- + #endif
- +
- +
- /* read flags */
- for ( --argc, ++argv; argc ; --argc, ++argv )
- {
- ***************
- *** 540,545 ****
- --- 554,568 ----
- ;
- }
-
- + num_input_files = argc;
- + input_files = argv;
- +
- + #else /* VMSCMDLN */
- +
- + #include "vmscmdln.c"
- +
- + #endif /* VMSCMDLN */
- +
- if ( (fulltbl || fullspd) && usemecs )
- flexerror( "full table and -Cm don't make sense together" );
-
- ***************
- *** 567,586 ****
- outfile_created = 1;
- }
-
- - num_input_files = argc;
- - input_files = argv;
- set_input_file( num_input_files > 0 ? input_files[0] : NULL );
-
- if ( backtrack_report )
- {
- ! #ifndef SHORT_FILE_NAMES
- ! backtrack_file = fopen( "lex.backtrack", "w" );
- ! #else
- ! backtrack_file = fopen( "lex.bck", "w" );
- ! #endif
-
- if ( backtrack_file == NULL )
- ! flexerror( "could not create lex.backtrack" );
- }
-
- else
- --- 590,603 ----
- outfile_created = 1;
- }
-
- set_input_file( num_input_files > 0 ? input_files[0] : NULL );
-
- if ( backtrack_report )
- {
- ! backtrack_file = fopen( backtrack_fn, "w" );
-
- if ( backtrack_file == NULL )
- ! lerrsf( "could not create backtrack file %s", backtrack_fn );
- }
-
- else
- ***************
- *** 657,662 ****
- --- 674,681 ----
- }
-
- set_up_initial_allocations();
- +
- + initialized = TRUE;
- }
-
-
-