1de9cbefrafan/****************************************************************************
201cf73abapt * Copyright 2019,2020 Thomas E. Dickey                                     *
301cf73abapt * Copyright 2010,2012 Free Software Foundation, Inc.                       *
4de9cbefrafan *                                                                          *
5de9cbefrafan * Permission is hereby granted, free of charge, to any person obtaining a  *
6de9cbefrafan * copy of this software and associated documentation files (the            *
7de9cbefrafan * "Software"), to deal in the Software without restriction, including      *
8de9cbefrafan * without limitation the rights to use, copy, modify, merge, publish,      *
9de9cbefrafan * distribute, distribute with modifications, sublicense, and/or sell       *
10de9cbefrafan * copies of the Software, and to permit persons to whom the Software is    *
11de9cbefrafan * furnished to do so, subject to the following conditions:                 *
12de9cbefrafan *                                                                          *
13de9cbefrafan * The above copyright notice and this permission notice shall be included  *
14de9cbefrafan * in all copies or substantial portions of the Software.                   *
15de9cbefrafan *                                                                          *
16de9cbefrafan * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
17de9cbefrafan * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
18de9cbefrafan * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
19de9cbefrafan * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
20de9cbefrafan * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
21de9cbefrafan * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
22de9cbefrafan * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
23de9cbefrafan *                                                                          *
24de9cbefrafan * Except as contained in this notice, the name(s) of the above copyright   *
25de9cbefrafan * holders shall not be used in advertising or otherwise to promote the     *
26de9cbefrafan * sale, use or other dealings in this Software without prior written       *
27de9cbefrafan * authorization.                                                           *
28de9cbefrafan ****************************************************************************/
291034bfcdelphij
301034bfcdelphij/****************************************************************************
311034bfcdelphij *  Author: Thomas E. Dickey                        2010                    *
321034bfcdelphij ****************************************************************************/
331034bfcdelphij
341034bfcdelphij/*
3501cf73abapt * $Id: build.priv.h,v 1.12 2020/02/02 23:34:34 tom Exp $
361034bfcdelphij *
371034bfcdelphij *	build.priv.h
381034bfcdelphij *
39f52ca6ebapt *	This is a reduced version of curses.priv.h, for build-time utilities.
401034bfcdelphij *	Because it has fewer dependencies, this simplifies cross-compiling.
411034bfcdelphij *
421034bfcdelphij */
431034bfcdelphij
441034bfcdelphij#ifndef CURSES_PRIV_H
451034bfcdelphij#define CURSES_PRIV_H 1
461034bfcdelphij
471034bfcdelphij#include <ncurses_dll.h>
481034bfcdelphij
491034bfcdelphij#ifdef __cplusplus
501034bfcdelphijextern "C" {
511034bfcdelphij#endif
521034bfcdelphij
531034bfcdelphij#include <ncurses_cfg.h>
541034bfcdelphij
551034bfcdelphij#if USE_RCS_IDS
561034bfcdelphij#define MODULE_ID(id) static const char Ident[] = id;
571034bfcdelphij#else
58f52ca6ebapt#define MODULE_ID(id)		/*nothing */
59b7ada7fpeter#endif
60b7ada7fpeter
611034bfcdelphij#include <stdlib.h>
621034bfcdelphij#include <string.h>
631034bfcdelphij#include <sys/types.h>
641034bfcdelphij
651034bfcdelphij#include <assert.h>
661034bfcdelphij#include <stdio.h>
671034bfcdelphij
681034bfcdelphij#include <errno.h>
691034bfcdelphij
70f52ca6ebapt#include <curses.h>		/* we'll use -Ipath directive to get the right one! */
711034bfcdelphij
721034bfcdelphij/* usually in <unistd.h> */
731034bfcdelphij#ifndef EXIT_SUCCESS
741034bfcdelphij#define EXIT_SUCCESS 0
75b7ada7fpeter#endif
761034bfcdelphij
771034bfcdelphij#ifndef EXIT_FAILURE
781034bfcdelphij#define EXIT_FAILURE 1
79b7ada7fpeter#endif
801034bfcdelphij
81f52ca6ebapt#define FreeAndNull(p)   do { free(p); p = 0; } while (0)
821034bfcdelphij#define UChar(c)         ((unsigned char)(c))
831034bfcdelphij#define SIZEOF(v)        (sizeof(v) / sizeof(v[0]))
841034bfcdelphij
851034bfcdelphij#include <nc_alloc.h>
867dbeededelphij#include <nc_string.h>
871034bfcdelphij
881034bfcdelphij/* declare these, to avoid needing term.h */
891034bfcdelphij#if BROKEN_LINKER || USE_REENTRANT
901034bfcdelphij#define NCURSES_ARRAY(name) \
911034bfcdelphij	NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, name)
921034bfcdelphij
93f52ca6ebapt    NCURSES_ARRAY(boolnames);
94f52ca6ebapt    NCURSES_ARRAY(boolfnames);
95f52ca6ebapt    NCURSES_ARRAY(numnames);
96f52ca6ebapt    NCURSES_ARRAY(numfnames);
97f52ca6ebapt    NCURSES_ARRAY(strnames);
98f52ca6ebapt    NCURSES_ARRAY(strfnames);
99b7ada7fpeter#endif
1001034bfcdelphij
1011034bfcdelphij#if NO_LEAKS
102f52ca6ebapt    NCURSES_EXPORT(void) _nc_names_leaks(void);
103b7ada7fpeter#endif
1049a7523dpeter
1051034bfcdelphij#ifdef __cplusplus
1061034bfcdelphij}
1071034bfcdelphij#endif
108f52ca6ebapt#endif				/* CURSES_PRIV_H */
109