FreeBSD Bugzilla – Attachment 180319 Details for
Bug 217376
make buildworld exits with segfault
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
Preprocessed source
tty_update-4b5bc4.c (text/plain), 867.05 KB, created by
jaglover
on 2017-02-26 18:21:53 UTC
(
hide
)
Description:
Preprocessed source
Filename:
MIME Type:
Creator:
jaglover
Created:
2017-02-26 18:21:53 UTC
Size:
867.05 KB
patch
obsolete
># 1 "<built-in>" ># 1 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" >/**************************************************************************** > * Copyright (c) 1998-2013,2014 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: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 * > * and: Eric S. Raymond <esr@snark.thyrsus.com> * > * and: Thomas E. Dickey 1996-on * > * and: Juergen Pfeifer 2009 * > ****************************************************************************/ > >/*----------------------------------------------------------------- > * > * lib_doupdate.c > * > * The routine doupdate() and its dependents. > * All physical output is concentrated here (except _nc_outch() > * in lib_tputs.c). > * > *-----------------------------------------------------------------*/ > >#if 0 /* expanded by -frewrite-includes */ >#include <curses.priv.h> >#endif /* expanded by -frewrite-includes */ ># 46 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" ># 1 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" 1 >/**************************************************************************** > * Copyright (c) 1998-2013,2014 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: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 * > * and: Eric S. Raymond <esr@snark.thyrsus.com> * > * and: Thomas E. Dickey 1996-on * > * and: Juergen Pfeifer * > ****************************************************************************/ > >/* > * $Id: curses.priv.h,v 1.530 2014/02/01 22:09:27 tom Exp $ > * > * curses.priv.h > * > * Header file for curses library objects which are private to > * the library. > * > */ > >#ifndef CURSES_PRIV_H >#define CURSES_PRIV_H 1 >/* *INDENT-OFF* */ > >#if 0 /* expanded by -frewrite-includes */ >#include <ncurses_dll.h> >#endif /* expanded by -frewrite-includes */ ># 50 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" ># 1 "./ncurses_dll.h" 1 >/**************************************************************************** > * Copyright (c) 1998-2007,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. * > ****************************************************************************/ >/* $Id: ncurses_dll.h.in,v 1.8 2009/04/04 22:26:27 tom Exp $ */ > >#ifndef NCURSES_DLL_H_incl >#define NCURSES_DLL_H_incl 1 > >/* > * For reentrant code, we map the various global variables into SCREEN by > * using functions to access them. > */ >#define NCURSES_PUBLIC_VAR(name) _nc_##name >#define NCURSES_WRAPPED_VAR(type,name) extern type NCURSES_PUBLIC_VAR(name)(void) > >/* no longer needed on cygwin or mingw, thanks to auto-import */ >/* but this structure may be useful at some point for an MSVC build */ >/* so, for now unconditionally define the important flags */ >/* "the right way" for proper static and dll+auto-import behavior */ >#undef NCURSES_DLL >#define NCURSES_STATIC > >#if defined(__CYGWIN__) || defined(__MINGW32__) ># if defined(NCURSES_DLL) ># if defined(NCURSES_STATIC) ># undef NCURSES_STATIC ># endif ># 52 "./ncurses_dll.h" ># endif ># 53 "./ncurses_dll.h" ># undef NCURSES_IMPEXP ># undef NCURSES_API ># undef NCURSES_EXPORT ># undef NCURSES_EXPORT_VAR ># if defined(NCURSES_DLL) >/* building a DLL */ ># define NCURSES_IMPEXP __declspec(dllexport) ># elif defined(NCURSES_STATIC) ># 61 "./ncurses_dll.h" >/* building or linking to a static library */ ># define NCURSES_IMPEXP /* nothing */ ># else ># 64 "./ncurses_dll.h" >/* linking to the DLL */ ># define NCURSES_IMPEXP __declspec(dllimport) ># endif ># 67 "./ncurses_dll.h" ># define NCURSES_API __cdecl ># define NCURSES_EXPORT(type) NCURSES_IMPEXP type NCURSES_API ># define NCURSES_EXPORT_VAR(type) NCURSES_IMPEXP type >#endif ># 71 "./ncurses_dll.h" > >/* Take care of non-cygwin platforms */ >#if !defined(NCURSES_IMPEXP) ># define NCURSES_IMPEXP /* nothing */ >#endif ># 76 "./ncurses_dll.h" >#if !defined(NCURSES_API) ># define NCURSES_API /* nothing */ >#endif ># 79 "./ncurses_dll.h" >#if !defined(NCURSES_EXPORT) ># define NCURSES_EXPORT(type) NCURSES_IMPEXP type NCURSES_API >#endif ># 82 "./ncurses_dll.h" >#if !defined(NCURSES_EXPORT_VAR) ># define NCURSES_EXPORT_VAR(type) NCURSES_IMPEXP type >#endif ># 85 "./ncurses_dll.h" > >#endif /* NCURSES_DLL_H_incl */ ># 87 "./ncurses_dll.h" ># 51 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" 2 > >#ifdef __cplusplus >extern "C" { >#endif ># 55 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#if 0 /* expanded by -frewrite-includes */ >#include <ncurses_cfg.h> >#endif /* expanded by -frewrite-includes */ ># 56 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" ># 1 "/usr/src/lib/ncurses/ncurses/ncurses_cfg.h" 1 >/* include/ncurses_cfg.h. Generated automatically by configure. */ >/**************************************************************************** > * Copyright (c) 1998-2004,2005 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 <dickey@clark.net> 1997 * > ****************************************************************************/ >/* > * $Id: ncurses_cfg.hin,v 1.7 2005/01/02 01:26:58 tom Exp $ > * > * This is a template-file used to generate the "ncurses_cfg.h" file. > * > * Rather than list every definition, the configuration script substitutes the > * definitions that it finds using 'sed'. You need a patch (original date > * 971222) to autoconf 2.12 or 2.13 to do this. > * > * See: > * http://invisible-island.net/autoconf/ > * ftp://invisible-island.net/autoconf/ > */ > >/* $FreeBSD: stable/11/lib/ncurses/ncurses/ncurses_cfg.h 262685 2014-03-02 08:58:21Z delphij $ */ > >#ifndef NC_CONFIG_H >#define NC_CONFIG_H > >#define SYSTEM_NAME "FreeBSD" >#if 0 >#if 0 /* expanded by -frewrite-includes */ >#include <stdlib.h> >#endif /* expanded by -frewrite-includes */ ># 54 "/usr/src/lib/ncurses/ncurses/ncurses_cfg.h" ># 55 "/usr/src/lib/ncurses/ncurses/ncurses_cfg.h" >#endif ># 56 "/usr/src/lib/ncurses/ncurses/ncurses_cfg.h" >#define HAVE_LONG_FILE_NAMES 1 >#define MIXEDCASE_FILENAMES 1 >#define USE_SYSMOUSE 1 >#define HAVE_BIG_CORE 1 >#define TERMPATH "/etc/termcap:/usr/share/misc/termcap" >#define USE_GETCAP 1 >#define HAVE_REMOVE 1 >#define HAVE_UNLINK 1 >#define HAVE_LINK 1 >#define HAVE_SYMLINK 1 >#define USE_LINKS 1 >#define BSD_TPUTS 1 >#define HAVE_LANGINFO_CODESET 1 >#define HAVE_FSEEKO 1 >#define HAVE_ASSUME_DEFAULT_COLORS 1 >#define HAVE_CURSES_VERSION 1 >#define HAVE_HAS_KEY 1 >#define HAVE_RESIZETERM 1 >#define HAVE_RESIZE_TERM 1 >#define HAVE_TERM_ENTRY_H 1 >#define HAVE_USE_DEFAULT_COLORS 1 >#define HAVE_USE_SCREEN 1 >#define HAVE_USE_WINDOW 1 >#define HAVE_WRESIZE 1 >#define NCURSES_EXT_FUNCS 1 >#define NCURSES_NO_PADDING 1 >#define STDC_HEADERS 1 >#define HAVE_SYS_TYPES_H 1 >#define HAVE_SYS_STAT_H 1 >#define HAVE_STDLIB_H 1 >#define HAVE_STRING_H 1 >#define HAVE_MEMORY_H 1 >#define HAVE_STRINGS_H 1 >#define HAVE_INTTYPES_H 1 >#define HAVE_STDINT_H 1 >#define HAVE_UNISTD_H 1 >#define SIZEOF_SIGNED_CHAR 1 >#define USE_SIGWINCH 1 >#define USE_ASSUMED_COLOR 1 >#define USE_HASHMAP 1 >#define USE_COLORFGBG 1 >#define NCURSES_WRAP_PREFIX "_nc_" >#define GCC_SCANF 1 >#define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var))) >#define GCC_PRINTF 1 >#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var))) >#define GCC_UNUSED __attribute__((unused)) >#define GCC_NORETURN __attribute__((noreturn)) >#define HAVE_NC_ALLOC_H 1 >#define HAVE_GETTIMEOFDAY 1 >#define STDC_HEADERS 1 >#define HAVE_DIRENT_H 1 >#define TIME_WITH_SYS_TIME 1 >#define HAVE_REGEX_H_FUNCS 1 >#define HAVE_FCNTL_H 1 >#define HAVE_GETOPT_H 1 >#define HAVE_LIMITS_H 1 >#define HAVE_LOCALE_H 1 >#define HAVE_MATH_H 1 >#define HAVE_POLL_H 1 >#define HAVE_SYS_IOCTL_H 1 >#define HAVE_SYS_PARAM_H 1 >#define HAVE_SYS_POLL_H 1 >#define HAVE_SYS_SELECT_H 1 >#define HAVE_SYS_TIME_H 1 >#define HAVE_SYS_TIMES_H 1 >#define HAVE_TTYENT_H 1 >#define HAVE_UNISTD_H 1 >#define HAVE_WCTYPE_H 1 >#define HAVE_UNISTD_H 1 >#define HAVE_GETOPT_H 1 >#define HAVE_GETOPT_HEADER 1 >#define HAVE_SYS_TIME_SELECT 1 >#define SIG_ATOMIC_T volatile sig_atomic_t >#define TYPEOF_CHTYPE int >#define HAVE_ERRNO 1 >#define HAVE_GETCWD 1 >#define HAVE_GETEGID 1 >#define HAVE_GETEUID 1 >#define HAVE_GETTTYNAM 1 >#define HAVE_ISSETUGID 1 >#define HAVE_POLL 1 >#define HAVE_PUTENV 1 >#define HAVE_REMOVE 1 >#define HAVE_SELECT 1 >#define HAVE_SETBUF 1 >#define HAVE_SETBUFFER 1 >#define HAVE_SETENV 1 >#define HAVE_SETVBUF 1 >#define HAVE_SIGACTION 1 >#define HAVE_SIGVEC 1 >#define HAVE_STRDUP 1 >#define HAVE_STRSTR 1 >#define HAVE_TCGETPGRP 1 >#define HAVE_TIMES 1 >#define HAVE_VSNPRINTF 1 >#define HAVE_BSD_CGETENT 1 >#define CGETENT_CONST const >#define HAVE_ISASCII 1 >#define HAVE_NANOSLEEP 1 >#define HAVE_TERMIOS_H 1 >#define HAVE_UNISTD_H 1 >#define HAVE_TCGETATTR 1 >#define HAVE_VSSCANF 1 >#define HAVE_MKSTEMP 1 >#define HAVE_SIZECHANGE 1 >#define HAVE_WORKING_POLL 1 >#define HAVE_VA_COPY 1 >#define HAVE___VA_COPY 1 >#define HAVE_UNISTD_H 1 >#define HAVE_FORK 1 >#define HAVE_VFORK 1 >#define HAVE_WORKING_VFORK 1 >#define HAVE_WORKING_FORK 1 >#define USE_OPENPTY_HEADER <libutil.h> >#define USE_XTERM_PTY 1 >#define HAVE_TYPEINFO 1 >#define HAVE_IOSTREAM 1 >#define IOSTREAM_NAMESPACE 1 >#define CPP_HAS_STATIC_CAST 1 >#define HAVE_SLK_COLOR 1 >#define HAVE_PANEL_H 1 >#define HAVE_LIBPANEL 1 >#define HAVE_MENU_H 1 >#define HAVE_LIBMENU 1 >#define HAVE_FORM_H 1 >#define HAVE_LIBFORM 1 >#define NCURSES_PATHSEP ':' >#define NCURSES_VERSION_STRING "5.9.20140222" >#define NCURSES_OSPEED_COMPAT 1 > >/* > * Begin FreeBSD-specific changes > */ >/* Support ENABLE_WIDEC */ >#ifdef ENABLE_WIDEC >#define USE_WIDEC_SUPPORT 1 >#define NCURSES_WIDECHAR 1 >#define HAVE_PUTWC 1 >#define HAVE_BTOWC 1 >#define HAVE_WCTOB 1 >#define HAVE_MBTOWC 1 >#define HAVE_WCTOMB 1 >#define HAVE_MBLEN 1 >#define HAVE_MBRLEN 1 >#define HAVE_MBRTOWC 1 >#define HAVE_WCSRTOMBS 1 >#define HAVE_MBSRTOWCS 1 >#define HAVE_WCSTOMBS 1 >#define HAVE_MBSTOWCS 1 >#define NEED_WCHAR_H 1 >#define SIZEOF_WCHAR_T 4 >#endif ># 209 "/usr/src/lib/ncurses/ncurses/ncurses_cfg.h" >/* > * End FreeBSD-specific changes > */ > >#if 0 /* expanded by -frewrite-includes */ >#include <ncurses_def.h> >#endif /* expanded by -frewrite-includes */ ># 213 "/usr/src/lib/ncurses/ncurses/ncurses_cfg.h" ># 1 "./ncurses_def.h" 1 >/* > * This file is generated by /usr/src/contrib/ncurses/include/MKncurses_def.sh > */ > >#ifndef NC_DEFINE_H >#define NC_DEFINE_H 1 > >#ifndef BROKEN_LINKER >#define BROKEN_LINKER 0 >#endif ># 11 "./ncurses_def.h" > >#ifndef BSD_TPUTS >#define BSD_TPUTS 0 >#endif ># 15 "./ncurses_def.h" > >#ifndef CGETENT_CONST >#define CGETENT_CONST /* nothing */ >#endif ># 19 "./ncurses_def.h" > >#ifndef CPP_HAS_PARAM_INIT >#define CPP_HAS_PARAM_INIT 0 >#endif ># 23 "./ncurses_def.h" > >#ifndef CURSES_ACS_ARRAY >#define CURSES_ACS_ARRAY acs_map >#endif ># 27 "./ncurses_def.h" > >#ifndef CURSES_WACS_ARRAY >#define CURSES_WACS_ARRAY _nc_wacs >#endif ># 31 "./ncurses_def.h" > >#ifndef DECL_ERRNO >#define DECL_ERRNO 0 >#endif ># 35 "./ncurses_def.h" > >#ifndef ETIP_NEEDS_MATH_H >#define ETIP_NEEDS_MATH_H 0 >#endif ># 39 "./ncurses_def.h" > >#ifndef GCC_NORETURN >#define GCC_NORETURN /* nothing */ >#endif ># 43 "./ncurses_def.h" > >#ifndef GCC_UNUSED >#define GCC_UNUSED /* nothing */ >#endif ># 47 "./ncurses_def.h" > >#ifndef HAVE_ASSUME_DEFAULT_COLORS >#define HAVE_ASSUME_DEFAULT_COLORS 0 >#endif ># 51 "./ncurses_def.h" > >#ifndef HAVE_BIG_CORE >#define HAVE_BIG_CORE 0 >#endif ># 55 "./ncurses_def.h" > >#ifndef HAVE_BSD_CGETENT >#define HAVE_BSD_CGETENT 0 >#endif ># 59 "./ncurses_def.h" > >#ifndef HAVE_BSD_SIGNAL_H >#define HAVE_BSD_SIGNAL_H 0 >#endif ># 63 "./ncurses_def.h" > >#ifndef HAVE_BTOWC >#define HAVE_BTOWC 0 >#endif ># 67 "./ncurses_def.h" > >#ifndef HAVE_BUILTIN_H >#define HAVE_BUILTIN_H 0 >#endif ># 71 "./ncurses_def.h" > >#ifndef HAVE_CHGAT >#define HAVE_CHGAT 1 >#endif ># 75 "./ncurses_def.h" > >#ifndef HAVE_COLOR_SET >#define HAVE_COLOR_SET 1 >#endif ># 79 "./ncurses_def.h" > >#ifndef HAVE_DIRENT_H >#define HAVE_DIRENT_H 0 >#endif ># 83 "./ncurses_def.h" > >#ifndef HAVE_ERRNO >#define HAVE_ERRNO 0 >#endif ># 87 "./ncurses_def.h" > >#ifndef HAVE_FCNTL_H >#define HAVE_FCNTL_H 0 >#endif ># 91 "./ncurses_def.h" > >#ifndef HAVE_FILTER >#define HAVE_FILTER 1 >#endif ># 95 "./ncurses_def.h" > >#ifndef HAVE_FORM_H >#define HAVE_FORM_H 0 >#endif ># 99 "./ncurses_def.h" > >#ifndef HAVE_GETBEGX >#define HAVE_GETBEGX 1 >#endif ># 103 "./ncurses_def.h" > >#ifndef HAVE_GETCURX >#define HAVE_GETCURX 1 >#endif ># 107 "./ncurses_def.h" > >#ifndef HAVE_GETCWD >#define HAVE_GETCWD 0 >#endif ># 111 "./ncurses_def.h" > >#ifndef HAVE_GETEGID >#define HAVE_GETEGID 0 >#endif ># 115 "./ncurses_def.h" > >#ifndef HAVE_GETEUID >#define HAVE_GETEUID 0 >#endif ># 119 "./ncurses_def.h" > >#ifndef HAVE_GETMAXX >#define HAVE_GETMAXX 1 >#endif ># 123 "./ncurses_def.h" > >#ifndef HAVE_GETNSTR >#define HAVE_GETNSTR 0 >#endif ># 127 "./ncurses_def.h" > >#ifndef HAVE_GETOPT_H >#define HAVE_GETOPT_H 0 >#endif ># 131 "./ncurses_def.h" > >#ifndef HAVE_GETPARX >#define HAVE_GETPARX 1 >#endif ># 135 "./ncurses_def.h" > >#ifndef HAVE_GETTIMEOFDAY >#define HAVE_GETTIMEOFDAY 0 >#endif ># 139 "./ncurses_def.h" > >#ifndef HAVE_GETTTYNAM >#define HAVE_GETTTYNAM 0 >#endif ># 143 "./ncurses_def.h" > >#ifndef HAVE_GETWIN >#define HAVE_GETWIN 1 >#endif ># 147 "./ncurses_def.h" > >#ifndef HAVE_GPM_H >#define HAVE_GPM_H 0 >#endif ># 151 "./ncurses_def.h" > >#ifndef HAVE_GPP_BUILTIN_H >#define HAVE_GPP_BUILTIN_H 0 >#endif ># 155 "./ncurses_def.h" > >#ifndef HAVE_GXX_BUILTIN_H >#define HAVE_GXX_BUILTIN_H 0 >#endif ># 159 "./ncurses_def.h" > >#ifndef HAVE_HAS_KEY >#define HAVE_HAS_KEY 0 >#endif ># 163 "./ncurses_def.h" > >#ifndef HAVE_INTTYPES_H >#define HAVE_INTTYPES_H 0 >#endif ># 167 "./ncurses_def.h" > >#ifndef HAVE_IOSTREAM >#define HAVE_IOSTREAM 0 >#endif ># 171 "./ncurses_def.h" > >#ifndef HAVE_ISASCII >#define HAVE_ISASCII 0 >#endif ># 175 "./ncurses_def.h" > >#ifndef HAVE_ISSETUGID >#define HAVE_ISSETUGID 0 >#endif ># 179 "./ncurses_def.h" > >#ifndef HAVE_LANGINFO_CODESET >#define HAVE_LANGINFO_CODESET 0 >#endif ># 183 "./ncurses_def.h" > >#ifndef HAVE_LIBC_H >#define HAVE_LIBC_H 0 >#endif ># 187 "./ncurses_def.h" > >#ifndef HAVE_LIBDBMALLOC >#define HAVE_LIBDBMALLOC 0 >#endif ># 191 "./ncurses_def.h" > >#ifndef HAVE_LIBDMALLOC >#define HAVE_LIBDMALLOC 0 >#endif ># 195 "./ncurses_def.h" > >#ifndef HAVE_LIBFORM >#define HAVE_LIBFORM 0 >#endif ># 199 "./ncurses_def.h" > >#ifndef HAVE_LIBGPM >#define HAVE_LIBGPM 0 >#endif ># 203 "./ncurses_def.h" > >#ifndef HAVE_LIBMENU >#define HAVE_LIBMENU 0 >#endif ># 207 "./ncurses_def.h" > >#ifndef HAVE_LIBMPATROL >#define HAVE_LIBMPATROL 0 >#endif ># 211 "./ncurses_def.h" > >#ifndef HAVE_LIBPANEL >#define HAVE_LIBPANEL 0 >#endif ># 215 "./ncurses_def.h" > >#ifndef HAVE_LIMITS_H >#define HAVE_LIMITS_H 0 >#endif ># 219 "./ncurses_def.h" > >#ifndef HAVE_LINK >#define HAVE_LINK 0 >#endif ># 223 "./ncurses_def.h" > >#ifndef HAVE_LOCALE_H >#define HAVE_LOCALE_H 0 >#endif ># 227 "./ncurses_def.h" > >#ifndef HAVE_LONG_FILE_NAMES >#define HAVE_LONG_FILE_NAMES 0 >#endif ># 231 "./ncurses_def.h" > >#ifndef HAVE_MATH_H >#define HAVE_MATH_H 0 >#endif ># 235 "./ncurses_def.h" > >#ifndef HAVE_MBLEN >#define HAVE_MBLEN 0 >#endif ># 239 "./ncurses_def.h" > >#ifndef HAVE_MBRLEN >#define HAVE_MBRLEN 0 >#endif ># 243 "./ncurses_def.h" > >#ifndef HAVE_MBRTOWC >#define HAVE_MBRTOWC 0 >#endif ># 247 "./ncurses_def.h" > >#ifndef HAVE_MBSRTOWCS >#define HAVE_MBSRTOWCS 0 >#endif ># 251 "./ncurses_def.h" > >#ifndef HAVE_MBSTOWCS >#define HAVE_MBSTOWCS 0 >#endif ># 255 "./ncurses_def.h" > >#ifndef HAVE_MBTOWC >#define HAVE_MBTOWC 0 >#endif ># 259 "./ncurses_def.h" > >#ifndef HAVE_MENU_H >#define HAVE_MENU_H 0 >#endif ># 263 "./ncurses_def.h" > >#ifndef HAVE_MKSTEMP >#define HAVE_MKSTEMP 0 >#endif ># 267 "./ncurses_def.h" > >#ifndef HAVE_MVVLINE >#define HAVE_MVVLINE 1 >#endif ># 271 "./ncurses_def.h" > >#ifndef HAVE_MVWVLINE >#define HAVE_MVWVLINE 1 >#endif ># 275 "./ncurses_def.h" > >#ifndef HAVE_NANOSLEEP >#define HAVE_NANOSLEEP 0 >#endif ># 279 "./ncurses_def.h" > >#ifndef HAVE_NC_ALLOC_H >#define HAVE_NC_ALLOC_H 0 >#endif ># 283 "./ncurses_def.h" > >#ifndef HAVE_PANEL_H >#define HAVE_PANEL_H 0 >#endif ># 287 "./ncurses_def.h" > >#ifndef HAVE_POLL >#define HAVE_POLL 0 >#endif ># 291 "./ncurses_def.h" > >#ifndef HAVE_POLL_H >#define HAVE_POLL_H 0 >#endif ># 295 "./ncurses_def.h" > >#ifndef HAVE_PURIFY >#define HAVE_PURIFY 0 >#endif ># 299 "./ncurses_def.h" > >#ifndef HAVE_PUTENV >#define HAVE_PUTENV 0 >#endif ># 303 "./ncurses_def.h" > >#ifndef HAVE_PUTWC >#define HAVE_PUTWC 0 >#endif ># 307 "./ncurses_def.h" > >#ifndef HAVE_PUTWIN >#define HAVE_PUTWIN 1 >#endif ># 311 "./ncurses_def.h" > >#ifndef HAVE_REGEXPR_H_FUNCS >#define HAVE_REGEXPR_H_FUNCS 0 >#endif ># 315 "./ncurses_def.h" > >#ifndef HAVE_REGEXP_H_FUNCS >#define HAVE_REGEXP_H_FUNCS 0 >#endif ># 319 "./ncurses_def.h" > >#ifndef HAVE_REGEX_H_FUNCS >#define HAVE_REGEX_H_FUNCS 0 >#endif ># 323 "./ncurses_def.h" > >#ifndef HAVE_REMOVE >#define HAVE_REMOVE 0 >#endif ># 327 "./ncurses_def.h" > >#ifndef HAVE_RESIZETERM >#define HAVE_RESIZETERM 0 >#endif ># 331 "./ncurses_def.h" > >#ifndef HAVE_RESIZE_TERM >#define HAVE_RESIZE_TERM 0 >#endif ># 335 "./ncurses_def.h" > >#ifndef HAVE_RIPOFFLINE >#define HAVE_RIPOFFLINE 1 >#endif ># 339 "./ncurses_def.h" > >#ifndef HAVE_SCR_DUMP >#define HAVE_SCR_DUMP 1 >#endif ># 343 "./ncurses_def.h" > >#ifndef HAVE_SELECT >#define HAVE_SELECT 0 >#endif ># 347 "./ncurses_def.h" > >#ifndef HAVE_SETBUF >#define HAVE_SETBUF 0 >#endif ># 351 "./ncurses_def.h" > >#ifndef HAVE_SETBUFFER >#define HAVE_SETBUFFER 0 >#endif ># 355 "./ncurses_def.h" > >#ifndef HAVE_SETENV >#define HAVE_SETENV 0 >#endif ># 359 "./ncurses_def.h" > >#ifndef HAVE_SETUPTERM >#define HAVE_SETUPTERM 1 >#endif ># 363 "./ncurses_def.h" > >#ifndef HAVE_SETVBUF >#define HAVE_SETVBUF 0 >#endif ># 367 "./ncurses_def.h" > >#ifndef HAVE_SGTTY_H >#define HAVE_SGTTY_H 0 >#endif ># 371 "./ncurses_def.h" > >#ifndef HAVE_SIGACTION >#define HAVE_SIGACTION 0 >#endif ># 375 "./ncurses_def.h" > >#ifndef HAVE_SIGVEC >#define HAVE_SIGVEC 0 >#endif ># 379 "./ncurses_def.h" > >#ifndef HAVE_SIZECHANGE >#define HAVE_SIZECHANGE 0 >#endif ># 383 "./ncurses_def.h" > >#ifndef HAVE_SLK_COLOR >#define HAVE_SLK_COLOR 0 >#endif ># 387 "./ncurses_def.h" > >#ifndef HAVE_SLK_INIT >#define HAVE_SLK_INIT 1 >#endif ># 391 "./ncurses_def.h" > >#ifndef HAVE_SNPRINTF >#define HAVE_SNPRINTF 0 >#endif ># 395 "./ncurses_def.h" > >#ifndef HAVE_STDINT_H >#define HAVE_STDINT_H 0 >#endif ># 399 "./ncurses_def.h" > >#ifndef HAVE_STRDUP >#define HAVE_STRDUP 0 >#endif ># 403 "./ncurses_def.h" > >#ifndef HAVE_STRLCAT >#define HAVE_STRLCAT 0 >#endif ># 407 "./ncurses_def.h" > >#ifndef HAVE_STRLCPY >#define HAVE_STRLCPY 0 >#endif ># 411 "./ncurses_def.h" > >#ifndef HAVE_STRSTR >#define HAVE_STRSTR 0 >#endif ># 415 "./ncurses_def.h" > >#ifndef HAVE_SYMLINK >#define HAVE_SYMLINK 0 >#endif ># 419 "./ncurses_def.h" > >#ifndef HAVE_SYS_BSDTYPES_H >#define HAVE_SYS_BSDTYPES_H 0 >#endif ># 423 "./ncurses_def.h" > >#ifndef HAVE_SYS_IOCTL_H >#define HAVE_SYS_IOCTL_H 0 >#endif ># 427 "./ncurses_def.h" > >#ifndef HAVE_SYS_PARAM_H >#define HAVE_SYS_PARAM_H 0 >#endif ># 431 "./ncurses_def.h" > >#ifndef HAVE_SYS_POLL_H >#define HAVE_SYS_POLL_H 0 >#endif ># 435 "./ncurses_def.h" > >#ifndef HAVE_SYS_SELECT_H >#define HAVE_SYS_SELECT_H 0 >#endif ># 439 "./ncurses_def.h" > >#ifndef HAVE_SYS_TERMIO_H >#define HAVE_SYS_TERMIO_H 0 >#endif ># 443 "./ncurses_def.h" > >#ifndef HAVE_SYS_TIMES_H >#define HAVE_SYS_TIMES_H 0 >#endif ># 447 "./ncurses_def.h" > >#ifndef HAVE_SYS_TIME_H >#define HAVE_SYS_TIME_H 0 >#endif ># 451 "./ncurses_def.h" > >#ifndef HAVE_SYS_TIME_SELECT >#define HAVE_SYS_TIME_SELECT 0 >#endif ># 455 "./ncurses_def.h" > >#ifndef HAVE_TCGETATTR >#define HAVE_TCGETATTR 0 >#endif ># 459 "./ncurses_def.h" > >#ifndef HAVE_TCGETPGRP >#define HAVE_TCGETPGRP 0 >#endif ># 463 "./ncurses_def.h" > >#ifndef HAVE_TELL >#define HAVE_TELL 0 >#endif ># 467 "./ncurses_def.h" > >#ifndef HAVE_TERMATTRS >#define HAVE_TERMATTRS 1 >#endif ># 471 "./ncurses_def.h" > >#ifndef HAVE_TERMIOS_H >#define HAVE_TERMIOS_H 0 >#endif ># 475 "./ncurses_def.h" > >#ifndef HAVE_TERMIO_H >#define HAVE_TERMIO_H 0 >#endif ># 479 "./ncurses_def.h" > >#ifndef HAVE_TERMNAME >#define HAVE_TERMNAME 1 >#endif ># 483 "./ncurses_def.h" > >#ifndef HAVE_TERM_ENTRY_H >#define HAVE_TERM_ENTRY_H 1 >#endif ># 487 "./ncurses_def.h" > >#ifndef HAVE_TERM_H >#define HAVE_TERM_H 1 >#endif ># 491 "./ncurses_def.h" > >#ifndef HAVE_TGETENT >#define HAVE_TGETENT 1 >#endif ># 495 "./ncurses_def.h" > >#ifndef HAVE_TIGETNUM >#define HAVE_TIGETNUM 1 >#endif ># 499 "./ncurses_def.h" > >#ifndef HAVE_TIGETSTR >#define HAVE_TIGETSTR 1 >#endif ># 503 "./ncurses_def.h" > >#ifndef HAVE_TIMES >#define HAVE_TIMES 0 >#endif ># 507 "./ncurses_def.h" > >#ifndef HAVE_TTYENT_H >#define HAVE_TTYENT_H 0 >#endif ># 511 "./ncurses_def.h" > >#ifndef HAVE_TYPEAHEAD >#define HAVE_TYPEAHEAD 1 >#endif ># 515 "./ncurses_def.h" > >#ifndef HAVE_TYPEINFO >#define HAVE_TYPEINFO 0 >#endif ># 519 "./ncurses_def.h" > >#ifndef HAVE_TYPE_ATTR_T >#define HAVE_TYPE_ATTR_T 0 >#endif ># 523 "./ncurses_def.h" > >#ifndef HAVE_TYPE_SIGACTION >#define HAVE_TYPE_SIGACTION 0 >#endif ># 527 "./ncurses_def.h" > >#ifndef HAVE_UNCTRL_H >#define HAVE_UNCTRL_H 1 >#endif ># 531 "./ncurses_def.h" > >#ifndef HAVE_UNISTD_H >#define HAVE_UNISTD_H 0 >#endif ># 535 "./ncurses_def.h" > >#ifndef HAVE_UNLINK >#define HAVE_UNLINK 0 >#endif ># 539 "./ncurses_def.h" > >#ifndef HAVE_USE_DEFAULT_COLORS >#define HAVE_USE_DEFAULT_COLORS 0 >#endif ># 543 "./ncurses_def.h" > >#ifndef HAVE_USE_SCREEN >#define HAVE_USE_SCREEN 0 >#endif ># 547 "./ncurses_def.h" > >#ifndef HAVE_USE_WINDOW >#define HAVE_USE_WINDOW 0 >#endif ># 551 "./ncurses_def.h" > >#ifndef HAVE_VFSCANF >#define HAVE_VFSCANF 0 >#endif ># 555 "./ncurses_def.h" > >#ifndef HAVE_VSNPRINTF >#define HAVE_VSNPRINTF 0 >#endif ># 559 "./ncurses_def.h" > >#ifndef HAVE_VSSCANF >#define HAVE_VSSCANF 0 >#endif ># 563 "./ncurses_def.h" > >#ifndef HAVE_WCSRTOMBS >#define HAVE_WCSRTOMBS 0 >#endif ># 567 "./ncurses_def.h" > >#ifndef HAVE_WCSTOMBS >#define HAVE_WCSTOMBS 0 >#endif ># 571 "./ncurses_def.h" > >#ifndef HAVE_WCTOB >#define HAVE_WCTOB 0 >#endif ># 575 "./ncurses_def.h" > >#ifndef HAVE_WCTOMB >#define HAVE_WCTOMB 0 >#endif ># 579 "./ncurses_def.h" > >#ifndef HAVE_WCTYPE_H >#define HAVE_WCTYPE_H 0 >#endif ># 583 "./ncurses_def.h" > >#ifndef HAVE_WINSSTR >#define HAVE_WINSSTR 1 >#endif ># 587 "./ncurses_def.h" > >#ifndef HAVE_WORKING_POLL >#define HAVE_WORKING_POLL 0 >#endif ># 591 "./ncurses_def.h" > >#ifndef HAVE_WRESIZE >#define HAVE_WRESIZE 0 >#endif ># 595 "./ncurses_def.h" > >#ifndef HAVE_WSYNCDOWN >#define HAVE_WSYNCDOWN 1 >#endif ># 599 "./ncurses_def.h" > >#ifndef HAVE__DOSCAN >#define HAVE__DOSCAN 0 >#endif ># 603 "./ncurses_def.h" > >#ifndef MIXEDCASE_FILENAMES >#define MIXEDCASE_FILENAMES 0 >#endif ># 607 "./ncurses_def.h" > >#ifndef NCURSES_CHAR_EQ >#define NCURSES_CHAR_EQ 0 >#endif ># 611 "./ncurses_def.h" > >#ifndef NCURSES_EXPANDED >#define NCURSES_EXPANDED 0 >#endif ># 615 "./ncurses_def.h" > >#ifndef NCURSES_EXT_COLORS >#define NCURSES_EXT_COLORS 0 >#endif ># 619 "./ncurses_def.h" > >#ifndef NCURSES_EXT_FUNCS >#define NCURSES_EXT_FUNCS 0 >#endif ># 623 "./ncurses_def.h" > >#ifndef NCURSES_NO_PADDING >#define NCURSES_NO_PADDING 0 >#endif ># 627 "./ncurses_def.h" > >#ifndef NCURSES_OSPEED_COMPAT >#define NCURSES_OSPEED_COMPAT 0 >#endif ># 631 "./ncurses_def.h" > >#ifndef NCURSES_PATHSEP >#define NCURSES_PATHSEP ':' >#endif ># 635 "./ncurses_def.h" > >#ifndef NCURSES_WIDECHAR >#define NCURSES_WIDECHAR 0 >#endif ># 639 "./ncurses_def.h" > >#ifndef NEED_PTEM_H >#define NEED_PTEM_H 0 >#endif ># 643 "./ncurses_def.h" > >#ifndef NO_LEAKS >#define NO_LEAKS 0 >#endif ># 647 "./ncurses_def.h" > >#ifndef PURE_TERMINFO >#define PURE_TERMINFO 0 >#endif ># 651 "./ncurses_def.h" > >#ifndef STDC_HEADERS >#define STDC_HEADERS 0 >#endif ># 655 "./ncurses_def.h" > >#ifndef SVR4_ACTION >#define SVR4_ACTION 0 >#endif ># 659 "./ncurses_def.h" > >#ifndef SVR4_TERMIO >#define SVR4_TERMIO 0 >#endif ># 663 "./ncurses_def.h" > >#ifndef SYSTEM_NAME >#define SYSTEM_NAME "unknown" >#endif ># 667 "./ncurses_def.h" > >#ifndef TERMINFO >#define TERMINFO "none" >#endif ># 671 "./ncurses_def.h" > >#ifndef TERMPATH >#define TERMPATH "none" >#endif ># 675 "./ncurses_def.h" > >#ifndef TIME_WITH_SYS_TIME >#define TIME_WITH_SYS_TIME 0 >#endif ># 679 "./ncurses_def.h" > >#ifndef TYPEOF_CHTYPE >#define TYPEOF_CHTYPE 0 >#endif ># 683 "./ncurses_def.h" > >#ifndef USE_COLORFGBG >#define USE_COLORFGBG 0 >#endif ># 687 "./ncurses_def.h" > >#ifndef USE_GETCAP >#define USE_GETCAP 0 >#endif ># 691 "./ncurses_def.h" > >#ifndef USE_GETCAP_CACHE >#define USE_GETCAP_CACHE 0 >#endif ># 695 "./ncurses_def.h" > >#ifndef USE_HARD_TABS >#define USE_HARD_TABS 0 >#endif ># 699 "./ncurses_def.h" > >#ifndef USE_HASHED_DB >#define USE_HASHED_DB 0 >#endif ># 703 "./ncurses_def.h" > >#ifndef USE_HASHMAP >#define USE_HASHMAP 0 >#endif ># 707 "./ncurses_def.h" > >#ifndef USE_HOME_TERMINFO >#define USE_HOME_TERMINFO 0 >#endif ># 711 "./ncurses_def.h" > >#ifndef USE_LINKS >#define USE_LINKS 0 >#endif ># 715 "./ncurses_def.h" > >#ifndef USE_MY_MEMMOVE >#define USE_MY_MEMMOVE 0 >#endif ># 719 "./ncurses_def.h" > >#ifndef USE_OK_BCOPY >#define USE_OK_BCOPY 0 >#endif ># 723 "./ncurses_def.h" > >#ifndef USE_PTHREADS_EINTR >#define USE_PTHREADS_EINTR 0 >#endif ># 727 "./ncurses_def.h" > >#ifndef USE_RCS_IDS >#define USE_RCS_IDS 0 >#endif ># 731 "./ncurses_def.h" > >#ifndef USE_REENTRANT >#define USE_REENTRANT 0 >#endif ># 735 "./ncurses_def.h" > >#ifndef USE_SAFE_SPRINTF >#define USE_SAFE_SPRINTF 0 >#endif ># 739 "./ncurses_def.h" > >#ifndef USE_SCROLL_HINTS >#define USE_SCROLL_HINTS 0 >#endif ># 743 "./ncurses_def.h" > >#ifndef USE_SIGWINCH >#define USE_SIGWINCH 0 >#endif ># 747 "./ncurses_def.h" > >#ifndef USE_STRING_HACKS >#define USE_STRING_HACKS 0 >#endif ># 751 "./ncurses_def.h" > >#ifndef USE_SYMLINKS >#define USE_SYMLINKS 0 >#endif ># 755 "./ncurses_def.h" > >#ifndef USE_SYSMOUSE >#define USE_SYSMOUSE 0 >#endif ># 759 "./ncurses_def.h" > >#ifndef USE_WEAK_SYMBOLS >#define USE_WEAK_SYMBOLS 0 >#endif ># 763 "./ncurses_def.h" > >#ifndef USE_WIDEC_SUPPORT >#define USE_WIDEC_SUPPORT 0 >#endif ># 767 "./ncurses_def.h" > >#ifndef USE_XMC_SUPPORT >#define USE_XMC_SUPPORT 0 >#endif ># 771 "./ncurses_def.h" > >#endif /* NC_DEFINE_H */ ># 773 "./ncurses_def.h" ># 214 "/usr/src/lib/ncurses/ncurses/ncurses_cfg.h" 2 > > /* The C compiler may not treat these properly but C++ has to */ >#ifdef __cplusplus >#undef const >#undef inline >#else ># 220 "/usr/src/lib/ncurses/ncurses/ncurses_cfg.h" >#if defined(lint) || defined(TRACE) >#undef inline >#define inline /* nothing */ >#endif ># 224 "/usr/src/lib/ncurses/ncurses/ncurses_cfg.h" >#endif ># 225 "/usr/src/lib/ncurses/ncurses/ncurses_cfg.h" > > /* On HP-UX, the C compiler doesn't grok mbstate_t without > -D_XOPEN_SOURCE=500. However, this causes problems on > IRIX. So, we #define mbstate_t to int in configure.in > only for the C compiler if needed. */ >#ifndef __cplusplus >#ifdef NEED_MBSTATE_T_DEF >#define mbstate_t int >#endif ># 234 "/usr/src/lib/ncurses/ncurses/ncurses_cfg.h" >#endif ># 235 "/usr/src/lib/ncurses/ncurses/ncurses_cfg.h" > >#endif /* NC_CONFIG_H */ ># 237 "/usr/src/lib/ncurses/ncurses/ncurses_cfg.h" ># 57 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" 2 > >#if USE_RCS_IDS >#define MODULE_ID(id) static const char Ident[] = id; >#else ># 61 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#define MODULE_ID(id) /*nothing*/ >#endif ># 63 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#if 0 /* expanded by -frewrite-includes */ >#include <stddef.h> /* for offsetof */ >#endif /* expanded by -frewrite-includes */ ># 64 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" ># 1 "/usr/obj/usr/src/tmp/usr/include/stddef.h" 1 3 4 >/*- > * Copyright (c) 1990, 1993 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)stddef.h 8.1 (Berkeley) 6/2/93 > * > * $FreeBSD: stable/11/include/stddef.h 310134 2016-12-16 01:14:00Z jhb $ > */ > >#ifndef _STDDEF_H_ >#define _STDDEF_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 37 "/usr/obj/usr/src/tmp/usr/include/stddef.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 1 3 4 >/*- > * Copyright (c) 1991, 1993 > * The Regents of the University of California. All rights reserved. > * > * This code is derived from software contributed to Berkeley by > * Berkeley Software Design, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 4. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)cdefs.h 8.8 (Berkeley) 1/9/95 > * $FreeBSD: stable/11/sys/sys/cdefs.h 312860 2017-01-27 04:52:27Z pfg $ > */ > >#ifndef _SYS_CDEFS_H_ >#define _SYS_CDEFS_H_ > >/* > * Testing against Clang-specific extensions. > */ >#ifndef __has_attribute >#define __has_attribute(x) 0 >#endif ># 45 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#ifndef __has_extension >#define __has_extension __has_feature >#endif ># 48 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#ifndef __has_feature >#define __has_feature(x) 0 >#endif ># 51 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#ifndef __has_include >#define __has_include(x) 0 >#endif ># 54 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#ifndef __has_builtin >#define __has_builtin(x) 0 >#endif ># 57 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#if defined(__cplusplus) >#define __BEGIN_DECLS extern "C" { >#define __END_DECLS } >#else ># 62 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __BEGIN_DECLS >#define __END_DECLS >#endif ># 65 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >/* > * This code has been put in place to help reduce the addition of > * compiler specific defines in FreeBSD code. It helps to aid in > * having a compiler-agnostic source tree. > */ > >#if defined(__GNUC__) || defined(__INTEL_COMPILER) > >#if __GNUC__ >= 3 || defined(__INTEL_COMPILER) >#define __GNUCLIKE_ASM 3 >#define __GNUCLIKE_MATH_BUILTIN_CONSTANTS >#else ># 78 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __GNUCLIKE_ASM 2 >#endif ># 80 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __GNUCLIKE___TYPEOF 1 >#define __GNUCLIKE___OFFSETOF 1 >#define __GNUCLIKE___SECTION 1 > >#ifndef __INTEL_COMPILER >#define __GNUCLIKE_CTOR_SECTION_HANDLING 1 >#endif ># 87 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#define __GNUCLIKE_BUILTIN_CONSTANT_P 1 >#if defined(__INTEL_COMPILER) && defined(__cplusplus) && \ > __INTEL_COMPILER < 800 >#undef __GNUCLIKE_BUILTIN_CONSTANT_P >#endif ># 93 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#if (__GNUC_MINOR__ > 95 || __GNUC__ >= 3) >#define __GNUCLIKE_BUILTIN_VARARGS 1 >#define __GNUCLIKE_BUILTIN_STDARG 1 >#define __GNUCLIKE_BUILTIN_VAALIST 1 >#endif ># 99 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#if defined(__GNUC__) >#define __GNUC_VA_LIST_COMPATIBILITY 1 >#endif ># 103 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >/* > * Compiler memory barriers, specific to gcc and clang. > */ >#if defined(__GNUC__) >#define __compiler_membar() __asm __volatile(" " : : : "memory") >#endif ># 110 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#ifndef __INTEL_COMPILER >#define __GNUCLIKE_BUILTIN_NEXT_ARG 1 >#define __GNUCLIKE_MATH_BUILTIN_RELOPS >#endif ># 115 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#define __GNUCLIKE_BUILTIN_MEMCPY 1 > >/* XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced */ >#define __CC_SUPPORTS_INLINE 1 >#define __CC_SUPPORTS___INLINE 1 >#define __CC_SUPPORTS___INLINE__ 1 > >#define __CC_SUPPORTS___FUNC__ 1 >#define __CC_SUPPORTS_WARNING 1 > >#define __CC_SUPPORTS_VARADIC_XXX 1 /* see varargs.h */ > >#define __CC_SUPPORTS_DYNAMIC_ARRAY_INIT 1 > >#endif /* __GNUC__ || __INTEL_COMPILER */ ># 131 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >/* > * Macro to test if we're using a specific version of gcc or later. > */ >#if defined(__GNUC__) && !defined(__INTEL_COMPILER) >#define __GNUC_PREREQ__(ma, mi) \ > (__GNUC__ > (ma) || __GNUC__ == (ma) && __GNUC_MINOR__ >= (mi)) >#else ># 139 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __GNUC_PREREQ__(ma, mi) 0 >#endif ># 141 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >/* > * The __CONCAT macro is used to concatenate parts of symbol names, e.g. > * with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. > * The __CONCAT macro is a bit tricky to use if it must work in non-ANSI > * mode -- there must be no spaces between its arguments, and for nested > * __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also > * concatenate double-quoted strings produced by the __STRING macro, but > * this only works with ANSI C. > * > * __XSTRING is like __STRING, but it expands any macros in its argument > * first. It is only available with ANSI C. > */ >#if defined(__STDC__) || defined(__cplusplus) >#define __P(protos) protos /* full-blown ANSI C */ >#define __CONCAT1(x,y) x ## y >#define __CONCAT(x,y) __CONCAT1(x,y) >#define __STRING(x) #x /* stringify without expanding x */ >#define __XSTRING(x) __STRING(x) /* expand x, then stringify */ > >#define __const const /* define reserved names to standard */ >#define __signed signed >#define __volatile volatile >#if defined(__cplusplus) >#define __inline inline /* convert to C++ keyword */ >#else ># 167 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#if !(defined(__CC_SUPPORTS___INLINE)) >#define __inline /* delete GCC keyword */ >#endif /* ! __CC_SUPPORTS___INLINE */ ># 170 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#endif /* !__cplusplus */ ># 171 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#else /* !(__STDC__ || __cplusplus) */ ># 173 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __P(protos) () /* traditional C preprocessor */ >#define __CONCAT(x,y) x/**/y >#define __STRING(x) "x" > >#if !defined(__CC_SUPPORTS___INLINE) >#define __const /* delete pseudo-ANSI C keywords */ >#define __inline >#define __signed >#define __volatile >/* > * In non-ANSI C environments, new programs will want ANSI-only C keywords > * deleted from the program and old programs will want them left alone. > * When using a compiler other than gcc, programs using the ANSI C keywords > * const, inline etc. as normal identifiers should define -DNO_ANSI_KEYWORDS. > * When using "gcc -traditional", we assume that this is the intent; if > * __GNUC__ is defined but __STDC__ is not, we leave the new keywords alone. > */ >#ifndef NO_ANSI_KEYWORDS >#define const /* delete ANSI C keywords */ >#define inline >#define signed >#define volatile >#endif /* !NO_ANSI_KEYWORDS */ ># 196 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#endif /* !__CC_SUPPORTS___INLINE */ ># 197 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#endif /* !(__STDC__ || __cplusplus) */ ># 198 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >/* > * Compiler-dependent macros to help declare dead (non-returning) and > * pure (no side effects) functions, and unused variables. They are > * null except for versions of gcc that are known to support the features > * properly (old versions of gcc-2 supported the dead and pure features > * in a different (wrong) way). If we do not provide an implementation > * for a given compiler, let the compile fail if it is told to use > * a feature that we cannot live without. > */ >#ifdef lint >#define __dead2 >#define __pure2 >#define __unused >#define __packed >#define __aligned(x) >#define __alloc_align(x) >#define __alloc_size(x) >#define __section(x) >#define __weak_symbol >#else ># 219 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __weak_symbol __attribute__((__weak__)) >#if !__GNUC_PREREQ__(2, 5) && !defined(__INTEL_COMPILER) >#define __dead2 >#define __pure2 >#define __unused >#endif ># 225 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#if __GNUC__ == 2 && __GNUC_MINOR__ >= 5 && __GNUC_MINOR__ < 7 && !defined(__INTEL_COMPILER) >#define __dead2 __attribute__((__noreturn__)) >#define __pure2 __attribute__((__const__)) >#define __unused >/* XXX Find out what to do for __packed, __aligned and __section */ >#endif ># 231 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#if __GNUC_PREREQ__(2, 7) || defined(__INTEL_COMPILER) >#define __dead2 __attribute__((__noreturn__)) >#define __pure2 __attribute__((__const__)) >#define __unused __attribute__((__unused__)) >#define __used __attribute__((__used__)) >#define __packed __attribute__((__packed__)) >#define __aligned(x) __attribute__((__aligned__(x))) >#define __section(x) __attribute__((__section__(x))) >#endif ># 240 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#if __GNUC_PREREQ__(4, 3) || __has_attribute(__alloc_size__) >#define __alloc_size(x) __attribute__((__alloc_size__(x))) >#else ># 243 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __alloc_size(x) >#endif ># 245 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#if __GNUC_PREREQ__(4, 9) || __has_attribute(__alloc_align__) >#define __alloc_align(x) __attribute__((__alloc_align__(x))) >#else ># 248 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __alloc_align(x) >#endif ># 250 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#endif /* lint */ ># 251 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#if !__GNUC_PREREQ__(2, 95) >#define __alignof(x) __offsetof(struct { char __a; x __b; }, __b) >#endif ># 255 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >/* > * Keywords added in C11. > */ > >#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112L || defined(lint) > >#if !__has_extension(c_alignas) >#if (defined(__cplusplus) && __cplusplus >= 201103L) || \ > __has_extension(cxx_alignas) >#define _Alignas(x) alignas(x) >#else ># 267 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >/* XXX: Only emulates _Alignas(constant-expression); not _Alignas(type-name). */ >#define _Alignas(x) __aligned(x) >#endif ># 270 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#endif ># 271 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#if defined(__cplusplus) && __cplusplus >= 201103L >#define _Alignof(x) alignof(x) >#else ># 275 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define _Alignof(x) __alignof(x) >#endif ># 277 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#if !defined(__cplusplus) && !__has_extension(c_atomic) && \ > !__has_extension(cxx_atomic) >/* > * No native support for _Atomic(). Place object in structure to prevent > * most forms of direct non-atomic access. > */ >#define _Atomic(T) struct { T volatile __val; } >#endif ># 286 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#if defined(__cplusplus) && __cplusplus >= 201103L >#define _Noreturn [[noreturn]] >#else ># 290 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define _Noreturn __dead2 >#endif ># 292 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#if !__has_extension(c_static_assert) >#if (defined(__cplusplus) && __cplusplus >= 201103L) || \ > __has_extension(cxx_static_assert) >#define _Static_assert(x, y) static_assert(x, y) >#elif __GNUC_PREREQ__(4,6) ># 298 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >/* Nothing, gcc 4.6 and higher has _Static_assert built-in */ >#elif defined(__COUNTER__) ># 300 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define _Static_assert(x, y) __Static_assert(x, __COUNTER__) >#define __Static_assert(x, y) ___Static_assert(x, y) >#define ___Static_assert(x, y) typedef char __assert_ ## y[(x) ? 1 : -1] \ > __unused >#else ># 305 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define _Static_assert(x, y) struct __hack >#endif ># 307 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#endif ># 308 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#if !__has_extension(c_thread_local) >/* > * XXX: Some compilers (Clang 3.3, GCC 4.7) falsely announce C++11 mode > * without actually supporting the thread_local keyword. Don't check for > * the presence of C++11 when defining _Thread_local. > */ >#if /* (defined(__cplusplus) && __cplusplus >= 201103L) || */ \ > __has_extension(cxx_thread_local) >#define _Thread_local thread_local >#else ># 319 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define _Thread_local __thread >#endif ># 321 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#endif ># 322 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#endif /* __STDC_VERSION__ || __STDC_VERSION__ < 201112L */ ># 324 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >/* > * Emulation of C11 _Generic(). Unlike the previously defined C11 > * keywords, it is not possible to implement this using exactly the same > * syntax. Therefore implement something similar under the name > * __generic(). Unlike _Generic(), this macro can only distinguish > * between a single type, so it requires nested invocations to > * distinguish multiple cases. > */ > >#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \ > __has_extension(c_generic_selections) >#define __generic(expr, t, yes, no) \ > _Generic(expr, t: yes, default: no) >#elif __GNUC_PREREQ__(3, 1) && !defined(__cplusplus) ># 339 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __generic(expr, t, yes, no) \ > __builtin_choose_expr( \ > __builtin_types_compatible_p(__typeof(expr), t), yes, no) >#endif ># 343 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >/* > * C99 Static array indices in function parameter declarations. Syntax such as: > * void bar(int myArray[static 10]); > * is allowed in C99 but not in C++. Define __min_size appropriately so > * headers using it can be compiled in either language. Use like this: > * void bar(int myArray[__min_size(10)]); > */ >#if !defined(__cplusplus) && \ > (!defined(__STDC_VERSION) || (__STDC_VERSION__ >= 199901)) >#define __min_size(x) static (x) >#else ># 355 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __min_size(x) (x) >#endif ># 357 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#if __GNUC_PREREQ__(2, 96) >#define __malloc_like __attribute__((__malloc__)) >#define __pure __attribute__((__pure__)) >#else ># 362 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __malloc_like >#define __pure >#endif ># 365 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#if __GNUC_PREREQ__(3, 1) || (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 800) >#define __always_inline __attribute__((__always_inline__)) >#else ># 369 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __always_inline >#endif ># 371 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#if __GNUC_PREREQ__(3, 1) >#define __noinline __attribute__ ((__noinline__)) >#else ># 375 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __noinline >#endif ># 377 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#if __GNUC_PREREQ__(3, 3) >#define __nonnull(x) __attribute__((__nonnull__(x))) >#define __nonnull_all __attribute__((__nonnull__)) >#else ># 382 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __nonnull(x) >#define __nonnull_all >#endif ># 385 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#if __GNUC_PREREQ__(3, 4) >#define __fastcall __attribute__((__fastcall__)) >#define __result_use_check __attribute__((__warn_unused_result__)) >#else ># 390 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __fastcall >#define __result_use_check >#endif ># 393 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#if __GNUC_PREREQ__(4, 1) >#define __returns_twice __attribute__((__returns_twice__)) >#else ># 397 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __returns_twice >#endif ># 399 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#if __GNUC_PREREQ__(4, 6) || __has_builtin(__builtin_unreachable) >#define __unreachable() __builtin_unreachable() >#else ># 403 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __unreachable() ((void)0) >#endif ># 405 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >/* XXX: should use `#if __STDC_VERSION__ < 199901'. */ >#if !__GNUC_PREREQ__(2, 7) && !defined(__INTEL_COMPILER) >#define __func__ NULL >#endif ># 410 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#if (defined(__INTEL_COMPILER) || (defined(__GNUC__) && __GNUC__ >= 2)) && !defined(__STRICT_ANSI__) || __STDC_VERSION__ >= 199901 >#define __LONG_LONG_SUPPORTED >#endif ># 414 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >/* C++11 exposes a load of C99 stuff */ >#if defined(__cplusplus) && __cplusplus >= 201103L >#define __LONG_LONG_SUPPORTED >#ifndef __STDC_LIMIT_MACROS >#define __STDC_LIMIT_MACROS >#endif ># 421 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#ifndef __STDC_CONSTANT_MACROS >#define __STDC_CONSTANT_MACROS >#endif ># 424 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#endif ># 425 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >/* > * GCC 2.95 provides `__restrict' as an extension to C90 to support the > * C99-specific `restrict' type qualifier. We happen to use `__restrict' as > * a way to define the `restrict' type qualifier without disturbing older > * software that is unaware of C99 keywords. > */ >#if !(__GNUC__ == 2 && __GNUC_MINOR__ == 95) >#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901 || defined(lint) >#define __restrict >#else ># 436 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __restrict restrict >#endif ># 438 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#endif ># 439 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >/* > * GNU C version 2.96 adds explicit branch prediction so that > * the CPU back-end can hint the processor and also so that > * code blocks can be reordered such that the predicted path > * sees a more linear flow, thus improving cache behavior, etc. > * > * The following two macros provide us with a way to utilize this > * compiler feature. Use __predict_true() if you expect the expression > * to evaluate to true, and __predict_false() if you expect the > * expression to evaluate to false. > * > * A few notes about usage: > * > * * Generally, __predict_false() error condition checks (unless > * you have some _strong_ reason to do otherwise, in which case > * document it), and/or __predict_true() `no-error' condition > * checks, assuming you want to optimize for the no-error case. > * > * * Other than that, if you don't know the likelihood of a test > * succeeding from empirical or other `hard' evidence, don't > * make predictions. > * > * * These are meant to be used in places that are run `a lot'. > * It is wasteful to make predictions in code that is run > * seldomly (e.g. at subsystem initialization time) as the > * basic block reordering that this affects can often generate > * larger code. > */ >#if __GNUC_PREREQ__(2, 96) >#define __predict_true(exp) __builtin_expect((exp), 1) >#define __predict_false(exp) __builtin_expect((exp), 0) >#else ># 472 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __predict_true(exp) (exp) >#define __predict_false(exp) (exp) >#endif ># 475 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#if __GNUC_PREREQ__(4, 0) >#define __null_sentinel __attribute__((__sentinel__)) >#define __exported __attribute__((__visibility__("default"))) >#define __hidden __attribute__((__visibility__("hidden"))) >#else ># 481 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __null_sentinel >#define __exported >#define __hidden >#endif ># 485 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >/* > * We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h> > * require it. > */ >#if __GNUC_PREREQ__(4, 1) >#define __offsetof(type, field) __builtin_offsetof(type, field) >#else ># 493 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#ifndef __cplusplus >#define __offsetof(type, field) \ > ((__size_t)(__uintptr_t)((const volatile void *)&((type *)0)->field)) >#else ># 497 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __offsetof(type, field) \ > (__offsetof__ (reinterpret_cast <__size_t> \ > (&reinterpret_cast <const volatile char &> \ > (static_cast<type *> (0)->field)))) >#endif ># 502 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#endif ># 503 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __rangeof(type, start, end) \ > (__offsetof(type, end) - __offsetof(type, start)) > >/* > * Given the pointer x to the member m of the struct s, return > * a pointer to the containing structure. When using GCC, we first > * assign pointer x to a local variable, to check that its type is > * compatible with member m. > */ >#if __GNUC_PREREQ__(3, 1) >#define __containerof(x, s, m) ({ \ > const volatile __typeof(((s *)0)->m) *__x = (x); \ > __DEQUALIFY(s *, (const volatile char *)__x - __offsetof(s, m));\ >}) >#else ># 518 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __containerof(x, s, m) \ > __DEQUALIFY(s *, (const volatile char *)(x) - __offsetof(s, m)) >#endif ># 521 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >/* > * Compiler-dependent macros to declare that functions take printf-like > * or scanf-like arguments. They are null except for versions of gcc > * that are known to support the features properly (old versions of gcc-2 > * didn't permit keeping the keywords out of the application namespace). > */ >#if !__GNUC_PREREQ__(2, 7) && !defined(__INTEL_COMPILER) >#define __printflike(fmtarg, firstvararg) >#define __scanflike(fmtarg, firstvararg) >#define __format_arg(fmtarg) >#define __strfmonlike(fmtarg, firstvararg) >#define __strftimelike(fmtarg, firstvararg) >#else ># 535 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __printflike(fmtarg, firstvararg) \ > __attribute__((__format__ (__printf__, fmtarg, firstvararg))) >#define __scanflike(fmtarg, firstvararg) \ > __attribute__((__format__ (__scanf__, fmtarg, firstvararg))) >#define __format_arg(fmtarg) __attribute__((__format_arg__ (fmtarg))) >#define __strfmonlike(fmtarg, firstvararg) \ > __attribute__((__format__ (__strfmon__, fmtarg, firstvararg))) >#define __strftimelike(fmtarg, firstvararg) \ > __attribute__((__format__ (__strftime__, fmtarg, firstvararg))) >#endif ># 545 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >/* Compiler-dependent macros that rely on FreeBSD-specific extensions. */ >#if defined(__FreeBSD_cc_version) && __FreeBSD_cc_version >= 300001 && \ > defined(__GNUC__) && !defined(__INTEL_COMPILER) >#define __printf0like(fmtarg, firstvararg) \ > __attribute__((__format__ (__printf0__, fmtarg, firstvararg))) >#else ># 552 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __printf0like(fmtarg, firstvararg) >#endif ># 554 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#if defined(__GNUC__) || defined(__INTEL_COMPILER) >#ifndef __INTEL_COMPILER >#define __strong_reference(sym,aliassym) \ > extern __typeof (sym) aliassym __attribute__ ((__alias__ (#sym))) >#endif ># 560 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#ifdef __STDC__ >#define __weak_reference(sym,alias) \ > __asm__(".weak " #alias); \ > __asm__(".equ " #alias ", " #sym) >#define __warn_references(sym,msg) \ > __asm__(".section .gnu.warning." #sym); \ > __asm__(".asciz \"" msg "\""); \ > __asm__(".previous") >#define __sym_compat(sym,impl,verid) \ > __asm__(".symver " #impl ", " #sym "@" #verid) >#define __sym_default(sym,impl,verid) \ > __asm__(".symver " #impl ", " #sym "@@" #verid) >#else ># 573 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __weak_reference(sym,alias) \ > __asm__(".weak alias"); \ > __asm__(".equ alias, sym") >#define __warn_references(sym,msg) \ > __asm__(".section .gnu.warning.sym"); \ > __asm__(".asciz \"msg\""); \ > __asm__(".previous") >#define __sym_compat(sym,impl,verid) \ > __asm__(".symver impl, sym@verid") >#define __sym_default(impl,sym,verid) \ > __asm__(".symver impl, sym@@verid") >#endif /* __STDC__ */ ># 585 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#endif /* __GNUC__ || __INTEL_COMPILER */ ># 586 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#define __GLOBL1(sym) __asm__(".globl " #sym) >#define __GLOBL(sym) __GLOBL1(sym) > >#if defined(__GNUC__) || defined(__INTEL_COMPILER) >#define __IDSTRING(name,string) __asm__(".ident\t\"" string "\"") >#else ># 593 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >/* > * The following definition might not work well if used in header files, > * but it should be better than nothing. If you want a "do nothing" > * version, then it should generate some harmless declaration, such as: > * #define __IDSTRING(name,string) struct __hack > */ >#define __IDSTRING(name,string) static const char name[] __unused = string >#endif ># 601 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >/* > * Embed the rcs id of a source file in the resulting library. Note that in > * more recent ELF binutils, we use .ident allowing the ID to be stripped. > * Usage: > * __FBSDID("$FreeBSD: stable/11/sys/sys/cdefs.h 312860 2017-01-27 04:52:27Z pfg $"); > */ >#ifndef __FBSDID >#if !defined(lint) && !defined(STRIP_FBSDID) >#define __FBSDID(s) __IDSTRING(__CONCAT(__rcsid_,__LINE__),s) >#else ># 612 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __FBSDID(s) struct __hack >#endif ># 614 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#endif ># 615 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#ifndef __RCSID >#ifndef NO__RCSID >#define __RCSID(s) __IDSTRING(__CONCAT(__rcsid_,__LINE__),s) >#else ># 620 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __RCSID(s) struct __hack >#endif ># 622 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#endif ># 623 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#ifndef __RCSID_SOURCE >#ifndef NO__RCSID_SOURCE >#define __RCSID_SOURCE(s) __IDSTRING(__CONCAT(__rcsid_source_,__LINE__),s) >#else ># 628 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __RCSID_SOURCE(s) struct __hack >#endif ># 630 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#endif ># 631 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#ifndef __SCCSID >#ifndef NO__SCCSID >#define __SCCSID(s) __IDSTRING(__CONCAT(__sccsid_,__LINE__),s) >#else ># 636 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __SCCSID(s) struct __hack >#endif ># 638 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#endif ># 639 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#ifndef __COPYRIGHT >#ifndef NO__COPYRIGHT >#define __COPYRIGHT(s) __IDSTRING(__CONCAT(__copyright_,__LINE__),s) >#else ># 644 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __COPYRIGHT(s) struct __hack >#endif ># 646 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#endif ># 647 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#ifndef __DECONST >#define __DECONST(type, var) ((type)(__uintptr_t)(const void *)(var)) >#endif ># 651 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#ifndef __DEVOLATILE >#define __DEVOLATILE(type, var) ((type)(__uintptr_t)(volatile void *)(var)) >#endif ># 655 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#ifndef __DEQUALIFY >#define __DEQUALIFY(type, var) ((type)(__uintptr_t)(const volatile void *)(var)) >#endif ># 659 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >/*- > * The following definitions are an extension of the behavior originally > * implemented in <sys/_posix.h>, but with a different level of granularity. > * POSIX.1 requires that the macros we test be defined before any standard > * header file is included. > * > * Here's a quick run-down of the versions: > * defined(_POSIX_SOURCE) 1003.1-1988 > * _POSIX_C_SOURCE == 1 1003.1-1990 > * _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option > * _POSIX_C_SOURCE == 199309 1003.1b-1993 > * _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, > * and the omnibus ISO/IEC 9945-1: 1996 > * _POSIX_C_SOURCE == 200112 1003.1-2001 > * _POSIX_C_SOURCE == 200809 1003.1-2008 > * > * In addition, the X/Open Portability Guide, which is now the Single UNIX > * Specification, defines a feature-test macro which indicates the version of > * that specification, and which subsumes _POSIX_C_SOURCE. > * > * Our macros begin with two underscores to avoid namespace screwage. > */ > >/* Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. */ >#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE == 1 >#undef _POSIX_C_SOURCE /* Probably illegal, but beyond caring now. */ >#define _POSIX_C_SOURCE 199009 >#endif ># 688 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >/* Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. */ >#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE == 2 >#undef _POSIX_C_SOURCE >#define _POSIX_C_SOURCE 199209 >#endif ># 694 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >/* Deal with various X/Open Portability Guides and Single UNIX Spec. */ >#ifdef _XOPEN_SOURCE >#if _XOPEN_SOURCE - 0 >= 700 >#define __XSI_VISIBLE 700 >#undef _POSIX_C_SOURCE >#define _POSIX_C_SOURCE 200809 >#elif _XOPEN_SOURCE - 0 >= 600 ># 702 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __XSI_VISIBLE 600 >#undef _POSIX_C_SOURCE >#define _POSIX_C_SOURCE 200112 >#elif _XOPEN_SOURCE - 0 >= 500 ># 706 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __XSI_VISIBLE 500 >#undef _POSIX_C_SOURCE >#define _POSIX_C_SOURCE 199506 >#endif ># 710 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#endif ># 711 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >/* > * Deal with all versions of POSIX. The ordering relative to the tests above is > * important. > */ >#if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) >#define _POSIX_C_SOURCE 198808 >#endif ># 719 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#ifdef _POSIX_C_SOURCE >#if _POSIX_C_SOURCE >= 200809 >#define __POSIX_VISIBLE 200809 >#define __ISO_C_VISIBLE 1999 >#elif _POSIX_C_SOURCE >= 200112 ># 724 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __POSIX_VISIBLE 200112 >#define __ISO_C_VISIBLE 1999 >#elif _POSIX_C_SOURCE >= 199506 ># 727 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __POSIX_VISIBLE 199506 >#define __ISO_C_VISIBLE 1990 >#elif _POSIX_C_SOURCE >= 199309 ># 730 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __POSIX_VISIBLE 199309 >#define __ISO_C_VISIBLE 1990 >#elif _POSIX_C_SOURCE >= 199209 ># 733 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __POSIX_VISIBLE 199209 >#define __ISO_C_VISIBLE 1990 >#elif _POSIX_C_SOURCE >= 199009 ># 736 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __POSIX_VISIBLE 199009 >#define __ISO_C_VISIBLE 1990 >#else ># 739 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __POSIX_VISIBLE 198808 >#define __ISO_C_VISIBLE 0 >#endif /* _POSIX_C_SOURCE */ ># 742 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#else ># 743 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >/*- > * Deal with _ANSI_SOURCE: > * If it is defined, and no other compilation environment is explicitly > * requested, then define our internal feature-test macros to zero. This > * makes no difference to the preprocessor (undefined symbols in preprocessing > * expressions are defined to have value zero), but makes it more convenient for > * a test program to print out the values. > * > * If a program mistakenly defines _ANSI_SOURCE and some other macro such as > * _POSIX_C_SOURCE, we will assume that it wants the broader compilation > * environment (and in fact we will never get here). > */ >#if defined(_ANSI_SOURCE) /* Hide almost everything. */ >#define __POSIX_VISIBLE 0 >#define __XSI_VISIBLE 0 >#define __BSD_VISIBLE 0 >#define __ISO_C_VISIBLE 1990 >#elif defined(_C99_SOURCE) /* Localism to specify strict C99 env. */ ># 761 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __POSIX_VISIBLE 0 >#define __XSI_VISIBLE 0 >#define __BSD_VISIBLE 0 >#define __ISO_C_VISIBLE 1999 >#elif defined(_C11_SOURCE) /* Localism to specify strict C11 env. */ ># 766 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __POSIX_VISIBLE 0 >#define __XSI_VISIBLE 0 >#define __BSD_VISIBLE 0 >#define __ISO_C_VISIBLE 2011 >#else /* Default environment: show everything. */ ># 771 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __POSIX_VISIBLE 200809 >#define __XSI_VISIBLE 700 >#define __BSD_VISIBLE 1 >#define __ISO_C_VISIBLE 2011 >#endif ># 776 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#endif ># 777 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >#if defined(__mips) || defined(__powerpc64__) || defined(__riscv__) >#define __NO_TLS 1 >#endif ># 781 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >/* > * Old versions of GCC use non-standard ARM arch symbols; acle-compat.h > * translates them to __ARM_ARCH and the modern feature symbols defined by ARM. > */ >#if defined(__arm__) && !defined(__ARM_ARCH) >#if 0 /* expanded by -frewrite-includes */ >#include <machine/acle-compat.h> >#endif /* expanded by -frewrite-includes */ ># 787 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 ># 788 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#endif ># 789 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >/* > * Nullability qualifiers: currently only supported by Clang. > */ >#if !(defined(__clang__) && __has_feature(nullability)) >#define _Nonnull >#define _Nullable >#define _Null_unspecified >#define __NULLABILITY_PRAGMA_PUSH >#define __NULLABILITY_PRAGMA_POP >#else ># 800 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __NULLABILITY_PRAGMA_PUSH _Pragma("clang diagnostic push") \ > _Pragma("clang diagnostic ignored \"-Wnullability-completeness\"") >#define __NULLABILITY_PRAGMA_POP _Pragma("clang diagnostic pop") >#endif ># 804 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >/* > * Type Safety Checking > * > * Clang provides additional attributes to enable checking type safety > * properties that cannot be enforced by the C type system. > */ > >#if __has_attribute(__argument_with_type_tag__) && \ > __has_attribute(__type_tag_for_datatype__) && !defined(lint) >#define __arg_type_tag(arg_kind, arg_idx, type_tag_idx) \ > __attribute__((__argument_with_type_tag__(arg_kind, arg_idx, type_tag_idx))) >#define __datatype_type_tag(kind, type) \ > __attribute__((__type_tag_for_datatype__(kind, type))) >#else ># 819 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __arg_type_tag(arg_kind, arg_idx, type_tag_idx) >#define __datatype_type_tag(kind, type) >#endif ># 822 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >/* > * Lock annotations. > * > * Clang provides support for doing basic thread-safety tests at > * compile-time, by marking which locks will/should be held when > * entering/leaving a functions. > * > * Furthermore, it is also possible to annotate variables and structure > * members to enforce that they are only accessed when certain locks are > * held. > */ > >#if __has_extension(c_thread_safety_attributes) >#define __lock_annotate(x) __attribute__((x)) >#else ># 838 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 >#define __lock_annotate(x) >#endif ># 840 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 > >/* Structure implements a lock. */ >#define __lockable __lock_annotate(lockable) > >/* Function acquires an exclusive or shared lock. */ >#define __locks_exclusive(...) \ > __lock_annotate(exclusive_lock_function(__VA_ARGS__)) >#define __locks_shared(...) \ > __lock_annotate(shared_lock_function(__VA_ARGS__)) > >/* Function attempts to acquire an exclusive or shared lock. */ >#define __trylocks_exclusive(...) \ > __lock_annotate(exclusive_trylock_function(__VA_ARGS__)) >#define __trylocks_shared(...) \ > __lock_annotate(shared_trylock_function(__VA_ARGS__)) > >/* Function releases a lock. */ >#define __unlocks(...) __lock_annotate(unlock_function(__VA_ARGS__)) > >/* Function asserts that an exclusive or shared lock is held. */ >#define __asserts_exclusive(...) \ > __lock_annotate(assert_exclusive_lock(__VA_ARGS__)) >#define __asserts_shared(...) \ > __lock_annotate(assert_shared_lock(__VA_ARGS__)) > >/* Function requires that an exclusive or shared lock is or is not held. */ >#define __requires_exclusive(...) \ > __lock_annotate(exclusive_locks_required(__VA_ARGS__)) >#define __requires_shared(...) \ > __lock_annotate(shared_locks_required(__VA_ARGS__)) >#define __requires_unlocked(...) \ > __lock_annotate(locks_excluded(__VA_ARGS__)) > >/* Function should not be analyzed. */ >#define __no_lock_analysis __lock_annotate(no_thread_safety_analysis) > >/* Guard variables and structure members by lock. */ >#define __guarded_by(x) __lock_annotate(guarded_by(x)) >#define __pt_guarded_by(x) __lock_annotate(pt_guarded_by(x)) > >#endif /* !_SYS_CDEFS_H_ */ ># 881 "/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h" 3 4 ># 38 "/usr/obj/usr/src/tmp/usr/include/stddef.h" 2 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_null.h> >#endif /* expanded by -frewrite-includes */ ># 38 "/usr/obj/usr/src/tmp/usr/include/stddef.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/sys/_null.h" 1 3 4 >/*- > * Copyright (c) 2003 Marcel Moolenaar > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR > * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES > * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. > * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, > * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT > * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, > * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY > * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT > * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF > * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > * > * $FreeBSD: stable/11/sys/sys/_null.h 228918 2011-12-27 21:36:31Z theraven $ > */ > >#ifndef NULL > >#if !defined(__cplusplus) >#define NULL ((void *)0) >#else ># 34 "/usr/obj/usr/src/tmp/usr/include/sys/_null.h" 3 4 >#if __cplusplus >= 201103L >#define NULL nullptr >#elif defined(__GNUG__) && defined(__GNUC__) && __GNUC__ >= 4 ># 37 "/usr/obj/usr/src/tmp/usr/include/sys/_null.h" 3 4 >#define NULL __null >#else ># 39 "/usr/obj/usr/src/tmp/usr/include/sys/_null.h" 3 4 >#if defined(__LP64__) >#define NULL (0L) >#else ># 42 "/usr/obj/usr/src/tmp/usr/include/sys/_null.h" 3 4 >#define NULL 0 >#endif /* __LP64__ */ ># 44 "/usr/obj/usr/src/tmp/usr/include/sys/_null.h" 3 4 >#endif /* __GNUG__ */ ># 45 "/usr/obj/usr/src/tmp/usr/include/sys/_null.h" 3 4 >#endif /* !__cplusplus */ ># 46 "/usr/obj/usr/src/tmp/usr/include/sys/_null.h" 3 4 > >#endif ># 48 "/usr/obj/usr/src/tmp/usr/include/sys/_null.h" 3 4 ># 39 "/usr/obj/usr/src/tmp/usr/include/stddef.h" 2 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 39 "/usr/obj/usr/src/tmp/usr/include/stddef.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/sys/_types.h" 1 3 4 >/*- > * Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: stable/11/sys/sys/_types.h 309258 2016-11-28 18:36:37Z jhb $ > */ > >#ifndef _SYS__TYPES_H_ >#define _SYS__TYPES_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 32 "/usr/obj/usr/src/tmp/usr/include/sys/_types.h" 3 4 ># 33 "/usr/obj/usr/src/tmp/usr/include/sys/_types.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <machine/_types.h> >#endif /* expanded by -frewrite-includes */ ># 33 "/usr/obj/usr/src/tmp/usr/include/sys/_types.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/machine/_types.h" 1 3 4 >/*- > * This file is in the public domain. > */ >/* $FreeBSD: stable/11/sys/amd64/include/_types.h 232261 2012-02-28 18:15:28Z tijl $ */ > >#if 0 /* expanded by -frewrite-includes */ >#include <x86/_types.h> >#endif /* expanded by -frewrite-includes */ ># 6 "/usr/obj/usr/src/tmp/usr/include/machine/_types.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/x86/_types.h" 1 3 4 >/*- > * Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> > * Copyright (c) 1990, 1993 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. All advertising materials mentioning features or use of this software > * must display the following acknowledgement: > * This product includes software developed by the University of > * California, Berkeley and its contributors. > * 4. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 > * From: @(#)types.h 8.3 (Berkeley) 1/5/94 > * $FreeBSD: stable/11/sys/x86/include/_types.h 313574 2017-02-11 02:00:56Z kib $ > */ > >#ifndef _MACHINE__TYPES_H_ >#define _MACHINE__TYPES_H_ > >#ifndef _SYS_CDEFS_H_ >#error this file needs sys/cdefs.h as a prerequisite >#endif ># 45 "/usr/obj/usr/src/tmp/usr/include/x86/_types.h" 3 4 > >#if 0 /* expanded by -frewrite-includes */ >#include <machine/_limits.h> >#endif /* expanded by -frewrite-includes */ ># 46 "/usr/obj/usr/src/tmp/usr/include/x86/_types.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/machine/_limits.h" 1 3 4 >/*- > * This file is in the public domain. > */ >/* $FreeBSD: stable/11/sys/amd64/include/_limits.h 232262 2012-02-28 18:24:28Z tijl $ */ > >#if 0 /* expanded by -frewrite-includes */ >#include <x86/_limits.h> >#endif /* expanded by -frewrite-includes */ ># 6 "/usr/obj/usr/src/tmp/usr/include/machine/_limits.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/x86/_limits.h" 1 3 4 >/*- > * Copyright (c) 1988, 1993 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 4. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)limits.h 8.3 (Berkeley) 1/4/94 > * $FreeBSD: stable/11/sys/x86/include/_limits.h 235939 2012-05-24 21:44:46Z obrien $ > */ > >#ifndef _MACHINE__LIMITS_H_ >#define _MACHINE__LIMITS_H_ > >/* > * According to ANSI (section 2.2.4.2), the values below must be usable by > * #if preprocessing directives. Additionally, the expression must have the > * same type as would an expression that is an object of the corresponding > * type converted according to the integral promotions. The subtraction for > * INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an > * unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). > */ > >#define __CHAR_BIT 8 /* number of bits in a char */ > >#define __SCHAR_MAX 0x7f /* max value for a signed char */ >#define __SCHAR_MIN (-0x7f - 1) /* min value for a signed char */ > >#define __UCHAR_MAX 0xff /* max value for an unsigned char */ > >#define __USHRT_MAX 0xffff /* max value for an unsigned short */ >#define __SHRT_MAX 0x7fff /* max value for a short */ >#define __SHRT_MIN (-0x7fff - 1) /* min value for a short */ > >#define __UINT_MAX 0xffffffff /* max value for an unsigned int */ >#define __INT_MAX 0x7fffffff /* max value for an int */ >#define __INT_MIN (-0x7fffffff - 1) /* min value for an int */ > >#ifdef __LP64__ >#define __ULONG_MAX 0xffffffffffffffff /* max for an unsigned long */ >#define __LONG_MAX 0x7fffffffffffffff /* max for a long */ >#define __LONG_MIN (-0x7fffffffffffffff - 1) /* min for a long */ >#else ># 65 "/usr/obj/usr/src/tmp/usr/include/x86/_limits.h" 3 4 >#define __ULONG_MAX 0xffffffffUL >#define __LONG_MAX 0x7fffffffL >#define __LONG_MIN (-0x7fffffffL - 1) >#endif ># 69 "/usr/obj/usr/src/tmp/usr/include/x86/_limits.h" 3 4 > > /* max value for an unsigned long long */ >#define __ULLONG_MAX 0xffffffffffffffffULL >#define __LLONG_MAX 0x7fffffffffffffffLL /* max value for a long long */ >#define __LLONG_MIN (-0x7fffffffffffffffLL - 1) /* min for a long long */ > >#ifdef __LP64__ >#define __SSIZE_MAX __LONG_MAX /* max value for a ssize_t */ >#define __SIZE_T_MAX __ULONG_MAX /* max value for a size_t */ >#define __OFF_MAX __LONG_MAX /* max value for an off_t */ >#define __OFF_MIN __LONG_MIN /* min value for an off_t */ >/* Quads and longs are the same on the amd64. Ensure they stay in sync. */ >#define __UQUAD_MAX __ULONG_MAX /* max value for a uquad_t */ >#define __QUAD_MAX __LONG_MAX /* max value for a quad_t */ >#define __QUAD_MIN __LONG_MIN /* min value for a quad_t */ >#define __LONG_BIT 64 >#else ># 86 "/usr/obj/usr/src/tmp/usr/include/x86/_limits.h" 3 4 >#define __SSIZE_MAX __INT_MAX >#define __SIZE_T_MAX __UINT_MAX >#define __OFF_MAX __LLONG_MAX >#define __OFF_MIN __LLONG_MIN >#define __UQUAD_MAX __ULLONG_MAX >#define __QUAD_MAX __LLONG_MAX >#define __QUAD_MIN __LLONG_MIN >#define __LONG_BIT 32 >#endif ># 95 "/usr/obj/usr/src/tmp/usr/include/x86/_limits.h" 3 4 > >#define __WORD_BIT 32 > >/* Minimum signal stack size. */ >#define __MINSIGSTKSZ (512 * 4) > >#endif /* !_MACHINE__LIMITS_H_ */ ># 102 "/usr/obj/usr/src/tmp/usr/include/x86/_limits.h" 3 4 ># 7 "/usr/obj/usr/src/tmp/usr/include/machine/_limits.h" 2 3 4 ># 47 "/usr/obj/usr/src/tmp/usr/include/x86/_types.h" 2 3 4 > >#define __NO_STRICT_ALIGNMENT > >/* > * Basic types upon which most other types are built. > */ >typedef signed char __int8_t; >typedef unsigned char __uint8_t; >typedef short __int16_t; >typedef unsigned short __uint16_t; >typedef int __int32_t; >typedef unsigned int __uint32_t; >#ifdef __LP64__ >typedef long __int64_t; >typedef unsigned long __uint64_t; >#else ># 63 "/usr/obj/usr/src/tmp/usr/include/x86/_types.h" 3 4 >#ifndef lint >__extension__ >#endif ># 66 "/usr/obj/usr/src/tmp/usr/include/x86/_types.h" 3 4 >/* LONGLONG */ >typedef long long __int64_t; >#ifndef lint >__extension__ >#endif ># 71 "/usr/obj/usr/src/tmp/usr/include/x86/_types.h" 3 4 >/* LONGLONG */ >typedef unsigned long long __uint64_t; >#endif ># 74 "/usr/obj/usr/src/tmp/usr/include/x86/_types.h" 3 4 > >/* > * Standard type definitions. > */ >#ifdef __LP64__ >typedef __int32_t __clock_t; /* clock()... */ >typedef __int64_t __critical_t; >typedef double __double_t; >typedef float __float_t; >typedef __int64_t __intfptr_t; >typedef __int64_t __intptr_t; >#else ># 86 "/usr/obj/usr/src/tmp/usr/include/x86/_types.h" 3 4 >typedef unsigned long __clock_t; >typedef __int32_t __critical_t; >typedef long double __double_t; >typedef long double __float_t; >typedef __int32_t __intfptr_t; >typedef __int32_t __intptr_t; >#endif ># 93 "/usr/obj/usr/src/tmp/usr/include/x86/_types.h" 3 4 >typedef __int64_t __intmax_t; >typedef __int32_t __int_fast8_t; >typedef __int32_t __int_fast16_t; >typedef __int32_t __int_fast32_t; >typedef __int64_t __int_fast64_t; >typedef __int8_t __int_least8_t; >typedef __int16_t __int_least16_t; >typedef __int32_t __int_least32_t; >typedef __int64_t __int_least64_t; >#ifdef __LP64__ >typedef __int64_t __ptrdiff_t; /* ptr1 - ptr2 */ >typedef __int64_t __register_t; >typedef __int64_t __segsz_t; /* segment size (in pages) */ >typedef __uint64_t __size_t; /* sizeof() */ >typedef __int64_t __ssize_t; /* byte count or error */ >typedef __int64_t __time_t; /* time()... */ >typedef __uint64_t __uintfptr_t; >typedef __uint64_t __uintptr_t; >#else ># 112 "/usr/obj/usr/src/tmp/usr/include/x86/_types.h" 3 4 >typedef __int32_t __ptrdiff_t; >typedef __int32_t __register_t; >typedef __int32_t __segsz_t; >typedef __uint32_t __size_t; >typedef __int32_t __ssize_t; >typedef __int32_t __time_t; >typedef __uint32_t __uintfptr_t; >typedef __uint32_t __uintptr_t; >#endif ># 121 "/usr/obj/usr/src/tmp/usr/include/x86/_types.h" 3 4 >typedef __uint64_t __uintmax_t; >typedef __uint32_t __uint_fast8_t; >typedef __uint32_t __uint_fast16_t; >typedef __uint32_t __uint_fast32_t; >typedef __uint64_t __uint_fast64_t; >typedef __uint8_t __uint_least8_t; >typedef __uint16_t __uint_least16_t; >typedef __uint32_t __uint_least32_t; >typedef __uint64_t __uint_least64_t; >#ifdef __LP64__ >typedef __uint64_t __u_register_t; >typedef __uint64_t __vm_offset_t; >typedef __uint64_t __vm_paddr_t; >typedef __uint64_t __vm_size_t; >#else ># 136 "/usr/obj/usr/src/tmp/usr/include/x86/_types.h" 3 4 >typedef __uint32_t __u_register_t; >typedef __uint32_t __vm_offset_t; >#ifdef PAE >typedef __uint64_t __vm_paddr_t; >#else ># 141 "/usr/obj/usr/src/tmp/usr/include/x86/_types.h" 3 4 >typedef __uint32_t __vm_paddr_t; >#endif ># 143 "/usr/obj/usr/src/tmp/usr/include/x86/_types.h" 3 4 >typedef __uint32_t __vm_size_t; >#endif ># 145 "/usr/obj/usr/src/tmp/usr/include/x86/_types.h" 3 4 >typedef int ___wchar_t; > >#define __WCHAR_MIN __INT_MIN /* min value for a wchar_t */ >#define __WCHAR_MAX __INT_MAX /* max value for a wchar_t */ > >/* > * Unusual type definitions. > */ >#ifdef __GNUCLIKE_BUILTIN_VARARGS >typedef __builtin_va_list __va_list; /* internally known to gcc */ >#else ># 156 "/usr/obj/usr/src/tmp/usr/include/x86/_types.h" 3 4 >#ifdef __LP64__ >struct __s_va_list { > __uint32_t _pad1[2]; /* gp_offset, fp_offset */ > __uint64_t _pad2[2]; /* overflow_arg_area, reg_save_area */ >}; >typedef struct __s_va_list __va_list; >#else ># 163 "/usr/obj/usr/src/tmp/usr/include/x86/_types.h" 3 4 >typedef char * __va_list; >#endif ># 165 "/usr/obj/usr/src/tmp/usr/include/x86/_types.h" 3 4 >#endif ># 166 "/usr/obj/usr/src/tmp/usr/include/x86/_types.h" 3 4 >#if defined(__GNUC_VA_LIST_COMPATIBILITY) && !defined(__GNUC_VA_LIST) \ > && !defined(__NO_GNUC_VA_LIST) >#define __GNUC_VA_LIST >typedef __va_list __gnuc_va_list; /* compatibility w/GNU headers*/ >#endif ># 171 "/usr/obj/usr/src/tmp/usr/include/x86/_types.h" 3 4 > >#endif /* !_MACHINE__TYPES_H_ */ ># 173 "/usr/obj/usr/src/tmp/usr/include/x86/_types.h" 3 4 ># 7 "/usr/obj/usr/src/tmp/usr/include/machine/_types.h" 2 3 4 ># 34 "/usr/obj/usr/src/tmp/usr/include/sys/_types.h" 2 3 4 > >/* > * Standard type definitions. > */ >typedef __int32_t __blksize_t; /* file block size */ >typedef __int64_t __blkcnt_t; /* file block count */ >typedef __int32_t __clockid_t; /* clock_gettime()... */ >typedef __uint32_t __fflags_t; /* file flags */ >typedef __uint64_t __fsblkcnt_t; >typedef __uint64_t __fsfilcnt_t; >typedef __uint32_t __gid_t; >typedef __int64_t __id_t; /* can hold a gid_t, pid_t, or uid_t */ >typedef __uint32_t __ino_t; /* inode number */ >typedef long __key_t; /* IPC key (for Sys V IPC) */ >typedef __int32_t __lwpid_t; /* Thread ID (a.k.a. LWP) */ >typedef __uint16_t __mode_t; /* permissions */ >typedef int __accmode_t; /* access permissions */ >typedef int __nl_item; >typedef __uint16_t __nlink_t; /* link count */ >typedef __int64_t __off_t; /* file offset */ >typedef __int64_t __off64_t; /* file offset (alias) */ >typedef __int32_t __pid_t; /* process [group] */ >typedef __int64_t __rlim_t; /* resource limit - intentionally */ > /* signed, because of legacy code */ > /* that uses -1 for RLIM_INFINITY */ >typedef __uint8_t __sa_family_t; >typedef __uint32_t __socklen_t; >typedef long __suseconds_t; /* microseconds (signed) */ >typedef struct __timer *__timer_t; /* timer_gettime()... */ >typedef struct __mq *__mqd_t; /* mq_open()... */ >typedef __uint32_t __uid_t; >typedef unsigned int __useconds_t; /* microseconds (unsigned) */ >typedef int __cpuwhich_t; /* which parameter for cpuset. */ >typedef int __cpulevel_t; /* level parameter for cpuset. */ >typedef int __cpusetid_t; /* cpuset identifier. */ > >/* > * Unusual type definitions. > */ >/* > * rune_t is declared to be an ``int'' instead of the more natural > * ``unsigned long'' or ``long''. Two things are happening here. It is not > * unsigned so that EOF (-1) can be naturally assigned to it and used. Also, > * it looks like 10646 will be a 31 bit standard. This means that if your > * ints cannot hold 32 bits, you will be in trouble. The reason an int was > * chosen over a long is that the is*() and to*() routines take ints (says > * ANSI C), but they use __ct_rune_t instead of int. > * > * NOTE: rune_t is not covered by ANSI nor other standards, and should not > * be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and > * rune_t must be the same type. Also, wint_t should be able to hold all > * members of the largest character set plus one extra value (WEOF), and > * must be at least 16 bits. > */ >typedef int __ct_rune_t; /* arg type for ctype funcs */ >typedef __ct_rune_t __rune_t; /* rune_t (see above) */ >typedef __ct_rune_t __wint_t; /* wint_t (see above) */ > >/* Clang already provides these types as built-ins, but only in C++ mode. */ >#if !defined(__clang__) || !defined(__cplusplus) >typedef __uint_least16_t __char16_t; >typedef __uint_least32_t __char32_t; >#endif ># 97 "/usr/obj/usr/src/tmp/usr/include/sys/_types.h" 3 4 >/* In C++11, char16_t and char32_t are built-in types. */ >#if defined(__cplusplus) && __cplusplus >= 201103L >#define _CHAR16_T_DECLARED >#define _CHAR32_T_DECLARED >#endif ># 102 "/usr/obj/usr/src/tmp/usr/include/sys/_types.h" 3 4 > >typedef struct { > long long __max_align1 __aligned(_Alignof(long long)); > long double __max_align2 __aligned(_Alignof(long double)); >} __max_align_t; > >typedef __uint32_t __dev_t; /* device number */ > >typedef __uint32_t __fixpt_t; /* fixed point number */ > >/* > * mbstate_t is an opaque object to keep conversion state during multibyte > * stream conversions. > */ >typedef union { > char __mbstate8[128]; > __int64_t _mbstateL; /* for alignment */ >} __mbstate_t; > >typedef __uintmax_t __rman_res_t; > >#endif /* !_SYS__TYPES_H_ */ ># 124 "/usr/obj/usr/src/tmp/usr/include/sys/_types.h" 3 4 ># 40 "/usr/obj/usr/src/tmp/usr/include/stddef.h" 2 3 4 > >#ifndef _PTRDIFF_T_DECLARED >typedef __ptrdiff_t ptrdiff_t; >#define _PTRDIFF_T_DECLARED >#endif ># 45 "/usr/obj/usr/src/tmp/usr/include/stddef.h" 3 4 > >#if __BSD_VISIBLE >#ifndef _RUNE_T_DECLARED >typedef __rune_t rune_t; >#define _RUNE_T_DECLARED >#endif ># 51 "/usr/obj/usr/src/tmp/usr/include/stddef.h" 3 4 >#endif ># 52 "/usr/obj/usr/src/tmp/usr/include/stddef.h" 3 4 > >#ifndef _SIZE_T_DECLARED >typedef __size_t size_t; >#define _SIZE_T_DECLARED >#endif ># 57 "/usr/obj/usr/src/tmp/usr/include/stddef.h" 3 4 > >#ifndef __cplusplus >#ifndef _WCHAR_T_DECLARED >typedef ___wchar_t wchar_t; >#define _WCHAR_T_DECLARED >#endif ># 63 "/usr/obj/usr/src/tmp/usr/include/stddef.h" 3 4 >#endif ># 64 "/usr/obj/usr/src/tmp/usr/include/stddef.h" 3 4 > >#if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L >#ifndef __CLANG_MAX_ALIGN_T_DEFINED >typedef __max_align_t max_align_t; >#define __CLANG_MAX_ALIGN_T_DEFINED >#define _GCC_MAX_ALIGN_T >#endif ># 71 "/usr/obj/usr/src/tmp/usr/include/stddef.h" 3 4 >#endif ># 72 "/usr/obj/usr/src/tmp/usr/include/stddef.h" 3 4 > >#define offsetof(type, member) __offsetof(type, member) > >#endif /* _STDDEF_H_ */ ># 76 "/usr/obj/usr/src/tmp/usr/include/stddef.h" 3 4 ># 65 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" 2 >#if 0 /* expanded by -frewrite-includes */ >#include <stdlib.h> >#endif /* expanded by -frewrite-includes */ ># 65 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" ># 1 "/usr/obj/usr/src/tmp/usr/include/stdlib.h" 1 3 4 >/*- > * Copyright (c) 1990, 1993 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)stdlib.h 8.5 (Berkeley) 5/19/95 > * $FreeBSD: stable/11/include/stdlib.h 313970 2017-02-19 21:08:10Z pfg $ > */ > >#ifndef _STDLIB_H_ >#define _STDLIB_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 36 "/usr/obj/usr/src/tmp/usr/include/stdlib.h" 3 4 ># 37 "/usr/obj/usr/src/tmp/usr/include/stdlib.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_null.h> >#endif /* expanded by -frewrite-includes */ ># 37 "/usr/obj/usr/src/tmp/usr/include/stdlib.h" 3 4 ># 38 "/usr/obj/usr/src/tmp/usr/include/stdlib.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 38 "/usr/obj/usr/src/tmp/usr/include/stdlib.h" 3 4 ># 39 "/usr/obj/usr/src/tmp/usr/include/stdlib.h" 3 4 > >#if __BSD_VISIBLE >#ifndef _RUNE_T_DECLARED >typedef __rune_t rune_t; >#define _RUNE_T_DECLARED >#endif ># 45 "/usr/obj/usr/src/tmp/usr/include/stdlib.h" 3 4 >#endif ># 46 "/usr/obj/usr/src/tmp/usr/include/stdlib.h" 3 4 > >#ifndef _SIZE_T_DECLARED >typedef __size_t size_t; >#define _SIZE_T_DECLARED >#endif ># 51 "/usr/obj/usr/src/tmp/usr/include/stdlib.h" 3 4 > >#ifndef __cplusplus >#ifndef _WCHAR_T_DECLARED >typedef ___wchar_t wchar_t; >#define _WCHAR_T_DECLARED >#endif ># 57 "/usr/obj/usr/src/tmp/usr/include/stdlib.h" 3 4 >#endif ># 58 "/usr/obj/usr/src/tmp/usr/include/stdlib.h" 3 4 > >typedef struct { > int quot; /* quotient */ > int rem; /* remainder */ >} div_t; > >typedef struct { > long quot; > long rem; >} ldiv_t; > >#define EXIT_FAILURE 1 >#define EXIT_SUCCESS 0 > >#define RAND_MAX 0x7ffffffd > >__BEGIN_DECLS >#ifdef _XLOCALE_H_ >#if 0 /* expanded by -frewrite-includes */ >#include <xlocale/_stdlib.h> >#endif /* expanded by -frewrite-includes */ ># 76 "/usr/obj/usr/src/tmp/usr/include/stdlib.h" 3 4 ># 77 "/usr/obj/usr/src/tmp/usr/include/stdlib.h" 3 4 >#endif ># 78 "/usr/obj/usr/src/tmp/usr/include/stdlib.h" 3 4 >extern int __mb_cur_max; >extern int ___mb_cur_max(void); >#define MB_CUR_MAX (___mb_cur_max()) > >_Noreturn void abort(void); >int abs(int) __pure2; >int atexit(void (*)(void)); >double atof(const char *); >int atoi(const char *); >long atol(const char *); >void *bsearch(const void *, const void *, size_t, > size_t, int (*)(const void *, const void *)); >void *calloc(size_t, size_t) __malloc_like __result_use_check > __alloc_size(1) __alloc_size(2); >div_t div(int, int) __pure2; >_Noreturn void exit(int); >void free(void *); >char *getenv(const char *); >long labs(long) __pure2; >ldiv_t ldiv(long, long) __pure2; >void *malloc(size_t) __malloc_like __result_use_check __alloc_size(1); >int mblen(const char *, size_t); >size_t mbstowcs(wchar_t * __restrict , const char * __restrict, size_t); >int mbtowc(wchar_t * __restrict, const char * __restrict, size_t); >void qsort(void *, size_t, size_t, > int (*)(const void *, const void *)); >int rand(void); >void *realloc(void *, size_t) __result_use_check __alloc_size(2); >void srand(unsigned); >double strtod(const char * __restrict, char ** __restrict); >float strtof(const char * __restrict, char ** __restrict); >long strtol(const char * __restrict, char ** __restrict, int); >long double > strtold(const char * __restrict, char ** __restrict); >unsigned long > strtoul(const char * __restrict, char ** __restrict, int); >int system(const char *); >int wctomb(char *, wchar_t); >size_t wcstombs(char * __restrict, const wchar_t * __restrict, size_t); > >/* > * Functions added in C99 which we make conditionally available in the > * BSD^C89 namespace if the compiler supports `long long'. > * The #if test is more complicated than it ought to be because > * __BSD_VISIBLE implies __ISO_C_VISIBLE == 1999 *even if* `long long' > * is not supported in the compilation environment (which therefore means > * that it can't really be ISO C99). > * > * (The only other extension made by C99 in thie header is _Exit().) > */ >#if __ISO_C_VISIBLE >= 1999 || defined(__cplusplus) >#ifdef __LONG_LONG_SUPPORTED >/* LONGLONG */ >typedef struct { > long long quot; > long long rem; >} lldiv_t; > >/* LONGLONG */ >long long > atoll(const char *); >/* LONGLONG */ >long long > llabs(long long) __pure2; >/* LONGLONG */ >lldiv_t lldiv(long long, long long) __pure2; >/* LONGLONG */ >long long > strtoll(const char * __restrict, char ** __restrict, int); >/* LONGLONG */ >unsigned long long > strtoull(const char * __restrict, char ** __restrict, int); >#endif /* __LONG_LONG_SUPPORTED */ ># 151 "/usr/obj/usr/src/tmp/usr/include/stdlib.h" 3 4 > >_Noreturn void _Exit(int); >#endif /* __ISO_C_VISIBLE >= 1999 */ ># 154 "/usr/obj/usr/src/tmp/usr/include/stdlib.h" 3 4 > >/* > * If we're in a mode greater than C99, expose C11 functions. > */ >#if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L >void * aligned_alloc(size_t, size_t) __malloc_like __alloc_align(1) > __alloc_size(2); >int at_quick_exit(void (*)(void)); >_Noreturn void > quick_exit(int); >#endif /* __ISO_C_VISIBLE >= 2011 */ ># 165 "/usr/obj/usr/src/tmp/usr/include/stdlib.h" 3 4 >/* > * Extensions made by POSIX relative to C. > */ >#if __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE >char *realpath(const char * __restrict, char * __restrict); >#endif ># 171 "/usr/obj/usr/src/tmp/usr/include/stdlib.h" 3 4 >#if __POSIX_VISIBLE >= 199506 >int rand_r(unsigned *); /* (TSF) */ >#endif ># 174 "/usr/obj/usr/src/tmp/usr/include/stdlib.h" 3 4 >#if __POSIX_VISIBLE >= 200112 >int posix_memalign(void **, size_t, size_t); /* (ADV) */ >int setenv(const char *, const char *, int); >int unsetenv(const char *); >#endif ># 179 "/usr/obj/usr/src/tmp/usr/include/stdlib.h" 3 4 > >#if __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE >int getsubopt(char **, char *const *, char **); >#ifndef _MKDTEMP_DECLARED >char *mkdtemp(char *); >#define _MKDTEMP_DECLARED >#endif ># 186 "/usr/obj/usr/src/tmp/usr/include/stdlib.h" 3 4 >#ifndef _MKSTEMP_DECLARED >int mkstemp(char *); >#define _MKSTEMP_DECLARED >#endif ># 190 "/usr/obj/usr/src/tmp/usr/include/stdlib.h" 3 4 >#endif /* __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE */ ># 191 "/usr/obj/usr/src/tmp/usr/include/stdlib.h" 3 4 > >/* > * The only changes to the XSI namespace in revision 6 were the deletion > * of the ttyslot() and valloc() functions, which FreeBSD never declared > * in this header. For revision 7, ecvt(), fcvt(), and gcvt(), which > * FreeBSD also does not have, and mktemp(), are to be deleted. > */ >#if __XSI_VISIBLE >/* XXX XSI requires pollution from <sys/wait.h> here. We'd rather not. */ >long a64l(const char *); >double drand48(void); >/* char *ecvt(double, int, int * __restrict, int * __restrict); */ >double erand48(unsigned short[3]); >/* char *fcvt(double, int, int * __restrict, int * __restrict); */ >/* char *gcvt(double, int, int * __restrict, int * __restrict); */ >int grantpt(int); >char *initstate(unsigned long /* XSI requires u_int */, char *, long); >long jrand48(unsigned short[3]); >char *l64a(long); >void lcong48(unsigned short[7]); >long lrand48(void); >#if !defined(_MKTEMP_DECLARED) && (__BSD_VISIBLE || __XSI_VISIBLE <= 600) >char *mktemp(char *); >#define _MKTEMP_DECLARED >#endif ># 216 "/usr/obj/usr/src/tmp/usr/include/stdlib.h" 3 4 >long mrand48(void); >long nrand48(unsigned short[3]); >int posix_openpt(int); >char *ptsname(int); >int putenv(char *); >long random(void); >unsigned short > *seed48(unsigned short[3]); >#ifndef _SETKEY_DECLARED >int setkey(const char *); >#define _SETKEY_DECLARED >#endif ># 228 "/usr/obj/usr/src/tmp/usr/include/stdlib.h" 3 4 >char *setstate(/* const */ char *); >void srand48(long); >void srandom(unsigned long); >int unlockpt(int); >#endif /* __XSI_VISIBLE */ ># 233 "/usr/obj/usr/src/tmp/usr/include/stdlib.h" 3 4 > >#if __BSD_VISIBLE >extern const char *malloc_conf; >extern void (*malloc_message)(void *, const char *); > >/* > * The alloca() function can't be implemented in C, and on some > * platforms it can't be implemented at all as a callable function. > * The GNU C compiler provides a built-in alloca() which we can use; > * in all other cases, provide a prototype, mainly to pacify various > * incarnations of lint. On platforms where alloca() is not in libc, > * programs which use it will fail to link when compiled with non-GNU > * compilers. > */ >#if __GNUC__ >= 2 || defined(__INTEL_COMPILER) >#undef alloca /* some GNU bits try to get cute and define this on their own */ >#define alloca(sz) __builtin_alloca(sz) >#elif defined(lint) ># 251 "/usr/obj/usr/src/tmp/usr/include/stdlib.h" 3 4 >void *alloca(size_t); >#endif ># 253 "/usr/obj/usr/src/tmp/usr/include/stdlib.h" 3 4 > >void abort2(const char *, int, void **) __dead2; >__uint32_t > arc4random(void); >void arc4random_addrandom(unsigned char *, int); >void arc4random_buf(void *, size_t); >void arc4random_stir(void); >__uint32_t > arc4random_uniform(__uint32_t); >#ifdef __BLOCKS__ >int atexit_b(void (^)(void)); >void *bsearch_b(const void *, const void *, size_t, > size_t, int (^)(const void *, const void *)); >#endif ># 267 "/usr/obj/usr/src/tmp/usr/include/stdlib.h" 3 4 >char *getbsize(int *, long *); > /* getcap(3) functions */ >char *cgetcap(char *, const char *, int); >int cgetclose(void); >int cgetent(char **, char **, const char *); >int cgetfirst(char **, char **); >int cgetmatch(const char *, const char *); >int cgetnext(char **, char **); >int cgetnum(char *, const char *, long *); >int cgetset(const char *); >int cgetstr(char *, const char *, char **); >int cgetustr(char *, const char *, char **); > >int daemon(int, int); >char *devname(__dev_t, __mode_t); >char *devname_r(__dev_t, __mode_t, char *, int); >char *fdevname(int); >char *fdevname_r(int, char *, int); >int getloadavg(double [], int); >const char * > getprogname(void); > >int heapsort(void *, size_t, size_t, int (*)(const void *, const void *)); >#ifdef __BLOCKS__ >int heapsort_b(void *, size_t, size_t, int (^)(const void *, const void *)); >void qsort_b(void *, size_t, size_t, > int (^)(const void *, const void *)); >#endif ># 295 "/usr/obj/usr/src/tmp/usr/include/stdlib.h" 3 4 >int l64a_r(long, char *, int); >int mergesort(void *, size_t, size_t, int (*)(const void *, const void *)); >#ifdef __BLOCKS__ >int mergesort_b(void *, size_t, size_t, int (^)(const void *, const void *)); >#endif ># 300 "/usr/obj/usr/src/tmp/usr/include/stdlib.h" 3 4 >int mkostemp(char *, int); >int mkostemps(char *, int, int); >void qsort_r(void *, size_t, size_t, void *, > int (*)(void *, const void *, const void *)); >int radixsort(const unsigned char **, int, const unsigned char *, > unsigned); >void *reallocarray(void *, size_t, size_t) __result_use_check __alloc_size(2) > __alloc_size(3); >void *reallocf(void *, size_t) __alloc_size(2); >int rpmatch(const char *); >void setprogname(const char *); >int sradixsort(const unsigned char **, int, const unsigned char *, > unsigned); >void sranddev(void); >void srandomdev(void); >long long > strtonum(const char *, long long, long long, const char **); > >/* Deprecated interfaces, to be removed. */ >__int64_t > strtoq(const char *, char **, int); >__uint64_t > strtouq(const char *, char **, int); > >extern char *suboptarg; /* getsubopt(3) external variable */ >#endif /* __BSD_VISIBLE */ ># 326 "/usr/obj/usr/src/tmp/usr/include/stdlib.h" 3 4 >__END_DECLS > >#endif /* !_STDLIB_H_ */ ># 329 "/usr/obj/usr/src/tmp/usr/include/stdlib.h" 3 4 ># 66 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" 2 >#if 0 /* expanded by -frewrite-includes */ >#include <string.h> >#endif /* expanded by -frewrite-includes */ ># 66 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" ># 1 "/usr/obj/usr/src/tmp/usr/include/string.h" 1 3 4 >/*- > * Copyright (c) 1990, 1993 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)string.h 8.1 (Berkeley) 6/2/93 > * $FreeBSD: stable/11/include/string.h 265878 2014-05-11 13:48:21Z jilles $ > */ > >#ifndef _STRING_H_ >#define _STRING_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 36 "/usr/obj/usr/src/tmp/usr/include/string.h" 3 4 ># 37 "/usr/obj/usr/src/tmp/usr/include/string.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_null.h> >#endif /* expanded by -frewrite-includes */ ># 37 "/usr/obj/usr/src/tmp/usr/include/string.h" 3 4 ># 38 "/usr/obj/usr/src/tmp/usr/include/string.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 38 "/usr/obj/usr/src/tmp/usr/include/string.h" 3 4 ># 39 "/usr/obj/usr/src/tmp/usr/include/string.h" 3 4 > >/* > * Prototype functions which were historically defined in <string.h>, but > * are required by POSIX to be prototyped in <strings.h>. > */ >#if __BSD_VISIBLE >#if 0 /* expanded by -frewrite-includes */ >#include <strings.h> >#endif /* expanded by -frewrite-includes */ ># 45 "/usr/obj/usr/src/tmp/usr/include/string.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/strings.h" 1 3 4 >/*- > * Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: stable/11/include/strings.h 272673 2014-10-07 04:54:11Z delphij $ > */ > >#ifndef _STRINGS_H_ >#define _STRINGS_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 32 "/usr/obj/usr/src/tmp/usr/include/strings.h" 3 4 ># 33 "/usr/obj/usr/src/tmp/usr/include/strings.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 33 "/usr/obj/usr/src/tmp/usr/include/strings.h" 3 4 ># 34 "/usr/obj/usr/src/tmp/usr/include/strings.h" 3 4 > >#ifndef _SIZE_T_DECLARED >typedef __size_t size_t; >#define _SIZE_T_DECLARED >#endif ># 39 "/usr/obj/usr/src/tmp/usr/include/strings.h" 3 4 > >__BEGIN_DECLS >#if __BSD_VISIBLE || __POSIX_VISIBLE <= 200112 >int bcmp(const void *, const void *, size_t) __pure; /* LEGACY */ >void bcopy(const void *, void *, size_t); /* LEGACY */ >void bzero(void *, size_t); /* LEGACY */ >#endif ># 46 "/usr/obj/usr/src/tmp/usr/include/strings.h" 3 4 >#if __BSD_VISIBLE >void explicit_bzero(void *, size_t); >#endif ># 49 "/usr/obj/usr/src/tmp/usr/include/strings.h" 3 4 >#if __XSI_VISIBLE >int ffs(int) __pure2; >#endif ># 52 "/usr/obj/usr/src/tmp/usr/include/strings.h" 3 4 >#if __BSD_VISIBLE >int ffsl(long) __pure2; >int ffsll(long long) __pure2; >int fls(int) __pure2; >int flsl(long) __pure2; >int flsll(long long) __pure2; >#endif ># 59 "/usr/obj/usr/src/tmp/usr/include/strings.h" 3 4 >#if __BSD_VISIBLE || __POSIX_VISIBLE <= 200112 >char *index(const char *, int) __pure; /* LEGACY */ >char *rindex(const char *, int) __pure; /* LEGACY */ >#endif ># 63 "/usr/obj/usr/src/tmp/usr/include/strings.h" 3 4 >int strcasecmp(const char *, const char *) __pure; >int strncasecmp(const char *, const char *, size_t) __pure; > >#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_) >#if 0 /* expanded by -frewrite-includes */ >#include <xlocale/_strings.h> >#endif /* expanded by -frewrite-includes */ ># 67 "/usr/obj/usr/src/tmp/usr/include/strings.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/xlocale/_strings.h" 1 3 4 >/*- > * Copyright (c) 2011, 2012 The FreeBSD Foundation > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: stable/11/include/xlocale/_strings.h 266865 2014-05-30 01:09:07Z pfg $ > */ > >#ifndef _LOCALE_T_DEFINED >#define _LOCALE_T_DEFINED >typedef struct _xlocale *locale_t; >#endif ># 33 "/usr/obj/usr/src/tmp/usr/include/xlocale/_strings.h" 3 4 > >/* > * This file is included from both strings.h and xlocale.h. We need to expose > * the declarations unconditionally if we are included from xlocale.h, but only > * if we are in POSIX2008 mode if included from string.h. > */ > >#ifndef _XLOCALE_STRINGS1_H >#define _XLOCALE_STRINGS1_H > >/* > * POSIX2008 functions > */ >int strcasecmp_l(const char *, const char *, locale_t); >int strncasecmp_l(const char *, const char *, size_t, locale_t); >#endif /* _XLOCALE_STRINGS1_H */ ># 49 "/usr/obj/usr/src/tmp/usr/include/xlocale/_strings.h" 3 4 ># 68 "/usr/obj/usr/src/tmp/usr/include/strings.h" 2 3 4 >#endif ># 69 "/usr/obj/usr/src/tmp/usr/include/strings.h" 3 4 >__END_DECLS > >#endif /* _STRINGS_H_ */ ># 72 "/usr/obj/usr/src/tmp/usr/include/strings.h" 3 4 ># 46 "/usr/obj/usr/src/tmp/usr/include/string.h" 2 3 4 >#endif ># 47 "/usr/obj/usr/src/tmp/usr/include/string.h" 3 4 > >#ifndef _SIZE_T_DECLARED >typedef __size_t size_t; >#define _SIZE_T_DECLARED >#endif ># 52 "/usr/obj/usr/src/tmp/usr/include/string.h" 3 4 > >__BEGIN_DECLS >#if __XSI_VISIBLE >= 600 >void *memccpy(void * __restrict, const void * __restrict, int, size_t); >#endif ># 57 "/usr/obj/usr/src/tmp/usr/include/string.h" 3 4 >void *memchr(const void *, int, size_t) __pure; >#if __BSD_VISIBLE >void *memrchr(const void *, int, size_t) __pure; >#endif ># 61 "/usr/obj/usr/src/tmp/usr/include/string.h" 3 4 >int memcmp(const void *, const void *, size_t) __pure; >void *memcpy(void * __restrict, const void * __restrict, size_t); >#if __BSD_VISIBLE >void *memmem(const void *, size_t, const void *, size_t) __pure; >#endif ># 66 "/usr/obj/usr/src/tmp/usr/include/string.h" 3 4 >void *memmove(void *, const void *, size_t); >void *memset(void *, int, size_t); >#if __POSIX_VISIBLE >= 200809 >char *stpcpy(char * __restrict, const char * __restrict); >char *stpncpy(char * __restrict, const char * __restrict, size_t); >#endif ># 72 "/usr/obj/usr/src/tmp/usr/include/string.h" 3 4 >#if __BSD_VISIBLE >char *strcasestr(const char *, const char *) __pure; >#endif ># 75 "/usr/obj/usr/src/tmp/usr/include/string.h" 3 4 >char *strcat(char * __restrict, const char * __restrict); >char *strchr(const char *, int) __pure; >#if __BSD_VISIBLE >char *strchrnul(const char*, int) __pure; >#endif ># 80 "/usr/obj/usr/src/tmp/usr/include/string.h" 3 4 >int strcmp(const char *, const char *) __pure; >int strcoll(const char *, const char *); >char *strcpy(char * __restrict, const char * __restrict); >size_t strcspn(const char *, const char *) __pure; >#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >char *strdup(const char *) __malloc_like; >#endif ># 87 "/usr/obj/usr/src/tmp/usr/include/string.h" 3 4 >char *strerror(int); >#if __POSIX_VISIBLE >= 200112 >int strerror_r(int, char *, size_t); >#endif ># 91 "/usr/obj/usr/src/tmp/usr/include/string.h" 3 4 >#if __BSD_VISIBLE >size_t strlcat(char * __restrict, const char * __restrict, size_t); >size_t strlcpy(char * __restrict, const char * __restrict, size_t); >#endif ># 95 "/usr/obj/usr/src/tmp/usr/include/string.h" 3 4 >size_t strlen(const char *) __pure; >#if __BSD_VISIBLE >void strmode(int, char *); >#endif ># 99 "/usr/obj/usr/src/tmp/usr/include/string.h" 3 4 >char *strncat(char * __restrict, const char * __restrict, size_t); >int strncmp(const char *, const char *, size_t) __pure; >char *strncpy(char * __restrict, const char * __restrict, size_t); >#if __POSIX_VISIBLE >= 200809 >char *strndup(const char *, size_t) __malloc_like; >size_t strnlen(const char *, size_t) __pure; >#endif ># 106 "/usr/obj/usr/src/tmp/usr/include/string.h" 3 4 >#if __BSD_VISIBLE >char *strnstr(const char *, const char *, size_t) __pure; >#endif ># 109 "/usr/obj/usr/src/tmp/usr/include/string.h" 3 4 >char *strpbrk(const char *, const char *) __pure; >char *strrchr(const char *, int) __pure; >#if __BSD_VISIBLE >char *strsep(char **, const char *); >#endif ># 114 "/usr/obj/usr/src/tmp/usr/include/string.h" 3 4 >#if __POSIX_VISIBLE >= 200809 >char *strsignal(int); >#endif ># 117 "/usr/obj/usr/src/tmp/usr/include/string.h" 3 4 >size_t strspn(const char *, const char *) __pure; >char *strstr(const char *, const char *) __pure; >char *strtok(char * __restrict, const char * __restrict); >#if __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE >= 500 >char *strtok_r(char *, const char *, char **); >#endif ># 123 "/usr/obj/usr/src/tmp/usr/include/string.h" 3 4 >size_t strxfrm(char * __restrict, const char * __restrict, size_t); >#if __BSD_VISIBLE > >#ifndef _SWAB_DECLARED >#define _SWAB_DECLARED > >#ifndef _SSIZE_T_DECLARED >typedef __ssize_t ssize_t; >#define _SSIZE_T_DECLARED >#endif /* _SIZE_T_DECLARED */ ># 133 "/usr/obj/usr/src/tmp/usr/include/string.h" 3 4 > >void swab(const void * __restrict, void * __restrict, ssize_t); >#endif /* _SWAB_DECLARED */ ># 136 "/usr/obj/usr/src/tmp/usr/include/string.h" 3 4 > >#endif /* __BSD_VISIBLE */ ># 138 "/usr/obj/usr/src/tmp/usr/include/string.h" 3 4 > >#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_) >#if 0 /* expanded by -frewrite-includes */ >#include <xlocale/_string.h> >#endif /* expanded by -frewrite-includes */ ># 140 "/usr/obj/usr/src/tmp/usr/include/string.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/xlocale/_string.h" 1 3 4 >/*- > * Copyright (c) 2011, 2012 The FreeBSD Foundation > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: stable/11/include/xlocale/_string.h 266865 2014-05-30 01:09:07Z pfg $ > */ > >#ifndef _LOCALE_T_DEFINED >#define _LOCALE_T_DEFINED >typedef struct _xlocale *locale_t; >#endif ># 33 "/usr/obj/usr/src/tmp/usr/include/xlocale/_string.h" 3 4 > >/* > * This file is included from both string.h and xlocale.h. We need to expose > * the declarations unconditionally if we are included from xlocale.h, but only > * if we are in POSIX2008 mode if included from string.h. > */ > >#ifndef _XLOCALE_STRING1_H >#define _XLOCALE_STRING1_H > >/* > * POSIX2008 functions > */ >int strcoll_l(const char *, const char *, locale_t); >size_t strxfrm_l(char *, const char *, size_t, locale_t); >#endif /* _XLOCALE_STRING1_H */ ># 49 "/usr/obj/usr/src/tmp/usr/include/xlocale/_string.h" 3 4 > >/* > * xlocale extensions > */ >#ifdef _XLOCALE_H_ >#ifndef _XLOCALE_STRING2_H >#define _XLOCALE_STRING2_H >char *strcasestr_l(const char *, const char *, locale_t); > >#endif /* _XLOCALE_STRING2_H */ ># 59 "/usr/obj/usr/src/tmp/usr/include/xlocale/_string.h" 3 4 >#endif /* _XLOCALE_H_ */ ># 60 "/usr/obj/usr/src/tmp/usr/include/xlocale/_string.h" 3 4 ># 141 "/usr/obj/usr/src/tmp/usr/include/string.h" 2 3 4 >#endif ># 142 "/usr/obj/usr/src/tmp/usr/include/string.h" 3 4 >__END_DECLS > >#endif /* _STRING_H_ */ ># 145 "/usr/obj/usr/src/tmp/usr/include/string.h" 3 4 ># 67 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" 2 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/types.h> >#endif /* expanded by -frewrite-includes */ ># 67 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" ># 1 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 1 3 4 >/*- > * Copyright (c) 1982, 1986, 1991, 1993, 1994 > * The Regents of the University of California. All rights reserved. > * (c) UNIX System Laboratories, Inc. > * All or some portions of this file are derived from material licensed > * to the University of California by American Telephone and Telegraph > * Co. or Unix System Laboratories, Inc. and are reproduced herein with > * the permission of UNIX System Laboratories, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 4. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)types.h 8.6 (Berkeley) 2/19/95 > * $FreeBSD: stable/11/sys/sys/types.h 313574 2017-02-11 02:00:56Z kib $ > */ > >#ifndef _SYS_TYPES_H_ >#define _SYS_TYPES_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 41 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 ># 42 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >/* Machine type dependent parameters. */ >#if 0 /* expanded by -frewrite-includes */ >#include <machine/endian.h> >#endif /* expanded by -frewrite-includes */ ># 44 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/machine/endian.h" 1 3 4 >/*- > * This file is in the public domain. > */ >/* $FreeBSD: stable/11/sys/amd64/include/endian.h 232266 2012-02-28 19:39:54Z tijl $ */ > >#if 0 /* expanded by -frewrite-includes */ >#include <x86/endian.h> >#endif /* expanded by -frewrite-includes */ ># 6 "/usr/obj/usr/src/tmp/usr/include/machine/endian.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/x86/endian.h" 1 3 4 >/*- > * Copyright (c) 1987, 1991 Regents of the University of California. > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 4. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)endian.h 7.8 (Berkeley) 4/3/91 > * $FreeBSD: stable/11/sys/x86/include/endian.h 233684 2012-03-29 23:31:48Z dim $ > */ > >#ifndef _MACHINE_ENDIAN_H_ >#define _MACHINE_ENDIAN_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 36 "/usr/obj/usr/src/tmp/usr/include/x86/endian.h" 3 4 ># 37 "/usr/obj/usr/src/tmp/usr/include/x86/endian.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 37 "/usr/obj/usr/src/tmp/usr/include/x86/endian.h" 3 4 ># 38 "/usr/obj/usr/src/tmp/usr/include/x86/endian.h" 3 4 > >/* > * Define the order of 32-bit words in 64-bit words. > */ >#define _QUAD_HIGHWORD 1 >#define _QUAD_LOWWORD 0 > >/* > * Definitions for byte order, according to byte significance from low > * address to high. > */ >#define _LITTLE_ENDIAN 1234 /* LSB first: i386, vax */ >#define _BIG_ENDIAN 4321 /* MSB first: 68000, ibm, net */ >#define _PDP_ENDIAN 3412 /* LSB first in word, MSW first in long */ > >#define _BYTE_ORDER _LITTLE_ENDIAN > >/* > * Deprecated variants that don't have enough underscores to be useful in more > * strict namespaces. > */ >#if __BSD_VISIBLE >#define LITTLE_ENDIAN _LITTLE_ENDIAN >#define BIG_ENDIAN _BIG_ENDIAN >#define PDP_ENDIAN _PDP_ENDIAN >#define BYTE_ORDER _BYTE_ORDER >#endif ># 65 "/usr/obj/usr/src/tmp/usr/include/x86/endian.h" 3 4 > >#define __bswap16_gen(x) (__uint16_t)((x) << 8 | (x) >> 8) >#define __bswap32_gen(x) \ > (((__uint32_t)__bswap16((x) & 0xffff) << 16) | __bswap16((x) >> 16)) >#define __bswap64_gen(x) \ > (((__uint64_t)__bswap32((x) & 0xffffffff) << 32) | __bswap32((x) >> 32)) > >#ifdef __GNUCLIKE_BUILTIN_CONSTANT_P >#define __bswap16(x) \ > ((__uint16_t)(__builtin_constant_p(x) ? \ > __bswap16_gen((__uint16_t)(x)) : __bswap16_var(x))) >#define __bswap32(x) \ > (__builtin_constant_p(x) ? \ > __bswap32_gen((__uint32_t)(x)) : __bswap32_var(x)) >#define __bswap64(x) \ > (__builtin_constant_p(x) ? \ > __bswap64_gen((__uint64_t)(x)) : __bswap64_var(x)) >#else ># 83 "/usr/obj/usr/src/tmp/usr/include/x86/endian.h" 3 4 >/* XXX these are broken for use in static initializers. */ >#define __bswap16(x) __bswap16_var(x) >#define __bswap32(x) __bswap32_var(x) >#define __bswap64(x) __bswap64_var(x) >#endif ># 88 "/usr/obj/usr/src/tmp/usr/include/x86/endian.h" 3 4 > >/* These are defined as functions to avoid multiple evaluation of x. */ > >static __inline __uint16_t >__bswap16_var(__uint16_t _x) >{ > > return (__bswap16_gen(_x)); >} > >static __inline __uint32_t >__bswap32_var(__uint32_t _x) >{ > >#ifdef __GNUCLIKE_ASM > __asm("bswap %0" : "+r" (_x)); > return (_x); >#else ># 106 "/usr/obj/usr/src/tmp/usr/include/x86/endian.h" 3 4 > return (__bswap32_gen(_x)); >#endif ># 108 "/usr/obj/usr/src/tmp/usr/include/x86/endian.h" 3 4 >} > >static __inline __uint64_t >__bswap64_var(__uint64_t _x) >{ > >#if defined(__amd64__) && defined(__GNUCLIKE_ASM) > __asm("bswap %0" : "+r" (_x)); > return (_x); >#else ># 118 "/usr/obj/usr/src/tmp/usr/include/x86/endian.h" 3 4 > /* > * It is important for the optimizations that the following is not > * really generic, but expands to 2 __bswap32_var()'s. > */ > return (__bswap64_gen(_x)); >#endif ># 124 "/usr/obj/usr/src/tmp/usr/include/x86/endian.h" 3 4 >} > >#define __htonl(x) __bswap32(x) >#define __htons(x) __bswap16(x) >#define __ntohl(x) __bswap32(x) >#define __ntohs(x) __bswap16(x) > >#endif /* !_MACHINE_ENDIAN_H_ */ ># 132 "/usr/obj/usr/src/tmp/usr/include/x86/endian.h" 3 4 ># 7 "/usr/obj/usr/src/tmp/usr/include/machine/endian.h" 2 3 4 ># 45 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 2 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 45 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 ># 46 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_pthreadtypes.h> >#endif /* expanded by -frewrite-includes */ ># 47 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/sys/_pthreadtypes.h" 1 3 4 >/* > * Copyright (c) 1993, 1994 by Chris Provenzano, proven@mit.edu > * Copyright (c) 1995-1998 by John Birrell <jb@cimlogic.com.au> > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. All advertising materials mentioning features or use of this software > * must display the following acknowledgement: > * This product includes software developed by Chris Provenzano. > * 4. The name of Chris Provenzano may not be used to endorse or promote > * products derived from this software without specific prior written > * permission. > * > * THIS SOFTWARE IS PROVIDED BY CHRIS PROVENZANO ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL CHRIS PROVENZANO BE LIABLE FOR ANY > * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES > * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR > * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER > * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: stable/11/sys/sys/_pthreadtypes.h 189828 2009-03-14 20:10:14Z das $ > */ > >#ifndef _SYS__PTHREADTYPES_H_ >#define _SYS__PTHREADTYPES_H_ > >/* > * Forward structure definitions. > * > * These are mostly opaque to the user. > */ >struct pthread; >struct pthread_attr; >struct pthread_cond; >struct pthread_cond_attr; >struct pthread_mutex; >struct pthread_mutex_attr; >struct pthread_once; >struct pthread_rwlock; >struct pthread_rwlockattr; >struct pthread_barrier; >struct pthread_barrier_attr; >struct pthread_spinlock; > >/* > * Primitive system data type definitions required by P1003.1c. > * > * Note that P1003.1c specifies that there are no defined comparison > * or assignment operators for the types pthread_attr_t, pthread_cond_t, > * pthread_condattr_t, pthread_mutex_t, pthread_mutexattr_t. > */ >#ifndef _PTHREAD_T_DECLARED >typedef struct pthread *pthread_t; >#define _PTHREAD_T_DECLARED >#endif ># 68 "/usr/obj/usr/src/tmp/usr/include/sys/_pthreadtypes.h" 3 4 >typedef struct pthread_attr *pthread_attr_t; >typedef struct pthread_mutex *pthread_mutex_t; >typedef struct pthread_mutex_attr *pthread_mutexattr_t; >typedef struct pthread_cond *pthread_cond_t; >typedef struct pthread_cond_attr *pthread_condattr_t; >typedef int pthread_key_t; >typedef struct pthread_once pthread_once_t; >typedef struct pthread_rwlock *pthread_rwlock_t; >typedef struct pthread_rwlockattr *pthread_rwlockattr_t; >typedef struct pthread_barrier *pthread_barrier_t; >typedef struct pthread_barrierattr *pthread_barrierattr_t; >typedef struct pthread_spinlock *pthread_spinlock_t; > >/* > * Additional type definitions: > * > * Note that P1003.1c reserves the prefixes pthread_ and PTHREAD_ for > * use in header symbols. > */ >typedef void *pthread_addr_t; >typedef void *(*pthread_startroutine_t)(void *); > >/* > * Once definitions. > */ >struct pthread_once { > int state; > pthread_mutex_t mutex; >}; > >#endif /* ! _SYS__PTHREADTYPES_H_ */ ># 99 "/usr/obj/usr/src/tmp/usr/include/sys/_pthreadtypes.h" 3 4 ># 48 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 2 3 4 > >#if __BSD_VISIBLE >typedef unsigned char u_char; >typedef unsigned short u_short; >typedef unsigned int u_int; >typedef unsigned long u_long; >#ifndef _KERNEL >typedef unsigned short ushort; /* Sys V compatibility */ >typedef unsigned int uint; /* Sys V compatibility */ >#endif ># 58 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 >#endif ># 59 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >/* > * XXX POSIX sized integrals that should appear only in <sys/stdint.h>. > */ >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_stdint.h> >#endif /* expanded by -frewrite-includes */ ># 63 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/sys/_stdint.h" 1 3 4 >/*- > * Copyright (c) 2011 David E. O'Brien <obrien@FreeBSD.org> > * Copyright (c) 2001 Mike Barcroft <mike@FreeBSD.org> > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: stable/11/sys/sys/_stdint.h 290492 2015-11-07 12:30:43Z kib $ > */ > >#ifndef _SYS__STDINT_H_ >#define _SYS__STDINT_H_ > >#ifndef _INT8_T_DECLARED >typedef __int8_t int8_t; >#define _INT8_T_DECLARED >#endif ># 37 "/usr/obj/usr/src/tmp/usr/include/sys/_stdint.h" 3 4 > >#ifndef _INT16_T_DECLARED >typedef __int16_t int16_t; >#define _INT16_T_DECLARED >#endif ># 42 "/usr/obj/usr/src/tmp/usr/include/sys/_stdint.h" 3 4 > >#ifndef _INT32_T_DECLARED >typedef __int32_t int32_t; >#define _INT32_T_DECLARED >#endif ># 47 "/usr/obj/usr/src/tmp/usr/include/sys/_stdint.h" 3 4 > >#ifndef _INT64_T_DECLARED >typedef __int64_t int64_t; >#define _INT64_T_DECLARED >#endif ># 52 "/usr/obj/usr/src/tmp/usr/include/sys/_stdint.h" 3 4 > >#ifndef _UINT8_T_DECLARED >typedef __uint8_t uint8_t; >#define _UINT8_T_DECLARED >#endif ># 57 "/usr/obj/usr/src/tmp/usr/include/sys/_stdint.h" 3 4 > >#ifndef _UINT16_T_DECLARED >typedef __uint16_t uint16_t; >#define _UINT16_T_DECLARED >#endif ># 62 "/usr/obj/usr/src/tmp/usr/include/sys/_stdint.h" 3 4 > >#ifndef _UINT32_T_DECLARED >typedef __uint32_t uint32_t; >#define _UINT32_T_DECLARED >#endif ># 67 "/usr/obj/usr/src/tmp/usr/include/sys/_stdint.h" 3 4 > >#ifndef _UINT64_T_DECLARED >typedef __uint64_t uint64_t; >#define _UINT64_T_DECLARED >#endif ># 72 "/usr/obj/usr/src/tmp/usr/include/sys/_stdint.h" 3 4 > >#ifndef _INTPTR_T_DECLARED >typedef __intptr_t intptr_t; >#define _INTPTR_T_DECLARED >#endif ># 77 "/usr/obj/usr/src/tmp/usr/include/sys/_stdint.h" 3 4 >#ifndef _UINTPTR_T_DECLARED >typedef __uintptr_t uintptr_t; >#define _UINTPTR_T_DECLARED >#endif ># 81 "/usr/obj/usr/src/tmp/usr/include/sys/_stdint.h" 3 4 >#ifndef _INTMAX_T_DECLARED >typedef __intmax_t intmax_t; >#define _INTMAX_T_DECLARED >#endif ># 85 "/usr/obj/usr/src/tmp/usr/include/sys/_stdint.h" 3 4 >#ifndef _UINTMAX_T_DECLARED >typedef __uintmax_t uintmax_t; >#define _UINTMAX_T_DECLARED >#endif ># 89 "/usr/obj/usr/src/tmp/usr/include/sys/_stdint.h" 3 4 > >#endif /* !_SYS__STDINT_H_ */ ># 91 "/usr/obj/usr/src/tmp/usr/include/sys/_stdint.h" 3 4 ># 64 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 2 3 4 > >typedef __uint8_t u_int8_t; /* unsigned integrals (deprecated) */ >typedef __uint16_t u_int16_t; >typedef __uint32_t u_int32_t; >typedef __uint64_t u_int64_t; > >typedef __uint64_t u_quad_t; /* quads (deprecated) */ >typedef __int64_t quad_t; >typedef quad_t * qaddr_t; > >typedef char * caddr_t; /* core address */ >typedef const char * c_caddr_t; /* core address, pointer to const */ > >#ifndef _BLKSIZE_T_DECLARED >typedef __blksize_t blksize_t; >#define _BLKSIZE_T_DECLARED >#endif ># 81 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >typedef __cpuwhich_t cpuwhich_t; >typedef __cpulevel_t cpulevel_t; >typedef __cpusetid_t cpusetid_t; > >#ifndef _BLKCNT_T_DECLARED >typedef __blkcnt_t blkcnt_t; >#define _BLKCNT_T_DECLARED >#endif ># 90 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _CLOCK_T_DECLARED >typedef __clock_t clock_t; >#define _CLOCK_T_DECLARED >#endif ># 95 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _CLOCKID_T_DECLARED >typedef __clockid_t clockid_t; >#define _CLOCKID_T_DECLARED >#endif ># 100 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >typedef __critical_t critical_t; /* Critical section value */ >typedef __int64_t daddr_t; /* disk address */ > >#ifndef _DEV_T_DECLARED >typedef __dev_t dev_t; /* device number or struct cdev */ >#define _DEV_T_DECLARED >#endif ># 108 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _FFLAGS_T_DECLARED >typedef __fflags_t fflags_t; /* file flags */ >#define _FFLAGS_T_DECLARED >#endif ># 113 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >typedef __fixpt_t fixpt_t; /* fixed point number */ > >#ifndef _FSBLKCNT_T_DECLARED /* for statvfs() */ >typedef __fsblkcnt_t fsblkcnt_t; >typedef __fsfilcnt_t fsfilcnt_t; >#define _FSBLKCNT_T_DECLARED >#endif ># 121 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _GID_T_DECLARED >typedef __gid_t gid_t; /* group id */ >#define _GID_T_DECLARED >#endif ># 126 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _IN_ADDR_T_DECLARED >typedef __uint32_t in_addr_t; /* base type for internet address */ >#define _IN_ADDR_T_DECLARED >#endif ># 131 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _IN_PORT_T_DECLARED >typedef __uint16_t in_port_t; >#define _IN_PORT_T_DECLARED >#endif ># 136 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _ID_T_DECLARED >typedef __id_t id_t; /* can hold a uid_t or pid_t */ >#define _ID_T_DECLARED >#endif ># 141 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _INO_T_DECLARED >typedef __ino_t ino_t; /* inode number */ >#define _INO_T_DECLARED >#endif ># 146 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _KEY_T_DECLARED >typedef __key_t key_t; /* IPC key (for Sys V IPC) */ >#define _KEY_T_DECLARED >#endif ># 151 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _LWPID_T_DECLARED >typedef __lwpid_t lwpid_t; /* Thread ID (a.k.a. LWP) */ >#define _LWPID_T_DECLARED >#endif ># 156 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _MODE_T_DECLARED >typedef __mode_t mode_t; /* permissions */ >#define _MODE_T_DECLARED >#endif ># 161 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _ACCMODE_T_DECLARED >typedef __accmode_t accmode_t; /* access permissions */ >#define _ACCMODE_T_DECLARED >#endif ># 166 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _NLINK_T_DECLARED >typedef __nlink_t nlink_t; /* link count */ >#define _NLINK_T_DECLARED >#endif ># 171 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _OFF_T_DECLARED >typedef __off_t off_t; /* file offset */ >#define _OFF_T_DECLARED >#endif ># 176 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _OFF64_T_DECLARED >typedef __off64_t off64_t; /* file offset (alias) */ >#define _OFF64_T_DECLARED >#endif ># 181 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _PID_T_DECLARED >typedef __pid_t pid_t; /* process id */ >#define _PID_T_DECLARED >#endif ># 186 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >typedef __register_t register_t; > >#ifndef _RLIM_T_DECLARED >typedef __rlim_t rlim_t; /* resource limit */ >#define _RLIM_T_DECLARED >#endif ># 193 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >typedef __int64_t sbintime_t; > >typedef __segsz_t segsz_t; /* segment size (in pages) */ > >#ifndef _SIZE_T_DECLARED >typedef __size_t size_t; >#define _SIZE_T_DECLARED >#endif ># 202 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _SSIZE_T_DECLARED >typedef __ssize_t ssize_t; >#define _SSIZE_T_DECLARED >#endif ># 207 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _SUSECONDS_T_DECLARED >typedef __suseconds_t suseconds_t; /* microseconds (signed) */ >#define _SUSECONDS_T_DECLARED >#endif ># 212 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _TIME_T_DECLARED >typedef __time_t time_t; >#define _TIME_T_DECLARED >#endif ># 217 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _TIMER_T_DECLARED >typedef __timer_t timer_t; >#define _TIMER_T_DECLARED >#endif ># 222 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _MQD_T_DECLARED >typedef __mqd_t mqd_t; >#define _MQD_T_DECLARED >#endif ># 227 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >typedef __u_register_t u_register_t; > >#ifndef _UID_T_DECLARED >typedef __uid_t uid_t; /* user id */ >#define _UID_T_DECLARED >#endif ># 234 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _USECONDS_T_DECLARED >typedef __useconds_t useconds_t; /* microseconds (unsigned) */ >#define _USECONDS_T_DECLARED >#endif ># 239 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _CAP_IOCTL_T_DECLARED >#define _CAP_IOCTL_T_DECLARED >typedef unsigned long cap_ioctl_t; >#endif ># 244 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _CAP_RIGHTS_T_DECLARED >#define _CAP_RIGHTS_T_DECLARED >struct cap_rights; > >typedef struct cap_rights cap_rights_t; >#endif ># 251 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >typedef __vm_offset_t vm_offset_t; >typedef __int64_t vm_ooffset_t; >typedef __vm_paddr_t vm_paddr_t; >typedef __uint64_t vm_pindex_t; >typedef __vm_size_t vm_size_t; > >typedef __rman_res_t rman_res_t; > >#ifdef _KERNEL >typedef int boolean_t; >typedef struct device *device_t; >typedef __intfptr_t intfptr_t; > >/* > * XXX this is fixed width for historical reasons. It should have had type > * __int_fast32_t. Fixed-width types should not be used unless binary > * compatibility is essential. Least-width types should be used even less > * since they provide smaller benefits. > * > * XXX should be MD. > * > * XXX this is bogus in -current, but still used for spl*(). > */ >typedef __uint32_t intrmask_t; /* Interrupt mask (spl, xxx_imask...) */ > >typedef __uintfptr_t uintfptr_t; >typedef __uint64_t uoff_t; >typedef char vm_memattr_t; /* memory attribute codes */ >typedef struct vm_page *vm_page_t; > >#if !defined(__bool_true_false_are_defined) && !defined(__cplusplus) >#define __bool_true_false_are_defined 1 >#define false 0 >#define true 1 >#if __STDC_VERSION__ < 199901L && __GNUC__ < 3 && !defined(__INTEL_COMPILER) >typedef int _Bool; >#endif ># 289 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 >typedef _Bool bool; >#endif /* !__bool_true_false_are_defined && !__cplusplus */ ># 291 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#define offsetof(type, field) __offsetof(type, field) > >#endif /* !_KERNEL */ ># 295 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >/* > * The following are all things that really shouldn't exist in this header, > * since its purpose is to provide typedefs, not miscellaneous doodads. > */ > >#ifdef __POPCNT__ >#define __bitcount64(x) __builtin_popcountll((__uint64_t)(x)) >#define __bitcount32(x) __builtin_popcount((__uint32_t)(x)) >#define __bitcount16(x) __builtin_popcount((__uint16_t)(x)) >#define __bitcountl(x) __builtin_popcountl((unsigned long)(x)) >#define __bitcount(x) __builtin_popcount((unsigned int)(x)) >#else ># 308 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 >/* > * Population count algorithm using SWAR approach > * - "SIMD Within A Register". > */ >static __inline __uint16_t >__bitcount16(__uint16_t _x) >{ > > _x = (_x & 0x5555) + ((_x & 0xaaaa) >> 1); > _x = (_x & 0x3333) + ((_x & 0xcccc) >> 2); > _x = (_x + (_x >> 4)) & 0x0f0f; > _x = (_x + (_x >> 8)) & 0x00ff; > return (_x); >} > >static __inline __uint32_t >__bitcount32(__uint32_t _x) >{ > > _x = (_x & 0x55555555) + ((_x & 0xaaaaaaaa) >> 1); > _x = (_x & 0x33333333) + ((_x & 0xcccccccc) >> 2); > _x = (_x + (_x >> 4)) & 0x0f0f0f0f; > _x = (_x + (_x >> 8)); > _x = (_x + (_x >> 16)) & 0x000000ff; > return (_x); >} > >#ifdef __LP64__ >static __inline __uint64_t >__bitcount64(__uint64_t _x) >{ > > _x = (_x & 0x5555555555555555) + ((_x & 0xaaaaaaaaaaaaaaaa) >> 1); > _x = (_x & 0x3333333333333333) + ((_x & 0xcccccccccccccccc) >> 2); > _x = (_x + (_x >> 4)) & 0x0f0f0f0f0f0f0f0f; > _x = (_x + (_x >> 8)); > _x = (_x + (_x >> 16)); > _x = (_x + (_x >> 32)) & 0x000000ff; > return (_x); >} > >#define __bitcountl(x) __bitcount64((unsigned long)(x)) >#else ># 351 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 >static __inline __uint64_t >__bitcount64(__uint64_t _x) >{ > > return (__bitcount32(_x >> 32) + __bitcount32(_x)); >} > >#define __bitcountl(x) __bitcount32((unsigned long)(x)) >#endif ># 360 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 >#define __bitcount(x) __bitcount32((unsigned int)(x)) >#endif ># 362 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#if __BSD_VISIBLE > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/select.h> >#endif /* expanded by -frewrite-includes */ ># 365 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/sys/select.h" 1 3 4 >/*- > * Copyright (c) 1992, 1993 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 4. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: stable/11/sys/sys/select.h 265051 2014-04-28 13:42:41Z emaste $ > */ > >#ifndef _SYS_SELECT_H_ >#define _SYS_SELECT_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 35 "/usr/obj/usr/src/tmp/usr/include/sys/select.h" 3 4 ># 36 "/usr/obj/usr/src/tmp/usr/include/sys/select.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 36 "/usr/obj/usr/src/tmp/usr/include/sys/select.h" 3 4 ># 37 "/usr/obj/usr/src/tmp/usr/include/sys/select.h" 3 4 > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_sigset.h> >#endif /* expanded by -frewrite-includes */ ># 38 "/usr/obj/usr/src/tmp/usr/include/sys/select.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/sys/_sigset.h" 1 3 4 >/*- > * Copyright (c) 1982, 1986, 1989, 1991, 1993 > * The Regents of the University of California. All rights reserved. > * (c) UNIX System Laboratories, Inc. > * All or some portions of this file are derived from material licensed > * to the University of California by American Telephone and Telegraph > * Co. or Unix System Laboratories, Inc. and are reproduced herein with > * the permission of UNIX System Laboratories, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 4. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)signal.h 8.4 (Berkeley) 5/4/95 > * $FreeBSD: stable/11/sys/sys/_sigset.h 139825 2005-01-07 02:29:27Z imp $ > */ > >#ifndef _SYS__SIGSET_H_ >#define _SYS__SIGSET_H_ > >/* > * sigset_t macros. > */ >#define _SIG_WORDS 4 >#define _SIG_MAXSIG 128 >#define _SIG_IDX(sig) ((sig) - 1) >#define _SIG_WORD(sig) (_SIG_IDX(sig) >> 5) >#define _SIG_BIT(sig) (1 << (_SIG_IDX(sig) & 31)) >#define _SIG_VALID(sig) ((sig) <= _SIG_MAXSIG && (sig) > 0) > >typedef struct __sigset { > __uint32_t __bits[_SIG_WORDS]; >} __sigset_t; > >#if defined(_KERNEL) && defined(COMPAT_43) >typedef unsigned int osigset_t; >#endif ># 58 "/usr/obj/usr/src/tmp/usr/include/sys/_sigset.h" 3 4 > >#endif /* !_SYS__SIGSET_H_ */ ># 60 "/usr/obj/usr/src/tmp/usr/include/sys/_sigset.h" 3 4 ># 39 "/usr/obj/usr/src/tmp/usr/include/sys/select.h" 2 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_timeval.h> >#endif /* expanded by -frewrite-includes */ ># 39 "/usr/obj/usr/src/tmp/usr/include/sys/select.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/sys/_timeval.h" 1 3 4 >/*- > * Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: stable/11/sys/sys/_timeval.h 158471 2006-05-12 05:04:46Z jhb $ > */ > >#ifndef _SYS__TIMEVAL_H_ >#define _SYS__TIMEVAL_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 32 "/usr/obj/usr/src/tmp/usr/include/sys/_timeval.h" 3 4 ># 33 "/usr/obj/usr/src/tmp/usr/include/sys/_timeval.h" 3 4 > >#ifndef _SUSECONDS_T_DECLARED >typedef __suseconds_t suseconds_t; >#define _SUSECONDS_T_DECLARED >#endif ># 38 "/usr/obj/usr/src/tmp/usr/include/sys/_timeval.h" 3 4 > >#ifndef _TIME_T_DECLARED >typedef __time_t time_t; >#define _TIME_T_DECLARED >#endif ># 43 "/usr/obj/usr/src/tmp/usr/include/sys/_timeval.h" 3 4 > >/* > * Structure returned by gettimeofday(2) system call, and used in other calls. > */ >struct timeval { > time_t tv_sec; /* seconds */ > suseconds_t tv_usec; /* and microseconds */ >}; > >#endif /* !_SYS__TIMEVAL_H_ */ ># 53 "/usr/obj/usr/src/tmp/usr/include/sys/_timeval.h" 3 4 ># 40 "/usr/obj/usr/src/tmp/usr/include/sys/select.h" 2 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/timespec.h> >#endif /* expanded by -frewrite-includes */ ># 40 "/usr/obj/usr/src/tmp/usr/include/sys/select.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/sys/timespec.h" 1 3 4 >/*- > * Copyright (c) 1982, 1986, 1993 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 4. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)time.h 8.5 (Berkeley) 5/4/95 > * from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp > * $FreeBSD: stable/11/sys/sys/timespec.h 205792 2010-03-28 13:13:22Z ed $ > */ > >#ifndef _SYS_TIMESPEC_H_ >#define _SYS_TIMESPEC_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 37 "/usr/obj/usr/src/tmp/usr/include/sys/timespec.h" 3 4 ># 38 "/usr/obj/usr/src/tmp/usr/include/sys/timespec.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_timespec.h> >#endif /* expanded by -frewrite-includes */ ># 38 "/usr/obj/usr/src/tmp/usr/include/sys/timespec.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/sys/_timespec.h" 1 3 4 >/*- > * Copyright (c) 1982, 1986, 1993 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 4. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)time.h 8.5 (Berkeley) 5/4/95 > * from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp > * $FreeBSD: stable/11/sys/sys/_timespec.h 205792 2010-03-28 13:13:22Z ed $ > */ > >#ifndef _SYS__TIMESPEC_H_ >#define _SYS__TIMESPEC_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 37 "/usr/obj/usr/src/tmp/usr/include/sys/_timespec.h" 3 4 ># 38 "/usr/obj/usr/src/tmp/usr/include/sys/_timespec.h" 3 4 > >#ifndef _TIME_T_DECLARED >typedef __time_t time_t; >#define _TIME_T_DECLARED >#endif ># 43 "/usr/obj/usr/src/tmp/usr/include/sys/_timespec.h" 3 4 > >struct timespec { > time_t tv_sec; /* seconds */ > long tv_nsec; /* and nanoseconds */ >}; > >#endif /* !_SYS__TIMESPEC_H_ */ ># 50 "/usr/obj/usr/src/tmp/usr/include/sys/_timespec.h" 3 4 ># 39 "/usr/obj/usr/src/tmp/usr/include/sys/timespec.h" 2 3 4 > >#if __BSD_VISIBLE >#define TIMEVAL_TO_TIMESPEC(tv, ts) \ > do { \ > (ts)->tv_sec = (tv)->tv_sec; \ > (ts)->tv_nsec = (tv)->tv_usec * 1000; \ > } while (0) >#define TIMESPEC_TO_TIMEVAL(tv, ts) \ > do { \ > (tv)->tv_sec = (ts)->tv_sec; \ > (tv)->tv_usec = (ts)->tv_nsec / 1000; \ > } while (0) > >#endif /* __BSD_VISIBLE */ ># 53 "/usr/obj/usr/src/tmp/usr/include/sys/timespec.h" 3 4 > >/* > * Structure defined by POSIX.1b to be like a itimerval, but with > * timespecs. Used in the timer_*() system calls. > */ >struct itimerspec { > struct timespec it_interval; > struct timespec it_value; >}; > >#endif /* _SYS_TIMESPEC_H_ */ ># 64 "/usr/obj/usr/src/tmp/usr/include/sys/timespec.h" 3 4 ># 41 "/usr/obj/usr/src/tmp/usr/include/sys/select.h" 2 3 4 > >typedef unsigned long __fd_mask; >#if __BSD_VISIBLE >typedef __fd_mask fd_mask; >#endif ># 46 "/usr/obj/usr/src/tmp/usr/include/sys/select.h" 3 4 > >#ifndef _SIGSET_T_DECLARED >#define _SIGSET_T_DECLARED >typedef __sigset_t sigset_t; >#endif ># 51 "/usr/obj/usr/src/tmp/usr/include/sys/select.h" 3 4 > >/* > * Select uses bit masks of file descriptors in longs. These macros > * manipulate such bit fields (the filesystem macros use chars). > * FD_SETSIZE may be defined by the user, but the default here should > * be enough for most uses. > */ >#ifndef FD_SETSIZE >#define FD_SETSIZE 1024 >#endif ># 61 "/usr/obj/usr/src/tmp/usr/include/sys/select.h" 3 4 > >#define _NFDBITS (sizeof(__fd_mask) * 8) /* bits per mask */ >#if __BSD_VISIBLE >#define NFDBITS _NFDBITS >#endif ># 66 "/usr/obj/usr/src/tmp/usr/include/sys/select.h" 3 4 > >#ifndef _howmany >#define _howmany(x, y) (((x) + ((y) - 1)) / (y)) >#endif ># 70 "/usr/obj/usr/src/tmp/usr/include/sys/select.h" 3 4 > >typedef struct fd_set { > __fd_mask __fds_bits[_howmany(FD_SETSIZE, _NFDBITS)]; >} fd_set; >#if __BSD_VISIBLE >#define fds_bits __fds_bits >#endif ># 77 "/usr/obj/usr/src/tmp/usr/include/sys/select.h" 3 4 > >#define __fdset_mask(n) ((__fd_mask)1 << ((n) % _NFDBITS)) >#define FD_CLR(n, p) ((p)->__fds_bits[(n)/_NFDBITS] &= ~__fdset_mask(n)) >#if __BSD_VISIBLE >#define FD_COPY(f, t) (void)(*(t) = *(f)) >#endif ># 83 "/usr/obj/usr/src/tmp/usr/include/sys/select.h" 3 4 >#define FD_ISSET(n, p) (((p)->__fds_bits[(n)/_NFDBITS] & __fdset_mask(n)) != 0) >#define FD_SET(n, p) ((p)->__fds_bits[(n)/_NFDBITS] |= __fdset_mask(n)) >#define FD_ZERO(p) do { \ > fd_set *_p; \ > __size_t _n; \ > \ > _p = (p); \ > _n = _howmany(FD_SETSIZE, _NFDBITS); \ > while (_n > 0) \ > _p->__fds_bits[--_n] = 0; \ >} while (0) > >#ifndef _KERNEL > >__BEGIN_DECLS >int pselect(int, fd_set *__restrict, fd_set *__restrict, fd_set *__restrict, > const struct timespec *__restrict, const sigset_t *__restrict); >#ifndef _SELECT_DECLARED >#define _SELECT_DECLARED >/* XXX missing restrict type-qualifier */ >int select(int, fd_set *, fd_set *, fd_set *, struct timeval *); >#endif ># 105 "/usr/obj/usr/src/tmp/usr/include/sys/select.h" 3 4 >__END_DECLS >#endif /* !_KERNEL */ ># 107 "/usr/obj/usr/src/tmp/usr/include/sys/select.h" 3 4 > >#endif /* _SYS_SELECT_H_ */ ># 109 "/usr/obj/usr/src/tmp/usr/include/sys/select.h" 3 4 ># 366 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 2 3 4 > >/* > * minor() gives a cookie instead of an index since we don't want to > * change the meanings of bits 0-15 or waste time and space shifting > * bits 16-31 for devices that don't use them. > */ >#define major(x) ((int)(((u_int)(x) >> 8)&0xff)) /* major number */ >#define minor(x) ((int)((x)&0xffff00ff)) /* minor number */ >#define makedev(x,y) ((dev_t)(((x) << 8) | (y))) /* create dev_t */ > >/* > * These declarations belong elsewhere, but are repeated here and in > * <stdio.h> to give broken programs a better chance of working with > * 64-bit off_t's. > */ >#ifndef _KERNEL >__BEGIN_DECLS >#ifndef _FTRUNCATE_DECLARED >#define _FTRUNCATE_DECLARED >int ftruncate(int, off_t); >#endif ># 387 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 >#ifndef _LSEEK_DECLARED >#define _LSEEK_DECLARED >off_t lseek(int, off_t, int); >#endif ># 391 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 >#ifndef _MMAP_DECLARED >#define _MMAP_DECLARED >void * mmap(void *, size_t, int, int, int, off_t); >#endif ># 395 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 >#ifndef _TRUNCATE_DECLARED >#define _TRUNCATE_DECLARED >int truncate(const char *, off_t); >#endif ># 399 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 >__END_DECLS >#endif /* !_KERNEL */ ># 401 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#endif /* __BSD_VISIBLE */ ># 403 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 > >#endif /* !_SYS_TYPES_H_ */ ># 405 "/usr/obj/usr/src/tmp/usr/include/sys/types.h" 3 4 ># 68 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" 2 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/stat.h> >#endif /* expanded by -frewrite-includes */ ># 68 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" ># 1 "/usr/obj/usr/src/tmp/usr/include/sys/stat.h" 1 3 4 >/*- > * Copyright (c) 1982, 1986, 1989, 1993 > * The Regents of the University of California. All rights reserved. > * (c) UNIX System Laboratories, Inc. > * All or some portions of this file are derived from material licensed > * to the University of California by American Telephone and Telegraph > * Co. or Unix System Laboratories, Inc. and are reproduced herein with > * the permission of UNIX System Laboratories, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 4. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)stat.h 8.12 (Berkeley) 6/16/95 > * $FreeBSD: stable/11/sys/sys/stat.h 277610 2015-01-23 21:07:08Z jilles $ > */ > >#ifndef _SYS_STAT_H_ >#define _SYS_STAT_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 41 "/usr/obj/usr/src/tmp/usr/include/sys/stat.h" 3 4 ># 42 "/usr/obj/usr/src/tmp/usr/include/sys/stat.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_timespec.h> >#endif /* expanded by -frewrite-includes */ ># 42 "/usr/obj/usr/src/tmp/usr/include/sys/stat.h" 3 4 ># 43 "/usr/obj/usr/src/tmp/usr/include/sys/stat.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 43 "/usr/obj/usr/src/tmp/usr/include/sys/stat.h" 3 4 ># 44 "/usr/obj/usr/src/tmp/usr/include/sys/stat.h" 3 4 > >#ifndef _BLKSIZE_T_DECLARED >typedef __blksize_t blksize_t; >#define _BLKSIZE_T_DECLARED >#endif ># 49 "/usr/obj/usr/src/tmp/usr/include/sys/stat.h" 3 4 > >#ifndef _BLKCNT_T_DECLARED >typedef __blkcnt_t blkcnt_t; >#define _BLKCNT_T_DECLARED >#endif ># 54 "/usr/obj/usr/src/tmp/usr/include/sys/stat.h" 3 4 > >#ifndef _DEV_T_DECLARED >typedef __dev_t dev_t; >#define _DEV_T_DECLARED >#endif ># 59 "/usr/obj/usr/src/tmp/usr/include/sys/stat.h" 3 4 > >#ifndef _FFLAGS_T_DECLARED >typedef __fflags_t fflags_t; >#define _FFLAGS_T_DECLARED >#endif ># 64 "/usr/obj/usr/src/tmp/usr/include/sys/stat.h" 3 4 > >#ifndef _GID_T_DECLARED >typedef __gid_t gid_t; >#define _GID_T_DECLARED >#endif ># 69 "/usr/obj/usr/src/tmp/usr/include/sys/stat.h" 3 4 > >#ifndef _INO_T_DECLARED >typedef __ino_t ino_t; >#define _INO_T_DECLARED >#endif ># 74 "/usr/obj/usr/src/tmp/usr/include/sys/stat.h" 3 4 > >#ifndef _MODE_T_DECLARED >typedef __mode_t mode_t; >#define _MODE_T_DECLARED >#endif ># 79 "/usr/obj/usr/src/tmp/usr/include/sys/stat.h" 3 4 > >#ifndef _NLINK_T_DECLARED >typedef __nlink_t nlink_t; >#define _NLINK_T_DECLARED >#endif ># 84 "/usr/obj/usr/src/tmp/usr/include/sys/stat.h" 3 4 > >#ifndef _OFF_T_DECLARED >typedef __off_t off_t; >#define _OFF_T_DECLARED >#endif ># 89 "/usr/obj/usr/src/tmp/usr/include/sys/stat.h" 3 4 > >#ifndef _UID_T_DECLARED >typedef __uid_t uid_t; >#define _UID_T_DECLARED >#endif ># 94 "/usr/obj/usr/src/tmp/usr/include/sys/stat.h" 3 4 > >#if !defined(_KERNEL) && __BSD_VISIBLE >/* > * XXX We get miscellaneous namespace pollution with this. > */ >#if 0 /* expanded by -frewrite-includes */ >#include <sys/time.h> >#endif /* expanded by -frewrite-includes */ ># 99 "/usr/obj/usr/src/tmp/usr/include/sys/stat.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/sys/time.h" 1 3 4 >/*- > * Copyright (c) 1982, 1986, 1993 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 4. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)time.h 8.5 (Berkeley) 5/4/95 > * $FreeBSD: stable/11/sys/sys/time.h 304843 2016-08-26 10:04:10Z kib $ > */ > >#ifndef _SYS_TIME_H_ >#define _SYS_TIME_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_timeval.h> >#endif /* expanded by -frewrite-includes */ ># 36 "/usr/obj/usr/src/tmp/usr/include/sys/time.h" 3 4 ># 37 "/usr/obj/usr/src/tmp/usr/include/sys/time.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/types.h> >#endif /* expanded by -frewrite-includes */ ># 37 "/usr/obj/usr/src/tmp/usr/include/sys/time.h" 3 4 ># 38 "/usr/obj/usr/src/tmp/usr/include/sys/time.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/timespec.h> >#endif /* expanded by -frewrite-includes */ ># 38 "/usr/obj/usr/src/tmp/usr/include/sys/time.h" 3 4 ># 39 "/usr/obj/usr/src/tmp/usr/include/sys/time.h" 3 4 > >struct timezone { > int tz_minuteswest; /* minutes west of Greenwich */ > int tz_dsttime; /* type of dst correction */ >}; >#define DST_NONE 0 /* not on dst */ >#define DST_USA 1 /* USA style dst */ >#define DST_AUST 2 /* Australian style dst */ >#define DST_WET 3 /* Western European dst */ >#define DST_MET 4 /* Middle European dst */ >#define DST_EET 5 /* Eastern European dst */ >#define DST_CAN 6 /* Canada */ > >#if __BSD_VISIBLE >struct bintime { > time_t sec; > uint64_t frac; >}; > >static __inline void >bintime_addx(struct bintime *_bt, uint64_t _x) >{ > uint64_t _u; > > _u = _bt->frac; > _bt->frac += _x; > if (_u > _bt->frac) > _bt->sec++; >} > >static __inline void >bintime_add(struct bintime *_bt, const struct bintime *_bt2) >{ > uint64_t _u; > > _u = _bt->frac; > _bt->frac += _bt2->frac; > if (_u > _bt->frac) > _bt->sec++; > _bt->sec += _bt2->sec; >} > >static __inline void >bintime_sub(struct bintime *_bt, const struct bintime *_bt2) >{ > uint64_t _u; > > _u = _bt->frac; > _bt->frac -= _bt2->frac; > if (_u < _bt->frac) > _bt->sec--; > _bt->sec -= _bt2->sec; >} > >static __inline void >bintime_mul(struct bintime *_bt, u_int _x) >{ > uint64_t _p1, _p2; > > _p1 = (_bt->frac & 0xffffffffull) * _x; > _p2 = (_bt->frac >> 32) * _x + (_p1 >> 32); > _bt->sec *= _x; > _bt->sec += (_p2 >> 32); > _bt->frac = (_p2 << 32) | (_p1 & 0xffffffffull); >} > >static __inline void >bintime_shift(struct bintime *_bt, int _exp) >{ > > if (_exp > 0) { > _bt->sec <<= _exp; > _bt->sec |= _bt->frac >> (64 - _exp); > _bt->frac <<= _exp; > } else if (_exp < 0) { > _bt->frac >>= -_exp; > _bt->frac |= (uint64_t)_bt->sec << (64 + _exp); > _bt->sec >>= -_exp; > } >} > >#define bintime_clear(a) ((a)->sec = (a)->frac = 0) >#define bintime_isset(a) ((a)->sec || (a)->frac) >#define bintime_cmp(a, b, cmp) \ > (((a)->sec == (b)->sec) ? \ > ((a)->frac cmp (b)->frac) : \ > ((a)->sec cmp (b)->sec)) > >#define SBT_1S ((sbintime_t)1 << 32) >#define SBT_1M (SBT_1S * 60) >#define SBT_1MS (SBT_1S / 1000) >#define SBT_1US (SBT_1S / 1000000) >#define SBT_1NS (SBT_1S / 1000000000) >#define SBT_MAX 0x7fffffffffffffffLL > >static __inline int >sbintime_getsec(sbintime_t _sbt) >{ > > return (_sbt >> 32); >} > >static __inline sbintime_t >bttosbt(const struct bintime _bt) >{ > > return (((sbintime_t)_bt.sec << 32) + (_bt.frac >> 32)); >} > >static __inline struct bintime >sbttobt(sbintime_t _sbt) >{ > struct bintime _bt; > > _bt.sec = _sbt >> 32; > _bt.frac = _sbt << 32; > return (_bt); >} > >/*- > * Background information: > * > * When converting between timestamps on parallel timescales of differing > * resolutions it is historical and scientific practice to round down rather > * than doing 4/5 rounding. > * > * The date changes at midnight, not at noon. > * > * Even at 15:59:59.999999999 it's not four'o'clock. > * > * time_second ticks after N.999999999 not after N.4999999999 > */ > >static __inline void >bintime2timespec(const struct bintime *_bt, struct timespec *_ts) >{ > > _ts->tv_sec = _bt->sec; > _ts->tv_nsec = ((uint64_t)1000000000 * > (uint32_t)(_bt->frac >> 32)) >> 32; >} > >static __inline void >timespec2bintime(const struct timespec *_ts, struct bintime *_bt) >{ > > _bt->sec = _ts->tv_sec; > /* 18446744073 = int(2^64 / 1000000000) */ > _bt->frac = _ts->tv_nsec * (uint64_t)18446744073LL; >} > >static __inline void >bintime2timeval(const struct bintime *_bt, struct timeval *_tv) >{ > > _tv->tv_sec = _bt->sec; > _tv->tv_usec = ((uint64_t)1000000 * (uint32_t)(_bt->frac >> 32)) >> 32; >} > >static __inline void >timeval2bintime(const struct timeval *_tv, struct bintime *_bt) >{ > > _bt->sec = _tv->tv_sec; > /* 18446744073709 = int(2^64 / 1000000) */ > _bt->frac = _tv->tv_usec * (uint64_t)18446744073709LL; >} > >static __inline struct timespec >sbttots(sbintime_t _sbt) >{ > struct timespec _ts; > > _ts.tv_sec = _sbt >> 32; > _ts.tv_nsec = ((uint64_t)1000000000 * (uint32_t)_sbt) >> 32; > return (_ts); >} > >static __inline sbintime_t >tstosbt(struct timespec _ts) >{ > > return (((sbintime_t)_ts.tv_sec << 32) + > (_ts.tv_nsec * (((uint64_t)1 << 63) / 500000000) >> 32)); >} > >static __inline struct timeval >sbttotv(sbintime_t _sbt) >{ > struct timeval _tv; > > _tv.tv_sec = _sbt >> 32; > _tv.tv_usec = ((uint64_t)1000000 * (uint32_t)_sbt) >> 32; > return (_tv); >} > >static __inline sbintime_t >tvtosbt(struct timeval _tv) >{ > > return (((sbintime_t)_tv.tv_sec << 32) + > (_tv.tv_usec * (((uint64_t)1 << 63) / 500000) >> 32)); >} >#endif /* __BSD_VISIBLE */ ># 243 "/usr/obj/usr/src/tmp/usr/include/sys/time.h" 3 4 > >#ifdef _KERNEL > >/* Operations on timespecs */ >#define timespecclear(tvp) ((tvp)->tv_sec = (tvp)->tv_nsec = 0) >#define timespecisset(tvp) ((tvp)->tv_sec || (tvp)->tv_nsec) >#define timespeccmp(tvp, uvp, cmp) \ > (((tvp)->tv_sec == (uvp)->tv_sec) ? \ > ((tvp)->tv_nsec cmp (uvp)->tv_nsec) : \ > ((tvp)->tv_sec cmp (uvp)->tv_sec)) >#define timespecadd(vvp, uvp) \ > do { \ > (vvp)->tv_sec += (uvp)->tv_sec; \ > (vvp)->tv_nsec += (uvp)->tv_nsec; \ > if ((vvp)->tv_nsec >= 1000000000) { \ > (vvp)->tv_sec++; \ > (vvp)->tv_nsec -= 1000000000; \ > } \ > } while (0) >#define timespecsub(vvp, uvp) \ > do { \ > (vvp)->tv_sec -= (uvp)->tv_sec; \ > (vvp)->tv_nsec -= (uvp)->tv_nsec; \ > if ((vvp)->tv_nsec < 0) { \ > (vvp)->tv_sec--; \ > (vvp)->tv_nsec += 1000000000; \ > } \ > } while (0) > >/* Operations on timevals. */ > >#define timevalclear(tvp) ((tvp)->tv_sec = (tvp)->tv_usec = 0) >#define timevalisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) >#define timevalcmp(tvp, uvp, cmp) \ > (((tvp)->tv_sec == (uvp)->tv_sec) ? \ > ((tvp)->tv_usec cmp (uvp)->tv_usec) : \ > ((tvp)->tv_sec cmp (uvp)->tv_sec)) > >/* timevaladd and timevalsub are not inlined */ > >#endif /* _KERNEL */ ># 284 "/usr/obj/usr/src/tmp/usr/include/sys/time.h" 3 4 > >#ifndef _KERNEL /* NetBSD/OpenBSD compatible interfaces */ > >#define timerclear(tvp) ((tvp)->tv_sec = (tvp)->tv_usec = 0) >#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) >#define timercmp(tvp, uvp, cmp) \ > (((tvp)->tv_sec == (uvp)->tv_sec) ? \ > ((tvp)->tv_usec cmp (uvp)->tv_usec) : \ > ((tvp)->tv_sec cmp (uvp)->tv_sec)) >#define timeradd(tvp, uvp, vvp) \ > do { \ > (vvp)->tv_sec = (tvp)->tv_sec + (uvp)->tv_sec; \ > (vvp)->tv_usec = (tvp)->tv_usec + (uvp)->tv_usec; \ > if ((vvp)->tv_usec >= 1000000) { \ > (vvp)->tv_sec++; \ > (vvp)->tv_usec -= 1000000; \ > } \ > } while (0) >#define timersub(tvp, uvp, vvp) \ > do { \ > (vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec; \ > (vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec; \ > if ((vvp)->tv_usec < 0) { \ > (vvp)->tv_sec--; \ > (vvp)->tv_usec += 1000000; \ > } \ > } while (0) >#endif ># 312 "/usr/obj/usr/src/tmp/usr/include/sys/time.h" 3 4 > >/* > * Names of the interval timers, and structure > * defining a timer setting. > */ >#define ITIMER_REAL 0 >#define ITIMER_VIRTUAL 1 >#define ITIMER_PROF 2 > >struct itimerval { > struct timeval it_interval; /* timer interval */ > struct timeval it_value; /* current value */ >}; > >/* > * Getkerninfo clock information structure > */ >struct clockinfo { > int hz; /* clock frequency */ > int tick; /* micro-seconds per hz tick */ > int spare; > int stathz; /* statistics clock frequency */ > int profhz; /* profiling clock frequency */ >}; > >/* These macros are also in time.h. */ >#ifndef CLOCK_REALTIME >#define CLOCK_REALTIME 0 >#define CLOCK_VIRTUAL 1 >#define CLOCK_PROF 2 >#define CLOCK_MONOTONIC 4 >#define CLOCK_UPTIME 5 /* FreeBSD-specific. */ >#define CLOCK_UPTIME_PRECISE 7 /* FreeBSD-specific. */ >#define CLOCK_UPTIME_FAST 8 /* FreeBSD-specific. */ >#define CLOCK_REALTIME_PRECISE 9 /* FreeBSD-specific. */ >#define CLOCK_REALTIME_FAST 10 /* FreeBSD-specific. */ >#define CLOCK_MONOTONIC_PRECISE 11 /* FreeBSD-specific. */ >#define CLOCK_MONOTONIC_FAST 12 /* FreeBSD-specific. */ >#define CLOCK_SECOND 13 /* FreeBSD-specific. */ >#define CLOCK_THREAD_CPUTIME_ID 14 >#define CLOCK_PROCESS_CPUTIME_ID 15 >#endif ># 354 "/usr/obj/usr/src/tmp/usr/include/sys/time.h" 3 4 > >#ifndef TIMER_ABSTIME >#define TIMER_RELTIME 0x0 /* relative timer */ >#define TIMER_ABSTIME 0x1 /* absolute timer */ >#endif ># 359 "/usr/obj/usr/src/tmp/usr/include/sys/time.h" 3 4 > >#if __BSD_VISIBLE >#define CPUCLOCK_WHICH_PID 0 >#define CPUCLOCK_WHICH_TID 1 >#endif ># 364 "/usr/obj/usr/src/tmp/usr/include/sys/time.h" 3 4 > >#ifdef _KERNEL > >/* > * Kernel to clock driver interface. > */ >void inittodr(time_t base); >void resettodr(void); > >extern volatile time_t time_second; >extern volatile time_t time_uptime; >extern struct bintime tc_tick_bt; >extern sbintime_t tc_tick_sbt; >extern struct bintime tick_bt; >extern sbintime_t tick_sbt; >extern int tc_precexp; >extern int tc_timepercentage; >extern struct bintime bt_timethreshold; >extern struct bintime bt_tickthreshold; >extern sbintime_t sbt_timethreshold; >extern sbintime_t sbt_tickthreshold; > >/* > * Functions for looking at our clock: [get]{bin,nano,micro}[up]time() > * > * Functions without the "get" prefix returns the best timestamp > * we can produce in the given format. > * > * "bin" == struct bintime == seconds + 64 bit fraction of seconds. > * "nano" == struct timespec == seconds + nanoseconds. > * "micro" == struct timeval == seconds + microseconds. > * > * Functions containing "up" returns time relative to boot and > * should be used for calculating time intervals. > * > * Functions without "up" returns UTC time. > * > * Functions with the "get" prefix returns a less precise result > * much faster than the functions without "get" prefix and should > * be used where a precision of 1/hz seconds is acceptable or where > * performance is priority. (NB: "precision", _not_ "resolution" !) > */ > >void binuptime(struct bintime *bt); >void nanouptime(struct timespec *tsp); >void microuptime(struct timeval *tvp); > >static __inline sbintime_t >sbinuptime(void) >{ > struct bintime _bt; > > binuptime(&_bt); > return (bttosbt(_bt)); >} > >void bintime(struct bintime *bt); >void nanotime(struct timespec *tsp); >void microtime(struct timeval *tvp); > >void getbinuptime(struct bintime *bt); >void getnanouptime(struct timespec *tsp); >void getmicrouptime(struct timeval *tvp); > >static __inline sbintime_t >getsbinuptime(void) >{ > struct bintime _bt; > > getbinuptime(&_bt); > return (bttosbt(_bt)); >} > >void getbintime(struct bintime *bt); >void getnanotime(struct timespec *tsp); >void getmicrotime(struct timeval *tvp); > >void getboottime(struct timeval *boottime); >void getboottimebin(struct bintime *boottimebin); > >/* Other functions */ >int itimerdecr(struct itimerval *itp, int usec); >int itimerfix(struct timeval *tv); >int ppsratecheck(struct timeval *, int *, int); >int ratecheck(struct timeval *, const struct timeval *); >void timevaladd(struct timeval *t1, const struct timeval *t2); >void timevalsub(struct timeval *t1, const struct timeval *t2); >int tvtohz(struct timeval *tv); > >#define TC_DEFAULTPERC 5 > >#define BT2FREQ(bt) \ > (((uint64_t)0x8000000000000000 + ((bt)->frac >> 2)) / \ > ((bt)->frac >> 1)) > >#define SBT2FREQ(sbt) ((SBT_1S + ((sbt) >> 1)) / (sbt)) > >#define FREQ2BT(freq, bt) \ >{ \ > (bt)->sec = 0; \ > (bt)->frac = ((uint64_t)0x8000000000000000 / (freq)) << 1; \ >} > >#define TIMESEL(sbt, sbt2) \ > (((sbt2) >= sbt_timethreshold) ? \ > ((*(sbt) = getsbinuptime()), 1) : ((*(sbt) = sbinuptime()), 0)) > >#else /* !_KERNEL */ ># 472 "/usr/obj/usr/src/tmp/usr/include/sys/time.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <time.h> >#endif /* expanded by -frewrite-includes */ ># 472 "/usr/obj/usr/src/tmp/usr/include/sys/time.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/time.h" 1 3 4 >/* > * Copyright (c) 1989, 1993 > * The Regents of the University of California. All rights reserved. > * (c) UNIX System Laboratories, Inc. > * All or some portions of this file are derived from material licensed > * to the University of California by American Telephone and Telegraph > * Co. or Unix System Laboratories, Inc. and are reproduced herein with > * the permission of UNIX System Laboratories, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)time.h 8.3 (Berkeley) 1/21/94 > */ > >/* > * $FreeBSD: stable/11/include/time.h 306905 2016-10-09 12:34:56Z kib $ > */ > >#ifndef _TIME_H_ >#define _TIME_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 44 "/usr/obj/usr/src/tmp/usr/include/time.h" 3 4 ># 45 "/usr/obj/usr/src/tmp/usr/include/time.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_null.h> >#endif /* expanded by -frewrite-includes */ ># 45 "/usr/obj/usr/src/tmp/usr/include/time.h" 3 4 ># 46 "/usr/obj/usr/src/tmp/usr/include/time.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 46 "/usr/obj/usr/src/tmp/usr/include/time.h" 3 4 ># 47 "/usr/obj/usr/src/tmp/usr/include/time.h" 3 4 > >#if __POSIX_VISIBLE > 0 && __POSIX_VISIBLE < 200112 || __BSD_VISIBLE >/* > * Frequency of the clock ticks reported by times(). Deprecated - use > * sysconf(_SC_CLK_TCK) instead. (Removed in 1003.1-2001.) > */ >#define CLK_TCK 128 >#endif ># 55 "/usr/obj/usr/src/tmp/usr/include/time.h" 3 4 > >/* Frequency of the clock ticks reported by clock(). */ >#define CLOCKS_PER_SEC 128 > >#ifndef _CLOCK_T_DECLARED >typedef __clock_t clock_t; >#define _CLOCK_T_DECLARED >#endif ># 63 "/usr/obj/usr/src/tmp/usr/include/time.h" 3 4 > >#ifndef _TIME_T_DECLARED >typedef __time_t time_t; >#define _TIME_T_DECLARED >#endif ># 68 "/usr/obj/usr/src/tmp/usr/include/time.h" 3 4 > >#ifndef _SIZE_T_DECLARED >typedef __size_t size_t; >#define _SIZE_T_DECLARED >#endif ># 73 "/usr/obj/usr/src/tmp/usr/include/time.h" 3 4 > >#if __POSIX_VISIBLE >= 199309 >/* > * New in POSIX 1003.1b-1993. > */ >#ifndef _CLOCKID_T_DECLARED >typedef __clockid_t clockid_t; >#define _CLOCKID_T_DECLARED >#endif ># 82 "/usr/obj/usr/src/tmp/usr/include/time.h" 3 4 > >#ifndef _TIMER_T_DECLARED >typedef __timer_t timer_t; >#define _TIMER_T_DECLARED >#endif ># 87 "/usr/obj/usr/src/tmp/usr/include/time.h" 3 4 > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/timespec.h> >#endif /* expanded by -frewrite-includes */ ># 88 "/usr/obj/usr/src/tmp/usr/include/time.h" 3 4 ># 89 "/usr/obj/usr/src/tmp/usr/include/time.h" 3 4 >#endif /* __POSIX_VISIBLE >= 199309 */ ># 90 "/usr/obj/usr/src/tmp/usr/include/time.h" 3 4 > >#if __POSIX_VISIBLE >= 200112 >#ifndef _PID_T_DECLARED >typedef __pid_t pid_t; >#define _PID_T_DECLARED >#endif ># 96 "/usr/obj/usr/src/tmp/usr/include/time.h" 3 4 >#endif ># 97 "/usr/obj/usr/src/tmp/usr/include/time.h" 3 4 > >/* These macros are also in sys/time.h. */ >#if !defined(CLOCK_REALTIME) && __POSIX_VISIBLE >= 200112 >#define CLOCK_REALTIME 0 >#ifdef __BSD_VISIBLE >#define CLOCK_VIRTUAL 1 >#define CLOCK_PROF 2 >#endif ># 105 "/usr/obj/usr/src/tmp/usr/include/time.h" 3 4 >#define CLOCK_MONOTONIC 4 >#define CLOCK_UPTIME 5 /* FreeBSD-specific. */ >#define CLOCK_UPTIME_PRECISE 7 /* FreeBSD-specific. */ >#define CLOCK_UPTIME_FAST 8 /* FreeBSD-specific. */ >#define CLOCK_REALTIME_PRECISE 9 /* FreeBSD-specific. */ >#define CLOCK_REALTIME_FAST 10 /* FreeBSD-specific. */ >#define CLOCK_MONOTONIC_PRECISE 11 /* FreeBSD-specific. */ >#define CLOCK_MONOTONIC_FAST 12 /* FreeBSD-specific. */ >#define CLOCK_SECOND 13 /* FreeBSD-specific. */ >#define CLOCK_THREAD_CPUTIME_ID 14 >#define CLOCK_PROCESS_CPUTIME_ID 15 >#endif /* !defined(CLOCK_REALTIME) && __POSIX_VISIBLE >= 200112 */ ># 117 "/usr/obj/usr/src/tmp/usr/include/time.h" 3 4 > >#if !defined(TIMER_ABSTIME) && __POSIX_VISIBLE >= 200112 >#if __BSD_VISIBLE >#define TIMER_RELTIME 0x0 /* relative timer */ >#endif ># 122 "/usr/obj/usr/src/tmp/usr/include/time.h" 3 4 >#define TIMER_ABSTIME 0x1 /* absolute timer */ >#endif /* !defined(TIMER_ABSTIME) && __POSIX_VISIBLE >= 200112 */ ># 124 "/usr/obj/usr/src/tmp/usr/include/time.h" 3 4 > >struct tm { > int tm_sec; /* seconds after the minute [0-60] */ > int tm_min; /* minutes after the hour [0-59] */ > int tm_hour; /* hours since midnight [0-23] */ > int tm_mday; /* day of the month [1-31] */ > int tm_mon; /* months since January [0-11] */ > int tm_year; /* years since 1900 */ > int tm_wday; /* days since Sunday [0-6] */ > int tm_yday; /* days since January 1 [0-365] */ > int tm_isdst; /* Daylight Savings Time flag */ > long tm_gmtoff; /* offset from UTC in seconds */ > char *tm_zone; /* timezone abbreviation */ >}; > >#if __POSIX_VISIBLE >extern char *tzname[]; >#endif ># 142 "/usr/obj/usr/src/tmp/usr/include/time.h" 3 4 > >__BEGIN_DECLS >char *asctime(const struct tm *); >clock_t clock(void); >char *ctime(const time_t *); >double difftime(time_t, time_t); >/* XXX missing: getdate() */ >struct tm *gmtime(const time_t *); >struct tm *localtime(const time_t *); >time_t mktime(struct tm *); >size_t strftime(char * __restrict, size_t, const char * __restrict, > const struct tm * __restrict); >time_t time(time_t *); >#if __POSIX_VISIBLE >= 200112 >struct sigevent; >int timer_create(clockid_t, struct sigevent *__restrict, timer_t *__restrict); >int timer_delete(timer_t); >int timer_gettime(timer_t, struct itimerspec *); >int timer_getoverrun(timer_t); >int timer_settime(timer_t, int, const struct itimerspec *__restrict, > struct itimerspec *__restrict); >#endif ># 164 "/usr/obj/usr/src/tmp/usr/include/time.h" 3 4 >#if __POSIX_VISIBLE >void tzset(void); >#endif ># 167 "/usr/obj/usr/src/tmp/usr/include/time.h" 3 4 > >#if __POSIX_VISIBLE >= 199309 >int clock_getres(clockid_t, struct timespec *); >int clock_gettime(clockid_t, struct timespec *); >int clock_settime(clockid_t, const struct timespec *); >/* XXX missing: clock_nanosleep() */ >int nanosleep(const struct timespec *, struct timespec *); >#endif /* __POSIX_VISIBLE >= 199309 */ ># 175 "/usr/obj/usr/src/tmp/usr/include/time.h" 3 4 > >#if __POSIX_VISIBLE >= 200112 >int clock_getcpuclockid(pid_t, clockid_t *); >#endif ># 179 "/usr/obj/usr/src/tmp/usr/include/time.h" 3 4 > >#if __POSIX_VISIBLE >= 199506 >char *asctime_r(const struct tm *, char *); >char *ctime_r(const time_t *, char *); >struct tm *gmtime_r(const time_t *, struct tm *); >struct tm *localtime_r(const time_t *, struct tm *); >#endif ># 186 "/usr/obj/usr/src/tmp/usr/include/time.h" 3 4 > >#if __XSI_VISIBLE >char *strptime(const char * __restrict, const char * __restrict, > struct tm * __restrict); >#endif ># 191 "/usr/obj/usr/src/tmp/usr/include/time.h" 3 4 > >#if __BSD_VISIBLE >char *timezone(int, int); /* XXX XSI conflict */ >void tzsetwall(void); >time_t timelocal(struct tm * const); >time_t timegm(struct tm * const); >int timer_oshandle_np(timer_t timerid); >#endif /* __BSD_VISIBLE */ ># 199 "/usr/obj/usr/src/tmp/usr/include/time.h" 3 4 > >#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_) >#if 0 /* expanded by -frewrite-includes */ >#include <xlocale/_time.h> >#endif /* expanded by -frewrite-includes */ ># 201 "/usr/obj/usr/src/tmp/usr/include/time.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/xlocale/_time.h" 1 3 4 >/*- > * Copyright (c) 2011, 2012 The FreeBSD Foundation > * All rights reserved. > * > * This software was developed by David Chisnall under sponsorship from > * the FreeBSD Foundation. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: stable/11/include/xlocale/_time.h 231673 2012-02-14 12:03:23Z theraven $ > */ > >#ifndef _LOCALE_T_DEFINED >#define _LOCALE_T_DEFINED >typedef struct _xlocale *locale_t; >#endif ># 36 "/usr/obj/usr/src/tmp/usr/include/xlocale/_time.h" 3 4 > >/* > * This file is included from both locale.h and xlocale.h. We need to expose > * the declarations unconditionally if we are included from xlocale.h, but only > * if we are in POSIX2008 mode if included from locale.h. > */ >#ifndef _XLOCALE_LOCALE1_H >#define _XLOCALE_LOCALE1_H > >size_t strftime_l(char * __restrict, size_t, const char * __restrict, > const struct tm * __restrict, locale_t) __strftimelike(3, 0); > >#endif /* _XLOCALE_LOCALE1_H */ ># 49 "/usr/obj/usr/src/tmp/usr/include/xlocale/_time.h" 3 4 > >#ifdef _XLOCALE_H_ >#ifndef _XLOCALE_LOCALE2_H >#define _XLOCALE_LOCALE2_H > >char *strptime_l(const char * __restrict, const char * __restrict, > struct tm * __restrict, locale_t); > >#endif /* _XLOCALE_LOCALE2_H */ ># 58 "/usr/obj/usr/src/tmp/usr/include/xlocale/_time.h" 3 4 >#endif /* _XLOCALE_H_ */ ># 59 "/usr/obj/usr/src/tmp/usr/include/xlocale/_time.h" 3 4 ># 202 "/usr/obj/usr/src/tmp/usr/include/time.h" 2 3 4 >#endif ># 203 "/usr/obj/usr/src/tmp/usr/include/time.h" 3 4 >__END_DECLS > >#endif /* !_TIME_H_ */ ># 206 "/usr/obj/usr/src/tmp/usr/include/time.h" 3 4 ># 473 "/usr/obj/usr/src/tmp/usr/include/sys/time.h" 2 3 4 > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 474 "/usr/obj/usr/src/tmp/usr/include/sys/time.h" 3 4 ># 475 "/usr/obj/usr/src/tmp/usr/include/sys/time.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/select.h> >#endif /* expanded by -frewrite-includes */ ># 475 "/usr/obj/usr/src/tmp/usr/include/sys/time.h" 3 4 ># 476 "/usr/obj/usr/src/tmp/usr/include/sys/time.h" 3 4 > >__BEGIN_DECLS >int setitimer(int, const struct itimerval *, struct itimerval *); >int utimes(const char *, const struct timeval *); > >#if __BSD_VISIBLE >int adjtime(const struct timeval *, struct timeval *); >int clock_getcpuclockid2(id_t, int, clockid_t *); >int futimes(int, const struct timeval *); >int futimesat(int, const char *, const struct timeval [2]); >int lutimes(const char *, const struct timeval *); >int settimeofday(const struct timeval *, const struct timezone *); >#endif ># 489 "/usr/obj/usr/src/tmp/usr/include/sys/time.h" 3 4 > >#if __XSI_VISIBLE >int getitimer(int, struct itimerval *); >int gettimeofday(struct timeval *, struct timezone *); >#endif ># 494 "/usr/obj/usr/src/tmp/usr/include/sys/time.h" 3 4 > >__END_DECLS > >#endif /* !_KERNEL */ ># 498 "/usr/obj/usr/src/tmp/usr/include/sys/time.h" 3 4 > >#endif /* !_SYS_TIME_H_ */ ># 500 "/usr/obj/usr/src/tmp/usr/include/sys/time.h" 3 4 ># 100 "/usr/obj/usr/src/tmp/usr/include/sys/stat.h" 2 3 4 >#endif ># 101 "/usr/obj/usr/src/tmp/usr/include/sys/stat.h" 3 4 > >#ifdef _KERNEL >struct ostat { > __uint16_t st_dev; /* inode's device */ > ino_t st_ino; /* inode's number */ > mode_t st_mode; /* inode protection mode */ > nlink_t st_nlink; /* number of hard links */ > __uint16_t st_uid; /* user ID of the file's owner */ > __uint16_t st_gid; /* group ID of the file's group */ > __uint16_t st_rdev; /* device type */ > __int32_t st_size; /* file size, in bytes */ > struct timespec st_atim; /* time of last access */ > struct timespec st_mtim; /* time of last data modification */ > struct timespec st_ctim; /* time of last file status change */ > __int32_t st_blksize; /* optimal blocksize for I/O */ > __int32_t st_blocks; /* blocks allocated for file */ > fflags_t st_flags; /* user defined flags for file */ > __uint32_t st_gen; /* file generation number */ >}; >#endif ># 121 "/usr/obj/usr/src/tmp/usr/include/sys/stat.h" 3 4 > >struct stat { > __dev_t st_dev; /* inode's device */ > ino_t st_ino; /* inode's number */ > mode_t st_mode; /* inode protection mode */ > nlink_t st_nlink; /* number of hard links */ > uid_t st_uid; /* user ID of the file's owner */ > gid_t st_gid; /* group ID of the file's group */ > __dev_t st_rdev; /* device type */ > struct timespec st_atim; /* time of last access */ > struct timespec st_mtim; /* time of last data modification */ > struct timespec st_ctim; /* time of last file status change */ > off_t st_size; /* file size, in bytes */ > blkcnt_t st_blocks; /* blocks allocated for file */ > blksize_t st_blksize; /* optimal blocksize for I/O */ > fflags_t st_flags; /* user defined flags for file */ > __uint32_t st_gen; /* file generation number */ > __int32_t st_lspare; > struct timespec st_birthtim; /* time of file creation */ > /* > * Explicitly pad st_birthtim to 16 bytes so that the size of > * struct stat is backwards compatible. We use bitfields instead > * of an array of chars so that this doesn't require a C99 compiler > * to compile if the size of the padding is 0. We use 2 bitfields > * to cover up to 64 bits on 32-bit machines. We assume that > * CHAR_BIT is 8... > */ > unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec)); > unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec)); >}; > >#ifdef _KERNEL >struct nstat { > __dev_t st_dev; /* inode's device */ > ino_t st_ino; /* inode's number */ > __uint32_t st_mode; /* inode protection mode */ > __uint32_t st_nlink; /* number of hard links */ > uid_t st_uid; /* user ID of the file's owner */ > gid_t st_gid; /* group ID of the file's group */ > __dev_t st_rdev; /* device type */ > struct timespec st_atim; /* time of last access */ > struct timespec st_mtim; /* time of last data modification */ > struct timespec st_ctim; /* time of last file status change */ > off_t st_size; /* file size, in bytes */ > blkcnt_t st_blocks; /* blocks allocated for file */ > blksize_t st_blksize; /* optimal blocksize for I/O */ > fflags_t st_flags; /* user defined flags for file */ > __uint32_t st_gen; /* file generation number */ > struct timespec st_birthtim; /* time of file creation */ > /* > * See above about the following padding. > */ > unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec)); > unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec)); >}; >#endif ># 177 "/usr/obj/usr/src/tmp/usr/include/sys/stat.h" 3 4 > >#ifndef _KERNEL >#define st_atime st_atim.tv_sec >#define st_mtime st_mtim.tv_sec >#define st_ctime st_ctim.tv_sec >#if __BSD_VISIBLE >#define st_birthtime st_birthtim.tv_sec >#endif ># 185 "/usr/obj/usr/src/tmp/usr/include/sys/stat.h" 3 4 > >/* For compatibility. */ >#if __BSD_VISIBLE >#define st_atimespec st_atim >#define st_mtimespec st_mtim >#define st_ctimespec st_ctim >#define st_birthtimespec st_birthtim >#endif ># 193 "/usr/obj/usr/src/tmp/usr/include/sys/stat.h" 3 4 >#endif /* !_KERNEL */ ># 194 "/usr/obj/usr/src/tmp/usr/include/sys/stat.h" 3 4 > >#define S_ISUID 0004000 /* set user id on execution */ >#define S_ISGID 0002000 /* set group id on execution */ >#if __BSD_VISIBLE >#define S_ISTXT 0001000 /* sticky bit */ >#endif ># 200 "/usr/obj/usr/src/tmp/usr/include/sys/stat.h" 3 4 > >#define S_IRWXU 0000700 /* RWX mask for owner */ >#define S_IRUSR 0000400 /* R for owner */ >#define S_IWUSR 0000200 /* W for owner */ >#define S_IXUSR 0000100 /* X for owner */ > >#if __BSD_VISIBLE >#define S_IREAD S_IRUSR >#define S_IWRITE S_IWUSR >#define S_IEXEC S_IXUSR >#endif ># 211 "/usr/obj/usr/src/tmp/usr/include/sys/stat.h" 3 4 > >#define S_IRWXG 0000070 /* RWX mask for group */ >#define S_IRGRP 0000040 /* R for group */ >#define S_IWGRP 0000020 /* W for group */ >#define S_IXGRP 0000010 /* X for group */ > >#define S_IRWXO 0000007 /* RWX mask for other */ >#define S_IROTH 0000004 /* R for other */ >#define S_IWOTH 0000002 /* W for other */ >#define S_IXOTH 0000001 /* X for other */ > >#if __XSI_VISIBLE >#define S_IFMT 0170000 /* type of file mask */ >#define S_IFIFO 0010000 /* named pipe (fifo) */ >#define S_IFCHR 0020000 /* character special */ >#define S_IFDIR 0040000 /* directory */ >#define S_IFBLK 0060000 /* block special */ >#define S_IFREG 0100000 /* regular */ >#define S_IFLNK 0120000 /* symbolic link */ >#define S_IFSOCK 0140000 /* socket */ >#define S_ISVTX 0001000 /* save swapped text even after use */ >#endif ># 233 "/usr/obj/usr/src/tmp/usr/include/sys/stat.h" 3 4 >#if __BSD_VISIBLE >#define S_IFWHT 0160000 /* whiteout */ >#endif ># 236 "/usr/obj/usr/src/tmp/usr/include/sys/stat.h" 3 4 > >#define S_ISDIR(m) (((m) & 0170000) == 0040000) /* directory */ >#define S_ISCHR(m) (((m) & 0170000) == 0020000) /* char special */ >#define S_ISBLK(m) (((m) & 0170000) == 0060000) /* block special */ >#define S_ISREG(m) (((m) & 0170000) == 0100000) /* regular file */ >#define S_ISFIFO(m) (((m) & 0170000) == 0010000) /* fifo or socket */ >#if __POSIX_VISIBLE >= 200112 >#define S_ISLNK(m) (((m) & 0170000) == 0120000) /* symbolic link */ >#define S_ISSOCK(m) (((m) & 0170000) == 0140000) /* socket */ >#endif ># 246 "/usr/obj/usr/src/tmp/usr/include/sys/stat.h" 3 4 >#if __BSD_VISIBLE >#define S_ISWHT(m) (((m) & 0170000) == 0160000) /* whiteout */ >#endif ># 249 "/usr/obj/usr/src/tmp/usr/include/sys/stat.h" 3 4 > >#if __BSD_VISIBLE >#define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO) /* 0777 */ > /* 7777 */ >#define ALLPERMS (S_ISUID|S_ISGID|S_ISTXT|S_IRWXU|S_IRWXG|S_IRWXO) > /* 0666 */ >#define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH) > >#define S_BLKSIZE 512 /* block size used in the stat struct */ > >/* > * Definitions of flags stored in file flags word. > * > * Super-user and owner changeable flags. > */ >#define UF_SETTABLE 0x0000ffff /* mask of owner changeable flags */ >#define UF_NODUMP 0x00000001 /* do not dump file */ >#define UF_IMMUTABLE 0x00000002 /* file may not be changed */ >#define UF_APPEND 0x00000004 /* writes to file may only append */ >#define UF_OPAQUE 0x00000008 /* directory is opaque wrt. union */ >#define UF_NOUNLINK 0x00000010 /* file may not be removed or renamed */ >/* > * These two bits are defined in MacOS X. They are not currently used in > * FreeBSD. > */ >#if 0 >#define UF_COMPRESSED 0x00000020 /* file is compressed */ >#define UF_TRACKED 0x00000040 /* renames and deletes are tracked */ >#endif ># 278 "/usr/obj/usr/src/tmp/usr/include/sys/stat.h" 3 4 > >#define UF_SYSTEM 0x00000080 /* Windows system file bit */ >#define UF_SPARSE 0x00000100 /* sparse file */ >#define UF_OFFLINE 0x00000200 /* file is offline */ >#define UF_REPARSE 0x00000400 /* Windows reparse point file bit */ >#define UF_ARCHIVE 0x00000800 /* file needs to be archived */ >#define UF_READONLY 0x00001000 /* Windows readonly file bit */ >/* This is the same as the MacOS X definition of UF_HIDDEN. */ >#define UF_HIDDEN 0x00008000 /* file is hidden */ > >/* > * Super-user changeable flags. > */ >#define SF_SETTABLE 0xffff0000 /* mask of superuser changeable flags */ >#define SF_ARCHIVED 0x00010000 /* file is archived */ >#define SF_IMMUTABLE 0x00020000 /* file may not be changed */ >#define SF_APPEND 0x00040000 /* writes to file may only append */ >#define SF_NOUNLINK 0x00100000 /* file may not be removed or renamed */ >#define SF_SNAPSHOT 0x00200000 /* snapshot inode */ > >#ifdef _KERNEL >/* > * Shorthand abbreviations of above. > */ >#define OPAQUE (UF_OPAQUE) >#define APPEND (UF_APPEND | SF_APPEND) >#define IMMUTABLE (UF_IMMUTABLE | SF_IMMUTABLE) >#define NOUNLINK (UF_NOUNLINK | SF_NOUNLINK) >#endif ># 307 "/usr/obj/usr/src/tmp/usr/include/sys/stat.h" 3 4 > >#endif /* __BSD_VISIBLE */ ># 309 "/usr/obj/usr/src/tmp/usr/include/sys/stat.h" 3 4 > >#if __POSIX_VISIBLE >= 200809 >#define UTIME_NOW -1 >#define UTIME_OMIT -2 >#endif ># 314 "/usr/obj/usr/src/tmp/usr/include/sys/stat.h" 3 4 > >#ifndef _KERNEL >__BEGIN_DECLS >#if __BSD_VISIBLE >int chflags(const char *, unsigned long); >int chflagsat(int, const char *, unsigned long, int); >#endif ># 321 "/usr/obj/usr/src/tmp/usr/include/sys/stat.h" 3 4 >int chmod(const char *, mode_t); >#if __BSD_VISIBLE >int fchflags(int, unsigned long); >#endif ># 325 "/usr/obj/usr/src/tmp/usr/include/sys/stat.h" 3 4 >#if __POSIX_VISIBLE >= 200112 >int fchmod(int, mode_t); >#endif ># 328 "/usr/obj/usr/src/tmp/usr/include/sys/stat.h" 3 4 >#if __POSIX_VISIBLE >= 200809 >int fchmodat(int, const char *, mode_t, int); >int futimens(int fd, const struct timespec times[2]); >int utimensat(int fd, const char *path, const struct timespec times[2], > int flag); >#endif ># 334 "/usr/obj/usr/src/tmp/usr/include/sys/stat.h" 3 4 >int fstat(int, struct stat *); >#if __BSD_VISIBLE >int lchflags(const char *, unsigned long); >int lchmod(const char *, mode_t); >#endif ># 339 "/usr/obj/usr/src/tmp/usr/include/sys/stat.h" 3 4 >#if __POSIX_VISIBLE >= 200112 >int lstat(const char * __restrict, struct stat * __restrict); >#endif ># 342 "/usr/obj/usr/src/tmp/usr/include/sys/stat.h" 3 4 >int mkdir(const char *, mode_t); >int mkfifo(const char *, mode_t); >#if !defined(_MKNOD_DECLARED) && __XSI_VISIBLE >int mknod(const char *, mode_t, dev_t); >#define _MKNOD_DECLARED >#endif ># 348 "/usr/obj/usr/src/tmp/usr/include/sys/stat.h" 3 4 >int stat(const char * __restrict, struct stat * __restrict); >mode_t umask(mode_t); >#if __POSIX_VISIBLE >= 200809 >int fstatat(int, const char *, struct stat *, int); >int mkdirat(int, const char *, mode_t); >int mkfifoat(int, const char *, mode_t); >#endif ># 355 "/usr/obj/usr/src/tmp/usr/include/sys/stat.h" 3 4 >#if __XSI_VISIBLE >= 700 >int mknodat(int, const char *, mode_t, dev_t); >#endif ># 358 "/usr/obj/usr/src/tmp/usr/include/sys/stat.h" 3 4 >__END_DECLS >#endif /* !_KERNEL */ ># 360 "/usr/obj/usr/src/tmp/usr/include/sys/stat.h" 3 4 > >#endif /* !_SYS_STAT_H_ */ ># 362 "/usr/obj/usr/src/tmp/usr/include/sys/stat.h" 3 4 ># 69 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" 2 > >#if HAVE_UNISTD_H >#if 0 /* expanded by -frewrite-includes */ >#include <unistd.h> >#endif /* expanded by -frewrite-includes */ ># 71 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" ># 1 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 1 3 4 >/*- > * Copyright (c) 1991, 1993, 1994 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)unistd.h 8.12 (Berkeley) 4/27/95 > * $FreeBSD: stable/11/include/unistd.h 304977 2016-08-29 05:15:43Z kib $ > */ > >#ifndef _UNISTD_H_ >#define _UNISTD_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 36 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 3 4 ># 37 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/types.h> /* XXX adds too much pollution. */ >#endif /* expanded by -frewrite-includes */ ># 37 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 3 4 ># 38 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/unistd.h> >#endif /* expanded by -frewrite-includes */ ># 38 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/sys/unistd.h" 1 3 4 >/*- > * Copyright (c) 1989, 1993 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 4. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)unistd.h 8.2 (Berkeley) 1/7/94 > * $FreeBSD: stable/11/sys/sys/unistd.h 312170 2017-01-14 11:16:10Z kib $ > */ > >#ifndef _SYS_UNISTD_H_ >#define _SYS_UNISTD_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 36 "/usr/obj/usr/src/tmp/usr/include/sys/unistd.h" 3 4 ># 37 "/usr/obj/usr/src/tmp/usr/include/sys/unistd.h" 3 4 > >/* > * POSIX options and option groups we unconditionally do or don't > * implement. Those options which are implemented (or not) entirely > * in user mode are defined in <unistd.h>. Please keep this list in > * alphabetical order. > * > * Anything which is defined as zero below **must** have an > * implementation for the corresponding sysconf() which is able to > * determine conclusively whether or not the feature is supported. > * Anything which is defined as other than -1 below **must** have > * complete headers, types, and function declarations as specified by > * the POSIX standard; however, if the relevant sysconf() function > * returns -1, the functions may be stubbed out. > */ >#define _POSIX_ADVISORY_INFO 200112L >#define _POSIX_ASYNCHRONOUS_IO 200112L >#define _POSIX_CHOWN_RESTRICTED 1 >#define _POSIX_CLOCK_SELECTION (-1) >#define _POSIX_CPUTIME 200112L >#define _POSIX_FSYNC 200112L >#define _POSIX_IPV6 0 >#define _POSIX_JOB_CONTROL 1 >#define _POSIX_MAPPED_FILES 200112L >#define _POSIX_MEMLOCK (-1) >#define _POSIX_MEMLOCK_RANGE 200112L >#define _POSIX_MEMORY_PROTECTION 200112L >#define _POSIX_MESSAGE_PASSING 200112L >#define _POSIX_MONOTONIC_CLOCK 200112L >#define _POSIX_NO_TRUNC 1 >#define _POSIX_PRIORITIZED_IO (-1) >#define _POSIX_PRIORITY_SCHEDULING 0 >#define _POSIX_RAW_SOCKETS 200112L >#define _POSIX_REALTIME_SIGNALS 200112L >#define _POSIX_SEMAPHORES 200112L >#define _POSIX_SHARED_MEMORY_OBJECTS 200112L >#define _POSIX_SPORADIC_SERVER (-1) >#define _POSIX_SYNCHRONIZED_IO (-1) >#define _POSIX_TIMEOUTS 200112L >#define _POSIX_TIMERS 200112L >#define _POSIX_TYPED_MEMORY_OBJECTS (-1) >#define _POSIX_VDISABLE 0xff > >#if __XSI_VISIBLE >#define _XOPEN_SHM 1 >#define _XOPEN_STREAMS (-1) >#endif ># 84 "/usr/obj/usr/src/tmp/usr/include/sys/unistd.h" 3 4 > >/* > * Although we have saved user/group IDs, we do not use them in setuid > * as described in POSIX 1003.1, because the feature does not work for > * root. We use the saved IDs in seteuid/setegid, which are not currently > * part of the POSIX 1003.1 specification. XXX revisit for 1003.1-2001 > * as this is now mandatory. > */ >#ifdef _NOT_AVAILABLE >#define _POSIX_SAVED_IDS 1 /* saved set-user-ID and set-group-ID */ >#endif ># 95 "/usr/obj/usr/src/tmp/usr/include/sys/unistd.h" 3 4 > >/* Define the POSIX.1 version we target for compliance. */ >#define _POSIX_VERSION 200112L > >/* access function */ >#define F_OK 0 /* test for existence of file */ >#define X_OK 0x01 /* test for execute or search permission */ >#define W_OK 0x02 /* test for write permission */ >#define R_OK 0x04 /* test for read permission */ > >/* whence values for lseek(2) */ >#ifndef SEEK_SET >#define SEEK_SET 0 /* set file offset to offset */ >#define SEEK_CUR 1 /* set file offset to current plus offset */ >#define SEEK_END 2 /* set file offset to EOF plus offset */ >#endif ># 111 "/usr/obj/usr/src/tmp/usr/include/sys/unistd.h" 3 4 >#if __BSD_VISIBLE >#define SEEK_DATA 3 /* set file offset to next data past offset */ >#define SEEK_HOLE 4 /* set file offset to next hole past offset */ >#endif ># 115 "/usr/obj/usr/src/tmp/usr/include/sys/unistd.h" 3 4 > >#ifndef _POSIX_SOURCE >/* whence values for lseek(2); renamed by POSIX 1003.1 */ >#define L_SET SEEK_SET >#define L_INCR SEEK_CUR >#define L_XTND SEEK_END >#endif ># 122 "/usr/obj/usr/src/tmp/usr/include/sys/unistd.h" 3 4 > >/* configurable pathname variables */ >#define _PC_LINK_MAX 1 >#define _PC_MAX_CANON 2 >#define _PC_MAX_INPUT 3 >#define _PC_NAME_MAX 4 >#define _PC_PATH_MAX 5 >#define _PC_PIPE_BUF 6 >#define _PC_CHOWN_RESTRICTED 7 >#define _PC_NO_TRUNC 8 >#define _PC_VDISABLE 9 > >#if __POSIX_VISIBLE >= 199309 >#define _PC_ASYNC_IO 53 >#define _PC_PRIO_IO 54 >#define _PC_SYNC_IO 55 >#endif ># 139 "/usr/obj/usr/src/tmp/usr/include/sys/unistd.h" 3 4 > >#if __POSIX_VISIBLE >= 200112 >#define _PC_ALLOC_SIZE_MIN 10 >#define _PC_FILESIZEBITS 12 >#define _PC_REC_INCR_XFER_SIZE 14 >#define _PC_REC_MAX_XFER_SIZE 15 >#define _PC_REC_MIN_XFER_SIZE 16 >#define _PC_REC_XFER_ALIGN 17 >#define _PC_SYMLINK_MAX 18 >#endif ># 149 "/usr/obj/usr/src/tmp/usr/include/sys/unistd.h" 3 4 > >#if __BSD_VISIBLE >#define _PC_ACL_EXTENDED 59 >#define _PC_ACL_PATH_MAX 60 >#define _PC_CAP_PRESENT 61 >#define _PC_INF_PRESENT 62 >#define _PC_MAC_PRESENT 63 >#define _PC_ACL_NFS4 64 >#endif ># 158 "/usr/obj/usr/src/tmp/usr/include/sys/unistd.h" 3 4 > >/* From OpenSolaris, used by SEEK_DATA/SEEK_HOLE. */ >#define _PC_MIN_HOLE_SIZE 21 > >#if __BSD_VISIBLE >/* > * rfork() options. > * > * XXX currently, some operations without RFPROC set are not supported. > */ >#define RFNAMEG (1<<0) /* UNIMPL new plan9 `name space' */ >#define RFENVG (1<<1) /* UNIMPL copy plan9 `env space' */ >#define RFFDG (1<<2) /* copy fd table */ >#define RFNOTEG (1<<3) /* UNIMPL create new plan9 `note group' */ >#define RFPROC (1<<4) /* change child (else changes curproc) */ >#define RFMEM (1<<5) /* share `address space' */ >#define RFNOWAIT (1<<6) /* give child to init */ >#define RFCNAMEG (1<<10) /* UNIMPL zero plan9 `name space' */ >#define RFCENVG (1<<11) /* UNIMPL zero plan9 `env space' */ >#define RFCFDG (1<<12) /* close all fds, zero fd table */ >#define RFTHREAD (1<<13) /* enable kernel thread support */ >#define RFSIGSHARE (1<<14) /* share signal handlers */ >#define RFLINUXTHPN (1<<16) /* do linux clone exit parent notification */ >#define RFSTOPPED (1<<17) /* leave child in a stopped state */ >#define RFHIGHPID (1<<18) /* use a pid higher than 10 (idleproc) */ >#define RFTSIGZMB (1<<19) /* select signal for exit parent notification */ >#define RFTSIGSHIFT 20 /* selected signal number is in bits 20-27 */ >#define RFTSIGMASK 0xFF >#define RFTSIGNUM(flags) (((flags) >> RFTSIGSHIFT) & RFTSIGMASK) >#define RFTSIGFLAGS(signum) ((signum) << RFTSIGSHIFT) >#define RFPROCDESC (1<<28) /* return a process descriptor */ >#define RFPPWAIT (1<<31) /* parent sleeps until child exits (vfork) */ >#define RFFLAGS (RFFDG | RFPROC | RFMEM | RFNOWAIT | RFCFDG | \ > RFTHREAD | RFSIGSHARE | RFLINUXTHPN | RFSTOPPED | RFHIGHPID | RFTSIGZMB | \ > RFPROCDESC | RFPPWAIT) >#define RFKERNELONLY (RFSTOPPED | RFHIGHPID | RFPPWAIT | RFPROCDESC) > >#endif /* __BSD_VISIBLE */ ># 196 "/usr/obj/usr/src/tmp/usr/include/sys/unistd.h" 3 4 > >#endif /* !_SYS_UNISTD_H_ */ ># 198 "/usr/obj/usr/src/tmp/usr/include/sys/unistd.h" 3 4 ># 39 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 2 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_null.h> >#endif /* expanded by -frewrite-includes */ ># 39 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 3 4 ># 40 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 40 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 3 4 ># 41 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 3 4 > >#ifndef _GID_T_DECLARED >typedef __gid_t gid_t; >#define _GID_T_DECLARED >#endif ># 46 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 3 4 > >#ifndef _OFF_T_DECLARED >typedef __off_t off_t; >#define _OFF_T_DECLARED >#endif ># 51 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 3 4 > >#ifndef _PID_T_DECLARED >typedef __pid_t pid_t; >#define _PID_T_DECLARED >#endif ># 56 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 3 4 > >#ifndef _SIZE_T_DECLARED >typedef __size_t size_t; >#define _SIZE_T_DECLARED >#endif ># 61 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 3 4 > >#ifndef _SSIZE_T_DECLARED >typedef __ssize_t ssize_t; >#define _SSIZE_T_DECLARED >#endif ># 66 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 3 4 > >#ifndef _UID_T_DECLARED >typedef __uid_t uid_t; >#define _UID_T_DECLARED >#endif ># 71 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 3 4 > >#ifndef _USECONDS_T_DECLARED >typedef __useconds_t useconds_t; >#define _USECONDS_T_DECLARED >#endif ># 76 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 3 4 > >#define STDIN_FILENO 0 /* standard input file descriptor */ >#define STDOUT_FILENO 1 /* standard output file descriptor */ >#define STDERR_FILENO 2 /* standard error file descriptor */ > >#if __XSI_VISIBLE || __POSIX_VISIBLE >= 200112 >#define F_ULOCK 0 /* unlock locked section */ >#define F_LOCK 1 /* lock a section for exclusive use */ >#define F_TLOCK 2 /* test and lock a section for exclusive use */ >#define F_TEST 3 /* test a section for locks by other procs */ >#endif ># 87 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 3 4 > >/* > * POSIX options and option groups we unconditionally do or don't > * implement. This list includes those options which are exclusively > * implemented (or not) in user mode. Please keep this list in > * alphabetical order. > * > * Anything which is defined as zero below **must** have an > * implementation for the corresponding sysconf() which is able to > * determine conclusively whether or not the feature is supported. > * Anything which is defined as other than -1 below **must** have > * complete headers, types, and function declarations as specified by > * the POSIX standard; however, if the relevant sysconf() function > * returns -1, the functions may be stubbed out. > */ >#define _POSIX_BARRIERS 200112L >#define _POSIX_CPUTIME 200112L >#define _POSIX_READER_WRITER_LOCKS 200112L >#define _POSIX_REGEXP 1 >#define _POSIX_SHELL 1 >#define _POSIX_SPAWN 200112L >#define _POSIX_SPIN_LOCKS 200112L >#define _POSIX_THREAD_ATTR_STACKADDR 200112L >#define _POSIX_THREAD_ATTR_STACKSIZE 200112L >#define _POSIX_THREAD_CPUTIME 200112L >#define _POSIX_THREAD_PRIO_INHERIT 200112L >#define _POSIX_THREAD_PRIO_PROTECT 200112L >#define _POSIX_THREAD_PRIORITY_SCHEDULING 200112L >#define _POSIX_THREAD_PROCESS_SHARED 200112L >#define _POSIX_THREAD_SAFE_FUNCTIONS -1 >#define _POSIX_THREAD_SPORADIC_SERVER -1 >#define _POSIX_THREADS 200112L >#define _POSIX_TRACE -1 >#define _POSIX_TRACE_EVENT_FILTER -1 >#define _POSIX_TRACE_INHERIT -1 >#define _POSIX_TRACE_LOG -1 >#define _POSIX2_C_BIND 200112L /* mandatory */ >#define _POSIX2_C_DEV -1 /* need c99 utility */ >#define _POSIX2_CHAR_TERM 1 >#define _POSIX2_FORT_DEV -1 /* need fort77 utility */ >#define _POSIX2_FORT_RUN 200112L >#define _POSIX2_LOCALEDEF -1 >#define _POSIX2_PBS -1 >#define _POSIX2_PBS_ACCOUNTING -1 >#define _POSIX2_PBS_CHECKPOINT -1 >#define _POSIX2_PBS_LOCATE -1 >#define _POSIX2_PBS_MESSAGE -1 >#define _POSIX2_PBS_TRACK -1 >#define _POSIX2_SW_DEV -1 /* XXX ??? */ >#define _POSIX2_UPE 200112L >#define _V6_ILP32_OFF32 -1 >#define _V6_ILP32_OFFBIG 0 >#define _V6_LP64_OFF64 0 >#define _V6_LPBIG_OFFBIG -1 > >#if __XSI_VISIBLE >#define _XOPEN_CRYPT -1 /* XXX ??? */ >#define _XOPEN_ENH_I18N -1 /* mandatory in XSI */ >#define _XOPEN_LEGACY -1 >#define _XOPEN_REALTIME -1 >#define _XOPEN_REALTIME_THREADS -1 >#define _XOPEN_UNIX -1 >#endif ># 150 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 3 4 > >/* Define the POSIX.2 version we target for compliance. */ >#define _POSIX2_VERSION 199212L > >/* > * POSIX-style system configuration variable accessors (for the > * sysconf function). The kernel does not directly implement the > * sysconf() interface; rather, a C library stub translates references > * to sysconf() into calls to sysctl() using a giant switch statement. > * Those that are marked `user' are implemented entirely in the C > * library and never query the kernel. pathconf() is implemented > * directly by the kernel so those are not defined here. > */ >#define _SC_ARG_MAX 1 >#define _SC_CHILD_MAX 2 >#define _SC_CLK_TCK 3 >#define _SC_NGROUPS_MAX 4 >#define _SC_OPEN_MAX 5 >#define _SC_JOB_CONTROL 6 >#define _SC_SAVED_IDS 7 >#define _SC_VERSION 8 >#define _SC_BC_BASE_MAX 9 /* user */ >#define _SC_BC_DIM_MAX 10 /* user */ >#define _SC_BC_SCALE_MAX 11 /* user */ >#define _SC_BC_STRING_MAX 12 /* user */ >#define _SC_COLL_WEIGHTS_MAX 13 /* user */ >#define _SC_EXPR_NEST_MAX 14 /* user */ >#define _SC_LINE_MAX 15 /* user */ >#define _SC_RE_DUP_MAX 16 /* user */ >#define _SC_2_VERSION 17 /* user */ >#define _SC_2_C_BIND 18 /* user */ >#define _SC_2_C_DEV 19 /* user */ >#define _SC_2_CHAR_TERM 20 /* user */ >#define _SC_2_FORT_DEV 21 /* user */ >#define _SC_2_FORT_RUN 22 /* user */ >#define _SC_2_LOCALEDEF 23 /* user */ >#define _SC_2_SW_DEV 24 /* user */ >#define _SC_2_UPE 25 /* user */ >#define _SC_STREAM_MAX 26 /* user */ >#define _SC_TZNAME_MAX 27 /* user */ > >#if __POSIX_VISIBLE >= 199309 >#define _SC_ASYNCHRONOUS_IO 28 >#define _SC_MAPPED_FILES 29 >#define _SC_MEMLOCK 30 >#define _SC_MEMLOCK_RANGE 31 >#define _SC_MEMORY_PROTECTION 32 >#define _SC_MESSAGE_PASSING 33 >#define _SC_PRIORITIZED_IO 34 >#define _SC_PRIORITY_SCHEDULING 35 >#define _SC_REALTIME_SIGNALS 36 >#define _SC_SEMAPHORES 37 >#define _SC_FSYNC 38 >#define _SC_SHARED_MEMORY_OBJECTS 39 >#define _SC_SYNCHRONIZED_IO 40 >#define _SC_TIMERS 41 >#define _SC_AIO_LISTIO_MAX 42 >#define _SC_AIO_MAX 43 >#define _SC_AIO_PRIO_DELTA_MAX 44 >#define _SC_DELAYTIMER_MAX 45 >#define _SC_MQ_OPEN_MAX 46 >#define _SC_PAGESIZE 47 >#define _SC_RTSIG_MAX 48 >#define _SC_SEM_NSEMS_MAX 49 >#define _SC_SEM_VALUE_MAX 50 >#define _SC_SIGQUEUE_MAX 51 >#define _SC_TIMER_MAX 52 >#endif ># 218 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 3 4 > >#if __POSIX_VISIBLE >= 200112 >#define _SC_2_PBS 59 /* user */ >#define _SC_2_PBS_ACCOUNTING 60 /* user */ >#define _SC_2_PBS_CHECKPOINT 61 /* user */ >#define _SC_2_PBS_LOCATE 62 /* user */ >#define _SC_2_PBS_MESSAGE 63 /* user */ >#define _SC_2_PBS_TRACK 64 /* user */ >#define _SC_ADVISORY_INFO 65 >#define _SC_BARRIERS 66 /* user */ >#define _SC_CLOCK_SELECTION 67 >#define _SC_CPUTIME 68 >#define _SC_FILE_LOCKING 69 >#define _SC_GETGR_R_SIZE_MAX 70 /* user */ >#define _SC_GETPW_R_SIZE_MAX 71 /* user */ >#define _SC_HOST_NAME_MAX 72 >#define _SC_LOGIN_NAME_MAX 73 >#define _SC_MONOTONIC_CLOCK 74 >#define _SC_MQ_PRIO_MAX 75 >#define _SC_READER_WRITER_LOCKS 76 /* user */ >#define _SC_REGEXP 77 /* user */ >#define _SC_SHELL 78 /* user */ >#define _SC_SPAWN 79 /* user */ >#define _SC_SPIN_LOCKS 80 /* user */ >#define _SC_SPORADIC_SERVER 81 >#define _SC_THREAD_ATTR_STACKADDR 82 /* user */ >#define _SC_THREAD_ATTR_STACKSIZE 83 /* user */ >#define _SC_THREAD_CPUTIME 84 /* user */ >#define _SC_THREAD_DESTRUCTOR_ITERATIONS 85 /* user */ >#define _SC_THREAD_KEYS_MAX 86 /* user */ >#define _SC_THREAD_PRIO_INHERIT 87 /* user */ >#define _SC_THREAD_PRIO_PROTECT 88 /* user */ >#define _SC_THREAD_PRIORITY_SCHEDULING 89 /* user */ >#define _SC_THREAD_PROCESS_SHARED 90 /* user */ >#define _SC_THREAD_SAFE_FUNCTIONS 91 /* user */ >#define _SC_THREAD_SPORADIC_SERVER 92 /* user */ >#define _SC_THREAD_STACK_MIN 93 /* user */ >#define _SC_THREAD_THREADS_MAX 94 /* user */ >#define _SC_TIMEOUTS 95 /* user */ >#define _SC_THREADS 96 /* user */ >#define _SC_TRACE 97 /* user */ >#define _SC_TRACE_EVENT_FILTER 98 /* user */ >#define _SC_TRACE_INHERIT 99 /* user */ >#define _SC_TRACE_LOG 100 /* user */ >#define _SC_TTY_NAME_MAX 101 /* user */ >#define _SC_TYPED_MEMORY_OBJECTS 102 >#define _SC_V6_ILP32_OFF32 103 /* user */ >#define _SC_V6_ILP32_OFFBIG 104 /* user */ >#define _SC_V6_LP64_OFF64 105 /* user */ >#define _SC_V6_LPBIG_OFFBIG 106 /* user */ >#define _SC_IPV6 118 >#define _SC_RAW_SOCKETS 119 >#define _SC_SYMLOOP_MAX 120 >#endif ># 272 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 3 4 > >#if __XSI_VISIBLE >#define _SC_ATEXIT_MAX 107 /* user */ >#define _SC_IOV_MAX 56 >#define _SC_PAGE_SIZE _SC_PAGESIZE >#define _SC_XOPEN_CRYPT 108 /* user */ >#define _SC_XOPEN_ENH_I18N 109 /* user */ >#define _SC_XOPEN_LEGACY 110 /* user */ >#define _SC_XOPEN_REALTIME 111 >#define _SC_XOPEN_REALTIME_THREADS 112 >#define _SC_XOPEN_SHM 113 >#define _SC_XOPEN_STREAMS 114 >#define _SC_XOPEN_UNIX 115 >#define _SC_XOPEN_VERSION 116 >#define _SC_XOPEN_XCU_VERSION 117 /* user */ >#endif ># 288 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 3 4 > >#if __BSD_VISIBLE >#define _SC_NPROCESSORS_CONF 57 >#define _SC_NPROCESSORS_ONLN 58 >#define _SC_CPUSET_SIZE 122 >#endif ># 294 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 3 4 > >/* Extensions found in Solaris and Linux. */ >#define _SC_PHYS_PAGES 121 > >/* Keys for the confstr(3) function. */ >#if __POSIX_VISIBLE >= 199209 >#define _CS_PATH 1 /* default value of PATH */ >#endif ># 302 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 3 4 > >#if __POSIX_VISIBLE >= 200112 >#define _CS_POSIX_V6_ILP32_OFF32_CFLAGS 2 >#define _CS_POSIX_V6_ILP32_OFF32_LDFLAGS 3 >#define _CS_POSIX_V6_ILP32_OFF32_LIBS 4 >#define _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS 5 >#define _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS 6 >#define _CS_POSIX_V6_ILP32_OFFBIG_LIBS 7 >#define _CS_POSIX_V6_LP64_OFF64_CFLAGS 8 >#define _CS_POSIX_V6_LP64_OFF64_LDFLAGS 9 >#define _CS_POSIX_V6_LP64_OFF64_LIBS 10 >#define _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS 11 >#define _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS 12 >#define _CS_POSIX_V6_LPBIG_OFFBIG_LIBS 13 >#define _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS 14 >#endif ># 318 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 3 4 > >__BEGIN_DECLS >/* 1003.1-1990 */ >void _exit(int) __dead2; >int access(const char *, int); >unsigned int alarm(unsigned int); >int chdir(const char *); >int chown(const char *, uid_t, gid_t); >int close(int); >void closefrom(int); >int dup(int); >int dup2(int, int); >int execl(const char *, const char *, ...) __null_sentinel; >int execle(const char *, const char *, ...); >int execlp(const char *, const char *, ...) __null_sentinel; >int execv(const char *, char * const *); >int execve(const char *, char * const *, char * const *); >int execvp(const char *, char * const *); >pid_t fork(void); >long fpathconf(int, int); >char *getcwd(char *, size_t); >gid_t getegid(void); >uid_t geteuid(void); >gid_t getgid(void); >int getgroups(int, gid_t []); >char *getlogin(void); >pid_t getpgrp(void); >pid_t getpid(void); >pid_t getppid(void); >uid_t getuid(void); >int isatty(int); >int link(const char *, const char *); >#ifndef _LSEEK_DECLARED >#define _LSEEK_DECLARED >off_t lseek(int, off_t, int); >#endif ># 354 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 3 4 >long pathconf(const char *, int); >int pause(void); >int pipe(int *); >ssize_t read(int, void *, size_t); >int rmdir(const char *); >int setgid(gid_t); >int setpgid(pid_t, pid_t); >pid_t setsid(void); >int setuid(uid_t); >unsigned int sleep(unsigned int); >long sysconf(int); >pid_t tcgetpgrp(int); >int tcsetpgrp(int, pid_t); >char *ttyname(int); >int ttyname_r(int, char *, size_t); >int unlink(const char *); >ssize_t write(int, const void *, size_t); > >/* 1003.2-1992 */ >#if __POSIX_VISIBLE >= 199209 || __XSI_VISIBLE >size_t confstr(int, char *, size_t); >#ifndef _GETOPT_DECLARED >#define _GETOPT_DECLARED >int getopt(int, char * const [], const char *); > >extern char *optarg; /* getopt(3) external variables */ >extern int optind, opterr, optopt; >#endif /* _GETOPT_DECLARED */ ># 382 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 3 4 >#endif ># 383 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 3 4 > >/* ISO/IEC 9945-1: 1996 */ >#if __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE >int fsync(int); >int fdatasync(int); > >/* > * ftruncate() was in the POSIX Realtime Extension (it's used for shared > * memory), but truncate() was not. > */ >#ifndef _FTRUNCATE_DECLARED >#define _FTRUNCATE_DECLARED >int ftruncate(int, off_t); >#endif ># 397 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 3 4 >#endif ># 398 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 3 4 > >#if __POSIX_VISIBLE >= 199506 >int getlogin_r(char *, int); >#endif ># 402 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 3 4 > >/* 1003.1-2001 */ >#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >int fchown(int, uid_t, gid_t); >ssize_t readlink(const char * __restrict, char * __restrict, size_t); >#endif ># 408 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 3 4 >#if __POSIX_VISIBLE >= 200112 >int gethostname(char *, size_t); >int setegid(gid_t); >int seteuid(uid_t); >#endif ># 413 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 3 4 > >/* 1003.1-2008 */ >#if __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE >int getsid(pid_t _pid); >int fchdir(int); >int getpgid(pid_t _pid); >int lchown(const char *, uid_t, gid_t); >ssize_t pread(int, void *, size_t, off_t); >ssize_t pwrite(int, const void *, size_t, off_t); > >/* See comment at ftruncate() above. */ >#ifndef _TRUNCATE_DECLARED >#define _TRUNCATE_DECLARED >int truncate(const char *, off_t); >#endif ># 428 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 3 4 >#endif /* __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE */ ># 429 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 3 4 > >#if __POSIX_VISIBLE >= 200809 >int faccessat(int, const char *, int, int); >int fchownat(int, const char *, uid_t, gid_t, int); >int fexecve(int, char *const [], char *const []); >int linkat(int, const char *, int, const char *, int); >ssize_t readlinkat(int, const char * __restrict, char * __restrict, size_t); >int symlinkat(const char *, int, const char *); >int unlinkat(int, const char *, int); >#endif /* __POSIX_VISIBLE >= 200809 */ ># 439 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 3 4 > >/* > * symlink() was originally in POSIX.1a, which was withdrawn after > * being overtaken by events (1003.1-2001). It was in XPG4.2, and of > * course has been in BSD since 4.2. > */ >#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >= 402 >int symlink(const char * __restrict, const char * __restrict); >#endif ># 448 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 3 4 > >/* X/Open System Interfaces */ >#if __XSI_VISIBLE >char *crypt(const char *, const char *); >/* char *ctermid(char *); */ /* XXX ??? */ >int encrypt(char *, int); >long gethostid(void); >int lockf(int, int, off_t); >int nice(int); >int setregid(gid_t, gid_t); >int setreuid(uid_t, uid_t); > >#ifndef _SWAB_DECLARED >#define _SWAB_DECLARED >void swab(const void * __restrict, void * __restrict, ssize_t); >#endif /* _SWAB_DECLARED */ ># 464 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 3 4 > >void sync(void); > >#endif /* __XSI_VISIBLE */ ># 468 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 3 4 > >#if (__XSI_VISIBLE && __XSI_VISIBLE <= 500) || __BSD_VISIBLE >int brk(const void *); >int chroot(const char *); >int getdtablesize(void); >int getpagesize(void) __pure2; >char *getpass(const char *); >void *sbrk(intptr_t); >#endif ># 477 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 3 4 > >#if (__XSI_VISIBLE && __XSI_VISIBLE <= 600) || __BSD_VISIBLE >char *getwd(char *); /* obsoleted by getcwd() */ >useconds_t > ualarm(useconds_t, useconds_t); >int usleep(useconds_t); >pid_t vfork(void) __returns_twice; >#endif ># 485 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 3 4 > >#if __BSD_VISIBLE >struct timeval; /* select(2) */ >int acct(const char *); >int async_daemon(void); >int check_utility_compat(const char *); >const char * > crypt_get_format(void); >int crypt_set_format(const char *); >int des_cipher(const char *, char *, long, int); >int des_setkey(const char *key); >int dup3(int, int, int); >int eaccess(const char *, int); >void endusershell(void); >int exect(const char *, char * const *, char * const *); >int execvP(const char *, const char *, char * const *); >int feature_present(const char *); >char *fflagstostr(u_long); >int getdomainname(char *, int); >int getgrouplist(const char *, gid_t, gid_t *, int *); >int getloginclass(char *, size_t); >mode_t getmode(const void *, mode_t); >int getosreldate(void); >int getpeereid(int, uid_t *, gid_t *); >int getresgid(gid_t *, gid_t *, gid_t *); >int getresuid(uid_t *, uid_t *, uid_t *); >char *getusershell(void); >int initgroups(const char *, gid_t); >int iruserok(unsigned long, int, const char *, const char *); >int iruserok_sa(const void *, int, int, const char *, const char *); >int issetugid(void); >void __FreeBSD_libc_enter_restricted_mode(void); >long lpathconf(const char *, int); >#ifndef _MKDTEMP_DECLARED >char *mkdtemp(char *); >#define _MKDTEMP_DECLARED >#endif ># 522 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 3 4 >#ifndef _MKNOD_DECLARED >int mknod(const char *, mode_t, dev_t); >#define _MKNOD_DECLARED >#endif ># 526 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 3 4 >#ifndef _MKSTEMP_DECLARED >int mkstemp(char *); >#define _MKSTEMP_DECLARED >#endif ># 530 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 3 4 >int mkstemps(char *, int); >#ifndef _MKTEMP_DECLARED >char *mktemp(char *); >#define _MKTEMP_DECLARED >#endif ># 535 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 3 4 >int nfssvc(int, void *); >int nlm_syscall(int, int, int, char **); >int pipe2(int *, int); >int profil(char *, size_t, vm_offset_t, int); >int rcmd(char **, int, const char *, const char *, const char *, int *); >int rcmd_af(char **, int, const char *, > const char *, const char *, int *, int); >int rcmdsh(char **, int, const char *, > const char *, const char *, const char *); >char *re_comp(const char *); >int re_exec(const char *); >int reboot(int); >int revoke(const char *); >pid_t rfork(int); >pid_t rfork_thread(int, void *, int (*)(void *), void *); >int rresvport(int *); >int rresvport_af(int *, int); >int ruserok(const char *, int, const char *, const char *); >#if __BSD_VISIBLE >#ifndef _SELECT_DECLARED >#define _SELECT_DECLARED >int select(int, fd_set *, fd_set *, fd_set *, struct timeval *); >#endif ># 558 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 3 4 >#endif ># 559 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 3 4 >int setdomainname(const char *, int); >int setgroups(int, const gid_t *); >void sethostid(long); >int sethostname(const char *, int); >#ifndef _SETKEY_DECLARED >int setkey(const char *); >#define _SETKEY_DECLARED >#endif ># 567 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 3 4 >int setlogin(const char *); >int setloginclass(const char *); >void *setmode(const char *); >int setpgrp(pid_t, pid_t); /* obsoleted by setpgid() */ >void setproctitle(const char *_fmt, ...) __printf0like(1, 2); >int setresgid(gid_t, gid_t, gid_t); >int setresuid(uid_t, uid_t, uid_t); >int setrgid(gid_t); >int setruid(uid_t); >void setusershell(void); >int strtofflags(char **, u_long *, u_long *); >int swapon(const char *); >int swapoff(const char *); >int syscall(int, ...); >off_t __syscall(quad_t, ...); >int undelete(const char *); >int unwhiteout(const char *); >void *valloc(size_t); /* obsoleted by malloc() */ > >#ifndef _OPTRESET_DECLARED >#define _OPTRESET_DECLARED >extern int optreset; /* getopt(3) external variable */ >#endif ># 590 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 3 4 >#endif /* __BSD_VISIBLE */ ># 591 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 3 4 >__END_DECLS > >#endif /* !_UNISTD_H_ */ ># 594 "/usr/obj/usr/src/tmp/usr/include/unistd.h" 3 4 ># 72 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" 2 >#endif ># 73 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#if HAVE_SYS_BSDTYPES_H >#if 0 /* expanded by -frewrite-includes */ >#include <sys/bsdtypes.h> /* needed for ISC */ >#endif /* expanded by -frewrite-includes */ ># 75 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" ># 76 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#endif ># 77 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#if HAVE_LIMITS_H >#if 0 /* expanded by -frewrite-includes */ ># include <limits.h> >#endif /* expanded by -frewrite-includes */ ># 79 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" ># 1 "/usr/obj/usr/src/tmp/usr/include/limits.h" 1 3 4 >/*- > * Copyright (c) 1988, 1993 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)limits.h 8.2 (Berkeley) 1/4/94 > * $FreeBSD: stable/11/include/limits.h 293491 2016-01-09 14:53:23Z kevlo $ > */ > >#ifndef _LIMITS_H_ >#define _LIMITS_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 36 "/usr/obj/usr/src/tmp/usr/include/limits.h" 3 4 ># 37 "/usr/obj/usr/src/tmp/usr/include/limits.h" 3 4 > >#if __POSIX_VISIBLE >#define _POSIX_ARG_MAX 4096 >#define _POSIX_LINK_MAX 8 >#define _POSIX_MAX_CANON 255 >#define _POSIX_MAX_INPUT 255 >#define _POSIX_NAME_MAX 14 >#define _POSIX_PIPE_BUF 512 >#define _POSIX_SSIZE_MAX 32767 >#define _POSIX_STREAM_MAX 8 > >#if __POSIX_VISIBLE >= 200112 >#define _POSIX_CHILD_MAX 25 >#define _POSIX_NGROUPS_MAX 8 >#define _POSIX_OPEN_MAX 20 >#define _POSIX_PATH_MAX 256 >#define _POSIX_TZNAME_MAX 6 >#else ># 55 "/usr/obj/usr/src/tmp/usr/include/limits.h" 3 4 >#define _POSIX_CHILD_MAX 6 >#define _POSIX_NGROUPS_MAX 0 >#define _POSIX_OPEN_MAX 16 >#define _POSIX_PATH_MAX 255 >#define _POSIX_TZNAME_MAX 3 >#endif ># 61 "/usr/obj/usr/src/tmp/usr/include/limits.h" 3 4 > >#if __POSIX_VISIBLE >= 200112 >#define BC_BASE_MAX 99 /* max ibase/obase values in bc(1) */ >#define BC_DIM_MAX 2048 /* max array elements in bc(1) */ >#define BC_SCALE_MAX 99 /* max scale value in bc(1) */ >#define BC_STRING_MAX 1000 /* max const string length in bc(1) */ >#define CHARCLASS_NAME_MAX 14 /* max character class name size */ >#define COLL_WEIGHTS_MAX 10 /* max weights for order keyword */ >#define EXPR_NEST_MAX 32 /* max expressions nested in expr(1) */ >#define LINE_MAX 2048 /* max bytes in an input line */ >#define RE_DUP_MAX 255 /* max RE's in interval notation */ > >#define _POSIX2_BC_BASE_MAX 99 >#define _POSIX2_BC_DIM_MAX 2048 >#define _POSIX2_BC_SCALE_MAX 99 >#define _POSIX2_BC_STRING_MAX 1000 >#define _POSIX2_CHARCLASS_NAME_MAX 14 >#define _POSIX2_COLL_WEIGHTS_MAX 2 >#define _POSIX2_EQUIV_CLASS_MAX 2 >#define _POSIX2_EXPR_NEST_MAX 32 >#define _POSIX2_LINE_MAX 2048 >#define _POSIX2_RE_DUP_MAX 255 >#endif ># 84 "/usr/obj/usr/src/tmp/usr/include/limits.h" 3 4 >#endif ># 85 "/usr/obj/usr/src/tmp/usr/include/limits.h" 3 4 > >#if __POSIX_VISIBLE >= 199309 >#define _POSIX_AIO_LISTIO_MAX 2 >#define _POSIX_AIO_MAX 1 >#define _POSIX_DELAYTIMER_MAX 32 >#define _POSIX_MQ_OPEN_MAX 8 >#define _POSIX_MQ_PRIO_MAX 32 >#define _POSIX_RTSIG_MAX 8 >#define _POSIX_SEM_NSEMS_MAX 256 >#define _POSIX_SEM_VALUE_MAX 32767 >#define _POSIX_SIGQUEUE_MAX 32 >#define _POSIX_TIMER_MAX 32 > >#define _POSIX_CLOCKRES_MIN 20000000 >#endif ># 100 "/usr/obj/usr/src/tmp/usr/include/limits.h" 3 4 > >#if __POSIX_VISIBLE >= 199506 >#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 >#define _POSIX_THREAD_KEYS_MAX 128 >#define _POSIX_THREAD_THREADS_MAX 64 >#endif ># 106 "/usr/obj/usr/src/tmp/usr/include/limits.h" 3 4 > >#if __POSIX_VISIBLE >= 200112 >#define _POSIX_HOST_NAME_MAX 255 >#define _POSIX_LOGIN_NAME_MAX 9 >#define _POSIX_SS_REPL_MAX 4 >#define _POSIX_SYMLINK_MAX 255 >#define _POSIX_SYMLOOP_MAX 8 >#define _POSIX_TRACE_EVENT_NAME_MAX 30 >#define _POSIX_TRACE_NAME_MAX 8 >#define _POSIX_TRACE_SYS_MAX 8 >#define _POSIX_TRACE_USER_EVENT_MAX 32 >#define _POSIX_TTY_NAME_MAX 9 > >#define _POSIX_RE_DUP_MAX _POSIX2_RE_DUP_MAX >#endif ># 121 "/usr/obj/usr/src/tmp/usr/include/limits.h" 3 4 > >#if __XSI_VISIBLE || __POSIX_VISIBLE >= 200809 >#define NL_ARGMAX 99 /* max # of position args for printf */ >#define NL_MSGMAX 32767 >#define NL_SETMAX 255 >#define NL_TEXTMAX 2048 >#endif ># 128 "/usr/obj/usr/src/tmp/usr/include/limits.h" 3 4 > >#if __XSI_VISIBLE >#define _XOPEN_IOV_MAX 16 >#define _XOPEN_NAME_MAX 255 >#define _XOPEN_PATH_MAX 1024 >#define PASS_MAX 128 /* _PASSWORD_LEN from <pwd.h> */ > >#define NL_LANGMAX 31 /* max LANG name length */ >#define NL_NMAX 1 >#endif ># 138 "/usr/obj/usr/src/tmp/usr/include/limits.h" 3 4 > >#define MB_LEN_MAX 6 /* 31-bit UTF-8 */ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/limits.h> >#endif /* expanded by -frewrite-includes */ ># 141 "/usr/obj/usr/src/tmp/usr/include/limits.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/sys/limits.h" 1 3 4 >/*- > * Copyright (c) 1988, 1993 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 4. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: stable/11/sys/sys/limits.h 219271 2011-03-04 19:28:27Z jilles $ > */ > >#ifndef _SYS_LIMITS_H_ >#define _SYS_LIMITS_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 35 "/usr/obj/usr/src/tmp/usr/include/sys/limits.h" 3 4 ># 36 "/usr/obj/usr/src/tmp/usr/include/sys/limits.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <machine/_limits.h> >#endif /* expanded by -frewrite-includes */ ># 36 "/usr/obj/usr/src/tmp/usr/include/sys/limits.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/machine/_limits.h" 1 3 4 >/*- > * This file is in the public domain. > */ >/* $FreeBSD: stable/11/sys/amd64/include/_limits.h 232262 2012-02-28 18:24:28Z tijl $ */ > >#if 0 /* expanded by -frewrite-includes */ >#include <x86/_limits.h> >#endif /* expanded by -frewrite-includes */ ># 6 "/usr/obj/usr/src/tmp/usr/include/machine/_limits.h" 3 4 ># 7 "/usr/obj/usr/src/tmp/usr/include/machine/_limits.h" 3 4 ># 37 "/usr/obj/usr/src/tmp/usr/include/sys/limits.h" 2 3 4 > >#define CHAR_BIT __CHAR_BIT /* number of bits in a char */ > >#define SCHAR_MAX __SCHAR_MAX /* max value for a signed char */ >#define SCHAR_MIN __SCHAR_MIN /* min value for a signed char */ > >#define UCHAR_MAX __UCHAR_MAX /* max value for an unsigned char */ > >#ifdef __CHAR_UNSIGNED__ >#define CHAR_MAX UCHAR_MAX /* max value for a char */ >#define CHAR_MIN 0 /* min value for a char */ >#else ># 49 "/usr/obj/usr/src/tmp/usr/include/sys/limits.h" 3 4 >#define CHAR_MAX SCHAR_MAX >#define CHAR_MIN SCHAR_MIN >#endif ># 52 "/usr/obj/usr/src/tmp/usr/include/sys/limits.h" 3 4 > >#define USHRT_MAX __USHRT_MAX /* max value for an unsigned short */ >#define SHRT_MAX __SHRT_MAX /* max value for a short */ >#define SHRT_MIN __SHRT_MIN /* min value for a short */ > >#define UINT_MAX __UINT_MAX /* max value for an unsigned int */ >#define INT_MAX __INT_MAX /* max value for an int */ >#define INT_MIN __INT_MIN /* min value for an int */ > >#define ULONG_MAX __ULONG_MAX /* max for an unsigned long */ >#define LONG_MAX __LONG_MAX /* max for a long */ >#define LONG_MIN __LONG_MIN /* min for a long */ > >#ifdef __LONG_LONG_SUPPORTED >#define ULLONG_MAX __ULLONG_MAX /* max for an unsigned long long */ >#define LLONG_MAX __LLONG_MAX /* max for a long long */ >#define LLONG_MIN __LLONG_MIN /* min for a long long */ >#endif ># 70 "/usr/obj/usr/src/tmp/usr/include/sys/limits.h" 3 4 > >#if __POSIX_VISIBLE || __XSI_VISIBLE >#define SSIZE_MAX __SSIZE_MAX /* max value for an ssize_t */ >#endif ># 74 "/usr/obj/usr/src/tmp/usr/include/sys/limits.h" 3 4 > >#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >#define SIZE_T_MAX __SIZE_T_MAX /* max value for a size_t */ > >#define OFF_MAX __OFF_MAX /* max value for an off_t */ >#define OFF_MIN __OFF_MIN /* min value for an off_t */ >#endif ># 81 "/usr/obj/usr/src/tmp/usr/include/sys/limits.h" 3 4 > >#if __BSD_VISIBLE >#define GID_MAX UINT_MAX /* max value for a gid_t */ >#define UID_MAX UINT_MAX /* max value for a uid_t */ > >#define UQUAD_MAX (__UQUAD_MAX) /* max value for a uquad_t */ >#define QUAD_MAX (__QUAD_MAX) /* max value for a quad_t */ >#define QUAD_MIN (__QUAD_MIN) /* min value for a quad_t */ >#endif ># 90 "/usr/obj/usr/src/tmp/usr/include/sys/limits.h" 3 4 > >#if __XSI_VISIBLE || __POSIX_VISIBLE >= 200809 >#define LONG_BIT __LONG_BIT >#define WORD_BIT __WORD_BIT >#endif ># 95 "/usr/obj/usr/src/tmp/usr/include/sys/limits.h" 3 4 > >#if __POSIX_VISIBLE >#define MQ_PRIO_MAX 64 >#endif ># 99 "/usr/obj/usr/src/tmp/usr/include/sys/limits.h" 3 4 > >#endif /* !_SYS_LIMITS_H_ */ ># 101 "/usr/obj/usr/src/tmp/usr/include/sys/limits.h" 3 4 ># 142 "/usr/obj/usr/src/tmp/usr/include/limits.h" 2 3 4 > >#if __POSIX_VISIBLE >#if 0 /* expanded by -frewrite-includes */ >#include <sys/syslimits.h> >#endif /* expanded by -frewrite-includes */ ># 144 "/usr/obj/usr/src/tmp/usr/include/limits.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/sys/syslimits.h" 1 3 4 >/*- > * Copyright (c) 1988, 1993 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 4. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)syslimits.h 8.1 (Berkeley) 6/2/93 > * $FreeBSD: stable/11/sys/sys/syslimits.h 194498 2009-06-19 17:10:35Z brooks $ > */ > >#ifndef _SYS_SYSLIMITS_H_ >#define _SYS_SYSLIMITS_H_ > >#if !defined(_KERNEL) && !defined(_LIMITS_H_) && !defined(_SYS_PARAM_H_) >#ifndef _SYS_CDEFS_H_ >#error this file needs sys/cdefs.h as a prerequisite >#endif ># 40 "/usr/obj/usr/src/tmp/usr/include/sys/syslimits.h" 3 4 >#ifdef __CC_SUPPORTS_WARNING >#warning "No user-serviceable parts inside." >#endif ># 43 "/usr/obj/usr/src/tmp/usr/include/sys/syslimits.h" 3 4 >#endif ># 44 "/usr/obj/usr/src/tmp/usr/include/sys/syslimits.h" 3 4 > >/* > * Do not add any new variables here. (See the comment at the end of > * the file for why.) > */ >#define ARG_MAX 262144 /* max bytes for an exec function */ >#ifndef CHILD_MAX >#define CHILD_MAX 40 /* max simultaneous processes */ >#endif ># 53 "/usr/obj/usr/src/tmp/usr/include/sys/syslimits.h" 3 4 >#define LINK_MAX 32767 /* max file link count */ >#define MAX_CANON 255 /* max bytes in term canon input line */ >#define MAX_INPUT 255 /* max bytes in terminal input */ >#define NAME_MAX 255 /* max bytes in a file name */ >#ifndef NGROUPS_MAX >#define NGROUPS_MAX 1023 /* max supplemental group id's */ >#endif ># 60 "/usr/obj/usr/src/tmp/usr/include/sys/syslimits.h" 3 4 >#ifndef OPEN_MAX >#define OPEN_MAX 64 /* max open files per process */ >#endif ># 63 "/usr/obj/usr/src/tmp/usr/include/sys/syslimits.h" 3 4 >#define PATH_MAX 1024 /* max bytes in pathname */ >#define PIPE_BUF 512 /* max bytes for atomic pipe writes */ >#define IOV_MAX 1024 /* max elements in i/o vector */ > >/* > * We leave the following values undefined to force applications to either > * assume conservative values or call sysconf() to get the current value. > * > * HOST_NAME_MAX > * > * (We should do this for most of the values currently defined here, > * but many programs are not prepared to deal with this yet.) > */ >#endif ># 77 "/usr/obj/usr/src/tmp/usr/include/sys/syslimits.h" 3 4 ># 145 "/usr/obj/usr/src/tmp/usr/include/limits.h" 2 3 4 >#endif ># 146 "/usr/obj/usr/src/tmp/usr/include/limits.h" 3 4 > >#endif /* !_LIMITS_H_ */ ># 148 "/usr/obj/usr/src/tmp/usr/include/limits.h" 3 4 ># 80 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" 2 >#elif HAVE_SYS_PARAM_H ># 81 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#if 0 /* expanded by -frewrite-includes */ ># include <sys/param.h> >#endif /* expanded by -frewrite-includes */ ># 81 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" ># 82 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#endif ># 83 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#if 0 /* expanded by -frewrite-includes */ >#include <assert.h> >#endif /* expanded by -frewrite-includes */ ># 84 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" ># 1 "/usr/obj/usr/src/tmp/usr/include/assert.h" 1 3 4 >/*- > * Copyright (c) 1992, 1993 > * The Regents of the University of California. All rights reserved. > * (c) UNIX System Laboratories, Inc. > * All or some portions of this file are derived from material licensed > * to the University of California by American Telephone and Telegraph > * Co. or Unix System Laboratories, Inc. and are reproduced herein with > * the permission of UNIX System Laboratories, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)assert.h 8.2 (Berkeley) 1/21/94 > * $FreeBSD: stable/11/include/assert.h 228955 2011-12-29 14:41:17Z ed $ > */ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 38 "/usr/obj/usr/src/tmp/usr/include/assert.h" 3 4 ># 39 "/usr/obj/usr/src/tmp/usr/include/assert.h" 3 4 > >/* > * Unlike other ANSI header files, <assert.h> may usefully be included > * multiple times, with and without NDEBUG defined. > */ > >#undef assert >#undef _assert > >#ifdef NDEBUG >#define assert(e) ((void)0) >#define _assert(e) ((void)0) >#else ># 52 "/usr/obj/usr/src/tmp/usr/include/assert.h" 3 4 >#define _assert(e) assert(e) > >#define assert(e) ((e) ? (void)0 : __assert(__func__, __FILE__, \ > __LINE__, #e)) >#endif /* NDEBUG */ ># 57 "/usr/obj/usr/src/tmp/usr/include/assert.h" 3 4 > >#ifndef _ASSERT_H_ >#define _ASSERT_H_ > >/* > * Static assertions. In principle we could define static_assert for > * C++ older than C++11, but this breaks if _Static_assert is > * implemented as a macro. > * > * C++ template parameters may contain commas, even if not enclosed in > * parentheses, causing the _Static_assert macro to be invoked with more > * than two parameters. > */ >#if __ISO_C_VISIBLE >= 2011 && !defined(__cplusplus) >#define static_assert _Static_assert >#endif ># 73 "/usr/obj/usr/src/tmp/usr/include/assert.h" 3 4 > >__BEGIN_DECLS >void __assert(const char *, const char *, int, const char *) __dead2; >__END_DECLS > >#endif /* !_ASSERT_H_ */ ># 79 "/usr/obj/usr/src/tmp/usr/include/assert.h" 3 4 ># 85 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" 2 >#if 0 /* expanded by -frewrite-includes */ >#include <stdio.h> >#endif /* expanded by -frewrite-includes */ ># 85 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" ># 1 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 1 3 4 >/*- > * Copyright (c) 1990, 1993 > * The Regents of the University of California. All rights reserved. > * > * This code is derived from software contributed to Berkeley by > * Chris Torek. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)stdio.h 8.5 (Berkeley) 4/29/95 > * $FreeBSD: stable/11/include/stdio.h 306845 2016-10-08 14:07:34Z vangyzen $ > */ > >#ifndef _STDIO_H_ >#define _STDIO_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 39 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 ># 40 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_null.h> >#endif /* expanded by -frewrite-includes */ ># 40 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 ># 41 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 41 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 ># 42 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 > >typedef __off_t fpos_t; > >#ifndef _SIZE_T_DECLARED >typedef __size_t size_t; >#define _SIZE_T_DECLARED >#endif ># 49 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 > >#if __POSIX_VISIBLE >= 200809 >#ifndef _OFF_T_DECLARED >#define _OFF_T_DECLARED >typedef __off_t off_t; >#endif ># 55 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 >#ifndef _SSIZE_T_DECLARED >#define _SSIZE_T_DECLARED >typedef __ssize_t ssize_t; >#endif ># 59 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 >#endif ># 60 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 > >#ifndef _OFF64_T_DECLARED >#define _OFF64_T_DECLARED >typedef __off64_t off64_t; >#endif ># 65 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 > >#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >#ifndef _VA_LIST_DECLARED >typedef __va_list va_list; >#define _VA_LIST_DECLARED >#endif ># 71 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 >#endif ># 72 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 > >#define _FSTDIO /* Define for new stdio with functions. */ > >/* > * NB: to fit things in six character monocase externals, the stdio > * code uses the prefix `__s' for stdio objects, typically followed > * by a three-character attempt at a mnemonic. > */ > >/* stdio buffers */ >struct __sbuf { > unsigned char *_base; > int _size; >}; > >/* > * stdio state variables. > * > * The following always hold: > * > * if (_flags&(__SLBF|__SWR)) == (__SLBF|__SWR), > * _lbfsize is -_bf._size, else _lbfsize is 0 > * if _flags&__SRD, _w is 0 > * if _flags&__SWR, _r is 0 > * > * This ensures that the getc and putc macros (or inline functions) never > * try to write or read from a file that is in `read' or `write' mode. > * (Moreover, they can, and do, automatically switch from read mode to > * write mode, and back, on "r+" and "w+" files.) > * > * _lbfsize is used only to make the inline line-buffered output stream > * code as compact as possible. > * > * _ub, _up, and _ur are used when ungetc() pushes back more characters > * than fit in the current _bf, or when ungetc() pushes back a character > * that does not match the previous one in _bf. When this happens, > * _ub._base becomes non-nil (i.e., a stream has ungetc() data iff > * _ub._base!=NULL) and _up and _ur save the current values of _p and _r. > * > * Certain members of __sFILE are accessed directly via macros or > * inline functions. To preserve ABI compat, these members must not > * be disturbed. These members are marked below with (*). > */ >struct __sFILE { > unsigned char *_p; /* (*) current position in (some) buffer */ > int _r; /* (*) read space left for getc() */ > int _w; /* (*) write space left for putc() */ > short _flags; /* (*) flags, below; this FILE is free if 0 */ > short _file; /* (*) fileno, if Unix descriptor, else -1 */ > struct __sbuf _bf; /* (*) the buffer (at least 1 byte, if !NULL) */ > int _lbfsize; /* (*) 0 or -_bf._size, for inline putc */ > > /* operations */ > void *_cookie; /* (*) cookie passed to io functions */ > int (*_close)(void *); > int (*_read)(void *, char *, int); > fpos_t (*_seek)(void *, fpos_t, int); > int (*_write)(void *, const char *, int); > > /* separate buffer for long sequences of ungetc() */ > struct __sbuf _ub; /* ungetc buffer */ > unsigned char *_up; /* saved _p when _p is doing ungetc data */ > int _ur; /* saved _r when _r is counting ungetc data */ > > /* tricks to meet minimum requirements even when malloc() fails */ > unsigned char _ubuf[3]; /* guarantee an ungetc() buffer */ > unsigned char _nbuf[1]; /* guarantee a getc() buffer */ > > /* separate buffer for fgetln() when line crosses buffer boundary */ > struct __sbuf _lb; /* buffer for fgetln() */ > > /* Unix stdio files get aligned to block boundaries on fseek() */ > int _blksize; /* stat.st_blksize (may be != _bf._size) */ > fpos_t _offset; /* current lseek offset */ > > struct pthread_mutex *_fl_mutex; /* used for MT-safety */ > struct pthread *_fl_owner; /* current owner */ > int _fl_count; /* recursive lock count */ > int _orientation; /* orientation for fwide() */ > __mbstate_t _mbstate; /* multibyte conversion state */ > int _flags2; /* additional flags */ >}; >#ifndef _STDFILE_DECLARED >#define _STDFILE_DECLARED >typedef struct __sFILE FILE; >#endif ># 158 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 >#ifndef _STDSTREAM_DECLARED >__BEGIN_DECLS >extern FILE *__stdinp; >extern FILE *__stdoutp; >extern FILE *__stderrp; >__END_DECLS >#define _STDSTREAM_DECLARED >#endif ># 166 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 > >#define __SLBF 0x0001 /* line buffered */ >#define __SNBF 0x0002 /* unbuffered */ >#define __SRD 0x0004 /* OK to read */ >#define __SWR 0x0008 /* OK to write */ > /* RD and WR are never simultaneously asserted */ >#define __SRW 0x0010 /* open for reading & writing */ >#define __SEOF 0x0020 /* found EOF */ >#define __SERR 0x0040 /* found error */ >#define __SMBF 0x0080 /* _bf._base is from malloc */ >#define __SAPP 0x0100 /* fdopen()ed in append mode */ >#define __SSTR 0x0200 /* this is an sprintf/snprintf string */ >#define __SOPT 0x0400 /* do fseek() optimization */ >#define __SNPT 0x0800 /* do not do fseek() optimization */ >#define __SOFF 0x1000 /* set iff _offset is in fact correct */ >#define __SMOD 0x2000 /* true => fgetln modified _p text */ >#define __SALC 0x4000 /* allocate string space dynamically */ >#define __SIGN 0x8000 /* ignore this file in _fwalk */ > >#define __S2OAP 0x0001 /* O_APPEND mode is set */ > >/* > * The following three definitions are for ANSI C, which took them > * from System V, which brilliantly took internal interface macros and > * made them official arguments to setvbuf(), without renaming them. > * Hence, these ugly _IOxxx names are *supposed* to appear in user code. > * > * Although numbered as their counterparts above, the implementation > * does not rely on this. > */ >#define _IOFBF 0 /* setvbuf should set fully buffered */ >#define _IOLBF 1 /* setvbuf should set line buffered */ >#define _IONBF 2 /* setvbuf should set unbuffered */ > >#define BUFSIZ 1024 /* size of buffer used by setbuf */ >#define EOF (-1) > >/* > * FOPEN_MAX is a minimum maximum, and is the number of streams that > * stdio can provide without attempting to allocate further resources > * (which could fail). Do not use this for anything. > */ > /* must be == _POSIX_STREAM_MAX <limits.h> */ >#ifndef FOPEN_MAX >#define FOPEN_MAX 20 /* must be <= OPEN_MAX <sys/syslimits.h> */ >#endif ># 212 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 >#define FILENAME_MAX 1024 /* must be <= PATH_MAX <sys/syslimits.h> */ > >/* System V/ANSI C; this is the wrong way to do this, do *not* use these. */ >#if __XSI_VISIBLE >#define P_tmpdir "/tmp/" >#endif ># 218 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 >#define L_tmpnam 1024 /* XXX must be == PATH_MAX */ >#define TMP_MAX 308915776 > >#ifndef SEEK_SET >#define SEEK_SET 0 /* set file offset to offset */ >#endif ># 224 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 >#ifndef SEEK_CUR >#define SEEK_CUR 1 /* set file offset to current plus offset */ >#endif ># 227 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 >#ifndef SEEK_END >#define SEEK_END 2 /* set file offset to EOF plus offset */ >#endif ># 230 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 > >#define stdin __stdinp >#define stdout __stdoutp >#define stderr __stderrp > >__BEGIN_DECLS >#ifdef _XLOCALE_H_ >#if 0 /* expanded by -frewrite-includes */ >#include <xlocale/_stdio.h> >#endif /* expanded by -frewrite-includes */ ># 237 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 ># 238 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 >#endif ># 239 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 >/* > * Functions defined in ANSI C standard. > */ >void clearerr(FILE *); >int fclose(FILE *); >int feof(FILE *); >int ferror(FILE *); >int fflush(FILE *); >int fgetc(FILE *); >int fgetpos(FILE * __restrict, fpos_t * __restrict); >char *fgets(char * __restrict, int, FILE * __restrict); >FILE *fopen(const char * __restrict, const char * __restrict); >int fprintf(FILE * __restrict, const char * __restrict, ...); >int fputc(int, FILE *); >int fputs(const char * __restrict, FILE * __restrict); >size_t fread(void * __restrict, size_t, size_t, FILE * __restrict); >FILE *freopen(const char * __restrict, const char * __restrict, FILE * __restrict); >int fscanf(FILE * __restrict, const char * __restrict, ...); >int fseek(FILE *, long, int); >int fsetpos(FILE *, const fpos_t *); >long ftell(FILE *); >size_t fwrite(const void * __restrict, size_t, size_t, FILE * __restrict); >int getc(FILE *); >int getchar(void); >char *gets(char *); >void perror(const char *); >int printf(const char * __restrict, ...); >int putc(int, FILE *); >int putchar(int); >int puts(const char *); >int remove(const char *); >int rename(const char *, const char *); >void rewind(FILE *); >int scanf(const char * __restrict, ...); >void setbuf(FILE * __restrict, char * __restrict); >int setvbuf(FILE * __restrict, char * __restrict, int, size_t); >int sprintf(char * __restrict, const char * __restrict, ...); >int sscanf(const char * __restrict, const char * __restrict, ...); >FILE *tmpfile(void); >char *tmpnam(char *); >int ungetc(int, FILE *); >int vfprintf(FILE * __restrict, const char * __restrict, > __va_list); >int vprintf(const char * __restrict, __va_list); >int vsprintf(char * __restrict, const char * __restrict, > __va_list); > >#if __ISO_C_VISIBLE >= 1999 >int snprintf(char * __restrict, size_t, const char * __restrict, > ...) __printflike(3, 4); >int vfscanf(FILE * __restrict, const char * __restrict, __va_list) > __scanflike(2, 0); >int vscanf(const char * __restrict, __va_list) __scanflike(1, 0); >int vsnprintf(char * __restrict, size_t, const char * __restrict, > __va_list) __printflike(3, 0); >int vsscanf(const char * __restrict, const char * __restrict, __va_list) > __scanflike(2, 0); >#endif ># 297 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 > >/* > * Functions defined in all versions of POSIX 1003.1. > */ >#if __BSD_VISIBLE || (__POSIX_VISIBLE && __POSIX_VISIBLE <= 199506) >#define L_cuserid 17 /* size for cuserid(3); MAXLOGNAME, legacy */ >#endif ># 304 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 > >#if __POSIX_VISIBLE >#define L_ctermid 1024 /* size for ctermid(3); PATH_MAX */ > >char *ctermid(char *); >FILE *fdopen(int, const char *); >int fileno(FILE *); >#endif /* __POSIX_VISIBLE */ ># 312 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 > >#if __POSIX_VISIBLE >= 199209 >int pclose(FILE *); >FILE *popen(const char *, const char *); >#endif ># 317 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 > >#if __POSIX_VISIBLE >= 199506 >int ftrylockfile(FILE *); >void flockfile(FILE *); >void funlockfile(FILE *); > >/* > * These are normally used through macros as defined below, but POSIX > * requires functions as well. > */ >int getc_unlocked(FILE *); >int getchar_unlocked(void); >int putc_unlocked(int, FILE *); >int putchar_unlocked(int); >#endif ># 332 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 >#if __BSD_VISIBLE >void clearerr_unlocked(FILE *); >int feof_unlocked(FILE *); >int ferror_unlocked(FILE *); >int fileno_unlocked(FILE *); >#endif ># 338 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 > >#if __POSIX_VISIBLE >= 200112 >int fseeko(FILE *, __off_t, int); >__off_t ftello(FILE *); >#endif ># 343 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 > >#if __BSD_VISIBLE || __XSI_VISIBLE > 0 && __XSI_VISIBLE < 600 >int getw(FILE *); >int putw(int, FILE *); >#endif /* BSD or X/Open before issue 6 */ ># 348 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 > >#if __XSI_VISIBLE >char *tempnam(const char *, const char *); >#endif ># 352 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 > >#if __POSIX_VISIBLE >= 200809 >FILE *fmemopen(void * __restrict, size_t, const char * __restrict); >ssize_t getdelim(char ** __restrict, size_t * __restrict, int, > FILE * __restrict); >FILE *open_memstream(char **, size_t *); >int renameat(int, const char *, int, const char *); >int vdprintf(int, const char * __restrict, __va_list) __printflike(2, 0); > >/* > * Every programmer and his dog wrote functions called getline() and dprintf() > * before POSIX.1-2008 came along and decided to usurp the names, so we > * don't prototype them by default unless one of the following is true: > * a) the app has requested them specifically by defining _WITH_GETLINE or > * _WITH_DPRINTF, respectively > * b) the app has requested a POSIX.1-2008 environment via _POSIX_C_SOURCE > * c) the app defines a GNUism such as _BSD_SOURCE or _GNU_SOURCE > */ >#ifndef _WITH_GETLINE >#if defined(_BSD_SOURCE) || defined(_GNU_SOURCE) >#define _WITH_GETLINE >#elif defined(_POSIX_C_SOURCE) ># 374 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 >#if _POSIX_C_SOURCE >= 200809 >#define _WITH_GETLINE >#endif ># 377 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 >#endif ># 378 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 >#endif ># 379 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 > >#ifdef _WITH_GETLINE >ssize_t getline(char ** __restrict, size_t * __restrict, FILE * __restrict); >#endif ># 383 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 > >#ifndef _WITH_DPRINTF >#if defined(_BSD_SOURCE) || defined(_GNU_SOURCE) >#define _WITH_DPRINTF >#elif defined(_POSIX_C_SOURCE) ># 388 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 >#if _POSIX_C_SOURCE >= 200809 >#define _WITH_DPRINTF >#endif ># 391 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 >#endif ># 392 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 >#endif ># 393 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 > >#ifdef _WITH_DPRINTF >int (dprintf)(int, const char * __restrict, ...) __printflike(2, 3); >#endif ># 397 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 > >#endif /* __POSIX_VISIBLE >= 200809 */ ># 399 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 > >/* > * Routines that are purely local. > */ >#if __BSD_VISIBLE >int asprintf(char **, const char *, ...) __printflike(2, 3); >char *ctermid_r(char *); >void fcloseall(void); >int fdclose(FILE *, int *); >char *fgetln(FILE *, size_t *); >const char *fmtcheck(const char *, const char *) __format_arg(2); >int fpurge(FILE *); >void setbuffer(FILE *, char *, int); >int setlinebuf(FILE *); >int vasprintf(char **, const char *, __va_list) > __printflike(2, 0); > >/* > * The system error table contains messages for the first sys_nerr > * positive errno values. Use strerror() or strerror_r() from <string.h> > * instead. > */ >extern const int sys_nerr; >extern const char * const sys_errlist[]; > >/* > * Stdio function-access interface. > */ >FILE *funopen(const void *, > int (*)(void *, char *, int), > int (*)(void *, const char *, int), > fpos_t (*)(void *, fpos_t, int), > int (*)(void *)); >#define fropen(cookie, fn) funopen(cookie, fn, 0, 0, 0) >#define fwopen(cookie, fn) funopen(cookie, 0, fn, 0, 0) > >typedef __ssize_t cookie_read_function_t(void *, char *, size_t); >typedef __ssize_t cookie_write_function_t(void *, const char *, size_t); >typedef int cookie_seek_function_t(void *, off64_t *, int); >typedef int cookie_close_function_t(void *); >typedef struct { > cookie_read_function_t *read; > cookie_write_function_t *write; > cookie_seek_function_t *seek; > cookie_close_function_t *close; >} cookie_io_functions_t; >FILE *fopencookie(void *, const char *, cookie_io_functions_t); > >/* > * Portability hacks. See <sys/types.h>. > */ >#ifndef _FTRUNCATE_DECLARED >#define _FTRUNCATE_DECLARED >int ftruncate(int, __off_t); >#endif ># 454 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 >#ifndef _LSEEK_DECLARED >#define _LSEEK_DECLARED >__off_t lseek(int, __off_t, int); >#endif ># 458 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 >#ifndef _MMAP_DECLARED >#define _MMAP_DECLARED >void *mmap(void *, size_t, int, int, int, __off_t); >#endif ># 462 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 >#ifndef _TRUNCATE_DECLARED >#define _TRUNCATE_DECLARED >int truncate(const char *, __off_t); >#endif ># 466 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 >#endif /* __BSD_VISIBLE */ ># 467 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 > >/* > * Functions internal to the implementation. > */ >int __srget(FILE *); >int __swbuf(int, FILE *); > >/* > * The __sfoo macros are here so that we can > * define function versions in the C library. > */ >#define __sgetc(p) (--(p)->_r < 0 ? __srget(p) : (int)(*(p)->_p++)) >#if defined(__GNUC__) && defined(__STDC__) >static __inline int __sputc(int _c, FILE *_p) { > if (--_p->_w >= 0 || (_p->_w >= _p->_lbfsize && (char)_c != '\n')) > return (*_p->_p++ = _c); > else > return (__swbuf(_c, _p)); >} >#else ># 487 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 >/* > * This has been tuned to generate reasonable code on the vax using pcc. > */ >#define __sputc(c, p) \ > (--(p)->_w < 0 ? \ > (p)->_w >= (p)->_lbfsize ? \ > (*(p)->_p = (c)), *(p)->_p != '\n' ? \ > (int)*(p)->_p++ : \ > __swbuf('\n', p) : \ > __swbuf((int)(c), p) : \ > (*(p)->_p = (c), (int)*(p)->_p++)) >#endif ># 499 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 > >extern int __isthreaded; > >#ifndef __cplusplus > >#define __sfeof(p) (((p)->_flags & __SEOF) != 0) >#define __sferror(p) (((p)->_flags & __SERR) != 0) >#define __sclearerr(p) ((void)((p)->_flags &= ~(__SERR|__SEOF))) >#define __sfileno(p) ((p)->_file) > > >#define feof(p) (!__isthreaded ? __sfeof(p) : (feof)(p)) >#define ferror(p) (!__isthreaded ? __sferror(p) : (ferror)(p)) >#define clearerr(p) (!__isthreaded ? __sclearerr(p) : (clearerr)(p)) > >#if __POSIX_VISIBLE >#define fileno(p) (!__isthreaded ? __sfileno(p) : (fileno)(p)) >#endif ># 517 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 > >#define getc(fp) (!__isthreaded ? __sgetc(fp) : (getc)(fp)) >#define putc(x, fp) (!__isthreaded ? __sputc(x, fp) : (putc)(x, fp)) > >#define getchar() getc(stdin) >#define putchar(x) putc(x, stdout) > >#if __BSD_VISIBLE >/* > * See ISO/IEC 9945-1 ANSI/IEEE Std 1003.1 Second Edition 1996-07-12 > * B.8.2.7 for the rationale behind the *_unlocked() macros. > */ >#define feof_unlocked(p) __sfeof(p) >#define ferror_unlocked(p) __sferror(p) >#define clearerr_unlocked(p) __sclearerr(p) >#define fileno_unlocked(p) __sfileno(p) >#endif ># 534 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 >#if __POSIX_VISIBLE >= 199506 >#define getc_unlocked(fp) __sgetc(fp) >#define putc_unlocked(x, fp) __sputc(x, fp) > >#define getchar_unlocked() getc_unlocked(stdin) >#define putchar_unlocked(x) putc_unlocked(x, stdout) >#endif ># 541 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 >#endif /* __cplusplus */ ># 542 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 > >__END_DECLS >#endif /* !_STDIO_H_ */ ># 545 "/usr/obj/usr/src/tmp/usr/include/stdio.h" 3 4 ># 86 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" 2 > >#if 0 /* expanded by -frewrite-includes */ >#include <errno.h> >#endif /* expanded by -frewrite-includes */ ># 87 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" ># 1 "/usr/obj/usr/src/tmp/usr/include/errno.h" 1 3 4 >/*- > * Copyright (c) 1982, 1986, 1989, 1993 > * The Regents of the University of California. All rights reserved. > * (c) UNIX System Laboratories, Inc. > * All or some portions of this file are derived from material licensed > * to the University of California by American Telephone and Telegraph > * Co. or Unix System Laboratories, Inc. and are reproduced herein with > * the permission of UNIX System Laboratories, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 4. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)errno.h 8.5 (Berkeley) 1/21/94 > * $FreeBSD: stable/11/sys/sys/errno.h 311708 2017-01-09 00:09:19Z jhb $ > */ > >#ifndef _SYS_ERRNO_H_ >#define _SYS_ERRNO_H_ > >#ifndef _KERNEL >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 42 "/usr/obj/usr/src/tmp/usr/include/errno.h" 3 4 ># 43 "/usr/obj/usr/src/tmp/usr/include/errno.h" 3 4 >__BEGIN_DECLS >int * __error(void); >__END_DECLS >#define errno (* __error()) >#endif ># 48 "/usr/obj/usr/src/tmp/usr/include/errno.h" 3 4 > >#define EPERM 1 /* Operation not permitted */ >#define ENOENT 2 /* No such file or directory */ >#define ESRCH 3 /* No such process */ >#define EINTR 4 /* Interrupted system call */ >#define EIO 5 /* Input/output error */ >#define ENXIO 6 /* Device not configured */ >#define E2BIG 7 /* Argument list too long */ >#define ENOEXEC 8 /* Exec format error */ >#define EBADF 9 /* Bad file descriptor */ >#define ECHILD 10 /* No child processes */ >#define EDEADLK 11 /* Resource deadlock avoided */ > /* 11 was EAGAIN */ >#define ENOMEM 12 /* Cannot allocate memory */ >#define EACCES 13 /* Permission denied */ >#define EFAULT 14 /* Bad address */ >#ifndef _POSIX_SOURCE >#define ENOTBLK 15 /* Block device required */ >#endif ># 67 "/usr/obj/usr/src/tmp/usr/include/errno.h" 3 4 >#define EBUSY 16 /* Device busy */ >#define EEXIST 17 /* File exists */ >#define EXDEV 18 /* Cross-device link */ >#define ENODEV 19 /* Operation not supported by device */ >#define ENOTDIR 20 /* Not a directory */ >#define EISDIR 21 /* Is a directory */ >#define EINVAL 22 /* Invalid argument */ >#define ENFILE 23 /* Too many open files in system */ >#define EMFILE 24 /* Too many open files */ >#define ENOTTY 25 /* Inappropriate ioctl for device */ >#ifndef _POSIX_SOURCE >#define ETXTBSY 26 /* Text file busy */ >#endif ># 80 "/usr/obj/usr/src/tmp/usr/include/errno.h" 3 4 >#define EFBIG 27 /* File too large */ >#define ENOSPC 28 /* No space left on device */ >#define ESPIPE 29 /* Illegal seek */ >#define EROFS 30 /* Read-only filesystem */ >#define EMLINK 31 /* Too many links */ >#define EPIPE 32 /* Broken pipe */ > >/* math software */ >#define EDOM 33 /* Numerical argument out of domain */ >#define ERANGE 34 /* Result too large */ > >/* non-blocking and interrupt i/o */ >#define EAGAIN 35 /* Resource temporarily unavailable */ >#ifndef _POSIX_SOURCE >#define EWOULDBLOCK EAGAIN /* Operation would block */ >#define EINPROGRESS 36 /* Operation now in progress */ >#define EALREADY 37 /* Operation already in progress */ > >/* ipc/network software -- argument errors */ >#define ENOTSOCK 38 /* Socket operation on non-socket */ >#define EDESTADDRREQ 39 /* Destination address required */ >#define EMSGSIZE 40 /* Message too long */ >#define EPROTOTYPE 41 /* Protocol wrong type for socket */ >#define ENOPROTOOPT 42 /* Protocol not available */ >#define EPROTONOSUPPORT 43 /* Protocol not supported */ >#define ESOCKTNOSUPPORT 44 /* Socket type not supported */ >#define EOPNOTSUPP 45 /* Operation not supported */ >#define ENOTSUP EOPNOTSUPP /* Operation not supported */ >#define EPFNOSUPPORT 46 /* Protocol family not supported */ >#define EAFNOSUPPORT 47 /* Address family not supported by protocol family */ >#define EADDRINUSE 48 /* Address already in use */ >#define EADDRNOTAVAIL 49 /* Can't assign requested address */ > >/* ipc/network software -- operational errors */ >#define ENETDOWN 50 /* Network is down */ >#define ENETUNREACH 51 /* Network is unreachable */ >#define ENETRESET 52 /* Network dropped connection on reset */ >#define ECONNABORTED 53 /* Software caused connection abort */ >#define ECONNRESET 54 /* Connection reset by peer */ >#define ENOBUFS 55 /* No buffer space available */ >#define EISCONN 56 /* Socket is already connected */ >#define ENOTCONN 57 /* Socket is not connected */ >#define ESHUTDOWN 58 /* Can't send after socket shutdown */ >#define ETOOMANYREFS 59 /* Too many references: can't splice */ >#define ETIMEDOUT 60 /* Operation timed out */ >#define ECONNREFUSED 61 /* Connection refused */ > >#define ELOOP 62 /* Too many levels of symbolic links */ >#endif /* _POSIX_SOURCE */ ># 129 "/usr/obj/usr/src/tmp/usr/include/errno.h" 3 4 >#define ENAMETOOLONG 63 /* File name too long */ > >/* should be rearranged */ >#ifndef _POSIX_SOURCE >#define EHOSTDOWN 64 /* Host is down */ >#define EHOSTUNREACH 65 /* No route to host */ >#endif /* _POSIX_SOURCE */ ># 136 "/usr/obj/usr/src/tmp/usr/include/errno.h" 3 4 >#define ENOTEMPTY 66 /* Directory not empty */ > >/* quotas & mush */ >#ifndef _POSIX_SOURCE >#define EPROCLIM 67 /* Too many processes */ >#define EUSERS 68 /* Too many users */ >#define EDQUOT 69 /* Disc quota exceeded */ > >/* Network File System */ >#define ESTALE 70 /* Stale NFS file handle */ >#define EREMOTE 71 /* Too many levels of remote in path */ >#define EBADRPC 72 /* RPC struct is bad */ >#define ERPCMISMATCH 73 /* RPC version wrong */ >#define EPROGUNAVAIL 74 /* RPC prog. not avail */ >#define EPROGMISMATCH 75 /* Program version wrong */ >#define EPROCUNAVAIL 76 /* Bad procedure for program */ >#endif /* _POSIX_SOURCE */ ># 153 "/usr/obj/usr/src/tmp/usr/include/errno.h" 3 4 > >#define ENOLCK 77 /* No locks available */ >#define ENOSYS 78 /* Function not implemented */ > >#ifndef _POSIX_SOURCE >#define EFTYPE 79 /* Inappropriate file type or format */ >#define EAUTH 80 /* Authentication error */ >#define ENEEDAUTH 81 /* Need authenticator */ >#define EIDRM 82 /* Identifier removed */ >#define ENOMSG 83 /* No message of desired type */ >#define EOVERFLOW 84 /* Value too large to be stored in data type */ >#define ECANCELED 85 /* Operation canceled */ >#define EILSEQ 86 /* Illegal byte sequence */ >#define ENOATTR 87 /* Attribute not found */ > >#define EDOOFUS 88 /* Programming error */ >#endif /* _POSIX_SOURCE */ ># 170 "/usr/obj/usr/src/tmp/usr/include/errno.h" 3 4 > >#define EBADMSG 89 /* Bad message */ >#define EMULTIHOP 90 /* Multihop attempted */ >#define ENOLINK 91 /* Link has been severed */ >#define EPROTO 92 /* Protocol error */ > >#ifndef _POSIX_SOURCE >#define ENOTCAPABLE 93 /* Capabilities insufficient */ >#define ECAPMODE 94 /* Not permitted in capability mode */ >#define ENOTRECOVERABLE 95 /* State not recoverable */ >#define EOWNERDEAD 96 /* Previous owner died */ >#endif /* _POSIX_SOURCE */ ># 182 "/usr/obj/usr/src/tmp/usr/include/errno.h" 3 4 > >#ifndef _POSIX_SOURCE >#define ELAST 96 /* Must be equal largest errno */ >#endif /* _POSIX_SOURCE */ ># 186 "/usr/obj/usr/src/tmp/usr/include/errno.h" 3 4 > >#if defined(_KERNEL) || defined(_WANT_KERNEL_ERRNO) >/* pseudo-errors returned inside kernel to modify return to process */ >#define ERESTART (-1) /* restart syscall */ >#define EJUSTRETURN (-2) /* don't modify regs, just return */ >#define ENOIOCTL (-3) /* ioctl not handled by this layer */ >#define EDIRIOCTL (-4) /* do direct ioctl in GEOM */ >#define ERELOOKUP (-5) /* retry the directory lookup */ >#endif ># 195 "/usr/obj/usr/src/tmp/usr/include/errno.h" 3 4 > >#endif ># 197 "/usr/obj/usr/src/tmp/usr/include/errno.h" 3 4 ># 88 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" 2 > >#if defined __hpux ># ifndef EILSEQ ># define EILSEQ 47 ># endif ># 93 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#endif ># 94 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#ifndef PATH_MAX ># if defined(_POSIX_PATH_MAX) ># define PATH_MAX _POSIX_PATH_MAX ># elif defined(MAXPATHLEN) ># 99 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" ># define PATH_MAX MAXPATHLEN ># else ># 101 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" ># define PATH_MAX 255 /* the Posix minimum path-size */ ># endif ># 103 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#endif ># 104 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#if DECL_ERRNO >extern int errno; >#endif ># 108 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >/* Some systems have a broken 'select()', but workable 'poll()'. Use that */ >#if HAVE_WORKING_POLL >#define USE_FUNC_POLL 1 >#if HAVE_POLL_H >#if 0 /* expanded by -frewrite-includes */ >#include <poll.h> >#endif /* expanded by -frewrite-includes */ ># 113 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" ># 1 "/usr/obj/usr/src/tmp/usr/include/poll.h" 1 3 4 >/*- > * Copyright (c) 1997 Peter Wemm <peter@freebsd.org> > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. The name of the author may not be used to endorse or promote products > * derived from this software without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: stable/11/sys/sys/poll.h 274462 2014-11-13 05:26:14Z dchagin $ > */ > >#ifndef _SYS_POLL_H_ >#define _SYS_POLL_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 34 "/usr/obj/usr/src/tmp/usr/include/poll.h" 3 4 ># 35 "/usr/obj/usr/src/tmp/usr/include/poll.h" 3 4 > >/* > * This file is intended to be compatible with the traditional poll.h. > */ > >typedef unsigned int nfds_t; > >/* > * This structure is passed as an array to poll(2). > */ >struct pollfd { > int fd; /* which file descriptor to poll */ > short events; /* events we are interested in */ > short revents; /* events found on return */ >}; > >/* > * Requestable events. If poll(2) finds any of these set, they are > * copied to revents on return. > * XXX Note that FreeBSD doesn't make much distinction between POLLPRI > * and POLLRDBAND since none of the file types have distinct priority > * bands - and only some have an urgent "mode". > * XXX Note POLLIN isn't really supported in true SVSV terms. Under SYSV > * POLLIN includes all of normal, band and urgent data. Most poll handlers > * on FreeBSD only treat it as "normal" data. > */ >#define POLLIN 0x0001 /* any readable data available */ >#define POLLPRI 0x0002 /* OOB/Urgent readable data */ >#define POLLOUT 0x0004 /* file descriptor is writeable */ >#define POLLRDNORM 0x0040 /* non-OOB/URG data available */ >#define POLLWRNORM POLLOUT /* no write type differentiation */ >#define POLLRDBAND 0x0080 /* OOB/Urgent readable data */ >#define POLLWRBAND 0x0100 /* OOB/Urgent data can be written */ > >#if __BSD_VISIBLE >/* General FreeBSD extension (currently only supported for sockets): */ >#define POLLINIGNEOF 0x2000 /* like POLLIN, except ignore EOF */ >#endif ># 73 "/usr/obj/usr/src/tmp/usr/include/poll.h" 3 4 > >/* > * These events are set if they occur regardless of whether they were > * requested. > */ >#define POLLERR 0x0008 /* some poll error occurred */ >#define POLLHUP 0x0010 /* file descriptor was "hung up" */ >#define POLLNVAL 0x0020 /* requested events "invalid" */ > >#if __BSD_VISIBLE > >#define POLLSTANDARD (POLLIN|POLLPRI|POLLOUT|POLLRDNORM|POLLRDBAND|\ > POLLWRBAND|POLLERR|POLLHUP|POLLNVAL) > >/* > * Request that poll() wait forever. > * XXX in SYSV, this is defined in stropts.h, which is not included > * by poll.h. > */ >#define INFTIM (-1) > >#endif ># 95 "/usr/obj/usr/src/tmp/usr/include/poll.h" 3 4 > >#ifndef _KERNEL > >#if __BSD_VISIBLE >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 99 "/usr/obj/usr/src/tmp/usr/include/poll.h" 3 4 ># 100 "/usr/obj/usr/src/tmp/usr/include/poll.h" 3 4 > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_sigset.h> >#endif /* expanded by -frewrite-includes */ ># 101 "/usr/obj/usr/src/tmp/usr/include/poll.h" 3 4 ># 102 "/usr/obj/usr/src/tmp/usr/include/poll.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/timespec.h> >#endif /* expanded by -frewrite-includes */ ># 102 "/usr/obj/usr/src/tmp/usr/include/poll.h" 3 4 ># 103 "/usr/obj/usr/src/tmp/usr/include/poll.h" 3 4 > >#ifndef _SIGSET_T_DECLARED >#define _SIGSET_T_DECLARED >typedef __sigset_t sigset_t; >#endif ># 108 "/usr/obj/usr/src/tmp/usr/include/poll.h" 3 4 > >#endif ># 110 "/usr/obj/usr/src/tmp/usr/include/poll.h" 3 4 > >__BEGIN_DECLS >int poll(struct pollfd _pfd[], nfds_t _nfds, int _timeout); >#if __BSD_VISIBLE >int ppoll(struct pollfd _pfd[], nfds_t _nfds, > const struct timespec *__restrict _timeout, > const sigset_t *__restrict _newsigmask); >#endif ># 118 "/usr/obj/usr/src/tmp/usr/include/poll.h" 3 4 >__END_DECLS > >#endif /* !_KERNEL */ ># 121 "/usr/obj/usr/src/tmp/usr/include/poll.h" 3 4 > >#endif /* !_SYS_POLL_H_ */ ># 123 "/usr/obj/usr/src/tmp/usr/include/poll.h" 3 4 ># 114 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" 2 >#else ># 115 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#if 0 /* expanded by -frewrite-includes */ >#include <sys/poll.h> >#endif /* expanded by -frewrite-includes */ ># 115 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" ># 116 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#endif ># 117 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#else ># 118 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#define USE_FUNC_POLL 0 >#endif ># 120 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#if HAVE_INTTYPES_H >#if 0 /* expanded by -frewrite-includes */ ># include <inttypes.h> >#endif /* expanded by -frewrite-includes */ ># 122 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" ># 1 "/usr/obj/usr/src/tmp/usr/include/inttypes.h" 1 3 4 >/*- > * Copyright (c) 2001 Mike Barcroft <mike@FreeBSD.org> > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: stable/11/include/inttypes.h 263998 2014-04-01 14:46:11Z tijl $ > */ > >#ifndef _INTTYPES_H_ >#define _INTTYPES_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <machine/_inttypes.h> >#endif /* expanded by -frewrite-includes */ ># 32 "/usr/obj/usr/src/tmp/usr/include/inttypes.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/machine/_inttypes.h" 1 3 4 >/*- > * This file is in the public domain. > */ >/* $FreeBSD: stable/11/sys/amd64/include/_inttypes.h 217157 2011-01-08 18:09:48Z tijl $ */ > >#if 0 /* expanded by -frewrite-includes */ >#include <x86/_inttypes.h> >#endif /* expanded by -frewrite-includes */ ># 6 "/usr/obj/usr/src/tmp/usr/include/machine/_inttypes.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/x86/_inttypes.h" 1 3 4 >/*- > * Copyright (c) 2001 The NetBSD Foundation, Inc. > * All rights reserved. > * > * This code is derived from software contributed to The NetBSD Foundation > * by Klaus Klein. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * > * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS > * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED > * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR > * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS > * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR > * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF > * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS > * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN > * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) > * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE > * POSSIBILITY OF SUCH DAMAGE. > * > * From: $NetBSD: int_fmtio.h,v 1.2 2001/04/26 16:25:21 kleink Exp $ > * $FreeBSD: stable/11/sys/x86/include/_inttypes.h 217157 2011-01-08 18:09:48Z tijl $ > */ > >#ifndef _MACHINE_INTTYPES_H_ >#define _MACHINE_INTTYPES_H_ > >/* > * Macros for format specifiers. > */ > >#ifdef __LP64__ >#define __PRI64 "l" >#define __PRIptr "l" >#else ># 44 "/usr/obj/usr/src/tmp/usr/include/x86/_inttypes.h" 3 4 >#define __PRI64 "ll" >#define __PRIptr >#endif ># 47 "/usr/obj/usr/src/tmp/usr/include/x86/_inttypes.h" 3 4 > >/* fprintf(3) macros for signed integers. */ > >#define PRId8 "d" /* int8_t */ >#define PRId16 "d" /* int16_t */ >#define PRId32 "d" /* int32_t */ >#define PRId64 __PRI64"d" /* int64_t */ >#define PRIdLEAST8 "d" /* int_least8_t */ >#define PRIdLEAST16 "d" /* int_least16_t */ >#define PRIdLEAST32 "d" /* int_least32_t */ >#define PRIdLEAST64 __PRI64"d" /* int_least64_t */ >#define PRIdFAST8 "d" /* int_fast8_t */ >#define PRIdFAST16 "d" /* int_fast16_t */ >#define PRIdFAST32 "d" /* int_fast32_t */ >#define PRIdFAST64 __PRI64"d" /* int_fast64_t */ >#define PRIdMAX "jd" /* intmax_t */ >#define PRIdPTR __PRIptr"d" /* intptr_t */ > >#define PRIi8 "i" /* int8_t */ >#define PRIi16 "i" /* int16_t */ >#define PRIi32 "i" /* int32_t */ >#define PRIi64 __PRI64"i" /* int64_t */ >#define PRIiLEAST8 "i" /* int_least8_t */ >#define PRIiLEAST16 "i" /* int_least16_t */ >#define PRIiLEAST32 "i" /* int_least32_t */ >#define PRIiLEAST64 __PRI64"i" /* int_least64_t */ >#define PRIiFAST8 "i" /* int_fast8_t */ >#define PRIiFAST16 "i" /* int_fast16_t */ >#define PRIiFAST32 "i" /* int_fast32_t */ >#define PRIiFAST64 __PRI64"i" /* int_fast64_t */ >#define PRIiMAX "ji" /* intmax_t */ >#define PRIiPTR __PRIptr"i" /* intptr_t */ > >/* fprintf(3) macros for unsigned integers. */ > >#define PRIo8 "o" /* uint8_t */ >#define PRIo16 "o" /* uint16_t */ >#define PRIo32 "o" /* uint32_t */ >#define PRIo64 __PRI64"o" /* uint64_t */ >#define PRIoLEAST8 "o" /* uint_least8_t */ >#define PRIoLEAST16 "o" /* uint_least16_t */ >#define PRIoLEAST32 "o" /* uint_least32_t */ >#define PRIoLEAST64 __PRI64"o" /* uint_least64_t */ >#define PRIoFAST8 "o" /* uint_fast8_t */ >#define PRIoFAST16 "o" /* uint_fast16_t */ >#define PRIoFAST32 "o" /* uint_fast32_t */ >#define PRIoFAST64 __PRI64"o" /* uint_fast64_t */ >#define PRIoMAX "jo" /* uintmax_t */ >#define PRIoPTR __PRIptr"o" /* uintptr_t */ > >#define PRIu8 "u" /* uint8_t */ >#define PRIu16 "u" /* uint16_t */ >#define PRIu32 "u" /* uint32_t */ >#define PRIu64 __PRI64"u" /* uint64_t */ >#define PRIuLEAST8 "u" /* uint_least8_t */ >#define PRIuLEAST16 "u" /* uint_least16_t */ >#define PRIuLEAST32 "u" /* uint_least32_t */ >#define PRIuLEAST64 __PRI64"u" /* uint_least64_t */ >#define PRIuFAST8 "u" /* uint_fast8_t */ >#define PRIuFAST16 "u" /* uint_fast16_t */ >#define PRIuFAST32 "u" /* uint_fast32_t */ >#define PRIuFAST64 __PRI64"u" /* uint_fast64_t */ >#define PRIuMAX "ju" /* uintmax_t */ >#define PRIuPTR __PRIptr"u" /* uintptr_t */ > >#define PRIx8 "x" /* uint8_t */ >#define PRIx16 "x" /* uint16_t */ >#define PRIx32 "x" /* uint32_t */ >#define PRIx64 __PRI64"x" /* uint64_t */ >#define PRIxLEAST8 "x" /* uint_least8_t */ >#define PRIxLEAST16 "x" /* uint_least16_t */ >#define PRIxLEAST32 "x" /* uint_least32_t */ >#define PRIxLEAST64 __PRI64"x" /* uint_least64_t */ >#define PRIxFAST8 "x" /* uint_fast8_t */ >#define PRIxFAST16 "x" /* uint_fast16_t */ >#define PRIxFAST32 "x" /* uint_fast32_t */ >#define PRIxFAST64 __PRI64"x" /* uint_fast64_t */ >#define PRIxMAX "jx" /* uintmax_t */ >#define PRIxPTR __PRIptr"x" /* uintptr_t */ > >#define PRIX8 "X" /* uint8_t */ >#define PRIX16 "X" /* uint16_t */ >#define PRIX32 "X" /* uint32_t */ >#define PRIX64 __PRI64"X" /* uint64_t */ >#define PRIXLEAST8 "X" /* uint_least8_t */ >#define PRIXLEAST16 "X" /* uint_least16_t */ >#define PRIXLEAST32 "X" /* uint_least32_t */ >#define PRIXLEAST64 __PRI64"X" /* uint_least64_t */ >#define PRIXFAST8 "X" /* uint_fast8_t */ >#define PRIXFAST16 "X" /* uint_fast16_t */ >#define PRIXFAST32 "X" /* uint_fast32_t */ >#define PRIXFAST64 __PRI64"X" /* uint_fast64_t */ >#define PRIXMAX "jX" /* uintmax_t */ >#define PRIXPTR __PRIptr"X" /* uintptr_t */ > >/* fscanf(3) macros for signed integers. */ > >#define SCNd8 "hhd" /* int8_t */ >#define SCNd16 "hd" /* int16_t */ >#define SCNd32 "d" /* int32_t */ >#define SCNd64 __PRI64"d" /* int64_t */ >#define SCNdLEAST8 "hhd" /* int_least8_t */ >#define SCNdLEAST16 "hd" /* int_least16_t */ >#define SCNdLEAST32 "d" /* int_least32_t */ >#define SCNdLEAST64 __PRI64"d" /* int_least64_t */ >#define SCNdFAST8 "d" /* int_fast8_t */ >#define SCNdFAST16 "d" /* int_fast16_t */ >#define SCNdFAST32 "d" /* int_fast32_t */ >#define SCNdFAST64 __PRI64"d" /* int_fast64_t */ >#define SCNdMAX "jd" /* intmax_t */ >#define SCNdPTR __PRIptr"d" /* intptr_t */ > >#define SCNi8 "hhi" /* int8_t */ >#define SCNi16 "hi" /* int16_t */ >#define SCNi32 "i" /* int32_t */ >#define SCNi64 __PRI64"i" /* int64_t */ >#define SCNiLEAST8 "hhi" /* int_least8_t */ >#define SCNiLEAST16 "hi" /* int_least16_t */ >#define SCNiLEAST32 "i" /* int_least32_t */ >#define SCNiLEAST64 __PRI64"i" /* int_least64_t */ >#define SCNiFAST8 "i" /* int_fast8_t */ >#define SCNiFAST16 "i" /* int_fast16_t */ >#define SCNiFAST32 "i" /* int_fast32_t */ >#define SCNiFAST64 __PRI64"i" /* int_fast64_t */ >#define SCNiMAX "ji" /* intmax_t */ >#define SCNiPTR __PRIptr"i" /* intptr_t */ > >/* fscanf(3) macros for unsigned integers. */ > >#define SCNo8 "hho" /* uint8_t */ >#define SCNo16 "ho" /* uint16_t */ >#define SCNo32 "o" /* uint32_t */ >#define SCNo64 __PRI64"o" /* uint64_t */ >#define SCNoLEAST8 "hho" /* uint_least8_t */ >#define SCNoLEAST16 "ho" /* uint_least16_t */ >#define SCNoLEAST32 "o" /* uint_least32_t */ >#define SCNoLEAST64 __PRI64"o" /* uint_least64_t */ >#define SCNoFAST8 "o" /* uint_fast8_t */ >#define SCNoFAST16 "o" /* uint_fast16_t */ >#define SCNoFAST32 "o" /* uint_fast32_t */ >#define SCNoFAST64 __PRI64"o" /* uint_fast64_t */ >#define SCNoMAX "jo" /* uintmax_t */ >#define SCNoPTR __PRIptr"o" /* uintptr_t */ > >#define SCNu8 "hhu" /* uint8_t */ >#define SCNu16 "hu" /* uint16_t */ >#define SCNu32 "u" /* uint32_t */ >#define SCNu64 __PRI64"u" /* uint64_t */ >#define SCNuLEAST8 "hhu" /* uint_least8_t */ >#define SCNuLEAST16 "hu" /* uint_least16_t */ >#define SCNuLEAST32 "u" /* uint_least32_t */ >#define SCNuLEAST64 __PRI64"u" /* uint_least64_t */ >#define SCNuFAST8 "u" /* uint_fast8_t */ >#define SCNuFAST16 "u" /* uint_fast16_t */ >#define SCNuFAST32 "u" /* uint_fast32_t */ >#define SCNuFAST64 __PRI64"u" /* uint_fast64_t */ >#define SCNuMAX "ju" /* uintmax_t */ >#define SCNuPTR __PRIptr"u" /* uintptr_t */ > >#define SCNx8 "hhx" /* uint8_t */ >#define SCNx16 "hx" /* uint16_t */ >#define SCNx32 "x" /* uint32_t */ >#define SCNx64 __PRI64"x" /* uint64_t */ >#define SCNxLEAST8 "hhx" /* uint_least8_t */ >#define SCNxLEAST16 "hx" /* uint_least16_t */ >#define SCNxLEAST32 "x" /* uint_least32_t */ >#define SCNxLEAST64 __PRI64"x" /* uint_least64_t */ >#define SCNxFAST8 "x" /* uint_fast8_t */ >#define SCNxFAST16 "x" /* uint_fast16_t */ >#define SCNxFAST32 "x" /* uint_fast32_t */ >#define SCNxFAST64 __PRI64"x" /* uint_fast64_t */ >#define SCNxMAX "jx" /* uintmax_t */ >#define SCNxPTR __PRIptr"x" /* uintptr_t */ > >#endif /* !_MACHINE_INTTYPES_H_ */ ># 222 "/usr/obj/usr/src/tmp/usr/include/x86/_inttypes.h" 3 4 ># 7 "/usr/obj/usr/src/tmp/usr/include/machine/_inttypes.h" 2 3 4 ># 33 "/usr/obj/usr/src/tmp/usr/include/inttypes.h" 2 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/stdint.h> >#endif /* expanded by -frewrite-includes */ ># 33 "/usr/obj/usr/src/tmp/usr/include/inttypes.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/sys/stdint.h" 1 3 4 >/*- > * Copyright (c) 2001 Mike Barcroft <mike@FreeBSD.org> > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: stable/11/sys/sys/stdint.h 290492 2015-11-07 12:30:43Z kib $ > */ > >#ifndef _SYS_STDINT_H_ >#define _SYS_STDINT_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 32 "/usr/obj/usr/src/tmp/usr/include/sys/stdint.h" 3 4 ># 33 "/usr/obj/usr/src/tmp/usr/include/sys/stdint.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 33 "/usr/obj/usr/src/tmp/usr/include/sys/stdint.h" 3 4 ># 34 "/usr/obj/usr/src/tmp/usr/include/sys/stdint.h" 3 4 > >#if 0 /* expanded by -frewrite-includes */ >#include <machine/_stdint.h> >#endif /* expanded by -frewrite-includes */ ># 35 "/usr/obj/usr/src/tmp/usr/include/sys/stdint.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/machine/_stdint.h" 1 3 4 >/*- > * This file is in the public domain. > */ >/* $FreeBSD: stable/11/sys/amd64/include/_stdint.h 232264 2012-02-28 18:38:33Z tijl $ */ > >#if 0 /* expanded by -frewrite-includes */ >#include <x86/_stdint.h> >#endif /* expanded by -frewrite-includes */ ># 6 "/usr/obj/usr/src/tmp/usr/include/machine/_stdint.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/x86/_stdint.h" 1 3 4 >/*- > * Copyright (c) 2001, 2002 Mike Barcroft <mike@FreeBSD.org> > * Copyright (c) 2001 The NetBSD Foundation, Inc. > * All rights reserved. > * > * This code is derived from software contributed to The NetBSD Foundation > * by Klaus Klein. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. All advertising materials mentioning features or use of this software > * must display the following acknowledgement: > * This product includes software developed by the NetBSD > * Foundation, Inc. and its contributors. > * 4. Neither the name of The NetBSD Foundation nor the names of its > * contributors may be used to endorse or promote products derived > * from this software without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS > * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED > * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR > * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS > * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR > * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF > * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS > * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN > * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) > * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE > * POSSIBILITY OF SUCH DAMAGE. > * > * $FreeBSD: stable/11/sys/x86/include/_stdint.h 301030 2016-05-31 08:38:24Z ed $ > */ > >#ifndef _MACHINE__STDINT_H_ >#define _MACHINE__STDINT_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <machine/_limits.h> >#endif /* expanded by -frewrite-includes */ ># 43 "/usr/obj/usr/src/tmp/usr/include/x86/_stdint.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/machine/_limits.h" 1 3 4 >/*- > * This file is in the public domain. > */ >/* $FreeBSD: stable/11/sys/amd64/include/_limits.h 232262 2012-02-28 18:24:28Z tijl $ */ > >#if 0 /* expanded by -frewrite-includes */ >#include <x86/_limits.h> >#endif /* expanded by -frewrite-includes */ ># 6 "/usr/obj/usr/src/tmp/usr/include/machine/_limits.h" 3 4 ># 7 "/usr/obj/usr/src/tmp/usr/include/machine/_limits.h" 3 4 ># 44 "/usr/obj/usr/src/tmp/usr/include/x86/_stdint.h" 2 3 4 > >#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) > >#define INT8_C(c) (c) >#define INT16_C(c) (c) >#define INT32_C(c) (c) > >#define UINT8_C(c) (c) >#define UINT16_C(c) (c) >#define UINT32_C(c) (c ## U) > >#ifdef __LP64__ >#define INT64_C(c) (c ## L) >#define UINT64_C(c) (c ## UL) >#else ># 59 "/usr/obj/usr/src/tmp/usr/include/x86/_stdint.h" 3 4 >#define INT64_C(c) (c ## LL) >#define UINT64_C(c) (c ## ULL) >#endif ># 62 "/usr/obj/usr/src/tmp/usr/include/x86/_stdint.h" 3 4 > >#define INTMAX_C(c) INT64_C(c) >#define UINTMAX_C(c) UINT64_C(c) > >#endif /* !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) */ ># 67 "/usr/obj/usr/src/tmp/usr/include/x86/_stdint.h" 3 4 > >#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) > >/* > * ISO/IEC 9899:1999 > * 7.18.2.1 Limits of exact-width integer types > */ >#define INT8_MIN (-0x7f-1) >#define INT16_MIN (-0x7fff-1) >#define INT32_MIN (-0x7fffffff-1) > >#define INT8_MAX 0x7f >#define INT16_MAX 0x7fff >#define INT32_MAX 0x7fffffff > >#define UINT8_MAX 0xff >#define UINT16_MAX 0xffff >#define UINT32_MAX 0xffffffffU > >#ifdef __LP64__ >#define INT64_MIN (-0x7fffffffffffffff-1) >#define INT64_MAX 0x7fffffffffffffff >#define UINT64_MAX 0xffffffffffffffff >#else ># 91 "/usr/obj/usr/src/tmp/usr/include/x86/_stdint.h" 3 4 >#define INT64_MIN (-0x7fffffffffffffffLL-1) >#define INT64_MAX 0x7fffffffffffffffLL >#define UINT64_MAX 0xffffffffffffffffULL >#endif ># 95 "/usr/obj/usr/src/tmp/usr/include/x86/_stdint.h" 3 4 > >/* > * ISO/IEC 9899:1999 > * 7.18.2.2 Limits of minimum-width integer types > */ >/* Minimum values of minimum-width signed integer types. */ >#define INT_LEAST8_MIN INT8_MIN >#define INT_LEAST16_MIN INT16_MIN >#define INT_LEAST32_MIN INT32_MIN >#define INT_LEAST64_MIN INT64_MIN > >/* Maximum values of minimum-width signed integer types. */ >#define INT_LEAST8_MAX INT8_MAX >#define INT_LEAST16_MAX INT16_MAX >#define INT_LEAST32_MAX INT32_MAX >#define INT_LEAST64_MAX INT64_MAX > >/* Maximum values of minimum-width unsigned integer types. */ >#define UINT_LEAST8_MAX UINT8_MAX >#define UINT_LEAST16_MAX UINT16_MAX >#define UINT_LEAST32_MAX UINT32_MAX >#define UINT_LEAST64_MAX UINT64_MAX > >/* > * ISO/IEC 9899:1999 > * 7.18.2.3 Limits of fastest minimum-width integer types > */ >/* Minimum values of fastest minimum-width signed integer types. */ >#define INT_FAST8_MIN INT32_MIN >#define INT_FAST16_MIN INT32_MIN >#define INT_FAST32_MIN INT32_MIN >#define INT_FAST64_MIN INT64_MIN > >/* Maximum values of fastest minimum-width signed integer types. */ >#define INT_FAST8_MAX INT32_MAX >#define INT_FAST16_MAX INT32_MAX >#define INT_FAST32_MAX INT32_MAX >#define INT_FAST64_MAX INT64_MAX > >/* Maximum values of fastest minimum-width unsigned integer types. */ >#define UINT_FAST8_MAX UINT32_MAX >#define UINT_FAST16_MAX UINT32_MAX >#define UINT_FAST32_MAX UINT32_MAX >#define UINT_FAST64_MAX UINT64_MAX > >/* > * ISO/IEC 9899:1999 > * 7.18.2.4 Limits of integer types capable of holding object pointers > */ >#ifdef __LP64__ >#define INTPTR_MIN INT64_MIN >#define INTPTR_MAX INT64_MAX >#define UINTPTR_MAX UINT64_MAX >#else ># 149 "/usr/obj/usr/src/tmp/usr/include/x86/_stdint.h" 3 4 >#define INTPTR_MIN INT32_MIN >#define INTPTR_MAX INT32_MAX >#define UINTPTR_MAX UINT32_MAX >#endif ># 153 "/usr/obj/usr/src/tmp/usr/include/x86/_stdint.h" 3 4 > >/* > * ISO/IEC 9899:1999 > * 7.18.2.5 Limits of greatest-width integer types > */ >#define INTMAX_MIN INT64_MIN >#define INTMAX_MAX INT64_MAX >#define UINTMAX_MAX UINT64_MAX > >/* > * ISO/IEC 9899:1999 > * 7.18.3 Limits of other integer types > */ >#ifdef __LP64__ >/* Limits of ptrdiff_t. */ >#define PTRDIFF_MIN INT64_MIN >#define PTRDIFF_MAX INT64_MAX > >/* Limits of sig_atomic_t. */ >#define SIG_ATOMIC_MIN __LONG_MIN >#define SIG_ATOMIC_MAX __LONG_MAX > >/* Limit of size_t. */ >#define SIZE_MAX UINT64_MAX >#else ># 178 "/usr/obj/usr/src/tmp/usr/include/x86/_stdint.h" 3 4 >#define PTRDIFF_MIN INT32_MIN >#define PTRDIFF_MAX INT32_MAX >#define SIG_ATOMIC_MIN INT32_MIN >#define SIG_ATOMIC_MAX INT32_MAX >#define SIZE_MAX UINT32_MAX >#endif ># 184 "/usr/obj/usr/src/tmp/usr/include/x86/_stdint.h" 3 4 > >/* Limits of wint_t. */ >#define WINT_MIN INT32_MIN >#define WINT_MAX INT32_MAX > >#endif /* !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) */ ># 190 "/usr/obj/usr/src/tmp/usr/include/x86/_stdint.h" 3 4 > >#endif /* !_MACHINE__STDINT_H_ */ ># 192 "/usr/obj/usr/src/tmp/usr/include/x86/_stdint.h" 3 4 ># 7 "/usr/obj/usr/src/tmp/usr/include/machine/_stdint.h" 2 3 4 ># 36 "/usr/obj/usr/src/tmp/usr/include/sys/stdint.h" 2 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_stdint.h> >#endif /* expanded by -frewrite-includes */ ># 36 "/usr/obj/usr/src/tmp/usr/include/sys/stdint.h" 3 4 ># 37 "/usr/obj/usr/src/tmp/usr/include/sys/stdint.h" 3 4 > >typedef __int_least8_t int_least8_t; >typedef __int_least16_t int_least16_t; >typedef __int_least32_t int_least32_t; >typedef __int_least64_t int_least64_t; > >typedef __uint_least8_t uint_least8_t; >typedef __uint_least16_t uint_least16_t; >typedef __uint_least32_t uint_least32_t; >typedef __uint_least64_t uint_least64_t; > >typedef __int_fast8_t int_fast8_t; >typedef __int_fast16_t int_fast16_t; >typedef __int_fast32_t int_fast32_t; >typedef __int_fast64_t int_fast64_t; > >typedef __uint_fast8_t uint_fast8_t; >typedef __uint_fast16_t uint_fast16_t; >typedef __uint_fast32_t uint_fast32_t; >typedef __uint_fast64_t uint_fast64_t; > >/* GNU and Darwin define this and people seem to think it's portable */ >#if defined(UINTPTR_MAX) && defined(UINT64_MAX) && (UINTPTR_MAX == UINT64_MAX) >#define __WORDSIZE 64 >#else ># 62 "/usr/obj/usr/src/tmp/usr/include/sys/stdint.h" 3 4 >#define __WORDSIZE 32 >#endif ># 64 "/usr/obj/usr/src/tmp/usr/include/sys/stdint.h" 3 4 > >/* Limits of wchar_t. */ >#define WCHAR_MIN __WCHAR_MIN >#define WCHAR_MAX __WCHAR_MAX > >#endif /* !_SYS_STDINT_H_ */ ># 70 "/usr/obj/usr/src/tmp/usr/include/sys/stdint.h" 3 4 ># 34 "/usr/obj/usr/src/tmp/usr/include/inttypes.h" 2 3 4 > >#ifndef __cplusplus >#ifndef _WCHAR_T_DECLARED >typedef ___wchar_t wchar_t; >#define _WCHAR_T_DECLARED >#endif ># 40 "/usr/obj/usr/src/tmp/usr/include/inttypes.h" 3 4 >#endif ># 41 "/usr/obj/usr/src/tmp/usr/include/inttypes.h" 3 4 > >typedef struct { > intmax_t quot; /* Quotient. */ > intmax_t rem; /* Remainder. */ >} imaxdiv_t; > >__BEGIN_DECLS >#ifdef _XLOCALE_H_ >#if 0 /* expanded by -frewrite-includes */ >#include <xlocale/_inttypes.h> >#endif /* expanded by -frewrite-includes */ ># 49 "/usr/obj/usr/src/tmp/usr/include/inttypes.h" 3 4 ># 50 "/usr/obj/usr/src/tmp/usr/include/inttypes.h" 3 4 >#endif ># 51 "/usr/obj/usr/src/tmp/usr/include/inttypes.h" 3 4 >intmax_t imaxabs(intmax_t) __pure2; >imaxdiv_t imaxdiv(intmax_t, intmax_t) __pure2; > >intmax_t strtoimax(const char * __restrict, char ** __restrict, int); >uintmax_t strtoumax(const char * __restrict, char ** __restrict, int); >intmax_t wcstoimax(const wchar_t * __restrict, > wchar_t ** __restrict, int); >uintmax_t wcstoumax(const wchar_t * __restrict, > wchar_t ** __restrict, int); >__END_DECLS > >#endif /* !_INTTYPES_H_ */ ># 63 "/usr/obj/usr/src/tmp/usr/include/inttypes.h" 3 4 ># 123 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" 2 >#else ># 124 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" ># if HAVE_STDINT_H >#if 0 /* expanded by -frewrite-includes */ ># include <stdint.h> >#endif /* expanded by -frewrite-includes */ ># 125 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" ># 126 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" ># endif ># 127 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#endif ># 128 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >/* include signal.h before curses.h to work-around defect in glibc 2.1.3 */ >#if 0 /* expanded by -frewrite-includes */ >#include <signal.h> >#endif /* expanded by -frewrite-includes */ ># 130 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" ># 1 "/usr/obj/usr/src/tmp/usr/include/signal.h" 1 3 4 >/*- > * Copyright (c) 1991, 1993 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)signal.h 8.3 (Berkeley) 3/30/94 > * $FreeBSD: stable/11/include/signal.h 311234 2017-01-04 02:51:39Z pfg $ > */ > >#ifndef _SIGNAL_H_ >#define _SIGNAL_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 36 "/usr/obj/usr/src/tmp/usr/include/signal.h" 3 4 ># 37 "/usr/obj/usr/src/tmp/usr/include/signal.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 37 "/usr/obj/usr/src/tmp/usr/include/signal.h" 3 4 ># 38 "/usr/obj/usr/src/tmp/usr/include/signal.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/signal.h> >#endif /* expanded by -frewrite-includes */ ># 38 "/usr/obj/usr/src/tmp/usr/include/signal.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 1 3 4 >/*- > * Copyright (c) 1982, 1986, 1989, 1991, 1993 > * The Regents of the University of California. All rights reserved. > * (c) UNIX System Laboratories, Inc. > * All or some portions of this file are derived from material licensed > * to the University of California by American Telephone and Telegraph > * Co. or Unix System Laboratories, Inc. and are reproduced herein with > * the permission of UNIX System Laboratories, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 4. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)signal.h 8.4 (Berkeley) 5/4/95 > * $FreeBSD: stable/11/sys/sys/signal.h 306398 2016-09-28 09:28:26Z kib $ > */ > >#ifndef _SYS_SIGNAL_H_ >#define _SYS_SIGNAL_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 41 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 ># 42 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 42 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 ># 43 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_sigset.h> >#endif /* expanded by -frewrite-includes */ ># 43 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 ># 44 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 > >#if 0 /* expanded by -frewrite-includes */ >#include <machine/_limits.h> /* __MINSIGSTKSZ */ >#endif /* expanded by -frewrite-includes */ ># 45 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/machine/_limits.h" 1 3 4 >/*- > * This file is in the public domain. > */ >/* $FreeBSD: stable/11/sys/amd64/include/_limits.h 232262 2012-02-28 18:24:28Z tijl $ */ > >#if 0 /* expanded by -frewrite-includes */ >#include <x86/_limits.h> >#endif /* expanded by -frewrite-includes */ ># 6 "/usr/obj/usr/src/tmp/usr/include/machine/_limits.h" 3 4 ># 7 "/usr/obj/usr/src/tmp/usr/include/machine/_limits.h" 3 4 ># 46 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 2 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <machine/signal.h> /* sig_atomic_t; trap codes; sigcontext */ >#endif /* expanded by -frewrite-includes */ ># 46 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/machine/signal.h" 1 3 4 >/*- > * This file is in the public domain. > */ >/* $FreeBSD: stable/11/sys/amd64/include/signal.h 247047 2013-02-20 17:39:52Z kib $ */ > >#if 0 /* expanded by -frewrite-includes */ >#include <x86/signal.h> >#endif /* expanded by -frewrite-includes */ ># 6 "/usr/obj/usr/src/tmp/usr/include/machine/signal.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/x86/signal.h" 1 3 4 >/*- > * Copyright (c) 1986, 1989, 1991, 1993 > * The Regents of the University of California. All rights reserved. > * Copyright (c) 2003 Peter Wemm. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 4. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)signal.h 8.1 (Berkeley) 6/11/93 > * $FreeBSD: stable/11/sys/x86/include/signal.h 247047 2013-02-20 17:39:52Z kib $ > */ > >#ifndef _X86_SIGNAL_H >#define _X86_SIGNAL_H 1 > >/* > * Machine-dependent signal definitions > */ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 41 "/usr/obj/usr/src/tmp/usr/include/x86/signal.h" 3 4 ># 42 "/usr/obj/usr/src/tmp/usr/include/x86/signal.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_sigset.h> >#endif /* expanded by -frewrite-includes */ ># 42 "/usr/obj/usr/src/tmp/usr/include/x86/signal.h" 3 4 ># 43 "/usr/obj/usr/src/tmp/usr/include/x86/signal.h" 3 4 > >#if __BSD_VISIBLE >#if 0 /* expanded by -frewrite-includes */ >#include <machine/trap.h> /* codes for SIGILL, SIGFPE */ >#endif /* expanded by -frewrite-includes */ ># 45 "/usr/obj/usr/src/tmp/usr/include/x86/signal.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/machine/trap.h" 1 3 4 >/*- > * This file is in the public domain. > */ >/* $FreeBSD: stable/11/sys/amd64/include/trap.h 232492 2012-03-04 14:12:57Z tijl $ */ > >#if 0 /* expanded by -frewrite-includes */ >#include <x86/trap.h> >#endif /* expanded by -frewrite-includes */ ># 6 "/usr/obj/usr/src/tmp/usr/include/machine/trap.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/x86/trap.h" 1 3 4 >/*- > * Copyright (c) 1990 The Regents of the University of California. > * All rights reserved. > * > * This code is derived from software contributed to Berkeley by > * William Jolitz. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 4. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * from: @(#)trap.h 5.4 (Berkeley) 5/9/91 > * $FreeBSD: stable/11/sys/x86/include/trap.h 257417 2013-10-31 02:35:00Z markj $ > */ > >#ifndef _MACHINE_TRAP_H_ >#define _MACHINE_TRAP_H_ > >/* > * Trap type values > * also known in trap.c for name strings > */ > >#define T_PRIVINFLT 1 /* privileged instruction */ >#define T_BPTFLT 3 /* breakpoint instruction */ >#define T_ARITHTRAP 6 /* arithmetic trap */ >#define T_PROTFLT 9 /* protection fault */ >#define T_TRCTRAP 10 /* debug exception (sic) */ >#define T_PAGEFLT 12 /* page fault */ >#define T_ALIGNFLT 14 /* alignment fault */ > >#define T_DIVIDE 18 /* integer divide fault */ >#define T_NMI 19 /* non-maskable trap */ >#define T_OFLOW 20 /* overflow trap */ >#define T_BOUND 21 /* bound instruction fault */ >#define T_DNA 22 /* device not available fault */ >#define T_DOUBLEFLT 23 /* double fault */ >#define T_FPOPFLT 24 /* fp coprocessor operand fetch fault */ >#define T_TSSFLT 25 /* invalid tss fault */ >#define T_SEGNPFLT 26 /* segment not present fault */ >#define T_STKFLT 27 /* stack fault */ >#define T_MCHK 28 /* machine check trap */ >#define T_XMMFLT 29 /* SIMD floating-point exception */ >#define T_RESERVED 30 /* reserved (unknown) */ >#define T_DTRACE_RET 32 /* DTrace pid return */ > >/* XXX most of the following codes aren't used, but could be. */ > >/* definitions for <sys/signal.h> */ >#define ILL_RESAD_FAULT T_RESADFLT >#define ILL_PRIVIN_FAULT T_PRIVINFLT >#define ILL_RESOP_FAULT T_RESOPFLT >#define ILL_ALIGN_FAULT T_ALIGNFLT >#define ILL_FPOP_FAULT T_FPOPFLT /* coprocessor operand fault */ > >/* old FreeBSD macros, deprecated */ >#define FPE_INTOVF_TRAP 0x1 /* integer overflow */ >#define FPE_INTDIV_TRAP 0x2 /* integer divide by zero */ >#define FPE_FLTDIV_TRAP 0x3 /* floating/decimal divide by zero */ >#define FPE_FLTOVF_TRAP 0x4 /* floating overflow */ >#define FPE_FLTUND_TRAP 0x5 /* floating underflow */ >#define FPE_FPU_NP_TRAP 0x6 /* floating point unit not present */ >#define FPE_SUBRNG_TRAP 0x7 /* subrange out of bounds */ > >/* codes for SIGBUS */ >#define BUS_PAGE_FAULT T_PAGEFLT /* page fault protection base */ >#define BUS_SEGNP_FAULT T_SEGNPFLT /* segment not present */ >#define BUS_STK_FAULT T_STKFLT /* stack segment */ >#define BUS_SEGM_FAULT T_RESERVED /* segment protection base */ > >/* Trap's coming from user mode */ >#define T_USER 0x100 > >#endif /* !_MACHINE_TRAP_H_ */ ># 95 "/usr/obj/usr/src/tmp/usr/include/x86/trap.h" 3 4 ># 7 "/usr/obj/usr/src/tmp/usr/include/machine/trap.h" 2 3 4 ># 46 "/usr/obj/usr/src/tmp/usr/include/x86/signal.h" 2 3 4 >#endif ># 47 "/usr/obj/usr/src/tmp/usr/include/x86/signal.h" 3 4 > >#ifdef __i386__ >typedef int sig_atomic_t; > >#if __BSD_VISIBLE >struct sigcontext { > struct __sigset sc_mask; /* signal mask to restore */ > int sc_onstack; /* sigstack state to restore */ > int sc_gs; /* machine state (struct trapframe) */ > int sc_fs; > int sc_es; > int sc_ds; > int sc_edi; > int sc_esi; > int sc_ebp; > int sc_isp; > int sc_ebx; > int sc_edx; > int sc_ecx; > int sc_eax; > int sc_trapno; > int sc_err; > int sc_eip; > int sc_cs; > int sc_efl; > int sc_esp; > int sc_ss; > int sc_len; /* sizeof(mcontext_t) */ > /* > * See <machine/ucontext.h> and <machine/npx.h> for > * the following fields. > */ > int sc_fpformat; > int sc_ownedfp; > int sc_flags; > int sc_fpstate[128] __aligned(16); > > int sc_fsbase; > int sc_gsbase; > > int sc_xfpustate; > int sc_xfpustate_len; > > int sc_spare2[4]; >}; > >#define sc_sp sc_esp >#define sc_fp sc_ebp >#define sc_pc sc_eip >#define sc_ps sc_efl >#define sc_eflags sc_efl > >#endif /* __BSD_VISIBLE */ ># 100 "/usr/obj/usr/src/tmp/usr/include/x86/signal.h" 3 4 >#endif /* __i386__ */ ># 101 "/usr/obj/usr/src/tmp/usr/include/x86/signal.h" 3 4 > >#ifdef __amd64__ >typedef long sig_atomic_t; > >#if __BSD_VISIBLE >/* > * Information pushed on stack when a signal is delivered. > * This is used by the kernel to restore state following > * execution of the signal handler. It is also made available > * to the handler to allow it to restore state properly if > * a non-standard exit is performed. > * > * The sequence of the fields/registers after sc_mask in struct > * sigcontext must match those in mcontext_t and struct trapframe. > */ >struct sigcontext { > struct __sigset sc_mask; /* signal mask to restore */ > long sc_onstack; /* sigstack state to restore */ > long sc_rdi; /* machine state (struct trapframe) */ > long sc_rsi; > long sc_rdx; > long sc_rcx; > long sc_r8; > long sc_r9; > long sc_rax; > long sc_rbx; > long sc_rbp; > long sc_r10; > long sc_r11; > long sc_r12; > long sc_r13; > long sc_r14; > long sc_r15; > int sc_trapno; > short sc_fs; > short sc_gs; > long sc_addr; > int sc_flags; > short sc_es; > short sc_ds; > long sc_err; > long sc_rip; > long sc_cs; > long sc_rflags; > long sc_rsp; > long sc_ss; > long sc_len; /* sizeof(mcontext_t) */ > /* > * See <machine/ucontext.h> and <machine/fpu.h> for the following > * fields. > */ > long sc_fpformat; > long sc_ownedfp; > long sc_fpstate[64] __aligned(16); > > long sc_fsbase; > long sc_gsbase; > > long sc_xfpustate; > long sc_xfpustate_len; > > long sc_spare[4]; >}; >#endif /* __BSD_VISIBLE */ ># 165 "/usr/obj/usr/src/tmp/usr/include/x86/signal.h" 3 4 >#endif /* __amd64__ */ ># 166 "/usr/obj/usr/src/tmp/usr/include/x86/signal.h" 3 4 > >#endif ># 168 "/usr/obj/usr/src/tmp/usr/include/x86/signal.h" 3 4 ># 7 "/usr/obj/usr/src/tmp/usr/include/machine/signal.h" 2 3 4 ># 47 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 2 3 4 > >#if __POSIX_VISIBLE >= 200809 > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_pthreadtypes.h> >#endif /* expanded by -frewrite-includes */ ># 50 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 ># 51 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_timespec.h> >#endif /* expanded by -frewrite-includes */ ># 51 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 ># 52 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 > >#ifndef _SIZE_T_DECLARED >typedef __size_t size_t; >#define _SIZE_T_DECLARED >#endif ># 57 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 > >#ifndef _UID_T_DECLARED >typedef __uid_t uid_t; >#define _UID_T_DECLARED >#endif ># 62 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 > >#endif /* __POSIX_VISIBLE >= 200809 */ ># 64 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 > >/* > * System defined signals. > */ >#if __POSIX_VISIBLE || __XSI_VISIBLE >#define SIGHUP 1 /* hangup */ >#endif ># 71 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 >#define SIGINT 2 /* interrupt */ >#if __POSIX_VISIBLE || __XSI_VISIBLE >#define SIGQUIT 3 /* quit */ >#endif ># 75 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 >#define SIGILL 4 /* illegal instr. (not reset when caught) */ >#if __XSI_VISIBLE >#define SIGTRAP 5 /* trace trap (not reset when caught) */ >#endif ># 79 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 >#define SIGABRT 6 /* abort() */ >#if __BSD_VISIBLE >#define SIGIOT SIGABRT /* compatibility */ >#define SIGEMT 7 /* EMT instruction */ >#endif ># 84 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 >#define SIGFPE 8 /* floating point exception */ >#if __POSIX_VISIBLE || __XSI_VISIBLE >#define SIGKILL 9 /* kill (cannot be caught or ignored) */ >#endif ># 88 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 >#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >#define SIGBUS 10 /* bus error */ >#endif ># 91 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 >#define SIGSEGV 11 /* segmentation violation */ >#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >#define SIGSYS 12 /* non-existent system call invoked */ >#endif ># 95 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 >#if __POSIX_VISIBLE || __XSI_VISIBLE >#define SIGPIPE 13 /* write on a pipe with no one to read it */ >#define SIGALRM 14 /* alarm clock */ >#endif ># 99 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 >#define SIGTERM 15 /* software termination signal from kill */ >#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >#define SIGURG 16 /* urgent condition on IO channel */ >#endif ># 103 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 >#if __POSIX_VISIBLE || __XSI_VISIBLE >#define SIGSTOP 17 /* sendable stop signal not from tty */ >#define SIGTSTP 18 /* stop signal from tty */ >#define SIGCONT 19 /* continue a stopped process */ >#define SIGCHLD 20 /* to parent on child stop or exit */ >#define SIGTTIN 21 /* to readers pgrp upon background tty read */ >#define SIGTTOU 22 /* like TTIN if (tp->t_local<OSTOP) */ >#endif ># 111 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 >#if __BSD_VISIBLE >#define SIGIO 23 /* input/output possible signal */ >#endif ># 114 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 >#if __XSI_VISIBLE >#define SIGXCPU 24 /* exceeded CPU time limit */ >#define SIGXFSZ 25 /* exceeded file size limit */ >#define SIGVTALRM 26 /* virtual time alarm */ >#define SIGPROF 27 /* profiling time alarm */ >#endif ># 120 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 >#if __BSD_VISIBLE >#define SIGWINCH 28 /* window size changes */ >#define SIGINFO 29 /* information request */ >#endif ># 124 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 >#if __POSIX_VISIBLE || __XSI_VISIBLE >#define SIGUSR1 30 /* user defined signal 1 */ >#define SIGUSR2 31 /* user defined signal 2 */ >#endif ># 128 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 >#if __BSD_VISIBLE >#define SIGTHR 32 /* reserved by thread library. */ >#define SIGLWP SIGTHR >#define SIGLIBRT 33 /* reserved by real-time library. */ >#endif ># 133 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 > >#define SIGRTMIN 65 >#define SIGRTMAX 126 > >#define SIG_DFL ((__sighandler_t *)0) >#define SIG_IGN ((__sighandler_t *)1) >#define SIG_ERR ((__sighandler_t *)-1) >/* #define SIG_CATCH ((__sighandler_t *)2) See signalvar.h */ >#define SIG_HOLD ((__sighandler_t *)3) > >/* > * Type of a signal handling function. > * > * Language spec sez signal handlers take exactly one arg, even though we > * actually supply three. Ugh! > * > * We don't try to hide the difference by leaving out the args because > * that would cause warnings about conformant programs. Nonconformant > * programs can avoid the warnings by casting to (__sighandler_t *) or > * sig_t before calling signal() or assigning to sa_handler or sv_handler. > * > * The kernel should reverse the cast before calling the function. It > * has no way to do this, but on most machines 1-arg and 3-arg functions > * have the same calling protocol so there is no problem in practice. > * A bit in sa_flags could be used to specify the number of args. > */ >typedef void __sighandler_t(int); > >#if __POSIX_VISIBLE || __XSI_VISIBLE >#ifndef _SIGSET_T_DECLARED >#define _SIGSET_T_DECLARED >typedef __sigset_t sigset_t; >#endif ># 166 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 >#endif ># 167 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 > >#if __POSIX_VISIBLE >= 199309 || __XSI_VISIBLE >= 500 >union sigval { > /* Members as suggested by Annex C of POSIX 1003.1b. */ > int sival_int; > void *sival_ptr; > /* 6.0 compatibility */ > int sigval_int; > void *sigval_ptr; >}; >#endif ># 178 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 > >#if __POSIX_VISIBLE >= 199309 > >struct pthread_attr; > >struct sigevent { > int sigev_notify; /* Notification type */ > int sigev_signo; /* Signal number */ > union sigval sigev_value; /* Signal value */ > union { > __lwpid_t _threadid; > struct { > void (*_function)(union sigval); > struct pthread_attr **_attribute; > } _sigev_thread; > unsigned short _kevent_flags; > long __spare__[8]; > } _sigev_un; >}; > >#if __BSD_VISIBLE >#define sigev_notify_kqueue sigev_signo >#define sigev_notify_kevent_flags _sigev_un._kevent_flags >#define sigev_notify_thread_id _sigev_un._threadid >#endif ># 203 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 >#define sigev_notify_function _sigev_un._sigev_thread._function >#define sigev_notify_attributes _sigev_un._sigev_thread._attribute > >#define SIGEV_NONE 0 /* No async notification. */ >#define SIGEV_SIGNAL 1 /* Generate a queued signal. */ >#define SIGEV_THREAD 2 /* Call back from another pthread. */ >#if __BSD_VISIBLE >#define SIGEV_KEVENT 3 /* Generate a kevent. */ >#define SIGEV_THREAD_ID 4 /* Send signal to a kernel thread. */ >#endif ># 213 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 > >#endif /* __POSIX_VISIBLE >= 199309 */ ># 215 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 > >#if __POSIX_VISIBLE >= 199309 || __XSI_VISIBLE >typedef struct __siginfo { > int si_signo; /* signal number */ > int si_errno; /* errno association */ > /* > * Cause of signal, one of the SI_ macros or signal-specific > * values, i.e. one of the FPE_... values for SIGFPE. This > * value is equivalent to the second argument to an old-style > * FreeBSD signal handler. > */ > int si_code; /* signal code */ > __pid_t si_pid; /* sending process */ > __uid_t si_uid; /* sender's ruid */ > int si_status; /* exit value */ > void *si_addr; /* faulting instruction */ > union sigval si_value; /* signal value */ > union { > struct { > int _trapno;/* machine specific trap code */ > } _fault; > struct { > int _timerid; > int _overrun; > } _timer; > struct { > int _mqd; > } _mesgq; > struct { > long _band; /* band event for SIGPOLL */ > } _poll; /* was this ever used ? */ > struct { > long __spare1__; > int __spare2__[7]; > } __spare__; > } _reason; >} siginfo_t; > >#define si_trapno _reason._fault._trapno >#define si_timerid _reason._timer._timerid >#define si_overrun _reason._timer._overrun >#define si_mqd _reason._mesgq._mqd >#define si_band _reason._poll._band > >/** si_code **/ >/* codes for SIGILL */ >#define ILL_ILLOPC 1 /* Illegal opcode. */ >#define ILL_ILLOPN 2 /* Illegal operand. */ >#define ILL_ILLADR 3 /* Illegal addressing mode. */ >#define ILL_ILLTRP 4 /* Illegal trap. */ >#define ILL_PRVOPC 5 /* Privileged opcode. */ >#define ILL_PRVREG 6 /* Privileged register. */ >#define ILL_COPROC 7 /* Coprocessor error. */ >#define ILL_BADSTK 8 /* Internal stack error. */ > >/* codes for SIGBUS */ >#define BUS_ADRALN 1 /* Invalid address alignment. */ >#define BUS_ADRERR 2 /* Nonexistent physical address. */ >#define BUS_OBJERR 3 /* Object-specific hardware error. */ > >/* codes for SIGSEGV */ >#define SEGV_MAPERR 1 /* Address not mapped to object. */ >#define SEGV_ACCERR 2 /* Invalid permissions for mapped */ > /* object. */ > >/* codes for SIGFPE */ >#define FPE_INTOVF 1 /* Integer overflow. */ >#define FPE_INTDIV 2 /* Integer divide by zero. */ >#define FPE_FLTDIV 3 /* Floating point divide by zero. */ >#define FPE_FLTOVF 4 /* Floating point overflow. */ >#define FPE_FLTUND 5 /* Floating point underflow. */ >#define FPE_FLTRES 6 /* Floating point inexact result. */ >#define FPE_FLTINV 7 /* Invalid floating point operation. */ >#define FPE_FLTSUB 8 /* Subscript out of range. */ > >/* codes for SIGTRAP */ >#define TRAP_BRKPT 1 /* Process breakpoint. */ >#define TRAP_TRACE 2 /* Process trace trap. */ >#define TRAP_DTRACE 3 /* DTrace induced trap. */ >#define TRAP_CAP 4 /* Capabilities protective trap. */ > >/* codes for SIGCHLD */ >#define CLD_EXITED 1 /* Child has exited */ >#define CLD_KILLED 2 /* Child has terminated abnormally but */ > /* did not create a core file */ >#define CLD_DUMPED 3 /* Child has terminated abnormally and */ > /* created a core file */ >#define CLD_TRAPPED 4 /* Traced child has trapped */ >#define CLD_STOPPED 5 /* Child has stopped */ >#define CLD_CONTINUED 6 /* Stopped child has continued */ > >/* codes for SIGPOLL */ >#define POLL_IN 1 /* Data input available */ >#define POLL_OUT 2 /* Output buffers available */ >#define POLL_MSG 3 /* Input message available */ >#define POLL_ERR 4 /* I/O Error */ >#define POLL_PRI 5 /* High priority input available */ >#define POLL_HUP 6 /* Device disconnected */ > >#endif ># 315 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 > >#if __POSIX_VISIBLE || __XSI_VISIBLE >struct __siginfo; > >/* > * Signal vector "template" used in sigaction call. > */ >struct sigaction { > union { > void (*__sa_handler)(int); > void (*__sa_sigaction)(int, struct __siginfo *, void *); > } __sigaction_u; /* signal handler */ > int sa_flags; /* see signal options below */ > sigset_t sa_mask; /* signal mask to apply */ >}; > >#define sa_handler __sigaction_u.__sa_handler >#endif ># 333 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 > >#if __XSI_VISIBLE >/* If SA_SIGINFO is set, sa_sigaction must be used instead of sa_handler. */ >#define sa_sigaction __sigaction_u.__sa_sigaction >#endif ># 338 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 > >#if __POSIX_VISIBLE || __XSI_VISIBLE >#define SA_NOCLDSTOP 0x0008 /* do not generate SIGCHLD on child stop */ >#endif /* __POSIX_VISIBLE || __XSI_VISIBLE */ ># 342 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 > >#if __XSI_VISIBLE >#define SA_ONSTACK 0x0001 /* take signal on signal stack */ >#define SA_RESTART 0x0002 /* restart system call on signal return */ >#define SA_RESETHAND 0x0004 /* reset to SIG_DFL when taking signal */ >#define SA_NODEFER 0x0010 /* don't mask the signal we're delivering */ >#define SA_NOCLDWAIT 0x0020 /* don't keep zombies around */ >#define SA_SIGINFO 0x0040 /* signal handler with SA_SIGINFO args */ >#endif ># 351 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 > >#if __BSD_VISIBLE >#define NSIG 32 /* number of old signals (counting 0) */ >#endif ># 355 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 > >#if __POSIX_VISIBLE || __XSI_VISIBLE >#define SI_NOINFO 0 /* No signal info besides si_signo. */ >#define SI_USER 0x10001 /* Signal sent by kill(). */ >#define SI_QUEUE 0x10002 /* Signal sent by the sigqueue(). */ >#define SI_TIMER 0x10003 /* Signal generated by expiration of */ > /* a timer set by timer_settime(). */ >#define SI_ASYNCIO 0x10004 /* Signal generated by completion of */ > /* an asynchronous I/O request.*/ >#define SI_MESGQ 0x10005 /* Signal generated by arrival of a */ > /* message on an empty message queue. */ >#define SI_KERNEL 0x10006 >#define SI_LWP 0x10007 /* Signal sent by thr_kill */ >#endif ># 369 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 >#if __BSD_VISIBLE >#define SI_UNDEFINED 0 >#endif ># 372 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 > >#if __BSD_VISIBLE >typedef __sighandler_t *sig_t; /* type of pointer to a signal function */ >typedef void __siginfohandler_t(int, struct __siginfo *, void *); >#endif ># 377 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 > >#if __XSI_VISIBLE >#if __BSD_VISIBLE >#define __stack_t sigaltstack >#endif ># 382 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 >typedef struct __stack_t stack_t; > >#define SS_ONSTACK 0x0001 /* take signal on alternate stack */ >#define SS_DISABLE 0x0004 /* disable taking signals on alternate stack */ >#define MINSIGSTKSZ __MINSIGSTKSZ /* minimum stack size */ >#define SIGSTKSZ (MINSIGSTKSZ + 32768) /* recommended stack size */ >#endif ># 389 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 > >/* > * Structure used in sigaltstack call. Its definition is always > * needed for __ucontext. If __BSD_VISIBLE is defined, the structure > * tag is actually sigaltstack. > */ >struct __stack_t { > void *ss_sp; /* signal stack base */ > __size_t ss_size; /* signal stack length */ > int ss_flags; /* SS_DISABLE and/or SS_ONSTACK */ >}; > >#if __BSD_VISIBLE >/* > * 4.3 compatibility: > * Signal vector "template" used in sigvec call. > */ >struct sigvec { > __sighandler_t *sv_handler; /* signal handler */ > int sv_mask; /* signal mask to apply */ > int sv_flags; /* see signal options below */ >}; > >#define SV_ONSTACK SA_ONSTACK >#define SV_INTERRUPT SA_RESTART /* same bit, opposite sense */ >#define SV_RESETHAND SA_RESETHAND >#define SV_NODEFER SA_NODEFER >#define SV_NOCLDSTOP SA_NOCLDSTOP >#define SV_SIGINFO SA_SIGINFO >#define sv_onstack sv_flags /* isn't compatibility wonderful! */ >#endif ># 420 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 > >/* Keep this in one place only */ >#if defined(_KERNEL) && defined(COMPAT_43) && \ > !defined(__i386__) >struct osigcontext { > int _not_used; >}; >#endif ># 428 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 > >#if __XSI_VISIBLE >/* > * Structure used in sigstack call. > */ >struct sigstack { > void *ss_sp; /* signal stack pointer */ > int ss_onstack; /* current status */ >}; >#endif ># 438 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 > >#if __BSD_VISIBLE || __POSIX_VISIBLE > 0 && __POSIX_VISIBLE <= 200112 >/* > * Macro for converting signal number to a mask suitable for > * sigblock(). > */ >#define sigmask(m) (1 << ((m)-1)) >#endif ># 446 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 > >#if __BSD_VISIBLE >#define BADSIG SIG_ERR >#endif ># 450 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 > >#if __POSIX_VISIBLE || __XSI_VISIBLE >/* > * Flags for sigprocmask: > */ >#define SIG_BLOCK 1 /* block specified signal set */ >#define SIG_UNBLOCK 2 /* unblock specified signal set */ >#define SIG_SETMASK 3 /* set specified signal set */ >#endif ># 459 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 > >/* > * For historical reasons; programs expect signal's return value to be > * defined by <sys/signal.h>. > */ >__BEGIN_DECLS >__sighandler_t *signal(int, __sighandler_t *); >__END_DECLS > >#endif /* !_SYS_SIGNAL_H_ */ ># 469 "/usr/obj/usr/src/tmp/usr/include/sys/signal.h" 3 4 ># 39 "/usr/obj/usr/src/tmp/usr/include/signal.h" 2 3 4 >#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >#if 0 /* expanded by -frewrite-includes */ >#include <machine/ucontext.h> >#endif /* expanded by -frewrite-includes */ ># 40 "/usr/obj/usr/src/tmp/usr/include/signal.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/machine/ucontext.h" 1 3 4 >/*- > * This file is in the public domain. > */ >/* $FreeBSD: stable/11/sys/amd64/include/ucontext.h 247047 2013-02-20 17:39:52Z kib $ */ > >#if 0 /* expanded by -frewrite-includes */ >#include <x86/ucontext.h> >#endif /* expanded by -frewrite-includes */ ># 6 "/usr/obj/usr/src/tmp/usr/include/machine/ucontext.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/x86/ucontext.h" 1 3 4 >/*- > * Copyright (c) 2003 Peter Wemm > * Copyright (c) 1999 Marcel Moolenaar > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer > * in this position and unchanged. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. The name of the author may not be used to endorse or promote products > * derived from this software without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR > * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES > * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. > * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, > * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT > * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, > * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY > * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT > * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF > * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > * > * $FreeBSD: stable/11/sys/x86/include/ucontext.h 295561 2016-02-12 07:38:19Z kib $ > */ > >#ifndef _X86_UCONTEXT_H_ >#define _X86_UCONTEXT_H_ > >#ifdef __i386__ >/* Keep _MC_* values similar to amd64 */ >#define _MC_HASSEGS 0x1 >#define _MC_HASBASES 0x2 >#define _MC_HASFPXSTATE 0x4 >#define _MC_FLAG_MASK (_MC_HASSEGS | _MC_HASBASES | _MC_HASFPXSTATE) > >typedef struct __mcontext { > /* > * The definition of mcontext_t must match the layout of > * struct sigcontext after the sc_mask member. This is so > * that we can support sigcontext and ucontext_t at the same > * time. > */ > __register_t mc_onstack; /* XXX - sigcontext compat. */ > __register_t mc_gs; /* machine state (struct trapframe) */ > __register_t mc_fs; > __register_t mc_es; > __register_t mc_ds; > __register_t mc_edi; > __register_t mc_esi; > __register_t mc_ebp; > __register_t mc_isp; > __register_t mc_ebx; > __register_t mc_edx; > __register_t mc_ecx; > __register_t mc_eax; > __register_t mc_trapno; > __register_t mc_err; > __register_t mc_eip; > __register_t mc_cs; > __register_t mc_eflags; > __register_t mc_esp; > __register_t mc_ss; > > int mc_len; /* sizeof(mcontext_t) */ >#define _MC_FPFMT_NODEV 0x10000 /* device not present or configured */ >#define _MC_FPFMT_387 0x10001 >#define _MC_FPFMT_XMM 0x10002 > int mc_fpformat; >#define _MC_FPOWNED_NONE 0x20000 /* FP state not used */ >#define _MC_FPOWNED_FPU 0x20001 /* FP state came from FPU */ >#define _MC_FPOWNED_PCB 0x20002 /* FP state came from PCB */ > int mc_ownedfp; > __register_t mc_flags; > /* > * See <machine/npx.h> for the internals of mc_fpstate[]. > */ > int mc_fpstate[128] __aligned(16); > > __register_t mc_fsbase; > __register_t mc_gsbase; > > __register_t mc_xfpustate; > __register_t mc_xfpustate_len; > > int mc_spare2[4]; >} mcontext_t; >#endif /* __i386__ */ ># 94 "/usr/obj/usr/src/tmp/usr/include/x86/ucontext.h" 3 4 > >#ifdef __amd64__ >/* > * mc_trapno bits. Shall be in sync with TF_XXX. > */ >#define _MC_HASSEGS 0x1 >#define _MC_HASBASES 0x2 >#define _MC_HASFPXSTATE 0x4 >#define _MC_FLAG_MASK (_MC_HASSEGS | _MC_HASBASES | _MC_HASFPXSTATE) > >typedef struct __mcontext { > /* > * The definition of mcontext_t must match the layout of > * struct sigcontext after the sc_mask member. This is so > * that we can support sigcontext and ucontext_t at the same > * time. > */ > __register_t mc_onstack; /* XXX - sigcontext compat. */ > __register_t mc_rdi; /* machine state (struct trapframe) */ > __register_t mc_rsi; > __register_t mc_rdx; > __register_t mc_rcx; > __register_t mc_r8; > __register_t mc_r9; > __register_t mc_rax; > __register_t mc_rbx; > __register_t mc_rbp; > __register_t mc_r10; > __register_t mc_r11; > __register_t mc_r12; > __register_t mc_r13; > __register_t mc_r14; > __register_t mc_r15; > __uint32_t mc_trapno; > __uint16_t mc_fs; > __uint16_t mc_gs; > __register_t mc_addr; > __uint32_t mc_flags; > __uint16_t mc_es; > __uint16_t mc_ds; > __register_t mc_err; > __register_t mc_rip; > __register_t mc_cs; > __register_t mc_rflags; > __register_t mc_rsp; > __register_t mc_ss; > > long mc_len; /* sizeof(mcontext_t) */ > >#define _MC_FPFMT_NODEV 0x10000 /* device not present or configured */ >#define _MC_FPFMT_XMM 0x10002 > long mc_fpformat; >#define _MC_FPOWNED_NONE 0x20000 /* FP state not used */ >#define _MC_FPOWNED_FPU 0x20001 /* FP state came from FPU */ >#define _MC_FPOWNED_PCB 0x20002 /* FP state came from PCB */ > long mc_ownedfp; > /* > * See <machine/fpu.h> for the internals of mc_fpstate[]. > */ > long mc_fpstate[64] __aligned(16); > > __register_t mc_fsbase; > __register_t mc_gsbase; > > __register_t mc_xfpustate; > __register_t mc_xfpustate_len; > > long mc_spare[4]; >} mcontext_t; >#endif /* __amd64__ */ ># 164 "/usr/obj/usr/src/tmp/usr/include/x86/ucontext.h" 3 4 > >#ifdef __LINT__ >typedef struct __mcontext { >} mcontext_t; >#endif /* __LINT__ */ ># 169 "/usr/obj/usr/src/tmp/usr/include/x86/ucontext.h" 3 4 > >#endif /* !_X86_UCONTEXT_H_ */ ># 171 "/usr/obj/usr/src/tmp/usr/include/x86/ucontext.h" 3 4 ># 7 "/usr/obj/usr/src/tmp/usr/include/machine/ucontext.h" 2 3 4 ># 41 "/usr/obj/usr/src/tmp/usr/include/signal.h" 2 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_ucontext.h> >#endif /* expanded by -frewrite-includes */ ># 41 "/usr/obj/usr/src/tmp/usr/include/signal.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/sys/_ucontext.h" 1 3 4 >/*- > * Copyright (c) 1999 Marcel Moolenaar > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer > * in this position and unchanged. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. The name of the author may not be used to endorse or promote products > * derived from this software without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR > * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES > * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. > * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, > * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT > * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, > * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY > * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT > * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF > * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > * > * $FreeBSD: stable/11/sys/sys/_ucontext.h 295561 2016-02-12 07:38:19Z kib $ > */ > >#ifndef _SYS__UCONTEXT_H_ >#define _SYS__UCONTEXT_H_ > >typedef struct __ucontext { > /* > * Keep the order of the first two fields. Also, > * keep them the first two fields in the structure. > * This way we can have a union with struct > * sigcontext and ucontext_t. This allows us to > * support them both at the same time. > * note: the union is not defined, though. > */ > __sigset_t uc_sigmask; > mcontext_t uc_mcontext; > > struct __ucontext *uc_link; > struct __stack_t uc_stack; > int uc_flags; > int __spare__[4]; >} ucontext_t; > >#endif /* _SYS__UCONTEXT_H */ ># 53 "/usr/obj/usr/src/tmp/usr/include/sys/_ucontext.h" 3 4 ># 42 "/usr/obj/usr/src/tmp/usr/include/signal.h" 2 3 4 >#endif ># 43 "/usr/obj/usr/src/tmp/usr/include/signal.h" 3 4 > >#if __BSD_VISIBLE >/* > * XXX should enlarge these, if only to give empty names instead of bounds > * errors for large signal numbers. > */ >extern const char * const sys_signame[NSIG]; >extern const char * const sys_siglist[NSIG]; >extern const int sys_nsig; >#endif ># 53 "/usr/obj/usr/src/tmp/usr/include/signal.h" 3 4 > >#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >#ifndef _PID_T_DECLARED >typedef __pid_t pid_t; >#define _PID_T_DECLARED >#endif ># 59 "/usr/obj/usr/src/tmp/usr/include/signal.h" 3 4 >#endif ># 60 "/usr/obj/usr/src/tmp/usr/include/signal.h" 3 4 > >#if __POSIX_VISIBLE || __XSI_VISIBLE >struct pthread; /* XXX */ >typedef struct pthread *__pthread_t; >#if !defined(_PTHREAD_T_DECLARED) && __POSIX_VISIBLE >= 200809 >typedef __pthread_t pthread_t; >#define _PTHREAD_T_DECLARED >#endif ># 68 "/usr/obj/usr/src/tmp/usr/include/signal.h" 3 4 >#endif /* __POSIX_VISIBLE || __XSI_VISIBLE */ ># 69 "/usr/obj/usr/src/tmp/usr/include/signal.h" 3 4 > >__BEGIN_DECLS >int raise(int); > >#if __POSIX_VISIBLE || __XSI_VISIBLE >int kill(__pid_t, int); >int pthread_kill(__pthread_t, int); >int pthread_sigmask(int, const __sigset_t * __restrict, > __sigset_t * __restrict); >int sigaction(int, const struct sigaction * __restrict, > struct sigaction * __restrict); >int sigaddset(sigset_t *, int); >int sigdelset(sigset_t *, int); >int sigemptyset(sigset_t *); >int sigfillset(sigset_t *); >int sigismember(const sigset_t *, int); >int sigpending(sigset_t *); >int sigprocmask(int, const sigset_t * __restrict, sigset_t * __restrict); >int sigsuspend(const sigset_t *); >int sigwait(const sigset_t * __restrict, int * __restrict); >#endif ># 90 "/usr/obj/usr/src/tmp/usr/include/signal.h" 3 4 > >#if __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE >= 600 >int sigqueue(__pid_t, int, const union sigval); > >struct timespec; >int sigtimedwait(const sigset_t * __restrict, siginfo_t * __restrict, > const struct timespec * __restrict); >int sigwaitinfo(const sigset_t * __restrict, siginfo_t * __restrict); >#endif ># 99 "/usr/obj/usr/src/tmp/usr/include/signal.h" 3 4 > >#if __XSI_VISIBLE >int killpg(__pid_t, int); >int sigaltstack(const stack_t * __restrict, stack_t * __restrict); >int sighold(int); >int sigignore(int); >int sigpause(int); >int sigrelse(int); >void (*sigset(int, void (*)(int)))(int); >int xsi_sigpause(int); >#endif ># 110 "/usr/obj/usr/src/tmp/usr/include/signal.h" 3 4 > >#if __XSI_VISIBLE >= 600 >int siginterrupt(int, int); >#endif ># 114 "/usr/obj/usr/src/tmp/usr/include/signal.h" 3 4 > >#if __POSIX_VISIBLE >= 200809 >void psignal(int, const char *); >#endif ># 118 "/usr/obj/usr/src/tmp/usr/include/signal.h" 3 4 > >#if __BSD_VISIBLE >int sigblock(int); >int sigreturn(const struct __ucontext *); >int sigsetmask(int); >int sigstack(const struct sigstack *, struct sigstack *); >int sigvec(int, struct sigvec *, struct sigvec *); >#endif ># 126 "/usr/obj/usr/src/tmp/usr/include/signal.h" 3 4 >__END_DECLS > >#endif /* !_SIGNAL_H_ */ ># 129 "/usr/obj/usr/src/tmp/usr/include/signal.h" 3 4 ># 131 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" 2 > >/* Alessandro Rubini's GPM (general-purpose mouse) */ >#if HAVE_LIBGPM && HAVE_GPM_H >#define USE_GPM_SUPPORT 1 >#else ># 136 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#define USE_GPM_SUPPORT 0 >#endif ># 138 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >/* QNX mouse support */ >#if defined(__QNX__) && !defined(__QNXNTO__) >#define USE_QNX_MOUSE 1 >#else ># 143 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#define USE_QNX_MOUSE 0 >#endif ># 145 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >/* EMX mouse support */ >#ifdef __EMX__ >#define USE_EMX_MOUSE 1 >#else ># 150 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#define USE_EMX_MOUSE 0 >#endif ># 152 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >/* kLIBC keyboard/mouse support */ >#if defined(__OS2__) && defined(__KLIBC__) >#define USE_KLIBC_KBD 1 >#define USE_KLIBC_MOUSE 1 >#else ># 158 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#define USE_KLIBC_KBD 0 >#define USE_KLIBC_MOUSE 0 >#endif ># 161 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#define DEFAULT_MAXCLICK 166 >#define EV_MAX 8 /* size of mouse circular event queue */ > >/* > * If we don't have signals to support it, don't add a sigwinch handler. > * In any case, resizing is an extended feature. Use it if we've got it. > */ >#if !NCURSES_EXT_FUNCS >#undef HAVE_SIZECHANGE >#define HAVE_SIZECHANGE 0 >#endif ># 173 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#if HAVE_SIZECHANGE && USE_SIGWINCH && defined(SIGWINCH) >#define USE_SIZECHANGE 1 >#else ># 177 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#define USE_SIZECHANGE 0 >#undef USE_SIGWINCH >#define USE_SIGWINCH 0 >#endif ># 181 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >/* > * If desired, one can configure this, disabling environment variables that > * point to custom terminfo/termcap locations. > */ >#ifdef USE_ROOT_ENVIRON >#define use_terminfo_vars() 1 >#else ># 189 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#define use_terminfo_vars() _nc_env_access() >extern NCURSES_EXPORT(int) _nc_env_access (void); >#endif ># 192 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >/* > * Not all platforms have memmove; some have an equivalent bcopy. (Some may > * have neither). > */ >#if USE_OK_BCOPY >#define memmove(d,s,n) bcopy(s,d,n) >#elif USE_MY_MEMMOVE ># 200 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#define memmove(d,s,n) _nc_memmove(d,s,n) >extern NCURSES_EXPORT(void *) _nc_memmove (void *, const void *, size_t); >#endif ># 203 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >/* > * If we have va_copy(), use it for assigning va_list's. > */ >#if defined(HAVE___VA_COPY) >#define begin_va_copy(dst,src) __va_copy(dst, src) >#define end_va_copy(dst) va_end(dst) >#elif defined(va_copy) || defined(HAVE_VA_COPY) ># 211 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#define begin_va_copy(dst,src) va_copy(dst, src) >#define end_va_copy(dst) va_end(dst) >#else ># 214 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#define begin_va_copy(dst,src) (dst) = (src) >#define end_va_copy(dst) /* nothing */ >#endif ># 217 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >/* > * Either/both S_ISxxx and/or S_IFxxx are defined in sys/types.h; some systems > * lack one or the other. > */ >#ifndef S_ISDIR >#define S_ISDIR(mode) ((mode & S_IFMT) == S_IFDIR) >#endif ># 225 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#ifndef S_ISREG >#define S_ISREG(mode) ((mode & S_IFMT) == S_IFREG) >#endif ># 229 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >/* > * Scroll hints are useless when hashmap is used > */ >#if !USE_SCROLL_HINTS >#if !USE_HASHMAP >#define USE_SCROLL_HINTS 1 >#else ># 237 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#define USE_SCROLL_HINTS 0 >#endif ># 239 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#endif ># 240 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#if USE_SCROLL_HINTS >#define if_USE_SCROLL_HINTS(stmt) stmt >#else ># 244 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#define if_USE_SCROLL_HINTS(stmt) /*nothing*/ >#endif ># 246 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#if 0 /* expanded by -frewrite-includes */ >#include <nc_string.h> >#endif /* expanded by -frewrite-includes */ ># 247 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" ># 1 "/usr/src/contrib/ncurses/include/nc_string.h" 1 >/**************************************************************************** > * Copyright (c) 2012,2013 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 2012 * > ****************************************************************************/ > >#ifndef STRING_HACKS_H >#define STRING_HACKS_H 1 > >#if 0 /* expanded by -frewrite-includes */ >#include <ncurses_cfg.h> >#endif /* expanded by -frewrite-includes */ ># 36 "/usr/src/contrib/ncurses/include/nc_string.h" ># 37 "/usr/src/contrib/ncurses/include/nc_string.h" > >/* > * $Id: nc_string.h,v 1.4 2013/12/15 01:09:19 tom Exp $ > * > * String-hacks. Use these macros to stifle warnings on (presumably) correct > * uses of strcat, strcpy and sprintf. > * > * By the way - > * A fundamental limitation of the interfaces (and frequent issue in bug > * reports using these functions) is that sizes are passed as unsigned values > * (with associated sign-extension problems), limiting their effectiveness > * when checking for buffer overflow. > */ > >#ifdef __cplusplus >#define NCURSES_VOID /* nothing */ >#else ># 54 "/usr/src/contrib/ncurses/include/nc_string.h" >#define NCURSES_VOID (void) >#endif ># 56 "/usr/src/contrib/ncurses/include/nc_string.h" > >#if USE_STRING_HACKS && HAVE_STRLCAT >#define _nc_STRCAT(d,s,n) NCURSES_VOID strlcat((d),(s),NCURSES_CAST(size_t,n)) >#else ># 60 "/usr/src/contrib/ncurses/include/nc_string.h" >#define _nc_STRCAT(d,s,n) NCURSES_VOID strcat((d),(s)) >#endif ># 62 "/usr/src/contrib/ncurses/include/nc_string.h" > >#if USE_STRING_HACKS && HAVE_STRLCPY >#define _nc_STRCPY(d,s,n) NCURSES_VOID strlcpy((d),(s),NCURSES_CAST(size_t,n)) >#else ># 66 "/usr/src/contrib/ncurses/include/nc_string.h" >#define _nc_STRCPY(d,s,n) NCURSES_VOID strcpy((d),(s)) >#endif ># 68 "/usr/src/contrib/ncurses/include/nc_string.h" > >#if USE_STRING_HACKS && HAVE_SNPRINTF >#define _nc_SPRINTF NCURSES_VOID snprintf >#define _nc_SLIMIT(n) NCURSES_CAST(size_t,n), >#else ># 73 "/usr/src/contrib/ncurses/include/nc_string.h" >#define _nc_SPRINTF NCURSES_VOID sprintf >#define _nc_SLIMIT(n) /* nothing */ >#endif ># 76 "/usr/src/contrib/ncurses/include/nc_string.h" > >#endif /* STRING_HACKS_H */ ># 78 "/usr/src/contrib/ncurses/include/nc_string.h" ># 248 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" 2 > >/* > * Options for terminal drivers, etc... > */ >#ifdef USE_TERM_DRIVER >#define USE_SP_RIPOFF 1 >#define USE_SP_TERMTYPE 1 >#define USE_SP_WINDOWLIST 1 >#endif ># 257 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >/* > * Note: ht/cbt expansion flakes out randomly under Linux 1.1.47, but only > * when we're throwing control codes at the screen at high volume. To see > * this, re-enable USE_HARD_TABS and run worm for a while. Other systems > * probably don't want to define this either due to uncertainties about tab > * delays and expansion in raw mode. > */ > >#define TRIES struct tries >typedef TRIES { > TRIES *child; /* ptr to child. NULL if none */ > TRIES *sibling; /* ptr to sibling. NULL if none */ > unsigned char ch; /* character at this node */ > unsigned short value; /* code of string so far. 0 if none. */ >#undef TRIES >} TRIES; > >/* > * Common/troublesome character definitions > */ >#define StringOf(ch) {ch, 0} > >#define L_BRACE '{' >#define R_BRACE '}' >#define S_QUOTE '\'' >#define D_QUOTE '"' > >#define VT_ACSC "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~" > >/* > * Structure for palette tables > */ > >#define MAXCOLUMNS 135 >#define MAXLINES 66 >#define FIFO_SIZE MAXCOLUMNS+2 /* for nocbreak mode input */ > >#define ACS_LEN 128 > >#define WINDOWLIST struct _win_list > >#if USE_WIDEC_SUPPORT >#define _nc_bkgd _bkgrnd >#else ># 302 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#undef _XOPEN_SOURCE_EXTENDED >#undef _XPG5 >#define _nc_bkgd _bkgd >#define wgetbkgrnd(win, wch) *wch = win->_bkgd >#define wbkgrnd wbkgd >#endif ># 308 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#undef NCURSES_OPAQUE >#define NCURSES_INTERNALS 1 >#define NCURSES_OPAQUE 0 > >#if 0 /* expanded by -frewrite-includes */ >#include <curses.h> /* we'll use -Ipath directive to get the right one! */ >#endif /* expanded by -frewrite-includes */ ># 313 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" ># 1 "./curses.h" 1 >/**************************************************************************** > * Copyright (c) 1998-2013,2014 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: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 * > * and: Eric S. Raymond <esr@snark.thyrsus.com> * > * and: Thomas E. Dickey 1996-on * > ****************************************************************************/ > >/* $Id: curses.h.in,v 1.237 2014/02/01 22:08:12 tom Exp $ */ > >#ifndef __NCURSES_H >#define __NCURSES_H > >#define CURSES 1 >#define CURSES_H 1 > >/* These are defined only in curses.h, and are used for conditional compiles */ >#define NCURSES_VERSION_MAJOR 5 >#define NCURSES_VERSION_MINOR 9 >#define NCURSES_VERSION_PATCH 20140222 > >/* This is defined in more than one ncurses header, for identification */ >#undef NCURSES_VERSION >#define NCURSES_VERSION "5.9" > >/* > * Identify the mouse encoding version. > */ >#define NCURSES_MOUSE_VERSION 1 > >/* > * Definitions to facilitate DLL's. > */ >#if 0 /* expanded by -frewrite-includes */ >#include <ncurses_dll.h> >#endif /* expanded by -frewrite-includes */ ># 60 "./curses.h" ># 61 "./curses.h" > >/* > * User-definable tweak to disable the include of <stdbool.h>. > */ >#ifndef NCURSES_ENABLE_STDBOOL_H >#define NCURSES_ENABLE_STDBOOL_H 1 >#endif ># 68 "./curses.h" > >/* > * NCURSES_ATTR_T is used to quiet compiler warnings when building ncurses > * configured using --disable-macros. > */ >#ifdef NCURSES_NOMACROS >#ifndef NCURSES_ATTR_T >#define NCURSES_ATTR_T attr_t >#endif ># 77 "./curses.h" >#endif /* NCURSES_NOMACROS */ ># 78 "./curses.h" > >#ifndef NCURSES_ATTR_T >#define NCURSES_ATTR_T int >#endif ># 82 "./curses.h" > >/* > * Expands to 'const' if ncurses is configured using --enable-const. Note that > * doing so makes it incompatible with other implementations of X/Open Curses. > */ >#undef NCURSES_CONST >#define NCURSES_CONST const > >#undef NCURSES_INLINE >#define NCURSES_INLINE inline > >/* > * The internal type used for color values, and for color-pairs. The latter > * allows the curses library to enumerate the combinations of foreground and > * background colors used by an application, and is normally the product of the > * total foreground and background colors. > * > * X/Open uses "short" for both of these types, ultimately because they are > * numbers from the terminal database, which uses 16-bit signed values. > */ >#undef NCURSES_COLOR_T >#define NCURSES_COLOR_T short > >#undef NCURSES_PAIRS_T >#define NCURSES_PAIRS_T short > >/* > * Definition used to make WINDOW and similar structs opaque. > */ >#ifndef NCURSES_OPAQUE >#define NCURSES_OPAQUE 0 >#endif ># 114 "./curses.h" > >/* > * The reentrant code relies on the opaque setting, but adds features. > */ >#ifndef NCURSES_REENTRANT >#define NCURSES_REENTRANT 0 >#endif ># 121 "./curses.h" > >/* > * Control whether bindings for interop support are added. > */ >#undef NCURSES_INTEROP_FUNCS >#define NCURSES_INTEROP_FUNCS 0 > >/* > * The internal type used for window dimensions. > */ >#undef NCURSES_SIZE_T >#define NCURSES_SIZE_T short > >/* > * Control whether tparm() supports varargs or fixed-parameter list. > */ >#undef NCURSES_TPARM_VARARGS >#define NCURSES_TPARM_VARARGS 1 > >/* > * Control type used for tparm's arguments. While X/Open equates long and > * char* values, this is not always workable for 64-bit platforms. > */ >#undef NCURSES_TPARM_ARG >#define NCURSES_TPARM_ARG long > >/* > * NCURSES_CH_T is used in building the library, but not used otherwise in > * this header file, since that would make the normal/wide-character versions > * of the header incompatible. > */ >#undef NCURSES_CH_T >#define NCURSES_CH_T cchar_t > >#if 0 && defined(_LP64) >typedef unsigned chtype; >typedef unsigned mmask_t; >#else ># 159 "./curses.h" >typedef unsigned long chtype; >typedef unsigned long mmask_t; >#endif ># 162 "./curses.h" > >/* > * We need FILE, etc. Include this before checking any feature symbols. > */ >#if 0 /* expanded by -frewrite-includes */ >#include <stdio.h> >#endif /* expanded by -frewrite-includes */ ># 166 "./curses.h" ># 167 "./curses.h" > >/* > * With XPG4, you must define _XOPEN_SOURCE_EXTENDED, it is redundant (or > * conflicting) when _XOPEN_SOURCE is 500 or greater. If NCURSES_WIDECHAR is > * not already defined, e.g., if the platform relies upon nonstandard feature > * test macros, define it at this point if the standard feature test macros > * indicate that it should be defined. > */ >#ifndef NCURSES_WIDECHAR >#if defined(_XOPEN_SOURCE_EXTENDED) || (defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE - 0 >= 500)) >#define NCURSES_WIDECHAR 1 >#else ># 179 "./curses.h" >#define NCURSES_WIDECHAR 0 >#endif ># 181 "./curses.h" >#endif /* NCURSES_WIDECHAR */ ># 182 "./curses.h" > >#if 0 /* expanded by -frewrite-includes */ >#include <stdarg.h> /* we need va_list */ >#endif /* expanded by -frewrite-includes */ ># 183 "./curses.h" ># 1 "/usr/obj/usr/src/tmp/usr/include/stdarg.h" 1 3 4 >/*- > * This file is in the public domain. > */ >/* $FreeBSD: stable/11/sys/amd64/include/stdarg.h 232276 2012-02-28 22:30:58Z tijl $ */ > >#if 0 /* expanded by -frewrite-includes */ >#include <x86/stdarg.h> >#endif /* expanded by -frewrite-includes */ ># 6 "/usr/obj/usr/src/tmp/usr/include/stdarg.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/x86/stdarg.h" 1 3 4 >/*- > * Copyright (c) 2002 David E. O'Brien. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: stable/11/sys/x86/include/stdarg.h 256105 2013-10-07 10:01:23Z phk $ > */ > >#ifndef _MACHINE_STDARG_H_ >#define _MACHINE_STDARG_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 34 "/usr/obj/usr/src/tmp/usr/include/x86/stdarg.h" 3 4 ># 35 "/usr/obj/usr/src/tmp/usr/include/x86/stdarg.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 35 "/usr/obj/usr/src/tmp/usr/include/x86/stdarg.h" 3 4 ># 36 "/usr/obj/usr/src/tmp/usr/include/x86/stdarg.h" 3 4 > >#ifndef _VA_LIST_DECLARED >#define _VA_LIST_DECLARED >typedef __va_list va_list; >#endif ># 41 "/usr/obj/usr/src/tmp/usr/include/x86/stdarg.h" 3 4 > >#ifdef __GNUCLIKE_BUILTIN_STDARG > >#define va_start(ap, last) \ > __builtin_va_start((ap), (last)) > >#define va_arg(ap, type) \ > __builtin_va_arg((ap), type) > >#define __va_copy(dest, src) \ > __builtin_va_copy((dest), (src)) > >#if __ISO_C_VISIBLE >= 1999 >#define va_copy(dest, src) \ > __va_copy(dest, src) >#endif ># 57 "/usr/obj/usr/src/tmp/usr/include/x86/stdarg.h" 3 4 > >#define va_end(ap) \ > __builtin_va_end(ap) > >#elif defined(lint) ># 62 "/usr/obj/usr/src/tmp/usr/include/x86/stdarg.h" 3 4 >/* Provide a fake implementation for lint's benefit */ >#define __va_size(type) \ > (((sizeof(type) + sizeof(long) - 1) / sizeof(long)) * sizeof(long)) >#define va_start(ap, last) \ > ((ap) = (va_list)&(last) + __va_size(last)) >#define va_copy(dst, src) \ > ((dst) = (src)) >#define va_arg(ap, type) \ > (*(type *)((ap) += __va_size(type), (ap) - __va_size(type))) >#define va_end(ap) > >#else ># 74 "/usr/obj/usr/src/tmp/usr/include/x86/stdarg.h" 3 4 >#error this file needs to be ported to your compiler >#endif ># 76 "/usr/obj/usr/src/tmp/usr/include/x86/stdarg.h" 3 4 > >#endif /* !_MACHINE_STDARG_H_ */ ># 78 "/usr/obj/usr/src/tmp/usr/include/x86/stdarg.h" 3 4 ># 7 "/usr/obj/usr/src/tmp/usr/include/stdarg.h" 2 3 4 ># 184 "./curses.h" 2 >#if NCURSES_WIDECHAR >#if 0 /* expanded by -frewrite-includes */ >#include <stddef.h> /* we want wchar_t */ >#endif /* expanded by -frewrite-includes */ ># 185 "./curses.h" ># 186 "./curses.h" >#endif ># 187 "./curses.h" > >/* X/Open and SVr4 specify that curses implements 'bool'. However, C++ may also > * implement it. If so, we must use the C++ compiler's type to avoid conflict > * with other interfaces. > * > * A further complication is that <stdbool.h> may declare 'bool' to be a > * different type, such as an enum which is not necessarily compatible with > * C++. If we have <stdbool.h>, make 'bool' a macro, so users may #undef it. > * Otherwise, let it remain a typedef to avoid conflicts with other #define's. > * In either case, make a typedef for NCURSES_BOOL which can be used if needed > * from either C or C++. > */ > >#undef TRUE >#define TRUE 1 > >#undef FALSE >#define FALSE 0 > >typedef unsigned char NCURSES_BOOL; > >#if defined(__cplusplus) /* __cplusplus, etc. */ > >/* use the C++ compiler's bool type */ >#define NCURSES_BOOL bool > >#else /* c89, c99, etc. */ ># 214 "./curses.h" > >#if NCURSES_ENABLE_STDBOOL_H >#if 0 /* expanded by -frewrite-includes */ >#include <stdbool.h> >#endif /* expanded by -frewrite-includes */ ># 216 "./curses.h" ># 1 "/usr/obj/usr/src/tmp/usr/include/stdbool.h" 1 3 4 >/* > * Copyright (c) 2000 Jeroen Ruigrok van der Werven <asmodai@FreeBSD.org> > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: stable/11/include/stdbool.h 228878 2011-12-25 20:15:41Z ed $ > */ > >#ifndef __bool_true_false_are_defined >#define __bool_true_false_are_defined 1 > >#ifndef __cplusplus > >#define false 0 >#define true 1 > >#define bool _Bool >#if __STDC_VERSION__ < 199901L && __GNUC__ < 3 && !defined(__INTEL_COMPILER) >typedef int _Bool; >#endif ># 41 "/usr/obj/usr/src/tmp/usr/include/stdbool.h" 3 4 > >#endif /* !__cplusplus */ ># 43 "/usr/obj/usr/src/tmp/usr/include/stdbool.h" 3 4 >#endif /* __bool_true_false_are_defined */ ># 44 "/usr/obj/usr/src/tmp/usr/include/stdbool.h" 3 4 ># 217 "./curses.h" 2 >/* use whatever the C compiler decides bool really is */ >#define NCURSES_BOOL bool >#else ># 220 "./curses.h" >/* there is no predefined bool - use our own */ >#undef bool >#define bool NCURSES_BOOL >#endif ># 224 "./curses.h" > >#endif /* !__cplusplus, etc. */ ># 226 "./curses.h" > >#ifdef __cplusplus >extern "C" { >#define NCURSES_CAST(type,value) static_cast<type>(value) >#else ># 231 "./curses.h" >#define NCURSES_CAST(type,value) (type)(value) >#endif ># 233 "./curses.h" > >/* > * X/Open attributes. In the ncurses implementation, they are identical to the > * A_ attributes. > */ >#define WA_ATTRIBUTES A_ATTRIBUTES >#define WA_NORMAL A_NORMAL >#define WA_STANDOUT A_STANDOUT >#define WA_UNDERLINE A_UNDERLINE >#define WA_REVERSE A_REVERSE >#define WA_BLINK A_BLINK >#define WA_DIM A_DIM >#define WA_BOLD A_BOLD >#define WA_ALTCHARSET A_ALTCHARSET >#define WA_INVIS A_INVIS >#define WA_PROTECT A_PROTECT >#define WA_HORIZONTAL A_HORIZONTAL >#define WA_LEFT A_LEFT >#define WA_LOW A_LOW >#define WA_RIGHT A_RIGHT >#define WA_TOP A_TOP >#define WA_VERTICAL A_VERTICAL > >#if 1 >#define WA_ITALIC A_ITALIC /* ncurses extension */ >#endif ># 259 "./curses.h" > >/* colors */ >#define COLOR_BLACK 0 >#define COLOR_RED 1 >#define COLOR_GREEN 2 >#define COLOR_YELLOW 3 >#define COLOR_BLUE 4 >#define COLOR_MAGENTA 5 >#define COLOR_CYAN 6 >#define COLOR_WHITE 7 > >/* line graphics */ > >#if 0 || NCURSES_REENTRANT >NCURSES_WRAPPED_VAR(chtype*, acs_map); >#define acs_map NCURSES_PUBLIC_VAR(acs_map()) >#else ># 276 "./curses.h" >extern NCURSES_EXPORT_VAR(chtype) acs_map[]; >#endif ># 278 "./curses.h" > >#define NCURSES_ACS(c) (acs_map[NCURSES_CAST(unsigned char,(c))]) > >/* VT100 symbols begin here */ >#define ACS_ULCORNER NCURSES_ACS('l') /* upper left corner */ >#define ACS_LLCORNER NCURSES_ACS('m') /* lower left corner */ >#define ACS_URCORNER NCURSES_ACS('k') /* upper right corner */ >#define ACS_LRCORNER NCURSES_ACS('j') /* lower right corner */ >#define ACS_LTEE NCURSES_ACS('t') /* tee pointing right */ >#define ACS_RTEE NCURSES_ACS('u') /* tee pointing left */ >#define ACS_BTEE NCURSES_ACS('v') /* tee pointing up */ >#define ACS_TTEE NCURSES_ACS('w') /* tee pointing down */ >#define ACS_HLINE NCURSES_ACS('q') /* horizontal line */ >#define ACS_VLINE NCURSES_ACS('x') /* vertical line */ >#define ACS_PLUS NCURSES_ACS('n') /* large plus or crossover */ >#define ACS_S1 NCURSES_ACS('o') /* scan line 1 */ >#define ACS_S9 NCURSES_ACS('s') /* scan line 9 */ >#define ACS_DIAMOND NCURSES_ACS('`') /* diamond */ >#define ACS_CKBOARD NCURSES_ACS('a') /* checker board (stipple) */ >#define ACS_DEGREE NCURSES_ACS('f') /* degree symbol */ >#define ACS_PLMINUS NCURSES_ACS('g') /* plus/minus */ >#define ACS_BULLET NCURSES_ACS('~') /* bullet */ >/* Teletype 5410v1 symbols begin here */ >#define ACS_LARROW NCURSES_ACS(',') /* arrow pointing left */ >#define ACS_RARROW NCURSES_ACS('+') /* arrow pointing right */ >#define ACS_DARROW NCURSES_ACS('.') /* arrow pointing down */ >#define ACS_UARROW NCURSES_ACS('-') /* arrow pointing up */ >#define ACS_BOARD NCURSES_ACS('h') /* board of squares */ >#define ACS_LANTERN NCURSES_ACS('i') /* lantern symbol */ >#define ACS_BLOCK NCURSES_ACS('0') /* solid square block */ >/* > * These aren't documented, but a lot of System Vs have them anyway > * (you can spot pprryyzz{{||}} in a lot of AT&T terminfo strings). > * The ACS_names may not match AT&T's, our source didn't know them. > */ >#define ACS_S3 NCURSES_ACS('p') /* scan line 3 */ >#define ACS_S7 NCURSES_ACS('r') /* scan line 7 */ >#define ACS_LEQUAL NCURSES_ACS('y') /* less/equal */ >#define ACS_GEQUAL NCURSES_ACS('z') /* greater/equal */ >#define ACS_PI NCURSES_ACS('{') /* Pi */ >#define ACS_NEQUAL NCURSES_ACS('|') /* not equal */ >#define ACS_STERLING NCURSES_ACS('}') /* UK pound sign */ > >/* > * Line drawing ACS names are of the form ACS_trbl, where t is the top, r > * is the right, b is the bottom, and l is the left. t, r, b, and l might > * be B (blank), S (single), D (double), or T (thick). The subset defined > * here only uses B and S. > */ >#define ACS_BSSB ACS_ULCORNER >#define ACS_SSBB ACS_LLCORNER >#define ACS_BBSS ACS_URCORNER >#define ACS_SBBS ACS_LRCORNER >#define ACS_SBSS ACS_RTEE >#define ACS_SSSB ACS_LTEE >#define ACS_SSBS ACS_BTEE >#define ACS_BSSS ACS_TTEE >#define ACS_BSBS ACS_HLINE >#define ACS_SBSB ACS_VLINE >#define ACS_SSSS ACS_PLUS > >#undef ERR >#define ERR (-1) > >#undef OK >#define OK (0) > >/* values for the _flags member */ >#define _SUBWIN 0x01 /* is this a sub-window? */ >#define _ENDLINE 0x02 /* is the window flush right? */ >#define _FULLWIN 0x04 /* is the window full-screen? */ >#define _SCROLLWIN 0x08 /* bottom edge is at screen bottom? */ >#define _ISPAD 0x10 /* is this window a pad? */ >#define _HASMOVED 0x20 /* has cursor moved since last refresh? */ >#define _WRAPPED 0x40 /* cursor was just wrappped */ > >/* > * this value is used in the firstchar and lastchar fields to mark > * unchanged lines > */ >#define _NOCHANGE -1 > >/* > * this value is used in the oldindex field to mark lines created by insertions > * and scrolls. > */ >#define _NEWINDEX -1 > >typedef struct screen SCREEN; >typedef struct _win_st WINDOW; > >typedef chtype attr_t; /* ...must be at least as wide as chtype */ > >#if NCURSES_WIDECHAR > >#if 0 >#ifdef mblen /* libutf8.h defines it w/o undefining first */ >#undef mblen >#endif ># 377 "./curses.h" >#if 0 /* expanded by -frewrite-includes */ >#include <libutf8.h> >#endif /* expanded by -frewrite-includes */ ># 377 "./curses.h" ># 378 "./curses.h" >#endif ># 379 "./curses.h" > >#if 1 >#if 0 /* expanded by -frewrite-includes */ >#include <wchar.h> /* ...to get mbstate_t, etc. */ >#endif /* expanded by -frewrite-includes */ ># 381 "./curses.h" ># 1 "/usr/obj/usr/src/tmp/usr/include/wchar.h" 1 3 4 >/*- > * Copyright (c)1999 Citrus Project, > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: stable/11/include/wchar.h 300998 2016-05-30 16:26:34Z ed $ > */ > >/*- > * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc. > * All rights reserved. > * > * This code is derived from software contributed to The NetBSD Foundation > * by Julian Coleman. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * > * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS > * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED > * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR > * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS > * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR > * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF > * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS > * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN > * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) > * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE > * POSSIBILITY OF SUCH DAMAGE. > * > * $NetBSD: wchar.h,v 1.8 2000/12/22 05:31:42 itojun Exp $ > */ > >#ifndef _WCHAR_H_ >#define _WCHAR_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 63 "/usr/obj/usr/src/tmp/usr/include/wchar.h" 3 4 ># 64 "/usr/obj/usr/src/tmp/usr/include/wchar.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_null.h> >#endif /* expanded by -frewrite-includes */ ># 64 "/usr/obj/usr/src/tmp/usr/include/wchar.h" 3 4 ># 65 "/usr/obj/usr/src/tmp/usr/include/wchar.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 65 "/usr/obj/usr/src/tmp/usr/include/wchar.h" 3 4 ># 66 "/usr/obj/usr/src/tmp/usr/include/wchar.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <machine/_limits.h> >#endif /* expanded by -frewrite-includes */ ># 66 "/usr/obj/usr/src/tmp/usr/include/wchar.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/machine/_limits.h" 1 3 4 >/*- > * This file is in the public domain. > */ >/* $FreeBSD: stable/11/sys/amd64/include/_limits.h 232262 2012-02-28 18:24:28Z tijl $ */ > >#if 0 /* expanded by -frewrite-includes */ >#include <x86/_limits.h> >#endif /* expanded by -frewrite-includes */ ># 6 "/usr/obj/usr/src/tmp/usr/include/machine/_limits.h" 3 4 ># 7 "/usr/obj/usr/src/tmp/usr/include/machine/_limits.h" 3 4 ># 67 "/usr/obj/usr/src/tmp/usr/include/wchar.h" 2 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <_ctype.h> >#endif /* expanded by -frewrite-includes */ ># 67 "/usr/obj/usr/src/tmp/usr/include/wchar.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/_ctype.h" 1 3 4 >/* > * Copyright (c) 1989, 1993 > * The Regents of the University of California. All rights reserved. > * (c) UNIX System Laboratories, Inc. > * All or some portions of this file are derived from material licensed > * to the University of California by American Telephone and Telegraph > * Co. or Unix System Laboratories, Inc. and are reproduced herein with > * the permission of UNIX System Laboratories, Inc. > * > * This code is derived from software contributed to Berkeley by > * Paul Borman at Krystal Technologies. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * From @(#)ctype.h 8.4 (Berkeley) 1/21/94 > * From FreeBSD: src/include/ctype.h,v 1.27 2004/06/23 07:11:39 tjr Exp > * $FreeBSD: stable/11/include/_ctype.h 290494 2015-11-07 12:43:35Z bapt $ > */ > >#ifndef __CTYPE_H_ >#define __CTYPE_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 45 "/usr/obj/usr/src/tmp/usr/include/_ctype.h" 3 4 ># 46 "/usr/obj/usr/src/tmp/usr/include/_ctype.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 46 "/usr/obj/usr/src/tmp/usr/include/_ctype.h" 3 4 ># 47 "/usr/obj/usr/src/tmp/usr/include/_ctype.h" 3 4 > >#define _CTYPE_A 0x00000100L /* Alpha */ >#define _CTYPE_C 0x00000200L /* Control */ >#define _CTYPE_D 0x00000400L /* Digit */ >#define _CTYPE_G 0x00000800L /* Graph */ >#define _CTYPE_L 0x00001000L /* Lower */ >#define _CTYPE_P 0x00002000L /* Punct */ >#define _CTYPE_S 0x00004000L /* Space */ >#define _CTYPE_U 0x00008000L /* Upper */ >#define _CTYPE_X 0x00010000L /* X digit */ >#define _CTYPE_B 0x00020000L /* Blank */ >#define _CTYPE_R 0x00040000L /* Print */ >#define _CTYPE_I 0x00080000L /* Ideogram */ >#define _CTYPE_T 0x00100000L /* Special */ >#define _CTYPE_Q 0x00200000L /* Phonogram */ >#define _CTYPE_N 0x00400000L /* Number (superset of digit) */ >#define _CTYPE_SW0 0x20000000L /* 0 width character */ >#define _CTYPE_SW1 0x40000000L /* 1 width character */ >#define _CTYPE_SW2 0x80000000L /* 2 width character */ >#define _CTYPE_SW3 0xc0000000L /* 3 width character */ >#define _CTYPE_SWM 0xe0000000L /* Mask for screen width data */ >#define _CTYPE_SWS 30 /* Bits to shift to get width */ > >/* See comments in <sys/_types.h> about __ct_rune_t. */ >__BEGIN_DECLS >unsigned long ___runetype(__ct_rune_t) __pure; >__ct_rune_t ___tolower(__ct_rune_t) __pure; >__ct_rune_t ___toupper(__ct_rune_t) __pure; >__END_DECLS > >/* > * _EXTERNALIZE_CTYPE_INLINES_ is defined in locale/nomacros.c to tell us > * to generate code for extern versions of all our inline functions. > */ >#ifdef _EXTERNALIZE_CTYPE_INLINES_ >#define _USE_CTYPE_INLINE_ >#define static >#define __inline >#endif ># 86 "/usr/obj/usr/src/tmp/usr/include/_ctype.h" 3 4 > >extern int __mb_sb_limit; > >/* > * Use inline functions if we are allowed to and the compiler supports them. > */ >#if !defined(_DONT_USE_CTYPE_INLINE_) && \ > (defined(_USE_CTYPE_INLINE_) || defined(__GNUC__) || defined(__cplusplus)) > >#if 0 /* expanded by -frewrite-includes */ >#include <runetype.h> >#endif /* expanded by -frewrite-includes */ ># 95 "/usr/obj/usr/src/tmp/usr/include/_ctype.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/runetype.h" 1 3 4 >/*- > * Copyright (c) 1993 > * The Regents of the University of California. All rights reserved. > * > * This code is derived from software contributed to Berkeley by > * Paul Borman at Krystal Technologies. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)runetype.h 8.1 (Berkeley) 6/2/93 > * $FreeBSD: stable/11/include/runetype.h 232620 2012-03-06 20:15:23Z dim $ > */ > >#ifndef _RUNETYPE_H_ >#define _RUNETYPE_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 39 "/usr/obj/usr/src/tmp/usr/include/runetype.h" 3 4 ># 40 "/usr/obj/usr/src/tmp/usr/include/runetype.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 40 "/usr/obj/usr/src/tmp/usr/include/runetype.h" 3 4 ># 41 "/usr/obj/usr/src/tmp/usr/include/runetype.h" 3 4 > >#define _CACHED_RUNES (1 <<8 ) /* Must be a power of 2 */ >#define _CRMASK (~(_CACHED_RUNES - 1)) > >/* > * The lower 8 bits of runetype[] contain the digit value of the rune. > */ >typedef struct { > __rune_t __min; /* First rune of the range */ > __rune_t __max; /* Last rune (inclusive) of the range */ > __rune_t __map; /* What first maps to in maps */ > unsigned long *__types; /* Array of types in range */ >} _RuneEntry; > >typedef struct { > int __nranges; /* Number of ranges stored */ > _RuneEntry *__ranges; /* Pointer to the ranges */ >} _RuneRange; > >typedef struct { > char __magic[8]; /* Magic saying what version we are */ > char __encoding[32]; /* ASCII name of this encoding */ > > __rune_t (*__sgetrune)(const char *, __size_t, char const **); > int (*__sputrune)(__rune_t, char *, __size_t, char **); > __rune_t __invalid_rune; > > unsigned long __runetype[_CACHED_RUNES]; > __rune_t __maplower[_CACHED_RUNES]; > __rune_t __mapupper[_CACHED_RUNES]; > > /* > * The following are to deal with Runes larger than _CACHED_RUNES - 1. > * Their data is actually contiguous with this structure so as to make > * it easier to read/write from/to disk. > */ > _RuneRange __runetype_ext; > _RuneRange __maplower_ext; > _RuneRange __mapupper_ext; > > void *__variable; /* Data which depends on the encoding */ > int __variable_len; /* how long that data is */ >} _RuneLocale; > >#define _RUNE_MAGIC_1 "RuneMagi" /* Indicates version 0 of RuneLocale */ >__BEGIN_DECLS >extern const _RuneLocale _DefaultRuneLocale; >extern const _RuneLocale *_CurrentRuneLocale; >#if defined(__NO_TLS) || defined(__RUNETYPE_INTERNAL) >extern const _RuneLocale *__getCurrentRuneLocale(void); >#else ># 92 "/usr/obj/usr/src/tmp/usr/include/runetype.h" 3 4 >extern _Thread_local const _RuneLocale *_ThreadRuneLocale; >static __inline const _RuneLocale *__getCurrentRuneLocale(void) >{ > > if (_ThreadRuneLocale) > return _ThreadRuneLocale; > if (_CurrentRuneLocale) > return _CurrentRuneLocale; > return &_DefaultRuneLocale; >} >#endif /* __NO_TLS || __RUNETYPE_INTERNAL */ ># 103 "/usr/obj/usr/src/tmp/usr/include/runetype.h" 3 4 >#define _CurrentRuneLocale (__getCurrentRuneLocale()) >__END_DECLS > >#endif /* !_RUNETYPE_H_ */ ># 107 "/usr/obj/usr/src/tmp/usr/include/runetype.h" 3 4 ># 96 "/usr/obj/usr/src/tmp/usr/include/_ctype.h" 2 3 4 > >static __inline int >__maskrune(__ct_rune_t _c, unsigned long _f) >{ > return ((_c < 0 || _c >= _CACHED_RUNES) ? ___runetype(_c) : > _CurrentRuneLocale->__runetype[_c]) & _f; >} > >static __inline int >__sbmaskrune(__ct_rune_t _c, unsigned long _f) >{ > return (_c < 0 || _c >= __mb_sb_limit) ? 0 : > _CurrentRuneLocale->__runetype[_c] & _f; >} > >static __inline int >__istype(__ct_rune_t _c, unsigned long _f) >{ > return (!!__maskrune(_c, _f)); >} > >static __inline int >__sbistype(__ct_rune_t _c, unsigned long _f) >{ > return (!!__sbmaskrune(_c, _f)); >} > >static __inline int >__isctype(__ct_rune_t _c, unsigned long _f) >{ > return (_c < 0 || _c >= 128) ? 0 : > !!(_DefaultRuneLocale.__runetype[_c] & _f); >} > >static __inline __ct_rune_t >__toupper(__ct_rune_t _c) >{ > return (_c < 0 || _c >= _CACHED_RUNES) ? ___toupper(_c) : > _CurrentRuneLocale->__mapupper[_c]; >} > >static __inline __ct_rune_t >__sbtoupper(__ct_rune_t _c) >{ > return (_c < 0 || _c >= __mb_sb_limit) ? _c : > _CurrentRuneLocale->__mapupper[_c]; >} > >static __inline __ct_rune_t >__tolower(__ct_rune_t _c) >{ > return (_c < 0 || _c >= _CACHED_RUNES) ? ___tolower(_c) : > _CurrentRuneLocale->__maplower[_c]; >} > >static __inline __ct_rune_t >__sbtolower(__ct_rune_t _c) >{ > return (_c < 0 || _c >= __mb_sb_limit) ? _c : > _CurrentRuneLocale->__maplower[_c]; >} > >static __inline int >__wcwidth(__ct_rune_t _c) >{ > unsigned int _x; > > if (_c == 0) > return (0); > _x = (unsigned int)__maskrune(_c, _CTYPE_SWM|_CTYPE_R); > if ((_x & _CTYPE_SWM) != 0) > return ((_x & _CTYPE_SWM) >> _CTYPE_SWS); > return ((_x & _CTYPE_R) != 0 ? 1 : -1); >} > >#else /* not using inlines */ ># 172 "/usr/obj/usr/src/tmp/usr/include/_ctype.h" 3 4 > >__BEGIN_DECLS >int __maskrune(__ct_rune_t, unsigned long); >int __sbmaskrune(__ct_rune_t, unsigned long); >int __istype(__ct_rune_t, unsigned long); >int __sbistype(__ct_rune_t, unsigned long); >int __isctype(__ct_rune_t, unsigned long); >__ct_rune_t __toupper(__ct_rune_t); >__ct_rune_t __sbtoupper(__ct_rune_t); >__ct_rune_t __tolower(__ct_rune_t); >__ct_rune_t __sbtolower(__ct_rune_t); >int __wcwidth(__ct_rune_t); >__END_DECLS >#endif /* using inlines */ ># 186 "/usr/obj/usr/src/tmp/usr/include/_ctype.h" 3 4 > >#endif /* !__CTYPE_H_ */ ># 188 "/usr/obj/usr/src/tmp/usr/include/_ctype.h" 3 4 ># 68 "/usr/obj/usr/src/tmp/usr/include/wchar.h" 2 3 4 > >#ifndef _MBSTATE_T_DECLARED >typedef __mbstate_t mbstate_t; >#define _MBSTATE_T_DECLARED >#endif ># 73 "/usr/obj/usr/src/tmp/usr/include/wchar.h" 3 4 > >#ifndef _SIZE_T_DECLARED >typedef __size_t size_t; >#define _SIZE_T_DECLARED >#endif ># 78 "/usr/obj/usr/src/tmp/usr/include/wchar.h" 3 4 > >#if __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE >#ifndef _VA_LIST_DECLARED >typedef __va_list va_list; >#define _VA_LIST_DECLARED >#endif ># 84 "/usr/obj/usr/src/tmp/usr/include/wchar.h" 3 4 >#endif ># 85 "/usr/obj/usr/src/tmp/usr/include/wchar.h" 3 4 > >#ifndef __cplusplus >#ifndef _WCHAR_T_DECLARED >typedef ___wchar_t wchar_t; >#define _WCHAR_T_DECLARED >#endif ># 91 "/usr/obj/usr/src/tmp/usr/include/wchar.h" 3 4 >#endif ># 92 "/usr/obj/usr/src/tmp/usr/include/wchar.h" 3 4 > >#ifndef _WINT_T_DECLARED >typedef __wint_t wint_t; >#define _WINT_T_DECLARED >#endif ># 97 "/usr/obj/usr/src/tmp/usr/include/wchar.h" 3 4 > >#define WCHAR_MIN __WCHAR_MIN >#define WCHAR_MAX __WCHAR_MAX > >#ifndef WEOF >#define WEOF ((wint_t)-1) >#endif ># 104 "/usr/obj/usr/src/tmp/usr/include/wchar.h" 3 4 > >#ifndef _STDFILE_DECLARED >#define _STDFILE_DECLARED >typedef struct __sFILE FILE; >#endif ># 109 "/usr/obj/usr/src/tmp/usr/include/wchar.h" 3 4 >struct tm; > >__BEGIN_DECLS >wint_t btowc(int); >wint_t fgetwc(FILE *); >wchar_t * > fgetws(wchar_t * __restrict, int, FILE * __restrict); >wint_t fputwc(wchar_t, FILE *); >int fputws(const wchar_t * __restrict, FILE * __restrict); >int fwide(FILE *, int); >int fwprintf(FILE * __restrict, const wchar_t * __restrict, ...); >int fwscanf(FILE * __restrict, const wchar_t * __restrict, ...); >wint_t getwc(FILE *); >wint_t getwchar(void); >size_t mbrlen(const char * __restrict, size_t, mbstate_t * __restrict); >size_t mbrtowc(wchar_t * __restrict, const char * __restrict, size_t, > mbstate_t * __restrict); >int mbsinit(const mbstate_t *); >size_t mbsrtowcs(wchar_t * __restrict, const char ** __restrict, size_t, > mbstate_t * __restrict); >wint_t putwc(wchar_t, FILE *); >wint_t putwchar(wchar_t); >int swprintf(wchar_t * __restrict, size_t n, const wchar_t * __restrict, > ...); >int swscanf(const wchar_t * __restrict, const wchar_t * __restrict, ...); >wint_t ungetwc(wint_t, FILE *); >int vfwprintf(FILE * __restrict, const wchar_t * __restrict, > __va_list); >int vswprintf(wchar_t * __restrict, size_t n, const wchar_t * __restrict, > __va_list); >int vwprintf(const wchar_t * __restrict, __va_list); >size_t wcrtomb(char * __restrict, wchar_t, mbstate_t * __restrict); >wchar_t *wcscat(wchar_t * __restrict, const wchar_t * __restrict); >wchar_t *wcschr(const wchar_t *, wchar_t) __pure; >int wcscmp(const wchar_t *, const wchar_t *) __pure; >int wcscoll(const wchar_t *, const wchar_t *); >wchar_t *wcscpy(wchar_t * __restrict, const wchar_t * __restrict); >size_t wcscspn(const wchar_t *, const wchar_t *) __pure; >size_t wcsftime(wchar_t * __restrict, size_t, const wchar_t * __restrict, > const struct tm * __restrict); >size_t wcslen(const wchar_t *) __pure; >wchar_t *wcsncat(wchar_t * __restrict, const wchar_t * __restrict, > size_t); >int wcsncmp(const wchar_t *, const wchar_t *, size_t) __pure; >wchar_t *wcsncpy(wchar_t * __restrict , const wchar_t * __restrict, size_t); >wchar_t *wcspbrk(const wchar_t *, const wchar_t *) __pure; >wchar_t *wcsrchr(const wchar_t *, wchar_t) __pure; >size_t wcsrtombs(char * __restrict, const wchar_t ** __restrict, size_t, > mbstate_t * __restrict); >size_t wcsspn(const wchar_t *, const wchar_t *) __pure; >wchar_t *wcsstr(const wchar_t * __restrict, const wchar_t * __restrict) > __pure; >size_t wcsxfrm(wchar_t * __restrict, const wchar_t * __restrict, size_t); >int wctob(wint_t); >double wcstod(const wchar_t * __restrict, wchar_t ** __restrict); >wchar_t *wcstok(wchar_t * __restrict, const wchar_t * __restrict, > wchar_t ** __restrict); >long wcstol(const wchar_t * __restrict, wchar_t ** __restrict, int); >unsigned long > wcstoul(const wchar_t * __restrict, wchar_t ** __restrict, int); >wchar_t *wmemchr(const wchar_t *, wchar_t, size_t) __pure; >int wmemcmp(const wchar_t *, const wchar_t *, size_t) __pure; >wchar_t *wmemcpy(wchar_t * __restrict, const wchar_t * __restrict, size_t); >wchar_t *wmemmove(wchar_t *, const wchar_t *, size_t); >wchar_t *wmemset(wchar_t *, wchar_t, size_t); >int wprintf(const wchar_t * __restrict, ...); >int wscanf(const wchar_t * __restrict, ...); > >#ifndef _STDSTREAM_DECLARED >extern FILE *__stdinp; >extern FILE *__stdoutp; >extern FILE *__stderrp; >#define _STDSTREAM_DECLARED >#endif ># 183 "/usr/obj/usr/src/tmp/usr/include/wchar.h" 3 4 > >#define getwc(fp) fgetwc(fp) >#define getwchar() fgetwc(__stdinp) >#define putwc(wc, fp) fputwc(wc, fp) >#define putwchar(wc) fputwc(wc, __stdoutp) > >#if __ISO_C_VISIBLE >= 1999 >int vfwscanf(FILE * __restrict, const wchar_t * __restrict, > __va_list); >int vswscanf(const wchar_t * __restrict, const wchar_t * __restrict, > __va_list); >int vwscanf(const wchar_t * __restrict, __va_list); >float wcstof(const wchar_t * __restrict, wchar_t ** __restrict); >long double > wcstold(const wchar_t * __restrict, wchar_t ** __restrict); >#ifdef __LONG_LONG_SUPPORTED >/* LONGLONG */ >long long > wcstoll(const wchar_t * __restrict, wchar_t ** __restrict, int); >/* LONGLONG */ >unsigned long long > wcstoull(const wchar_t * __restrict, wchar_t ** __restrict, int); >#endif ># 206 "/usr/obj/usr/src/tmp/usr/include/wchar.h" 3 4 >#endif /* __ISO_C_VISIBLE >= 1999 */ ># 207 "/usr/obj/usr/src/tmp/usr/include/wchar.h" 3 4 > >#if __XSI_VISIBLE >int wcswidth(const wchar_t *, size_t); >int wcwidth(wchar_t); >#define wcwidth(_c) __wcwidth(_c) >#endif ># 213 "/usr/obj/usr/src/tmp/usr/include/wchar.h" 3 4 > >#if __POSIX_VISIBLE >= 200809 >size_t mbsnrtowcs(wchar_t * __restrict, const char ** __restrict, size_t, > size_t, mbstate_t * __restrict); >FILE *open_wmemstream(wchar_t **, size_t *); >wchar_t *wcpcpy(wchar_t * __restrict, const wchar_t * __restrict); >wchar_t *wcpncpy(wchar_t * __restrict, const wchar_t * __restrict, size_t); >wchar_t *wcsdup(const wchar_t *) __malloc_like; >int wcscasecmp(const wchar_t *, const wchar_t *); >int wcsncasecmp(const wchar_t *, const wchar_t *, size_t n); >size_t wcsnlen(const wchar_t *, size_t) __pure; >size_t wcsnrtombs(char * __restrict, const wchar_t ** __restrict, size_t, > size_t, mbstate_t * __restrict); >#endif ># 227 "/usr/obj/usr/src/tmp/usr/include/wchar.h" 3 4 > >#if __BSD_VISIBLE >wchar_t *fgetwln(FILE * __restrict, size_t * __restrict); >size_t wcslcat(wchar_t *, const wchar_t *, size_t); >size_t wcslcpy(wchar_t *, const wchar_t *, size_t); >#endif ># 233 "/usr/obj/usr/src/tmp/usr/include/wchar.h" 3 4 > >#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_) >#if 0 /* expanded by -frewrite-includes */ >#include <xlocale/_wchar.h> >#endif /* expanded by -frewrite-includes */ ># 235 "/usr/obj/usr/src/tmp/usr/include/wchar.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/xlocale/_wchar.h" 1 3 4 >/*- > * Copyright (c) 2011, 2012 The FreeBSD Foundation > * All rights reserved. > * > * This software was developed by David Chisnall under sponsorship from > * the FreeBSD Foundation. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: stable/11/include/xlocale/_wchar.h 231673 2012-02-14 12:03:23Z theraven $ > */ > >#ifndef _LOCALE_T_DEFINED >#define _LOCALE_T_DEFINED >typedef struct _xlocale *locale_t; >#endif ># 36 "/usr/obj/usr/src/tmp/usr/include/xlocale/_wchar.h" 3 4 > >#ifndef _XLOCALE_WCHAR1_H >#define _XLOCALE_WCHAR1_H >int wcscasecmp_l(const wchar_t *, const wchar_t *, > locale_t); >int wcsncasecmp_l(const wchar_t *, const wchar_t *, size_t, > locale_t); >int wcscoll_l(const wchar_t *, const wchar_t *, locale_t); >size_t wcsxfrm_l(wchar_t * __restrict, > const wchar_t * __restrict, size_t, locale_t); > >#endif /* _XLOCALE_WCHAR1_H */ ># 48 "/usr/obj/usr/src/tmp/usr/include/xlocale/_wchar.h" 3 4 > >/* > * Only declare the non-POSIX functions if we're included from xlocale.h. > */ > >#ifdef _XLOCALE_H_ >#ifndef _XLOCALE_WCHAR2_H >#define _XLOCALE_WCHAR2_H > >wint_t btowc_l(int, locale_t); >wint_t fgetwc_l(FILE *, locale_t); >wchar_t *fgetws_l(wchar_t * __restrict, int, FILE * __restrict, > locale_t); >wint_t fputwc_l(wchar_t, FILE *, locale_t); >int fputws_l(const wchar_t * __restrict, FILE * __restrict, > locale_t); >int fwprintf_l(FILE * __restrict, locale_t, > const wchar_t * __restrict, ...); >int fwscanf_l(FILE * __restrict, locale_t, > const wchar_t * __restrict, ...); >wint_t getwc_l(FILE *, locale_t); >wint_t getwchar_l(locale_t); >size_t mbrlen_l(const char * __restrict, size_t, > mbstate_t * __restrict, locale_t); >size_t mbrtowc_l(wchar_t * __restrict, > const char * __restrict, size_t, > mbstate_t * __restrict, locale_t); >int mbsinit_l(const mbstate_t *, locale_t); >size_t mbsrtowcs_l(wchar_t * __restrict, > const char ** __restrict, size_t, > mbstate_t * __restrict, locale_t); >wint_t putwc_l(wchar_t, FILE *, locale_t); >wint_t putwchar_l(wchar_t, locale_t); >int swprintf_l(wchar_t * __restrict, size_t n, locale_t, > const wchar_t * __restrict, ...); >int swscanf_l(const wchar_t * __restrict, locale_t, > const wchar_t * __restrict, ...); >wint_t ungetwc_l(wint_t, FILE *, locale_t); >int vfwprintf_l(FILE * __restrict, locale_t, > const wchar_t * __restrict, __va_list); >int vswprintf_l(wchar_t * __restrict, size_t n, locale_t, > const wchar_t * __restrict, __va_list); >int vwprintf_l(locale_t, const wchar_t * __restrict, > __va_list); >size_t wcrtomb_l(char * __restrict, wchar_t, > mbstate_t * __restrict, locale_t); >size_t wcsftime_l(wchar_t * __restrict, size_t, > const wchar_t * __restrict, > const struct tm * __restrict, locale_t); >size_t wcsrtombs_l(char * __restrict, > const wchar_t ** __restrict, size_t, > mbstate_t * __restrict, locale_t); >double wcstod_l(const wchar_t * __restrict, > wchar_t ** __restrict, locale_t); >long wcstol_l(const wchar_t * __restrict, > wchar_t ** __restrict, int, locale_t); >unsigned long wcstoul_l(const wchar_t * __restrict, > wchar_t ** __restrict, int, locale_t); >int wcswidth_l(const wchar_t *, size_t, locale_t); >int wctob_l(wint_t, locale_t); >int wcwidth_l(wchar_t, locale_t); >int wprintf_l(locale_t, const wchar_t * __restrict, ...); >int wscanf_l(locale_t, const wchar_t * __restrict, ...); >int vfwscanf_l(FILE * __restrict, locale_t, > const wchar_t * __restrict, __va_list); >int vswscanf_l(const wchar_t * __restrict, locale_t, > const wchar_t *__restrict, __va_list); >int vwscanf_l(locale_t, const wchar_t * __restrict, > __va_list); >float wcstof_l(const wchar_t * __restrict, > wchar_t ** __restrict, locale_t); >long double wcstold_l(const wchar_t * __restrict, > wchar_t ** __restrict, locale_t); >long long wcstoll_l(const wchar_t * __restrict, > wchar_t ** __restrict, int, locale_t); >unsigned long long wcstoull_l(const wchar_t * __restrict, > wchar_t ** __restrict, int, locale_t); >size_t mbsnrtowcs_l(wchar_t * __restrict, > const char ** __restrict, size_t, size_t, > mbstate_t * __restrict, locale_t); >size_t wcsnrtombs_l(char * __restrict, > const wchar_t ** __restrict, size_t, size_t, > mbstate_t * __restrict, locale_t); > >#endif /* _XLOCALE_WCHAR_H */ ># 133 "/usr/obj/usr/src/tmp/usr/include/xlocale/_wchar.h" 3 4 >#endif /* _XLOCALE_H_ */ ># 134 "/usr/obj/usr/src/tmp/usr/include/xlocale/_wchar.h" 3 4 ># 236 "/usr/obj/usr/src/tmp/usr/include/wchar.h" 2 3 4 >#endif ># 237 "/usr/obj/usr/src/tmp/usr/include/wchar.h" 3 4 >__END_DECLS > >#endif /* !_WCHAR_H_ */ ># 240 "/usr/obj/usr/src/tmp/usr/include/wchar.h" 3 4 ># 382 "./curses.h" 2 >#endif ># 383 "./curses.h" > >#if 0 >typedef unsigned short wchar_t1; >#endif ># 387 "./curses.h" > >#if 0 >typedef unsigned int wint_t1; >#endif ># 391 "./curses.h" > >/* > * cchar_t stores an array of CCHARW_MAX wide characters. The first is > * normally a spacing character. The others are non-spacing. If those > * (spacing and nonspacing) do not fill the array, a null L'\0' follows. > * Otherwise, a null is assumed to follow when extracting via getcchar(). > */ >#define CCHARW_MAX 5 >typedef struct >{ > attr_t attr; > wchar_t chars[CCHARW_MAX]; >#if 0 >#undef NCURSES_EXT_COLORS >#define NCURSES_EXT_COLORS 20140222 > int ext_color; /* color pair, must be more than 16-bits */ >#endif ># 408 "./curses.h" >} >cchar_t; > >#endif /* NCURSES_WIDECHAR */ ># 412 "./curses.h" > >#if !NCURSES_OPAQUE >struct ldat; > >struct _win_st >{ > NCURSES_SIZE_T _cury, _curx; /* current cursor position */ > > /* window location and size */ > NCURSES_SIZE_T _maxy, _maxx; /* maximums of x and y, NOT window size */ > NCURSES_SIZE_T _begy, _begx; /* screen coords of upper-left-hand corner */ > > short _flags; /* window state flags */ > > /* attribute tracking */ > attr_t _attrs; /* current attribute for non-space character */ > chtype _bkgd; /* current background char/attribute pair */ > > /* option values set by user */ > bool _notimeout; /* no time out on function-key entry? */ > bool _clear; /* consider all data in the window invalid? */ > bool _leaveok; /* OK to not reset cursor on exit? */ > bool _scroll; /* OK to scroll this window? */ > bool _idlok; /* OK to use insert/delete line? */ > bool _idcok; /* OK to use insert/delete char? */ > bool _immed; /* window in immed mode? (not yet used) */ > bool _sync; /* window in sync mode? */ > bool _use_keypad; /* process function keys into KEY_ symbols? */ > int _delay; /* 0 = nodelay, <0 = blocking, >0 = delay */ > > struct ldat *_line; /* the actual line data */ > > /* global screen state */ > NCURSES_SIZE_T _regtop; /* top line of scrolling region */ > NCURSES_SIZE_T _regbottom; /* bottom line of scrolling region */ > > /* these are used only if this is a sub-window */ > int _parx; /* x coordinate of this window in parent */ > int _pary; /* y coordinate of this window in parent */ > WINDOW *_parent; /* pointer to parent if a sub-window */ > > /* these are used only if this is a pad */ > struct pdat > { > NCURSES_SIZE_T _pad_y, _pad_x; > NCURSES_SIZE_T _pad_top, _pad_left; > NCURSES_SIZE_T _pad_bottom, _pad_right; > } _pad; > > NCURSES_SIZE_T _yoffset; /* real begy is _begy + _yoffset */ > >#if NCURSES_WIDECHAR > cchar_t _bkgrnd; /* current background char/attribute pair */ >#if 0 > int _color; /* current color-pair for non-space character */ >#endif ># 468 "./curses.h" >#endif ># 469 "./curses.h" >}; >#endif /* NCURSES_OPAQUE */ ># 471 "./curses.h" > >/* > * This is an extension to support events... > */ >#if 1 >#ifdef NCURSES_WGETCH_EVENTS >#if !defined(__BEOS__) || defined(__HAIKU__) > /* Fix _nc_timed_wait() on BEOS... */ ># define NCURSES_EVENT_VERSION 1 >#endif /* !defined(__BEOS__) */ ># 481 "./curses.h" > >/* > * Bits to set in _nc_event.data.flags > */ ># define _NC_EVENT_TIMEOUT_MSEC 1 ># define _NC_EVENT_FILE 2 ># define _NC_EVENT_FILE_READABLE 2 ># if 0 /* Not supported yet... */ ># define _NC_EVENT_FILE_WRITABLE 4 ># define _NC_EVENT_FILE_EXCEPTION 8 ># endif ># 492 "./curses.h" > >typedef struct >{ > int type; > union > { > long timeout_msec; /* _NC_EVENT_TIMEOUT_MSEC */ > struct > { > unsigned int flags; > int fd; > unsigned int result; > } fev; /* _NC_EVENT_FILE */ > } data; >} _nc_event; > >typedef struct >{ > int count; > int result_flags; /* _NC_EVENT_TIMEOUT_MSEC or _NC_EVENT_FILE_READABLE */ > _nc_event *events[1]; >} _nc_eventlist; > >extern NCURSES_EXPORT(int) wgetch_events (WINDOW *, _nc_eventlist *); /* experimental */ >extern NCURSES_EXPORT(int) wgetnstr_events (WINDOW *,char *,int,_nc_eventlist *);/* experimental */ > >#endif /* NCURSES_WGETCH_EVENTS */ ># 519 "./curses.h" >#endif /* NCURSES_EXT_FUNCS */ ># 520 "./curses.h" > >/* > * GCC (and some other compilers) define '__attribute__'; we're using this > * macro to alert the compiler to flag inconsistencies in printf/scanf-like > * function calls. Just in case '__attribute__' isn't defined, make a dummy. > * Old versions of G++ do not accept it anyway, at least not consistently with > * GCC. > */ >#if !(defined(__GNUC__) || defined(__GNUG__) || defined(__attribute__)) >#define __attribute__(p) /* nothing */ >#endif ># 531 "./curses.h" > >/* > * We cannot define these in ncurses_cfg.h, since they require parameters to be > * passed (that is non-portable). If you happen to be using gcc with warnings > * enabled, define > * GCC_PRINTF > * GCC_SCANF > * to improve checking of calls to printw(), etc. > */ >#ifndef GCC_PRINTFLIKE >#if defined(GCC_PRINTF) && !defined(printf) >#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var))) >#else ># 544 "./curses.h" >#define GCC_PRINTFLIKE(fmt,var) /*nothing*/ >#endif ># 546 "./curses.h" >#endif ># 547 "./curses.h" > >#ifndef GCC_SCANFLIKE >#if defined(GCC_SCANF) && !defined(scanf) >#define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var))) >#else ># 552 "./curses.h" >#define GCC_SCANFLIKE(fmt,var) /*nothing*/ >#endif ># 554 "./curses.h" >#endif ># 555 "./curses.h" > >#ifndef GCC_NORETURN >#define GCC_NORETURN /* nothing */ >#endif ># 559 "./curses.h" > >#ifndef GCC_UNUSED >#define GCC_UNUSED /* nothing */ >#endif ># 563 "./curses.h" > >/* > * Curses uses a helper function. Define our type for this to simplify > * extending it for the sp-funcs feature. > */ >typedef int (*NCURSES_OUTC)(int); > >/* > * Function prototypes. This is the complete X/Open Curses list of required > * functions. Those marked `generated' will have sources generated from the > * macro definitions later in this file, in order to satisfy XPG4.2 > * requirements. > */ > >extern NCURSES_EXPORT(int) addch (const chtype); /* generated */ >extern NCURSES_EXPORT(int) addchnstr (const chtype *, int); /* generated */ >extern NCURSES_EXPORT(int) addchstr (const chtype *); /* generated */ >extern NCURSES_EXPORT(int) addnstr (const char *, int); /* generated */ >extern NCURSES_EXPORT(int) addstr (const char *); /* generated */ >extern NCURSES_EXPORT(int) attroff (NCURSES_ATTR_T); /* generated */ >extern NCURSES_EXPORT(int) attron (NCURSES_ATTR_T); /* generated */ >extern NCURSES_EXPORT(int) attrset (NCURSES_ATTR_T); /* generated */ >extern NCURSES_EXPORT(int) attr_get (attr_t *, NCURSES_PAIRS_T *, void *); /* generated */ >extern NCURSES_EXPORT(int) attr_off (attr_t, void *); /* generated */ >extern NCURSES_EXPORT(int) attr_on (attr_t, void *); /* generated */ >extern NCURSES_EXPORT(int) attr_set (attr_t, NCURSES_PAIRS_T, void *); /* generated */ >extern NCURSES_EXPORT(int) baudrate (void); /* implemented */ >extern NCURSES_EXPORT(int) beep (void); /* implemented */ >extern NCURSES_EXPORT(int) bkgd (chtype); /* generated */ >extern NCURSES_EXPORT(void) bkgdset (chtype); /* generated */ >extern NCURSES_EXPORT(int) border (chtype,chtype,chtype,chtype,chtype,chtype,chtype,chtype); /* generated */ >extern NCURSES_EXPORT(int) box (WINDOW *, chtype, chtype); /* generated */ >extern NCURSES_EXPORT(bool) can_change_color (void); /* implemented */ >extern NCURSES_EXPORT(int) cbreak (void); /* implemented */ >extern NCURSES_EXPORT(int) chgat (int, attr_t, NCURSES_PAIRS_T, const void *); /* generated */ >extern NCURSES_EXPORT(int) clear (void); /* generated */ >extern NCURSES_EXPORT(int) clearok (WINDOW *,bool); /* implemented */ >extern NCURSES_EXPORT(int) clrtobot (void); /* generated */ >extern NCURSES_EXPORT(int) clrtoeol (void); /* generated */ >extern NCURSES_EXPORT(int) color_content (NCURSES_COLOR_T,NCURSES_COLOR_T*,NCURSES_COLOR_T*,NCURSES_COLOR_T*); /* implemented */ >extern NCURSES_EXPORT(int) color_set (NCURSES_PAIRS_T,void*); /* generated */ >extern NCURSES_EXPORT(int) COLOR_PAIR (int); /* generated */ >extern NCURSES_EXPORT(int) copywin (const WINDOW*,WINDOW*,int,int,int,int,int,int,int); /* implemented */ >extern NCURSES_EXPORT(int) curs_set (int); /* implemented */ >extern NCURSES_EXPORT(int) def_prog_mode (void); /* implemented */ >extern NCURSES_EXPORT(int) def_shell_mode (void); /* implemented */ >extern NCURSES_EXPORT(int) delay_output (int); /* implemented */ >extern NCURSES_EXPORT(int) delch (void); /* generated */ >extern NCURSES_EXPORT(void) delscreen (SCREEN *); /* implemented */ >extern NCURSES_EXPORT(int) delwin (WINDOW *); /* implemented */ >extern NCURSES_EXPORT(int) deleteln (void); /* generated */ >extern NCURSES_EXPORT(WINDOW *) derwin (WINDOW *,int,int,int,int); /* implemented */ >extern NCURSES_EXPORT(int) doupdate (void); /* implemented */ >extern NCURSES_EXPORT(WINDOW *) dupwin (WINDOW *); /* implemented */ >extern NCURSES_EXPORT(int) echo (void); /* implemented */ >extern NCURSES_EXPORT(int) echochar (const chtype); /* generated */ >extern NCURSES_EXPORT(int) erase (void); /* generated */ >extern NCURSES_EXPORT(int) endwin (void); /* implemented */ >extern NCURSES_EXPORT(char) erasechar (void); /* implemented */ >extern NCURSES_EXPORT(void) filter (void); /* implemented */ >extern NCURSES_EXPORT(int) flash (void); /* implemented */ >extern NCURSES_EXPORT(int) flushinp (void); /* implemented */ >extern NCURSES_EXPORT(chtype) getbkgd (WINDOW *); /* generated */ >extern NCURSES_EXPORT(int) getch (void); /* generated */ >extern NCURSES_EXPORT(int) getnstr (char *, int); /* generated */ >extern NCURSES_EXPORT(int) getstr (char *); /* generated */ >extern NCURSES_EXPORT(WINDOW *) getwin (FILE *); /* implemented */ >extern NCURSES_EXPORT(int) halfdelay (int); /* implemented */ >extern NCURSES_EXPORT(bool) has_colors (void); /* implemented */ >extern NCURSES_EXPORT(bool) has_ic (void); /* implemented */ >extern NCURSES_EXPORT(bool) has_il (void); /* implemented */ >extern NCURSES_EXPORT(int) hline (chtype, int); /* generated */ >extern NCURSES_EXPORT(void) idcok (WINDOW *, bool); /* implemented */ >extern NCURSES_EXPORT(int) idlok (WINDOW *, bool); /* implemented */ >extern NCURSES_EXPORT(void) immedok (WINDOW *, bool); /* implemented */ >extern NCURSES_EXPORT(chtype) inch (void); /* generated */ >extern NCURSES_EXPORT(int) inchnstr (chtype *, int); /* generated */ >extern NCURSES_EXPORT(int) inchstr (chtype *); /* generated */ >extern NCURSES_EXPORT(WINDOW *) initscr (void); /* implemented */ >extern NCURSES_EXPORT(int) init_color (NCURSES_COLOR_T,NCURSES_COLOR_T,NCURSES_COLOR_T,NCURSES_COLOR_T); /* implemented */ >extern NCURSES_EXPORT(int) init_pair (NCURSES_PAIRS_T,NCURSES_COLOR_T,NCURSES_COLOR_T); /* implemented */ >extern NCURSES_EXPORT(int) innstr (char *, int); /* generated */ >extern NCURSES_EXPORT(int) insch (chtype); /* generated */ >extern NCURSES_EXPORT(int) insdelln (int); /* generated */ >extern NCURSES_EXPORT(int) insertln (void); /* generated */ >extern NCURSES_EXPORT(int) insnstr (const char *, int); /* generated */ >extern NCURSES_EXPORT(int) insstr (const char *); /* generated */ >extern NCURSES_EXPORT(int) instr (char *); /* generated */ >extern NCURSES_EXPORT(int) intrflush (WINDOW *,bool); /* implemented */ >extern NCURSES_EXPORT(bool) isendwin (void); /* implemented */ >extern NCURSES_EXPORT(bool) is_linetouched (WINDOW *,int); /* implemented */ >extern NCURSES_EXPORT(bool) is_wintouched (WINDOW *); /* implemented */ >extern NCURSES_EXPORT(NCURSES_CONST char *) keyname (int); /* implemented */ >extern NCURSES_EXPORT(int) keypad (WINDOW *,bool); /* implemented */ >extern NCURSES_EXPORT(char) killchar (void); /* implemented */ >extern NCURSES_EXPORT(int) leaveok (WINDOW *,bool); /* implemented */ >extern NCURSES_EXPORT(char *) longname (void); /* implemented */ >extern NCURSES_EXPORT(int) meta (WINDOW *,bool); /* implemented */ >extern NCURSES_EXPORT(int) move (int, int); /* generated */ >extern NCURSES_EXPORT(int) mvaddch (int, int, const chtype); /* generated */ >extern NCURSES_EXPORT(int) mvaddchnstr (int, int, const chtype *, int); /* generated */ >extern NCURSES_EXPORT(int) mvaddchstr (int, int, const chtype *); /* generated */ >extern NCURSES_EXPORT(int) mvaddnstr (int, int, const char *, int); /* generated */ >extern NCURSES_EXPORT(int) mvaddstr (int, int, const char *); /* generated */ >extern NCURSES_EXPORT(int) mvchgat (int, int, int, attr_t, NCURSES_PAIRS_T, const void *); /* generated */ >extern NCURSES_EXPORT(int) mvcur (int,int,int,int); /* implemented */ >extern NCURSES_EXPORT(int) mvdelch (int, int); /* generated */ >extern NCURSES_EXPORT(int) mvderwin (WINDOW *, int, int); /* implemented */ >extern NCURSES_EXPORT(int) mvgetch (int, int); /* generated */ >extern NCURSES_EXPORT(int) mvgetnstr (int, int, char *, int); /* generated */ >extern NCURSES_EXPORT(int) mvgetstr (int, int, char *); /* generated */ >extern NCURSES_EXPORT(int) mvhline (int, int, chtype, int); /* generated */ >extern NCURSES_EXPORT(chtype) mvinch (int, int); /* generated */ >extern NCURSES_EXPORT(int) mvinchnstr (int, int, chtype *, int); /* generated */ >extern NCURSES_EXPORT(int) mvinchstr (int, int, chtype *); /* generated */ >extern NCURSES_EXPORT(int) mvinnstr (int, int, char *, int); /* generated */ >extern NCURSES_EXPORT(int) mvinsch (int, int, chtype); /* generated */ >extern NCURSES_EXPORT(int) mvinsnstr (int, int, const char *, int); /* generated */ >extern NCURSES_EXPORT(int) mvinsstr (int, int, const char *); /* generated */ >extern NCURSES_EXPORT(int) mvinstr (int, int, char *); /* generated */ >extern NCURSES_EXPORT(int) mvprintw (int,int, const char *,...) /* implemented */ > GCC_PRINTFLIKE(3,4); >extern NCURSES_EXPORT(int) mvscanw (int,int, NCURSES_CONST char *,...) /* implemented */ > GCC_SCANFLIKE(3,4); >extern NCURSES_EXPORT(int) mvvline (int, int, chtype, int); /* generated */ >extern NCURSES_EXPORT(int) mvwaddch (WINDOW *, int, int, const chtype); /* generated */ >extern NCURSES_EXPORT(int) mvwaddchnstr (WINDOW *, int, int, const chtype *, int);/* generated */ >extern NCURSES_EXPORT(int) mvwaddchstr (WINDOW *, int, int, const chtype *); /* generated */ >extern NCURSES_EXPORT(int) mvwaddnstr (WINDOW *, int, int, const char *, int); /* generated */ >extern NCURSES_EXPORT(int) mvwaddstr (WINDOW *, int, int, const char *); /* generated */ >extern NCURSES_EXPORT(int) mvwchgat (WINDOW *, int, int, int, attr_t, NCURSES_PAIRS_T, const void *);/* generated */ >extern NCURSES_EXPORT(int) mvwdelch (WINDOW *, int, int); /* generated */ >extern NCURSES_EXPORT(int) mvwgetch (WINDOW *, int, int); /* generated */ >extern NCURSES_EXPORT(int) mvwgetnstr (WINDOW *, int, int, char *, int); /* generated */ >extern NCURSES_EXPORT(int) mvwgetstr (WINDOW *, int, int, char *); /* generated */ >extern NCURSES_EXPORT(int) mvwhline (WINDOW *, int, int, chtype, int); /* generated */ >extern NCURSES_EXPORT(int) mvwin (WINDOW *,int,int); /* implemented */ >extern NCURSES_EXPORT(chtype) mvwinch (WINDOW *, int, int); /* generated */ >extern NCURSES_EXPORT(int) mvwinchnstr (WINDOW *, int, int, chtype *, int); /* generated */ >extern NCURSES_EXPORT(int) mvwinchstr (WINDOW *, int, int, chtype *); /* generated */ >extern NCURSES_EXPORT(int) mvwinnstr (WINDOW *, int, int, char *, int); /* generated */ >extern NCURSES_EXPORT(int) mvwinsch (WINDOW *, int, int, chtype); /* generated */ >extern NCURSES_EXPORT(int) mvwinsnstr (WINDOW *, int, int, const char *, int); /* generated */ >extern NCURSES_EXPORT(int) mvwinsstr (WINDOW *, int, int, const char *); /* generated */ >extern NCURSES_EXPORT(int) mvwinstr (WINDOW *, int, int, char *); /* generated */ >extern NCURSES_EXPORT(int) mvwprintw (WINDOW*,int,int, const char *,...) /* implemented */ > GCC_PRINTFLIKE(4,5); >extern NCURSES_EXPORT(int) mvwscanw (WINDOW *,int,int, NCURSES_CONST char *,...) /* implemented */ > GCC_SCANFLIKE(4,5); >extern NCURSES_EXPORT(int) mvwvline (WINDOW *,int, int, chtype, int); /* generated */ >extern NCURSES_EXPORT(int) napms (int); /* implemented */ >extern NCURSES_EXPORT(WINDOW *) newpad (int,int); /* implemented */ >extern NCURSES_EXPORT(SCREEN *) newterm (NCURSES_CONST char *,FILE *,FILE *); /* implemented */ >extern NCURSES_EXPORT(WINDOW *) newwin (int,int,int,int); /* implemented */ >extern NCURSES_EXPORT(int) nl (void); /* implemented */ >extern NCURSES_EXPORT(int) nocbreak (void); /* implemented */ >extern NCURSES_EXPORT(int) nodelay (WINDOW *,bool); /* implemented */ >extern NCURSES_EXPORT(int) noecho (void); /* implemented */ >extern NCURSES_EXPORT(int) nonl (void); /* implemented */ >extern NCURSES_EXPORT(void) noqiflush (void); /* implemented */ >extern NCURSES_EXPORT(int) noraw (void); /* implemented */ >extern NCURSES_EXPORT(int) notimeout (WINDOW *,bool); /* implemented */ >extern NCURSES_EXPORT(int) overlay (const WINDOW*,WINDOW *); /* implemented */ >extern NCURSES_EXPORT(int) overwrite (const WINDOW*,WINDOW *); /* implemented */ >extern NCURSES_EXPORT(int) pair_content (NCURSES_PAIRS_T,NCURSES_COLOR_T*,NCURSES_COLOR_T*); /* implemented */ >extern NCURSES_EXPORT(int) PAIR_NUMBER (int); /* generated */ >extern NCURSES_EXPORT(int) pechochar (WINDOW *, const chtype); /* implemented */ >extern NCURSES_EXPORT(int) pnoutrefresh (WINDOW*,int,int,int,int,int,int);/* implemented */ >extern NCURSES_EXPORT(int) prefresh (WINDOW *,int,int,int,int,int,int); /* implemented */ >extern NCURSES_EXPORT(int) printw (const char *,...) /* implemented */ > GCC_PRINTFLIKE(1,2); >extern NCURSES_EXPORT(int) putwin (WINDOW *, FILE *); /* implemented */ >extern NCURSES_EXPORT(void) qiflush (void); /* implemented */ >extern NCURSES_EXPORT(int) raw (void); /* implemented */ >extern NCURSES_EXPORT(int) redrawwin (WINDOW *); /* generated */ >extern NCURSES_EXPORT(int) refresh (void); /* generated */ >extern NCURSES_EXPORT(int) resetty (void); /* implemented */ >extern NCURSES_EXPORT(int) reset_prog_mode (void); /* implemented */ >extern NCURSES_EXPORT(int) reset_shell_mode (void); /* implemented */ >extern NCURSES_EXPORT(int) ripoffline (int, int (*)(WINDOW *, int)); /* implemented */ >extern NCURSES_EXPORT(int) savetty (void); /* implemented */ >extern NCURSES_EXPORT(int) scanw (NCURSES_CONST char *,...) /* implemented */ > GCC_SCANFLIKE(1,2); >extern NCURSES_EXPORT(int) scr_dump (const char *); /* implemented */ >extern NCURSES_EXPORT(int) scr_init (const char *); /* implemented */ >extern NCURSES_EXPORT(int) scrl (int); /* generated */ >extern NCURSES_EXPORT(int) scroll (WINDOW *); /* generated */ >extern NCURSES_EXPORT(int) scrollok (WINDOW *,bool); /* implemented */ >extern NCURSES_EXPORT(int) scr_restore (const char *); /* implemented */ >extern NCURSES_EXPORT(int) scr_set (const char *); /* implemented */ >extern NCURSES_EXPORT(int) setscrreg (int,int); /* generated */ >extern NCURSES_EXPORT(SCREEN *) set_term (SCREEN *); /* implemented */ >extern NCURSES_EXPORT(int) slk_attroff (const chtype); /* implemented */ >extern NCURSES_EXPORT(int) slk_attr_off (const attr_t, void *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) slk_attron (const chtype); /* implemented */ >extern NCURSES_EXPORT(int) slk_attr_on (attr_t,void*); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) slk_attrset (const chtype); /* implemented */ >extern NCURSES_EXPORT(attr_t) slk_attr (void); /* implemented */ >extern NCURSES_EXPORT(int) slk_attr_set (const attr_t,NCURSES_PAIRS_T,void*); /* implemented */ >extern NCURSES_EXPORT(int) slk_clear (void); /* implemented */ >extern NCURSES_EXPORT(int) slk_color (NCURSES_PAIRS_T); /* implemented */ >extern NCURSES_EXPORT(int) slk_init (int); /* implemented */ >extern NCURSES_EXPORT(char *) slk_label (int); /* implemented */ >extern NCURSES_EXPORT(int) slk_noutrefresh (void); /* implemented */ >extern NCURSES_EXPORT(int) slk_refresh (void); /* implemented */ >extern NCURSES_EXPORT(int) slk_restore (void); /* implemented */ >extern NCURSES_EXPORT(int) slk_set (int,const char *,int); /* implemented */ >extern NCURSES_EXPORT(int) slk_touch (void); /* implemented */ >extern NCURSES_EXPORT(int) standout (void); /* generated */ >extern NCURSES_EXPORT(int) standend (void); /* generated */ >extern NCURSES_EXPORT(int) start_color (void); /* implemented */ >extern NCURSES_EXPORT(WINDOW *) subpad (WINDOW *, int, int, int, int); /* implemented */ >extern NCURSES_EXPORT(WINDOW *) subwin (WINDOW *, int, int, int, int); /* implemented */ >extern NCURSES_EXPORT(int) syncok (WINDOW *, bool); /* implemented */ >extern NCURSES_EXPORT(chtype) termattrs (void); /* implemented */ >extern NCURSES_EXPORT(char *) termname (void); /* implemented */ >extern NCURSES_EXPORT(void) timeout (int); /* generated */ >extern NCURSES_EXPORT(int) touchline (WINDOW *, int, int); /* generated */ >extern NCURSES_EXPORT(int) touchwin (WINDOW *); /* generated */ >extern NCURSES_EXPORT(int) typeahead (int); /* implemented */ >extern NCURSES_EXPORT(int) ungetch (int); /* implemented */ >extern NCURSES_EXPORT(int) untouchwin (WINDOW *); /* generated */ >extern NCURSES_EXPORT(void) use_env (bool); /* implemented */ >extern NCURSES_EXPORT(void) use_tioctl (bool); /* implemented */ >extern NCURSES_EXPORT(int) vidattr (chtype); /* implemented */ >extern NCURSES_EXPORT(int) vidputs (chtype, NCURSES_OUTC); /* implemented */ >extern NCURSES_EXPORT(int) vline (chtype, int); /* generated */ >extern NCURSES_EXPORT(int) vwprintw (WINDOW *, const char *,va_list); /* implemented */ >extern NCURSES_EXPORT(int) vw_printw (WINDOW *, const char *,va_list); /* generated */ >extern NCURSES_EXPORT(int) vwscanw (WINDOW *, NCURSES_CONST char *,va_list); /* implemented */ >extern NCURSES_EXPORT(int) vw_scanw (WINDOW *, NCURSES_CONST char *,va_list); /* generated */ >extern NCURSES_EXPORT(int) waddch (WINDOW *, const chtype); /* implemented */ >extern NCURSES_EXPORT(int) waddchnstr (WINDOW *,const chtype *,int); /* implemented */ >extern NCURSES_EXPORT(int) waddchstr (WINDOW *,const chtype *); /* generated */ >extern NCURSES_EXPORT(int) waddnstr (WINDOW *,const char *,int); /* implemented */ >extern NCURSES_EXPORT(int) waddstr (WINDOW *,const char *); /* generated */ >extern NCURSES_EXPORT(int) wattron (WINDOW *, int); /* generated */ >extern NCURSES_EXPORT(int) wattroff (WINDOW *, int); /* generated */ >extern NCURSES_EXPORT(int) wattrset (WINDOW *, int); /* generated */ >extern NCURSES_EXPORT(int) wattr_get (WINDOW *, attr_t *, NCURSES_PAIRS_T *, void *); /* generated */ >extern NCURSES_EXPORT(int) wattr_on (WINDOW *, attr_t, void *); /* implemented */ >extern NCURSES_EXPORT(int) wattr_off (WINDOW *, attr_t, void *); /* implemented */ >extern NCURSES_EXPORT(int) wattr_set (WINDOW *, attr_t, NCURSES_PAIRS_T, void *); /* generated */ >extern NCURSES_EXPORT(int) wbkgd (WINDOW *, chtype); /* implemented */ >extern NCURSES_EXPORT(void) wbkgdset (WINDOW *,chtype); /* implemented */ >extern NCURSES_EXPORT(int) wborder (WINDOW *,chtype,chtype,chtype,chtype,chtype,chtype,chtype,chtype); /* implemented */ >extern NCURSES_EXPORT(int) wchgat (WINDOW *, int, attr_t, NCURSES_PAIRS_T, const void *);/* implemented */ >extern NCURSES_EXPORT(int) wclear (WINDOW *); /* implemented */ >extern NCURSES_EXPORT(int) wclrtobot (WINDOW *); /* implemented */ >extern NCURSES_EXPORT(int) wclrtoeol (WINDOW *); /* implemented */ >extern NCURSES_EXPORT(int) wcolor_set (WINDOW*,NCURSES_PAIRS_T,void*); /* implemented */ >extern NCURSES_EXPORT(void) wcursyncup (WINDOW *); /* implemented */ >extern NCURSES_EXPORT(int) wdelch (WINDOW *); /* implemented */ >extern NCURSES_EXPORT(int) wdeleteln (WINDOW *); /* generated */ >extern NCURSES_EXPORT(int) wechochar (WINDOW *, const chtype); /* implemented */ >extern NCURSES_EXPORT(int) werase (WINDOW *); /* implemented */ >extern NCURSES_EXPORT(int) wgetch (WINDOW *); /* implemented */ >extern NCURSES_EXPORT(int) wgetnstr (WINDOW *,char *,int); /* implemented */ >extern NCURSES_EXPORT(int) wgetstr (WINDOW *, char *); /* generated */ >extern NCURSES_EXPORT(int) whline (WINDOW *, chtype, int); /* implemented */ >extern NCURSES_EXPORT(chtype) winch (WINDOW *); /* implemented */ >extern NCURSES_EXPORT(int) winchnstr (WINDOW *, chtype *, int); /* implemented */ >extern NCURSES_EXPORT(int) winchstr (WINDOW *, chtype *); /* generated */ >extern NCURSES_EXPORT(int) winnstr (WINDOW *, char *, int); /* implemented */ >extern NCURSES_EXPORT(int) winsch (WINDOW *, chtype); /* implemented */ >extern NCURSES_EXPORT(int) winsdelln (WINDOW *,int); /* implemented */ >extern NCURSES_EXPORT(int) winsertln (WINDOW *); /* generated */ >extern NCURSES_EXPORT(int) winsnstr (WINDOW *, const char *,int); /* implemented */ >extern NCURSES_EXPORT(int) winsstr (WINDOW *, const char *); /* generated */ >extern NCURSES_EXPORT(int) winstr (WINDOW *, char *); /* generated */ >extern NCURSES_EXPORT(int) wmove (WINDOW *,int,int); /* implemented */ >extern NCURSES_EXPORT(int) wnoutrefresh (WINDOW *); /* implemented */ >extern NCURSES_EXPORT(int) wprintw (WINDOW *, const char *,...) /* implemented */ > GCC_PRINTFLIKE(2,3); >extern NCURSES_EXPORT(int) wredrawln (WINDOW *,int,int); /* implemented */ >extern NCURSES_EXPORT(int) wrefresh (WINDOW *); /* implemented */ >extern NCURSES_EXPORT(int) wscanw (WINDOW *, NCURSES_CONST char *,...) /* implemented */ > GCC_SCANFLIKE(2,3); >extern NCURSES_EXPORT(int) wscrl (WINDOW *,int); /* implemented */ >extern NCURSES_EXPORT(int) wsetscrreg (WINDOW *,int,int); /* implemented */ >extern NCURSES_EXPORT(int) wstandout (WINDOW *); /* generated */ >extern NCURSES_EXPORT(int) wstandend (WINDOW *); /* generated */ >extern NCURSES_EXPORT(void) wsyncdown (WINDOW *); /* implemented */ >extern NCURSES_EXPORT(void) wsyncup (WINDOW *); /* implemented */ >extern NCURSES_EXPORT(void) wtimeout (WINDOW *,int); /* implemented */ >extern NCURSES_EXPORT(int) wtouchln (WINDOW *,int,int,int); /* implemented */ >extern NCURSES_EXPORT(int) wvline (WINDOW *,chtype,int); /* implemented */ > >/* > * These are also declared in <term.h>: > */ >extern NCURSES_EXPORT(int) tigetflag (NCURSES_CONST char *); /* implemented */ >extern NCURSES_EXPORT(int) tigetnum (NCURSES_CONST char *); /* implemented */ >extern NCURSES_EXPORT(char *) tigetstr (NCURSES_CONST char *); /* implemented */ >extern NCURSES_EXPORT(int) putp (const char *); /* implemented */ > >#if NCURSES_TPARM_VARARGS >extern NCURSES_EXPORT(char *) tparm (NCURSES_CONST char *, ...); /* special */ >#else ># 862 "./curses.h" >extern NCURSES_EXPORT(char *) tparm (NCURSES_CONST char *, NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG); /* special */ >extern NCURSES_EXPORT(char *) tparm_varargs (NCURSES_CONST char *, ...); /* special */ >#endif ># 865 "./curses.h" > >extern NCURSES_EXPORT(char *) tiparm (const char *, ...); /* special */ > >/* > * These functions are not in X/Open, but we use them in macro definitions: > */ >extern NCURSES_EXPORT(int) getattrs (const WINDOW *); /* generated */ >extern NCURSES_EXPORT(int) getcurx (const WINDOW *); /* generated */ >extern NCURSES_EXPORT(int) getcury (const WINDOW *); /* generated */ >extern NCURSES_EXPORT(int) getbegx (const WINDOW *); /* generated */ >extern NCURSES_EXPORT(int) getbegy (const WINDOW *); /* generated */ >extern NCURSES_EXPORT(int) getmaxx (const WINDOW *); /* generated */ >extern NCURSES_EXPORT(int) getmaxy (const WINDOW *); /* generated */ >extern NCURSES_EXPORT(int) getparx (const WINDOW *); /* generated */ >extern NCURSES_EXPORT(int) getpary (const WINDOW *); /* generated */ > >/* > * vid_attr() was implemented originally based on a draft of X/Open curses. > */ >#if !NCURSES_WIDECHAR >#define vid_attr(a,pair,opts) vidattr(a) >#endif ># 887 "./curses.h" > >/* > * These functions are extensions - not in X/Open Curses. > */ >#if 1 >#undef NCURSES_EXT_FUNCS >#define NCURSES_EXT_FUNCS 20140222 >typedef int (*NCURSES_WINDOW_CB)(WINDOW *, void *); >typedef int (*NCURSES_SCREEN_CB)(SCREEN *, void *); >extern NCURSES_EXPORT(bool) is_term_resized (int, int); >extern NCURSES_EXPORT(char *) keybound (int, int); >extern NCURSES_EXPORT(const char *) curses_version (void); >extern NCURSES_EXPORT(int) assume_default_colors (int, int); >extern NCURSES_EXPORT(int) define_key (const char *, int); >extern NCURSES_EXPORT(int) get_escdelay (void); >extern NCURSES_EXPORT(int) key_defined (const char *); >extern NCURSES_EXPORT(int) keyok (int, bool); >extern NCURSES_EXPORT(int) resize_term (int, int); >extern NCURSES_EXPORT(int) resizeterm (int, int); >extern NCURSES_EXPORT(int) set_escdelay (int); >extern NCURSES_EXPORT(int) set_tabsize (int); >extern NCURSES_EXPORT(int) use_default_colors (void); >extern NCURSES_EXPORT(int) use_extended_names (bool); >extern NCURSES_EXPORT(int) use_legacy_coding (int); >extern NCURSES_EXPORT(int) use_screen (SCREEN *, NCURSES_SCREEN_CB, void *); >extern NCURSES_EXPORT(int) use_window (WINDOW *, NCURSES_WINDOW_CB, void *); >extern NCURSES_EXPORT(int) wresize (WINDOW *, int, int); >extern NCURSES_EXPORT(void) nofilter(void); > >/* > * These extensions provide access to information stored in the WINDOW even > * when NCURSES_OPAQUE is set: > */ >extern NCURSES_EXPORT(WINDOW *) wgetparent (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */ >extern NCURSES_EXPORT(bool) is_cleared (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */ >extern NCURSES_EXPORT(bool) is_idcok (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */ >extern NCURSES_EXPORT(bool) is_idlok (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */ >extern NCURSES_EXPORT(bool) is_immedok (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */ >extern NCURSES_EXPORT(bool) is_keypad (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */ >extern NCURSES_EXPORT(bool) is_leaveok (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */ >extern NCURSES_EXPORT(bool) is_nodelay (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */ >extern NCURSES_EXPORT(bool) is_notimeout (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */ >extern NCURSES_EXPORT(bool) is_pad (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */ >extern NCURSES_EXPORT(bool) is_scrollok (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */ >extern NCURSES_EXPORT(bool) is_subwin (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */ >extern NCURSES_EXPORT(bool) is_syncok (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */ >extern NCURSES_EXPORT(int) wgetscrreg (const WINDOW *, int *, int *); /* @GENERATED_EXT_FUNCS@ */ > >#else ># 936 "./curses.h" >#define curses_version() NCURSES_VERSION >#endif ># 938 "./curses.h" > >/* > * Extra extension-functions, which pass a SCREEN pointer rather than using > * a global variable SP. > */ >#if 0 >#undef NCURSES_SP_FUNCS >#define NCURSES_SP_FUNCS 20140222 >#define NCURSES_SP_NAME(name) name##_sp > >/* Define the sp-funcs helper function */ >#define NCURSES_SP_OUTC NCURSES_SP_NAME(NCURSES_OUTC) >typedef int (*NCURSES_SP_OUTC)(SCREEN*, int); > >extern NCURSES_EXPORT(SCREEN *) new_prescr (void); /* implemented:SP_FUNC */ > >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(baudrate) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(beep) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(can_change_color) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(cbreak) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(curs_set) (SCREEN*, int); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(color_content) (SCREEN*, NCURSES_PAIRS_T, NCURSES_COLOR_T*, NCURSES_COLOR_T*, NCURSES_COLOR_T*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(def_prog_mode) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(def_shell_mode) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(delay_output) (SCREEN*, int); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(doupdate) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(echo) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(endwin) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(char) NCURSES_SP_NAME(erasechar) (SCREEN*);/* implemented:SP_FUNC */ >extern NCURSES_EXPORT(void) NCURSES_SP_NAME(filter) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(flash) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(flushinp) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(WINDOW *) NCURSES_SP_NAME(getwin) (SCREEN*, FILE *); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(halfdelay) (SCREEN*, int); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(has_colors) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(has_ic) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(has_il) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(init_color) (SCREEN*, NCURSES_COLOR_T, NCURSES_COLOR_T, NCURSES_COLOR_T, NCURSES_COLOR_T); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(init_pair) (SCREEN*, NCURSES_PAIRS_T, NCURSES_COLOR_T, NCURSES_COLOR_T); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(intrflush) (SCREEN*, WINDOW*, bool); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(isendwin) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(NCURSES_CONST char *) NCURSES_SP_NAME(keyname) (SCREEN*, int); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(char) NCURSES_SP_NAME(killchar) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(longname) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(mvcur) (SCREEN*, int, int, int, int); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(napms) (SCREEN*, int); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(WINDOW *) NCURSES_SP_NAME(newpad) (SCREEN*, int, int); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(SCREEN *) NCURSES_SP_NAME(newterm) (SCREEN*, NCURSES_CONST char *, FILE *, FILE *); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(WINDOW *) NCURSES_SP_NAME(newwin) (SCREEN*, int, int, int, int); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(nl) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(nocbreak) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(noecho) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(nonl) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(void) NCURSES_SP_NAME(noqiflush) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(noraw) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(pair_content) (SCREEN*, NCURSES_PAIRS_T, NCURSES_COLOR_T*, NCURSES_COLOR_T*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(void) NCURSES_SP_NAME(qiflush) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(raw) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(reset_prog_mode) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(reset_shell_mode) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(resetty) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(ripoffline) (SCREEN*, int, int (*)(WINDOW *, int)); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(savetty) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(scr_init) (SCREEN*, const char *); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(scr_restore) (SCREEN*, const char *); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(scr_set) (SCREEN*, const char *); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_attroff) (SCREEN*, const chtype); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_attron) (SCREEN*, const chtype); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_attrset) (SCREEN*, const chtype); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(attr_t) NCURSES_SP_NAME(slk_attr) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_attr_set) (SCREEN*, const attr_t, NCURSES_PAIRS_T, void*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_clear) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_color) (SCREEN*, NCURSES_PAIRS_T); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_init) (SCREEN*, int); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(slk_label) (SCREEN*, int); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_noutrefresh) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_refresh) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_restore) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_set) (SCREEN*, int, const char *, int); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_touch) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(start_color) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(chtype) NCURSES_SP_NAME(termattrs) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(termname) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(typeahead) (SCREEN*, int); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(ungetch) (SCREEN*, int); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(void) NCURSES_SP_NAME(use_env) (SCREEN*, bool); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(void) NCURSES_SP_NAME(use_tioctl) (SCREEN*, bool); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(vidattr) (SCREEN*, chtype); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(vidputs) (SCREEN*, chtype, NCURSES_SP_OUTC); /* implemented:SP_FUNC */ >#if 1 >extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(keybound) (SCREEN*, int, int); /* implemented:EXT_SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(assume_default_colors) (SCREEN*, int, int); /* implemented:EXT_SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(define_key) (SCREEN*, const char *, int); /* implemented:EXT_SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(get_escdelay) (SCREEN*); /* implemented:EXT_SP_FUNC */ >extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(is_term_resized) (SCREEN*, int, int); /* implemented:EXT_SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(key_defined) (SCREEN*, const char *); /* implemented:EXT_SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(keyok) (SCREEN*, int, bool); /* implemented:EXT_SP_FUNC */ >extern NCURSES_EXPORT(void) NCURSES_SP_NAME(nofilter) (SCREEN*); /* implemented */ /* implemented:EXT_SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(resize_term) (SCREEN*, int, int); /* implemented:EXT_SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(resizeterm) (SCREEN*, int, int); /* implemented:EXT_SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(set_escdelay) (SCREEN*, int); /* implemented:EXT_SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(set_tabsize) (SCREEN*, int); /* implemented:EXT_SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(use_default_colors) (SCREEN*); /* implemented:EXT_SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(use_legacy_coding) (SCREEN*, int); /* implemented:EXT_SP_FUNC */ >#endif ># 1043 "./curses.h" >#else ># 1044 "./curses.h" >#undef NCURSES_SP_FUNCS >#define NCURSES_SP_FUNCS 0 >#define NCURSES_SP_NAME(name) name >#define NCURSES_SP_OUTC NCURSES_OUTC >#endif ># 1049 "./curses.h" > >/* attributes */ > >#define NCURSES_ATTR_SHIFT 8 >#define NCURSES_BITS(mask,shift) (NCURSES_CAST(chtype,(mask)) << ((shift) + NCURSES_ATTR_SHIFT)) > >#define A_NORMAL (1UL - 1UL) >#define A_ATTRIBUTES NCURSES_BITS(~(1UL - 1UL),0) >#define A_CHARTEXT (NCURSES_BITS(1UL,0) - 1UL) >#define A_COLOR NCURSES_BITS(((1UL) << 8) - 1UL,0) >#define A_STANDOUT NCURSES_BITS(1UL,8) >#define A_UNDERLINE NCURSES_BITS(1UL,9) >#define A_REVERSE NCURSES_BITS(1UL,10) >#define A_BLINK NCURSES_BITS(1UL,11) >#define A_DIM NCURSES_BITS(1UL,12) >#define A_BOLD NCURSES_BITS(1UL,13) >#define A_ALTCHARSET NCURSES_BITS(1UL,14) >#define A_INVIS NCURSES_BITS(1UL,15) >#define A_PROTECT NCURSES_BITS(1UL,16) >#define A_HORIZONTAL NCURSES_BITS(1UL,17) >#define A_LEFT NCURSES_BITS(1UL,18) >#define A_LOW NCURSES_BITS(1UL,19) >#define A_RIGHT NCURSES_BITS(1UL,20) >#define A_TOP NCURSES_BITS(1UL,21) >#define A_VERTICAL NCURSES_BITS(1UL,22) > >#if 1 >#define A_ITALIC NCURSES_BITS(1UL,23) /* ncurses extension */ >#endif ># 1078 "./curses.h" > >/* > * Most of the pseudo functions are macros that either provide compatibility > * with older versions of curses, or provide inline functionality to improve > * performance. > */ > >/* > * These pseudo functions are always implemented as macros: > */ > >#define getyx(win,y,x) (y = getcury(win), x = getcurx(win)) >#define getbegyx(win,y,x) (y = getbegy(win), x = getbegx(win)) >#define getmaxyx(win,y,x) (y = getmaxy(win), x = getmaxx(win)) >#define getparyx(win,y,x) (y = getpary(win), x = getparx(win)) > >#define getsyx(y,x) do { if (newscr) { \ > if (is_leaveok(newscr)) \ > (y) = (x) = -1; \ > else \ > getyx(newscr,(y), (x)); \ > } \ > } while(0) > >#define setsyx(y,x) do { if (newscr) { \ > if ((y) == -1 && (x) == -1) \ > leaveok(newscr, TRUE); \ > else { \ > leaveok(newscr, FALSE); \ > wmove(newscr, (y), (x)); \ > } \ > } \ > } while(0) > >#ifndef NCURSES_NOMACROS > >/* > * These miscellaneous pseudo functions are provided for compatibility: > */ > >#define wgetstr(w, s) wgetnstr(w, s, -1) >#define getnstr(s, n) wgetnstr(stdscr, s, (n)) > >#define setterm(term) setupterm(term, 1, (int *)0) > >#define fixterm() reset_prog_mode() >#define resetterm() reset_shell_mode() >#define saveterm() def_prog_mode() >#define crmode() cbreak() >#define nocrmode() nocbreak() >#define gettmode() > >/* It seems older SYSV curses versions define these */ >#if !NCURSES_OPAQUE >#define getattrs(win) NCURSES_CAST(int, (win) ? (win)->_attrs : A_NORMAL) >#define getcurx(win) ((win) ? (win)->_curx : ERR) >#define getcury(win) ((win) ? (win)->_cury : ERR) >#define getbegx(win) ((win) ? (win)->_begx : ERR) >#define getbegy(win) ((win) ? (win)->_begy : ERR) >#define getmaxx(win) ((win) ? ((win)->_maxx + 1) : ERR) >#define getmaxy(win) ((win) ? ((win)->_maxy + 1) : ERR) >#define getparx(win) ((win) ? (win)->_parx : ERR) >#define getpary(win) ((win) ? (win)->_pary : ERR) >#endif /* NCURSES_OPAQUE */ ># 1142 "./curses.h" > >#define wstandout(win) (wattrset(win,A_STANDOUT)) >#define wstandend(win) (wattrset(win,A_NORMAL)) > >#define wattron(win,at) wattr_on(win, NCURSES_CAST(attr_t, at), NULL) >#define wattroff(win,at) wattr_off(win, NCURSES_CAST(attr_t, at), NULL) > >#if !NCURSES_OPAQUE >#if NCURSES_WIDECHAR && 0 >#define wattrset(win,at) ((win) \ > ? ((win)->_color = PAIR_NUMBER(at), \ > (win)->_attrs = NCURSES_CAST(attr_t, at), \ > OK) \ > : ERR) >#else ># 1157 "./curses.h" >#define wattrset(win,at) ((win) \ > ? ((win)->_attrs = NCURSES_CAST(attr_t, at), \ > OK) \ > : ERR) >#endif ># 1162 "./curses.h" >#endif /* NCURSES_OPAQUE */ ># 1163 "./curses.h" > >#define scroll(win) wscrl(win,1) > >#define touchwin(win) wtouchln((win), 0, getmaxy(win), 1) >#define touchline(win, s, c) wtouchln((win), s, c, 1) >#define untouchwin(win) wtouchln((win), 0, getmaxy(win), 0) > >#define box(win, v, h) wborder(win, v, v, h, h, 0, 0, 0, 0) >#define border(ls, rs, ts, bs, tl, tr, bl, br) wborder(stdscr, ls, rs, ts, bs, tl, tr, bl, br) >#define hline(ch, n) whline(stdscr, ch, (n)) >#define vline(ch, n) wvline(stdscr, ch, (n)) > >#define winstr(w, s) winnstr(w, s, -1) >#define winchstr(w, s) winchnstr(w, s, -1) >#define winsstr(w, s) winsnstr(w, s, -1) > >#if !NCURSES_OPAQUE >#define redrawwin(win) wredrawln(win, 0, ((win) ? (win)->_maxy+1 : -1)) >#endif /* NCURSES_OPAQUE */ ># 1182 "./curses.h" > >#define waddstr(win,str) waddnstr(win,str,-1) >#define waddchstr(win,str) waddchnstr(win,str,-1) > >/* > * These apply to the first 256 color pairs. > */ >#define COLOR_PAIR(n) NCURSES_BITS((n), 0) >#define PAIR_NUMBER(a) (NCURSES_CAST(int,((NCURSES_CAST(unsigned long,(a)) & A_COLOR) >> NCURSES_ATTR_SHIFT))) > >/* > * pseudo functions for standard screen > */ > >#define addch(ch) waddch(stdscr,(ch)) >#define addchnstr(str,n) waddchnstr(stdscr,(str),(n)) >#define addchstr(str) waddchstr(stdscr,(str)) >#define addnstr(str,n) waddnstr(stdscr,(str),(n)) >#define addstr(str) waddnstr(stdscr,(str),-1) >#define attroff(at) wattroff(stdscr,(at)) >#define attron(at) wattron(stdscr,(at)) >#define attrset(at) wattrset(stdscr,(at)) >#define attr_get(ap,cp,o) wattr_get(stdscr,(ap),(cp),(o)) >#define attr_off(a,o) wattr_off(stdscr,(a),(o)) >#define attr_on(a,o) wattr_on(stdscr,(a),(o)) >#define attr_set(a,c,o) wattr_set(stdscr,(a),(c),(o)) >#define bkgd(ch) wbkgd(stdscr,(ch)) >#define bkgdset(ch) wbkgdset(stdscr,(ch)) >#define chgat(n,a,c,o) wchgat(stdscr,(n),(a),(c),(o)) >#define clear() wclear(stdscr) >#define clrtobot() wclrtobot(stdscr) >#define clrtoeol() wclrtoeol(stdscr) >#define color_set(c,o) wcolor_set(stdscr,(c),(o)) >#define delch() wdelch(stdscr) >#define deleteln() winsdelln(stdscr,-1) >#define echochar(c) wechochar(stdscr,(c)) >#define erase() werase(stdscr) >#define getch() wgetch(stdscr) >#define getstr(str) wgetstr(stdscr,(str)) >#define inch() winch(stdscr) >#define inchnstr(s,n) winchnstr(stdscr,(s),(n)) >#define inchstr(s) winchstr(stdscr,(s)) >#define innstr(s,n) winnstr(stdscr,(s),(n)) >#define insch(c) winsch(stdscr,(c)) >#define insdelln(n) winsdelln(stdscr,(n)) >#define insertln() winsdelln(stdscr,1) >#define insnstr(s,n) winsnstr(stdscr,(s),(n)) >#define insstr(s) winsstr(stdscr,(s)) >#define instr(s) winstr(stdscr,(s)) >#define move(y,x) wmove(stdscr,(y),(x)) >#define refresh() wrefresh(stdscr) >#define scrl(n) wscrl(stdscr,(n)) >#define setscrreg(t,b) wsetscrreg(stdscr,(t),(b)) >#define standend() wstandend(stdscr) >#define standout() wstandout(stdscr) >#define timeout(delay) wtimeout(stdscr,(delay)) >#define wdeleteln(win) winsdelln(win,-1) >#define winsertln(win) winsdelln(win,1) > >/* > * mv functions > */ > >#define mvwaddch(win,y,x,ch) (wmove((win),(y),(x)) == ERR ? ERR : waddch((win),(ch))) >#define mvwaddchnstr(win,y,x,str,n) (wmove((win),(y),(x)) == ERR ? ERR : waddchnstr((win),(str),(n))) >#define mvwaddchstr(win,y,x,str) (wmove((win),(y),(x)) == ERR ? ERR : waddchnstr((win),(str),-1)) >#define mvwaddnstr(win,y,x,str,n) (wmove((win),(y),(x)) == ERR ? ERR : waddnstr((win),(str),(n))) >#define mvwaddstr(win,y,x,str) (wmove((win),(y),(x)) == ERR ? ERR : waddnstr((win),(str),-1)) >#define mvwdelch(win,y,x) (wmove((win),(y),(x)) == ERR ? ERR : wdelch(win)) >#define mvwchgat(win,y,x,n,a,c,o) (wmove((win),(y),(x)) == ERR ? ERR : wchgat((win),(n),(a),(c),(o))) >#define mvwgetch(win,y,x) (wmove((win),(y),(x)) == ERR ? ERR : wgetch(win)) >#define mvwgetnstr(win,y,x,str,n) (wmove((win),(y),(x)) == ERR ? ERR : wgetnstr((win),(str),(n))) >#define mvwgetstr(win,y,x,str) (wmove((win),(y),(x)) == ERR ? ERR : wgetstr((win),(str))) >#define mvwhline(win,y,x,c,n) (wmove((win),(y),(x)) == ERR ? ERR : whline((win),(c),(n))) >#define mvwinch(win,y,x) (wmove((win),(y),(x)) == ERR ? NCURSES_CAST(chtype, ERR) : winch(win)) >#define mvwinchnstr(win,y,x,s,n) (wmove((win),(y),(x)) == ERR ? ERR : winchnstr((win),(s),(n))) >#define mvwinchstr(win,y,x,s) (wmove((win),(y),(x)) == ERR ? ERR : winchstr((win),(s))) >#define mvwinnstr(win,y,x,s,n) (wmove((win),(y),(x)) == ERR ? ERR : winnstr((win),(s),(n))) >#define mvwinsch(win,y,x,c) (wmove((win),(y),(x)) == ERR ? ERR : winsch((win),(c))) >#define mvwinsnstr(win,y,x,s,n) (wmove((win),(y),(x)) == ERR ? ERR : winsnstr((win),(s),(n))) >#define mvwinsstr(win,y,x,s) (wmove((win),(y),(x)) == ERR ? ERR : winsstr((win),(s))) >#define mvwinstr(win,y,x,s) (wmove((win),(y),(x)) == ERR ? ERR : winstr((win),(s))) >#define mvwvline(win,y,x,c,n) (wmove((win),(y),(x)) == ERR ? ERR : wvline((win),(c),(n))) > >#define mvaddch(y,x,ch) mvwaddch(stdscr,(y),(x),(ch)) >#define mvaddchnstr(y,x,str,n) mvwaddchnstr(stdscr,(y),(x),(str),(n)) >#define mvaddchstr(y,x,str) mvwaddchstr(stdscr,(y),(x),(str)) >#define mvaddnstr(y,x,str,n) mvwaddnstr(stdscr,(y),(x),(str),(n)) >#define mvaddstr(y,x,str) mvwaddstr(stdscr,(y),(x),(str)) >#define mvchgat(y,x,n,a,c,o) mvwchgat(stdscr,(y),(x),(n),(a),(c),(o)) >#define mvdelch(y,x) mvwdelch(stdscr,(y),(x)) >#define mvgetch(y,x) mvwgetch(stdscr,(y),(x)) >#define mvgetnstr(y,x,str,n) mvwgetnstr(stdscr,(y),(x),(str),(n)) >#define mvgetstr(y,x,str) mvwgetstr(stdscr,(y),(x),(str)) >#define mvhline(y,x,c,n) mvwhline(stdscr,(y),(x),(c),(n)) >#define mvinch(y,x) mvwinch(stdscr,(y),(x)) >#define mvinchnstr(y,x,s,n) mvwinchnstr(stdscr,(y),(x),(s),(n)) >#define mvinchstr(y,x,s) mvwinchstr(stdscr,(y),(x),(s)) >#define mvinnstr(y,x,s,n) mvwinnstr(stdscr,(y),(x),(s),(n)) >#define mvinsch(y,x,c) mvwinsch(stdscr,(y),(x),(c)) >#define mvinsnstr(y,x,s,n) mvwinsnstr(stdscr,(y),(x),(s),(n)) >#define mvinsstr(y,x,s) mvwinsstr(stdscr,(y),(x),(s)) >#define mvinstr(y,x,s) mvwinstr(stdscr,(y),(x),(s)) >#define mvvline(y,x,c,n) mvwvline(stdscr,(y),(x),(c),(n)) > >/* > * Some wide-character functions can be implemented without the extensions. > */ >#if !NCURSES_OPAQUE >#define getbkgd(win) ((win) ? ((win)->_bkgd) : 0) >#endif /* NCURSES_OPAQUE */ ># 1293 "./curses.h" > >#define slk_attr_off(a,v) ((v) ? ERR : slk_attroff(a)) >#define slk_attr_on(a,v) ((v) ? ERR : slk_attron(a)) > >#if !NCURSES_OPAQUE >#if NCURSES_WIDECHAR && 0 >#define wattr_set(win,a,p,opts) (((win) \ > ? ((win)->_attrs = ((a) & ~A_COLOR), \ > (win)->_color = (p)) \ > : OK), \ > OK) >#define wattr_get(win,a,p,opts) ((void)(((a) != (void *)0) ? (*(a) = (win) ? (win)->_attrs : 0) : OK), \ > (void)(((p) != (void *)0) ? (*(p) = (NCURSES_PAIRS_T) ((win) ? (win)->_color : 0)) : OK), \ > OK) >#else ># 1308 "./curses.h" >#define wattr_set(win,a,p,opts) (((win) \ > ? ((win)->_attrs = (((a) & ~A_COLOR) | (attr_t)COLOR_PAIR(p))) \ > : OK), \ > OK) >#define wattr_get(win,a,p,opts) ((void)(((a) != (void *)0) ? (*(a) = (win) ? (win)->_attrs : 0) : OK), \ > (void)(((p) != (void *)0) ? (*(p) = (NCURSES_PAIRS_T) ((win) ? PAIR_NUMBER((win)->_attrs) : 0)) : OK), \ > OK) >#endif ># 1316 "./curses.h" >#endif /* NCURSES_OPAQUE */ ># 1317 "./curses.h" > >/* > * X/Open curses deprecates SVr4 vwprintw/vwscanw, which are supposed to use > * varargs.h. It adds new calls vw_printw/vw_scanw, which are supposed to > * use POSIX stdarg.h. The ncurses versions of vwprintw/vwscanw already > * use stdarg.h, so... > */ >#define vw_printw vwprintw >#define vw_scanw vwscanw > >/* > * Export fallback function for use in C++ binding. > */ >#if !1 >#define vsscanf(a,b,c) _nc_vsscanf(a,b,c) >NCURSES_EXPORT(int) vsscanf(const char *, const char *, va_list); >#endif ># 1334 "./curses.h" > >/* > * These macros are extensions - not in X/Open Curses. > */ >#if 1 >#if !NCURSES_OPAQUE >#define is_cleared(win) ((win) ? (win)->_clear : FALSE) >#define is_idcok(win) ((win) ? (win)->_idcok : FALSE) >#define is_idlok(win) ((win) ? (win)->_idlok : FALSE) >#define is_immedok(win) ((win) ? (win)->_immed : FALSE) >#define is_keypad(win) ((win) ? (win)->_use_keypad : FALSE) >#define is_leaveok(win) ((win) ? (win)->_leaveok : FALSE) >#define is_nodelay(win) ((win) ? ((win)->_delay == 0) : FALSE) >#define is_notimeout(win) ((win) ? (win)->_notimeout : FALSE) >#define is_pad(win) ((win) ? ((win)->_flags & _ISPAD) != 0 : FALSE) >#define is_scrollok(win) ((win) ? (win)->_scroll : FALSE) >#define is_subwin(win) ((win) ? ((win)->_flags & _SUBWIN) != 0 : FALSE) >#define is_syncok(win) ((win) ? (win)->_sync : FALSE) >#define wgetparent(win) ((win) ? (win)->_parent : 0) >#define wgetscrreg(win,t,b) ((win) ? (*(t) = (win)->_regtop, *(b) = (win)->_regbottom, OK) : ERR) >#endif ># 1355 "./curses.h" >#endif ># 1356 "./curses.h" > >#endif /* NCURSES_NOMACROS */ ># 1358 "./curses.h" > >/* > * Public variables. > * > * Notes: > * a. ESCDELAY was an undocumented feature under AIX curses. > * It gives the ESC expire time in milliseconds. > * b. ttytype is needed for backward compatibility > */ >#if NCURSES_REENTRANT > >NCURSES_WRAPPED_VAR(WINDOW *, curscr); >NCURSES_WRAPPED_VAR(WINDOW *, newscr); >NCURSES_WRAPPED_VAR(WINDOW *, stdscr); >NCURSES_WRAPPED_VAR(char *, ttytype); >NCURSES_WRAPPED_VAR(int, COLORS); >NCURSES_WRAPPED_VAR(int, COLOR_PAIRS); >NCURSES_WRAPPED_VAR(int, COLS); >NCURSES_WRAPPED_VAR(int, ESCDELAY); >NCURSES_WRAPPED_VAR(int, LINES); >NCURSES_WRAPPED_VAR(int, TABSIZE); > >#define curscr NCURSES_PUBLIC_VAR(curscr()) >#define newscr NCURSES_PUBLIC_VAR(newscr()) >#define stdscr NCURSES_PUBLIC_VAR(stdscr()) >#define ttytype NCURSES_PUBLIC_VAR(ttytype()) >#define COLORS NCURSES_PUBLIC_VAR(COLORS()) >#define COLOR_PAIRS NCURSES_PUBLIC_VAR(COLOR_PAIRS()) >#define COLS NCURSES_PUBLIC_VAR(COLS()) >#define ESCDELAY NCURSES_PUBLIC_VAR(ESCDELAY()) >#define LINES NCURSES_PUBLIC_VAR(LINES()) >#define TABSIZE NCURSES_PUBLIC_VAR(TABSIZE()) > >#else ># 1392 "./curses.h" > >extern NCURSES_EXPORT_VAR(WINDOW *) curscr; >extern NCURSES_EXPORT_VAR(WINDOW *) newscr; >extern NCURSES_EXPORT_VAR(WINDOW *) stdscr; >extern NCURSES_EXPORT_VAR(char) ttytype[]; >extern NCURSES_EXPORT_VAR(int) COLORS; >extern NCURSES_EXPORT_VAR(int) COLOR_PAIRS; >extern NCURSES_EXPORT_VAR(int) COLS; >extern NCURSES_EXPORT_VAR(int) ESCDELAY; >extern NCURSES_EXPORT_VAR(int) LINES; >extern NCURSES_EXPORT_VAR(int) TABSIZE; > >#endif ># 1405 "./curses.h" > >/* > * Pseudo-character tokens outside ASCII range. The curses wgetch() function > * will return any given one of these only if the corresponding k- capability > * is defined in your terminal's terminfo entry. > * > * Some keys (KEY_A1, etc) are arranged like this: > * a1 up a3 > * left b2 right > * c1 down c3 > * > * A few key codes do not depend upon the terminfo entry. > */ >#define KEY_CODE_YES 0400 /* A wchar_t contains a key code */ >#define KEY_MIN 0401 /* Minimum curses key */ >#define KEY_BREAK 0401 /* Break key (unreliable) */ >#define KEY_SRESET 0530 /* Soft (partial) reset (unreliable) */ >#define KEY_RESET 0531 /* Reset or hard reset (unreliable) */ >/* > * These definitions were generated by ./MKkey_defs.sh ./Caps > */ >#define KEY_DOWN 0402 /* down-arrow key */ >#define KEY_UP 0403 /* up-arrow key */ >#define KEY_LEFT 0404 /* left-arrow key */ >#define KEY_RIGHT 0405 /* right-arrow key */ >#define KEY_HOME 0406 /* home key */ >#define KEY_BACKSPACE 0407 /* backspace key */ >#define KEY_F0 0410 /* Function keys. Space for 64 */ >#define KEY_F(n) (KEY_F0+(n)) /* Value of function key n */ >#define KEY_DL 0510 /* delete-line key */ >#define KEY_IL 0511 /* insert-line key */ >#define KEY_DC 0512 /* delete-character key */ >#define KEY_IC 0513 /* insert-character key */ >#define KEY_EIC 0514 /* sent by rmir or smir in insert mode */ >#define KEY_CLEAR 0515 /* clear-screen or erase key */ >#define KEY_EOS 0516 /* clear-to-end-of-screen key */ >#define KEY_EOL 0517 /* clear-to-end-of-line key */ >#define KEY_SF 0520 /* scroll-forward key */ >#define KEY_SR 0521 /* scroll-backward key */ >#define KEY_NPAGE 0522 /* next-page key */ >#define KEY_PPAGE 0523 /* previous-page key */ >#define KEY_STAB 0524 /* set-tab key */ >#define KEY_CTAB 0525 /* clear-tab key */ >#define KEY_CATAB 0526 /* clear-all-tabs key */ >#define KEY_ENTER 0527 /* enter/send key */ >#define KEY_PRINT 0532 /* print key */ >#define KEY_LL 0533 /* lower-left key (home down) */ >#define KEY_A1 0534 /* upper left of keypad */ >#define KEY_A3 0535 /* upper right of keypad */ >#define KEY_B2 0536 /* center of keypad */ >#define KEY_C1 0537 /* lower left of keypad */ >#define KEY_C3 0540 /* lower right of keypad */ >#define KEY_BTAB 0541 /* back-tab key */ >#define KEY_BEG 0542 /* begin key */ >#define KEY_CANCEL 0543 /* cancel key */ >#define KEY_CLOSE 0544 /* close key */ >#define KEY_COMMAND 0545 /* command key */ >#define KEY_COPY 0546 /* copy key */ >#define KEY_CREATE 0547 /* create key */ >#define KEY_END 0550 /* end key */ >#define KEY_EXIT 0551 /* exit key */ >#define KEY_FIND 0552 /* find key */ >#define KEY_HELP 0553 /* help key */ >#define KEY_MARK 0554 /* mark key */ >#define KEY_MESSAGE 0555 /* message key */ >#define KEY_MOVE 0556 /* move key */ >#define KEY_NEXT 0557 /* next key */ >#define KEY_OPEN 0560 /* open key */ >#define KEY_OPTIONS 0561 /* options key */ >#define KEY_PREVIOUS 0562 /* previous key */ >#define KEY_REDO 0563 /* redo key */ >#define KEY_REFERENCE 0564 /* reference key */ >#define KEY_REFRESH 0565 /* refresh key */ >#define KEY_REPLACE 0566 /* replace key */ >#define KEY_RESTART 0567 /* restart key */ >#define KEY_RESUME 0570 /* resume key */ >#define KEY_SAVE 0571 /* save key */ >#define KEY_SBEG 0572 /* shifted begin key */ >#define KEY_SCANCEL 0573 /* shifted cancel key */ >#define KEY_SCOMMAND 0574 /* shifted command key */ >#define KEY_SCOPY 0575 /* shifted copy key */ >#define KEY_SCREATE 0576 /* shifted create key */ >#define KEY_SDC 0577 /* shifted delete-character key */ >#define KEY_SDL 0600 /* shifted delete-line key */ >#define KEY_SELECT 0601 /* select key */ >#define KEY_SEND 0602 /* shifted end key */ >#define KEY_SEOL 0603 /* shifted clear-to-end-of-line key */ >#define KEY_SEXIT 0604 /* shifted exit key */ >#define KEY_SFIND 0605 /* shifted find key */ >#define KEY_SHELP 0606 /* shifted help key */ >#define KEY_SHOME 0607 /* shifted home key */ >#define KEY_SIC 0610 /* shifted insert-character key */ >#define KEY_SLEFT 0611 /* shifted left-arrow key */ >#define KEY_SMESSAGE 0612 /* shifted message key */ >#define KEY_SMOVE 0613 /* shifted move key */ >#define KEY_SNEXT 0614 /* shifted next key */ >#define KEY_SOPTIONS 0615 /* shifted options key */ >#define KEY_SPREVIOUS 0616 /* shifted previous key */ >#define KEY_SPRINT 0617 /* shifted print key */ >#define KEY_SREDO 0620 /* shifted redo key */ >#define KEY_SREPLACE 0621 /* shifted replace key */ >#define KEY_SRIGHT 0622 /* shifted right-arrow key */ >#define KEY_SRSUME 0623 /* shifted resume key */ >#define KEY_SSAVE 0624 /* shifted save key */ >#define KEY_SSUSPEND 0625 /* shifted suspend key */ >#define KEY_SUNDO 0626 /* shifted undo key */ >#define KEY_SUSPEND 0627 /* suspend key */ >#define KEY_UNDO 0630 /* undo key */ >#define KEY_MOUSE 0631 /* Mouse event has occurred */ >#define KEY_RESIZE 0632 /* Terminal resize event */ >#define KEY_EVENT 0633 /* We were interrupted by an event */ > >#define KEY_MAX 0777 /* Maximum key value is 0633 */ >/* $Id: curses.wide,v 1.46 2014/02/01 22:00:32 tom Exp $ */ >/* > * vile:cmode: > * This file is part of ncurses, designed to be appended after curses.h.in > * (see that file for the relevant copyright). > */ >#define _XOPEN_CURSES 1 > >#if NCURSES_WIDECHAR > >extern NCURSES_EXPORT_VAR(cchar_t *) _nc_wacs; > >#define NCURSES_WACS(c) (&_nc_wacs[NCURSES_CAST(unsigned char,(c))]) > >#define WACS_BSSB NCURSES_WACS('l') >#define WACS_SSBB NCURSES_WACS('m') >#define WACS_BBSS NCURSES_WACS('k') >#define WACS_SBBS NCURSES_WACS('j') >#define WACS_SBSS NCURSES_WACS('u') >#define WACS_SSSB NCURSES_WACS('t') >#define WACS_SSBS NCURSES_WACS('v') >#define WACS_BSSS NCURSES_WACS('w') >#define WACS_BSBS NCURSES_WACS('q') >#define WACS_SBSB NCURSES_WACS('x') >#define WACS_SSSS NCURSES_WACS('n') > >#define WACS_ULCORNER WACS_BSSB >#define WACS_LLCORNER WACS_SSBB >#define WACS_URCORNER WACS_BBSS >#define WACS_LRCORNER WACS_SBBS >#define WACS_RTEE WACS_SBSS >#define WACS_LTEE WACS_SSSB >#define WACS_BTEE WACS_SSBS >#define WACS_TTEE WACS_BSSS >#define WACS_HLINE WACS_BSBS >#define WACS_VLINE WACS_SBSB >#define WACS_PLUS WACS_SSSS > >#define WACS_S1 NCURSES_WACS('o') /* scan line 1 */ >#define WACS_S9 NCURSES_WACS('s') /* scan line 9 */ >#define WACS_DIAMOND NCURSES_WACS('`') /* diamond */ >#define WACS_CKBOARD NCURSES_WACS('a') /* checker board */ >#define WACS_DEGREE NCURSES_WACS('f') /* degree symbol */ >#define WACS_PLMINUS NCURSES_WACS('g') /* plus/minus */ >#define WACS_BULLET NCURSES_WACS('~') /* bullet */ > > /* Teletype 5410v1 symbols */ >#define WACS_LARROW NCURSES_WACS(',') /* arrow left */ >#define WACS_RARROW NCURSES_WACS('+') /* arrow right */ >#define WACS_DARROW NCURSES_WACS('.') /* arrow down */ >#define WACS_UARROW NCURSES_WACS('-') /* arrow up */ >#define WACS_BOARD NCURSES_WACS('h') /* board of squares */ >#define WACS_LANTERN NCURSES_WACS('i') /* lantern symbol */ >#define WACS_BLOCK NCURSES_WACS('0') /* solid square block */ > > /* ncurses extensions */ >#define WACS_S3 NCURSES_WACS('p') /* scan line 3 */ >#define WACS_S7 NCURSES_WACS('r') /* scan line 7 */ >#define WACS_LEQUAL NCURSES_WACS('y') /* less/equal */ >#define WACS_GEQUAL NCURSES_WACS('z') /* greater/equal */ >#define WACS_PI NCURSES_WACS('{') /* Pi */ >#define WACS_NEQUAL NCURSES_WACS('|') /* not equal */ >#define WACS_STERLING NCURSES_WACS('}') /* UK pound sign */ > > /* double lines */ >#define WACS_BDDB NCURSES_WACS('C') >#define WACS_DDBB NCURSES_WACS('D') >#define WACS_BBDD NCURSES_WACS('B') >#define WACS_DBBD NCURSES_WACS('A') >#define WACS_DBDD NCURSES_WACS('G') >#define WACS_DDDB NCURSES_WACS('F') >#define WACS_DDBD NCURSES_WACS('H') >#define WACS_BDDD NCURSES_WACS('I') >#define WACS_BDBD NCURSES_WACS('R') >#define WACS_DBDB NCURSES_WACS('Y') >#define WACS_DDDD NCURSES_WACS('E') > >#define WACS_D_ULCORNER WACS_BDDB >#define WACS_D_LLCORNER WACS_DDBB >#define WACS_D_URCORNER WACS_BBDD >#define WACS_D_LRCORNER WACS_DBBD >#define WACS_D_RTEE WACS_DBDD >#define WACS_D_LTEE WACS_DDDB >#define WACS_D_BTEE WACS_DDBD >#define WACS_D_TTEE WACS_BDDD >#define WACS_D_HLINE WACS_BDBD >#define WACS_D_VLINE WACS_DBDB >#define WACS_D_PLUS WACS_DDDD > > /* thick lines */ >#define WACS_BTTB NCURSES_WACS('L') >#define WACS_TTBB NCURSES_WACS('M') >#define WACS_BBTT NCURSES_WACS('K') >#define WACS_TBBT NCURSES_WACS('J') >#define WACS_TBTT NCURSES_WACS('U') >#define WACS_TTTB NCURSES_WACS('T') >#define WACS_TTBT NCURSES_WACS('V') >#define WACS_BTTT NCURSES_WACS('W') >#define WACS_BTBT NCURSES_WACS('Q') >#define WACS_TBTB NCURSES_WACS('X') >#define WACS_TTTT NCURSES_WACS('N') > >#define WACS_T_ULCORNER WACS_BTTB >#define WACS_T_LLCORNER WACS_TTBB >#define WACS_T_URCORNER WACS_BBTT >#define WACS_T_LRCORNER WACS_TBBT >#define WACS_T_RTEE WACS_TBTT >#define WACS_T_LTEE WACS_TTTB >#define WACS_T_BTEE WACS_TTBT >#define WACS_T_TTEE WACS_BTTT >#define WACS_T_HLINE WACS_BTBT >#define WACS_T_VLINE WACS_TBTB >#define WACS_T_PLUS WACS_TTTT > >/* > * Function prototypes for wide-character operations. > * > * "generated" comments should include ":WIDEC" to make the corresponding > * functions ifdef'd in lib_gen.c > * > * "implemented" comments do not need this marker. > */ > >extern NCURSES_EXPORT(int) add_wch (const cchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) add_wchnstr (const cchar_t *, int); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) add_wchstr (const cchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) addnwstr (const wchar_t *, int); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) addwstr (const wchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) bkgrnd (const cchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(void) bkgrndset (const cchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) border_set (const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) box_set (WINDOW *, const cchar_t *, const cchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) echo_wchar (const cchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) erasewchar (wchar_t*); /* implemented */ >extern NCURSES_EXPORT(int) get_wch (wint_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) get_wstr (wint_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) getbkgrnd (cchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) getcchar (const cchar_t *, wchar_t*, attr_t*, NCURSES_PAIRS_T*, void*); /* implemented */ >extern NCURSES_EXPORT(int) getn_wstr (wint_t *, int); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) hline_set (const cchar_t *, int); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) in_wch (cchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) in_wchnstr (cchar_t *, int); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) in_wchstr (cchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) innwstr (wchar_t *, int); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) ins_nwstr (const wchar_t *, int); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) ins_wch (const cchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) ins_wstr (const wchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) inwstr (wchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(NCURSES_CONST char*) key_name (wchar_t); /* implemented */ >extern NCURSES_EXPORT(int) killwchar (wchar_t *); /* implemented */ >extern NCURSES_EXPORT(int) mvadd_wch (int, int, const cchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvadd_wchnstr (int, int, const cchar_t *, int);/* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvadd_wchstr (int, int, const cchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvaddnwstr (int, int, const wchar_t *, int); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvaddwstr (int, int, const wchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvget_wch (int, int, wint_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvget_wstr (int, int, wint_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvgetn_wstr (int, int, wint_t *, int); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvhline_set (int, int, const cchar_t *, int); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvin_wch (int, int, cchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvin_wchnstr (int, int, cchar_t *, int); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvin_wchstr (int, int, cchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvinnwstr (int, int, wchar_t *, int); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvins_nwstr (int, int, const wchar_t *, int); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvins_wch (int, int, const cchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvins_wstr (int, int, const wchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvinwstr (int, int, wchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvvline_set (int, int, const cchar_t *, int); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvwadd_wch (WINDOW *, int, int, const cchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvwadd_wchnstr (WINDOW *, int, int, const cchar_t *, int); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvwadd_wchstr (WINDOW *, int, int, const cchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvwaddnwstr (WINDOW *, int, int, const wchar_t *, int);/* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvwaddwstr (WINDOW *, int, int, const wchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvwget_wch (WINDOW *, int, int, wint_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvwget_wstr (WINDOW *, int, int, wint_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvwgetn_wstr (WINDOW *, int, int, wint_t *, int);/* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvwhline_set (WINDOW *, int, int, const cchar_t *, int);/* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvwin_wch (WINDOW *, int, int, cchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvwin_wchnstr (WINDOW *, int,int, cchar_t *,int); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvwin_wchstr (WINDOW *, int, int, cchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvwinnwstr (WINDOW *, int, int, wchar_t *, int); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvwins_nwstr (WINDOW *, int,int, const wchar_t *,int); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvwins_wch (WINDOW *, int, int, const cchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvwins_wstr (WINDOW *, int, int, const wchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvwinwstr (WINDOW *, int, int, wchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvwvline_set (WINDOW *, int,int, const cchar_t *,int); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) pecho_wchar (WINDOW *, const cchar_t *); /* implemented */ >extern NCURSES_EXPORT(int) setcchar (cchar_t *, const wchar_t *, const attr_t, NCURSES_PAIRS_T, const void *); /* implemented */ >extern NCURSES_EXPORT(int) slk_wset (int, const wchar_t *, int); /* implemented */ >extern NCURSES_EXPORT(attr_t) term_attrs (void); /* implemented */ >extern NCURSES_EXPORT(int) unget_wch (const wchar_t); /* implemented */ >extern NCURSES_EXPORT(int) vid_attr (attr_t, NCURSES_PAIRS_T, void *); /* implemented */ >extern NCURSES_EXPORT(int) vid_puts (attr_t, NCURSES_PAIRS_T, void *, NCURSES_OUTC); /* implemented */ >extern NCURSES_EXPORT(int) vline_set (const cchar_t *, int); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) wadd_wch (WINDOW *,const cchar_t *); /* implemented */ >extern NCURSES_EXPORT(int) wadd_wchnstr (WINDOW *,const cchar_t *,int); /* implemented */ >extern NCURSES_EXPORT(int) wadd_wchstr (WINDOW *,const cchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) waddnwstr (WINDOW *,const wchar_t *,int); /* implemented */ >extern NCURSES_EXPORT(int) waddwstr (WINDOW *,const wchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) wbkgrnd (WINDOW *,const cchar_t *); /* implemented */ >extern NCURSES_EXPORT(void) wbkgrndset (WINDOW *,const cchar_t *); /* implemented */ >extern NCURSES_EXPORT(int) wborder_set (WINDOW *,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*); /* implemented */ >extern NCURSES_EXPORT(int) wecho_wchar (WINDOW *, const cchar_t *); /* implemented */ >extern NCURSES_EXPORT(int) wget_wch (WINDOW *, wint_t *); /* implemented */ >extern NCURSES_EXPORT(int) wget_wstr (WINDOW *, wint_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) wgetbkgrnd (WINDOW *, cchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) wgetn_wstr (WINDOW *,wint_t *, int); /* implemented */ >extern NCURSES_EXPORT(int) whline_set (WINDOW *, const cchar_t *, int); /* implemented */ >extern NCURSES_EXPORT(int) win_wch (WINDOW *, cchar_t *); /* implemented */ >extern NCURSES_EXPORT(int) win_wchnstr (WINDOW *, cchar_t *, int); /* implemented */ >extern NCURSES_EXPORT(int) win_wchstr (WINDOW *, cchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) winnwstr (WINDOW *, wchar_t *, int); /* implemented */ >extern NCURSES_EXPORT(int) wins_nwstr (WINDOW *, const wchar_t *, int); /* implemented */ >extern NCURSES_EXPORT(int) wins_wch (WINDOW *, const cchar_t *); /* implemented */ >extern NCURSES_EXPORT(int) wins_wstr (WINDOW *, const wchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) winwstr (WINDOW *, wchar_t *); /* implemented */ >extern NCURSES_EXPORT(wchar_t*) wunctrl (cchar_t *); /* implemented */ >extern NCURSES_EXPORT(int) wvline_set (WINDOW *, const cchar_t *, int); /* implemented */ > >#if NCURSES_SP_FUNCS >extern NCURSES_EXPORT(attr_t) NCURSES_SP_NAME(term_attrs) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(unget_wch) (SCREEN*, const wchar_t); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(wchar_t*) NCURSES_SP_NAME(wunctrl) (SCREEN*, cchar_t *); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(vid_attr) (SCREEN*, attr_t, NCURSES_PAIRS_T, void *); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(vid_puts) (SCREEN*, attr_t, NCURSES_PAIRS_T, void *, NCURSES_SP_OUTC); /* implemented:SP_FUNC */ >#endif ># 1744 "./curses.h" > >#ifndef NCURSES_NOMACROS > >/* > * XSI curses macros for XPG4 conformance. > */ >#define add_wch(c) wadd_wch(stdscr,(c)) >#define add_wchnstr(str,n) wadd_wchnstr(stdscr,(str),(n)) >#define add_wchstr(str) wadd_wchstr(stdscr,(str)) >#define addnwstr(wstr,n) waddnwstr(stdscr,(wstr),(n)) >#define addwstr(wstr) waddwstr(stdscr,(wstr)) >#define bkgrnd(c) wbkgrnd(stdscr,(c)) >#define bkgrndset(c) wbkgrndset(stdscr,(c)) >#define border_set(l,r,t,b,tl,tr,bl,br) wborder_set(stdscr,(l),(r),(t),(b),tl,tr,bl,br) >#define box_set(w,v,h) wborder_set((w),(v),(v),(h),(h),0,0,0,0) >#define echo_wchar(c) wecho_wchar(stdscr,(c)) >#define get_wch(c) wget_wch(stdscr,(c)) >#define get_wstr(t) wget_wstr(stdscr,(t)) >#define getbkgrnd(wch) wgetbkgrnd(stdscr,(wch)) >#define getn_wstr(t,n) wgetn_wstr(stdscr,(t),(n)) >#define hline_set(c,n) whline_set(stdscr,(c),(n)) >#define in_wch(c) win_wch(stdscr,(c)) >#define in_wchnstr(c,n) win_wchnstr(stdscr,(c),(n)) >#define in_wchstr(c) win_wchstr(stdscr,(c)) >#define innwstr(c,n) winnwstr(stdscr,(c),(n)) >#define ins_nwstr(t,n) wins_nwstr(stdscr,(t),(n)) >#define ins_wch(c) wins_wch(stdscr,(c)) >#define ins_wstr(t) wins_wstr(stdscr,(t)) >#define inwstr(c) winwstr(stdscr,(c)) >#define vline_set(c,n) wvline_set(stdscr,(c),(n)) >#define wadd_wchstr(win,str) wadd_wchnstr((win),(str),-1) >#define waddwstr(win,wstr) waddnwstr((win),(wstr),-1) >#define wget_wstr(w,t) wgetn_wstr((w),(t),-1) >#define win_wchstr(w,c) win_wchnstr((w),(c),-1) >#define wins_wstr(w,t) wins_nwstr((w),(t),-1) > >#if !NCURSES_OPAQUE >#define wgetbkgrnd(win,wch) ((win) ? (*(wch) = (win)->_bkgrnd) : *(wch), OK) >#endif ># 1783 "./curses.h" > >#define mvadd_wch(y,x,c) mvwadd_wch(stdscr,(y),(x),(c)) >#define mvadd_wchnstr(y,x,s,n) mvwadd_wchnstr(stdscr,(y),(x),(s),(n)) >#define mvadd_wchstr(y,x,s) mvwadd_wchstr(stdscr,(y),(x),(s)) >#define mvaddnwstr(y,x,wstr,n) mvwaddnwstr(stdscr,(y),(x),(wstr),(n)) >#define mvaddwstr(y,x,wstr) mvwaddwstr(stdscr,(y),(x),(wstr)) >#define mvget_wch(y,x,c) mvwget_wch(stdscr,(y),(x),(c)) >#define mvget_wstr(y,x,t) mvwget_wstr(stdscr,(y),(x),(t)) >#define mvgetn_wstr(y,x,t,n) mvwgetn_wstr(stdscr,(y),(x),(t),(n)) >#define mvhline_set(y,x,c,n) mvwhline_set(stdscr,(y),(x),(c),(n)) >#define mvin_wch(y,x,c) mvwin_wch(stdscr,(y),(x),(c)) >#define mvin_wchnstr(y,x,c,n) mvwin_wchnstr(stdscr,(y),(x),(c),(n)) >#define mvin_wchstr(y,x,c) mvwin_wchstr(stdscr,(y),(x),(c)) >#define mvinnwstr(y,x,c,n) mvwinnwstr(stdscr,(y),(x),(c),(n)) >#define mvins_nwstr(y,x,t,n) mvwins_nwstr(stdscr,(y),(x),(t),(n)) >#define mvins_wch(y,x,c) mvwins_wch(stdscr,(y),(x),(c)) >#define mvins_wstr(y,x,t) mvwins_wstr(stdscr,(y),(x),(t)) >#define mvinwstr(y,x,c) mvwinwstr(stdscr,(y),(x),(c)) >#define mvvline_set(y,x,c,n) mvwvline_set(stdscr,(y),(x),(c),(n)) > >#define mvwadd_wch(win,y,x,c) (wmove(win,(y),(x)) == ERR ? ERR : wadd_wch((win),(c))) >#define mvwadd_wchnstr(win,y,x,s,n) (wmove(win,(y),(x)) == ERR ? ERR : wadd_wchnstr((win),(s),(n))) >#define mvwadd_wchstr(win,y,x,s) (wmove(win,(y),(x)) == ERR ? ERR : wadd_wchstr((win),(s))) >#define mvwaddnwstr(win,y,x,wstr,n) (wmove(win,(y),(x)) == ERR ? ERR : waddnwstr((win),(wstr),(n))) >#define mvwaddwstr(win,y,x,wstr) (wmove(win,(y),(x)) == ERR ? ERR : waddwstr((win),(wstr))) >#define mvwget_wch(win,y,x,c) (wmove(win,(y),(x)) == ERR ? ERR : wget_wch((win),(c))) >#define mvwget_wstr(win,y,x,t) (wmove(win,(y),(x)) == ERR ? ERR : wget_wstr((win),(t))) >#define mvwgetn_wstr(win,y,x,t,n) (wmove(win,(y),(x)) == ERR ? ERR : wgetn_wstr((win),(t),(n))) >#define mvwhline_set(win,y,x,c,n) (wmove(win,(y),(x)) == ERR ? ERR : whline_set((win),(c),(n))) >#define mvwin_wch(win,y,x,c) (wmove(win,(y),(x)) == ERR ? ERR : win_wch((win),(c))) >#define mvwin_wchnstr(win,y,x,c,n) (wmove(win,(y),(x)) == ERR ? ERR : win_wchnstr((win),(c),(n))) >#define mvwin_wchstr(win,y,x,c) (wmove(win,(y),(x)) == ERR ? ERR : win_wchstr((win),(c))) >#define mvwinnwstr(win,y,x,c,n) (wmove(win,(y),(x)) == ERR ? ERR : winnwstr((win),(c),(n))) >#define mvwins_nwstr(win,y,x,t,n) (wmove(win,(y),(x)) == ERR ? ERR : wins_nwstr((win),(t),(n))) >#define mvwins_wch(win,y,x,c) (wmove(win,(y),(x)) == ERR ? ERR : wins_wch((win),(c))) >#define mvwins_wstr(win,y,x,t) (wmove(win,(y),(x)) == ERR ? ERR : wins_wstr((win),(t))) >#define mvwinwstr(win,y,x,c) (wmove(win,(y),(x)) == ERR ? ERR : winwstr((win),(c))) >#define mvwvline_set(win,y,x,c,n) (wmove(win,(y),(x)) == ERR ? ERR : wvline_set((win),(c),(n))) > >#endif /* NCURSES_NOMACROS */ ># 1823 "./curses.h" > >#if defined(TRACE) || defined(NCURSES_TEST) >extern NCURSES_EXPORT(const char *) _nc_viswbuf(const wchar_t *); >extern NCURSES_EXPORT(const char *) _nc_viswibuf(const wint_t *); >#endif ># 1828 "./curses.h" > >#endif /* NCURSES_WIDECHAR */ ># 1830 "./curses.h" >/* $Id: curses.tail,v 1.21 2011/10/29 20:03:22 tom Exp $ */ >/* > * vile:cmode: > * This file is part of ncurses, designed to be appended after curses.h.in > * (see that file for the relevant copyright). > */ > >/* mouse interface */ > >#if NCURSES_MOUSE_VERSION > 1 >#define NCURSES_MOUSE_MASK(b,m) ((m) << (((b) - 1) * 5)) >#else ># 1842 "./curses.h" >#define NCURSES_MOUSE_MASK(b,m) ((m) << (((b) - 1) * 6)) >#endif ># 1844 "./curses.h" > >#define NCURSES_BUTTON_RELEASED 001L >#define NCURSES_BUTTON_PRESSED 002L >#define NCURSES_BUTTON_CLICKED 004L >#define NCURSES_DOUBLE_CLICKED 010L >#define NCURSES_TRIPLE_CLICKED 020L >#define NCURSES_RESERVED_EVENT 040L > >/* event masks */ >#define BUTTON1_RELEASED NCURSES_MOUSE_MASK(1, NCURSES_BUTTON_RELEASED) >#define BUTTON1_PRESSED NCURSES_MOUSE_MASK(1, NCURSES_BUTTON_PRESSED) >#define BUTTON1_CLICKED NCURSES_MOUSE_MASK(1, NCURSES_BUTTON_CLICKED) >#define BUTTON1_DOUBLE_CLICKED NCURSES_MOUSE_MASK(1, NCURSES_DOUBLE_CLICKED) >#define BUTTON1_TRIPLE_CLICKED NCURSES_MOUSE_MASK(1, NCURSES_TRIPLE_CLICKED) > >#define BUTTON2_RELEASED NCURSES_MOUSE_MASK(2, NCURSES_BUTTON_RELEASED) >#define BUTTON2_PRESSED NCURSES_MOUSE_MASK(2, NCURSES_BUTTON_PRESSED) >#define BUTTON2_CLICKED NCURSES_MOUSE_MASK(2, NCURSES_BUTTON_CLICKED) >#define BUTTON2_DOUBLE_CLICKED NCURSES_MOUSE_MASK(2, NCURSES_DOUBLE_CLICKED) >#define BUTTON2_TRIPLE_CLICKED NCURSES_MOUSE_MASK(2, NCURSES_TRIPLE_CLICKED) > >#define BUTTON3_RELEASED NCURSES_MOUSE_MASK(3, NCURSES_BUTTON_RELEASED) >#define BUTTON3_PRESSED NCURSES_MOUSE_MASK(3, NCURSES_BUTTON_PRESSED) >#define BUTTON3_CLICKED NCURSES_MOUSE_MASK(3, NCURSES_BUTTON_CLICKED) >#define BUTTON3_DOUBLE_CLICKED NCURSES_MOUSE_MASK(3, NCURSES_DOUBLE_CLICKED) >#define BUTTON3_TRIPLE_CLICKED NCURSES_MOUSE_MASK(3, NCURSES_TRIPLE_CLICKED) > >#define BUTTON4_RELEASED NCURSES_MOUSE_MASK(4, NCURSES_BUTTON_RELEASED) >#define BUTTON4_PRESSED NCURSES_MOUSE_MASK(4, NCURSES_BUTTON_PRESSED) >#define BUTTON4_CLICKED NCURSES_MOUSE_MASK(4, NCURSES_BUTTON_CLICKED) >#define BUTTON4_DOUBLE_CLICKED NCURSES_MOUSE_MASK(4, NCURSES_DOUBLE_CLICKED) >#define BUTTON4_TRIPLE_CLICKED NCURSES_MOUSE_MASK(4, NCURSES_TRIPLE_CLICKED) > >/* > * In 32 bits the version-1 scheme does not provide enough space for a 5th > * button, unless we choose to change the ABI by omitting the reserved-events. > */ >#if NCURSES_MOUSE_VERSION > 1 > >#define BUTTON5_RELEASED NCURSES_MOUSE_MASK(5, NCURSES_BUTTON_RELEASED) >#define BUTTON5_PRESSED NCURSES_MOUSE_MASK(5, NCURSES_BUTTON_PRESSED) >#define BUTTON5_CLICKED NCURSES_MOUSE_MASK(5, NCURSES_BUTTON_CLICKED) >#define BUTTON5_DOUBLE_CLICKED NCURSES_MOUSE_MASK(5, NCURSES_DOUBLE_CLICKED) >#define BUTTON5_TRIPLE_CLICKED NCURSES_MOUSE_MASK(5, NCURSES_TRIPLE_CLICKED) > >#define BUTTON_CTRL NCURSES_MOUSE_MASK(6, 0001L) >#define BUTTON_SHIFT NCURSES_MOUSE_MASK(6, 0002L) >#define BUTTON_ALT NCURSES_MOUSE_MASK(6, 0004L) >#define REPORT_MOUSE_POSITION NCURSES_MOUSE_MASK(6, 0010L) > >#else ># 1895 "./curses.h" > >#define BUTTON1_RESERVED_EVENT NCURSES_MOUSE_MASK(1, NCURSES_RESERVED_EVENT) >#define BUTTON2_RESERVED_EVENT NCURSES_MOUSE_MASK(2, NCURSES_RESERVED_EVENT) >#define BUTTON3_RESERVED_EVENT NCURSES_MOUSE_MASK(3, NCURSES_RESERVED_EVENT) >#define BUTTON4_RESERVED_EVENT NCURSES_MOUSE_MASK(4, NCURSES_RESERVED_EVENT) > >#define BUTTON_CTRL NCURSES_MOUSE_MASK(5, 0001L) >#define BUTTON_SHIFT NCURSES_MOUSE_MASK(5, 0002L) >#define BUTTON_ALT NCURSES_MOUSE_MASK(5, 0004L) >#define REPORT_MOUSE_POSITION NCURSES_MOUSE_MASK(5, 0010L) > >#endif ># 1907 "./curses.h" > >#define ALL_MOUSE_EVENTS (REPORT_MOUSE_POSITION - 1) > >/* macros to extract single event-bits from masks */ >#define BUTTON_RELEASE(e, x) ((e) & NCURSES_MOUSE_MASK(x, 001)) >#define BUTTON_PRESS(e, x) ((e) & NCURSES_MOUSE_MASK(x, 002)) >#define BUTTON_CLICK(e, x) ((e) & NCURSES_MOUSE_MASK(x, 004)) >#define BUTTON_DOUBLE_CLICK(e, x) ((e) & NCURSES_MOUSE_MASK(x, 010)) >#define BUTTON_TRIPLE_CLICK(e, x) ((e) & NCURSES_MOUSE_MASK(x, 020)) >#define BUTTON_RESERVED_EVENT(e, x) ((e) & NCURSES_MOUSE_MASK(x, 040)) > >typedef struct >{ > short id; /* ID to distinguish multiple devices */ > int x, y, z; /* event coordinates (character-cell) */ > mmask_t bstate; /* button state bits */ >} >MEVENT; > >extern NCURSES_EXPORT(bool) has_mouse(void); >extern NCURSES_EXPORT(int) getmouse (MEVENT *); >extern NCURSES_EXPORT(int) ungetmouse (MEVENT *); >extern NCURSES_EXPORT(mmask_t) mousemask (mmask_t, mmask_t *); >extern NCURSES_EXPORT(bool) wenclose (const WINDOW *, int, int); >extern NCURSES_EXPORT(int) mouseinterval (int); >extern NCURSES_EXPORT(bool) wmouse_trafo (const WINDOW*, int*, int*, bool); >extern NCURSES_EXPORT(bool) mouse_trafo (int*, int*, bool); /* generated */ > >#if NCURSES_SP_FUNCS >extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(has_mouse) (SCREEN*); >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(getmouse) (SCREEN*, MEVENT *); >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(ungetmouse) (SCREEN*,MEVENT *); >extern NCURSES_EXPORT(mmask_t) NCURSES_SP_NAME(mousemask) (SCREEN*, mmask_t, mmask_t *); >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(mouseinterval) (SCREEN*, int); >#endif ># 1942 "./curses.h" > >#define mouse_trafo(y,x,to_screen) wmouse_trafo(stdscr,y,x,to_screen) > >/* other non-XSI functions */ > >extern NCURSES_EXPORT(int) mcprint (char *, int); /* direct data to printer */ >extern NCURSES_EXPORT(int) has_key (int); /* do we have given key? */ > >#if NCURSES_SP_FUNCS >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(has_key) (SCREEN*, int); /* do we have given key? */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(mcprint) (SCREEN*, char *, int); /* direct data to printer */ >#endif ># 1954 "./curses.h" > >/* Debugging : use with libncurses_g.a */ > >extern NCURSES_EXPORT(void) _tracef (const char *, ...) GCC_PRINTFLIKE(1,2); >extern NCURSES_EXPORT(void) _tracedump (const char *, WINDOW *); >extern NCURSES_EXPORT(char *) _traceattr (attr_t); >extern NCURSES_EXPORT(char *) _traceattr2 (int, chtype); >extern NCURSES_EXPORT(char *) _nc_tracebits (void); >extern NCURSES_EXPORT(char *) _tracechar (int); >extern NCURSES_EXPORT(char *) _tracechtype (chtype); >extern NCURSES_EXPORT(char *) _tracechtype2 (int, chtype); >#if NCURSES_WIDECHAR >#define _tracech_t _tracecchar_t >extern NCURSES_EXPORT(char *) _tracecchar_t (const cchar_t *); >#define _tracech_t2 _tracecchar_t2 >extern NCURSES_EXPORT(char *) _tracecchar_t2 (int, const cchar_t *); >#else ># 1971 "./curses.h" >#define _tracech_t _tracechtype >#define _tracech_t2 _tracechtype2 >#endif ># 1974 "./curses.h" >extern NCURSES_EXPORT(char *) _tracemouse (const MEVENT *); >extern NCURSES_EXPORT(void) trace (const unsigned int); > >/* trace masks */ >#define TRACE_DISABLE 0x0000 /* turn off tracing */ >#define TRACE_TIMES 0x0001 /* trace user and system times of updates */ >#define TRACE_TPUTS 0x0002 /* trace tputs calls */ >#define TRACE_UPDATE 0x0004 /* trace update actions, old & new screens */ >#define TRACE_MOVE 0x0008 /* trace cursor moves and scrolls */ >#define TRACE_CHARPUT 0x0010 /* trace all character outputs */ >#define TRACE_ORDINARY 0x001F /* trace all update actions */ >#define TRACE_CALLS 0x0020 /* trace all curses calls */ >#define TRACE_VIRTPUT 0x0040 /* trace virtual character puts */ >#define TRACE_IEVENT 0x0080 /* trace low-level input processing */ >#define TRACE_BITS 0x0100 /* trace state of TTY control bits */ >#define TRACE_ICALLS 0x0200 /* trace internal/nested calls */ >#define TRACE_CCALLS 0x0400 /* trace per-character calls */ >#define TRACE_DATABASE 0x0800 /* trace read/write of terminfo/termcap data */ >#define TRACE_ATTRS 0x1000 /* trace attribute updates */ > >#define TRACE_SHIFT 13 /* number of bits in the trace masks */ >#define TRACE_MAXIMUM ((1 << TRACE_SHIFT) - 1) /* maximum trace level */ > >#if defined(TRACE) || defined(NCURSES_TEST) >extern NCURSES_EXPORT_VAR(int) _nc_optimize_enable; /* enable optimizations */ >extern NCURSES_EXPORT(const char *) _nc_visbuf (const char *); >#define OPTIMIZE_MVCUR 0x01 /* cursor movement optimization */ >#define OPTIMIZE_HASHMAP 0x02 /* diff hashing to detect scrolls */ >#define OPTIMIZE_SCROLL 0x04 /* scroll optimization */ >#define OPTIMIZE_ALL 0xff /* enable all optimizations (dflt) */ >#endif ># 2005 "./curses.h" > >#if 0 /* expanded by -frewrite-includes */ >#include <unctrl.h> >#endif /* expanded by -frewrite-includes */ ># 2006 "./curses.h" ># 1 "./unctrl.h" 1 >/**************************************************************************** > * 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: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 * > * and: Eric S. Raymond <esr@snark.thyrsus.com> * > ****************************************************************************/ > >/* > * unctrl.h > * > * Display a printable version of a control character. > * Control characters are displayed in caret notation (^x), DELETE is displayed > * as ^?. Printable characters are displayed as is. > */ > >/* $Id: unctrl.h.in,v 1.11 2009/04/18 21:00:52 tom Exp $ */ > >#ifndef NCURSES_UNCTRL_H_incl >#define NCURSES_UNCTRL_H_incl 1 > >#undef NCURSES_VERSION >#define NCURSES_VERSION "5.9" > >#ifdef __cplusplus >extern "C" { >#endif ># 53 "./unctrl.h" > >#if 0 /* expanded by -frewrite-includes */ >#include <curses.h> >#endif /* expanded by -frewrite-includes */ ># 54 "./unctrl.h" ># 1 "./curses.h" 1 >/**************************************************************************** > * Copyright (c) 1998-2013,2014 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: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 * > * and: Eric S. Raymond <esr@snark.thyrsus.com> * > * and: Thomas E. Dickey 1996-on * > ****************************************************************************/ > >/* $Id: curses.h.in,v 1.237 2014/02/01 22:08:12 tom Exp $ */ > >#ifndef __NCURSES_H >#define __NCURSES_H > >#define CURSES 1 >#define CURSES_H 1 > >/* These are defined only in curses.h, and are used for conditional compiles */ >#define NCURSES_VERSION_MAJOR 5 >#define NCURSES_VERSION_MINOR 9 >#define NCURSES_VERSION_PATCH 20140222 > >/* This is defined in more than one ncurses header, for identification */ >#undef NCURSES_VERSION >#define NCURSES_VERSION "5.9" > >/* > * Identify the mouse encoding version. > */ >#define NCURSES_MOUSE_VERSION 1 > >/* > * Definitions to facilitate DLL's. > */ >#if 0 /* expanded by -frewrite-includes */ >#include <ncurses_dll.h> >#endif /* expanded by -frewrite-includes */ ># 60 "./curses.h" ># 61 "./curses.h" > >/* > * User-definable tweak to disable the include of <stdbool.h>. > */ >#ifndef NCURSES_ENABLE_STDBOOL_H >#define NCURSES_ENABLE_STDBOOL_H 1 >#endif ># 68 "./curses.h" > >/* > * NCURSES_ATTR_T is used to quiet compiler warnings when building ncurses > * configured using --disable-macros. > */ >#ifdef NCURSES_NOMACROS >#ifndef NCURSES_ATTR_T >#define NCURSES_ATTR_T attr_t >#endif ># 77 "./curses.h" >#endif /* NCURSES_NOMACROS */ ># 78 "./curses.h" > >#ifndef NCURSES_ATTR_T >#define NCURSES_ATTR_T int >#endif ># 82 "./curses.h" > >/* > * Expands to 'const' if ncurses is configured using --enable-const. Note that > * doing so makes it incompatible with other implementations of X/Open Curses. > */ >#undef NCURSES_CONST >#define NCURSES_CONST const > >#undef NCURSES_INLINE >#define NCURSES_INLINE inline > >/* > * The internal type used for color values, and for color-pairs. The latter > * allows the curses library to enumerate the combinations of foreground and > * background colors used by an application, and is normally the product of the > * total foreground and background colors. > * > * X/Open uses "short" for both of these types, ultimately because they are > * numbers from the terminal database, which uses 16-bit signed values. > */ >#undef NCURSES_COLOR_T >#define NCURSES_COLOR_T short > >#undef NCURSES_PAIRS_T >#define NCURSES_PAIRS_T short > >/* > * Definition used to make WINDOW and similar structs opaque. > */ >#ifndef NCURSES_OPAQUE >#define NCURSES_OPAQUE 0 >#endif ># 114 "./curses.h" > >/* > * The reentrant code relies on the opaque setting, but adds features. > */ >#ifndef NCURSES_REENTRANT >#define NCURSES_REENTRANT 0 >#endif ># 121 "./curses.h" > >/* > * Control whether bindings for interop support are added. > */ >#undef NCURSES_INTEROP_FUNCS >#define NCURSES_INTEROP_FUNCS 0 > >/* > * The internal type used for window dimensions. > */ >#undef NCURSES_SIZE_T >#define NCURSES_SIZE_T short > >/* > * Control whether tparm() supports varargs or fixed-parameter list. > */ >#undef NCURSES_TPARM_VARARGS >#define NCURSES_TPARM_VARARGS 1 > >/* > * Control type used for tparm's arguments. While X/Open equates long and > * char* values, this is not always workable for 64-bit platforms. > */ >#undef NCURSES_TPARM_ARG >#define NCURSES_TPARM_ARG long > >/* > * NCURSES_CH_T is used in building the library, but not used otherwise in > * this header file, since that would make the normal/wide-character versions > * of the header incompatible. > */ >#undef NCURSES_CH_T >#define NCURSES_CH_T cchar_t > >#if 0 && defined(_LP64) >typedef unsigned chtype; >typedef unsigned mmask_t; >#else ># 159 "./curses.h" >typedef unsigned long chtype; >typedef unsigned long mmask_t; >#endif ># 162 "./curses.h" > >/* > * We need FILE, etc. Include this before checking any feature symbols. > */ >#if 0 /* expanded by -frewrite-includes */ >#include <stdio.h> >#endif /* expanded by -frewrite-includes */ ># 166 "./curses.h" ># 167 "./curses.h" > >/* > * With XPG4, you must define _XOPEN_SOURCE_EXTENDED, it is redundant (or > * conflicting) when _XOPEN_SOURCE is 500 or greater. If NCURSES_WIDECHAR is > * not already defined, e.g., if the platform relies upon nonstandard feature > * test macros, define it at this point if the standard feature test macros > * indicate that it should be defined. > */ >#ifndef NCURSES_WIDECHAR >#if defined(_XOPEN_SOURCE_EXTENDED) || (defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE - 0 >= 500)) >#define NCURSES_WIDECHAR 1 >#else ># 179 "./curses.h" >#define NCURSES_WIDECHAR 0 >#endif ># 181 "./curses.h" >#endif /* NCURSES_WIDECHAR */ ># 182 "./curses.h" > >#if 0 /* expanded by -frewrite-includes */ >#include <stdarg.h> /* we need va_list */ >#endif /* expanded by -frewrite-includes */ ># 183 "./curses.h" ># 184 "./curses.h" >#if NCURSES_WIDECHAR >#if 0 /* expanded by -frewrite-includes */ >#include <stddef.h> /* we want wchar_t */ >#endif /* expanded by -frewrite-includes */ ># 185 "./curses.h" ># 186 "./curses.h" >#endif ># 187 "./curses.h" > >/* X/Open and SVr4 specify that curses implements 'bool'. However, C++ may also > * implement it. If so, we must use the C++ compiler's type to avoid conflict > * with other interfaces. > * > * A further complication is that <stdbool.h> may declare 'bool' to be a > * different type, such as an enum which is not necessarily compatible with > * C++. If we have <stdbool.h>, make 'bool' a macro, so users may #undef it. > * Otherwise, let it remain a typedef to avoid conflicts with other #define's. > * In either case, make a typedef for NCURSES_BOOL which can be used if needed > * from either C or C++. > */ > >#undef TRUE >#define TRUE 1 > >#undef FALSE >#define FALSE 0 > >typedef unsigned char NCURSES_BOOL; > >#if defined(__cplusplus) /* __cplusplus, etc. */ > >/* use the C++ compiler's bool type */ >#define NCURSES_BOOL bool > >#else /* c89, c99, etc. */ ># 214 "./curses.h" > >#if NCURSES_ENABLE_STDBOOL_H >#if 0 /* expanded by -frewrite-includes */ >#include <stdbool.h> >#endif /* expanded by -frewrite-includes */ ># 216 "./curses.h" ># 217 "./curses.h" >/* use whatever the C compiler decides bool really is */ >#define NCURSES_BOOL bool >#else ># 220 "./curses.h" >/* there is no predefined bool - use our own */ >#undef bool >#define bool NCURSES_BOOL >#endif ># 224 "./curses.h" > >#endif /* !__cplusplus, etc. */ ># 226 "./curses.h" > >#ifdef __cplusplus >extern "C" { >#define NCURSES_CAST(type,value) static_cast<type>(value) >#else ># 231 "./curses.h" >#define NCURSES_CAST(type,value) (type)(value) >#endif ># 233 "./curses.h" > >/* > * X/Open attributes. In the ncurses implementation, they are identical to the > * A_ attributes. > */ >#define WA_ATTRIBUTES A_ATTRIBUTES >#define WA_NORMAL A_NORMAL >#define WA_STANDOUT A_STANDOUT >#define WA_UNDERLINE A_UNDERLINE >#define WA_REVERSE A_REVERSE >#define WA_BLINK A_BLINK >#define WA_DIM A_DIM >#define WA_BOLD A_BOLD >#define WA_ALTCHARSET A_ALTCHARSET >#define WA_INVIS A_INVIS >#define WA_PROTECT A_PROTECT >#define WA_HORIZONTAL A_HORIZONTAL >#define WA_LEFT A_LEFT >#define WA_LOW A_LOW >#define WA_RIGHT A_RIGHT >#define WA_TOP A_TOP >#define WA_VERTICAL A_VERTICAL > >#if 1 >#define WA_ITALIC A_ITALIC /* ncurses extension */ >#endif ># 259 "./curses.h" > >/* colors */ >#define COLOR_BLACK 0 >#define COLOR_RED 1 >#define COLOR_GREEN 2 >#define COLOR_YELLOW 3 >#define COLOR_BLUE 4 >#define COLOR_MAGENTA 5 >#define COLOR_CYAN 6 >#define COLOR_WHITE 7 > >/* line graphics */ > >#if 0 || NCURSES_REENTRANT >NCURSES_WRAPPED_VAR(chtype*, acs_map); >#define acs_map NCURSES_PUBLIC_VAR(acs_map()) >#else ># 276 "./curses.h" >extern NCURSES_EXPORT_VAR(chtype) acs_map[]; >#endif ># 278 "./curses.h" > >#define NCURSES_ACS(c) (acs_map[NCURSES_CAST(unsigned char,(c))]) > >/* VT100 symbols begin here */ >#define ACS_ULCORNER NCURSES_ACS('l') /* upper left corner */ >#define ACS_LLCORNER NCURSES_ACS('m') /* lower left corner */ >#define ACS_URCORNER NCURSES_ACS('k') /* upper right corner */ >#define ACS_LRCORNER NCURSES_ACS('j') /* lower right corner */ >#define ACS_LTEE NCURSES_ACS('t') /* tee pointing right */ >#define ACS_RTEE NCURSES_ACS('u') /* tee pointing left */ >#define ACS_BTEE NCURSES_ACS('v') /* tee pointing up */ >#define ACS_TTEE NCURSES_ACS('w') /* tee pointing down */ >#define ACS_HLINE NCURSES_ACS('q') /* horizontal line */ >#define ACS_VLINE NCURSES_ACS('x') /* vertical line */ >#define ACS_PLUS NCURSES_ACS('n') /* large plus or crossover */ >#define ACS_S1 NCURSES_ACS('o') /* scan line 1 */ >#define ACS_S9 NCURSES_ACS('s') /* scan line 9 */ >#define ACS_DIAMOND NCURSES_ACS('`') /* diamond */ >#define ACS_CKBOARD NCURSES_ACS('a') /* checker board (stipple) */ >#define ACS_DEGREE NCURSES_ACS('f') /* degree symbol */ >#define ACS_PLMINUS NCURSES_ACS('g') /* plus/minus */ >#define ACS_BULLET NCURSES_ACS('~') /* bullet */ >/* Teletype 5410v1 symbols begin here */ >#define ACS_LARROW NCURSES_ACS(',') /* arrow pointing left */ >#define ACS_RARROW NCURSES_ACS('+') /* arrow pointing right */ >#define ACS_DARROW NCURSES_ACS('.') /* arrow pointing down */ >#define ACS_UARROW NCURSES_ACS('-') /* arrow pointing up */ >#define ACS_BOARD NCURSES_ACS('h') /* board of squares */ >#define ACS_LANTERN NCURSES_ACS('i') /* lantern symbol */ >#define ACS_BLOCK NCURSES_ACS('0') /* solid square block */ >/* > * These aren't documented, but a lot of System Vs have them anyway > * (you can spot pprryyzz{{||}} in a lot of AT&T terminfo strings). > * The ACS_names may not match AT&T's, our source didn't know them. > */ >#define ACS_S3 NCURSES_ACS('p') /* scan line 3 */ >#define ACS_S7 NCURSES_ACS('r') /* scan line 7 */ >#define ACS_LEQUAL NCURSES_ACS('y') /* less/equal */ >#define ACS_GEQUAL NCURSES_ACS('z') /* greater/equal */ >#define ACS_PI NCURSES_ACS('{') /* Pi */ >#define ACS_NEQUAL NCURSES_ACS('|') /* not equal */ >#define ACS_STERLING NCURSES_ACS('}') /* UK pound sign */ > >/* > * Line drawing ACS names are of the form ACS_trbl, where t is the top, r > * is the right, b is the bottom, and l is the left. t, r, b, and l might > * be B (blank), S (single), D (double), or T (thick). The subset defined > * here only uses B and S. > */ >#define ACS_BSSB ACS_ULCORNER >#define ACS_SSBB ACS_LLCORNER >#define ACS_BBSS ACS_URCORNER >#define ACS_SBBS ACS_LRCORNER >#define ACS_SBSS ACS_RTEE >#define ACS_SSSB ACS_LTEE >#define ACS_SSBS ACS_BTEE >#define ACS_BSSS ACS_TTEE >#define ACS_BSBS ACS_HLINE >#define ACS_SBSB ACS_VLINE >#define ACS_SSSS ACS_PLUS > >#undef ERR >#define ERR (-1) > >#undef OK >#define OK (0) > >/* values for the _flags member */ >#define _SUBWIN 0x01 /* is this a sub-window? */ >#define _ENDLINE 0x02 /* is the window flush right? */ >#define _FULLWIN 0x04 /* is the window full-screen? */ >#define _SCROLLWIN 0x08 /* bottom edge is at screen bottom? */ >#define _ISPAD 0x10 /* is this window a pad? */ >#define _HASMOVED 0x20 /* has cursor moved since last refresh? */ >#define _WRAPPED 0x40 /* cursor was just wrappped */ > >/* > * this value is used in the firstchar and lastchar fields to mark > * unchanged lines > */ >#define _NOCHANGE -1 > >/* > * this value is used in the oldindex field to mark lines created by insertions > * and scrolls. > */ >#define _NEWINDEX -1 > >typedef struct screen SCREEN; >typedef struct _win_st WINDOW; > >typedef chtype attr_t; /* ...must be at least as wide as chtype */ > >#if NCURSES_WIDECHAR > >#if 0 >#ifdef mblen /* libutf8.h defines it w/o undefining first */ >#undef mblen >#endif ># 377 "./curses.h" >#if 0 /* expanded by -frewrite-includes */ >#include <libutf8.h> >#endif /* expanded by -frewrite-includes */ ># 377 "./curses.h" ># 378 "./curses.h" >#endif ># 379 "./curses.h" > >#if 1 >#if 0 /* expanded by -frewrite-includes */ >#include <wchar.h> /* ...to get mbstate_t, etc. */ >#endif /* expanded by -frewrite-includes */ ># 381 "./curses.h" ># 382 "./curses.h" >#endif ># 383 "./curses.h" > >#if 0 >typedef unsigned short wchar_t1; >#endif ># 387 "./curses.h" > >#if 0 >typedef unsigned int wint_t1; >#endif ># 391 "./curses.h" > >/* > * cchar_t stores an array of CCHARW_MAX wide characters. The first is > * normally a spacing character. The others are non-spacing. If those > * (spacing and nonspacing) do not fill the array, a null L'\0' follows. > * Otherwise, a null is assumed to follow when extracting via getcchar(). > */ >#define CCHARW_MAX 5 >typedef struct >{ > attr_t attr; > wchar_t chars[CCHARW_MAX]; >#if 0 >#undef NCURSES_EXT_COLORS >#define NCURSES_EXT_COLORS 20140222 > int ext_color; /* color pair, must be more than 16-bits */ >#endif ># 408 "./curses.h" >} >cchar_t; > >#endif /* NCURSES_WIDECHAR */ ># 412 "./curses.h" > >#if !NCURSES_OPAQUE >struct ldat; > >struct _win_st >{ > NCURSES_SIZE_T _cury, _curx; /* current cursor position */ > > /* window location and size */ > NCURSES_SIZE_T _maxy, _maxx; /* maximums of x and y, NOT window size */ > NCURSES_SIZE_T _begy, _begx; /* screen coords of upper-left-hand corner */ > > short _flags; /* window state flags */ > > /* attribute tracking */ > attr_t _attrs; /* current attribute for non-space character */ > chtype _bkgd; /* current background char/attribute pair */ > > /* option values set by user */ > bool _notimeout; /* no time out on function-key entry? */ > bool _clear; /* consider all data in the window invalid? */ > bool _leaveok; /* OK to not reset cursor on exit? */ > bool _scroll; /* OK to scroll this window? */ > bool _idlok; /* OK to use insert/delete line? */ > bool _idcok; /* OK to use insert/delete char? */ > bool _immed; /* window in immed mode? (not yet used) */ > bool _sync; /* window in sync mode? */ > bool _use_keypad; /* process function keys into KEY_ symbols? */ > int _delay; /* 0 = nodelay, <0 = blocking, >0 = delay */ > > struct ldat *_line; /* the actual line data */ > > /* global screen state */ > NCURSES_SIZE_T _regtop; /* top line of scrolling region */ > NCURSES_SIZE_T _regbottom; /* bottom line of scrolling region */ > > /* these are used only if this is a sub-window */ > int _parx; /* x coordinate of this window in parent */ > int _pary; /* y coordinate of this window in parent */ > WINDOW *_parent; /* pointer to parent if a sub-window */ > > /* these are used only if this is a pad */ > struct pdat > { > NCURSES_SIZE_T _pad_y, _pad_x; > NCURSES_SIZE_T _pad_top, _pad_left; > NCURSES_SIZE_T _pad_bottom, _pad_right; > } _pad; > > NCURSES_SIZE_T _yoffset; /* real begy is _begy + _yoffset */ > >#if NCURSES_WIDECHAR > cchar_t _bkgrnd; /* current background char/attribute pair */ >#if 0 > int _color; /* current color-pair for non-space character */ >#endif ># 468 "./curses.h" >#endif ># 469 "./curses.h" >}; >#endif /* NCURSES_OPAQUE */ ># 471 "./curses.h" > >/* > * This is an extension to support events... > */ >#if 1 >#ifdef NCURSES_WGETCH_EVENTS >#if !defined(__BEOS__) || defined(__HAIKU__) > /* Fix _nc_timed_wait() on BEOS... */ ># define NCURSES_EVENT_VERSION 1 >#endif /* !defined(__BEOS__) */ ># 481 "./curses.h" > >/* > * Bits to set in _nc_event.data.flags > */ ># define _NC_EVENT_TIMEOUT_MSEC 1 ># define _NC_EVENT_FILE 2 ># define _NC_EVENT_FILE_READABLE 2 ># if 0 /* Not supported yet... */ ># define _NC_EVENT_FILE_WRITABLE 4 ># define _NC_EVENT_FILE_EXCEPTION 8 ># endif ># 492 "./curses.h" > >typedef struct >{ > int type; > union > { > long timeout_msec; /* _NC_EVENT_TIMEOUT_MSEC */ > struct > { > unsigned int flags; > int fd; > unsigned int result; > } fev; /* _NC_EVENT_FILE */ > } data; >} _nc_event; > >typedef struct >{ > int count; > int result_flags; /* _NC_EVENT_TIMEOUT_MSEC or _NC_EVENT_FILE_READABLE */ > _nc_event *events[1]; >} _nc_eventlist; > >extern NCURSES_EXPORT(int) wgetch_events (WINDOW *, _nc_eventlist *); /* experimental */ >extern NCURSES_EXPORT(int) wgetnstr_events (WINDOW *,char *,int,_nc_eventlist *);/* experimental */ > >#endif /* NCURSES_WGETCH_EVENTS */ ># 519 "./curses.h" >#endif /* NCURSES_EXT_FUNCS */ ># 520 "./curses.h" > >/* > * GCC (and some other compilers) define '__attribute__'; we're using this > * macro to alert the compiler to flag inconsistencies in printf/scanf-like > * function calls. Just in case '__attribute__' isn't defined, make a dummy. > * Old versions of G++ do not accept it anyway, at least not consistently with > * GCC. > */ >#if !(defined(__GNUC__) || defined(__GNUG__) || defined(__attribute__)) >#define __attribute__(p) /* nothing */ >#endif ># 531 "./curses.h" > >/* > * We cannot define these in ncurses_cfg.h, since they require parameters to be > * passed (that is non-portable). If you happen to be using gcc with warnings > * enabled, define > * GCC_PRINTF > * GCC_SCANF > * to improve checking of calls to printw(), etc. > */ >#ifndef GCC_PRINTFLIKE >#if defined(GCC_PRINTF) && !defined(printf) >#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var))) >#else ># 544 "./curses.h" >#define GCC_PRINTFLIKE(fmt,var) /*nothing*/ >#endif ># 546 "./curses.h" >#endif ># 547 "./curses.h" > >#ifndef GCC_SCANFLIKE >#if defined(GCC_SCANF) && !defined(scanf) >#define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var))) >#else ># 552 "./curses.h" >#define GCC_SCANFLIKE(fmt,var) /*nothing*/ >#endif ># 554 "./curses.h" >#endif ># 555 "./curses.h" > >#ifndef GCC_NORETURN >#define GCC_NORETURN /* nothing */ >#endif ># 559 "./curses.h" > >#ifndef GCC_UNUSED >#define GCC_UNUSED /* nothing */ >#endif ># 563 "./curses.h" > >/* > * Curses uses a helper function. Define our type for this to simplify > * extending it for the sp-funcs feature. > */ >typedef int (*NCURSES_OUTC)(int); > >/* > * Function prototypes. This is the complete X/Open Curses list of required > * functions. Those marked `generated' will have sources generated from the > * macro definitions later in this file, in order to satisfy XPG4.2 > * requirements. > */ > >extern NCURSES_EXPORT(int) addch (const chtype); /* generated */ >extern NCURSES_EXPORT(int) addchnstr (const chtype *, int); /* generated */ >extern NCURSES_EXPORT(int) addchstr (const chtype *); /* generated */ >extern NCURSES_EXPORT(int) addnstr (const char *, int); /* generated */ >extern NCURSES_EXPORT(int) addstr (const char *); /* generated */ >extern NCURSES_EXPORT(int) attroff (NCURSES_ATTR_T); /* generated */ >extern NCURSES_EXPORT(int) attron (NCURSES_ATTR_T); /* generated */ >extern NCURSES_EXPORT(int) attrset (NCURSES_ATTR_T); /* generated */ >extern NCURSES_EXPORT(int) attr_get (attr_t *, NCURSES_PAIRS_T *, void *); /* generated */ >extern NCURSES_EXPORT(int) attr_off (attr_t, void *); /* generated */ >extern NCURSES_EXPORT(int) attr_on (attr_t, void *); /* generated */ >extern NCURSES_EXPORT(int) attr_set (attr_t, NCURSES_PAIRS_T, void *); /* generated */ >extern NCURSES_EXPORT(int) baudrate (void); /* implemented */ >extern NCURSES_EXPORT(int) beep (void); /* implemented */ >extern NCURSES_EXPORT(int) bkgd (chtype); /* generated */ >extern NCURSES_EXPORT(void) bkgdset (chtype); /* generated */ >extern NCURSES_EXPORT(int) border (chtype,chtype,chtype,chtype,chtype,chtype,chtype,chtype); /* generated */ >extern NCURSES_EXPORT(int) box (WINDOW *, chtype, chtype); /* generated */ >extern NCURSES_EXPORT(bool) can_change_color (void); /* implemented */ >extern NCURSES_EXPORT(int) cbreak (void); /* implemented */ >extern NCURSES_EXPORT(int) chgat (int, attr_t, NCURSES_PAIRS_T, const void *); /* generated */ >extern NCURSES_EXPORT(int) clear (void); /* generated */ >extern NCURSES_EXPORT(int) clearok (WINDOW *,bool); /* implemented */ >extern NCURSES_EXPORT(int) clrtobot (void); /* generated */ >extern NCURSES_EXPORT(int) clrtoeol (void); /* generated */ >extern NCURSES_EXPORT(int) color_content (NCURSES_COLOR_T,NCURSES_COLOR_T*,NCURSES_COLOR_T*,NCURSES_COLOR_T*); /* implemented */ >extern NCURSES_EXPORT(int) color_set (NCURSES_PAIRS_T,void*); /* generated */ >extern NCURSES_EXPORT(int) COLOR_PAIR (int); /* generated */ >extern NCURSES_EXPORT(int) copywin (const WINDOW*,WINDOW*,int,int,int,int,int,int,int); /* implemented */ >extern NCURSES_EXPORT(int) curs_set (int); /* implemented */ >extern NCURSES_EXPORT(int) def_prog_mode (void); /* implemented */ >extern NCURSES_EXPORT(int) def_shell_mode (void); /* implemented */ >extern NCURSES_EXPORT(int) delay_output (int); /* implemented */ >extern NCURSES_EXPORT(int) delch (void); /* generated */ >extern NCURSES_EXPORT(void) delscreen (SCREEN *); /* implemented */ >extern NCURSES_EXPORT(int) delwin (WINDOW *); /* implemented */ >extern NCURSES_EXPORT(int) deleteln (void); /* generated */ >extern NCURSES_EXPORT(WINDOW *) derwin (WINDOW *,int,int,int,int); /* implemented */ >extern NCURSES_EXPORT(int) doupdate (void); /* implemented */ >extern NCURSES_EXPORT(WINDOW *) dupwin (WINDOW *); /* implemented */ >extern NCURSES_EXPORT(int) echo (void); /* implemented */ >extern NCURSES_EXPORT(int) echochar (const chtype); /* generated */ >extern NCURSES_EXPORT(int) erase (void); /* generated */ >extern NCURSES_EXPORT(int) endwin (void); /* implemented */ >extern NCURSES_EXPORT(char) erasechar (void); /* implemented */ >extern NCURSES_EXPORT(void) filter (void); /* implemented */ >extern NCURSES_EXPORT(int) flash (void); /* implemented */ >extern NCURSES_EXPORT(int) flushinp (void); /* implemented */ >extern NCURSES_EXPORT(chtype) getbkgd (WINDOW *); /* generated */ >extern NCURSES_EXPORT(int) getch (void); /* generated */ >extern NCURSES_EXPORT(int) getnstr (char *, int); /* generated */ >extern NCURSES_EXPORT(int) getstr (char *); /* generated */ >extern NCURSES_EXPORT(WINDOW *) getwin (FILE *); /* implemented */ >extern NCURSES_EXPORT(int) halfdelay (int); /* implemented */ >extern NCURSES_EXPORT(bool) has_colors (void); /* implemented */ >extern NCURSES_EXPORT(bool) has_ic (void); /* implemented */ >extern NCURSES_EXPORT(bool) has_il (void); /* implemented */ >extern NCURSES_EXPORT(int) hline (chtype, int); /* generated */ >extern NCURSES_EXPORT(void) idcok (WINDOW *, bool); /* implemented */ >extern NCURSES_EXPORT(int) idlok (WINDOW *, bool); /* implemented */ >extern NCURSES_EXPORT(void) immedok (WINDOW *, bool); /* implemented */ >extern NCURSES_EXPORT(chtype) inch (void); /* generated */ >extern NCURSES_EXPORT(int) inchnstr (chtype *, int); /* generated */ >extern NCURSES_EXPORT(int) inchstr (chtype *); /* generated */ >extern NCURSES_EXPORT(WINDOW *) initscr (void); /* implemented */ >extern NCURSES_EXPORT(int) init_color (NCURSES_COLOR_T,NCURSES_COLOR_T,NCURSES_COLOR_T,NCURSES_COLOR_T); /* implemented */ >extern NCURSES_EXPORT(int) init_pair (NCURSES_PAIRS_T,NCURSES_COLOR_T,NCURSES_COLOR_T); /* implemented */ >extern NCURSES_EXPORT(int) innstr (char *, int); /* generated */ >extern NCURSES_EXPORT(int) insch (chtype); /* generated */ >extern NCURSES_EXPORT(int) insdelln (int); /* generated */ >extern NCURSES_EXPORT(int) insertln (void); /* generated */ >extern NCURSES_EXPORT(int) insnstr (const char *, int); /* generated */ >extern NCURSES_EXPORT(int) insstr (const char *); /* generated */ >extern NCURSES_EXPORT(int) instr (char *); /* generated */ >extern NCURSES_EXPORT(int) intrflush (WINDOW *,bool); /* implemented */ >extern NCURSES_EXPORT(bool) isendwin (void); /* implemented */ >extern NCURSES_EXPORT(bool) is_linetouched (WINDOW *,int); /* implemented */ >extern NCURSES_EXPORT(bool) is_wintouched (WINDOW *); /* implemented */ >extern NCURSES_EXPORT(NCURSES_CONST char *) keyname (int); /* implemented */ >extern NCURSES_EXPORT(int) keypad (WINDOW *,bool); /* implemented */ >extern NCURSES_EXPORT(char) killchar (void); /* implemented */ >extern NCURSES_EXPORT(int) leaveok (WINDOW *,bool); /* implemented */ >extern NCURSES_EXPORT(char *) longname (void); /* implemented */ >extern NCURSES_EXPORT(int) meta (WINDOW *,bool); /* implemented */ >extern NCURSES_EXPORT(int) move (int, int); /* generated */ >extern NCURSES_EXPORT(int) mvaddch (int, int, const chtype); /* generated */ >extern NCURSES_EXPORT(int) mvaddchnstr (int, int, const chtype *, int); /* generated */ >extern NCURSES_EXPORT(int) mvaddchstr (int, int, const chtype *); /* generated */ >extern NCURSES_EXPORT(int) mvaddnstr (int, int, const char *, int); /* generated */ >extern NCURSES_EXPORT(int) mvaddstr (int, int, const char *); /* generated */ >extern NCURSES_EXPORT(int) mvchgat (int, int, int, attr_t, NCURSES_PAIRS_T, const void *); /* generated */ >extern NCURSES_EXPORT(int) mvcur (int,int,int,int); /* implemented */ >extern NCURSES_EXPORT(int) mvdelch (int, int); /* generated */ >extern NCURSES_EXPORT(int) mvderwin (WINDOW *, int, int); /* implemented */ >extern NCURSES_EXPORT(int) mvgetch (int, int); /* generated */ >extern NCURSES_EXPORT(int) mvgetnstr (int, int, char *, int); /* generated */ >extern NCURSES_EXPORT(int) mvgetstr (int, int, char *); /* generated */ >extern NCURSES_EXPORT(int) mvhline (int, int, chtype, int); /* generated */ >extern NCURSES_EXPORT(chtype) mvinch (int, int); /* generated */ >extern NCURSES_EXPORT(int) mvinchnstr (int, int, chtype *, int); /* generated */ >extern NCURSES_EXPORT(int) mvinchstr (int, int, chtype *); /* generated */ >extern NCURSES_EXPORT(int) mvinnstr (int, int, char *, int); /* generated */ >extern NCURSES_EXPORT(int) mvinsch (int, int, chtype); /* generated */ >extern NCURSES_EXPORT(int) mvinsnstr (int, int, const char *, int); /* generated */ >extern NCURSES_EXPORT(int) mvinsstr (int, int, const char *); /* generated */ >extern NCURSES_EXPORT(int) mvinstr (int, int, char *); /* generated */ >extern NCURSES_EXPORT(int) mvprintw (int,int, const char *,...) /* implemented */ > GCC_PRINTFLIKE(3,4); >extern NCURSES_EXPORT(int) mvscanw (int,int, NCURSES_CONST char *,...) /* implemented */ > GCC_SCANFLIKE(3,4); >extern NCURSES_EXPORT(int) mvvline (int, int, chtype, int); /* generated */ >extern NCURSES_EXPORT(int) mvwaddch (WINDOW *, int, int, const chtype); /* generated */ >extern NCURSES_EXPORT(int) mvwaddchnstr (WINDOW *, int, int, const chtype *, int);/* generated */ >extern NCURSES_EXPORT(int) mvwaddchstr (WINDOW *, int, int, const chtype *); /* generated */ >extern NCURSES_EXPORT(int) mvwaddnstr (WINDOW *, int, int, const char *, int); /* generated */ >extern NCURSES_EXPORT(int) mvwaddstr (WINDOW *, int, int, const char *); /* generated */ >extern NCURSES_EXPORT(int) mvwchgat (WINDOW *, int, int, int, attr_t, NCURSES_PAIRS_T, const void *);/* generated */ >extern NCURSES_EXPORT(int) mvwdelch (WINDOW *, int, int); /* generated */ >extern NCURSES_EXPORT(int) mvwgetch (WINDOW *, int, int); /* generated */ >extern NCURSES_EXPORT(int) mvwgetnstr (WINDOW *, int, int, char *, int); /* generated */ >extern NCURSES_EXPORT(int) mvwgetstr (WINDOW *, int, int, char *); /* generated */ >extern NCURSES_EXPORT(int) mvwhline (WINDOW *, int, int, chtype, int); /* generated */ >extern NCURSES_EXPORT(int) mvwin (WINDOW *,int,int); /* implemented */ >extern NCURSES_EXPORT(chtype) mvwinch (WINDOW *, int, int); /* generated */ >extern NCURSES_EXPORT(int) mvwinchnstr (WINDOW *, int, int, chtype *, int); /* generated */ >extern NCURSES_EXPORT(int) mvwinchstr (WINDOW *, int, int, chtype *); /* generated */ >extern NCURSES_EXPORT(int) mvwinnstr (WINDOW *, int, int, char *, int); /* generated */ >extern NCURSES_EXPORT(int) mvwinsch (WINDOW *, int, int, chtype); /* generated */ >extern NCURSES_EXPORT(int) mvwinsnstr (WINDOW *, int, int, const char *, int); /* generated */ >extern NCURSES_EXPORT(int) mvwinsstr (WINDOW *, int, int, const char *); /* generated */ >extern NCURSES_EXPORT(int) mvwinstr (WINDOW *, int, int, char *); /* generated */ >extern NCURSES_EXPORT(int) mvwprintw (WINDOW*,int,int, const char *,...) /* implemented */ > GCC_PRINTFLIKE(4,5); >extern NCURSES_EXPORT(int) mvwscanw (WINDOW *,int,int, NCURSES_CONST char *,...) /* implemented */ > GCC_SCANFLIKE(4,5); >extern NCURSES_EXPORT(int) mvwvline (WINDOW *,int, int, chtype, int); /* generated */ >extern NCURSES_EXPORT(int) napms (int); /* implemented */ >extern NCURSES_EXPORT(WINDOW *) newpad (int,int); /* implemented */ >extern NCURSES_EXPORT(SCREEN *) newterm (NCURSES_CONST char *,FILE *,FILE *); /* implemented */ >extern NCURSES_EXPORT(WINDOW *) newwin (int,int,int,int); /* implemented */ >extern NCURSES_EXPORT(int) nl (void); /* implemented */ >extern NCURSES_EXPORT(int) nocbreak (void); /* implemented */ >extern NCURSES_EXPORT(int) nodelay (WINDOW *,bool); /* implemented */ >extern NCURSES_EXPORT(int) noecho (void); /* implemented */ >extern NCURSES_EXPORT(int) nonl (void); /* implemented */ >extern NCURSES_EXPORT(void) noqiflush (void); /* implemented */ >extern NCURSES_EXPORT(int) noraw (void); /* implemented */ >extern NCURSES_EXPORT(int) notimeout (WINDOW *,bool); /* implemented */ >extern NCURSES_EXPORT(int) overlay (const WINDOW*,WINDOW *); /* implemented */ >extern NCURSES_EXPORT(int) overwrite (const WINDOW*,WINDOW *); /* implemented */ >extern NCURSES_EXPORT(int) pair_content (NCURSES_PAIRS_T,NCURSES_COLOR_T*,NCURSES_COLOR_T*); /* implemented */ >extern NCURSES_EXPORT(int) PAIR_NUMBER (int); /* generated */ >extern NCURSES_EXPORT(int) pechochar (WINDOW *, const chtype); /* implemented */ >extern NCURSES_EXPORT(int) pnoutrefresh (WINDOW*,int,int,int,int,int,int);/* implemented */ >extern NCURSES_EXPORT(int) prefresh (WINDOW *,int,int,int,int,int,int); /* implemented */ >extern NCURSES_EXPORT(int) printw (const char *,...) /* implemented */ > GCC_PRINTFLIKE(1,2); >extern NCURSES_EXPORT(int) putwin (WINDOW *, FILE *); /* implemented */ >extern NCURSES_EXPORT(void) qiflush (void); /* implemented */ >extern NCURSES_EXPORT(int) raw (void); /* implemented */ >extern NCURSES_EXPORT(int) redrawwin (WINDOW *); /* generated */ >extern NCURSES_EXPORT(int) refresh (void); /* generated */ >extern NCURSES_EXPORT(int) resetty (void); /* implemented */ >extern NCURSES_EXPORT(int) reset_prog_mode (void); /* implemented */ >extern NCURSES_EXPORT(int) reset_shell_mode (void); /* implemented */ >extern NCURSES_EXPORT(int) ripoffline (int, int (*)(WINDOW *, int)); /* implemented */ >extern NCURSES_EXPORT(int) savetty (void); /* implemented */ >extern NCURSES_EXPORT(int) scanw (NCURSES_CONST char *,...) /* implemented */ > GCC_SCANFLIKE(1,2); >extern NCURSES_EXPORT(int) scr_dump (const char *); /* implemented */ >extern NCURSES_EXPORT(int) scr_init (const char *); /* implemented */ >extern NCURSES_EXPORT(int) scrl (int); /* generated */ >extern NCURSES_EXPORT(int) scroll (WINDOW *); /* generated */ >extern NCURSES_EXPORT(int) scrollok (WINDOW *,bool); /* implemented */ >extern NCURSES_EXPORT(int) scr_restore (const char *); /* implemented */ >extern NCURSES_EXPORT(int) scr_set (const char *); /* implemented */ >extern NCURSES_EXPORT(int) setscrreg (int,int); /* generated */ >extern NCURSES_EXPORT(SCREEN *) set_term (SCREEN *); /* implemented */ >extern NCURSES_EXPORT(int) slk_attroff (const chtype); /* implemented */ >extern NCURSES_EXPORT(int) slk_attr_off (const attr_t, void *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) slk_attron (const chtype); /* implemented */ >extern NCURSES_EXPORT(int) slk_attr_on (attr_t,void*); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) slk_attrset (const chtype); /* implemented */ >extern NCURSES_EXPORT(attr_t) slk_attr (void); /* implemented */ >extern NCURSES_EXPORT(int) slk_attr_set (const attr_t,NCURSES_PAIRS_T,void*); /* implemented */ >extern NCURSES_EXPORT(int) slk_clear (void); /* implemented */ >extern NCURSES_EXPORT(int) slk_color (NCURSES_PAIRS_T); /* implemented */ >extern NCURSES_EXPORT(int) slk_init (int); /* implemented */ >extern NCURSES_EXPORT(char *) slk_label (int); /* implemented */ >extern NCURSES_EXPORT(int) slk_noutrefresh (void); /* implemented */ >extern NCURSES_EXPORT(int) slk_refresh (void); /* implemented */ >extern NCURSES_EXPORT(int) slk_restore (void); /* implemented */ >extern NCURSES_EXPORT(int) slk_set (int,const char *,int); /* implemented */ >extern NCURSES_EXPORT(int) slk_touch (void); /* implemented */ >extern NCURSES_EXPORT(int) standout (void); /* generated */ >extern NCURSES_EXPORT(int) standend (void); /* generated */ >extern NCURSES_EXPORT(int) start_color (void); /* implemented */ >extern NCURSES_EXPORT(WINDOW *) subpad (WINDOW *, int, int, int, int); /* implemented */ >extern NCURSES_EXPORT(WINDOW *) subwin (WINDOW *, int, int, int, int); /* implemented */ >extern NCURSES_EXPORT(int) syncok (WINDOW *, bool); /* implemented */ >extern NCURSES_EXPORT(chtype) termattrs (void); /* implemented */ >extern NCURSES_EXPORT(char *) termname (void); /* implemented */ >extern NCURSES_EXPORT(void) timeout (int); /* generated */ >extern NCURSES_EXPORT(int) touchline (WINDOW *, int, int); /* generated */ >extern NCURSES_EXPORT(int) touchwin (WINDOW *); /* generated */ >extern NCURSES_EXPORT(int) typeahead (int); /* implemented */ >extern NCURSES_EXPORT(int) ungetch (int); /* implemented */ >extern NCURSES_EXPORT(int) untouchwin (WINDOW *); /* generated */ >extern NCURSES_EXPORT(void) use_env (bool); /* implemented */ >extern NCURSES_EXPORT(void) use_tioctl (bool); /* implemented */ >extern NCURSES_EXPORT(int) vidattr (chtype); /* implemented */ >extern NCURSES_EXPORT(int) vidputs (chtype, NCURSES_OUTC); /* implemented */ >extern NCURSES_EXPORT(int) vline (chtype, int); /* generated */ >extern NCURSES_EXPORT(int) vwprintw (WINDOW *, const char *,va_list); /* implemented */ >extern NCURSES_EXPORT(int) vw_printw (WINDOW *, const char *,va_list); /* generated */ >extern NCURSES_EXPORT(int) vwscanw (WINDOW *, NCURSES_CONST char *,va_list); /* implemented */ >extern NCURSES_EXPORT(int) vw_scanw (WINDOW *, NCURSES_CONST char *,va_list); /* generated */ >extern NCURSES_EXPORT(int) waddch (WINDOW *, const chtype); /* implemented */ >extern NCURSES_EXPORT(int) waddchnstr (WINDOW *,const chtype *,int); /* implemented */ >extern NCURSES_EXPORT(int) waddchstr (WINDOW *,const chtype *); /* generated */ >extern NCURSES_EXPORT(int) waddnstr (WINDOW *,const char *,int); /* implemented */ >extern NCURSES_EXPORT(int) waddstr (WINDOW *,const char *); /* generated */ >extern NCURSES_EXPORT(int) wattron (WINDOW *, int); /* generated */ >extern NCURSES_EXPORT(int) wattroff (WINDOW *, int); /* generated */ >extern NCURSES_EXPORT(int) wattrset (WINDOW *, int); /* generated */ >extern NCURSES_EXPORT(int) wattr_get (WINDOW *, attr_t *, NCURSES_PAIRS_T *, void *); /* generated */ >extern NCURSES_EXPORT(int) wattr_on (WINDOW *, attr_t, void *); /* implemented */ >extern NCURSES_EXPORT(int) wattr_off (WINDOW *, attr_t, void *); /* implemented */ >extern NCURSES_EXPORT(int) wattr_set (WINDOW *, attr_t, NCURSES_PAIRS_T, void *); /* generated */ >extern NCURSES_EXPORT(int) wbkgd (WINDOW *, chtype); /* implemented */ >extern NCURSES_EXPORT(void) wbkgdset (WINDOW *,chtype); /* implemented */ >extern NCURSES_EXPORT(int) wborder (WINDOW *,chtype,chtype,chtype,chtype,chtype,chtype,chtype,chtype); /* implemented */ >extern NCURSES_EXPORT(int) wchgat (WINDOW *, int, attr_t, NCURSES_PAIRS_T, const void *);/* implemented */ >extern NCURSES_EXPORT(int) wclear (WINDOW *); /* implemented */ >extern NCURSES_EXPORT(int) wclrtobot (WINDOW *); /* implemented */ >extern NCURSES_EXPORT(int) wclrtoeol (WINDOW *); /* implemented */ >extern NCURSES_EXPORT(int) wcolor_set (WINDOW*,NCURSES_PAIRS_T,void*); /* implemented */ >extern NCURSES_EXPORT(void) wcursyncup (WINDOW *); /* implemented */ >extern NCURSES_EXPORT(int) wdelch (WINDOW *); /* implemented */ >extern NCURSES_EXPORT(int) wdeleteln (WINDOW *); /* generated */ >extern NCURSES_EXPORT(int) wechochar (WINDOW *, const chtype); /* implemented */ >extern NCURSES_EXPORT(int) werase (WINDOW *); /* implemented */ >extern NCURSES_EXPORT(int) wgetch (WINDOW *); /* implemented */ >extern NCURSES_EXPORT(int) wgetnstr (WINDOW *,char *,int); /* implemented */ >extern NCURSES_EXPORT(int) wgetstr (WINDOW *, char *); /* generated */ >extern NCURSES_EXPORT(int) whline (WINDOW *, chtype, int); /* implemented */ >extern NCURSES_EXPORT(chtype) winch (WINDOW *); /* implemented */ >extern NCURSES_EXPORT(int) winchnstr (WINDOW *, chtype *, int); /* implemented */ >extern NCURSES_EXPORT(int) winchstr (WINDOW *, chtype *); /* generated */ >extern NCURSES_EXPORT(int) winnstr (WINDOW *, char *, int); /* implemented */ >extern NCURSES_EXPORT(int) winsch (WINDOW *, chtype); /* implemented */ >extern NCURSES_EXPORT(int) winsdelln (WINDOW *,int); /* implemented */ >extern NCURSES_EXPORT(int) winsertln (WINDOW *); /* generated */ >extern NCURSES_EXPORT(int) winsnstr (WINDOW *, const char *,int); /* implemented */ >extern NCURSES_EXPORT(int) winsstr (WINDOW *, const char *); /* generated */ >extern NCURSES_EXPORT(int) winstr (WINDOW *, char *); /* generated */ >extern NCURSES_EXPORT(int) wmove (WINDOW *,int,int); /* implemented */ >extern NCURSES_EXPORT(int) wnoutrefresh (WINDOW *); /* implemented */ >extern NCURSES_EXPORT(int) wprintw (WINDOW *, const char *,...) /* implemented */ > GCC_PRINTFLIKE(2,3); >extern NCURSES_EXPORT(int) wredrawln (WINDOW *,int,int); /* implemented */ >extern NCURSES_EXPORT(int) wrefresh (WINDOW *); /* implemented */ >extern NCURSES_EXPORT(int) wscanw (WINDOW *, NCURSES_CONST char *,...) /* implemented */ > GCC_SCANFLIKE(2,3); >extern NCURSES_EXPORT(int) wscrl (WINDOW *,int); /* implemented */ >extern NCURSES_EXPORT(int) wsetscrreg (WINDOW *,int,int); /* implemented */ >extern NCURSES_EXPORT(int) wstandout (WINDOW *); /* generated */ >extern NCURSES_EXPORT(int) wstandend (WINDOW *); /* generated */ >extern NCURSES_EXPORT(void) wsyncdown (WINDOW *); /* implemented */ >extern NCURSES_EXPORT(void) wsyncup (WINDOW *); /* implemented */ >extern NCURSES_EXPORT(void) wtimeout (WINDOW *,int); /* implemented */ >extern NCURSES_EXPORT(int) wtouchln (WINDOW *,int,int,int); /* implemented */ >extern NCURSES_EXPORT(int) wvline (WINDOW *,chtype,int); /* implemented */ > >/* > * These are also declared in <term.h>: > */ >extern NCURSES_EXPORT(int) tigetflag (NCURSES_CONST char *); /* implemented */ >extern NCURSES_EXPORT(int) tigetnum (NCURSES_CONST char *); /* implemented */ >extern NCURSES_EXPORT(char *) tigetstr (NCURSES_CONST char *); /* implemented */ >extern NCURSES_EXPORT(int) putp (const char *); /* implemented */ > >#if NCURSES_TPARM_VARARGS >extern NCURSES_EXPORT(char *) tparm (NCURSES_CONST char *, ...); /* special */ >#else ># 862 "./curses.h" >extern NCURSES_EXPORT(char *) tparm (NCURSES_CONST char *, NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG); /* special */ >extern NCURSES_EXPORT(char *) tparm_varargs (NCURSES_CONST char *, ...); /* special */ >#endif ># 865 "./curses.h" > >extern NCURSES_EXPORT(char *) tiparm (const char *, ...); /* special */ > >/* > * These functions are not in X/Open, but we use them in macro definitions: > */ >extern NCURSES_EXPORT(int) getattrs (const WINDOW *); /* generated */ >extern NCURSES_EXPORT(int) getcurx (const WINDOW *); /* generated */ >extern NCURSES_EXPORT(int) getcury (const WINDOW *); /* generated */ >extern NCURSES_EXPORT(int) getbegx (const WINDOW *); /* generated */ >extern NCURSES_EXPORT(int) getbegy (const WINDOW *); /* generated */ >extern NCURSES_EXPORT(int) getmaxx (const WINDOW *); /* generated */ >extern NCURSES_EXPORT(int) getmaxy (const WINDOW *); /* generated */ >extern NCURSES_EXPORT(int) getparx (const WINDOW *); /* generated */ >extern NCURSES_EXPORT(int) getpary (const WINDOW *); /* generated */ > >/* > * vid_attr() was implemented originally based on a draft of X/Open curses. > */ >#if !NCURSES_WIDECHAR >#define vid_attr(a,pair,opts) vidattr(a) >#endif ># 887 "./curses.h" > >/* > * These functions are extensions - not in X/Open Curses. > */ >#if 1 >#undef NCURSES_EXT_FUNCS >#define NCURSES_EXT_FUNCS 20140222 >typedef int (*NCURSES_WINDOW_CB)(WINDOW *, void *); >typedef int (*NCURSES_SCREEN_CB)(SCREEN *, void *); >extern NCURSES_EXPORT(bool) is_term_resized (int, int); >extern NCURSES_EXPORT(char *) keybound (int, int); >extern NCURSES_EXPORT(const char *) curses_version (void); >extern NCURSES_EXPORT(int) assume_default_colors (int, int); >extern NCURSES_EXPORT(int) define_key (const char *, int); >extern NCURSES_EXPORT(int) get_escdelay (void); >extern NCURSES_EXPORT(int) key_defined (const char *); >extern NCURSES_EXPORT(int) keyok (int, bool); >extern NCURSES_EXPORT(int) resize_term (int, int); >extern NCURSES_EXPORT(int) resizeterm (int, int); >extern NCURSES_EXPORT(int) set_escdelay (int); >extern NCURSES_EXPORT(int) set_tabsize (int); >extern NCURSES_EXPORT(int) use_default_colors (void); >extern NCURSES_EXPORT(int) use_extended_names (bool); >extern NCURSES_EXPORT(int) use_legacy_coding (int); >extern NCURSES_EXPORT(int) use_screen (SCREEN *, NCURSES_SCREEN_CB, void *); >extern NCURSES_EXPORT(int) use_window (WINDOW *, NCURSES_WINDOW_CB, void *); >extern NCURSES_EXPORT(int) wresize (WINDOW *, int, int); >extern NCURSES_EXPORT(void) nofilter(void); > >/* > * These extensions provide access to information stored in the WINDOW even > * when NCURSES_OPAQUE is set: > */ >extern NCURSES_EXPORT(WINDOW *) wgetparent (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */ >extern NCURSES_EXPORT(bool) is_cleared (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */ >extern NCURSES_EXPORT(bool) is_idcok (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */ >extern NCURSES_EXPORT(bool) is_idlok (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */ >extern NCURSES_EXPORT(bool) is_immedok (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */ >extern NCURSES_EXPORT(bool) is_keypad (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */ >extern NCURSES_EXPORT(bool) is_leaveok (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */ >extern NCURSES_EXPORT(bool) is_nodelay (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */ >extern NCURSES_EXPORT(bool) is_notimeout (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */ >extern NCURSES_EXPORT(bool) is_pad (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */ >extern NCURSES_EXPORT(bool) is_scrollok (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */ >extern NCURSES_EXPORT(bool) is_subwin (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */ >extern NCURSES_EXPORT(bool) is_syncok (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */ >extern NCURSES_EXPORT(int) wgetscrreg (const WINDOW *, int *, int *); /* @GENERATED_EXT_FUNCS@ */ > >#else ># 936 "./curses.h" >#define curses_version() NCURSES_VERSION >#endif ># 938 "./curses.h" > >/* > * Extra extension-functions, which pass a SCREEN pointer rather than using > * a global variable SP. > */ >#if 0 >#undef NCURSES_SP_FUNCS >#define NCURSES_SP_FUNCS 20140222 >#define NCURSES_SP_NAME(name) name##_sp > >/* Define the sp-funcs helper function */ >#define NCURSES_SP_OUTC NCURSES_SP_NAME(NCURSES_OUTC) >typedef int (*NCURSES_SP_OUTC)(SCREEN*, int); > >extern NCURSES_EXPORT(SCREEN *) new_prescr (void); /* implemented:SP_FUNC */ > >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(baudrate) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(beep) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(can_change_color) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(cbreak) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(curs_set) (SCREEN*, int); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(color_content) (SCREEN*, NCURSES_PAIRS_T, NCURSES_COLOR_T*, NCURSES_COLOR_T*, NCURSES_COLOR_T*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(def_prog_mode) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(def_shell_mode) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(delay_output) (SCREEN*, int); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(doupdate) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(echo) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(endwin) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(char) NCURSES_SP_NAME(erasechar) (SCREEN*);/* implemented:SP_FUNC */ >extern NCURSES_EXPORT(void) NCURSES_SP_NAME(filter) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(flash) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(flushinp) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(WINDOW *) NCURSES_SP_NAME(getwin) (SCREEN*, FILE *); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(halfdelay) (SCREEN*, int); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(has_colors) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(has_ic) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(has_il) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(init_color) (SCREEN*, NCURSES_COLOR_T, NCURSES_COLOR_T, NCURSES_COLOR_T, NCURSES_COLOR_T); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(init_pair) (SCREEN*, NCURSES_PAIRS_T, NCURSES_COLOR_T, NCURSES_COLOR_T); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(intrflush) (SCREEN*, WINDOW*, bool); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(isendwin) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(NCURSES_CONST char *) NCURSES_SP_NAME(keyname) (SCREEN*, int); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(char) NCURSES_SP_NAME(killchar) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(longname) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(mvcur) (SCREEN*, int, int, int, int); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(napms) (SCREEN*, int); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(WINDOW *) NCURSES_SP_NAME(newpad) (SCREEN*, int, int); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(SCREEN *) NCURSES_SP_NAME(newterm) (SCREEN*, NCURSES_CONST char *, FILE *, FILE *); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(WINDOW *) NCURSES_SP_NAME(newwin) (SCREEN*, int, int, int, int); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(nl) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(nocbreak) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(noecho) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(nonl) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(void) NCURSES_SP_NAME(noqiflush) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(noraw) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(pair_content) (SCREEN*, NCURSES_PAIRS_T, NCURSES_COLOR_T*, NCURSES_COLOR_T*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(void) NCURSES_SP_NAME(qiflush) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(raw) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(reset_prog_mode) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(reset_shell_mode) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(resetty) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(ripoffline) (SCREEN*, int, int (*)(WINDOW *, int)); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(savetty) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(scr_init) (SCREEN*, const char *); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(scr_restore) (SCREEN*, const char *); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(scr_set) (SCREEN*, const char *); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_attroff) (SCREEN*, const chtype); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_attron) (SCREEN*, const chtype); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_attrset) (SCREEN*, const chtype); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(attr_t) NCURSES_SP_NAME(slk_attr) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_attr_set) (SCREEN*, const attr_t, NCURSES_PAIRS_T, void*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_clear) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_color) (SCREEN*, NCURSES_PAIRS_T); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_init) (SCREEN*, int); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(slk_label) (SCREEN*, int); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_noutrefresh) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_refresh) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_restore) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_set) (SCREEN*, int, const char *, int); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_touch) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(start_color) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(chtype) NCURSES_SP_NAME(termattrs) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(termname) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(typeahead) (SCREEN*, int); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(ungetch) (SCREEN*, int); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(void) NCURSES_SP_NAME(use_env) (SCREEN*, bool); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(void) NCURSES_SP_NAME(use_tioctl) (SCREEN*, bool); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(vidattr) (SCREEN*, chtype); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(vidputs) (SCREEN*, chtype, NCURSES_SP_OUTC); /* implemented:SP_FUNC */ >#if 1 >extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(keybound) (SCREEN*, int, int); /* implemented:EXT_SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(assume_default_colors) (SCREEN*, int, int); /* implemented:EXT_SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(define_key) (SCREEN*, const char *, int); /* implemented:EXT_SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(get_escdelay) (SCREEN*); /* implemented:EXT_SP_FUNC */ >extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(is_term_resized) (SCREEN*, int, int); /* implemented:EXT_SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(key_defined) (SCREEN*, const char *); /* implemented:EXT_SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(keyok) (SCREEN*, int, bool); /* implemented:EXT_SP_FUNC */ >extern NCURSES_EXPORT(void) NCURSES_SP_NAME(nofilter) (SCREEN*); /* implemented */ /* implemented:EXT_SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(resize_term) (SCREEN*, int, int); /* implemented:EXT_SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(resizeterm) (SCREEN*, int, int); /* implemented:EXT_SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(set_escdelay) (SCREEN*, int); /* implemented:EXT_SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(set_tabsize) (SCREEN*, int); /* implemented:EXT_SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(use_default_colors) (SCREEN*); /* implemented:EXT_SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(use_legacy_coding) (SCREEN*, int); /* implemented:EXT_SP_FUNC */ >#endif ># 1043 "./curses.h" >#else ># 1044 "./curses.h" >#undef NCURSES_SP_FUNCS >#define NCURSES_SP_FUNCS 0 >#define NCURSES_SP_NAME(name) name >#define NCURSES_SP_OUTC NCURSES_OUTC >#endif ># 1049 "./curses.h" > >/* attributes */ > >#define NCURSES_ATTR_SHIFT 8 >#define NCURSES_BITS(mask,shift) (NCURSES_CAST(chtype,(mask)) << ((shift) + NCURSES_ATTR_SHIFT)) > >#define A_NORMAL (1UL - 1UL) >#define A_ATTRIBUTES NCURSES_BITS(~(1UL - 1UL),0) >#define A_CHARTEXT (NCURSES_BITS(1UL,0) - 1UL) >#define A_COLOR NCURSES_BITS(((1UL) << 8) - 1UL,0) >#define A_STANDOUT NCURSES_BITS(1UL,8) >#define A_UNDERLINE NCURSES_BITS(1UL,9) >#define A_REVERSE NCURSES_BITS(1UL,10) >#define A_BLINK NCURSES_BITS(1UL,11) >#define A_DIM NCURSES_BITS(1UL,12) >#define A_BOLD NCURSES_BITS(1UL,13) >#define A_ALTCHARSET NCURSES_BITS(1UL,14) >#define A_INVIS NCURSES_BITS(1UL,15) >#define A_PROTECT NCURSES_BITS(1UL,16) >#define A_HORIZONTAL NCURSES_BITS(1UL,17) >#define A_LEFT NCURSES_BITS(1UL,18) >#define A_LOW NCURSES_BITS(1UL,19) >#define A_RIGHT NCURSES_BITS(1UL,20) >#define A_TOP NCURSES_BITS(1UL,21) >#define A_VERTICAL NCURSES_BITS(1UL,22) > >#if 1 >#define A_ITALIC NCURSES_BITS(1UL,23) /* ncurses extension */ >#endif ># 1078 "./curses.h" > >/* > * Most of the pseudo functions are macros that either provide compatibility > * with older versions of curses, or provide inline functionality to improve > * performance. > */ > >/* > * These pseudo functions are always implemented as macros: > */ > >#define getyx(win,y,x) (y = getcury(win), x = getcurx(win)) >#define getbegyx(win,y,x) (y = getbegy(win), x = getbegx(win)) >#define getmaxyx(win,y,x) (y = getmaxy(win), x = getmaxx(win)) >#define getparyx(win,y,x) (y = getpary(win), x = getparx(win)) > >#define getsyx(y,x) do { if (newscr) { \ > if (is_leaveok(newscr)) \ > (y) = (x) = -1; \ > else \ > getyx(newscr,(y), (x)); \ > } \ > } while(0) > >#define setsyx(y,x) do { if (newscr) { \ > if ((y) == -1 && (x) == -1) \ > leaveok(newscr, TRUE); \ > else { \ > leaveok(newscr, FALSE); \ > wmove(newscr, (y), (x)); \ > } \ > } \ > } while(0) > >#ifndef NCURSES_NOMACROS > >/* > * These miscellaneous pseudo functions are provided for compatibility: > */ > >#define wgetstr(w, s) wgetnstr(w, s, -1) >#define getnstr(s, n) wgetnstr(stdscr, s, (n)) > >#define setterm(term) setupterm(term, 1, (int *)0) > >#define fixterm() reset_prog_mode() >#define resetterm() reset_shell_mode() >#define saveterm() def_prog_mode() >#define crmode() cbreak() >#define nocrmode() nocbreak() >#define gettmode() > >/* It seems older SYSV curses versions define these */ >#if !NCURSES_OPAQUE >#define getattrs(win) NCURSES_CAST(int, (win) ? (win)->_attrs : A_NORMAL) >#define getcurx(win) ((win) ? (win)->_curx : ERR) >#define getcury(win) ((win) ? (win)->_cury : ERR) >#define getbegx(win) ((win) ? (win)->_begx : ERR) >#define getbegy(win) ((win) ? (win)->_begy : ERR) >#define getmaxx(win) ((win) ? ((win)->_maxx + 1) : ERR) >#define getmaxy(win) ((win) ? ((win)->_maxy + 1) : ERR) >#define getparx(win) ((win) ? (win)->_parx : ERR) >#define getpary(win) ((win) ? (win)->_pary : ERR) >#endif /* NCURSES_OPAQUE */ ># 1142 "./curses.h" > >#define wstandout(win) (wattrset(win,A_STANDOUT)) >#define wstandend(win) (wattrset(win,A_NORMAL)) > >#define wattron(win,at) wattr_on(win, NCURSES_CAST(attr_t, at), NULL) >#define wattroff(win,at) wattr_off(win, NCURSES_CAST(attr_t, at), NULL) > >#if !NCURSES_OPAQUE >#if NCURSES_WIDECHAR && 0 >#define wattrset(win,at) ((win) \ > ? ((win)->_color = PAIR_NUMBER(at), \ > (win)->_attrs = NCURSES_CAST(attr_t, at), \ > OK) \ > : ERR) >#else ># 1157 "./curses.h" >#define wattrset(win,at) ((win) \ > ? ((win)->_attrs = NCURSES_CAST(attr_t, at), \ > OK) \ > : ERR) >#endif ># 1162 "./curses.h" >#endif /* NCURSES_OPAQUE */ ># 1163 "./curses.h" > >#define scroll(win) wscrl(win,1) > >#define touchwin(win) wtouchln((win), 0, getmaxy(win), 1) >#define touchline(win, s, c) wtouchln((win), s, c, 1) >#define untouchwin(win) wtouchln((win), 0, getmaxy(win), 0) > >#define box(win, v, h) wborder(win, v, v, h, h, 0, 0, 0, 0) >#define border(ls, rs, ts, bs, tl, tr, bl, br) wborder(stdscr, ls, rs, ts, bs, tl, tr, bl, br) >#define hline(ch, n) whline(stdscr, ch, (n)) >#define vline(ch, n) wvline(stdscr, ch, (n)) > >#define winstr(w, s) winnstr(w, s, -1) >#define winchstr(w, s) winchnstr(w, s, -1) >#define winsstr(w, s) winsnstr(w, s, -1) > >#if !NCURSES_OPAQUE >#define redrawwin(win) wredrawln(win, 0, ((win) ? (win)->_maxy+1 : -1)) >#endif /* NCURSES_OPAQUE */ ># 1182 "./curses.h" > >#define waddstr(win,str) waddnstr(win,str,-1) >#define waddchstr(win,str) waddchnstr(win,str,-1) > >/* > * These apply to the first 256 color pairs. > */ >#define COLOR_PAIR(n) NCURSES_BITS((n), 0) >#define PAIR_NUMBER(a) (NCURSES_CAST(int,((NCURSES_CAST(unsigned long,(a)) & A_COLOR) >> NCURSES_ATTR_SHIFT))) > >/* > * pseudo functions for standard screen > */ > >#define addch(ch) waddch(stdscr,(ch)) >#define addchnstr(str,n) waddchnstr(stdscr,(str),(n)) >#define addchstr(str) waddchstr(stdscr,(str)) >#define addnstr(str,n) waddnstr(stdscr,(str),(n)) >#define addstr(str) waddnstr(stdscr,(str),-1) >#define attroff(at) wattroff(stdscr,(at)) >#define attron(at) wattron(stdscr,(at)) >#define attrset(at) wattrset(stdscr,(at)) >#define attr_get(ap,cp,o) wattr_get(stdscr,(ap),(cp),(o)) >#define attr_off(a,o) wattr_off(stdscr,(a),(o)) >#define attr_on(a,o) wattr_on(stdscr,(a),(o)) >#define attr_set(a,c,o) wattr_set(stdscr,(a),(c),(o)) >#define bkgd(ch) wbkgd(stdscr,(ch)) >#define bkgdset(ch) wbkgdset(stdscr,(ch)) >#define chgat(n,a,c,o) wchgat(stdscr,(n),(a),(c),(o)) >#define clear() wclear(stdscr) >#define clrtobot() wclrtobot(stdscr) >#define clrtoeol() wclrtoeol(stdscr) >#define color_set(c,o) wcolor_set(stdscr,(c),(o)) >#define delch() wdelch(stdscr) >#define deleteln() winsdelln(stdscr,-1) >#define echochar(c) wechochar(stdscr,(c)) >#define erase() werase(stdscr) >#define getch() wgetch(stdscr) >#define getstr(str) wgetstr(stdscr,(str)) >#define inch() winch(stdscr) >#define inchnstr(s,n) winchnstr(stdscr,(s),(n)) >#define inchstr(s) winchstr(stdscr,(s)) >#define innstr(s,n) winnstr(stdscr,(s),(n)) >#define insch(c) winsch(stdscr,(c)) >#define insdelln(n) winsdelln(stdscr,(n)) >#define insertln() winsdelln(stdscr,1) >#define insnstr(s,n) winsnstr(stdscr,(s),(n)) >#define insstr(s) winsstr(stdscr,(s)) >#define instr(s) winstr(stdscr,(s)) >#define move(y,x) wmove(stdscr,(y),(x)) >#define refresh() wrefresh(stdscr) >#define scrl(n) wscrl(stdscr,(n)) >#define setscrreg(t,b) wsetscrreg(stdscr,(t),(b)) >#define standend() wstandend(stdscr) >#define standout() wstandout(stdscr) >#define timeout(delay) wtimeout(stdscr,(delay)) >#define wdeleteln(win) winsdelln(win,-1) >#define winsertln(win) winsdelln(win,1) > >/* > * mv functions > */ > >#define mvwaddch(win,y,x,ch) (wmove((win),(y),(x)) == ERR ? ERR : waddch((win),(ch))) >#define mvwaddchnstr(win,y,x,str,n) (wmove((win),(y),(x)) == ERR ? ERR : waddchnstr((win),(str),(n))) >#define mvwaddchstr(win,y,x,str) (wmove((win),(y),(x)) == ERR ? ERR : waddchnstr((win),(str),-1)) >#define mvwaddnstr(win,y,x,str,n) (wmove((win),(y),(x)) == ERR ? ERR : waddnstr((win),(str),(n))) >#define mvwaddstr(win,y,x,str) (wmove((win),(y),(x)) == ERR ? ERR : waddnstr((win),(str),-1)) >#define mvwdelch(win,y,x) (wmove((win),(y),(x)) == ERR ? ERR : wdelch(win)) >#define mvwchgat(win,y,x,n,a,c,o) (wmove((win),(y),(x)) == ERR ? ERR : wchgat((win),(n),(a),(c),(o))) >#define mvwgetch(win,y,x) (wmove((win),(y),(x)) == ERR ? ERR : wgetch(win)) >#define mvwgetnstr(win,y,x,str,n) (wmove((win),(y),(x)) == ERR ? ERR : wgetnstr((win),(str),(n))) >#define mvwgetstr(win,y,x,str) (wmove((win),(y),(x)) == ERR ? ERR : wgetstr((win),(str))) >#define mvwhline(win,y,x,c,n) (wmove((win),(y),(x)) == ERR ? ERR : whline((win),(c),(n))) >#define mvwinch(win,y,x) (wmove((win),(y),(x)) == ERR ? NCURSES_CAST(chtype, ERR) : winch(win)) >#define mvwinchnstr(win,y,x,s,n) (wmove((win),(y),(x)) == ERR ? ERR : winchnstr((win),(s),(n))) >#define mvwinchstr(win,y,x,s) (wmove((win),(y),(x)) == ERR ? ERR : winchstr((win),(s))) >#define mvwinnstr(win,y,x,s,n) (wmove((win),(y),(x)) == ERR ? ERR : winnstr((win),(s),(n))) >#define mvwinsch(win,y,x,c) (wmove((win),(y),(x)) == ERR ? ERR : winsch((win),(c))) >#define mvwinsnstr(win,y,x,s,n) (wmove((win),(y),(x)) == ERR ? ERR : winsnstr((win),(s),(n))) >#define mvwinsstr(win,y,x,s) (wmove((win),(y),(x)) == ERR ? ERR : winsstr((win),(s))) >#define mvwinstr(win,y,x,s) (wmove((win),(y),(x)) == ERR ? ERR : winstr((win),(s))) >#define mvwvline(win,y,x,c,n) (wmove((win),(y),(x)) == ERR ? ERR : wvline((win),(c),(n))) > >#define mvaddch(y,x,ch) mvwaddch(stdscr,(y),(x),(ch)) >#define mvaddchnstr(y,x,str,n) mvwaddchnstr(stdscr,(y),(x),(str),(n)) >#define mvaddchstr(y,x,str) mvwaddchstr(stdscr,(y),(x),(str)) >#define mvaddnstr(y,x,str,n) mvwaddnstr(stdscr,(y),(x),(str),(n)) >#define mvaddstr(y,x,str) mvwaddstr(stdscr,(y),(x),(str)) >#define mvchgat(y,x,n,a,c,o) mvwchgat(stdscr,(y),(x),(n),(a),(c),(o)) >#define mvdelch(y,x) mvwdelch(stdscr,(y),(x)) >#define mvgetch(y,x) mvwgetch(stdscr,(y),(x)) >#define mvgetnstr(y,x,str,n) mvwgetnstr(stdscr,(y),(x),(str),(n)) >#define mvgetstr(y,x,str) mvwgetstr(stdscr,(y),(x),(str)) >#define mvhline(y,x,c,n) mvwhline(stdscr,(y),(x),(c),(n)) >#define mvinch(y,x) mvwinch(stdscr,(y),(x)) >#define mvinchnstr(y,x,s,n) mvwinchnstr(stdscr,(y),(x),(s),(n)) >#define mvinchstr(y,x,s) mvwinchstr(stdscr,(y),(x),(s)) >#define mvinnstr(y,x,s,n) mvwinnstr(stdscr,(y),(x),(s),(n)) >#define mvinsch(y,x,c) mvwinsch(stdscr,(y),(x),(c)) >#define mvinsnstr(y,x,s,n) mvwinsnstr(stdscr,(y),(x),(s),(n)) >#define mvinsstr(y,x,s) mvwinsstr(stdscr,(y),(x),(s)) >#define mvinstr(y,x,s) mvwinstr(stdscr,(y),(x),(s)) >#define mvvline(y,x,c,n) mvwvline(stdscr,(y),(x),(c),(n)) > >/* > * Some wide-character functions can be implemented without the extensions. > */ >#if !NCURSES_OPAQUE >#define getbkgd(win) ((win) ? ((win)->_bkgd) : 0) >#endif /* NCURSES_OPAQUE */ ># 1293 "./curses.h" > >#define slk_attr_off(a,v) ((v) ? ERR : slk_attroff(a)) >#define slk_attr_on(a,v) ((v) ? ERR : slk_attron(a)) > >#if !NCURSES_OPAQUE >#if NCURSES_WIDECHAR && 0 >#define wattr_set(win,a,p,opts) (((win) \ > ? ((win)->_attrs = ((a) & ~A_COLOR), \ > (win)->_color = (p)) \ > : OK), \ > OK) >#define wattr_get(win,a,p,opts) ((void)(((a) != (void *)0) ? (*(a) = (win) ? (win)->_attrs : 0) : OK), \ > (void)(((p) != (void *)0) ? (*(p) = (NCURSES_PAIRS_T) ((win) ? (win)->_color : 0)) : OK), \ > OK) >#else ># 1308 "./curses.h" >#define wattr_set(win,a,p,opts) (((win) \ > ? ((win)->_attrs = (((a) & ~A_COLOR) | (attr_t)COLOR_PAIR(p))) \ > : OK), \ > OK) >#define wattr_get(win,a,p,opts) ((void)(((a) != (void *)0) ? (*(a) = (win) ? (win)->_attrs : 0) : OK), \ > (void)(((p) != (void *)0) ? (*(p) = (NCURSES_PAIRS_T) ((win) ? PAIR_NUMBER((win)->_attrs) : 0)) : OK), \ > OK) >#endif ># 1316 "./curses.h" >#endif /* NCURSES_OPAQUE */ ># 1317 "./curses.h" > >/* > * X/Open curses deprecates SVr4 vwprintw/vwscanw, which are supposed to use > * varargs.h. It adds new calls vw_printw/vw_scanw, which are supposed to > * use POSIX stdarg.h. The ncurses versions of vwprintw/vwscanw already > * use stdarg.h, so... > */ >#define vw_printw vwprintw >#define vw_scanw vwscanw > >/* > * Export fallback function for use in C++ binding. > */ >#if !1 >#define vsscanf(a,b,c) _nc_vsscanf(a,b,c) >NCURSES_EXPORT(int) vsscanf(const char *, const char *, va_list); >#endif ># 1334 "./curses.h" > >/* > * These macros are extensions - not in X/Open Curses. > */ >#if 1 >#if !NCURSES_OPAQUE >#define is_cleared(win) ((win) ? (win)->_clear : FALSE) >#define is_idcok(win) ((win) ? (win)->_idcok : FALSE) >#define is_idlok(win) ((win) ? (win)->_idlok : FALSE) >#define is_immedok(win) ((win) ? (win)->_immed : FALSE) >#define is_keypad(win) ((win) ? (win)->_use_keypad : FALSE) >#define is_leaveok(win) ((win) ? (win)->_leaveok : FALSE) >#define is_nodelay(win) ((win) ? ((win)->_delay == 0) : FALSE) >#define is_notimeout(win) ((win) ? (win)->_notimeout : FALSE) >#define is_pad(win) ((win) ? ((win)->_flags & _ISPAD) != 0 : FALSE) >#define is_scrollok(win) ((win) ? (win)->_scroll : FALSE) >#define is_subwin(win) ((win) ? ((win)->_flags & _SUBWIN) != 0 : FALSE) >#define is_syncok(win) ((win) ? (win)->_sync : FALSE) >#define wgetparent(win) ((win) ? (win)->_parent : 0) >#define wgetscrreg(win,t,b) ((win) ? (*(t) = (win)->_regtop, *(b) = (win)->_regbottom, OK) : ERR) >#endif ># 1355 "./curses.h" >#endif ># 1356 "./curses.h" > >#endif /* NCURSES_NOMACROS */ ># 1358 "./curses.h" > >/* > * Public variables. > * > * Notes: > * a. ESCDELAY was an undocumented feature under AIX curses. > * It gives the ESC expire time in milliseconds. > * b. ttytype is needed for backward compatibility > */ >#if NCURSES_REENTRANT > >NCURSES_WRAPPED_VAR(WINDOW *, curscr); >NCURSES_WRAPPED_VAR(WINDOW *, newscr); >NCURSES_WRAPPED_VAR(WINDOW *, stdscr); >NCURSES_WRAPPED_VAR(char *, ttytype); >NCURSES_WRAPPED_VAR(int, COLORS); >NCURSES_WRAPPED_VAR(int, COLOR_PAIRS); >NCURSES_WRAPPED_VAR(int, COLS); >NCURSES_WRAPPED_VAR(int, ESCDELAY); >NCURSES_WRAPPED_VAR(int, LINES); >NCURSES_WRAPPED_VAR(int, TABSIZE); > >#define curscr NCURSES_PUBLIC_VAR(curscr()) >#define newscr NCURSES_PUBLIC_VAR(newscr()) >#define stdscr NCURSES_PUBLIC_VAR(stdscr()) >#define ttytype NCURSES_PUBLIC_VAR(ttytype()) >#define COLORS NCURSES_PUBLIC_VAR(COLORS()) >#define COLOR_PAIRS NCURSES_PUBLIC_VAR(COLOR_PAIRS()) >#define COLS NCURSES_PUBLIC_VAR(COLS()) >#define ESCDELAY NCURSES_PUBLIC_VAR(ESCDELAY()) >#define LINES NCURSES_PUBLIC_VAR(LINES()) >#define TABSIZE NCURSES_PUBLIC_VAR(TABSIZE()) > >#else ># 1392 "./curses.h" > >extern NCURSES_EXPORT_VAR(WINDOW *) curscr; >extern NCURSES_EXPORT_VAR(WINDOW *) newscr; >extern NCURSES_EXPORT_VAR(WINDOW *) stdscr; >extern NCURSES_EXPORT_VAR(char) ttytype[]; >extern NCURSES_EXPORT_VAR(int) COLORS; >extern NCURSES_EXPORT_VAR(int) COLOR_PAIRS; >extern NCURSES_EXPORT_VAR(int) COLS; >extern NCURSES_EXPORT_VAR(int) ESCDELAY; >extern NCURSES_EXPORT_VAR(int) LINES; >extern NCURSES_EXPORT_VAR(int) TABSIZE; > >#endif ># 1405 "./curses.h" > >/* > * Pseudo-character tokens outside ASCII range. The curses wgetch() function > * will return any given one of these only if the corresponding k- capability > * is defined in your terminal's terminfo entry. > * > * Some keys (KEY_A1, etc) are arranged like this: > * a1 up a3 > * left b2 right > * c1 down c3 > * > * A few key codes do not depend upon the terminfo entry. > */ >#define KEY_CODE_YES 0400 /* A wchar_t contains a key code */ >#define KEY_MIN 0401 /* Minimum curses key */ >#define KEY_BREAK 0401 /* Break key (unreliable) */ >#define KEY_SRESET 0530 /* Soft (partial) reset (unreliable) */ >#define KEY_RESET 0531 /* Reset or hard reset (unreliable) */ >/* > * These definitions were generated by ./MKkey_defs.sh ./Caps > */ >#define KEY_DOWN 0402 /* down-arrow key */ >#define KEY_UP 0403 /* up-arrow key */ >#define KEY_LEFT 0404 /* left-arrow key */ >#define KEY_RIGHT 0405 /* right-arrow key */ >#define KEY_HOME 0406 /* home key */ >#define KEY_BACKSPACE 0407 /* backspace key */ >#define KEY_F0 0410 /* Function keys. Space for 64 */ >#define KEY_F(n) (KEY_F0+(n)) /* Value of function key n */ >#define KEY_DL 0510 /* delete-line key */ >#define KEY_IL 0511 /* insert-line key */ >#define KEY_DC 0512 /* delete-character key */ >#define KEY_IC 0513 /* insert-character key */ >#define KEY_EIC 0514 /* sent by rmir or smir in insert mode */ >#define KEY_CLEAR 0515 /* clear-screen or erase key */ >#define KEY_EOS 0516 /* clear-to-end-of-screen key */ >#define KEY_EOL 0517 /* clear-to-end-of-line key */ >#define KEY_SF 0520 /* scroll-forward key */ >#define KEY_SR 0521 /* scroll-backward key */ >#define KEY_NPAGE 0522 /* next-page key */ >#define KEY_PPAGE 0523 /* previous-page key */ >#define KEY_STAB 0524 /* set-tab key */ >#define KEY_CTAB 0525 /* clear-tab key */ >#define KEY_CATAB 0526 /* clear-all-tabs key */ >#define KEY_ENTER 0527 /* enter/send key */ >#define KEY_PRINT 0532 /* print key */ >#define KEY_LL 0533 /* lower-left key (home down) */ >#define KEY_A1 0534 /* upper left of keypad */ >#define KEY_A3 0535 /* upper right of keypad */ >#define KEY_B2 0536 /* center of keypad */ >#define KEY_C1 0537 /* lower left of keypad */ >#define KEY_C3 0540 /* lower right of keypad */ >#define KEY_BTAB 0541 /* back-tab key */ >#define KEY_BEG 0542 /* begin key */ >#define KEY_CANCEL 0543 /* cancel key */ >#define KEY_CLOSE 0544 /* close key */ >#define KEY_COMMAND 0545 /* command key */ >#define KEY_COPY 0546 /* copy key */ >#define KEY_CREATE 0547 /* create key */ >#define KEY_END 0550 /* end key */ >#define KEY_EXIT 0551 /* exit key */ >#define KEY_FIND 0552 /* find key */ >#define KEY_HELP 0553 /* help key */ >#define KEY_MARK 0554 /* mark key */ >#define KEY_MESSAGE 0555 /* message key */ >#define KEY_MOVE 0556 /* move key */ >#define KEY_NEXT 0557 /* next key */ >#define KEY_OPEN 0560 /* open key */ >#define KEY_OPTIONS 0561 /* options key */ >#define KEY_PREVIOUS 0562 /* previous key */ >#define KEY_REDO 0563 /* redo key */ >#define KEY_REFERENCE 0564 /* reference key */ >#define KEY_REFRESH 0565 /* refresh key */ >#define KEY_REPLACE 0566 /* replace key */ >#define KEY_RESTART 0567 /* restart key */ >#define KEY_RESUME 0570 /* resume key */ >#define KEY_SAVE 0571 /* save key */ >#define KEY_SBEG 0572 /* shifted begin key */ >#define KEY_SCANCEL 0573 /* shifted cancel key */ >#define KEY_SCOMMAND 0574 /* shifted command key */ >#define KEY_SCOPY 0575 /* shifted copy key */ >#define KEY_SCREATE 0576 /* shifted create key */ >#define KEY_SDC 0577 /* shifted delete-character key */ >#define KEY_SDL 0600 /* shifted delete-line key */ >#define KEY_SELECT 0601 /* select key */ >#define KEY_SEND 0602 /* shifted end key */ >#define KEY_SEOL 0603 /* shifted clear-to-end-of-line key */ >#define KEY_SEXIT 0604 /* shifted exit key */ >#define KEY_SFIND 0605 /* shifted find key */ >#define KEY_SHELP 0606 /* shifted help key */ >#define KEY_SHOME 0607 /* shifted home key */ >#define KEY_SIC 0610 /* shifted insert-character key */ >#define KEY_SLEFT 0611 /* shifted left-arrow key */ >#define KEY_SMESSAGE 0612 /* shifted message key */ >#define KEY_SMOVE 0613 /* shifted move key */ >#define KEY_SNEXT 0614 /* shifted next key */ >#define KEY_SOPTIONS 0615 /* shifted options key */ >#define KEY_SPREVIOUS 0616 /* shifted previous key */ >#define KEY_SPRINT 0617 /* shifted print key */ >#define KEY_SREDO 0620 /* shifted redo key */ >#define KEY_SREPLACE 0621 /* shifted replace key */ >#define KEY_SRIGHT 0622 /* shifted right-arrow key */ >#define KEY_SRSUME 0623 /* shifted resume key */ >#define KEY_SSAVE 0624 /* shifted save key */ >#define KEY_SSUSPEND 0625 /* shifted suspend key */ >#define KEY_SUNDO 0626 /* shifted undo key */ >#define KEY_SUSPEND 0627 /* suspend key */ >#define KEY_UNDO 0630 /* undo key */ >#define KEY_MOUSE 0631 /* Mouse event has occurred */ >#define KEY_RESIZE 0632 /* Terminal resize event */ >#define KEY_EVENT 0633 /* We were interrupted by an event */ > >#define KEY_MAX 0777 /* Maximum key value is 0633 */ >/* $Id: curses.wide,v 1.46 2014/02/01 22:00:32 tom Exp $ */ >/* > * vile:cmode: > * This file is part of ncurses, designed to be appended after curses.h.in > * (see that file for the relevant copyright). > */ >#define _XOPEN_CURSES 1 > >#if NCURSES_WIDECHAR > >extern NCURSES_EXPORT_VAR(cchar_t *) _nc_wacs; > >#define NCURSES_WACS(c) (&_nc_wacs[NCURSES_CAST(unsigned char,(c))]) > >#define WACS_BSSB NCURSES_WACS('l') >#define WACS_SSBB NCURSES_WACS('m') >#define WACS_BBSS NCURSES_WACS('k') >#define WACS_SBBS NCURSES_WACS('j') >#define WACS_SBSS NCURSES_WACS('u') >#define WACS_SSSB NCURSES_WACS('t') >#define WACS_SSBS NCURSES_WACS('v') >#define WACS_BSSS NCURSES_WACS('w') >#define WACS_BSBS NCURSES_WACS('q') >#define WACS_SBSB NCURSES_WACS('x') >#define WACS_SSSS NCURSES_WACS('n') > >#define WACS_ULCORNER WACS_BSSB >#define WACS_LLCORNER WACS_SSBB >#define WACS_URCORNER WACS_BBSS >#define WACS_LRCORNER WACS_SBBS >#define WACS_RTEE WACS_SBSS >#define WACS_LTEE WACS_SSSB >#define WACS_BTEE WACS_SSBS >#define WACS_TTEE WACS_BSSS >#define WACS_HLINE WACS_BSBS >#define WACS_VLINE WACS_SBSB >#define WACS_PLUS WACS_SSSS > >#define WACS_S1 NCURSES_WACS('o') /* scan line 1 */ >#define WACS_S9 NCURSES_WACS('s') /* scan line 9 */ >#define WACS_DIAMOND NCURSES_WACS('`') /* diamond */ >#define WACS_CKBOARD NCURSES_WACS('a') /* checker board */ >#define WACS_DEGREE NCURSES_WACS('f') /* degree symbol */ >#define WACS_PLMINUS NCURSES_WACS('g') /* plus/minus */ >#define WACS_BULLET NCURSES_WACS('~') /* bullet */ > > /* Teletype 5410v1 symbols */ >#define WACS_LARROW NCURSES_WACS(',') /* arrow left */ >#define WACS_RARROW NCURSES_WACS('+') /* arrow right */ >#define WACS_DARROW NCURSES_WACS('.') /* arrow down */ >#define WACS_UARROW NCURSES_WACS('-') /* arrow up */ >#define WACS_BOARD NCURSES_WACS('h') /* board of squares */ >#define WACS_LANTERN NCURSES_WACS('i') /* lantern symbol */ >#define WACS_BLOCK NCURSES_WACS('0') /* solid square block */ > > /* ncurses extensions */ >#define WACS_S3 NCURSES_WACS('p') /* scan line 3 */ >#define WACS_S7 NCURSES_WACS('r') /* scan line 7 */ >#define WACS_LEQUAL NCURSES_WACS('y') /* less/equal */ >#define WACS_GEQUAL NCURSES_WACS('z') /* greater/equal */ >#define WACS_PI NCURSES_WACS('{') /* Pi */ >#define WACS_NEQUAL NCURSES_WACS('|') /* not equal */ >#define WACS_STERLING NCURSES_WACS('}') /* UK pound sign */ > > /* double lines */ >#define WACS_BDDB NCURSES_WACS('C') >#define WACS_DDBB NCURSES_WACS('D') >#define WACS_BBDD NCURSES_WACS('B') >#define WACS_DBBD NCURSES_WACS('A') >#define WACS_DBDD NCURSES_WACS('G') >#define WACS_DDDB NCURSES_WACS('F') >#define WACS_DDBD NCURSES_WACS('H') >#define WACS_BDDD NCURSES_WACS('I') >#define WACS_BDBD NCURSES_WACS('R') >#define WACS_DBDB NCURSES_WACS('Y') >#define WACS_DDDD NCURSES_WACS('E') > >#define WACS_D_ULCORNER WACS_BDDB >#define WACS_D_LLCORNER WACS_DDBB >#define WACS_D_URCORNER WACS_BBDD >#define WACS_D_LRCORNER WACS_DBBD >#define WACS_D_RTEE WACS_DBDD >#define WACS_D_LTEE WACS_DDDB >#define WACS_D_BTEE WACS_DDBD >#define WACS_D_TTEE WACS_BDDD >#define WACS_D_HLINE WACS_BDBD >#define WACS_D_VLINE WACS_DBDB >#define WACS_D_PLUS WACS_DDDD > > /* thick lines */ >#define WACS_BTTB NCURSES_WACS('L') >#define WACS_TTBB NCURSES_WACS('M') >#define WACS_BBTT NCURSES_WACS('K') >#define WACS_TBBT NCURSES_WACS('J') >#define WACS_TBTT NCURSES_WACS('U') >#define WACS_TTTB NCURSES_WACS('T') >#define WACS_TTBT NCURSES_WACS('V') >#define WACS_BTTT NCURSES_WACS('W') >#define WACS_BTBT NCURSES_WACS('Q') >#define WACS_TBTB NCURSES_WACS('X') >#define WACS_TTTT NCURSES_WACS('N') > >#define WACS_T_ULCORNER WACS_BTTB >#define WACS_T_LLCORNER WACS_TTBB >#define WACS_T_URCORNER WACS_BBTT >#define WACS_T_LRCORNER WACS_TBBT >#define WACS_T_RTEE WACS_TBTT >#define WACS_T_LTEE WACS_TTTB >#define WACS_T_BTEE WACS_TTBT >#define WACS_T_TTEE WACS_BTTT >#define WACS_T_HLINE WACS_BTBT >#define WACS_T_VLINE WACS_TBTB >#define WACS_T_PLUS WACS_TTTT > >/* > * Function prototypes for wide-character operations. > * > * "generated" comments should include ":WIDEC" to make the corresponding > * functions ifdef'd in lib_gen.c > * > * "implemented" comments do not need this marker. > */ > >extern NCURSES_EXPORT(int) add_wch (const cchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) add_wchnstr (const cchar_t *, int); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) add_wchstr (const cchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) addnwstr (const wchar_t *, int); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) addwstr (const wchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) bkgrnd (const cchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(void) bkgrndset (const cchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) border_set (const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) box_set (WINDOW *, const cchar_t *, const cchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) echo_wchar (const cchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) erasewchar (wchar_t*); /* implemented */ >extern NCURSES_EXPORT(int) get_wch (wint_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) get_wstr (wint_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) getbkgrnd (cchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) getcchar (const cchar_t *, wchar_t*, attr_t*, NCURSES_PAIRS_T*, void*); /* implemented */ >extern NCURSES_EXPORT(int) getn_wstr (wint_t *, int); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) hline_set (const cchar_t *, int); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) in_wch (cchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) in_wchnstr (cchar_t *, int); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) in_wchstr (cchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) innwstr (wchar_t *, int); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) ins_nwstr (const wchar_t *, int); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) ins_wch (const cchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) ins_wstr (const wchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) inwstr (wchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(NCURSES_CONST char*) key_name (wchar_t); /* implemented */ >extern NCURSES_EXPORT(int) killwchar (wchar_t *); /* implemented */ >extern NCURSES_EXPORT(int) mvadd_wch (int, int, const cchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvadd_wchnstr (int, int, const cchar_t *, int);/* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvadd_wchstr (int, int, const cchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvaddnwstr (int, int, const wchar_t *, int); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvaddwstr (int, int, const wchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvget_wch (int, int, wint_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvget_wstr (int, int, wint_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvgetn_wstr (int, int, wint_t *, int); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvhline_set (int, int, const cchar_t *, int); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvin_wch (int, int, cchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvin_wchnstr (int, int, cchar_t *, int); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvin_wchstr (int, int, cchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvinnwstr (int, int, wchar_t *, int); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvins_nwstr (int, int, const wchar_t *, int); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvins_wch (int, int, const cchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvins_wstr (int, int, const wchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvinwstr (int, int, wchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvvline_set (int, int, const cchar_t *, int); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvwadd_wch (WINDOW *, int, int, const cchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvwadd_wchnstr (WINDOW *, int, int, const cchar_t *, int); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvwadd_wchstr (WINDOW *, int, int, const cchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvwaddnwstr (WINDOW *, int, int, const wchar_t *, int);/* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvwaddwstr (WINDOW *, int, int, const wchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvwget_wch (WINDOW *, int, int, wint_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvwget_wstr (WINDOW *, int, int, wint_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvwgetn_wstr (WINDOW *, int, int, wint_t *, int);/* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvwhline_set (WINDOW *, int, int, const cchar_t *, int);/* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvwin_wch (WINDOW *, int, int, cchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvwin_wchnstr (WINDOW *, int,int, cchar_t *,int); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvwin_wchstr (WINDOW *, int, int, cchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvwinnwstr (WINDOW *, int, int, wchar_t *, int); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvwins_nwstr (WINDOW *, int,int, const wchar_t *,int); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvwins_wch (WINDOW *, int, int, const cchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvwins_wstr (WINDOW *, int, int, const wchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvwinwstr (WINDOW *, int, int, wchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) mvwvline_set (WINDOW *, int,int, const cchar_t *,int); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) pecho_wchar (WINDOW *, const cchar_t *); /* implemented */ >extern NCURSES_EXPORT(int) setcchar (cchar_t *, const wchar_t *, const attr_t, NCURSES_PAIRS_T, const void *); /* implemented */ >extern NCURSES_EXPORT(int) slk_wset (int, const wchar_t *, int); /* implemented */ >extern NCURSES_EXPORT(attr_t) term_attrs (void); /* implemented */ >extern NCURSES_EXPORT(int) unget_wch (const wchar_t); /* implemented */ >extern NCURSES_EXPORT(int) vid_attr (attr_t, NCURSES_PAIRS_T, void *); /* implemented */ >extern NCURSES_EXPORT(int) vid_puts (attr_t, NCURSES_PAIRS_T, void *, NCURSES_OUTC); /* implemented */ >extern NCURSES_EXPORT(int) vline_set (const cchar_t *, int); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) wadd_wch (WINDOW *,const cchar_t *); /* implemented */ >extern NCURSES_EXPORT(int) wadd_wchnstr (WINDOW *,const cchar_t *,int); /* implemented */ >extern NCURSES_EXPORT(int) wadd_wchstr (WINDOW *,const cchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) waddnwstr (WINDOW *,const wchar_t *,int); /* implemented */ >extern NCURSES_EXPORT(int) waddwstr (WINDOW *,const wchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) wbkgrnd (WINDOW *,const cchar_t *); /* implemented */ >extern NCURSES_EXPORT(void) wbkgrndset (WINDOW *,const cchar_t *); /* implemented */ >extern NCURSES_EXPORT(int) wborder_set (WINDOW *,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*); /* implemented */ >extern NCURSES_EXPORT(int) wecho_wchar (WINDOW *, const cchar_t *); /* implemented */ >extern NCURSES_EXPORT(int) wget_wch (WINDOW *, wint_t *); /* implemented */ >extern NCURSES_EXPORT(int) wget_wstr (WINDOW *, wint_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) wgetbkgrnd (WINDOW *, cchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) wgetn_wstr (WINDOW *,wint_t *, int); /* implemented */ >extern NCURSES_EXPORT(int) whline_set (WINDOW *, const cchar_t *, int); /* implemented */ >extern NCURSES_EXPORT(int) win_wch (WINDOW *, cchar_t *); /* implemented */ >extern NCURSES_EXPORT(int) win_wchnstr (WINDOW *, cchar_t *, int); /* implemented */ >extern NCURSES_EXPORT(int) win_wchstr (WINDOW *, cchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) winnwstr (WINDOW *, wchar_t *, int); /* implemented */ >extern NCURSES_EXPORT(int) wins_nwstr (WINDOW *, const wchar_t *, int); /* implemented */ >extern NCURSES_EXPORT(int) wins_wch (WINDOW *, const cchar_t *); /* implemented */ >extern NCURSES_EXPORT(int) wins_wstr (WINDOW *, const wchar_t *); /* generated:WIDEC */ >extern NCURSES_EXPORT(int) winwstr (WINDOW *, wchar_t *); /* implemented */ >extern NCURSES_EXPORT(wchar_t*) wunctrl (cchar_t *); /* implemented */ >extern NCURSES_EXPORT(int) wvline_set (WINDOW *, const cchar_t *, int); /* implemented */ > >#if NCURSES_SP_FUNCS >extern NCURSES_EXPORT(attr_t) NCURSES_SP_NAME(term_attrs) (SCREEN*); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(unget_wch) (SCREEN*, const wchar_t); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(wchar_t*) NCURSES_SP_NAME(wunctrl) (SCREEN*, cchar_t *); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(vid_attr) (SCREEN*, attr_t, NCURSES_PAIRS_T, void *); /* implemented:SP_FUNC */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(vid_puts) (SCREEN*, attr_t, NCURSES_PAIRS_T, void *, NCURSES_SP_OUTC); /* implemented:SP_FUNC */ >#endif ># 1744 "./curses.h" > >#ifndef NCURSES_NOMACROS > >/* > * XSI curses macros for XPG4 conformance. > */ >#define add_wch(c) wadd_wch(stdscr,(c)) >#define add_wchnstr(str,n) wadd_wchnstr(stdscr,(str),(n)) >#define add_wchstr(str) wadd_wchstr(stdscr,(str)) >#define addnwstr(wstr,n) waddnwstr(stdscr,(wstr),(n)) >#define addwstr(wstr) waddwstr(stdscr,(wstr)) >#define bkgrnd(c) wbkgrnd(stdscr,(c)) >#define bkgrndset(c) wbkgrndset(stdscr,(c)) >#define border_set(l,r,t,b,tl,tr,bl,br) wborder_set(stdscr,(l),(r),(t),(b),tl,tr,bl,br) >#define box_set(w,v,h) wborder_set((w),(v),(v),(h),(h),0,0,0,0) >#define echo_wchar(c) wecho_wchar(stdscr,(c)) >#define get_wch(c) wget_wch(stdscr,(c)) >#define get_wstr(t) wget_wstr(stdscr,(t)) >#define getbkgrnd(wch) wgetbkgrnd(stdscr,(wch)) >#define getn_wstr(t,n) wgetn_wstr(stdscr,(t),(n)) >#define hline_set(c,n) whline_set(stdscr,(c),(n)) >#define in_wch(c) win_wch(stdscr,(c)) >#define in_wchnstr(c,n) win_wchnstr(stdscr,(c),(n)) >#define in_wchstr(c) win_wchstr(stdscr,(c)) >#define innwstr(c,n) winnwstr(stdscr,(c),(n)) >#define ins_nwstr(t,n) wins_nwstr(stdscr,(t),(n)) >#define ins_wch(c) wins_wch(stdscr,(c)) >#define ins_wstr(t) wins_wstr(stdscr,(t)) >#define inwstr(c) winwstr(stdscr,(c)) >#define vline_set(c,n) wvline_set(stdscr,(c),(n)) >#define wadd_wchstr(win,str) wadd_wchnstr((win),(str),-1) >#define waddwstr(win,wstr) waddnwstr((win),(wstr),-1) >#define wget_wstr(w,t) wgetn_wstr((w),(t),-1) >#define win_wchstr(w,c) win_wchnstr((w),(c),-1) >#define wins_wstr(w,t) wins_nwstr((w),(t),-1) > >#if !NCURSES_OPAQUE >#define wgetbkgrnd(win,wch) ((win) ? (*(wch) = (win)->_bkgrnd) : *(wch), OK) >#endif ># 1783 "./curses.h" > >#define mvadd_wch(y,x,c) mvwadd_wch(stdscr,(y),(x),(c)) >#define mvadd_wchnstr(y,x,s,n) mvwadd_wchnstr(stdscr,(y),(x),(s),(n)) >#define mvadd_wchstr(y,x,s) mvwadd_wchstr(stdscr,(y),(x),(s)) >#define mvaddnwstr(y,x,wstr,n) mvwaddnwstr(stdscr,(y),(x),(wstr),(n)) >#define mvaddwstr(y,x,wstr) mvwaddwstr(stdscr,(y),(x),(wstr)) >#define mvget_wch(y,x,c) mvwget_wch(stdscr,(y),(x),(c)) >#define mvget_wstr(y,x,t) mvwget_wstr(stdscr,(y),(x),(t)) >#define mvgetn_wstr(y,x,t,n) mvwgetn_wstr(stdscr,(y),(x),(t),(n)) >#define mvhline_set(y,x,c,n) mvwhline_set(stdscr,(y),(x),(c),(n)) >#define mvin_wch(y,x,c) mvwin_wch(stdscr,(y),(x),(c)) >#define mvin_wchnstr(y,x,c,n) mvwin_wchnstr(stdscr,(y),(x),(c),(n)) >#define mvin_wchstr(y,x,c) mvwin_wchstr(stdscr,(y),(x),(c)) >#define mvinnwstr(y,x,c,n) mvwinnwstr(stdscr,(y),(x),(c),(n)) >#define mvins_nwstr(y,x,t,n) mvwins_nwstr(stdscr,(y),(x),(t),(n)) >#define mvins_wch(y,x,c) mvwins_wch(stdscr,(y),(x),(c)) >#define mvins_wstr(y,x,t) mvwins_wstr(stdscr,(y),(x),(t)) >#define mvinwstr(y,x,c) mvwinwstr(stdscr,(y),(x),(c)) >#define mvvline_set(y,x,c,n) mvwvline_set(stdscr,(y),(x),(c),(n)) > >#define mvwadd_wch(win,y,x,c) (wmove(win,(y),(x)) == ERR ? ERR : wadd_wch((win),(c))) >#define mvwadd_wchnstr(win,y,x,s,n) (wmove(win,(y),(x)) == ERR ? ERR : wadd_wchnstr((win),(s),(n))) >#define mvwadd_wchstr(win,y,x,s) (wmove(win,(y),(x)) == ERR ? ERR : wadd_wchstr((win),(s))) >#define mvwaddnwstr(win,y,x,wstr,n) (wmove(win,(y),(x)) == ERR ? ERR : waddnwstr((win),(wstr),(n))) >#define mvwaddwstr(win,y,x,wstr) (wmove(win,(y),(x)) == ERR ? ERR : waddwstr((win),(wstr))) >#define mvwget_wch(win,y,x,c) (wmove(win,(y),(x)) == ERR ? ERR : wget_wch((win),(c))) >#define mvwget_wstr(win,y,x,t) (wmove(win,(y),(x)) == ERR ? ERR : wget_wstr((win),(t))) >#define mvwgetn_wstr(win,y,x,t,n) (wmove(win,(y),(x)) == ERR ? ERR : wgetn_wstr((win),(t),(n))) >#define mvwhline_set(win,y,x,c,n) (wmove(win,(y),(x)) == ERR ? ERR : whline_set((win),(c),(n))) >#define mvwin_wch(win,y,x,c) (wmove(win,(y),(x)) == ERR ? ERR : win_wch((win),(c))) >#define mvwin_wchnstr(win,y,x,c,n) (wmove(win,(y),(x)) == ERR ? ERR : win_wchnstr((win),(c),(n))) >#define mvwin_wchstr(win,y,x,c) (wmove(win,(y),(x)) == ERR ? ERR : win_wchstr((win),(c))) >#define mvwinnwstr(win,y,x,c,n) (wmove(win,(y),(x)) == ERR ? ERR : winnwstr((win),(c),(n))) >#define mvwins_nwstr(win,y,x,t,n) (wmove(win,(y),(x)) == ERR ? ERR : wins_nwstr((win),(t),(n))) >#define mvwins_wch(win,y,x,c) (wmove(win,(y),(x)) == ERR ? ERR : wins_wch((win),(c))) >#define mvwins_wstr(win,y,x,t) (wmove(win,(y),(x)) == ERR ? ERR : wins_wstr((win),(t))) >#define mvwinwstr(win,y,x,c) (wmove(win,(y),(x)) == ERR ? ERR : winwstr((win),(c))) >#define mvwvline_set(win,y,x,c,n) (wmove(win,(y),(x)) == ERR ? ERR : wvline_set((win),(c),(n))) > >#endif /* NCURSES_NOMACROS */ ># 1823 "./curses.h" > >#if defined(TRACE) || defined(NCURSES_TEST) >extern NCURSES_EXPORT(const char *) _nc_viswbuf(const wchar_t *); >extern NCURSES_EXPORT(const char *) _nc_viswibuf(const wint_t *); >#endif ># 1828 "./curses.h" > >#endif /* NCURSES_WIDECHAR */ ># 1830 "./curses.h" >/* $Id: curses.tail,v 1.21 2011/10/29 20:03:22 tom Exp $ */ >/* > * vile:cmode: > * This file is part of ncurses, designed to be appended after curses.h.in > * (see that file for the relevant copyright). > */ > >/* mouse interface */ > >#if NCURSES_MOUSE_VERSION > 1 >#define NCURSES_MOUSE_MASK(b,m) ((m) << (((b) - 1) * 5)) >#else ># 1842 "./curses.h" >#define NCURSES_MOUSE_MASK(b,m) ((m) << (((b) - 1) * 6)) >#endif ># 1844 "./curses.h" > >#define NCURSES_BUTTON_RELEASED 001L >#define NCURSES_BUTTON_PRESSED 002L >#define NCURSES_BUTTON_CLICKED 004L >#define NCURSES_DOUBLE_CLICKED 010L >#define NCURSES_TRIPLE_CLICKED 020L >#define NCURSES_RESERVED_EVENT 040L > >/* event masks */ >#define BUTTON1_RELEASED NCURSES_MOUSE_MASK(1, NCURSES_BUTTON_RELEASED) >#define BUTTON1_PRESSED NCURSES_MOUSE_MASK(1, NCURSES_BUTTON_PRESSED) >#define BUTTON1_CLICKED NCURSES_MOUSE_MASK(1, NCURSES_BUTTON_CLICKED) >#define BUTTON1_DOUBLE_CLICKED NCURSES_MOUSE_MASK(1, NCURSES_DOUBLE_CLICKED) >#define BUTTON1_TRIPLE_CLICKED NCURSES_MOUSE_MASK(1, NCURSES_TRIPLE_CLICKED) > >#define BUTTON2_RELEASED NCURSES_MOUSE_MASK(2, NCURSES_BUTTON_RELEASED) >#define BUTTON2_PRESSED NCURSES_MOUSE_MASK(2, NCURSES_BUTTON_PRESSED) >#define BUTTON2_CLICKED NCURSES_MOUSE_MASK(2, NCURSES_BUTTON_CLICKED) >#define BUTTON2_DOUBLE_CLICKED NCURSES_MOUSE_MASK(2, NCURSES_DOUBLE_CLICKED) >#define BUTTON2_TRIPLE_CLICKED NCURSES_MOUSE_MASK(2, NCURSES_TRIPLE_CLICKED) > >#define BUTTON3_RELEASED NCURSES_MOUSE_MASK(3, NCURSES_BUTTON_RELEASED) >#define BUTTON3_PRESSED NCURSES_MOUSE_MASK(3, NCURSES_BUTTON_PRESSED) >#define BUTTON3_CLICKED NCURSES_MOUSE_MASK(3, NCURSES_BUTTON_CLICKED) >#define BUTTON3_DOUBLE_CLICKED NCURSES_MOUSE_MASK(3, NCURSES_DOUBLE_CLICKED) >#define BUTTON3_TRIPLE_CLICKED NCURSES_MOUSE_MASK(3, NCURSES_TRIPLE_CLICKED) > >#define BUTTON4_RELEASED NCURSES_MOUSE_MASK(4, NCURSES_BUTTON_RELEASED) >#define BUTTON4_PRESSED NCURSES_MOUSE_MASK(4, NCURSES_BUTTON_PRESSED) >#define BUTTON4_CLICKED NCURSES_MOUSE_MASK(4, NCURSES_BUTTON_CLICKED) >#define BUTTON4_DOUBLE_CLICKED NCURSES_MOUSE_MASK(4, NCURSES_DOUBLE_CLICKED) >#define BUTTON4_TRIPLE_CLICKED NCURSES_MOUSE_MASK(4, NCURSES_TRIPLE_CLICKED) > >/* > * In 32 bits the version-1 scheme does not provide enough space for a 5th > * button, unless we choose to change the ABI by omitting the reserved-events. > */ >#if NCURSES_MOUSE_VERSION > 1 > >#define BUTTON5_RELEASED NCURSES_MOUSE_MASK(5, NCURSES_BUTTON_RELEASED) >#define BUTTON5_PRESSED NCURSES_MOUSE_MASK(5, NCURSES_BUTTON_PRESSED) >#define BUTTON5_CLICKED NCURSES_MOUSE_MASK(5, NCURSES_BUTTON_CLICKED) >#define BUTTON5_DOUBLE_CLICKED NCURSES_MOUSE_MASK(5, NCURSES_DOUBLE_CLICKED) >#define BUTTON5_TRIPLE_CLICKED NCURSES_MOUSE_MASK(5, NCURSES_TRIPLE_CLICKED) > >#define BUTTON_CTRL NCURSES_MOUSE_MASK(6, 0001L) >#define BUTTON_SHIFT NCURSES_MOUSE_MASK(6, 0002L) >#define BUTTON_ALT NCURSES_MOUSE_MASK(6, 0004L) >#define REPORT_MOUSE_POSITION NCURSES_MOUSE_MASK(6, 0010L) > >#else ># 1895 "./curses.h" > >#define BUTTON1_RESERVED_EVENT NCURSES_MOUSE_MASK(1, NCURSES_RESERVED_EVENT) >#define BUTTON2_RESERVED_EVENT NCURSES_MOUSE_MASK(2, NCURSES_RESERVED_EVENT) >#define BUTTON3_RESERVED_EVENT NCURSES_MOUSE_MASK(3, NCURSES_RESERVED_EVENT) >#define BUTTON4_RESERVED_EVENT NCURSES_MOUSE_MASK(4, NCURSES_RESERVED_EVENT) > >#define BUTTON_CTRL NCURSES_MOUSE_MASK(5, 0001L) >#define BUTTON_SHIFT NCURSES_MOUSE_MASK(5, 0002L) >#define BUTTON_ALT NCURSES_MOUSE_MASK(5, 0004L) >#define REPORT_MOUSE_POSITION NCURSES_MOUSE_MASK(5, 0010L) > >#endif ># 1907 "./curses.h" > >#define ALL_MOUSE_EVENTS (REPORT_MOUSE_POSITION - 1) > >/* macros to extract single event-bits from masks */ >#define BUTTON_RELEASE(e, x) ((e) & NCURSES_MOUSE_MASK(x, 001)) >#define BUTTON_PRESS(e, x) ((e) & NCURSES_MOUSE_MASK(x, 002)) >#define BUTTON_CLICK(e, x) ((e) & NCURSES_MOUSE_MASK(x, 004)) >#define BUTTON_DOUBLE_CLICK(e, x) ((e) & NCURSES_MOUSE_MASK(x, 010)) >#define BUTTON_TRIPLE_CLICK(e, x) ((e) & NCURSES_MOUSE_MASK(x, 020)) >#define BUTTON_RESERVED_EVENT(e, x) ((e) & NCURSES_MOUSE_MASK(x, 040)) > >typedef struct >{ > short id; /* ID to distinguish multiple devices */ > int x, y, z; /* event coordinates (character-cell) */ > mmask_t bstate; /* button state bits */ >} >MEVENT; > >extern NCURSES_EXPORT(bool) has_mouse(void); >extern NCURSES_EXPORT(int) getmouse (MEVENT *); >extern NCURSES_EXPORT(int) ungetmouse (MEVENT *); >extern NCURSES_EXPORT(mmask_t) mousemask (mmask_t, mmask_t *); >extern NCURSES_EXPORT(bool) wenclose (const WINDOW *, int, int); >extern NCURSES_EXPORT(int) mouseinterval (int); >extern NCURSES_EXPORT(bool) wmouse_trafo (const WINDOW*, int*, int*, bool); >extern NCURSES_EXPORT(bool) mouse_trafo (int*, int*, bool); /* generated */ > >#if NCURSES_SP_FUNCS >extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(has_mouse) (SCREEN*); >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(getmouse) (SCREEN*, MEVENT *); >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(ungetmouse) (SCREEN*,MEVENT *); >extern NCURSES_EXPORT(mmask_t) NCURSES_SP_NAME(mousemask) (SCREEN*, mmask_t, mmask_t *); >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(mouseinterval) (SCREEN*, int); >#endif ># 1942 "./curses.h" > >#define mouse_trafo(y,x,to_screen) wmouse_trafo(stdscr,y,x,to_screen) > >/* other non-XSI functions */ > >extern NCURSES_EXPORT(int) mcprint (char *, int); /* direct data to printer */ >extern NCURSES_EXPORT(int) has_key (int); /* do we have given key? */ > >#if NCURSES_SP_FUNCS >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(has_key) (SCREEN*, int); /* do we have given key? */ >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(mcprint) (SCREEN*, char *, int); /* direct data to printer */ >#endif ># 1954 "./curses.h" > >/* Debugging : use with libncurses_g.a */ > >extern NCURSES_EXPORT(void) _tracef (const char *, ...) GCC_PRINTFLIKE(1,2); >extern NCURSES_EXPORT(void) _tracedump (const char *, WINDOW *); >extern NCURSES_EXPORT(char *) _traceattr (attr_t); >extern NCURSES_EXPORT(char *) _traceattr2 (int, chtype); >extern NCURSES_EXPORT(char *) _nc_tracebits (void); >extern NCURSES_EXPORT(char *) _tracechar (int); >extern NCURSES_EXPORT(char *) _tracechtype (chtype); >extern NCURSES_EXPORT(char *) _tracechtype2 (int, chtype); >#if NCURSES_WIDECHAR >#define _tracech_t _tracecchar_t >extern NCURSES_EXPORT(char *) _tracecchar_t (const cchar_t *); >#define _tracech_t2 _tracecchar_t2 >extern NCURSES_EXPORT(char *) _tracecchar_t2 (int, const cchar_t *); >#else ># 1971 "./curses.h" >#define _tracech_t _tracechtype >#define _tracech_t2 _tracechtype2 >#endif ># 1974 "./curses.h" >extern NCURSES_EXPORT(char *) _tracemouse (const MEVENT *); >extern NCURSES_EXPORT(void) trace (const unsigned int); > >/* trace masks */ >#define TRACE_DISABLE 0x0000 /* turn off tracing */ >#define TRACE_TIMES 0x0001 /* trace user and system times of updates */ >#define TRACE_TPUTS 0x0002 /* trace tputs calls */ >#define TRACE_UPDATE 0x0004 /* trace update actions, old & new screens */ >#define TRACE_MOVE 0x0008 /* trace cursor moves and scrolls */ >#define TRACE_CHARPUT 0x0010 /* trace all character outputs */ >#define TRACE_ORDINARY 0x001F /* trace all update actions */ >#define TRACE_CALLS 0x0020 /* trace all curses calls */ >#define TRACE_VIRTPUT 0x0040 /* trace virtual character puts */ >#define TRACE_IEVENT 0x0080 /* trace low-level input processing */ >#define TRACE_BITS 0x0100 /* trace state of TTY control bits */ >#define TRACE_ICALLS 0x0200 /* trace internal/nested calls */ >#define TRACE_CCALLS 0x0400 /* trace per-character calls */ >#define TRACE_DATABASE 0x0800 /* trace read/write of terminfo/termcap data */ >#define TRACE_ATTRS 0x1000 /* trace attribute updates */ > >#define TRACE_SHIFT 13 /* number of bits in the trace masks */ >#define TRACE_MAXIMUM ((1 << TRACE_SHIFT) - 1) /* maximum trace level */ > >#if defined(TRACE) || defined(NCURSES_TEST) >extern NCURSES_EXPORT_VAR(int) _nc_optimize_enable; /* enable optimizations */ >extern NCURSES_EXPORT(const char *) _nc_visbuf (const char *); >#define OPTIMIZE_MVCUR 0x01 /* cursor movement optimization */ >#define OPTIMIZE_HASHMAP 0x02 /* diff hashing to detect scrolls */ >#define OPTIMIZE_SCROLL 0x04 /* scroll optimization */ >#define OPTIMIZE_ALL 0xff /* enable all optimizations (dflt) */ >#endif ># 2005 "./curses.h" > >#if 0 /* expanded by -frewrite-includes */ >#include <unctrl.h> >#endif /* expanded by -frewrite-includes */ ># 2006 "./curses.h" ># 2007 "./curses.h" > >#ifdef __cplusplus > >#ifndef NCURSES_NOMACROS > >/* these names conflict with STL */ >#undef box >#undef clear >#undef erase >#undef move >#undef refresh > >#endif /* NCURSES_NOMACROS */ ># 2020 "./curses.h" > >} >#endif ># 2023 "./curses.h" > >#endif /* __NCURSES_H */ ># 2025 "./curses.h" ># 55 "./unctrl.h" 2 > >#undef unctrl >NCURSES_EXPORT(NCURSES_CONST char *) unctrl (chtype); > >#if 0 >NCURSES_EXPORT(NCURSES_CONST char *) NCURSES_SP_NAME(unctrl) (SCREEN*, chtype); >#endif ># 62 "./unctrl.h" > >#ifdef __cplusplus >} >#endif ># 66 "./unctrl.h" > >#endif /* NCURSES_UNCTRL_H_incl */ ># 68 "./unctrl.h" ># 2007 "./curses.h" 2 > >#ifdef __cplusplus > >#ifndef NCURSES_NOMACROS > >/* these names conflict with STL */ >#undef box >#undef clear >#undef erase >#undef move >#undef refresh > >#endif /* NCURSES_NOMACROS */ ># 2020 "./curses.h" > >} >#endif ># 2023 "./curses.h" > >#endif /* __NCURSES_H */ ># 2025 "./curses.h" ># 314 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" 2 > >typedef struct >{ > NCURSES_COLOR_T red, green, blue; /* what color_content() returns */ > NCURSES_COLOR_T r, g, b; /* params to init_color() */ > int init; /* true if we called init_color() */ >} >color_t; > >/* > * If curses.h did not expose the SCREEN-functions, then we do not need the > * parameter in the corresponding unextended functions. > */ > >#define USE_SP_FUNC_SUPPORT NCURSES_SP_FUNCS >#define USE_EXT_SP_FUNC_SUPPORT (NCURSES_SP_FUNCS && NCURSES_EXT_FUNCS) > >#if NCURSES_SP_FUNCS >#define SP_PARM sp /* use parameter */ >#define NCURSES_SP_ARG SP_PARM >#define NCURSES_SP_DCL SCREEN *NCURSES_SP_ARG >#define NCURSES_SP_DCL0 NCURSES_SP_DCL >#define NCURSES_SP_ARGx NCURSES_SP_ARG, >#define NCURSES_SP_DCLx SCREEN *NCURSES_SP_ARGx >#else ># 339 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#define SP_PARM SP /* use global variable */ >#define NCURSES_SP_ARG >#define NCURSES_SP_DCL >#define NCURSES_SP_DCL0 void >#define NCURSES_SP_ARGx >#define NCURSES_SP_DCLx >#endif ># 346 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#if 0 /* expanded by -frewrite-includes */ >#include <nc_panel.h> >#endif /* expanded by -frewrite-includes */ ># 347 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" ># 1 "/usr/src/contrib/ncurses/include/nc_panel.h" 1 >/**************************************************************************** > * 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 1997 * > * and: Thomas E. Dickey * > ****************************************************************************/ > >/* > * $Id: nc_panel.h,v 1.7 2009/07/04 18:20:02 tom Exp $ > * > * nc_panel.h > * > * Headerfile to provide an interface for the panel layer into > * the SCREEN structure of the ncurses core. > */ > >#ifndef NC_PANEL_H >#define NC_PANEL_H 1 > >#ifdef __cplusplus >extern "C" >{ >#endif ># 50 "/usr/src/contrib/ncurses/include/nc_panel.h" > > struct panel; /* Forward Declaration */ > > struct panelhook > { > struct panel *top_panel; > struct panel *bottom_panel; > struct panel *stdscr_pseudo_panel; >#if NO_LEAKS > int (*destroy) (struct panel *); >#endif ># 61 "/usr/src/contrib/ncurses/include/nc_panel.h" > }; > > struct screen; /* Forward declaration */ >/* Retrieve the panelhook of the specified screen */ > extern NCURSES_EXPORT(struct panelhook *) > _nc_panelhook (void); >#if NCURSES_SP_FUNCS > extern NCURSES_EXPORT(struct panelhook *) > NCURSES_SP_NAME(_nc_panelhook) (SCREEN *); >#endif ># 71 "/usr/src/contrib/ncurses/include/nc_panel.h" > >#ifdef __cplusplus >} >#endif ># 75 "/usr/src/contrib/ncurses/include/nc_panel.h" > >#endif /* NC_PANEL_H */ ># 77 "/usr/src/contrib/ncurses/include/nc_panel.h" ># 348 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" 2 > >#define IsPreScreen(sp) (((sp) != 0) && sp->_prescreen) >#define HasTerminal(sp) (((sp) != 0) && (0 != ((sp)->_term))) >#define IsValidScreen(sp) (HasTerminal(sp) && !IsPreScreen(sp)) > >#if USE_REENTRANT >#define CurTerm _nc_prescreen._cur_term >#else ># 356 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#define CurTerm cur_term >#endif ># 358 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#if NCURSES_SP_FUNCS >#define TerminalOf(sp) ((sp) ? ((sp)->_term ? (sp)->_term : CurTerm) : CurTerm) >#else ># 362 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#define TerminalOf(sp) CurTerm >#endif ># 364 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#if 0 /* expanded by -frewrite-includes */ >#include <term.h> >#endif /* expanded by -frewrite-includes */ ># 365 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" ># 1 "./term.h" 1 >/**************************************************************************** > * Copyright (c) 1998-2011,2013 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: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 */ >/* and: Eric S. Raymond <esr@snark.thyrsus.com> */ >/* and: Thomas E. Dickey 1995-on */ >/****************************************************************************/ > >/* $Id: MKterm.h.awk.in,v 1.62 2013/08/17 19:21:56 tom Exp $ */ > >/* >** term.h -- Definition of struct term >*/ > >#ifndef NCURSES_TERM_H_incl >#define NCURSES_TERM_H_incl 1 > >#undef NCURSES_VERSION >#define NCURSES_VERSION "5.9" > >#if 0 /* expanded by -frewrite-includes */ >#include <ncurses_dll.h> >#endif /* expanded by -frewrite-includes */ ># 47 "./term.h" ># 48 "./term.h" > >#ifdef __cplusplus >extern "C" { >#endif ># 52 "./term.h" > >/* Make this file self-contained by providing defaults for the HAVE_TERMIO[S]_H > * definition (based on the system for which this was configured). > */ > >#undef NCURSES_CONST >#define NCURSES_CONST const > >#undef NCURSES_SBOOL >#define NCURSES_SBOOL char > >#undef NCURSES_USE_DATABASE >#define NCURSES_USE_DATABASE 0 > >#undef NCURSES_USE_TERMCAP >#define NCURSES_USE_TERMCAP 1 > >#undef NCURSES_XNAMES >#define NCURSES_XNAMES 1 > >/* We will use these symbols to hide differences between > * termios/termio/sgttyb interfaces. > */ >#undef TTY >#undef SET_TTY >#undef GET_TTY > >/* Assume POSIX termio if we have the header and function */ >/* #if HAVE_TERMIOS_H && HAVE_TCGETATTR */ >#if 1 && 1 > >#undef TERMIOS >#define TERMIOS 1 > >#if 0 /* expanded by -frewrite-includes */ >#include <termios.h> >#endif /* expanded by -frewrite-includes */ ># 86 "./term.h" ># 1 "/usr/obj/usr/src/tmp/usr/include/termios.h" 1 3 4 >/*- > * Copyright (c) 1988, 1989, 1993, 1994 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)termios.h 8.3 (Berkeley) 3/28/94 > * $FreeBSD: stable/11/include/termios.h 265878 2014-05-11 13:48:21Z jilles $ > */ > >#ifndef _TERMIOS_H_ >#define _TERMIOS_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 36 "/usr/obj/usr/src/tmp/usr/include/termios.h" 3 4 ># 37 "/usr/obj/usr/src/tmp/usr/include/termios.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_termios.h> >#endif /* expanded by -frewrite-includes */ ># 37 "/usr/obj/usr/src/tmp/usr/include/termios.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/sys/_termios.h" 1 3 4 >/*- > * Copyright (c) 1988, 1989, 1993, 1994 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 4. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)termios.h 8.3 (Berkeley) 3/28/94 > * $FreeBSD: stable/11/sys/sys/_termios.h 199898 2009-11-28 23:50:48Z ed $ > */ > >#ifndef _SYS__TERMIOS_H_ >#define _SYS__TERMIOS_H_ > >/* > * Special Control Characters > * > * Index into c_cc[] character array. > * > * Name Subscript Enabled by > */ >#define VEOF 0 /* ICANON */ >#define VEOL 1 /* ICANON */ >#ifndef _POSIX_SOURCE >#define VEOL2 2 /* ICANON together with IEXTEN */ >#endif ># 48 "/usr/obj/usr/src/tmp/usr/include/sys/_termios.h" 3 4 >#define VERASE 3 /* ICANON */ >#ifndef _POSIX_SOURCE >#define VWERASE 4 /* ICANON together with IEXTEN */ >#endif ># 52 "/usr/obj/usr/src/tmp/usr/include/sys/_termios.h" 3 4 >#define VKILL 5 /* ICANON */ >#ifndef _POSIX_SOURCE >#define VREPRINT 6 /* ICANON together with IEXTEN */ >#define VERASE2 7 /* ICANON */ >#endif ># 57 "/usr/obj/usr/src/tmp/usr/include/sys/_termios.h" 3 4 >/* 7 ex-spare 1 */ >#define VINTR 8 /* ISIG */ >#define VQUIT 9 /* ISIG */ >#define VSUSP 10 /* ISIG */ >#ifndef _POSIX_SOURCE >#define VDSUSP 11 /* ISIG together with IEXTEN */ >#endif ># 64 "/usr/obj/usr/src/tmp/usr/include/sys/_termios.h" 3 4 >#define VSTART 12 /* IXON, IXOFF */ >#define VSTOP 13 /* IXON, IXOFF */ >#ifndef _POSIX_SOURCE >#define VLNEXT 14 /* IEXTEN */ >#define VDISCARD 15 /* IEXTEN */ >#endif ># 70 "/usr/obj/usr/src/tmp/usr/include/sys/_termios.h" 3 4 >#define VMIN 16 /* !ICANON */ >#define VTIME 17 /* !ICANON */ >#ifndef _POSIX_SOURCE >#define VSTATUS 18 /* ICANON together with IEXTEN */ >/* 19 spare 2 */ >#endif ># 76 "/usr/obj/usr/src/tmp/usr/include/sys/_termios.h" 3 4 >#define NCCS 20 > >#define _POSIX_VDISABLE 0xff > >/* > * Input flags - software input processing > */ >#define IGNBRK 0x00000001 /* ignore BREAK condition */ >#define BRKINT 0x00000002 /* map BREAK to SIGINTR */ >#define IGNPAR 0x00000004 /* ignore (discard) parity errors */ >#define PARMRK 0x00000008 /* mark parity and framing errors */ >#define INPCK 0x00000010 /* enable checking of parity errors */ >#define ISTRIP 0x00000020 /* strip 8th bit off chars */ >#define INLCR 0x00000040 /* map NL into CR */ >#define IGNCR 0x00000080 /* ignore CR */ >#define ICRNL 0x00000100 /* map CR to NL (ala CRMOD) */ >#define IXON 0x00000200 /* enable output flow control */ >#define IXOFF 0x00000400 /* enable input flow control */ >#ifndef _POSIX_SOURCE >#define IXANY 0x00000800 /* any char will restart after stop */ >#define IMAXBEL 0x00002000 /* ring bell on input queue full */ >#endif /*_POSIX_SOURCE */ ># 98 "/usr/obj/usr/src/tmp/usr/include/sys/_termios.h" 3 4 > >/* > * Output flags - software output processing > */ >#define OPOST 0x00000001 /* enable following output processing */ >#ifndef _POSIX_SOURCE >#define ONLCR 0x00000002 /* map NL to CR-NL (ala CRMOD) */ >#define TABDLY 0x00000004 /* tab delay mask */ >#define TAB0 0x00000000 /* no tab delay and expansion */ >#define TAB3 0x00000004 /* expand tabs to spaces */ >#define ONOEOT 0x00000008 /* discard EOT's (^D) on output) */ >#define OCRNL 0x00000010 /* map CR to NL on output */ >#define ONOCR 0x00000020 /* no CR output at column 0 */ >#define ONLRET 0x00000040 /* NL performs CR function */ >#endif /*_POSIX_SOURCE */ ># 113 "/usr/obj/usr/src/tmp/usr/include/sys/_termios.h" 3 4 > >/* > * Control flags - hardware control of terminal > */ >#ifndef _POSIX_SOURCE >#define CIGNORE 0x00000001 /* ignore control flags */ >#endif ># 120 "/usr/obj/usr/src/tmp/usr/include/sys/_termios.h" 3 4 >#define CSIZE 0x00000300 /* character size mask */ >#define CS5 0x00000000 /* 5 bits (pseudo) */ >#define CS6 0x00000100 /* 6 bits */ >#define CS7 0x00000200 /* 7 bits */ >#define CS8 0x00000300 /* 8 bits */ >#define CSTOPB 0x00000400 /* send 2 stop bits */ >#define CREAD 0x00000800 /* enable receiver */ >#define PARENB 0x00001000 /* parity enable */ >#define PARODD 0x00002000 /* odd parity, else even */ >#define HUPCL 0x00004000 /* hang up on last close */ >#define CLOCAL 0x00008000 /* ignore modem status lines */ >#ifndef _POSIX_SOURCE >#define CCTS_OFLOW 0x00010000 /* CTS flow control of output */ >#define CRTSCTS (CCTS_OFLOW | CRTS_IFLOW) >#define CRTS_IFLOW 0x00020000 /* RTS flow control of input */ >#define CDTR_IFLOW 0x00040000 /* DTR flow control of input */ >#define CDSR_OFLOW 0x00080000 /* DSR flow control of output */ >#define CCAR_OFLOW 0x00100000 /* DCD flow control of output */ >#endif ># 139 "/usr/obj/usr/src/tmp/usr/include/sys/_termios.h" 3 4 > > >/* > * "Local" flags - dumping ground for other state > * > * Warning: some flags in this structure begin with > * the letter "I" and look like they belong in the > * input flag. > */ > >#ifndef _POSIX_SOURCE >#define ECHOKE 0x00000001 /* visual erase for line kill */ >#endif /*_POSIX_SOURCE */ ># 152 "/usr/obj/usr/src/tmp/usr/include/sys/_termios.h" 3 4 >#define ECHOE 0x00000002 /* visually erase chars */ >#define ECHOK 0x00000004 /* echo NL after line kill */ >#define ECHO 0x00000008 /* enable echoing */ >#define ECHONL 0x00000010 /* echo NL even if ECHO is off */ >#ifndef _POSIX_SOURCE >#define ECHOPRT 0x00000020 /* visual erase mode for hardcopy */ >#define ECHOCTL 0x00000040 /* echo control chars as ^(Char) */ >#endif /*_POSIX_SOURCE */ ># 160 "/usr/obj/usr/src/tmp/usr/include/sys/_termios.h" 3 4 >#define ISIG 0x00000080 /* enable signals INTR, QUIT, [D]SUSP */ >#define ICANON 0x00000100 /* canonicalize input lines */ >#ifndef _POSIX_SOURCE >#define ALTWERASE 0x00000200 /* use alternate WERASE algorithm */ >#endif /*_POSIX_SOURCE */ ># 165 "/usr/obj/usr/src/tmp/usr/include/sys/_termios.h" 3 4 >#define IEXTEN 0x00000400 /* enable DISCARD and LNEXT */ >#define EXTPROC 0x00000800 /* external processing */ >#define TOSTOP 0x00400000 /* stop background jobs from output */ >#ifndef _POSIX_SOURCE >#define FLUSHO 0x00800000 /* output being flushed (state) */ >#define NOKERNINFO 0x02000000 /* no kernel output from VSTATUS */ >#define PENDIN 0x20000000 /* XXX retype pending input (state) */ >#endif /*_POSIX_SOURCE */ ># 173 "/usr/obj/usr/src/tmp/usr/include/sys/_termios.h" 3 4 >#define NOFLSH 0x80000000 /* don't flush after interrupt */ > >/* > * Standard speeds > */ >#define B0 0 >#define B50 50 >#define B75 75 >#define B110 110 >#define B134 134 >#define B150 150 >#define B200 200 >#define B300 300 >#define B600 600 >#define B1200 1200 >#define B1800 1800 >#define B2400 2400 >#define B4800 4800 >#define B9600 9600 >#define B19200 19200 >#define B38400 38400 >#ifndef _POSIX_SOURCE >#define B7200 7200 >#define B14400 14400 >#define B28800 28800 >#define B57600 57600 >#define B76800 76800 >#define B115200 115200 >#define B230400 230400 >#define B460800 460800 >#define B921600 921600 >#define EXTA 19200 >#define EXTB 38400 >#endif /* !_POSIX_SOURCE */ ># 207 "/usr/obj/usr/src/tmp/usr/include/sys/_termios.h" 3 4 > >typedef unsigned int tcflag_t; >typedef unsigned char cc_t; >typedef unsigned int speed_t; > >struct termios { > tcflag_t c_iflag; /* input flags */ > tcflag_t c_oflag; /* output flags */ > tcflag_t c_cflag; /* control flags */ > tcflag_t c_lflag; /* local flags */ > cc_t c_cc[NCCS]; /* control chars */ > speed_t c_ispeed; /* input speed */ > speed_t c_ospeed; /* output speed */ >}; > >#endif /* !_SYS__TERMIOS_H_ */ ># 223 "/usr/obj/usr/src/tmp/usr/include/sys/_termios.h" 3 4 ># 38 "/usr/obj/usr/src/tmp/usr/include/termios.h" 2 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 38 "/usr/obj/usr/src/tmp/usr/include/termios.h" 3 4 ># 39 "/usr/obj/usr/src/tmp/usr/include/termios.h" 3 4 > >#ifndef _PID_T_DECLARED >typedef __pid_t pid_t; >#define _PID_T_DECLARED >#endif ># 44 "/usr/obj/usr/src/tmp/usr/include/termios.h" 3 4 > >#ifndef _POSIX_SOURCE >#define OXTABS TAB3 >#define MDMBUF CCAR_OFLOW >#endif ># 49 "/usr/obj/usr/src/tmp/usr/include/termios.h" 3 4 > >#ifndef _POSIX_SOURCE >#define CCEQ(val, c) ((c) == (val) && (val) != _POSIX_VDISABLE) >#endif ># 53 "/usr/obj/usr/src/tmp/usr/include/termios.h" 3 4 > >/* > * Commands passed to tcsetattr() for setting the termios structure. > */ >#define TCSANOW 0 /* make change immediate */ >#define TCSADRAIN 1 /* drain output, then change */ >#define TCSAFLUSH 2 /* drain output, flush input */ >#ifndef _POSIX_SOURCE >#define TCSASOFT 0x10 /* flag - don't alter h.w. state */ >#endif ># 63 "/usr/obj/usr/src/tmp/usr/include/termios.h" 3 4 > >#define TCIFLUSH 1 >#define TCOFLUSH 2 >#define TCIOFLUSH 3 >#define TCOOFF 1 >#define TCOON 2 >#define TCIOFF 3 >#define TCION 4 > >__BEGIN_DECLS >speed_t cfgetispeed(const struct termios *); >speed_t cfgetospeed(const struct termios *); >int cfsetispeed(struct termios *, speed_t); >int cfsetospeed(struct termios *, speed_t); >int tcgetattr(int, struct termios *); >int tcsetattr(int, int, const struct termios *); >int tcdrain(int); >int tcflow(int, int); >int tcflush(int, int); >int tcsendbreak(int, int); > >#if __POSIX_VISIBLE >= 200112 >pid_t tcgetsid(int); >#endif ># 87 "/usr/obj/usr/src/tmp/usr/include/termios.h" 3 4 >#if __BSD_VISIBLE >int tcsetsid(int, pid_t); > >void cfmakeraw(struct termios *); >void cfmakesane(struct termios *); >int cfsetspeed(struct termios *, speed_t); >#endif ># 94 "/usr/obj/usr/src/tmp/usr/include/termios.h" 3 4 >__END_DECLS > >#endif /* !_TERMIOS_H_ */ ># 97 "/usr/obj/usr/src/tmp/usr/include/termios.h" 3 4 > >#ifndef _POSIX_SOURCE >#if 0 /* expanded by -frewrite-includes */ >#include <sys/ttycom.h> >#endif /* expanded by -frewrite-includes */ ># 99 "/usr/obj/usr/src/tmp/usr/include/termios.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/sys/ttycom.h" 1 3 4 >/*- > * Copyright (c) 1982, 1986, 1990, 1993, 1994 > * The Regents of the University of California. All rights reserved. > * (c) UNIX System Laboratories, Inc. > * All or some portions of this file are derived from material licensed > * to the University of California by American Telephone and Telegraph > * Co. or Unix System Laboratories, Inc. and are reproduced herein with > * the permission of UNIX System Laboratories, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 4. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)ttycom.h 8.1 (Berkeley) 3/28/94 > * $FreeBSD: stable/11/sys/sys/ttycom.h 231095 2012-02-06 18:15:46Z ed $ > */ > >#ifndef _SYS_TTYCOM_H_ >#define _SYS_TTYCOM_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/ioccom.h> >#endif /* expanded by -frewrite-includes */ ># 41 "/usr/obj/usr/src/tmp/usr/include/sys/ttycom.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/sys/ioccom.h" 1 3 4 >/*- > * Copyright (c) 1982, 1986, 1990, 1993, 1994 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 4. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)ioccom.h 8.2 (Berkeley) 3/28/94 > * $FreeBSD: stable/11/sys/sys/ioccom.h 206051 2010-04-01 16:21:35Z pjd $ > */ > >#ifndef _SYS_IOCCOM_H_ >#define _SYS_IOCCOM_H_ > >/* > * Ioctl's have the command encoded in the lower word, and the size of > * any in or out parameters in the upper word. The high 3 bits of the > * upper word are used to encode the in/out status of the parameter. > */ >#define IOCPARM_SHIFT 13 /* number of bits for ioctl size */ >#define IOCPARM_MASK ((1 << IOCPARM_SHIFT) - 1) /* parameter length mask */ >#define IOCPARM_LEN(x) (((x) >> 16) & IOCPARM_MASK) >#define IOCBASECMD(x) ((x) & ~(IOCPARM_MASK << 16)) >#define IOCGROUP(x) (((x) >> 8) & 0xff) > >#define IOCPARM_MAX (1 << IOCPARM_SHIFT) /* max size of ioctl */ >#define IOC_VOID 0x20000000 /* no parameters */ >#define IOC_OUT 0x40000000 /* copy out parameters */ >#define IOC_IN 0x80000000 /* copy in parameters */ >#define IOC_INOUT (IOC_IN|IOC_OUT) >#define IOC_DIRMASK (IOC_VOID|IOC_OUT|IOC_IN) > >#define _IOC(inout,group,num,len) ((unsigned long) \ > ((inout) | (((len) & IOCPARM_MASK) << 16) | ((group) << 8) | (num))) >#define _IO(g,n) _IOC(IOC_VOID, (g), (n), 0) >#define _IOWINT(g,n) _IOC(IOC_VOID, (g), (n), sizeof(int)) >#define _IOR(g,n,t) _IOC(IOC_OUT, (g), (n), sizeof(t)) >#define _IOW(g,n,t) _IOC(IOC_IN, (g), (n), sizeof(t)) >/* this should be _IORW, but stdio got there first */ >#define _IOWR(g,n,t) _IOC(IOC_INOUT, (g), (n), sizeof(t)) > >#ifdef _KERNEL > >#if defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD5) || \ > defined(COMPAT_FREEBSD4) || defined(COMPAT_43) >#define IOCPARM_IVAL(x) ((int)(intptr_t)(void *)*(caddr_t *)(void *)(x)) >#endif ># 69 "/usr/obj/usr/src/tmp/usr/include/sys/ioccom.h" 3 4 > >#else ># 71 "/usr/obj/usr/src/tmp/usr/include/sys/ioccom.h" 3 4 > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 72 "/usr/obj/usr/src/tmp/usr/include/sys/ioccom.h" 3 4 ># 73 "/usr/obj/usr/src/tmp/usr/include/sys/ioccom.h" 3 4 > >__BEGIN_DECLS >int ioctl(int, unsigned long, ...); >__END_DECLS > >#endif ># 79 "/usr/obj/usr/src/tmp/usr/include/sys/ioccom.h" 3 4 > >#endif /* !_SYS_IOCCOM_H_ */ ># 81 "/usr/obj/usr/src/tmp/usr/include/sys/ioccom.h" 3 4 ># 42 "/usr/obj/usr/src/tmp/usr/include/sys/ttycom.h" 2 3 4 > >/* > * Tty ioctl's except for those supported only for backwards compatibility > * with the old tty driver. > */ > >/* > * Window/terminal size structure. This information is stored by the kernel > * in order to provide a consistent interface, but is not used by the kernel. > */ >struct winsize { > unsigned short ws_row; /* rows, in characters */ > unsigned short ws_col; /* columns, in characters */ > unsigned short ws_xpixel; /* horizontal size, pixels */ > unsigned short ws_ypixel; /* vertical size, pixels */ >}; > > /* 0-2 compat */ > /* 3-7 unused */ > /* 8-10 compat */ > /* 11-12 unused */ >#define TIOCEXCL _IO('t', 13) /* set exclusive use of tty */ >#define TIOCNXCL _IO('t', 14) /* reset exclusive use of tty */ >#define TIOCGPTN _IOR('t', 15, int) /* Get pts number. */ >#define TIOCFLUSH _IOW('t', 16, int) /* flush buffers */ > /* 17-18 compat */ >#define TIOCGETA _IOR('t', 19, struct termios) /* get termios struct */ >#define TIOCSETA _IOW('t', 20, struct termios) /* set termios struct */ >#define TIOCSETAW _IOW('t', 21, struct termios) /* drain output, set */ >#define TIOCSETAF _IOW('t', 22, struct termios) /* drn out, fls in, set */ > /* 23-25 unused */ >#define TIOCGETD _IOR('t', 26, int) /* get line discipline */ >#define TIOCSETD _IOW('t', 27, int) /* set line discipline */ >#define TIOCPTMASTER _IO('t', 28) /* pts master validation */ > /* 29-85 unused */ >#define TIOCGDRAINWAIT _IOR('t', 86, int) /* get ttywait timeout */ >#define TIOCSDRAINWAIT _IOW('t', 87, int) /* set ttywait timeout */ > /* 88 unused */ > /* 89-91 conflicts: tun and tap */ >#define TIOCTIMESTAMP _IOR('t', 89, struct timeval) /* enable/get timestamp > * of last input event */ >#define TIOCMGDTRWAIT _IOR('t', 90, int) /* modem: get wait on close */ >#define TIOCMSDTRWAIT _IOW('t', 91, int) /* modem: set wait on close */ > /* 92-93 tun and tap */ > /* 94-97 conflicts: tun and tap */ >#define TIOCDRAIN _IO('t', 94) /* wait till output drained */ >#define TIOCSIG _IOWINT('t', 95) /* pty: generate signal */ >#define TIOCEXT _IOW('t', 96, int) /* pty: external processing */ >#define TIOCSCTTY _IO('t', 97) /* become controlling tty */ >#define TIOCCONS _IOW('t', 98, int) /* become virtual console */ >#define TIOCGSID _IOR('t', 99, int) /* get session id */ > /* 100 unused */ >#define TIOCSTAT _IO('t', 101) /* simulate ^T status message */ >#define TIOCUCNTL _IOW('t', 102, int) /* pty: set/clr usr cntl mode */ >#define UIOCCMD(n) _IO('u', n) /* usr cntl op "n" */ >#define TIOCSWINSZ _IOW('t', 103, struct winsize) /* set window size */ >#define TIOCGWINSZ _IOR('t', 104, struct winsize) /* get window size */ > /* 105 unused */ >#define TIOCMGET _IOR('t', 106, int) /* get all modem bits */ >#define TIOCM_LE 0001 /* line enable */ >#define TIOCM_DTR 0002 /* data terminal ready */ >#define TIOCM_RTS 0004 /* request to send */ >#define TIOCM_ST 0010 /* secondary transmit */ >#define TIOCM_SR 0020 /* secondary receive */ >#define TIOCM_CTS 0040 /* clear to send */ >#define TIOCM_DCD 0100 /* data carrier detect */ >#define TIOCM_RI 0200 /* ring indicate */ >#define TIOCM_DSR 0400 /* data set ready */ >#define TIOCM_CD TIOCM_DCD >#define TIOCM_CAR TIOCM_DCD >#define TIOCM_RNG TIOCM_RI >#define TIOCMBIC _IOW('t', 107, int) /* bic modem bits */ >#define TIOCMBIS _IOW('t', 108, int) /* bis modem bits */ >#define TIOCMSET _IOW('t', 109, int) /* set all modem bits */ >#define TIOCSTART _IO('t', 110) /* start output, like ^Q */ >#define TIOCSTOP _IO('t', 111) /* stop output, like ^S */ >#define TIOCPKT _IOW('t', 112, int) /* pty: set/clear packet mode */ >#define TIOCPKT_DATA 0x00 /* data packet */ >#define TIOCPKT_FLUSHREAD 0x01 /* flush packet */ >#define TIOCPKT_FLUSHWRITE 0x02 /* flush packet */ >#define TIOCPKT_STOP 0x04 /* stop output */ >#define TIOCPKT_START 0x08 /* start output */ >#define TIOCPKT_NOSTOP 0x10 /* no more ^S, ^Q */ >#define TIOCPKT_DOSTOP 0x20 /* now do ^S ^Q */ >#define TIOCPKT_IOCTL 0x40 /* state change of pty driver */ >#define TIOCNOTTY _IO('t', 113) /* void tty association */ >#define TIOCSTI _IOW('t', 114, char) /* simulate terminal input */ >#define TIOCOUTQ _IOR('t', 115, int) /* output queue size */ > /* 116-117 compat */ >#define TIOCSPGRP _IOW('t', 118, int) /* set pgrp of tty */ >#define TIOCGPGRP _IOR('t', 119, int) /* get pgrp of tty */ >#define TIOCCDTR _IO('t', 120) /* clear data terminal ready */ >#define TIOCSDTR _IO('t', 121) /* set data terminal ready */ >#define TIOCCBRK _IO('t', 122) /* clear break bit */ >#define TIOCSBRK _IO('t', 123) /* set break bit */ > /* 124-127 compat */ > >#define TTYDISC 0 /* termios tty line discipline */ >#define SLIPDISC 4 /* serial IP discipline */ >#define PPPDISC 5 /* PPP discipline */ >#define NETGRAPHDISC 6 /* Netgraph tty node discipline */ >#define H4DISC 7 /* Netgraph Bluetooth H4 discipline */ > >#endif /* !_SYS_TTYCOM_H_ */ ># 146 "/usr/obj/usr/src/tmp/usr/include/sys/ttycom.h" 3 4 ># 100 "/usr/obj/usr/src/tmp/usr/include/termios.h" 2 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/ttydefaults.h> >#endif /* expanded by -frewrite-includes */ ># 100 "/usr/obj/usr/src/tmp/usr/include/termios.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/sys/ttydefaults.h" 1 3 4 >/*- > * Copyright (c) 1982, 1986, 1993 > * The Regents of the University of California. All rights reserved. > * (c) UNIX System Laboratories, Inc. > * All or some portions of this file are derived from material licensed > * to the University of California by American Telephone and Telegraph > * Co. or Unix System Laboratories, Inc. and are reproduced herein with > * the permission of UNIX System Laboratories, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 4. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)ttydefaults.h 8.4 (Berkeley) 1/21/94 > * $FreeBSD: stable/11/sys/sys/ttydefaults.h 249311 2013-04-09 16:16:34Z ed $ > */ > >/* > * System wide defaults for terminal state. > */ >#ifndef _SYS_TTYDEFAULTS_H_ >#define _SYS_TTYDEFAULTS_H_ > >/* > * Defaults on "first" open. > */ >#define TTYDEF_IFLAG (BRKINT | ICRNL | IMAXBEL | IXON | IXANY) >#define TTYDEF_OFLAG (OPOST | ONLCR) >#define TTYDEF_LFLAG_NOECHO (ICANON | ISIG | IEXTEN) >#define TTYDEF_LFLAG_ECHO (TTYDEF_LFLAG_NOECHO \ > | ECHO | ECHOE | ECHOKE | ECHOCTL) >#define TTYDEF_LFLAG TTYDEF_LFLAG_ECHO >#define TTYDEF_CFLAG (CREAD | CS8 | HUPCL) >#define TTYDEF_SPEED (B9600) > >/* > * Control Character Defaults > */ >/* > * XXX: A lot of code uses lowercase characters, but control-character > * conversion is actually only valid when applied to uppercase > * characters. We just treat lowercase characters as if they were > * inserted as uppercase. > */ >#define CTRL(x) ((x) >= 'a' && (x) <= 'z' ? \ > ((x) - 'a' + 1) : (((x) - 'A' + 1) & 0x7f)) >#define CEOF CTRL('D') >#define CEOL 0xff /* XXX avoid _POSIX_VDISABLE */ >#define CERASE CTRL('?') >#define CERASE2 CTRL('H') >#define CINTR CTRL('C') >#define CSTATUS CTRL('T') >#define CKILL CTRL('U') >#define CMIN 1 >#define CQUIT CTRL('\\') >#define CSUSP CTRL('Z') >#define CTIME 0 >#define CDSUSP CTRL('Y') >#define CSTART CTRL('Q') >#define CSTOP CTRL('S') >#define CLNEXT CTRL('V') >#define CDISCARD CTRL('O') >#define CWERASE CTRL('W') >#define CREPRINT CTRL('R') >#define CEOT CEOF >/* compat */ >#define CBRK CEOL >#define CRPRNT CREPRINT >#define CFLUSH CDISCARD > >/* PROTECTED INCLUSION ENDS HERE */ >#endif /* !_SYS_TTYDEFAULTS_H_ */ ># 93 "/usr/obj/usr/src/tmp/usr/include/sys/ttydefaults.h" 3 4 > >/* > * #define TTYDEFCHARS to include an array of default control characters. > */ >#ifdef TTYDEFCHARS > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 99 "/usr/obj/usr/src/tmp/usr/include/sys/ttydefaults.h" 3 4 ># 100 "/usr/obj/usr/src/tmp/usr/include/sys/ttydefaults.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_termios.h> >#endif /* expanded by -frewrite-includes */ ># 100 "/usr/obj/usr/src/tmp/usr/include/sys/ttydefaults.h" 3 4 ># 101 "/usr/obj/usr/src/tmp/usr/include/sys/ttydefaults.h" 3 4 > >static const cc_t ttydefchars[] = { > CEOF, CEOL, CEOL, CERASE, CWERASE, CKILL, CREPRINT, CERASE2, CINTR, > CQUIT, CSUSP, CDSUSP, CSTART, CSTOP, CLNEXT, CDISCARD, CMIN, CTIME, > CSTATUS, _POSIX_VDISABLE >}; >_Static_assert(sizeof(ttydefchars) / sizeof(cc_t) == NCCS, > "Size of ttydefchars does not match NCCS"); > >#undef TTYDEFCHARS >#endif /* TTYDEFCHARS */ ># 112 "/usr/obj/usr/src/tmp/usr/include/sys/ttydefaults.h" 3 4 ># 101 "/usr/obj/usr/src/tmp/usr/include/termios.h" 2 3 4 >#endif ># 102 "/usr/obj/usr/src/tmp/usr/include/termios.h" 3 4 ># 87 "./term.h" 2 >#define TTY struct termios > >#else /* !HAVE_TERMIOS_H */ ># 90 "./term.h" > >/* #if HAVE_TERMIO_H */ >#if 0 > >#undef TERMIOS >#define TERMIOS 1 > >#if 0 /* expanded by -frewrite-includes */ >#include <termio.h> >#endif /* expanded by -frewrite-includes */ ># 97 "./term.h" ># 98 "./term.h" >#define TTY struct termio > >#else /* !HAVE_TERMIO_H */ ># 101 "./term.h" > >#if __MINGW32__ >#if 0 /* expanded by -frewrite-includes */ ># include <ncurses_mingw.h> >#endif /* expanded by -frewrite-includes */ ># 103 "./term.h" ># 104 "./term.h" ># define TTY struct termios >#else ># 106 "./term.h" >#undef TERMIOS >#if 0 /* expanded by -frewrite-includes */ >#include <sgtty.h> >#endif /* expanded by -frewrite-includes */ ># 107 "./term.h" ># 108 "./term.h" >#if 0 /* expanded by -frewrite-includes */ >#include <sys/ioctl.h> >#endif /* expanded by -frewrite-includes */ ># 108 "./term.h" ># 109 "./term.h" >#define TTY struct sgttyb >#endif /* MINGW32 */ ># 111 "./term.h" >#endif /* HAVE_TERMIO_H */ ># 112 "./term.h" > >#endif /* HAVE_TERMIOS_H */ ># 114 "./term.h" > >#ifdef TERMIOS >#define GET_TTY(fd, buf) tcgetattr(fd, buf) >#define SET_TTY(fd, buf) tcsetattr(fd, TCSADRAIN, buf) >#else ># 119 "./term.h" >#define GET_TTY(fd, buf) gtty(fd, buf) >#define SET_TTY(fd, buf) stty(fd, buf) >#endif ># 122 "./term.h" > >#define NAMESIZE 256 > >#define CUR cur_term->type. > >#define auto_left_margin CUR Booleans[0] >#define auto_right_margin CUR Booleans[1] >#define no_esc_ctlc CUR Booleans[2] >#define ceol_standout_glitch CUR Booleans[3] >#define eat_newline_glitch CUR Booleans[4] >#define erase_overstrike CUR Booleans[5] >#define generic_type CUR Booleans[6] >#define hard_copy CUR Booleans[7] >#define has_meta_key CUR Booleans[8] >#define has_status_line CUR Booleans[9] >#define insert_null_glitch CUR Booleans[10] >#define memory_above CUR Booleans[11] >#define memory_below CUR Booleans[12] >#define move_insert_mode CUR Booleans[13] >#define move_standout_mode CUR Booleans[14] >#define over_strike CUR Booleans[15] >#define status_line_esc_ok CUR Booleans[16] >#define dest_tabs_magic_smso CUR Booleans[17] >#define tilde_glitch CUR Booleans[18] >#define transparent_underline CUR Booleans[19] >#define xon_xoff CUR Booleans[20] >#define needs_xon_xoff CUR Booleans[21] >#define prtr_silent CUR Booleans[22] >#define hard_cursor CUR Booleans[23] >#define non_rev_rmcup CUR Booleans[24] >#define no_pad_char CUR Booleans[25] >#define non_dest_scroll_region CUR Booleans[26] >#define can_change CUR Booleans[27] >#define back_color_erase CUR Booleans[28] >#define hue_lightness_saturation CUR Booleans[29] >#define col_addr_glitch CUR Booleans[30] >#define cr_cancels_micro_mode CUR Booleans[31] >#define has_print_wheel CUR Booleans[32] >#define row_addr_glitch CUR Booleans[33] >#define semi_auto_right_margin CUR Booleans[34] >#define cpi_changes_res CUR Booleans[35] >#define lpi_changes_res CUR Booleans[36] >#define columns CUR Numbers[0] >#define init_tabs CUR Numbers[1] >#define lines CUR Numbers[2] >#define lines_of_memory CUR Numbers[3] >#define magic_cookie_glitch CUR Numbers[4] >#define padding_baud_rate CUR Numbers[5] >#define virtual_terminal CUR Numbers[6] >#define width_status_line CUR Numbers[7] >#define num_labels CUR Numbers[8] >#define label_height CUR Numbers[9] >#define label_width CUR Numbers[10] >#define max_attributes CUR Numbers[11] >#define maximum_windows CUR Numbers[12] >#define max_colors CUR Numbers[13] >#define max_pairs CUR Numbers[14] >#define no_color_video CUR Numbers[15] >#define buffer_capacity CUR Numbers[16] >#define dot_vert_spacing CUR Numbers[17] >#define dot_horz_spacing CUR Numbers[18] >#define max_micro_address CUR Numbers[19] >#define max_micro_jump CUR Numbers[20] >#define micro_col_size CUR Numbers[21] >#define micro_line_size CUR Numbers[22] >#define number_of_pins CUR Numbers[23] >#define output_res_char CUR Numbers[24] >#define output_res_line CUR Numbers[25] >#define output_res_horz_inch CUR Numbers[26] >#define output_res_vert_inch CUR Numbers[27] >#define print_rate CUR Numbers[28] >#define wide_char_size CUR Numbers[29] >#define buttons CUR Numbers[30] >#define bit_image_entwining CUR Numbers[31] >#define bit_image_type CUR Numbers[32] >#define back_tab CUR Strings[0] >#define bell CUR Strings[1] >#define carriage_return CUR Strings[2] >#define change_scroll_region CUR Strings[3] >#define clear_all_tabs CUR Strings[4] >#define clear_screen CUR Strings[5] >#define clr_eol CUR Strings[6] >#define clr_eos CUR Strings[7] >#define column_address CUR Strings[8] >#define command_character CUR Strings[9] >#define cursor_address CUR Strings[10] >#define cursor_down CUR Strings[11] >#define cursor_home CUR Strings[12] >#define cursor_invisible CUR Strings[13] >#define cursor_left CUR Strings[14] >#define cursor_mem_address CUR Strings[15] >#define cursor_normal CUR Strings[16] >#define cursor_right CUR Strings[17] >#define cursor_to_ll CUR Strings[18] >#define cursor_up CUR Strings[19] >#define cursor_visible CUR Strings[20] >#define delete_character CUR Strings[21] >#define delete_line CUR Strings[22] >#define dis_status_line CUR Strings[23] >#define down_half_line CUR Strings[24] >#define enter_alt_charset_mode CUR Strings[25] >#define enter_blink_mode CUR Strings[26] >#define enter_bold_mode CUR Strings[27] >#define enter_ca_mode CUR Strings[28] >#define enter_delete_mode CUR Strings[29] >#define enter_dim_mode CUR Strings[30] >#define enter_insert_mode CUR Strings[31] >#define enter_secure_mode CUR Strings[32] >#define enter_protected_mode CUR Strings[33] >#define enter_reverse_mode CUR Strings[34] >#define enter_standout_mode CUR Strings[35] >#define enter_underline_mode CUR Strings[36] >#define erase_chars CUR Strings[37] >#define exit_alt_charset_mode CUR Strings[38] >#define exit_attribute_mode CUR Strings[39] >#define exit_ca_mode CUR Strings[40] >#define exit_delete_mode CUR Strings[41] >#define exit_insert_mode CUR Strings[42] >#define exit_standout_mode CUR Strings[43] >#define exit_underline_mode CUR Strings[44] >#define flash_screen CUR Strings[45] >#define form_feed CUR Strings[46] >#define from_status_line CUR Strings[47] >#define init_1string CUR Strings[48] >#define init_2string CUR Strings[49] >#define init_3string CUR Strings[50] >#define init_file CUR Strings[51] >#define insert_character CUR Strings[52] >#define insert_line CUR Strings[53] >#define insert_padding CUR Strings[54] >#define key_backspace CUR Strings[55] >#define key_catab CUR Strings[56] >#define key_clear CUR Strings[57] >#define key_ctab CUR Strings[58] >#define key_dc CUR Strings[59] >#define key_dl CUR Strings[60] >#define key_down CUR Strings[61] >#define key_eic CUR Strings[62] >#define key_eol CUR Strings[63] >#define key_eos CUR Strings[64] >#define key_f0 CUR Strings[65] >#define key_f1 CUR Strings[66] >#define key_f10 CUR Strings[67] >#define key_f2 CUR Strings[68] >#define key_f3 CUR Strings[69] >#define key_f4 CUR Strings[70] >#define key_f5 CUR Strings[71] >#define key_f6 CUR Strings[72] >#define key_f7 CUR Strings[73] >#define key_f8 CUR Strings[74] >#define key_f9 CUR Strings[75] >#define key_home CUR Strings[76] >#define key_ic CUR Strings[77] >#define key_il CUR Strings[78] >#define key_left CUR Strings[79] >#define key_ll CUR Strings[80] >#define key_npage CUR Strings[81] >#define key_ppage CUR Strings[82] >#define key_right CUR Strings[83] >#define key_sf CUR Strings[84] >#define key_sr CUR Strings[85] >#define key_stab CUR Strings[86] >#define key_up CUR Strings[87] >#define keypad_local CUR Strings[88] >#define keypad_xmit CUR Strings[89] >#define lab_f0 CUR Strings[90] >#define lab_f1 CUR Strings[91] >#define lab_f10 CUR Strings[92] >#define lab_f2 CUR Strings[93] >#define lab_f3 CUR Strings[94] >#define lab_f4 CUR Strings[95] >#define lab_f5 CUR Strings[96] >#define lab_f6 CUR Strings[97] >#define lab_f7 CUR Strings[98] >#define lab_f8 CUR Strings[99] >#define lab_f9 CUR Strings[100] >#define meta_off CUR Strings[101] >#define meta_on CUR Strings[102] >#define newline CUR Strings[103] >#define pad_char CUR Strings[104] >#define parm_dch CUR Strings[105] >#define parm_delete_line CUR Strings[106] >#define parm_down_cursor CUR Strings[107] >#define parm_ich CUR Strings[108] >#define parm_index CUR Strings[109] >#define parm_insert_line CUR Strings[110] >#define parm_left_cursor CUR Strings[111] >#define parm_right_cursor CUR Strings[112] >#define parm_rindex CUR Strings[113] >#define parm_up_cursor CUR Strings[114] >#define pkey_key CUR Strings[115] >#define pkey_local CUR Strings[116] >#define pkey_xmit CUR Strings[117] >#define print_screen CUR Strings[118] >#define prtr_off CUR Strings[119] >#define prtr_on CUR Strings[120] >#define repeat_char CUR Strings[121] >#define reset_1string CUR Strings[122] >#define reset_2string CUR Strings[123] >#define reset_3string CUR Strings[124] >#define reset_file CUR Strings[125] >#define restore_cursor CUR Strings[126] >#define row_address CUR Strings[127] >#define save_cursor CUR Strings[128] >#define scroll_forward CUR Strings[129] >#define scroll_reverse CUR Strings[130] >#define set_attributes CUR Strings[131] >#define set_tab CUR Strings[132] >#define set_window CUR Strings[133] >#define tab CUR Strings[134] >#define to_status_line CUR Strings[135] >#define underline_char CUR Strings[136] >#define up_half_line CUR Strings[137] >#define init_prog CUR Strings[138] >#define key_a1 CUR Strings[139] >#define key_a3 CUR Strings[140] >#define key_b2 CUR Strings[141] >#define key_c1 CUR Strings[142] >#define key_c3 CUR Strings[143] >#define prtr_non CUR Strings[144] >#define char_padding CUR Strings[145] >#define acs_chars CUR Strings[146] >#define plab_norm CUR Strings[147] >#define key_btab CUR Strings[148] >#define enter_xon_mode CUR Strings[149] >#define exit_xon_mode CUR Strings[150] >#define enter_am_mode CUR Strings[151] >#define exit_am_mode CUR Strings[152] >#define xon_character CUR Strings[153] >#define xoff_character CUR Strings[154] >#define ena_acs CUR Strings[155] >#define label_on CUR Strings[156] >#define label_off CUR Strings[157] >#define key_beg CUR Strings[158] >#define key_cancel CUR Strings[159] >#define key_close CUR Strings[160] >#define key_command CUR Strings[161] >#define key_copy CUR Strings[162] >#define key_create CUR Strings[163] >#define key_end CUR Strings[164] >#define key_enter CUR Strings[165] >#define key_exit CUR Strings[166] >#define key_find CUR Strings[167] >#define key_help CUR Strings[168] >#define key_mark CUR Strings[169] >#define key_message CUR Strings[170] >#define key_move CUR Strings[171] >#define key_next CUR Strings[172] >#define key_open CUR Strings[173] >#define key_options CUR Strings[174] >#define key_previous CUR Strings[175] >#define key_print CUR Strings[176] >#define key_redo CUR Strings[177] >#define key_reference CUR Strings[178] >#define key_refresh CUR Strings[179] >#define key_replace CUR Strings[180] >#define key_restart CUR Strings[181] >#define key_resume CUR Strings[182] >#define key_save CUR Strings[183] >#define key_suspend CUR Strings[184] >#define key_undo CUR Strings[185] >#define key_sbeg CUR Strings[186] >#define key_scancel CUR Strings[187] >#define key_scommand CUR Strings[188] >#define key_scopy CUR Strings[189] >#define key_screate CUR Strings[190] >#define key_sdc CUR Strings[191] >#define key_sdl CUR Strings[192] >#define key_select CUR Strings[193] >#define key_send CUR Strings[194] >#define key_seol CUR Strings[195] >#define key_sexit CUR Strings[196] >#define key_sfind CUR Strings[197] >#define key_shelp CUR Strings[198] >#define key_shome CUR Strings[199] >#define key_sic CUR Strings[200] >#define key_sleft CUR Strings[201] >#define key_smessage CUR Strings[202] >#define key_smove CUR Strings[203] >#define key_snext CUR Strings[204] >#define key_soptions CUR Strings[205] >#define key_sprevious CUR Strings[206] >#define key_sprint CUR Strings[207] >#define key_sredo CUR Strings[208] >#define key_sreplace CUR Strings[209] >#define key_sright CUR Strings[210] >#define key_srsume CUR Strings[211] >#define key_ssave CUR Strings[212] >#define key_ssuspend CUR Strings[213] >#define key_sundo CUR Strings[214] >#define req_for_input CUR Strings[215] >#define key_f11 CUR Strings[216] >#define key_f12 CUR Strings[217] >#define key_f13 CUR Strings[218] >#define key_f14 CUR Strings[219] >#define key_f15 CUR Strings[220] >#define key_f16 CUR Strings[221] >#define key_f17 CUR Strings[222] >#define key_f18 CUR Strings[223] >#define key_f19 CUR Strings[224] >#define key_f20 CUR Strings[225] >#define key_f21 CUR Strings[226] >#define key_f22 CUR Strings[227] >#define key_f23 CUR Strings[228] >#define key_f24 CUR Strings[229] >#define key_f25 CUR Strings[230] >#define key_f26 CUR Strings[231] >#define key_f27 CUR Strings[232] >#define key_f28 CUR Strings[233] >#define key_f29 CUR Strings[234] >#define key_f30 CUR Strings[235] >#define key_f31 CUR Strings[236] >#define key_f32 CUR Strings[237] >#define key_f33 CUR Strings[238] >#define key_f34 CUR Strings[239] >#define key_f35 CUR Strings[240] >#define key_f36 CUR Strings[241] >#define key_f37 CUR Strings[242] >#define key_f38 CUR Strings[243] >#define key_f39 CUR Strings[244] >#define key_f40 CUR Strings[245] >#define key_f41 CUR Strings[246] >#define key_f42 CUR Strings[247] >#define key_f43 CUR Strings[248] >#define key_f44 CUR Strings[249] >#define key_f45 CUR Strings[250] >#define key_f46 CUR Strings[251] >#define key_f47 CUR Strings[252] >#define key_f48 CUR Strings[253] >#define key_f49 CUR Strings[254] >#define key_f50 CUR Strings[255] >#define key_f51 CUR Strings[256] >#define key_f52 CUR Strings[257] >#define key_f53 CUR Strings[258] >#define key_f54 CUR Strings[259] >#define key_f55 CUR Strings[260] >#define key_f56 CUR Strings[261] >#define key_f57 CUR Strings[262] >#define key_f58 CUR Strings[263] >#define key_f59 CUR Strings[264] >#define key_f60 CUR Strings[265] >#define key_f61 CUR Strings[266] >#define key_f62 CUR Strings[267] >#define key_f63 CUR Strings[268] >#define clr_bol CUR Strings[269] >#define clear_margins CUR Strings[270] >#define set_left_margin CUR Strings[271] >#define set_right_margin CUR Strings[272] >#define label_format CUR Strings[273] >#define set_clock CUR Strings[274] >#define display_clock CUR Strings[275] >#define remove_clock CUR Strings[276] >#define create_window CUR Strings[277] >#define goto_window CUR Strings[278] >#define hangup CUR Strings[279] >#define dial_phone CUR Strings[280] >#define quick_dial CUR Strings[281] >#define tone CUR Strings[282] >#define pulse CUR Strings[283] >#define flash_hook CUR Strings[284] >#define fixed_pause CUR Strings[285] >#define wait_tone CUR Strings[286] >#define user0 CUR Strings[287] >#define user1 CUR Strings[288] >#define user2 CUR Strings[289] >#define user3 CUR Strings[290] >#define user4 CUR Strings[291] >#define user5 CUR Strings[292] >#define user6 CUR Strings[293] >#define user7 CUR Strings[294] >#define user8 CUR Strings[295] >#define user9 CUR Strings[296] >#define orig_pair CUR Strings[297] >#define orig_colors CUR Strings[298] >#define initialize_color CUR Strings[299] >#define initialize_pair CUR Strings[300] >#define set_color_pair CUR Strings[301] >#define set_foreground CUR Strings[302] >#define set_background CUR Strings[303] >#define change_char_pitch CUR Strings[304] >#define change_line_pitch CUR Strings[305] >#define change_res_horz CUR Strings[306] >#define change_res_vert CUR Strings[307] >#define define_char CUR Strings[308] >#define enter_doublewide_mode CUR Strings[309] >#define enter_draft_quality CUR Strings[310] >#define enter_italics_mode CUR Strings[311] >#define enter_leftward_mode CUR Strings[312] >#define enter_micro_mode CUR Strings[313] >#define enter_near_letter_quality CUR Strings[314] >#define enter_normal_quality CUR Strings[315] >#define enter_shadow_mode CUR Strings[316] >#define enter_subscript_mode CUR Strings[317] >#define enter_superscript_mode CUR Strings[318] >#define enter_upward_mode CUR Strings[319] >#define exit_doublewide_mode CUR Strings[320] >#define exit_italics_mode CUR Strings[321] >#define exit_leftward_mode CUR Strings[322] >#define exit_micro_mode CUR Strings[323] >#define exit_shadow_mode CUR Strings[324] >#define exit_subscript_mode CUR Strings[325] >#define exit_superscript_mode CUR Strings[326] >#define exit_upward_mode CUR Strings[327] >#define micro_column_address CUR Strings[328] >#define micro_down CUR Strings[329] >#define micro_left CUR Strings[330] >#define micro_right CUR Strings[331] >#define micro_row_address CUR Strings[332] >#define micro_up CUR Strings[333] >#define order_of_pins CUR Strings[334] >#define parm_down_micro CUR Strings[335] >#define parm_left_micro CUR Strings[336] >#define parm_right_micro CUR Strings[337] >#define parm_up_micro CUR Strings[338] >#define select_char_set CUR Strings[339] >#define set_bottom_margin CUR Strings[340] >#define set_bottom_margin_parm CUR Strings[341] >#define set_left_margin_parm CUR Strings[342] >#define set_right_margin_parm CUR Strings[343] >#define set_top_margin CUR Strings[344] >#define set_top_margin_parm CUR Strings[345] >#define start_bit_image CUR Strings[346] >#define start_char_set_def CUR Strings[347] >#define stop_bit_image CUR Strings[348] >#define stop_char_set_def CUR Strings[349] >#define subscript_characters CUR Strings[350] >#define superscript_characters CUR Strings[351] >#define these_cause_cr CUR Strings[352] >#define zero_motion CUR Strings[353] >#define char_set_names CUR Strings[354] >#define key_mouse CUR Strings[355] >#define mouse_info CUR Strings[356] >#define req_mouse_pos CUR Strings[357] >#define get_mouse CUR Strings[358] >#define set_a_foreground CUR Strings[359] >#define set_a_background CUR Strings[360] >#define pkey_plab CUR Strings[361] >#define device_type CUR Strings[362] >#define code_set_init CUR Strings[363] >#define set0_des_seq CUR Strings[364] >#define set1_des_seq CUR Strings[365] >#define set2_des_seq CUR Strings[366] >#define set3_des_seq CUR Strings[367] >#define set_lr_margin CUR Strings[368] >#define set_tb_margin CUR Strings[369] >#define bit_image_repeat CUR Strings[370] >#define bit_image_newline CUR Strings[371] >#define bit_image_carriage_return CUR Strings[372] >#define color_names CUR Strings[373] >#define define_bit_image_region CUR Strings[374] >#define end_bit_image_region CUR Strings[375] >#define set_color_band CUR Strings[376] >#define set_page_length CUR Strings[377] >#define display_pc_char CUR Strings[378] >#define enter_pc_charset_mode CUR Strings[379] >#define exit_pc_charset_mode CUR Strings[380] >#define enter_scancode_mode CUR Strings[381] >#define exit_scancode_mode CUR Strings[382] >#define pc_term_options CUR Strings[383] >#define scancode_escape CUR Strings[384] >#define alt_scancode_esc CUR Strings[385] >#define enter_horizontal_hl_mode CUR Strings[386] >#define enter_left_hl_mode CUR Strings[387] >#define enter_low_hl_mode CUR Strings[388] >#define enter_right_hl_mode CUR Strings[389] >#define enter_top_hl_mode CUR Strings[390] >#define enter_vertical_hl_mode CUR Strings[391] >#define set_a_attributes CUR Strings[392] >#define set_pglen_inch CUR Strings[393] > >#define BOOLWRITE 37 >#define NUMWRITE 33 >#define STRWRITE 394 > >/* older synonyms for some capabilities */ >#define beehive_glitch no_esc_ctlc >#define teleray_glitch dest_tabs_magic_smso >#define micro_char_size micro_col_size > >#ifdef __INTERNAL_CAPS_VISIBLE >#define termcap_init2 CUR Strings[394] >#define termcap_reset CUR Strings[395] >#define magic_cookie_glitch_ul CUR Numbers[33] >#define backspaces_with_bs CUR Booleans[37] >#define crt_no_scrolling CUR Booleans[38] >#define no_correctly_working_cr CUR Booleans[39] >#define carriage_return_delay CUR Numbers[34] >#define new_line_delay CUR Numbers[35] >#define linefeed_if_not_lf CUR Strings[396] >#define backspace_if_not_bs CUR Strings[397] >#define gnu_has_meta_key CUR Booleans[40] >#define linefeed_is_newline CUR Booleans[41] >#define backspace_delay CUR Numbers[36] >#define horizontal_tab_delay CUR Numbers[37] >#define number_of_function_keys CUR Numbers[38] >#define other_non_function_keys CUR Strings[398] >#define arrow_key_map CUR Strings[399] >#define has_hardware_tabs CUR Booleans[42] >#define return_does_clr_eol CUR Booleans[43] >#define acs_ulcorner CUR Strings[400] >#define acs_llcorner CUR Strings[401] >#define acs_urcorner CUR Strings[402] >#define acs_lrcorner CUR Strings[403] >#define acs_ltee CUR Strings[404] >#define acs_rtee CUR Strings[405] >#define acs_btee CUR Strings[406] >#define acs_ttee CUR Strings[407] >#define acs_hline CUR Strings[408] >#define acs_vline CUR Strings[409] >#define acs_plus CUR Strings[410] >#define memory_lock CUR Strings[411] >#define memory_unlock CUR Strings[412] >#define box_chars_1 CUR Strings[413] >#endif /* __INTERNAL_CAPS_VISIBLE */ ># 636 "./term.h" > > >/* > * Predefined terminfo array sizes > */ >#define BOOLCOUNT 44 >#define NUMCOUNT 39 >#define STRCOUNT 414 > >/* used by code for comparing entries */ >#define acs_chars_index 146 > >typedef struct termtype { /* in-core form of terminfo data */ > char *term_names; /* str_table offset of term names */ > char *str_table; /* pointer to string table */ > NCURSES_SBOOL *Booleans; /* array of boolean values */ > short *Numbers; /* array of integer values */ > char **Strings; /* array of string offsets */ > >#if NCURSES_XNAMES > char *ext_str_table; /* pointer to extended string table */ > char **ext_Names; /* corresponding names */ > > unsigned short num_Booleans;/* count total Booleans */ > unsigned short num_Numbers; /* count total Numbers */ > unsigned short num_Strings; /* count total Strings */ > > unsigned short ext_Booleans;/* count extensions to Booleans */ > unsigned short ext_Numbers; /* count extensions to Numbers */ > unsigned short ext_Strings; /* count extensions to Strings */ >#endif /* NCURSES_XNAMES */ ># 667 "./term.h" > >} TERMTYPE; > >typedef struct term { /* describe an actual terminal */ > TERMTYPE type; /* terminal type description */ > short Filedes; /* file description being written to */ > TTY Ottyb, /* original state of the terminal */ > Nttyb; /* current state of the terminal */ > int _baudrate; /* used to compute padding */ > char * _termname; /* used for termname() */ >} TERMINAL; > >#if 0 && !0 >extern NCURSES_EXPORT_VAR(TERMINAL *) cur_term; >#elif 0 ># 682 "./term.h" >NCURSES_WRAPPED_VAR(TERMINAL *, cur_term); >#define cur_term NCURSES_PUBLIC_VAR(cur_term()) >#else ># 685 "./term.h" >extern NCURSES_EXPORT_VAR(TERMINAL *) cur_term; >#endif ># 687 "./term.h" > >#if 0 || 0 >NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolnames); >NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolcodes); >NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolfnames); >NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, numnames); >NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, numcodes); >NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, numfnames); >NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, strnames); >NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, strcodes); >NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, strfnames); > >#define boolnames NCURSES_PUBLIC_VAR(boolnames()) >#define boolcodes NCURSES_PUBLIC_VAR(boolcodes()) >#define boolfnames NCURSES_PUBLIC_VAR(boolfnames()) >#define numnames NCURSES_PUBLIC_VAR(numnames()) >#define numcodes NCURSES_PUBLIC_VAR(numcodes()) >#define numfnames NCURSES_PUBLIC_VAR(numfnames()) >#define strnames NCURSES_PUBLIC_VAR(strnames()) >#define strcodes NCURSES_PUBLIC_VAR(strcodes()) >#define strfnames NCURSES_PUBLIC_VAR(strfnames()) > >#else ># 710 "./term.h" > >extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolnames[]; >extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolcodes[]; >extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolfnames[]; >extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) numnames[]; >extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) numcodes[]; >extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) numfnames[]; >extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strnames[]; >extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strcodes[]; >extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strfnames[]; > >#endif ># 722 "./term.h" > >/* internals */ >extern NCURSES_EXPORT(int) _nc_set_tty_mode (TTY *buf); >extern NCURSES_EXPORT(int) _nc_get_tty_mode (TTY *buf); >extern NCURSES_EXPORT(int) _nc_read_entry (const char * const, char * const, TERMTYPE *const); >extern NCURSES_EXPORT(int) _nc_read_file_entry (const char *const, TERMTYPE *); >extern NCURSES_EXPORT(void) _nc_init_termtype (TERMTYPE *const); >extern NCURSES_EXPORT(int) _nc_read_termtype (TERMTYPE *, char *, int); >extern NCURSES_EXPORT(char *) _nc_first_name (const char *const); >extern NCURSES_EXPORT(int) _nc_name_match (const char *const, const char *const, const char *const); >extern NCURSES_EXPORT(const TERMTYPE *) _nc_fallback (const char *); > >/* entry points */ >extern NCURSES_EXPORT(TERMINAL *) set_curterm (TERMINAL *); >extern NCURSES_EXPORT(int) del_curterm (TERMINAL *); > >/* miscellaneous entry points */ >extern NCURSES_EXPORT(int) restartterm (NCURSES_CONST char *, int, int *); >extern NCURSES_EXPORT(int) setupterm (NCURSES_CONST char *,int,int *); > >/* terminfo entry points, also declared in curses.h */ >#if !defined(__NCURSES_H) >extern NCURSES_EXPORT(char *) tigetstr (NCURSES_CONST char *); >extern NCURSES_EXPORT_VAR(char) ttytype[]; >extern NCURSES_EXPORT(int) putp (const char *); >extern NCURSES_EXPORT(int) tigetflag (NCURSES_CONST char *); >extern NCURSES_EXPORT(int) tigetnum (NCURSES_CONST char *); > >#if 1 /* NCURSES_TPARM_VARARGS */ >extern NCURSES_EXPORT(char *) tparm (NCURSES_CONST char *, ...); /* special */ >#else ># 753 "./term.h" >extern NCURSES_EXPORT(char *) tparm (NCURSES_CONST char *, long,long,long,long,long,long,long,long,long); /* special */ >extern NCURSES_EXPORT(char *) tparm_varargs (NCURSES_CONST char *, ...); /* special */ >#endif ># 756 "./term.h" > >extern NCURSES_EXPORT(char *) tiparm (const char *, ...); /* special */ > >#endif /* __NCURSES_H */ ># 760 "./term.h" > >/* termcap database emulation (XPG4 uses const only for 2nd param of tgetent) */ >#if !defined(NCURSES_TERMCAP_H_incl) >extern NCURSES_EXPORT(char *) tgetstr (NCURSES_CONST char *, char **); >extern NCURSES_EXPORT(char *) tgoto (const char *, int, int); >extern NCURSES_EXPORT(int) tgetent (char *, const char *); >extern NCURSES_EXPORT(int) tgetflag (NCURSES_CONST char *); >extern NCURSES_EXPORT(int) tgetnum (NCURSES_CONST char *); >extern NCURSES_EXPORT(int) tputs (const char *, int, int (*)(int)); >#endif /* NCURSES_TERMCAP_H_incl */ ># 770 "./term.h" > >/* > * Include curses.h before term.h to enable these extensions. > */ >#if defined(NCURSES_SP_FUNCS) && (NCURSES_SP_FUNCS != 0) > >extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tigetstr) (SCREEN*, NCURSES_CONST char *); >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(putp) (SCREEN*, const char *); >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tigetflag) (SCREEN*, NCURSES_CONST char *); >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tigetnum) (SCREEN*, NCURSES_CONST char *); > >#if 1 /* NCURSES_TPARM_VARARGS */ >extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tparm) (SCREEN*, NCURSES_CONST char *, ...); /* special */ >#else ># 784 "./term.h" >extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tparm) (SCREEN*, NCURSES_CONST char *, long,long,long,long,long,long,long,long,long); /* special */ >extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tparm_varargs) (SCREEN*, NCURSES_CONST char *, ...); /* special */ >#endif ># 787 "./term.h" > >/* termcap database emulation (XPG4 uses const only for 2nd param of tgetent) */ >extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tgetstr) (SCREEN*, NCURSES_CONST char *, char **); >extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tgoto) (SCREEN*, const char *, int, int); >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tgetent) (SCREEN*, char *, const char *); >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tgetflag) (SCREEN*, NCURSES_CONST char *); >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tgetnum) (SCREEN*, NCURSES_CONST char *); >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tputs) (SCREEN*, const char *, int, NCURSES_SP_OUTC); > >extern NCURSES_EXPORT(TERMINAL *) NCURSES_SP_NAME(set_curterm) (SCREEN*, TERMINAL *); >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(del_curterm) (SCREEN*, TERMINAL *); > >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(restartterm) (SCREEN*, NCURSES_CONST char *, int, int *); >#endif /* NCURSES_SP_FUNCS */ ># 801 "./term.h" > >#ifdef __cplusplus >} >#endif ># 805 "./term.h" > >#endif /* NCURSES_TERM_H_incl */ ># 807 "./term.h" ># 366 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" 2 >#if 0 /* expanded by -frewrite-includes */ >#include <nc_termios.h> >#endif /* expanded by -frewrite-includes */ ># 366 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" ># 1 "/usr/src/contrib/ncurses/include/nc_termios.h" 1 >/**************************************************************************** > * Copyright (c) 2011 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 2011 * > ****************************************************************************/ > >/* $Id: nc_termios.h,v 1.2 2011/06/25 20:44:05 tom Exp $ */ > >#ifndef NC_TERMIOS_included >#define NC_TERMIOS_included 1 > >#if HAVE_TERMIOS_H && HAVE_TCGETATTR > >#else /* !HAVE_TERMIOS_H */ ># 41 "/usr/src/contrib/ncurses/include/nc_termios.h" > >#if HAVE_TERMIO_H > >/* Add definitions to make termio look like termios. > * But ifdef it, since there are some implementations > * that try to do this for us in a fake <termio.h>. > */ >#ifndef TCSADRAIN >#define TCSADRAIN TCSETAW >#endif ># 51 "/usr/src/contrib/ncurses/include/nc_termios.h" >#ifndef TCSAFLUSH >#define TCSAFLUSH TCSETAF >#endif ># 54 "/usr/src/contrib/ncurses/include/nc_termios.h" >#ifndef tcsetattr >#define tcsetattr(fd, cmd, arg) ioctl(fd, cmd, arg) >#endif ># 57 "/usr/src/contrib/ncurses/include/nc_termios.h" >#ifndef tcgetattr >#define tcgetattr(fd, arg) ioctl(fd, TCGETA, arg) >#endif ># 60 "/usr/src/contrib/ncurses/include/nc_termios.h" >#ifndef cfgetospeed >#define cfgetospeed(t) ((t)->c_cflag & CBAUD) >#endif ># 63 "/usr/src/contrib/ncurses/include/nc_termios.h" >#ifndef TCIFLUSH >#define TCIFLUSH 0 >#endif ># 66 "/usr/src/contrib/ncurses/include/nc_termios.h" >#ifndef tcflush >#define tcflush(fd, arg) ioctl(fd, TCFLSH, arg) >#endif ># 69 "/usr/src/contrib/ncurses/include/nc_termios.h" > >#else /* !HAVE_TERMIO_H */ ># 71 "/usr/src/contrib/ncurses/include/nc_termios.h" > >#if __MINGW32__ > >/* 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 > >#ifndef cfgetospeed >#define cfgetospeed(t) ((t)->c_cflag & CBAUD) >#endif ># 148 "/usr/src/contrib/ncurses/include/nc_termios.h" > >#ifndef tcsetattr >#define tcsetattr(fd, cmd, arg) _nc_mingw_ioctl(fd, cmd, arg) >#endif ># 152 "/usr/src/contrib/ncurses/include/nc_termios.h" > >#ifndef tcgetattr >#define tcgetattr(fd, arg) _nc_mingw_ioctl(fd, TCGETA, arg) >#endif ># 156 "/usr/src/contrib/ncurses/include/nc_termios.h" > >#ifndef tcflush >#define tcflush(fd, arg) _nc_mingw_ioctl(fd, TCFLSH, arg) >#endif ># 160 "/usr/src/contrib/ncurses/include/nc_termios.h" > >#undef ttyname >#define ttyname(fd) NULL > >#else ># 165 "/usr/src/contrib/ncurses/include/nc_termios.h" > >#endif /* __MINGW32__ */ ># 167 "/usr/src/contrib/ncurses/include/nc_termios.h" >#endif /* HAVE_TERMIO_H */ ># 168 "/usr/src/contrib/ncurses/include/nc_termios.h" > >#endif /* HAVE_TERMIOS_H */ ># 170 "/usr/src/contrib/ncurses/include/nc_termios.h" > >#endif /* NC_TERMIOS_included */ ># 172 "/usr/src/contrib/ncurses/include/nc_termios.h" ># 367 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" 2 > >/* > * Reduce dependency on cur_term global by using terminfo data from SCREEN's > * pointer to this data. > */ >#ifdef USE_SP_TERMTYPE >#undef CUR >#endif ># 375 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#define SP_TERMTYPE TerminalOf(sp)->type. > >#if 0 /* expanded by -frewrite-includes */ >#include <term_entry.h> >#endif /* expanded by -frewrite-includes */ ># 378 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" ># 1 "/usr/src/contrib/ncurses/include/term_entry.h" 1 >/**************************************************************************** > * Copyright (c) 1998-2012,2013 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: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 * > * and: Eric S. Raymond <esr@snark.thyrsus.com> * > * and: Thomas E. Dickey 1998-on * > ****************************************************************************/ > >/* $Id: term_entry.h,v 1.44 2013/05/25 20:13:38 tom Exp $ */ > >/* > * term_entry.h -- interface to entry-manipulation code > */ > >#ifndef NCURSES_TERM_ENTRY_H_incl >#define NCURSES_TERM_ENTRY_H_incl 1 > >#ifdef __cplusplus >extern "C" { >#endif ># 47 "/usr/src/contrib/ncurses/include/term_entry.h" > >#if 0 /* expanded by -frewrite-includes */ >#include <term.h> >#endif /* expanded by -frewrite-includes */ ># 48 "/usr/src/contrib/ncurses/include/term_entry.h" ># 49 "/usr/src/contrib/ncurses/include/term_entry.h" > > /* > * see db_iterator.c - this enumeration lists the places searched for a > * terminal description and defines the order in which they are searched. > */ > typedef enum { > dbdTIC = 0, /* special, used by tic when writing entry */ >#if NCURSES_USE_DATABASE > dbdEnvOnce, /* the $TERMINFO environment variable */ > dbdHome, /* $HOME/.terminfo */ > dbdEnvList, /* the $TERMINFO_DIRS environment variable */ > dbdCfgList, /* the compiled-in TERMINFO_DIRS value */ > dbdCfgOnce, /* the compiled-in TERMINFO value */ >#endif ># 63 "/usr/src/contrib/ncurses/include/term_entry.h" >#if NCURSES_USE_TERMCAP > dbdEnvOnce2, /* the $TERMCAP environment variable */ > dbdEnvList2, /* the $TERMPATH environment variable */ > dbdCfgList2, /* the compiled-in TERMPATH */ >#endif ># 68 "/usr/src/contrib/ncurses/include/term_entry.h" > dbdLAST > } DBDIRS; > >#define MAX_USES 32 >#define MAX_CROSSLINKS 16 > > typedef struct entry { > TERMTYPE tterm; > unsigned nuses; > struct { > char *name; > struct entry *link; > long line; > } uses[MAX_USES]; > int ncrosslinks; > struct entry *crosslinks[MAX_CROSSLINKS]; > long cstart, cend; > long startline; > struct entry *next; > struct entry *last; > } ENTRY; >/* *INDENT-OFF* */ >#if NCURSES_XNAMES >#define NUM_BOOLEANS(tp) (tp)->num_Booleans >#define NUM_NUMBERS(tp) (tp)->num_Numbers >#define NUM_STRINGS(tp) (tp)->num_Strings >#define EXT_NAMES(tp,i,limit,index,table) (i >= limit) ? tp->ext_Names[index] : table[i] >#else ># 96 "/usr/src/contrib/ncurses/include/term_entry.h" >#define NUM_BOOLEANS(tp) BOOLCOUNT >#define NUM_NUMBERS(tp) NUMCOUNT >#define NUM_STRINGS(tp) STRCOUNT >#define EXT_NAMES(tp,i,limit,index,table) table[i] >#endif ># 101 "/usr/src/contrib/ncurses/include/term_entry.h" > >#define NUM_EXT_NAMES(tp) (unsigned) ((tp)->ext_Booleans + (tp)->ext_Numbers + (tp)->ext_Strings) > >#define for_each_boolean(n,tp) for(n = 0; n < NUM_BOOLEANS(tp); n++) >#define for_each_number(n,tp) for(n = 0; n < NUM_NUMBERS(tp); n++) >#define for_each_string(n,tp) for(n = 0; n < NUM_STRINGS(tp); n++) > >#if NCURSES_XNAMES >#define for_each_ext_boolean(n,tp) for(n = BOOLCOUNT; n < NUM_BOOLEANS(tp); n++) >#define for_each_ext_number(n,tp) for(n = NUMCOUNT; n < NUM_NUMBERS(tp); n++) >#define for_each_ext_string(n,tp) for(n = STRCOUNT; n < NUM_STRINGS(tp); n++) >#endif ># 113 "/usr/src/contrib/ncurses/include/term_entry.h" > >#define ExtBoolname(tp,i,names) EXT_NAMES(tp, i, BOOLCOUNT, (i - (tp->num_Booleans - tp->ext_Booleans)), names) >#define ExtNumname(tp,i,names) EXT_NAMES(tp, i, NUMCOUNT, (i - (tp->num_Numbers - tp->ext_Numbers)) + tp->ext_Booleans, names) >#define ExtStrname(tp,i,names) EXT_NAMES(tp, i, STRCOUNT, (i - (tp->num_Strings - tp->ext_Strings)) + (tp->ext_Numbers + tp->ext_Booleans), names) > >extern NCURSES_EXPORT_VAR(ENTRY *) _nc_head; >extern NCURSES_EXPORT_VAR(ENTRY *) _nc_tail; >#define for_entry_list(qp) for (qp = _nc_head; qp; qp = qp->next) > >#define MAX_LINE 132 > >#define NULLHOOK (bool(*)(ENTRY *))0 > >/* > * Note that WANTED and PRESENT are not simple inverses! If a capability > * has been explicitly cancelled, it's not considered WANTED. > */ >#define WANTED(s) ((s) == ABSENT_STRING) >#define PRESENT(s) (((s) != ABSENT_STRING) && ((s) != CANCELLED_STRING)) > >#define ANDMISSING(p,q) \ > {if (PRESENT(p) && !PRESENT(q)) _nc_warning(#p " but no " #q);} > >#define PAIRED(p,q) \ > { \ > if (PRESENT(q) && !PRESENT(p)) \ > _nc_warning(#q " but no " #p); \ > if (PRESENT(p) && !PRESENT(q)) \ > _nc_warning(#p " but no " #q); \ > } > >/* alloc_entry.c: elementary allocation code */ >extern NCURSES_EXPORT(ENTRY *) _nc_copy_entry (ENTRY *oldp); >extern NCURSES_EXPORT(char *) _nc_save_str (const char *const); >extern NCURSES_EXPORT(void) _nc_init_entry (TERMTYPE *const); >extern NCURSES_EXPORT(void) _nc_merge_entry (TERMTYPE *const, TERMTYPE *const); >extern NCURSES_EXPORT(void) _nc_wrap_entry (ENTRY *const, bool); > >/* alloc_ttype.c: elementary allocation code */ >extern NCURSES_EXPORT(void) _nc_align_termtype (TERMTYPE *, TERMTYPE *); >extern NCURSES_EXPORT(void) _nc_copy_termtype (TERMTYPE *, const TERMTYPE *); > >/* free_ttype.c: elementary allocation code */ >extern NCURSES_EXPORT(void) _nc_free_termtype (TERMTYPE *); > >/* lib_acs.c */ >extern NCURSES_EXPORT(void) _nc_init_acs (void); /* corresponds to traditional 'init_acs()' */ > >/* lib_termcap.c: trim sgr0 string for termcap users */ >extern NCURSES_EXPORT(char *) _nc_trim_sgr0 (TERMTYPE *); > >/* parse_entry.c: entry-parsing code */ >#if NCURSES_XNAMES >extern NCURSES_EXPORT_VAR(bool) _nc_user_definable; >extern NCURSES_EXPORT_VAR(bool) _nc_disable_period; >#endif ># 169 "/usr/src/contrib/ncurses/include/term_entry.h" >extern NCURSES_EXPORT(int) _nc_parse_entry (ENTRY *, int, bool); >extern NCURSES_EXPORT(int) _nc_capcmp (const char *, const char *); > >/* write_entry.c: writing an entry to the file system */ >extern NCURSES_EXPORT(void) _nc_set_writedir (char *); >extern NCURSES_EXPORT(void) _nc_write_entry (TERMTYPE *const); > >/* comp_parse.c: entry list handling */ >extern NCURSES_EXPORT(void) _nc_read_entry_source (FILE*, char*, int, bool, bool (*)(ENTRY*)); >extern NCURSES_EXPORT(bool) _nc_entry_match (char *, char *); >extern NCURSES_EXPORT(int) _nc_resolve_uses (bool); /* obs 20040705 */ >extern NCURSES_EXPORT(int) _nc_resolve_uses2 (bool, bool); >extern NCURSES_EXPORT(void) _nc_free_entries (ENTRY *); >extern NCURSES_IMPEXP void NCURSES_API (*_nc_check_termtype)(TERMTYPE *); /* obs 20040705 */ >extern NCURSES_IMPEXP void NCURSES_API (*_nc_check_termtype2)(TERMTYPE *, bool); > >/* trace_xnames.c */ >extern NCURSES_EXPORT(void) _nc_trace_xnames (TERMTYPE *); >/* *INDENT-ON* */ > >#ifdef __cplusplus >} >#endif ># 192 "/usr/src/contrib/ncurses/include/term_entry.h" >#endif /* NCURSES_TERM_ENTRY_H_incl */ ># 193 "/usr/src/contrib/ncurses/include/term_entry.h" ># 379 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" 2 > >#if 0 /* expanded by -frewrite-includes */ >#include <nc_tparm.h> >#endif /* expanded by -frewrite-includes */ ># 380 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" ># 1 "/usr/src/contrib/ncurses/include/nc_tparm.h" 1 >/**************************************************************************** > * Copyright (c) 2006-2010,2012 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 2006 * > ****************************************************************************/ > >/* $Id: nc_tparm.h,v 1.6 2012/02/18 21:34:42 tom Exp $ */ > >#ifndef NC_TPARM_included >#define NC_TPARM_included 1 > >/* > * Cast parameters past the formatting-string for tparm() to match the > * assumption of the varargs code. > */ >#ifndef TPARM_ARG >#ifdef NCURSES_TPARM_ARG >#define TPARM_ARG NCURSES_TPARM_ARG >#else ># 46 "/usr/src/contrib/ncurses/include/nc_tparm.h" >#define TPARM_ARG long >#endif ># 48 "/usr/src/contrib/ncurses/include/nc_tparm.h" >#endif /* TPARAM_ARG */ ># 49 "/usr/src/contrib/ncurses/include/nc_tparm.h" > >#define TPARM_N(n) (TPARM_ARG)(n) > >#define TPARM_9(a,b,c,d,e,f,g,h,i,j) tparm(a,TPARM_N(b),TPARM_N(c),TPARM_N(d),TPARM_N(e),TPARM_N(f),TPARM_N(g),TPARM_N(h),TPARM_N(i),TPARM_N(j)) > >#if NCURSES_TPARM_VARARGS >#define TPARM_8(a,b,c,d,e,f,g,h,i) tparm(a,TPARM_N(b),TPARM_N(c),TPARM_N(d),TPARM_N(e),TPARM_N(f),TPARM_N(g),TPARM_N(h),TPARM_N(i)) >#define TPARM_7(a,b,c,d,e,f,g,h) tparm(a,TPARM_N(b),TPARM_N(c),TPARM_N(d),TPARM_N(e),TPARM_N(f),TPARM_N(g),TPARM_N(h)) >#define TPARM_6(a,b,c,d,e,f,g) tparm(a,TPARM_N(b),TPARM_N(c),TPARM_N(d),TPARM_N(e),TPARM_N(f),TPARM_N(g)) >#define TPARM_5(a,b,c,d,e,f) tparm(a,TPARM_N(b),TPARM_N(c),TPARM_N(d),TPARM_N(e),TPARM_N(f)) >#define TPARM_4(a,b,c,d,e) tparm(a,TPARM_N(b),TPARM_N(c),TPARM_N(d),TPARM_N(e)) >#define TPARM_3(a,b,c,d) tparm(a,TPARM_N(b),TPARM_N(c),TPARM_N(d)) >#define TPARM_2(a,b,c) tparm(a,TPARM_N(b),TPARM_N(c)) >#define TPARM_1(a,b) tparm(a,TPARM_N(b)) >#define TPARM_0(a) tparm(a) >#else ># 65 "/usr/src/contrib/ncurses/include/nc_tparm.h" >#define TPARM_8(a,b,c,d,e,f,g,h,i) TPARM_9(a,b,c,d,e,f,g,h,i,0) >#define TPARM_7(a,b,c,d,e,f,g,h) TPARM_8(a,b,c,d,e,f,g,h,0) >#define TPARM_6(a,b,c,d,e,f,g) TPARM_7(a,b,c,d,e,f,g,0) >#define TPARM_5(a,b,c,d,e,f) TPARM_6(a,b,c,d,e,f,0) >#define TPARM_4(a,b,c,d,e) TPARM_5(a,b,c,d,e,0) >#define TPARM_3(a,b,c,d) TPARM_4(a,b,c,d,0) >#define TPARM_2(a,b,c) TPARM_3(a,b,c,0) >#define TPARM_1(a,b) TPARM_2(a,b,0) >#define TPARM_1(a,b) TPARM_2(a,b,0) >#define TPARM_0(a) TPARM_1(a,0) >#endif ># 76 "/usr/src/contrib/ncurses/include/nc_tparm.h" > >#endif /* NC_TPARM_included */ ># 78 "/usr/src/contrib/ncurses/include/nc_tparm.h" ># 381 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" 2 > >/* > * Simplify ifdef's for the "*_ATTR" macros in case italics are not configured. > */ >#ifdef A_ITALIC >#define USE_ITALIC 1 >#else ># 388 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#define USE_ITALIC 0 >#define A_ITALIC 0 >#endif ># 391 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >/* > * Use these macros internally, to make tracing less verbose. But leave the > * option for compiling the tracing into the library. > */ >#if 1 >#define ColorPair(n) NCURSES_BITS(n, 0) >#define PairNumber(a) (NCURSES_CAST(int,(((unsigned long)(a) & A_COLOR) >> NCURSES_ATTR_SHIFT))) >#else ># 400 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#define ColorPair(pair) COLOR_PAIR(pair) >#define PairNumber(attr) PAIR_NUMBER(attr) >#endif ># 403 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#define unColor(n) unColor2(AttrOf(n)) >#define unColor2(a) ((a) & ALL_BUT_COLOR) > >/* > * Extended-colors stores the color pair in a separate struct-member than the > * attributes. But for compatibility, we handle most cases where a program > * written for non-extended colors stores the color in the attributes by > * checking for a color pair in both places. > */ >#if NCURSES_EXT_COLORS >#define if_EXT_COLORS(stmt) stmt >#define SetPair(value,p) SetPair2((value).ext_color, AttrOf(value), p) >#define SetPair2(c,a,p) c = (p), \ > a = (unColor2(a) | (A_COLOR & (unsigned) ColorPair(oldColor(c)))) >#define GetPair(value) GetPair2((value).ext_color, AttrOf(value)) >#define GetPair2(c,a) ((c) ? (c) : PairNumber(a)) >#define oldColor(p) (((p) > 255) ? 255 : (p)) >#define GET_WINDOW_PAIR(w) GetPair2((w)->_color, (w)->_attrs) >#define SET_WINDOW_PAIR(w,p) (w)->_color = (p) >#define SameAttrOf(a,b) (AttrOf(a) == AttrOf(b) && GetPair(a) == GetPair(b)) > >#define VIDATTR(sp,attr,pair) NCURSES_SP_NAME(vid_puts)(NCURSES_SP_ARGx attr, (short) pair, 0, NCURSES_OUTC_FUNC) > >#else /* !NCURSES_EXT_COLORS */ ># 428 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#define if_EXT_COLORS(stmt) /* nothing */ >#define SetPair(value,p) RemAttr(value, A_COLOR), \ > SetAttr(value, AttrOf(value) | (A_COLOR & (attr_t) ColorPair(p))) >#define GetPair(value) PairNumber(AttrOf(value)) >#define GET_WINDOW_PAIR(w) PairNumber(WINDOW_ATTRS(w)) >#define SET_WINDOW_PAIR(w,p) WINDOW_ATTRS(w) &= ALL_BUT_COLOR, \ > WINDOW_ATTRS(w) |= (A_COLOR & (attr_t) ColorPair(p)) >#define SameAttrOf(a,b) (AttrOf(a) == AttrOf(b)) > >#define VIDATTR(sp,attr,pair) NCURSES_SP_NAME(vidputs)(NCURSES_SP_ARGx attr, NCURSES_OUTC_FUNC) > >#endif /* NCURSES_EXT_COLORS */ ># 441 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#define NCURSES_OUTC_FUNC NCURSES_SP_NAME(_nc_outch) >#define NCURSES_PUTP2(name,value) NCURSES_SP_NAME(_nc_putp)(NCURSES_SP_ARGx name, value) >#define NCURSES_PUTP2_FLUSH(name,value) NCURSES_SP_NAME(_nc_putp_flush)(NCURSES_SP_ARGx name, value) > >#if NCURSES_NO_PADDING >#define GetNoPadding(sp) ((sp) ? (sp)->_no_padding : _nc_prescreen._no_padding) >#define SetNoPadding(sp) _nc_set_no_padding(sp) >extern NCURSES_EXPORT(void) _nc_set_no_padding(SCREEN *); >#else ># 451 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#define GetNoPadding(sp) FALSE >#define SetNoPadding(sp) /*nothing*/ >#endif ># 454 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#define WINDOW_ATTRS(w) ((w)->_attrs) > >#define SCREEN_ATTRS(s) (*((s)->_current_attr)) >#define GET_SCREEN_PAIR(s) GetPair(SCREEN_ATTRS(s)) >#define SET_SCREEN_PAIR(s,p) SetPair(SCREEN_ATTRS(s), p) > >#if USE_REENTRANT || NCURSES_SP_FUNCS >NCURSES_EXPORT(int *) _nc_ptr_Lines (SCREEN *); >NCURSES_EXPORT(int *) _nc_ptr_Cols (SCREEN *); >NCURSES_EXPORT(int *) _nc_ptr_Tabsize (SCREEN *); >NCURSES_EXPORT(int *) _nc_ptr_Escdelay (SCREEN *); >#endif ># 467 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#if USE_REENTRANT > >#define ptrLines(sp) (sp ? &(sp->_LINES) : &(_nc_prescreen._LINES)) >#define ptrCols(sp) (sp ? &(sp->_COLS) : &(_nc_prescreen._COLS)) >#define ptrTabsize(sp) (sp ? &(sp->_TABSIZE) : &(_nc_prescreen._TABSIZE)) >#define ptrEscdelay(sp) (sp ? &(sp->_ESCDELAY) : &(_nc_prescreen._ESCDELAY)) > >#define SET_LINES(value) *_nc_ptr_Lines(SP_PARM) = value >#define SET_COLS(value) *_nc_ptr_Cols(SP_PARM) = value >#define SET_TABSIZE(value) *_nc_ptr_Tabsize(SP_PARM) = value >#define SET_ESCDELAY(value) *_nc_ptr_Escdelay(SP_PARM) = value > >#else ># 481 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#define ptrLines(sp) &LINES >#define ptrCols(sp) &COLS >#define ptrTabsize(sp) &TABSIZE >#define ptrEscdelay(sp) &ESCDELAY > >#define SET_LINES(value) LINES = value >#define SET_COLS(value) COLS = value >#define SET_TABSIZE(value) TABSIZE = value >#define SET_ESCDELAY(value) ESCDELAY = value > >#endif ># 493 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#define TR_MUTEX(data) _tracef("%s@%d: me:%08lX COUNT:%2u/%2d/%6d/%2d/%s%9u: " #data, \ > __FILE__, __LINE__, \ > (unsigned long) (pthread_self()), \ > data.__data.__lock, \ > data.__data.__count, \ > data.__data.__owner, \ > data.__data.__kind, \ > (data.__data.__nusers > 5) ? " OOPS " : "", \ > data.__data.__nusers) >#define TR_GLOBAL_MUTEX(name) TR_MUTEX(_nc_globals.mutex_##name) > >#if USE_WEAK_SYMBOLS >#if defined(__GNUC__) ># if defined __USE_ISOC99 ># define _cat_pragma(exp) _Pragma(#exp) ># define _weak_pragma(exp) _cat_pragma(weak name) ># else ># 511 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" ># define _weak_pragma(exp) ># endif ># 513 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" ># define _declare(name) __extension__ extern __typeof__(name) name ># define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak)) >#else ># 516 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" ># undef USE_WEAK_SYMBOLS ># define USE_WEAK_SYMBOLS 0 >#endif ># 519 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#endif ># 520 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#ifdef USE_PTHREADS > >#if USE_REENTRANT >#if 0 /* expanded by -frewrite-includes */ >#include <pthread.h> >#endif /* expanded by -frewrite-includes */ ># 524 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" ># 525 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >extern NCURSES_EXPORT(void) _nc_init_pthreads(void); >extern NCURSES_EXPORT(void) _nc_mutex_init(pthread_mutex_t *); >extern NCURSES_EXPORT(int) _nc_mutex_lock(pthread_mutex_t *); >extern NCURSES_EXPORT(int) _nc_mutex_trylock(pthread_mutex_t *); >extern NCURSES_EXPORT(int) _nc_mutex_unlock(pthread_mutex_t *); >#define _nc_lock_global(name) _nc_mutex_lock(&_nc_globals.mutex_##name) >#define _nc_try_global(name) _nc_mutex_trylock(&_nc_globals.mutex_##name) >#define _nc_unlock_global(name) _nc_mutex_unlock(&_nc_globals.mutex_##name) > >#else ># 535 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#error POSIX threads requires --enable-reentrant option >#endif ># 537 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#ifdef USE_PTHREADS ># if USE_WEAK_SYMBOLS >weak_symbol(pthread_sigmask); >weak_symbol(pthread_kill); >weak_symbol(pthread_self); >weak_symbol(pthread_equal); >weak_symbol(pthread_mutex_init); >weak_symbol(pthread_mutex_lock); >weak_symbol(pthread_mutex_unlock); >weak_symbol(pthread_mutex_trylock); >weak_symbol(pthread_mutexattr_settype); >weak_symbol(pthread_mutexattr_init); >extern NCURSES_EXPORT(int) _nc_sigprocmask(int, const sigset_t *, sigset_t *); ># undef sigprocmask ># define sigprocmask _nc_sigprocmask ># endif ># 554 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#endif ># 555 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#if HAVE_NANOSLEEP >#undef HAVE_NANOSLEEP >#define HAVE_NANOSLEEP 0 /* nanosleep suspends all threads */ >#endif ># 560 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#else /* !USE_PTHREADS */ ># 562 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#if USE_PTHREADS_EINTR ># if USE_WEAK_SYMBOLS >#if 0 /* expanded by -frewrite-includes */ >#include <pthread.h> >#endif /* expanded by -frewrite-includes */ ># 565 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" ># 566 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >weak_symbol(pthread_sigmask); >weak_symbol(pthread_kill); >weak_symbol(pthread_self); >weak_symbol(pthread_equal); >extern NCURSES_EXPORT(int) _nc_sigprocmask(int, const sigset_t *, sigset_t *); ># undef sigprocmask ># define sigprocmask _nc_sigprocmask ># endif ># 574 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#endif /* USE_PTHREADS_EINTR */ ># 575 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#define _nc_init_pthreads() /* nothing */ >#define _nc_mutex_init(obj) /* nothing */ > >#define _nc_lock_global(name) /* nothing */ >#define _nc_try_global(name) 0 >#define _nc_unlock_global(name) /* nothing */ > >#endif /* USE_PTHREADS */ ># 584 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >/* > * When using sp-funcs, locks are targeted to SCREEN-level granularity. > * So the locking is done in the non-sp-func (which calls the sp-func) rather > * than in the sp-func itself. > * > * Use the _nc_nonsp_XXX functions in the function using "NCURSES_SP_NAME()". > * Use the _nc_sp_XXX functions in the function using "#if NCURSES_SP_FUNCS". > */ >#if NCURSES_SP_FUNCS > >#define _nc_nonsp_lock_global(name) /* nothing */ >#define _nc_nonsp_try_global(name) 0 >#define _nc_nonsp_unlock_global(name) /* nothing */ > >#define _nc_sp_lock_global(name) _nc_lock_global(name) >#define _nc_sp_try_global(name) _nc_try_global(name) >#define _nc_sp_unlock_global(name) _nc_unlock_global(name) > >#else ># 604 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#define _nc_nonsp_lock_global(name) _nc_lock_global(name) >#define _nc_nonsp_try_global(name) _nc_try_global(name) >#define _nc_nonsp_unlock_global(name) _nc_unlock_global(name) > >#define _nc_sp_lock_global(name) /* nothing */ >#define _nc_sp_try_global(name) 0 >#define _nc_sp_unlock_global(name) /* nothing */ > >#endif ># 614 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#if HAVE_GETTIMEOFDAY ># define PRECISE_GETTIME 1 ># define TimeType struct timeval >#else ># 619 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" ># define PRECISE_GETTIME 0 ># define TimeType time_t >#endif ># 622 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >/* > * Definitions for color pairs > */ >typedef unsigned colorpair_t; /* type big enough to store PAIR_OF() */ >#define C_SHIFT 9 /* we need more bits than there are colors */ >#define C_MASK ((1 << C_SHIFT) - 1) >#define PAIR_OF(fg, bg) (colorpair_t) ((((fg) & C_MASK) << C_SHIFT) | ((bg) & C_MASK)) >#define FORE_OF(c) (((c) >> C_SHIFT) & C_MASK) >#define BACK_OF(c) ((c) & C_MASK) >#define isDefaultColor(c) ((c) >= COLOR_DEFAULT || (c) < 0) > >#define COLOR_DEFAULT C_MASK > >#if defined(USE_BUILD_CC) || (defined(USE_TERMLIB) && !defined(NEED_NCURSES_CH_T)) > >#undef NCURSES_CH_T /* this is not a termlib feature */ >#define NCURSES_CH_T void /* ...but we need a pointer in SCREEN */ > >#endif /* USE_TERMLIB */ ># 642 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#ifndef USE_TERMLIB >struct ldat >{ > NCURSES_CH_T *text; /* text of the line */ > NCURSES_SIZE_T firstchar; /* first changed character in the line */ > NCURSES_SIZE_T lastchar; /* last changed character in the line */ > NCURSES_SIZE_T oldindex; /* index of the line at last update */ >}; >#endif /* USE_TERMLIB */ ># 652 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >typedef enum { > M_XTERM = -1 /* use xterm's mouse tracking? */ > ,M_NONE = 0 /* no mouse device */ >#if USE_GPM_SUPPORT > ,M_GPM /* use GPM */ >#endif ># 659 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#if USE_SYSMOUSE > ,M_SYSMOUSE /* FreeBSD sysmouse on console */ >#endif ># 662 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#ifdef USE_TERM_DRIVER > ,M_TERM_DRIVER /* Win32 console, etc */ >#endif ># 665 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >} MouseType; > >/* > * Structures for scrolling. > */ > >typedef struct { > unsigned long hashval; > int oldcount, newcount; > int oldindex, newindex; >} HASHMAP; > >/* > * Structures for soft labels. > */ > >struct _SLK; > >#if !(defined(USE_TERMLIB) || defined(USE_BUILD_CC)) > >typedef struct >{ > char *ent_text; /* text for the label */ > char *form_text; /* formatted text (left/center/...) */ > int ent_x; /* x coordinate of this field */ > char dirty; /* this label has changed */ > char visible; /* field is visible */ >} slk_ent; > >typedef struct _SLK { > bool dirty; /* all labels have changed */ > bool hidden; /* soft labels are hidden */ > WINDOW *win; > slk_ent *ent; > short maxlab; /* number of available labels */ > short labcnt; /* number of allocated labels */ > short maxlen; /* length of labels */ > NCURSES_CH_T attr; /* soft label attribute */ >} SLK; > >#endif /* USE_TERMLIB */ ># 706 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >typedef struct { > WINDOW *win; /* the window used in the hook */ > int line; /* lines to take, < 0 => from bottom*/ > int (*hook)(WINDOW *, int); /* callback for user */ >} ripoff_t; > >#if USE_GPM_SUPPORT >#undef buttons /* term.h defines this, and gpm uses it! */ >#if 0 /* expanded by -frewrite-includes */ >#include <gpm.h> >#endif /* expanded by -frewrite-includes */ ># 715 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" ># 716 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#if USE_WEAK_SYMBOLS >weak_symbol(Gpm_Wgetch); >#endif ># 719 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#ifdef HAVE_LIBDL >/* link dynamically to GPM */ >typedef int *TYPE_gpm_fd; >typedef int (*TYPE_Gpm_Open) (Gpm_Connect *, int); >typedef int (*TYPE_Gpm_Close) (void); >typedef int (*TYPE_Gpm_GetEvent) (Gpm_Event *); > >#define my_gpm_fd SP_PARM->_mouse_gpm_fd >#define my_Gpm_Open SP_PARM->_mouse_Gpm_Open >#define my_Gpm_Close SP_PARM->_mouse_Gpm_Close >#define my_Gpm_GetEvent SP_PARM->_mouse_Gpm_GetEvent >#else ># 732 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >/* link statically to GPM */ >#define my_gpm_fd &gpm_fd >#define my_Gpm_Open Gpm_Open >#define my_Gpm_Close Gpm_Close >#define my_Gpm_GetEvent Gpm_GetEvent >#endif /* HAVE_LIBDL */ ># 738 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#endif /* USE_GPM_SUPPORT */ ># 739 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >typedef struct { > long sequence; > bool last_used; > char *fix_sgr0; /* this holds the filtered sgr0 string */ > char *last_bufp; /* help with fix_sgr0 leak */ > TERMINAL *last_term; >} TGETENT_CACHE; > >#define TGETENT_MAX 4 > >/* > * State of tparm(). > */ >#define STACKSIZE 20 > >typedef struct { > union { > int num; > char *str; > } data; > bool num_type; >} STACK_FRAME; > >#define NUM_VARS 26 > >typedef struct { >#ifdef TRACE > const char *tname; >#endif ># 769 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > const char *tparam_base; > > STACK_FRAME stack[STACKSIZE]; > int stack_ptr; > > char *out_buff; > size_t out_size; > size_t out_used; > > char *fmt_buff; > size_t fmt_size; > > int dynamic_var[NUM_VARS]; > int static_vars[NUM_VARS]; >} TPARM_STATE; > >typedef struct { > char *text; > size_t size; >} TRACEBUF; > >/* > * The filesystem database normally uses a single-letter for the lower level > * of directories. Use a hexadecimal code for filesystems which do not > * preserve mixed-case names. > */ >#if MIXEDCASE_FILENAMES >#define LEAF_FMT "%c" >#define LEAF_LEN 1 >#else ># 799 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#define LEAF_FMT "%02x" >#define LEAF_LEN 2 >#endif ># 802 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >/* > * TRACEMSE_FMT is no longer than 80 columns, there are 5 numbers that > * could at most have 10 digits, and the mask contains no more than 32 bits > * with each bit representing less than 15 characters. Usually the whole > * string is less than 80 columns, but this buffer size is an absolute > * limit. > */ >#define TRACEMSE_MAX (80 + (5 * 10) + (32 * 15)) >#define TRACEMSE_FMT "id %2d at (%2d, %2d, %2d) state %4lx = {" /* } */ > >#ifdef USE_TERM_DRIVER >struct DriverTCB; /* Terminal Control Block forward declaration */ >#define INIT_TERM_DRIVER() _nc_globals.term_driver = _nc_get_driver >#else ># 817 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#define INIT_TERM_DRIVER() /* nothing */ >#endif ># 819 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >typedef struct { > const char *name; > char *value; >} ITERATOR_VARS; > >/* > * Global data which is not specific to a screen. > */ >typedef struct { > SIG_ATOMIC_T have_sigtstp; > SIG_ATOMIC_T have_sigwinch; > SIG_ATOMIC_T cleanup_nested; > > bool init_signals; > bool init_screen; > > char *comp_sourcename; > char *comp_termtype; > > bool have_tic_directory; > bool keep_tic_directory; > const char *tic_directory; > > char *dbi_list; > int dbi_size; > > char *first_name; > char **keyname_table; > int init_keyname; > > int slk_format; > > char *safeprint_buf; > size_t safeprint_used; > > TGETENT_CACHE tgetent_cache[TGETENT_MAX]; > int tgetent_index; > long tgetent_sequence; > > char *dbd_blob; /* string-heap for dbd_list[] */ > char **dbd_list; /* distinct places to look for data */ > int dbd_size; /* length of dbd_list[] */ > time_t dbd_time; /* cache last updated */ > ITERATOR_VARS dbd_vars[dbdLAST]; > >#ifndef USE_SP_WINDOWLIST > WINDOWLIST *_nc_windowlist; >#define WindowList(sp) _nc_globals._nc_windowlist >#endif ># 869 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#if USE_HOME_TERMINFO > char *home_terminfo; >#endif ># 873 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#if !USE_SAFE_SPRINTF > int safeprint_cols; > int safeprint_rows; >#endif ># 878 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#ifdef USE_TERM_DRIVER > int (*term_driver)(struct DriverTCB*, const char*, int*); >#endif ># 882 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#ifdef TRACE > bool init_trace; > char trace_fname[PATH_MAX]; > int trace_level; > FILE *trace_fp; > > char *tracearg_buf; > size_t tracearg_used; > > TRACEBUF *tracebuf_ptr; > size_t tracebuf_used; > > char tracechr_buf[40]; > > char *tracedmp_buf; > size_t tracedmp_used; > > unsigned char *tracetry_buf; > size_t tracetry_used; > > char traceatr_color_buf[2][80]; > int traceatr_color_sel; > int traceatr_color_last; >#if !defined(USE_PTHREADS) && USE_REENTRANT > int nested_tracef; >#endif ># 909 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#endif /* TRACE */ ># 910 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#ifdef USE_PTHREADS > pthread_mutex_t mutex_curses; > pthread_mutex_t mutex_tst_tracef; > pthread_mutex_t mutex_tracef; > int nested_tracef; > int use_pthreads; >#define _nc_use_pthreads _nc_globals.use_pthreads >#endif ># 919 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#if USE_PTHREADS_EINTR > pthread_t read_thread; /* The reading thread */ >#endif ># 922 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >} NCURSES_GLOBALS; > >extern NCURSES_EXPORT_VAR(NCURSES_GLOBALS) _nc_globals; > >#define N_RIPS 5 > >/* > * Global data which can be swept up into a SCREEN when one is created. > * It may be modified before the next SCREEN is created. > */ >typedef struct { > bool use_env; > bool filter_mode; > attr_t previous_attr; >#ifndef USE_SP_RIPOFF > ripoff_t rippedoff[N_RIPS]; > ripoff_t *rsp; >#endif ># 940 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > TPARM_STATE tparm_state; > TTY *saved_tty; /* savetty/resetty information */ >#if NCURSES_NO_PADDING > bool _no_padding; /* flag to set if padding disabled */ >#endif ># 945 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > NCURSES_SP_OUTC _outch; /* output handler if not putc */ >#if BROKEN_LINKER || USE_REENTRANT > chtype *real_acs_map; > int _LINES; > int _COLS; > int _TABSIZE; > int _ESCDELAY; > TERMINAL *_cur_term; >#ifdef TRACE > long _outchars; > const char *_tputs_trace; >#endif ># 957 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#endif ># 958 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > bool use_tioctl; >} NCURSES_PRESCREEN; > >/* > * Use screen-specific ripoff data (for softkeys) rather than global. > */ >#ifdef USE_SP_RIPOFF >#define safe_ripoff_sp (sp)->rsp >#define safe_ripoff_stack (sp)->rippedoff >#else ># 968 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#define safe_ripoff_sp _nc_prescreen.rsp >#define safe_ripoff_stack _nc_prescreen.rippedoff >#endif ># 971 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >extern NCURSES_EXPORT_VAR(NCURSES_PRESCREEN) _nc_prescreen; > >/* > * The SCREEN structure. > */ > >struct screen { > int _ifd; /* input file descriptor for screen */ > int _ofd; /* output file descriptor for screen */ > FILE *_ofp; /* output file ptr for screen */ > char *out_buffer; /* output buffer */ > size_t out_limit; /* output buffer size */ > size_t out_inuse; /* output buffer current use */ > bool _filtered; /* filter() was called */ > bool _prescreen; /* is in prescreen phase */ > bool _use_env; /* LINES & COLS from environment? */ > int _checkfd; /* filedesc for typeahead check */ > TERMINAL *_term; /* terminal type information */ > TTY _saved_tty; /* savetty/resetty information */ > NCURSES_SIZE_T _lines; /* screen lines */ > NCURSES_SIZE_T _columns; /* screen columns */ > > NCURSES_SIZE_T _lines_avail; /* lines available for stdscr */ > NCURSES_SIZE_T _topstolen; /* lines stolen from top */ > > WINDOW *_curscr; /* current screen */ > WINDOW *_newscr; /* virtual screen to be updated to */ > WINDOW *_stdscr; /* screen's full-window context */ > >#define CurScreen(sp) (sp)->_curscr >#define NewScreen(sp) (sp)->_newscr >#define StdScreen(sp) (sp)->_stdscr > > TRIES *_keytry; /* "Try" for use with keypad mode */ > TRIES *_key_ok; /* Disabled keys via keyok(,FALSE) */ > bool _tried; /* keypad mode was initialized */ > bool _keypad_on; /* keypad mode is currently on */ > > bool _called_wgetch; /* check for recursion in wgetch() */ > int _fifo[FIFO_SIZE]; /* input push-back buffer */ > short _fifohead, /* head of fifo queue */ > _fifotail, /* tail of fifo queue */ > _fifopeek, /* where to peek for next char */ > _fifohold; /* set if breakout marked */ > > int _endwin; /* are we out of window mode? */ > NCURSES_CH_T *_current_attr; /* holds current attributes set */ > int _coloron; /* is color enabled? */ > int _color_defs; /* are colors modified */ > int _cursor; /* visibility of the cursor */ > int _cursrow; /* physical cursor row */ > int _curscol; /* physical cursor column */ > bool _notty; /* true if we cannot switch non-tty */ > int _nl; /* True if NL -> CR/NL is on */ > int _raw; /* True if in raw mode */ > int _cbreak; /* 1 if in cbreak mode */ > /* > 1 if in halfdelay mode */ > int _echo; /* True if echo on */ > int _use_meta; /* use the meta key? */ > struct _SLK *_slk; /* ptr to soft key struct / NULL */ > int slk_format; /* selected format for this screen */ > /* cursor movement costs; units are 10ths of milliseconds */ >#if NCURSES_NO_PADDING > bool _no_padding; /* flag to set if padding disabled */ >#endif ># 1037 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > int _char_padding; /* cost of character put */ > int _cr_cost; /* cost of (carriage_return) */ > int _cup_cost; /* cost of (cursor_address) */ > int _home_cost; /* cost of (cursor_home) */ > int _ll_cost; /* cost of (cursor_to_ll) */ >#if USE_HARD_TABS > int _ht_cost; /* cost of (tab) */ > int _cbt_cost; /* cost of (backtab) */ >#endif /* USE_HARD_TABS */ ># 1046 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > int _cub1_cost; /* cost of (cursor_left) */ > int _cuf1_cost; /* cost of (cursor_right) */ > int _cud1_cost; /* cost of (cursor_down) */ > int _cuu1_cost; /* cost of (cursor_up) */ > int _cub_cost; /* cost of (parm_cursor_left) */ > int _cuf_cost; /* cost of (parm_cursor_right) */ > int _cud_cost; /* cost of (parm_cursor_down) */ > int _cuu_cost; /* cost of (parm_cursor_up) */ > int _hpa_cost; /* cost of (column_address) */ > int _vpa_cost; /* cost of (row_address) */ > /* used in tty_update.c, must be chars */ > int _ed_cost; /* cost of (clr_eos) */ > int _el_cost; /* cost of (clr_eol) */ > int _el1_cost; /* cost of (clr_bol) */ > int _dch1_cost; /* cost of (delete_character) */ > int _ich1_cost; /* cost of (insert_character) */ > int _dch_cost; /* cost of (parm_dch) */ > int _ich_cost; /* cost of (parm_ich) */ > int _ech_cost; /* cost of (erase_chars) */ > int _rep_cost; /* cost of (repeat_char) */ > int _hpa_ch_cost; /* cost of (column_address) */ > int _cup_ch_cost; /* cost of (cursor_address) */ > int _cuf_ch_cost; /* cost of (parm_cursor_right) */ > int _inline_cost; /* cost of inline-move */ > int _smir_cost; /* cost of (enter_insert_mode) */ > int _rmir_cost; /* cost of (exit_insert_mode) */ > int _ip_cost; /* cost of (insert_padding) */ > /* used in lib_mvcur.c */ > char * _address_cursor; > /* used in tty_update.c */ > int _scrolling; /* 1 if terminal's smart enough to */ > > /* used in lib_color.c */ > color_t *_color_table; /* screen's color palette */ > int _color_count; /* count of colors in palette */ > colorpair_t *_color_pairs; /* screen's color pair list */ > int _pair_count; /* count of color pairs */ > int _pair_limit; /* actual limit of color-pairs */ >#if NCURSES_EXT_FUNCS > bool _assumed_color; /* use assumed colors */ > bool _default_color; /* use default colors */ > bool _has_sgr_39_49; /* has ECMA default color support */ > int _default_fg; /* assumed default foreground */ > int _default_bg; /* assumed default background */ > int _default_pairs; /* count pairs using default color */ >#endif ># 1092 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > chtype _ok_attributes; /* valid attributes for terminal */ > chtype _xmc_suppress; /* attributes to suppress if xmc */ > chtype _xmc_triggers; /* attributes to process if xmc */ > chtype * _acs_map; /* the real alternate-charset map */ > bool * _screen_acs_map; > > > /* used in lib_vidattr.c */ > bool _use_rmso; /* true if we may use 'rmso' */ > bool _use_rmul; /* true if we may use 'rmul' */ >#if USE_ITALIC > bool _use_ritm; /* true if we may use 'ritm' */ >#endif ># 1105 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#if USE_KLIBC_KBD > bool _extended_key; /* true if an extended key */ >#endif ># 1109 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > > /* > * These data correspond to the state of the idcok() and idlok() > * functions. A caveat is in order here: the XSI and SVr4 > * documentation specify that these functions apply to the window which > * is given as an argument. However, ncurses implements this logic > * only for the newscr/curscr update process, _not_ per-window. > */ > bool _nc_sp_idlok; > bool _nc_sp_idcok; > > /* > * These are the data that support the mouse interface. > */ > bool _mouse_initialized; > MouseType _mouse_type; > int _maxclick; > bool (*_mouse_event) (SCREEN *); > bool (*_mouse_inline)(SCREEN *); > bool (*_mouse_parse) (SCREEN *, int); > void (*_mouse_resume)(SCREEN *); > void (*_mouse_wrap) (SCREEN *); > int _mouse_fd; /* file-descriptor, if any */ > bool _mouse_active; /* true if initialized */ > mmask_t _mouse_mask; /* set via mousemask() */ > mmask_t _mouse_mask2; /* OR's in press/release bits */ > mmask_t _mouse_bstate; > NCURSES_CONST char *_mouse_xtermcap; /* string to enable/disable mouse */ > MEVENT _mouse_events[EV_MAX]; /* hold the last mouse event seen */ > MEVENT *_mouse_eventp; /* next free slot in event queue */ > >#if USE_GPM_SUPPORT > bool _mouse_gpm_loaded; > bool _mouse_gpm_found; >#ifdef HAVE_LIBDL > void *_dlopen_gpm; > TYPE_gpm_fd _mouse_gpm_fd; > TYPE_Gpm_Open _mouse_Gpm_Open; > TYPE_Gpm_Close _mouse_Gpm_Close; > TYPE_Gpm_GetEvent _mouse_Gpm_GetEvent; >#endif ># 1150 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > Gpm_Connect _mouse_gpm_connect; >#endif /* USE_GPM_SUPPORT */ ># 1152 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#if USE_EMX_MOUSE > int _emxmouse_wfd; > int _emxmouse_thread; > int _emxmouse_activated; > char _emxmouse_buttons[4]; >#endif ># 1159 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#if USE_SYSMOUSE > MEVENT _sysmouse_fifo[FIFO_SIZE]; > int _sysmouse_head; > int _sysmouse_tail; > int _sysmouse_char_width; /* character width */ > int _sysmouse_char_height; /* character height */ > int _sysmouse_old_buttons; > int _sysmouse_new_buttons; >#endif ># 1169 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#ifdef USE_TERM_DRIVER > MEVENT _drv_mouse_fifo[FIFO_SIZE]; > int _drv_mouse_head; > int _drv_mouse_tail; > int _drv_mouse_old_buttons; > int _drv_mouse_new_buttons; >#endif ># 1177 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > /* > * This supports automatic resizing > */ >#if USE_SIZECHANGE > int (*_resize)(NCURSES_SP_DCLx int y, int x); > int (*_ungetch)(SCREEN *, int); >#endif ># 1184 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > > /* > * These are data that support the proper handling of the panel stack on an > * per screen basis. > */ > struct panelhook _panelHook; > > bool _sig_winch; > SCREEN *_next_screen; > > /* hashes for old and new lines */ > unsigned long *oldhash, *newhash; > HASHMAP *hashtab; > int hashtab_len; > int *_oldnum_list; > int _oldnum_size; > > NCURSES_SP_OUTC _outch; /* output handler if not putc */ > > int _legacy_coding; /* see use_legacy_coding() */ > >#if USE_REENTRANT > char _ttytype[NAMESIZE]; > int _ESCDELAY; > int _TABSIZE; > int _LINES; > int _COLS; >#ifdef TRACE > long _outchars; > const char *_tputs_trace; >#endif ># 1215 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#endif ># 1216 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#ifdef TRACE > char tracechr_buf[40]; > char tracemse_buf[TRACEMSE_MAX]; >#endif ># 1221 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#ifdef USE_SP_WINDOWLIST > WINDOWLIST* _windowlist; >#define WindowList(sp) (sp)->_windowlist >#endif ># 1225 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > NCURSES_OUTC jump; > > ripoff_t rippedoff[N_RIPS]; > ripoff_t *rsp; > > /* > * ncurses/ncursesw are the same up to this point. > */ >#if USE_WIDEC_SUPPORT > /* recent versions of 'screen' have partially-working support for > * UTF-8, but do not permit ACS at the same time (see tty_update.c). > */ > bool _screen_acs_fix; > bool _screen_unicode; >#endif ># 1240 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > > bool _use_tioctl; >}; > >extern NCURSES_EXPORT_VAR(SCREEN *) _nc_screen_chain; >extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T) _nc_have_sigwinch; > > WINDOWLIST { > WINDOWLIST *next; > SCREEN *screen; /* screen containing the window */ > WINDOW win; /* WINDOW_EXT() needs to account for offset */ >#if NCURSES_WIDECHAR > char addch_work[(MB_LEN_MAX * 9) + 1]; > unsigned addch_used; /* number of bytes in addch_work[] */ > int addch_x; /* x-position for addch_work[] */ > int addch_y; /* y-position for addch_work[] */ >#endif ># 1257 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >}; > >#define WINDOW_EXT(w,m) (((WINDOWLIST *)((void *)((char *)(w) - offsetof(WINDOWLIST, win))))->m) > >#define SP_PRE_INIT(sp) \ > sp->_cursrow = -1; \ > sp->_curscol = -1; \ > sp->_nl = TRUE; \ > sp->_raw = FALSE; \ > sp->_cbreak = 0; \ > sp->_echo = TRUE; \ > sp->_fifohead = -1; \ > sp->_endwin = TRUE; \ > sp->_cursor = -1; \ > WindowList(sp) = 0; \ > sp->_outch = NCURSES_OUTC_FUNC; \ > sp->jump = 0 \ > >/* usually in <limits.h> */ >#ifndef UCHAR_MAX >#define UCHAR_MAX 255 >#endif ># 1279 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >/* The terminfo source is assumed to be 7-bit ASCII */ >#define is7bits(c) ((unsigned)(c) < 128) > >/* Checks for isprint() should be done on 8-bit characters (non-wide) */ >#define is8bits(c) ((unsigned)(c) <= UCHAR_MAX) > >#ifndef min >#define min(a,b) ((a) > (b) ? (b) : (a)) >#endif ># 1289 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#ifndef max >#define max(a,b) ((a) < (b) ? (b) : (a)) >#endif ># 1293 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >/* usually in <unistd.h> */ >#ifndef STDIN_FILENO >#define STDIN_FILENO 0 >#endif ># 1298 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#ifndef STDOUT_FILENO >#define STDOUT_FILENO 1 >#endif ># 1302 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#ifndef STDERR_FILENO >#define STDERR_FILENO 2 >#endif ># 1306 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#ifndef EXIT_SUCCESS >#define EXIT_SUCCESS 0 >#endif ># 1310 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#ifndef EXIT_FAILURE >#define EXIT_FAILURE 1 >#endif ># 1314 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#ifndef R_OK >#define R_OK 4 /* Test for read permission. */ >#endif ># 1318 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#ifndef W_OK >#define W_OK 2 /* Test for write permission. */ >#endif ># 1321 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#ifndef X_OK >#define X_OK 1 /* Test for execute permission. */ >#endif ># 1324 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#ifndef F_OK >#define F_OK 0 /* Test for existence. */ >#endif ># 1327 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#if HAVE_FCNTL_H >#if 0 /* expanded by -frewrite-includes */ >#include <fcntl.h> /* may define O_BINARY */ >#endif /* expanded by -frewrite-includes */ ># 1329 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" ># 1 "/usr/obj/usr/src/tmp/usr/include/fcntl.h" 1 3 4 >/*- > * Copyright (c) 1983, 1990, 1993 > * The Regents of the University of California. All rights reserved. > * (c) UNIX System Laboratories, Inc. > * All or some portions of this file are derived from material licensed > * to the University of California by American Telephone and Telegraph > * Co. or Unix System Laboratories, Inc. and are reproduced herein with > * the permission of UNIX System Laboratories, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 4. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)fcntl.h 8.3 (Berkeley) 1/21/94 > * $FreeBSD: stable/11/sys/sys/fcntl.h 294205 2016-01-17 08:40:51Z kib $ > */ > >#ifndef _SYS_FCNTL_H_ >#define _SYS_FCNTL_H_ > >/* > * This file includes the definitions for open and fcntl > * described by POSIX for <fcntl.h>; it also includes > * related kernel definitions. > */ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 47 "/usr/obj/usr/src/tmp/usr/include/fcntl.h" 3 4 ># 48 "/usr/obj/usr/src/tmp/usr/include/fcntl.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 48 "/usr/obj/usr/src/tmp/usr/include/fcntl.h" 3 4 ># 49 "/usr/obj/usr/src/tmp/usr/include/fcntl.h" 3 4 > >#ifndef _MODE_T_DECLARED >typedef __mode_t mode_t; >#define _MODE_T_DECLARED >#endif ># 54 "/usr/obj/usr/src/tmp/usr/include/fcntl.h" 3 4 > >#ifndef _OFF_T_DECLARED >typedef __off_t off_t; >#define _OFF_T_DECLARED >#endif ># 59 "/usr/obj/usr/src/tmp/usr/include/fcntl.h" 3 4 > >#ifndef _PID_T_DECLARED >typedef __pid_t pid_t; >#define _PID_T_DECLARED >#endif ># 64 "/usr/obj/usr/src/tmp/usr/include/fcntl.h" 3 4 > >/* > * File status flags: these are used by open(2), fcntl(2). > * They are also used (indirectly) in the kernel file structure f_flags, > * which is a superset of the open/fcntl flags. Open flags and f_flags > * are inter-convertible using OFLAGS(fflags) and FFLAGS(oflags). > * Open/fcntl flags begin with O_; kernel-internal flags begin with F. > */ >/* open-only flags */ >#define O_RDONLY 0x0000 /* open for reading only */ >#define O_WRONLY 0x0001 /* open for writing only */ >#define O_RDWR 0x0002 /* open for reading and writing */ >#define O_ACCMODE 0x0003 /* mask for above modes */ > >/* > * Kernel encoding of open mode; separate read and write bits that are > * independently testable: 1 greater than the above. > * > * XXX > * FREAD and FWRITE are excluded from the #ifdef _KERNEL so that TIOCFLUSH, > * which was documented to use FREAD/FWRITE, continues to work. > */ >#if __BSD_VISIBLE >#define FREAD 0x0001 >#define FWRITE 0x0002 >#endif ># 90 "/usr/obj/usr/src/tmp/usr/include/fcntl.h" 3 4 >#define O_NONBLOCK 0x0004 /* no delay */ >#define O_APPEND 0x0008 /* set append mode */ >#if __BSD_VISIBLE >#define O_SHLOCK 0x0010 /* open with shared file lock */ >#define O_EXLOCK 0x0020 /* open with exclusive file lock */ >#define O_ASYNC 0x0040 /* signal pgrp when data ready */ >#define O_FSYNC 0x0080 /* synchronous writes */ >#endif ># 98 "/usr/obj/usr/src/tmp/usr/include/fcntl.h" 3 4 >#define O_SYNC 0x0080 /* POSIX synonym for O_FSYNC */ >#if __POSIX_VISIBLE >= 200809 >#define O_NOFOLLOW 0x0100 /* don't follow symlinks */ >#endif ># 102 "/usr/obj/usr/src/tmp/usr/include/fcntl.h" 3 4 >#define O_CREAT 0x0200 /* create if nonexistent */ >#define O_TRUNC 0x0400 /* truncate to zero length */ >#define O_EXCL 0x0800 /* error if already exists */ >#ifdef _KERNEL >#define FHASLOCK 0x4000 /* descriptor holds advisory lock */ >#endif ># 108 "/usr/obj/usr/src/tmp/usr/include/fcntl.h" 3 4 > >/* Defined by POSIX 1003.1; BSD default, but must be distinct from O_RDONLY. */ >#define O_NOCTTY 0x8000 /* don't assign controlling terminal */ > >#if __BSD_VISIBLE >/* Attempt to bypass buffer cache */ >#define O_DIRECT 0x00010000 >#endif ># 116 "/usr/obj/usr/src/tmp/usr/include/fcntl.h" 3 4 > >#if __POSIX_VISIBLE >= 200809 >#define O_DIRECTORY 0x00020000 /* Fail if not directory */ >#define O_EXEC 0x00040000 /* Open for execute only */ >#endif ># 121 "/usr/obj/usr/src/tmp/usr/include/fcntl.h" 3 4 >#ifdef _KERNEL >#define FEXEC O_EXEC >#endif ># 124 "/usr/obj/usr/src/tmp/usr/include/fcntl.h" 3 4 > >#if __POSIX_VISIBLE >= 200809 >/* Defined by POSIX 1003.1-2008; BSD default, but reserve for future use. */ >#define O_TTY_INIT 0x00080000 /* Restore default termios attributes */ > >#define O_CLOEXEC 0x00100000 >#endif ># 131 "/usr/obj/usr/src/tmp/usr/include/fcntl.h" 3 4 > >#if __BSD_VISIBLE >#define O_VERIFY 0x00200000 /* open only after verification */ >#endif ># 135 "/usr/obj/usr/src/tmp/usr/include/fcntl.h" 3 4 > >/* > * XXX missing O_DSYNC, O_RSYNC. > */ > >#ifdef _KERNEL > >/* Only for devfs d_close() flags. */ >#define FLASTCLOSE O_DIRECTORY >#define FREVOKE O_VERIFY >/* Only for fo_close() from half-succeeded open */ >#define FOPENFAILED O_TTY_INIT > >/* convert from open() flags to/from fflags; convert O_RD/WR to FREAD/FWRITE */ >#define FFLAGS(oflags) ((oflags) & O_EXEC ? (oflags) : (oflags) + 1) >#define OFLAGS(fflags) ((fflags) & O_EXEC ? (fflags) : (fflags) - 1) > >/* bits to save after open */ >#define FMASK (FREAD|FWRITE|FAPPEND|FASYNC|FFSYNC|FNONBLOCK|O_DIRECT|FEXEC) >/* bits settable by fcntl(F_SETFL, ...) */ >#define FCNTLFLAGS (FAPPEND|FASYNC|FFSYNC|FNONBLOCK|FRDAHEAD|O_DIRECT) > >#if defined(COMPAT_FREEBSD7) || defined(COMPAT_FREEBSD6) || \ > defined(COMPAT_FREEBSD5) || defined(COMPAT_FREEBSD4) >/* > * Set by shm_open(3) in older libc's to get automatic MAP_ASYNC > * behavior for POSIX shared memory objects (which are otherwise > * implemented as plain files). > */ >#define FPOSIXSHM O_NOFOLLOW >#undef FCNTLFLAGS >#define FCNTLFLAGS (FAPPEND|FASYNC|FFSYNC|FNONBLOCK|FPOSIXSHM|FRDAHEAD| \ > O_DIRECT) >#endif ># 169 "/usr/obj/usr/src/tmp/usr/include/fcntl.h" 3 4 >#endif ># 170 "/usr/obj/usr/src/tmp/usr/include/fcntl.h" 3 4 > >/* > * The O_* flags used to have only F* names, which were used in the kernel > * and by fcntl. We retain the F* names for the kernel f_flag field > * and for backward compatibility for fcntl. These flags are deprecated. > */ >#if __BSD_VISIBLE >#define FAPPEND O_APPEND /* kernel/compat */ >#define FASYNC O_ASYNC /* kernel/compat */ >#define FFSYNC O_FSYNC /* kernel */ >#define FNONBLOCK O_NONBLOCK /* kernel */ >#define FNDELAY O_NONBLOCK /* compat */ >#define O_NDELAY O_NONBLOCK /* compat */ >#endif ># 184 "/usr/obj/usr/src/tmp/usr/include/fcntl.h" 3 4 > >/* > * We are out of bits in f_flag (which is a short). However, > * the flag bits not set in FMASK are only meaningful in the > * initial open syscall. Those bits can thus be given a > * different meaning for fcntl(2). > */ >#if __BSD_VISIBLE >/* Read ahead */ >#define FRDAHEAD O_CREAT >#endif ># 195 "/usr/obj/usr/src/tmp/usr/include/fcntl.h" 3 4 > >#if __POSIX_VISIBLE >= 200809 >/* > * Magic value that specify the use of the current working directory > * to determine the target of relative file paths in the openat() and > * similar syscalls. > */ >#define AT_FDCWD -100 > >/* > * Miscellaneous flags for the *at() syscalls. > */ >#define AT_EACCESS 0x100 /* Check access using effective user and group ID */ >#define AT_SYMLINK_NOFOLLOW 0x200 /* Do not follow symbolic links */ >#define AT_SYMLINK_FOLLOW 0x400 /* Follow symbolic link */ >#define AT_REMOVEDIR 0x800 /* Remove directory instead of file */ >#endif ># 212 "/usr/obj/usr/src/tmp/usr/include/fcntl.h" 3 4 > >/* > * Constants used for fcntl(2) > */ > >/* command values */ >#define F_DUPFD 0 /* duplicate file descriptor */ >#define F_GETFD 1 /* get file descriptor flags */ >#define F_SETFD 2 /* set file descriptor flags */ >#define F_GETFL 3 /* get file status flags */ >#define F_SETFL 4 /* set file status flags */ >#if __XSI_VISIBLE || __POSIX_VISIBLE >= 200112 >#define F_GETOWN 5 /* get SIGIO/SIGURG proc/pgrp */ >#define F_SETOWN 6 /* set SIGIO/SIGURG proc/pgrp */ >#endif ># 227 "/usr/obj/usr/src/tmp/usr/include/fcntl.h" 3 4 >#if __BSD_VISIBLE >#define F_OGETLK 7 /* get record locking information */ >#define F_OSETLK 8 /* set record locking information */ >#define F_OSETLKW 9 /* F_SETLK; wait if blocked */ >#define F_DUP2FD 10 /* duplicate file descriptor to arg */ >#endif ># 233 "/usr/obj/usr/src/tmp/usr/include/fcntl.h" 3 4 >#define F_GETLK 11 /* get record locking information */ >#define F_SETLK 12 /* set record locking information */ >#define F_SETLKW 13 /* F_SETLK; wait if blocked */ >#if __BSD_VISIBLE >#define F_SETLK_REMOTE 14 /* debugging support for remote locks */ >#define F_READAHEAD 15 /* read ahead */ >#define F_RDAHEAD 16 /* Darwin compatible read ahead */ >#endif ># 241 "/usr/obj/usr/src/tmp/usr/include/fcntl.h" 3 4 >#if __POSIX_VISIBLE >= 200809 >#define F_DUPFD_CLOEXEC 17 /* Like F_DUPFD, but FD_CLOEXEC is set */ >#endif ># 244 "/usr/obj/usr/src/tmp/usr/include/fcntl.h" 3 4 >#if __BSD_VISIBLE >#define F_DUP2FD_CLOEXEC 18 /* Like F_DUP2FD, but FD_CLOEXEC is set */ >#endif ># 247 "/usr/obj/usr/src/tmp/usr/include/fcntl.h" 3 4 > >/* file descriptor flags (F_GETFD, F_SETFD) */ >#define FD_CLOEXEC 1 /* close-on-exec flag */ > >/* record locking flags (F_GETLK, F_SETLK, F_SETLKW) */ >#define F_RDLCK 1 /* shared or read lock */ >#define F_UNLCK 2 /* unlock */ >#define F_WRLCK 3 /* exclusive or write lock */ >#if __BSD_VISIBLE >#define F_UNLCKSYS 4 /* purge locks for a given system ID */ >#define F_CANCEL 5 /* cancel an async lock request */ >#endif ># 259 "/usr/obj/usr/src/tmp/usr/include/fcntl.h" 3 4 >#ifdef _KERNEL >#define F_WAIT 0x010 /* Wait until lock is granted */ >#define F_FLOCK 0x020 /* Use flock(2) semantics for lock */ >#define F_POSIX 0x040 /* Use POSIX semantics for lock */ >#define F_REMOTE 0x080 /* Lock owner is remote NFS client */ >#define F_NOINTR 0x100 /* Ignore signals when waiting */ >#endif ># 266 "/usr/obj/usr/src/tmp/usr/include/fcntl.h" 3 4 > >/* > * Advisory file segment locking data type - > * information passed to system by user > */ >struct flock { > off_t l_start; /* starting offset */ > off_t l_len; /* len = 0 means until end of file */ > pid_t l_pid; /* lock owner */ > short l_type; /* lock type: read/write, etc. */ > short l_whence; /* type of l_start */ > int l_sysid; /* remote system id or zero for local */ >}; > >#if __BSD_VISIBLE >/* > * Old advisory file segment locking data type, > * before adding l_sysid. > */ >struct __oflock { > off_t l_start; /* starting offset */ > off_t l_len; /* len = 0 means until end of file */ > pid_t l_pid; /* lock owner */ > short l_type; /* lock type: read/write, etc. */ > short l_whence; /* type of l_start */ >}; >#endif ># 293 "/usr/obj/usr/src/tmp/usr/include/fcntl.h" 3 4 > >#if __BSD_VISIBLE >/* lock operations for flock(2) */ >#define LOCK_SH 0x01 /* shared file lock */ >#define LOCK_EX 0x02 /* exclusive file lock */ >#define LOCK_NB 0x04 /* don't block when locking */ >#define LOCK_UN 0x08 /* unlock file */ >#endif ># 301 "/usr/obj/usr/src/tmp/usr/include/fcntl.h" 3 4 > >#if __POSIX_VISIBLE >= 200112 >/* > * Advice to posix_fadvise > */ >#define POSIX_FADV_NORMAL 0 /* no special treatment */ >#define POSIX_FADV_RANDOM 1 /* expect random page references */ >#define POSIX_FADV_SEQUENTIAL 2 /* expect sequential page references */ >#define POSIX_FADV_WILLNEED 3 /* will need these pages */ >#define POSIX_FADV_DONTNEED 4 /* dont need these pages */ >#define POSIX_FADV_NOREUSE 5 /* access data only once */ >#endif ># 313 "/usr/obj/usr/src/tmp/usr/include/fcntl.h" 3 4 > >#ifndef _KERNEL >__BEGIN_DECLS >int open(const char *, int, ...); >int creat(const char *, mode_t); >int fcntl(int, int, ...); >#if __BSD_VISIBLE >int flock(int, int); >#endif ># 322 "/usr/obj/usr/src/tmp/usr/include/fcntl.h" 3 4 >#if __POSIX_VISIBLE >= 200809 >int openat(int, const char *, int, ...); >#endif ># 325 "/usr/obj/usr/src/tmp/usr/include/fcntl.h" 3 4 >#if __POSIX_VISIBLE >= 200112 >int posix_fadvise(int, off_t, off_t, int); >int posix_fallocate(int, off_t, off_t); >#endif ># 329 "/usr/obj/usr/src/tmp/usr/include/fcntl.h" 3 4 >__END_DECLS >#endif ># 331 "/usr/obj/usr/src/tmp/usr/include/fcntl.h" 3 4 > >#endif /* !_SYS_FCNTL_H_ */ ># 333 "/usr/obj/usr/src/tmp/usr/include/fcntl.h" 3 4 ># 1330 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" 2 >#endif ># 1331 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#ifndef O_BINARY >#define O_BINARY 0 >#endif ># 1335 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#ifdef TRACE >#if USE_REENTRANT >#define COUNT_OUTCHARS(n) _nc_count_outchars(n); >#else ># 1340 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#define COUNT_OUTCHARS(n) _nc_outchars += (n); >#endif ># 1342 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#else ># 1343 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#define COUNT_OUTCHARS(n) /* nothing */ >#endif ># 1345 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#define RESET_OUTCHARS() COUNT_OUTCHARS(-_nc_outchars) > >#define UChar(c) ((unsigned char)(c)) >#define UShort(c) ((unsigned short)(c)) >#define ChCharOf(c) ((chtype)(c) & (chtype)A_CHARTEXT) >#define ChAttrOf(c) ((chtype)(c) & (chtype)A_ATTRIBUTES) > >#ifndef MB_LEN_MAX >#define MB_LEN_MAX 8 /* should be >= MB_CUR_MAX, but that may be a function */ >#endif ># 1356 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#if USE_WIDEC_SUPPORT /* { */ >#define isEILSEQ(status) (((size_t)status == (size_t)-1) && (errno == EILSEQ)) > >#define init_mb(state) memset(&state, 0, sizeof(state)) > >#if NCURSES_EXT_COLORS >#define NulColor , 0 >#else ># 1365 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#define NulColor /* nothing */ >#endif ># 1367 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#define NulChar 0,0,0,0 /* FIXME: see CCHARW_MAX */ >#define CharOf(c) ((c).chars[0]) >#define AttrOf(c) ((c).attr) > >#define AddAttr(c,a) AttrOf(c) |= ((a) & A_ATTRIBUTES) >#define RemAttr(c,a) AttrOf(c) &= ~((a) & A_ATTRIBUTES) >#define SetAttr(c,a) AttrOf(c) = ((a) & A_ATTRIBUTES) | WidecExt(c) > >#define NewChar2(c,a) { a, { c, NulChar } NulColor } >#define NewChar(ch) NewChar2(ChCharOf(ch), ChAttrOf(ch)) > >#if CCHARW_MAX == 5 >#define CharEq(a,b) (((a).attr == (b).attr) \ > && (a).chars[0] == (b).chars[0] \ > && (a).chars[1] == (b).chars[1] \ > && (a).chars[2] == (b).chars[2] \ > && (a).chars[3] == (b).chars[3] \ > && (a).chars[4] == (b).chars[4] \ > if_EXT_COLORS(&& (a).ext_color == (b).ext_color)) >#else ># 1388 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#define CharEq(a,b) (!memcmp(&(a), &(b), sizeof(a))) >#endif ># 1390 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#define SetChar(ch,c,a) do { \ > NCURSES_CH_T *_cp = &ch; \ > memset(_cp, 0, sizeof(ch)); \ > _cp->chars[0] = (wchar_t) (c); \ > _cp->attr = (a); \ > if_EXT_COLORS(SetPair(ch, PairNumber(a))); \ > } while (0) >#define CHREF(wch) (&wch) >#define CHDEREF(wch) (*wch) >#define ARG_CH_T NCURSES_CH_T * >#define CARG_CH_T const NCURSES_CH_T * >#define PUTC_DATA char PUTC_buf[MB_LEN_MAX]; int PUTC_i, PUTC_n; \ > mbstate_t PUT_st; wchar_t PUTC_ch >#define PUTC_INIT init_mb (PUT_st) >#define PUTC(ch) do { if(!isWidecExt(ch)) { \ > if (Charable(ch)) { \ > NCURSES_OUTC_FUNC (NCURSES_SP_ARGx CharOf(ch)); \ > COUNT_OUTCHARS(1); \ > } else { \ > PUTC_INIT; \ > for (PUTC_i = 0; PUTC_i < CCHARW_MAX; ++PUTC_i) { \ > PUTC_ch = (ch).chars[PUTC_i]; \ > if (PUTC_ch == L'\0') \ > break; \ > PUTC_n = (int) wcrtomb(PUTC_buf, \ > (ch).chars[PUTC_i], &PUT_st); \ > if (PUTC_n <= 0) { \ > if (PUTC_ch && is8bits(PUTC_ch) && PUTC_i == 0) \ > NCURSES_OUTC_FUNC (NCURSES_SP_ARGx CharOf(ch)); \ > break; \ > } else { \ > int PUTC_j; \ > for (PUTC_j = 0; PUTC_j < PUTC_n; ++PUTC_j) { \ > NCURSES_OUTC_FUNC (NCURSES_SP_ARGx PUTC_buf[PUTC_j]); \ > } \ > } \ > } \ > COUNT_OUTCHARS(PUTC_i); \ > } } } while (0) > >#define BLANK NewChar2(' ', WA_NORMAL) >#define ZEROS NewChar2('\0', WA_NORMAL) >#define ISBLANK(ch) ((ch).chars[0] == L' ' && (ch).chars[1] == L'\0') > > /* > * Wide characters cannot be represented in the A_CHARTEXT mask of > * attr_t's but an application might have set a narrow character there. > * But even in that case, it would only be a printable character, or > * zero. Otherwise we can use those bits to tell if a cell is the > * first or extension part of a wide character. > */ >#define WidecExt(ch) (int) (AttrOf(ch) & A_CHARTEXT) >#define isWidecBase(ch) (WidecExt(ch) == 1) >#define isWidecExt(ch) (WidecExt(ch) > 1 && WidecExt(ch) < 32) >#define SetWidecExt(dst, ext) AttrOf(dst) &= ~A_CHARTEXT, \ > AttrOf(dst) |= (attr_t) (ext + 1) > >#define if_WIDEC(code) code >#define Charable(ch) ((SP_PARM->_legacy_coding) \ > || (AttrOf(ch) & A_ALTCHARSET) \ > || (!isWidecExt(ch) && \ > (ch).chars[1] == L'\0' && \ > _nc_is_charable(CharOf(ch)))) > >#define L(ch) L ## ch >#else /* }{ */ ># 1457 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#define CharOf(c) ChCharOf(c) >#define AttrOf(c) ChAttrOf(c) >#define AddAttr(c,a) c |= (a) >#define RemAttr(c,a) c &= ~((a) & A_ATTRIBUTES) >#define SetAttr(c,a) c = ((c) & ~A_ATTRIBUTES) | (a) >#define NewChar(ch) (ch) >#define NewChar2(c,a) ((c) | (a)) >#define CharEq(a,b) ((a) == (b)) >#define SetChar(ch,c,a) ch = (c) | (a) >#define CHREF(wch) wch >#define CHDEREF(wch) wch >#define ARG_CH_T NCURSES_CH_T >#define CARG_CH_T NCURSES_CH_T >#define PUTC_DATA /* nothing */ >#define PUTC(ch) NCURSES_OUTC_FUNC (NCURSES_SP_ARGx (int) ch) > >#define BLANK (' '|A_NORMAL) >#define ZEROS ('\0'|A_NORMAL) >#define ISBLANK(ch) (CharOf(ch) == ' ') > >#define isWidecExt(ch) (0) >#define if_WIDEC(code) /* nothing */ > >#define L(ch) ch >#endif /* } */ ># 1482 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#define AttrOfD(ch) AttrOf(CHDEREF(ch)) >#define CharOfD(ch) CharOf(CHDEREF(ch)) >#define SetChar2(wch,ch) SetChar(wch,ChCharOf(ch),ChAttrOf(ch)) > >#define BLANK_ATTR A_NORMAL >#define BLANK_TEXT L(' ') > >#define CHANGED -1 > >#define LEGALYX(w, y, x) \ > ((w) != 0 && \ > ((x) >= 0 && (x) <= (w)->_maxx && \ > (y) >= 0 && (y) <= (w)->_maxy)) > >#define CHANGED_CELL(line,col) \ > if (line->firstchar == _NOCHANGE) \ > line->firstchar = line->lastchar = (NCURSES_SIZE_T) (col); \ > else if ((col) < line->firstchar) \ > line->firstchar = (NCURSES_SIZE_T) (col); \ > else if ((col) > line->lastchar) \ > line->lastchar = (NCURSES_SIZE_T) (col) > >#define CHANGED_RANGE(line,start,end) \ > if (line->firstchar == _NOCHANGE \ > || line->firstchar > (start)) \ > line->firstchar = (NCURSES_SIZE_T) (start); \ > if (line->lastchar == _NOCHANGE \ > || line->lastchar < (end)) \ > line->lastchar = (NCURSES_SIZE_T) (end) > >#define CHANGED_TO_EOL(line,start,end) \ > if (line->firstchar == _NOCHANGE \ > || line->firstchar > (start)) \ > line->firstchar = (NCURSES_SIZE_T) (start); \ > line->lastchar = (NCURSES_SIZE_T) (end) > >#define SIZEOF(v) (sizeof(v)/sizeof(v[0])) > >#define FreeIfNeeded(p) if ((p) != 0) free(p) > >/* FreeAndNull() is not a comma-separated expression because some compilers > * do not accept a mixture of void with values. > */ >#define FreeAndNull(p) free(p); p = 0 > >#if 0 /* expanded by -frewrite-includes */ >#include <nc_alloc.h> >#endif /* expanded by -frewrite-includes */ ># 1528 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" ># 1 "/usr/src/contrib/ncurses/include/nc_alloc.h" 1 >/**************************************************************************** > * Copyright (c) 1998-2012,2013 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 1996-on * > ****************************************************************************/ >/* $Id: nc_alloc.h,v 1.22 2013/01/26 21:56:51 tom Exp $ */ > >#ifndef NC_ALLOC_included >#define NC_ALLOC_included 1 >/* *INDENT-OFF* */ > >#ifdef __cplusplus >extern "C" { >#endif ># 41 "/usr/src/contrib/ncurses/include/nc_alloc.h" > >#if defined(HAVE_LIBDMALLOC) && HAVE_LIBDMALLOC >#if 0 /* expanded by -frewrite-includes */ >#include <string.h> >#endif /* expanded by -frewrite-includes */ ># 43 "/usr/src/contrib/ncurses/include/nc_alloc.h" ># 44 "/usr/src/contrib/ncurses/include/nc_alloc.h" >#undef strndup /* workaround for #define in GLIBC 2.7 */ >#if 0 /* expanded by -frewrite-includes */ >#include <dmalloc.h> /* Gray Watson's library */ >#endif /* expanded by -frewrite-includes */ ># 45 "/usr/src/contrib/ncurses/include/nc_alloc.h" ># 46 "/usr/src/contrib/ncurses/include/nc_alloc.h" >#else ># 47 "/usr/src/contrib/ncurses/include/nc_alloc.h" >#undef HAVE_LIBDMALLOC >#define HAVE_LIBDMALLOC 0 >#endif ># 50 "/usr/src/contrib/ncurses/include/nc_alloc.h" > >#if defined(HAVE_LIBDBMALLOC) && HAVE_LIBDBMALLOC >#if 0 /* expanded by -frewrite-includes */ >#include <dbmalloc.h> /* Conor Cahill's library */ >#endif /* expanded by -frewrite-includes */ ># 52 "/usr/src/contrib/ncurses/include/nc_alloc.h" ># 53 "/usr/src/contrib/ncurses/include/nc_alloc.h" >#else ># 54 "/usr/src/contrib/ncurses/include/nc_alloc.h" >#undef HAVE_LIBDBMALLOC >#define HAVE_LIBDBMALLOC 0 >#endif ># 57 "/usr/src/contrib/ncurses/include/nc_alloc.h" > >#if defined(HAVE_LIBMPATROL) && HAVE_LIBMPATROL >#if 0 /* expanded by -frewrite-includes */ >#include <mpatrol.h> /* Memory-Patrol library */ >#endif /* expanded by -frewrite-includes */ ># 59 "/usr/src/contrib/ncurses/include/nc_alloc.h" ># 60 "/usr/src/contrib/ncurses/include/nc_alloc.h" >#else ># 61 "/usr/src/contrib/ncurses/include/nc_alloc.h" >#undef HAVE_LIBMPATROL >#define HAVE_LIBMPATROL 0 >#endif ># 64 "/usr/src/contrib/ncurses/include/nc_alloc.h" > >#ifndef NO_LEAKS >#define NO_LEAKS 0 >#endif ># 68 "/usr/src/contrib/ncurses/include/nc_alloc.h" > >#if HAVE_LIBDBMALLOC || HAVE_LIBDMALLOC || NO_LEAKS >#define HAVE_NC_FREEALL 1 >struct termtype; >extern NCURSES_EXPORT(void) _nc_free_and_exit(int) GCC_NORETURN; >extern NCURSES_EXPORT(void) _nc_free_tinfo(int) GCC_NORETURN; >extern NCURSES_EXPORT(void) _nc_free_tic(int) GCC_NORETURN; >extern NCURSES_EXPORT(void) _nc_free_tparm(void); >extern NCURSES_EXPORT(void) _nc_leaks_dump_entry(void); >extern NCURSES_EXPORT(void) _nc_leaks_tic(void); > >#if NCURSES_SP_FUNCS >extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_free_and_exit)(SCREEN*, int) GCC_NORETURN; >#endif ># 82 "/usr/src/contrib/ncurses/include/nc_alloc.h" > >#define ExitProgram(code) _nc_free_and_exit(code) > >#endif /* NO_LEAKS, etc */ ># 86 "/usr/src/contrib/ncurses/include/nc_alloc.h" > >#ifndef HAVE_NC_FREEALL >#define HAVE_NC_FREEALL 0 >#endif ># 90 "/usr/src/contrib/ncurses/include/nc_alloc.h" > >#ifndef ExitProgram >#define ExitProgram(code) exit(code) >#endif ># 94 "/usr/src/contrib/ncurses/include/nc_alloc.h" > >/* doalloc.c */ >extern NCURSES_EXPORT(void *) _nc_doalloc(void *, size_t); >#if !HAVE_STRDUP >#undef strdup >#define strdup _nc_strdup >extern NCURSES_EXPORT(char *) _nc_strdup(const char *); >#endif ># 102 "/usr/src/contrib/ncurses/include/nc_alloc.h" > >/* entries.c */ >extern NCURSES_EXPORT(void) _nc_leaks_tinfo(void); > >#define typeMalloc(type,elts) (type *)malloc((size_t)(elts)*sizeof(type)) >#define typeCalloc(type,elts) (type *)calloc((size_t)(elts),sizeof(type)) >#define typeRealloc(type,elts,ptr) (type *)_nc_doalloc(ptr, (size_t)(elts)*sizeof(type)) > >#ifdef __cplusplus >} >#endif ># 113 "/usr/src/contrib/ncurses/include/nc_alloc.h" > >/* *INDENT-ON* */ > >#endif /* NC_ALLOC_included */ ># 117 "/usr/src/contrib/ncurses/include/nc_alloc.h" ># 1529 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" 2 > >/* > * Use these for tic/infocmp malloc failures. Generally the ncurses library > * tries to limp along after a failure. > */ >#define TYPE_MALLOC(type, size, name) \ > name = typeMalloc(type, size); \ > if (name == 0) \ > _nc_err_abort(MSG_NO_MEMORY) > >#define TYPE_REALLOC(type, size, name) \ > name = typeRealloc(type, size, name); \ > if (name == 0) \ > _nc_err_abort(MSG_NO_MEMORY) > >/* > * TTY bit definition for converting tabs to spaces. > */ >#ifdef TAB3 ># define OFLAGS_TABS TAB3 /* POSIX specifies TAB3 */ >#else ># 1550 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" ># ifdef XTABS ># define OFLAGS_TABS XTABS /* XTABS is usually the "same" */ ># else ># 1553 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" ># ifdef OXTABS ># define OFLAGS_TABS OXTABS /* the traditional BSD equivalent */ ># else ># 1556 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" ># define OFLAGS_TABS 0 ># endif ># 1558 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" ># endif ># 1559 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#endif ># 1560 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >/* > * Standardize/simplify common loops > */ >#define each_screen(p) p = _nc_screen_chain; p != 0; p = (p)->_next_screen >#define each_window(sp,p) p = WindowList(sp); p != 0; p = (p)->next >#define each_ripoff(p) p = safe_ripoff_stack; (p - safe_ripoff_stack) < N_RIPS; ++p > >/* > * Prefixes for call/return points of library function traces. We use these to > * instrument the public functions so that the traces can be easily transformed > * into regression scripts. > */ >#define T_CALLED(fmt) "called {" fmt >#define T_CREATE(fmt) "create :" fmt >#define T_RETURN(fmt) "return }" fmt > >#ifdef TRACE > >#if USE_REENTRANT >#define TPUTS_TRACE(s) _nc_set_tputs_trace(s); >#else ># 1582 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#define TPUTS_TRACE(s) _nc_tputs_trace = s; >#endif ># 1584 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#define START_TRACE() \ > if ((_nc_tracing & TRACE_MAXIMUM) == 0) { \ > int t = _nc_getenv_num("NCURSES_TRACE"); \ > if (t >= 0) \ > trace((unsigned) t); \ > } > >/* > * Many of the _tracef() calls use static buffers; lock the trace state before > * trying to fill them. > */ >#if USE_REENTRANT >#define USE_TRACEF(mask) _nc_use_tracef(mask) >extern NCURSES_EXPORT(int) _nc_use_tracef (unsigned); >extern NCURSES_EXPORT(void) _nc_locked_tracef (const char *, ...) GCC_PRINTFLIKE(1,2); >#else ># 1601 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#define USE_TRACEF(mask) (_nc_tracing & (mask)) >#define _nc_locked_tracef _tracef >#endif ># 1604 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#define TR(n, a) if (USE_TRACEF(n)) _nc_locked_tracef a >#define T(a) TR(TRACE_CALLS, a) >#define TRACE_RETURN(value,type) return _nc_retrace_##type(value) >#define TRACE_RETURN2(value,dst,src) return _nc_retrace_##dst##_##src(value) >#define TRACE_RETURN_SP(value,type) return _nc_retrace_##type(SP_PARM, value) > >#define NonNull(s) ((s) != 0 ? s : "<null>") > >#define returnAttr(code) TRACE_RETURN(code,attr_t) >#define returnBits(code) TRACE_RETURN(code,unsigned) >#define returnBool(code) TRACE_RETURN(code,bool) >#define returnCPtr(code) TRACE_RETURN(code,cptr) >#define returnCVoidPtr(code) TRACE_RETURN(code,cvoid_ptr) >#define returnChar(code) TRACE_RETURN(code,char) >#define returnChtype(code) TRACE_RETURN(code,chtype) >#define returnCode(code) TRACE_RETURN(code,int) >#define returnIntAttr(code) TRACE_RETURN2(code,int,attr_t) >#define returnMMask(code) TRACE_RETURN_SP(code,mmask_t) >#define returnPtr(code) TRACE_RETURN(code,ptr) >#define returnSP(code) TRACE_RETURN(code,sp) >#define returnVoid T((T_RETURN(""))); return >#define returnVoidPtr(code) TRACE_RETURN(code,void_ptr) >#define returnWin(code) TRACE_RETURN(code,win) > >extern NCURSES_EXPORT(NCURSES_BOOL) _nc_retrace_bool (int); >extern NCURSES_EXPORT(NCURSES_CONST void *) _nc_retrace_cvoid_ptr (NCURSES_CONST void *); >extern NCURSES_EXPORT(SCREEN *) _nc_retrace_sp (SCREEN *); >extern NCURSES_EXPORT(WINDOW *) _nc_retrace_win (WINDOW *); >extern NCURSES_EXPORT(attr_t) _nc_retrace_attr_t (attr_t); >extern NCURSES_EXPORT(char *) _nc_retrace_ptr (char *); >extern NCURSES_EXPORT(char *) _nc_trace_ttymode(TTY *tty); >extern NCURSES_EXPORT(char *) _nc_varargs (const char *, va_list); >extern NCURSES_EXPORT(chtype) _nc_retrace_chtype (chtype); >extern NCURSES_EXPORT(const char *) _nc_altcharset_name(attr_t, chtype); >extern NCURSES_EXPORT(const char *) _nc_retrace_cptr (const char *); >extern NCURSES_EXPORT(char) _nc_retrace_char (int); >extern NCURSES_EXPORT(int) _nc_retrace_int (int); >extern NCURSES_EXPORT(int) _nc_retrace_int_attr_t (attr_t); >extern NCURSES_EXPORT(mmask_t) _nc_retrace_mmask_t (SCREEN *, mmask_t); >extern NCURSES_EXPORT(unsigned) _nc_retrace_unsigned (unsigned); >extern NCURSES_EXPORT(void *) _nc_retrace_void_ptr (void *); >extern NCURSES_EXPORT(void) _nc_fifo_dump (SCREEN *); > >#if USE_REENTRANT >NCURSES_WRAPPED_VAR(long, _nc_outchars); >NCURSES_WRAPPED_VAR(const char *, _nc_tputs_trace); >#define _nc_outchars NCURSES_PUBLIC_VAR(_nc_outchars()) >#define _nc_tputs_trace NCURSES_PUBLIC_VAR(_nc_tputs_trace()) >extern NCURSES_EXPORT(void) _nc_set_tputs_trace (const char *); >extern NCURSES_EXPORT(void) _nc_count_outchars (long); >#else ># 1656 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >extern NCURSES_EXPORT_VAR(const char *) _nc_tputs_trace; >extern NCURSES_EXPORT_VAR(long) _nc_outchars; >#endif ># 1659 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >extern NCURSES_EXPORT_VAR(unsigned) _nc_tracing; > >#if USE_WIDEC_SUPPORT >extern NCURSES_EXPORT(const char *) _nc_viswbuf2 (int, const wchar_t *); >extern NCURSES_EXPORT(const char *) _nc_viswbufn (const wchar_t *, int); >#endif ># 1666 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >extern NCURSES_EXPORT(const char *) _nc_viscbuf2 (int, const NCURSES_CH_T *, int); >extern NCURSES_EXPORT(const char *) _nc_viscbuf (const NCURSES_CH_T *, int); > >#else /* !TRACE */ ># 1671 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#define START_TRACE() /* nothing */ > >#define T(a) >#define TR(n, a) >#define TPUTS_TRACE(s) > >#define returnAttr(code) return code >#define returnBits(code) return code >#define returnBool(code) return code >#define returnCPtr(code) return code >#define returnCVoidPtr(code) return code >#define returnChar(code) return ((char) code) >#define returnChtype(code) return code >#define returnCode(code) return code >#define returnIntAttr(code) return code >#define returnMMask(code) return code >#define returnPtr(code) return code >#define returnSP(code) return code >#define returnVoid return >#define returnVoidPtr(code) return code >#define returnWin(code) return code > >#endif /* TRACE/!TRACE */ ># 1695 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >/* > * Workaround for defective implementation of gcc attribute warn_unused_result > */ >#if defined(__GNUC__) && defined(_FORTIFY_SOURCE) >#define IGNORE_RC(func) errno = (int) func >#else ># 1702 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#define IGNORE_RC(func) (void) func >#endif /* gcc workarounds */ ># 1704 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >/* > * Return-codes for tgetent() and friends. > */ >#define TGETENT_YES 1 /* entry is found */ >#define TGETENT_NO 0 /* entry is not found */ >#define TGETENT_ERR -1 /* an error occurred */ > >extern NCURSES_EXPORT(const char *) _nc_visbuf2 (int, const char *); >extern NCURSES_EXPORT(const char *) _nc_visbufn (const char *, int); > >#define EMPTY_MODULE(name) \ >extern NCURSES_EXPORT(void) name (void); \ > NCURSES_EXPORT(void) name (void) { } > >#define ALL_BUT_COLOR ((chtype)~(A_COLOR)) >#define NONBLANK_ATTR (A_BOLD | A_DIM | A_BLINK | A_ITALIC) >#define TPARM_ATTR (A_STANDOUT | A_UNDERLINE | A_REVERSE | A_BLINK | A_DIM | A_BOLD | A_ALTCHARSET | A_INVIS | A_PROTECT) >#define XMC_CONFLICT (A_STANDOUT | A_UNDERLINE | A_REVERSE | A_BLINK | A_DIM | A_BOLD | A_INVIS | A_PROTECT | A_ITALIC) >#define XMC_CHANGES(c) ((c) & SP_PARM->_xmc_suppress) > >#define toggle_attr_on(S,at) {\ > if (PairNumber(at) > 0) {\ > (S) = ((S) & ALL_BUT_COLOR) | (attr_t) (at);\ > } else {\ > (S) |= (attr_t) (at);\ > }\ > TR(TRACE_ATTRS, ("new attribute is %s", _traceattr((S))));} > > >#define toggle_attr_off(S,at) {\ > if (PairNumber(at) > 0) {\ > (S) &= ~(at|A_COLOR);\ > } else {\ > (S) &= ~(at);\ > }\ > TR(TRACE_ATTRS, ("new attribute is %s", _traceattr((S))));} > >#define DelCharCost(sp,count) \ > ((parm_dch != 0) \ > ? sp->_dch_cost \ > : ((delete_character != 0) \ > ? (sp->_dch1_cost * count) \ > : INFINITY)) > >#define InsCharCost(sp,count) \ > ((parm_ich != 0) \ > ? sp->_ich_cost \ > : ((enter_insert_mode && exit_insert_mode) \ > ? sp->_smir_cost + sp->_rmir_cost + (sp->_ip_cost * count) \ > : ((insert_character != 0) \ > ? ((sp->_ich1_cost + sp->_ip_cost) * count) \ > : INFINITY))) > >#if USE_XMC_SUPPORT >#define UpdateAttrs(sp,c) if (!SameAttrOf(SCREEN_ATTRS(sp), c)) { \ > attr_t chg = AttrOf(SCREEN_ATTRS(sp)); \ > VIDATTR(sp, AttrOf(c), GetPair(c)); \ > if (magic_cookie_glitch > 0 \ > && XMC_CHANGES((chg ^ AttrOf(SCREEN_ATTRS(sp))))) { \ > T(("%s @%d before glitch %d,%d", \ > __FILE__, __LINE__, \ > sp->_cursrow, \ > sp->_curscol)); \ > NCURSES_SP_NAME(_nc_do_xmc_glitch)(NCURSES_SP_ARGx chg); \ > } \ > } >#else ># 1772 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#define UpdateAttrs(sp,c) if (!SameAttrOf(SCREEN_ATTRS(sp), c)) { \ > VIDATTR(sp, AttrOf(c), GetPair(c)); \ > } >#endif ># 1776 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >/* > * Macros to make additional parameter to implement wgetch_events() > */ >#ifdef NCURSES_WGETCH_EVENTS >#define EVENTLIST_0th(param) param >#define EVENTLIST_1st(param) param >#define EVENTLIST_2nd(param) , param >#define TWAIT_MASK (TW_ANY | TW_EVENT) >#else ># 1786 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#define EVENTLIST_0th(param) void >#define EVENTLIST_1st(param) /* nothing */ >#define EVENTLIST_2nd(param) /* nothing */ >#define TWAIT_MASK TW_ANY >#endif ># 1791 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#if NCURSES_EXPANDED && NCURSES_EXT_FUNCS > >#undef toggle_attr_on >#define toggle_attr_on(S,at) _nc_toggle_attr_on(&(S), at) >extern NCURSES_EXPORT(void) _nc_toggle_attr_on (attr_t *, attr_t); > >#undef toggle_attr_off >#define toggle_attr_off(S,at) _nc_toggle_attr_off(&(S), at) >extern NCURSES_EXPORT(void) _nc_toggle_attr_off (attr_t *, attr_t); > >#undef DelCharCost >#define DelCharCost(sp, count) NCURSES_SP_NAME(_nc_DelCharCost)(NCURSES_SP_ARGx count) > >#undef InsCharCost >#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(sp,c) NCURSES_SP_NAME(_nc_UpdateAttrs)(NCURSES_SP_ARGx CHREF(c)) > >#if USE_WIDEC_SUPPORT || defined(NEED_NCURSES_CH_T) >extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_UpdateAttrs) (NCURSES_SP_DCLx CARG_CH_T _c); >#else ># 1817 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_UpdateAttrs) (NCURSES_SP_DCLx chtype c); >#endif ># 1819 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#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 */ ># 1825 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#else ># 1827 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >extern NCURSES_EXPORT(void) _nc_expanded (void); > >#endif ># 1831 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#if !NCURSES_EXT_FUNCS >#define set_escdelay(value) ESCDELAY = value >#endif ># 1835 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#if !HAVE_GETCWD >#define getcwd(buf,len) getwd(buf) >#endif ># 1839 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >/* charable.c */ >#if USE_WIDEC_SUPPORT >extern NCURSES_EXPORT(bool) _nc_is_charable(wchar_t); >extern NCURSES_EXPORT(int) _nc_to_char(wint_t); >extern NCURSES_EXPORT(wint_t) _nc_to_widechar(int); >#endif ># 1846 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >/* comp_captab.c */ >typedef struct { > short nte_name; /* offset of name to hash on */ > int nte_type; /* BOOLEAN, NUMBER or STRING */ > short nte_index; /* index of associated variable in its array */ > short nte_link; /* index in table of next hash, or -1 */ >} name_table_data; > >typedef struct >{ > short from; > short to; > short source; >} alias_table_data; > >/* doupdate.c */ >#if USE_XMC_SUPPORT >extern NCURSES_EXPORT(void) _nc_do_xmc_glitch (attr_t); >#endif ># 1866 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >/* hardscroll.c */ >#if defined(TRACE) || defined(SCROLLDEBUG) || defined(HASHDEBUG) >extern NCURSES_EXPORT(void) _nc_linedump (void); >#endif ># 1871 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >/* lib_acs.c */ >extern NCURSES_EXPORT(void) _nc_init_acs (void); /* corresponds to traditional 'init_acs()' */ >extern NCURSES_EXPORT(int) _nc_msec_cost (const char *const, int); /* used by 'tack' program */ > >/* lib_addch.c */ >#if USE_WIDEC_SUPPORT >NCURSES_EXPORT(int) _nc_build_wch(WINDOW *win, ARG_CH_T ch); >#endif ># 1880 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >/* lib_addstr.c */ >#if USE_WIDEC_SUPPORT && !(defined(USE_TERMLIB) || defined(USE_BUILD_CC)) >extern NCURSES_EXPORT(int) _nc_wchstrlen(const cchar_t *); >#endif ># 1885 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >/* lib_color.c */ >extern NCURSES_EXPORT(bool) _nc_reset_colors(void); > >/* lib_getch.c */ >extern NCURSES_EXPORT(int) _nc_wgetch(WINDOW *, int *, int EVENTLIST_2nd(_nc_eventlist *)); > >/* lib_insch.c */ >extern NCURSES_EXPORT(int) _nc_insert_ch(SCREEN *, WINDOW *, chtype); > >/* lib_mvcur.c */ >#define INFINITY 1000000 /* cost: too high to use */ > >extern NCURSES_EXPORT(int) _nc_mvcur(int yold, int xold, int ynew, int xnew); > >extern NCURSES_EXPORT(void) _nc_mvcur_init (void); >extern NCURSES_EXPORT(void) _nc_mvcur_resume (void); >extern NCURSES_EXPORT(void) _nc_mvcur_wrap (void); > >extern NCURSES_EXPORT(int) _nc_scrolln (int, int, int, int); > >extern NCURSES_EXPORT(void) _nc_screen_init (void); >extern NCURSES_EXPORT(void) _nc_screen_resume (void); >extern NCURSES_EXPORT(void) _nc_screen_wrap (void); > >/* lib_mouse.c */ >extern NCURSES_EXPORT(bool) _nc_has_mouse (SCREEN *); > >/* lib_mvcur.c */ >#define INFINITY 1000000 /* cost: too high to use */ >#define BAUDBYTE 9 /* 9 = 7 bits + 1 parity + 1 stop */ > >/* lib_setup.c */ >extern NCURSES_EXPORT(char *) _nc_get_locale(void); >extern NCURSES_EXPORT(int) _nc_unicode_locale(void); >extern NCURSES_EXPORT(int) _nc_locale_breaks_acs(TERMINAL *); >extern NCURSES_EXPORT(int) _nc_setupterm(NCURSES_CONST char *, int, int *, int); >extern NCURSES_EXPORT(void) _nc_tinfo_cmdch(TERMINAL *, int); > >/* lib_set_term.c */ >extern NCURSES_EXPORT(int) _nc_ripoffline(int, int(*)(WINDOW*, int)); > >/* lib_setup.c */ >#define ret_error(code, fmt, arg) if (errret) {\ > *errret = code;\ > returnCode(ERR);\ > } else {\ > fprintf(stderr, fmt, arg);\ > exit(EXIT_FAILURE);\ > } > >#define ret_error1(code, fmt, arg) ret_error(code, "'%s': " fmt, arg) > >#define ret_error0(code, msg) if (errret) {\ > *errret = code;\ > returnCode(ERR);\ > } else {\ > fprintf(stderr, msg);\ > exit(EXIT_FAILURE);\ > } > >/* lib_tstp.c */ >#if USE_SIGWINCH >extern NCURSES_EXPORT(int) _nc_handle_sigwinch(SCREEN *); >#else ># 1950 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#define _nc_handle_sigwinch(a) /* nothing */ >#endif ># 1952 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >/* lib_wacs.c */ >#if USE_WIDEC_SUPPORT >extern NCURSES_EXPORT(void) _nc_init_wacs(void); >#endif ># 1957 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >typedef struct { > char *s_head; /* beginning of the string (may be null) */ > char *s_tail; /* end of the string (may be null) */ > size_t s_size; /* current remaining size available */ > size_t s_init; /* total size available */ >} string_desc; > >/* strings.c */ >extern NCURSES_EXPORT(string_desc *) _nc_str_init (string_desc *, char *, size_t); >extern NCURSES_EXPORT(string_desc *) _nc_str_null (string_desc *, size_t); >extern NCURSES_EXPORT(string_desc *) _nc_str_copy (string_desc *, string_desc *); >extern NCURSES_EXPORT(bool) _nc_safe_strcat (string_desc *, const char *); >extern NCURSES_EXPORT(bool) _nc_safe_strcpy (string_desc *, const char *); > >#if !HAVE_STRSTR >#define strstr _nc_strstr >extern NCURSES_EXPORT(char *) _nc_strstr (const char *, const char *); >#endif ># 1976 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >/* safe_sprintf.c */ >extern NCURSES_EXPORT(char *) _nc_printf_string (const char *, va_list); > >/* tries.c */ >extern NCURSES_EXPORT(int) _nc_add_to_try (TRIES **, const char *, unsigned); >extern NCURSES_EXPORT(char *) _nc_expand_try (TRIES *, unsigned, int *, size_t); >extern NCURSES_EXPORT(int) _nc_remove_key (TRIES **, unsigned); >extern NCURSES_EXPORT(int) _nc_remove_string (TRIES **, const char *); > >/* elsewhere ... */ >extern NCURSES_EXPORT(ENTRY *) _nc_delink_entry (ENTRY *, TERMTYPE *); >extern NCURSES_EXPORT(SCREEN *) _nc_screen_of (WINDOW *); >extern NCURSES_EXPORT(TERMINAL*) _nc_get_cur_term (void); >extern NCURSES_EXPORT(WINDOW *) _nc_makenew (int, int, int, int, int); >extern NCURSES_EXPORT(char *) _nc_trace_buf (int, size_t); >extern NCURSES_EXPORT(char *) _nc_trace_bufcat (int, const char *); >extern NCURSES_EXPORT(char *) _nc_tracechar (SCREEN *, int); >extern NCURSES_EXPORT(char *) _nc_tracemouse (SCREEN *, MEVENT const *); >extern NCURSES_EXPORT(int) _nc_access (const char *, int); >extern NCURSES_EXPORT(int) _nc_baudrate (int); >extern NCURSES_EXPORT(int) _nc_freewin (WINDOW *); >extern NCURSES_EXPORT(int) _nc_getenv_num (const char *); >extern NCURSES_EXPORT(int) _nc_keypad (SCREEN *, int); >extern NCURSES_EXPORT(int) _nc_ospeed (int); >extern NCURSES_EXPORT(int) _nc_outch (int); >extern NCURSES_EXPORT(int) _nc_putchar (int); >extern NCURSES_EXPORT(int) _nc_putp(const char *, const char *); >extern NCURSES_EXPORT(int) _nc_putp_flush(const char *, const char *); >extern NCURSES_EXPORT(int) _nc_read_termcap_entry (const char *const, TERMTYPE *const); >extern NCURSES_EXPORT(int) _nc_setup_tinfo(const char *, TERMTYPE *); >extern NCURSES_EXPORT(int) _nc_setupscreen (int, int, FILE *, int, int); >extern NCURSES_EXPORT(int) _nc_timed_wait (SCREEN *, int, int, int * EVENTLIST_2nd(_nc_eventlist *)); >extern NCURSES_EXPORT(void) _nc_do_color (int, int, int, NCURSES_OUTC); >extern NCURSES_EXPORT(void) _nc_flush (void); >extern NCURSES_EXPORT(void) _nc_free_and_exit (int) GCC_NORETURN; >extern NCURSES_EXPORT(void) _nc_free_entry (ENTRY *, TERMTYPE *); >extern NCURSES_EXPORT(void) _nc_freeall (void); >extern NCURSES_EXPORT(void) _nc_hash_map (void); >extern NCURSES_EXPORT(void) _nc_init_keytry (SCREEN *); >extern NCURSES_EXPORT(void) _nc_keep_tic_dir (const char *); >extern NCURSES_EXPORT(void) _nc_make_oldhash (int i); >extern NCURSES_EXPORT(void) _nc_scroll_oldhash (int n, int top, int bot); >extern NCURSES_EXPORT(void) _nc_scroll_optimize (void); >extern NCURSES_EXPORT(void) _nc_set_buffer (FILE *, int); >extern NCURSES_EXPORT(void) _nc_setenv_num (const char *, int); >extern NCURSES_EXPORT(void) _nc_signal_handler (int); >extern NCURSES_EXPORT(void) _nc_synchook (WINDOW *); >extern NCURSES_EXPORT(void) _nc_trace_tries (TRIES *); > >#if NO_LEAKS >extern NCURSES_EXPORT(void) _nc_alloc_entry_leaks(void); >extern NCURSES_EXPORT(void) _nc_captoinfo_leaks(void); >extern NCURSES_EXPORT(void) _nc_codes_leaks(void); >extern NCURSES_EXPORT(void) _nc_comp_captab_leaks(void); >extern NCURSES_EXPORT(void) _nc_comp_error_leaks(void); >extern NCURSES_EXPORT(void) _nc_comp_scan_leaks(void); >extern NCURSES_EXPORT(void) _nc_db_iterator_leaks(void); >extern NCURSES_EXPORT(void) _nc_keyname_leaks(void); >extern NCURSES_EXPORT(void) _nc_names_leaks(void); >extern NCURSES_EXPORT(void) _nc_tgetent_leaks(void); >#endif ># 2038 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#if !(defined(USE_TERMLIB) || defined(USE_BUILD_CC)) >extern NCURSES_EXPORT(NCURSES_CH_T) _nc_render (WINDOW *, NCURSES_CH_T); >extern NCURSES_EXPORT(int) _nc_waddch_nosync (WINDOW *, const NCURSES_CH_T); >extern NCURSES_EXPORT(void) _nc_scroll_window (WINDOW *, int const, int const, int const, NCURSES_CH_T); >#endif ># 2044 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#if USE_WIDEC_SUPPORT >extern NCURSES_EXPORT(int) _nc_insert_wch(WINDOW *, const cchar_t *); >#endif ># 2048 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#if USE_WIDEC_SUPPORT && !(defined(USE_TERMLIB) || defined(USE_BUILD_CC)) >extern NCURSES_EXPORT(size_t) _nc_wcrtomb (char *, wchar_t, mbstate_t *); >#endif ># 2052 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#if USE_SIZECHANGE >extern NCURSES_EXPORT(void) _nc_update_screensize (SCREEN *); >#endif ># 2056 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#if HAVE_RESIZETERM >extern NCURSES_EXPORT(void) _nc_resize_margins (WINDOW *); >#else ># 2060 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#define _nc_resize_margins(wp) /* nothing */ >#endif ># 2062 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#ifdef NCURSES_WGETCH_EVENTS >extern NCURSES_EXPORT(int) _nc_eventlist_timeout(_nc_eventlist *); >#else ># 2066 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#define wgetch_events(win, evl) wgetch(win) >#define wgetnstr_events(win, str, maxlen, evl) wgetnstr(win, str, maxlen) >#endif ># 2069 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >/* > * Wide-character macros to hide some platform-differences. > */ >#if USE_WIDEC_SUPPORT > >#if defined(__MINGW32__) >/* > * MinGW has wide-character functions, but they do not work correctly. > */ > >extern int __MINGW_NOTHROW _nc_wctomb(char *, wchar_t); >#define wctomb(s,wc) _nc_wctomb(s,wc) >#define wcrtomb(s,wc,n) _nc_wctomb(s,wc) > >extern int __MINGW_NOTHROW _nc_mbtowc(wchar_t *, const char *, size_t); >#define mbtowc(pwc,s,n) _nc_mbtowc(pwc,s,n) > >extern int __MINGW_NOTHROW _nc_mblen(const char *, size_t); >#define mblen(s,n) _nc_mblen(s, n) > >#endif /* __MINGW32__ */ ># 2091 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#if HAVE_MBTOWC && HAVE_MBLEN >#define reset_mbytes(state) IGNORE_RC(mblen(NULL, (size_t) 0)), IGNORE_RC(mbtowc(NULL, NULL, (size_t) 0)) >#define count_mbytes(buffer,length,state) mblen(buffer,length) >#define check_mbytes(wch,buffer,length,state) \ > (int) mbtowc(&wch, buffer, length) >#define state_unused >#elif HAVE_MBRTOWC && HAVE_MBRLEN ># 2099 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#define reset_mbytes(state) init_mb(state) >#define count_mbytes(buffer,length,state) mbrlen(buffer,length,&state) >#define check_mbytes(wch,buffer,length,state) \ > (int) mbrtowc(&wch, buffer, length, &state) >#else ># 2104 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >make an error >#endif ># 2106 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#endif /* USE_WIDEC_SUPPORT */ ># 2108 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >/* > * Not everyone has vsscanf(), but we'd like to use it for scanw(). > */ >#if !HAVE_VSSCANF >extern int vsscanf(const char *str, const char *format, va_list __arg); >#endif ># 2115 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >/* scroll indices */ >extern NCURSES_EXPORT_VAR(int *) _nc_oldnums; > >#define USE_SETBUF_0 0 > >#define NC_BUFFERED(sp,flag) NCURSES_SP_NAME(_nc_set_buffer)(NCURSES_SP_ARGx sp->_ofp, flag) > >#define NC_OUTPUT(sp) ((sp != 0) ? sp->_ofp : stdout) > >/* > * On systems with a broken linker, define 'SP' as a function to force the > * linker to pull in the data-only module with 'SP'. > */ >#define _nc_alloc_screen_sp() typeCalloc(SCREEN, 1) > >#if BROKEN_LINKER >#define SP _nc_screen() >extern NCURSES_EXPORT(SCREEN *) _nc_screen (void); >extern NCURSES_EXPORT(int) _nc_alloc_screen (void); >extern NCURSES_EXPORT(void) _nc_set_screen (SCREEN *); >#define CURRENT_SCREEN _nc_screen() >#else ># 2138 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >/* current screen is private data; avoid possible linking conflicts too */ >extern NCURSES_EXPORT_VAR(SCREEN *) SP; >#define CURRENT_SCREEN SP >#define _nc_alloc_screen() ((SP = _nc_alloc_screen_sp()) != 0) >#define _nc_set_screen(sp) SP = sp >#endif ># 2144 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#if NCURSES_SP_FUNCS >#define CURRENT_SCREEN_PRE (IsPreScreen(CURRENT_SCREEN) ? CURRENT_SCREEN : new_prescr()) >#else ># 2148 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#define CURRENT_SCREEN_PRE CURRENT_SCREEN >#endif ># 2150 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >/* > * We don't want to use the lines or columns capabilities internally, because > * if the application is running multiple screens under X, it's quite possible > * they could all have type xterm but have different sizes! So... > */ >#define screen_lines(sp) (sp)->_lines >#define screen_columns(sp) (sp)->_columns > >extern NCURSES_EXPORT(int) _nc_slk_initialize (WINDOW *, int); >extern NCURSES_EXPORT(int) _nc_format_slks (NCURSES_SP_DCLx int _c); > >/* > * Some constants related to SLK's > */ >#define MAX_SKEY_OLD 8 /* count of soft keys */ >#define MAX_SKEY_LEN_OLD 8 /* max length of soft key text */ >#define MAX_SKEY_PC 12 /* This is what most PC's have */ >#define MAX_SKEY_LEN_PC 5 > >/* Macro to check whether or not we use a standard format */ >#define SLK_STDFMT(fmt) (fmt < 3) >/* Macro to determine height of label window */ >#define SLK_LINES(fmt) (SLK_STDFMT(fmt) ? 1 : ((fmt) - 2)) > >#define MAX_SKEY(fmt) (SLK_STDFMT(fmt)? MAX_SKEY_OLD : MAX_SKEY_PC) >#define MAX_SKEY_LEN(fmt) (SLK_STDFMT(fmt)? MAX_SKEY_LEN_OLD : MAX_SKEY_LEN_PC) > >/* > * Common error messages > */ >#define MSG_NO_MEMORY "Out of memory" >#define MSG_NO_INPUTS "Premature EOF" > >extern NCURSES_EXPORT(int) _nc_set_tty_mode(TTY *); >extern NCURSES_EXPORT(int) _nc_get_tty_mode(TTY *); > >/* timed_wait flag definitions */ >#define TW_NONE 0 >#define TW_INPUT 1 >#define TW_MOUSE 2 >#define TW_ANY (TW_INPUT | TW_MOUSE) >#define TW_EVENT 4 > >#define SetSafeOutcWrapper(outc) \ > SCREEN* sp = CURRENT_SCREEN; \ > struct screen outc_wrapper; \ > if (sp==0) { \ > sp = &outc_wrapper; \ > memset(sp,0,sizeof(struct screen)); \ > sp->_outch = _nc_outc_wrapper; \ > }\ > sp->jump = outc > >#ifdef USE_TERM_DRIVER >typedef void* TERM_HANDLE; > >typedef struct _termInfo >{ > bool caninit; > > bool hascolor; > bool initcolor; > bool canchange; > > int tabsize; > > int maxcolors; > int maxpairs; > int nocolorvideo; > > int numbuttons; > int numlabels; > int labelwidth; > int labelheight; > > const color_t* defaultPalette; >} TerminalInfo; > >typedef struct term_driver { > bool isTerminfo; > bool (*CanHandle)(struct DriverTCB*, const char*, int*); > void (*init)(struct DriverTCB*); > void (*release)(struct DriverTCB*); > int (*size)(struct DriverTCB*, int* Line, int *Cols); > int (*sgmode)(struct DriverTCB*, int setFlag, TTY*); > chtype (*conattr)(struct DriverTCB*); > int (*hwcur)(struct DriverTCB*, int yold, int xold, int y, int x); > int (*mode)(struct DriverTCB*, int progFlag, int defFlag); > bool (*rescol)(struct DriverTCB*); > bool (*rescolors)(struct DriverTCB*); > void (*color)(struct DriverTCB*, int fore, int color, int(*)(SCREEN*, int)); > int (*doBeepOrFlash)(struct DriverTCB*, int); > void (*initpair)(struct DriverTCB*, int, int, int); > void (*initcolor)(struct DriverTCB*, int, int, int, int); > void (*docolor)(struct DriverTCB*, int, int, int, int(*)(SCREEN*, int)); > void (*initmouse)(struct DriverTCB*); > int (*testmouse)(struct DriverTCB*, int EVENTLIST_2nd(_nc_eventlist*)); > void (*setfilter)(struct DriverTCB*); > void (*hwlabel)(struct DriverTCB*, int, char*); > void (*hwlabelOnOff)(struct DriverTCB*, int); > int (*update)(struct DriverTCB*); > int (*defaultcolors)(struct DriverTCB*, int, int); > int (*print)(struct DriverTCB*, char*, int); > int (*getsize)(struct DriverTCB*, int*, int*); > int (*setsize)(struct DriverTCB*, int, int); > void (*initacs)(struct DriverTCB*, chtype*, chtype*); > void (*scinit)(SCREEN *); > void (*scexit)(SCREEN *); > int (*twait)(struct DriverTCB*, int, int, int* EVENTLIST_2nd(_nc_eventlist*)); > int (*read)(struct DriverTCB*, int*); > int (*nap)(struct DriverTCB*, int); > int (*kpad)(struct DriverTCB*, int); > int (*kyOk)(struct DriverTCB*, int, int); > bool (*kyExist)(struct DriverTCB*, int); >} TERM_DRIVER; > >typedef struct DriverTCB >{ > TERMINAL term; /* needs to be the first Element !!! */ > TERM_HANDLE inp; /* The input handle of the Terminal */ > TERM_HANDLE out; /* The output handle of the Terminal in shell mode */ > TERM_HANDLE hdl; /* The output handle of the Terminal in prog mode */ > TERM_DRIVER* drv; /* The driver for that Terminal */ > SCREEN* csp; /* The screen that owns that Terminal */ > TerminalInfo info; /* Driver independent core capabilities of the Terminal */ > void* prop; /* Driver dependent property storage to be used by the Driver */ > long magic; >} TERMINAL_CONTROL_BLOCK; > >#define NCDRV_MAGIC(id) (0x47110000 | (id&0xffff)) >#define NCDRV_TINFO 0x01 >#define NCDRV_WINCONSOLE 0x02 > >#define TCBOf(sp) ((TERMINAL_CONTROL_BLOCK*)(TerminalOf(sp))) >#define InfoOf(sp) TCBOf(sp)->info >#define CallDriver(sp,method) TCBOf(sp)->drv->method(TCBOf(sp)) >#define CallDriver_1(sp,method,arg1) TCBOf(sp)->drv->method(TCBOf(sp),arg1) >#define CallDriver_2(sp,method,arg1,arg2) TCBOf(sp)->drv->method(TCBOf(sp),arg1,arg2) >#define CallDriver_3(sp,method,arg1,arg2,arg3) TCBOf(sp)->drv->method(TCBOf(sp),arg1,arg2,arg3) >#define CallDriver_4(sp,method,arg1,arg2,arg3,arg4) TCBOf(sp)->drv->method(TCBOf(sp),arg1,arg2,arg3,arg4) > >extern NCURSES_EXPORT_VAR(const color_t*) _nc_cga_palette; >extern NCURSES_EXPORT_VAR(const color_t*) _nc_hls_palette; > >extern NCURSES_EXPORT(int) _nc_get_driver(TERMINAL_CONTROL_BLOCK*, const char*, int*); >extern NCURSES_EXPORT(void) _nc_get_screensize_ex(SCREEN *, TERMINAL *, int *, int *); >#endif /* USE_TERM_DRIVER */ ># 2298 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >/* > * Entrypoints which are actually provided in the terminal driver, which would > * be an sp-name otherwise. > */ >#ifdef USE_TERM_DRIVER >#define TINFO_HAS_KEY _nc_tinfo_has_key >#define TINFO_DOUPDATE _nc_tinfo_doupdate >#define TINFO_MVCUR _nc_tinfo_mvcur >extern NCURSES_EXPORT(int) TINFO_HAS_KEY(SCREEN*, int); >extern NCURSES_EXPORT(int) TINFO_DOUPDATE(SCREEN *); >extern NCURSES_EXPORT(int) TINFO_MVCUR(SCREEN*, int, int, int, int); >#else ># 2311 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#define TINFO_HAS_KEY NCURSES_SP_NAME(has_key) >#define TINFO_DOUPDATE NCURSES_SP_NAME(doupdate) >#define TINFO_MVCUR NCURSES_SP_NAME(_nc_mvcur) >#endif ># 2315 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >/* > * Entrypoints using an extra parameter with the terminal driver. > */ >#ifdef USE_TERM_DRIVER >extern NCURSES_EXPORT(void) _nc_get_screensize(SCREEN *, TERMINAL *, int *, int *); >extern NCURSES_EXPORT(int) _nc_setupterm_ex(TERMINAL **, NCURSES_CONST char *, int , int *, int); >#define TINFO_GET_SIZE(sp, tp, lp, cp) \ > _nc_get_screensize(sp, tp, lp, cp) >#define TINFO_SET_CURTERM(sp, tp) \ > NCURSES_SP_NAME(set_curterm)(sp, tp) >#define TINFO_SETUP_TERM(tpp, name, fd, err, reuse) \ > _nc_setupterm_ex(tpp, name, fd, err, reuse) >#else /* !USE_TERM_DRIVER */ ># 2329 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >extern NCURSES_EXPORT(void) _nc_get_screensize(SCREEN *, int *, int *); >#define TINFO_GET_SIZE(sp, tp, lp, cp) \ > _nc_get_screensize(sp, lp, cp) >#define TINFO_SET_CURTERM(sp, tp) \ > set_curterm(tp) >#define TINFO_SETUP_TERM(tpp, name, fd, err, reuse) \ > _nc_setupterm(name, fd, err, reuse) >#endif /* !USE_TERM_DRIVER */ ># 2337 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#ifdef USE_TERM_DRIVER >#ifdef __MINGW32__ >#if 0 /* expanded by -frewrite-includes */ >#include <nc_mingw.h> >#endif /* expanded by -frewrite-includes */ ># 2340 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" ># 2341 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >extern NCURSES_EXPORT_VAR(TERM_DRIVER) _nc_WIN_DRIVER; >#endif ># 2343 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >extern NCURSES_EXPORT_VAR(TERM_DRIVER) _nc_TINFO_DRIVER; >#endif ># 2345 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#ifdef USE_TERM_DRIVER >#define IsTermInfo(sp) ((TCBOf(sp) != 0) && ((TCBOf(sp)->drv->isTerminfo))) >#define HasTInfoTerminal(sp) ((0 != TerminalOf(sp)) && IsTermInfo(sp)) >#else ># 2350 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" >#define IsTermInfo(sp) TRUE >#define HasTInfoTerminal(sp) (0 != TerminalOf(sp)) >#endif ># 2353 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#define IsValidTIScreen(sp) (HasTInfoTerminal(sp)) > >/* > * Exported entrypoints beyond the published API > */ >#if NCURSES_SP_FUNCS >extern NCURSES_EXPORT(WINDOW *) _nc_curscr_of(SCREEN*); >extern NCURSES_EXPORT(WINDOW *) _nc_newscr_of(SCREEN*); >extern NCURSES_EXPORT(WINDOW *) _nc_stdscr_of(SCREEN*); >extern NCURSES_EXPORT(int) _nc_outc_wrapper(SCREEN*,int); > >#if USE_REENTRANT >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_TABSIZE)(SCREEN*); >extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(longname)(SCREEN*); >#endif ># 2369 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#if NCURSES_EXT_FUNCS >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_set_tabsize)(SCREEN*, int); >#endif ># 2373 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >/* > * We put the safe versions of various calls here as they are not published > * part of the API up to now > */ >extern NCURSES_EXPORT(TERMINAL*) NCURSES_SP_NAME(_nc_get_cur_term) (SCREEN *sp); >extern NCURSES_EXPORT(WINDOW *) NCURSES_SP_NAME(_nc_makenew) (SCREEN*, int, int, int, int, int); >extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(_nc_reset_colors)(SCREEN*); >extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(_nc_printf_string)(SCREEN*, const char *, va_list); >extern NCURSES_EXPORT(chtype) NCURSES_SP_NAME(_nc_acs_char)(SCREEN*,int); >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_curs_set)(SCREEN*,int); >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_get_tty_mode)(SCREEN*,TTY*); >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_mcprint)(SCREEN*,char*, int); >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_msec_cost)(SCREEN*, const char *, int); >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_mvcur)(SCREEN*, int, int, int, int); >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_outch)(SCREEN*, int); >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_putchar)(SCREEN*, int); >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_putp)(SCREEN*, const char *, const char*); >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_putp_flush)(SCREEN*, const char *, const char *); >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_resetty)(SCREEN*); >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_resize_term)(SCREEN*,int,int); >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_ripoffline)(SCREEN*, int, int (*)(WINDOW *,int)); >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_savetty)(SCREEN*); >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_scr_init)(SCREEN*,const char*); >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_scr_restore)(SCREEN*, const char*); >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_scrolln)(SCREEN*, int, int, int, int); >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_set_tty_mode)(SCREEN*, TTY*); >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_setupscreen)(SCREEN**, int, int, FILE *, int, int); >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_tgetent)(SCREEN*,char*,const char *); >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_tigetnum)(SCREEN*,NCURSES_CONST char*); >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_vid_attr)(SCREEN *, attr_t, NCURSES_COLOR_T, void *); >extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_vidputs)(SCREEN*,chtype,int(*) (SCREEN*, int)); >extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_do_color)(SCREEN*, int, int, int, NCURSES_SP_OUTC); >extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_do_xmc_glitch)(SCREEN*, attr_t); >extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_flush)(SCREEN*); >extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_free_and_exit)(SCREEN*, int) GCC_NORETURN; >extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_freeall)(SCREEN*); >extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_hash_map)(SCREEN*); >extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_init_acs)(SCREEN*); >extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_make_oldhash)(SCREEN*, int i); >extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_mvcur_init)(SCREEN*); >extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_mvcur_resume)(SCREEN*); >extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_mvcur_wrap)(SCREEN*); >extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_screen_init)(SCREEN*); >extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_screen_resume)(SCREEN*); >extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_screen_wrap)(SCREEN*); >extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_scroll_oldhash)(SCREEN*, int n, int top, int bot); >extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_scroll_optimize)(SCREEN*); >extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_set_buffer)(SCREEN*, FILE *, int); > >extern NCURSES_EXPORT(void) _nc_cookie_init(SCREEN *sp); > >#if defined(TRACE) || defined(SCROLLDEBUG) || defined(HASHDEBUG) >extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_linedump)(SCREEN*); >#endif ># 2428 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#if USE_WIDEC_SUPPORT >extern NCURSES_EXPORT(wchar_t *) NCURSES_SP_NAME(_nc_wunctrl)(SCREEN*, cchar_t *); >#endif ># 2432 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#endif /* NCURSES_SP_FUNCS */ ># 2434 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#if NCURSES_SP_FUNCS > >#define safe_keyname NCURSES_SP_NAME(keyname) >#define safe_unctrl NCURSES_SP_NAME(unctrl) >#define safe_ungetch NCURSES_SP_NAME(ungetch) > >#else ># 2442 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#define safe_keyname _nc_keyname >#define safe_unctrl _nc_unctrl >#define safe_ungetch _nc_ungetch > >extern NCURSES_EXPORT(NCURSES_CONST char *) _nc_keyname (SCREEN *, int); >extern NCURSES_EXPORT(int) _nc_ungetch (SCREEN *, int); >extern NCURSES_EXPORT(NCURSES_CONST char *) _nc_unctrl (SCREEN *, chtype); > >#endif ># 2452 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >#ifdef __cplusplus >} >#endif ># 2456 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" > >/* *INDENT-ON* */ > >#endif /* CURSES_PRIV_H */ ># 2460 "/usr/src/contrib/ncurses/ncurses/curses.priv.h" ># 47 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" 2 > >#ifndef CUR >#define CUR SP_TERMTYPE >#endif ># 51 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" > >#if defined __HAIKU__ && defined __BEOS__ >#undef __BEOS__ >#endif ># 55 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" > >#ifdef __BEOS__ >#undef false >#undef true >#if 0 /* expanded by -frewrite-includes */ >#include <OS.h> >#endif /* expanded by -frewrite-includes */ ># 59 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" ># 60 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" >#endif ># 61 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" > >#if defined(TRACE) && HAVE_SYS_TIMES_H && HAVE_TIMES >#define USE_TRACE_TIMES 1 >#else ># 65 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" >#define USE_TRACE_TIMES 0 >#endif ># 67 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" > >#if HAVE_SYS_TIME_H && HAVE_SYS_TIME_SELECT >#if 0 /* expanded by -frewrite-includes */ >#include <sys/time.h> >#endif /* expanded by -frewrite-includes */ ># 69 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" ># 70 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" >#endif ># 71 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" > >#if USE_TRACE_TIMES >#if 0 /* expanded by -frewrite-includes */ >#include <sys/times.h> >#endif /* expanded by -frewrite-includes */ ># 73 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" ># 74 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" >#endif ># 75 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" > >#if USE_FUNC_POLL >#elif HAVE_SELECT ># 78 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" >#if HAVE_SYS_SELECT_H >#if 0 /* expanded by -frewrite-includes */ >#include <sys/select.h> >#endif /* expanded by -frewrite-includes */ ># 79 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" ># 80 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" >#endif ># 81 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" >#endif ># 82 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" > >#if 0 /* expanded by -frewrite-includes */ >#include <ctype.h> >#endif /* expanded by -frewrite-includes */ ># 83 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" ># 1 "/usr/obj/usr/src/tmp/usr/include/ctype.h" 1 3 4 >/* > * Copyright (c) 1989, 1993 > * The Regents of the University of California. All rights reserved. > * (c) UNIX System Laboratories, Inc. > * All or some portions of this file are derived from material licensed > * to the University of California by American Telephone and Telegraph > * Co. or Unix System Laboratories, Inc. and are reproduced herein with > * the permission of UNIX System Laboratories, Inc. > * > * This code is derived from software contributed to Berkeley by > * Paul Borman at Krystal Technologies. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)ctype.h 8.4 (Berkeley) 1/21/94 > * $FreeBSD: stable/11/include/ctype.h 290494 2015-11-07 12:43:35Z bapt $ > */ > >#ifndef _CTYPE_H_ >#define _CTYPE_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 44 "/usr/obj/usr/src/tmp/usr/include/ctype.h" 3 4 ># 45 "/usr/obj/usr/src/tmp/usr/include/ctype.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 45 "/usr/obj/usr/src/tmp/usr/include/ctype.h" 3 4 ># 46 "/usr/obj/usr/src/tmp/usr/include/ctype.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <_ctype.h> >#endif /* expanded by -frewrite-includes */ ># 46 "/usr/obj/usr/src/tmp/usr/include/ctype.h" 3 4 ># 47 "/usr/obj/usr/src/tmp/usr/include/ctype.h" 3 4 > >__BEGIN_DECLS >int isalnum(int); >int isalpha(int); >int iscntrl(int); >int isdigit(int); >int isgraph(int); >int islower(int); >int isprint(int); >int ispunct(int); >int isspace(int); >int isupper(int); >int isxdigit(int); >int tolower(int); >int toupper(int); > >#if __XSI_VISIBLE >int isascii(int); >int toascii(int); >#endif ># 67 "/usr/obj/usr/src/tmp/usr/include/ctype.h" 3 4 > >#if __ISO_C_VISIBLE >= 1999 >int isblank(int); >#endif ># 71 "/usr/obj/usr/src/tmp/usr/include/ctype.h" 3 4 > >#if __BSD_VISIBLE >int digittoint(int); >int ishexnumber(int); >int isideogram(int); >int isnumber(int); >int isphonogram(int); >int isrune(int); >int isspecial(int); >#endif ># 81 "/usr/obj/usr/src/tmp/usr/include/ctype.h" 3 4 > >#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_) >#if 0 /* expanded by -frewrite-includes */ >#include <xlocale/_ctype.h> >#endif /* expanded by -frewrite-includes */ ># 83 "/usr/obj/usr/src/tmp/usr/include/ctype.h" 3 4 ># 1 "/usr/obj/usr/src/tmp/usr/include/xlocale/_ctype.h" 1 3 4 >/*- > * Copyright (c) 2011 The FreeBSD Foundation > * All rights reserved. > * > * This software was developed by David Chisnall under sponsorship from > * the FreeBSD Foundation. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: stable/11/include/xlocale/_ctype.h 290494 2015-11-07 12:43:35Z bapt $ > */ > > >#if (defined(_XLOCALE_WCTYPES) && !defined(_XLOCALE_WCTYPE_H)) || \ > (!defined(_XLOCALE_WCTYPES) && !defined(_XLOCALE_CTYPE_H)) > >#ifdef _XLOCALE_WCTYPES >#define _XLOCALE_WCTYPE_H >#else ># 39 "/usr/obj/usr/src/tmp/usr/include/xlocale/_ctype.h" 3 4 >#define _XLOCALE_CTYPE_H >#endif ># 41 "/usr/obj/usr/src/tmp/usr/include/xlocale/_ctype.h" 3 4 > >#ifndef _LOCALE_T_DEFINED >#define _LOCALE_T_DEFINED >typedef struct _xlocale *locale_t; >#endif ># 46 "/usr/obj/usr/src/tmp/usr/include/xlocale/_ctype.h" 3 4 > >#ifndef _XLOCALE_RUN_FUNCTIONS_DEFINED >#define _XLOCALE_RUN_FUNCTIONS_DEFINED 1 >unsigned long ___runetype_l(__ct_rune_t, locale_t) __pure; >__ct_rune_t ___tolower_l(__ct_rune_t, locale_t) __pure; >__ct_rune_t ___toupper_l(__ct_rune_t, locale_t) __pure; >_RuneLocale *__runes_for_locale(locale_t, int*); >#endif ># 54 "/usr/obj/usr/src/tmp/usr/include/xlocale/_ctype.h" 3 4 > >#ifndef _XLOCALE_INLINE >#if defined(__GNUC__) && !defined(__GNUC_STDC_INLINE__) >/* GNU89 inline has nonstandard semantics. */ >#define _XLOCALE_INLINE extern __inline >#else ># 60 "/usr/obj/usr/src/tmp/usr/include/xlocale/_ctype.h" 3 4 >/* Hack to work around people who define inline away */ >#ifdef inline >#define _XLOCALE_INLINE static __inline >#else ># 64 "/usr/obj/usr/src/tmp/usr/include/xlocale/_ctype.h" 3 4 >/* Define with C++ / C99 compatible semantics */ >#define _XLOCALE_INLINE inline >#endif ># 67 "/usr/obj/usr/src/tmp/usr/include/xlocale/_ctype.h" 3 4 >#endif ># 68 "/usr/obj/usr/src/tmp/usr/include/xlocale/_ctype.h" 3 4 >#endif /* _XLOCALE_INLINE */ ># 69 "/usr/obj/usr/src/tmp/usr/include/xlocale/_ctype.h" 3 4 > >#ifdef _XLOCALE_WCTYPES >_XLOCALE_INLINE int >__maskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); >_XLOCALE_INLINE int >__istype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); > >_XLOCALE_INLINE int >__maskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) >{ > int __limit; > _RuneLocale *runes = __runes_for_locale(__loc, &__limit); > return ((__c < 0 || __c >= _CACHED_RUNES) ? ___runetype_l(__c, __loc) : > runes->__runetype[__c]) & __f; >} > >_XLOCALE_INLINE int >__istype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) >{ > return (!!__maskrune_l(__c, __f, __loc)); >} > >#define XLOCALE_ISCTYPE(fname, cat) \ > _XLOCALE_INLINE int isw##fname##_l(int, locale_t);\ > _XLOCALE_INLINE int isw##fname##_l(int __c, locale_t __l)\ > { return __istype_l(__c, cat, __l); } >#else ># 96 "/usr/obj/usr/src/tmp/usr/include/xlocale/_ctype.h" 3 4 >_XLOCALE_INLINE int >__sbmaskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); >_XLOCALE_INLINE int >__sbistype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); > >_XLOCALE_INLINE int >__sbmaskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) >{ > int __limit; > _RuneLocale *runes = __runes_for_locale(__loc, &__limit); > return (__c < 0 || __c >= __limit) ? 0 : > runes->__runetype[__c] & __f; >} > >_XLOCALE_INLINE int >__sbistype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) >{ > return (!!__sbmaskrune_l(__c, __f, __loc)); >} > >#define XLOCALE_ISCTYPE(__fname, __cat) \ > _XLOCALE_INLINE int is##__fname##_l(int, locale_t); \ > _XLOCALE_INLINE int is##__fname##_l(int __c, locale_t __l)\ > { return __sbistype_l(__c, __cat, __l); } >#endif ># 121 "/usr/obj/usr/src/tmp/usr/include/xlocale/_ctype.h" 3 4 > >XLOCALE_ISCTYPE(alnum, _CTYPE_A|_CTYPE_D|_CTYPE_N) >XLOCALE_ISCTYPE(alpha, _CTYPE_A) >XLOCALE_ISCTYPE(blank, _CTYPE_B) >XLOCALE_ISCTYPE(cntrl, _CTYPE_C) >XLOCALE_ISCTYPE(digit, _CTYPE_D) >XLOCALE_ISCTYPE(graph, _CTYPE_G) >XLOCALE_ISCTYPE(hexnumber, _CTYPE_X) >XLOCALE_ISCTYPE(ideogram, _CTYPE_I) >XLOCALE_ISCTYPE(lower, _CTYPE_L) >XLOCALE_ISCTYPE(number, _CTYPE_D|_CTYPE_N) >XLOCALE_ISCTYPE(phonogram, _CTYPE_Q) >XLOCALE_ISCTYPE(print, _CTYPE_R) >XLOCALE_ISCTYPE(punct, _CTYPE_P) >XLOCALE_ISCTYPE(rune, 0xFFFFFF00L) >XLOCALE_ISCTYPE(space, _CTYPE_S) >XLOCALE_ISCTYPE(special, _CTYPE_T) >XLOCALE_ISCTYPE(upper, _CTYPE_U) >XLOCALE_ISCTYPE(xdigit, _CTYPE_X) >#undef XLOCALE_ISCTYPE > >#ifdef _XLOCALE_WCTYPES >_XLOCALE_INLINE int towlower_l(int, locale_t); >_XLOCALE_INLINE int __wcwidth_l(__ct_rune_t, locale_t); >_XLOCALE_INLINE int towupper_l(int, locale_t); > >_XLOCALE_INLINE int towlower_l(int __c, locale_t __l) >{ > int __limit; > _RuneLocale *__runes = __runes_for_locale(__l, &__limit); > return (__c < 0 || __c >= _CACHED_RUNES) ? ___tolower_l(__c, __l) : > __runes->__maplower[__c]; >} >_XLOCALE_INLINE int towupper_l(int __c, locale_t __l) >{ > int __limit; > _RuneLocale *__runes = __runes_for_locale(__l, &__limit); > return (__c < 0 || __c >= _CACHED_RUNES) ? ___toupper_l(__c, __l) : > __runes->__mapupper[__c]; >} >_XLOCALE_INLINE int >__wcwidth_l(__ct_rune_t _c, locale_t __l) >{ > unsigned int _x; > > if (_c == 0) > return (0); > _x = (unsigned int)__maskrune_l(_c, _CTYPE_SWM|_CTYPE_R, __l); > if ((_x & _CTYPE_SWM) != 0) > return ((_x & _CTYPE_SWM) >> _CTYPE_SWS); > return ((_x & _CTYPE_R) != 0 ? 1 : -1); >} >int iswctype_l(wint_t __wc, wctype_t __charclass, locale_t __l); >wctype_t wctype_l(const char *property, locale_t __l); >wint_t towctrans_l(wint_t __wc, wctrans_t desc, locale_t __l); >wint_t nextwctype_l(wint_t __wc, wctype_t wct, locale_t __l); >wctrans_t wctrans_l(const char *__charclass, locale_t __l); >#undef _XLOCALE_WCTYPES >#else ># 180 "/usr/obj/usr/src/tmp/usr/include/xlocale/_ctype.h" 3 4 >_XLOCALE_INLINE int digittoint_l(int, locale_t); >_XLOCALE_INLINE int tolower_l(int, locale_t); >_XLOCALE_INLINE int toupper_l(int, locale_t); > >_XLOCALE_INLINE int digittoint_l(int __c, locale_t __l) >{ return __sbmaskrune_l((__c), 0xFF, __l); } > >_XLOCALE_INLINE int tolower_l(int __c, locale_t __l) >{ > int __limit; > _RuneLocale *__runes = __runes_for_locale(__l, &__limit); > return (__c < 0 || __c >= __limit) ? __c : > __runes->__maplower[__c]; >} >_XLOCALE_INLINE int toupper_l(int __c, locale_t __l) >{ > int __limit; > _RuneLocale *__runes = __runes_for_locale(__l, &__limit); > return (__c < 0 || __c >= __limit) ? __c : > __runes->__mapupper[__c]; >} >#endif ># 202 "/usr/obj/usr/src/tmp/usr/include/xlocale/_ctype.h" 3 4 >#endif /* (defined(_XLOCALE_WCTYPES) && !defined(_XLOCALE_WCTYPE_H)) || \ > (!defined(_XLOCALE_WCTYPES) && !defined(_XLOCALE_CTYPE_H)) */ ># 204 "/usr/obj/usr/src/tmp/usr/include/xlocale/_ctype.h" 3 4 ># 84 "/usr/obj/usr/src/tmp/usr/include/ctype.h" 2 3 4 >#endif ># 85 "/usr/obj/usr/src/tmp/usr/include/ctype.h" 3 4 >__END_DECLS > >#ifndef __cplusplus >#define isalnum(c) __sbistype((c), _CTYPE_A|_CTYPE_D|_CTYPE_N) >#define isalpha(c) __sbistype((c), _CTYPE_A) >#define iscntrl(c) __sbistype((c), _CTYPE_C) >#define isdigit(c) __sbistype((c), _CTYPE_D) >#define isgraph(c) __sbistype((c), _CTYPE_G) >#define islower(c) __sbistype((c), _CTYPE_L) >#define isprint(c) __sbistype((c), _CTYPE_R) >#define ispunct(c) __sbistype((c), _CTYPE_P) >#define isspace(c) __sbistype((c), _CTYPE_S) >#define isupper(c) __sbistype((c), _CTYPE_U) >#define isxdigit(c) __sbistype((c), _CTYPE_X) >#define tolower(c) __sbtolower(c) >#define toupper(c) __sbtoupper(c) >#endif /* !__cplusplus */ ># 102 "/usr/obj/usr/src/tmp/usr/include/ctype.h" 3 4 > >#if __XSI_VISIBLE >/* > * POSIX.1-2001 specifies _tolower() and _toupper() to be macros equivalent to > * tolower() and toupper() respectively, minus extra checking to ensure that > * the argument is a lower or uppercase letter respectively. We've chosen to > * implement these macros with the same error checking as tolower() and > * toupper() since this doesn't violate the specification itself, only its > * intent. We purposely leave _tolower() and _toupper() undocumented to > * discourage their use. > * > * XXX isascii() and toascii() should similarly be undocumented. > */ >#define _tolower(c) __sbtolower(c) >#define _toupper(c) __sbtoupper(c) >#define isascii(c) (((c) & ~0x7F) == 0) >#define toascii(c) ((c) & 0x7F) >#endif ># 120 "/usr/obj/usr/src/tmp/usr/include/ctype.h" 3 4 > >#if __ISO_C_VISIBLE >= 1999 && !defined(__cplusplus) >#define isblank(c) __sbistype((c), _CTYPE_B) >#endif ># 124 "/usr/obj/usr/src/tmp/usr/include/ctype.h" 3 4 > >#if __BSD_VISIBLE >#define digittoint(c) __sbmaskrune((c), 0xFF) >#define ishexnumber(c) __sbistype((c), _CTYPE_X) >#define isideogram(c) __sbistype((c), _CTYPE_I) >#define isnumber(c) __sbistype((c), _CTYPE_D|_CTYPE_N) >#define isphonogram(c) __sbistype((c), _CTYPE_Q) >#define isrune(c) __sbistype((c), 0xFFFFFF00L) >#define isspecial(c) __sbistype((c), _CTYPE_T) >#endif ># 134 "/usr/obj/usr/src/tmp/usr/include/ctype.h" 3 4 > >#endif /* !_CTYPE_H_ */ ># 136 "/usr/obj/usr/src/tmp/usr/include/ctype.h" 3 4 ># 84 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" 2 > >MODULE_ID("$Id: tty_update.c,v 1.277 2014/02/01 22:09:27 tom Exp $") > >/* > * This define controls the line-breakout optimization. Every once in a > * while during screen refresh, we want to check for input and abort the > * update if there's some waiting. CHECK_INTERVAL controls the number of > * changed lines to be emitted between input checks. > * > * Note: Input-check-and-abort is no longer done if the screen is being > * updated from scratch. This is a feature, not a bug. > */ >#define CHECK_INTERVAL 5 > >#define FILL_BCE(sp) (sp->_coloron && !sp->_default_color && !back_color_erase) > >static const NCURSES_CH_T blankchar = NewChar(BLANK_TEXT); >static NCURSES_CH_T normal = NewChar(BLANK_TEXT); > >/* > * Enable checking to see if doupdate and friends are tracking the true > * cursor position correctly. NOTE: this is a debugging hack which will > * work ONLY on ANSI-compatible terminals! > */ >/* #define POSITION_DEBUG */ > >static NCURSES_INLINE NCURSES_CH_T ClrBlank(NCURSES_SP_DCLx WINDOW *win); > >#if NCURSES_SP_FUNCS >static int ClrBottom(SCREEN *, int total); >static void ClearScreen(SCREEN *, NCURSES_CH_T blank); >static void ClrUpdate(SCREEN *); >static void DelChar(SCREEN *, int count); >static void InsStr(SCREEN *, NCURSES_CH_T * line, int count); >static void TransformLine(SCREEN *, int const lineno); >#else ># 120 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" >static int ClrBottom(int total); >static void ClearScreen(NCURSES_CH_T blank); >static void ClrUpdate(void); >static void DelChar(int count); >static void InsStr(NCURSES_CH_T * line, int count); >static void TransformLine(int const lineno); >#endif ># 127 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" > >#ifdef POSITION_DEBUG >/**************************************************************************** > * > * Debugging code. Only works on ANSI-standard terminals. > * > ****************************************************************************/ > >static void >position_check(NCURSES_SP_DCLx int expected_y, int expected_x, char *legend) >/* check to see if the real cursor position matches the virtual */ >{ > char buf[20]; > char *s; > int y, x; > > if (!_nc_tracing || (expected_y < 0 && expected_x < 0)) > return; > > NCURSES_SP_NAME(_nc_flush) (NCURSES_SP_ARG); > memset(buf, '\0', sizeof(buf)); > NCURSES_PUTP2_FLUSH("cpr", "\033[6n"); /* only works on ANSI-compatibles */ > *(s = buf) = 0; > do { > int ask = sizeof(buf) - 1 - (s - buf); > int got = read(0, s, ask); > if (got == 0) > break; > s += got; > } while (strchr(buf, 'R') == 0); > _tracef("probe returned %s", _nc_visbuf(buf)); > > /* try to interpret as a position report */ > if (sscanf(buf, "\033[%d;%dR", &y, &x) != 2) { > _tracef("position probe failed in %s", legend); > } else { > if (expected_x < 0) > expected_x = x - 1; > if (expected_y < 0) > expected_y = y - 1; > if (y - 1 != expected_y || x - 1 != expected_x) { > NCURSES_SP_NAME(beep) (NCURSES_SP_ARG); > NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx > tparm("\033[%d;%dH", > expected_y + 1, > expected_x + 1), > 1, NCURSES_SP_NAME(_nc_outch)); > _tracef("position seen (%d, %d) doesn't match expected one (%d, %d) in %s", > y - 1, x - 1, expected_y, expected_x, legend); > } else { > _tracef("position matches OK in %s", legend); > } > } >} >#else ># 182 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" >#define position_check(sp, expected_y, expected_x, legend) /* nothing */ >#endif /* POSITION_DEBUG */ ># 184 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" > >/**************************************************************************** > * > * Optimized update code > * > ****************************************************************************/ > >static NCURSES_INLINE void >GoTo(NCURSES_SP_DCLx int const row, int const col) >{ > TR(TRACE_MOVE, ("GoTo(%p, %d, %d) from (%d, %d)", > (void *) SP_PARM, row, col, SP_PARM->_cursrow, SP_PARM->_curscol)); > > position_check(SP_PARM, SP_PARM->_cursrow, SP_PARM->_curscol, "GoTo"); > > TINFO_MVCUR(NCURSES_SP_ARGx > SP_PARM->_cursrow, > SP_PARM->_curscol, > row, col); > position_check(SP_PARM, SP_PARM->_cursrow, SP_PARM->_curscol, "GoTo2"); >} > >static NCURSES_INLINE void >PutAttrChar(NCURSES_SP_DCLx CARG_CH_T ch) >{ > int chlen = 1; > NCURSES_CH_T my_ch; >#if USE_WIDEC_SUPPORT > PUTC_DATA; >#endif ># 214 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" > NCURSES_CH_T tilde; > NCURSES_CH_T attr = CHDEREF(ch); > > TR(TRACE_CHARPUT, ("PutAttrChar(%s) at (%d, %d)", > _tracech_t(ch), > SP_PARM->_cursrow, SP_PARM->_curscol)); >#if USE_WIDEC_SUPPORT > /* > * If this is not a valid character, there is nothing more to do. > */ > if (isWidecExt(CHDEREF(ch))) { > TR(TRACE_CHARPUT, ("...skip")); > return; > } > /* > * Determine the number of character cells which the 'ch' value will use > * on the screen. It should be at least one. > */ > if ((chlen = wcwidth(CharOf(CHDEREF(ch)))) <= 0) { > static const NCURSES_CH_T blank = NewChar(BLANK_TEXT); > > /* > * If the character falls into any of these special cases, do > * not force the result to a blank: > * > * a) it is printable (this works around a bug in wcwidth()). > * b) use_legacy_coding() has been called to modify the treatment > * of codes 128-255. > * c) the acs_map[] has been initialized to allow codes 0-31 > * to be rendered. This supports Linux console's "PC" > * characters. Codes 128-255 are allowed though this is > * not checked. > */ > if (is8bits(CharOf(CHDEREF(ch))) > && (isprint(CharOf(CHDEREF(ch))) > || (SP_PARM->_legacy_coding > 0 && CharOf(CHDEREF(ch)) >= 160) > || (SP_PARM->_legacy_coding > 1 && CharOf(CHDEREF(ch)) >= 128) > || (AttrOf(attr) & A_ALTCHARSET > && ((CharOfD(ch) < ACS_LEN > && SP_PARM->_acs_map != 0 > && SP_PARM->_acs_map[CharOfD(ch)] != 0) > || (CharOfD(ch) >= 128))))) { > ; > } else { > ch = CHREF(blank); > TR(TRACE_CHARPUT, ("forced to blank")); > } > chlen = 1; > } >#endif ># 264 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" > > if ((AttrOf(attr) & A_ALTCHARSET) > && SP_PARM->_acs_map != 0 > && CharOfD(ch) < ACS_LEN) { > my_ch = CHDEREF(ch); /* work around const param */ >#if USE_WIDEC_SUPPORT > /* > * This is crude & ugly, but works most of the time. It checks if the > * acs_chars string specified that we have a mapping for this > * character, and uses the wide-character mapping when we expect the > * normal one to be broken (by mis-design ;-). > */ > if (SP_PARM->_screen_acs_fix > && SP_PARM->_screen_acs_map[CharOf(my_ch)]) { > RemAttr(attr, A_ALTCHARSET); > my_ch = _nc_wacs[CharOf(my_ch)]; > } else if (SP_PARM->_screen_unicode > && !SP_PARM->_screen_acs_map[CharOf(my_ch)] > && _nc_wacs[CharOf(my_ch)].chars[0]) { > RemAttr(attr, A_ALTCHARSET); > my_ch = _nc_wacs[CharOf(my_ch)]; > } >#endif ># 287 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" > /* > * If we (still) have alternate character set, it is the normal 8bit > * flavor. The _screen_acs_map[] array tells if the character was > * really in acs_chars, needed because of the way wide/normal line > * drawing flavors are integrated. > */ > if (AttrOf(attr) & A_ALTCHARSET) { > int j = CharOfD(ch); > chtype temp = UChar(SP_PARM->_acs_map[j]); > > if (temp != 0) { > SetChar(my_ch, temp, AttrOf(attr)); > } else { > my_ch = CHDEREF(ch); > RemAttr(attr, A_ALTCHARSET); > } > } > ch = CHREF(my_ch); > } > if (tilde_glitch && (CharOfD(ch) == L('~'))) { > SetChar(tilde, L('`'), AttrOf(attr)); > ch = CHREF(tilde); > } > > UpdateAttrs(SP_PARM, attr); > PUTC(CHDEREF(ch)); >#if !USE_WIDEC_SUPPORT > COUNT_OUTCHARS(1); >#endif ># 316 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" > SP_PARM->_curscol += chlen; > if (char_padding) { > NCURSES_PUTP2("char_padding", char_padding); > } >} > >static bool >check_pending(NCURSES_SP_DCL0) >/* check for pending input */ >{ > bool have_pending = FALSE; > > /* > * Only carry out this check when the flag is zero, otherwise we'll > * have the refreshing slow down drastically (or stop) if there's an > * unread character available. > */ > if (SP_PARM->_fifohold != 0) > return FALSE; > > if (SP_PARM->_checkfd >= 0) { >#if USE_FUNC_POLL > struct pollfd fds[1]; > fds[0].fd = SP_PARM->_checkfd; > fds[0].events = POLLIN; > if (poll(fds, (size_t) 1, 0) > 0) { > have_pending = TRUE; > } >#elif defined(__BEOS__) ># 345 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" > /* > * BeOS's select() is declared in socket.h, so the configure script does > * not see it. That's just as well, since that function works only for > * sockets. This (using snooze and ioctl) was distilled from Be's patch > * for ncurses which uses a separate thread to simulate select(). > * > * FIXME: the return values from the ioctl aren't very clear if we get > * interrupted. > */ > int n = 0; > int howmany = ioctl(0, 'ichr', &n); > if (howmany >= 0 && n > 0) { > have_pending = TRUE; > } >#elif HAVE_SELECT ># 360 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" > fd_set fdset; > struct timeval ktimeout; > > ktimeout.tv_sec = > ktimeout.tv_usec = 0; > > FD_ZERO(&fdset); > FD_SET(SP_PARM->_checkfd, &fdset); > if (select(SP_PARM->_checkfd + 1, &fdset, NULL, NULL, &ktimeout) != 0) { > have_pending = TRUE; > } >#endif ># 372 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" > } > if (have_pending) { > SP_PARM->_fifohold = 5; > NCURSES_SP_NAME(_nc_flush) (NCURSES_SP_ARG); > } > return FALSE; >} > >/* put char at lower right corner */ >static void >PutCharLR(NCURSES_SP_DCLx const ARG_CH_T ch) >{ > if (!auto_right_margin) { > /* we can put the char directly */ > PutAttrChar(NCURSES_SP_ARGx ch); > } else if (enter_am_mode && exit_am_mode) { > /* we can suppress automargin */ > NCURSES_PUTP2("exit_am_mode", exit_am_mode); > > PutAttrChar(NCURSES_SP_ARGx ch); > SP_PARM->_curscol--; > position_check(SP_PARM, > SP_PARM->_cursrow, > SP_PARM->_curscol, > "exit_am_mode"); > > NCURSES_PUTP2("enter_am_mode", enter_am_mode); > } else if ((enter_insert_mode && exit_insert_mode) > || insert_character || parm_ich) { > GoTo(NCURSES_SP_ARGx > screen_lines(SP_PARM) - 1, > screen_columns(SP_PARM) - 2); > PutAttrChar(NCURSES_SP_ARGx ch); > GoTo(NCURSES_SP_ARGx > screen_lines(SP_PARM) - 1, > screen_columns(SP_PARM) - 2); > InsStr(NCURSES_SP_ARGx > NewScreen(SP_PARM)->_line[screen_lines(SP_PARM) - 1].text + > screen_columns(SP_PARM) - 2, 1); > } >} > >/* > * Wrap the cursor position, i.e., advance to the beginning of the next line. > */ >static void >wrap_cursor(NCURSES_SP_DCL0) >{ > if (eat_newline_glitch) { > /* > * xenl can manifest two different ways. The vt100 way is that, when > * you'd expect the cursor to wrap, it stays hung at the right margin > * (on top of the character just emitted) and doesn't wrap until the > * *next* graphic char is emitted. The c100 way is to ignore LF > * received just after an am wrap. > * > * An aggressive way to handle this would be to emit CR/LF after the > * char and then assume the wrap is done, you're on the first position > * of the next line, and the terminal out of its weird state. Here > * it's safe to just tell the code that the cursor is in hyperspace and > * let the next mvcur() call straighten things out. > */ > SP_PARM->_curscol = -1; > SP_PARM->_cursrow = -1; > } else if (auto_right_margin) { > SP_PARM->_curscol = 0; > SP_PARM->_cursrow++; > /* > * We've actually moved - but may have to work around problems with > * video attributes not working. > */ > if (!move_standout_mode && AttrOf(SCREEN_ATTRS(SP_PARM))) { > TR(TRACE_CHARPUT, ("turning off (%#lx) %s before wrapping", > (unsigned long) AttrOf(SCREEN_ATTRS(SP_PARM)), > _traceattr(AttrOf(SCREEN_ATTRS(SP_PARM))))); > (void) VIDATTR(SP_PARM, A_NORMAL, 0); > } > } else { > SP_PARM->_curscol--; > } > position_check(SP_PARM, > SP_PARM->_cursrow, > SP_PARM->_curscol, > "wrap_cursor"); >} > >static NCURSES_INLINE void >PutChar(NCURSES_SP_DCLx const ARG_CH_T ch) >/* insert character, handling automargin stuff */ >{ > if (SP_PARM->_cursrow == screen_lines(SP_PARM) - 1 && > SP_PARM->_curscol == screen_columns(SP_PARM) - 1) { > PutCharLR(NCURSES_SP_ARGx ch); > } else { > PutAttrChar(NCURSES_SP_ARGx ch); > } > > if (SP_PARM->_curscol >= screen_columns(SP_PARM)) > wrap_cursor(NCURSES_SP_ARG); > > position_check(SP_PARM, SP_PARM->_cursrow, SP_PARM->_curscol, "PutChar"); >} > >/* > * Check whether the given character can be output by clearing commands. This > * includes test for being a space and not including any 'bad' attributes, such > * as A_REVERSE. All attribute flags which don't affect appearance of a space > * or can be output by clearing (A_COLOR in case of bce-terminal) are excluded. > */ >static NCURSES_INLINE bool >can_clear_with(NCURSES_SP_DCLx ARG_CH_T ch) >{ > if (!back_color_erase && SP_PARM->_coloron) { >#if NCURSES_EXT_FUNCS > int pair; > > if (!SP_PARM->_default_color) > return FALSE; > if (SP_PARM->_default_fg != C_MASK || SP_PARM->_default_bg != C_MASK) > return FALSE; > if ((pair = GetPair(CHDEREF(ch))) != 0) { > NCURSES_COLOR_T fg, bg; > if (NCURSES_SP_NAME(pair_content) (NCURSES_SP_ARGx > (short) pair, > &fg, &bg) == ERR > || (fg != C_MASK || bg != C_MASK)) { > return FALSE; > } > } >#else ># 502 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" > if (AttrOfD(ch) & A_COLOR) > return FALSE; >#endif ># 505 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" > } > return (ISBLANK(CHDEREF(ch)) && > (AttrOfD(ch) & ~(NONBLANK_ATTR | A_COLOR)) == BLANK_ATTR); >} > >/* > * Issue a given span of characters from an array. > * Must be functionally equivalent to: > * for (i = 0; i < num; i++) > * PutChar(ntext[i]); > * but can leave the cursor positioned at the middle of the interval. > * > * Returns: 0 - cursor is at the end of interval > * 1 - cursor is somewhere in the middle > * > * This code is optimized using ech and rep. > */ >static int >EmitRange(NCURSES_SP_DCLx const NCURSES_CH_T * ntext, int num) >{ > int i; > > TR(TRACE_CHARPUT, ("EmitRange %d:%s", num, _nc_viscbuf(ntext, num))); > > if (erase_chars || repeat_char) { > while (num > 0) { > int runcount; > NCURSES_CH_T ntext0; > > while (num > 1 && !CharEq(ntext[0], ntext[1])) { > PutChar(NCURSES_SP_ARGx CHREF(ntext[0])); > ntext++; > num--; > } > ntext0 = ntext[0]; > if (num == 1) { > PutChar(NCURSES_SP_ARGx CHREF(ntext0)); > return 0; > } > runcount = 2; > > while (runcount < num && CharEq(ntext[runcount], ntext0)) > runcount++; > > /* > * The cost expression in the middle isn't exactly right. > * _cup_ch_cost is an upper bound on the cost for moving to the > * end of the erased area, but not the cost itself (which we > * can't compute without emitting the move). This may result > * in erase_chars not getting used in some situations for > * which it would be marginally advantageous. > */ > if (erase_chars > && runcount > SP_PARM->_ech_cost + SP_PARM->_cup_ch_cost > && can_clear_with(NCURSES_SP_ARGx CHREF(ntext0))) { > UpdateAttrs(SP_PARM, ntext0); > NCURSES_PUTP2("erase_chars", TPARM_1(erase_chars, runcount)); > > /* > * If this is the last part of the given interval, > * don't bother moving cursor, since it can be the > * last update on the line. > */ > if (runcount < num) { > GoTo(NCURSES_SP_ARGx > SP_PARM->_cursrow, > SP_PARM->_curscol + runcount); > } else { > return 1; /* cursor stays in the middle */ > } > } else if (repeat_char && runcount > SP_PARM->_rep_cost) { > bool wrap_possible = (SP_PARM->_curscol + runcount >= > screen_columns(SP_PARM)); > int rep_count = runcount; > > if (wrap_possible) > rep_count--; > > UpdateAttrs(SP_PARM, ntext0); > NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx > TPARM_2(repeat_char, > CharOf(ntext0), > rep_count), > rep_count, > NCURSES_SP_NAME(_nc_outch)); > SP_PARM->_curscol += rep_count; > > if (wrap_possible) > PutChar(NCURSES_SP_ARGx CHREF(ntext0)); > } else { > for (i = 0; i < runcount; i++) > PutChar(NCURSES_SP_ARGx CHREF(ntext[i])); > } > ntext += runcount; > num -= runcount; > } > return 0; > } > > for (i = 0; i < num; i++) > PutChar(NCURSES_SP_ARGx CHREF(ntext[i])); > return 0; >} > >/* > * Output the line in the given range [first .. last] > * > * If there's a run of identical characters that's long enough to justify > * cursor movement, use that also. > * > * Returns: same as EmitRange > */ >static int >PutRange(NCURSES_SP_DCLx > const NCURSES_CH_T * otext, > const NCURSES_CH_T * ntext, > int row, > int first, int last) >{ > int i, j, same; > > TR(TRACE_CHARPUT, ("PutRange(%p, %p, %p, %d, %d, %d)", > (void *) SP_PARM, > (const void *) otext, > (const void *) ntext, > row, first, last)); > > if (otext != ntext > && (last - first + 1) > SP_PARM->_inline_cost) { > for (j = first, same = 0; j <= last; j++) { > if (!same && isWidecExt(otext[j])) > continue; > if (CharEq(otext[j], ntext[j])) { > same++; > } else { > if (same > SP_PARM->_inline_cost) { > EmitRange(NCURSES_SP_ARGx ntext + first, j - same - first); > GoTo(NCURSES_SP_ARGx row, first = j); > } > same = 0; > } > } > i = EmitRange(NCURSES_SP_ARGx ntext + first, j - same - first); > /* > * Always return 1 for the next GoTo() after a PutRange() if we found > * identical characters at end of interval > */ > return (same == 0 ? i : 1); > } > return EmitRange(NCURSES_SP_ARGx ntext + first, last - first + 1); >} > >/* leave unbracketed here so 'indent' works */ >#define MARK_NOCHANGE(win,row) \ > win->_line[row].firstchar = _NOCHANGE; \ > win->_line[row].lastchar = _NOCHANGE; \ > if_USE_SCROLL_HINTS(win->_line[row].oldindex = row) > >NCURSES_EXPORT(int) >TINFO_DOUPDATE(NCURSES_SP_DCL0) >{ > int i; > int nonempty; >#if USE_TRACE_TIMES > struct tms before, after; >#endif /* USE_TRACE_TIMES */ ># 671 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" > > T((T_CALLED("_nc_tinfo:doupdate(%p)"), (void *) SP_PARM)); > > if (SP_PARM == 0) > returnCode(ERR); > >#if !USE_REENTRANT > /* > * It is "legal" but unlikely that an application could assign a new > * value to one of the standard windows. Check for that possibility > * and try to recover. > * > * We do not allow applications to assign new values in the reentrant > * model. > */ >#define SyncScreens(internal,exported) \ > if (internal == 0) internal = exported; \ > if (internal != exported) exported = internal > > SyncScreens(CurScreen(SP_PARM), curscr); > SyncScreens(NewScreen(SP_PARM), newscr); > SyncScreens(StdScreen(SP_PARM), stdscr); >#endif ># 694 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" > > if (CurScreen(SP_PARM) == 0 > || NewScreen(SP_PARM) == 0 > || StdScreen(SP_PARM) == 0) > returnCode(ERR); > >#ifdef TRACE > if (USE_TRACEF(TRACE_UPDATE)) { > if (CurScreen(SP_PARM)->_clear) > _tracef("curscr is clear"); > else > _tracedump("curscr", CurScreen(SP_PARM)); > _tracedump("newscr", NewScreen(SP_PARM)); > _nc_unlock_global(tracef); > } >#endif /* TRACE */ ># 710 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" > > _nc_signal_handler(FALSE); > > if (SP_PARM->_fifohold) > SP_PARM->_fifohold--; > >#if USE_SIZECHANGE > if (SP_PARM->_endwin || _nc_handle_sigwinch(SP_PARM)) { > /* > * This is a transparent extension: XSI does not address it, > * and applications need not know that ncurses can do it. > * > * Check if the terminal size has changed while curses was off > * (this can happen in an xterm, for example), and resize the > * ncurses data structures accordingly. > */ > _nc_update_screensize(SP_PARM); > } >#endif ># 729 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" > > if (SP_PARM->_endwin) { > > T(("coming back from shell mode")); > NCURSES_SP_NAME(reset_prog_mode) (NCURSES_SP_ARG); > > NCURSES_SP_NAME(_nc_mvcur_resume) (NCURSES_SP_ARG); > NCURSES_SP_NAME(_nc_screen_resume) (NCURSES_SP_ARG); > SP_PARM->_mouse_resume(SP_PARM); > > SP_PARM->_endwin = FALSE; > } >#if USE_TRACE_TIMES > /* zero the metering machinery */ > RESET_OUTCHARS(); > (void) times(&before); >#endif /* USE_TRACE_TIMES */ ># 746 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" > > /* > * This is the support for magic-cookie terminals. The theory: we scan > * the virtual screen looking for attribute turnons. Where we find one, > * check to make sure it's realizable by seeing if the required number of > * un-attributed blanks are present before and after the attributed range; > * try to shift the range boundaries over blanks (not changing the screen > * display) so this becomes true. If it is, shift the beginning attribute > * change appropriately (the end one, if we've gotten this far, is > * guaranteed room for its cookie). If not, nuke the added attributes out > * of the span. > */ >#if USE_XMC_SUPPORT > if (magic_cookie_glitch > 0) { > int j, k; > attr_t rattr = A_NORMAL; > > for (i = 0; i < screen_lines(SP_PARM); i++) { > for (j = 0; j < screen_columns(SP_PARM); j++) { > bool failed = FALSE; > NCURSES_CH_T *thisline = NewScreen(SP_PARM)->_line[i].text; > attr_t thisattr = AttrOf(thisline[j]) & SP_PARM->_xmc_triggers; > attr_t turnon = thisattr & ~rattr; > > /* is an attribute turned on here? */ > if (turnon == 0) { > rattr = thisattr; > continue; > } > > TR(TRACE_ATTRS, ("At (%d, %d): from %s...", i, j, _traceattr(rattr))); > TR(TRACE_ATTRS, ("...to %s", _traceattr(turnon))); > > /* > * If the attribute change location is a blank with a "safe" > * attribute, undo the attribute turnon. This may ensure > * there's enough room to set the attribute before the first > * non-blank in the run. > */ >#define SAFE(scr,a) (!((a) & (scr)->_xmc_triggers)) > if (ISBLANK(thisline[j]) && SAFE(SP_PARM, turnon)) { > RemAttr(thisline[j], turnon); > continue; > } > > /* check that there's enough room at start of span */ > for (k = 1; k <= magic_cookie_glitch; k++) { > if (j - k < 0 > || !ISBLANK(thisline[j - k]) > || !SAFE(SP_PARM, AttrOf(thisline[j - k]))) { > failed = TRUE; > TR(TRACE_ATTRS, ("No room at start in %d,%d%s%s", > i, j - k, > (ISBLANK(thisline[j - k]) > ? "" > : ":nonblank"), > (SAFE(SP_PARM, AttrOf(thisline[j - k])) > ? "" > : ":unsafe"))); > break; > } > } > if (!failed) { > bool end_onscreen = FALSE; > int m, n = j; > > /* find end of span, if it's onscreen */ > for (m = i; m < screen_lines(SP_PARM); m++) { > for (; n < screen_columns(SP_PARM); n++) { > attr_t testattr = > AttrOf(NewScreen(SP_PARM)->_line[m].text[n]); > if ((testattr & SP_PARM->_xmc_triggers) == rattr) { > end_onscreen = TRUE; > TR(TRACE_ATTRS, > ("Range attributed with %s ends at (%d, %d)", > _traceattr(turnon), m, n)); > goto foundit; > } > } > n = 0; > } > TR(TRACE_ATTRS, > ("Range attributed with %s ends offscreen", > _traceattr(turnon))); > foundit:; > > if (end_onscreen) { > NCURSES_CH_T *lastline = > NewScreen(SP_PARM)->_line[m].text; > > /* > * If there are safely-attributed blanks at the end of > * the range, shorten the range. This will help ensure > * that there is enough room at end of span. > */ > while (n >= 0 > && ISBLANK(lastline[n]) > && SAFE(SP_PARM, AttrOf(lastline[n]))) { > RemAttr(lastline[n--], turnon); > } > > /* check that there's enough room at end of span */ > for (k = 1; k <= magic_cookie_glitch; k++) { > if (n + k >= screen_columns(SP_PARM) > || !ISBLANK(lastline[n + k]) > || !SAFE(SP_PARM, AttrOf(lastline[n + k]))) { > failed = TRUE; > TR(TRACE_ATTRS, > ("No room at end in %d,%d%s%s", > i, j - k, > (ISBLANK(lastline[n + k]) > ? "" > : ":nonblank"), > (SAFE(SP_PARM, AttrOf(lastline[n + k])) > ? "" > : ":unsafe"))); > break; > } > } > } > } > > if (failed) { > int p, q = j; > > TR(TRACE_ATTRS, > ("Clearing %s beginning at (%d, %d)", > _traceattr(turnon), i, j)); > > /* turn off new attributes over span */ > for (p = i; p < screen_lines(SP_PARM); p++) { > for (; q < screen_columns(SP_PARM); q++) { > attr_t testattr = AttrOf(newscr->_line[p].text[q]); > if ((testattr & SP_PARM->_xmc_triggers) == rattr) > goto foundend; > RemAttr(NewScreen(SP_PARM)->_line[p].text[q], turnon); > } > q = 0; > } > foundend:; > } else { > TR(TRACE_ATTRS, > ("Cookie space for %s found before (%d, %d)", > _traceattr(turnon), i, j)); > > /* > * Back up the start of range so there's room for cookies > * before the first nonblank character. > */ > for (k = 1; k <= magic_cookie_glitch; k++) > AddAttr(thisline[j - k], turnon); > } > > rattr = thisattr; > } > } > >#ifdef TRACE > /* show altered highlights after magic-cookie check */ > if (USE_TRACEF(TRACE_UPDATE)) { > _tracef("After magic-cookie check..."); > _tracedump("newscr", NewScreen(SP_PARM)); > _nc_unlock_global(tracef); > } >#endif /* TRACE */ ># 911 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" > } >#endif /* USE_XMC_SUPPORT */ ># 913 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" > > nonempty = 0; > if (CurScreen(SP_PARM)->_clear || NewScreen(SP_PARM)->_clear) { /* force refresh ? */ > ClrUpdate(NCURSES_SP_ARG); > CurScreen(SP_PARM)->_clear = FALSE; /* reset flag */ > NewScreen(SP_PARM)->_clear = FALSE; /* reset flag */ > } else { > int changedlines = CHECK_INTERVAL; > > if (check_pending(NCURSES_SP_ARG)) > goto cleanup; > > nonempty = min(screen_lines(SP_PARM), NewScreen(SP_PARM)->_maxy + 1); > > if (SP_PARM->_scrolling) { > NCURSES_SP_NAME(_nc_scroll_optimize) (NCURSES_SP_ARG); > } > > nonempty = ClrBottom(NCURSES_SP_ARGx nonempty); > > TR(TRACE_UPDATE, ("Transforming lines, nonempty %d", nonempty)); > for (i = 0; i < nonempty; i++) { > /* > * Here is our line-breakout optimization. > */ > if (changedlines == CHECK_INTERVAL) { > if (check_pending(NCURSES_SP_ARG)) > goto cleanup; > changedlines = 0; > } > > /* > * newscr->line[i].firstchar is normally set > * by wnoutrefresh. curscr->line[i].firstchar > * is normally set by _nc_scroll_window in the > * vertical-movement optimization code, > */ > if (NewScreen(SP_PARM)->_line[i].firstchar != _NOCHANGE > || CurScreen(SP_PARM)->_line[i].firstchar != _NOCHANGE) { > TransformLine(NCURSES_SP_ARGx i); > changedlines++; > } > > /* mark line changed successfully */ > if (i <= NewScreen(SP_PARM)->_maxy) { > MARK_NOCHANGE(NewScreen(SP_PARM), i); > } > if (i <= CurScreen(SP_PARM)->_maxy) { > MARK_NOCHANGE(CurScreen(SP_PARM), i); > } > } > } > > /* put everything back in sync */ > for (i = nonempty; i <= NewScreen(SP_PARM)->_maxy; i++) { > MARK_NOCHANGE(NewScreen(SP_PARM), i); > } > for (i = nonempty; i <= CurScreen(SP_PARM)->_maxy; i++) { > MARK_NOCHANGE(CurScreen(SP_PARM), i); > } > > if (!NewScreen(SP_PARM)->_leaveok) { > CurScreen(SP_PARM)->_curx = NewScreen(SP_PARM)->_curx; > CurScreen(SP_PARM)->_cury = NewScreen(SP_PARM)->_cury; > > GoTo(NCURSES_SP_ARGx CurScreen(SP_PARM)->_cury, CurScreen(SP_PARM)->_curx); > } > > cleanup: > /* > * We would like to keep the physical screen in normal mode in case we get > * other processes writing to the screen. This goal cannot be met for > * magic cookies since it interferes with attributes that may propagate > * past the current position. > */ >#if USE_XMC_SUPPORT > if (magic_cookie_glitch != 0) >#endif ># 991 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" > UpdateAttrs(SP_PARM, normal); > > NCURSES_SP_NAME(_nc_flush) (NCURSES_SP_ARG); > WINDOW_ATTRS(CurScreen(SP_PARM)) = WINDOW_ATTRS(NewScreen(SP_PARM)); > >#if USE_TRACE_TIMES > (void) times(&after); > TR(TRACE_TIMES, > ("Update cost: %ld chars, %ld clocks system time, %ld clocks user time", > _nc_outchars, > (long) (after.tms_stime - before.tms_stime), > (long) (after.tms_utime - before.tms_utime))); >#endif /* USE_TRACE_TIMES */ ># 1004 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" > > _nc_signal_handler(TRUE); > > returnCode(OK); >} > >#if NCURSES_SP_FUNCS && !defined(USE_TERM_DRIVER) >NCURSES_EXPORT(int) >doupdate(void) >{ > return TINFO_DOUPDATE(CURRENT_SCREEN); >} >#endif ># 1017 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" > >/* > * ClrBlank(win) > * > * Returns the attributed character that corresponds to the "cleared" > * screen. If the terminal has the back-color-erase feature, this will be > * colored according to the wbkgd() call. > * > * We treat 'curscr' specially because it isn't supposed to be set directly > * in the wbkgd() call. Assume 'stdscr' for this case. > */ >#define BCE_ATTRS (A_NORMAL|A_COLOR) >#define BCE_BKGD(sp,win) (((win) == CurScreen(sp) ? StdScreen(sp) : (win))->_nc_bkgd) > >static NCURSES_INLINE NCURSES_CH_T >ClrBlank(NCURSES_SP_DCLx WINDOW *win) >{ > NCURSES_CH_T blank = blankchar; > if (back_color_erase) > AddAttr(blank, (AttrOf(BCE_BKGD(SP_PARM, win)) & BCE_ATTRS)); > return blank; >} > >/* >** ClrUpdate() >** >** Update by clearing and redrawing the entire screen. >** >*/ > >static void >ClrUpdate(NCURSES_SP_DCL0) >{ > TR(TRACE_UPDATE, (T_CALLED("ClrUpdate"))); > if (0 != SP_PARM) { > int i; > NCURSES_CH_T blank = ClrBlank(NCURSES_SP_ARGx StdScreen(SP_PARM)); > int nonempty = min(screen_lines(SP_PARM), > NewScreen(SP_PARM)->_maxy + 1); > > ClearScreen(NCURSES_SP_ARGx blank); > > TR(TRACE_UPDATE, ("updating screen from scratch")); > > nonempty = ClrBottom(NCURSES_SP_ARGx nonempty); > > for (i = 0; i < nonempty; i++) > TransformLine(NCURSES_SP_ARGx i); > } > TR(TRACE_UPDATE, (T_RETURN(""))); >} > >/* >** ClrToEOL(blank) >** >** Clear to end of current line, starting at the cursor position >*/ > >static void >ClrToEOL(NCURSES_SP_DCLx NCURSES_CH_T blank, int needclear) >{ > int j; > > if (CurScreen(SP_PARM) != 0 > && SP_PARM->_cursrow >= 0) { > for (j = SP_PARM->_curscol; j < screen_columns(SP_PARM); j++) { > if (j >= 0) { > NCURSES_CH_T *cp = > &(CurScreen(SP_PARM)->_line[SP_PARM->_cursrow].text[j]); > > if (!CharEq(*cp, blank)) { > *cp = blank; > needclear = TRUE; > } > } > } > } > > if (needclear) { > UpdateAttrs(SP_PARM, blank); > if (clr_eol && SP_PARM->_el_cost <= (screen_columns(SP_PARM) - SP_PARM->_curscol)) { > NCURSES_PUTP2("clr_eol", clr_eol); > } else { > int count = (screen_columns(SP_PARM) - SP_PARM->_curscol); > while (count-- > 0) > PutChar(NCURSES_SP_ARGx CHREF(blank)); > } > } >} > >/* >** ClrToEOS(blank) >** >** Clear to end of screen, starting at the cursor position >*/ > >static void >ClrToEOS(NCURSES_SP_DCLx NCURSES_CH_T blank) >{ > int row, col; > > row = SP_PARM->_cursrow; > col = SP_PARM->_curscol; > > if (row < 0) > row = 0; > if (col < 0) > col = 0; > > UpdateAttrs(SP_PARM, blank); > TPUTS_TRACE("clr_eos"); > NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx > clr_eos, > screen_lines(SP_PARM) - row, > NCURSES_SP_NAME(_nc_outch)); > > while (col < screen_columns(SP_PARM)) > CurScreen(SP_PARM)->_line[row].text[col++] = blank; > > for (row++; row < screen_lines(SP_PARM); row++) { > for (col = 0; col < screen_columns(SP_PARM); col++) > CurScreen(SP_PARM)->_line[row].text[col] = blank; > } >} > >/* > * ClrBottom(total) > * > * Test if clearing the end of the screen would satisfy part of the > * screen-update. Do this by scanning backwards through the lines in the > * screen, checking if each is blank, and one or more are changed. > */ >static int >ClrBottom(NCURSES_SP_DCLx int total) >{ > int row; > int col; > int top = total; > int last = min(screen_columns(SP_PARM), NewScreen(SP_PARM)->_maxx + 1); > NCURSES_CH_T blank = NewScreen(SP_PARM)->_line[total - 1].text[last - 1]; > bool ok; > > if (clr_eos && can_clear_with(NCURSES_SP_ARGx CHREF(blank))) { > > for (row = total - 1; row >= 0; row--) { > for (col = 0, ok = TRUE; ok && col < last; col++) { > ok = (CharEq(NewScreen(SP_PARM)->_line[row].text[col], blank)); > } > if (!ok) > break; > > for (col = 0; ok && col < last; col++) { > ok = (CharEq(CurScreen(SP_PARM)->_line[row].text[col], blank)); > } > if (!ok) > top = row; > } > > /* don't use clr_eos for just one line if clr_eol available */ > if (top < total) { > GoTo(NCURSES_SP_ARGx top, 0); > ClrToEOS(NCURSES_SP_ARGx blank); > if (SP_PARM->oldhash && SP_PARM->newhash) { > for (row = top; row < screen_lines(SP_PARM); row++) > SP_PARM->oldhash[row] = SP_PARM->newhash[row]; > } > } > } > return top; >} > >#if USE_XMC_SUPPORT >#if USE_WIDEC_SUPPORT >#define check_xmc_transition(sp, a, b) \ > ((((a)->attr ^ (b)->attr) & ~((a)->attr) & (sp)->_xmc_triggers) != 0) >#define xmc_turn_on(sp,a,b) check_xmc_transition(sp,&(a), &(b)) >#else ># 1194 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" >#define xmc_turn_on(sp,a,b) ((((a)^(b)) & ~(a) & (sp)->_xmc_triggers) != 0) >#endif ># 1196 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" > >#define xmc_new(sp,r,c) NewScreen(sp)->_line[r].text[c] >#define xmc_turn_off(sp,a,b) xmc_turn_on(sp,b,a) >#endif /* USE_XMC_SUPPORT */ ># 1200 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" > >/* >** TransformLine(lineno) >** >** Transform the given line in curscr to the one in newscr, using >** Insert/Delete Character if idcok && has_ic(). >** >** firstChar = position of first different character in line >** oLastChar = position of last different character in old line >** nLastChar = position of last different character in new line >** >** move to firstChar >** overwrite chars up to min(oLastChar, nLastChar) >** if oLastChar < nLastChar >** insert newLine[oLastChar+1..nLastChar] >** else >** delete oLastChar - nLastChar spaces >*/ > >static void >TransformLine(NCURSES_SP_DCLx int const lineno) >{ > int firstChar, oLastChar, nLastChar; > NCURSES_CH_T *newLine = NewScreen(SP_PARM)->_line[lineno].text; > NCURSES_CH_T *oldLine = CurScreen(SP_PARM)->_line[lineno].text; > int n; > bool attrchanged = FALSE; > > TR(TRACE_UPDATE, (T_CALLED("TransformLine(%p, %d)"), (void *) SP_PARM, lineno)); > > /* copy new hash value to old one */ > if (SP_PARM->oldhash && SP_PARM->newhash) > SP_PARM->oldhash[lineno] = SP_PARM->newhash[lineno]; > > /* > * If we have colors, there is the possibility of having two color pairs > * that display as the same colors. For instance, Lynx does this. Check > * for this case, and update the old line with the new line's colors when > * they are equivalent. > */ > if (SP_PARM->_coloron) { > int oldPair; > int newPair; > > for (n = 0; n < screen_columns(SP_PARM); n++) { > if (!CharEq(newLine[n], oldLine[n])) { > oldPair = GetPair(oldLine[n]); > newPair = GetPair(newLine[n]); > if (oldPair != newPair > && unColor(oldLine[n]) == unColor(newLine[n])) { > if (oldPair < SP_PARM->_pair_limit > && newPair < SP_PARM->_pair_limit > && (SP_PARM->_color_pairs[oldPair] == > SP_PARM->_color_pairs[newPair])) { > SetPair(oldLine[n], GetPair(newLine[n])); > } > } > } > } > } > > if (ceol_standout_glitch && clr_eol) { > firstChar = 0; > while (firstChar < screen_columns(SP_PARM)) { > if (!SameAttrOf(newLine[firstChar], oldLine[firstChar])) { > attrchanged = TRUE; > break; > } > firstChar++; > } > } > > firstChar = 0; > > if (attrchanged) { /* we may have to disregard the whole line */ > GoTo(NCURSES_SP_ARGx lineno, firstChar); > ClrToEOL(NCURSES_SP_ARGx > ClrBlank(NCURSES_SP_ARGx > CurScreen(SP_PARM)), FALSE); > PutRange(NCURSES_SP_ARGx > oldLine, newLine, lineno, 0, > screen_columns(SP_PARM) - 1); >#if USE_XMC_SUPPORT > > /* > * This is a very simple loop to paint characters which may have the > * magic cookie glitch embedded. It doesn't know much about video > * attributes which are continued from one line to the next. It > * assumes that we have filtered out requests for attribute changes > * that do not get mapped to blank positions. > * > * FIXME: we are not keeping track of where we put the cookies, so this > * will work properly only once, since we may overwrite a cookie in a > * following operation. > */ > } else if (magic_cookie_glitch > 0) { > GoTo(NCURSES_SP_ARGx lineno, firstChar); > for (n = 0; n < screen_columns(SP_PARM); n++) { > int m = n + magic_cookie_glitch; > > /* check for turn-on: > * If we are writing an attributed blank, where the > * previous cell is not attributed. > */ > if (ISBLANK(newLine[n]) > && ((n > 0 > && xmc_turn_on(SP_PARM, newLine[n - 1], newLine[n])) > || (n == 0 > && lineno > 0 > && xmc_turn_on(SP_PARM, > xmc_new(SP_PARM, lineno - 1, > screen_columns(SP_PARM) - 1), > newLine[n])))) { > n = m; > } > > PutChar(NCURSES_SP_ARGx CHREF(newLine[n])); > > /* check for turn-off: > * If we are writing an attributed non-blank, where the > * next cell is blank, and not attributed. > */ > if (!ISBLANK(newLine[n]) > && ((n + 1 < screen_columns(SP_PARM) > && xmc_turn_off(SP_PARM, newLine[n], newLine[n + 1])) > || (n + 1 >= screen_columns(SP_PARM) > && lineno + 1 < screen_lines(SP_PARM) > && xmc_turn_off(SP_PARM, > newLine[n], > xmc_new(SP_PARM, lineno + 1, 0))))) { > n = m; > } > > } >#endif ># 1335 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" > } else { > NCURSES_CH_T blank; > > /* it may be cheap to clear leading whitespace with clr_bol */ > blank = newLine[0]; > if (clr_bol && can_clear_with(NCURSES_SP_ARGx CHREF(blank))) { > int oFirstChar, nFirstChar; > > for (oFirstChar = 0; > oFirstChar < screen_columns(SP_PARM); > oFirstChar++) > if (!CharEq(oldLine[oFirstChar], blank)) > break; > for (nFirstChar = 0; > nFirstChar < screen_columns(SP_PARM); > nFirstChar++) > if (!CharEq(newLine[nFirstChar], blank)) > break; > > if (nFirstChar == oFirstChar) { > firstChar = nFirstChar; > /* find the first differing character */ > while (firstChar < screen_columns(SP_PARM) > && CharEq(newLine[firstChar], oldLine[firstChar])) > firstChar++; > } else if (oFirstChar > nFirstChar) { > firstChar = nFirstChar; > } else { /* oFirstChar < nFirstChar */ > firstChar = oFirstChar; > if (SP_PARM->_el1_cost < nFirstChar - oFirstChar) { > if (nFirstChar >= screen_columns(SP_PARM) > && SP_PARM->_el_cost <= SP_PARM->_el1_cost) { > GoTo(NCURSES_SP_ARGx lineno, 0); > UpdateAttrs(SP_PARM, blank); > NCURSES_PUTP2("clr_eol", clr_eol); > } else { > GoTo(NCURSES_SP_ARGx lineno, nFirstChar - 1); > UpdateAttrs(SP_PARM, blank); > NCURSES_PUTP2("clr_bol", clr_bol); > } > > while (firstChar < nFirstChar) > oldLine[firstChar++] = blank; > } > } > } else { > /* find the first differing character */ > while (firstChar < screen_columns(SP_PARM) > && CharEq(newLine[firstChar], oldLine[firstChar])) > firstChar++; > } > /* if there wasn't one, we're done */ > if (firstChar >= screen_columns(SP_PARM)) { > TR(TRACE_UPDATE, (T_RETURN(""))); > return; > } > > blank = newLine[screen_columns(SP_PARM) - 1]; > > if (!can_clear_with(NCURSES_SP_ARGx CHREF(blank))) { > /* find the last differing character */ > nLastChar = screen_columns(SP_PARM) - 1; > > while (nLastChar > firstChar > && CharEq(newLine[nLastChar], oldLine[nLastChar])) > nLastChar--; > > if (nLastChar >= firstChar) { > GoTo(NCURSES_SP_ARGx lineno, firstChar); > PutRange(NCURSES_SP_ARGx > oldLine, > newLine, > lineno, > firstChar, > nLastChar); > memcpy(oldLine + firstChar, > newLine + firstChar, > (unsigned) (nLastChar - firstChar + 1) * sizeof(NCURSES_CH_T)); > } > TR(TRACE_UPDATE, (T_RETURN(""))); > return; > } > > /* find last non-blank character on old line */ > oLastChar = screen_columns(SP_PARM) - 1; > while (oLastChar > firstChar && CharEq(oldLine[oLastChar], blank)) > oLastChar--; > > /* find last non-blank character on new line */ > nLastChar = screen_columns(SP_PARM) - 1; > while (nLastChar > firstChar && CharEq(newLine[nLastChar], blank)) > nLastChar--; > > if ((nLastChar == firstChar) > && (SP_PARM->_el_cost < (oLastChar - nLastChar))) { > GoTo(NCURSES_SP_ARGx lineno, firstChar); > if (!CharEq(newLine[firstChar], blank)) > PutChar(NCURSES_SP_ARGx CHREF(newLine[firstChar])); > ClrToEOL(NCURSES_SP_ARGx blank, FALSE); > } else if ((nLastChar != oLastChar) > && (!CharEq(newLine[nLastChar], oldLine[oLastChar]) > || !(SP_PARM->_nc_sp_idcok > && NCURSES_SP_NAME(has_ic) (NCURSES_SP_ARG)))) { > GoTo(NCURSES_SP_ARGx lineno, firstChar); > if ((oLastChar - nLastChar) > SP_PARM->_el_cost) { > if (PutRange(NCURSES_SP_ARGx > oldLine, > newLine, > lineno, > firstChar, > nLastChar)) { > GoTo(NCURSES_SP_ARGx lineno, nLastChar + 1); > } > ClrToEOL(NCURSES_SP_ARGx blank, FALSE); > } else { > n = max(nLastChar, oLastChar); > PutRange(NCURSES_SP_ARGx > oldLine, > newLine, > lineno, > firstChar, > n); > } > } else { > int nLastNonblank = nLastChar; > int oLastNonblank = oLastChar; > > /* find the last characters that really differ */ > /* can be -1 if no characters differ */ > while (CharEq(newLine[nLastChar], oldLine[oLastChar])) { > /* don't split a wide char */ > if (isWidecExt(newLine[nLastChar]) && > !CharEq(newLine[nLastChar - 1], oldLine[oLastChar - 1])) > break; > nLastChar--; > oLastChar--; > if (nLastChar == -1 || oLastChar == -1) > break; > } > > n = min(oLastChar, nLastChar); > if (n >= firstChar) { > GoTo(NCURSES_SP_ARGx lineno, firstChar); > PutRange(NCURSES_SP_ARGx > oldLine, > newLine, > lineno, > firstChar, > n); > } > > if (oLastChar < nLastChar) { > int m = max(nLastNonblank, oLastNonblank); >#if USE_WIDEC_SUPPORT > while (isWidecExt(newLine[n + 1]) && n) { > --n; > --oLastChar; > } >#endif ># 1494 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" > GoTo(NCURSES_SP_ARGx lineno, n + 1); > if ((nLastChar < nLastNonblank) > || InsCharCost(SP_PARM, nLastChar - oLastChar) > (m - n)) { > PutRange(NCURSES_SP_ARGx > oldLine, > newLine, > lineno, > n + 1, > m); > } else { > InsStr(NCURSES_SP_ARGx &newLine[n + 1], nLastChar - oLastChar); > } > } else if (oLastChar > nLastChar) { > GoTo(NCURSES_SP_ARGx lineno, n + 1); > if (DelCharCost(SP_PARM, oLastChar - nLastChar) > > SP_PARM->_el_cost + nLastNonblank - (n + 1)) { > if (PutRange(NCURSES_SP_ARGx oldLine, newLine, lineno, > n + 1, nLastNonblank)) > GoTo(NCURSES_SP_ARGx lineno, nLastNonblank + 1); > ClrToEOL(NCURSES_SP_ARGx blank, FALSE); > } else { > /* > * The delete-char sequence will > * effectively shift in blanks from the > * right margin of the screen. Ensure > * that they are the right color by > * setting the video attributes from > * the last character on the row. > */ > UpdateAttrs(SP_PARM, blank); > DelChar(NCURSES_SP_ARGx oLastChar - nLastChar); > } > } > } > } > > /* update the code's internal representation */ > if (screen_columns(SP_PARM) > firstChar) > memcpy(oldLine + firstChar, > newLine + firstChar, > (unsigned) (screen_columns(SP_PARM) - firstChar) * sizeof(NCURSES_CH_T)); > TR(TRACE_UPDATE, (T_RETURN(""))); > return; >} > >/* >** ClearScreen(blank) >** >** Clear the physical screen and put cursor at home >** >*/ > >static void >ClearScreen(NCURSES_SP_DCLx NCURSES_CH_T blank) >{ > int i, j; > bool fast_clear = (clear_screen || clr_eos || clr_eol); > > TR(TRACE_UPDATE, ("ClearScreen() called")); > >#if NCURSES_EXT_FUNCS > if (SP_PARM->_coloron > && !SP_PARM->_default_color) { > NCURSES_SP_NAME(_nc_do_color) (NCURSES_SP_ARGx > (short) GET_SCREEN_PAIR(SP_PARM), > 0, > FALSE, > NCURSES_SP_NAME(_nc_outch)); > if (!back_color_erase) { > fast_clear = FALSE; > } > } >#endif ># 1567 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" > > if (fast_clear) { > if (clear_screen) { > UpdateAttrs(SP_PARM, blank); > NCURSES_PUTP2("clear_screen", clear_screen); > SP_PARM->_cursrow = SP_PARM->_curscol = 0; > position_check(SP_PARM, > SP_PARM->_cursrow, > SP_PARM->_curscol, > "ClearScreen"); > } else if (clr_eos) { > SP_PARM->_cursrow = SP_PARM->_curscol = -1; > GoTo(NCURSES_SP_ARGx 0, 0); > UpdateAttrs(SP_PARM, blank); > TPUTS_TRACE("clr_eos"); > NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx > clr_eos, > screen_lines(SP_PARM), > NCURSES_SP_NAME(_nc_outch)); > } else if (clr_eol) { > SP_PARM->_cursrow = SP_PARM->_curscol = -1; > UpdateAttrs(SP_PARM, blank); > for (i = 0; i < screen_lines(SP_PARM); i++) { > GoTo(NCURSES_SP_ARGx i, 0); > NCURSES_PUTP2("clr_eol", clr_eol); > } > GoTo(NCURSES_SP_ARGx 0, 0); > } > } else { > UpdateAttrs(SP_PARM, blank); > for (i = 0; i < screen_lines(SP_PARM); i++) { > GoTo(NCURSES_SP_ARGx i, 0); > for (j = 0; j < screen_columns(SP_PARM); j++) > PutChar(NCURSES_SP_ARGx CHREF(blank)); > } > GoTo(NCURSES_SP_ARGx 0, 0); > } > > for (i = 0; i < screen_lines(SP_PARM); i++) { > for (j = 0; j < screen_columns(SP_PARM); j++) > CurScreen(SP_PARM)->_line[i].text[j] = blank; > } > > TR(TRACE_UPDATE, ("screen cleared")); >} > >/* >** InsStr(line, count) >** >** Insert the count characters pointed to by line. >** >*/ > >static void >InsStr(NCURSES_SP_DCLx NCURSES_CH_T * line, int count) >{ > TR(TRACE_UPDATE, ("InsStr(%p, %p,%d) called", > (void *) SP_PARM, > (void *) line, count)); > > /* Prefer parm_ich as it has the smallest cost - no need to shift > * the whole line on each character. */ > /* The order must match that of InsCharCost. */ > if (parm_ich) { > TPUTS_TRACE("parm_ich"); > NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx > TPARM_1(parm_ich, count), > count, > NCURSES_SP_NAME(_nc_outch)); > while (count) { > PutAttrChar(NCURSES_SP_ARGx CHREF(*line)); > line++; > count--; > } > } else if (enter_insert_mode && exit_insert_mode) { > NCURSES_PUTP2("enter_insert_mode", enter_insert_mode); > while (count) { > PutAttrChar(NCURSES_SP_ARGx CHREF(*line)); > if (insert_padding) { > NCURSES_PUTP2("insert_padding", insert_padding); > } > line++; > count--; > } > NCURSES_PUTP2("exit_insert_mode", exit_insert_mode); > } else { > while (count) { > NCURSES_PUTP2("insert_character", insert_character); > PutAttrChar(NCURSES_SP_ARGx CHREF(*line)); > if (insert_padding) { > NCURSES_PUTP2("insert_padding", insert_padding); > } > line++; > count--; > } > } > position_check(SP_PARM, SP_PARM->_cursrow, SP_PARM->_curscol, "InsStr"); >} > >/* >** DelChar(count) >** >** Delete count characters at current position >** >*/ > >static void >DelChar(NCURSES_SP_DCLx int count) >{ > int n; > > TR(TRACE_UPDATE, ("DelChar(%p, %d) called, position = (%ld,%ld)", > (void *) SP_PARM, count, > (long) NewScreen(SP_PARM)->_cury, > (long) NewScreen(SP_PARM)->_curx)); > > if (parm_dch) { > TPUTS_TRACE("parm_dch"); > NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx > TPARM_1(parm_dch, count), > count, > NCURSES_SP_NAME(_nc_outch)); > } else { > for (n = 0; n < count; n++) { > NCURSES_PUTP2("delete_character", delete_character); > } > } >} > >/* > * Physical-scrolling support > * > * This code was adapted from Keith Bostic's hardware scrolling > * support for 4.4BSD curses. I (esr) translated it to use terminfo > * capabilities, narrowed the call interface slightly, and cleaned > * up some convoluted tests. I also added support for the memory_above > * memory_below, and non_dest_scroll_region capabilities. > * > * For this code to work, we must have either > * change_scroll_region and scroll forward/reverse commands, or > * insert and delete line capabilities. > * When the scrolling region has been set, the cursor has to > * be at the last line of the region to make the scroll up > * happen, or on the first line of region to scroll down. > * > * This code makes one aesthetic decision in the opposite way from > * BSD curses. BSD curses preferred pairs of il/dl operations > * over scrolls, allegedly because il/dl looked faster. We, on > * the other hand, prefer scrolls because (a) they're just as fast > * on many terminals and (b) using them avoids bouncing an > * unchanged bottom section of the screen up and down, which is > * visually nasty. > * > * (lav): added more cases, used dl/il when bot==maxy and in csr case. > * > * I used assumption that capabilities il/il1/dl/dl1 work inside > * changed scroll region not shifting screen contents outside of it. > * If there are any terminals behaving different way, it would be > * necessary to add some conditions to scroll_csr_forward/backward. > */ > >/* Try to scroll up assuming given csr (miny, maxy). Returns ERR on failure */ >static int >scroll_csr_forward(NCURSES_SP_DCLx > int n, > int top, > int bot, > int miny, > int maxy, > NCURSES_CH_T blank) >{ > int i; > > if (n == 1 && scroll_forward && top == miny && bot == maxy) { > GoTo(NCURSES_SP_ARGx bot, 0); > UpdateAttrs(SP_PARM, blank); > NCURSES_PUTP2("scroll_forward", scroll_forward); > } else if (n == 1 && delete_line && bot == maxy) { > GoTo(NCURSES_SP_ARGx top, 0); > UpdateAttrs(SP_PARM, blank); > NCURSES_PUTP2("delete_line", delete_line); > } else if (parm_index && top == miny && bot == maxy) { > GoTo(NCURSES_SP_ARGx bot, 0); > UpdateAttrs(SP_PARM, blank); > TPUTS_TRACE("parm_index"); > NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx > TPARM_2(parm_index, n, 0), > n, > NCURSES_SP_NAME(_nc_outch)); > } else if (parm_delete_line && bot == maxy) { > GoTo(NCURSES_SP_ARGx top, 0); > UpdateAttrs(SP_PARM, blank); > TPUTS_TRACE("parm_delete_line"); > NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx > TPARM_2(parm_delete_line, n, 0), > n, > NCURSES_SP_NAME(_nc_outch)); > } else if (scroll_forward && top == miny && bot == maxy) { > GoTo(NCURSES_SP_ARGx bot, 0); > UpdateAttrs(SP_PARM, blank); > for (i = 0; i < n; i++) { > NCURSES_PUTP2("scroll_forward", scroll_forward); > } > } else if (delete_line && bot == maxy) { > GoTo(NCURSES_SP_ARGx top, 0); > UpdateAttrs(SP_PARM, blank); > for (i = 0; i < n; i++) { > NCURSES_PUTP2("delete_line", delete_line); > } > } else > return ERR; > >#if NCURSES_EXT_FUNCS > if (FILL_BCE(SP_PARM)) { > int j; > for (i = 0; i < n; i++) { > GoTo(NCURSES_SP_ARGx bot - i, 0); > for (j = 0; j < screen_columns(SP_PARM); j++) > PutChar(NCURSES_SP_ARGx CHREF(blank)); > } > } >#endif ># 1789 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" > return OK; >} > >/* Try to scroll down assuming given csr (miny, maxy). Returns ERR on failure */ >/* n > 0 */ >static int >scroll_csr_backward(NCURSES_SP_DCLx > int n, > int top, > int bot, > int miny, > int maxy, > NCURSES_CH_T blank) >{ > int i; > > if (n == 1 && scroll_reverse && top == miny && bot == maxy) { > GoTo(NCURSES_SP_ARGx top, 0); > UpdateAttrs(SP_PARM, blank); > NCURSES_PUTP2("scroll_reverse", scroll_reverse); > } else if (n == 1 && insert_line && bot == maxy) { > GoTo(NCURSES_SP_ARGx top, 0); > UpdateAttrs(SP_PARM, blank); > NCURSES_PUTP2("insert_line", insert_line); > } else if (parm_rindex && top == miny && bot == maxy) { > GoTo(NCURSES_SP_ARGx top, 0); > UpdateAttrs(SP_PARM, blank); > TPUTS_TRACE("parm_rindex"); > NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx > TPARM_2(parm_rindex, n, 0), > n, > NCURSES_SP_NAME(_nc_outch)); > } else if (parm_insert_line && bot == maxy) { > GoTo(NCURSES_SP_ARGx top, 0); > UpdateAttrs(SP_PARM, blank); > TPUTS_TRACE("parm_insert_line"); > NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx > TPARM_2(parm_insert_line, n, 0), > n, > NCURSES_SP_NAME(_nc_outch)); > } else if (scroll_reverse && top == miny && bot == maxy) { > GoTo(NCURSES_SP_ARGx top, 0); > UpdateAttrs(SP_PARM, blank); > for (i = 0; i < n; i++) { > NCURSES_PUTP2("scroll_reverse", scroll_reverse); > } > } else if (insert_line && bot == maxy) { > GoTo(NCURSES_SP_ARGx top, 0); > UpdateAttrs(SP_PARM, blank); > for (i = 0; i < n; i++) { > NCURSES_PUTP2("insert_line", insert_line); > } > } else > return ERR; > >#if NCURSES_EXT_FUNCS > if (FILL_BCE(SP_PARM)) { > int j; > for (i = 0; i < n; i++) { > GoTo(NCURSES_SP_ARGx top + i, 0); > for (j = 0; j < screen_columns(SP_PARM); j++) > PutChar(NCURSES_SP_ARGx CHREF(blank)); > } > } >#endif ># 1854 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" > return OK; >} > >/* scroll by using delete_line at del and insert_line at ins */ >/* n > 0 */ >static int >scroll_idl(NCURSES_SP_DCLx int n, int del, int ins, NCURSES_CH_T blank) >{ > int i; > > if (!((parm_delete_line || delete_line) && (parm_insert_line || insert_line))) > return ERR; > > GoTo(NCURSES_SP_ARGx del, 0); > UpdateAttrs(SP_PARM, blank); > if (n == 1 && delete_line) { > NCURSES_PUTP2("delete_line", delete_line); > } else if (parm_delete_line) { > TPUTS_TRACE("parm_delete_line"); > NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx > TPARM_2(parm_delete_line, n, 0), > n, > NCURSES_SP_NAME(_nc_outch)); > } else { /* if (delete_line) */ > for (i = 0; i < n; i++) { > NCURSES_PUTP2("delete_line", delete_line); > } > } > > GoTo(NCURSES_SP_ARGx ins, 0); > UpdateAttrs(SP_PARM, blank); > if (n == 1 && insert_line) { > NCURSES_PUTP2("insert_line", insert_line); > } else if (parm_insert_line) { > TPUTS_TRACE("parm_insert_line"); > NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx > TPARM_2(parm_insert_line, n, 0), > n, > NCURSES_SP_NAME(_nc_outch)); > } else { /* if (insert_line) */ > for (i = 0; i < n; i++) { > NCURSES_PUTP2("insert_line", insert_line); > } > } > > return OK; >} > >/* > * Note: some terminals require the cursor to be within the scrolling margins > * before setting them. Generally, the cursor must be at the appropriate end > * of the scrolling margins when issuing an indexing operation (it is not > * apparent whether it must also be at the left margin; we do this just to be > * safe). To make the related cursor movement a little faster, we use the > * save/restore cursor capabilities if the terminal has them. > */ >NCURSES_EXPORT(int) >NCURSES_SP_NAME(_nc_scrolln) (NCURSES_SP_DCLx > int n, > int top, > int bot, > int maxy) >/* scroll region from top to bot by n lines */ >{ > NCURSES_CH_T blank; > int i; > bool cursor_saved = FALSE; > int res; > > TR(TRACE_MOVE, ("_nc_scrolln(%p, %d, %d, %d, %d)", > (void *) SP_PARM, n, top, bot, maxy)); > > if (!IsValidScreen(SP_PARM)) > return (ERR); > > blank = ClrBlank(NCURSES_SP_ARGx StdScreen(SP_PARM)); > >#if USE_XMC_SUPPORT > /* > * If we scroll, we might remove a cookie. > */ > if (magic_cookie_glitch > 0) { > return (ERR); > } >#endif ># 1939 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" > > if (n > 0) { /* scroll up (forward) */ > /* > * Explicitly clear if stuff pushed off top of region might > * be saved by the terminal. > */ > res = scroll_csr_forward(NCURSES_SP_ARGx n, top, bot, 0, maxy, blank); > > if (res == ERR && change_scroll_region) { > if ((((n == 1 && scroll_forward) || parm_index) > && (SP_PARM->_cursrow == bot || SP_PARM->_cursrow == bot - 1)) > && save_cursor && restore_cursor) { > cursor_saved = TRUE; > NCURSES_PUTP2("save_cursor", save_cursor); > } > NCURSES_PUTP2("change_scroll_region", > TPARM_2(change_scroll_region, top, bot)); > if (cursor_saved) { > NCURSES_PUTP2("restore_cursor", restore_cursor); > } else { > SP_PARM->_cursrow = SP_PARM->_curscol = -1; > } > > res = scroll_csr_forward(NCURSES_SP_ARGx n, top, bot, top, bot, blank); > > NCURSES_PUTP2("change_scroll_region", > TPARM_2(change_scroll_region, 0, maxy)); > SP_PARM->_cursrow = SP_PARM->_curscol = -1; > } > > if (res == ERR && SP_PARM->_nc_sp_idlok) > res = scroll_idl(NCURSES_SP_ARGx n, top, bot - n + 1, blank); > > /* > * Clear the newly shifted-in text. > */ > if (res != ERR > && (non_dest_scroll_region || (memory_below && bot == maxy))) { > static const NCURSES_CH_T blank2 = NewChar(BLANK_TEXT); > if (bot == maxy && clr_eos) { > GoTo(NCURSES_SP_ARGx bot - n + 1, 0); > ClrToEOS(NCURSES_SP_ARGx blank2); > } else { > for (i = 0; i < n; i++) { > GoTo(NCURSES_SP_ARGx bot - i, 0); > ClrToEOL(NCURSES_SP_ARGx blank2, FALSE); > } > } > } > > } else { /* (n < 0) - scroll down (backward) */ > res = scroll_csr_backward(NCURSES_SP_ARGx -n, top, bot, 0, maxy, blank); > > if (res == ERR && change_scroll_region) { > if (top != 0 > && (SP_PARM->_cursrow == top || > SP_PARM->_cursrow == top - 1) > && save_cursor && restore_cursor) { > cursor_saved = TRUE; > NCURSES_PUTP2("save_cursor", save_cursor); > } > NCURSES_PUTP2("change_scroll_region", > TPARM_2(change_scroll_region, top, bot)); > if (cursor_saved) { > NCURSES_PUTP2("restore_cursor", restore_cursor); > } else { > SP_PARM->_cursrow = SP_PARM->_curscol = -1; > } > > res = scroll_csr_backward(NCURSES_SP_ARGx > -n, top, bot, top, bot, blank); > > NCURSES_PUTP2("change_scroll_region", > TPARM_2(change_scroll_region, 0, maxy)); > SP_PARM->_cursrow = SP_PARM->_curscol = -1; > } > > if (res == ERR && SP_PARM->_nc_sp_idlok) > res = scroll_idl(NCURSES_SP_ARGx -n, bot + n + 1, top, blank); > > /* > * Clear the newly shifted-in text. > */ > if (res != ERR > && (non_dest_scroll_region || (memory_above && top == 0))) { > static const NCURSES_CH_T blank2 = NewChar(BLANK_TEXT); > for (i = 0; i < -n; i++) { > GoTo(NCURSES_SP_ARGx i + top, 0); > ClrToEOL(NCURSES_SP_ARGx blank2, FALSE); > } > } > } > > if (res == ERR) > return (ERR); > > _nc_scroll_window(CurScreen(SP_PARM), n, > (NCURSES_SIZE_T) top, > (NCURSES_SIZE_T) bot, > blank); > > /* shift hash values too - they can be reused */ > NCURSES_SP_NAME(_nc_scroll_oldhash) (NCURSES_SP_ARGx n, top, bot); > > return (OK); >} > >#if NCURSES_SP_FUNCS >NCURSES_EXPORT(int) >_nc_scrolln(int n, int top, int bot, int maxy) >{ > return NCURSES_SP_NAME(_nc_scrolln) (CURRENT_SCREEN, n, top, bot, maxy); >} >#endif ># 2053 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" > >NCURSES_EXPORT(void) >NCURSES_SP_NAME(_nc_screen_resume) (NCURSES_SP_DCL0) >{ > assert(SP_PARM); > > /* make sure terminal is in a sane known state */ > SetAttr(SCREEN_ATTRS(SP_PARM), A_NORMAL); > NewScreen(SP_PARM)->_clear = TRUE; > > /* reset color pairs and definitions */ > if (SP_PARM->_coloron || SP_PARM->_color_defs) > NCURSES_SP_NAME(_nc_reset_colors) (NCURSES_SP_ARG); > > /* restore user-defined colors, if any */ > if (SP_PARM->_color_defs < 0) { > int n; > SP_PARM->_color_defs = -(SP_PARM->_color_defs); > for (n = 0; n < SP_PARM->_color_defs; ++n) { > if (SP_PARM->_color_table[n].init) { > NCURSES_SP_NAME(init_color) (NCURSES_SP_ARGx > (short) n, > SP_PARM->_color_table[n].r, > SP_PARM->_color_table[n].g, > SP_PARM->_color_table[n].b); > } > } > } > > if (exit_attribute_mode) > NCURSES_PUTP2("exit_attribute_mode", exit_attribute_mode); > else { > /* turn off attributes */ > if (exit_alt_charset_mode) > NCURSES_PUTP2("exit_alt_charset_mode", exit_alt_charset_mode); > if (exit_standout_mode) > NCURSES_PUTP2("exit_standout_mode", exit_standout_mode); > if (exit_underline_mode) > NCURSES_PUTP2("exit_underline_mode", exit_underline_mode); > } > if (exit_insert_mode) > NCURSES_PUTP2("exit_insert_mode", exit_insert_mode); > if (enter_am_mode && exit_am_mode) { > if (auto_right_margin) { > NCURSES_PUTP2("enter_am_mode", enter_am_mode); > } else { > NCURSES_PUTP2("exit_am_mode", exit_am_mode); > } > } >} > >#if NCURSES_SP_FUNCS >NCURSES_EXPORT(void) >_nc_screen_resume(void) >{ > NCURSES_SP_NAME(_nc_screen_resume) (CURRENT_SCREEN); >} >#endif ># 2111 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" > >NCURSES_EXPORT(void) >NCURSES_SP_NAME(_nc_screen_init) (NCURSES_SP_DCL0) >{ > NCURSES_SP_NAME(_nc_screen_resume) (NCURSES_SP_ARG); >} > >#if NCURSES_SP_FUNCS >NCURSES_EXPORT(void) >_nc_screen_init(void) >{ > NCURSES_SP_NAME(_nc_screen_init) (CURRENT_SCREEN); >} >#endif ># 2125 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" > >/* wrap up screen handling */ >NCURSES_EXPORT(void) >NCURSES_SP_NAME(_nc_screen_wrap) (NCURSES_SP_DCL0) >{ > if (SP_PARM != 0) { > > UpdateAttrs(SP_PARM, normal); >#if NCURSES_EXT_FUNCS > if (SP_PARM->_coloron > && !SP_PARM->_default_color) { > static const NCURSES_CH_T blank = NewChar(BLANK_TEXT); > SP_PARM->_default_color = TRUE; > NCURSES_SP_NAME(_nc_do_color) (NCURSES_SP_ARGx > -1, > 0, > FALSE, > NCURSES_SP_NAME(_nc_outch)); > SP_PARM->_default_color = FALSE; > > TINFO_MVCUR(NCURSES_SP_ARGx > SP_PARM->_cursrow, > SP_PARM->_curscol, > screen_lines(SP_PARM) - 1, > 0); > > ClrToEOL(NCURSES_SP_ARGx blank, TRUE); > } >#endif ># 2154 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" > if (SP_PARM->_color_defs) { > NCURSES_SP_NAME(_nc_reset_colors) (NCURSES_SP_ARG); > } > } >} > >#if NCURSES_SP_FUNCS >NCURSES_EXPORT(void) >_nc_screen_wrap(void) >{ > NCURSES_SP_NAME(_nc_screen_wrap) (CURRENT_SCREEN); >} >#endif ># 2167 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" > >#if USE_XMC_SUPPORT >NCURSES_EXPORT(void) >NCURSES_SP_NAME(_nc_do_xmc_glitch) (NCURSES_SP_DCLx attr_t previous) >{ > if (SP_PARM != 0) { > attr_t chg = XMC_CHANGES(previous ^ AttrOf(SCREEN_ATTRS(SP_PARM))); > > while (chg != 0) { > if (chg & 1) { > SP_PARM->_curscol += magic_cookie_glitch; > if (SP_PARM->_curscol >= SP_PARM->_columns) > wrap_cursor(NCURSES_SP_ARG); > TR(TRACE_UPDATE, ("bumped to %d,%d after cookie", > SP_PARM->_cursrow, SP_PARM->_curscol)); > } > chg >>= 1; > } > } >} > >#if NCURSES_SP_FUNCS >NCURSES_EXPORT(void) >_nc_do_xmc_glitch(attr_t previous) >{ > NCURSES_SP_NAME(_nc_do_xmc_glitch) (CURRENT_SCREEN, previous); >} >#endif ># 2195 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c" > >#endif /* USE_XMC_SUPPORT */ ># 2197 "/usr/src/contrib/ncurses/ncurses/tty/tty_update.c"
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 217376
: 180319 |
180320