httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bri...@apache.org
Subject svn commit: r711678 - /httpd/mod_wombat/trunk/request.c
Date Wed, 05 Nov 2008 19:50:47 GMT
Author: brianm
Date: Wed Nov  5 11:50:47 2008
New Revision: 711678

URL: http://svn.apache.org/viewvc?rev=711678&view=rev
Log:
reformat to avoid line breaks

Modified:
    httpd/mod_wombat/trunk/request.c

Modified: httpd/mod_wombat/trunk/request.c
URL: http://svn.apache.org/viewvc/httpd/mod_wombat/trunk/request.c?rev=711678&r1=711677&r2=711678&view=diff
==============================================================================
--- httpd/mod_wombat/trunk/request.c (original)
+++ httpd/mod_wombat/trunk/request.c Wed Nov  5 11:50:47 2008
@@ -292,27 +292,31 @@
             }
             
             case APW_REQ_FUNTYPE_LUACFUN: {
-                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "request_rec->dispatching
%s -> lua_CFunction", name);
+                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, 
+                              "request_rec->dispatching %s -> lua_CFunction", name);
                 lua_CFunction func = rft->fun;
                 lua_pushcfunction(L, func);      
                 return 1;                
             }
             case APW_REQ_FUNTYPE_STRING: {
-                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "request_rec->dispatching
%s -> string", name);
+                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, 
+                              "request_rec->dispatching %s -> string", name);
                 req_field_string_f func = rft->fun;
                 char* rs = (*func)(r);
                 lua_pushstring(L, rs);
                 return 1;                
             }
             case APW_REQ_FUNTYPE_INT: {
-                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "request_rec->dispatching
%s -> int", name);
+                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, 
+                              "request_rec->dispatching %s -> int", name);
                 req_field_int_f func = rft->fun;
                 int rs = (*func)(r);
                 lua_pushnumber(L, rs);
                 return 1;                
             }
             case APW_REQ_FUNTYPE_BOOLEAN: {
-                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "request_rec->dispatching
%s -> boolean", name);
+                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, 
+                              "request_rec->dispatching %s -> boolean", name);
                 req_field_int_f func = rft->fun;
                 int rs = (*func)(r);
                 lua_pushboolean(L, rs);
@@ -321,7 +325,8 @@
         }
     }
     
-    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "nothing for %s", name);  
+    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, 
+                  "nothing for %s", name);  
     return 0;
 }
 
@@ -430,45 +435,72 @@
     
     apr_hash_t* dispatch = apr_hash_make(p);
     
