Changeset 69e06ff


Ignore:
Timestamp:
Nov 26, 2023, 9:42:26 AM (5 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
2d373440, 39eb784
Parents:
6a1f553
Message:

formatting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/parseconfig.cfa

    r6a1f553 r69e06ff  
    1 
    2 
    31#pragma GCC diagnostic push
    42//#pragma GCC diagnostic ignored "-Wunused-parameter"
     
    7472
    7573
    76 [ void ] ?{}( & KVPairs kvp ) with ( kvp ) {                            // default constructor
     74[ void ] ?{}( & KVPairs kvp ) with ( kvp ) {                    // default constructor
    7775        size = 0; max_size = 0; data = 0p;
    7876}
    7977
    80 [ void ] ?{}( & KVPairs kvp, size_t size ) {                            // initialization
     78[ void ] ?{}( & KVPairs kvp, size_t size ) {                    // initialization
    8179        kvp.[ size, max_size ] = [ 0, size ];
    8280        kvp.data = alloc( size );
    8381}
    8482
    85 [ void ] ^?{}( & KVPairs kvp ) with ( kvp ) {                           // destructor
     83[ void ] ^?{}( & KVPairs kvp ) with ( kvp ) {                   // destructor
    8684        for ( i; size ) free( data[i] );
    8785        free( data );
     
    111109          if ( eof( in ) ) return true;
    112110          if ( name[0] != '#' ) return false;
    113                 in | nl;                                                                        // ignore remainder of line
     111                in | nl;                                                                                // ignore remainder of line
    114112        } // while
    115113} // comments
     
    122120        ifstream in;
    123121        try {
    124                 open( in, config_file );                                        // open the configuration file for input
     122                open( in, config_file );                                                // open the configuration file for input
    125123
    126124                [64] char key;
    127125                [256] char value;
    128126
    129                 while () {                                                                      // parameter names can appear in any order
     127                while () {                                                                              // parameter names can appear in any order
    130128                        // NOTE: Must add check to see if already read in value for this key,
    131129                        // once we switch to using hash table as intermediate storage
    132                         if ( comments( in, 64, key ) ) break;   // eof ?
     130                  if ( comments( in, 64, key ) ) break;                 // eof ?
    133131                        in | wdi( 256, value );
    134132
     
    136134
    137135                  if ( eof( in ) ) break;
    138                         in | nl;                                                                // ignore remainder of line
     136                        in | nl;                                                                        // ignore remainder of line
    139137                } // for
    140138        } catch( open_failure * ex; ex->istream == &in ) {
Note: See TracChangeset for help on using the changeset viewer.