- curr = new_section(list, function, "description");
- } else if (is_section(lines[i], false)) {
- char *type = talloc_strndup(curr, lines[i],
- strcspn(lines[i], ":"));
- curr = new_section(list, function, type);
- } else if (is_section(lines[i], true)) {
- unsigned int sectlen = strcspn(lines[i], ":");
- char *type = talloc_strndup(curr, lines[i], sectlen);
- curr = new_section(list, function, type);
- add_line(curr, lines[i] + sectlen + 1
- + strspn(lines[i] + sectlen + 1, " \t"));
+ curr = new_section(list, function, "description",
+ linemap[i]);
+ } else if ((type = is_section(list, lines[i], &extra)) != NULL){
+ curr = new_section(list, function, type, linemap[i]);
+ if (!streq(extra, "")) {
+ add_line(curr, extra);
+ curr = NULL;
+ }