rcfile
FILE *rcfile = NULL;
if ((rcfile = fopen(rcname, "r")) == NULL)
if (GetString(&line, &linesize, rcfile) == NULL) {
if (!feof(rcfile)) {
if (rcfile != NULL)
(void) fclose(rcfile);
struct rcfile;
extern struct rcfile *smb_rc;
int opt_args_parse(struct rcfile *, struct opt_args *, const char *,
int rc_getstringptr(struct rcfile *, const char *, const char *, char **);
int rc_getstring(struct rcfile *, const char *, const char *, size_t, char *);
int rc_getint(struct rcfile *, const char *, const char *, int *);
int rc_getbool(struct rcfile *, const char *, const char *, int *);
struct rcfile;
int nb_ctx_readrcsection(struct rcfile *, struct nb_ctx *, const char *, int);
nb_ctx_readrcsection(struct rcfile *rcfile, struct nb_ctx *ctx,
if (rcfile == NULL)
rcfile = smb_rc;
rc_getint(rcfile, sname, "nbtimeout", &ctx->nb_timo);
rc_getstringptr(rcfile, sname, "nbscope", &p);
rc_getstringptr(rcfile, sname, "wins1", &wins1);
rc_getstringptr(rcfile, sname, "nbns", &wins1);
rc_getstringptr(rcfile, sname, "wins2", &wins2);
rc_getbool(rcfile, sname, "nbns_enable", &nbns_enable);
rc_getbool(rcfile, sname, "nbns_broadcast", &nbns_broadcast);
rcp = malloc(sizeof (struct rcfile));
bzero(rcp, sizeof (struct rcfile));
*rcfile = rcp;
rc_merge(const char *filename, struct rcfile **rcfile)
struct rcfile *rcp = *rcfile;
return (rc_open(filename, "r", rcfile));
rc_open_sharectl(struct rcfile **rcfile)
struct rcfile *rcp = NULL;
rcp = malloc(sizeof (struct rcfile));
bzero(rcp, sizeof (struct rcfile));
*rcfile = rcp;
rc_close(struct rcfile *rcp)
SLIST_REMOVE(&pf_head, rcp, rcfile, rf_next);
static struct rcfile *
struct rcfile *p;
rc_findsect(struct rcfile *rcp, const char *sectname)
rc_addsect(struct rcfile *rcp, const char *sectname)
rc_freesect(struct rcfile *rcp, struct rcsection *rsp)
set_value(struct rcfile *rcp, struct rcsection *rsp, struct rckey *rkp,
rc_parse(struct rcfile *rcp)
rc_getstringptr(struct rcfile *rcp, const char *section, const char *key,
rc_getstring(struct rcfile *rcp, const char *section, const char *key,
rc_getint(struct rcfile *rcp, const char *section, const char *key, int *value)
rc_getbool(struct rcfile *rcp, const char *section, const char *key, int *value)
static struct rcfile *rc_cachelookup(const char *filename);
static struct rcsection *rc_findsect(struct rcfile *rcp, const char *sectname);
static struct rcsection *rc_addsect(struct rcfile *rcp, const char *sectname);
static int rc_freesect(struct rcfile *rcp, struct rcsection *rsp);
static void rc_parse(struct rcfile *rcp);
struct rcfile *rcp;
SLIST_HEAD(rcfile_head, rcfile);
struct rcfile *smb_rc;
rc_open(const char *filename, const char *mode, struct rcfile **rcfile)
struct rcfile *rcp;
*rcfile = rcp;
SLIST_ENTRY(rcfile) rf_next;