]> the.earth.li Git - onak.git/blob - cgi/getcgi.h
Move the CGI specific routines into cgi/ and split out UID escaping
[onak.git] / cgi / getcgi.h
1 /*
2  * getcgivars.c - routine to read CGI input variables into an array.
3  *
4  * Copyright 2002 Jonathan McDowell <noodles@earth.li>
5  *
6  * This program is free software: you can redistribute it and/or modify it
7  * under the terms of the GNU General Public License as published by the Free
8  * Software Foundation; version 2 of the License.
9  *
10  * This program is distributed in the hope that it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13  * more details.
14  *
15  * You should have received a copy of the GNU General Public License along with
16  * this program.  If not, see <https://www.gnu.org/licenses/>.
17  */
18
19 #ifndef __GETCGI_H_
20 #define __GETCGI_H_
21
22 /*
23  *      start_html - Start HTML output.
24  *      @title: The title for the HTML.
25  *
26  *      Takes a title string and starts HTML output, including the
27  *      Content-Type header all the way up to <BODY>.
28  */
29 void start_html(const char *title);
30
31 /*
32  *      end_html - End HTML output.
33  *
34  *      Ends HTML output - closes the BODY and HTML tags.
35  */
36 void end_html(void);
37
38 char x2c(const char *what); 
39 void unescape_url(char *url); 
40 char **getcgivars(int argc, char *argv[]);
41
42 /**
43  *      cleanupcgi - free the memory allocated for our CGI parameters.
44  *      @cgivars: The CGI parameter list to free.
45  *
46  *      Frees up the elements of the CGI parameter array and then frees the
47  *      array.
48  */
49 void cleanupcgi(char **cgivars);
50
51 #endif /* __GETCGI_H_ */