summaryrefslogtreecommitdiff
path: root/Build/source/texk/kpathsea/c-proto.h
blob: 281adc195148801f7fbbcee5e758c5b7e61ba3d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
/* c-proto.h: macros to include or discard prototypes.

   Copyright 1999, 2000, 01, 03, 04, 05 Olaf Weber.
   Copyright 1992, 93, 95, 96 Karl Berry.

   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation; either
   version 2.1 of the License, or (at your option) any later version.

   This library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Lesser General Public License for more details.

   You should have received a copy of the GNU Lesser General Public
   License along with this library; if not, write to the Free Software
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

*/

#ifndef KPATHSEA_C_PROTO_H
#define KPATHSEA_C_PROTO_H

#if defined (KPSE_DLL) && (defined (WIN32) || defined (__CYGWIN__))
#ifdef MAKE_KPSE_DLL
#define KPSEDLL __declspec(dllexport)
#else /* ! MAKE_KPSE_DLL */
#define KPSEDLL __declspec(dllimport)
#endif
#else /* ! (KPSE_DLL && (WIN32 || __CYGWIN__)) */
#define KPSEDLL
#endif

/* These macros munge function declarations to make them work in both
   cases.  The P?H macros are used for declarations, the P?C for
   definitions.  Cf. <ansidecl.h> from the GNU C library.  P1H(void)
   also works for definitions of routines which take no args.  */

#ifdef HAVE_PROTOTYPES

#define AA(args) args /* For an arbitrary number; ARGS must be in parens.  */

#define P1H(p1) (p1)
#define P2H(p1,p2) (p1, p2)
#define P3H(p1,p2,p3) (p1, p2, p3)
#define P4H(p1,p2,p3,p4) (p1, p2, p3, p4)
#define P5H(p1,p2,p3,p4,p5) (p1, p2, p3, p4, p5)
#define P6H(p1,p2,p3,p4,p5,p6) (p1, p2, p3, p4, p5, p6)
#define P7H(p1,p2,p3,p4,p5,p6,p7) (p1, p2, p3, p4, p5, p6, p7)
#define P8H(p1,p2,p3,p4,p5,p6,p7,p8) (p1, p2, p3, p4, p5, p6, p7, p8)
#define P9H(p1,p2,p3,p4,p5,p6,p7,p8,p9) (p1, p2, p3, p4, p5, p6, p7, p8, p9)
#define P10H(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10) \
  (p1,p2,p3,p4,p5,p6,p7,p8,p9,p10)
#define P11H(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11) \
  (p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11)
#define P12H(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12) \
  (p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12)
#define P13H(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13) \
  (p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13)
#define P14H(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14) \
  (p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14)
#define P15H(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15) \
  (p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15)
#define P16H(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16) \
  (p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16)
#define P17H(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17) \
  (p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17)


#define P1C(t1,n1)(t1 n1)
#define P2C(t1,n1, t2,n2)(t1 n1, t2 n2)
#define P3C(t1,n1, t2,n2, t3,n3)(t1 n1, t2 n2, t3 n3)
#define P4C(t1,n1, t2,n2, t3,n3, t4,n4)(t1 n1, t2 n2, t3 n3, t4 n4)
#define P5C(t1,n1, t2,n2, t3,n3, t4,n4, t5,n5) \
  (t1 n1, t2 n2, t3 n3, t4 n4, t5 n5)
#define P6C(t1,n1, t2,n2, t3,n3, t4,n4, t5,n5, t6,n6) \
  (t1 n1, t2 n2, t3 n3, t4 n4, t5 n5, t6 n6)
#define P7C(t1,n1, t2,n2, t3,n3, t4,n4, t5,n5, t6,n6, t7,n7) \
  (t1 n1, t2 n2, t3 n3, t4 n4, t5 n5, t6 n6, t7 n7)
#define P8C(t1,n1, t2,n2, t3,n3, t4,n4, t5,n5, t6,n6, t7,n7, t8,n8) \
  (t1 n1, t2 n2, t3 n3, t4 n4, t5 n5, t6 n6, t7 n7, t8 n8)
#define P9C(t1,n1, t2,n2, t3,n3, t4,n4, t5,n5, t6,n6, t7,n7, t8,n8, t9,n9) \
  (t1 n1, t2 n2, t3 n3, t4 n4, t5 n5, t6 n6, t7 n7, t8 n8, t9 n9)
#define P10C(t1,n1,t2,n2,t3,n3,t4,n4,t5,n5,t6,n6,t7,n7,t8,n8,t9,n9,t10,n10) \
  (t1 n1, t2 n2, t3 n3, t4 n4, t5 n5, t6 n6, t7 n7, t8 n8, t9 n9, t10 n10)
