version 2, including all changes.
.
Rev |
Author |
# |
Line |
1 |
perry |
1 |
GLIB-MKENUMS |
|
|
2 |
!!!GLIB-MKENUMS |
|
|
3 |
NAME |
|
|
4 |
SYNOPSIS |
|
|
5 |
DESCRIPTION |
|
|
6 |
INVOCATION |
|
|
7 |
SEE ALSO |
|
|
8 |
BUGS |
|
|
9 |
AUTHOR |
|
|
10 |
---- |
|
|
11 |
!!NAME |
|
|
12 |
|
|
|
13 |
|
|
|
14 |
glib-mkenums - C language enum description generation utility |
|
|
15 |
!!SYNOPSIS |
|
|
16 |
|
|
|
17 |
|
|
|
18 |
__glib-mkenums__ [[''options''] |
|
|
19 |
[[''files...''] |
|
|
20 |
!!DESCRIPTION |
|
|
21 |
|
|
|
22 |
|
|
|
23 |
__glib-mkenums__ is a small perl-script utility that |
|
|
24 |
parses C code to extract enum definitions and produces enum |
|
|
25 |
descriptions based on text templates specified by the user. |
|
|
26 |
Most frequently this script is used to produce C code that |
|
|
27 |
contains enum values as strings so programs can provide |
|
|
28 |
value name strings for introspection. |
|
|
29 |
!!INVOCATION |
|
|
30 |
|
|
|
31 |
|
|
|
32 |
__glib-mkenums__ takes a list of valid C code files as |
|
|
33 |
input. The options specified control the text that is |
|
|
34 |
output, certain substitutions are performed on the text |
|
|
35 |
templates for keywords enclosed in @ |
|
|
36 |
characters. |
|
|
37 |
|
|
|
38 |
|
|
|
39 |
__Options__ |
|
|
40 |
|
|
|
41 |
|
|
|
42 |
''--fhead '' |
|
|
43 |
|
|
|
44 |
|
|
|
45 |
Put out |
|
|
46 |
|
|
|
47 |
|
|
|
48 |
''--fprod '' |
|
|
49 |
|
|
|
50 |
|
|
|
51 |
Put out |
|
|
52 |
|
|
|
53 |
|
|
|
54 |
''--ftail '' |
|
|
55 |
|
|
|
56 |
|
|
|
57 |
Put out |
|
|
58 |
|
|
|
59 |
|
|
|
60 |
''--eprod '' |
|
|
61 |
|
|
|
62 |
|
|
|
63 |
Put out |
|
|
64 |
|
|
|
65 |
|
|
|
66 |
''--vhead '' |
|
|
67 |
|
|
|
68 |
|
|
|
69 |
Put out |
|
|
70 |
|
|
|
71 |
|
|
|
72 |
''--vprod '' |
|
|
73 |
|
|
|
74 |
|
|
|
75 |
Put out |
|
|
76 |
|
|
|
77 |
|
|
|
78 |
''--vtail '' |
|
|
79 |
|
|
|
80 |
|
|
|
81 |
Put out |
|
|
82 |
|
|
|
83 |
|
|
|
84 |
''--comments '' |
|
|
85 |
|
|
|
86 |
|
|
|
87 |
Template for auto-generated comments, the default (for C |
|
|
88 |
code generations) is |
|
|
89 |
|
|
|
90 |
|
|
|
91 |
''-h, --help'' |
|
|
92 |
|
|
|
93 |
|
|
|
94 |
Print brief help and exit. |
|
|
95 |
|
|
|
96 |
|
|
|
97 |
''-v, --version'' |
|
|
98 |
|
|
|
99 |
|
|
|
100 |
Print version and exit. |
|
|
101 |
|
|
|
102 |
|
|
|
103 |
__Production text substitutions__ |
|
|
104 |
|
|
|
105 |
|
|
|
106 |
Certain keywords enclosed in @ characters will be |
|
|
107 |
substituted in the outputted text. For the substitution |
|
|
108 |
examples of the keywords below, the following example enum |
|
|
109 |
definition is assumed: |
|
|
110 |
|
|
|
111 |
|
|
|
112 |
typedef enum |
|
|
113 |
{ |
|
|
114 |
PREFIX_THE_XVALUE = 1 |
|
|
115 |
|
|
|
116 |
|
2 |
perry |
117 |
''@!EnumName@'' |
1 |
perry |
118 |
|
|
|
119 |
|
|
|
120 |
The name of the enum currently being processed, enum names |
|
|
121 |
are assumed to be properly namespaced and to use mixed |
|
|
122 |
capitalization to separate words (e.g. |
|
|
123 |
PrefixTheXEnum). |
|
|
124 |
|
|
|
125 |
|
|
|
126 |
''@enum_name@'' |
|
|
127 |
|
|
|
128 |
|
|
|
129 |
The enum name with words lowercase and word-separated by |
|
|
130 |
underscores (e.g. prefix_the_xenum). |
|
|
131 |
|
|
|
132 |
|
|
|
133 |
''@ENUMNAME@'' |
|
|
134 |
|
|
|
135 |
|
|
|
136 |
The enum name with words uppercase and word-separated by |
|
|
137 |
underscores (e.g. PREFIX_THE_XENUM). |
|
|
138 |
|
|
|
139 |
|
|
|
140 |
''@ENUMSHORT@'' |
|
|
141 |
|
|
|
142 |
|
|
|
143 |
The enum name with words uppercase and word-separated by |
|
|
144 |
underscores, prefix stripped (e.g. THE_XENUM). |
|
|
145 |
|
|
|
146 |
|
|
|
147 |
''@VALUENAME@'' |
|
|
148 |
|
|
|
149 |
|
|
|
150 |
The enum value name currently being processed with words |
|
|
151 |
uppercase and word-separated by underscores, this is the |
|
|
152 |
assumed literal notation of enum values in the C sources |
|
|
153 |
(e.g. PREFIX_THE_XVALUE). |
|
|
154 |
|
|
|
155 |
|
|
|
156 |
''@valuenick@'' |
|
|
157 |
|
|
|
158 |
|
|
|
159 |
A nick name for the enum value currently being processed, |
|
|
160 |
this is usually generated by stripping common prefix words |
|
|
161 |
of all the enum values of the current enum, the words are |
|
|
162 |
lowercase and underscores are substituted by a minus (e.g. |
|
|
163 |
the-xvalue). |
|
|
164 |
|
|
|
165 |
|
|
|
166 |
''@type@'' |
|
|
167 |
|
|
|
168 |
|
|
|
169 |
This is substituted either by |
|
|
170 |
|
|
|
171 |
|
|
|
172 |
''@Type@'' |
|
|
173 |
|
|
|
174 |
|
|
|
175 |
The same as ''@type@'' with the first letter capitalized |
|
|
176 |
(e.g. Flags). |
|
|
177 |
|
|
|
178 |
|
|
|
179 |
''@TYPE@'' |
|
|
180 |
|
|
|
181 |
|
|
|
182 |
The same as ''@type@'' with all letters uppercased (e.g. |
|
|
183 |
FLAGS). |
|
|
184 |
|
|
|
185 |
|
|
|
186 |
''@filename@'' |
|
|
187 |
|
|
|
188 |
|
|
|
189 |
The name of the input file currently being processed (e.g. |
|
|
190 |
foo.h). |
|
|
191 |
|
|
|
192 |
|
|
|
193 |
__Trigraph extensions__ |
|
|
194 |
|
|
|
195 |
|
|
|
196 |
Some C comments are treated specially in the parsed enum |
|
|
197 |
definitions, such comments start out with the trigraph |
|
|
198 |
sequence |
|
|
199 |
|
|
|
200 |
|
|
|
201 |
typedef enum /* |
|
|
202 |
!!SEE ALSO |
|
|
203 |
|
|
|
204 |
|
|
|
205 |
__glib-genmarshal(1)__ |
|
|
206 |
!!BUGS |
|
|
207 |
|
|
|
208 |
|
|
|
209 |
None known yet. |
|
|
210 |
!!AUTHOR |
|
|
211 |
|
|
|
212 |
|
|
|
213 |
__glib-mkenums__ was written by Tim Janik |
|
|
214 |
__ |
|
|
215 |
|
|
|
216 |
|
|
|
217 |
This manual page was provided by Tim Janik |
|
|
218 |
---- |