]> granicus.if.org Git - apache/commitdiff
Document renamed functions instead of old names
authorMartin Kraemer <martin@apache.org>
Wed, 15 Apr 1998 08:31:24 +0000 (08:31 +0000)
committerMartin Kraemer <martin@apache.org>
Wed, 15 Apr 1998 08:31:24 +0000 (08:31 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@80918 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/developer/API.html
docs/manual/misc/API.html
docs/manual/misc/client_block_api.html

index 4b47d48791518afd4db4b228511f8c78e8781b07..12a6dffc2eb7418a8c00f32ec91c625587897e36 100644 (file)
@@ -357,8 +357,8 @@ a few exceptions:
        order to figure out what icon to use.<P>
 
        Such handlers can construct a <EM>sub-request</EM>, using the
-       functions <CODE>sub_req_lookup_file</CODE> and
-       <CODE>sub_req_lookup_uri</CODE>; this constructs a new
+       functions <CODE>ap_sub_req_lookup_file</CODE> and
+       <CODE>ap_sub_req_lookup_uri</CODE>; this constructs a new
        <CODE>request_rec</CODE> structure and processes it as you
        would expect, up to but not including the point of actually
        sending a response.  (These functions skip over the access
@@ -405,9 +405,9 @@ do; they should return after that, without attempting any further
 output.  <P>
 
 Otherwise, they should produce a request body which responds to the
-client as appropriate.  The primitives for this are <CODE>rputc</CODE>
-and <CODE>rprintf</CODE>, for internally generated output, and
-<CODE>send_fd</CODE>, to copy the contents of some <CODE>FILE *</CODE>
+client as appropriate.  The primitives for this are <CODE>ap_rputc</CODE>
+and <CODE>ap_rprintf</CODE>, for internally generated output, and
+<CODE>ap_send_fd</CODE>, to copy the contents of some <CODE>FILE *</CODE>
 straight to the client.  <P>
 
 At this point, you should more or less understand the following piece
@@ -530,7 +530,7 @@ It should be noted that use of the pool machinery isn't generally
 obligatory, except for situations like logging handlers, where you
 really need to register cleanups to make sure that the log file gets
 closed when the server restarts (this is most easily done by using the
-function <CODE><A HREF="#pool-files">pfopen</A></CODE>, which also
+function <CODE><A HREF="#pool-files">ap_pfopen</A></CODE>, which also
 arranges for the underlying file descriptor to be closed before any
 child processes, such as for CGI scripts, are <CODE>exec</CODE>ed), or
 in case you are using the timeout machinery (which isn't yet even
@@ -772,17 +772,17 @@ to vanish when the pool is cleared, by registering a cleanup on the
 pool if necessary). <P>
 
 For the MIME module, the per-dir config creation function just
-<CODE>palloc</CODE>s the structure above, and a creates a couple of
+<CODE>ap_palloc</CODE>s the structure above, and a creates a couple of
 <CODE>table</CODE>s to fill it.  That looks like this:
 
 <PRE>
 void *create_mime_dir_config (pool *p, char *dummy)
 {
     mime_dir_config *new =
-      (mime_dir_config *) palloc (p, sizeof(mime_dir_config));
+      (mime_dir_config *) ap_palloc (p, sizeof(mime_dir_config));
 
-    new-&gt;forced_types = make_table (p, 4);
-    new-&gt;encoding_types = make_table (p, 4);
+    new-&gt;forced_types = ap_make_table (p, 4);
+    new-&gt;encoding_types = ap_make_table (p, 4);
 
     return new;
 }
@@ -846,7 +846,7 @@ the same, and won't be shown here):
 char *add_type(cmd_parms *cmd, mime_dir_config *m, char *ct, char *ext)
 {
     if (*ext == '.') ++ext;
-    table_set (m-&gt;forced_types, ext, ct);
+    ap_table_set (m-&gt;forced_types, ext, ct);
     return NULL;
 }
 </PRE>
@@ -927,15 +927,15 @@ ultimately done in the module's handlers, specifically for its
 file-typing handler, which looks more or less like this; note that the
 per-directory configuration structure is extracted from the
 <CODE>request_rec</CODE>'s per-directory configuration vector by using
-the <CODE>get_module_config</CODE> function.
+the <CODE>ap_get_module_config</CODE> function.
 
 <PRE>
 int find_ct(request_rec *r)
 {
     int i;
-    char *fn = pstrdup (r-&gt;pool, r-&gt;filename);
+    char *fn = ap_pstrdup (r-&gt;pool, r-&gt;filename);
     mime_dir_config *conf = (mime_dir_config *)
-             get_module_config(r-&gt;per_dir_config, &amp;mime_module);
+             ap_get_module_config(r-&gt;per_dir_config, &amp;mime_module);
     char *type;
 
     if (S_ISDIR(r-&gt;finfo.st_mode)) {
@@ -943,21 +943,21 @@ int find_ct(request_rec *r)
         return OK;
     }
 
-    if((i=rind(fn,'.')) &lt; 0) return DECLINED;
+    if((i=ap_rind(fn,'.')) &lt; 0) return DECLINED;
     ++i;
 
-    if ((type = table_get (conf-&gt;encoding_types, &amp;fn[i])))
+    if ((type = ap_table_get (conf-&gt;encoding_types, &amp;fn[i])))
     {
         r-&gt;content_encoding = type;
 
         /* go back to previous extension to try to use it as a type */
 
         fn[i-1] = '\0';
-        if((i=rind(fn,'.')) &lt; 0) return OK;
+        if((i=ap_rind(fn,'.')) &lt; 0) return OK;
         ++i;
     }
 
-    if ((type = table_get (conf-&gt;forced_types, &amp;fn[i])))
+    if ((type = ap_table_get (conf-&gt;forced_types, &amp;fn[i])))
     {
         r-&gt;content_type = type;
     }
@@ -991,10 +991,10 @@ char *add_redirect(cmd_parms *cmd, void *dummy, char *f, char *url)
 {
     server_rec *s = cmd-&gt;server;
     alias_server_conf *conf = (alias_server_conf *)
-            get_module_config(s-&gt;module_config,&amp;alias_module);
-    alias_entry *new = push_array (conf-&gt;redirects);
+            ap_get_module_config(s-&gt;module_config,&amp;alias_module);
+    alias_entry *new = ap_push_array (conf-&gt;redirects);
 
-    if (!is_url (url)) return "Redirect to non-URL";
+    if (!ap_is_url (url)) return "Redirect to non-URL";
 
     new-&gt;fake = f; new-&gt;real = url;
     return NULL;
index 4b47d48791518afd4db4b228511f8c78e8781b07..12a6dffc2eb7418a8c00f32ec91c625587897e36 100644 (file)
@@ -357,8 +357,8 @@ a few exceptions:
        order to figure out what icon to use.<P>
 
        Such handlers can construct a <EM>sub-request</EM>, using the
-       functions <CODE>sub_req_lookup_file</CODE> and
-       <CODE>sub_req_lookup_uri</CODE>; this constructs a new
+       functions <CODE>ap_sub_req_lookup_file</CODE> and
+       <CODE>ap_sub_req_lookup_uri</CODE>; this constructs a new
        <CODE>request_rec</CODE> structure and processes it as you
        would expect, up to but not including the point of actually
        sending a response.  (These functions skip over the access
@@ -405,9 +405,9 @@ do; they should return after that, without attempting any further
 output.  <P>
 
 Otherwise, they should produce a request body which responds to the
-client as appropriate.  The primitives for this are <CODE>rputc</CODE>
-and <CODE>rprintf</CODE>, for internally generated output, and
-<CODE>send_fd</CODE>, to copy the contents of some <CODE>FILE *</CODE>
+client as appropriate.  The primitives for this are <CODE>ap_rputc</CODE>
+and <CODE>ap_rprintf</CODE>, for internally generated output, and
+<CODE>ap_send_fd</CODE>, to copy the contents of some <CODE>FILE *</CODE>
 straight to the client.  <P>
 
 At this point, you should more or less understand the following piece
@@ -530,7 +530,7 @@ It should be noted that use of the pool machinery isn't generally
 obligatory, except for situations like logging handlers, where you
 really need to register cleanups to make sure that the log file gets
 closed when the server restarts (this is most easily done by using the
-function <CODE><A HREF="#pool-files">pfopen</A></CODE>, which also
+function <CODE><A HREF="#pool-files">ap_pfopen</A></CODE>, which also
 arranges for the underlying file descriptor to be closed before any
 child processes, such as for CGI scripts, are <CODE>exec</CODE>ed), or
 in case you are using the timeout machinery (which isn't yet even
@@ -772,17 +772,17 @@ to vanish when the pool is cleared, by registering a cleanup on the
 pool if necessary). <P>
 
 For the MIME module, the per-dir config creation function just
-<CODE>palloc</CODE>s the structure above, and a creates a couple of
+<CODE>ap_palloc</CODE>s the structure above, and a creates a couple of
 <CODE>table</CODE>s to fill it.  That looks like this:
 
 <PRE>
 void *create_mime_dir_config (pool *p, char *dummy)
 {
     mime_dir_config *new =
-      (mime_dir_config *) palloc (p, sizeof(mime_dir_config));
+      (mime_dir_config *) ap_palloc (p, sizeof(mime_dir_config));
 
-    new-&gt;forced_types = make_table (p, 4);
-    new-&gt;encoding_types = make_table (p, 4);
+    new-&gt;forced_types = ap_make_table (p, 4);
+    new-&gt;encoding_types = ap_make_table (p, 4);
 
     return new;
 }
@@ -846,7 +846,7 @@ the same, and won't be shown here):
 char *add_type(cmd_parms *cmd, mime_dir_config *m, char *ct, char *ext)
 {
     if (*ext == '.') ++ext;
-    table_set (m-&gt;forced_types, ext, ct);
+    ap_table_set (m-&gt;forced_types, ext, ct);
     return NULL;
 }
 </PRE>
@@ -927,15 +927,15 @@ ultimately done in the module's handlers, specifically for its
 file-typing handler, which looks more or less like this; note that the
 per-directory configuration structure is extracted from the
 <CODE>request_rec</CODE>'s per-directory configuration vector by using
-the <CODE>get_module_config</CODE> function.
+the <CODE>ap_get_module_config</CODE> function.
 
 <PRE>
 int find_ct(request_rec *r)
 {
     int i;
-    char *fn = pstrdup (r-&gt;pool, r-&gt;filename);
+    char *fn = ap_pstrdup (r-&gt;pool, r-&gt;filename);
     mime_dir_config *conf = (mime_dir_config *)
-             get_module_config(r-&gt;per_dir_config, &amp;mime_module);
+             ap_get_module_config(r-&gt;per_dir_config, &amp;mime_module);
     char *type;
 
     if (S_ISDIR(r-&gt;finfo.st_mode)) {
@@ -943,21 +943,21 @@ int find_ct(request_rec *r)
         return OK;
     }
 
-    if((i=rind(fn,'.')) &lt; 0) return DECLINED;
+    if((i=ap_rind(fn,'.')) &lt; 0) return DECLINED;
     ++i;
 
-    if ((type = table_get (conf-&gt;encoding_types, &amp;fn[i])))
+    if ((type = ap_table_get (conf-&gt;encoding_types, &amp;fn[i])))
     {
         r-&gt;content_encoding = type;
 
         /* go back to previous extension to try to use it as a type */
 
         fn[i-1] = '\0';
-        if((i=rind(fn,'.')) &lt; 0) return OK;
+        if((i=ap_rind(fn,'.')) &lt; 0) return OK;
         ++i;
     }
 
-    if ((type = table_get (conf-&gt;forced_types, &amp;fn[i])))
+    if ((type = ap_table_get (conf-&gt;forced_types, &amp;fn[i])))
     {
         r-&gt;content_type = type;
     }
@@ -991,10 +991,10 @@ char *add_redirect(cmd_parms *cmd, void *dummy, char *f, char *url)
 {
     server_rec *s = cmd-&gt;server;
     alias_server_conf *conf = (alias_server_conf *)
-            get_module_config(s-&gt;module_config,&amp;alias_module);
-    alias_entry *new = push_array (conf-&gt;redirects);
+            ap_get_module_config(s-&gt;module_config,&amp;alias_module);
+    alias_entry *new = ap_push_array (conf-&gt;redirects);
 
-    if (!is_url (url)) return "Redirect to non-URL";
+    if (!ap_is_url (url)) return "Redirect to non-URL";
 
     new-&gt;fake = f; new-&gt;real = url;
     return NULL;
index 8f89d1ad6e2676487f6940e8a946c2615d710197..c346c4adb320575364425dbbc8da01602478f50d 100644 (file)
@@ -33,13 +33,13 @@ accomplished while remaining backwards-compatible.</P>
 <H3>The New API Functions</H3>
 
 <PRE>
-   int setup_client_block (request_rec *, int read_policy);
-   int should_client_block (request_rec *);
-   long get_client_block (request_rec *, char *buffer, int buffer_size);
+   int ap_setup_client_block (request_rec *, int read_policy);
+   int ap_should_client_block (request_rec *);
+   long ap_get_client_block (request_rec *, char *buffer, int buffer_size);
 </PRE>
 
 <OL>
-<LI>Call <CODE>setup_client_block()</CODE> near the beginning of the request
+<LI>Call <CODE>ap_setup_client_block()</CODE> near the beginning of the request
     handler. This will set up all the necessary properties, and
     will return either OK, or an error code. If the latter,
     the module should return that error code. The second parameter
@@ -58,7 +58,7 @@ accomplished while remaining backwards-compatible.</P>
 
 
 <LI>When you are ready to possibly accept input, call
-    <CODE>should_client_block()</CODE>.
+    <CODE>ap_should_client_block()</CODE>.
     This will tell the module whether or not to read input. If it is 0,
     the module should assume that the input is of a non-entity type
     (e.g. a GET request). A nonzero response indicates that the module
@@ -68,7 +68,7 @@ accomplished while remaining backwards-compatible.</P>
     is <STRONG>*definitely*</STRONG> ready to read content. (otherwise, the point of the
     100 response is defeated). Never call this function more than once.
 
-<LI>Finally, call <CODE>get_client_block</CODE> in a loop. Pass it a
+<LI>Finally, call <CODE>ap_get_client_block</CODE> in a loop. Pass it a
     buffer and its
     size. It will put data into the buffer (not necessarily the full
     buffer, in the case of chunked inputs), and return the length of