ben 96/09/23 02:53:34
Modified: src http_main.c
Log:
Add more interesting stuff to the -h option.
Revision Changes Path
1.69 +33 -2 apache/src/http_main.c
Index: http_main.c
===================================================================
RCS file: /export/home/cvs/apache/src/http_main.c,v
retrieving revision 1.68
retrieving revision 1.69
diff -C3 -r1.68 -r1.69
*** http_main.c 1996/09/17 14:53:52 1.68
--- http_main.c 1996/09/23 09:53:32 1.69
***************
*** 50,56 ****
*
*/
! /* $Id: http_main.c,v 1.68 1996/09/17 14:53:52 chuck Exp $ */
/*
* httpd.c: simple http daemon for answering WWW file requests
--- 50,56 ----
*
*/
! /* $Id: http_main.c,v 1.69 1996/09/23 09:53:32 ben Exp $ */
/*
* httpd.c: simple http daemon for answering WWW file requests
***************
*** 1839,1844 ****
--- 1839,1871 ----
} /* standalone_main */
+ void show_overrides(command_rec *pc,module *pm)
+ {
+ int n;
+ struct
+ {
+ int override;
+ char letter;
+ } aOvers[]= {
+ { OR_LIMIT, 'L' },
+ { OR_OPTIONS, 'O' },
+ { OR_FILEINFO, 'F' },
+ { OR_AUTHCFG, 'A' },
+ { OR_INDEXES, 'I' },
+ { ACCESS_CONF, 'a' },
+ { RSRC_CONF, 'r' },
+ { (OR_ALL|RSRC_CONF)&~(OR_LIMIT|OR_AUTHCFG), 'd' }, /* outside
<Directory> */
+ { OR_ALL|ACCESS_CONF, 'D' }, /* inside <Directory> */
+ { 0, '\0' }
+ };
+
+ for(n=0 ; aOvers[n].override ; ++n)
+ if(pc->req_override&aOvers[n].override)
+ putchar(aOvers[n].letter);
+ if((pc->req_override&(OR_ALL|ACCESS_CONF)) && !pm->create_dir_config)
+ putchar('!'); /* Directive allowed inside <Directory> but module
doesn't support per-dir config */
+ }
+
void show_directives()
{
extern module *prelinked_modules[];
***************
*** 1851,1857 ****
;
for(n=0 ; prelinked_modules[n] ; ++n)
for(pc=prelinked_modules[n]->cmds ; pc && pc->name ; ++pc)
! printf("%s\t%s\t%s\n",pc->name,pc->errmsg,module_names[t-n-1]);
}
extern char *optarg;
--- 1878,1888 ----
;
for(n=0 ; prelinked_modules[n] ; ++n)
for(pc=prelinked_modules[n]->cmds ; pc && pc->name ; ++pc)
! {
! printf("%s\t%s\t%s\t",pc->name,pc->errmsg,module_names[t-n-1]);
! show_overrides(pc,prelinked_modules[n]);
! putchar('\n');
! }
}
extern char *optarg;