summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2009-09-14 22:17:45 +0200
committerMichael Adam <obnox@samba.org>2009-09-14 22:17:45 +0200
commitc8e1696a223b82f1ba2cf254c73537ca4a5bdb4b (patch)
treeb4ea2cc1ea2df0ca835b1c0c7b72e526dffabcea
parentb6413068e2bb650dc073700f90305889e54c7120 (diff)
conffile: reformat the directives array for readability.
Michael
-rw-r--r--src/conffile.c108
1 files changed, 56 insertions, 52 deletions
diff --git a/src/conffile.c b/src/conffile.c
index 8e731b4..1fb86f0 100644
--- a/src/conffile.c
+++ b/src/conffile.c
@@ -164,66 +164,70 @@ struct {
} directives[] = {
/* comments */
{
- BEGIN "#", handle_nop, NULL},
- /* blank lines */
+ BEGIN "#", handle_nop, NULL
+ },
+ /* blank lines */
{
- "^[[:space:]]+$", handle_nop, NULL},
- /* string arguments */
- STDCONF ("logfile", STR, handle_logfile),
- STDCONF ("pidfile", STR, handle_pidfile),
- STDCONF ("anonymous", STR, handle_anonymous),
- STDCONF ("viaproxyname", STR, handle_viaproxyname),
- STDCONF ("defaulterrorfile", STR, handle_defaulterrorfile),
- STDCONF ("statfile", STR, handle_statfile),
- STDCONF ("stathost", STR, handle_stathost),
- STDCONF ("xtinyproxy", STR, handle_xtinyproxy),
- /* boolean arguments */
- STDCONF ("syslog", BOOL, handle_syslog),
- STDCONF ("bindsame", BOOL, handle_bindsame),
- /* integer arguments */
- STDCONF ("port", INT, handle_port),
- STDCONF ("maxclients", INT, handle_maxclients),
- STDCONF ("maxspareservers", INT, handle_maxspareservers),
- STDCONF ("minspareservers", INT, handle_minspareservers),
- STDCONF ("startservers", INT, handle_startservers),
- STDCONF ("maxrequestsperchild", INT, handle_maxrequestsperchild),
- STDCONF ("timeout", INT, handle_timeout),
- STDCONF ("connectport", INT, handle_connectport),
- /* alphanumeric arguments */
- STDCONF ("user", ALNUM, handle_user),
- STDCONF ("group", ALNUM, handle_group),
- /* ip arguments */
- STDCONF ("listen", IP, handle_listen),
- STDCONF ("allow", "(" IPMASK "|" ALNUM ")", handle_allow),
- STDCONF ("deny", "(" IPMASK "|" ALNUM ")", handle_deny),
- STDCONF ("bind", IP, handle_bind),
- /* error files */
- STDCONF ("errorfile", INT WS STR, handle_errorfile),
+ "^[[:space:]]+$", handle_nop, NULL
+ },
+ /* string arguments */
+ STDCONF ("logfile", STR, handle_logfile),
+ STDCONF ("pidfile", STR, handle_pidfile),
+ STDCONF ("anonymous", STR, handle_anonymous),
+ STDCONF ("viaproxyname", STR, handle_viaproxyname),
+ STDCONF ("defaulterrorfile", STR, handle_defaulterrorfile),
+ STDCONF ("statfile", STR, handle_statfile),
+ STDCONF ("stathost", STR, handle_stathost),
+ STDCONF ("xtinyproxy", STR, handle_xtinyproxy),
+ /* boolean arguments */
+ STDCONF ("syslog", BOOL, handle_syslog),
+ STDCONF ("bindsame", BOOL, handle_bindsame),
+ /* integer arguments */
+ STDCONF ("port", INT, handle_port),
+ STDCONF ("maxclients", INT, handle_maxclients),
+ STDCONF ("maxspareservers", INT, handle_maxspareservers),
+ STDCONF ("minspareservers", INT, handle_minspareservers),
+ STDCONF ("startservers", INT, handle_startservers),
+ STDCONF ("maxrequestsperchild", INT, handle_maxrequestsperchild),
+ STDCONF ("timeout", INT, handle_timeout),
+ STDCONF ("connectport", INT, handle_connectport),
+ /* alphanumeric arguments */
+ STDCONF ("user", ALNUM, handle_user),
+ STDCONF ("group", ALNUM, handle_group),
+ /* ip arguments */
+ STDCONF ("listen", IP, handle_listen),
+ STDCONF ("allow", "(" IPMASK "|" ALNUM ")", handle_allow),
+ STDCONF ("deny", "(" IPMASK "|" ALNUM ")", handle_deny),
+ STDCONF ("bind", IP, handle_bind),
+ /* error files */
+ STDCONF ("errorfile", INT WS STR, handle_errorfile),
#ifdef FILTER_ENABLE
- /* filtering */
- STDCONF ("filter", STR, handle_filter),
- STDCONF ("filterurls", BOOL, handle_filterurls),
- STDCONF ("filterextended", BOOL, handle_filterextended),
- STDCONF ("filterdefaultdeny", BOOL, handle_filterdefaultdeny),
- STDCONF ("filtercasesensitive", BOOL, handle_filtercasesensitive),
+ /* filtering */
+ STDCONF ("filter", STR, handle_filter),
+ STDCONF ("filterurls", BOOL, handle_filterurls),
+ STDCONF ("filterextended", BOOL, handle_filterextended),
+ STDCONF ("filterdefaultdeny", BOOL, handle_filterdefaultdeny),
+ STDCONF ("filtercasesensitive", BOOL, handle_filtercasesensitive),
#endif
#ifdef REVERSE_SUPPORT
- /* Reverse proxy arguments */
- STDCONF ("reversebaseurl", STR, handle_reversebaseurl),
- STDCONF ("reverseonly", BOOL, handle_reverseonly),
- STDCONF ("reversemagic", BOOL, handle_reversemagic),
- STDCONF ("reversepath", STR WS "(" STR ")?", handle_reversepath),
+ /* Reverse proxy arguments */
+ STDCONF ("reversebaseurl", STR, handle_reversebaseurl),
+ STDCONF ("reverseonly", BOOL, handle_reverseonly),
+ STDCONF ("reversemagic", BOOL, handle_reversemagic),
+ STDCONF ("reversepath", STR WS "(" STR ")?", handle_reversepath),
#endif
#ifdef UPSTREAM_SUPPORT
- /* upstream is rather complicated */
+ /* upstream is rather complicated */
{
- BEGIN "(no" WS "upstream)" WS STR END, handle_upstream_no, NULL}, {
- BEGIN "(upstream)" WS "(" IP "|" ALNUM ")" ":" INT "(" WS STR
- ")?" END, handle_upstream, NULL},
+ BEGIN "(no" WS "upstream)" WS STR END, handle_upstream_no, NULL
+ },
+ {
+ BEGIN "(upstream)" WS "(" IP "|" ALNUM ")" ":" INT "(" WS STR
+ ")?" END, handle_upstream, NULL},
#endif
- /* loglevel */
- STDCONF ("loglevel", "(critical|error|warning|notice|connect|info)",
- handle_loglevel)
+ /* loglevel */
+ STDCONF ("loglevel", "(critical|error|warning|notice|connect|info)",
+ handle_loglevel)
};
const unsigned int ndirectives = sizeof (directives) / sizeof (directives[0]);