--------------------- PatchSet 1648 Date: 2001/02/24 23:16:17 Author: rbcollins Branch: generic_modules Tag: (none) Log: mod_register internal all implemented && the squid internal document now produces identical output to the squid.conf, with the exception of #defined options Members: src/cf.data.pre:1.21.4.7->1.21.4.8 src/cf_gen.c:1.7.8.8->1.7.8.9 Index: squid/src/cf.data.pre =================================================================== RCS file: /cvsroot/squid-sf//squid/src/cf.data.pre,v retrieving revision 1.21.4.7 retrieving revision 1.21.4.8 diff -u -r1.21.4.7 -r1.21.4.8 --- squid/src/cf.data.pre 24 Feb 2001 03:04:01 -0000 1.21.4.7 +++ squid/src/cf.data.pre 24 Feb 2001 23:16:17 -0000 1.21.4.8 @@ -1,6 +1,6 @@ # -# $Id: cf.data.pre,v 1.21.4.7 2001/02/24 03:04:01 rbcollins Exp $ +# $Id: cf.data.pre,v 1.21.4.8 2001/02/24 23:16:17 rbcollins Exp $ # # # SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -82,21 +82,24 @@ External modules are not implemented yet. NOCOMMENT_START # Uncomment the following modules to match your compiled internal modules. -# The ones currently uncommented are for the default squid configure & build. + +# the following line registers all compiled in modules. To turn some off, +# comment the next line out, and then uncomment the lower lines as appropriate. +mod_register internal all # replacement policy modules -mod_register internal lru +#mod_register internal lru #mod_register internal heap # object store modules -mod_register internal ufs +#mod_register internal ufs #mod_register internal aufs #mod_register internal diskd #mod_register internal null #mod_register internal coss # authentication scheme modules -mod_register internal basic +#mod_register internal basic #mod_register internal ntlm #mod_register internal digest Index: squid/src/cf_gen.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/cf_gen.c,v retrieving revision 1.7.8.8 retrieving revision 1.7.8.9 diff -u -r1.7.8.8 -r1.7.8.9 --- squid/src/cf_gen.c 24 Feb 2001 03:04:01 -0000 1.7.8.8 +++ squid/src/cf_gen.c 24 Feb 2001 23:16:17 -0000 1.7.8.9 @@ -1,6 +1,6 @@ /* - * $Id: cf_gen.c,v 1.7.8.8 2001/02/24 03:04:01 rbcollins Exp $ + * $Id: cf_gen.c,v 1.7.8.9 2001/02/24 23:16:17 rbcollins Exp $ * * DEBUG: none Generate squid.conf and cf_parser.c * AUTHOR: Max Okumoto @@ -552,12 +552,16 @@ return rc; } + + + static void gen_document(Entry * head, FILE * fp) { Entry *entry; Line *line; Line *def = NULL; + Line *comm = NULL; char buf[8192]; for (entry = head; entry != NULL; entry = entry->next) { int blank = 1; @@ -566,17 +570,38 @@ if (entry->ifdef) fprintf(fp, "#if %s\n", entry->ifdef); if (!strcmp(entry->name, "comment")) + { + lineAdd(&comm, ""); + for (line = entry->doc; line != NULL; line = line->next) { + sprintf(buf, "#%s", line->data); + lineAdd(&comm, buf); + } + lineAdd(&comm,""); continue; + } fprintf(fp, "static void\n" "name_document_%s(void)" "{\n" - "\tprintf(\"# TAG: %s\"\n", - entry->name, + "\tprintf(\n", + entry->name); + + if (comm) { + while (comm != NULL) { + line = comm; + comm = line->next; + fprintf(fp, "\"%s\\n\"\n", printf_quote(line->data)); + xfree(line->data); + xfree(line); + } + blank = 1; + } + fprintf(fp, "\"# TAG: %s\"\n", entry->name); - if (entry->comment) - fprintf(fp, "\t\"%s\"\n", printf_quote(entry->comment)); - fprintf(fp, "\"\\n\"\n"); + if (entry->comment) + fprintf(fp, "\"\t%s\"\n", printf_quote(entry->comment)); + fprintf(fp, "\"\\n\"\n"); + for (line = entry->doc; line != NULL; line = line->next) { fprintf(fp, "\"#%s\\n\"\n", printf_quote(line->data)); }