Fixed up whitespace formatting of the config file directives. Also
added blank lines to group related directives.
This commit is contained in:
		
							parent
							
								
									bed712ffa7
								
							
						
					
					
						commit
						ffec04c65e
					
				@ -1,4 +1,4 @@
 | 
				
			|||||||
/* $Id: conffile.c,v 1.6 2005-08-16 04:03:19 rjkaes Exp $
 | 
					/* $Id: conffile.c,v 1.7 2005-11-04 00:47:07 rjkaes Exp $
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Parses the configuration file and sets up the config_s structure for
 | 
					 * Parses the configuration file and sets up the config_s structure for
 | 
				
			||||||
 * use by the application.  This file replaces the old grammar.y and
 | 
					 * use by the application.  This file replaces the old grammar.y and
 | 
				
			||||||
@ -150,11 +150,11 @@ struct {
 | 
				
			|||||||
        regex_t *cre;
 | 
					        regex_t *cre;
 | 
				
			||||||
} directives[] = {
 | 
					} directives[] = {
 | 
				
			||||||
        /* comments */
 | 
					        /* comments */
 | 
				
			||||||
        {
 | 
					        { BEGIN "#", handle_nop},
 | 
				
			||||||
        BEGIN "#", handle_nop},
 | 
					
 | 
				
			||||||
        /* blank lines */
 | 
					        /* blank lines */
 | 
				
			||||||
        {
 | 
					        { "^[[:space:]]+$", handle_nop },
 | 
				
			||||||
        "^[[:space:]]+$", handle_nop},
 | 
					
 | 
				
			||||||
        /* string arguments */
 | 
					        /* string arguments */
 | 
				
			||||||
        STDCONF("logfile", STR, handle_logfile),
 | 
					        STDCONF("logfile", STR, handle_logfile),
 | 
				
			||||||
        STDCONF("pidfile", STR, handle_pidfile),
 | 
					        STDCONF("pidfile", STR, handle_pidfile),
 | 
				
			||||||
@ -164,9 +164,11 @@ struct {
 | 
				
			|||||||
        STDCONF("statfile", STR, handle_statfile),
 | 
					        STDCONF("statfile", STR, handle_statfile),
 | 
				
			||||||
        STDCONF("stathost", STR, handle_stathost),
 | 
					        STDCONF("stathost", STR, handle_stathost),
 | 
				
			||||||
        STDCONF("xtinyproxy", STR, handle_xtinyproxy),
 | 
					        STDCONF("xtinyproxy", STR, handle_xtinyproxy),
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        /* boolean arguments */
 | 
					        /* boolean arguments */
 | 
				
			||||||
        STDCONF("syslog", BOOL, handle_syslog),
 | 
					        STDCONF("syslog", BOOL, handle_syslog),
 | 
				
			||||||
        STDCONF("bindsame", BOOL, handle_bindsame),
 | 
					        STDCONF("bindsame", BOOL, handle_bindsame),
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        /* integer arguments */
 | 
					        /* integer arguments */
 | 
				
			||||||
        STDCONF("port", INT, handle_port),
 | 
					        STDCONF("port", INT, handle_port),
 | 
				
			||||||
        STDCONF("maxclients", INT, handle_maxclients),
 | 
					        STDCONF("maxclients", INT, handle_maxclients),
 | 
				
			||||||
@ -176,30 +178,37 @@ struct {
 | 
				
			|||||||
        STDCONF("maxrequestsperchild", INT, handle_maxrequestsperchild),
 | 
					        STDCONF("maxrequestsperchild", INT, handle_maxrequestsperchild),
 | 
				
			||||||
        STDCONF("timeout", INT, handle_timeout),
 | 
					        STDCONF("timeout", INT, handle_timeout),
 | 
				
			||||||
        STDCONF("connectport", INT, handle_connectport),
 | 
					        STDCONF("connectport", INT, handle_connectport),
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        /* alphanumeric arguments */
 | 
					        /* alphanumeric arguments */
 | 
				
			||||||
        STDCONF("user", ALNUM, handle_user),
 | 
					        STDCONF("user", ALNUM, handle_user),
 | 
				
			||||||
        STDCONF("group", ALNUM, handle_group),
 | 
					        STDCONF("group", ALNUM, handle_group),
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        /* ip arguments */
 | 
					        /* ip arguments */
 | 
				
			||||||
        STDCONF("listen", IP, handle_listen),
 | 
					        STDCONF("listen", IP, handle_listen),
 | 
				
			||||||
        STDCONF("allow", "(" IPMASK "|" ALNUM ")", handle_allow),
 | 
					        STDCONF("allow", "(" IPMASK "|" ALNUM ")", handle_allow),
 | 
				
			||||||
        STDCONF("deny", "(" IPMASK "|" ALNUM ")", handle_deny),
 | 
					        STDCONF("deny", "(" IPMASK "|" ALNUM ")", handle_deny),
 | 
				
			||||||
        STDCONF("bind", IP, handle_bind),
 | 
					        STDCONF("bind", IP, handle_bind),
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        /* error files */
 | 
					        /* error files */
 | 
				
			||||||
        STDCONF("errorfile", INT WS STR, handle_errorfile),
 | 
					        STDCONF("errorfile", INT WS STR, handle_errorfile),
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        /* 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),
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        /* 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),
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        /* upstream is rather complicated */
 | 
					        /* upstream is rather complicated */
 | 
				
			||||||
//        { BEGIN "no" WS "upstream" WS STR END, handle_no_upstream },
 | 
					//        { BEGIN "no" WS "upstream" WS STR END, handle_no_upstream },
 | 
				
			||||||
//        { BEGIN "upstream" WS IP ":" INT "(" WS STR ")" END, handle_upstream },
 | 
					//        { BEGIN "upstream" WS IP ":" INT "(" WS STR ")" END, handle_upstream },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        /* loglevel */
 | 
					        /* loglevel */
 | 
				
			||||||
        STDCONF("loglevel", "(critical|error|warning|notice|connect|info)",
 | 
					        STDCONF("loglevel", "(critical|error|warning|notice|connect|info)",
 | 
				
			||||||
                handle_loglevel)
 | 
					                handle_loglevel)
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user