Mailing List Archive

cvs commit: apache-1.3/htdocs/manual/misc client_block_api.html API.html
martin 98/04/15 01:31:25

Modified: htdocs/manual/misc client_block_api.html API.html
Log:
Document renamed functions instead of old names

Revision Changes Path
1.10 +6 -6 apache-1.3/htdocs/manual/misc/client_block_api.html

Index: client_block_api.html
===================================================================
RCS file: /home/cvs/apache-1.3/htdocs/manual/misc/client_block_api.html,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -u -r1.9 -r1.10
--- client_block_api.html 1998/02/05 20:04:28 1.9
+++ client_block_api.html 1998/04/15 08:31:23 1.10
@@ -33,13 +33,13 @@
<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 @@


<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 @@
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



1.13 +21 -21 apache-1.3/htdocs/manual/misc/API.html

Index: API.html
===================================================================
RCS file: /home/cvs/apache-1.3/htdocs/manual/misc/API.html,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -u -r1.12 -r1.13
--- API.html 1998/02/05 20:04:27 1.12
+++ API.html 1998/04/15 08:31:24 1.13
@@ -357,8 +357,8 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
{
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;