-    apr_hash_set(dispatch, "puts", APR_HASH_KEY_STRING, makefun(&req_puts, APW_REQ_FUNTYPE_LUACFUN,
p));
-    apr_hash_set(dispatch, "write", APR_HASH_KEY_STRING, makefun(&req_write, APW_REQ_FUNTYPE_LUACFUN,
p));
-    apr_hash_set(dispatch, "document_root", APR_HASH_KEY_STRING, makefun(&req_document_root,
APW_REQ_FUNTYPE_LUACFUN, p));
-    apr_hash_set(dispatch, "parseargs", APR_HASH_KEY_STRING, makefun(&req_parseargs,
APW_REQ_FUNTYPE_LUACFUN, p));
-    apr_hash_set(dispatch, "parsebody", APR_HASH_KEY_STRING, makefun(&req_parsebody,
APW_REQ_FUNTYPE_LUACFUN, p));
-    apr_hash_set(dispatch, "debug", APR_HASH_KEY_STRING, makefun(&req_debug, APW_REQ_FUNTYPE_LUACFUN,
p));
-    apr_hash_set(dispatch, "info", APR_HASH_KEY_STRING, makefun(&req_info, APW_REQ_FUNTYPE_LUACFUN,
p));
-    apr_hash_set(dispatch, "notice", APR_HASH_KEY_STRING, makefun(&req_notice, APW_REQ_FUNTYPE_LUACFUN,
p));
-    apr_hash_set(dispatch, "warn", APR_HASH_KEY_STRING, makefun(req_warn, APW_REQ_FUNTYPE_LUACFUN,
p));
-    apr_hash_set(dispatch, "err", APR_HASH_KEY_STRING, makefun(&req_err, APW_REQ_FUNTYPE_LUACFUN,
p));
-    apr_hash_set(dispatch, "crit", APR_HASH_KEY_STRING, makefun(&req_crit, APW_REQ_FUNTYPE_LUACFUN,
p));
-    apr_hash_set(dispatch, "alert", APR_HASH_KEY_STRING, makefun(&req_alert, APW_REQ_FUNTYPE_LUACFUN,
p));
-    apr_hash_set(dispatch, "emerg", APR_HASH_KEY_STRING, makefun(&req_emerg, APW_REQ_FUNTYPE_LUACFUN,
p));
-    apr_hash_set(dispatch, "add_output_filter", APR_HASH_KEY_STRING, makefun(&req_add_output_filter,

-                                                                             APW_REQ_FUNTYPE_LUACFUN,
p));
-    apr_hash_set(dispatch, "assbackwards", APR_HASH_KEY_STRING, makefun(&req_assbackwards_field,
APW_REQ_FUNTYPE_BOOLEAN, p));
-    apr_hash_set(dispatch, "status", APR_HASH_KEY_STRING, makefun(&req_status_field,
APW_REQ_FUNTYPE_INT, p));
-    apr_hash_set(dispatch, "protocol", APR_HASH_KEY_STRING, makefun(&req_protocol_field,
APW_REQ_FUNTYPE_STRING, p));
-    apr_hash_set(dispatch, "range", APR_HASH_KEY_STRING, makefun(&req_range_field, APW_REQ_FUNTYPE_STRING,
p));
-    apr_hash_set(dispatch, "content_type", APR_HASH_KEY_STRING, makefun(&req_content_type_field,
APW_REQ_FUNTYPE_STRING, p));
+    apr_hash_set(dispatch, "puts", APR_HASH_KEY_STRING, 
+                 makefun(&req_puts, APW_REQ_FUNTYPE_LUACFUN, p));
+    apr_hash_set(dispatch, "write", APR_HASH_KEY_STRING, 
+                 makefun(&req_write, APW_REQ_FUNTYPE_LUACFUN, p));
+    apr_hash_set(dispatch, "document_root", APR_HASH_KEY_STRING, 
+                 makefun(&req_document_root, APW_REQ_FUNTYPE_LUACFUN, p));
+    apr_hash_set(dispatch, "parseargs", APR_HASH_KEY_STRING, 
+                 makefun(&req_parseargs, APW_REQ_FUNTYPE_LUACFUN, p));
+    apr_hash_set(dispatch, "parsebody", APR_HASH_KEY_STRING, 
+                 makefun(&req_parsebody, APW_REQ_FUNTYPE_LUACFUN, p));
+    apr_hash_set(dispatch, "debug", APR_HASH_KEY_STRING, 
+                 makefun(&req_debug, APW_REQ_FUNTYPE_LUACFUN, p));
+    apr_hash_set(dispatch, "info", APR_HASH_KEY_STRING, 
+                 makefun(&req_info, APW_REQ_FUNTYPE_LUACFUN, p));
+    apr_hash_set(dispatch, "notice", APR_HASH_KEY_STRING, 
+                 makefun(&req_notice, APW_REQ_FUNTYPE_LUACFUN, p));
+    apr_hash_set(dispatch, "warn", APR_HASH_KEY_STRING, 
+                 makefun(req_warn, APW_REQ_FUNTYPE_LUACFUN, p));
+    apr_hash_set(dispatch, "err", APR_HASH_KEY_STRING, 
+                 makefun(&req_err, APW_REQ_FUNTYPE_LUACFUN, p));
+    apr_hash_set(dispatch, "crit", APR_HASH_KEY_STRING, 
+                 makefun(&req_crit, APW_REQ_FUNTYPE_LUACFUN, p));
+    apr_hash_set(dispatch, "alert", APR_HASH_KEY_STRING, 
+                 makefun(&req_alert, APW_REQ_FUNTYPE_LUACFUN, p));
+    apr_hash_set(dispatch, "emerg", APR_HASH_KEY_STRING, 
+                 makefun(&req_emerg, APW_REQ_FUNTYPE_LUACFUN, p));
+    apr_hash_set(dispatch, "add_output_filter", APR_HASH_KEY_STRING, 
+                 makefun(&req_add_output_filter, APW_REQ_FUNTYPE_LUACFUN, p));
+    apr_hash_set(dispatch, "assbackwards", APR_HASH_KEY_STRING, 
+                 makefun(&req_assbackwards_field, APW_REQ_FUNTYPE_BOOLEAN, p));
+    apr_hash_set(dispatch, "status", APR_HASH_KEY_STRING, 
+                 makefun(&req_status_field, APW_REQ_FUNTYPE_INT, p));
+    apr_hash_set(dispatch, "protocol", APR_HASH_KEY_STRING, 
+                 makefun(&req_protocol_field, APW_REQ_FUNTYPE_STRING, p));
+    apr_hash_set(dispatch, "range", APR_HASH_KEY_STRING, 
+                 makefun(&req_range_field, APW_REQ_FUNTYPE_STRING, p));
+    apr_hash_set(dispatch, "content_type", APR_HASH_KEY_STRING, 
+                 makefun(&req_content_type_field, APW_REQ_FUNTYPE_STRING, p));
     apr_hash_set(dispatch, "content_encoding", APR_HASH_KEY_STRING, 
                  makefun(&req_content_encoding_field, APW_REQ_FUNTYPE_STRING, p));
