6 typedef int (*page_callback_t) (void *user_data);
8 struct page_callbacks_s
10 page_callback_t top_left;
11 page_callback_t top_center;
12 page_callback_t top_right;
13 page_callback_t middle_left;
14 page_callback_t middle_center;
15 page_callback_t middle_right;
16 page_callback_t bottom_left;
17 page_callback_t bottom_center;
18 page_callback_t bottom_right;
20 typedef struct page_callbacks_s page_callbacks_t;
23 typedef struct param_list_s param_list_t;
25 #define PAGE_CALLBACKS_INIT \
30 int param_init (void);
31 void param_finish (void);
33 const char *param (const char *key);
35 /* Create a new parameter list from "query_string". If "query_string" is NULL,
36 * the "QUERY_STRING" will be used. */
37 param_list_t *param_create (const char *query_string);
38 param_list_t *param_clone (param_list_t *pl);
39 void param_destroy (param_list_t *pl);
40 const char *param_get (param_list_t *pl, const char *name);
41 int param_set (param_list_t *pl,
42 const char *name, const char *value);
43 char *param_as_string (param_list_t *pl);
44 int param_print_hidden (param_list_t *pl);
46 char *uri_escape (const char *string);
47 char *uri_escape_buffer (char *buffer, size_t buffer_size);
48 char *uri_escape_copy (char *dest, const char *src, size_t n);
50 const char *script_name (void);
52 int time_to_rfc1123 (time_t t, char *buffer, size_t buffer_size);
54 char *html_escape (const char *string);
55 char *html_escape_buffer (char *buffer, size_t buffer_size);
56 char *html_escape_copy (char *dest, const char *src, size_t n);
58 int html_print_page (const char *title,
59 const page_callbacks_t *cb, void *user_data);
61 int html_print_search_box (void *user_data);
63 /* vim: set sw=2 sts=2 et fdm=marker : */
64 #endif /* UTILS_CGI_H */