httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject svn commit: r1324668 - in /httpd/httpd/trunk/docs/manual/developer: modguide.html.en modguide.xml
Date Wed, 11 Apr 2012 09:35:15 GMT
Author: humbedooh
Date: Wed Apr 11 09:35:15 2012
New Revision: 1324668

URL: http://svn.apache.org/viewvc?rev=1324668&view=rev
Log:
Fix some C conformity (declare variables before function calls, silly humbedooh)

Modified:
    httpd/httpd/trunk/docs/manual/developer/modguide.html.en
    httpd/httpd/trunk/docs/manual/developer/modguide.xml

Modified: httpd/httpd/trunk/docs/manual/developer/modguide.html.en
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/developer/modguide.html.en?rev=1324668&r1=1324667&r2=1324668&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/developer/modguide.html.en (original)
+++ httpd/httpd/trunk/docs/manual/developer/modguide.html.en Wed Apr 11 09:35:15 2012
@@ -463,11 +463,14 @@ Let's put these functions into an exampl
 <code style="color:#400000; font-weight:bold; ">static</code> <code style="color:#400000;
font-weight:bold; ">int</code> example_handler<code style="color:#806030; ">(</code>request_rec
<code style="color:#806030; ">*</code>r<code style="color:#806030; ">)</code>
 <code style="color:#806030; ">{</code>
     <code style="color:#400000; font-weight:bold; ">const</code> <code style="color:#400000;
font-weight:bold; ">char</code><code style="color:#806030; ">*</code>
original <code style="color:#806030; ">=</code> <code style="color:#800000;
">"</code><code style="color:#e60000; ">You can't edit this!</code><code
style="color:#800000; ">"</code><code style="color:#806030; ">;</code>
+    <code style="color:#400000; font-weight:bold; ">char</code><code style="color:#806030;
">*</code> copy<code style="color:#806030; ">;</code>
+    <code style="color:#400000; font-weight:bold; ">int</code><code style="color:#806030;
">*</code> integers<code style="color:#806030; ">;</code>
+    
     <code style="color:#c34e00; ">/* Allocate space for 10 integer values and set them
all to zero. */</code>
-    <code style="color:#400000; font-weight:bold; ">int</code><code style="color:#806030;
">*</code> integers <code style="color:#806030; ">=</code> apr_pcalloc<code
style="color:#806030; ">(</code>r<code style="color:#806030; ">-</code><code
style="color:#806030; ">&gt;</code><code style="color:#008833">pool</code><code
style="color:#806030; ">,</code> <code style="color:#400000; font-weight:bold;
">sizeof</code><code style="color:#806030; ">(</code><code style="color:#400000;
font-weight:bold; ">int</code><code style="color:#806030; ">)</code><code
style="color:#806030; ">*</code><code style="color:#c00000; ">10</code><code
style="color:#806030; ">)</code><code style="color:#806030; ">;</code>

+    integers <code style="color:#806030; ">=</code> apr_pcalloc<code style="color:#806030;
">(</code>r<code style="color:#806030; ">-</code><code style="color:#806030;
">&gt;</code>pool<code style="color:#806030; ">,</code> <code
style="color:#400000; font-weight:bold; ">sizeof</code><code style="color:#806030;
">(</code><code style="color:#400000; font-weight:bold; ">int</code><code
style="color:#806030; ">)</code><code style="color:#806030; ">*</code><code
style="color:#c00000; ">10</code><code style="color:#806030; ">)</code><code
style="color:#806030; ">;</code> 
     
     <code style="color:#c34e00; ">/* Create a copy of the 'original' variable that
we can edit. */</code>
-    <code style="color:#400000; font-weight:bold; ">char</code><code style="color:#806030;
">*</code> copy <code style="color:#806030; ">=</code> apr_pstrdup<code
style="color:#806030; ">(</code>r<code style="color:#806030; ">-</code><code
style="color:#806030; ">&gt;</code><code style="color:#008833">pool</code><code
style="color:#806030; ">,</code> original<code style="color:#806030; ">)</code><code
style="color:#806030; ">;</code>
+    copy <code style="color:#806030; ">=</code> apr_pstrdup<code style="color:#806030;
">(</code>r<code style="color:#806030; ">-</code><code style="color:#806030;
">&gt;</code>pool<code style="color:#806030; ">,</code> original<code
style="color:#806030; ">)</code><code style="color:#806030; ">;</code>
     <code style="color:#400000; font-weight:bold; ">return</code> OK<code
