diff options
author | Rich Bowen <rbowen@apache.org> | 2016-05-21 23:01:21 +0200 |
---|---|---|
committer | Rich Bowen <rbowen@apache.org> | 2016-05-21 23:01:21 +0200 |
commit | 81aad8d58e71cb715e6a453285a04440da1cd892 (patch) | |
tree | e98743e5f7b2f299c603d41fb95d2861185aaf12 /docs/manual/developer | |
parent | Clarify the meaning of the file-group syntax, as per bz59610 (diff) | |
download | apache2-81aad8d58e71cb715e6a453285a04440da1cd892.tar.xz apache2-81aad8d58e71cb715e6a453285a04440da1cd892.zip |
rebuild
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1744984 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'docs/manual/developer')
-rw-r--r-- | docs/manual/developer/hooks.html.en | 2 | ||||
-rw-r--r-- | docs/manual/developer/modules.html.ja.utf8 | 2 | ||||
-rw-r--r-- | docs/manual/developer/output-filters.html.en | 53 |
3 files changed, 28 insertions, 29 deletions
diff --git a/docs/manual/developer/hooks.html.en b/docs/manual/developer/hooks.html.en index 1a15985544..090eb85b4e 100644 --- a/docs/manual/developer/hooks.html.en +++ b/docs/manual/developer/hooks.html.en @@ -162,7 +162,7 @@ ret=ap_run_do_something(r, n);</pre> <p>Include the appropriate header, and define a static function of the correct type:</p> - <pre class="prettyprint lang-c">static int my_something_doer(request_rec *r, int n)<br /> + <pre class="prettyprint lang-c">static int my_something_doer(request_rec *r, int n) { ... return OK; diff --git a/docs/manual/developer/modules.html.ja.utf8 b/docs/manual/developer/modules.html.ja.utf8 index 4dfdac0b5c..ae1805914b 100644 --- a/docs/manual/developer/modules.html.ja.utf8 +++ b/docs/manual/developer/modules.html.ja.utf8 @@ -38,7 +38,7 @@ </div> <div id="quickview"><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#easy">簡単な変更点</a></li> <li><img alt="" src="../images/down.gif" /> <a href="#messy">もっと厄介な変更点…</a></li> -</ul><ul class="seealso"><li><a href="#comments_section">コメント</a></li></ul></div> +</ul><h3>参照</h3><ul class="seealso"><li><a href="#comments_section">コメント</a></li></ul></div> <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> <div class="section"> <h2><a name="easy" id="easy">簡単な変更点</a></h2> diff --git a/docs/manual/developer/output-filters.html.en b/docs/manual/developer/output-filters.html.en index 1fe86eaec3..103f63e149 100644 --- a/docs/manual/developer/output-filters.html.en +++ b/docs/manual/developer/output-filters.html.en @@ -131,12 +131,12 @@ brigade should have no side effects (such as changing any state private to the filter).</p> - <div class="example"><h3>How to handle an empty brigade</h3><pre class="prettyprint lang-c"> apr_status_t dummy_filter(ap_filter_t *f, apr_bucket_brigade *bb)<br /> - { - if (APR_BRIGADE_EMPTY(bb)) { - return APR_SUCCESS; - } - ....</pre> + <div class="example"><h3>How to handle an empty brigade</h3><pre class="prettyprint lang-c">apr_status_t dummy_filter(ap_filter_t *f, apr_bucket_brigade *bb) +{ + if (APR_BRIGADE_EMPTY(bb)) { + return APR_SUCCESS; + } + ...</pre> </div> </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> @@ -281,16 +281,16 @@ const char *data; apr_size_t length; while ((e = APR_BRIGADE_FIRST(bb)) != APR_BRIGADE_SENTINEL(bb)) { - rv = apr_bucket_read(e, &data, &length, APR_BLOCK_READ); - if (rv) ...; - /* Remove bucket e from bb. */ - APR_BUCKET_REMOVE(e); - /* Insert it into temporary brigade. */ - APR_BRIGADE_INSERT_HEAD(tmpbb, e); - /* Pass brigade downstream. */ - rv = ap_pass_brigade(f->next, tmpbb); - if (rv) ...; - apr_brigade_cleanup(tmpbb); + rv = apr_bucket_read(e, &data, &length, APR_BLOCK_READ); + if (rv) ...; + /* Remove bucket e from bb. */ + APR_BUCKET_REMOVE(e); + /* Insert it into temporary brigade. */ + APR_BRIGADE_INSERT_HEAD(tmpbb, e); + /* Pass brigade downstream. */ + rv = ap_pass_brigade(f->next, tmpbb); + if (rv) ...; + apr_brigade_cleanup(tmpbb); }</pre> </div> @@ -307,26 +307,24 @@ while ((e = APR_BRIGADE_FIRST(bb)) != APR_BRIGADE_SENTINEL(bb)) { a new brigade per invocation as described in the <a href="#brigade">Brigade structure</a> section.</p> <div class="example"><h3>Example code to maintain filter state</h3><pre class="prettyprint lang-c">struct dummy_state { - apr_bucket_brigade *tmpbb; - int filter_state; - ... + apr_bucket_brigade *tmpbb; + int filter_state; + ... }; apr_status_t dummy_filter(ap_filter_t *f, apr_bucket_brigade *bb) { - struct dummy_state *state; state = f->ctx; if (state == NULL) { - /* First invocation for this response: initialise state structure. - */ - f->ctx = state = apr_palloc(f->r->pool, sizeof *state); - - state->tmpbb = apr_brigade_create(f->r->pool, f->c->bucket_alloc); - state->filter_state = ...; + /* First invocation for this response: initialise state structure. + */ + f->ctx = state = apr_palloc(f->r->pool, sizeof *state); + state->tmpbb = apr_brigade_create(f->r->pool, f->c->bucket_alloc); + state->filter_state = ...; } ...</pre> </div> @@ -421,7 +419,8 @@ while ((e = APR_BRIGADE_FIRST(bb)) != APR_BRIGADE_SENTINEL(bb)) { /* Retry, using a blocking read. */ mode = APR_BLOCK_READ; continue; - } else if (rv != APR_SUCCESS) { + } + else if (rv != APR_SUCCESS) { /* handle errors */ } |