Switch to autotools: CHANGES renamed into ChangeLog
[infodrom/cgilib] / cgiGetFile.3
1 .\" cgiGetValue - Return the value of a CGI variable
2 .\" Copyright (c) 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 cgiGetFile \- Return information of a CGI file variable
21 .SH SYNOPSYS
22 .nf
23 .B #include <cgi.h>
24 .sp
25 .BI "s_file *cgiGetFile (s_cgi *" parms ", const char *" name );
26 .fi
27 .SH DESCRIPTION
28 This routine returns a pointer to a datastructure associated with the
29 value of a CGI file variable.  The pointer must not be freed.
30
31 The
32 .I s_file
33 structure is declared as follows:
34
35 .RS
36 .nf
37 typedef struct file_s {
38     char   *name,
39            *type,
40            *filename,
41            *tmpfile;
42 } s_file;
43 .fi
44 .RE
45
46 Memory allocated by this data structure is automatically freed by the
47 final call to
48 .BR cgiFree (3).
49 .SH "RETURN VALUE"
50 On success a pointer to the
51 .I s_file
52 datastructure is returned.  If the variable wasn't transmitted or the
53 through CGI or if the filename was empty NULL is returned.
54 .SH "AUTHOR"
55 This CGI library is written by Martin Schulze
56 <joey@infodrom.org>.  If you have additions or improvements
57 please get in touch with him.
58 .SH "SEE ALSO"
59 .BR cgiGetFiles (3),
60 .BR cgiGetVariables (3),
61 .BR cgiGetCookies (3),
62 .BR cgiDebug (3),
63 .BR cgiInit (3),
64 .BR cgiFree (3).