/* */
1 /*
2 * Copyright (c) 2004, 2008, 2011 Tama Communications Corporation
3 *
4 * This file is part of GNU GLOBAL.
5 *
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19 #ifndef _COMMON_H_
20 #define _COMMON_H_
21
22 /*
23 * Parameter values.
24 */
25 /**
26 * @name Defines for gen_image()
27 * See: gen_image()
28 */
29 /** @{ */
30 #define CURRENT 0
31 #define PARENT 1
32 /** @} */
33
34 /**
35 * @name Defines for gen_page_begin()
36 * See: gen_page_begin()
37 */
38 /** @{ */
39 #define TOPDIR 0
40 #define SUBDIR 1
41 #define CGIDIR 2
42 /** @} */
43
44 /*
45 * tag
46 */
47 extern const char *html_begin;
48 extern const char *html_end;
49 extern const char *html_head_begin;
50 extern const char *html_head_end;
51 extern const char *html_title_begin;
52 extern const char *html_title_end;
53 extern const char *body_begin;
54 extern const char *body_end;
55 extern const char *title_begin;
56 extern const char *title_end;
57 extern const char *header_begin;
58 extern const char *header_end;
59 extern const char *poweredby_begin;
60 extern const char *poweredby_end;
61 extern const char *cvslink_begin;
62 extern const char *cvslink_end;
63 extern const char *caution_begin;
64 extern const char *caution_end;
65 extern const char *list_begin;
66 extern const char *list_end;
67 extern const char *item_begin;
68 extern const char *item_end;
69 extern const char *flist_begin;
70 extern const char *flist_end;
71 extern const char *fline_begin;
72 extern const char *fline_end;
73 extern const char *fitem_begin;
74 extern const char *fitem_end;
75 extern const char *define_list_begin;
76 extern const char *define_list_end;
77 extern const char *define_term_begin;
78 extern const char *define_term_end;
79 extern const char *define_desc_begin;
80 extern const char *define_desc_end;
81 extern const char *table_begin;
82 extern const char *table_end;
83 extern const char *verbatim_begin;
84 extern const char *verbatim_end;
85 extern const char *comment_begin;
86 extern const char *comment_end;
87 extern const char *sharp_begin;
88 extern const char *sharp_end;
89 extern const char *brace_begin;
90 extern const char *brace_end;
91 extern const char *reserved_begin;
92 extern const char *reserved_end;
93 extern const char *position_begin;
94 extern const char *position_end;
95 extern const char *warned_line_begin;
96 extern const char *warned_line_end;
97 extern const char *error_begin;
98 extern const char *error_end;
99 extern const char *message_begin;
100 extern const char *message_end;
101 extern const char *string_begin;
102 extern const char *string_end;
103 extern const char *quote_great;
104 extern const char *quote_little;
105 extern const char *quote_amp;
106 extern const char *quote_space;
107 extern const char *hr;
108 extern const char *br;
109 extern const char *empty_element;
110 extern const char *noframes_begin;
111 extern const char *noframes_end;
112
113 extern const char *tree_control;
114 extern const char *tree_begin;
115 extern const char *tree_begin_using;
116 extern const char *tree_end;
117 extern const char *dir_begin;
118 extern const char *dir_end;
119 extern const char *file_begin;
120 extern const char *file_end;
121
122 extern const char *guide_begin;
123 extern const char *guide_end;
124 extern const char *guide_unit_begin;
125 extern const char *guide_unit_end;
126 extern const char *guide_path_begin;
127 extern const char *guide_path_end;
128
129 int fputs_nl(const char *, FILE *);
130 void setup_xhtml(void);
131 void save_current_path(const char *);
132 char *get_current_dir(void);
133 char *get_current_file(void);
134 const char *upperdir(const char *);
135 const char *gen_insert_header(int);
136 const char *gen_insert_footer(int);
137 const char *gen_page_begin(const char *, int);
138 const char *gen_page_index_begin(const char *, const char *);
139 const char *gen_page_frameset_begin(const char *);
140 const char *gen_page_end(void);
141 const char *gen_image(int, const char *, const char *);
142 const char *gen_name_number(int);
143 const char *gen_name_string(const char *);
144 const char *gen_href_begin_with_title_target(const char *, const char *, const char *, const char *, const char *, const char *);
145 const char *gen_href_begin_with_title(const char *, const char *, const char *, const char *, const char *);
146 const char *gen_href_begin(const char *, const char *, const char *, const char *);
147 const char *gen_href_begin_simple(const char *);
148 const char *gen_href_end(void);
149 const char *gen_list_begin(void);
150 const char *gen_list_body(const char *, const char *, const char *);
151 const char *gen_list_end(void);
152 const char *gen_form_begin(const char *);
153 const char *gen_form_end(void);
154 const char *gen_input(const char *, const char *, const char *);
155 const char *gen_input_radio(const char *, const char *, int, const char *);
156 const char *gen_input_checkbox(const char *, const char *, const char *);
157 const char *gen_input_with_title_checked(const char *, const char *, const char *, int, const char *);
158 const char *gen_frameset_begin(const char *);
159 const char *gen_frameset_end(void);
160 const char *gen_frame(const char *, const char *);
161 /* const char *fix_attr_value(const char *); */
162
163 #endif /* ! _COMMON_H_ */
/* */