1166124Srafan/**************************************************************************** 2262685Sdelphij * Copyright (c) 2006-2010,2012 Free Software Foundation, Inc. * 3166124Srafan * * 4166124Srafan * Permission is hereby granted, free of charge, to any person obtaining a * 5166124Srafan * copy of this software and associated documentation files (the * 6166124Srafan * "Software"), to deal in the Software without restriction, including * 7166124Srafan * without limitation the rights to use, copy, modify, merge, publish, * 8166124Srafan * distribute, distribute with modifications, sublicense, and/or sell * 9166124Srafan * copies of the Software, and to permit persons to whom the Software is * 10166124Srafan * furnished to do so, subject to the following conditions: * 11166124Srafan * * 12166124Srafan * The above copyright notice and this permission notice shall be included * 13166124Srafan * in all copies or substantial portions of the Software. * 14166124Srafan * * 15166124Srafan * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * 16166124Srafan * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * 17166124Srafan * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * 18166124Srafan * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * 19166124Srafan * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * 20166124Srafan * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * 21166124Srafan * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * 22166124Srafan * * 23166124Srafan * Except as contained in this notice, the name(s) of the above copyright * 24166124Srafan * holders shall not be used in advertising or otherwise to promote the * 25166124Srafan * sale, use or other dealings in this Software without prior written * 26166124Srafan * authorization. * 27166124Srafan ****************************************************************************/ 28166124Srafan 29166124Srafan/**************************************************************************** 30166124Srafan * Author: Thomas E. Dickey 2006 * 31166124Srafan ****************************************************************************/ 32166124Srafan 33262685Sdelphij/* $Id: nc_tparm.h,v 1.6 2012/02/18 21:34:42 tom Exp $ */ 34166124Srafan 35262629Sdelphij#ifndef NC_TPARM_included 36262629Sdelphij#define NC_TPARM_included 1 37262629Sdelphij 38166124Srafan/* 39166124Srafan * Cast parameters past the formatting-string for tparm() to match the 40166124Srafan * assumption of the varargs code. 41166124Srafan */ 42262629Sdelphij#ifndef TPARM_ARG 43262685Sdelphij#ifdef NCURSES_TPARM_ARG 44262685Sdelphij#define TPARM_ARG NCURSES_TPARM_ARG 45262685Sdelphij#else 46166124Srafan#define TPARM_ARG long 47262629Sdelphij#endif 48262685Sdelphij#endif /* TPARAM_ARG */ 49262629Sdelphij 50166124Srafan#define TPARM_N(n) (TPARM_ARG)(n) 51166124Srafan 52166124Srafan#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)) 53166124Srafan 54166124Srafan#if NCURSES_TPARM_VARARGS 55166124Srafan#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)) 56166124Srafan#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)) 57166124Srafan#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)) 58166124Srafan#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)) 59166124Srafan#define TPARM_4(a,b,c,d,e) tparm(a,TPARM_N(b),TPARM_N(c),TPARM_N(d),TPARM_N(e)) 60166124Srafan#define TPARM_3(a,b,c,d) tparm(a,TPARM_N(b),TPARM_N(c),TPARM_N(d)) 61166124Srafan#define TPARM_2(a,b,c) tparm(a,TPARM_N(b),TPARM_N(c)) 62166124Srafan#define TPARM_1(a,b) tparm(a,TPARM_N(b)) 63166124Srafan#define TPARM_0(a) tparm(a) 64166124Srafan#else 65166124Srafan#define TPARM_8(a,b,c,d,e,f,g,h,i) TPARM_9(a,b,c,d,e,f,g,h,i,0) 66166124Srafan#define TPARM_7(a,b,c,d,e,f,g,h) TPARM_8(a,b,c,d,e,f,g,h,0) 67166124Srafan#define TPARM_6(a,b,c,d,e,f,g) TPARM_7(a,b,c,d,e,f,g,0) 68166124Srafan#define TPARM_5(a,b,c,d,e,f) TPARM_6(a,b,c,d,e,f,0) 69166124Srafan#define TPARM_4(a,b,c,d,e) TPARM_5(a,b,c,d,e,0) 70166124Srafan#define TPARM_3(a,b,c,d) TPARM_4(a,b,c,d,0) 71166124Srafan#define TPARM_2(a,b,c) TPARM_3(a,b,c,0) 72166124Srafan#define TPARM_1(a,b) TPARM_2(a,b,0) 73166124Srafan#define TPARM_1(a,b) TPARM_2(a,b,0) 74166124Srafan#define TPARM_0(a) TPARM_1(a,0) 75166124Srafan#endif 76262629Sdelphij 77262629Sdelphij#endif /* NC_TPARM_included */ 78