Back to index

tetex-bin  3.0
c-proto.h
Go to the documentation of this file.
00001 /* c-proto.h: macros to include or discard prototypes.
00002 
00003 Copyright (C) 1992, 93, 95, 96, 2000 Free Software Foundation, Inc.
00004 
00005 This library is free software; you can redistribute it and/or
00006 modify it under the terms of the GNU Library General Public
00007 License as published by the Free Software Foundation; either
00008 version 2 of the License, or (at your option) any later version.
00009 
00010 This library is distributed in the hope that it will be useful,
00011 but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013 Library General Public License for more details.
00014 
00015 You should have received a copy of the GNU Library General Public
00016 License along with this library; if not, write to the Free Software
00017 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
00018 
00019 #ifndef KPATHSEA_C_PROTO_H
00020 #define KPATHSEA_C_PROTO_H
00021 
00022 #if defined (KPSE_DLL) && (defined (WIN32) || defined (__CYGWIN__))
00023 #ifdef MAKE_KPSE_DLL
00024 #define KPSEDLL __declspec(dllexport)
00025 #else /* ! MAKE_KPSE_DLL */
00026 #define KPSEDLL __declspec(dllimport)
00027 #endif
00028 #else /* ! (KPSE_DLL && (WIN32 || __CYGWIN__)) */
00029 #define KPSEDLL
00030 #endif
00031 
00032 /* These macros munge function declarations to make them work in both
00033    cases.  The P?H macros are used for declarations, the P?C for
00034    definitions.  Cf. <ansidecl.h> from the GNU C library.  P1H(void)
00035    also works for definitions of routines which take no args.  */
00036 
00037 #ifdef HAVE_PROTOTYPES
00038 
00039 #define AA(args) args /* For an arbitrary number; ARGS must be in parens.  */
00040 
00041 #define P1H(p1) (p1)
00042 #define P2H(p1,p2) (p1, p2)
00043 #define P3H(p1,p2,p3) (p1, p2, p3)
00044 #define P4H(p1,p2,p3,p4) (p1, p2, p3, p4)
00045 #define P5H(p1,p2,p3,p4,p5) (p1, p2, p3, p4, p5)
00046 #define P6H(p1,p2,p3,p4,p5,p6) (p1, p2, p3, p4, p5, p6)
00047 #define P7H(p1,p2,p3,p4,p5,p6,p7) (p1, p2, p3, p4, p5, p6, p7)
00048 #define P8H(p1,p2,p3,p4,p5,p6,p7,p8) (p1, p2, p3, p4, p5, p6, p7, p8)
00049 #define P9H(p1,p2,p3,p4,p5,p6,p7,p8,p9) (p1, p2, p3, p4, p5, p6, p7, p8, p9)
00050 #define P10H(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10) \
00051   (p1,p2,p3,p4,p5,p6,p7,p8,p9,p10)
00052 #define P11H(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11) \
00053   (p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11)
00054 #define P12H(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12) \
00055   (p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12)
00056 #define P13H(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13) \
00057   (p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13)
00058 #define P14H(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14) \
00059   (p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14)
00060 #define P15H(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15) \
00061   (p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15)
00062 #define P16H(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16) \
00063   (p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16)
00064 #define P17H(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17) \
00065   (p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17)
00066 
00067 
00068 #define P1C(t1,n1)(t1 n1)
00069 #define P2C(t1,n1, t2,n2)(t1 n1, t2 n2)
00070 #define P3C(t1,n1, t2,n2, t3,n3)(t1 n1, t2 n2, t3 n3)
00071 #define P4C(t1,n1, t2,n2, t3,n3, t4,n4)(t1 n1, t2 n2, t3 n3, t4 n4)
00072 #define P5C(t1,n1, t2,n2, t3,n3, t4,n4, t5,n5) \
00073   (t1 n1, t2 n2, t3 n3, t4 n4, t5 n5)
00074 #define P6C(t1,n1, t2,n2, t3,n3, t4,n4, t5,n5, t6,n6) \
00075   (t1 n1, t2 n2, t3 n3, t4 n4, t5 n5, t6 n6)
00076 #define P7C(t1,n1, t2,n2, t3,n3, t4,n4, t5,n5, t6,n6, t7,n7) \
00077   (t1 n1, t2 n2, t3 n3, t4 n4, t5 n5, t6 n6, t7 n7)
00078 #define P8C(t1,n1, t2,n2, t3,n3, t4,n4, t5,n5, t6,n6, t7,n7, t8,n8) \
00079   (t1 n1, t2 n2, t3 n3, t4 n4, t5 n5, t6 n6, t7 n7, t8 n8)
00080 #define P9C(t1,n1, t2,n2, t3,n3, t4,n4, t5,n5, t6,n6, t7,n7, t8,n8, t9,n9) \
00081   (t1 n1, t2 n2, t3 n3, t4 n4, t5 n5, t6 n6, t7 n7, t8 n8, t9 n9)
00082 #define P10C(t1,n1,t2,n2,t3,n3,t4,n4,t5,n5,t6,n6,t7,n7,t8,n8,t9,n9,t10,n10) \
00083   (t1 n1, t2 n2, t3 n3, t4 n4, t5 n5, t6 n6, t7 n7, t8 n8, t9 n9, t10 n10)
00084 #define P11C(t1,n1,t2,n2,t3,n3,t4,n4,t5,n5,t6,n6,t7,n7,t8,n8,t9,n9,t10,n10,t11,n11) \
00085   (t1 n1, t2 n2, t3 n3, t4 n4, t5 n5, t6 n6, t7 n7, t8 n8, t9 n9, t10 n10, \
00086    t11 n11)
00087 #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) \
00088   (t1 n1, t2 n2, t3 n3, t4 n4, t5 n5, t6 n6, t7 n7, t8 n8, t9 n9, t10 n10, \
00089    t11 n11, t12 n12)
00090 #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) \
00091   (t1 n1, t2 n2, t3 n3, t4 n4, t5 n5, t6 n6, t7 n7, t8 n8, t9 n9, t10 n10, \
00092    t11 n11, t12 n12, t13 n13)
00093 #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) \
00094   (t1 n1, t2 n2, t3 n3, t4 n4, t5 n5, t6 n6, t7 n7, t8 n8, t9 n9, t10 n10, \
00095    t11 n11, t12 n12, t13 n13, t14 n14)
00096 #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) \
00097   (t1 n1, t2 n2, t3 n3, t4 n4, t5 n5, t6 n6, t7 n7, t8 n8, t9 n9, t10 n10, \
00098    t11 n11, t12 n12, t13 n13, t14 n14, t15 n15)
00099 #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) \
00100   (t1 n1, t2 n2, t3 n3, t4 n4, t5 n5, t6 n6, t7 n7, t8 n8, t9 n9, t10 n10, \
00101    t11 n11, t12 n12, t13 n13, t14 n14, t15 n15, t16 n16)
00102 #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) \
00103   (t1 n1, t2 n2, t3 n3, t4 n4, t5 n5, t6 n6, t7 n7, t8 n8, t9 n9, t10 n10, \
00104    t11 n11, t12 n12, t13 n13, t14 n14, t15 n15, t16 n16, t17 n17)
00105 
00106 #else /* not HAVE_PROTOTYPES */
00107 
00108 #define AA(args) ()
00109     
00110 #define P1H(p1) ()
00111 #define P2H(p1, p2) ()
00112 #define P3H(p1, p2, p3) ()
00113 #define P4H(p1, p2, p3, p4) ()
00114 #define P5H(p1, p2, p3, p4, p5) ()
00115 #define P6H(p1, p2, p3, p4, p5, p6) ()
00116 #define P7H(p1, p2, p3, p4, p5, p6, p7) ()
00117 #define P8H(p1, p2, p3, p4, p5, p6, p7, p8) ()
00118 #define P9H(p1, p2, p3, p4, p5, p6, p7, p8, p9) ()
00119 #define P10H(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10) ()
00120 #define P11H(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11) ()
00121 #define P12H(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12) ()
00122 #define P13H(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13) ()
00123 #define P14H(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14) ()
00124 #define P15H(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15) ()
00125 #define P16H(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16) ()
00126 #define P17H(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17) ()
00127 
00128 #define P1C(t1,n1) (n1) t1 n1;
00129 #define P2C(t1,n1, t2,n2) (n1,n2) t1 n1; t2 n2;
00130 #define P3C(t1,n1, t2,n2, t3,n3) (n1,n2,n3) t1 n1; t2 n2; t3 n3;
00131 #define P4C(t1,n1, t2,n2, t3,n3, t4,n4) (n1,n2,n3,n4) \
00132   t1 n1; t2 n2; t3 n3; t4 n4;
00133 #define P5C(t1,n1, t2,n2, t3,n3, t4,n4, t5,n5) (n1,n2,n3,n4,n5) \
00134   t1 n1; t2 n2; t3 n3; t4 n4; t5 n5;
00135 #define P6C(t1,n1, t2,n2, t3,n3, t4,n4, t5,n5, t6,n6) (n1,n2,n3,n4,n5,n6) \
00136   t1 n1; t2 n2; t3 n3; t4 n4; t5 n5; t6 n6;
00137 #define P7C(t1,n1, t2,n2, t3,n3, t4,n4, t5,n5, t6,n6, t7,n7) \
00138   (n1,n2,n3,n4,n5,n6,n7) \
00139   t1 n1; t2 n2; t3 n3; t4 n4; t5 n5; t6 n6; t7 n7;
00140 #define P8C(t1,n1, t2,n2, t3,n3, t4,n4, t5,n5, t6,n6, t7,n7, t8,n8) \
00141   (n1,n2,n3,n4,n5,n6,n7,n8) \
00142   t1 n1; t2 n2; t3 n3; t4 n4; t5 n5; t6 n6; t7 n7; t8 n8;
00143 #define P9C(t1,n1, t2,n2, t3,n3, t4,n4, t5,n5, t6,n6, t7,n7, t8,n8, t9,n9) \
00144   (n1,n2,n3,n4,n5,n6,n7,n8,n9) \
00145   t1 n1; t2 n2; t3 n3; t4 n4; t5 n5; t6 n6; t7 n7; t8 n8; t9 n9;
00146 #define P10C(t1,n1,t2,n2,t3,n3,t4,n4,t5,n5,t6,n6,t7,n7,t8,n8,t9,n9,t10,n10) \
00147   (n1,n2,n3,n4,n5,n6,n7,n8,n9,n10) \
00148    t1 n1; t2 n2; t3 n3; t4 n4; t5 n5; t6 n6; t7 n7; t8 n8; t9 n9; t10 n10;
00149 #define P11C(t1,n1,t2,n2,t3,n3,t4,n4,t5,n5,t6,n6,t7,n7,t8,n8,t9,n9,t10,n10,t11,n11) \
00150   (n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11) \
00151    t1 n1; t2 n2; t3 n3; t4 n4; t5 n5; t6 n6; t7 n7; t8 n8; t9 n9; t10 n10; \
00152    t11 n11;
00153 #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) \
00154   (n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12) \
00155    t1 n1; t2 n2; t3 n3; t4 n4; t5 n5; t6 n6; t7 n7; t8 n8; t9 n9; t10 n10; \
00156    t11 n11; t12 n12;
00157 #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) \
00158   (n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13) \
00159    t1 n1; t2 n2; t3 n3; t4 n4; t5 n5; t6 n6; t7 n7; t8 n8; t9 n9; t10 n10; \
00160    t11 n11; t12 n12; t13 n13;
00161 #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) \
00162   (n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14) \
00163    t1 n1; t2 n2; t3 n3; t4 n4; t5 n5; t6 n6; t7 n7; t8 n8; t9 n9; t10 n10; \
00164    t11 n11; t12 n12; t13 n13; t14 n14;
00165 #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) \
00166   (n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15) \
00167    t1 n1; t2 n2; t3 n3; t4 n4; t5 n5; t6 n6; t7 n7; t8 n8; t9 n9; t10 n10; \
00168    t11 n11; t12 n12; t13 n13; t14 n14; t15 n15;
00169 #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) \
00170   (n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16) \
00171    t1 n1; t2 n2; t3 n3; t4 n4; t5 n5; t6 n6; t7 n7; t8 n8; t9 n9; t10 n10; \
00172    t11 n11; t12 n12; t13 n13; t14 n14; t15 n15; t16 n16;
00173 #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) \
00174   (n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17) \
00175    t1 n1; t2 n2; t3 n3; t4 n4; t5 n5; t6 n6; t7 n7; t8 n8; t9 n9; t10 n10; \
00176    t11 n11; t12 n12; t13 n13; t14 n14; t15 n15; t16 n16; t17 n17;
00177 
00178 #endif /* not HAVE_PROTOTYPES */
00179 
00180 #endif /* not KPATHSEA_C_PROTO_H */