Mercurial > MadButterfly
annotate tools/mb_c_header.m4 @ 63:f4b792afa74e
m4 translator
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Tue, 12 Aug 2008 14:21:09 +0800 |
parents | 7d976d925431 |
children | c668c5c3ceae |
rev | line source |
---|---|
62
7d976d925431
Generate C header files for SVG files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
1 changequote(`[', `]')dnl |
63 | 2 divert([-1]) |
3 | |
4 define([ADD_LINEAR_PAINT],[[ | |
5 paint_t *$1; | |
6 ]]) | |
7 | |
8 define([ADD_RADIAL_PAINT],[[ | |
9 paint_t *$1; | |
10 ]]) | |
11 define([ADD_PATH],[ | |
12 [ shape_t *$1; | |
13 ]]) | |
14 define([ADD_RECT],[ | |
15 [ shape_t *$1; | |
16 ]]) | |
17 define([ADD_COORD],[ | |
18 [ coord_t *$1; | |
19 ]]) | |
20 define([COLOR_STOP],[ ]) | |
21 | |
22 define([REF_STOPS],) | |
23 define([FILL_SHAPE],) | |
24 define([STROKE_SHAPE],) | |
25 define([FILL_SHAPE_WITH_PAINT],) | |
26 define([STROKE_SHAPE_WITH_PAINT],) | |
27 | |
62
7d976d925431
Generate C header files for SVG files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
28 define([MADBUTTERFLY],[dnl |
7d976d925431
Generate C header files for SVG files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
29 [#ifndef __$1_H_ |
7d976d925431
Generate C header files for SVG files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
30 #define __$1_H_] |
7d976d925431
Generate C header files for SVG files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
31 |
7d976d925431
Generate C header files for SVG files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
32 [typedef struct $1 $1_t;] |
7d976d925431
Generate C header files for SVG files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
33 |
7d976d925431
Generate C header files for SVG files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
34 struct [$1] { |
63 | 35 $2[]dnl |
62
7d976d925431
Generate C header files for SVG files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
36 }; |
7d976d925431
Generate C header files for SVG files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
37 |
7d976d925431
Generate C header files for SVG files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
38 [#endif /* __$1_H_ */] |
63 | 39 ]) |
40 divert[]dnl |