style="color:#806030; ">;</code>
 <code style="color:#806030; ">}</code>
 </pre>

Modified: httpd/httpd/trunk/docs/manual/developer/modguide.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/developer/modguide.xml?rev=1324668&r1=1324667&r2=1324668&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/developer/modguide.xml (original)
+++ httpd/httpd/trunk/docs/manual/developer/modguide.xml Wed Apr 11 09:35:15 2012
@@ -461,11 +461,14 @@ Let's put these functions into an exampl
 <code style='color:#400000; font-weight:bold; '>static</code> <code style='color:#400000;
font-weight:bold; '>int</code> example_handler<code style='color:#806030; '>(</code>request_rec
<code style='color:#806030; '>*</code>r<code style='color:#806030; '>)</code>
 <code style='color:#806030; '>{</code>
     <code style='color:#400000; font-weight:bold; '>const</code> <code style='color:#400000;
font-weight:bold; '>char</code><code style='color:#806030; '>*</code>
original <code style='color:#806030; '>=</code> <code style='color:#800000;
'>"</code><code style='color:#e60000; '>You can't edit this!</code><code
style='color:#800000; '>"</code><code style='color:#806030; '>;</code>
+    <code style='color:#400000; font-weight:bold; '>char</code><code style='color:#806030;
'>*</code> copy<code style='color:#806030; '>;</code>
+    <code style='color:#400000; font-weight:bold; '>int</code><code style='color:#806030;
'>*</code> integers<code style='color:#806030; '>;</code>
+    
     <code style='color:#c34e00; '>/* Allocate space for 10 integer values and set them
all to zero. */</code>
-    <code style='color:#400000; font-weight:bold; '>int</code><code style='color:#806030;
'>*</code> integers <code style='color:#806030; '>=</code> apr_pcalloc<code
style='color:#806030; '>(</code>r<code style='color:#806030; '>-</code><code
style='color:#806030; '>></code><code style='color:#008833'>pool</code><code
style='color:#806030; '>,</code> <code style='color:#400000; font-weight:bold;
'>sizeof</code><code style='color:#806030; '>(</code><code style='color:#400000;
font-weight:bold; '>int</code><code style='color:#806030; '>)</code><code
style='color:#806030; '>*</code><code style='color:#c00000; '>10</code><code
style='color:#806030; '>)</code><code style='color:#806030; '>;</code>

+    integers <code style='color:#806030; '>=</code> apr_pcalloc<code style='color:#806030;
'>(</code>r<code style='color:#806030; '>-</code><code style='color:#806030;
'>></code>pool<code style='color:#806030; '>,</code> <code style='color:#400000;
font-weight:bold; '>sizeof</code><code style='color:#806030; '>(</code><code
style='color:#400000; font-weight:bold; '>int</code><code style='color:#806030;
'>)</code><code style='color:#806030; '>*</code><code style='color:#c00000;
'>10</code><code style='color:#806030; '>)</code><code style='color:#806030;
'>;</code> 
     
     <code style='color:#c34e00; '>/* Create a copy of the 'original' variable that
we can edit. */</code>
-    <code style='color:#400000; font-weight:bold; '>char</code><code style='color:#806030;
'>*</code> copy <code style='color:#806030; '>=</code> apr_pstrdup<code
style='color:#806030; '>(</code>r<code style='color:#806030; '>-</code><code
style='color:#806030; '>></code><code style='color:#008833'>pool</code><code
style='color:#806030; '>,</code> original<code style='color:#806030; '>)</code><code
style='color:#806030; '>;</code>
+    copy <code style='color:#806030; '>=</code> apr_pstrdup<code style='color:#806030;
'>(</code>r<code style='color:#806030; '>-</code><code style='color:#806030;
'>></code>pool<code style='color:#806030; '>,</code> original<code
style='color:#806030; '>)</code><code style='color:#806030; '>;</code>
     <code style='color:#400000; font-weight:bold; '>return</code> OK<code
style='color:#806030; '>;</code>
 <code style='color:#806030; '>}</code>
 </pre>



Mime
View raw message