From: Thomas E. Dickey Date: Sun, 28 Jun 2009 01:00:34 +0000 (+0000) Subject: ncurses 5.7 - patch 20090627 X-Git-Tag: v5.8~85 X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=commitdiff_plain;h=da1f84b7eb32f17e91f6de242132ab3b2d462148 ncurses 5.7 - patch 20090627 + update llib-lncurses[wt] to use sp-funcs. + various code-fixes to build/work with --disable-macros configure option. + add several new files from Juergen Pfeifer which will be used when integration of "sp-funcs" is complete. This includes a port to MinGW. --- diff --git a/MANIFEST b/MANIFEST index 2eaa0437..948dc803 100644 --- a/MANIFEST +++ b/MANIFEST @@ -172,6 +172,7 @@ ./Makefile.os2 ./NEWS ./README +./README.MinGW ./README.emx ./TO-DO ./aclocal.m4 @@ -479,6 +480,7 @@ ./form/fty_alnum.c ./form/fty_alpha.c ./form/fty_enum.c +./form/fty_generic.c ./form/fty_int.c ./form/fty_ipv4.c ./form/fty_num.c @@ -507,11 +509,13 @@ ./include/hashed_db.h ./include/headers ./include/nc_alloc.h +./include/nc_mingw.h ./include/nc_panel.h ./include/nc_tparm.h ./include/ncurses_cfg.hin ./include/ncurses_defs -./include/ncurses_dll.h +./include/ncurses_dll.h.in +./include/ncurses_mingw.h ./include/term_entry.h ./include/termcap.h.in ./include/tic.h @@ -720,6 +724,7 @@ ./mk-0th.awk ./mk-1st.awk ./mk-2nd.awk +./mk-dlls.sh ./mk-hdr.awk ./mkdirs.sh ./ncurses/Makefile.in @@ -750,6 +755,7 @@ ./ncurses/base/lib_delch.c ./ncurses/base/lib_delwin.c ./ncurses/base/lib_dft_fgbg.c +./ncurses/base/lib_driver.c ./ncurses/base/lib_echo.c ./ncurses/base/lib_endwin.c ./ncurses/base/lib_erase.c @@ -819,6 +825,7 @@ ./ncurses/fifo_defs.h ./ncurses/llib-lncurses ./ncurses/llib-lncursest +./ncurses/llib-lncursestw ./ncurses/llib-lncursesw ./ncurses/modules ./ncurses/tinfo/MKcaptab.awk @@ -872,6 +879,7 @@ ./ncurses/tinfo/read_termcap.c ./ncurses/tinfo/setbuf.c ./ncurses/tinfo/strings.c +./ncurses/tinfo/tinfo_driver.c ./ncurses/tinfo/trim_sgr0.c ./ncurses/tinfo/use_screen.c ./ncurses/tinfo/write_entry.c @@ -917,6 +925,8 @@ ./ncurses/widechar/lib_vline_set.c ./ncurses/widechar/lib_wacs.c ./ncurses/widechar/lib_wunctrl.c +./ncurses/win32con/gettimeofday.c +./ncurses/win32con/win_driver.c ./panel/Makefile.in ./panel/headers ./panel/llib-lpanel diff --git a/Makefile.in b/Makefile.in index cb8cd422..ee6596b8 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,4 +1,4 @@ -# $Id: Makefile.in,v 1.24 2005/01/29 19:30:06 tom Exp $ +# $Id: Makefile.in,v 1.25 2008/11/16 00:19:59 juergen Exp $ ############################################################################## # Copyright (c) 1998-2004,2005 Free Software Foundation, Inc. # # # @@ -83,6 +83,9 @@ preinstall : fgrep NCURSES_VERSION $(includedir)/curses.h >/dev/null || \ echo '** Will overwrite non-ncurses curses.h' +dlls: libs + sh mk-dlls.sh + # Put the common rules here so that we can easily construct the list of # directories to visit. all \ @@ -95,3 +98,4 @@ sources \ tags \ uninstall \ install :: + diff --git a/NEWS b/NEWS index 70fd5511..848a07d7 100644 --- a/NEWS +++ b/NEWS @@ -25,7 +25,7 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: NEWS,v 1.1396 2009/06/13 22:13:33 tom Exp $ +-- $Id: NEWS,v 1.1398 2009/06/27 20:59:09 tom Exp $ ------------------------------------------------------------------------------- This is a log of changes that ncurses has gone through since Zeyd started @@ -45,6 +45,14 @@ See the AUTHORS file for the corresponding full names. Changes through 1.9.9e did not credit all contributions; it is not possible to add this information. +20090627 + + update llib-lncurses[wt] to use sp-funcs. + + various code-fixes to build/work with --disable-macros configure + option. + + add several new files from Juergen Pfeifer which will be used when + integration of "sp-funcs" is complete. This includes a port to + MinGW. + 20090613 + move definition for NCURSES_WRAPPED_VAR back to ncurses_dll.h, to make includes of term.h without curses.h work (report by "Nix"). diff --git a/README.MinGW b/README.MinGW new file mode 100644 index 00000000..6c0b9d62 --- /dev/null +++ b/README.MinGW @@ -0,0 +1,79 @@ +------------------------------------------------------------------------------- +-- Copyright (c) 2008 Free Software Foundation, Inc. -- +-- -- +-- Permission is hereby granted, free of charge, to any person obtaining a -- +-- copy of this software and associated documentation files (the -- +-- "Software"), to deal in the Software without restriction, including -- +-- without limitation the rights to use, copy, modify, merge, publish, -- +-- distribute, distribute with modifications, sublicense, and/or sell copies -- +-- of the Software, and to permit persons to whom the Software is furnished -- +-- to do so, subject to the following conditions: -- +-- -- +-- The above copyright notice and this permission notice shall be included -- +-- in all copies or substantial portions of the Software. -- +-- -- +-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -- +-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- +-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -- +-- NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -- +-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- +-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -- +-- USE OR OTHER DEALINGS IN THE SOFTWARE. -- +-- -- +-- Except as contained in this notice, the name(s) of the above copyright -- +-- holders shall not be used in advertising or otherwise to promote the -- +-- sale, use or other dealings in this Software without prior written -- +-- authorization. -- +------------------------------------------------------------------------------- +-- $Id: README.MinGW,v 1.1 2008/12/14 19:22:16 juergen Exp $ +-- Author: Juergen Pfeifer +------------------------------------------------------------------------------- + +This is work in progress, but it's in an state where one can see it +works at least on the Windows Console. + +To build ncurses for native Windows, you need the MinGW toolchain from +http://www.mingw.org + +You should install also the MSYS package, so that you've a shell environment +that allows you to run the scripts, especially configure etc. + +Using MinGW is a pragmatic decision, it's the easiest way to port this +heavily UNIX based sourcebase to native Windows. The goal is of course +to provide the includes, libraries and DLLs to be used with the more +common traditional development environments on Windows, mainly with +Microsoft Visual Studio. + +If you start a bash from the MSYS environment, please make sure that the +Microsoft Development tools are in your PATH right after the MinGW +tools. The LIB.EXE tool is the only one needed. You need this only if +you want to build DLLs that work with native Windows programs. If you +don't have any Microsoft Development tools on your machine, consider +at least to get the free "Visual C++ 2008 Express Edition". +It contains the LIB.EXE tool. You may also use this compiler to test +writing native Windows programs using the ncurses DLLs without using +MinGW then for writing apps. + +Please unset the TERM environment variable, so that the Console driver +gets activated. + +This code requires WindowsNT 5.1 or better, which means on the client +Windows XP or better, on the server Windows Server 2003 or better. + +In order to build the DLLs, you must call + + make dlls + +A lot is still TODO, e.g.: + + - Mouse support for the Console + - Wide Character support + The Win32Con driver should actually only use Unicode in the + future. + - Thread support (locking) + - A GUI console driver + - Support for Terminals attached via a serial port (via terminfo) + - Support for networked Terminal connections (via terminfo) + +To support terminfo, we need to have an ioctl() simulation for the +serial and networked Terminals. diff --git a/dist.mk b/dist.mk index 18b1d166..4f3110dd 100644 --- a/dist.mk +++ b/dist.mk @@ -25,7 +25,7 @@ # use or other dealings in this Software without prior written # # authorization. # ############################################################################## -# $Id: dist.mk,v 1.705 2009/06/13 18:19:06 tom Exp $ +# $Id: dist.mk,v 1.706 2009/06/27 22:21:38 tom Exp $ # Makefile for creating ncurses distributions. # # This only needs to be used directly as a makefile by developers, but @@ -37,7 +37,7 @@ SHELL = /bin/sh # These define the major/minor/patch versions of ncurses. NCURSES_MAJOR = 5 NCURSES_MINOR = 7 -NCURSES_PATCH = 20090613 +NCURSES_PATCH = 20090627 # We don't append the patch to the version, since this only applies to releases VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR) diff --git a/form/fty_generic.c b/form/fty_generic.c new file mode 100644 index 00000000..83b58220 --- /dev/null +++ b/form/fty_generic.c @@ -0,0 +1,287 @@ +/**************************************************************************** + * Copyright (c) 2008 Free Software Foundation, Inc. * + * * + * Permission is hereby granted, free of charge, to any person obtaining a * + * copy of this software and associated documentation files (the * + * "Software"), to deal in the Software without restriction, including * + * without limitation the rights to use, copy, modify, merge, publish, * + * distribute, distribute with modifications, sublicense, and/or sell * + * copies of the Software, and to permit persons to whom the Software is * + * furnished to do so, subject to the following conditions: * + * * + * The above copyright notice and this permission notice shall be included * + * in all copies or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/*************************************************************************** +* * +* Author : Juergen Pfeifer * +* * +***************************************************************************/ + +#include "form.priv.h" + +MODULE_ID("$Id: fty_generic.c,v 1.1 2008/11/18 08:50:04 juergen Exp $") + +/* + * This is not a full implementation of a field type, but adds some + * support for higher level languages with some restrictions to interop + * with C language. Especially the collection of arguments for the + * various fieldtypes is not based on the vararg C mechanism, but on a + * iterator based callback mechanism that allowes the high level language + * to provide the arguments as a structure. Most languages have mechanisms + * to layout structures so that they can be passed to C. + * The languages can register a new generic fieldtype dynamically and store + * a handle (key) to the calling object as an argument. Together with that + * it can register a freearg callback, so that the high level language + * remains in control of the memory management of the arguments they pass. + * The design idea is, that the high-level language - typically a OO + * language like C# or Java, uses it's own dispatching mechanisms + * (polymorphism) to call the proper check routines responsible for the + * argument type. So these language implement typically only one generic + * fieldtype they register with the forms library using this call. + * + * For that purpose we have extended the fieldtype struc by a new element + * that gets the arguments from a single struct passed by the caller. + * + */ + + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static void *Generic_This_Type( void * arg ) +| +| Description : We interpret the passed arg just as a handle the +| calling language uses to keep track of its allocated +| argument structures. We can simply copy it back. +| +| Return Values : Pointer to argument structure ++--------------------------------------------------------------------------*/ +static void * +Generic_This_Type(void *arg) +{ + return (arg); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : FIELDTYPE *_nc_generic_fieldtype( +| bool (* const field_check)(FIELD *,const void *), +| bool (* const char_check) (int, const void *), +| bool (*const next)(FORM*,FIELD*,const void*), +| bool (*const prev)(FORM*,FIELD*,const void*), +| void (*freecallback)(void*)) +| +| Description : Create a new fieldtype. The application programmer must +| write a field_check and a char_check function and give +| them as input to this call. A callback to allow the +| release of the allocated memory must also be provided. +| For generic field types, we provide some more +| information about the field as parameters. +| +| If an error occurs, errno is set to +| E_BAD_ARGUMENT - invalid arguments +| E_SYSTEM_ERROR - system error (no memory) +| +| Return Values : Fieldtype pointer or NULL if error occurred ++--------------------------------------------------------------------------*/ +NCURSES_EXPORT(FIELDTYPE *) +_nc_generic_fieldtype(bool (*const field_check) (FORM*, FIELD *, const void *), + bool (*const char_check) (int, FORM*, FIELD*, const void *), + bool (*const next)(FORM*, FIELD*,const void*), + bool (*const prev)(FORM*, FIELD*,const void*), + void (*freecallback)(void*)) +{ + int code = E_SYSTEM_ERROR; + FIELDTYPE* res = (FIELDTYPE*)0; + + T((T_CALLED("_nc_generic_fieldtype(%p,%p,%p,%p,%p)"), + field_check, char_check, next, prev, freecallback)); + + if (field_check || char_check) + { + res = typeMalloc(FIELDTYPE,1); + if (res) + { + *res = *_nc_Default_FieldType; + res->status |= (_HAS_ARGS | _GENERIC); + res->fieldcheck.gfcheck = field_check; + res->charcheck.gccheck = char_check; + res->genericarg = Generic_This_Type; + res->freearg = freecallback; + res->enum_next.gnext = next; + res->enum_prev.gprev = prev; + code = E_OK; + } + } + else + code = E_BAD_ARGUMENT; + + if (E_OK != code) + SET_ERROR(code); + + returnFieldType(res); +} + + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static TypeArgument *GenericArgument( +| const FIELDTYPE* typ, +| int (*argiterator)(void**), +| int* err) +| +| Description : The iterator callback must browse through all fieldtype +| parameters that have an argument associated with the +| type. The iterator returns 1 if the operation to get +| the next element was successfull, 0 otherwise. If the +| iterator could move to the next argument, it fills +| the void* pointer representing the argument into the +| location provided as argument to the iterator. +| The err reference is used to keep track of errors. +| +| Return Values : Pointer to argument structure ++--------------------------------------------------------------------------*/ +static TypeArgument* +GenericArgument(const FIELDTYPE *typ, + int (*argiterator)(void**), int *err) +{ + TypeArgument *res = (TypeArgument *)0; + + if (typ!=0 && (typ->status & _HAS_ARGS) != 0 && err!=0 && argiterator != 0) + { + if (typ->status & _LINKED_TYPE) + { + /* Composite fieldtypes keep track internally of their own memory */ + TypeArgument* p = typeMalloc(TypeArgument,1); + if (p) + { + p->left = GenericArgument(typ->left, argiterator, err); + p->right = GenericArgument(typ->right, argiterator, err); + return p; + } + else + *err += 1; + } + else + { + assert(typ->genericarg != (void*)0); + if (typ->genericarg == 0) + *err += 1; + else + { + void* argp; + int valid = argiterator(&argp); + if (valid==0 || argp==0 || + !(res = (TypeArgument*)typ->genericarg(argp))) + { + *err += 1; + } + } + } + } + return res; +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : int _nc_set_generic_fieldtype( +| FIELD* field, +| FIELDTYPE* ftyp, +| int (*argiterator)(void**)) +| +| Description : Assign the fieldtype to the field and use the iterator +| mechanism to get the arguments when a check is +| performed. +| +| Return Values : E_OK if all went well +| E_SYSTEM_ERROR if an error occurred ++--------------------------------------------------------------------------*/ +NCURSES_EXPORT(int) +_nc_set_generic_fieldtype(FIELD *field, + FIELDTYPE* ftyp, + int (*argiterator)(void**)) +{ + int code = E_SYSTEM_ERROR; + int err = 0; + + if (field) + { + if (field && field->type) + _nc_Free_Type(field); + + field->type = ftyp; + if (ftyp) + { + if (argiterator) + { + /* The precondition is that the iterator is reset */ + field->arg = (void*)GenericArgument(field->type,argiterator,&err); + + if (err) + { + _nc_Free_Argument(field->type, (TypeArgument*)(field->arg)); + field->type = (FIELDTYPE*)0; + field->arg = (void*)0; + } + else + { + code = E_OK; + if (field->type) + field->type->ref++; + } + } + } + else + { + field->arg = (void*)0; + code = E_OK; + } + } + return code; +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : WINDOW* _nc_form_cursor( +| FORM* form, +| int *pRow, int *pCol) +| +| Description : Get the current position of the form cursor position +| We also return the field window +| +| Return Values : The fields Window or NULL on error ++--------------------------------------------------------------------------*/ +NCURSES_EXPORT(WINDOW*) +_nc_form_cursor(const FORM* form, int* pRow, int* pCol) +{ + int code = E_SYSTEM_ERROR; + WINDOW* res = (WINDOW*)0; + + if (!(form==0 || pRow==0 || pCol==0)) + { + *pRow = form->currow; + *pCol = form->curcol; + res = form->w; + code = E_OK; + } + if (code != E_OK) + SET_ERROR(code); + return res; +} + + +/* fty_generic.c ends here */ diff --git a/include/nc_mingw.h b/include/nc_mingw.h new file mode 100644 index 00000000..a524da87 --- /dev/null +++ b/include/nc_mingw.h @@ -0,0 +1,59 @@ +/**************************************************************************** + * Copyright (c) 2008,2009 Free Software Foundation, Inc. * + * * + * Permission is hereby granted, free of charge, to any person obtaining a * + * copy of this software and associated documentation files (the * + * "Software"), to deal in the Software without restriction, including * + * without limitation the rights to use, copy, modify, merge, publish, * + * distribute, distribute with modifications, sublicense, and/or sell * + * copies of the Software, and to permit persons to whom the Software is * + * furnished to do so, subject to the following conditions: * + * * + * The above copyright notice and this permission notice shall be included * + * in all copies or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Thomas Dickey, 2008-on * + * * + ****************************************************************************/ + +/* $Id: nc_mingw.h,v 1.1 2009/02/07 23:33:19 tom Exp $ */ + +#ifndef NC_MINGW_H +#define NC_MINGW_H 1 + +#define WINVER 0x0501 +#include + +#undef sleep +#define sleep(n) Sleep((n) * 1000) + +#undef gettimeofday +#define gettimeofday(tv,tz) _nc_gettimeofday(tv,tz) + +#include /* for struct timeval */ + +extern int _nc_gettimeofday(struct timeval *, void *); + +#undef HAVE_GETTIMEOFDAY +#define HAVE_GETTIMEOFDAY 1 + +#define SIGHUP 1 +#define SIGKILL 9 +#define getlogin() "username" + +#endif /* NC_MINGW_H */ diff --git a/include/ncurses_mingw.h b/include/ncurses_mingw.h new file mode 100644 index 00000000..4ea1dad5 --- /dev/null +++ b/include/ncurses_mingw.h @@ -0,0 +1,164 @@ +/**************************************************************************** + * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. * + * * + * Permission is hereby granted, free of charge, to any person obtaining a * + * copy of this software and associated documentation files (the * + * "Software"), to deal in the Software without restriction, including * + * without limitation the rights to use, copy, modify, merge, publish, * + * distribute, distribute with modifications, sublicense, and/or sell * + * copies of the Software, and to permit persons to whom the Software is * + * furnished to do so, subject to the following conditions: * + * * + * The above copyright notice and this permission notice shall be included * + * in all copies or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Juergen Pfeifer, 2008-on * + * * + ****************************************************************************/ + +/* $Id: ncurses_mingw.h,v 1.1 2008/12/14 19:22:16 juergen Exp $ */ + +/* + * This is a placholder up to now and describes what needs to be implemented + * to support I/O to external terminals with ncurses on the Windows OS. + */ + +#if __MINGW32__ +#ifndef _NC_MINGWH +#define _NC_MINGWH + +#define USE_CONSOLE_DRIVER 1 + +#undef TERMIOS +#define TERMIOS 1 + +#define InvalidHandle ((TERM_HANDLE)-1) +#define InvalidConsoleHandle(s) ((s)==InvalidHandle) + +typedef unsigned char cc_t; +typedef unsigned int speed_t; +typedef unsigned int tcflag_t; + +#define NCCS 32 +struct termios +{ + tcflag_t c_iflag; /* input mode */ + tcflag_t c_oflag; /* output mode */ + tcflag_t c_cflag; /* control mode */ + tcflag_t c_lflag; /* local mode */ + cc_t c_line; /* line discipline */ + cc_t c_cc[NCCS]; /* control characters */ + speed_t c_ispeed; /* input speed */ + speed_t c_ospeed; /* c_ospeed */ +}; + +/* c_cc chars */ +#define VINTR 0 +#define VQUIT 1 +#define VERASE 2 +#define VKILL 3 +#define VEOF 4 +#define VTIME 5 +#define VMIN 6 + +/* c_iflag bits */ +#define ISTRIP 0000040 +#define INLCR 0000100 +#define IGNCR 0000200 +#define ICRNL 0000400 +#define BRKINT 0000002 +#define PARMRK 0000010 +#define IXON 0002000 +#define IGNBRK 0000001 +#define IGNPAR 0000004 +#define INPCK 0000020 +#define IXOFF 0010000 + +/* c_oflag bits */ +#define OPOST 0000001 + +/* c_cflag bit meaning */ +#define CBAUD 0010017 +#define CSIZE 0000060 +#define CS8 0000060 +#define B0 0000000 +#define B50 0000001 +#define B75 0000002 +#define B110 0000003 +#define B134 0000004 +#define B150 0000005 +#define B200 0000006 +#define B300 0000007 +#define B600 0000010 +#define B1200 0000011 +#define B1800 0000012 +#define B2400 0000013 +#define B4800 0000014 +#define B9600 0000015 +#define CLOCAL 0004000 +#define CREAD 0000200 +#define CSTOPB 0000100 +#define HUPCL 0002000 +#define PARENB 0000400 +#define PARODD 0001000 + +/* c_lflag bits */ +#define ECHO 0000010 +#define ECHONL 0000100 +#define ISIG 0000001 +#define IEXTEN 0100000 +#define ICANON 0000002 +#define NOFLSH 0000200 +#define ECHOE 0000020 +#define ECHOK 0000040 + +/* tcflush() */ +#define TCIFLUSH 0 + +/* tcsetattr uses these */ +#define TCSADRAIN 1 + +/* ioctls */ +#define TCGETA 0x5405 +#define TCFLSH 0x540B +#define TIOCGWINSZ 0x5413 + +extern int _nc_mingw_ioctl(int fd, long int request, struct termios* arg); +extern void _nc_set_term_driver(void* term); + +#ifndef cfgetospeed +#define cfgetospeed(t) ((t)->c_cflag & CBAUD) +#endif + +#ifndef tcsetattr +#define tcsetattr(fd, cmd, arg) _nc_mingw_ioctl(fd, cmd, arg) +#endif + +#ifndef tcgetattr +#define tcgetattr(fd, arg) _nc_mingw_ioctl(fd, TCGETA, arg) +#endif + +#ifndef tcflush +#define tcflush(fd, arg) _nc_mingw_ioctl(fd, TCFLSH, arg) +#endif + +#undef ttyname +#define ttyname(fd) NULL + +#endif +#endif diff --git a/mk-dlls.sh b/mk-dlls.sh new file mode 100644 index 00000000..5b60fade --- /dev/null +++ b/mk-dlls.sh @@ -0,0 +1,93 @@ +#!/bin/sh +# $Id: mk-dlls.sh,v 1.1 2008/11/18 08:50:04 juergen Exp $ +############################################################################## +# Copyright (c) 2008 Free Software Foundation, Inc. # +# # +# Permission is hereby granted, free of charge, to any person obtaining a # +# copy of this software and associated documentation files (the "Software"), # +# to deal in the Software without restriction, including without limitation # +# the rights to use, copy, modify, merge, publish, distribute, distribute # +# with modifications, sublicense, and/or sell copies of the Software, and to # +# permit persons to whom the Software is furnished to do so, subject to the # +# following conditions: # +# # +# The above copyright notice and this permission notice shall be included in # +# all copies or substantial portions of the Software. # +# # +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # +# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # +# DEALINGS IN THE SOFTWARE. # +# # +# Except as contained in this notice, the name(s) of the above copyright # +# holders shall not be used in advertising or otherwise to promote the sale, # +# use or other dealings in this Software without prior written # +# authorization. # +############################################################################## +# +# Author: Juergen Pfeifer +# +# Build DLLs on MinGW +# +gcc -v 2>&1 | grep specs | grep mingw +if [ $? -eq 1 ]; then + echo "$0 requires a mingw environment" >&2 +else + if [ -d lib ]; then + cf="-shared" + lf="--enable-auto-import" + pushd lib 2>&1 >/dev/null + for t in "" "t" + do + for m in "" "_g" + do + if [ -f libncurses${t}${m}.a ]; then + f=libncurses${t}${m}.a + g=`basename $f .a | cut -c 4-` + gi=libw${g}.a + td=tmp-${g} + rm -rf "${td}" + mkdir "${td}" + cd "${td}" + ar x ../${f} `ar t ../${f}` + gcc $cf -o w${g}.dll -Wl,--out-implib,${gi} -Wl,--output-def,w${g}.def -Wl,$lf `ar t ../$f` + lib //NOLOGO /MACHINE:i386 /DEF:w${g}.def + rm -f `ar t ../$f` + mv w${g}.dll .. + mv w${g}.lib .. + mv libw${g}.a .. + cd .. + rm -rf "${td}" + + for l in panel menu form + do + for f in lib${l}${t}${m}.a + do + g=`basename $f .a | cut -c 4-` + td=tmp-${g} + rm -rf "${td}" + mkdir "${td}" + echo $g + cd "${td}" + ar x ../$f `ar t ../$f` + gcc $cf -o w${g}.dll -Wl,--out-implib,libw${g}.a -Wl,--output-def,w${g}.def -Wl,$lf `ar t ../$f` ../${gi} + lib //NOLOGO /MACHINE:i386 /DEF:w${g}.def + rm -f `ar t ../$f` + mv w${g}.dll .. + mv w${g}.lib .. + mv libw${g}.a .. + cd .. + rm -rf "${td}" + done + done + fi + done + done + popd + else + echo lib has not been build >&2 + fi +fi diff --git a/ncurses/Makefile.in b/ncurses/Makefile.in index dfda636a..043c8029 100644 --- a/ncurses/Makefile.in +++ b/ncurses/Makefile.in @@ -1,4 +1,4 @@ -# $Id: Makefile.in,v 1.115 2009/03/28 18:22:39 Charles.Wilson Exp $ +# $Id: Makefile.in,v 1.116 2009/06/27 14:31:36 tom Exp $ ############################################################################## # Copyright (c) 1998-2007,2009 Free Software Foundation, Inc. # # # @@ -205,7 +205,7 @@ make_hash$(BUILD_EXEEXT) : \ ../include/hashsize.h $(BUILD_CC) -o $@ $(BUILD_CCFLAGS) -DMAIN_PROGRAM $(tinfo)/comp_hash.c $(BUILD_LDFLAGS) $(BUILD_LIBS) -./expanded.c : $(serial)/MKexpanded.sh +./expanded.c : curses.priv.h $(serial)/MKexpanded.sh sh -e $(serial)/MKexpanded.sh "$(CPP)" $(CPPFLAGS) > $@ ./comp_captab.c: \ diff --git a/ncurses/README b/ncurses/README index 120aa5b8..cbde3354 100644 --- a/ncurses/README +++ b/ncurses/README @@ -1,5 +1,5 @@ ------------------------------------------------------------------------------- --- Copyright (c) 1998-2000,2006 Free Software Foundation, Inc. -- +-- Copyright (c) 1998-2006,2009 Free Software Foundation, Inc. -- -- -- -- Permission is hereby granted, free of charge, to any person obtaining a -- -- copy of this software and associated documentation files (the -- @@ -25,7 +25,26 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: README,v 1.9 2006/04/22 22:19:37 tom Exp $ +-- $Id: README,v 1.10 2009/06/27 14:44:30 tom Exp $ ------------------------------------------------------------------------------- For discussion of the package internals, see hackguide.html in the doc/html directory. + +------------------------------------------------------------------------------- +The llib-lXXXX files could be used as lint-library sources (and were, at one +time). However, they are actually used as a documentation aid to keep track +of changes to the public/private interfaces in ncurses. Most of the text in +these files is generated using cproto; some manual cleanup and adjustment of +types (to reflect #define's in curses.h) is needed. The functions listed in +the llib-lXXXX files do not correspond to the default configure options; some +additional ones are added to include "all" of the entrypoints for each of the +major configurations (normal, wide-character, threaded): + + --disable-macros + --disable-root-environ + --enable-expanded + --enable-getcap + --enable-getcap-cache + --enable-sp-funcs + --enable-termcap + --with-develop diff --git a/ncurses/base/lib_driver.c b/ncurses/base/lib_driver.c new file mode 100644 index 00000000..1be9903f --- /dev/null +++ b/ncurses/base/lib_driver.c @@ -0,0 +1,142 @@ +/**************************************************************************** + * Copyright (c) 2008,2009 Free Software Foundation, Inc. * + * * + * Permission is hereby granted, free of charge, to any person obtaining a * + * copy of this software and associated documentation files (the * + * "Software"), to deal in the Software without restriction, including * + * without limitation the rights to use, copy, modify, merge, publish, * + * distribute, distribute with modifications, sublicense, and/or sell * + * copies of the Software, and to permit persons to whom the Software is * + * furnished to do so, subject to the following conditions: * + * * + * The above copyright notice and this permission notice shall be included * + * in all copies or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Juergen Pfeifer * + * * + ****************************************************************************/ + +#include + +MODULE_ID("$Id: lib_driver.c,v 1.1 2009/02/21 15:11:29 juergen Exp $") + +typedef struct DriverEntry { + const char *name; + TERM_DRIVER *driver; +} DRIVER_ENTRY; + +static DRIVER_ENTRY DriverTable[] = +{ +#ifdef __MINGW32__ + {"win", &_nc_WIN_DRIVER}, +#endif + {"tinfo", &_nc_TINFO_DRIVER} +}; + +#define NUM_DRIVERS (int)(sizeof(DriverTable)/sizeof(DRIVER_ENTRY)) + +NCURSES_EXPORT(int) +_nc_get_driver(TERMINAL_CONTROL_BLOCK * TCB, const char *name, int *errret) +{ + int code = ERR; + int i; + TERM_DRIVER *res = (TERM_DRIVER *) 0; + TERM_DRIVER *use = 0; + + assert(TCB != 0); + + for (i = 0; i < NUM_DRIVERS; i++) { + res = DriverTable[i].driver; + if (res->CanHandle(TCB, name, errret)) { + use = res; + break; + } + } + if (use != 0) { + TCB->drv = use; + code = OK; + } + return (code); +} + +NCURSES_EXPORT(int) +NCURSES_SP_NAME(has_key) (SCREEN *sp, int keycode) +{ + T((T_CALLED("has_key(%p, %d)"), sp, keycode)); + returnCode(IsValidTIScreen(sp) ? CallDriver_1(sp, kyExist, keycode) : FALSE); +} + +NCURSES_EXPORT(int) +has_key(int keycode) +{ + return NCURSES_SP_NAME(has_key) (CURRENT_SCREEN, keycode); +} + +NCURSES_EXPORT(int) +NCURSES_SP_NAME(_nc_mcprint) (SCREEN *sp, char *data, int len) +{ + int code = ERR; + + if (0 != TerminalOf(sp)) + code = CallDriver_2(sp, print, data, len); + return (code); +} + +NCURSES_EXPORT(int) +mcprint(char *data, int len) +{ + return NCURSES_SP_NAME(_nc_mcprint) (CURRENT_SCREEN, data, len); +} + +NCURSES_EXPORT(int) +NCURSES_SP_NAME(doupdate) (SCREEN *sp) +{ + int code = ERR; + + T((T_CALLED("doupdate(%p)"), sp)); + + if (IsValidScreen(sp)) + code = CallDriver(sp, update); + + returnCode(code); +} + +NCURSES_EXPORT(int) +doupdate(void) +{ + return NCURSES_SP_NAME(doupdate) (CURRENT_SCREEN); +} + +NCURSES_EXPORT(int) +NCURSES_SP_NAME(mvcur) (SCREEN *sp, int yold, int xold, int ynew, int xnew) +{ + int code = ERR; + TR(TRACE_CALLS | TRACE_MOVE, (T_CALLED("mvcur(%p,%d,%d,%d,%d)"), + sp, yold, xold, ynew, xnew)); + if (HasTerminal(sp)) { + code = CallDriver_4(sp, hwcur, yold, xold, ynew, xnew); + } + returnCode(code); +} + +NCURSES_EXPORT(int) +mvcur(int yold, int xold, int ynew, int xnew) +/* optimized cursor move from (yold, xold) to (ynew, xnew) */ +{ + return NCURSES_SP_NAME(mvcur) (CURRENT_SCREEN, yold, xold, ynew, xnew); +} diff --git a/ncurses/base/lib_set_term.c b/ncurses/base/lib_set_term.c index 522d0928..7bf6ea4d 100644 --- a/ncurses/base/lib_set_term.c +++ b/ncurses/base/lib_set_term.c @@ -49,7 +49,7 @@ #define CUR SP_TERMTYPE #endif -MODULE_ID("$Id: lib_set_term.c,v 1.123 2009/06/06 20:26:17 tom Exp $") +MODULE_ID("$Id: lib_set_term.c,v 1.124 2009/06/27 21:36:14 tom Exp $") NCURSES_EXPORT(SCREEN *) set_term(SCREEN *screenp) @@ -280,6 +280,9 @@ _nc_setupscreen(int slines GCC_UNUSED, } T(("created SP %p", SP)); +#if NCURSES_SP_FUNCS + sp = SP; /* fixup so SET_LINES and SET_COLS works */ +#endif SP->_next_screen = _nc_screen_chain; _nc_screen_chain = SP; diff --git a/ncurses/curses.priv.h b/ncurses/curses.priv.h index a978f298..5f6b6b74 100644 --- a/ncurses/curses.priv.h +++ b/ncurses/curses.priv.h @@ -35,7 +35,7 @@ /* - * $Id: curses.priv.h,v 1.421 2009/06/06 18:12:52 tom Exp $ + * $Id: curses.priv.h,v 1.427 2009/06/27 20:31:54 tom Exp $ * * curses.priv.h * @@ -1562,16 +1562,28 @@ extern NCURSES_EXPORT(void) _nc_toggle_attr_on (attr_t *, attr_t); extern NCURSES_EXPORT(void) _nc_toggle_attr_off (attr_t *, attr_t); #undef DelCharCost -#define DelCharCost(count) _nc_DelCharCost(count) -extern NCURSES_EXPORT(int) _nc_DelCharCost (int); +#define DelCharCost(sp, count) NCURSES_SP_NAME(_nc_DelCharCost)(NCURSES_SP_ARGx count) #undef InsCharCost -#define InsCharCost(count) _nc_InsCharCost(count) -extern NCURSES_EXPORT(int) _nc_InsCharCost (int); +#define InsCharCost(sp, count) NCURSES_SP_NAME(_nc_InsCharCost)(NCURSES_SP_ARGx count) + +extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_DelCharCost) (NCURSES_SP_DCLx int _c); +extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_InsCharCost) (NCURSES_SP_DCLx int _c); #undef UpdateAttrs -#define UpdateAttrs(c) _nc_UpdateAttrs(c) -extern NCURSES_EXPORT(void) _nc_UpdateAttrs (NCURSES_CH_T); +#define UpdateAttrs(sp,c) NCURSES_SP_NAME(_nc_UpdateAttrs)(NCURSES_SP_ARGx CHREF(c)) + +#if defined(NEED_NCURSES_CH_T) +extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_UpdateAttrs) (NCURSES_SP_DCLx CARG_CH_T _c); +#else +extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_UpdateAttrs) (NCURSES_SP_DCLx chtype c); +#endif + +#if NCURSES_SP_FUNCS +extern NCURSES_EXPORT(int) _nc_DelCharCost (int); +extern NCURSES_EXPORT(int) _nc_InsCharCost (int); +extern NCURSES_EXPORT(void) _nc_UpdateAttrs (CARG_CH_T); +#endif /* NCURSES_SP_FUNCS */ #else diff --git a/ncurses/llib-lncurses b/ncurses/llib-lncurses index cc0e3667..88d13124 100644 --- a/ncurses/llib-lncurses +++ b/ncurses/llib-lncurses @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. * + * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -27,7 +27,7 @@ ****************************************************************************/ /**************************************************************************** - * Author: Thomas E. Dickey 1996-2008 * + * Author: Thomas E. Dickey 1996-2009 * ****************************************************************************/ /* LINTLIBRARY */ @@ -38,27 +38,54 @@ #undef _nc_oldnums int *_nc_oldnums; +#undef _nc_scroll_optimize_sp +void _nc_scroll_optimize_sp( + SCREEN *sp) + { /* void */ } + #undef _nc_scroll_optimize void _nc_scroll_optimize(void) { /* void */ } +#undef _nc_linedump_sp +void _nc_linedump_sp( + SCREEN *sp) + { /* void */ } + #undef _nc_linedump void _nc_linedump(void) { /* void */ } /* ./tty/hashmap.c */ -#include +#undef _nc_hash_map_sp +void _nc_hash_map_sp( + SCREEN *sp) + { /* void */ } #undef _nc_hash_map void _nc_hash_map(void) { /* void */ } +#undef _nc_make_oldhash_sp +void _nc_make_oldhash_sp( + SCREEN *sp, + int i) + { /* void */ } + #undef _nc_make_oldhash void _nc_make_oldhash( int i) { /* void */ } +#undef _nc_scroll_oldhash_sp +void _nc_scroll_oldhash_sp( + SCREEN *sp, + int n, + int top, + int bot) + { /* void */ } + #undef _nc_scroll_oldhash void _nc_scroll_oldhash( int n, @@ -112,6 +139,11 @@ int waddchnstr( /* ./base/lib_beep.c */ +#undef beep_sp +int beep_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef beep int beep(void) { return(*(int *)0); } @@ -187,6 +219,7 @@ int wclrtoeol( /* ./base/lib_color.c */ +#include #include #undef COLOR_PAIRS @@ -194,14 +227,32 @@ int COLOR_PAIRS; #undef COLORS int COLORS; +#undef _nc_reset_colors_sp +NCURSES_BOOL _nc_reset_colors_sp( + SCREEN *sp) + { return(*(NCURSES_BOOL *)0); } + #undef _nc_reset_colors NCURSES_BOOL _nc_reset_colors(void) { return(*(NCURSES_BOOL *)0); } +#undef start_color_sp +int start_color_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef start_color int start_color(void) { return(*(int *)0); } +#undef init_pair_sp +int init_pair_sp( + SCREEN *sp, + short pair, + short f, + short b) + { return(*(int *)0); } + #undef init_pair int init_pair( short pair, @@ -209,6 +260,15 @@ int init_pair( short b) { return(*(int *)0); } +#undef init_color_sp +int init_color_sp( + SCREEN *sp, + short color, + short r, + short g, + short b) + { return(*(int *)0); } + #undef init_color int init_color( short color, @@ -217,14 +277,33 @@ int init_color( short b) { return(*(int *)0); } +#undef can_change_color_sp +NCURSES_BOOL can_change_color_sp( + SCREEN *sp) + { return(*(NCURSES_BOOL *)0); } + #undef can_change_color NCURSES_BOOL can_change_color(void) { return(*(NCURSES_BOOL *)0); } +#undef has_colors_sp +NCURSES_BOOL has_colors_sp( + SCREEN *sp) + { return(*(NCURSES_BOOL *)0); } + #undef has_colors NCURSES_BOOL has_colors(void) { return(*(NCURSES_BOOL *)0); } +#undef color_content_sp +int color_content_sp( + SCREEN *sp, + short color, + short *r, + short *g, + short *b) + { return(*(int *)0); } + #undef color_content int color_content( short color, @@ -233,6 +312,14 @@ int color_content( short *b) { return(*(int *)0); } +#undef pair_content_sp +int pair_content_sp( + SCREEN *sp, + short pair, + short *f, + short *b) + { return(*(int *)0); } + #undef pair_content int pair_content( short pair, @@ -240,13 +327,21 @@ int pair_content( short *b) { return(*(int *)0); } +#undef _nc_do_color_sp +void _nc_do_color_sp( + SCREEN *sp, + short old_pair, + short pair, + NCURSES_BOOL reverse, + NCURSES_OUTC_sp outc) + { /* void */ } + #undef _nc_do_color void _nc_do_color( short old_pair, short pair, NCURSES_BOOL reverse, - int (*outc)( - int p1)) + NCURSES_OUTC outc) { /* void */ } /* ./base/lib_colorset.c */ @@ -274,16 +369,31 @@ int delwin( /* ./base/lib_echo.c */ +#undef echo_sp +int echo_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef echo int echo(void) { return(*(int *)0); } +#undef noecho_sp +int noecho_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef noecho int noecho(void) { return(*(int *)0); } /* ./base/lib_endwin.c */ +#undef endwin_sp +int endwin_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef endwin int endwin(void) { return(*(int *)0); } @@ -297,6 +407,11 @@ int werase( /* ./base/lib_flash.c */ +#undef flash_sp +int flash_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef flash int flash(void) { return(*(int *)0); } @@ -1138,6 +1253,12 @@ NCURSES_BOOL mouse_trafo( #undef ESCDELAY int ESCDELAY; +#undef set_escdelay_sp +int set_escdelay_sp( + SCREEN *sp, + int value) + { return(*(int *)0); } + #undef set_escdelay int set_escdelay( int value) @@ -1200,6 +1321,7 @@ WINDOW *initscr(void) #undef _nc_insert_ch int _nc_insert_ch( + SCREEN *sp, WINDOW *win, chtype ch) { return(*(int *)0); } @@ -1238,6 +1360,11 @@ int winnstr( /* ./base/lib_isendwin.c */ +#undef isendwin_sp +NCURSES_BOOL isendwin_sp( + SCREEN *sp) + { return(*(NCURSES_BOOL *)0); } + #undef isendwin NCURSES_BOOL isendwin(void) { return(*(NCURSES_BOOL *)0); } @@ -1252,16 +1379,35 @@ int leaveok( /* ./base/lib_mouse.c */ +#undef getmouse_sp +int getmouse_sp( + SCREEN *sp, + MEVENT *aevent) + { return(*(int *)0); } + #undef getmouse int getmouse( MEVENT *aevent) { return(*(int *)0); } +#undef ungetmouse_sp +int ungetmouse_sp( + SCREEN *sp, + MEVENT *aevent) + { return(*(int *)0); } + #undef ungetmouse int ungetmouse( MEVENT *aevent) { return(*(int *)0); } +#undef mousemask_sp +mmask_t mousemask_sp( + SCREEN *sp, + mmask_t newmask, + mmask_t *oldmask) + { return(*(mmask_t *)0); } + #undef mousemask mmask_t mousemask( mmask_t newmask, @@ -1275,14 +1421,30 @@ NCURSES_BOOL wenclose( int x) { return(*(NCURSES_BOOL *)0); } +#undef mouseinterval_sp +int mouseinterval_sp( + SCREEN *sp, + int maxclick) + { return(*(int *)0); } + #undef mouseinterval int mouseinterval( int maxclick) { return(*(int *)0); } #undef _nc_has_mouse -int _nc_has_mouse(void) - { return(*(int *)0); } +NCURSES_BOOL _nc_has_mouse( + SCREEN *sp) + { return(*(NCURSES_BOOL *)0); } + +#undef has_mouse_sp +NCURSES_BOOL has_mouse_sp( + SCREEN *sp) + { return(*(NCURSES_BOOL *)0); } + +#undef has_mouse +NCURSES_BOOL has_mouse(void) + { return(*(NCURSES_BOOL *)0); } #undef wmouse_trafo NCURSES_BOOL wmouse_trafo( @@ -1303,24 +1465,55 @@ int wmove( /* ./tty/lib_mvcur.c */ +#undef _nc_msec_cost_sp +int _nc_msec_cost_sp( + SCREEN *sp, + const char *const cap, + int affcnt) + { return(*(int *)0); } + #undef _nc_msec_cost int _nc_msec_cost( const char *const cap, int affcnt) { return(*(int *)0); } +#undef _nc_mvcur_resume_sp +void _nc_mvcur_resume_sp( + SCREEN *sp) + { /* void */ } + #undef _nc_mvcur_resume void _nc_mvcur_resume(void) { /* void */ } +#undef _nc_mvcur_init_sp +void _nc_mvcur_init_sp( + SCREEN *sp) + { /* void */ } + #undef _nc_mvcur_init void _nc_mvcur_init(void) { /* void */ } +#undef _nc_mvcur_wrap_sp +void _nc_mvcur_wrap_sp( + SCREEN *sp) + { /* void */ } + #undef _nc_mvcur_wrap void _nc_mvcur_wrap(void) { /* void */ } +#undef mvcur_sp +int mvcur_sp( + SCREEN *sp, + int yold, + int xold, + int ynew, + int xnew) + { return(*(int *)0); } + #undef mvcur int mvcur( int yold, @@ -1343,14 +1536,32 @@ int mvwin( /* ./base/lib_newterm.c */ +#undef filter_sp +void filter_sp( + SCREEN *sp) + { /* void */ } + #undef filter void filter(void) { /* void */ } +#undef nofilter_sp +void nofilter_sp( + SCREEN *sp) + { /* void */ } + #undef nofilter void nofilter(void) { /* void */ } +#undef newterm_sp +SCREEN *newterm_sp( + SCREEN *sp, + char *name, + FILE *ofp, + FILE *ifp) + { return(*(SCREEN **)0); } + #undef newterm SCREEN *newterm( char *name, @@ -1365,6 +1576,15 @@ int _nc_freewin( WINDOW *win) { return(*(int *)0); } +#undef newwin_sp +WINDOW *newwin_sp( + SCREEN *sp, + int num_lines, + int num_columns, + int begy, + int begx) + { return(*(WINDOW **)0); } + #undef newwin WINDOW *newwin( int num_lines, @@ -1391,6 +1611,16 @@ WINDOW *subwin( int x) { return(*(WINDOW **)0); } +#undef _nc_makenew_sp +WINDOW *_nc_makenew_sp( + SCREEN *sp, + int num_lines, + int num_columns, + int begy, + int begx, + int flags) + { return(*(WINDOW **)0); } + #undef _nc_makenew WINDOW *_nc_makenew( int num_lines, @@ -1400,17 +1630,37 @@ WINDOW *_nc_makenew( int flags) { return(*(WINDOW **)0); } -#undef _nc_screen_of -SCREEN *_nc_screen_of( - WINDOW *win) - { return(*(SCREEN **)0); } +#undef _nc_curscr_of +WINDOW *_nc_curscr_of( + SCREEN *sp) + { return(*(WINDOW **)0); } + +#undef _nc_newscr_of +WINDOW *_nc_newscr_of( + SCREEN *sp) + { return(*(WINDOW **)0); } + +#undef _nc_stdscr_of +WINDOW *_nc_stdscr_of( + SCREEN *sp) + { return(*(WINDOW **)0); } /* ./base/lib_nl.c */ +#undef nl_sp +int nl_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef nl int nl(void) { return(*(int *)0); } +#undef nonl_sp +int nonl_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef nonl int nonl(void) { return(*(int *)0); } @@ -1444,6 +1694,13 @@ int copywin( /* ./base/lib_pad.c */ +#undef newpad_sp +WINDOW *newpad_sp( + SCREEN *sp, + int l, + int c) + { return(*(WINDOW **)0); } + #undef newpad WINDOW *newpad( int l, @@ -1549,6 +1806,14 @@ int wnoutrefresh( /* ./base/lib_restart.c */ +#undef restartterm_sp +int restartterm_sp( + SCREEN *sp, + char *termp, + int filenum, + int *errret) + { return(*(int *)0); } + #undef restartterm int restartterm( char *termp, @@ -1597,6 +1862,12 @@ int mvwscanw( /* ./base/lib_screen.c */ +#undef getwin_sp +WINDOW *getwin_sp( + SCREEN *sp, + FILE *filep) + { return(*(WINDOW **)0); } + #undef getwin WINDOW *getwin( FILE *filep) @@ -1608,6 +1879,12 @@ int putwin( FILE *filep) { return(*(int *)0); } +#undef scr_restore_sp +int scr_restore_sp( + SCREEN *sp, + const char *file) + { return(*(int *)0); } + #undef scr_restore int scr_restore( const char *file) @@ -1618,11 +1895,23 @@ int scr_dump( const char *file) { return(*(int *)0); } +#undef scr_init_sp +int scr_init_sp( + SCREEN *sp, + const char *file) + { return(*(int *)0); } + #undef scr_init int scr_init( const char *file) { return(*(int *)0); } +#undef scr_set_sp +int scr_set_sp( + SCREEN *sp, + const char *file) + { return(*(int *)0); } + #undef scr_set int scr_set( const char *file) @@ -1683,6 +1972,15 @@ int _nc_setupscreen( int slk_format) { return(*(int *)0); } +#undef _nc_ripoffline_sp +int _nc_ripoffline_sp( + SCREEN *sp, + int line, + int (*init)( + WINDOW *p1, + int p2)) + { return(*(int *)0); } + #undef _nc_ripoffline int _nc_ripoffline( int line, @@ -1691,6 +1989,15 @@ int _nc_ripoffline( int p2)) { return(*(int *)0); } +#undef ripoffline_sp +int ripoffline_sp( + SCREEN *sp, + int line, + int (*init)( + WINDOW *p1, + int p2)) + { return(*(int *)0); } + #undef ripoffline int ripoffline( int line, @@ -1707,12 +2014,25 @@ int _nc_slk_initialize( int cols) { return(*(int *)0); } +#undef slk_restore_sp +int slk_restore_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef slk_restore int slk_restore(void) { return(*(int *)0); } /* ./base/lib_slkatr_set.c */ +#undef slk_attr_set_sp +int slk_attr_set_sp( + SCREEN *sp, + const attr_t attr, + short color_pair_number, + void *opts) + { return(*(int *)0); } + #undef slk_attr_set int slk_attr_set( const attr_t attr, @@ -1722,6 +2042,12 @@ int slk_attr_set( /* ./base/lib_slkatrof.c */ +#undef slk_attroff_sp +int slk_attroff_sp( + SCREEN *sp, + const chtype attr) + { return(*(int *)0); } + #undef slk_attroff int slk_attroff( const chtype attr) @@ -1729,6 +2055,12 @@ int slk_attroff( /* ./base/lib_slkatron.c */ +#undef slk_attron_sp +int slk_attron_sp( + SCREEN *sp, + const chtype attr) + { return(*(int *)0); } + #undef slk_attron int slk_attron( const chtype attr) @@ -1736,6 +2068,12 @@ int slk_attron( /* ./base/lib_slkatrset.c */ +#undef slk_attrset_sp +int slk_attrset_sp( + SCREEN *sp, + const chtype attr) + { return(*(int *)0); } + #undef slk_attrset int slk_attrset( const chtype attr) @@ -1743,18 +2081,34 @@ int slk_attrset( /* ./base/lib_slkattr.c */ +#undef slk_attr_sp +attr_t slk_attr_sp( + SCREEN *sp) + { return(*(attr_t *)0); } + #undef slk_attr attr_t slk_attr(void) { return(*(attr_t *)0); } /* ./base/lib_slkclear.c */ +#undef slk_clear_sp +int slk_clear_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef slk_clear int slk_clear(void) { return(*(int *)0); } /* ./base/lib_slkcolor.c */ +#undef slk_color_sp +int slk_color_sp( + SCREEN *sp, + short color_pair_number) + { return(*(int *)0); } + #undef slk_color int slk_color( short color_pair_number) @@ -1762,6 +2116,12 @@ int slk_color( /* ./base/lib_slkinit.c */ +#undef slk_init_sp +int slk_init_sp( + SCREEN *sp, + int format) + { return(*(int *)0); } + #undef slk_init int slk_init( int format) @@ -1769,6 +2129,12 @@ int slk_init( /* ./base/lib_slklab.c */ +#undef slk_label_sp +char *slk_label_sp( + SCREEN *sp, + int n) + { return(*(char **)0); } + #undef slk_label char *slk_label( int n) @@ -1776,16 +2142,34 @@ char *slk_label( /* ./base/lib_slkrefr.c */ +#undef slk_noutrefresh_sp +int slk_noutrefresh_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef slk_noutrefresh int slk_noutrefresh(void) { return(*(int *)0); } +#undef slk_refresh_sp +int slk_refresh_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef slk_refresh int slk_refresh(void) { return(*(int *)0); } /* ./base/lib_slkset.c */ +#undef slk_set_sp +int slk_set_sp( + SCREEN *sp, + int i, + const char *astr, + int format) + { return(*(int *)0); } + #undef slk_set int slk_set( int i, @@ -1795,6 +2179,11 @@ int slk_set( /* ./base/lib_slktouch.c */ +#undef slk_touch_sp +int slk_touch_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef slk_touch int slk_touch(void) { return(*(int *)0); } @@ -1857,8 +2246,8 @@ void _nc_fifo_dump( SCREEN *sp) { /* void */ } -#undef _nc_ungetch -int _nc_ungetch( +#undef ungetch_sp +int ungetch_sp( SCREEN *sp, int ch) { return(*(int *)0); } @@ -1870,11 +2259,23 @@ int ungetch( /* ./tty/lib_vidattr.c */ +#undef vidputs_sp +int vidputs_sp( + SCREEN *sp, + chtype newmode, + NCURSES_OUTC_sp outc) + { return(*(int *)0); } + #undef vidputs int vidputs( chtype newmode, - int (*outc)( - int p1)) + NCURSES_OUTC outc) + { return(*(int *)0); } + +#undef vidattr_sp +int vidattr_sp( + SCREEN *sp, + chtype newmode) { return(*(int *)0); } #undef vidattr @@ -1882,6 +2283,11 @@ int vidattr( chtype newmode) { return(*(int *)0); } +#undef termattrs_sp +chtype termattrs_sp( + SCREEN *sp) + { return(*(chtype *)0); } + #undef termattrs chtype termattrs(void) { return(*(chtype *)0); } @@ -1962,12 +2368,24 @@ WINDOW *dupwin( /* ./base/nc_panel.c */ +#undef _nc_panelhook_sp +struct panelhook *_nc_panelhook_sp( + SCREEN *sp) + { return(*(struct panelhook **)0); } + #undef _nc_panelhook struct panelhook *_nc_panelhook(void) { return(*(struct panelhook **)0); } /* ./base/safe_sprintf.c */ +#undef _nc_printf_string_sp +char *_nc_printf_string_sp( + SCREEN *sp, + const char *fmt, + va_list ap) + { return(*(char **)0); } + #undef _nc_printf_string char *_nc_printf_string( const char *fmt, @@ -1979,10 +2397,24 @@ char *_nc_printf_string( #include #include +#undef doupdate_sp +int doupdate_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef doupdate int doupdate(void) { return(*(int *)0); } +#undef _nc_scrolln_sp +int _nc_scrolln_sp( + SCREEN *sp, + int n, + int top, + int bot, + int maxy) + { return(*(int *)0); } + #undef _nc_scrolln int _nc_scrolln( int n, @@ -1991,18 +2423,39 @@ int _nc_scrolln( int maxy) { return(*(int *)0); } +#undef _nc_screen_resume_sp +void _nc_screen_resume_sp( + SCREEN *sp) + { /* void */ } + #undef _nc_screen_resume void _nc_screen_resume(void) { /* void */ } +#undef _nc_screen_init_sp +void _nc_screen_init_sp( + SCREEN *sp) + { /* void */ } + #undef _nc_screen_init void _nc_screen_init(void) { /* void */ } +#undef _nc_screen_wrap_sp +void _nc_screen_wrap_sp( + SCREEN *sp) + { /* void */ } + #undef _nc_screen_wrap void _nc_screen_wrap(void) { /* void */ } +#undef _nc_do_xmc_glitch_sp +void _nc_do_xmc_glitch_sp( + SCREEN *sp, + attr_t previous) + { /* void */ } + #undef _nc_do_xmc_glitch void _nc_do_xmc_glitch( attr_t previous) @@ -2040,6 +2493,12 @@ void _nc_vsscanf(void) void _nc_freeall(void) { /* void */ } +#undef _nc_free_and_exit_sp +void _nc_free_and_exit_sp( + SCREEN *sp, + int code) + { /* void */ } + #undef _nc_free_and_exit void _nc_free_and_exit( int code) @@ -2059,6 +2518,24 @@ void _nc_toggle_attr_off( attr_t at) { /* void */ } +#undef _nc_DelCharCost_sp +int _nc_DelCharCost_sp( + SCREEN *sp, + int count) + { return(*(int *)0); } + +#undef _nc_InsCharCost_sp +int _nc_InsCharCost_sp( + SCREEN *sp, + int count) + { return(*(int *)0); } + +#undef _nc_UpdateAttrs_sp +void _nc_UpdateAttrs_sp( + SCREEN *sp, + chtype c) + { /* void */ } + #undef _nc_DelCharCost int _nc_DelCharCost( int count) @@ -2076,6 +2553,12 @@ void _nc_UpdateAttrs( /* ./base/legacy_coding.c */ +#undef use_legacy_coding_sp +int use_legacy_coding_sp( + SCREEN *sp, + int level) + { return(*(int *)0); } + #undef use_legacy_coding int use_legacy_coding( int level) @@ -2083,10 +2566,22 @@ int use_legacy_coding( /* ./base/lib_dft_fgbg.c */ +#undef use_default_colors_sp +int use_default_colors_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef use_default_colors int use_default_colors(void) { return(*(int *)0); } +#undef assume_default_colors_sp +int assume_default_colors_sp( + SCREEN *sp, + int fg, + int bg) + { return(*(int *)0); } + #undef assume_default_colors int assume_default_colors( int fg, @@ -2095,6 +2590,13 @@ int assume_default_colors( /* ./tinfo/lib_print.c */ +#undef mcprint_sp +int mcprint_sp( + SCREEN *sp, + char *data, + int len) + { return(*(int *)0); } + #undef mcprint int mcprint( char *data, @@ -2103,18 +2605,39 @@ int mcprint( /* ./base/resizeterm.c */ +#undef is_term_resized_sp +NCURSES_BOOL is_term_resized_sp( + SCREEN *sp, + int ToLines, + int ToCols) + { return(*(NCURSES_BOOL *)0); } + #undef is_term_resized NCURSES_BOOL is_term_resized( int ToLines, int ToCols) { return(*(NCURSES_BOOL *)0); } +#undef resize_term_sp +int resize_term_sp( + SCREEN *sp, + int ToLines, + int ToCols) + { return(*(int *)0); } + #undef resize_term int resize_term( int ToLines, int ToCols) { return(*(int *)0); } +#undef resizeterm_sp +int resizeterm_sp( + SCREEN *sp, + int ToLines, + int ToCols) + { return(*(int *)0); } + #undef resizeterm int resizeterm( int ToLines, @@ -2397,6 +2920,11 @@ void _nc_init_keytry( #undef acs_map chtype acs_map[128]; +#undef _nc_init_acs_sp +void _nc_init_acs_sp( + SCREEN *sp) + { /* void */ } + #undef _nc_init_acs void _nc_init_acs(void) { /* void */ } @@ -2420,6 +2948,11 @@ int _nc_ospeed( int BaudRate) { return(*(int *)0); } +#undef baudrate_sp +int baudrate_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef baudrate int baudrate(void) { return(*(int *)0); } @@ -2434,6 +2967,12 @@ TERMINAL *set_curterm( TERMINAL *termp) { return(*(TERMINAL **)0); } +#undef del_curterm_sp +int del_curterm_sp( + SCREEN *sp, + TERMINAL *termp) + { return(*(int *)0); } + #undef del_curterm int del_curterm( TERMINAL *termp) @@ -2456,26 +2995,56 @@ NCURSES_GLOBALS _nc_globals; #undef _nc_prescreen NCURSES_PRESCREEN _nc_prescreen; +#undef _nc_screen_of +SCREEN *_nc_screen_of( + WINDOW *win) + { return(*(SCREEN **)0); } + /* ./tinfo/lib_has_cap.c */ +#undef has_ic_sp +NCURSES_BOOL has_ic_sp( + SCREEN *sp) + { return(*(NCURSES_BOOL *)0); } + #undef has_ic NCURSES_BOOL has_ic(void) { return(*(NCURSES_BOOL *)0); } +#undef has_il_sp +NCURSES_BOOL has_il_sp( + SCREEN *sp) + { return(*(NCURSES_BOOL *)0); } + #undef has_il NCURSES_BOOL has_il(void) { return(*(NCURSES_BOOL *)0); } /* ./tinfo/lib_kernel.c */ +#undef erasechar_sp +char erasechar_sp( + SCREEN *sp) + { return(*(char *)0); } + #undef erasechar char erasechar(void) { return(*(char *)0); } +#undef killchar_sp +char killchar_sp( + SCREEN *sp) + { return(*(char *)0); } + #undef killchar char killchar(void) { return(*(char *)0); } +#undef flushinp_sp +int flushinp_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef flushinp int flushinp(void) { return(*(int *)0); } @@ -2484,8 +3053,8 @@ int flushinp(void) struct kn { short offset; int code; }; -#undef _nc_keyname -char *_nc_keyname( +#undef keyname_sp +char *keyname_sp( SCREEN *sp, int c) { return(*(char **)0); } @@ -2505,6 +3074,12 @@ char *longname(void) #include +#undef napms_sp +int napms_sp( + SCREEN *sp, + int ms) + { return(*(int *)0); } + #undef napms int napms( int ms) @@ -2524,6 +3099,12 @@ void idcok( NCURSES_BOOL flag) { /* void */ } +#undef halfdelay_sp +int halfdelay_sp( + SCREEN *sp, + int t) + { return(*(int *)0); } + #undef halfdelay int halfdelay( int t) @@ -2559,21 +3140,52 @@ int meta( NCURSES_BOOL flag) { return(*(int *)0); } +#undef curs_set_sp +int curs_set_sp( + SCREEN *sp, + int vis) + { return(*(int *)0); } + #undef curs_set int curs_set( int vis) { return(*(int *)0); } +#undef typeahead_sp +int typeahead_sp( + SCREEN *sp, + int fd) + { return(*(int *)0); } + #undef typeahead int typeahead( int fd) { return(*(int *)0); } +#undef has_key_sp +int has_key_sp( + SCREEN *sp, + int keycode) + { return(*(int *)0); } + #undef has_key int has_key( int keycode) { return(*(int *)0); } +#undef _nc_putp_flush_sp +int _nc_putp_flush_sp( + SCREEN *sp, + const char *name, + const char *value) + { return(*(int *)0); } + +#undef _nc_putp_flush +int _nc_putp_flush( + const char *name, + const char *value) + { return(*(int *)0); } + #undef _nc_keypad int _nc_keypad( SCREEN *sp, @@ -2582,30 +3194,67 @@ int _nc_keypad( /* ./tinfo/lib_raw.c */ +#undef raw_sp +int raw_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef raw int raw(void) { return(*(int *)0); } +#undef cbreak_sp +int cbreak_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef cbreak int cbreak(void) { return(*(int *)0); } +#undef qiflush_sp +void qiflush_sp( + SCREEN *sp) + { /* void */ } + #undef qiflush void qiflush(void) { /* void */ } +#undef noraw_sp +int noraw_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef noraw int noraw(void) { return(*(int *)0); } +#undef nocbreak_sp +int nocbreak_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef nocbreak int nocbreak(void) { return(*(int *)0); } +#undef noqiflush_sp +void noqiflush_sp( + SCREEN *sp) + { /* void */ } + #undef noqiflush void noqiflush(void) { /* void */ } +#undef intrflush_sp +int intrflush_sp( + SCREEN *sp, + WINDOW *win, + NCURSES_BOOL flag) + { return(*(int *)0); } + #undef intrflush int intrflush( WINDOW *win, @@ -2627,6 +3276,12 @@ int COLS; #undef TABSIZE int TABSIZE; +#undef set_tabsize_sp +int set_tabsize_sp( + SCREEN *sp, + int value) + { return(*(int *)0); } + #undef set_tabsize int set_tabsize( int value) @@ -2637,6 +3292,12 @@ int _nc_handle_sigwinch( SCREEN *sp) { return(*(int *)0); } +#undef use_env_sp +void use_env_sp( + SCREEN *sp, + NCURSES_BOOL f) + { /* void */ } + #undef use_env void use_env( NCURSES_BOOL f) @@ -2689,8 +3350,9 @@ char *UP; #undef BC char *BC; -#undef tgetent -int tgetent( +#undef tgetent_sp +int tgetent_sp( + SCREEN *sp, char *bufp, const char *name) { return(*(int *)0); } @@ -2701,16 +3363,41 @@ int tgetent( #endif +#undef tgetent +int tgetent( + char *bufp, + const char *name) + { return(*(int *)0); } + +#undef tgetflag_sp +int tgetflag_sp( + SCREEN *sp, + char *id) + { return(*(int *)0); } + #undef tgetflag int tgetflag( char *id) { return(*(int *)0); } +#undef tgetnum_sp +int tgetnum_sp( + SCREEN *sp, + char *id) + { return(*(int *)0); } + #undef tgetnum int tgetnum( char *id) { return(*(int *)0); } +#undef tgetstr_sp +char *tgetstr_sp( + SCREEN *sp, + char *id, + char **area) + { return(*(char **)0); } + #undef tgetstr char *tgetstr( char *id, @@ -2719,6 +3406,11 @@ char *tgetstr( /* ./tinfo/lib_termname.c */ +#undef termname_sp +char *termname_sp( + SCREEN *sp) + { return(*(char **)0); } + #undef termname char *termname(void) { return(*(char **)0); } @@ -2734,16 +3426,34 @@ char *tgoto( /* ./tinfo/lib_ti.c */ +#undef tigetflag_sp +int tigetflag_sp( + SCREEN *sp, + char *str) + { return(*(int *)0); } + #undef tigetflag int tigetflag( char *str) { return(*(int *)0); } +#undef tigetnum_sp +int tigetnum_sp( + SCREEN *sp, + char *str) + { return(*(int *)0); } + #undef tigetnum int tigetnum( char *str) { return(*(int *)0); } +#undef tigetstr_sp +char *tigetstr_sp( + SCREEN *sp, + char *str) + { return(*(char **)0); } + #undef tigetstr char *tigetstr( char *str) @@ -2781,25 +3491,75 @@ void _nc_set_no_padding( SCREEN *sp) { /* void */ } +#undef delay_output_sp +int delay_output_sp( + SCREEN *sp, + int ms) + { return(*(int *)0); } + #undef delay_output int delay_output( int ms) { return(*(int *)0); } +#undef _nc_flush_sp +void _nc_flush_sp( + SCREEN *sp) + { /* void */ } + #undef _nc_flush void _nc_flush(void) { /* void */ } +#undef _nc_outch_sp +int _nc_outch_sp( + SCREEN *sp, + int ch) + { return(*(int *)0); } + #undef _nc_outch int _nc_outch( int ch) { return(*(int *)0); } +#undef putp_sp +int putp_sp( + SCREEN *sp, + const char *string) + { return(*(int *)0); } + +#undef _nc_putp_sp +int _nc_putp_sp( + SCREEN *sp, + const char *name, + const char *string) + { return(*(int *)0); } + #undef putp int putp( const char *string) { return(*(int *)0); } +#undef _nc_putp +int _nc_putp( + const char *name, + const char *string) + { return(*(int *)0); } + +#undef tputs_sp +int tputs_sp( + SCREEN *sp, + const char *string, + int affcnt, + NCURSES_OUTC_sp outc) + { return(*(int *)0); } + +#undef _nc_outc_wrapper +int _nc_outc_wrapper( + SCREEN *sp, + int c) + { return(*(int *)0); } + #undef tputs int tputs( const char *string, @@ -2944,36 +3704,78 @@ char *_tracechar( /* ./tinfo/lib_ttyflags.c */ +#undef _nc_get_tty_mode_sp +int _nc_get_tty_mode_sp( + SCREEN *sp, + struct termios *buf) + { return(*(int *)0); } + #undef _nc_get_tty_mode int _nc_get_tty_mode( struct termios *buf) { return(*(int *)0); } +#undef _nc_set_tty_mode_sp +int _nc_set_tty_mode_sp( + SCREEN *sp, + struct termios *buf) + { return(*(int *)0); } + #undef _nc_set_tty_mode int _nc_set_tty_mode( struct termios *buf) { return(*(int *)0); } +#undef def_shell_mode_sp +int def_shell_mode_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef def_shell_mode int def_shell_mode(void) { return(*(int *)0); } +#undef def_prog_mode_sp +int def_prog_mode_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef def_prog_mode int def_prog_mode(void) { return(*(int *)0); } +#undef reset_prog_mode_sp +int reset_prog_mode_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef reset_prog_mode int reset_prog_mode(void) { return(*(int *)0); } +#undef reset_shell_mode_sp +int reset_shell_mode_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef reset_shell_mode int reset_shell_mode(void) { return(*(int *)0); } +#undef savetty_sp +int savetty_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef savetty int savetty(void) { return(*(int *)0); } +#undef resetty_sp +int resetty_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef resetty int resetty(void) { return(*(int *)0); } @@ -3053,6 +3855,13 @@ int _nc_read_termcap_entry( /* ./tinfo/setbuf.c */ +#undef _nc_set_buffer_sp +void _nc_set_buffer_sp( + SCREEN *sp, + FILE *ofp, + NCURSES_BOOL buffered) + { /* void */ } + #undef _nc_set_buffer void _nc_set_buffer( FILE *ofp, @@ -3144,8 +3953,8 @@ char *_nc_trim_sgr0( /* ./unctrl.c */ -#undef _nc_unctrl -char *_nc_unctrl( +#undef unctrl_sp +char *unctrl_sp( SCREEN *sp, chtype ch) { return(*(char **)0); } @@ -3394,6 +4203,13 @@ int _nc_tic_written(void) /* ./base/define_key.c */ +#undef define_key_sp +int define_key_sp( + SCREEN *sp, + const char *str, + int keycode) + { return(*(int *)0); } + #undef define_key int define_key( const char *str, @@ -3408,6 +4224,12 @@ void _nc_hashed_db(void) /* ./base/key_defined.c */ +#undef key_defined_sp +int key_defined_sp( + SCREEN *sp, + const char *str) + { return(*(int *)0); } + #undef key_defined int key_defined( const char *str) @@ -3415,6 +4237,13 @@ int key_defined( /* ./base/keybound.c */ +#undef keybound_sp +char *keybound_sp( + SCREEN *sp, + int code, + int count) + { return(*(char **)0); } + #undef keybound char *keybound( int code, @@ -3423,6 +4252,13 @@ char *keybound( /* ./base/keyok.c */ +#undef keyok_sp +int keyok_sp( + SCREEN *sp, + int c, + NCURSES_BOOL flag) + { return(*(int *)0); } + #undef keyok int keyok( int c, diff --git a/ncurses/llib-lncursest b/ncurses/llib-lncursest index d29ef60d..1c98ccdd 100644 --- a/ncurses/llib-lncursest +++ b/ncurses/llib-lncursest @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2008 Free Software Foundation, Inc. * + * Copyright (c) 2008,2009 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -27,7 +27,7 @@ ****************************************************************************/ /**************************************************************************** - * Author: Thomas E. Dickey 2008 * + * Author: Thomas E. Dickey 2008-on * ****************************************************************************/ /* LINTLIBRARY */ @@ -38,27 +38,54 @@ #undef _nc_oldnums int *_nc_oldnums; +#undef _nc_scroll_optimize_sp +void _nc_scroll_optimize_sp( + SCREEN *sp) + { /* void */ } + #undef _nc_scroll_optimize void _nc_scroll_optimize(void) { /* void */ } +#undef _nc_linedump_sp +void _nc_linedump_sp( + SCREEN *sp) + { /* void */ } + #undef _nc_linedump void _nc_linedump(void) { /* void */ } /* ./tty/hashmap.c */ -#include +#undef _nc_hash_map_sp +void _nc_hash_map_sp( + SCREEN *sp) + { /* void */ } #undef _nc_hash_map void _nc_hash_map(void) { /* void */ } +#undef _nc_make_oldhash_sp +void _nc_make_oldhash_sp( + SCREEN *sp, + int i) + { /* void */ } + #undef _nc_make_oldhash void _nc_make_oldhash( int i) { /* void */ } +#undef _nc_scroll_oldhash_sp +void _nc_scroll_oldhash_sp( + SCREEN *sp, + int n, + int top, + int bot) + { /* void */ } + #undef _nc_scroll_oldhash void _nc_scroll_oldhash( int n, @@ -112,6 +139,11 @@ int waddchnstr( /* ./base/lib_beep.c */ +#undef beep_sp +int beep_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef beep int beep(void) { return(*(int *)0); } @@ -187,6 +219,7 @@ int wclrtoeol( /* ./base/lib_color.c */ +#include #include #undef _nc_COLOR_PAIRS @@ -197,14 +230,32 @@ int _nc_COLOR_PAIRS(void) int _nc_COLORS(void) { return(*(int *)0); } +#undef _nc_reset_colors_sp +NCURSES_BOOL _nc_reset_colors_sp( + SCREEN *sp) + { return(*(NCURSES_BOOL *)0); } + #undef _nc_reset_colors NCURSES_BOOL _nc_reset_colors(void) { return(*(NCURSES_BOOL *)0); } +#undef start_color_sp +int start_color_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef start_color int start_color(void) { return(*(int *)0); } +#undef init_pair_sp +int init_pair_sp( + SCREEN *sp, + short pair, + short f, + short b) + { return(*(int *)0); } + #undef init_pair int init_pair( short pair, @@ -212,6 +263,15 @@ int init_pair( short b) { return(*(int *)0); } +#undef init_color_sp +int init_color_sp( + SCREEN *sp, + short color, + short r, + short g, + short b) + { return(*(int *)0); } + #undef init_color int init_color( short color, @@ -220,14 +280,33 @@ int init_color( short b) { return(*(int *)0); } +#undef can_change_color_sp +NCURSES_BOOL can_change_color_sp( + SCREEN *sp) + { return(*(NCURSES_BOOL *)0); } + #undef can_change_color NCURSES_BOOL can_change_color(void) { return(*(NCURSES_BOOL *)0); } +#undef has_colors_sp +NCURSES_BOOL has_colors_sp( + SCREEN *sp) + { return(*(NCURSES_BOOL *)0); } + #undef has_colors NCURSES_BOOL has_colors(void) { return(*(NCURSES_BOOL *)0); } +#undef color_content_sp +int color_content_sp( + SCREEN *sp, + short color, + short *r, + short *g, + short *b) + { return(*(int *)0); } + #undef color_content int color_content( short color, @@ -236,6 +315,14 @@ int color_content( short *b) { return(*(int *)0); } +#undef pair_content_sp +int pair_content_sp( + SCREEN *sp, + short pair, + short *f, + short *b) + { return(*(int *)0); } + #undef pair_content int pair_content( short pair, @@ -243,13 +330,21 @@ int pair_content( short *b) { return(*(int *)0); } +#undef _nc_do_color_sp +void _nc_do_color_sp( + SCREEN *sp, + short old_pair, + short pair, + NCURSES_BOOL reverse, + NCURSES_OUTC_sp outc) + { /* void */ } + #undef _nc_do_color void _nc_do_color( short old_pair, short pair, NCURSES_BOOL reverse, - int (*outc)( - int p1)) + NCURSES_OUTC outc) { /* void */ } /* ./base/lib_colorset.c */ @@ -277,16 +372,31 @@ int delwin( /* ./base/lib_echo.c */ +#undef echo_sp +int echo_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef echo int echo(void) { return(*(int *)0); } +#undef noecho_sp +int noecho_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef noecho int noecho(void) { return(*(int *)0); } /* ./base/lib_endwin.c */ +#undef endwin_sp +int endwin_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef endwin int endwin(void) { return(*(int *)0); } @@ -300,6 +410,11 @@ int werase( /* ./base/lib_flash.c */ +#undef flash_sp +int flash_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef flash int flash(void) { return(*(int *)0); } @@ -1138,10 +1253,21 @@ NCURSES_BOOL mouse_trafo( #include +#undef _nc_ptr_Escdelay +int *_nc_ptr_Escdelay( + SCREEN *sp) + { return(*(int **)0); } + #undef _nc_ESCDELAY int _nc_ESCDELAY(void) { return(*(int *)0); } +#undef set_escdelay_sp +int set_escdelay_sp( + SCREEN *sp, + int value) + { return(*(int *)0); } + #undef set_escdelay int set_escdelay( int value) @@ -1204,6 +1330,7 @@ WINDOW *initscr(void) #undef _nc_insert_ch int _nc_insert_ch( + SCREEN *sp, WINDOW *win, chtype ch) { return(*(int *)0); } @@ -1242,6 +1369,11 @@ int winnstr( /* ./base/lib_isendwin.c */ +#undef isendwin_sp +NCURSES_BOOL isendwin_sp( + SCREEN *sp) + { return(*(NCURSES_BOOL *)0); } + #undef isendwin NCURSES_BOOL isendwin(void) { return(*(NCURSES_BOOL *)0); } @@ -1256,16 +1388,35 @@ int leaveok( /* ./base/lib_mouse.c */ +#undef getmouse_sp +int getmouse_sp( + SCREEN *sp, + MEVENT *aevent) + { return(*(int *)0); } + #undef getmouse int getmouse( MEVENT *aevent) { return(*(int *)0); } +#undef ungetmouse_sp +int ungetmouse_sp( + SCREEN *sp, + MEVENT *aevent) + { return(*(int *)0); } + #undef ungetmouse int ungetmouse( MEVENT *aevent) { return(*(int *)0); } +#undef mousemask_sp +mmask_t mousemask_sp( + SCREEN *sp, + mmask_t newmask, + mmask_t *oldmask) + { return(*(mmask_t *)0); } + #undef mousemask mmask_t mousemask( mmask_t newmask, @@ -1279,14 +1430,30 @@ NCURSES_BOOL wenclose( int x) { return(*(NCURSES_BOOL *)0); } +#undef mouseinterval_sp +int mouseinterval_sp( + SCREEN *sp, + int maxclick) + { return(*(int *)0); } + #undef mouseinterval int mouseinterval( int maxclick) { return(*(int *)0); } #undef _nc_has_mouse -int _nc_has_mouse(void) - { return(*(int *)0); } +NCURSES_BOOL _nc_has_mouse( + SCREEN *sp) + { return(*(NCURSES_BOOL *)0); } + +#undef has_mouse_sp +NCURSES_BOOL has_mouse_sp( + SCREEN *sp) + { return(*(NCURSES_BOOL *)0); } + +#undef has_mouse +NCURSES_BOOL has_mouse(void) + { return(*(NCURSES_BOOL *)0); } #undef wmouse_trafo NCURSES_BOOL wmouse_trafo( @@ -1307,24 +1474,55 @@ int wmove( /* ./tty/lib_mvcur.c */ +#undef _nc_msec_cost_sp +int _nc_msec_cost_sp( + SCREEN *sp, + const char *const cap, + int affcnt) + { return(*(int *)0); } + #undef _nc_msec_cost int _nc_msec_cost( const char *const cap, int affcnt) { return(*(int *)0); } +#undef _nc_mvcur_resume_sp +void _nc_mvcur_resume_sp( + SCREEN *sp) + { /* void */ } + #undef _nc_mvcur_resume void _nc_mvcur_resume(void) { /* void */ } +#undef _nc_mvcur_init_sp +void _nc_mvcur_init_sp( + SCREEN *sp) + { /* void */ } + #undef _nc_mvcur_init void _nc_mvcur_init(void) { /* void */ } +#undef _nc_mvcur_wrap_sp +void _nc_mvcur_wrap_sp( + SCREEN *sp) + { /* void */ } + #undef _nc_mvcur_wrap void _nc_mvcur_wrap(void) { /* void */ } +#undef mvcur_sp +int mvcur_sp( + SCREEN *sp, + int yold, + int xold, + int ynew, + int xnew) + { return(*(int *)0); } + #undef mvcur int mvcur( int yold, @@ -1347,14 +1545,32 @@ int mvwin( /* ./base/lib_newterm.c */ +#undef filter_sp +void filter_sp( + SCREEN *sp) + { /* void */ } + #undef filter void filter(void) { /* void */ } +#undef nofilter_sp +void nofilter_sp( + SCREEN *sp) + { /* void */ } + #undef nofilter void nofilter(void) { /* void */ } +#undef newterm_sp +SCREEN *newterm_sp( + SCREEN *sp, + char *name, + FILE *ofp, + FILE *ifp) + { return(*(SCREEN **)0); } + #undef newterm SCREEN *newterm( char *name, @@ -1369,6 +1585,15 @@ int _nc_freewin( WINDOW *win) { return(*(int *)0); } +#undef newwin_sp +WINDOW *newwin_sp( + SCREEN *sp, + int num_lines, + int num_columns, + int begy, + int begx) + { return(*(WINDOW **)0); } + #undef newwin WINDOW *newwin( int num_lines, @@ -1395,6 +1620,16 @@ WINDOW *subwin( int x) { return(*(WINDOW **)0); } +#undef _nc_makenew_sp +WINDOW *_nc_makenew_sp( + SCREEN *sp, + int num_lines, + int num_columns, + int begy, + int begx, + int flags) + { return(*(WINDOW **)0); } + #undef _nc_makenew WINDOW *_nc_makenew( int num_lines, @@ -1404,17 +1639,37 @@ WINDOW *_nc_makenew( int flags) { return(*(WINDOW **)0); } -#undef _nc_screen_of -SCREEN *_nc_screen_of( - WINDOW *win) - { return(*(SCREEN **)0); } +#undef _nc_curscr_of +WINDOW *_nc_curscr_of( + SCREEN *sp) + { return(*(WINDOW **)0); } + +#undef _nc_newscr_of +WINDOW *_nc_newscr_of( + SCREEN *sp) + { return(*(WINDOW **)0); } + +#undef _nc_stdscr_of +WINDOW *_nc_stdscr_of( + SCREEN *sp) + { return(*(WINDOW **)0); } /* ./base/lib_nl.c */ +#undef nl_sp +int nl_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef nl int nl(void) { return(*(int *)0); } +#undef nonl_sp +int nonl_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef nonl int nonl(void) { return(*(int *)0); } @@ -1448,6 +1703,13 @@ int copywin( /* ./base/lib_pad.c */ +#undef newpad_sp +WINDOW *newpad_sp( + SCREEN *sp, + int l, + int c) + { return(*(WINDOW **)0); } + #undef newpad WINDOW *newpad( int l, @@ -1553,6 +1815,14 @@ int wnoutrefresh( /* ./base/lib_restart.c */ +#undef restartterm_sp +int restartterm_sp( + SCREEN *sp, + char *termp, + int filenum, + int *errret) + { return(*(int *)0); } + #undef restartterm int restartterm( char *termp, @@ -1601,6 +1871,12 @@ int mvwscanw( /* ./base/lib_screen.c */ +#undef getwin_sp +WINDOW *getwin_sp( + SCREEN *sp, + FILE *filep) + { return(*(WINDOW **)0); } + #undef getwin WINDOW *getwin( FILE *filep) @@ -1612,6 +1888,12 @@ int putwin( FILE *filep) { return(*(int *)0); } +#undef scr_restore_sp +int scr_restore_sp( + SCREEN *sp, + const char *file) + { return(*(int *)0); } + #undef scr_restore int scr_restore( const char *file) @@ -1622,11 +1904,23 @@ int scr_dump( const char *file) { return(*(int *)0); } +#undef scr_init_sp +int scr_init_sp( + SCREEN *sp, + const char *file) + { return(*(int *)0); } + #undef scr_init int scr_init( const char *file) { return(*(int *)0); } +#undef scr_set_sp +int scr_set_sp( + SCREEN *sp, + const char *file) + { return(*(int *)0); } + #undef scr_set int scr_set( const char *file) @@ -1687,6 +1981,15 @@ int _nc_setupscreen( int slk_format) { return(*(int *)0); } +#undef _nc_ripoffline_sp +int _nc_ripoffline_sp( + SCREEN *sp, + int line, + int (*init)( + WINDOW *p1, + int p2)) + { return(*(int *)0); } + #undef _nc_ripoffline int _nc_ripoffline( int line, @@ -1695,6 +1998,15 @@ int _nc_ripoffline( int p2)) { return(*(int *)0); } +#undef ripoffline_sp +int ripoffline_sp( + SCREEN *sp, + int line, + int (*init)( + WINDOW *p1, + int p2)) + { return(*(int *)0); } + #undef ripoffline int ripoffline( int line, @@ -1711,12 +2023,25 @@ int _nc_slk_initialize( int cols) { return(*(int *)0); } +#undef slk_restore_sp +int slk_restore_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef slk_restore int slk_restore(void) { return(*(int *)0); } /* ./base/lib_slkatr_set.c */ +#undef slk_attr_set_sp +int slk_attr_set_sp( + SCREEN *sp, + const attr_t attr, + short color_pair_number, + void *opts) + { return(*(int *)0); } + #undef slk_attr_set int slk_attr_set( const attr_t attr, @@ -1726,6 +2051,12 @@ int slk_attr_set( /* ./base/lib_slkatrof.c */ +#undef slk_attroff_sp +int slk_attroff_sp( + SCREEN *sp, + const chtype attr) + { return(*(int *)0); } + #undef slk_attroff int slk_attroff( const chtype attr) @@ -1733,6 +2064,12 @@ int slk_attroff( /* ./base/lib_slkatron.c */ +#undef slk_attron_sp +int slk_attron_sp( + SCREEN *sp, + const chtype attr) + { return(*(int *)0); } + #undef slk_attron int slk_attron( const chtype attr) @@ -1740,6 +2077,12 @@ int slk_attron( /* ./base/lib_slkatrset.c */ +#undef slk_attrset_sp +int slk_attrset_sp( + SCREEN *sp, + const chtype attr) + { return(*(int *)0); } + #undef slk_attrset int slk_attrset( const chtype attr) @@ -1747,18 +2090,34 @@ int slk_attrset( /* ./base/lib_slkattr.c */ +#undef slk_attr_sp +attr_t slk_attr_sp( + SCREEN *sp) + { return(*(attr_t *)0); } + #undef slk_attr attr_t slk_attr(void) { return(*(attr_t *)0); } /* ./base/lib_slkclear.c */ +#undef slk_clear_sp +int slk_clear_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef slk_clear int slk_clear(void) { return(*(int *)0); } /* ./base/lib_slkcolor.c */ +#undef slk_color_sp +int slk_color_sp( + SCREEN *sp, + short color_pair_number) + { return(*(int *)0); } + #undef slk_color int slk_color( short color_pair_number) @@ -1766,13 +2125,25 @@ int slk_color( /* ./base/lib_slkinit.c */ -#undef slk_init +#undef slk_init_sp +int slk_init_sp( + SCREEN *sp, + int format) + { return(*(int *)0); } + +#undef slk_init int slk_init( int format) { return(*(int *)0); } /* ./base/lib_slklab.c */ +#undef slk_label_sp +char *slk_label_sp( + SCREEN *sp, + int n) + { return(*(char **)0); } + #undef slk_label char *slk_label( int n) @@ -1780,16 +2151,34 @@ char *slk_label( /* ./base/lib_slkrefr.c */ +#undef slk_noutrefresh_sp +int slk_noutrefresh_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef slk_noutrefresh int slk_noutrefresh(void) { return(*(int *)0); } +#undef slk_refresh_sp +int slk_refresh_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef slk_refresh int slk_refresh(void) { return(*(int *)0); } /* ./base/lib_slkset.c */ +#undef slk_set_sp +int slk_set_sp( + SCREEN *sp, + int i, + const char *astr, + int format) + { return(*(int *)0); } + #undef slk_set int slk_set( int i, @@ -1799,6 +2188,11 @@ int slk_set( /* ./base/lib_slktouch.c */ +#undef slk_touch_sp +int slk_touch_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef slk_touch int slk_touch(void) { return(*(int *)0); } @@ -1861,8 +2255,8 @@ void _nc_fifo_dump( SCREEN *sp) { /* void */ } -#undef _nc_ungetch -int _nc_ungetch( +#undef ungetch_sp +int ungetch_sp( SCREEN *sp, int ch) { return(*(int *)0); } @@ -1874,11 +2268,23 @@ int ungetch( /* ./tty/lib_vidattr.c */ +#undef vidputs_sp +int vidputs_sp( + SCREEN *sp, + chtype newmode, + NCURSES_OUTC_sp outc) + { return(*(int *)0); } + #undef vidputs int vidputs( chtype newmode, - int (*outc)( - int p1)) + NCURSES_OUTC outc) + { return(*(int *)0); } + +#undef vidattr_sp +int vidattr_sp( + SCREEN *sp, + chtype newmode) { return(*(int *)0); } #undef vidattr @@ -1886,6 +2292,11 @@ int vidattr( chtype newmode) { return(*(int *)0); } +#undef termattrs_sp +chtype termattrs_sp( + SCREEN *sp) + { return(*(chtype *)0); } + #undef termattrs chtype termattrs(void) { return(*(chtype *)0); } @@ -1966,12 +2377,24 @@ WINDOW *dupwin( /* ./base/nc_panel.c */ +#undef _nc_panelhook_sp +struct panelhook *_nc_panelhook_sp( + SCREEN *sp) + { return(*(struct panelhook **)0); } + #undef _nc_panelhook struct panelhook *_nc_panelhook(void) { return(*(struct panelhook **)0); } /* ./base/safe_sprintf.c */ +#undef _nc_printf_string_sp +char *_nc_printf_string_sp( + SCREEN *sp, + const char *fmt, + va_list ap) + { return(*(char **)0); } + #undef _nc_printf_string char *_nc_printf_string( const char *fmt, @@ -1983,10 +2406,24 @@ char *_nc_printf_string( #include #include +#undef doupdate_sp +int doupdate_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef doupdate int doupdate(void) { return(*(int *)0); } +#undef _nc_scrolln_sp +int _nc_scrolln_sp( + SCREEN *sp, + int n, + int top, + int bot, + int maxy) + { return(*(int *)0); } + #undef _nc_scrolln int _nc_scrolln( int n, @@ -1995,18 +2432,39 @@ int _nc_scrolln( int maxy) { return(*(int *)0); } +#undef _nc_screen_resume_sp +void _nc_screen_resume_sp( + SCREEN *sp) + { /* void */ } + #undef _nc_screen_resume void _nc_screen_resume(void) { /* void */ } +#undef _nc_screen_init_sp +void _nc_screen_init_sp( + SCREEN *sp) + { /* void */ } + #undef _nc_screen_init void _nc_screen_init(void) { /* void */ } +#undef _nc_screen_wrap_sp +void _nc_screen_wrap_sp( + SCREEN *sp) + { /* void */ } + #undef _nc_screen_wrap void _nc_screen_wrap(void) { /* void */ } +#undef _nc_do_xmc_glitch_sp +void _nc_do_xmc_glitch_sp( + SCREEN *sp, + attr_t previous) + { /* void */ } + #undef _nc_do_xmc_glitch void _nc_do_xmc_glitch( attr_t previous) @@ -2044,6 +2502,12 @@ void _nc_vsscanf(void) void _nc_freeall(void) { /* void */ } +#undef _nc_free_and_exit_sp +void _nc_free_and_exit_sp( + SCREEN *sp, + int code) + { /* void */ } + #undef _nc_free_and_exit void _nc_free_and_exit( int code) @@ -2063,6 +2527,24 @@ void _nc_toggle_attr_off( attr_t at) { /* void */ } +#undef _nc_DelCharCost_sp +int _nc_DelCharCost_sp( + SCREEN *sp, + int count) + { return(*(int *)0); } + +#undef _nc_InsCharCost_sp +int _nc_InsCharCost_sp( + SCREEN *sp, + int count) + { return(*(int *)0); } + +#undef _nc_UpdateAttrs_sp +void _nc_UpdateAttrs_sp( + SCREEN *sp, + chtype c) + { /* void */ } + #undef _nc_DelCharCost int _nc_DelCharCost( int count) @@ -2080,6 +2562,12 @@ void _nc_UpdateAttrs( /* ./base/legacy_coding.c */ +#undef use_legacy_coding_sp +int use_legacy_coding_sp( + SCREEN *sp, + int level) + { return(*(int *)0); } + #undef use_legacy_coding int use_legacy_coding( int level) @@ -2087,10 +2575,22 @@ int use_legacy_coding( /* ./base/lib_dft_fgbg.c */ +#undef use_default_colors_sp +int use_default_colors_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef use_default_colors int use_default_colors(void) { return(*(int *)0); } +#undef assume_default_colors_sp +int assume_default_colors_sp( + SCREEN *sp, + int fg, + int bg) + { return(*(int *)0); } + #undef assume_default_colors int assume_default_colors( int fg, @@ -2099,6 +2599,13 @@ int assume_default_colors( /* ./tinfo/lib_print.c */ +#undef mcprint_sp +int mcprint_sp( + SCREEN *sp, + char *data, + int len) + { return(*(int *)0); } + #undef mcprint int mcprint( char *data, @@ -2107,18 +2614,39 @@ int mcprint( /* ./base/resizeterm.c */ +#undef is_term_resized_sp +NCURSES_BOOL is_term_resized_sp( + SCREEN *sp, + int ToLines, + int ToCols) + { return(*(NCURSES_BOOL *)0); } + #undef is_term_resized NCURSES_BOOL is_term_resized( int ToLines, int ToCols) { return(*(NCURSES_BOOL *)0); } +#undef resize_term_sp +int resize_term_sp( + SCREEN *sp, + int ToLines, + int ToCols) + { return(*(int *)0); } + #undef resize_term int resize_term( int ToLines, int ToCols) { return(*(int *)0); } +#undef resizeterm_sp +int resizeterm_sp( + SCREEN *sp, + int ToLines, + int ToCols) + { return(*(int *)0); } + #undef resizeterm int resizeterm( int ToLines, @@ -2408,6 +2936,11 @@ void _nc_init_keytry( chtype *_nc_acs_map(void) { return(*(chtype **)0); } +#undef _nc_init_acs_sp +void _nc_init_acs_sp( + SCREEN *sp) + { /* void */ } + #undef _nc_init_acs void _nc_init_acs(void) { /* void */ } @@ -2431,6 +2964,11 @@ int _nc_ospeed( int BaudRate) { return(*(int *)0); } +#undef baudrate_sp +int baudrate_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef baudrate int baudrate(void) { return(*(int *)0); } @@ -2446,6 +2984,12 @@ TERMINAL *set_curterm( TERMINAL *termp) { return(*(TERMINAL **)0); } +#undef del_curterm_sp +int del_curterm_sp( + SCREEN *sp, + TERMINAL *termp) + { return(*(int *)0); } + #undef del_curterm int del_curterm( TERMINAL *termp) @@ -2474,6 +3018,11 @@ NCURSES_GLOBALS _nc_globals; #undef _nc_prescreen NCURSES_PRESCREEN _nc_prescreen; +#undef _nc_screen_of +SCREEN *_nc_screen_of( + WINDOW *win) + { return(*(SCREEN **)0); } + #undef _nc_init_pthreads void _nc_init_pthreads(void) { /* void */ } @@ -2500,24 +3049,49 @@ int _nc_mutex_unlock( /* ./tinfo/lib_has_cap.c */ +#undef has_ic_sp +NCURSES_BOOL has_ic_sp( + SCREEN *sp) + { return(*(NCURSES_BOOL *)0); } + #undef has_ic NCURSES_BOOL has_ic(void) { return(*(NCURSES_BOOL *)0); } +#undef has_il_sp +NCURSES_BOOL has_il_sp( + SCREEN *sp) + { return(*(NCURSES_BOOL *)0); } + #undef has_il NCURSES_BOOL has_il(void) { return(*(NCURSES_BOOL *)0); } /* ./tinfo/lib_kernel.c */ +#undef erasechar_sp +char erasechar_sp( + SCREEN *sp) + { return(*(char *)0); } + #undef erasechar char erasechar(void) { return(*(char *)0); } +#undef killchar_sp +char killchar_sp( + SCREEN *sp) + { return(*(char *)0); } + #undef killchar char killchar(void) { return(*(char *)0); } +#undef flushinp_sp +int flushinp_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef flushinp int flushinp(void) { return(*(int *)0); } @@ -2526,8 +3100,8 @@ int flushinp(void) struct kn { short offset; int code; }; -#undef _nc_keyname -char *_nc_keyname( +#undef keyname_sp +char *keyname_sp( SCREEN *sp, int c) { return(*(char **)0); } @@ -2539,12 +3113,23 @@ char *keyname( /* ./tinfo/lib_longname.c */ +#undef longname_sp +char *longname_sp( + SCREEN *sp) + { return(*(char **)0); } + #undef longname char *longname(void) { return(*(char **)0); } /* ./tinfo/lib_napms.c */ +#undef napms_sp +int napms_sp( + SCREEN *sp, + int ms) + { return(*(int *)0); } + #undef napms int napms( int ms) @@ -2564,6 +3149,12 @@ void idcok( NCURSES_BOOL flag) { /* void */ } +#undef halfdelay_sp +int halfdelay_sp( + SCREEN *sp, + int t) + { return(*(int *)0); } + #undef halfdelay int halfdelay( int t) @@ -2599,21 +3190,52 @@ int meta( NCURSES_BOOL flag) { return(*(int *)0); } +#undef curs_set_sp +int curs_set_sp( + SCREEN *sp, + int vis) + { return(*(int *)0); } + #undef curs_set int curs_set( int vis) { return(*(int *)0); } +#undef typeahead_sp +int typeahead_sp( + SCREEN *sp, + int fd) + { return(*(int *)0); } + #undef typeahead int typeahead( int fd) { return(*(int *)0); } +#undef has_key_sp +int has_key_sp( + SCREEN *sp, + int keycode) + { return(*(int *)0); } + #undef has_key int has_key( int keycode) { return(*(int *)0); } +#undef _nc_putp_flush_sp +int _nc_putp_flush_sp( + SCREEN *sp, + const char *name, + const char *value) + { return(*(int *)0); } + +#undef _nc_putp_flush +int _nc_putp_flush( + const char *name, + const char *value) + { return(*(int *)0); } + #undef _nc_keypad int _nc_keypad( SCREEN *sp, @@ -2622,30 +3244,67 @@ int _nc_keypad( /* ./tinfo/lib_raw.c */ +#undef raw_sp +int raw_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef raw int raw(void) { return(*(int *)0); } +#undef cbreak_sp +int cbreak_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef cbreak int cbreak(void) { return(*(int *)0); } +#undef qiflush_sp +void qiflush_sp( + SCREEN *sp) + { /* void */ } + #undef qiflush void qiflush(void) { /* void */ } +#undef noraw_sp +int noraw_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef noraw int noraw(void) { return(*(int *)0); } +#undef nocbreak_sp +int nocbreak_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef nocbreak int nocbreak(void) { return(*(int *)0); } +#undef noqiflush_sp +void noqiflush_sp( + SCREEN *sp) + { /* void */ } + #undef noqiflush void noqiflush(void) { /* void */ } +#undef intrflush_sp +int intrflush_sp( + SCREEN *sp, + WINDOW *win, + NCURSES_BOOL flag) + { return(*(int *)0); } + #undef intrflush int intrflush( WINDOW *win, @@ -2663,7 +3322,8 @@ char *_nc_ttytype(void) { return(*(char **)0); } #undef _nc_ptr_Lines -int *_nc_ptr_Lines(void) +int *_nc_ptr_Lines( + SCREEN *sp) { return(*(int **)0); } #undef _nc_LINES @@ -2671,17 +3331,29 @@ int _nc_LINES(void) { return(*(int *)0); } #undef _nc_ptr_Cols -int *_nc_ptr_Cols(void) +int *_nc_ptr_Cols( + SCREEN *sp) { return(*(int **)0); } #undef _nc_COLS int _nc_COLS(void) { return(*(int *)0); } +#undef _nc_ptr_Tabsize +int *_nc_ptr_Tabsize( + SCREEN *sp) + { return(*(int **)0); } + #undef _nc_TABSIZE int _nc_TABSIZE(void) { return(*(int *)0); } +#undef set_tabsize_sp +int set_tabsize_sp( + SCREEN *sp, + int value) + { return(*(int *)0); } + #undef set_tabsize int set_tabsize( int value) @@ -2692,6 +3364,12 @@ int _nc_handle_sigwinch( SCREEN *sp) { return(*(int *)0); } +#undef use_env_sp +void use_env_sp( + SCREEN *sp, + NCURSES_BOOL f) + { /* void */ } + #undef use_env void use_env( NCURSES_BOOL f) @@ -2744,8 +3422,9 @@ char *UP; #undef BC char *BC; -#undef tgetent -int tgetent( +#undef tgetent_sp +int tgetent_sp( + SCREEN *sp, char *bufp, const char *name) { return(*(int *)0); } @@ -2756,16 +3435,41 @@ int tgetent( #endif +#undef tgetent +int tgetent( + char *bufp, + const char *name) + { return(*(int *)0); } + +#undef tgetflag_sp +int tgetflag_sp( + SCREEN *sp, + char *id) + { return(*(int *)0); } + #undef tgetflag int tgetflag( char *id) { return(*(int *)0); } +#undef tgetnum_sp +int tgetnum_sp( + SCREEN *sp, + char *id) + { return(*(int *)0); } + #undef tgetnum int tgetnum( char *id) { return(*(int *)0); } +#undef tgetstr_sp +char *tgetstr_sp( + SCREEN *sp, + char *id, + char **area) + { return(*(char **)0); } + #undef tgetstr char *tgetstr( char *id, @@ -2774,6 +3478,11 @@ char *tgetstr( /* ./tinfo/lib_termname.c */ +#undef termname_sp +char *termname_sp( + SCREEN *sp) + { return(*(char **)0); } + #undef termname char *termname(void) { return(*(char **)0); } @@ -2789,16 +3498,34 @@ char *tgoto( /* ./tinfo/lib_ti.c */ +#undef tigetflag_sp +int tigetflag_sp( + SCREEN *sp, + char *str) + { return(*(int *)0); } + #undef tigetflag int tigetflag( char *str) { return(*(int *)0); } +#undef tigetnum_sp +int tigetnum_sp( + SCREEN *sp, + char *str) + { return(*(int *)0); } + #undef tigetnum int tigetnum( char *str) { return(*(int *)0); } +#undef tigetstr_sp +char *tigetstr_sp( + SCREEN *sp, + char *str) + { return(*(char **)0); } + #undef tigetstr char *tigetstr( char *str) @@ -2836,25 +3563,75 @@ void _nc_set_no_padding( SCREEN *sp) { /* void */ } +#undef delay_output_sp +int delay_output_sp( + SCREEN *sp, + int ms) + { return(*(int *)0); } + #undef delay_output int delay_output( int ms) { return(*(int *)0); } +#undef _nc_flush_sp +void _nc_flush_sp( + SCREEN *sp) + { /* void */ } + #undef _nc_flush void _nc_flush(void) { /* void */ } +#undef _nc_outch_sp +int _nc_outch_sp( + SCREEN *sp, + int ch) + { return(*(int *)0); } + #undef _nc_outch int _nc_outch( int ch) { return(*(int *)0); } +#undef putp_sp +int putp_sp( + SCREEN *sp, + const char *string) + { return(*(int *)0); } + +#undef _nc_putp_sp +int _nc_putp_sp( + SCREEN *sp, + const char *name, + const char *string) + { return(*(int *)0); } + #undef putp int putp( const char *string) { return(*(int *)0); } +#undef _nc_putp +int _nc_putp( + const char *name, + const char *string) + { return(*(int *)0); } + +#undef tputs_sp +int tputs_sp( + SCREEN *sp, + const char *string, + int affcnt, + NCURSES_OUTC_sp outc) + { return(*(int *)0); } + +#undef _nc_outc_wrapper +int _nc_outc_wrapper( + SCREEN *sp, + int c) + { return(*(int *)0); } + #undef tputs int tputs( const char *string, @@ -3024,36 +3801,78 @@ char *_tracechar( /* ./tinfo/lib_ttyflags.c */ +#undef _nc_get_tty_mode_sp +int _nc_get_tty_mode_sp( + SCREEN *sp, + struct termios *buf) + { return(*(int *)0); } + #undef _nc_get_tty_mode int _nc_get_tty_mode( struct termios *buf) { return(*(int *)0); } +#undef _nc_set_tty_mode_sp +int _nc_set_tty_mode_sp( + SCREEN *sp, + struct termios *buf) + { return(*(int *)0); } + #undef _nc_set_tty_mode int _nc_set_tty_mode( struct termios *buf) { return(*(int *)0); } +#undef def_shell_mode_sp +int def_shell_mode_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef def_shell_mode int def_shell_mode(void) { return(*(int *)0); } +#undef def_prog_mode_sp +int def_prog_mode_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef def_prog_mode int def_prog_mode(void) { return(*(int *)0); } +#undef reset_prog_mode_sp +int reset_prog_mode_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef reset_prog_mode int reset_prog_mode(void) { return(*(int *)0); } +#undef reset_shell_mode_sp +int reset_shell_mode_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef reset_shell_mode int reset_shell_mode(void) { return(*(int *)0); } +#undef savetty_sp +int savetty_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef savetty int savetty(void) { return(*(int *)0); } +#undef resetty_sp +int resetty_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef resetty int resetty(void) { return(*(int *)0); } @@ -3144,6 +3963,13 @@ int _nc_read_termcap_entry( /* ./tinfo/setbuf.c */ +#undef _nc_set_buffer_sp +void _nc_set_buffer_sp( + SCREEN *sp, + FILE *ofp, + NCURSES_BOOL buffered) + { /* void */ } + #undef _nc_set_buffer void _nc_set_buffer( FILE *ofp, @@ -3235,8 +4061,8 @@ char *_nc_trim_sgr0( /* ./unctrl.c */ -#undef _nc_unctrl -char *_nc_unctrl( +#undef unctrl_sp +char *unctrl_sp( SCREEN *sp, chtype ch) { return(*(char **)0); } @@ -3485,6 +4311,13 @@ int _nc_tic_written(void) /* ./base/define_key.c */ +#undef define_key_sp +int define_key_sp( + SCREEN *sp, + const char *str, + int keycode) + { return(*(int *)0); } + #undef define_key int define_key( const char *str, @@ -3499,6 +4332,12 @@ void _nc_hashed_db(void) /* ./base/key_defined.c */ +#undef key_defined_sp +int key_defined_sp( + SCREEN *sp, + const char *str) + { return(*(int *)0); } + #undef key_defined int key_defined( const char *str) @@ -3506,6 +4345,13 @@ int key_defined( /* ./base/keybound.c */ +#undef keybound_sp +char *keybound_sp( + SCREEN *sp, + int code, + int count) + { return(*(char **)0); } + #undef keybound char *keybound( int code, @@ -3514,6 +4360,13 @@ char *keybound( /* ./base/keyok.c */ +#undef keyok_sp +int keyok_sp( + SCREEN *sp, + int c, + NCURSES_BOOL flag) + { return(*(int *)0); } + #undef keyok int keyok( int c, diff --git a/ncurses/llib-lncursestw b/ncurses/llib-lncursestw new file mode 100644 index 00000000..6943790d --- /dev/null +++ b/ncurses/llib-lncursestw @@ -0,0 +1,5192 @@ +/**************************************************************************** + * Copyright (c) 2008 Free Software Foundation, Inc. * + * * + * Permission is hereby granted, free of charge, to any person obtaining a * + * copy of this software and associated documentation files (the * + * "Software"), to deal in the Software without restriction, including * + * without limitation the rights to use, copy, modify, merge, publish, * + * distribute, distribute with modifications, sublicense, and/or sell * + * copies of the Software, and to permit persons to whom the Software is * + * furnished to do so, subject to the following conditions: * + * * + * The above copyright notice and this permission notice shall be included * + * in all copies or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Thomas E. Dickey 2008 * + ****************************************************************************/ +/* LINTLIBRARY */ + +/* ./tty/hardscroll.c */ + +#include + +#undef _nc_oldnums +int *_nc_oldnums; + +#undef _nc_scroll_optimize_sp +void _nc_scroll_optimize_sp( + SCREEN *sp) + { /* void */ } + +#undef _nc_scroll_optimize +void _nc_scroll_optimize(void) + { /* void */ } + +#undef _nc_linedump_sp +void _nc_linedump_sp( + SCREEN *sp) + { /* void */ } + +#undef _nc_linedump +void _nc_linedump(void) + { /* void */ } + +/* ./tty/hashmap.c */ + +#undef _nc_hash_map_sp +void _nc_hash_map_sp( + SCREEN *sp) + { /* void */ } + +#undef _nc_hash_map +void _nc_hash_map(void) + { /* void */ } + +#undef _nc_make_oldhash_sp +void _nc_make_oldhash_sp( + SCREEN *sp, + int i) + { /* void */ } + +#undef _nc_make_oldhash +void _nc_make_oldhash( + int i) + { /* void */ } + +#undef _nc_scroll_oldhash_sp +void _nc_scroll_oldhash_sp( + SCREEN *sp, + int n, + int top, + int bot) + { /* void */ } + +#undef _nc_scroll_oldhash +void _nc_scroll_oldhash( + int n, + int top, + int bot) + { /* void */ } + +/* ./base/lib_addch.c */ + +#include + +#undef _nc_render +cchar_t _nc_render( + WINDOW *win, + cchar_t ch) + { return(*(cchar_t *)0); } + +#undef _nc_build_wch +int _nc_build_wch( + WINDOW *win, + cchar_t *ch) + { return(*(int *)0); } + +#undef _nc_waddch_nosync +int _nc_waddch_nosync( + WINDOW *win, + const cchar_t c) + { return(*(int *)0); } + +#undef waddch +int waddch( + WINDOW *win, + const chtype ch) + { return(*(int *)0); } + +#undef wechochar +int wechochar( + WINDOW *win, + const chtype ch) + { return(*(int *)0); } + +/* ./base/lib_addstr.c */ + +#undef waddnstr +int waddnstr( + WINDOW *win, + const char *astr, + int n) + { return(*(int *)0); } + +#undef waddchnstr +int waddchnstr( + WINDOW *win, + const chtype *astr, + int n) + { return(*(int *)0); } + +#undef _nc_wchstrlen +int _nc_wchstrlen( + const cchar_t *s) + { return(*(int *)0); } + +#undef wadd_wchnstr +int wadd_wchnstr( + WINDOW *win, + const cchar_t *astr, + int n) + { return(*(int *)0); } + +#undef waddnwstr +int waddnwstr( + WINDOW *win, + const wchar_t *str, + int n) + { return(*(int *)0); } + +/* ./base/lib_beep.c */ + +#undef beep_sp +int beep_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef beep +int beep(void) + { return(*(int *)0); } + +/* ./base/lib_bkgd.c */ + +#undef wbkgrndset +void wbkgrndset( + WINDOW *win, + const cchar_t *ch) + { /* void */ } + +#undef wbkgdset +void wbkgdset( + WINDOW *win, + chtype ch) + { /* void */ } + +#undef wbkgrnd +int wbkgrnd( + WINDOW *win, + const cchar_t *ch) + { return(*(int *)0); } + +#undef wbkgd +int wbkgd( + WINDOW *win, + chtype ch) + { return(*(int *)0); } + +/* ./base/lib_box.c */ + +#undef wborder +int wborder( + WINDOW *win, + chtype ls, + chtype rs, + chtype ts, + chtype bs, + chtype tl, + chtype tr, + chtype bl, + chtype br) + { return(*(int *)0); } + +/* ./base/lib_chgat.c */ + +#undef wchgat +int wchgat( + WINDOW *win, + int n, + attr_t attr, + short color, + const void *opts) + { return(*(int *)0); } + +/* ./base/lib_clear.c */ + +#undef wclear +int wclear( + WINDOW *win) + { return(*(int *)0); } + +/* ./base/lib_clearok.c */ + +#undef clearok +int clearok( + WINDOW *win, + NCURSES_BOOL flag) + { return(*(int *)0); } + +/* ./base/lib_clrbot.c */ + +#undef wclrtobot +int wclrtobot( + WINDOW *win) + { return(*(int *)0); } + +/* ./base/lib_clreol.c */ + +#undef wclrtoeol +int wclrtoeol( + WINDOW *win) + { return(*(int *)0); } + +/* ./base/lib_color.c */ + +#include +#include + +#undef _nc_COLOR_PAIRS +int _nc_COLOR_PAIRS(void) + { return(*(int *)0); } + +#undef _nc_COLORS +int _nc_COLORS(void) + { return(*(int *)0); } + +#undef _nc_reset_colors_sp +NCURSES_BOOL _nc_reset_colors_sp( + SCREEN *sp) + { return(*(NCURSES_BOOL *)0); } + +#undef _nc_reset_colors +NCURSES_BOOL _nc_reset_colors(void) + { return(*(NCURSES_BOOL *)0); } + +#undef start_color_sp +int start_color_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef start_color +int start_color(void) + { return(*(int *)0); } + +#undef init_pair_sp +int init_pair_sp( + SCREEN *sp, + short pair, + short f, + short b) + { return(*(int *)0); } + +#undef init_pair +int init_pair( + short pair, + short f, + short b) + { return(*(int *)0); } + +#undef init_color_sp +int init_color_sp( + SCREEN *sp, + short color, + short r, + short g, + short b) + { return(*(int *)0); } + +#undef init_color +int init_color( + short color, + short r, + short g, + short b) + { return(*(int *)0); } + +#undef can_change_color_sp +NCURSES_BOOL can_change_color_sp( + SCREEN *sp) + { return(*(NCURSES_BOOL *)0); } + +#undef can_change_color +NCURSES_BOOL can_change_color(void) + { return(*(NCURSES_BOOL *)0); } + +#undef has_colors_sp +NCURSES_BOOL has_colors_sp( + SCREEN *sp) + { return(*(NCURSES_BOOL *)0); } + +#undef has_colors +NCURSES_BOOL has_colors(void) + { return(*(NCURSES_BOOL *)0); } + +#undef color_content_sp +int color_content_sp( + SCREEN *sp, + short color, + short *r, + short *g, + short *b) + { return(*(int *)0); } + +#undef color_content +int color_content( + short color, + short *r, + short *g, + short *b) + { return(*(int *)0); } + +#undef pair_content_sp +int pair_content_sp( + SCREEN *sp, + short pair, + short *f, + short *b) + { return(*(int *)0); } + +#undef pair_content +int pair_content( + short pair, + short *f, + short *b) + { return(*(int *)0); } + +#undef _nc_do_color_sp +void _nc_do_color_sp( + SCREEN *sp, + short old_pair, + short pair, + NCURSES_BOOL reverse, + NCURSES_OUTC_sp outc) + { /* void */ } + +#undef _nc_do_color +void _nc_do_color( + short old_pair, + short pair, + NCURSES_BOOL reverse, + NCURSES_OUTC outc) + { /* void */ } + +/* ./base/lib_colorset.c */ + +#undef wcolor_set +int wcolor_set( + WINDOW *win, + short color_pair_number, + void *opts) + { return(*(int *)0); } + +/* ./base/lib_delch.c */ + +#undef wdelch +int wdelch( + WINDOW *win) + { return(*(int *)0); } + +/* ./base/lib_delwin.c */ + +#undef delwin +int delwin( + WINDOW *win) + { return(*(int *)0); } + +/* ./base/lib_echo.c */ + +#undef echo_sp +int echo_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef echo +int echo(void) + { return(*(int *)0); } + +#undef noecho_sp +int noecho_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef noecho +int noecho(void) + { return(*(int *)0); } + +/* ./base/lib_endwin.c */ + +#undef endwin_sp +int endwin_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef endwin +int endwin(void) + { return(*(int *)0); } + +/* ./base/lib_erase.c */ + +#undef werase +int werase( + WINDOW *win) + { return(*(int *)0); } + +/* ./base/lib_flash.c */ + +#undef flash_sp +int flash_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef flash +int flash(void) + { return(*(int *)0); } + +/* ./lib_gen.c */ + +#undef addch +int addch( + const chtype z) + { return(*(int *)0); } + +#undef addchnstr +int addchnstr( + const chtype *a1, + int z) + { return(*(int *)0); } + +#undef addchstr +int addchstr( + const chtype *z) + { return(*(int *)0); } + +#undef addnstr +int addnstr( + const char *a1, + int z) + { return(*(int *)0); } + +#undef addstr +int addstr( + const char *z) + { return(*(int *)0); } + +#undef attroff +int attroff( + NCURSES_ATTR_T z) + { return(*(int *)0); } + +#undef attron +int attron( + NCURSES_ATTR_T z) + { return(*(int *)0); } + +#undef attrset +int attrset( + NCURSES_ATTR_T z) + { return(*(int *)0); } + +#undef attr_get +int attr_get( + attr_t *a1, + short *a2, + void *z) + { return(*(int *)0); } + +#undef attr_off +int attr_off( + attr_t a1, + void *z) + { return(*(int *)0); } + +#undef attr_on +int attr_on( + attr_t a1, + void *z) + { return(*(int *)0); } + +#undef attr_set +int attr_set( + attr_t a1, + short a2, + void *z) + { return(*(int *)0); } + +#undef bkgd +int bkgd( + chtype z) + { return(*(int *)0); } + +#undef bkgdset +void bkgdset( + chtype z) + { /* void */ } + +#undef border +int border( + chtype a1, + chtype a2, + chtype a3, + chtype a4, + chtype a5, + chtype a6, + chtype a7, + chtype z) + { return(*(int *)0); } + +#undef box +int box( + WINDOW *a1, + chtype a2, + chtype z) + { return(*(int *)0); } + +#undef chgat +int chgat( + int a1, + attr_t a2, + short a3, + const void *z) + { return(*(int *)0); } + +#undef clear +int clear(void) + { return(*(int *)0); } + +#undef clrtobot +int clrtobot(void) + { return(*(int *)0); } + +#undef clrtoeol +int clrtoeol(void) + { return(*(int *)0); } + +#undef color_set +int color_set( + short a1, + void *z) + { return(*(int *)0); } + +#undef COLOR_PAIR +int COLOR_PAIR( + int z) + { return(*(int *)0); } + +#undef delch +int delch(void) + { return(*(int *)0); } + +#undef deleteln +int deleteln(void) + { return(*(int *)0); } + +#undef echochar +int echochar( + const chtype z) + { return(*(int *)0); } + +#undef erase +int erase(void) + { return(*(int *)0); } + +#undef getbkgd +chtype getbkgd( + WINDOW *z) + { return(*(chtype *)0); } + +#undef getch +int getch(void) + { return(*(int *)0); } + +#undef getnstr +int getnstr( + char *a1, + int z) + { return(*(int *)0); } + +#undef getstr +int getstr( + char *z) + { return(*(int *)0); } + +#undef hline +int hline( + chtype a1, + int z) + { return(*(int *)0); } + +#undef inch +chtype inch(void) + { return(*(chtype *)0); } + +#undef inchnstr +int inchnstr( + chtype *a1, + int z) + { return(*(int *)0); } + +#undef inchstr +int inchstr( + chtype *z) + { return(*(int *)0); } + +#undef innstr +int innstr( + char *a1, + int z) + { return(*(int *)0); } + +#undef insch +int insch( + chtype z) + { return(*(int *)0); } + +#undef insdelln +int insdelln( + int z) + { return(*(int *)0); } + +#undef insertln +int insertln(void) + { return(*(int *)0); } + +#undef insnstr +int insnstr( + const char *a1, + int z) + { return(*(int *)0); } + +#undef insstr +int insstr( + const char *z) + { return(*(int *)0); } + +#undef instr +int instr( + char *z) + { return(*(int *)0); } + +#undef move +int move( + int a1, + int z) + { return(*(int *)0); } + +#undef mvaddch +int mvaddch( + int a1, + int a2, + const chtype z) + { return(*(int *)0); } + +#undef mvaddchnstr +int mvaddchnstr( + int a1, + int a2, + const chtype *a3, + int z) + { return(*(int *)0); } + +#undef mvaddchstr +int mvaddchstr( + int a1, + int a2, + const chtype *z) + { return(*(int *)0); } + +#undef mvaddnstr +int mvaddnstr( + int a1, + int a2, + const char *a3, + int z) + { return(*(int *)0); } + +#undef mvaddstr +int mvaddstr( + int a1, + int a2, + const char *z) + { return(*(int *)0); } + +#undef mvchgat +int mvchgat( + int a1, + int a2, + int a3, + attr_t a4, + short a5, + const void *z) + { return(*(int *)0); } + +#undef mvdelch +int mvdelch( + int a1, + int z) + { return(*(int *)0); } + +#undef mvgetch +int mvgetch( + int a1, + int z) + { return(*(int *)0); } + +#undef mvgetnstr +int mvgetnstr( + int a1, + int a2, + char *a3, + int z) + { return(*(int *)0); } + +#undef mvgetstr +int mvgetstr( + int a1, + int a2, + char *z) + { return(*(int *)0); } + +#undef mvhline +int mvhline( + int a1, + int a2, + chtype a3, + int z) + { return(*(int *)0); } + +#undef mvinch +chtype mvinch( + int a1, + int z) + { return(*(chtype *)0); } + +#undef mvinchnstr +int mvinchnstr( + int a1, + int a2, + chtype *a3, + int z) + { return(*(int *)0); } + +#undef mvinchstr +int mvinchstr( + int a1, + int a2, + chtype *z) + { return(*(int *)0); } + +#undef mvinnstr +int mvinnstr( + int a1, + int a2, + char *a3, + int z) + { return(*(int *)0); } + +#undef mvinsch +int mvinsch( + int a1, + int a2, + chtype z) + { return(*(int *)0); } + +#undef mvinsnstr +int mvinsnstr( + int a1, + int a2, + const char *a3, + int z) + { return(*(int *)0); } + +#undef mvinsstr +int mvinsstr( + int a1, + int a2, + const char *z) + { return(*(int *)0); } + +#undef mvinstr +int mvinstr( + int a1, + int a2, + char *z) + { return(*(int *)0); } + +#undef mvvline +int mvvline( + int a1, + int a2, + chtype a3, + int z) + { return(*(int *)0); } + +#undef mvwaddch +int mvwaddch( + WINDOW *a1, + int a2, + int a3, + const chtype z) + { return(*(int *)0); } + +#undef mvwaddchnstr +int mvwaddchnstr( + WINDOW *a1, + int a2, + int a3, + const chtype *a4, + int z) + { return(*(int *)0); } + +#undef mvwaddchstr +int mvwaddchstr( + WINDOW *a1, + int a2, + int a3, + const chtype *z) + { return(*(int *)0); } + +#undef mvwaddnstr +int mvwaddnstr( + WINDOW *a1, + int a2, + int a3, + const char *a4, + int z) + { return(*(int *)0); } + +#undef mvwaddstr +int mvwaddstr( + WINDOW *a1, + int a2, + int a3, + const char *z) + { return(*(int *)0); } + +#undef mvwchgat +int mvwchgat( + WINDOW *a1, + int a2, + int a3, + int a4, + attr_t a5, + short a6, + const void *z) + { return(*(int *)0); } + +#undef mvwdelch +int mvwdelch( + WINDOW *a1, + int a2, + int z) + { return(*(int *)0); } + +#undef mvwgetch +int mvwgetch( + WINDOW *a1, + int a2, + int z) + { return(*(int *)0); } + +#undef mvwgetnstr +int mvwgetnstr( + WINDOW *a1, + int a2, + int a3, + char *a4, + int z) + { return(*(int *)0); } + +#undef mvwgetstr +int mvwgetstr( + WINDOW *a1, + int a2, + int a3, + char *z) + { return(*(int *)0); } + +#undef mvwhline +int mvwhline( + WINDOW *a1, + int a2, + int a3, + chtype a4, + int z) + { return(*(int *)0); } + +#undef mvwinch +chtype mvwinch( + WINDOW *a1, + int a2, + int z) + { return(*(chtype *)0); } + +#undef mvwinchnstr +int mvwinchnstr( + WINDOW *a1, + int a2, + int a3, + chtype *a4, + int z) + { return(*(int *)0); } + +#undef mvwinchstr +int mvwinchstr( + WINDOW *a1, + int a2, + int a3, + chtype *z) + { return(*(int *)0); } + +#undef mvwinnstr +int mvwinnstr( + WINDOW *a1, + int a2, + int a3, + char *a4, + int z) + { return(*(int *)0); } + +#undef mvwinsch +int mvwinsch( + WINDOW *a1, + int a2, + int a3, + chtype z) + { return(*(int *)0); } + +#undef mvwinsnstr +int mvwinsnstr( + WINDOW *a1, + int a2, + int a3, + const char *a4, + int z) + { return(*(int *)0); } + +#undef mvwinsstr +int mvwinsstr( + WINDOW *a1, + int a2, + int a3, + const char *z) + { return(*(int *)0); } + +#undef mvwinstr +int mvwinstr( + WINDOW *a1, + int a2, + int a3, + char *z) + { return(*(int *)0); } + +#undef mvwvline +int mvwvline( + WINDOW *a1, + int a2, + int a3, + chtype a4, + int z) + { return(*(int *)0); } + +#undef PAIR_NUMBER +int PAIR_NUMBER( + int z) + { return(*(int *)0); } + +#undef redrawwin +int redrawwin( + WINDOW *z) + { return(*(int *)0); } + +#undef refresh +int refresh(void) + { return(*(int *)0); } + +#undef scrl +int scrl( + int z) + { return(*(int *)0); } + +#undef scroll +int scroll( + WINDOW *z) + { return(*(int *)0); } + +#undef setscrreg +int setscrreg( + int a1, + int z) + { return(*(int *)0); } + +#undef slk_attr_off +int slk_attr_off( + const attr_t a1, + void *z) + { return(*(int *)0); } + +#undef slk_attr_on +int slk_attr_on( + attr_t a1, + void *z) + { return(*(int *)0); } + +#undef standout +int standout(void) + { return(*(int *)0); } + +#undef standend +int standend(void) + { return(*(int *)0); } + +#undef timeout +void timeout( + int z) + { /* void */ } + +#undef touchline +int touchline( + WINDOW *a1, + int a2, + int z) + { return(*(int *)0); } + +#undef touchwin +int touchwin( + WINDOW *z) + { return(*(int *)0); } + +#undef untouchwin +int untouchwin( + WINDOW *z) + { return(*(int *)0); } + +#undef vline +int vline( + chtype a1, + int z) + { return(*(int *)0); } + +#undef vw_printw +int vw_printw( + WINDOW *a1, + const char *a2, + va_list z) + { return(*(int *)0); } + +#undef vw_scanw +int vw_scanw( + WINDOW *a1, + char *a2, + va_list z) + { return(*(int *)0); } + +#undef waddchstr +int waddchstr( + WINDOW *a1, + const chtype *z) + { return(*(int *)0); } + +#undef waddstr +int waddstr( + WINDOW *a1, + const char *z) + { return(*(int *)0); } + +#undef wattron +int wattron( + WINDOW *a1, + int z) + { return(*(int *)0); } + +#undef wattroff +int wattroff( + WINDOW *a1, + int z) + { return(*(int *)0); } + +#undef wattrset +int wattrset( + WINDOW *a1, + int z) + { return(*(int *)0); } + +#undef wattr_get +int wattr_get( + WINDOW *a1, + attr_t *a2, + short *a3, + void *z) + { return(*(int *)0); } + +#undef wattr_set +int wattr_set( + WINDOW *a1, + attr_t a2, + short a3, + void *z) + { return(*(int *)0); } + +#undef wdeleteln +int wdeleteln( + WINDOW *z) + { return(*(int *)0); } + +#undef wgetstr +int wgetstr( + WINDOW *a1, + char *z) + { return(*(int *)0); } + +#undef winchstr +int winchstr( + WINDOW *a1, + chtype *z) + { return(*(int *)0); } + +#undef winsertln +int winsertln( + WINDOW *z) + { return(*(int *)0); } + +#undef winsstr +int winsstr( + WINDOW *a1, + const char *z) + { return(*(int *)0); } + +#undef winstr +int winstr( + WINDOW *a1, + char *z) + { return(*(int *)0); } + +#undef wstandout +int wstandout( + WINDOW *z) + { return(*(int *)0); } + +#undef wstandend +int wstandend( + WINDOW *z) + { return(*(int *)0); } + +#undef getattrs +int getattrs( + const WINDOW *z) + { return(*(int *)0); } + +#undef getcurx +int getcurx( + const WINDOW *z) + { return(*(int *)0); } + +#undef getcury +int getcury( + const WINDOW *z) + { return(*(int *)0); } + +#undef getbegx +int getbegx( + const WINDOW *z) + { return(*(int *)0); } + +#undef getbegy +int getbegy( + const WINDOW *z) + { return(*(int *)0); } + +#undef getmaxx +int getmaxx( + const WINDOW *z) + { return(*(int *)0); } + +#undef getmaxy +int getmaxy( + const WINDOW *z) + { return(*(int *)0); } + +#undef getparx +int getparx( + const WINDOW *z) + { return(*(int *)0); } + +#undef getpary +int getpary( + const WINDOW *z) + { return(*(int *)0); } + +#undef wgetparent +WINDOW *wgetparent( + const WINDOW *z) + { return(*(WINDOW **)0); } + +#undef is_cleared +NCURSES_BOOL is_cleared( + const WINDOW *z) + { return(*(NCURSES_BOOL *)0); } + +#undef is_idcok +NCURSES_BOOL is_idcok( + const WINDOW *z) + { return(*(NCURSES_BOOL *)0); } + +#undef is_idlok +NCURSES_BOOL is_idlok( + const WINDOW *z) + { return(*(NCURSES_BOOL *)0); } + +#undef is_immedok +NCURSES_BOOL is_immedok( + const WINDOW *z) + { return(*(NCURSES_BOOL *)0); } + +#undef is_keypad +NCURSES_BOOL is_keypad( + const WINDOW *z) + { return(*(NCURSES_BOOL *)0); } + +#undef is_leaveok +NCURSES_BOOL is_leaveok( + const WINDOW *z) + { return(*(NCURSES_BOOL *)0); } + +#undef is_nodelay +NCURSES_BOOL is_nodelay( + const WINDOW *z) + { return(*(NCURSES_BOOL *)0); } + +#undef is_notimeout +NCURSES_BOOL is_notimeout( + const WINDOW *z) + { return(*(NCURSES_BOOL *)0); } + +#undef is_scrollok +NCURSES_BOOL is_scrollok( + const WINDOW *z) + { return(*(NCURSES_BOOL *)0); } + +#undef is_syncok +NCURSES_BOOL is_syncok( + const WINDOW *z) + { return(*(NCURSES_BOOL *)0); } + +#undef wgetscrreg +int wgetscrreg( + const WINDOW *a1, + int *a2, + int *z) + { return(*(int *)0); } + +#undef add_wch +int add_wch( + const cchar_t *z) + { return(*(int *)0); } + +#undef add_wchnstr +int add_wchnstr( + const cchar_t *a1, + int z) + { return(*(int *)0); } + +#undef add_wchstr +int add_wchstr( + const cchar_t *z) + { return(*(int *)0); } + +#undef addnwstr +int addnwstr( + const wchar_t *a1, + int z) + { return(*(int *)0); } + +#undef addwstr +int addwstr( + const wchar_t *z) + { return(*(int *)0); } + +#undef bkgrnd +int bkgrnd( + const cchar_t *z) + { return(*(int *)0); } + +#undef bkgrndset +void bkgrndset( + const cchar_t *z) + { /* void */ } + +#undef border_set +int border_set( + const cchar_t *a1, + const cchar_t *a2, + const cchar_t *a3, + const cchar_t *a4, + const cchar_t *a5, + const cchar_t *a6, + const cchar_t *a7, + const cchar_t *z) + { return(*(int *)0); } + +#undef box_set +int box_set( + WINDOW *a1, + const cchar_t *a2, + const cchar_t *z) + { return(*(int *)0); } + +#undef echo_wchar +int echo_wchar( + const cchar_t *z) + { return(*(int *)0); } + +#undef get_wch +int get_wch( + wint_t *z) + { return(*(int *)0); } + +#undef get_wstr +int get_wstr( + wint_t *z) + { return(*(int *)0); } + +#undef getbkgrnd +int getbkgrnd( + cchar_t *z) + { return(*(int *)0); } + +#undef getn_wstr +int getn_wstr( + wint_t *a1, + int z) + { return(*(int *)0); } + +#undef hline_set +int hline_set( + const cchar_t *a1, + int z) + { return(*(int *)0); } + +#undef in_wch +int in_wch( + cchar_t *z) + { return(*(int *)0); } + +#undef in_wchnstr +int in_wchnstr( + cchar_t *a1, + int z) + { return(*(int *)0); } + +#undef in_wchstr +int in_wchstr( + cchar_t *z) + { return(*(int *)0); } + +#undef innwstr +int innwstr( + wchar_t *a1, + int z) + { return(*(int *)0); } + +#undef ins_nwstr +int ins_nwstr( + const wchar_t *a1, + int z) + { return(*(int *)0); } + +#undef ins_wch +int ins_wch( + const cchar_t *z) + { return(*(int *)0); } + +#undef ins_wstr +int ins_wstr( + const wchar_t *z) + { return(*(int *)0); } + +#undef inwstr +int inwstr( + wchar_t *z) + { return(*(int *)0); } + +#undef mvadd_wch +int mvadd_wch( + int a1, + int a2, + const cchar_t *z) + { return(*(int *)0); } + +#undef mvadd_wchnstr +int mvadd_wchnstr( + int a1, + int a2, + const cchar_t *a3, + int z) + { return(*(int *)0); } + +#undef mvadd_wchstr +int mvadd_wchstr( + int a1, + int a2, + const cchar_t *z) + { return(*(int *)0); } + +#undef mvaddnwstr +int mvaddnwstr( + int a1, + int a2, + const wchar_t *a3, + int z) + { return(*(int *)0); } + +#undef mvaddwstr +int mvaddwstr( + int a1, + int a2, + const wchar_t *z) + { return(*(int *)0); } + +#undef mvget_wch +int mvget_wch( + int a1, + int a2, + wint_t *z) + { return(*(int *)0); } + +#undef mvget_wstr +int mvget_wstr( + int a1, + int a2, + wint_t *z) + { return(*(int *)0); } + +#undef mvgetn_wstr +int mvgetn_wstr( + int a1, + int a2, + wint_t *a3, + int z) + { return(*(int *)0); } + +#undef mvhline_set +int mvhline_set( + int a1, + int a2, + const cchar_t *a3, + int z) + { return(*(int *)0); } + +#undef mvin_wch +int mvin_wch( + int a1, + int a2, + cchar_t *z) + { return(*(int *)0); } + +#undef mvin_wchnstr +int mvin_wchnstr( + int a1, + int a2, + cchar_t *a3, + int z) + { return(*(int *)0); } + +#undef mvin_wchstr +int mvin_wchstr( + int a1, + int a2, + cchar_t *z) + { return(*(int *)0); } + +#undef mvinnwstr +int mvinnwstr( + int a1, + int a2, + wchar_t *a3, + int z) + { return(*(int *)0); } + +#undef mvins_nwstr +int mvins_nwstr( + int a1, + int a2, + const wchar_t *a3, + int z) + { return(*(int *)0); } + +#undef mvins_wch +int mvins_wch( + int a1, + int a2, + const cchar_t *z) + { return(*(int *)0); } + +#undef mvins_wstr +int mvins_wstr( + int a1, + int a2, + const wchar_t *z) + { return(*(int *)0); } + +#undef mvinwstr +int mvinwstr( + int a1, + int a2, + wchar_t *z) + { return(*(int *)0); } + +#undef mvvline_set +int mvvline_set( + int a1, + int a2, + const cchar_t *a3, + int z) + { return(*(int *)0); } + +#undef mvwadd_wch +int mvwadd_wch( + WINDOW *a1, + int a2, + int a3, + const cchar_t *z) + { return(*(int *)0); } + +#undef mvwadd_wchnstr +int mvwadd_wchnstr( + WINDOW *a1, + int a2, + int a3, + const cchar_t *a4, + int z) + { return(*(int *)0); } + +#undef mvwadd_wchstr +int mvwadd_wchstr( + WINDOW *a1, + int a2, + int a3, + const cchar_t *z) + { return(*(int *)0); } + +#undef mvwaddnwstr +int mvwaddnwstr( + WINDOW *a1, + int a2, + int a3, + const wchar_t *a4, + int z) + { return(*(int *)0); } + +#undef mvwaddwstr +int mvwaddwstr( + WINDOW *a1, + int a2, + int a3, + const wchar_t *z) + { return(*(int *)0); } + +#undef mvwget_wch +int mvwget_wch( + WINDOW *a1, + int a2, + int a3, + wint_t *z) + { return(*(int *)0); } + +#undef mvwget_wstr +int mvwget_wstr( + WINDOW *a1, + int a2, + int a3, + wint_t *z) + { return(*(int *)0); } + +#undef mvwgetn_wstr +int mvwgetn_wstr( + WINDOW *a1, + int a2, + int a3, + wint_t *a4, + int z) + { return(*(int *)0); } + +#undef mvwhline_set +int mvwhline_set( + WINDOW *a1, + int a2, + int a3, + const cchar_t *a4, + int z) + { return(*(int *)0); } + +#undef mvwin_wch +int mvwin_wch( + WINDOW *a1, + int a2, + int a3, + cchar_t *z) + { return(*(int *)0); } + +#undef mvwin_wchnstr +int mvwin_wchnstr( + WINDOW *a1, + int a2, + int a3, + cchar_t *a4, + int z) + { return(*(int *)0); } + +#undef mvwin_wchstr +int mvwin_wchstr( + WINDOW *a1, + int a2, + int a3, + cchar_t *z) + { return(*(int *)0); } + +#undef mvwinnwstr +int mvwinnwstr( + WINDOW *a1, + int a2, + int a3, + wchar_t *a4, + int z) + { return(*(int *)0); } + +#undef mvwins_nwstr +int mvwins_nwstr( + WINDOW *a1, + int a2, + int a3, + const wchar_t *a4, + int z) + { return(*(int *)0); } + +#undef mvwins_wch +int mvwins_wch( + WINDOW *a1, + int a2, + int a3, + const cchar_t *z) + { return(*(int *)0); } + +#undef mvwins_wstr +int mvwins_wstr( + WINDOW *a1, + int a2, + int a3, + const wchar_t *z) + { return(*(int *)0); } + +#undef mvwinwstr +int mvwinwstr( + WINDOW *a1, + int a2, + int a3, + wchar_t *z) + { return(*(int *)0); } + +#undef mvwvline_set +int mvwvline_set( + WINDOW *a1, + int a2, + int a3, + const cchar_t *a4, + int z) + { return(*(int *)0); } + +#undef vline_set +int vline_set( + const cchar_t *a1, + int z) + { return(*(int *)0); } + +#undef wadd_wchstr +int wadd_wchstr( + WINDOW *a1, + const cchar_t *z) + { return(*(int *)0); } + +#undef waddwstr +int waddwstr( + WINDOW *a1, + const wchar_t *z) + { return(*(int *)0); } + +#undef wget_wstr +int wget_wstr( + WINDOW *a1, + wint_t *z) + { return(*(int *)0); } + +#undef wgetbkgrnd +int wgetbkgrnd( + WINDOW *a1, + cchar_t *z) + { return(*(int *)0); } + +#undef win_wchstr +int win_wchstr( + WINDOW *a1, + cchar_t *z) + { return(*(int *)0); } + +#undef wins_wstr +int wins_wstr( + WINDOW *a1, + const wchar_t *z) + { return(*(int *)0); } + +#undef mouse_trafo +NCURSES_BOOL mouse_trafo( + int *a1, + int *a2, + NCURSES_BOOL z) + { return(*(NCURSES_BOOL *)0); } + +/* ./base/lib_getch.c */ + +#include + +#undef _nc_ptr_Escdelay +int *_nc_ptr_Escdelay( + SCREEN *sp) + { return(*(int **)0); } + +#undef _nc_ESCDELAY +int _nc_ESCDELAY(void) + { return(*(int *)0); } + +#undef set_escdelay_sp +int set_escdelay_sp( + SCREEN *sp, + int value) + { return(*(int *)0); } + +#undef set_escdelay +int set_escdelay( + int value) + { return(*(int *)0); } + +#undef _nc_wgetch +int _nc_wgetch( + WINDOW *win, + unsigned long *result, + int use_meta) + { return(*(int *)0); } + +#undef wgetch +int wgetch( + WINDOW *win) + { return(*(int *)0); } + +/* ./base/lib_getstr.c */ + +#undef wgetnstr +int wgetnstr( + WINDOW *win, + char *str, + int maxlen) + { return(*(int *)0); } + +/* ./base/lib_hline.c */ + +#undef whline +int whline( + WINDOW *win, + chtype ch, + int n) + { return(*(int *)0); } + +/* ./base/lib_immedok.c */ + +#undef immedok +void immedok( + WINDOW *win, + NCURSES_BOOL flag) + { /* void */ } + +/* ./base/lib_inchstr.c */ + +#undef winchnstr +int winchnstr( + WINDOW *win, + chtype *str, + int n) + { return(*(int *)0); } + +/* ./base/lib_initscr.c */ + +#undef initscr +WINDOW *initscr(void) + { return(*(WINDOW **)0); } + +/* ./base/lib_insch.c */ + +#undef _nc_insert_ch +int _nc_insert_ch( + SCREEN *sp, + WINDOW *win, + chtype ch) + { return(*(int *)0); } + +#undef winsch +int winsch( + WINDOW *win, + chtype c) + { return(*(int *)0); } + +/* ./base/lib_insdel.c */ + +#undef winsdelln +int winsdelln( + WINDOW *win, + int n) + { return(*(int *)0); } + +/* ./base/lib_insnstr.c */ + +#undef winsnstr +int winsnstr( + WINDOW *win, + const char *s, + int n) + { return(*(int *)0); } + +/* ./base/lib_instr.c */ + +#undef winnstr +int winnstr( + WINDOW *win, + char *str, + int n) + { return(*(int *)0); } + +/* ./base/lib_isendwin.c */ + +#undef isendwin_sp +NCURSES_BOOL isendwin_sp( + SCREEN *sp) + { return(*(NCURSES_BOOL *)0); } + +#undef isendwin +NCURSES_BOOL isendwin(void) + { return(*(NCURSES_BOOL *)0); } + +/* ./base/lib_leaveok.c */ + +#undef leaveok +int leaveok( + WINDOW *win, + NCURSES_BOOL flag) + { return(*(int *)0); } + +/* ./base/lib_mouse.c */ + +#undef getmouse_sp +int getmouse_sp( + SCREEN *sp, + MEVENT *aevent) + { return(*(int *)0); } + +#undef getmouse +int getmouse( + MEVENT *aevent) + { return(*(int *)0); } + +#undef ungetmouse_sp +int ungetmouse_sp( + SCREEN *sp, + MEVENT *aevent) + { return(*(int *)0); } + +#undef ungetmouse +int ungetmouse( + MEVENT *aevent) + { return(*(int *)0); } + +#undef mousemask_sp +mmask_t mousemask_sp( + SCREEN *sp, + mmask_t newmask, + mmask_t *oldmask) + { return(*(mmask_t *)0); } + +#undef mousemask +mmask_t mousemask( + mmask_t newmask, + mmask_t *oldmask) + { return(*(mmask_t *)0); } + +#undef wenclose +NCURSES_BOOL wenclose( + const WINDOW *win, + int y, + int x) + { return(*(NCURSES_BOOL *)0); } + +#undef mouseinterval_sp +int mouseinterval_sp( + SCREEN *sp, + int maxclick) + { return(*(int *)0); } + +#undef mouseinterval +int mouseinterval( + int maxclick) + { return(*(int *)0); } + +#undef _nc_has_mouse +NCURSES_BOOL _nc_has_mouse( + SCREEN *sp) + { return(*(NCURSES_BOOL *)0); } + +#undef has_mouse_sp +NCURSES_BOOL has_mouse_sp( + SCREEN *sp) + { return(*(NCURSES_BOOL *)0); } + +#undef has_mouse +NCURSES_BOOL has_mouse(void) + { return(*(NCURSES_BOOL *)0); } + +#undef wmouse_trafo +NCURSES_BOOL wmouse_trafo( + const WINDOW *win, + int *pY, + int *pX, + NCURSES_BOOL to_screen) + { return(*(NCURSES_BOOL *)0); } + +/* ./base/lib_move.c */ + +#undef wmove +int wmove( + WINDOW *win, + int y, + int x) + { return(*(int *)0); } + +/* ./tty/lib_mvcur.c */ + +#undef _nc_msec_cost_sp +int _nc_msec_cost_sp( + SCREEN *sp, + const char *const cap, + int affcnt) + { return(*(int *)0); } + +#undef _nc_msec_cost +int _nc_msec_cost( + const char *const cap, + int affcnt) + { return(*(int *)0); } + +#undef _nc_mvcur_resume_sp +void _nc_mvcur_resume_sp( + SCREEN *sp) + { /* void */ } + +#undef _nc_mvcur_resume +void _nc_mvcur_resume(void) + { /* void */ } + +#undef _nc_mvcur_init_sp +void _nc_mvcur_init_sp( + SCREEN *sp) + { /* void */ } + +#undef _nc_mvcur_init +void _nc_mvcur_init(void) + { /* void */ } + +#undef _nc_mvcur_wrap_sp +void _nc_mvcur_wrap_sp( + SCREEN *sp) + { /* void */ } + +#undef _nc_mvcur_wrap +void _nc_mvcur_wrap(void) + { /* void */ } + +#undef mvcur_sp +int mvcur_sp( + SCREEN *sp, + int yold, + int xold, + int ynew, + int xnew) + { return(*(int *)0); } + +#undef mvcur +int mvcur( + int yold, + int xold, + int ynew, + int xnew) + { return(*(int *)0); } + +#undef _nc_optimize_enable +int _nc_optimize_enable; + +/* ./base/lib_mvwin.c */ + +#undef mvwin +int mvwin( + WINDOW *win, + int by, + int bx) + { return(*(int *)0); } + +/* ./base/lib_newterm.c */ + +#undef filter_sp +void filter_sp( + SCREEN *sp) + { /* void */ } + +#undef filter +void filter(void) + { /* void */ } + +#undef nofilter_sp +void nofilter_sp( + SCREEN *sp) + { /* void */ } + +#undef nofilter +void nofilter(void) + { /* void */ } + +#undef newterm_sp +SCREEN *newterm_sp( + SCREEN *sp, + char *name, + FILE *ofp, + FILE *ifp) + { return(*(SCREEN **)0); } + +#undef newterm +SCREEN *newterm( + char *name, + FILE *ofp, + FILE *ifp) + { return(*(SCREEN **)0); } + +/* ./base/lib_newwin.c */ + +#undef _nc_freewin +int _nc_freewin( + WINDOW *win) + { return(*(int *)0); } + +#undef newwin_sp +WINDOW *newwin_sp( + SCREEN *sp, + int num_lines, + int num_columns, + int begy, + int begx) + { return(*(WINDOW **)0); } + +#undef newwin +WINDOW *newwin( + int num_lines, + int num_columns, + int begy, + int begx) + { return(*(WINDOW **)0); } + +#undef derwin +WINDOW *derwin( + WINDOW *orig, + int num_lines, + int num_columns, + int begy, + int begx) + { return(*(WINDOW **)0); } + +#undef subwin +WINDOW *subwin( + WINDOW *w, + int l, + int c, + int y, + int x) + { return(*(WINDOW **)0); } + +#undef _nc_makenew_sp +WINDOW *_nc_makenew_sp( + SCREEN *sp, + int num_lines, + int num_columns, + int begy, + int begx, + int flags) + { return(*(WINDOW **)0); } + +#undef _nc_makenew +WINDOW *_nc_makenew( + int num_lines, + int num_columns, + int begy, + int begx, + int flags) + { return(*(WINDOW **)0); } + +#undef _nc_curscr_of +WINDOW *_nc_curscr_of( + SCREEN *sp) + { return(*(WINDOW **)0); } + +#undef _nc_newscr_of +WINDOW *_nc_newscr_of( + SCREEN *sp) + { return(*(WINDOW **)0); } + +#undef _nc_stdscr_of +WINDOW *_nc_stdscr_of( + SCREEN *sp) + { return(*(WINDOW **)0); } + +/* ./base/lib_nl.c */ + +#undef nl_sp +int nl_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef nl +int nl(void) + { return(*(int *)0); } + +#undef nonl_sp +int nonl_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef nonl +int nonl(void) + { return(*(int *)0); } + +/* ./base/lib_overlay.c */ + +#undef overlay +int overlay( + const WINDOW *win1, + WINDOW *win2) + { return(*(int *)0); } + +#undef overwrite +int overwrite( + const WINDOW *win1, + WINDOW *win2) + { return(*(int *)0); } + +#undef copywin +int copywin( + const WINDOW *src, + WINDOW *dst, + int sminrow, + int smincol, + int dminrow, + int dmincol, + int dmaxrow, + int dmaxcol, + int over) + { return(*(int *)0); } + +/* ./base/lib_pad.c */ + +#undef newpad_sp +WINDOW *newpad_sp( + SCREEN *sp, + int l, + int c) + { return(*(WINDOW **)0); } + +#undef newpad +WINDOW *newpad( + int l, + int c) + { return(*(WINDOW **)0); } + +#undef subpad +WINDOW *subpad( + WINDOW *orig, + int l, + int c, + int begy, + int begx) + { return(*(WINDOW **)0); } + +#undef prefresh +int prefresh( + WINDOW *win, + int pminrow, + int pmincol, + int sminrow, + int smincol, + int smaxrow, + int smaxcol) + { return(*(int *)0); } + +#undef pnoutrefresh +int pnoutrefresh( + WINDOW *win, + int pminrow, + int pmincol, + int sminrow, + int smincol, + int smaxrow, + int smaxcol) + { return(*(int *)0); } + +#undef pechochar +int pechochar( + WINDOW *pad, + const chtype ch) + { return(*(int *)0); } + +/* ./base/lib_printw.c */ + +#undef printw +int printw( + const char *fmt, + ...) + { return(*(int *)0); } + +#undef wprintw +int wprintw( + WINDOW *win, + const char *fmt, + ...) + { return(*(int *)0); } + +#undef mvprintw +int mvprintw( + int y, + int x, + const char *fmt, + ...) + { return(*(int *)0); } + +#undef mvwprintw +int mvwprintw( + WINDOW *win, + int y, + int x, + const char *fmt, + ...) + { return(*(int *)0); } + +#undef vwprintw +int vwprintw( + WINDOW *win, + const char *fmt, + va_list argp) + { return(*(int *)0); } + +/* ./base/lib_redrawln.c */ + +#undef wredrawln +int wredrawln( + WINDOW *win, + int beg, + int num) + { return(*(int *)0); } + +/* ./base/lib_refresh.c */ + +#undef wrefresh +int wrefresh( + WINDOW *win) + { return(*(int *)0); } + +#undef wnoutrefresh +int wnoutrefresh( + WINDOW *win) + { return(*(int *)0); } + +/* ./base/lib_restart.c */ + +#undef restartterm_sp +int restartterm_sp( + SCREEN *sp, + char *termp, + int filenum, + int *errret) + { return(*(int *)0); } + +#undef restartterm +int restartterm( + char *termp, + int filenum, + int *errret) + { return(*(int *)0); } + +/* ./base/lib_scanw.c */ + +#undef vwscanw +int vwscanw( + WINDOW *win, + char *fmt, + va_list argp) + { return(*(int *)0); } + +#undef scanw +int scanw( + char *fmt, + ...) + { return(*(int *)0); } + +#undef wscanw +int wscanw( + WINDOW *win, + char *fmt, + ...) + { return(*(int *)0); } + +#undef mvscanw +int mvscanw( + int y, + int x, + char *fmt, + ...) + { return(*(int *)0); } + +#undef mvwscanw +int mvwscanw( + WINDOW *win, + int y, + int x, + char *fmt, + ...) + { return(*(int *)0); } + +/* ./base/lib_screen.c */ + +#undef getwin_sp +WINDOW *getwin_sp( + SCREEN *sp, + FILE *filep) + { return(*(WINDOW **)0); } + +#undef getwin +WINDOW *getwin( + FILE *filep) + { return(*(WINDOW **)0); } + +#undef putwin +int putwin( + WINDOW *win, + FILE *filep) + { return(*(int *)0); } + +#undef scr_restore_sp +int scr_restore_sp( + SCREEN *sp, + const char *file) + { return(*(int *)0); } + +#undef scr_restore +int scr_restore( + const char *file) + { return(*(int *)0); } + +#undef scr_dump +int scr_dump( + const char *file) + { return(*(int *)0); } + +#undef scr_init_sp +int scr_init_sp( + SCREEN *sp, + const char *file) + { return(*(int *)0); } + +#undef scr_init +int scr_init( + const char *file) + { return(*(int *)0); } + +#undef scr_set_sp +int scr_set_sp( + SCREEN *sp, + const char *file) + { return(*(int *)0); } + +#undef scr_set +int scr_set( + const char *file) + { return(*(int *)0); } + +/* ./base/lib_scroll.c */ + +#undef _nc_scroll_window +void _nc_scroll_window( + WINDOW *win, + int const n, + int const top, + int const bottom, + cchar_t blank) + { /* void */ } + +#undef wscrl +int wscrl( + WINDOW *win, + int n) + { return(*(int *)0); } + +/* ./base/lib_scrollok.c */ + +#undef scrollok +int scrollok( + WINDOW *win, + NCURSES_BOOL flag) + { return(*(int *)0); } + +/* ./base/lib_scrreg.c */ + +#undef wsetscrreg +int wsetscrreg( + WINDOW *win, + int top, + int bottom) + { return(*(int *)0); } + +/* ./base/lib_set_term.c */ + +#undef set_term +SCREEN *set_term( + SCREEN *screenp) + { return(*(SCREEN **)0); } + +#undef delscreen +void delscreen( + SCREEN *sp) + { /* void */ } + +#undef _nc_setupscreen +int _nc_setupscreen( + int slines, + int scolumns, + FILE *output, + NCURSES_BOOL filtered, + int slk_format) + { return(*(int *)0); } + +#undef _nc_ripoffline_sp +int _nc_ripoffline_sp( + SCREEN *sp, + int line, + int (*init)( + WINDOW *p1, + int p2)) + { return(*(int *)0); } + +#undef _nc_ripoffline +int _nc_ripoffline( + int line, + int (*init)( + WINDOW *p1, + int p2)) + { return(*(int *)0); } + +#undef ripoffline_sp +int ripoffline_sp( + SCREEN *sp, + int line, + int (*init)( + WINDOW *p1, + int p2)) + { return(*(int *)0); } + +#undef ripoffline +int ripoffline( + int line, + int (*init)( + WINDOW *p1, + int p2)) + { return(*(int *)0); } + +/* ./base/lib_slk.c */ + +#undef _nc_slk_initialize +int _nc_slk_initialize( + WINDOW *stwin, + int cols) + { return(*(int *)0); } + +#undef slk_restore_sp +int slk_restore_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef slk_restore +int slk_restore(void) + { return(*(int *)0); } + +/* ./base/lib_slkatr_set.c */ + +#undef slk_attr_set_sp +int slk_attr_set_sp( + SCREEN *sp, + const attr_t attr, + short color_pair_number, + void *opts) + { return(*(int *)0); } + +#undef slk_attr_set +int slk_attr_set( + const attr_t attr, + short color_pair_number, + void *opts) + { return(*(int *)0); } + +/* ./base/lib_slkatrof.c */ + +#undef slk_attroff_sp +int slk_attroff_sp( + SCREEN *sp, + const chtype attr) + { return(*(int *)0); } + +#undef slk_attroff +int slk_attroff( + const chtype attr) + { return(*(int *)0); } + +/* ./base/lib_slkatron.c */ + +#undef slk_attron_sp +int slk_attron_sp( + SCREEN *sp, + const chtype attr) + { return(*(int *)0); } + +#undef slk_attron +int slk_attron( + const chtype attr) + { return(*(int *)0); } + +/* ./base/lib_slkatrset.c */ + +#undef slk_attrset_sp +int slk_attrset_sp( + SCREEN *sp, + const chtype attr) + { return(*(int *)0); } + +#undef slk_attrset +int slk_attrset( + const chtype attr) + { return(*(int *)0); } + +/* ./base/lib_slkattr.c */ + +#undef slk_attr_sp +attr_t slk_attr_sp( + SCREEN *sp) + { return(*(attr_t *)0); } + +#undef slk_attr +attr_t slk_attr(void) + { return(*(attr_t *)0); } + +/* ./base/lib_slkclear.c */ + +#undef slk_clear_sp +int slk_clear_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef slk_clear +int slk_clear(void) + { return(*(int *)0); } + +/* ./base/lib_slkcolor.c */ + +#undef slk_color_sp +int slk_color_sp( + SCREEN *sp, + short color_pair_number) + { return(*(int *)0); } + +#undef slk_color +int slk_color( + short color_pair_number) + { return(*(int *)0); } + +/* ./base/lib_slkinit.c */ + +#undef slk_init_sp +int slk_init_sp( + SCREEN *sp, + int format) + { return(*(int *)0); } + +#undef slk_init +int slk_init( + int format) + { return(*(int *)0); } + +/* ./base/lib_slklab.c */ + +#undef slk_label_sp +char *slk_label_sp( + SCREEN *sp, + int n) + { return(*(char **)0); } + +#undef slk_label +char *slk_label( + int n) + { return(*(char **)0); } + +/* ./base/lib_slkrefr.c */ + +#undef slk_noutrefresh_sp +int slk_noutrefresh_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef slk_noutrefresh +int slk_noutrefresh(void) + { return(*(int *)0); } + +#undef slk_refresh_sp +int slk_refresh_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef slk_refresh +int slk_refresh(void) + { return(*(int *)0); } + +/* ./base/lib_slkset.c */ + +#include + +#undef slk_set_sp +int slk_set_sp( + SCREEN *sp, + int i, + const char *astr, + int format) + { return(*(int *)0); } + +#undef slk_set +int slk_set( + int i, + const char *astr, + int format) + { return(*(int *)0); } + +/* ./base/lib_slktouch.c */ + +#undef slk_touch_sp +int slk_touch_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef slk_touch +int slk_touch(void) + { return(*(int *)0); } + +/* ./base/lib_touch.c */ + +#undef is_linetouched +NCURSES_BOOL is_linetouched( + WINDOW *win, + int line) + { return(*(NCURSES_BOOL *)0); } + +#undef is_wintouched +NCURSES_BOOL is_wintouched( + WINDOW *win) + { return(*(NCURSES_BOOL *)0); } + +#undef wtouchln +int wtouchln( + WINDOW *win, + int y, + int n, + int changed) + { return(*(int *)0); } + +/* ./trace/lib_tracedmp.c */ + +#undef _tracedump +void _tracedump( + const char *name, + WINDOW *win) + { /* void */ } + +/* ./trace/lib_tracemse.c */ + +#undef _nc_tracemouse +char *_nc_tracemouse( + SCREEN *sp, + MEVENT const *ep) + { return(*(char **)0); } + +#undef _tracemouse +char *_tracemouse( + MEVENT const *ep) + { return(*(char **)0); } + +/* ./tty/lib_tstp.c */ + +#include + +#undef _nc_signal_handler +void _nc_signal_handler( + NCURSES_BOOL enable) + { /* void */ } + +/* ./base/lib_ungetch.c */ + +#undef _nc_fifo_dump +void _nc_fifo_dump( + SCREEN *sp) + { /* void */ } + +#undef ungetch_sp +int ungetch_sp( + SCREEN *sp, + int ch) + { return(*(int *)0); } + +#undef ungetch +int ungetch( + int ch) + { return(*(int *)0); } + +/* ./tty/lib_vidattr.c */ + +#undef vidputs_sp +int vidputs_sp( + SCREEN *sp, + chtype newmode, + NCURSES_OUTC_sp outc) + { return(*(int *)0); } + +#undef vidputs +int vidputs( + chtype newmode, + NCURSES_OUTC outc) + { return(*(int *)0); } + +#undef vidattr_sp +int vidattr_sp( + SCREEN *sp, + chtype newmode) + { return(*(int *)0); } + +#undef vidattr +int vidattr( + chtype newmode) + { return(*(int *)0); } + +#undef termattrs_sp +chtype termattrs_sp( + SCREEN *sp) + { return(*(chtype *)0); } + +#undef termattrs +chtype termattrs(void) + { return(*(chtype *)0); } + +/* ./base/lib_vline.c */ + +#undef wvline +int wvline( + WINDOW *win, + chtype ch, + int n) + { return(*(int *)0); } + +/* ./base/lib_wattroff.c */ + +#undef wattr_off +int wattr_off( + WINDOW *win, + attr_t at, + void *opts) + { return(*(int *)0); } + +/* ./base/lib_wattron.c */ + +#undef wattr_on +int wattr_on( + WINDOW *win, + attr_t at, + void *opts) + { return(*(int *)0); } + +/* ./base/lib_winch.c */ + +#undef winch +chtype winch( + WINDOW *win) + { return(*(chtype *)0); } + +/* ./base/lib_window.c */ + +#undef _nc_synchook +void _nc_synchook( + WINDOW *win) + { /* void */ } + +#undef mvderwin +int mvderwin( + WINDOW *win, + int y, + int x) + { return(*(int *)0); } + +#undef syncok +int syncok( + WINDOW *win, + NCURSES_BOOL bf) + { return(*(int *)0); } + +#undef wsyncup +void wsyncup( + WINDOW *win) + { /* void */ } + +#undef wsyncdown +void wsyncdown( + WINDOW *win) + { /* void */ } + +#undef wcursyncup +void wcursyncup( + WINDOW *win) + { /* void */ } + +#undef dupwin +WINDOW *dupwin( + WINDOW *win) + { return(*(WINDOW **)0); } + +/* ./base/nc_panel.c */ + +#undef _nc_panelhook_sp +struct panelhook *_nc_panelhook_sp( + SCREEN *sp) + { return(*(struct panelhook **)0); } + +#undef _nc_panelhook +struct panelhook *_nc_panelhook(void) + { return(*(struct panelhook **)0); } + +/* ./base/safe_sprintf.c */ + +#undef _nc_printf_string_sp +char *_nc_printf_string_sp( + SCREEN *sp, + const char *fmt, + va_list ap) + { return(*(char **)0); } + +#undef _nc_printf_string +char *_nc_printf_string( + const char *fmt, + va_list ap) + { return(*(char **)0); } + +/* ./tty/tty_update.c */ + +#include +#include + +#undef doupdate_sp +int doupdate_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef doupdate +int doupdate(void) + { return(*(int *)0); } + +#undef _nc_scrolln_sp +int _nc_scrolln_sp( + SCREEN *sp, + int n, + int top, + int bot, + int maxy) + { return(*(int *)0); } + +#undef _nc_scrolln +int _nc_scrolln( + int n, + int top, + int bot, + int maxy) + { return(*(int *)0); } + +#undef _nc_screen_resume_sp +void _nc_screen_resume_sp( + SCREEN *sp) + { /* void */ } + +#undef _nc_screen_resume +void _nc_screen_resume(void) + { /* void */ } + +#undef _nc_screen_init_sp +void _nc_screen_init_sp( + SCREEN *sp) + { /* void */ } + +#undef _nc_screen_init +void _nc_screen_init(void) + { /* void */ } + +#undef _nc_screen_wrap_sp +void _nc_screen_wrap_sp( + SCREEN *sp) + { /* void */ } + +#undef _nc_screen_wrap +void _nc_screen_wrap(void) + { /* void */ } + +#undef _nc_do_xmc_glitch_sp +void _nc_do_xmc_glitch_sp( + SCREEN *sp, + attr_t previous) + { /* void */ } + +#undef _nc_do_xmc_glitch +void _nc_do_xmc_glitch( + attr_t previous) + { /* void */ } + +/* ./trace/varargs.c */ + +typedef enum { + atUnknown = 0, atInteger, atFloat, atPoint, atString +} ARGTYPE; + +#undef _nc_varargs +char *_nc_varargs( + const char *fmt, + va_list ap) + { return(*(char **)0); } + +/* ./base/memmove.c */ + +#undef _nc_memmove +void _nc_memmove(void) + { /* void */ } + +/* ./base/vsscanf.c */ + +#undef _nc_vsscanf +void _nc_vsscanf(void) + { /* void */ } + +/* ./base/lib_freeall.c */ + +#include + +#undef _nc_freeall +void _nc_freeall(void) + { /* void */ } + +#undef _nc_free_and_exit_sp +void _nc_free_and_exit_sp( + SCREEN *sp, + int code) + { /* void */ } + +#undef _nc_free_and_exit +void _nc_free_and_exit( + int code) + { /* void */ } + +/* ./widechar/charable.c */ + +#undef _nc_is_charable +NCURSES_BOOL _nc_is_charable( + wchar_t ch) + { return(*(NCURSES_BOOL *)0); } + +#undef _nc_to_char +int _nc_to_char( + wint_t ch) + { return(*(int *)0); } + +#undef _nc_to_widechar +wint_t _nc_to_widechar( + int ch) + { return(*(wint_t *)0); } + +/* ./widechar/lib_add_wch.c */ + +#undef wadd_wch +int wadd_wch( + WINDOW *win, + const cchar_t *wch) + { return(*(int *)0); } + +#undef wecho_wchar +int wecho_wchar( + WINDOW *win, + const cchar_t *wch) + { return(*(int *)0); } + +/* ./widechar/lib_box_set.c */ + +#undef wborder_set +int wborder_set( + WINDOW *win, + const cchar_t *ls, + const cchar_t *rs, + const cchar_t *ts, + const cchar_t *bs, + const cchar_t *tl, + const cchar_t *tr, + const cchar_t *bl, + const cchar_t *br) + { return(*(int *)0); } + +/* ./widechar/lib_cchar.c */ + +#undef setcchar +int setcchar( + cchar_t *wcval, + const wchar_t *wch, + const attr_t attrs, + short color_pair, + const void *opts) + { return(*(int *)0); } + +#undef getcchar +int getcchar( + const cchar_t *wcval, + wchar_t *wch, + attr_t *attrs, + short *color_pair, + void *opts) + { return(*(int *)0); } + +/* ./widechar/lib_erasewchar.c */ + +#undef erasewchar +int erasewchar( + wchar_t *wch) + { return(*(int *)0); } + +#undef killwchar +int killwchar( + wchar_t *wch) + { return(*(int *)0); } + +/* ./widechar/lib_get_wch.c */ + +#undef wget_wch +int wget_wch( + WINDOW *win, + wint_t *result) + { return(*(int *)0); } + +/* ./widechar/lib_get_wstr.c */ + +#undef wgetn_wstr +int wgetn_wstr( + WINDOW *win, + wint_t *str, + int maxlen) + { return(*(int *)0); } + +/* ./widechar/lib_hline_set.c */ + +#undef whline_set +int whline_set( + WINDOW *win, + const cchar_t *ch, + int n) + { return(*(int *)0); } + +/* ./widechar/lib_in_wch.c */ + +#undef win_wch +int win_wch( + WINDOW *win, + cchar_t *wcval) + { return(*(int *)0); } + +/* ./widechar/lib_in_wchnstr.c */ + +#undef win_wchnstr +int win_wchnstr( + WINDOW *win, + cchar_t *wchstr, + int n) + { return(*(int *)0); } + +/* ./widechar/lib_ins_wch.c */ + +#undef wins_wch +int wins_wch( + WINDOW *win, + const cchar_t *wch) + { return(*(int *)0); } + +#undef wins_nwstr +int wins_nwstr( + WINDOW *win, + const wchar_t *wstr, + int n) + { return(*(int *)0); } + +/* ./widechar/lib_inwstr.c */ + +#undef winnwstr +int winnwstr( + WINDOW *win, + wchar_t *wstr, + int n) + { return(*(int *)0); } + +#undef winwstr +int winwstr( + WINDOW *win, + wchar_t *wstr) + { return(*(int *)0); } + +/* ./widechar/lib_key_name.c */ + +#undef key_name +char *key_name( + wchar_t c) + { return(*(char **)0); } + +/* ./widechar/lib_pecho_wchar.c */ + +#undef pecho_wchar +int pecho_wchar( + WINDOW *pad, + const cchar_t *wch) + { return(*(int *)0); } + +/* ./widechar/lib_slk_wset.c */ + +#undef slk_wset +int slk_wset( + int i, + const wchar_t *astr, + int format) + { return(*(int *)0); } + +/* ./widechar/lib_unget_wch.c */ + +#undef _nc_wcrtomb +size_t _nc_wcrtomb( + char *target, + wchar_t source, + mbstate_t *state) + { return(*(size_t *)0); } + +#undef unget_wch_sp +int unget_wch_sp( + SCREEN *sp, + const wchar_t wch) + { return(*(int *)0); } + +#undef unget_wch +int unget_wch( + const wchar_t wch) + { return(*(int *)0); } + +/* ./widechar/lib_vid_attr.c */ + +#undef vid_puts_sp +int vid_puts_sp( + SCREEN *sp, + attr_t newmode, + short pair, + void *opts, + NCURSES_OUTC_sp outc) + { return(*(int *)0); } + +#undef vid_puts +int vid_puts( + attr_t newmode, + short pair, + void *opts, + NCURSES_OUTC outc) + { return(*(int *)0); } + +#undef vid_attr_sp +int vid_attr_sp( + SCREEN *sp, + attr_t newmode, + short pair, + void *opts) + { return(*(int *)0); } + +#undef vid_attr +int vid_attr( + attr_t newmode, + short pair, + void *opts) + { return(*(int *)0); } + +#undef term_attrs_sp +attr_t term_attrs_sp( + SCREEN *sp) + { return(*(attr_t *)0); } + +#undef term_attrs +attr_t term_attrs(void) + { return(*(attr_t *)0); } + +/* ./widechar/lib_vline_set.c */ + +#undef wvline_set +int wvline_set( + WINDOW *win, + const cchar_t *ch, + int n) + { return(*(int *)0); } + +/* ./widechar/lib_wacs.c */ + +#undef _nc_wacs +cchar_t *_nc_wacs; + +#undef _nc_init_wacs +void _nc_init_wacs(void) + { /* void */ } + +/* ./widechar/lib_wunctrl.c */ + +#undef wunctrl_sp +wchar_t *wunctrl_sp( + SCREEN *sp, + cchar_t *wc) + { return(*(wchar_t **)0); } + +#undef wunctrl +wchar_t *wunctrl( + cchar_t *wc) + { return(*(wchar_t **)0); } + +/* ./expanded.c */ + +#undef _nc_toggle_attr_on +void _nc_toggle_attr_on( + attr_t *S, + attr_t at) + { /* void */ } + +#undef _nc_toggle_attr_off +void _nc_toggle_attr_off( + attr_t *S, + attr_t at) + { /* void */ } + +#undef _nc_DelCharCost_sp +int _nc_DelCharCost_sp( + SCREEN *sp, + int count) + { return(*(int *)0); } + +#undef _nc_InsCharCost_sp +int _nc_InsCharCost_sp( + SCREEN *sp, + int count) + { return(*(int *)0); } + +#undef _nc_UpdateAttrs_sp +void _nc_UpdateAttrs_sp( + SCREEN *sp, + const cchar_t *c) + { /* void */ } + +#undef _nc_DelCharCost +int _nc_DelCharCost( + int count) + { return(*(int *)0); } + +#undef _nc_InsCharCost +int _nc_InsCharCost( + int count) + { return(*(int *)0); } + +#undef _nc_UpdateAttrs +void _nc_UpdateAttrs( + const cchar_t *c) + { /* void */ } + +/* ./base/legacy_coding.c */ + +#undef use_legacy_coding_sp +int use_legacy_coding_sp( + SCREEN *sp, + int level) + { return(*(int *)0); } + +#undef use_legacy_coding +int use_legacy_coding( + int level) + { return(*(int *)0); } + +/* ./base/lib_dft_fgbg.c */ + +#undef use_default_colors_sp +int use_default_colors_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef use_default_colors +int use_default_colors(void) + { return(*(int *)0); } + +#undef assume_default_colors_sp +int assume_default_colors_sp( + SCREEN *sp, + int fg, + int bg) + { return(*(int *)0); } + +#undef assume_default_colors +int assume_default_colors( + int fg, + int bg) + { return(*(int *)0); } + +/* ./tinfo/lib_print.c */ + +#undef mcprint_sp +int mcprint_sp( + SCREEN *sp, + char *data, + int len) + { return(*(int *)0); } + +#undef mcprint +int mcprint( + char *data, + int len) + { return(*(int *)0); } + +/* ./base/resizeterm.c */ + +#undef is_term_resized_sp +NCURSES_BOOL is_term_resized_sp( + SCREEN *sp, + int ToLines, + int ToCols) + { return(*(NCURSES_BOOL *)0); } + +#undef is_term_resized +NCURSES_BOOL is_term_resized( + int ToLines, + int ToCols) + { return(*(NCURSES_BOOL *)0); } + +#undef resize_term_sp +int resize_term_sp( + SCREEN *sp, + int ToLines, + int ToCols) + { return(*(int *)0); } + +#undef resize_term +int resize_term( + int ToLines, + int ToCols) + { return(*(int *)0); } + +#undef resizeterm_sp +int resizeterm_sp( + SCREEN *sp, + int ToLines, + int ToCols) + { return(*(int *)0); } + +#undef resizeterm +int resizeterm( + int ToLines, + int ToCols) + { return(*(int *)0); } + +/* ./trace/trace_xnames.c */ + +#undef _nc_trace_xnames +void _nc_trace_xnames( + TERMTYPE *tp) + { /* void */ } + +/* ./tinfo/use_screen.c */ + +#undef use_screen +int use_screen( + SCREEN *screen, + NCURSES_SCREEN_CB func, + void *data) + { return(*(int *)0); } + +/* ./base/use_window.c */ + +#undef use_window +int use_window( + WINDOW *win, + NCURSES_WINDOW_CB func, + void *data) + { return(*(int *)0); } + +/* ./base/wresize.c */ + +#undef wresize +int wresize( + WINDOW *win, + int ToLines, + int ToCols) + { return(*(int *)0); } + +/* ./tinfo/access.c */ + +#include +#include + +#undef _nc_rootname +char *_nc_rootname( + char *path) + { return(*(char **)0); } + +#undef _nc_is_abs_path +NCURSES_BOOL _nc_is_abs_path( + const char *path) + { return(*(NCURSES_BOOL *)0); } + +#undef _nc_pathlast +unsigned _nc_pathlast( + const char *path) + { return(*(unsigned *)0); } + +#undef _nc_basename +char *_nc_basename( + char *path) + { return(*(char **)0); } + +#undef _nc_access +int _nc_access( + const char *path, + int mode) + { return(*(int *)0); } + +#undef _nc_is_dir_path +NCURSES_BOOL _nc_is_dir_path( + const char *path) + { return(*(NCURSES_BOOL *)0); } + +#undef _nc_is_file_path +NCURSES_BOOL _nc_is_file_path( + const char *path) + { return(*(NCURSES_BOOL *)0); } + +#undef _nc_env_access +int _nc_env_access(void) + { return(*(int *)0); } + +/* ./tinfo/add_tries.c */ + +#undef _nc_add_to_try +int _nc_add_to_try( + TRIES **tree, + const char *str, + unsigned code) + { return(*(int *)0); } + +/* ./tinfo/alloc_ttype.c */ + +#undef _nc_align_termtype +void _nc_align_termtype( + TERMTYPE *to, + TERMTYPE *from) + { /* void */ } + +#undef _nc_copy_termtype +void _nc_copy_termtype( + TERMTYPE *dst, + TERMTYPE *src) + { /* void */ } + +/* ./codes.c */ + +#undef _nc_boolcodes +char *const *_nc_boolcodes(void) + { return(*(char **)0); } + +#undef _nc_numcodes +char *const *_nc_numcodes(void) + { return(*(char **)0); } + +#undef _nc_strcodes +char *const *_nc_strcodes(void) + { return(*(char **)0); } + +/* ./tinfo/comp_error.c */ + +#undef _nc_suppress_warnings +NCURSES_BOOL _nc_suppress_warnings; +#undef _nc_curr_line +int _nc_curr_line; +#undef _nc_curr_col +int _nc_curr_col; + +#undef _nc_get_source +const char *_nc_get_source(void) + { return(*(const char **)0); } + +#undef _nc_set_source +void _nc_set_source( + const char *const name) + { /* void */ } + +#undef _nc_set_type +void _nc_set_type( + const char *const name) + { /* void */ } + +#undef _nc_get_type +void _nc_get_type( + char *name) + { /* void */ } + +#undef _nc_warning +void _nc_warning( + const char *const fmt, + ...) + { /* void */ } + +#undef _nc_err_abort +void _nc_err_abort( + const char *const fmt, + ...) + { /* void */ } + +#undef _nc_syserr_abort +void _nc_syserr_abort( + const char *const fmt, + ...) + { /* void */ } + +/* ./tinfo/db_iterator.c */ + +#undef _nc_tic_dir +const char *_nc_tic_dir( + const char *path) + { return(*(const char **)0); } + +#undef _nc_keep_tic_dir +void _nc_keep_tic_dir( + const char *path) + { /* void */ } + +#undef _nc_last_db +void _nc_last_db(void) + { /* void */ } + +#undef _nc_next_db +const char *_nc_next_db( + DBDIRS *state, + int *offset) + { return(*(const char **)0); } + +#undef _nc_first_db +void _nc_first_db( + DBDIRS *state, + int *offset) + { /* void */ } + +/* ./tinfo/doalloc.c */ + +#undef _nc_doalloc +void *_nc_doalloc( + void *oldp, + size_t amount) + { return(*(void **)0); } + +/* ./tinfo/entries.c */ + +#undef _nc_head +ENTRY *_nc_head; +#undef _nc_tail +ENTRY *_nc_tail; + +#undef _nc_free_entry +void _nc_free_entry( + ENTRY *headp, + TERMTYPE *tterm) + { /* void */ } + +#undef _nc_free_entries +void _nc_free_entries( + ENTRY *headp) + { /* void */ } + +#undef _nc_delink_entry +ENTRY *_nc_delink_entry( + ENTRY *headp, + TERMTYPE *tterm) + { return(*(ENTRY **)0); } + +#undef _nc_leaks_tinfo +void _nc_leaks_tinfo(void) + { /* void */ } + +/* ./fallback.c */ + +#undef _nc_fallback +const TERMTYPE *_nc_fallback( + const char *name) + { return(*(const TERMTYPE **)0); } + +/* ./tinfo/free_ttype.c */ + +#undef _nc_free_termtype +void _nc_free_termtype( + TERMTYPE *ptr) + { /* void */ } + +#undef _nc_user_definable +NCURSES_BOOL _nc_user_definable; + +#undef use_extended_names +int use_extended_names( + NCURSES_BOOL flag) + { return(*(int *)0); } + +/* ./tinfo/getenv_num.c */ + +#undef _nc_getenv_num +int _nc_getenv_num( + const char *name) + { return(*(int *)0); } + +/* ./tinfo/home_terminfo.c */ + +#undef _nc_home_terminfo +char *_nc_home_terminfo(void) + { return(*(char **)0); } + +/* ./tinfo/init_keytry.c */ + +#if 0 + +#include + +#undef _nc_tinfo_fkeys +const struct tinfo_fkeys _nc_tinfo_fkeys[] = {0}; + +#endif + +#undef _nc_init_keytry +void _nc_init_keytry( + SCREEN *sp) + { /* void */ } + +/* ./tinfo/lib_acs.c */ + +#undef _nc_acs_map +chtype *_nc_acs_map(void) + { return(*(chtype **)0); } + +#undef _nc_init_acs_sp +void _nc_init_acs_sp( + SCREEN *sp) + { /* void */ } + +#undef _nc_init_acs +void _nc_init_acs(void) + { /* void */ } + +/* ./tinfo/lib_baudrate.c */ + +#include + +struct speed { + int s; + int sp; +}; + +#undef _nc_baudrate +int _nc_baudrate( + int OSpeed) + { return(*(int *)0); } + +#undef _nc_ospeed +int _nc_ospeed( + int BaudRate) + { return(*(int *)0); } + +#undef baudrate_sp +int baudrate_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef baudrate +int baudrate(void) + { return(*(int *)0); } + +/* ./tinfo/lib_cur_term.c */ + +#undef _nc_cur_term +TERMINAL *_nc_cur_term(void) + { return(*(TERMINAL **)0); } + +#undef set_curterm +TERMINAL *set_curterm( + TERMINAL *termp) + { return(*(TERMINAL **)0); } + +#undef del_curterm_sp +int del_curterm_sp( + SCREEN *sp, + TERMINAL *termp) + { return(*(int *)0); } + +#undef del_curterm +int del_curterm( + TERMINAL *termp) + { return(*(int *)0); } + +/* ./tinfo/lib_data.c */ + +#undef _nc_stdscr +WINDOW *_nc_stdscr(void) + { return(*(WINDOW **)0); } + +#undef _nc_curscr +WINDOW *_nc_curscr(void) + { return(*(WINDOW **)0); } + +#undef _nc_newscr +WINDOW *_nc_newscr(void) + { return(*(WINDOW **)0); } + +#undef _nc_screen_chain +SCREEN *_nc_screen_chain; +#undef SP +SCREEN *SP; +#undef _nc_globals +NCURSES_GLOBALS _nc_globals; +#undef _nc_prescreen +NCURSES_PRESCREEN _nc_prescreen; + +#undef _nc_screen_of +SCREEN *_nc_screen_of( + WINDOW *win) + { return(*(SCREEN **)0); } + +#undef _nc_init_pthreads +void _nc_init_pthreads(void) + { /* void */ } + +#undef _nc_mutex_init +void _nc_mutex_init( + pthread_mutex_t *obj) + { /* void */ } + +#undef _nc_mutex_lock +int _nc_mutex_lock( + pthread_mutex_t *obj) + { return(*(int *)0); } + +#undef _nc_mutex_trylock +int _nc_mutex_trylock( + pthread_mutex_t *obj) + { return(*(int *)0); } + +#undef _nc_mutex_unlock +int _nc_mutex_unlock( + pthread_mutex_t *obj) + { return(*(int *)0); } + +/* ./tinfo/lib_has_cap.c */ + +#undef has_ic_sp +NCURSES_BOOL has_ic_sp( + SCREEN *sp) + { return(*(NCURSES_BOOL *)0); } + +#undef has_ic +NCURSES_BOOL has_ic(void) + { return(*(NCURSES_BOOL *)0); } + +#undef has_il_sp +NCURSES_BOOL has_il_sp( + SCREEN *sp) + { return(*(NCURSES_BOOL *)0); } + +#undef has_il +NCURSES_BOOL has_il(void) + { return(*(NCURSES_BOOL *)0); } + +/* ./tinfo/lib_kernel.c */ + +#undef erasechar_sp +char erasechar_sp( + SCREEN *sp) + { return(*(char *)0); } + +#undef erasechar +char erasechar(void) + { return(*(char *)0); } + +#undef killchar_sp +char killchar_sp( + SCREEN *sp) + { return(*(char *)0); } + +#undef killchar +char killchar(void) + { return(*(char *)0); } + +#undef flushinp_sp +int flushinp_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef flushinp +int flushinp(void) + { return(*(int *)0); } + +/* ./lib_keyname.c */ + +struct kn { short offset; int code; }; + +#undef keyname_sp +char *keyname_sp( + SCREEN *sp, + int c) + { return(*(char **)0); } + +#undef keyname +char *keyname( + int c) + { return(*(char **)0); } + +/* ./tinfo/lib_longname.c */ + +#undef longname_sp +char *longname_sp( + SCREEN *sp) + { return(*(char **)0); } + +#undef longname +char *longname(void) + { return(*(char **)0); } + +/* ./tinfo/lib_napms.c */ + +#undef napms_sp +int napms_sp( + SCREEN *sp, + int ms) + { return(*(int *)0); } + +#undef napms +int napms( + int ms) + { return(*(int *)0); } + +/* ./tinfo/lib_options.c */ + +#undef idlok +int idlok( + WINDOW *win, + NCURSES_BOOL flag) + { return(*(int *)0); } + +#undef idcok +void idcok( + WINDOW *win, + NCURSES_BOOL flag) + { /* void */ } + +#undef halfdelay_sp +int halfdelay_sp( + SCREEN *sp, + int t) + { return(*(int *)0); } + +#undef halfdelay +int halfdelay( + int t) + { return(*(int *)0); } + +#undef nodelay +int nodelay( + WINDOW *win, + NCURSES_BOOL flag) + { return(*(int *)0); } + +#undef notimeout +int notimeout( + WINDOW *win, + NCURSES_BOOL f) + { return(*(int *)0); } + +#undef wtimeout +void wtimeout( + WINDOW *win, + int delay) + { /* void */ } + +#undef keypad +int keypad( + WINDOW *win, + NCURSES_BOOL flag) + { return(*(int *)0); } + +#undef meta +int meta( + WINDOW *win, + NCURSES_BOOL flag) + { return(*(int *)0); } + +#undef curs_set_sp +int curs_set_sp( + SCREEN *sp, + int vis) + { return(*(int *)0); } + +#undef curs_set +int curs_set( + int vis) + { return(*(int *)0); } + +#undef typeahead_sp +int typeahead_sp( + SCREEN *sp, + int fd) + { return(*(int *)0); } + +#undef typeahead +int typeahead( + int fd) + { return(*(int *)0); } + +#undef has_key_sp +int has_key_sp( + SCREEN *sp, + int keycode) + { return(*(int *)0); } + +#undef has_key +int has_key( + int keycode) + { return(*(int *)0); } + +#undef _nc_putp_flush_sp +int _nc_putp_flush_sp( + SCREEN *sp, + const char *name, + const char *value) + { return(*(int *)0); } + +#undef _nc_putp_flush +int _nc_putp_flush( + const char *name, + const char *value) + { return(*(int *)0); } + +#undef _nc_keypad +int _nc_keypad( + SCREEN *sp, + NCURSES_BOOL flag) + { return(*(int *)0); } + +/* ./tinfo/lib_raw.c */ + +#undef raw_sp +int raw_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef raw +int raw(void) + { return(*(int *)0); } + +#undef cbreak_sp +int cbreak_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef cbreak +int cbreak(void) + { return(*(int *)0); } + +#undef qiflush_sp +void qiflush_sp( + SCREEN *sp) + { /* void */ } + +#undef qiflush +void qiflush(void) + { /* void */ } + +#undef noraw_sp +int noraw_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef noraw +int noraw(void) + { return(*(int *)0); } + +#undef nocbreak_sp +int nocbreak_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef nocbreak +int nocbreak(void) + { return(*(int *)0); } + +#undef noqiflush_sp +void noqiflush_sp( + SCREEN *sp) + { /* void */ } + +#undef noqiflush +void noqiflush(void) + { /* void */ } + +#undef intrflush_sp +int intrflush_sp( + SCREEN *sp, + WINDOW *win, + NCURSES_BOOL flag) + { return(*(int *)0); } + +#undef intrflush +int intrflush( + WINDOW *win, + NCURSES_BOOL flag) + { return(*(int *)0); } + +/* ./tinfo/lib_setup.c */ + +#include +#include +#include + +#undef _nc_ttytype +char *_nc_ttytype(void) + { return(*(char **)0); } + +#undef _nc_ptr_Lines +int *_nc_ptr_Lines( + SCREEN *sp) + { return(*(int **)0); } + +#undef _nc_LINES +int _nc_LINES(void) + { return(*(int *)0); } + +#undef _nc_ptr_Cols +int *_nc_ptr_Cols( + SCREEN *sp) + { return(*(int **)0); } + +#undef _nc_COLS +int _nc_COLS(void) + { return(*(int *)0); } + +#undef _nc_ptr_Tabsize +int *_nc_ptr_Tabsize( + SCREEN *sp) + { return(*(int **)0); } + +#undef _nc_TABSIZE +int _nc_TABSIZE(void) + { return(*(int *)0); } + +#undef set_tabsize_sp +int set_tabsize_sp( + SCREEN *sp, + int value) + { return(*(int *)0); } + +#undef set_tabsize +int set_tabsize( + int value) + { return(*(int *)0); } + +#undef _nc_handle_sigwinch +int _nc_handle_sigwinch( + SCREEN *sp) + { return(*(int *)0); } + +#undef use_env_sp +void use_env_sp( + SCREEN *sp, + NCURSES_BOOL f) + { /* void */ } + +#undef use_env +void use_env( + NCURSES_BOOL f) + { /* void */ } + +#undef _nc_get_screensize +void _nc_get_screensize( + SCREEN *sp, + int *linep, + int *colp) + { /* void */ } + +#undef _nc_update_screensize +void _nc_update_screensize( + SCREEN *sp) + { /* void */ } + +#undef _nc_get_locale +char *_nc_get_locale(void) + { return(*(char **)0); } + +#undef _nc_unicode_locale +int _nc_unicode_locale(void) + { return(*(int *)0); } + +#undef _nc_locale_breaks_acs +int _nc_locale_breaks_acs( + TERMINAL *termp) + { return(*(int *)0); } + +#undef _nc_setupterm +int _nc_setupterm( + char *tname, + int Filedes, + int *errret, + NCURSES_BOOL reuse) + { return(*(int *)0); } + +#undef setupterm +int setupterm( + char *tname, + int Filedes, + int *errret) + { return(*(int *)0); } + +/* ./tinfo/lib_termcap.c */ + +#undef UP +char *UP; +#undef BC +char *BC; + +#undef tgetent_sp +int tgetent_sp( + SCREEN *sp, + char *bufp, + const char *name) + { return(*(int *)0); } + +#if 0 + +#include + +#endif + +#undef tgetent +int tgetent( + char *bufp, + const char *name) + { return(*(int *)0); } + +#undef tgetflag_sp +int tgetflag_sp( + SCREEN *sp, + char *id) + { return(*(int *)0); } + +#undef tgetflag +int tgetflag( + char *id) + { return(*(int *)0); } + +#undef tgetnum_sp +int tgetnum_sp( + SCREEN *sp, + char *id) + { return(*(int *)0); } + +#undef tgetnum +int tgetnum( + char *id) + { return(*(int *)0); } + +#undef tgetstr_sp +char *tgetstr_sp( + SCREEN *sp, + char *id, + char **area) + { return(*(char **)0); } + +#undef tgetstr +char *tgetstr( + char *id, + char **area) + { return(*(char **)0); } + +/* ./tinfo/lib_termname.c */ + +#undef termname_sp +char *termname_sp( + SCREEN *sp) + { return(*(char **)0); } + +#undef termname +char *termname(void) + { return(*(char **)0); } + +/* ./tinfo/lib_tgoto.c */ + +#undef tgoto +char *tgoto( + const char *string, + int x, + int y) + { return(*(char **)0); } + +/* ./tinfo/lib_ti.c */ + +#undef tigetflag_sp +int tigetflag_sp( + SCREEN *sp, + char *str) + { return(*(int *)0); } + +#undef tigetflag +int tigetflag( + char *str) + { return(*(int *)0); } + +#undef tigetnum_sp +int tigetnum_sp( + SCREEN *sp, + char *str) + { return(*(int *)0); } + +#undef tigetnum +int tigetnum( + char *str) + { return(*(int *)0); } + +#undef tigetstr_sp +char *tigetstr_sp( + SCREEN *sp, + char *str) + { return(*(char **)0); } + +#undef tigetstr +char *tigetstr( + char *str) + { return(*(char **)0); } + +/* ./tinfo/lib_tparm.c */ + +#undef _nc_tparm_err +int _nc_tparm_err; + +#undef _nc_tparm_analyze +int _nc_tparm_analyze( + const char *string, + char *p_is_s[9], + int *popcount) + { return(*(int *)0); } + +#undef tparm +char *tparm( + char *string, + ...) + { return(*(char **)0); } + +/* ./tinfo/lib_tputs.c */ + +#undef PC +char PC; +#undef ospeed +NCURSES_OSPEED ospeed; +#undef _nc_nulls_sent +int _nc_nulls_sent; + +#undef _nc_set_no_padding +void _nc_set_no_padding( + SCREEN *sp) + { /* void */ } + +#undef delay_output_sp +int delay_output_sp( + SCREEN *sp, + int ms) + { return(*(int *)0); } + +#undef delay_output +int delay_output( + int ms) + { return(*(int *)0); } + +#undef _nc_flush_sp +void _nc_flush_sp( + SCREEN *sp) + { /* void */ } + +#undef _nc_flush +void _nc_flush(void) + { /* void */ } + +#undef _nc_outch_sp +int _nc_outch_sp( + SCREEN *sp, + int ch) + { return(*(int *)0); } + +#undef _nc_outch +int _nc_outch( + int ch) + { return(*(int *)0); } + +#undef putp_sp +int putp_sp( + SCREEN *sp, + const char *string) + { return(*(int *)0); } + +#undef _nc_putp_sp +int _nc_putp_sp( + SCREEN *sp, + const char *name, + const char *string) + { return(*(int *)0); } + +#undef putp +int putp( + const char *string) + { return(*(int *)0); } + +#undef _nc_putp +int _nc_putp( + const char *name, + const char *string) + { return(*(int *)0); } + +#undef tputs_sp +int tputs_sp( + SCREEN *sp, + const char *string, + int affcnt, + NCURSES_OUTC_sp outc) + { return(*(int *)0); } + +#undef _nc_outc_wrapper +int _nc_outc_wrapper( + SCREEN *sp, + int c) + { return(*(int *)0); } + +#undef tputs +int tputs( + const char *string, + int affcnt, + int (*outc)( + int p1)) + { return(*(int *)0); } + +/* ./trace/lib_trace.c */ + +#undef _nc_tracing +unsigned _nc_tracing; + +#undef _nc__nc_tputs_trace +const char *_nc__nc_tputs_trace(void) + { return(*(const char **)0); } + +#undef _nc__nc_outchars +long _nc__nc_outchars(void) + { return(*(long *)0); } + +#undef _nc_set_tputs_trace +void _nc_set_tputs_trace( + const char *s) + { /* void */ } + +#undef _nc_count_outchars +void _nc_count_outchars( + long increment) + { /* void */ } + +#undef trace +void trace( + const unsigned int tracelevel) + { /* void */ } + +#undef _tracef +void _tracef( + const char *fmt, + ...) + { /* void */ } + +#undef _nc_retrace_bool +NCURSES_BOOL _nc_retrace_bool( + NCURSES_BOOL code) + { return(*(NCURSES_BOOL *)0); } + +#undef _nc_retrace_int +int _nc_retrace_int( + int code) + { return(*(int *)0); } + +#undef _nc_retrace_unsigned +unsigned _nc_retrace_unsigned( + unsigned code) + { return(*(unsigned *)0); } + +#undef _nc_retrace_ptr +char *_nc_retrace_ptr( + char *code) + { return(*(char **)0); } + +#undef _nc_retrace_cptr +const char *_nc_retrace_cptr( + const char *code) + { return(*(const char **)0); } + +#undef _nc_retrace_cvoid_ptr +void *_nc_retrace_cvoid_ptr( + void *code) + { return(*(void **)0); } + +#undef _nc_retrace_void_ptr +void *_nc_retrace_void_ptr( + void *code) + { return(*(void **)0); } + +#undef _nc_retrace_sp +SCREEN *_nc_retrace_sp( + SCREEN *code) + { return(*(SCREEN **)0); } + +#undef _nc_retrace_win +WINDOW *_nc_retrace_win( + WINDOW *code) + { return(*(WINDOW **)0); } + +#undef _nc_use_tracef +int _nc_use_tracef( + unsigned mask) + { return(*(int *)0); } + +#undef _nc_locked_tracef +void _nc_locked_tracef( + const char *fmt, + ...) + { /* void */ } + +/* ./trace/lib_traceatr.c */ + +#undef _traceattr2 +char *_traceattr2( + int bufnum, + chtype newmode) + { return(*(char **)0); } + +#undef _traceattr +char *_traceattr( + attr_t newmode) + { return(*(char **)0); } + +#undef _nc_retrace_attr_t +attr_t _nc_retrace_attr_t( + attr_t code) + { return(*(attr_t *)0); } + +#undef _nc_altcharset_name +const char *_nc_altcharset_name( + attr_t attr, + chtype ch) + { return(*(const char **)0); } + +#undef _tracechtype2 +char *_tracechtype2( + int bufnum, + chtype ch) + { return(*(char **)0); } + +#undef _tracechtype +char *_tracechtype( + chtype ch) + { return(*(char **)0); } + +#undef _nc_retrace_chtype +chtype _nc_retrace_chtype( + chtype code) + { return(*(chtype *)0); } + +#undef _tracecchar_t2 +char *_tracecchar_t2( + int bufnum, + const cchar_t *ch) + { return(*(char **)0); } + +#undef _tracecchar_t +char *_tracecchar_t( + const cchar_t *ch) + { return(*(char **)0); } + +/* ./trace/lib_tracebits.c */ + +typedef struct { + unsigned int val; + const char *name; +} BITNAMES; + +#undef _nc_trace_ttymode +char *_nc_trace_ttymode( + struct termios *tty) + { return(*(char **)0); } + +#undef _nc_tracebits +char *_nc_tracebits(void) + { return(*(char **)0); } + +/* ./trace/lib_tracechr.c */ + +#undef _nc_tracechar +char *_nc_tracechar( + SCREEN *sp, + int ch) + { return(*(char **)0); } + +#undef _tracechar +char *_tracechar( + int ch) + { return(*(char **)0); } + +/* ./tinfo/lib_ttyflags.c */ + +#undef _nc_get_tty_mode_sp +int _nc_get_tty_mode_sp( + SCREEN *sp, + struct termios *buf) + { return(*(int *)0); } + +#undef _nc_get_tty_mode +int _nc_get_tty_mode( + struct termios *buf) + { return(*(int *)0); } + +#undef _nc_set_tty_mode_sp +int _nc_set_tty_mode_sp( + SCREEN *sp, + struct termios *buf) + { return(*(int *)0); } + +#undef _nc_set_tty_mode +int _nc_set_tty_mode( + struct termios *buf) + { return(*(int *)0); } + +#undef def_shell_mode_sp +int def_shell_mode_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef def_shell_mode +int def_shell_mode(void) + { return(*(int *)0); } + +#undef def_prog_mode_sp +int def_prog_mode_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef def_prog_mode +int def_prog_mode(void) + { return(*(int *)0); } + +#undef reset_prog_mode_sp +int reset_prog_mode_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef reset_prog_mode +int reset_prog_mode(void) + { return(*(int *)0); } + +#undef reset_shell_mode_sp +int reset_shell_mode_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef reset_shell_mode +int reset_shell_mode(void) + { return(*(int *)0); } + +#undef savetty_sp +int savetty_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef savetty +int savetty(void) + { return(*(int *)0); } + +#undef resetty_sp +int resetty_sp( + SCREEN *sp) + { return(*(int *)0); } + +#undef resetty +int resetty(void) + { return(*(int *)0); } + +/* ./tty/lib_twait.c */ + +#undef _nc_timed_wait +int _nc_timed_wait( + SCREEN *sp, + int mode, + int milliseconds, + int *timeleft) + { return(*(int *)0); } + +/* ./tinfo/name_match.c */ + +#undef _nc_first_name +char *_nc_first_name( + const char *const sp) + { return(*(char **)0); } + +#undef _nc_name_match +int _nc_name_match( + const char *const namelst, + const char *const name, + const char *const delim) + { return(*(int *)0); } + +/* ./names.c */ + +#undef _nc_boolnames +char *const *_nc_boolnames(void) + { return(*(char **)0); } + +#undef _nc_boolfnames +char *const *_nc_boolfnames(void) + { return(*(char **)0); } + +#undef _nc_numnames +char *const *_nc_numnames(void) + { return(*(char **)0); } + +#undef _nc_numfnames +char *const *_nc_numfnames(void) + { return(*(char **)0); } + +#undef _nc_strnames +char *const *_nc_strnames(void) + { return(*(char **)0); } + +#undef _nc_strfnames +char *const *_nc_strfnames(void) + { return(*(char **)0); } + +/* ./tinfo/read_entry.c */ + +#include + +#undef _nc_read_termtype +int _nc_read_termtype( + TERMTYPE *ptr, + char *buffer, + int limit) + { return(*(int *)0); } + +#undef _nc_read_file_entry +int _nc_read_file_entry( + const char *const filename, + TERMTYPE *ptr) + { return(*(int *)0); } + +#undef _nc_read_entry +int _nc_read_entry( + const char *const name, + char *const filename, + TERMTYPE *const tp) + { return(*(int *)0); } + +/* ./tinfo/read_termcap.c */ + +#include + +#undef _nc_read_termcap_entry +int _nc_read_termcap_entry( + const char *const tn, + TERMTYPE *const tp) + { return(*(int *)0); } + +/* ./tinfo/setbuf.c */ + +#undef _nc_set_buffer_sp +void _nc_set_buffer_sp( + SCREEN *sp, + FILE *ofp, + NCURSES_BOOL buffered) + { /* void */ } + +#undef _nc_set_buffer +void _nc_set_buffer( + FILE *ofp, + NCURSES_BOOL buffered) + { /* void */ } + +/* ./tinfo/strings.c */ + +#undef _nc_str_init +string_desc *_nc_str_init( + string_desc *dst, + char *src, + size_t len) + { return(*(string_desc **)0); } + +#undef _nc_str_null +string_desc *_nc_str_null( + string_desc *dst, + size_t len) + { return(*(string_desc **)0); } + +#undef _nc_str_copy +string_desc *_nc_str_copy( + string_desc *dst, + string_desc *src) + { return(*(string_desc **)0); } + +#undef _nc_safe_strcat +NCURSES_BOOL _nc_safe_strcat( + string_desc *dst, + const char *src) + { return(*(NCURSES_BOOL *)0); } + +#undef _nc_safe_strcpy +NCURSES_BOOL _nc_safe_strcpy( + string_desc *dst, + const char *src) + { return(*(NCURSES_BOOL *)0); } + +/* ./trace/trace_buf.c */ + +#undef _nc_trace_buf +char *_nc_trace_buf( + int bufnum, + size_t want) + { return(*(char **)0); } + +#undef _nc_trace_bufcat +char *_nc_trace_bufcat( + int bufnum, + const char *value) + { return(*(char **)0); } + +/* ./trace/trace_tries.c */ + +#undef _nc_trace_tries +void _nc_trace_tries( + TRIES *tree) + { /* void */ } + +/* ./base/tries.c */ + +#undef _nc_expand_try +char *_nc_expand_try( + TRIES *tree, + unsigned code, + int *count, + size_t len) + { return(*(char **)0); } + +#undef _nc_remove_key +int _nc_remove_key( + TRIES **tree, + unsigned code) + { return(*(int *)0); } + +#undef _nc_remove_string +int _nc_remove_string( + TRIES **tree, + const char *string) + { return(*(int *)0); } + +/* ./tinfo/trim_sgr0.c */ + +#undef _nc_trim_sgr0 +char *_nc_trim_sgr0( + TERMTYPE *tp) + { return(*(char **)0); } + +/* ./unctrl.c */ + +#undef unctrl_sp +char *unctrl_sp( + SCREEN *sp, + chtype ch) + { return(*(char **)0); } + +#undef unctrl +char *unctrl( + chtype ch) + { return(*(char **)0); } + +/* ./trace/visbuf.c */ + +#undef _nc_visbuf2 +const char *_nc_visbuf2( + int bufnum, + const char *buf) + { return(*(const char **)0); } + +#undef _nc_visbuf +const char *_nc_visbuf( + const char *buf) + { return(*(const char **)0); } + +#undef _nc_visbufn +const char *_nc_visbufn( + const char *buf, + int len) + { return(*(const char **)0); } + +#undef _nc_viswbuf2 +const char *_nc_viswbuf2( + int bufnum, + const wchar_t *buf) + { return(*(const char **)0); } + +#undef _nc_viswbuf +const char *_nc_viswbuf( + const wchar_t *buf) + { return(*(const char **)0); } + +#undef _nc_viswbufn +const char *_nc_viswbufn( + const wchar_t *buf, + int len) + { return(*(const char **)0); } + +#undef _nc_viswibuf +const char *_nc_viswibuf( + const wint_t *buf) + { return(*(const char **)0); } + +#undef _nc_viscbuf2 +const char *_nc_viscbuf2( + int bufnum, + const cchar_t *buf, + int len) + { return(*(const char **)0); } + +#undef _nc_viscbuf +const char *_nc_viscbuf( + const cchar_t *buf, + int len) + { return(*(const char **)0); } + +/* ./tinfo/alloc_entry.c */ + +#undef _nc_init_entry +void _nc_init_entry( + TERMTYPE *const tp) + { /* void */ } + +#undef _nc_copy_entry +ENTRY *_nc_copy_entry( + ENTRY *oldp) + { return(*(ENTRY **)0); } + +#undef _nc_save_str +char *_nc_save_str( + const char *const string) + { return(*(char **)0); } + +#undef _nc_wrap_entry +void _nc_wrap_entry( + ENTRY *const ep, + NCURSES_BOOL copy_strings) + { /* void */ } + +#undef _nc_merge_entry +void _nc_merge_entry( + TERMTYPE *const to, + TERMTYPE *const from) + { /* void */ } + +/* ./tinfo/captoinfo.c */ + +#undef _nc_captoinfo +char *_nc_captoinfo( + const char *cap, + const char *s, + int const parameterized) + { return(*(char **)0); } + +#undef _nc_infotocap +char *_nc_infotocap( + const char *cap, + const char *str, + int const parameterized) + { return(*(char **)0); } + +/* ./comp_captab.c */ + +#include + +#undef _nc_get_table +const struct name_table_entry *_nc_get_table( + NCURSES_BOOL termcap) + { return(*(const struct name_table_entry **)0); } + +#undef _nc_get_hash_table +const short *_nc_get_hash_table( + NCURSES_BOOL termcap) + { return(*(const short **)0); } + +#undef _nc_get_alias_table +const struct alias *_nc_get_alias_table( + NCURSES_BOOL termcap) + { return(*(const struct alias **)0); } + +/* ./tinfo/comp_expand.c */ + +#undef _nc_tic_expand +char *_nc_tic_expand( + const char *srcp, + NCURSES_BOOL tic_format, + int numbers) + { return(*(char **)0); } + +/* ./tinfo/comp_hash.c */ + +#undef _nc_find_entry +struct name_table_entry const *_nc_find_entry( + const char *string, + const short *hash_table) + { return(*(struct name_table_entry const **)0); } + +#undef _nc_find_type_entry +struct name_table_entry const *_nc_find_type_entry( + const char *string, + int type, + const struct name_table_entry *table) + { return(*(struct name_table_entry const **)0); } + +/* ./tinfo/comp_parse.c */ + +#undef _nc_check_termtype2 +void (*_nc_check_termtype2)( + TERMTYPE *p1, + NCURSES_BOOL p2); +#undef _nc_check_termtype +void (*_nc_check_termtype)( + TERMTYPE *p1); + +#undef _nc_entry_match +NCURSES_BOOL _nc_entry_match( + char *n1, + char *n2) + { return(*(NCURSES_BOOL *)0); } + +#undef _nc_read_entry_source +void _nc_read_entry_source( + FILE *fp, + char *buf, + int literal, + NCURSES_BOOL silent, + NCURSES_BOOL (*hook)( + ENTRY *p1)) + { /* void */ } + +#undef _nc_resolve_uses2 +int _nc_resolve_uses2( + NCURSES_BOOL fullresolve, + NCURSES_BOOL literal) + { return(*(int *)0); } + +#undef _nc_resolve_uses +int _nc_resolve_uses( + NCURSES_BOOL fullresolve) + { return(*(int *)0); } + +/* ./tinfo/comp_scan.c */ + +#undef _nc_syntax +int _nc_syntax; +#undef _nc_curr_file_pos +long _nc_curr_file_pos; +#undef _nc_comment_start +long _nc_comment_start; +#undef _nc_comment_end +long _nc_comment_end; +#undef _nc_start_line +long _nc_start_line; +#undef _nc_curr_token +struct token _nc_curr_token; +#undef _nc_disable_period +NCURSES_BOOL _nc_disable_period; + +#undef _nc_reset_input +void _nc_reset_input( + FILE *fp, + char *buf) + { /* void */ } + +#undef _nc_get_token +int _nc_get_token( + NCURSES_BOOL silent) + { return(*(int *)0); } + +#undef _nc_trans_string +int _nc_trans_string( + char *ptr, + char *last) + { return(*(int *)0); } + +#undef _nc_push_token +void _nc_push_token( + int tokclass) + { /* void */ } + +#undef _nc_panic_mode +void _nc_panic_mode( + char ch) + { /* void */ } + +/* ./tinfo/parse_entry.c */ + +#undef _nc_parse_entry +int _nc_parse_entry( + struct entry *entryp, + int literal, + NCURSES_BOOL silent) + { return(*(int *)0); } + +#undef _nc_capcmp +int _nc_capcmp( + const char *s, + const char *t) + { return(*(int *)0); } + +typedef struct { + const char *from; + const char *to; +} assoc; + +/* ./tinfo/write_entry.c */ + +#undef _nc_set_writedir +void _nc_set_writedir( + char *dir) + { /* void */ } + +#undef _nc_write_entry +void _nc_write_entry( + TERMTYPE *const tp) + { /* void */ } + +#undef _nc_tic_written +int _nc_tic_written(void) + { return(*(int *)0); } + +/* ./base/define_key.c */ + +#undef define_key_sp +int define_key_sp( + SCREEN *sp, + const char *str, + int keycode) + { return(*(int *)0); } + +#undef define_key +int define_key( + const char *str, + int keycode) + { return(*(int *)0); } + +/* ./tinfo/hashed_db.c */ + +#undef _nc_hashed_db +void _nc_hashed_db(void) + { /* void */ } + +/* ./base/key_defined.c */ + +#undef key_defined_sp +int key_defined_sp( + SCREEN *sp, + const char *str) + { return(*(int *)0); } + +#undef key_defined +int key_defined( + const char *str) + { return(*(int *)0); } + +/* ./base/keybound.c */ + +#undef keybound_sp +char *keybound_sp( + SCREEN *sp, + int code, + int count) + { return(*(char **)0); } + +#undef keybound +char *keybound( + int code, + int count) + { return(*(char **)0); } + +/* ./base/keyok.c */ + +#undef keyok_sp +int keyok_sp( + SCREEN *sp, + int c, + NCURSES_BOOL flag) + { return(*(int *)0); } + +#undef keyok +int keyok( + int c, + NCURSES_BOOL flag) + { return(*(int *)0); } + +/* ./base/version.c */ + +#undef curses_version +const char *curses_version(void) + { return(*(const char **)0); } diff --git a/ncurses/llib-lncursesw b/ncurses/llib-lncursesw index 96e72576..9cfd92bd 100644 --- a/ncurses/llib-lncursesw +++ b/ncurses/llib-lncursesw @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2001-2007,2008 Free Software Foundation, Inc. * + * Copyright (c) 2001-2008,2009 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -27,7 +27,7 @@ ****************************************************************************/ /**************************************************************************** - * Author: Thomas E. Dickey 2001-2008 * + * Author: Thomas E. Dickey 2001-2009 * ****************************************************************************/ /* LINTLIBRARY */ @@ -38,27 +38,54 @@ #undef _nc_oldnums int *_nc_oldnums; +#undef _nc_scroll_optimize_sp +void _nc_scroll_optimize_sp( + SCREEN *sp) + { /* void */ } + #undef _nc_scroll_optimize void _nc_scroll_optimize(void) { /* void */ } +#undef _nc_linedump_sp +void _nc_linedump_sp( + SCREEN *sp) + { /* void */ } + #undef _nc_linedump void _nc_linedump(void) { /* void */ } /* ./tty/hashmap.c */ -#include +#undef _nc_hash_map_sp +void _nc_hash_map_sp( + SCREEN *sp) + { /* void */ } #undef _nc_hash_map void _nc_hash_map(void) { /* void */ } +#undef _nc_make_oldhash_sp +void _nc_make_oldhash_sp( + SCREEN *sp, + int i) + { /* void */ } + #undef _nc_make_oldhash void _nc_make_oldhash( int i) { /* void */ } +#undef _nc_scroll_oldhash_sp +void _nc_scroll_oldhash_sp( + SCREEN *sp, + int n, + int top, + int bot) + { /* void */ } + #undef _nc_scroll_oldhash void _nc_scroll_oldhash( int n, @@ -137,6 +164,11 @@ int waddnwstr( /* ./base/lib_beep.c */ +#undef beep_sp +int beep_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef beep int beep(void) { return(*(int *)0); } @@ -224,6 +256,7 @@ int wclrtoeol( /* ./base/lib_color.c */ +#include #include #undef COLOR_PAIRS @@ -231,14 +264,32 @@ int COLOR_PAIRS; #undef COLORS int COLORS; +#undef _nc_reset_colors_sp +NCURSES_BOOL _nc_reset_colors_sp( + SCREEN *sp) + { return(*(NCURSES_BOOL *)0); } + #undef _nc_reset_colors NCURSES_BOOL _nc_reset_colors(void) { return(*(NCURSES_BOOL *)0); } +#undef start_color_sp +int start_color_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef start_color int start_color(void) { return(*(int *)0); } +#undef init_pair_sp +int init_pair_sp( + SCREEN *sp, + short pair, + short f, + short b) + { return(*(int *)0); } + #undef init_pair int init_pair( short pair, @@ -246,6 +297,15 @@ int init_pair( short b) { return(*(int *)0); } +#undef init_color_sp +int init_color_sp( + SCREEN *sp, + short color, + short r, + short g, + short b) + { return(*(int *)0); } + #undef init_color int init_color( short color, @@ -254,14 +314,33 @@ int init_color( short b) { return(*(int *)0); } +#undef can_change_color_sp +NCURSES_BOOL can_change_color_sp( + SCREEN *sp) + { return(*(NCURSES_BOOL *)0); } + #undef can_change_color NCURSES_BOOL can_change_color(void) { return(*(NCURSES_BOOL *)0); } +#undef has_colors_sp +NCURSES_BOOL has_colors_sp( + SCREEN *sp) + { return(*(NCURSES_BOOL *)0); } + #undef has_colors NCURSES_BOOL has_colors(void) { return(*(NCURSES_BOOL *)0); } +#undef color_content_sp +int color_content_sp( + SCREEN *sp, + short color, + short *r, + short *g, + short *b) + { return(*(int *)0); } + #undef color_content int color_content( short color, @@ -270,6 +349,14 @@ int color_content( short *b) { return(*(int *)0); } +#undef pair_content_sp +int pair_content_sp( + SCREEN *sp, + short pair, + short *f, + short *b) + { return(*(int *)0); } + #undef pair_content int pair_content( short pair, @@ -277,13 +364,21 @@ int pair_content( short *b) { return(*(int *)0); } +#undef _nc_do_color_sp +void _nc_do_color_sp( + SCREEN *sp, + short old_pair, + short pair, + NCURSES_BOOL reverse, + NCURSES_OUTC_sp outc) + { /* void */ } + #undef _nc_do_color void _nc_do_color( short old_pair, short pair, NCURSES_BOOL reverse, - int (*outc)( - int p1)) + NCURSES_OUTC outc) { /* void */ } /* ./base/lib_colorset.c */ @@ -311,16 +406,31 @@ int delwin( /* ./base/lib_echo.c */ +#undef echo_sp +int echo_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef echo int echo(void) { return(*(int *)0); } +#undef noecho_sp +int noecho_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef noecho int noecho(void) { return(*(int *)0); } /* ./base/lib_endwin.c */ +#undef endwin_sp +int endwin_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef endwin int endwin(void) { return(*(int *)0); } @@ -334,6 +444,11 @@ int werase( /* ./base/lib_flash.c */ +#undef flash_sp +int flash_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef flash int flash(void) { return(*(int *)0); } @@ -1646,6 +1761,12 @@ NCURSES_BOOL mouse_trafo( #undef ESCDELAY int ESCDELAY; +#undef set_escdelay_sp +int set_escdelay_sp( + SCREEN *sp, + int value) + { return(*(int *)0); } + #undef set_escdelay int set_escdelay( int value) @@ -1708,6 +1829,7 @@ WINDOW *initscr(void) #undef _nc_insert_ch int _nc_insert_ch( + SCREEN *sp, WINDOW *win, chtype ch) { return(*(int *)0); } @@ -1746,6 +1868,11 @@ int winnstr( /* ./base/lib_isendwin.c */ +#undef isendwin_sp +NCURSES_BOOL isendwin_sp( + SCREEN *sp) + { return(*(NCURSES_BOOL *)0); } + #undef isendwin NCURSES_BOOL isendwin(void) { return(*(NCURSES_BOOL *)0); } @@ -1760,16 +1887,35 @@ int leaveok( /* ./base/lib_mouse.c */ +#undef getmouse_sp +int getmouse_sp( + SCREEN *sp, + MEVENT *aevent) + { return(*(int *)0); } + #undef getmouse int getmouse( MEVENT *aevent) { return(*(int *)0); } +#undef ungetmouse_sp +int ungetmouse_sp( + SCREEN *sp, + MEVENT *aevent) + { return(*(int *)0); } + #undef ungetmouse int ungetmouse( MEVENT *aevent) { return(*(int *)0); } +#undef mousemask_sp +mmask_t mousemask_sp( + SCREEN *sp, + mmask_t newmask, + mmask_t *oldmask) + { return(*(mmask_t *)0); } + #undef mousemask mmask_t mousemask( mmask_t newmask, @@ -1783,14 +1929,30 @@ NCURSES_BOOL wenclose( int x) { return(*(NCURSES_BOOL *)0); } +#undef mouseinterval_sp +int mouseinterval_sp( + SCREEN *sp, + int maxclick) + { return(*(int *)0); } + #undef mouseinterval int mouseinterval( int maxclick) { return(*(int *)0); } #undef _nc_has_mouse -int _nc_has_mouse(void) - { return(*(int *)0); } +NCURSES_BOOL _nc_has_mouse( + SCREEN *sp) + { return(*(NCURSES_BOOL *)0); } + +#undef has_mouse_sp +NCURSES_BOOL has_mouse_sp( + SCREEN *sp) + { return(*(NCURSES_BOOL *)0); } + +#undef has_mouse +NCURSES_BOOL has_mouse(void) + { return(*(NCURSES_BOOL *)0); } #undef wmouse_trafo NCURSES_BOOL wmouse_trafo( @@ -1811,24 +1973,55 @@ int wmove( /* ./tty/lib_mvcur.c */ +#undef _nc_msec_cost_sp +int _nc_msec_cost_sp( + SCREEN *sp, + const char *const cap, + int affcnt) + { return(*(int *)0); } + #undef _nc_msec_cost int _nc_msec_cost( const char *const cap, int affcnt) { return(*(int *)0); } +#undef _nc_mvcur_resume_sp +void _nc_mvcur_resume_sp( + SCREEN *sp) + { /* void */ } + #undef _nc_mvcur_resume void _nc_mvcur_resume(void) { /* void */ } +#undef _nc_mvcur_init_sp +void _nc_mvcur_init_sp( + SCREEN *sp) + { /* void */ } + #undef _nc_mvcur_init void _nc_mvcur_init(void) { /* void */ } +#undef _nc_mvcur_wrap_sp +void _nc_mvcur_wrap_sp( + SCREEN *sp) + { /* void */ } + #undef _nc_mvcur_wrap void _nc_mvcur_wrap(void) { /* void */ } +#undef mvcur_sp +int mvcur_sp( + SCREEN *sp, + int yold, + int xold, + int ynew, + int xnew) + { return(*(int *)0); } + #undef mvcur int mvcur( int yold, @@ -1851,14 +2044,32 @@ int mvwin( /* ./base/lib_newterm.c */ +#undef filter_sp +void filter_sp( + SCREEN *sp) + { /* void */ } + #undef filter void filter(void) { /* void */ } +#undef nofilter_sp +void nofilter_sp( + SCREEN *sp) + { /* void */ } + #undef nofilter void nofilter(void) { /* void */ } +#undef newterm_sp +SCREEN *newterm_sp( + SCREEN *sp, + char *name, + FILE *ofp, + FILE *ifp) + { return(*(SCREEN **)0); } + #undef newterm SCREEN *newterm( char *name, @@ -1873,6 +2084,15 @@ int _nc_freewin( WINDOW *win) { return(*(int *)0); } +#undef newwin_sp +WINDOW *newwin_sp( + SCREEN *sp, + int num_lines, + int num_columns, + int begy, + int begx) + { return(*(WINDOW **)0); } + #undef newwin WINDOW *newwin( int num_lines, @@ -1899,6 +2119,16 @@ WINDOW *subwin( int x) { return(*(WINDOW **)0); } +#undef _nc_makenew_sp +WINDOW *_nc_makenew_sp( + SCREEN *sp, + int num_lines, + int num_columns, + int begy, + int begx, + int flags) + { return(*(WINDOW **)0); } + #undef _nc_makenew WINDOW *_nc_makenew( int num_lines, @@ -1908,17 +2138,37 @@ WINDOW *_nc_makenew( int flags) { return(*(WINDOW **)0); } -#undef _nc_screen_of -SCREEN *_nc_screen_of( - WINDOW *win) - { return(*(SCREEN **)0); } +#undef _nc_curscr_of +WINDOW *_nc_curscr_of( + SCREEN *sp) + { return(*(WINDOW **)0); } + +#undef _nc_newscr_of +WINDOW *_nc_newscr_of( + SCREEN *sp) + { return(*(WINDOW **)0); } + +#undef _nc_stdscr_of +WINDOW *_nc_stdscr_of( + SCREEN *sp) + { return(*(WINDOW **)0); } /* ./base/lib_nl.c */ +#undef nl_sp +int nl_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef nl int nl(void) { return(*(int *)0); } +#undef nonl_sp +int nonl_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef nonl int nonl(void) { return(*(int *)0); } @@ -1952,6 +2202,13 @@ int copywin( /* ./base/lib_pad.c */ +#undef newpad_sp +WINDOW *newpad_sp( + SCREEN *sp, + int l, + int c) + { return(*(WINDOW **)0); } + #undef newpad WINDOW *newpad( int l, @@ -2057,6 +2314,14 @@ int wnoutrefresh( /* ./base/lib_restart.c */ +#undef restartterm_sp +int restartterm_sp( + SCREEN *sp, + char *termp, + int filenum, + int *errret) + { return(*(int *)0); } + #undef restartterm int restartterm( char *termp, @@ -2105,6 +2370,12 @@ int mvwscanw( /* ./base/lib_screen.c */ +#undef getwin_sp +WINDOW *getwin_sp( + SCREEN *sp, + FILE *filep) + { return(*(WINDOW **)0); } + #undef getwin WINDOW *getwin( FILE *filep) @@ -2116,6 +2387,12 @@ int putwin( FILE *filep) { return(*(int *)0); } +#undef scr_restore_sp +int scr_restore_sp( + SCREEN *sp, + const char *file) + { return(*(int *)0); } + #undef scr_restore int scr_restore( const char *file) @@ -2126,11 +2403,23 @@ int scr_dump( const char *file) { return(*(int *)0); } +#undef scr_init_sp +int scr_init_sp( + SCREEN *sp, + const char *file) + { return(*(int *)0); } + #undef scr_init int scr_init( const char *file) { return(*(int *)0); } +#undef scr_set_sp +int scr_set_sp( + SCREEN *sp, + const char *file) + { return(*(int *)0); } + #undef scr_set int scr_set( const char *file) @@ -2191,6 +2480,15 @@ int _nc_setupscreen( int slk_format) { return(*(int *)0); } +#undef _nc_ripoffline_sp +int _nc_ripoffline_sp( + SCREEN *sp, + int line, + int (*init)( + WINDOW *p1, + int p2)) + { return(*(int *)0); } + #undef _nc_ripoffline int _nc_ripoffline( int line, @@ -2199,6 +2497,15 @@ int _nc_ripoffline( int p2)) { return(*(int *)0); } +#undef ripoffline_sp +int ripoffline_sp( + SCREEN *sp, + int line, + int (*init)( + WINDOW *p1, + int p2)) + { return(*(int *)0); } + #undef ripoffline int ripoffline( int line, @@ -2215,12 +2522,25 @@ int _nc_slk_initialize( int cols) { return(*(int *)0); } +#undef slk_restore_sp +int slk_restore_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef slk_restore int slk_restore(void) { return(*(int *)0); } /* ./base/lib_slkatr_set.c */ +#undef slk_attr_set_sp +int slk_attr_set_sp( + SCREEN *sp, + const attr_t attr, + short color_pair_number, + void *opts) + { return(*(int *)0); } + #undef slk_attr_set int slk_attr_set( const attr_t attr, @@ -2230,6 +2550,12 @@ int slk_attr_set( /* ./base/lib_slkatrof.c */ +#undef slk_attroff_sp +int slk_attroff_sp( + SCREEN *sp, + const chtype attr) + { return(*(int *)0); } + #undef slk_attroff int slk_attroff( const chtype attr) @@ -2237,6 +2563,12 @@ int slk_attroff( /* ./base/lib_slkatron.c */ +#undef slk_attron_sp +int slk_attron_sp( + SCREEN *sp, + const chtype attr) + { return(*(int *)0); } + #undef slk_attron int slk_attron( const chtype attr) @@ -2244,6 +2576,12 @@ int slk_attron( /* ./base/lib_slkatrset.c */ +#undef slk_attrset_sp +int slk_attrset_sp( + SCREEN *sp, + const chtype attr) + { return(*(int *)0); } + #undef slk_attrset int slk_attrset( const chtype attr) @@ -2251,18 +2589,34 @@ int slk_attrset( /* ./base/lib_slkattr.c */ +#undef slk_attr_sp +attr_t slk_attr_sp( + SCREEN *sp) + { return(*(attr_t *)0); } + #undef slk_attr attr_t slk_attr(void) { return(*(attr_t *)0); } /* ./base/lib_slkclear.c */ +#undef slk_clear_sp +int slk_clear_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef slk_clear int slk_clear(void) { return(*(int *)0); } /* ./base/lib_slkcolor.c */ +#undef slk_color_sp +int slk_color_sp( + SCREEN *sp, + short color_pair_number) + { return(*(int *)0); } + #undef slk_color int slk_color( short color_pair_number) @@ -2270,6 +2624,12 @@ int slk_color( /* ./base/lib_slkinit.c */ +#undef slk_init_sp +int slk_init_sp( + SCREEN *sp, + int format) + { return(*(int *)0); } + #undef slk_init int slk_init( int format) @@ -2277,6 +2637,12 @@ int slk_init( /* ./base/lib_slklab.c */ +#undef slk_label_sp +char *slk_label_sp( + SCREEN *sp, + int n) + { return(*(char **)0); } + #undef slk_label char *slk_label( int n) @@ -2284,10 +2650,20 @@ char *slk_label( /* ./base/lib_slkrefr.c */ +#undef slk_noutrefresh_sp +int slk_noutrefresh_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef slk_noutrefresh int slk_noutrefresh(void) { return(*(int *)0); } +#undef slk_refresh_sp +int slk_refresh_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef slk_refresh int slk_refresh(void) { return(*(int *)0); } @@ -2296,6 +2672,14 @@ int slk_refresh(void) #include +#undef slk_set_sp +int slk_set_sp( + SCREEN *sp, + int i, + const char *astr, + int format) + { return(*(int *)0); } + #undef slk_set int slk_set( int i, @@ -2305,6 +2689,11 @@ int slk_set( /* ./base/lib_slktouch.c */ +#undef slk_touch_sp +int slk_touch_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef slk_touch int slk_touch(void) { return(*(int *)0); } @@ -2367,8 +2756,8 @@ void _nc_fifo_dump( SCREEN *sp) { /* void */ } -#undef _nc_ungetch -int _nc_ungetch( +#undef ungetch_sp +int ungetch_sp( SCREEN *sp, int ch) { return(*(int *)0); } @@ -2380,11 +2769,23 @@ int ungetch( /* ./tty/lib_vidattr.c */ +#undef vidputs_sp +int vidputs_sp( + SCREEN *sp, + chtype newmode, + NCURSES_OUTC_sp outc) + { return(*(int *)0); } + #undef vidputs int vidputs( chtype newmode, - int (*outc)( - int p1)) + NCURSES_OUTC outc) + { return(*(int *)0); } + +#undef vidattr_sp +int vidattr_sp( + SCREEN *sp, + chtype newmode) { return(*(int *)0); } #undef vidattr @@ -2392,6 +2793,11 @@ int vidattr( chtype newmode) { return(*(int *)0); } +#undef termattrs_sp +chtype termattrs_sp( + SCREEN *sp) + { return(*(chtype *)0); } + #undef termattrs chtype termattrs(void) { return(*(chtype *)0); } @@ -2472,12 +2878,24 @@ WINDOW *dupwin( /* ./base/nc_panel.c */ +#undef _nc_panelhook_sp +struct panelhook *_nc_panelhook_sp( + SCREEN *sp) + { return(*(struct panelhook **)0); } + #undef _nc_panelhook struct panelhook *_nc_panelhook(void) { return(*(struct panelhook **)0); } /* ./base/safe_sprintf.c */ +#undef _nc_printf_string_sp +char *_nc_printf_string_sp( + SCREEN *sp, + const char *fmt, + va_list ap) + { return(*(char **)0); } + #undef _nc_printf_string char *_nc_printf_string( const char *fmt, @@ -2489,10 +2907,24 @@ char *_nc_printf_string( #include #include +#undef doupdate_sp +int doupdate_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef doupdate int doupdate(void) { return(*(int *)0); } +#undef _nc_scrolln_sp +int _nc_scrolln_sp( + SCREEN *sp, + int n, + int top, + int bot, + int maxy) + { return(*(int *)0); } + #undef _nc_scrolln int _nc_scrolln( int n, @@ -2501,18 +2933,39 @@ int _nc_scrolln( int maxy) { return(*(int *)0); } +#undef _nc_screen_resume_sp +void _nc_screen_resume_sp( + SCREEN *sp) + { /* void */ } + #undef _nc_screen_resume void _nc_screen_resume(void) { /* void */ } +#undef _nc_screen_init_sp +void _nc_screen_init_sp( + SCREEN *sp) + { /* void */ } + #undef _nc_screen_init void _nc_screen_init(void) { /* void */ } +#undef _nc_screen_wrap_sp +void _nc_screen_wrap_sp( + SCREEN *sp) + { /* void */ } + #undef _nc_screen_wrap void _nc_screen_wrap(void) { /* void */ } +#undef _nc_do_xmc_glitch_sp +void _nc_do_xmc_glitch_sp( + SCREEN *sp, + attr_t previous) + { /* void */ } + #undef _nc_do_xmc_glitch void _nc_do_xmc_glitch( attr_t previous) @@ -2550,6 +3003,12 @@ void _nc_vsscanf(void) void _nc_freeall(void) { /* void */ } +#undef _nc_free_and_exit_sp +void _nc_free_and_exit_sp( + SCREEN *sp, + int code) + { /* void */ } + #undef _nc_free_and_exit void _nc_free_and_exit( int code) @@ -2739,6 +3198,12 @@ size_t _nc_wcrtomb( mbstate_t *state) { return(*(size_t *)0); } +#undef unget_wch_sp +int unget_wch_sp( + SCREEN *sp, + const wchar_t wch) + { return(*(int *)0); } + #undef unget_wch int unget_wch( const wchar_t wch) @@ -2746,13 +3211,29 @@ int unget_wch( /* ./widechar/lib_vid_attr.c */ +#undef vid_puts_sp +int vid_puts_sp( + SCREEN *sp, + attr_t newmode, + short pair, + void *opts, + NCURSES_OUTC_sp outc) + { return(*(int *)0); } + #undef vid_puts int vid_puts( attr_t newmode, short pair, void *opts, - int (*outc)( - int p1)) + NCURSES_OUTC outc) + { return(*(int *)0); } + +#undef vid_attr_sp +int vid_attr_sp( + SCREEN *sp, + attr_t newmode, + short pair, + void *opts) { return(*(int *)0); } #undef vid_attr @@ -2762,6 +3243,11 @@ int vid_attr( void *opts) { return(*(int *)0); } +#undef term_attrs_sp +attr_t term_attrs_sp( + SCREEN *sp) + { return(*(attr_t *)0); } + #undef term_attrs attr_t term_attrs(void) { return(*(attr_t *)0); } @@ -2786,6 +3272,12 @@ void _nc_init_wacs(void) /* ./widechar/lib_wunctrl.c */ +#undef wunctrl_sp +wchar_t *wunctrl_sp( + SCREEN *sp, + cchar_t *wc) + { return(*(wchar_t **)0); } + #undef wunctrl wchar_t *wunctrl( cchar_t *wc) @@ -2805,6 +3297,24 @@ void _nc_toggle_attr_off( attr_t at) { /* void */ } +#undef _nc_DelCharCost_sp +int _nc_DelCharCost_sp( + SCREEN *sp, + int count) + { return(*(int *)0); } + +#undef _nc_InsCharCost_sp +int _nc_InsCharCost_sp( + SCREEN *sp, + int count) + { return(*(int *)0); } + +#undef _nc_UpdateAttrs_sp +void _nc_UpdateAttrs_sp( + SCREEN *sp, + const cchar_t *c) + { /* void */ } + #undef _nc_DelCharCost int _nc_DelCharCost( int count) @@ -2817,11 +3327,17 @@ int _nc_InsCharCost( #undef _nc_UpdateAttrs void _nc_UpdateAttrs( - cchar_t c) + const cchar_t *c) { /* void */ } /* ./base/legacy_coding.c */ +#undef use_legacy_coding_sp +int use_legacy_coding_sp( + SCREEN *sp, + int level) + { return(*(int *)0); } + #undef use_legacy_coding int use_legacy_coding( int level) @@ -2829,10 +3345,22 @@ int use_legacy_coding( /* ./base/lib_dft_fgbg.c */ +#undef use_default_colors_sp +int use_default_colors_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef use_default_colors int use_default_colors(void) { return(*(int *)0); } +#undef assume_default_colors_sp +int assume_default_colors_sp( + SCREEN *sp, + int fg, + int bg) + { return(*(int *)0); } + #undef assume_default_colors int assume_default_colors( int fg, @@ -2841,6 +3369,13 @@ int assume_default_colors( /* ./tinfo/lib_print.c */ +#undef mcprint_sp +int mcprint_sp( + SCREEN *sp, + char *data, + int len) + { return(*(int *)0); } + #undef mcprint int mcprint( char *data, @@ -2849,18 +3384,39 @@ int mcprint( /* ./base/resizeterm.c */ +#undef is_term_resized_sp +NCURSES_BOOL is_term_resized_sp( + SCREEN *sp, + int ToLines, + int ToCols) + { return(*(NCURSES_BOOL *)0); } + #undef is_term_resized NCURSES_BOOL is_term_resized( int ToLines, int ToCols) { return(*(NCURSES_BOOL *)0); } +#undef resize_term_sp +int resize_term_sp( + SCREEN *sp, + int ToLines, + int ToCols) + { return(*(int *)0); } + #undef resize_term int resize_term( int ToLines, int ToCols) { return(*(int *)0); } +#undef resizeterm_sp +int resizeterm_sp( + SCREEN *sp, + int ToLines, + int ToCols) + { return(*(int *)0); } + #undef resizeterm int resizeterm( int ToLines, @@ -3143,6 +3699,11 @@ void _nc_init_keytry( #undef acs_map chtype acs_map[128]; +#undef _nc_init_acs_sp +void _nc_init_acs_sp( + SCREEN *sp) + { /* void */ } + #undef _nc_init_acs void _nc_init_acs(void) { /* void */ } @@ -3166,6 +3727,11 @@ int _nc_ospeed( int BaudRate) { return(*(int *)0); } +#undef baudrate_sp +int baudrate_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef baudrate int baudrate(void) { return(*(int *)0); } @@ -3180,6 +3746,12 @@ TERMINAL *set_curterm( TERMINAL *termp) { return(*(TERMINAL **)0); } +#undef del_curterm_sp +int del_curterm_sp( + SCREEN *sp, + TERMINAL *termp) + { return(*(int *)0); } + #undef del_curterm int del_curterm( TERMINAL *termp) @@ -3202,26 +3774,56 @@ NCURSES_GLOBALS _nc_globals; #undef _nc_prescreen NCURSES_PRESCREEN _nc_prescreen; +#undef _nc_screen_of +SCREEN *_nc_screen_of( + WINDOW *win) + { return(*(SCREEN **)0); } + /* ./tinfo/lib_has_cap.c */ +#undef has_ic_sp +NCURSES_BOOL has_ic_sp( + SCREEN *sp) + { return(*(NCURSES_BOOL *)0); } + #undef has_ic NCURSES_BOOL has_ic(void) { return(*(NCURSES_BOOL *)0); } +#undef has_il_sp +NCURSES_BOOL has_il_sp( + SCREEN *sp) + { return(*(NCURSES_BOOL *)0); } + #undef has_il NCURSES_BOOL has_il(void) { return(*(NCURSES_BOOL *)0); } /* ./tinfo/lib_kernel.c */ +#undef erasechar_sp +char erasechar_sp( + SCREEN *sp) + { return(*(char *)0); } + #undef erasechar char erasechar(void) { return(*(char *)0); } +#undef killchar_sp +char killchar_sp( + SCREEN *sp) + { return(*(char *)0); } + #undef killchar char killchar(void) { return(*(char *)0); } +#undef flushinp_sp +int flushinp_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef flushinp int flushinp(void) { return(*(int *)0); } @@ -3230,8 +3832,8 @@ int flushinp(void) struct kn { short offset; int code; }; -#undef _nc_keyname -char *_nc_keyname( +#undef keyname_sp +char *keyname_sp( SCREEN *sp, int c) { return(*(char **)0); } @@ -3251,6 +3853,12 @@ char *longname(void) #include +#undef napms_sp +int napms_sp( + SCREEN *sp, + int ms) + { return(*(int *)0); } + #undef napms int napms( int ms) @@ -3270,6 +3878,12 @@ void idcok( NCURSES_BOOL flag) { /* void */ } +#undef halfdelay_sp +int halfdelay_sp( + SCREEN *sp, + int t) + { return(*(int *)0); } + #undef halfdelay int halfdelay( int t) @@ -3305,21 +3919,52 @@ int meta( NCURSES_BOOL flag) { return(*(int *)0); } +#undef curs_set_sp +int curs_set_sp( + SCREEN *sp, + int vis) + { return(*(int *)0); } + #undef curs_set int curs_set( int vis) { return(*(int *)0); } +#undef typeahead_sp +int typeahead_sp( + SCREEN *sp, + int fd) + { return(*(int *)0); } + #undef typeahead int typeahead( int fd) { return(*(int *)0); } +#undef has_key_sp +int has_key_sp( + SCREEN *sp, + int keycode) + { return(*(int *)0); } + #undef has_key int has_key( int keycode) { return(*(int *)0); } +#undef _nc_putp_flush_sp +int _nc_putp_flush_sp( + SCREEN *sp, + const char *name, + const char *value) + { return(*(int *)0); } + +#undef _nc_putp_flush +int _nc_putp_flush( + const char *name, + const char *value) + { return(*(int *)0); } + #undef _nc_keypad int _nc_keypad( SCREEN *sp, @@ -3328,30 +3973,67 @@ int _nc_keypad( /* ./tinfo/lib_raw.c */ +#undef raw_sp +int raw_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef raw int raw(void) { return(*(int *)0); } +#undef cbreak_sp +int cbreak_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef cbreak int cbreak(void) { return(*(int *)0); } +#undef qiflush_sp +void qiflush_sp( + SCREEN *sp) + { /* void */ } + #undef qiflush void qiflush(void) { /* void */ } +#undef noraw_sp +int noraw_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef noraw int noraw(void) { return(*(int *)0); } +#undef nocbreak_sp +int nocbreak_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef nocbreak int nocbreak(void) { return(*(int *)0); } +#undef noqiflush_sp +void noqiflush_sp( + SCREEN *sp) + { /* void */ } + #undef noqiflush void noqiflush(void) { /* void */ } +#undef intrflush_sp +int intrflush_sp( + SCREEN *sp, + WINDOW *win, + NCURSES_BOOL flag) + { return(*(int *)0); } + #undef intrflush int intrflush( WINDOW *win, @@ -3373,6 +4055,12 @@ int COLS; #undef TABSIZE int TABSIZE; +#undef set_tabsize_sp +int set_tabsize_sp( + SCREEN *sp, + int value) + { return(*(int *)0); } + #undef set_tabsize int set_tabsize( int value) @@ -3383,6 +4071,12 @@ int _nc_handle_sigwinch( SCREEN *sp) { return(*(int *)0); } +#undef use_env_sp +void use_env_sp( + SCREEN *sp, + NCURSES_BOOL f) + { /* void */ } + #undef use_env void use_env( NCURSES_BOOL f) @@ -3435,8 +4129,9 @@ char *UP; #undef BC char *BC; -#undef tgetent -int tgetent( +#undef tgetent_sp +int tgetent_sp( + SCREEN *sp, char *bufp, const char *name) { return(*(int *)0); } @@ -3447,16 +4142,41 @@ int tgetent( #endif +#undef tgetent +int tgetent( + char *bufp, + const char *name) + { return(*(int *)0); } + +#undef tgetflag_sp +int tgetflag_sp( + SCREEN *sp, + char *id) + { return(*(int *)0); } + #undef tgetflag int tgetflag( char *id) { return(*(int *)0); } +#undef tgetnum_sp +int tgetnum_sp( + SCREEN *sp, + char *id) + { return(*(int *)0); } + #undef tgetnum int tgetnum( char *id) { return(*(int *)0); } +#undef tgetstr_sp +char *tgetstr_sp( + SCREEN *sp, + char *id, + char **area) + { return(*(char **)0); } + #undef tgetstr char *tgetstr( char *id, @@ -3465,6 +4185,11 @@ char *tgetstr( /* ./tinfo/lib_termname.c */ +#undef termname_sp +char *termname_sp( + SCREEN *sp) + { return(*(char **)0); } + #undef termname char *termname(void) { return(*(char **)0); } @@ -3480,16 +4205,34 @@ char *tgoto( /* ./tinfo/lib_ti.c */ +#undef tigetflag_sp +int tigetflag_sp( + SCREEN *sp, + char *str) + { return(*(int *)0); } + #undef tigetflag int tigetflag( char *str) { return(*(int *)0); } +#undef tigetnum_sp +int tigetnum_sp( + SCREEN *sp, + char *str) + { return(*(int *)0); } + #undef tigetnum int tigetnum( char *str) { return(*(int *)0); } +#undef tigetstr_sp +char *tigetstr_sp( + SCREEN *sp, + char *str) + { return(*(char **)0); } + #undef tigetstr char *tigetstr( char *str) @@ -3527,25 +4270,75 @@ void _nc_set_no_padding( SCREEN *sp) { /* void */ } +#undef delay_output_sp +int delay_output_sp( + SCREEN *sp, + int ms) + { return(*(int *)0); } + #undef delay_output int delay_output( int ms) { return(*(int *)0); } +#undef _nc_flush_sp +void _nc_flush_sp( + SCREEN *sp) + { /* void */ } + #undef _nc_flush void _nc_flush(void) { /* void */ } +#undef _nc_outch_sp +int _nc_outch_sp( + SCREEN *sp, + int ch) + { return(*(int *)0); } + #undef _nc_outch int _nc_outch( int ch) { return(*(int *)0); } +#undef putp_sp +int putp_sp( + SCREEN *sp, + const char *string) + { return(*(int *)0); } + +#undef _nc_putp_sp +int _nc_putp_sp( + SCREEN *sp, + const char *name, + const char *string) + { return(*(int *)0); } + #undef putp int putp( const char *string) { return(*(int *)0); } +#undef _nc_putp +int _nc_putp( + const char *name, + const char *string) + { return(*(int *)0); } + +#undef tputs_sp +int tputs_sp( + SCREEN *sp, + const char *string, + int affcnt, + NCURSES_OUTC_sp outc) + { return(*(int *)0); } + +#undef _nc_outc_wrapper +int _nc_outc_wrapper( + SCREEN *sp, + int c) + { return(*(int *)0); } + #undef tputs int tputs( const char *string, @@ -3701,36 +4494,78 @@ char *_tracechar( /* ./tinfo/lib_ttyflags.c */ +#undef _nc_get_tty_mode_sp +int _nc_get_tty_mode_sp( + SCREEN *sp, + struct termios *buf) + { return(*(int *)0); } + #undef _nc_get_tty_mode int _nc_get_tty_mode( struct termios *buf) { return(*(int *)0); } +#undef _nc_set_tty_mode_sp +int _nc_set_tty_mode_sp( + SCREEN *sp, + struct termios *buf) + { return(*(int *)0); } + #undef _nc_set_tty_mode int _nc_set_tty_mode( struct termios *buf) { return(*(int *)0); } +#undef def_shell_mode_sp +int def_shell_mode_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef def_shell_mode int def_shell_mode(void) { return(*(int *)0); } +#undef def_prog_mode_sp +int def_prog_mode_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef def_prog_mode int def_prog_mode(void) { return(*(int *)0); } +#undef reset_prog_mode_sp +int reset_prog_mode_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef reset_prog_mode int reset_prog_mode(void) { return(*(int *)0); } +#undef reset_shell_mode_sp +int reset_shell_mode_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef reset_shell_mode int reset_shell_mode(void) { return(*(int *)0); } +#undef savetty_sp +int savetty_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef savetty int savetty(void) { return(*(int *)0); } +#undef resetty_sp +int resetty_sp( + SCREEN *sp) + { return(*(int *)0); } + #undef resetty int resetty(void) { return(*(int *)0); } @@ -3810,6 +4645,13 @@ int _nc_read_termcap_entry( /* ./tinfo/setbuf.c */ +#undef _nc_set_buffer_sp +void _nc_set_buffer_sp( + SCREEN *sp, + FILE *ofp, + NCURSES_BOOL buffered) + { /* void */ } + #undef _nc_set_buffer void _nc_set_buffer( FILE *ofp, @@ -3901,8 +4743,8 @@ char *_nc_trim_sgr0( /* ./unctrl.c */ -#undef _nc_unctrl -char *_nc_unctrl( +#undef unctrl_sp +char *unctrl_sp( SCREEN *sp, chtype ch) { return(*(char **)0); } @@ -4173,6 +5015,13 @@ int _nc_tic_written(void) /* ./base/define_key.c */ +#undef define_key_sp +int define_key_sp( + SCREEN *sp, + const char *str, + int keycode) + { return(*(int *)0); } + #undef define_key int define_key( const char *str, @@ -4187,6 +5036,12 @@ void _nc_hashed_db(void) /* ./base/key_defined.c */ +#undef key_defined_sp +int key_defined_sp( + SCREEN *sp, + const char *str) + { return(*(int *)0); } + #undef key_defined int key_defined( const char *str) @@ -4194,6 +5049,13 @@ int key_defined( /* ./base/keybound.c */ +#undef keybound_sp +char *keybound_sp( + SCREEN *sp, + int code, + int count) + { return(*(char **)0); } + #undef keybound char *keybound( int code, @@ -4202,6 +5064,13 @@ char *keybound( /* ./base/keyok.c */ +#undef keyok_sp +int keyok_sp( + SCREEN *sp, + int c, + NCURSES_BOOL flag) + { return(*(int *)0); } + #undef keyok int keyok( int c, diff --git a/ncurses/tinfo/tinfo_driver.c b/ncurses/tinfo/tinfo_driver.c new file mode 100644 index 00000000..d2df9911 --- /dev/null +++ b/ncurses/tinfo/tinfo_driver.c @@ -0,0 +1,1389 @@ +/**************************************************************************** + * Copyright (c) 2008,2009 Free Software Foundation, Inc. * + * * + * Permission is hereby granted, free of charge, to any person obtaining a * + * copy of this software and associated documentation files (the * + * "Software"), to deal in the Software without restriction, including * + * without limitation the rights to use, copy, modify, merge, publish, * + * distribute, distribute with modifications, sublicense, and/or sell * + * copies of the Software, and to permit persons to whom the Software is * + * furnished to do so, subject to the following conditions: * + * * + * The above copyright notice and this permission notice shall be included * + * in all copies or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Juergen Pfeifer * + * * + ****************************************************************************/ + +#include +#define CUR ((TERMINAL*)TCB)->type. +#include + +#if HAVE_NANOSLEEP +#include +#if HAVE_SYS_TIME_H +#include /* needed for MacOS X DP3 */ +#endif +#endif + +MODULE_ID("$Id: tinfo_driver.c,v 1.1 2009/05/23 22:40:30 juergen Exp $") + +/* + * SCO defines TIOCGSIZE and the corresponding struct. Other systems (SunOS, + * Solaris, IRIX) define TIOCGWINSZ and struct winsize. + */ +#ifdef TIOCGSIZE +# define IOCTL_WINSIZE TIOCGSIZE +# define STRUCT_WINSIZE struct ttysize +# define WINSIZE_ROWS(n) (int)n.ts_lines +# define WINSIZE_COLS(n) (int)n.ts_cols +#else +# ifdef TIOCGWINSZ +# define IOCTL_WINSIZE TIOCGWINSZ +# define STRUCT_WINSIZE struct winsize +# define WINSIZE_ROWS(n) (int)n.ws_row +# define WINSIZE_COLS(n) (int)n.ws_col +# endif +#endif + +/* + * These should be screen structure members. They need to be globals for + * historical reasons. So we assign them in start_color() and also in + * set_term()'s screen-switching logic. + */ +#if USE_REENTRANT +NCURSES_EXPORT(int) +NCURSES_PUBLIC_VAR(COLOR_PAIRS) (void) +{ + return CURRENT_SCREEN ? CURRENT_SCREEN->_pair_count : -1; +} +NCURSES_EXPORT(int) +NCURSES_PUBLIC_VAR(COLORS) (void) +{ + return CURRENT_SCREEN ? CURRENT_SCREEN->_color_count : -1; +} +#else +NCURSES_EXPORT_VAR(int) COLOR_PAIRS = 0; +NCURSES_EXPORT_VAR(int) COLORS = 0; +#endif + +static bool drv_CanHandle(TERMINAL_CONTROL_BLOCK * TCB, const char *tname, int *); +static void drv_init(TERMINAL_CONTROL_BLOCK *); +static void drv_release(TERMINAL_CONTROL_BLOCK *); +static int drv_size(TERMINAL_CONTROL_BLOCK *, int *, int *); +static int drv_sgmode(TERMINAL_CONTROL_BLOCK * TCB, bool setFlag, TTY * buf); +static chtype drv_conattr(TERMINAL_CONTROL_BLOCK * TCB); +static int drv_mvcur(TERMINAL_CONTROL_BLOCK * TCB, int yold, int xold, int + ynew, int xnew); +static int drv_mode(TERMINAL_CONTROL_BLOCK * TCB, bool progFlag, bool defFlag); +static bool drv_rescol(TERMINAL_CONTROL_BLOCK * TCB); +static bool drv_rescolors(TERMINAL_CONTROL_BLOCK * TCB); +static void drv_setcolor(TERMINAL_CONTROL_BLOCK * TCB, bool fore, int color, int + (*outc) (SCREEN *, int)); +static int drv_dobeepflash(TERMINAL_CONTROL_BLOCK * TCB, bool beepFlag); +static void drv_initpair(TERMINAL_CONTROL_BLOCK * TCB, short pair, short f, short b); +static void drv_initcolor(TERMINAL_CONTROL_BLOCK * TCB, short color, short + r, short g, short b); +static void drv_do_color(TERMINAL_CONTROL_BLOCK * TCB, short old_pair, short + pair, bool reverse, + int (*outc) (SCREEN *, int)); +static void drv_initmouse(TERMINAL_CONTROL_BLOCK * TCB); +static void drv_setfilter(TERMINAL_CONTROL_BLOCK * TCB); +static void drv_hwlabel(TERMINAL_CONTROL_BLOCK * TCB, int labnum, char *text); +static void drv_hwlabelOnOff(TERMINAL_CONTROL_BLOCK * TCB, bool OnFlag); +static int drv_doupdate(TERMINAL_CONTROL_BLOCK * TCB); +static int drv_defaultcolors(TERMINAL_CONTROL_BLOCK * TCB, int fg, int bg); +static int drv_print(TERMINAL_CONTROL_BLOCK * TCB, char *data, int len); +static int drv_getsize(TERMINAL_CONTROL_BLOCK *, int *, int *); +static int drv_setsize(TERMINAL_CONTROL_BLOCK * TCB, int l, int c); +static void drv_initacs(TERMINAL_CONTROL_BLOCK * TCB, chtype *, chtype *); +static void drv_wrap(SCREEN *); +static void drv_screen_init(SCREEN *); +static int drv_twait(TERMINAL_CONTROL_BLOCK *, int, int, int + *EVENTLIST_2nd(_nc_eventlist + *)); +static int drv_read(TERMINAL_CONTROL_BLOCK * TCB, int *buf); +static int drv_nap(TERMINAL_CONTROL_BLOCK * TCB GCC_UNUSED, int ms); +static int drv_kpad(TERMINAL_CONTROL_BLOCK * TCB, bool); +static int drv_keyok(TERMINAL_CONTROL_BLOCK * TCB, int, bool); +static bool drv_kyExist(TERMINAL_CONTROL_BLOCK * TCB, int); + +NCURSES_EXPORT_VAR (TERM_DRIVER) _nc_TINFO_DRIVER = { + TRUE, + drv_CanHandle, /* CanHandle */ + drv_init, /* init */ + drv_release, /* release */ + drv_size, /* size */ + drv_sgmode, /* sgmode */ + drv_conattr, /* conattr */ + drv_mvcur, /* hwcur */ + drv_mode, /* mode */ + drv_rescol, /* rescol */ + drv_rescolors, /* rescolors */ + drv_setcolor, /* color */ + drv_dobeepflash, /* doBeepOrFlash */ + drv_initpair, /* initpair */ + drv_initcolor, /* initcolor */ + drv_do_color, /* docolor */ + drv_initmouse, /* initmouse */ + drv_setfilter, /* setfilter */ + drv_hwlabel, /* hwlabel */ + drv_hwlabelOnOff, /* hwlabelOnOff */ + drv_doupdate, /* update */ + drv_defaultcolors, /* defaultcolors */ + drv_print, /* print */ + drv_getsize, /* getsize */ + drv_setsize, /* setsize */ + drv_initacs, /* initacs */ + drv_screen_init, /* scinit */ + drv_wrap, /* scexit */ + drv_twait, /* twait */ + drv_read, /* read */ + drv_nap, /* nap */ + drv_kpad, /* kpad */ + drv_keyok, /* kyOk */ + drv_kyExist /* kyExist */ +}; + +#define TCBMAGIC NCDRV_MAGIC(NCDRV_TINFO) +#define AssertTCB() assert(TCB!=0 && TCB->magic==TCBMAGIC) +#define SetSP() assert(TCB->csp!=0); sp = TCB->csp + +/* + * This routine needs to do all the work to make curscr look + * like newscr. + */ +static int +drv_doupdate(TERMINAL_CONTROL_BLOCK * TCB) +{ + AssertTCB(); + return _nc_tinfo_doupdate(TCB->csp); +} + +/* +** do_prototype() +** +** Take the real command character out of the CC environment variable +** and substitute it in for the prototype given in 'command_character'. +*/ +static void +do_prototype(TERMINAL * termp) +{ + unsigned i; + char CC; + char proto; + char *tmp; + TERMINAL_CONTROL_BLOCK *TCB = (TERMINAL_CONTROL_BLOCK *) termp; + + if ((tmp = getenv("CC")) != 0) { + if ((CC = *tmp) != 0) { + proto = *command_character; + + for_each_string(i, &(termp->type)) { + for (tmp = termp->type.Strings[i]; *tmp; tmp++) { + if (*tmp == proto) + *tmp = CC; + } + } + } + } +} + +#define ret_error(code, fmt, arg) if (errret) {\ + *errret = code;\ + return(FALSE); \ + } else {\ + fprintf(stderr, fmt, arg);\ + exit(EXIT_FAILURE);\ + } + +#define ret_error0(code, msg) if (errret) {\ + *errret = code;\ + return(FALSE);\ + } else {\ + fprintf(stderr, msg);\ + exit(EXIT_FAILURE);\ + } + +#if USE_DATABASE || USE_TERMCAP +/* + * Return 1 if entry found, 0 if not found, -1 if database not accessible, + * just like tgetent(). + */ +static int +grab_entry(const char *const tn, TERMTYPE *const tp) +{ + char filename[PATH_MAX]; + int status = _nc_read_entry(tn, filename, tp); + + /* + * If we have an entry, force all of the cancelled strings to null + * pointers so we don't have to test them in the rest of the library. + * (The terminfo compiler bypasses this logic, since it must know if + * a string is cancelled, for merging entries). + */ + if (status == TGETENT_YES) { + unsigned n; + for_each_boolean(n, tp) { + if (!VALID_BOOLEAN(tp->Booleans[n])) + tp->Booleans[n] = FALSE; + } + for_each_string(n, tp) { + if (tp->Strings[n] == CANCELLED_STRING) + tp->Strings[n] = ABSENT_STRING; + } + } + return (status); +} +#endif + +static bool +drv_CanHandle(TERMINAL_CONTROL_BLOCK * TCB, const char *tname, int *errret) +{ + bool result = FALSE; + int status; + TERMINAL *termp; + SCREEN *sp; + + assert(TCB != 0 && tname != 0); + termp = (TERMINAL *) TCB; + sp = TCB->csp; + TCB->magic = TCBMAGIC; + +#if (USE_DATABASE || USE_TERMCAP) + status = grab_entry(tname, &termp->type); +#else + status = TGETENT_NO; +#endif + + /* try fallback list if entry on disk */ + if (status != TGETENT_YES) { + const TERMTYPE *fallback = _nc_fallback(tname); + + if (fallback) { + termp->type = *fallback; + status = TGETENT_YES; + } + } + + if (status != TGETENT_YES) { + NCURSES_SP_NAME(del_curterm) (NCURSES_SP_ARGx termp); + if (status == TGETENT_ERR) { + ret_error0(status, "terminals database is inaccessible\n"); + } else if (status == TGETENT_NO) { + ret_error(status, "'%s': unknown terminal type.\n", tname); + } + } + result = TRUE; +#if !USE_REENTRANT + strncpy(ttytype, termp->type.term_names, NAMESIZE - 1); + ttytype[NAMESIZE - 1] = '\0'; +#endif + + if (command_character && getenv("CC")) + do_prototype(termp); + + if (generic_type) { + ret_error(TGETENT_NO, "'%s': I need something more specific.\n", tname); + } + if (hard_copy) { + ret_error(TGETENT_YES, "'%s': I can't handle hardcopy terminals.\n", tname); + } + + return result; +} + +static int +drv_dobeepflash(TERMINAL_CONTROL_BLOCK * TCB, bool beepFlag) +{ + SCREEN *sp; + int res = ERR; + + AssertTCB(); + SetSP(); + + /* FIXME: should make sure that we are not in altchar mode */ + if (beepFlag) { + if (bell) { + res = NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx "bell", bell); + NCURSES_SP_NAME(_nc_flush) (sp); + } else if (flash_screen) { + res = NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx + "flash_screen", + flash_screen); + NCURSES_SP_NAME(_nc_flush) (sp); + } + } else { + if (flash_screen) { + res = NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx + "flash_screen", + flash_screen); + NCURSES_SP_NAME(_nc_flush) (sp); + } else if (bell) { + res = NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx "bell", bell); + NCURSES_SP_NAME(_nc_flush) (sp); + } + } + return res; +} + +/* + * SVr4 curses is known to interchange color codes (1,4) and (3,6), possibly + * to maintain compatibility with a pre-ANSI scheme. The same scheme is + * also used in the FreeBSD syscons. + */ +static int +toggled_colors(int c) +{ + if (c < 16) { + static const int table[] = + {0, 4, 2, 6, 1, 5, 3, 7, + 8, 12, 10, 14, 9, 13, 11, 15}; + c = table[c]; + } + return c; +} + +static int +drv_print(TERMINAL_CONTROL_BLOCK * TCB, char *data, int len) +{ + SCREEN *sp; + + AssertTCB(); + SetSP(); +#if NCURSES_EXT_FUNCS + return NCURSES_SP_NAME(mcprint) (TCB->csp, data, len); +#else + return ERR; +#endif +} + +static int +drv_defaultcolors(TERMINAL_CONTROL_BLOCK * TCB, int fg, int bg) +{ + SCREEN *sp; + int code = ERR; + + AssertTCB(); + SetSP(); + + if (sp != 0 && orig_pair && orig_colors && (initialize_pair != 0)) { +#if NCURSES_EXT_FUNCS + sp->_default_color = isDefaultColor(fg) || isDefaultColor(bg); + sp->_has_sgr_39_49 = (NCURSES_SP_NAME(tigetflag) (NCURSES_SP_ARGx + "AX") + == TRUE); + sp->_default_fg = isDefaultColor(fg) ? COLOR_DEFAULT : (fg & C_MASK); + sp->_default_bg = isDefaultColor(bg) ? COLOR_DEFAULT : (bg & C_MASK); + if (sp->_color_pairs != 0) { + bool save = sp->_default_color; + sp->_default_color = TRUE; + NCURSES_SP_NAME(init_pair) (NCURSES_SP_ARGx + 0, + (short)fg, + (short)bg); + sp->_default_color = save; + } +#endif + code = OK; + } + return (code); +} + +static void +drv_setcolor(TERMINAL_CONTROL_BLOCK * TCB, bool fore, int color, int (*outc) + (SCREEN *, int)) +{ + SCREEN *sp; + + AssertTCB(); + SetSP(); + + if (fore) { + if (set_a_foreground) { + TPUTS_TRACE("set_a_foreground"); + NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx + TPARM_1(set_a_foreground, color), 1, outc); + } else { + TPUTS_TRACE("set_foreground"); + NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx + TPARM_1(set_foreground, + toggled_colors(color)), 1, outc); + } + } else { + if (set_a_background) { + TPUTS_TRACE("set_a_background"); + NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx + TPARM_1(set_a_background, color), 1, outc); + } else { + TPUTS_TRACE("set_background"); + NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx + TPARM_1(set_background, + toggled_colors(color)), 1, outc); + } + } +} + +static bool +drv_rescol(TERMINAL_CONTROL_BLOCK * TCB) +{ + bool result = FALSE; + SCREEN *sp; + + AssertTCB(); + SetSP(); + + if (orig_pair != 0) { + NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx "orig_pair", orig_pair); + result = TRUE; + } + return result; +} + +static bool +drv_rescolors(TERMINAL_CONTROL_BLOCK * TCB) +{ + int result = FALSE; + SCREEN *sp; + + AssertTCB(); + SetSP(); + + if (orig_colors != 0) { + NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx "orig_colors", orig_colors); + result = TRUE; + } + return result; +} + +static int +drv_size(TERMINAL_CONTROL_BLOCK * TCB, int *linep, int *colp) +{ + SCREEN *sp; + bool useEnv = TRUE; + + AssertTCB(); + sp = TCB->csp; /* can be null here */ + + if (sp) { + useEnv = sp->_use_env; + } else + useEnv = _nc_prescreen.use_env; + + /* figure out the size of the screen */ + T(("screen size: terminfo lines = %d columns = %d", lines, columns)); + + if (!useEnv) { + *linep = (int) lines; + *colp = (int) columns; + } else { /* usually want to query LINES and COLUMNS from environment */ + int value; + + *linep = *colp = 0; + + /* first, look for environment variables */ + if ((value = _nc_getenv_num("LINES")) > 0) { + *linep = value; + } + if ((value = _nc_getenv_num("COLUMNS")) > 0) { + *colp = value; + } + T(("screen size: environment LINES = %d COLUMNS = %d", *linep, *colp)); + +#ifdef __EMX__ + if (*linep <= 0 || *colp <= 0) { + int screendata[2]; + _scrsize(screendata); + *colp = screendata[0]; + *linep = screendata[1]; + T(("EMX screen size: environment LINES = %d COLUMNS = %d", + *linep, *colp)); + } +#endif +#if HAVE_SIZECHANGE + /* if that didn't work, maybe we can try asking the OS */ + if (*linep <= 0 || *colp <= 0) { + TERMINAL *termp = (TERMINAL *) TCB; + if (isatty(termp->Filedes)) { + STRUCT_WINSIZE size; + + errno = 0; + do { + if (ioctl(termp->Filedes, IOCTL_WINSIZE, &size) < 0 + && errno != EINTR) + goto failure; + } while + (errno == EINTR); + + /* + * Solaris lets users override either dimension with an + * environment variable. + */ + if (*linep <= 0) + *linep = (sp != 0 && sp->_filtered) ? 1 : WINSIZE_ROWS(size); + if (*colp <= 0) + *colp = WINSIZE_COLS(size); + } + /* FALLTHRU */ + failure:; + } +#endif /* HAVE_SIZECHANGE */ + + /* if we can't get dynamic info about the size, use static */ + if (*linep <= 0) { + *linep = (int) lines; + } + if (*colp <= 0) { + *colp = (int) columns; + } + + /* the ultimate fallback, assume fixed 24x80 size */ + if (*linep <= 0) { + *linep = 24; + } + if (*colp <= 0) { + *colp = 80; + } + + /* + * Put the derived values back in the screen-size caps, so + * tigetnum() and tgetnum() will do the right thing. + */ + lines = (short) (*linep); + columns = (short) (*colp); + } + + T(("screen size is %dx%d", *linep, *colp)); + return OK; +} + +static int +drv_getsize(TERMINAL_CONTROL_BLOCK * TCB, int *l, int *c) +{ + AssertTCB(); + assert(l != 0 && c != 0); + *l = lines; + *c = columns; + return OK; +} + +static int +drv_setsize(TERMINAL_CONTROL_BLOCK * TCB, int l, int c) +{ + AssertTCB(); + lines = l; + columns = c; + return OK; +} + +static int +drv_mode(TERMINAL_CONTROL_BLOCK * TCB, bool progFlag, bool defFlag) +{ + SCREEN *sp; + TERMINAL *_term = (TERMINAL *) TCB; + int code = ERR; + + AssertTCB(); + sp = TCB->csp; + + if (progFlag) /* prog mode */ + { + if (defFlag) { + /* def_prog_mode */ + /* + * Turn off the XTABS bit in the tty structure if it was on. + */ + if ((drv_sgmode(TCB, FALSE, &(_term->Nttyb)) == OK)) { +#ifdef TERMIOS + _term->Nttyb.c_oflag &= ~OFLAGS_TABS; +#else + _term->Nttyb.sg_flags &= ~XTABS; +#endif + code = OK; + } + } else { + /* reset_prog_mode */ + if (drv_sgmode(TCB, TRUE, &(_term->Nttyb)) == OK) { + if (sp) { + if (sp->_keypad_on) + _nc_keypad(sp, TRUE); + NC_BUFFERED(sp, TRUE); + } + code = OK; + } + } + } else { /* shell mode */ + if (defFlag) { + /* def_shell_mode */ + /* + * If XTABS was on, remove the tab and backtab capabilities. + */ + if (drv_sgmode(TCB, FALSE, &(_term->Ottyb)) == OK) { +#ifdef TERMIOS + if (_term->Ottyb.c_oflag & OFLAGS_TABS) + tab = back_tab = NULL; +#else + if (_term->Ottyb.sg_flags & XTABS) + tab = back_tab = NULL; +#endif + code = OK; + } + } else { + /* reset_shell_mode */ + if (sp) { + _nc_keypad(sp, FALSE); + NCURSES_SP_NAME(_nc_flush) (sp); + NC_BUFFERED(sp, FALSE); + } + code = drv_sgmode(TCB, TRUE, &(_term->Ottyb)); + } + } + return (code); +} + +static void +drv_wrap(SCREEN *sp) +{ + if (sp) { + sp->_mouse_wrap(sp); + NCURSES_SP_NAME(_nc_screen_wrap) (sp); + NCURSES_SP_NAME(_nc_mvcur_wrap) (sp); /* wrap up cursor addressing */ + } +} + +static void +drv_release(TERMINAL_CONTROL_BLOCK * TCB GCC_UNUSED) +{ +} + +# define SGR0_TEST(mode) (mode != 0) && (exit_attribute_mode == 0 || strcmp(mode, exit_attribute_mode)) + +void +drv_screen_init(SCREEN *sp) +{ + TERMINAL_CONTROL_BLOCK *TCB = TCBOf(sp); + + AssertTCB(); + + /* + * Check for mismatched graphic-rendition capabilities. Most SVr4 + * terminfo trees contain entries that have rmul or rmso equated to + * sgr0 (Solaris curses copes with those entries). We do this only + * for curses, since many termcap applications assume that + * smso/rmso and smul/rmul are paired, and will not function + * properly if we remove rmso or rmul. Curses applications + * shouldn't be looking at this detail. + */ + sp->_use_rmso = SGR0_TEST(exit_standout_mode); + sp->_use_rmul = SGR0_TEST(exit_underline_mode); + + /* + * Check whether we can optimize scrolling under dumb terminals in + * case we do not have any of these capabilities, scrolling + * optimization will be useless. + */ + sp->_scrolling = ((scroll_forward && scroll_reverse) || + ((parm_rindex || + parm_insert_line || + insert_line) && + (parm_index || + parm_delete_line || + delete_line))); + + NCURSES_SP_NAME(baudrate) (sp); + + NCURSES_SP_NAME(_nc_mvcur_init) (sp); + /* initialize terminal to a sane state */ + NCURSES_SP_NAME(_nc_screen_init) (sp); +} + +static void +drv_init(TERMINAL_CONTROL_BLOCK * TCB) +{ + SCREEN *sp; + TERMINAL *trm; + + AssertTCB(); + + trm = (TERMINAL *) TCB; + sp = TCB->csp; + + TCB->info.initcolor = initialize_color; + TCB->info.canchange = can_change; + TCB->info.hascolor = ((VALID_NUMERIC(max_colors) && VALID_NUMERIC(max_pairs) + && (((set_foreground != NULL) + && (set_background != NULL)) + || ((set_a_foreground != NULL) + && (set_a_background != NULL)) + || set_color_pair)) ? TRUE : FALSE); + + TCB->info.caninit = !(exit_ca_mode && non_rev_rmcup); + + TCB->info.maxpairs = VALID_NUMERIC(max_pairs) ? max_pairs : 0; + TCB->info.maxcolors = VALID_NUMERIC(max_colors) ? max_colors : 0; + TCB->info.numlabels = VALID_NUMERIC(num_labels) ? num_labels : 0; + TCB->info.labelwidth = VALID_NUMERIC(label_width) ? label_width : 0; + TCB->info.labelheight = VALID_NUMERIC(label_height) ? label_height : 0; + TCB->info.nocolorvideo = VALID_NUMERIC(no_color_video) ? no_color_video + : 0; + TCB->info.tabsize = VALID_NUMERIC(init_tabs) ? (int) init_tabs : 8; + + TCB->info.defaultPalette = hue_lightness_saturation ? _nc_hls_palette : _nc_cga_palette; + + /* + * If an application calls setupterm() rather than initscr() or + * newterm(), we will not have the def_prog_mode() call in + * _nc_setupscreen(). Do it now anyway, so we can initialize the + * baudrate. + */ + if (isatty(trm->Filedes)) { + TCB->drv->mode(TCB, TRUE, TRUE); + } +} + +#define MAX_PALETTE 8 +#define InPalette(n) ((n) >= 0 && (n) < MAX_PALETTE) + +static void +drv_initpair(TERMINAL_CONTROL_BLOCK * TCB, short pair, short f, short b) +{ + SCREEN *sp; + + AssertTCB(); + SetSP(); + + if ((initialize_pair != NULL) && InPalette(f) && InPalette(b)) { + const color_t *tp = InfoOf(sp).defaultPalette; + + TR(TRACE_ATTRS, + ("initializing pair: pair = %d, fg=(%d,%d,%d), bg=(%d,%d,%d)", + pair, + tp[f].red, tp[f].green, tp[f].blue, + tp[b].red, tp[b].green, tp[b].blue)); + + NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx + "initialize_pair", + TPARM_7(initialize_pair, + pair, + tp[f].red, tp[f].green, tp[f].blue, + tp[b].red, tp[b].green, tp[b].blue)); + } +} + +static int +default_fg(SCREEN *sp) +{ +#if NCURSES_EXT_FUNCS + return (sp != 0) ? sp->_default_fg : COLOR_WHITE; +#else + return COLOR_WHITE; +#endif +} + +static int +default_bg(SCREEN *sp) +{ +#if NCURSES_EXT_FUNCS + return sp != 0 ? sp->_default_bg : COLOR_BLACK; +#else + return COLOR_BLACK; +#endif +} + +static void +drv_initcolor(TERMINAL_CONTROL_BLOCK * TCB, + short color, short r, short g, short b) +{ + SCREEN *sp = TCB->csp; + + AssertTCB(); + if (initialize_color != NULL) { + NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx + "initialize_color", + TPARM_4(initialize_color, color, r, g, b)); + } +} + +static void +drv_do_color(TERMINAL_CONTROL_BLOCK * TCB, + short old_pair, + short pair, + bool reverse, + NCURSES_SP_OUTC outc) +{ + SCREEN *sp = TCB->csp; + NCURSES_COLOR_T fg = COLOR_DEFAULT; + NCURSES_COLOR_T bg = COLOR_DEFAULT; + NCURSES_COLOR_T old_fg, old_bg; + + AssertTCB(); + if (sp == 0) + return; + + if (pair < 0 || pair >= COLOR_PAIRS) { + return; + } else if (pair != 0) { + if (set_color_pair) { + TPUTS_TRACE("set_color_pair"); + NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx + TPARM_1(set_color_pair, pair), 1, outc); + return; + } else if (sp != 0) { + NCURSES_SP_NAME(pair_content) (NCURSES_SP_ARGx + (short) pair, + &fg, + &bg); + } + } + + if (old_pair >= 0 + && sp != 0 + && NCURSES_SP_NAME(pair_content) (NCURSES_SP_ARGx + old_pair, + &old_fg, + &old_bg) !=ERR) { + if ((isDefaultColor(fg) && !isDefaultColor(old_fg)) + || (isDefaultColor(bg) && !isDefaultColor(old_bg))) { +#if NCURSES_EXT_FUNCS + /* + * A minor optimization - but extension. If "AX" is specified in + * the terminal description, treat it as screen's indicator of ECMA + * SGR 39 and SGR 49, and assume the two sequences are independent. + */ + if (sp->_has_sgr_39_49 + && isDefaultColor(old_bg) + && !isDefaultColor(old_fg)) { + NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx "\033[39m", 1, outc); + } else if (sp->_has_sgr_39_49 + && isDefaultColor(old_fg) + && !isDefaultColor(old_bg)) { + NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx "\033[49m", 1, outc); + } else +#endif + drv_rescol(TCB); + } + } else { + drv_rescol(TCB); + if (old_pair < 0) + return; + } + +#if NCURSES_EXT_FUNCS + if (isDefaultColor(fg)) + fg = default_fg(sp); + if (isDefaultColor(bg)) + bg = default_bg(sp); +#endif + + if (reverse) { + NCURSES_COLOR_T xx = fg; + fg = bg; + bg = xx; + } + + TR(TRACE_ATTRS, ("setting colors: pair = %d, fg = %d, bg = %d", pair, + fg, bg)); + + if (!isDefaultColor(fg)) { + drv_setcolor(TCB, TRUE, fg, outc); + } + if (!isDefaultColor(bg)) { + drv_setcolor(TCB, FALSE, bg, outc); + } +} + +#define xterm_kmous "\033[M" +static void +init_xterm_mouse(SCREEN *sp) +{ + sp->_mouse_type = M_XTERM; + sp->_mouse_xtermcap = NCURSES_SP_NAME(tigetstr) (NCURSES_SP_ARGx "XM"); + if (!VALID_STRING(sp->_mouse_xtermcap)) + sp->_mouse_xtermcap = "\033[?1000%?%p1%{1}%=%th%el%;"; +} + +static void +drv_initmouse(TERMINAL_CONTROL_BLOCK * TCB) +{ + SCREEN *sp; + + AssertTCB(); + SetSP(); + + /* we know how to recognize mouse events under "xterm" */ + if (sp != 0) { + if (key_mouse != 0) { + if (!strcmp(key_mouse, xterm_kmous) + || strstr(TerminalOf(sp)->type.term_names, "xterm") != 0) { + init_xterm_mouse(sp); + } + } else if (strstr(TerminalOf(sp)->type.term_names, "xterm") != 0) { + if (_nc_add_to_try(&(sp->_keytry), xterm_kmous, KEY_MOUSE) == OK) + init_xterm_mouse(sp); + } + } +} + +static int +drv_mvcur(TERMINAL_CONTROL_BLOCK * TCB, int yold, int xold, int ynew, int xnew) +{ + SCREEN *sp = TCB->csp; + AssertTCB(); + return _nc_tinfo_mvcur(sp, yold, xold, ynew, xnew); +} + +static void +drv_hwlabel(TERMINAL_CONTROL_BLOCK * TCB, int labnum, char *text) +{ + SCREEN *sp = TCB->csp; + + AssertTCB(); + if (labnum > 0 && labnum <= num_labels) { + NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx + "plab_norm", + TPARM_2(plab_norm, labnum, text)); + } +} + +static void +drv_hwlabelOnOff(TERMINAL_CONTROL_BLOCK * TCB, bool OnFlag) +{ + SCREEN *sp = TCB->csp; + + AssertTCB(); + if (OnFlag) { + NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx "label_on", label_on); + } else { + NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx "label_off", label_off); + } +} + +static chtype +drv_conattr(TERMINAL_CONTROL_BLOCK * TCB) +{ + SCREEN *sp = TCB->csp; + chtype attrs = A_NORMAL; + + AssertTCB(); + if (enter_alt_charset_mode) + attrs |= A_ALTCHARSET; + + if (enter_blink_mode) + attrs |= A_BLINK; + + if (enter_bold_mode) + attrs |= A_BOLD; + + if (enter_dim_mode) + attrs |= A_DIM; + + if (enter_reverse_mode) + attrs |= A_REVERSE; + + if (enter_standout_mode) + attrs |= A_STANDOUT; + + if (enter_protected_mode) + attrs |= A_PROTECT; + + if (enter_secure_mode) + attrs |= A_INVIS; + + if (enter_underline_mode) + attrs |= A_UNDERLINE; + + if (sp && sp->_coloron) + attrs |= A_COLOR; + + return (attrs); +} + +static void +drv_setfilter(TERMINAL_CONTROL_BLOCK * TCB) +{ + AssertTCB(); + + clear_screen = 0; + cursor_down = parm_down_cursor = 0; + cursor_address = 0; + cursor_up = parm_up_cursor = 0; + row_address = 0; + cursor_home = carriage_return; +} + +static int +drv_sgmode(TERMINAL_CONTROL_BLOCK * TCB, bool setFlag, TTY * buf) +{ + SCREEN *sp = TCB->csp; + TERMINAL *_term = (TERMINAL *) TCB; + int result = OK; + + AssertTCB(); + if (setFlag) { + for (;;) { + if (SET_TTY(_term->Filedes, buf) != 0) { + if (errno == EINTR) + continue; + if (errno == ENOTTY) { + if (sp) + sp->_notty = TRUE; + } + result = ERR; + } + break; + } + } else { + for (;;) { + if (GET_TTY(_term->Filedes, buf) != 0) { + if (errno == EINTR) + continue; + result = ERR; + } + break; + } + } + return result; +} + +static void +drv_initacs(TERMINAL_CONTROL_BLOCK * TCB, chtype *real_map, chtype *fake_map) +{ + SCREEN *sp = TCB->csp; + + AssertTCB(); + assert(sp != 0); + if (ena_acs != NULL) { + NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx "ena_acs", ena_acs); + } +#if NCURSES_EXT_FUNCS + /* + * Linux console "supports" the "PC ROM" character set by the coincidence + * that smpch/rmpch and smacs/rmacs have the same values. ncurses has + * no codepage support (see SCO Merge for an example). Outside of the + * values defined in acsc, there are no definitions for the "PC ROM" + * character set (assumed by some applications to be codepage 437), but we + * allow those applications to use those codepoints. + * + * test/blue.c uses this feature. + */ +#define PCH_KLUDGE(a,b) (a != 0 && b != 0 && !strcmp(a,b)) + if (PCH_KLUDGE(enter_pc_charset_mode, enter_alt_charset_mode) && + PCH_KLUDGE(exit_pc_charset_mode, exit_alt_charset_mode)) { + size_t i; + for (i = 1; i < ACS_LEN; ++i) { + if (real_map[i] == 0) { + real_map[i] = i; + if (real_map != fake_map) { + if (sp != 0) + sp->_screen_acs_map[i] = TRUE; + } + } + } + } +#endif + + if (acs_chars != NULL) { + size_t i = 0; + size_t length = strlen(acs_chars); + + while (i + 1 < length) { + if (acs_chars[i] != 0 && UChar(acs_chars[i]) < ACS_LEN) { + real_map[UChar(acs_chars[i])] = UChar(acs_chars[i + 1]) | A_ALTCHARSET; + if (sp != 0) + sp->_screen_acs_map[UChar(acs_chars[i])] = TRUE; + } + i += 2; + } + } +#ifdef TRACE + /* Show the equivalent mapping, noting if it does not match the + * given attribute, whether by re-ordering or duplication. + */ + if (USE_TRACEF(TRACE_CALLS)) { + size_t n, m; + char show[ACS_LEN * 2 + 1]; + for (n = 1, m = 0; n < ACS_LEN; n++) { + if (real_map[n] != 0) { + show[m++] = (char) n; + show[m++] = (char) ChCharOf(real_map[n]); + } + } + show[m] = 0; + if (acs_chars == NULL || strcmp(acs_chars, show)) + _tracef("%s acs_chars %s", + (acs_chars == NULL) ? "NULL" : "READ", + _nc_visbuf(acs_chars)); + _tracef("%s acs_chars %s", + (acs_chars == NULL) + ? "NULL" + : (strcmp(acs_chars, show) + ? "DIFF" + : "SAME"), + _nc_visbuf(show)); + + _nc_unlock_global(tracef); + } +#endif /* TRACE */ +} + +#define ENSURE_TINFO(sp) (TCBOf(sp)->drv->isTerminfo) + +NCURSES_EXPORT(void) +_nc_cookie_init(SCREEN *sp) +{ + bool support_cookies = USE_XMC_SUPPORT; + TERMINAL_CONTROL_BLOCK *TCB = (TERMINAL_CONTROL_BLOCK *) (sp->_term); + + if (sp == 0 || !ENSURE_TINFO(sp)) + return; + +#if USE_XMC_SUPPORT + /* + * If we have no magic-cookie support compiled-in, or if it is suppressed + * in the environment, reset the support-flag. + */ + if (magic_cookie_glitch >= 0) { + if (getenv("NCURSES_NO_MAGIC_COOKIE") != 0) { + support_cookies = FALSE; + } + } +#endif + + if (!support_cookies && magic_cookie_glitch >= 0) { + T(("will disable attributes to work w/o magic cookies")); + } + + if (magic_cookie_glitch > 0) { /* tvi, wyse */ + + sp->_xmc_triggers = sp->_ok_attributes & ( + A_STANDOUT | + A_UNDERLINE | + A_REVERSE | + A_BLINK | + A_DIM | + A_BOLD | + A_INVIS | + A_PROTECT + ); +#if 0 + /* + * We "should" treat colors as an attribute. The wyse350 (and its + * clones) appear to be the only ones that have both colors and magic + * cookies. + */ + if (has_colors()) { + sp->_xmc_triggers |= A_COLOR; + } +#endif + sp->_xmc_suppress = sp->_xmc_triggers & (chtype) ~(A_BOLD); + + T(("magic cookie attributes %s", _traceattr(sp->_xmc_suppress))); + /* + * Supporting line-drawing may be possible. But make the regular + * video attributes work first. + */ + acs_chars = ABSENT_STRING; + ena_acs = ABSENT_STRING; + enter_alt_charset_mode = ABSENT_STRING; + exit_alt_charset_mode = ABSENT_STRING; +#if USE_XMC_SUPPORT + /* + * To keep the cookie support simple, suppress all of the optimization + * hooks except for clear_screen and the cursor addressing. + */ + if (support_cookies) { + clr_eol = ABSENT_STRING; + clr_eos = ABSENT_STRING; + set_attributes = ABSENT_STRING; + } +#endif + } else if (magic_cookie_glitch == 0) { /* hpterm */ + } + + /* + * If magic cookies are not supported, cancel the strings that set + * video attributes. + */ + if (!support_cookies && magic_cookie_glitch >= 0) { + magic_cookie_glitch = ABSENT_NUMERIC; + set_attributes = ABSENT_STRING; + enter_blink_mode = ABSENT_STRING; + enter_bold_mode = ABSENT_STRING; + enter_dim_mode = ABSENT_STRING; + enter_reverse_mode = ABSENT_STRING; + enter_standout_mode = ABSENT_STRING; + enter_underline_mode = ABSENT_STRING; + } + + /* initialize normal acs before wide, since we use mapping in the latter */ +#if !USE_WIDEC_SUPPORT + if (_nc_unicode_locale() && _nc_locale_breaks_acs(sp->_term)) { + acs_chars = NULL; + ena_acs = NULL; + enter_alt_charset_mode = NULL; + exit_alt_charset_mode = NULL; + set_attributes = NULL; + } +#endif +} + +static int +drv_twait(TERMINAL_CONTROL_BLOCK * TCB, + int mode, + int milliseconds, + int *timeleft + EVENTLIST_2nd(_nc_eventlist * evl)) +{ + SCREEN *sp; + + AssertTCB(); + SetSP(); + + return _nc_timed_wait(sp, mode, milliseconds, timeleft EVENTLIST_2nd(evl)); +} + +static int +drv_read(TERMINAL_CONTROL_BLOCK * TCB, int *buf) +{ + SCREEN *sp; + unsigned char c2 = 0; + int n; + + AssertTCB(); + assert(buf); + SetSP(); + + n = read(sp->_ifd, &c2, 1); + *buf = (int) c2; + return n; +} + +static int +drv_nap(TERMINAL_CONTROL_BLOCK * TCB GCC_UNUSED, int ms) +{ +#if HAVE_NANOSLEEP + { + struct timespec request, remaining; + request.tv_sec = ms / 1000; + request.tv_nsec = (ms % 1000) * 1000000; + while (nanosleep(&request, &remaining) == -1 + && errno == EINTR) { + request = remaining; + } + } +#else + _nc_timed_wait(0, 0, ms, (int *) 0 EVENTLIST_2nd(0)); +#endif + return OK; +} + +static int +__nc_putp(SCREEN *sp, const char *name GCC_UNUSED, const char *value) +{ + int rc = ERR; + + if (value) { + rc = NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx name, value); + } + return rc; +} + +static int +__nc_putp_flush(SCREEN *sp, const char *name, const char *value) +{ + int rc = __nc_putp(sp, name, value); + if (rc != ERR) { + NCURSES_SP_NAME(_nc_flush) (sp); + } + return rc; +} + +static int +drv_kpad(TERMINAL_CONTROL_BLOCK * TCB, bool flag) +{ + int ret = ERR; + SCREEN *sp; + + AssertTCB(); + + sp = TCB->csp; + + if (sp) { + if (flag) { + (void) __nc_putp_flush(sp, "keypad_xmit", keypad_xmit); + } else if (!flag && keypad_local) { + (void) __nc_putp_flush(sp, "keypad_local", keypad_local); + } + if (flag && !sp->_tried) { + _nc_init_keytry(sp); + sp->_tried = TRUE; + } + ret = OK; + } + + return ret; +} + +static int +drv_keyok(TERMINAL_CONTROL_BLOCK * TCB, int c, bool flag) +{ + SCREEN *sp; + int code = ERR; + int count = 0; + char *s; + + AssertTCB(); + SetSP(); + + if (c >= 0) { + unsigned ch = (unsigned) c; + if (flag) { + while ((s = _nc_expand_try(sp->_key_ok, ch, &count, 0)) != 0 + && _nc_remove_key(&(sp->_key_ok), ch)) { + code = _nc_add_to_try(&(sp->_keytry), s, ch); + free(s); + count = 0; + if (code != OK) + break; + } + } else { + while ((s = _nc_expand_try(sp->_keytry, ch, &count, 0)) != 0 + && _nc_remove_key(&(sp->_keytry), ch)) { + code = _nc_add_to_try(&(sp->_key_ok), s, ch); + free(s); + count = 0; + if (code != OK) + break; + } + } + } + return (code); +} + +static bool +drv_kyExist(TERMINAL_CONTROL_BLOCK * TCB, int key) +{ + bool res = FALSE; + + AssertTCB(); + if (TCB->csp) + res = _nc_tinfo_has_key(TCB->csp, key) == 0 ? FALSE : TRUE; + + return res; +} diff --git a/ncurses/tty/MKexpanded.sh b/ncurses/tty/MKexpanded.sh index 845e7759..e13996ed 100755 --- a/ncurses/tty/MKexpanded.sh +++ b/ncurses/tty/MKexpanded.sh @@ -1,6 +1,6 @@ #! /bin/sh ############################################################################## -# Copyright (c) 1998-2005,2008 Free Software Foundation, Inc. # +# Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # # copy of this software and associated documentation files (the "Software"), # @@ -27,9 +27,9 @@ # authorization. # ############################################################################## # -# Author: Thomas E. Dickey 1997 +# Author: Thomas E. Dickey, 1997-on # -# $Id: MKexpanded.sh,v 1.12 2008/11/16 00:19:59 juergen Exp $ +# $Id: MKexpanded.sh,v 1.15 2009/06/27 20:37:50 tom Exp $ # # Script to generate 'expanded.c', a dummy source that contains functions # corresponding to complex macros used in this library. By making functions, @@ -69,41 +69,59 @@ cat >$TMP </dev/null | sed -e '1,/^IGNORE$/d' +$preprocessor $TMP 2>/dev/null | \ + sed -e '1,/^IGNORE$/d' -e 's/^@/#/' -e 's/^#if_/#if /' cat < #ifndef CUR @@ -82,7 +83,7 @@ #include -MODULE_ID("$Id: tty_update.c,v 1.257 2009/06/06 20:26:16 tom Exp $") +MODULE_ID("$Id: tty_update.c,v 1.258 2009/06/27 19:16:17 tom Exp $") /* * This define controls the line-breakout optimization. Every once in a diff --git a/ncurses/win32con/gettimeofday.c b/ncurses/win32con/gettimeofday.c new file mode 100644 index 00000000..87546cea --- /dev/null +++ b/ncurses/win32con/gettimeofday.c @@ -0,0 +1,51 @@ +/**************************************************************************** + * Copyright (c) 2008 Free Software Foundation, Inc. * + * * + * Permission is hereby granted, free of charge, to any person obtaining a * + * copy of this software and associated documentation files (the * + * "Software"), to deal in the Software without restriction, including * + * without limitation the rights to use, copy, modify, merge, publish, * + * distribute, distribute with modifications, sublicense, and/or sell * + * copies of the Software, and to permit persons to whom the Software is * + * furnished to do so, subject to the following conditions: * + * * + * The above copyright notice and this permission notice shall be included * + * in all copies or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +#define WINVER 0x0501 + +#include + +#include + +MODULE_ID("$Id: gettimeofday.c,v 1.1 2008/12/07 02:07:39 juergen Exp $") + +#define JAN1970 116444736000000000LL /* the value for 01/01/1970 00:00 */ + +int +gettimeofday(struct timeval *tv, void *tz) +{ + union { + FILETIME ft; + long long since1601; /* time since 1 Jan 1601 in 100ns units */ + } data; + + GetSystemTimeAsFileTime(&data.ft); + tv->tv_usec = (long) ((data.since1601 / 10LL) % 1000000LL); + tv->tv_sec = (long) ((data.since1601 - JAN1970) / 10000000LL); + return (0); +} diff --git a/ncurses/win32con/win_driver.c b/ncurses/win32con/win_driver.c new file mode 100644 index 00000000..fe1f745e --- /dev/null +++ b/ncurses/win32con/win_driver.c @@ -0,0 +1,1085 @@ +/**************************************************************************** + * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. * + * * + * Permission is hereby granted, free of charge, to any person obtaining a * + * copy of this software and associated documentation files (the * + * "Software"), to deal in the Software without restriction, including * + * without limitation the rights to use, copy, modify, merge, publish, * + * distribute, distribute with modifications, sublicense, and/or sell * + * copies of the Software, and to permit persons to whom the Software is * + * furnished to do so, subject to the following conditions: * + * * + * The above copyright notice and this permission notice shall be included * + * in all copies or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Juergen Pfeifer * + * * + ****************************************************************************/ + +#include + +MODULE_ID("$Id: win_driver.c,v 1.1 2009/02/21 15:11:29 juergen Exp $") + +static bool drv_CanHandle(TERMINAL_CONTROL_BLOCK * TCB, const char *tname, int *); +static void drv_init(TERMINAL_CONTROL_BLOCK *); +static void drv_release(TERMINAL_CONTROL_BLOCK *); +static int drv_size(TERMINAL_CONTROL_BLOCK *, int *, int *); +static int drv_sgmode(TERMINAL_CONTROL_BLOCK * TCB, + bool setFlag, + TTY * buf); +static chtype drv_conattr(TERMINAL_CONTROL_BLOCK * TCB); + +static int drv_mvcur(TERMINAL_CONTROL_BLOCK * TCB, + int yold, int xold, int ynew, int xnew); +static int drv_mode(TERMINAL_CONTROL_BLOCK * TCB, + bool progFlag, bool defFlag); +static bool drv_rescol(TERMINAL_CONTROL_BLOCK * TCB); +static bool drv_rescolors(TERMINAL_CONTROL_BLOCK * TCB); +static void drv_setcolor(TERMINAL_CONTROL_BLOCK * TCB, + bool fore, + int color, + int (*outc) (SCREEN *, int)); +static int drv_dobeepflash(TERMINAL_CONTROL_BLOCK * TCB, bool); +static void drv_initpair(TERMINAL_CONTROL_BLOCK * TCB, + short pair, + short f, + short b); +static void drv_initcolor(TERMINAL_CONTROL_BLOCK * TCB, + short color, + short r, + short g, + short b); +static void drv_do_color(TERMINAL_CONTROL_BLOCK * TCB, + short old_pair, + short pair, + bool reverse, + int (*outc) (SCREEN *, int)); +static void drv_initmouse(TERMINAL_CONTROL_BLOCK * TCB); +static void drv_setfilter(TERMINAL_CONTROL_BLOCK * TCB); +static void drv_hwlabel(TERMINAL_CONTROL_BLOCK * TCB, + int labnum, + char *text); +static void drv_hwlabelOnOff(TERMINAL_CONTROL_BLOCK * TCB, + bool OnFlag); +static int drv_doupdate(TERMINAL_CONTROL_BLOCK * TCB); + +static int drv_defaultcolors(TERMINAL_CONTROL_BLOCK * TCB, + int fg, + int bg); +static int drv_print(TERMINAL_CONTROL_BLOCK * TCB, + char *data, + int len); +/*static int _getsize(TERMINAL_CONTROL_BLOCK*,int *, int *);*/ +static int drv_setsize(TERMINAL_CONTROL_BLOCK * TCB, int l, int c); +static void drv_initacs(TERMINAL_CONTROL_BLOCK * TCB, chtype *, chtype *); +static void drv_wrap(SCREEN *); +static void drv_screen_init(SCREEN *); +static int drv_twait(TERMINAL_CONTROL_BLOCK *, + int, + int, + int *EVENTLIST_2nd(_nc_eventlist *)); +static int drv_read(TERMINAL_CONTROL_BLOCK * TCB, int *buf); +static int drv_nap(TERMINAL_CONTROL_BLOCK * TCB GCC_UNUSED, int ms); +static int drv_kpad(TERMINAL_CONTROL_BLOCK * TCB, bool); +static int drv_keyok(TERMINAL_CONTROL_BLOCK * TCB, int, bool); +static bool drv_kyExist(TERMINAL_CONTROL_BLOCK * TCB, int); + +NCURSES_EXPORT_VAR (TERM_DRIVER) _nc_WIN_DRIVER = { + FALSE, + drv_CanHandle, /* CanHandle */ + drv_init, /* init */ + drv_release, /* release */ + drv_size, /* size */ + drv_sgmode, /* sgmode */ + drv_conattr, /* conattr */ + drv_mvcur, /* hwcur */ + drv_mode, /* mode */ + drv_rescol, /* rescol */ + drv_rescolors, /* rescolors */ + drv_setcolor, /* color */ + drv_dobeepflash, /* DoBeepFlash */ + drv_initpair, /* initpair */ + drv_initcolor, /* initcolor */ + drv_do_color, /* docolor */ + drv_initmouse, /* initmouse */ + drv_setfilter, /* setfilter */ + drv_hwlabel, /* hwlabel */ + drv_hwlabelOnOff, /* hwlabelOnOff */ + drv_doupdate, /* update */ + drv_defaultcolors, /* defaultcolors */ + drv_print, /* print */ + drv_size, /* getsize */ + drv_setsize, /* setsize */ + drv_initacs, /* initacs */ + drv_screen_init, /* scinit */ + drv_wrap, /* scexit */ + drv_twait, /* twait */ + drv_read, /* read */ + drv_nap, /* nap */ + drv_kpad, /* kpad */ + drv_keyok, /* kyOk */ + drv_kyExist /* kyExist */ +}; + +#define WINMAGIC NCDRV_MAGIC(NCDRV_WINCONSOLE) + +#define AssertTCB() assert(TCB!=0 && TCB->magic==WINMAGIC) +#define SetSP() assert(TCB->csp!=0); sp = TCB->csp + +#define GenMap(vKey,key) MAKELONG(key, vKey) + +static const LONG keylist[] = +{ + GenMap(VK_PRIOR, KEY_PPAGE), + GenMap(VK_NEXT, KEY_NPAGE), + GenMap(VK_END, KEY_END), + GenMap(VK_HOME, KEY_HOME), + GenMap(VK_LEFT, KEY_LEFT), + GenMap(VK_UP, KEY_UP), + GenMap(VK_RIGHT, KEY_RIGHT), + GenMap(VK_DOWN, KEY_DOWN), + GenMap(VK_DELETE, KEY_DC), + GenMap(VK_INSERT, KEY_IC) +}; +#define N_INI ((int)(sizeof(keylist)/sizeof(keylist[0]))) +#define FKEYS 24 +#define MAPSIZE (FKEYS + N_INI) +#define NUMPAIRS 64 + +typedef struct props { + CONSOLE_SCREEN_BUFFER_INFO SBI; + bool progMode; + DWORD map[MAPSIZE]; + DWORD rmap[MAPSIZE]; + WORD pairs[NUMPAIRS]; +} Properties; + +#define PropOf(TCB) ((Properties*)TCB->prop) + +int +_nc_mingw_ioctl(int fd GCC_UNUSED, + long int request GCC_UNUSED, + struct termios *arg GCC_UNUSED) +{ + return 0; + endwin(); + fprintf(stderr, "TERMINFO currently not supported on Windows.\n"); + exit(1); +} + +static WORD +MapColor(bool fore, int color) +{ + static const int _cmap[] = + {0, 4, 2, 6, 1, 5, 3, 7}; + int a; + if (color < 0 || color > 7) + a = fore ? 7 : 0; + else + a = _cmap[color]; + if (!fore) + a = a << 4; + return (WORD) a; +} + +static WORD +MapAttr(TERMINAL_CONTROL_BLOCK * TCB, WORD res, chtype ch) +{ + if (ch & A_COLOR) { + int p; + SCREEN *sp; + + AssertTCB(); + SetSP(); + p = PAIR_NUMBER(ch); + if (p > 0 && p < NUMPAIRS && TCB != 0 && sp != 0) { + WORD a; + a = PropOf(TCB)->pairs[p]; + res = (res & 0xff00) | a; + } + } + + if (ch & A_REVERSE) + res = ((res & 0xff00) | (((res & 0x07) << 4) | ((res & 0x70) >> 4))); + + if (ch & A_STANDOUT) + res = ((res & 0xff00) | (((res & 0x07) << 4) | ((res & 0x70) >> 4)) + | BACKGROUND_INTENSITY); + + if (ch & A_BOLD) + res |= FOREGROUND_INTENSITY; + + if (ch & A_DIM) + res |= BACKGROUND_INTENSITY; + + return res; +} + +static BOOL +con_write(TERMINAL_CONTROL_BLOCK * TCB, int y, int x, chtype *str, int n) +{ + CHAR_INFO ci[n]; + COORD loc, siz; + SMALL_RECT rec; + int i; + chtype ch; + SCREEN *sp; + + AssertTCB(); + + if (TCB == 0 || InvalidConsoleHandle(TCB->hdl)) + return FALSE; + + SetSP(); + + for (i = 0; i < n; i++) { + ch = str[i]; + ci[i].Char.AsciiChar = ChCharOf(ch); + ci[i].Attributes = MapAttr(TCB, + PropOf(TCB)->SBI.wAttributes, + ChAttrOf(ch)); + if (ChAttrOf(ch) & A_ALTCHARSET) { + if (sp->_acs_map) + ci[i].Char.AsciiChar = + ChCharOf(NCURSES_SP_NAME(_nc_acs_char) (sp, ChCharOf(ch))); + } + } + + loc.X = (short) 0; + loc.Y = (short) 0; + siz.X = (short) n; + siz.Y = 1; + + rec.Left = (short) x; + rec.Top = (short) y; + rec.Right = (short) (x + n - 1); + rec.Bottom = rec.Top; + + return WriteConsoleOutput(TCB->hdl, ci, siz, loc, &rec); +} + +#define MARK_NOCHANGE(win,row) \ + win->_line[row].firstchar = _NOCHANGE; \ + win->_line[row].lastchar = _NOCHANGE + +static int +drv_doupdate(TERMINAL_CONTROL_BLOCK * TCB) +{ + int y, nonempty, n, x0, x1, Width, Height; + SCREEN *sp; + + AssertTCB(); + SetSP(); + + Width = screen_columns(sp); + Height = screen_lines(sp); + nonempty = min(Height, sp->_newscr->_maxy + 1); + + if ((sp->_curscr->_clear || sp->_newscr->_clear)) { + int x; + chtype empty[Width]; + + for (x = 0; x < Width; x++) + empty[x] = ' '; + + for (y = 0; y < nonempty; y++) { + con_write(TCB, y, 0, empty, Width); + memcpy(empty, + sp->_curscr->_line[y].text, + Width * sizeof(chtype)); + } + sp->_curscr->_clear = FALSE; + sp->_newscr->_clear = FALSE; + touchwin(sp->_newscr); + } + + for (y = 0; y < nonempty; y++) { + x0 = sp->_newscr->_line[y].firstchar; + if (x0 != _NOCHANGE) { + x1 = sp->_newscr->_line[y].lastchar; + n = x1 - x0 + 1; + if (n > 0) { + memcpy(sp->_curscr->_line[y].text + x0, + sp->_newscr->_line[y].text + x0, + n * sizeof(chtype)); + con_write(TCB, + y, + x0, + ((chtype *) sp->_curscr->_line[y].text) + x0, n); + + /* mark line changed successfully */ + if (y <= sp->_newscr->_maxy) { + MARK_NOCHANGE(sp->_newscr, y); + } + if (y <= sp->_curscr->_maxy) { + MARK_NOCHANGE(sp->_curscr, y); + } + } + } + } + + /* put everything back in sync */ + for (y = nonempty; y <= sp->_newscr->_maxy; y++) { + MARK_NOCHANGE(sp->_newscr, y); + } + for (y = nonempty; y <= sp->_curscr->_maxy; y++) { + MARK_NOCHANGE(sp->_curscr, y); + } + + if (!sp->_newscr->_leaveok) { + sp->_curscr->_curx = sp->_newscr->_curx; + sp->_curscr->_cury = sp->_newscr->_cury; + + TCB->drv->hwcur(TCB, 0, 0, sp->_curscr->_cury, sp->_curscr->_curx); + } + SetConsoleActiveScreenBuffer(TCB->hdl); + return OK; +} + +static bool +drv_CanHandle(TERMINAL_CONTROL_BLOCK * TCB, + const char *tname, + int *errret GCC_UNUSED) +{ + assert(TCB != 0); + assert(tname != 0); + TCB->magic = WINMAGIC; + if (*tname == 0 || *tname == 0 || strcmp(tname, "unknown") == 0) { + return TRUE; + } else + return FALSE; +} + +static int +drv_dobeepflash(TERMINAL_CONTROL_BLOCK * TCB, + bool beepFlag GCC_UNUSED) +{ + SCREEN *sp; + int res = ERR; + + AssertTCB(); + SetSP(); + + return res; +} + +static int +drv_print(TERMINAL_CONTROL_BLOCK * TCB, + char *data GCC_UNUSED, + int len GCC_UNUSED) +{ + SCREEN *sp; + + AssertTCB(); + SetSP(); + + return ERR; +} + +static int +drv_defaultcolors(TERMINAL_CONTROL_BLOCK * TCB, + int fg GCC_UNUSED, + int bg GCC_UNUSED) +{ + SCREEN *sp; + int code = ERR; + + AssertTCB(); + SetSP(); + + return (code); +} + +static void +drv_setcolor(TERMINAL_CONTROL_BLOCK * TCB, + bool fore, + int color, + int (*outc) (SCREEN *, int) GCC_UNUSED) +{ + AssertTCB(); + + if (TCB && !InvalidConsoleHandle(TCB->hdl)) { + WORD a = MapColor(fore, color); + a = ((PropOf(TCB)->SBI.wAttributes) & (fore ? 0xfff8 : 0xff8f)) | a; + SetConsoleTextAttribute(TCB->hdl, a); + GetConsoleScreenBufferInfo(TCB->hdl, &(PropOf(TCB)->SBI)); + } +} + +static bool +drv_rescol(TERMINAL_CONTROL_BLOCK * TCB) +{ + bool res = FALSE; + + AssertTCB(); + if (TCB && !InvalidConsoleHandle(TCB->hdl)) { + WORD a = FOREGROUND_BLUE | FOREGROUND_RED | FOREGROUND_GREEN; + SetConsoleTextAttribute(TCB->hdl, a); + GetConsoleScreenBufferInfo(TCB->hdl, &(PropOf(TCB)->SBI)); + res = TRUE; + } + return res; +} + +static bool +drv_rescolors(TERMINAL_CONTROL_BLOCK * TCB) +{ + int result = FALSE; + SCREEN *sp; + + AssertTCB(); + SetSP(); + + return result; +} + +static int +drv_size(TERMINAL_CONTROL_BLOCK * TCB, int *Lines, int *Cols) +{ + AssertTCB(); + + if (TCB == NULL || Lines == NULL || Cols == NULL || InvalidConsoleHandle(TCB->hdl)) + return ERR; + + *Lines = (int) (PropOf(TCB)->SBI.dwSize.Y); + *Cols = (int) (PropOf(TCB)->SBI.dwSize.X); + return OK; +} + +static int +drv_setsize(TERMINAL_CONTROL_BLOCK * TCB GCC_UNUSED, + int l GCC_UNUSED, + int c GCC_UNUSED) +{ + AssertTCB(); + return ERR; +} + +static int +drv_mode(TERMINAL_CONTROL_BLOCK * TCB, bool progFlag, bool defFlag) +{ + SCREEN *sp; + TERMINAL *_term = (TERMINAL *) TCB; + int code = ERR; + + AssertTCB(); + sp = TCB->csp; + + PropOf(TCB)->progMode = progFlag; + SetConsoleActiveScreenBuffer(progFlag ? TCB->hdl : TCB->out); + + if (progFlag) /* prog mode */ { + if (defFlag) { + if ((drv_sgmode(TCB, FALSE, &(_term->Nttyb)) == OK)) { + _term->Nttyb.c_oflag &= ~OFLAGS_TABS; + code = OK; + } + } else { + /* reset_prog_mode */ + if (drv_sgmode(TCB, TRUE, &(_term->Nttyb)) == OK) { + if (sp) { + if (sp->_keypad_on) + _nc_keypad(sp, TRUE); + NC_BUFFERED(sp, TRUE); + } + code = OK; + } + } + } else { /* shell mode */ + if (defFlag) { + /* def_shell_mode */ + if (drv_sgmode(TCB, FALSE, &(_term->Ottyb)) == OK) { + code = OK; + } + } else { + /* reset_shell_mode */ + if (sp) { + _nc_keypad(sp, FALSE); + NCURSES_SP_NAME(_nc_flush) (sp); + NC_BUFFERED(sp, FALSE); + } + code = drv_sgmode(TCB, TRUE, &(_term->Ottyb)); + } + } + + return (code); +} + +static void +drv_screen_init(SCREEN *sp GCC_UNUSED) +{ +} + +static void +drv_wrap(SCREEN *sp GCC_UNUSED) +{ +} + +static int +rkeycompare(const void *el1, const void *el2) +{ + WORD key1 = (LOWORD((*((const LONG *) el1)))) & 0x7fff; + WORD key2 = (LOWORD((*((const LONG *) el2)))) & 0x7fff; + + return ((key1 < key2) ? -1 : ((key1 == key2) ? 0 : 1)); +} + +static int +keycompare(const void *el1, const void *el2) +{ + WORD key1 = HIWORD((*((const LONG *) el1))); + WORD key2 = HIWORD((*((const LONG *) el2))); + + return ((key1 < key2) ? -1 : ((key1 == key2) ? 0 : 1)); +} + +static int +MapKey(TERMINAL_CONTROL_BLOCK * TCB, WORD vKey) +{ + WORD nKey = 0; + void *res; + LONG key = GenMap(vKey, 0); + int code = -1; + + AssertTCB(); + + res = bsearch(&key, + PropOf(TCB)->map, + (size_t) (N_INI + FKEYS), + sizeof(keylist[0]), + keycompare); + if (res) { + key = *((LONG *) res); + nKey = LOWORD(key); + code = (int) (nKey & 0x7fff); + if (nKey & 0x8000) + code = -code; + } + return code; +} + +static void +drv_release(TERMINAL_CONTROL_BLOCK * TCB) +{ + AssertTCB(); + if (TCB->prop) + free(TCB->prop); +} + +static void +drv_init(TERMINAL_CONTROL_BLOCK * TCB) +{ + AssertTCB(); + + if (TCB) { + BOOL b = AllocConsole(); + WORD a; + int i; + + if (!b) + b = AttachConsole(ATTACH_PARENT_PROCESS); + + TCB->inp = GetStdHandle(STD_INPUT_HANDLE); + TCB->out = GetStdHandle(STD_OUTPUT_HANDLE); + + if (getenv("NCGDB")) + TCB->hdl = TCB->out; + else + TCB->hdl = CreateConsoleScreenBuffer(GENERIC_READ | GENERIC_WRITE, + 0, + NULL, + CONSOLE_TEXTMODE_BUFFER, + NULL); + + if (!InvalidConsoleHandle(TCB->hdl)) { + TCB->prop = typeCalloc(Properties, 1); + GetConsoleScreenBufferInfo(TCB->hdl, &(PropOf(TCB)->SBI)); + } + + TCB->info.initcolor = TRUE; + TCB->info.canchange = FALSE; + TCB->info.hascolor = TRUE; + TCB->info.caninit = TRUE; + + TCB->info.maxpairs = NUMPAIRS; + TCB->info.maxcolors = 8; + TCB->info.numlabels = 0; + TCB->info.labelwidth = 0; + TCB->info.labelheight = 0; + TCB->info.nocolorvideo = 1; + TCB->info.tabsize = 8; + + TCB->info.defaultPalette = _nc_cga_palette; + + for (i = 0; i < (N_INI + FKEYS); i++) { + if (i < N_INI) + PropOf(TCB)->rmap[i] = PropOf(TCB)->map[i] = keylist[i]; + else + PropOf(TCB)->rmap[i] = PropOf(TCB)->map[i] = + GenMap((VK_F1 + (i - N_INI)), (KEY_F(1) + (i - N_INI))); + } + qsort(PropOf(TCB)->map, + (size_t) (MAPSIZE), + sizeof(keylist[0]), + keycompare); + qsort(PropOf(TCB)->rmap, + (size_t) (MAPSIZE), + sizeof(keylist[0]), + rkeycompare); + + a = MapColor(true, COLOR_WHITE) | MapColor(false, COLOR_BLACK); + for (i = 0; i < NUMPAIRS; i++) + PropOf(TCB)->pairs[i] = a; + } +} + +static void +drv_initpair(TERMINAL_CONTROL_BLOCK * TCB, + short pair, + short f, + short b) +{ + SCREEN *sp; + + AssertTCB(); + SetSP(); + + if ((pair > 0) && (pair < NUMPAIRS) && (f >= 0) && (f < 8) + && (b >= 0) && (b < 8)) { + PropOf(TCB)->pairs[pair] = MapColor(true, f) | MapColor(false, b); + } +} + +static void +drv_initcolor(TERMINAL_CONTROL_BLOCK * TCB, + short color GCC_UNUSED, + short r GCC_UNUSED, + short g GCC_UNUSED, + short b GCC_UNUSED) +{ + SCREEN *sp; + + AssertTCB(); + SetSP(); +} + +static void +drv_do_color(TERMINAL_CONTROL_BLOCK * TCB, + short old_pair GCC_UNUSED, + short pair GCC_UNUSED, + bool reverse GCC_UNUSED, + int (*outc) (SCREEN *, int) GCC_UNUSED +) +{ + SCREEN *sp; + + AssertTCB(); + SetSP(); +} + +static void +drv_initmouse(TERMINAL_CONTROL_BLOCK * TCB) +{ + SCREEN *sp; + + AssertTCB(); + SetSP(); +} + +static int +drv_mvcur(TERMINAL_CONTROL_BLOCK * TCB, + int yold GCC_UNUSED, int xold GCC_UNUSED, + int y, int x) +{ + int ret = ERR; + if (TCB && !InvalidConsoleHandle(TCB->hdl)) { + COORD loc; + loc.X = (short) x; + loc.Y = (short) y; + SetConsoleCursorPosition(TCB->hdl, loc); + ret = OK; + } + return ret; +} + +static void +drv_hwlabel(TERMINAL_CONTROL_BLOCK * TCB, + int labnum GCC_UNUSED, + char *text GCC_UNUSED) +{ + SCREEN *sp; + + AssertTCB(); + SetSP(); +} + +static void +drv_hwlabelOnOff(TERMINAL_CONTROL_BLOCK * TCB, + bool OnFlag GCC_UNUSED) +{ + SCREEN *sp; + + AssertTCB(); + SetSP(); +} + +static chtype +drv_conattr(TERMINAL_CONTROL_BLOCK * TCB GCC_UNUSED) +{ + chtype res = A_NORMAL; + res |= (A_BOLD | A_DIM | A_REVERSE | A_STANDOUT | A_COLOR); + return res; +} + +static void +drv_setfilter(TERMINAL_CONTROL_BLOCK * TCB) +{ + SCREEN *sp; + + AssertTCB(); + SetSP(); +} + +static int +drv_sgmode(TERMINAL_CONTROL_BLOCK * TCB, bool setFlag, TTY * buf) +{ + DWORD dwFlag = 0; + tcflag_t iflag; + tcflag_t lflag; + + AssertTCB(); + + if (TCB == 0 || buf == NULL) + return ERR; + + if (setFlag) { + iflag = buf->c_iflag; + lflag = buf->c_lflag; + + GetConsoleMode(TCB->inp, &dwFlag); + + if (lflag & ICANON) + dwFlag |= ENABLE_LINE_INPUT; + else + dwFlag &= ~ENABLE_LINE_INPUT; + + if (lflag & ECHO) + dwFlag |= ENABLE_ECHO_INPUT; + else + dwFlag &= ~ENABLE_ECHO_INPUT; + + if (iflag & BRKINT) + dwFlag |= ENABLE_PROCESSED_INPUT; + else + dwFlag &= ~ENABLE_PROCESSED_INPUT; + + /* we disable that for now to focus on keyboard. */ + dwFlag &= ~ENABLE_MOUSE_INPUT; + + buf->c_iflag = iflag; + buf->c_lflag = lflag; + SetConsoleMode(TCB->inp, dwFlag); + TCB->term.Nttyb = *buf; + } else { + iflag = TCB->term.Nttyb.c_iflag; + lflag = TCB->term.Nttyb.c_lflag; + GetConsoleMode(TCB->inp, &dwFlag); + + if (dwFlag & ENABLE_LINE_INPUT) + lflag |= ICANON; + else + lflag &= ~ICANON; + + if (dwFlag & ENABLE_ECHO_INPUT) + lflag |= ECHO; + else + lflag &= ~ECHO; + + if (dwFlag & ENABLE_PROCESSED_INPUT) + iflag |= BRKINT; + else + iflag &= ~BRKINT; + + TCB->term.Nttyb.c_iflag = iflag; + TCB->term.Nttyb.c_lflag = lflag; + + *buf = TCB->term.Nttyb; + } + return OK; +} + +static void +drv_initacs(TERMINAL_CONTROL_BLOCK * TCB, + chtype *real_map GCC_UNUSED, + chtype *fake_map GCC_UNUSED) +{ + SCREEN *sp; + AssertTCB(); + SetSP(); +} + +static ULONGLONG +tdiff(FILETIME fstart, FILETIME fend) +{ + ULARGE_INTEGER ustart; + ULARGE_INTEGER uend; + ULONGLONG diff; + + ustart.LowPart = fstart.dwLowDateTime; + ustart.HighPart = fstart.dwHighDateTime; + uend.LowPart = fend.dwLowDateTime; + uend.HighPart = fend.dwHighDateTime; + + diff = (uend.QuadPart - ustart.QuadPart) / 10000; + return diff; +} + +static int +Adjust(int milliseconds, int diff) +{ + if (milliseconds == INFINITY) + return milliseconds; + milliseconds -= diff; + if (milliseconds < 0) + milliseconds = 0; + return milliseconds; +} + +static int +drv_twait(TERMINAL_CONTROL_BLOCK * TCB, + int mode, + int milliseconds, + int *timeleft + EVENTLIST_2nd(_nc_eventlist * evl)) +{ + SCREEN *sp; + INPUT_RECORD inp; + BOOL b; + DWORD nRead = 0, rc = -1; + int code = 0; + FILETIME fstart; + FILETIME fend; + int diff; + bool isImmed = (milliseconds == 0); + +#define CONSUME() ReadConsoleInput(TCB->inp,&inp,1,&nRead) + + AssertTCB(); + SetSP(); + + if (milliseconds < 0) + milliseconds = INFINITY; + + memset(&inp, 0, sizeof(inp)); + + while (true) { + GetSystemTimeAsFileTime(&fstart); + rc = WaitForSingleObject(TCB->inp, milliseconds); + GetSystemTimeAsFileTime(&fend); + diff = (int) tdiff(fstart, fend); + milliseconds = Adjust(milliseconds, diff); + + if (!isImmed && milliseconds == 0) + break; + + if (rc == WAIT_OBJECT_0) { + if (mode) { + b = GetNumberOfConsoleInputEvents(TCB->inp, &nRead); + if (b && nRead > 0) { + b = PeekConsoleInput(TCB->inp, &inp, 1, &nRead); + if (b && nRead > 0) { + switch (inp.EventType) { + case KEY_EVENT: + if (mode & TW_INPUT) { + WORD vk = inp.Event.KeyEvent.wVirtualKeyCode; + char ch = inp.Event.KeyEvent.uChar.AsciiChar; + + if (inp.Event.KeyEvent.bKeyDown) { + if (0 == ch) { + int nKey = MapKey(TCB, vk); + if ((nKey < 0) || FALSE == sp->_keypad_on) { + CONSUME(); + continue; + } + } + code = TW_INPUT; + goto end; + } else { + CONSUME(); + } + } + continue; + case MOUSE_EVENT: + if (0 && mode & TW_MOUSE) { + code = TW_MOUSE; + goto end; + } else + continue; + default: + SetConsoleActiveScreenBuffer(!PropOf(TCB)->progMode ? + TCB->hdl : TCB->out); + continue; + } + } + } + } + continue; + } else { + if (rc != WAIT_TIMEOUT) { + code = -1; + break; + } else { + code = 0; + break; + } + } + } + end: + if (timeleft) + *timeleft = milliseconds; + + return code; +} + +static int +drv_read(TERMINAL_CONTROL_BLOCK * TCB, int *buf) +{ + SCREEN *sp; + int n = 1; + INPUT_RECORD inp; + BOOL b; + DWORD nRead; + WORD vk; + WORD sc; + + AssertTCB(); + assert(buf); + SetSP(); + + memset(&inp, 0, sizeof(inp)); + + while ((b = ReadConsoleInput(TCB->inp, &inp, 1, &nRead))) { + if (b && nRead > 0) { + if (inp.EventType == KEY_EVENT) { + if (!inp.Event.KeyEvent.bKeyDown) + continue; + *buf = (int) inp.Event.KeyEvent.uChar.AsciiChar; + vk = inp.Event.KeyEvent.wVirtualKeyCode; + sc = inp.Event.KeyEvent.wVirtualScanCode; + if (*buf == 0) { + if (sp->_keypad_on) { + *buf = MapKey(TCB, vk); + if (0 > (*buf)) + continue; + else + break; + } else + continue; + } else { /* *buf != 0 */ + break; + } + } else if (0 && inp.EventType == MOUSE_EVENT) { + *buf = KEY_MOUSE; + break; + } + continue; + } + } + return n; +} + +static int +drv_nap(TERMINAL_CONTROL_BLOCK * TCB GCC_UNUSED, int ms) +{ + Sleep(ms); + return OK; +} + +static bool +drv_kyExist(TERMINAL_CONTROL_BLOCK * TCB, int keycode) +{ + SCREEN *sp; + WORD nKey; + void *res; + bool found = FALSE; + LONG key = GenMap(0, (WORD) keycode); + + AssertTCB(); + SetSP(); + + AssertTCB(); + + res = bsearch(&key, + PropOf(TCB)->rmap, + (size_t) (N_INI + FKEYS), + sizeof(keylist[0]), + rkeycompare); + if (res) { + key = *((LONG *) res); + nKey = LOWORD(key); + if (!(nKey & 0x8000)) + found = TRUE; + } + return found; +} + +static int +drv_kpad(TERMINAL_CONTROL_BLOCK * TCB, bool flag GCC_UNUSED) +{ + SCREEN *sp; + int code = ERR; + + AssertTCB(); + sp = TCB->csp; + + if (sp) { + code = OK; + } + return code; +} + +static int +drv_keyok(TERMINAL_CONTROL_BLOCK * TCB, int keycode, bool flag) +{ + int code = ERR; + SCREEN *sp; + WORD nKey; + WORD vKey; + void *res; + LONG key = GenMap(0, (WORD) keycode); + + AssertTCB(); + SetSP(); + + if (sp) { + res = bsearch(&key, + PropOf(TCB)->rmap, + (size_t) (N_INI + FKEYS), + sizeof(keylist[0]), + rkeycompare); + if (res) { + key = *((LONG *) res); + vKey = HIWORD(key); + nKey = (LOWORD(key)) & 0x7fff; + if (!flag) + nKey |= 0x8000; + *(LONG *) res = GenMap(vKey, nKey); + } + } + return code; +}