summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorVern Paxson <vern@ee.lbl.gov>1988-04-10 20:46:58 +0000
committerVern Paxson <vern@ee.lbl.gov>1988-04-10 20:46:58 +0000
commit5099a94810cd7573d2a7367bdb81eb19f8ba46f3 (patch)
tree40a11bee71b6c217c538139e9c1764028f441cad /main.c
parent6f1eb21e140e325b98cfc7cdb1125af51d44a992 (diff)
fixed bug causing core dumps if skeleton files could not be opened.
Added -cF. Added fullspd to be equivalent to fulltbl for which options is cannot be mixed with.
Diffstat (limited to 'main.c')
-rw-r--r--main.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/main.c b/main.c
index aff4dc4..abd1ba0 100644
--- 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 )