conffile: reformat the directives array for readability.
Michael
This commit is contained in:
parent
b6413068e2
commit
c8e1696a22
108
src/conffile.c
108
src/conffile.c
@ -164,66 +164,70 @@ struct {
|
|||||||
} directives[] = {
|
} directives[] = {
|
||||||
/* comments */
|
/* comments */
|
||||||
{
|
{
|
||||||
BEGIN "#", handle_nop, NULL},
|
BEGIN "#", handle_nop, NULL
|
||||||
/* blank lines */
|
},
|
||||||
|
/* blank lines */
|
||||||
{
|
{
|
||||||
"^[[:space:]]+$", handle_nop, NULL},
|
"^[[:space:]]+$", handle_nop, NULL
|
||||||
/* string arguments */
|
},
|
||||||
STDCONF ("logfile", STR, handle_logfile),
|
/* string arguments */
|
||||||
STDCONF ("pidfile", STR, handle_pidfile),
|
STDCONF ("logfile", STR, handle_logfile),
|
||||||
STDCONF ("anonymous", STR, handle_anonymous),
|
STDCONF ("pidfile", STR, handle_pidfile),
|
||||||
STDCONF ("viaproxyname", STR, handle_viaproxyname),
|
STDCONF ("anonymous", STR, handle_anonymous),
|
||||||
STDCONF ("defaulterrorfile", STR, handle_defaulterrorfile),
|
STDCONF ("viaproxyname", STR, handle_viaproxyname),
|
||||||
STDCONF ("statfile", STR, handle_statfile),
|
STDCONF ("defaulterrorfile", STR, handle_defaulterrorfile),
|
||||||
STDCONF ("stathost", STR, handle_stathost),
|
STDCONF ("statfile", STR, handle_statfile),
|
||||||
STDCONF ("xtinyproxy", STR, handle_xtinyproxy),
|
STDCONF ("stathost", STR, handle_stathost),
|
||||||
/* boolean arguments */
|
STDCONF ("xtinyproxy", STR, handle_xtinyproxy),
|
||||||
STDCONF ("syslog", BOOL, handle_syslog),
|
/* boolean arguments */
|
||||||
STDCONF ("bindsame", BOOL, handle_bindsame),
|
STDCONF ("syslog", BOOL, handle_syslog),
|
||||||
/* integer arguments */
|
STDCONF ("bindsame", BOOL, handle_bindsame),
|
||||||
STDCONF ("port", INT, handle_port),
|
/* integer arguments */
|
||||||
STDCONF ("maxclients", INT, handle_maxclients),
|
STDCONF ("port", INT, handle_port),
|
||||||
STDCONF ("maxspareservers", INT, handle_maxspareservers),
|
STDCONF ("maxclients", INT, handle_maxclients),
|
||||||
STDCONF ("minspareservers", INT, handle_minspareservers),
|
STDCONF ("maxspareservers", INT, handle_maxspareservers),
|
||||||
STDCONF ("startservers", INT, handle_startservers),
|
STDCONF ("minspareservers", INT, handle_minspareservers),
|
||||||
STDCONF ("maxrequestsperchild", INT, handle_maxrequestsperchild),
|
STDCONF ("startservers", INT, handle_startservers),
|
||||||
STDCONF ("timeout", INT, handle_timeout),
|
STDCONF ("maxrequestsperchild", INT, handle_maxrequestsperchild),
|
||||||
STDCONF ("connectport", INT, handle_connectport),
|
STDCONF ("timeout", INT, handle_timeout),
|
||||||
/* alphanumeric arguments */
|
STDCONF ("connectport", INT, handle_connectport),
|
||||||
STDCONF ("user", ALNUM, handle_user),
|
/* alphanumeric arguments */
|
||||||
STDCONF ("group", ALNUM, handle_group),
|
STDCONF ("user", ALNUM, handle_user),
|
||||||
/* ip arguments */
|
STDCONF ("group", ALNUM, handle_group),
|
||||||
STDCONF ("listen", IP, handle_listen),
|
/* ip arguments */
|
||||||
STDCONF ("allow", "(" IPMASK "|" ALNUM ")", handle_allow),
|
STDCONF ("listen", IP, handle_listen),
|
||||||
STDCONF ("deny", "(" IPMASK "|" ALNUM ")", handle_deny),
|
STDCONF ("allow", "(" IPMASK "|" ALNUM ")", handle_allow),
|
||||||
STDCONF ("bind", IP, handle_bind),
|
STDCONF ("deny", "(" IPMASK "|" ALNUM ")", handle_deny),
|
||||||
/* error files */
|
STDCONF ("bind", IP, handle_bind),
|
||||||
STDCONF ("errorfile", INT WS STR, handle_errorfile),
|
/* error files */
|
||||||
|
STDCONF ("errorfile", INT WS STR, handle_errorfile),
|
||||||
#ifdef FILTER_ENABLE
|
#ifdef FILTER_ENABLE
|
||||||
/* filtering */
|
/* filtering */
|
||||||
STDCONF ("filter", STR, handle_filter),
|
STDCONF ("filter", STR, handle_filter),
|
||||||
STDCONF ("filterurls", BOOL, handle_filterurls),
|
STDCONF ("filterurls", BOOL, handle_filterurls),
|
||||||
STDCONF ("filterextended", BOOL, handle_filterextended),
|
STDCONF ("filterextended", BOOL, handle_filterextended),
|
||||||
STDCONF ("filterdefaultdeny", BOOL, handle_filterdefaultdeny),
|
STDCONF ("filterdefaultdeny", BOOL, handle_filterdefaultdeny),
|
||||||
STDCONF ("filtercasesensitive", BOOL, handle_filtercasesensitive),
|
STDCONF ("filtercasesensitive", BOOL, handle_filtercasesensitive),
|
||||||
#endif
|
#endif
|
||||||
#ifdef REVERSE_SUPPORT
|
#ifdef REVERSE_SUPPORT
|
||||||
/* Reverse proxy arguments */
|
/* Reverse proxy arguments */
|
||||||
STDCONF ("reversebaseurl", STR, handle_reversebaseurl),
|
STDCONF ("reversebaseurl", STR, handle_reversebaseurl),
|
||||||
STDCONF ("reverseonly", BOOL, handle_reverseonly),
|
STDCONF ("reverseonly", BOOL, handle_reverseonly),
|
||||||
STDCONF ("reversemagic", BOOL, handle_reversemagic),
|
STDCONF ("reversemagic", BOOL, handle_reversemagic),
|
||||||
STDCONF ("reversepath", STR WS "(" STR ")?", handle_reversepath),
|
STDCONF ("reversepath", STR WS "(" STR ")?", handle_reversepath),
|
||||||
#endif
|
#endif
|
||||||
#ifdef UPSTREAM_SUPPORT
|
#ifdef UPSTREAM_SUPPORT
|
||||||
/* upstream is rather complicated */
|
/* upstream is rather complicated */
|
||||||
{
|
{
|
||||||
BEGIN "(no" WS "upstream)" WS STR END, handle_upstream_no, NULL}, {
|
BEGIN "(no" WS "upstream)" WS STR END, handle_upstream_no, NULL
|
||||||
BEGIN "(upstream)" WS "(" IP "|" ALNUM ")" ":" INT "(" WS STR
|
},
|
||||||
")?" END, handle_upstream, NULL},
|
{
|
||||||
|
BEGIN "(upstream)" WS "(" IP "|" ALNUM ")" ":" INT "(" WS STR
|
||||||
|
")?" END, handle_upstream, NULL},
|
||||||
#endif
|
#endif
|
||||||
/* loglevel */
|
/* loglevel */
|
||||||
STDCONF ("loglevel", "(critical|error|warning|notice|connect|info)",
|
STDCONF ("loglevel", "(critical|error|warning|notice|connect|info)",
|
||||||
handle_loglevel)
|
handle_loglevel)
|
||||||
};
|
};
|
||||||
|
|
||||||
const unsigned int ndirectives = sizeof (directives) / sizeof (directives[0]);
|
const unsigned int ndirectives = sizeof (directives) / sizeof (directives[0]);
|
||||||
|
Loading…
Reference in New Issue
Block a user