Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-05-18 08:30:08

0001 /****************************************************************************
0002  * Copyright 2018,2020 Thomas E. Dickey                                     *
0003  * Copyright 2006-2012,2017 Free Software Foundation, Inc.                  *
0004  *                                                                          *
0005  * Permission is hereby granted, free of charge, to any person obtaining a  *
0006  * copy of this software and associated documentation files (the            *
0007  * "Software"), to deal in the Software without restriction, including      *
0008  * without limitation the rights to use, copy, modify, merge, publish,      *
0009  * distribute, distribute with modifications, sublicense, and/or sell       *
0010  * copies of the Software, and to permit persons to whom the Software is    *
0011  * furnished to do so, subject to the following conditions:                 *
0012  *                                                                          *
0013  * The above copyright notice and this permission notice shall be included  *
0014  * in all copies or substantial portions of the Software.                   *
0015  *                                                                          *
0016  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
0017  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
0018  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
0019  * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
0020  * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
0021  * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
0022  * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
0023  *                                                                          *
0024  * Except as contained in this notice, the name(s) of the above copyright   *
0025  * holders shall not be used in advertising or otherwise to promote the     *
0026  * sale, use or other dealings in this Software without prior written       *
0027  * authorization.                                                           *
0028  ****************************************************************************/
0029 
0030 /****************************************************************************
0031  *  Author: Thomas E. Dickey                        2006                    *
0032  ****************************************************************************/
0033 
0034 /* $Id: nc_tparm.h,v 1.11 2020/05/27 23:33:31 tom Exp $ */
0035 
0036 #ifndef NC_TPARM_included
0037 #define NC_TPARM_included 1
0038 
0039 #include <ncurses_cfg.h>
0040 #include <ncursesw/curses.h>
0041 
0042 /*
0043  * Cast parameters past the formatting-string for tparm() to match the
0044  * assumption of the varargs code.
0045  */
0046 #ifndef TPARM_ARG
0047 #ifdef NCURSES_TPARM_ARG
0048 #define TPARM_ARG NCURSES_TPARM_ARG
0049 #else
0050 #define TPARM_ARG long
0051 #endif
0052 #endif /* TPARAM_ARG */
0053 
0054 #define TPARM_N(n) (TPARM_ARG)(n)
0055 
0056 #define TPARM_9(a,b,c,d,e,f,g,h,i,j) tparm(a,TPARM_N(b),TPARM_N(c),TPARM_N(d),TPARM_N(e),TPARM_N(f),TPARM_N(g),TPARM_N(h),TPARM_N(i),TPARM_N(j))
0057 
0058 #if NCURSES_TPARM_VARARGS
0059 #define TPARM_8(a,b,c,d,e,f,g,h,i) tparm(a,TPARM_N(b),TPARM_N(c),TPARM_N(d),TPARM_N(e),TPARM_N(f),TPARM_N(g),TPARM_N(h),TPARM_N(i))
0060 #define TPARM_7(a,b,c,d,e,f,g,h) tparm(a,TPARM_N(b),TPARM_N(c),TPARM_N(d),TPARM_N(e),TPARM_N(f),TPARM_N(g),TPARM_N(h))
0061 #define TPARM_6(a,b,c,d,e,f,g) tparm(a,TPARM_N(b),TPARM_N(c),TPARM_N(d),TPARM_N(e),TPARM_N(f),TPARM_N(g))
0062 #define TPARM_5(a,b,c,d,e,f) tparm(a,TPARM_N(b),TPARM_N(c),TPARM_N(d),TPARM_N(e),TPARM_N(f))
0063 #define TPARM_4(a,b,c,d,e) tparm(a,TPARM_N(b),TPARM_N(c),TPARM_N(d),TPARM_N(e))
0064 #define TPARM_3(a,b,c,d) tparm(a,TPARM_N(b),TPARM_N(c),TPARM_N(d))
0065 #define TPARM_2(a,b,c) tparm(a,TPARM_N(b),TPARM_N(c))
0066 #define TPARM_1(a,b) tparm(a,TPARM_N(b))
0067 #define TPARM_0(a) tparm(a)
0068 #else
0069 #define TPARM_8(a,b,c,d,e,f,g,h,i) TPARM_9(a,b,c,d,e,f,g,h,i,0)
0070 #define TPARM_7(a,b,c,d,e,f,g,h) TPARM_8(a,b,c,d,e,f,g,h,0)
0071 #define TPARM_6(a,b,c,d,e,f,g) TPARM_7(a,b,c,d,e,f,g,0)
0072 #define TPARM_5(a,b,c,d,e,f) TPARM_6(a,b,c,d,e,f,0)
0073 #define TPARM_4(a,b,c,d,e) TPARM_5(a,b,c,d,e,0)
0074 #define TPARM_3(a,b,c,d) TPARM_4(a,b,c,d,0)
0075 #define TPARM_2(a,b,c) TPARM_3(a,b,c,0)
0076 #define TPARM_1(a,b) TPARM_2(a,b,0)
0077 #define TPARM_0(a) TPARM_1(a,0)
0078 #endif
0079 
0080 #ifdef NCURSES_INTERNALS
0081 #define TIPARM_1(s,a) _nc_tiparm(1,s,a)
0082 #define TIPARM_2(s,a,b) _nc_tiparm(2,s,a,b)
0083 #define TIPARM_3(s,a,b,c) _nc_tiparm(3,s,a,b,c)
0084 #define TIPARM_4(s,a,b,c,d) _nc_tiparm(4,s,a,b,c,d)
0085 #define TIPARM_5(s,a,b,c,d,e) _nc_tiparm(5,s,a,b,c,d,e)
0086 #define TIPARM_6(s,a,b,c,d,e,f) _nc_tiparm(6,s,a,b,c,d,e,f)
0087 #define TIPARM_7(s,a,b,c,d,e,f,g) _nc_tiparm(7,s,a,b,c,d,e,f,g)
0088 #define TIPARM_8(s,a,b,c,d,e,f,g,h) _nc_tiparm(8,s,a,b,c,d,e,f,g,h)
0089 #define TIPARM_9(s,a,b,c,d,e,f,g,h,i) _nc_tiparm(9,s,a,b,c,d,e,f,g,h,i)
0090 #endif
0091 
0092 #endif /* NC_TPARM_included */