#define P11C(t1,n1,t2,n2,t3,n3,t4,n4,t5,n5,t6,n6,t7,n7,t8,n8,t9,n9,t10,n10,t11,n11) \
  (t1 n1, t2 n2, t3 n3, t4 n4, t5 n5, t6 n6, t7 n7, t8 n8, t9 n9, t10 n10, \
   t11 n11)
#define P12C(t1,n1,t2,n2,t3,n3,t4,n4,t5,n5,t6,n6,t7,n7,t8,n8,t9,n9,t10,n10,t11,n11,t12,n12) \
  (t1 n1, t2 n2, t3 n3, t4 n4, t5 n5, t6 n6, t7 n7, t8 n8, t9 n9, t10 n10, \
   t11 n11, t12 n12)
#define P13C(t1,n1,t2,n2,t3,n3,t4,n4,t5,n5,t6,n6,t7,n7,t8,n8,t9,n9,t10,n10,t11,n11,t12,n12,t13,n13) \
  (t1 n1, t2 n2, t3 n3, t4 n4, t5 n5, t6 n6, t7 n7, t8 n8, t9 n9, t10 n10, \
   t11 n11, t12 n12, t13 n13)
#define P14C(t1,n1,t2,n2,t3,n3,t4,n4,t5,n5,t6,n6,t7,n7,t8,n8,t9,n9,t10,n10,t11,n11,t12,n12,t13,n13,t14,n14) \
  (t1 n1, t2 n2, t3 n3, t4 n4, t5 n5, t6 n6, t7 n7, t8 n8, t9 n9, t10 n10, \
   t11 n11, t12 n12, t13 n13, t14 n14)
#define P15C(t1,n1,t2,n2,t3,n3,t4,n4,t5,n5,t6,n6,t7,n7,t8,n8,t9,n9,t10,n10,t11,n11,t12,n12,t13,n13,t14,n14,t15,n15) \
  (t1 n1, t2 n2, t3 n3, t4 n4, t5 n5, t6 n6, t7 n7, t8 n8, t9 n9, t10 n10, \
   t11 n11, t12 n12, t13 n13, t14 n14, t15 n15)
#define P16C(t1,n1,t2,n2,t3,n3,t4,n4,t5,n5,t6,n6,t7,n7,t8,n8,t9,n9,t10,n10,t11,n11,t12,n12,t13,n13,t14,n14,t15,n15,t16,n16) \
  (t1 n1, t2 n2, t3 n3, t4 n4, t5 n5, t6 n6, t7 n7, t8 n8, t9 n9, t10 n10, \
   t11 n11, t12 n12, t13 n13, t14 n14, t15 n15, t16 n16)
#define P17C(t1,n1,t2,n2,t3,n3,t4,n4,t5,n5,t6,n6,t7,n7,t8,n8,t9,n9,t10,n10,t11,n11,t12,n12,t13,n13,t14,n14,t15,n15,t16,n16,t17,n17) \
  (t1 n1, t2 n2, t3 n3, t4 n4, t5 n5, t6 n6, t7 n7, t8 n8, t9 n9, t10 n10, \
   t11 n11, t12 n12, t13 n13, t14 n14, t15 n15, t16 n16, t17 n17)

#else /* not HAVE_PROTOTYPES */

#define AA(args) ()
    
#define P1H(p1) ()
#define P2H(p1, p2) ()
#define P3H(p1, p2, p3) ()
#define P4H(p1, p2, p3, p4) ()
#define P5H(p1, p2, p3, p4, p5) ()
#define P6H(p1, p2, p3, p4, p5, p6) ()
#define P7H(p1, p2, p3, p4, p5, p6, p7) ()
#define P8H(p1, p2, p3, p4, p5, p6, p7, p8) ()
#define P9H(p1, p2, p3, p4, p5, p6, p7, p8, p9) ()
#define P10H(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10) ()
#define P11H(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11) ()
#define P12H(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12) ()
#define P13H(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13) ()
#define P14H(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14) ()
#define P15H(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15) ()
#define P16H(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16) ()
#define P17H(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17) ()

#define P1C(t1,n1) (n1) t1 n1;
#define P2C(t1,n1, t2,n2) (n1,n2) t1 n1; t2 n2;
#define P3C(t1,n1, t2,n2, t3,n3) (n1,n2,n3) t1 n1; t2 n2; t3 n3;
#define P4C(t1,n1, t2,n2, t3,n3, t4,n4) (n1,n2,n3,n4) \
  t1 n1; t2 n2; t3 n3; t4 n4;
#define P5C(t1,n1, t2,n2, t3,n3, t4,n4, t5,n5) (n1,n2,n3,n4,n5) \
  t1 n1; t2 n2; t3 n3; t4 n4; t5 n5;
#define P6C(t1,n1, t2,n2, t3,n3, t4,n4, t5,n5, t6,n6) (n1,n2,n3,n4,n5,n6) \
  t1 n1; t2 n2; t3 n3; t4 n4; t5 n5; t6 n6;
