Lines Matching refs:rsp
58 static int rc_freesect(struct rcfile *rcp, struct rcsection *rsp);
59 static struct rckey *rc_sect_findkey(struct rcsection *rsp, const char *keyname);
60 static struct rckey *rc_sect_addkey(struct rcsection *rsp, const char *name, const char *value);
171 rc_freesect(struct rcfile *rcp, struct rcsection *rsp)
175 SLIST_REMOVE(&rcp->rf_sect, rsp, rcsection, rs_next);
176 for(p = SLIST_FIRST(&rsp->rs_keys);p;) {
181 free(rsp->rs_name);
182 free(rsp);
187 rc_sect_findkey(struct rcsection *rsp, const char *keyname)
191 SLIST_FOREACH(p, &rsp->rs_keys, rk_next)
198 rc_sect_addkey(struct rcsection *rsp, const char *name, const char *value)
202 p = rc_sect_findkey(rsp, name);
208 SLIST_INSERT_HEAD(&rsp->rs_keys, p, rk_next);
217 rc_sect_delkey(struct rcsection *rsp, struct rckey *p)
220 SLIST_REMOVE(&rsp->rs_keys, p, rckey, rk_next);
241 struct rcsection *rsp = NULL;
255 rsp = NULL;
275 rsp = rc_addsect(rcp, buf);
293 if (rsp == NULL) {
298 rkp = rc_sect_addkey(rsp, buf, NULL);
328 struct rcsection *rsp;
332 rsp = rc_findsect(rcp, section);
333 if (!rsp) return ENOENT;
334 rkp = rc_sect_findkey(rsp,key);
361 struct rcsection *rsp;
364 rsp = rc_findsect(rcp, section);
365 if (!rsp)
367 rkp = rc_sect_findkey(rsp, key);
386 struct rcsection *rsp;
390 rsp = rc_findsect(rcp, section);
391 if (!rsp) return ENOENT;
392 rkp = rc_sect_findkey(rsp,key);