Changeset c3c76cd for libcfa


Ignore:
Timestamp:
Aug 31, 2021, 1:49:09 AM (3 years ago)
Author:
Jacob Prud'homme <jafprudhomme@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, pthread-emulation, qualifiedEnum
Children:
dac3455
Parents:
1896c1f
git-author:
Jacob Prud'homme <jafprudhomme@…> (06/15/21 11:22:16)
git-committer:
Jacob Prud'homme <jafprudhomme@…> (08/31/21 01:49:09)
Message:

Coalesced all file closes to one location

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/parseconfig.cfa

    r1896c1f rc3c76cd  
    5050                        in | value;
    5151                        if ( value < 0 ) {
    52                                 close( in );
    5352                                exit | "Error: file \"" | configFile | "\" parameter " | name
    5453                                         | " value " | value | " must be non-negative."; // *** DOES THIS PRINT TO STDERR??? IT MUST!!! *** //
     
    6261
    6362                if ( numOfParm != Parmnum ) {
    64                         close( in );
    6563                        exit | "Error: file \"" | configFile | "\" is corrupt."; // *** DOES THIS PRINT TO STDERR??? IT MUST!!! *** //
    6664                } // if
    6765                if ( ! comments( in, name ) ) {                                 // ! eof ?
    68                         close( in );
    6966                        exit | "Error: file \"" | configFile | "\" has extraneous data."; // *** DOES THIS PRINT TO STDERR??? IT MUST!!! *** //
    7067                } // if
    7168        } catch( Open_Failure * ex; ex->istream == &in ) {
     69                exit | "Error: could not open input file \"" | configFile | "\""; // *** DOES THIS PRINT TO STDERR??? IT MUST!!! *** //
     70        } finally {
    7271                close( in );
    73                 exit | "Error: could not open input file \"" | configFile | "\""; // *** DOES THIS PRINT TO STDERR??? IT MUST!!! *** //
    7472        } // try
    75 
    76         close( in );
    7773
    7874        if ( cparms.numStops < 2 ) {
Note: See TracChangeset for help on using the changeset viewer.