Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/parseconfig.cfa

    r6a93e4d rb5e725a  
    1616#pragma GCC visibility push(default)
    1717
     18
    1819// *********************************** exceptions ***********************************
    1920
    20 
    21 // TODO: Add names of missing config entries to exception (see further below)
    22 vtable(Missing_Config_Entries) Missing_Config_Entries_vt;
    2321
    2422[ void ] ?{}( & Missing_Config_Entries this, unsigned int num_missing ) {
     
    2927// TODO: use string interface when it's ready (and implement exception msg protocol)
    3028[ void ] msg( * Missing_Config_Entries ex ) {
    31         serr | "The config file is missing " | ex->num_missing | "entr" | sepOff | (ex->num_missing == 1 ? "y." : "ies.");
     29        serr | "The config file is missing " | ex->num_missing | "entr" | nosep | (ex->num_missing == 1 ? "y." : "ies.");
    3230} // msg
    3331
    34 
    35 vtable(Parse_Failure) Parse_Failure_vt;
    3632
    3733[ void ] ?{}( & Parse_Failure this, [] char failed_key, [] char failed_value ) {
     
    5450}
    5551
    56 
    57 vtable(Validation_Failure) Validation_Failure_vt;
    5852
    5953[ void ] ?{}( & Validation_Failure this, [] char failed_key, [] char failed_value ) {
     
    112106
    113107
    114 static [ bool ] comments( & ifstream in, [] char name ) {
     108static [ bool ] comments( & ifstream in, size_t size, [] char name ) {
    115109        while () {
    116                 in | name;
     110                in | wdi( size, name );
    117111          if ( eof( in ) ) return true;
    118112          if ( name[0] != '#' ) return false;
     
    136130                        // NOTE: Must add check to see if already read in value for this key,
    137131                        // once we switch to using hash table as intermediate storage
    138                   if ( comments( in, key ) ) break;                     // eof ?
    139                         in | value;
     132                        if ( comments( in, 64, key ) ) break;   // eof ?
     133                        in | wdi( 256, value );
    140134
    141135                        add_kv_pair( *kv_pairs, key, value );
Note: See TracChangeset for help on using the changeset viewer.