OSDN Git Service

shipout routines.
[putex/putex.git] / src / texsourc / c-proto.h
1 /* c-proto.h: macros to include or discard prototypes.
2
3    Copyright 1992 Karl Berry
4    Copyright 2007 TeX Users Group
5    Copyright 2014 Clerk Ma
6
7    This program is free software; you can redistribute it and/or modify
8    it under the terms of the GNU General Public License as published by
9    the Free Software Foundation; either version 2 of the License, or
10    (at your option) any later version.
11
12    This program is distributed in the hope that it will be useful, but
13    WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15    General Public License for more details.
16
17    You should have received a copy of the GNU General Public License
18    along with this program; if not, write to the Free Software
19    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
20    02110-1301 USA.  */
21
22 #ifndef C_PROTO_H
23 #define C_PROTO_H
24
25 /* Although most of the code here is written in GNU C, a few files are
26    shared with other distributions (TeX, xdvi, dvips), and so need to be
27    compilable with common C, also.  Here are macros which play around
28    with function declarations to make them work in both cases.  The P?H
29    macros are used for declarations, the P?C for definitions.  */
30
31 #if __STDC__
32
33   #define P1H(p1) (p1)
34   #define P2H(p1,p2) (p1, p2)
35   #define P3H(p1,p2,p3) (p1, p2, p3)
36   #define P4H(p1,p2,p3,p4) (p1, p2, p3, p4)
37   #define P5H(p1,p2,p3,p4,p5) (p1, p2, p3, p4, p5)
38
39   #define P1C(t1,n1)(t1 n1)
40   #define P2C(t1,n1, t2,n2)(t1 n1, t2 n2)
41   #define P3C(t1,n1, t2,n2, t3,n3)(t1 n1, t2 n2, t3 n3)
42   #define P4C(t1,n1, t2,n2, t3,n3, t4,n4)(t1 n1, t2 n2, t3 n3, t4 n4)
43   #define P5C(t1,n1, t2,n2, t3,n3, t4,n4, t5,n5) \
44     (t1 n1, t2 n2, t3 n3, t4 n4, t5 n5)
45
46 #else /* not __STDC__ */
47
48   #define P1H(p1) ()
49   #define P2H(p1, p2) ()
50   #define P3H(p1, p2, p3) ()
51   #define P4H(p1, p2, p3, p4) ()
52   #define P5H(p1, p2, p3, p4, p5) ()
53
54   #define P1C(t1,n1) (n1) t1 n1;
55   #define P2C(t1,n1, t2,n2) (n1, n2) t1 n1; t2 n2;
56   #define P3C(t1,n1, t2,n2, t3,n3) (n1, n2, n3) t1 n1; t2 n2; t3 n3;
57   #define P4C(t1,n1, t2,n2, t3,n3, t4,n4) (n1, n2, n3, n4) \
58     t1 n1; t2 n2; t3 n3; t4 n4;
59   #define P5C(t1,n1, t2,n2, t3,n3, t4,n4, t5,n5) (n1, n2, n3, n4, n5) \
60     t1 n1; t2 n2; t3 n3; t4 n4; t5 n5;
61
62 #endif /* not __STDC__ */
63
64 #endif /* not C_PROTO_H */