]> granicus.if.org Git - flex/commitdiff
fixed bug causing core dumps if skeleton files could not be opened.
authorVern Paxson <vern@ee.lbl.gov>
Sun, 10 Apr 1988 20:46:58 +0000 (20:46 +0000)
committerVern Paxson <vern@ee.lbl.gov>
Sun, 10 Apr 1988 20:46:58 +0000 (20:46 +0000)
Added -cF.
Added fullspd to be equivalent to fulltbl for which options is
   cannot be mixed with.

main.c

diff --git a/main.c b/main.c
index aff4dc41c88b3cc87c509bee9d4daaa5d91bdd59..abd1ba03edaa3aed2fb1840e9e24c748135b0d38 100644 (file)
--- a/main.c
+++ b/main.c
@@ -109,8 +109,11 @@ int status;
     if ( skelfile != NULL )
        (void) fclose( skelfile );
 
-    (void) fclose( temp_action_file );
-    (void) unlink( action_file_name );
+    if ( temp_action_file )
+       {
+       (void) fclose( temp_action_file );
+       (void) unlink( action_file_name );
+       }
 
     if ( printstats )
        {
@@ -243,6 +246,10 @@ char **argv;
                                useecs = true;
                                break;
 
+                           case 'F':
+                               fullspd = true;
+                               break;
+
                            case 'f':
                                fulltbl = true;
                                break;
@@ -285,8 +292,8 @@ char **argv;
                    break;
 
                case 'F':
-                   fullspd = true;
                    useecs = usemecs = false;
+                   fullspd = true;
                    break;
 
                case 'S':
@@ -321,10 +328,10 @@ get_next_arg: /* used by -c and -S flags in lieu of a "continue 2" control */
        ;
        }
 
-    if ( fulltbl && usemecs )
+    if ( (fulltbl || fullspd) && usemecs )
        flexerror( "full table and -cm don't make sense together" );
 
-    if ( fulltbl && interactive )
+    if ( (fulltbl || fullspd) && interactive )
        flexerror( "full table and -I are (currently) incompatible" );
 
     if ( (fulltbl || fullspd) && reject )