Lines Matching defs:rcfile
32 * $Id: rcfile.c,v 1.1.1.2 2001/07/06 22:38:43 conrad Exp $
64 static struct rcfile *rc_cachelookup(const char *filename);
65 static struct rcsection *rc_findsect(struct rcfile *rcp, const char *sectname);
66 static struct rcsection *rc_addsect(struct rcfile *rcp, const char *sectname);
67 static int rc_freesect(struct rcfile *rcp, struct rcsection *rsp);
72 static void rc_parse(struct rcfile *rcp);
77 SLIST_HEAD(rcfile_head, rcfile);
79 struct rcfile *smb_rc;
84 * open rcfile and load its content, if already open - return previous handle
87 rc_open(const char *filename, const char *mode, struct rcfile **rcfile)
90 struct rcfile *rcp;
97 *rcfile = rcp;
107 rcp = malloc(sizeof (struct rcfile));
112 bzero(rcp, sizeof (struct rcfile));
117 *rcfile = rcp;
122 rc_merge(const char *filename, struct rcfile **rcfile)
125 struct rcfile *rcp = *rcfile;
132 return (rc_open(filename, "r", rcfile));
154 rc_popen_cmd(const char *command, struct rcfile **rcfile)
156 struct rcfile *rcp;
166 rcp = malloc(sizeof (struct rcfile));
171 bzero(rcp, sizeof (struct rcfile));
176 *rcfile = rcp;
182 rc_close(struct rcfile *rcp)
195 SLIST_REMOVE(&pf_head, rcp, rcfile, rf_next);
202 static struct rcfile *
205 struct rcfile *p;
216 rc_findsect(struct rcfile *rcp, const char *sectname)
229 rc_addsect(struct rcfile *rcp, const char *sectname)
248 rc_freesect(struct rcfile *rcp, struct rcsection *rsp)
341 set_value(struct rcfile *rcp, struct rcsection *rsp, struct rckey *rkp,
382 rc_parse(struct rcfile *rcp)
496 rc_getstringptr(struct rcfile *rcp, const char *section, const char *key,
525 rc_getstring(struct rcfile *rcp, const char *section, const char *key,
545 rc_getint(struct rcfile *rcp, const char *section, const char *key, int *value)
581 rc_getbool(struct rcfile *rcp, const char *section, const char *key, int *value)
712 struct rcfile *rcp;