"Fossies" - the Fresh Open Source Software Archive

Member "mod_log_sql-1.101/apache13.h" (3 Jun 2004, 3382 Bytes) of package /linux/www/apache_httpd_modules/old/mod_log_sql-1.101.tar.bz2:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 /* $Id: apache13.h 141 2004-06-03 04:32:08Z urkle@drip.ws $ */
    2 #ifndef APACHE13_H
    3 #define APACHE13_H
    4 
    5 #include "httpd.h"
    6 #include "http_config.h"
    7 #include "http_log.h"
    8 #include "http_core.h"
    9 
   10 /* Defines */
   11 #define AP_MODULE_DECLARE_DATA MODULE_VAR_EXPORT
   12 #define APR_OFF_T_FMT "ld"
   13 #define APR_PID_T_FMT "d"
   14 #define APR_SUCCESS 0
   15 #define APR_OFFSETOF XtOffsetOf
   16 
   17 /** method of declaring a directive with raw argument parsing */
   18 # define AP_INIT_RAW_ARGS(directive, func, mconfig, where, help) \
   19     { directive, func, mconfig, where, RAW_ARGS, help }
   20 /** method of declaring a directive which takes 1 argument */
   21 # define AP_INIT_TAKE1(directive, func, mconfig, where, help) \
   22     { directive, func, mconfig, where, TAKE1, help }
   23 /** method of declaring a directive which takes 2 argument */
   24 # define AP_INIT_TAKE2(directive, func, mconfig, where, help) \
   25     { directive, func, mconfig, where, TAKE2, help }
   26 /** method of declaring a directive which takes multiple arguments */
   27 # define AP_INIT_ITERATE(directive, func, mconfig, where, help) \
   28     { directive, func, mconfig, where, ITERATE, help }
   29 /** method of declaring a directive which takes 1 or 3 arguments */
   30 # define AP_INIT_TAKE13(directive, func, mconfig, where, help) \
   31     { directive, func, mconfig, where, TAKE13, help }
   32 /** method of declaring a directive which takes 3 arguments */
   33 # define AP_INIT_TAKE3(directive, func, mconfig, where, help) \
   34     { directive, func, mconfig, where, TAKE3, help }
   35 /** method of declaring a directive which takes a flag (on/off) as an argument */
   36 # define AP_INIT_FLAG(directive, func, mconfig, where, help) \
   37     { directive, func, mconfig, where, FLAG, help }
   38 
   39 /* Types */
   40 #define apr_pool_t pool
   41 #define apr_array_header_t array_header
   42 #define apr_table_t table
   43 
   44 #define apr_status_t int
   45 #define apr_uri_t uri_components
   46 
   47 /* Functions */
   48 #define ap_get_remote_host(a,b,c,d) ap_get_remote_host(a,b,c)
   49 #define ap_set_deprecated NULL
   50     
   51 #define apr_uri_unparse ap_unparse_uri_components
   52 #define apr_uri_parse ap_parse_uri_components
   53 #define ap_add_version_component(p,s) ap_add_version_component(s)
   54 
   55 #define apr_pool_create(a,b) *(a) = ap_make_sub_pool(b)
   56 #define apr_pool_destroy ap_destroy_pool
   57 #define apr_pool_cleanup_register ap_register_cleanup
   58 #define apr_palloc ap_palloc
   59 #define apr_pcalloc ap_pcalloc
   60 #define apr_pstrdup ap_pstrdup
   61 #define apr_pstrcat ap_pstrcat
   62 #define apr_psprintf ap_psprintf
   63 #define apr_snprintf ap_snprintf
   64 #define ap_strchr strchr
   65 #define ap_strchr_c strchr
   66 #define ap_strstr strstr
   67 #define ap_strstr_c strstr
   68 
   69 #define apr_table_set ap_table_set
   70 #define apr_table_get ap_table_get
   71 #define apr_table_make ap_make_table
   72 
   73 #define apr_array_push ap_push_array
   74 #define apr_array_make ap_make_array
   75 #define apr_array_cat ap_array_cat
   76 #define apr_is_empty_array(t) (((t) == NULL)||((t)->nelts == 0))
   77 
   78 #define apr_tolower ap_tolower
   79 
   80 void log_error(char *file, int line, int level, apr_status_t status, 
   81     const server_rec *s, const char *fmt, ...) __attribute__ ((format (printf, 6,7)));
   82     
   83 #ifndef WIN32
   84 inline
   85 #endif
   86 void log_error(char *file, int line, int level, 
   87     apr_status_t status, const server_rec *s, const char *fmt, ...)
   88 {
   89     static char buff[MAX_STRING_LEN];
   90     va_list args;
   91     va_start(args, fmt);
   92     ap_vsnprintf(buff,MAX_STRING_LEN, fmt,args);
   93     ap_log_error(file,line,level | APLOG_NOERRNO ,s,"%s",buff);
   94     va_end(args);
   95 }
   96 
   97 
   98 #endif /* APACHE13_H */