-    apr_hash_set(dispatch, "ap_auth_type", APR_HASH_KEY_STRING, makefun(&req_ap_auth_type_field,
APW_REQ_FUNTYPE_STRING, p));
-    apr_hash_set(dispatch, "unparsed_uri", APR_HASH_KEY_STRING, makefun(&req_unparsed_uri_field,
APW_REQ_FUNTYPE_STRING, p));
-    apr_hash_set(dispatch, "user", APR_HASH_KEY_STRING, makefun(&req_user_field, APW_REQ_FUNTYPE_STRING,
p));
-    apr_hash_set(dispatch, "filename", APR_HASH_KEY_STRING, makefun(&req_filename_field,
APW_REQ_FUNTYPE_STRING, p));
-    apr_hash_set(dispatch, "canonical_filename", 
-                APR_HASH_KEY_STRING, makefun(&req_canonical_filename_field, APW_REQ_FUNTYPE_STRING,
p));
-    apr_hash_set(dispatch, "path_info", APR_HASH_KEY_STRING, makefun(&req_path_info_field,
APW_REQ_FUNTYPE_STRING, p));
-    apr_hash_set(dispatch, "args", APR_HASH_KEY_STRING, makefun(&req_args_field, APW_REQ_FUNTYPE_STRING,
p));
-    apr_hash_set(dispatch, "hostname", APR_HASH_KEY_STRING, makefun(&req_hostname_field,
APW_REQ_FUNTYPE_STRING, p));
-    apr_hash_set(dispatch, "uri", APR_HASH_KEY_STRING, makefun(&req_uri_field, APW_REQ_FUNTYPE_STRING,
p));
-    apr_hash_set(dispatch, "the_request", APR_HASH_KEY_STRING, makefun(&req_the_request_field,
APW_REQ_FUNTYPE_STRING, p));
-    apr_hash_set(dispatch, "method", APR_HASH_KEY_STRING, makefun(&req_method_field,
APW_REQ_FUNTYPE_STRING, p));
+    apr_hash_set(dispatch, "ap_auth_type", APR_HASH_KEY_STRING, 
+                 makefun(&req_ap_auth_type_field, APW_REQ_FUNTYPE_STRING, p));
+    apr_hash_set(dispatch, "unparsed_uri", APR_HASH_KEY_STRING, 
+                 makefun(&req_unparsed_uri_field, APW_REQ_FUNTYPE_STRING, p));
+    apr_hash_set(dispatch, "user", APR_HASH_KEY_STRING, 
+                 makefun(&req_user_field, APW_REQ_FUNTYPE_STRING, p));
+    apr_hash_set(dispatch, "filename", APR_HASH_KEY_STRING, 
+                 makefun(&req_filename_field, APW_REQ_FUNTYPE_STRING, p));
+    apr_hash_set(dispatch, "canonical_filename", APR_HASH_KEY_STRING, 
+                 makefun(&req_canonical_filename_field, APW_REQ_FUNTYPE_STRING, p));
+    apr_hash_set(dispatch, "path_info", APR_HASH_KEY_STRING, 
+                 makefun(&req_path_info_field, APW_REQ_FUNTYPE_STRING, p));
+    apr_hash_set(dispatch, "args", APR_HASH_KEY_STRING, 
+                 makefun(&req_args_field, APW_REQ_FUNTYPE_STRING, p));
+    apr_hash_set(dispatch, "hostname", APR_HASH_KEY_STRING, 
+                 makefun(&req_hostname_field, APW_REQ_FUNTYPE_STRING, p));
+    apr_hash_set(dispatch, "uri", APR_HASH_KEY_STRING, 
+                 makefun(&req_uri_field, APW_REQ_FUNTYPE_STRING, p));
+    apr_hash_set(dispatch, "the_request", APR_HASH_KEY_STRING, 
+                 makefun(&req_the_request_field, APW_REQ_FUNTYPE_STRING, p));
+    apr_hash_set(dispatch, "method", APR_HASH_KEY_STRING, 
+                 makefun(&req_method_field, APW_REQ_FUNTYPE_STRING, p));
     
     lua_pushlightuserdata(L, dispatch);
     lua_setfield(L, LUA_REGISTRYINDEX, "Apache2.Request.dispatch");
     
