Changes in libcfa/src/parseconfig.cfa [6a93e4d:b5e725a]
- File:
-
- 1 edited
-
libcfa/src/parseconfig.cfa (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/parseconfig.cfa
r6a93e4d rb5e725a 16 16 #pragma GCC visibility push(default) 17 17 18 18 19 // *********************************** exceptions *********************************** 19 20 20 21 // TODO: Add names of missing config entries to exception (see further below)22 vtable(Missing_Config_Entries) Missing_Config_Entries_vt;23 21 24 22 [ void ] ?{}( & Missing_Config_Entries this, unsigned int num_missing ) { … … 29 27 // TODO: use string interface when it's ready (and implement exception msg protocol) 30 28 [ 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."); 32 30 } // msg 33 31 34 35 vtable(Parse_Failure) Parse_Failure_vt;36 32 37 33 [ void ] ?{}( & Parse_Failure this, [] char failed_key, [] char failed_value ) { … … 54 50 } 55 51 56 57 vtable(Validation_Failure) Validation_Failure_vt;58 52 59 53 [ void ] ?{}( & Validation_Failure this, [] char failed_key, [] char failed_value ) { … … 112 106 113 107 114 static [ bool ] comments( & ifstream in, [] char name ) {108 static [ bool ] comments( & ifstream in, size_t size, [] char name ) { 115 109 while () { 116 in | name;110 in | wdi( size, name ); 117 111 if ( eof( in ) ) return true; 118 112 if ( name[0] != '#' ) return false; … … 136 130 // NOTE: Must add check to see if already read in value for this key, 137 131 // 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 ); 140 134 141 135 add_kv_pair( *kv_pairs, key, value );
Note:
See TracChangeset
for help on using the changeset viewer.