1262617Sdelphij/**************************************************************************** 2262685Sdelphij * Copyright (c) 2010,2012 Free Software Foundation, Inc. * 3262617Sdelphij * * 4262617Sdelphij * Permission is hereby granted, free of charge, to any person obtaining a * 5262617Sdelphij * copy of this software and associated documentation files (the * 6262617Sdelphij * "Software"), to deal in the Software without restriction, including * 7262617Sdelphij * without limitation the rights to use, copy, modify, merge, publish, * 8262617Sdelphij * distribute, distribute with modifications, sublicense, and/or sell * 9262617Sdelphij * copies of the Software, and to permit persons to whom the Software is * 10262617Sdelphij * furnished to do so, subject to the following conditions: * 11262617Sdelphij * * 12262617Sdelphij * The above copyright notice and this permission notice shall be included * 13262617Sdelphij * in all copies or substantial portions of the Software. * 14262617Sdelphij * * 15262617Sdelphij * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * 16262617Sdelphij * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * 17262617Sdelphij * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * 18262617Sdelphij * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * 19262617Sdelphij * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * 20262617Sdelphij * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * 21262617Sdelphij * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * 22262617Sdelphij * * 23262617Sdelphij * Except as contained in this notice, the name(s) of the above copyright * 24262617Sdelphij * holders shall not be used in advertising or otherwise to promote the * 25262617Sdelphij * sale, use or other dealings in this Software without prior written * 26262617Sdelphij * authorization. * 27262617Sdelphij ****************************************************************************/ 28262617Sdelphij 29262617Sdelphij/**************************************************************************** 30262617Sdelphij * Author: Thomas E. Dickey 2010 * 31262617Sdelphij ****************************************************************************/ 32262617Sdelphij 33262617Sdelphij/* 34262685Sdelphij * $Id: build.priv.h,v 1.9 2012/02/22 22:17:02 tom Exp $ 35262617Sdelphij * 36262617Sdelphij * build.priv.h 37262617Sdelphij * 38262617Sdelphij * This is a reduced version of curses.priv.h, for build-time utilties. 39262617Sdelphij * Because it has fewer dependencies, this simplifies cross-compiling. 40262617Sdelphij * 41262617Sdelphij */ 42262617Sdelphij 43262617Sdelphij#ifndef CURSES_PRIV_H 44262617Sdelphij#define CURSES_PRIV_H 1 45262617Sdelphij 46262617Sdelphij#include <ncurses_dll.h> 47262617Sdelphij 48262617Sdelphij#ifdef __cplusplus 49262617Sdelphijextern "C" { 50262617Sdelphij#endif 51262617Sdelphij 52262617Sdelphij#include <ncurses_cfg.h> 53262617Sdelphij 54262617Sdelphij#if USE_RCS_IDS 55262617Sdelphij#define MODULE_ID(id) static const char Ident[] = id; 56262617Sdelphij#else 57262617Sdelphij#define MODULE_ID(id) /*nothing*/ 58262617Sdelphij#endif 59262617Sdelphij 60262617Sdelphij#include <stdlib.h> 61262617Sdelphij#include <string.h> 62262617Sdelphij#include <sys/types.h> 63262617Sdelphij 64262617Sdelphij#include <assert.h> 65262617Sdelphij#include <stdio.h> 66262617Sdelphij 67262617Sdelphij#include <errno.h> 68262617Sdelphij 69262617Sdelphij#include <curses.h> /* we'll use -Ipath directive to get the right one! */ 70262617Sdelphij 71262617Sdelphij/* usually in <unistd.h> */ 72262617Sdelphij#ifndef EXIT_SUCCESS 73262617Sdelphij#define EXIT_SUCCESS 0 74262617Sdelphij#endif 75262617Sdelphij 76262617Sdelphij#ifndef EXIT_FAILURE 77262617Sdelphij#define EXIT_FAILURE 1 78262617Sdelphij#endif 79262617Sdelphij 80262617Sdelphij#define FreeAndNull(p) free(p); p = 0 81262617Sdelphij#define UChar(c) ((unsigned char)(c)) 82262617Sdelphij#define SIZEOF(v) (sizeof(v) / sizeof(v[0])) 83262617Sdelphij 84262617Sdelphij#include <nc_alloc.h> 85262685Sdelphij#include <nc_string.h> 86262617Sdelphij 87262617Sdelphij/* declare these, to avoid needing term.h */ 88262617Sdelphij#if BROKEN_LINKER || USE_REENTRANT 89262617Sdelphij#define NCURSES_ARRAY(name) \ 90262617Sdelphij NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, name) 91262617Sdelphij 92262617SdelphijNCURSES_ARRAY(boolnames); 93262617SdelphijNCURSES_ARRAY(boolfnames); 94262617SdelphijNCURSES_ARRAY(numnames); 95262617SdelphijNCURSES_ARRAY(numfnames); 96262617SdelphijNCURSES_ARRAY(strnames); 97262617SdelphijNCURSES_ARRAY(strfnames); 98262617Sdelphij#endif 99262617Sdelphij 100262617Sdelphij#if NO_LEAKS 101262617SdelphijNCURSES_EXPORT(void) _nc_names_leaks(void); 102262617Sdelphij#endif 103262617Sdelphij 104262617Sdelphij#ifdef __cplusplus 105262617Sdelphij} 106262617Sdelphij#endif 107262617Sdelphij 108262617Sdelphij#endif /* CURSES_PRIV_H */ 109