Add a new section to the sections array w/the default values. */
| 318 | |
| 319 | /* Add a new section to the sections array w/the default values. */ |
| 320 | static int add_a_section(char *name) |
| 321 | { |
| 322 | int i; |
| 323 | local_vars *s; |
| 324 | |
| 325 | /* it might already exist */ |
| 326 | if (name) { |
| 327 | i = getsectionbyname(name); |
| 328 | if (i >= 0) |
| 329 | return i; |
| 330 | } |
| 331 | |
| 332 | i = section_list.count; |
| 333 | s = EXPAND_ITEM_LIST(§ion_list, local_vars, 2); |
| 334 | |
| 335 | init_section(s); |
| 336 | if (name) |
| 337 | string_set(&s->name, name); |
| 338 | |
| 339 | return i; |
| 340 | } |
| 341 | |
| 342 | /* Map a parameter's string representation to something we can use. |
| 343 | * Returns False if the parameter string is not recognised, else TRUE. */ |
no test coverage detected