]> granicus.if.org Git - apache/commitdiff
whitespace fixes
authorDaniel Gruno <humbedooh@apache.org>
Thu, 20 Sep 2012 20:14:37 +0000 (20:14 +0000)
committerDaniel Gruno <humbedooh@apache.org>
Thu, 20 Sep 2012 20:14:37 +0000 (20:14 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1388192 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/developer/hooks.xml

index fe6a1e14a8d76b51956d6e465ece41690ab01180..e9a5c5f52e1a543406218c61e0353cc5a6039808 100644 (file)
       This is declared as follows:</p>
 
       <highlight language="c">
-        APR_HOOK_STRUCT(
-          APR_HOOK_LINK(do_something)
-          ...
-        )
+APR_HOOK_STRUCT(
+  APR_HOOK_LINK(do_something)
+  ...
+)
       </highlight>
     </section>
 
         something like this:</p>
 
         <highlight language="c">
-          void ap_run_do_something(request_rec *r, int n)
-          {
-            ...
-            do_something(r, n);
-          }
+void ap_run_do_something(request_rec *r, int n)
+{
+    ...
+    do_something(r, n);
+}
         </highlight>
       </section>
 
       like so:</p>
 
       <highlight language="c">
-        int n, ret;
-        request_rec *r;
+int n, ret;
+request_rec *r;
 
-        ret=ap_run_do_something(r, n);
+ret=ap_run_do_something(r, n);
       </highlight>
     </section>
 </section>
       of the correct type:</p>
 
       <highlight language="c">
-        static int my_something_doer(request_rec *r, int n)<br />
-        {
-          ...
-          return OK;
-        }
+static int my_something_doer(request_rec *r, int n)<br />
+{
+    ...
+    return OK;
+}
       </highlight>
     </section>
 
       structure:</p>
 
       <highlight language="c">
-        static void my_register_hooks()
-        {
-          ap_hook_do_something(my_something_doer, NULL, NULL, APR_HOOK_MIDDLE);
-        }
-
-        mode MODULE_VAR_EXPORT my_module =
-        {
-          ...
-          my_register_hooks       /* register hooks */
-        };
+static void my_register_hooks()
+{
+    ap_hook_do_something(my_something_doer, NULL, NULL, APR_HOOK_MIDDLE);
+}
+
+mode MODULE_VAR_EXPORT my_module =
+{
+    ...
+    my_register_hooks       /* register hooks */
+};
       </highlight>
     </section>
 
       before we do, then we'd hook as follows:</p>
 
       <highlight language="c">
-        static void register_hooks()
-        {
-          static const char * const aszPre[] = { "mod_xyz.c", "mod_abc.c", NULL };
+static void register_hooks()
+{
+    static const char * const aszPre[] = { "mod_xyz.c", "mod_abc.c", NULL };
 
-          ap_hook_do_something(my_something_doer, aszPre, NULL, APR_HOOK_MIDDLE);
-        }
+    ap_hook_do_something(my_something_doer, aszPre, NULL, APR_HOOK_MIDDLE);
+}
       </highlight>
 
       <p>Note that the sort used to achieve this is stable, so