/[man-db]/man-db/src/manp.c
ViewVC logotype

Diff of /man-db/src/manp.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.25 by cjwatson, Sat Feb 22 17:55:47 2003 UTC revision 1.26 by cjwatson, Thu May 1 15:54:03 2003 UTC
# Line 144  static void add_to_list (const char *key Line 144  static void add_to_list (const char *key
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    
# Line 166  static struct list *iterate_over_list (s Line 166  static struct list *iterate_over_list (s
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                    
# Line 197  static void add_sections (char *sections Line 197  static void add_sections (char *sections
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)
# Line 354  static __inline__ void gripe_not_directo Line 354  static __inline__ void gripe_not_directo
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);

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.26

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26