#define P7C(t1,n1, t2,n2, t3,n3, t4,n4, t5,n5, t6,n6, t7,n7) \
  (n1,n2,n3,n4,n5,n6,n7) \
  t1 n1; t2 n2; t3 n3; t4 n4; t5 n5; t6 n6; t7 n7;
#define P8C(t1,n1, t2,n2, t3,n3, t4,n4, t5,n5, t6,n6, t7,n7, t8,n8) \
  (n1,n2,n3,n4,n5,n6,n7,n8) \
  t1 n1; t2 n2; t3 n3; t4 n4; t5 n5; t6 n6; t7 n7; t8 n8;
#define P9C(t1,n1, t2,n2, t3,n3, t4,n4, t5,n5, t6,n6, t7,n7, t8,n8, t9,n9) \
  (n1,n2,n3,n4,n5,n6,n7,n8,n9) \
  t1 n1; t2 n2; t3 n3; t4 n4; t5 n5; t6 n6; t7 n7; t8 n8; t9 n9;
#define P10C(t1,n1,t2,n2,t3,n3,t4,n4,t5,n5,t6,n6,t7,n7,t8,n8,t9,n9,t10,n10) \
  (n1,n2,n3,n4,n5,n6,n7,n8,n9,n10) \
   t1 n1; t2 n2; t3 n3; t4 n4; t5 n5; t6 n6; t7 n7; t8 n8; t9 n9; t10 n10;
#define P11C(t1,n1,t2,n2,t3,n3,t4,n4,t5,n5,t6,n6,t7,n7,t8,n8,t9,n9,t10,n10,t11,n11) \
  (n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11) \
   t1 n1; t2 n2; t3 n3; t4 n4; t5 n5; t6 n6; t7 n7; t8 n8; t9 n9; t10 n10; \
   t11 n11;
#define P12C(t1,n1,t2,n2,t3,n3,t4,n4,t5,n5,t6,n6,t7,n7,t8,n8,t9,n9,t10,n10,t11,n11,t12,n12) \
  (n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12) \
   t1 n1; t2 n2; t3 n3; t4 n4; t5 n5; t6 n6; t7 n7; t8 n8; t9 n9; t10 n10; \
   t11 n11; t12 n12;
#define P13C(t1,n1,t2,n2,t3,n3,t4,n4,t5,n5,t6,n6,t7,n7,t8,n8,t9,n9,t10,n10,t11,n11,t12,n12,t13,n13) \
  (n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13) \
   t1 n1; t2 n2; t3 n3; t4 n4; t5 n5; t6 n6; t7 n7; t8 n8; t9 n9; t10 n10; \
   t11 n11; t12 n12; t13 n13;
#define P14C(t1,n1,t2,n2,t3,n3,t4,n4,t5,n5,t6,n6,t7,n7,t8,n8,t9,n9,t10,n10,t11,n11,t12,n12,t13,n13,t14,n14) \
  (n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14) \
   t1 n1; t2 n2; t3 n3; t4 n4; t5 n5; t6 n6; t7 n7; t8 n8; t9 n9; t10 n10; \
   t11 n11; t12 n12; t13 n13; t14 n14;
#define P15C(t1,n1,t2,n2,t3,n3,t4,n4,t5,n5,t6,n6,t7,n7,t8,n8,t9,n9,t10,n10,t11,n11,t12,n12,t13,n13,t14,n14,t15,n15) \
  (n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15) \
   t1 n1; t2 n2; t3 n3; t4 n4; t5 n5; t6 n6; t7 n7; t8 n8; t9 n9; t10 n10; \
   t11 n11; t12 n12; t13 n13; t14 n14; t15 n15;
#define P16C(t1,n1,t2,n2,t3,n3,t4,n4,t5,n5,t6,n6,t7,n7,t8,n8,t9,n9,t10,n10,t11,n11,t12,n12,t13,n13,t14,n14,t15,n15,t16,n16) \
  (n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16) \
   t1 n1; t2 n2; t3 n3; t4 n4; t5 n5; t6 n6; t7 n7; t8 n8; t9 n9; t10 n10; \
   t11 n11; t12 n12; t13 n13; t14 n14; t15 n15; t16 n16;
#define P17C(t1,n1,t2,n2,t3,n3,t4,n4,t5,n5,t6,n6,t7,n7,t8,n8,t9,n9,t10,n10,t11,n11,t12,n12,t13,n13,t14,n14,t15,n15,t16,n16,t17,n17) \
  (n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17) \
   t1 n1; t2 n2; t3 n3; t4 n4; t5 n5; t6 n6; t7 n7; t8 n8; t9 n9; t10 n10; \
   t11 n11; t12 n12; t13 n13; t14 n14; t15 n15; t16 n16; t17 n17;

#endif /* not HAVE_PROTOTYPES */

#endif /* not KPATHSEA_C_PROTO_H */