Add to git.
[pthrlib.git] / doc / new_cgi.3.html
1 <html>
2 <head>
3 <meta name="generator" content="groff -Thtml, see www.gnu.org">
4 <meta name="Content-Style" content="text/css">
5 <title>new_cgi</title>
6 </head>
7 <body>
8
9 <h1 align=center>new_cgi</h1>
10 <a href="#NAME">NAME</a><br>
11 <a href="#SYNOPSIS">SYNOPSIS</a><br>
12 <a href="#DESCRIPTION">DESCRIPTION</a><br>
13 <a href="#AUTHOR">AUTHOR</a><br>
14 <a href="#LICENSE">LICENSE</a><br>
15 <a href="#VERSION">VERSION</a><br>
16 <a href="#SEE ALSO">SEE ALSO</a><br>
17
18 <hr>
19 <!-- Creator     : groff version 1.17.2 -->
20 <!-- CreationDate: Fri Aug 30 16:16:29 2002 -->
21 <a name="NAME"></a>
22 <h2>NAME</h2>
23 <table width="100%" border=0 rules="none" frame="void"
24        cols="2" cellspacing="0" cellpadding="0">
25 <tr valign="top" align="left">
26 <td width="10%"></td><td width="90%">
27 new_cgi, cgi_params, cgi_param, cgi_param_list, cgi_erase, copy_cgi - Library for parsing CGI query strings.</td></table>
28 <a name="SYNOPSIS"></a>
29 <h2>SYNOPSIS</h2>
30
31 <table width="100%" border=0 rules="none" frame="void"
32        cols="2" cellspacing="0" cellpadding="0">
33 <tr valign="top" align="left">
34 <td width="10%"></td><td width="90%">
35 <pre><b>#include &lt;pthr_cgi.h&gt;
36
37 cgi new_cgi (pool, http_request, io_handle);
38 vector cgi_params (cgi);
39 const char *cgi_param (cgi, const char *name);
40 const vector cgi_param_list (cgi, const char *name);
41 int cgi_erase (cgi, const char *name);
42 cgi copy_cgi (pool, cgi);
43 </b></pre></td></table>
44 <a name="DESCRIPTION"></a>
45 <h2>DESCRIPTION</h2>
46
47 <table width="100%" border=0 rules="none" frame="void"
48        cols="2" cellspacing="0" cellpadding="0">
49 <tr valign="top" align="left">
50 <td width="10%"></td><td width="90%">
51 <b>new_cgi</b> creates a new CGI object from an existing
52 HTTP request. It reads the query string or POSTed parameters
53 and parses them internally. CGI parameters are case
54 sensitive, and multiple parameters may be passed with the
55 same name. Parameter values are automatically unescaped by
56 the library before you get to see them.</td></table>
57
58 <table width="100%" border=0 rules="none" frame="void"
59        cols="2" cellspacing="0" cellpadding="0">
60 <tr valign="top" align="left">
61 <td width="10%"></td><td width="90%">
62 <b>cgi_params</b> returns a list of all the names of the
63 parameters passed to the script. The list is returned as a
64 <b>vector</b> of <b>char *</b>.</td></table>
65
66 <table width="100%" border=0 rules="none" frame="void"
67        cols="2" cellspacing="0" cellpadding="0">
68 <tr valign="top" align="left">
69 <td width="10%"></td><td width="90%">
70 <b>cgi_param</b> returns the value of a single named CGI
71 parameter, or <b>NULL</b> if there is no such parameter. If
72 multiple parameters were given with the same name, this
73 returns one of them, essentially at random.</td></table>
74
75 <table width="100%" border=0 rules="none" frame="void"
76        cols="2" cellspacing="0" cellpadding="0">
77 <tr valign="top" align="left">
78 <td width="10%"></td><td width="90%">
79 <b>cgi_param_list</b> returns the list of values of the
80 named CGI parameter. The list is returned as a <b>vector</b>
81 of <b>char *</b>.</td></table>
82
83 <table width="100%" border=0 rules="none" frame="void"
84        cols="2" cellspacing="0" cellpadding="0">
85 <tr valign="top" align="left">
86 <td width="10%"></td><td width="90%">
87 <b>cgi_erase</b> erases the named parameter. If a parameter
88 was erased, this returns true, else this returns
89 false.</td></table>
90
91 <table width="100%" border=0 rules="none" frame="void"
92        cols="2" cellspacing="0" cellpadding="0">
93 <tr valign="top" align="left">
94 <td width="10%"></td><td width="90%">
95 <b>copy_cgi</b> copies <b>cgi</b> into pool
96 <b>pool</b>.</td></table>
97 <a name="AUTHOR"></a>
98 <h2>AUTHOR</h2>
99
100 <table width="100%" border=0 rules="none" frame="void"
101        cols="2" cellspacing="0" cellpadding="0">
102 <tr valign="top" align="left">
103 <td width="10%"></td><td width="90%">
104 Richard Jones &lt;rich@annexia.org&gt;</td></table>
105 <a name="LICENSE"></a>
106 <h2>LICENSE</h2>
107
108 <table width="100%" border=0 rules="none" frame="void"
109        cols="2" cellspacing="0" cellpadding="0">
110 <tr valign="top" align="left">
111 <td width="10%"></td><td width="90%">
112 GNU LGPL (see http://www.gnu.org/)</td></table>
113 <a name="VERSION"></a>
114 <h2>VERSION</h2>
115
116 <table width="100%" border=0 rules="none" frame="void"
117        cols="2" cellspacing="0" cellpadding="0">
118 <tr valign="top" align="left">
119 <td width="10%"></td><td width="90%">
120 pthrlib-3.0.3</td></table>
121 <a name="SEE ALSO"></a>
122 <h2>SEE ALSO</h2>
123
124 <table width="100%" border=0 rules="none" frame="void"
125        cols="2" cellspacing="0" cellpadding="0">
126 <tr valign="top" align="left">
127 <td width="10%"></td><td width="90%">
128 <b>cgi_get_post_max(3)</b>, <b>cgi_escape(3)</b>,
129 <b>new_http_request(3)</b>.</td></table>
130 <hr>
131 </body>
132 </html>