Changeset 02a22a2
- Timestamp:
- Aug 31, 2021, 1:49:09 AM (3 years ago)
- Branches:
- ADT, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, pthread-emulation, qualifiedEnum
- Children:
- ba61cd9
- Parents:
- 98d6b744
- git-author:
- Jacob Prud'homme <jafprudhomme@…> (07/27/21 12:38:33)
- git-committer:
- Jacob Prud'homme <jafprudhomme@…> (08/31/21 01:49:09)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/parseconfig.cfa
r98d6b744 r02a22a2 45 45 } 46 46 47 void add_kv_pair( KVPairs kv_pairs, char * k, char * v ) with ( kv_pairs ) {47 void add_kv_pair( KVPairs & kv_pairs, char * k, char * v ) with ( kv_pairs ) { 48 48 if ( size == max_size ) { 49 49 max_size *= 2; … … 67 67 // Parse configuration from a file formatted in shell style 68 68 KVPairs & parse_shell_config_format( const char * config_file, size_t num_entries ) { 69 * KVPairs kv_pairs;// = { num_entries }; 69 // * KVPairs kv_pairs; 70 KVPairs kv_pairs = { num_entries }; 70 71 71 72 ifstream in; … … 80 81 in | value; 81 82 82 add_kv_pair( *kv_pairs, key, value );83 add_kv_pair( kv_pairs, key, value ); 83 84 84 85 if ( fail( in ) ) break; … … 91 92 close( in ); 92 93 93 return *kv_pairs;94 return kv_pairs; 94 95 } 95 96
Note: See TracChangeset
for help on using the changeset viewer.