144 |
namestore = list; |
namestore = list; |
145 |
} |
} |
146 |
|
|
147 |
static char *get_from_list (char *key, int flag) |
static const char *get_from_list (const char *key, int flag) |
148 |
{ |
{ |
149 |
struct list *list; |
struct list *list; |
150 |
|
|
166 |
return NULL; |
return NULL; |
167 |
} |
} |
168 |
|
|
169 |
char *get_def (char *thing, char *def) |
const char *get_def (const char *thing, const char *def) |
170 |
{ |
{ |
171 |
char *config_def = get_from_list (thing, DEFINE); |
const char *config_def = get_from_list (thing, DEFINE); |
172 |
return config_def ? config_def : def; |
return config_def ? config_def : def; |
173 |
} |
} |
174 |
|
|
197 |
} |
} |
198 |
} |
} |
199 |
|
|
200 |
char **get_sections (void) |
const char **get_sections (void) |
201 |
{ |
{ |
202 |
struct list *list; |
struct list *list; |
203 |
int length = 0; |
int length = 0; |
204 |
char **sections, **sectionp; |
const char **sections, **sectionp; |
205 |
|
|
206 |
for (list = namestore; list; list = list->next) |
for (list = namestore; list; list = list->next) |
207 |
if (list->flag == SECTION) |
if (list->flag == SECTION) |
354 |
catpath list */ |
catpath list */ |
355 |
char *cat_manpath (char *manp) |
char *cat_manpath (char *manp) |
356 |
{ |
{ |
357 |
char *catp = NULL, *path, *catdir; |
char *catp = NULL; |
358 |
|
const char *path, *catdir; |
359 |
|
|
360 |
for (path = strsep (&manp, ":"); path; path = strsep (&manp, ":")) { |
for (path = strsep (&manp, ":"); path; path = strsep (&manp, ":")) { |
361 |
catdir = get_from_list (path, MANDB_MAP_USER); |
catdir = get_from_list (path, MANDB_MAP_USER); |