Patch by W. Michael Petullo to use autotools for strncpy()
[infodrom/cgilib] / cgiGetValue.3
1 .\" cgiGetValue - Return the value of a CGI variable
2 .\" Copyright (c) 1998,9,2007,8 by Martin Schulze <joey@infodrom.org>
3 .\" 
4 .\" This program is free software; you can redistribute it and/or modify
5 .\" it under the terms of the GNU General Public License as published by
6 .\" the Free Software Foundation; either version 2 of the License, or
7 .\" (at your option) any later version.
8 .\" 
9 .\" This program is distributed in the hope that it will be useful,
10 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
11 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 .\" GNU General Public License for more details.
13 .\" 
14 .\" You should have received a copy of the GNU General Public License
15 .\" along with this program; if not, write to the Free Software Foundation
16 .\" Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 .\"
18 .TH cgiGetValue 3 "6 April 2008" "CGI Library" "Programmer's Manual"
19 .SH NAME
20 cgiGetValue \- Return the value of a CGI variable
21 .SH SYNOPSYS
22 .nf
23 .B #include <cgi.h>
24 .sp
25 .BI "char *cgiGetValue (s_cgi *" parms ", const char *" name );
26 .fi
27 .SH DESCRIPTION
28 This routine returns a pointer to the value of a cgi variable.
29 Encoded characters (%nn) are already decoded.  One must not free the
30 pointer.
31
32 If
33 .B multiple
34 fields are used (i.e. a variable that may contain several values) the
35 value returned contains all these values concatenated together with a
36 newline character as separator.
37
38 Memory allocated by the returned value is automatically freed by the
39 final call to
40 .BR cgiFree (3).
41 .SH "RETURN VALUE"
42 On success a pointer to a string is returned.  If the variable wasn't
43 transmitted through CGI or was empty NULL is returned.
44 .SH "AUTHOR"
45 This CGI library is written by Martin Schulze
46 <joey@infodrom.org>.  If you have additions or improvements
47 please get in touch with him.
48 .SH "SEE ALSO"
49 .BR cgiGetVariables (3),
50 .BR cgiGetCookie (3),
51 .BR cgiGetCookies (3),
52 .BR cgiDebug (3),
53 .BR cgiHeader (3),
54 .BR cgiInit (3),
55 .BR cgiFree (3).