Changeset b3c169e6 in mainline for uspace/lib/conf/src/ini.c
- Timestamp:
- 2020-07-05T22:01:59Z (5 years ago)
- Parents:
- 6efe1b78
- git-author:
- Matthieu Riolo <matthieu.riolo@…> (2020-03-14 15:32:12)
- git-committer:
- Matthieu Riolo <matthieu.riolo@…> (2020-07-05 22:01:59)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/conf/src/ini.c
r6efe1b78 rb3c169e6 110 110 } 111 111 112 113 112 static size_t ini_item_ht_hash(const ht_link_t *item) 114 113 { … … 142 141 ini_item_destroy(&ini_item); 143 142 } 144 145 143 146 144 static hash_table_ops_t configuration_ht_ops = { … … 235 233 continue; 236 234 } 237 235 238 236 /* Start new section */ 239 237 if (line[0] == '[') { … … 256 254 *close_bracket = '\0'; 257 255 cur_section->name = str_dup(line + 1); 258 256 259 257 if (!hash_table_insert_unique(&conf->sections, 260 258 &cur_section->ht_link)) { … … 329 327 } 330 328 331 332 333 329 /* 334 330 * Actual INI functions … … 355 351 } 356 352 357 static ini_section_t *ini_section_create(void)353 static ini_section_t *ini_section_create(void) 358 354 { 359 355 ini_section_t *section = malloc(sizeof(ini_section_t)); … … 403 399 } 404 400 405 406 401 /** Parse file contents to INI structure 407 402 * … … 447 442 } 448 443 449 450 444 /** Get a section from configuration 451 445 * … … 476 470 */ 477 471 ini_item_iterator_t ini_section_get_iterator(ini_section_t *section, 478 const char *key)472 const char *key) 479 473 { 480 474 ini_item_iterator_t result;
Note:
See TracChangeset
for help on using the changeset viewer.