Lines Matching defs:rcfile

32  * $Id: rcfile.c,v 1.5 2001/04/16 12:46:46 bp Exp $
52 SLIST_HEAD(rcfile_head, rcfile);
55 static struct rcfile* rc_cachelookup(const char *filename);
56 static struct rcsection *rc_findsect(struct rcfile *rcp, const char *sectname);
57 static struct rcsection *rc_addsect(struct rcfile *rcp, const char *sectname);
58 static int rc_freesect(struct rcfile *rcp, struct rcsection *rsp);
62 static void rc_parse(struct rcfile *rcp);
66 * open rcfile and load its content, if already open - return previous handle
69 rc_open(const char *filename, const char *mode, struct rcfile **rcfile)
71 struct rcfile *rcp;
76 *rcfile = rcp;
82 rcp = malloc(sizeof(struct rcfile));
87 bzero(rcp, sizeof(struct rcfile));
92 *rcfile = rcp;
97 rc_merge(const char *filename, struct rcfile **rcfile)
99 struct rcfile *rcp = *rcfile;
103 return rc_open(filename, "r", rcfile);
117 rc_close(struct rcfile *rcp)
128 SLIST_REMOVE(&pf_head, rcp, rcfile, rf_next);
133 static struct rcfile*
136 struct rcfile *p;
145 rc_findsect(struct rcfile *rcp, const char *sectname)
156 rc_addsect(struct rcfile *rcp, const char *sectname)
171 rc_freesect(struct rcfile *rcp, struct rcsection *rsp)
237 rc_parse(struct rcfile *rcp)
325 rc_getstringptr(struct rcfile *rcp, const char *section, const char *key,
341 rc_getstring(struct rcfile *rcp, const char *section, const char *key,
359 rc_getint(struct rcfile *rcp, const char *section, const char *key, int *value)
384 rc_getbool(struct rcfile *rcp, const char *section, const char *key, int *value)
412 opt_args_parse(struct rcfile *rcp, struct opt_args *ap, const char *sect,