mirror of
https://github.com/bdnugget/kcgi.git
synced 2026-11-07 05:47:27 +00:00
Polish.
This commit is contained in:
1 parent
b430c1e084
commit
be8b65885e
2 files changed
+9
-8
No files matched your search
@@ -108,6 +108,7 @@ pre.prettyprint { border: none;
|
||||
width: auto; }
|
||||
pre.prettyprint .cpp { color: rgb(150, 150, 255); }
|
||||
pre.prettyprint .ident { color: rgb(0, 100, 0); }
|
||||
pre.prettyprint .flow { color: rgb(200, 100, 0); }
|
||||
pre.prettyprint .literal { color: rgb(100, 0, 0); }
|
||||
footer { padding: 1ex;
|
||||
margin-top: 1em;
|
||||
|
||||
@@ -99,9 +99,9 @@
|
||||
<span class="cpp">#include</span> <span class="literal"><<a href="kcgi.3.html">kcgi.h</a>></span>
|
||||
|
||||
<span class="ident">int</span> main(<span class="ident">void</span>) {
|
||||
struct kreq r;
|
||||
const char *page = <span class="literal">"index"</span>;
|
||||
if (<a href="khttp_parse.3.html">khttp_parse</a>(&r, NULL, 0, &page, 1, 0) != KCGI_OK)
|
||||
<span class="ident">struct</span> kreq r;
|
||||
<span class="ident">const char</span> *page = <span class="literal">"index"</span>;
|
||||
<span class="flow">if</span> (<a href="khttp_parse.3.html">khttp_parse</a>(&r, NULL, 0, &page, 1, 0) != KCGI_OK)
|
||||
return 1;
|
||||
<a href="khttp_head.3.html">khttp_head</a>(&r, kresps[KRESP_STATUS],
|
||||
<span class="literal">"%s"</span>, khttps[KHTTP_200]);
|
||||
@@ -110,7 +110,7 @@
|
||||
<a href="khttp_body.3.html">khttp_body</a>(&r);
|
||||
<a href="khttp_write.3.html">khttp_puts</a>(&r, <span class="literal">"Hello, world!"</span>);
|
||||
<a href="khttp_free.3.html">khttp_free</a>(&r);
|
||||
return 0;
|
||||
<span class="flow">return</span> 0;
|
||||
}</pre>
|
||||
<pre id="comments" class="text prettyprint"><span class="cpp">#include</span> <span class="literal"><sys/types.h></span> /* size_t, ssize_t */
|
||||
<span class="cpp">#include</span> <span class="literal"><stdarg.h></span> /* va_list */
|
||||
@@ -119,8 +119,8 @@
|
||||
<span class="cpp">#include</span> <span class="literal"><<a href="kcgi.3.html">kcgi.h</a>></span>
|
||||
|
||||
<span class="ident">int</span> main(<span class="ident">void</span>) {
|
||||
struct kreq r;
|
||||
const char *page = <span class="literal">"index"</span>;
|
||||
<span class="ident">struct</span> kreq r;
|
||||
<span class="ident">const char</span> *page = <span class="literal">"index"</span>;
|
||||
|
||||
/*
|
||||
* Parse the HTTP environment.
|
||||
@@ -129,7 +129,7 @@
|
||||
* (We don't validate any input fields.)
|
||||
*/
|
||||
|
||||
if (<a href="khttp_parse.3.html">khttp_parse</a>(&r, NULL, 0, &page, 1, 0) != KCGI_OK)
|
||||
<span class="flow">if</span> (<a href="khttp_parse.3.html">khttp_parse</a>(&r, NULL, 0, &page, 1, 0) != KCGI_OK)
|
||||
return 1;
|
||||
|
||||
/*
|
||||
@@ -165,7 +165,7 @@
|
||||
/* Flush the document and free resources. */
|
||||
|
||||
<a href="khttp_free.3.html">khttp_free</a>(&r);
|
||||
return 0;
|
||||
<span class="flow">return</span> 0;
|
||||
}</pre>
|
||||
</figure>
|
||||
<section class="text">
|
||||
|
||||
Reference in new issue
Block a user