-#
-# If you use the NAME arbtext AND the LOC arbtext, you can use teh
-# DOC_START function to insert text into the generated squid.conf file
-# for headings and the like - oskar
-#
-NAME: arbtext
-LOC: arbtext
-DOC_START
- WELCOME TO SQUID 1.2
- --------------------
+COMMENT_START
+ WELCOME TO SQUID 1.2
+ --------------------
- This is the default squid configuration file. You may wish
- to look at http://cache.is.co.za/squid/ for documentation,
- or the squid home page (http://squid.nlanr.net/) for the FAQ
+ This is the default squid configuration file. You may wish
+ to look at http://cache.is.co.za/squid/ for documentation,
+ or the squid home page (http://squid.nlanr.net/) for the FAQ
-DOC_END
+COMMENT_END
-NAME: arbtext
-LOC: arbtext
-DOC_START
+COMMENT_START
NETWORK OPTIONS
-----------------------------------------------------------------------------
-DOC_END
+COMMENT_END
NAME: http_port ascii_port
TYPE: ushortlist
udp_outgoing_address 0.0.0.0
DOC_END
-NAME: arbtext
-LOC: arbtext
-DOC_START
+COMMENT_START
OPTIONS WHICH AFFECT THE NEIGHBOR SELECTION ALGORITHM
-----------------------------------------------------------------------------
-DOC_END
+COMMENT_END
NAME: cache_peer
TYPE: peer
DOC_END
-NAME: arbtext
-LOC: arbtext
-DOC_START
+COMMENT_START
OPTIONS WHICH AFFECT THE CACHE SIZE
-----------------------------------------------------------------------------
-DOC_END
+COMMENT_END
NAME: cache_mem
COMMENT: (bytes)
ipcache_high 95
DOC_END
-NAME: arbtext
-LOC: arbtext
-DOC_START
+COMMENT_START
LOGFILE PATHNAMES AND CACHE DIRECTORIES
-----------------------------------------------------------------------------
-DOC_END
+COMMENT_END
NAME: cache_dir
TYPE: cachedir
DOC_END
-NAME: arbtext
-LOC: arbtext
-DOC_START
+COMMENT_START
OPTIONS FOR EXTERNAL SUPPORT PROGRAMS
-----------------------------------------------------------------------------
-DOC_END
+COMMENT_END
# TAG: ftpget_program
# Where to find the 'ftpget' program that retrieves FTP data (HTTP
redirect_children 5
DOC_END
-NAME: arbtext
-LOC: arbtext
-DOC_START
+COMMENT_START
OPTIONS FOR TUNING THE CACHE
-----------------------------------------------------------------------------
-DOC_END
+COMMENT_END
NAME: wais_relay_host
TYPE: string
negative_dns_ttl 5 minutes
DOC_END
-NAME: arbtext
-LOC: arbtext
-DOC_START
+COMMENT_START
TIMEOUTS
-----------------------------------------------------------------------------
-DOC_END
+COMMENT_END
NAME: connect_timeout
COMMENT: time-units
shutdown_lifetime 30 seconds
DOC_END
-NAME: arbtext
-LOC: arbtext
-DOC_START
+COMMENT_START
ACCESS CONTROLS
-----------------------------------------------------------------------------
-DOC_END
+COMMENT_END
NAME: acl
TYPE: acl
* There are no defaults.
DOC_END
-NAME: arbtext
-LOC: arbtext
-DOC_START
+COMMENT_START
ADMINISTRATIVE PARAMETERS
-----------------------------------------------------------------------------
-DOC_END
+COMMENT_END
NAME: cache_mgr
TYPE: string
visible_hostname www-cache.foo.org
DOC_END
-NAME: arbtext
-LOC: arbtext
-DOC_START
+COMMENT_START
OPTIONS FOR THE CACHE REGISTRATION SERVICE
-----------------------------------------------------------------------------
All current information is processed regularly and made
available on the Web at http://www.nlanr.net/Cache/Tracker/.
-DOC_END
+COMMENT_END
NAME: announce_period
TYPE: time_t
LOC: Config.Announce.file
DOC_NONE
-NAME: arbtext
-LOC: arbtext
-DOC_START
+COMMENT_START
HTTPD-ACCELERATOR OPTIONS
-----------------------------------------------------------------------------
-DOC_END
+COMMENT_END
NAME: httpd_accel_host
TYPE: string
httpd_accel_uses_host_header off
DOC_END
-NAME: arbtext
-LOC: arbtext
-DOC_START
+COMMENT_START
MISCELLANEOUS
-----------------------------------------------------------------------------
-DOC_END
+COMMENT_END
NAME: dns_testnames
TYPE: wordlist
/*
- * $Id: cf_gen.cc,v 1.13 1997/10/26 02:35:28 wessels Exp $
+ * $Id: cf_gen.cc,v 1.14 1997/11/04 23:21:12 wessels Exp $
*
* DEBUG: section 1 Startup and Main Loop
* AUTHOR: Max Okumoto
case sSTART:
if ((strlen(buff) == 0) || (!strncmp(buff, "#", 1))) {
/* ignore empty and comment lines */
-
} else if (!strncmp(buff, "NAME:", 5)) {
char *name;
-
if ((name = strtok(buff + 5, WS)) == NULL) {
printf("Error in input file\n");
exit(1);
curr = calloc(1, sizeof(Entry));
curr->name = strdup(name);
state = s1;
-
} else if (!strcmp(buff, "EOF")) {
state = sEXIT;
-
+ } else if (!strcmp(buff, "COMMENT_START")) {
+ curr = calloc(1, sizeof(Entry));
+ curr->name = strdup("comment");
+ curr->loc = strdup("none");
+ state = sDOC;
} else {
printf("Error on line %d\n", linenum);
exit(1);
break;
case sDOC:
- if (!strcmp(buff, "DOC_END")) {
+ if (!strcmp(buff, "DOC_END") || !strcmp(buff, "COMMENT_END")) {
Line *head = NULL;
Line *line = curr->doc;
-
/* reverse order of doc lines */
while (line != NULL) {
Line *tmp;
line = tmp;
}
curr->doc = head;
-
/* add to list of entries */
curr->next = entries;
entries = curr;
-
state = sSTART;
} else {
Line *line = calloc(1, sizeof(Line));
-
line->data = strdup(buff);
line->next = curr->doc;
curr->doc = line;
for (entry = head; entry != NULL; entry = entry->next) {
assert(entry->name);
- if (!strcmp(entry->name, "arbtext"))
+ if (!strcmp(entry->name, "comment"))
continue;
if (entry->loc == NULL) {
fprintf(stderr, "NO LOCATION FOR %s\n", entry->name);
);
for (entry = head; entry != NULL; entry = entry->next) {
+ if (strcmp(entry->name, "comment") == 0)
+ continue;
fprintf(fp,
"\t} else if (!strcmp(token, \"%s\")) {\n",
entry->name
"\t\tparse_%s();\n",
entry->type
);
- } else if (strcmp(entry->loc, "arbtext")) {
+ } else {
fprintf(fp,
"\t\tparse_%s(&%s);\n",
entry->type, entry->loc
assert(entry->loc);
if (strcmp(entry->loc, "none") == 0)
continue;
- if (strcmp(entry->name, "arbtext") == 0)
+ if (strcmp(entry->name, "comment") == 0)
continue;
fprintf(fp, "\tdump_%s(entry, \"%s\", %s);\n",
entry->type,
assert(entry->loc);
if (strcmp(entry->loc, "none") == 0)
continue;
- if (strcmp(entry->name, "arbtext") == 0)
+ if (strcmp(entry->name, "comment") == 0)
continue;
fprintf(fp, "\tfree_%s(&%s);\n", entry->type, entry->loc);
}
for (entry = head; entry != NULL; entry = entry->next) {
Line *line;
- if (strcmp(entry->name, "arbtext"))
+ if (strcmp(entry->name, "comment"))
fprintf(fp, "# TAG: %s", entry->name);
if (entry->comment)
fprintf(fp, "\t%s", entry->comment);