/*
- * $Id: cache_cf.cc,v 1.202 1997/07/14 05:57:51 wessels Exp $
+ * $Id: cache_cf.cc,v 1.203 1997/07/14 19:56:14 wessels Exp $
*
* DEBUG: section 3 Configuration File Parsing
* AUTHOR: Harvest Derived
static void parse_string _PARAMS((char **));
static void parse_wordlist _PARAMS((wordlist **));
-static void dump_all _PARAMS((void));
static void default_all _PARAMS((void));
static int parse_line _PARAMS((char *));
static cache_peer *configFindPeer _PARAMS((const char *name));
if (config_input_line[0] == '\0')
continue;
debug(3, 5) ("Processing: '%s'\n", config_input_line);
- strcpy(tmp_line, config_input_line);
+ xstrncpy(tmp_line, config_input_line, BUFSIZ);
if (!parse_line(tmp_line)) {
debug(3, 0) ("parseConfigFile: line %d unrecognized: '%s'\n",
config_lineno,
}
fclose(fp);
configDoConfigure();
- dump_all();
return 0;
}
static void
dump_acl(acl *acl)
{
- debug(0,0)("XXX need to fix\n");
+ assert(0);
}
static void
static void
dump_acl_access(struct _acl_access *head)
{
- debug(0,0)("XXX need to fix\n");
+ assert(0);
}
static void
static void
dump_cachedir(struct _cacheSwap swap)
{
- debug(0,0)("XXX need to fix\n");
+ assert(0);
}
static void
static void
dump_cache_peer(cache_peer *p)
{
- debug(0,0)("XXX need to fix\n");
+ assert(0);
}
static void
static void
dump_cachemgrpasswd(cachemgr_passwd *list)
{
- debug(0,0)("XXX need to fix\n");
+ assert(0);
}
static void
static void
dump_denyinfo(struct _acl_deny_info_list *var)
{
- debug(0,0)("XXX need to fix\n");
+ assert(0);
}
static void
static void
dump_refreshpattern(refresh_t *head)
{
- debug(0,0)("XXX need to fix\n");
+ assert(0);
}
static void
static void
dump_regexlist(relist * var)
{
- debug(0,0)("XXX need to fix\n");
+ assert(0);
}
static void
/*
- * $Id: cf_gen.cc,v 1.5 1997/07/14 04:27:38 wessels Exp $
+ * $Id: cf_gen.cc,v 1.6 1997/07/14 19:56:15 wessels Exp $
*
* DEBUG: section 1 Startup and Main Loop
* AUTHOR: Max Okumoto
{
Entry *entry;
int rc = 0;
+ fprintf(fp,
+ "void\n"
+ "default_line(const char *s)\n"
+ "{\n"
+ "\tLOCAL_ARRAY(char, tmp_line, BUFSIZ);\n"
+ "\txstrncpy(tmp_line, s, BUFSIZ);\n"
+ "\txstrncpy(config_input_line, s, BUFSIZ);\n"
+ "\tconfig_lineno++;\n"
+ "\tparse_line(tmp_line);\n"
+ "}\n"
+ );
+
fprintf(fp,
"void\n"
"default_all(void)\n"
"{\n"
"\tcfg_filename = \"Default Configuration\";\n"
+ "\tconfig_lineno = 0;\n"
);
for (entry = head; entry != NULL; entry = entry->next) {
assert(entry->name);
if (strcmp(entry->default_value, "none") == 0) {
fprintf(fp, "\t/* No default for %s */\n", entry->name);
} else {
- fprintf(fp, "\tparse_line(\"%s %s\");\n",
+ fprintf(fp, "\tdefault_line(\"%s %s\");\n",
entry->name,
entry->default_value);
}