-    
     luaL_newmetatable(L, "Apache2.Request"); // [metatable]
     lua_pushvalue(L, -1); 
 
@@ -526,78 +558,5 @@
     lua_boxpointer(L, r);
     luaL_getmetatable(L, "Apache2.Request");
     lua_setmetatable(L, -2);
-    luaL_getmetatable(L, "Apache2.Request");
-//    rstack_dump(L, r, "apw_push_request pre pop");
-    lua_pop(L, 1);
-//    rstack_dump(L, r, "apw_push_request post pop");
-    // lua_pushinteger(L, r->status);
-    // lua_setfield(L, -2, "status");
-        
-    // lua_pushstring(L, r->method);
-    // lua_setfield(L, -2, "method");
-
-    // lua_pushstring(L, r->the_request);
-    //     lua_setfield(L, -2, "the_request");
-    // 
-    //     lua_pushstring(L, r->protocol);
-    //     lua_setfield(L, -2, "protocol");
-    //     
-    //     lua_pushstring(L, r->range);
-    //     lua_setfield(L, -2, "range");
-    //     
-    //     lua_pushstring(L, r->content_type);
-    //     lua_setfield(L, -2, "content_type");
-    //     
-    //     lua_pushstring(L, r->content_encoding);
-    //     lua_setfield(L, -2, "content_encoding");
-    //     
-    //     lua_pushstring(L, r->user);
-    //     lua_setfield(L, -2, "user");
-    //     
-    //     lua_pushstring(L, r->ap_auth_type);
-    //     lua_setfield(L, -2, "ap_auth_type");
-    //     
-    //     lua_pushstring(L, r->unparsed_uri);
-    //     lua_setfield(L, -2, "unparsed_uri");
-    //     
-    //     lua_pushstring(L, r->uri);
-    //     lua_setfield(L, -2, "uri");
-    //     
-    //     lua_pushstring(L, r->filename);
-    //     lua_setfield(L, -2, "filename");
-    // 
-    //     lua_pushstring(L, r->canonical_filename);
-    //     lua_setfield(L, -2, "canonical_filename");
-    // 
-    //     lua_pushstring(L, r->path_info);
-    //     lua_setfield(L, -2, "path_info");
-    //     
-    //     lua_pushstring(L, r->args);
-    //     lua_setfield(L, -2, "args");
-    //     
-    //     lua_pushstring(L, r->hostname);
-    //     lua_setfield(L, -2, "hostname");
-    // 
-    //     lua_pushboolean(L, r->assbackwards);
-    //     lua_setfield(L, -2, "assbackwards");
-    // 
-    //     lua_pushcfunction(L, &req_add_output_filter);
-    //     lua_setfield(L, -2, "addoutputfilter");
-    // 
-    //     apw_push_apr_table(L, "subprocess_env", r->subprocess_env);
-    //     apw_push_apr_table(L, "headers_out", r->headers_out);
-    //     apw_push_apr_table(L, "headers_in", r->headers_in);
-    //     apw_push_apr_table(L, "notes", r->notes);
-    // 
-    //     apw_push_connection(L, r->connection);
-    //     lua_setfield(L, -2, "connection");
-    // 
-    //     apw_push_server(L, r->server);
-    //     lua_setfield(L, -2, "server");
-    // 
-    //     lua_pushlightuserdata(L, r);
-    //     lua_pushcclosure(L, &req_newindex, 1);
-    //     lua_setfield(L, -2, "__newindex");
-    //     lua_pop(L, 1);
 }
 



Mime
View raw message