summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/Caps18
-rw-r--r--include/Caps.aix418
-rw-r--r--include/Caps.hpux1118
-rw-r--r--include/Caps.keys26
-rw-r--r--include/Caps.osf1r56
-rwxr-xr-xinclude/MKkey_defs.sh9
-rwxr-xr-xinclude/MKparametrized.sh15
-rw-r--r--include/MKterm.h.awk.in46
-rw-r--r--include/Makefile.in7
-rw-r--r--include/curses.h.in303
-rw-r--r--include/curses.tail4
-rw-r--r--include/curses.wide150
-rw-r--r--include/hashed_db.h4
-rw-r--r--include/headers18
-rw-r--r--include/nc_alloc.h14
-rw-r--r--include/nc_string.h77
-rw-r--r--include/nc_termios.h161
-rw-r--r--include/nc_tparm.h8
-rw-r--r--include/ncurses_defs27
-rw-r--r--include/ncurses_dll.h.in20
-rw-r--r--include/ncurses_mingw.h140
-rw-r--r--include/term_entry.h68
-rw-r--r--include/tic.h35
23 files changed, 718 insertions, 474 deletions
diff --git a/include/Caps b/include/Caps
index f9a8ebd..cb650a6 100644
--- a/include/Caps
+++ b/include/Caps
@@ -1,5 +1,5 @@
##############################################################################
-# Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. #
+# Copyright (c) 1998-2010,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"), #
@@ -29,7 +29,7 @@
# Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995
# and: Eric S. Raymond <esr@snark.thyrsus.com>
#
-# $Id: Caps,v 1.37 2010/12/04 18:47:13 tom Exp $
+# $Id: Caps,v 1.38 2011/10/15 23:10:18 tom Exp $
#
# This is the master termcap/terminfo capability table.
#
@@ -738,11 +738,13 @@ alt_scancode_esc scesa str S8 - - ----- Alternate escape for scancode emulatio
#%.ad
#%
#%.in .8i
-#%The XSI Curses standard added these. They are some post-4.1
-#%versions of System V curses, e.g., Solaris 2.5 and IRIX 6.x.
-#%The \fBncurses\fR termcap names for them are invented; according to the
-#%XSI Curses standard, they have no termcap names. If your compiled terminfo
-#%entries use these, they may not be binary-compatible with System V terminfo
+#%The XSI Curses standard added these hardcopy capabilities.
+#%They were used in some post-4.1 versions of System V curses,
+#%e.g., Solaris 2.5 and IRIX 6.x.
+#%Except for \fBYI\fP, the \fBncurses\fR termcap names for them are invented.
+#%According to the XSI Curses standard, they have no termcap names.
+#%If your compiled terminfo entries use these,
+#%they may not be binary-compatible with System V terminfo
#%entries after SVr4.1; beware!
#%
#%.na
@@ -760,7 +762,7 @@ enter_right_hl_mode erhlm str Xr - - ----- Enter right highlight mode
enter_top_hl_mode ethlm str Xt - - ----- Enter top highlight mode
enter_vertical_hl_mode evhlm str Xv - - ----- Enter vertical highlight mode
set_a_attributes sgr1 str sA - - ----- Define second set of video attributes #1-#6
-set_pglen_inch slength str sL - - ----- YI Set page length to #1 hundredth of an inch
+set_pglen_inch slength str YI - - ----- Set page length to #1 hundredth of an inch (some implementations use sL for termcap).
#%.TE
#%.ad
#
diff --git a/include/Caps.aix4 b/include/Caps.aix4
index 5864d7b..faa9822 100644
--- a/include/Caps.aix4
+++ b/include/Caps.aix4
@@ -1,5 +1,5 @@
##############################################################################
-# Copyright (c) 2001-2006,2010 Free Software Foundation, Inc. #
+# Copyright (c) 2001-2010,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"), #
@@ -28,7 +28,7 @@
#
# Author: Thomas Dickey
#
-# $Id: Caps.aix4,v 1.8 2010/12/04 18:47:13 tom Exp $
+# $Id: Caps.aix4,v 1.9 2011/10/15 23:19:16 tom Exp $
#
# This is an adaptation of ncurses' termcap/terminfo capability table, which
# is designed to align with AIX 4.x's terminfo.
@@ -840,11 +840,13 @@ alt_scancode_esc scesa str S8 - - ----- Alternate escape for scancode emulatio
#%.ad
#%
#%.in .8i
-#%The XSI Curses standard added these. They are some post-4.1
-#%versions of System V curses, e.g., Solaris 2.5 and IRIX 6.x.
-#%The \fBncurses\fR termcap names for them are invented; according to the
-#%XSI Curses standard, they have no termcap names. If your compiled terminfo
-#%entries use these, they may not be binary-compatible with System V terminfo
+#%The XSI Curses standard added these hardcopy capabilities.
+#%They were used in some post-4.1 versions of System V curses,
+#%e.g., Solaris 2.5 and IRIX 6.x.
+#%Except for \fBYI\fP, the \fBncurses\fR termcap names for them are invented.
+#%According to the XSI Curses standard, they have no termcap names.
+#%If your compiled terminfo entries use these,
+#%they may not be binary-compatible with System V terminfo
#%entries after SVr4.1; beware!
#%
#%.na
@@ -862,7 +864,7 @@ enter_right_hl_mode erhlm str Xr - - ----- Enter right highlight mode
enter_top_hl_mode ethlm str Xt - - ----- Enter top highlight mode
enter_vertical_hl_mode evhlm str Xv - - ----- Enter vertical highlight mode
set_a_attributes sgr1 str sA - - ----- Define second set of video attributes #1-#6
-set_pglen_inch slength str sL - - ----- YI Set page length to #1 hundredth of an inch
+set_pglen_inch slength str YI - - ----- Set page length to #1 hundredth of an inch (some implementations use sL for termcap).
#%.TE
#%.ad
#
diff --git a/include/Caps.hpux11 b/include/Caps.hpux11
index 8dbe656..b7bb998 100644
--- a/include/Caps.hpux11
+++ b/include/Caps.hpux11
@@ -1,5 +1,5 @@
##############################################################################
-# Copyright (c) 2002-2006,2010 Free Software Foundation, Inc. #
+# Copyright (c) 2002-2010,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"), #
@@ -28,7 +28,7 @@
#
# Author: Thomas Dickey
#
-# $Id: Caps.hpux11,v 1.5 2010/12/04 18:47:13 tom Exp $
+# $Id: Caps.hpux11,v 1.6 2011/10/15 23:20:04 tom Exp $
#
# This is an adaptation of ncurses' termcap/terminfo capability table, which
# is designed to align with HPUX 11.x's terminfo.
@@ -746,11 +746,13 @@ alt_scancode_esc scesa str S8 - - ----- Alternate escape for scancode emulatio
#%.ad
#%
#%.in .8i
-#%The XSI Curses standard added these. They are some post-4.1
-#%versions of System V curses, e.g., Solaris 2.5 and IRIX 6.x.
-#%The \fBncurses\fR termcap names for them are invented; according to the
-#%XSI Curses standard, they have no termcap names. If your compiled terminfo
-#%entries use these, they may not be binary-compatible with System V terminfo
+#%The XSI Curses standard added these hardcopy capabilities.
+#%They were used in some post-4.1 versions of System V curses,
+#%e.g., Solaris 2.5 and IRIX 6.x.
+#%Except for \fBYI\fP, the \fBncurses\fR termcap names for them are invented.
+#%According to the XSI Curses standard, they have no termcap names.
+#%If your compiled terminfo entries use these,
+#%they may not be binary-compatible with System V terminfo
#%entries after SVr4.1; beware!
#%
#%.na
@@ -761,7 +763,7 @@ alt_scancode_esc scesa str S8 - - ----- Alternate escape for scancode emulatio
#%lw25 lw6 lw2 lw20.
#%\fBVariable Cap- TCap Description\fR
#%\fBString name Code\fR
-set_pglen_inch slength str sL - - ----- YI Set page length to #1 hundredth of an inch
+set_pglen_inch slength str YI - - ----- Set page length to #1 hundredth of an inch (some implementations use sL for termcap).
enter_horizontal_hl_mode ehhlm str Xh - - ----- Enter horizontal highlight mode
enter_left_hl_mode elhlm str Xl - - ----- Enter left highlight mode
enter_low_hl_mode elohlm str Xo - - ----- Enter low highlight mode
diff --git a/include/Caps.keys b/include/Caps.keys
index 4d4fe30..99c65b7 100644
--- a/include/Caps.keys
+++ b/include/Caps.keys
@@ -1,5 +1,5 @@
##############################################################################
-# Copyright (c) 2001-2006,2010 Free Software Foundation, Inc. #
+# Copyright (c) 2001-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"), #
@@ -29,7 +29,7 @@
# Author: Thomas Dickey
# and: Ilya Zakharevich
#
-# $Id: Caps.keys,v 1.4 2010/12/04 18:47:13 tom Exp $
+# $Id: Caps.keys,v 1.7 2013/07/20 17:59:24 tom Exp $
#
# This is an adaptation of ncurses' termcap/terminfo capability table, which
# is illustrates an experimental extension to describe alt-, shift- and
@@ -229,11 +229,11 @@ move_standout_mode msgr bool ms - - YBCGE safe to move while in standout mode
over_strike os bool os - - YBCG- terminal can overstrike
status_line_esc_ok eslok bool es - - YB-G- escape can be used on the status line
dest_tabs_magic_smso xt bool xt - - YBCGE tabs destructive, magic so char (t1061)
-tilde_glitch hz bool hz - - YB-GE can't print ~'s (hazeltine)
+tilde_glitch hz bool hz - - YB-GE cannot print ~'s (hazeltine)
transparent_underline ul bool ul - - YBCGE underline character overstrikes
xon_xoff xon bool xo - - YB--- terminal uses xon/xoff handshaking
-needs_xon_xoff nxon bool nx - - ----- padding won't work, xon/xoff required
-prtr_silent mc5i bool 5i - - ----- printer won't echo on screen
+needs_xon_xoff nxon bool nx - - ----- padding will not work, xon/xoff required
+prtr_silent mc5i bool 5i - - ----- printer will not echo on screen
hard_cursor chts bool HC - - ----- cursor is hard to see
non_rev_rmcup nrrmc bool NR - - ----- smcup does not reverse rmcup
no_pad_char npc bool NP - - ----- pad character does not exist
@@ -277,7 +277,7 @@ maximum_windows wnum num MW - - ----- maximum number of defineable windows
# These came in with SVr4's color support
max_colors colors num Co - - ----- maximum number of colors on screen
max_pairs pairs num pa - - ----- maximum number of color-pairs on the screen
-no_color_video ncv num NC - - ----- video attributes that can't be used with colors
+no_color_video ncv num NC - - ----- video attributes that cannot be used with colors
#%.TE
#%.ad
#%
@@ -828,11 +828,13 @@ alt_scancode_esc scesa str S8 - - ----- Alternate escape for scancode emulatio
#%.ad
#%
#%.in .8i
-#%The XSI Curses standard added these. They are some post-4.1
-#%versions of System V curses, e.g., Solaris 2.5 and IRIX 6.x.
-#%The \fBncurses\fR termcap names for them are invented; according to the
-#%XSI Curses standard, they have no termcap names. If your compiled terminfo
-#%entries use these, they may not be binary-compatible with System V terminfo
+#%The XSI Curses standard added these hardcopy capabilities.
+#%They were used in some post-4.1 versions of System V curses,
+#%e.g., Solaris 2.5 and IRIX 6.x.
+#%Except for \fBYI\fP, the \fBncurses\fR termcap names for them are invented.
+#%According to the XSI Curses standard, they have no termcap names.
+#%If your compiled terminfo entries use these,
+#%they may not be binary-compatible with System V terminfo
#%entries after SVr4.1; beware!
#%
#%.na
@@ -850,7 +852,7 @@ enter_right_hl_mode erhlm str Xr - - ----- Enter right highlight mode
enter_top_hl_mode ethlm str Xt - - ----- Enter top highlight mode
enter_vertical_hl_mode evhlm str Xv - - ----- Enter vertical highlight mode
set_a_attributes sgr1 str sA - - ----- Define second set of video attributes #1-#6
-set_pglen_inch slength str sL - - ----- YI Set page length to #1 hundredth of an inch
+set_pglen_inch slength str YI - - ----- Set page length to #1 hundredth of an inch (some implementations use sL for termcap).
#%.TE
#%.ad
#
diff --git a/include/Caps.osf1r5 b/include/Caps.osf1r5
index 79dbf50..b9400b9 100644
--- a/include/Caps.osf1r5
+++ b/include/Caps.osf1r5
@@ -1,5 +1,5 @@
##############################################################################
-# Copyright (c) 2002-2006,2010 Free Software Foundation, Inc. #
+# Copyright (c) 2002-2010,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"), #
@@ -28,7 +28,7 @@
#
# Author: Thomas Dickey
#
-# $Id: Caps.osf1r5,v 1.5 2010/12/04 18:47:13 tom Exp $
+# $Id: Caps.osf1r5,v 1.6 2011/10/15 22:52:09 tom Exp $
#
# This is an adaptation of ncurses' termcap/terminfo capability table, which
# is designed to align with OSF/1 version 5 (Tru64) terminfo.
@@ -769,7 +769,7 @@ wait_tone wait str WA - - ----- wait for dial-tone
xoff_character xoffc str XF - - ----- XOFF character
xon_character xonc str XN - - ----- XON character
zero_motion zerom str Zx - - ----- No motion for subsequent character
-set_pglen_inch slength str sL - - ----- YI Set page length to #1 hundredth of an inch
+set_pglen_inch slength str YI - - ----- Set page length to #1 hundredth of an inch (some implementations use sL for termcap).
enter_horizontal_hl_mode ehhlm str Xh - - ----- Enter horizontal highlight mode
enter_left_hl_mode elhlm str Xl - - ----- Enter left highlight mode
enter_low_hl_mode elohlm str Xo - - ----- Enter low highlight mode
diff --git a/include/MKkey_defs.sh b/include/MKkey_defs.sh
index b3cb4f7..45a06d0 100755
--- a/include/MKkey_defs.sh
+++ b/include/MKkey_defs.sh
@@ -1,7 +1,7 @@
#! /bin/sh
-# $Id: MKkey_defs.sh,v 1.14 2003/12/06 17:10:09 tom Exp $
+# $Id: MKkey_defs.sh,v 1.15 2013/03/09 16:32:01 tom Exp $
##############################################################################
-# Copyright (c) 2001-2002,2003 Free Software Foundation, Inc. #
+# Copyright (c) 2001-2003,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"), #
@@ -65,9 +65,12 @@ key_resize kr1 str R1 KEY_RESIZE + ----- Terminal resize event
key_event kv1 str V1 KEY_EVENT + ----- We were interrupted by an event
EOF
+THIS=./`basename $0`
+PARM=./`basename $DATA`
+
cat <<EOF
/*
- * These definitions were generated by $0 $DATA
+ * These definitions were generated by $THIS $PARM
*/
EOF
diff --git a/include/MKparametrized.sh b/include/MKparametrized.sh
index 2825c82..3ce5d9c 100755
--- a/include/MKparametrized.sh
+++ b/include/MKparametrized.sh
@@ -1,6 +1,6 @@
#!/bin/sh
##############################################################################
-# Copyright (c) 1998-2000,2006 Free Software Foundation, Inc. #
+# Copyright (c) 1998-2006,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"), #
@@ -26,7 +26,7 @@
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: MKparametrized.sh,v 1.6 2006/04/22 21:36:16 tom Exp $
+# $Id: MKparametrized.sh,v 1.7 2014/05/24 15:07:19 tom Exp $
#
# MKparametrized.sh -- generate indirection vectors for various sort methods
#
@@ -53,10 +53,11 @@ EOF
# this, that would be cleaner....
${AWK-awk} <$CAPS '
-$3 != "str" {next;}
-$1 ~ /^acs_/ {print "-1,\t/* ", $2, " */"; count++; next;}
-$0 ~ /#[0-9]/ {print "1,\t/* ", $2, " */"; count++; next;}
- {print "0,\t/* ", $2, " */"; count++;}
-END {printf("} /* %d entries */;\n\n", count);}
+$3 != "str" {next;}
+$1 ~ /^acs_/ {print "-1,\t/* ", $2, " */"; count++; next;}
+$1 ~ /^label_format/ {print "-1,\t/* ", $2, " */"; count++; next;}
+$0 ~ /#[0-9]/ {print "1,\t/* ", $2, " */"; count++; next;}
+ {print "0,\t/* ", $2, " */"; count++;}
+END {printf("} /* %d entries */;\n\n", count);}
'
diff --git a/include/MKterm.h.awk.in b/include/MKterm.h.awk.in
index 261c40d..587ee52 100644
--- a/include/MKterm.h.awk.in
+++ b/include/MKterm.h.awk.in
@@ -1,7 +1,7 @@
# vile:awkmode
BEGIN {
print "/****************************************************************************"
- print " * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *"
+ print " * Copyright (c) 1998-2011,2013 Free Software Foundation, Inc. *"
print " * *"
print " * Permission is hereby granted, free of charge, to any person obtaining a *"
print " * copy of this software and associated documentation files (the *"
@@ -34,7 +34,7 @@ BEGIN {
print "/* and: Thomas E. Dickey 1995-on */"
print "/****************************************************************************/"
print ""
- print "/* $Id: MKterm.h.awk.in,v 1.58 2010/01/09 19:53:26 tom Exp $ */"
+ print "/* $Id: MKterm.h.awk.in,v 1.62 2013/08/17 19:21:56 tom Exp $ */"
print ""
print "/*"
print "** term.h -- Definition of struct term"
@@ -62,6 +62,12 @@ BEGIN {
print "#undef NCURSES_SBOOL"
print "#define NCURSES_SBOOL @NCURSES_SBOOL@"
print ""
+ print "#undef NCURSES_USE_DATABASE"
+ print "#define NCURSES_USE_DATABASE @NCURSES_USE_DATABASE@"
+ print ""
+ print "#undef NCURSES_USE_TERMCAP"
+ print "#define NCURSES_USE_TERMCAP @NCURSES_USE_TERMCAP@"
+ print ""
print "#undef NCURSES_XNAMES"
print "#define NCURSES_XNAMES @NCURSES_XNAMES@"
print ""
@@ -93,41 +99,6 @@ BEGIN {
print "#include <termio.h>"
print "#define TTY struct termio"
print ""
- print "/* Add definitions to make termio look like termios."
- print " * But ifdef it, since there are some implementations"
- print " * that try to do this for us in a fake <termio.h>."
- print " */"
- print "#ifndef TCSANOW"
- print "#define TCSANOW TCSETA"
- print "#endif"
- print "#ifndef TCSADRAIN"
- print "#define TCSADRAIN TCSETAW"
- print "#endif"
- print "#ifndef TCSAFLUSH"
- print "#define TCSAFLUSH TCSETAF"
- print "#endif"
- print "#ifndef tcsetattr"
- print "#define tcsetattr(fd, cmd, arg) ioctl(fd, cmd, arg)"
- print "#endif"
- print "#ifndef tcgetattr"
- print "#define tcgetattr(fd, arg) ioctl(fd, TCGETA, arg)"
- print "#endif"
- print "#ifndef cfgetospeed"
- print "#define cfgetospeed(t) ((t)->c_cflag & CBAUD)"
- print "#endif"
- print "#ifndef TCIFLUSH "
- print "#define TCIFLUSH 0"
- print "#endif"
- print "#ifndef TCOFLUSH "
- print "#define TCOFLUSH 1"
- print "#endif"
- print "#ifndef TCIOFLUSH "
- print "#define TCIOFLUSH 2"
- print "#endif"
- print "#ifndef tcflush"
- print "#define tcflush(fd, arg) ioctl(fd, TCFLSH, arg)"
- print "#endif"
- print ""
print "#else /* !HAVE_TERMIO_H */"
print ""
print "#if __MINGW32__"
@@ -281,6 +252,7 @@ END {
print "extern NCURSES_EXPORT(int) _nc_get_tty_mode (TTY *buf);"
print "extern NCURSES_EXPORT(int) _nc_read_entry (const char * const, char * const, TERMTYPE *const);"
print "extern NCURSES_EXPORT(int) _nc_read_file_entry (const char *const, TERMTYPE *);"
+ print "extern NCURSES_EXPORT(void) _nc_init_termtype (TERMTYPE *const);"
print "extern NCURSES_EXPORT(int) _nc_read_termtype (TERMTYPE *, char *, int);"
print "extern NCURSES_EXPORT(char *) _nc_first_name (const char *const);"
print "extern NCURSES_EXPORT(int) _nc_name_match (const char *const, const char *const, const char *const);"
diff --git a/include/Makefile.in b/include/Makefile.in
index e2a2f8a..61f3884 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -1,6 +1,6 @@
-# $Id: Makefile.in,v 1.40 2010/11/27 21:45:27 tom Exp $
+# $Id: Makefile.in,v 1.41 2013/08/03 23:10:51 tom Exp $
##############################################################################
-# Copyright (c) 1998,2009,2010 Free Software Foundation, Inc. #
+# Copyright (c) 1998-2010,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"), #
@@ -48,6 +48,9 @@ srcdir = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
includedir = @includedir@
+includesubdir = @includesubdir@
+
+INCLUDEDIR = $(DESTDIR)$(includedir)$(includesubdir)
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
diff --git a/include/curses.h.in b/include/curses.h.in
index 5774154..65eedaa 100644
--- a/include/curses.h.in
+++ b/include/curses.h.in
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. *
+ * 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 *
@@ -32,7 +32,7 @@
* and: Thomas E. Dickey 1996-on *
****************************************************************************/
-/* $Id: curses.h.in,v 1.220 2011/01/22 19:47:20 tom Exp $ */
+/* $Id: curses.h.in,v 1.241 2014/08/09 20:39:44 tom Exp $ */
#ifndef __NCURSES_H
#define __NCURSES_H
@@ -59,6 +59,10 @@
*/
#include <ncurses_dll.h>
+#if @HAVE_STDINT_H@
+#include <stdint.h>
+#endif
+
/*
* User-definable tweak to disable the include of <stdbool.h>.
*/
@@ -70,12 +74,6 @@
* 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
-#endif /* NCURSES_NOMACROS */
-
#ifndef NCURSES_ATTR_T
#define NCURSES_ATTR_T int
#endif
@@ -91,11 +89,20 @@
#define NCURSES_INLINE @NCURSES_INLINE@
/*
- * The internal type used for color values
+ * 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.
*/
@@ -129,6 +136,13 @@
#define NCURSES_TPARM_VARARGS @NCURSES_TPARM_VARARGS@
/*
+ * 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 @NCURSES_TPARM_ARG@
+
+/*
* 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.
@@ -140,8 +154,8 @@
typedef unsigned chtype;
typedef unsigned mmask_t;
#else
-typedef unsigned @cf_cv_typeof_chtype@ chtype;
-typedef unsigned @cf_cv_typeof_mmask_t@ mmask_t;
+typedef @cf_cv_typeof_chtype@ chtype;
+typedef @cf_cv_typeof_mmask_t@ mmask_t;
#endif
/*
@@ -151,15 +165,21 @@ typedef unsigned @cf_cv_typeof_mmask_t@ mmask_t;
/*
* With XPG4, you must define _XOPEN_SOURCE_EXTENDED, it is redundant (or
- * conflicting) when _XOPEN_SOURCE is 500 or greater.
+ * 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.
*/
-#undef NCURSES_WIDECHAR
-#if defined(_XOPEN_SOURCE_EXTENDED) || defined(_XPG5)
-#define NCURSES_WIDECHAR
+#ifndef NCURSES_WIDECHAR
+#if defined(_XOPEN_SOURCE_EXTENDED) || (defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE - 0 >= 500))
+#define NCURSES_WIDECHAR 1
+#else
+#define NCURSES_WIDECHAR 0
#endif
+#endif /* NCURSES_WIDECHAR */
#include <stdarg.h> /* we need va_list */
-#ifdef NCURSES_WIDECHAR
+#if NCURSES_WIDECHAR
#include <stddef.h> /* we want wchar_t */
#endif
@@ -231,6 +251,10 @@ extern "C" {
#define WA_TOP A_TOP
#define WA_VERTICAL A_VERTICAL
+#if @NCURSES_EXT_FUNCS@
+#define WA_ITALIC A_ITALIC /* ncurses extension */
+#endif
+
/* colors */
#define COLOR_BLACK 0
#define COLOR_RED 1
@@ -250,7 +274,7 @@ NCURSES_WRAPPED_VAR(chtype*, acs_map);
extern NCURSES_EXPORT_VAR(chtype) acs_map[];
#endif
-#define NCURSES_ACS(c) (acs_map[NCURSES_CAST(unsigned char,c)])
+#define NCURSES_ACS(c) (acs_map[NCURSES_CAST(unsigned char,(c))])
/* VT100 symbols begin here */
#define ACS_ULCORNER NCURSES_ACS('l') /* upper left corner */
@@ -342,7 +366,7 @@ typedef struct _win_st WINDOW;
typedef chtype attr_t; /* ...must be at least as wide as chtype */
-#ifdef NCURSES_WIDECHAR
+#if NCURSES_WIDECHAR
#if @NCURSES_LIBUTF8@
#ifdef mblen /* libutf8.h defines it w/o undefining first */
@@ -366,7 +390,7 @@ typedef unsigned int wint_t@NCURSES_OK_WCHAR_T@;
/*
* 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.
+ * (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 @NCURSES_CCHARW_MAX@
@@ -434,7 +458,7 @@ struct _win_st
NCURSES_SIZE_T _yoffset; /* real begy is _begy + _yoffset */
-#ifdef NCURSES_WIDECHAR
+#if NCURSES_WIDECHAR
cchar_t _bkgrnd; /* current background char/attribute pair */
#if @NCURSES_EXT_COLORS@
int _color; /* current color-pair for non-space character */
@@ -556,10 +580,10 @@ 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 *, short *, void *); /* 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, short, 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 */
@@ -568,13 +592,13 @@ extern NCURSES_EXPORT(int) border (chtype,chtype,chtype,chtype,chtype,chtype,cht
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, short, const void *); /* generated */
+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 (short,short*,short*,short*); /* implemented */
-extern NCURSES_EXPORT(int) color_set (short,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 */
@@ -613,8 +637,8 @@ 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 (short,short,short,short); /* implemented */
-extern NCURSES_EXPORT(int) init_pair (short,short,short); /* 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 */
@@ -638,7 +662,7 @@ extern NCURSES_EXPORT(int) mvaddchnstr (int, int, const chtype *, int); /* gener
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, short, const void *); /* 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 */
@@ -664,7 +688,7 @@ extern NCURSES_EXPORT(int) mvwaddchnstr (WINDOW *, int, int, const chtype *, int
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, short, const void *);/* 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 */
@@ -698,7 +722,7 @@ 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 (short,short*,short*); /* 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 */
@@ -732,9 +756,9 @@ 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,short,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 (short); /* 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 */
@@ -757,6 +781,7 @@ 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 */
@@ -772,18 +797,18 @@ 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 *, short *, void *); /* 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, short, void *); /* generated */
+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, short, const void *);/* 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*,short,void*); /* 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 */
@@ -832,7 +857,7 @@ extern NCURSES_EXPORT(int) putp (const char *); /* implemented */
#if NCURSES_TPARM_VARARGS
extern NCURSES_EXPORT(char *) tparm (NCURSES_CONST char *, ...); /* special */
#else
-extern NCURSES_EXPORT(char *) tparm (NCURSES_CONST char *, long,long,long,long,long,long,long,long,long); /* special */
+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
@@ -854,7 +879,7 @@ extern NCURSES_EXPORT(int) getpary (const WINDOW *); /* generated */
/*
* vid_attr() was implemented originally based on a draft of X/Open curses.
*/
-#ifndef NCURSES_WIDECHAR
+#if !NCURSES_WIDECHAR
#define vid_attr(a,pair,opts) vidattr(a)
#endif
@@ -903,6 +928,7 @@ 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) wgetdelay (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */
extern NCURSES_EXPORT(int) wgetscrreg (const WINDOW *, int *, int *); /* @GENERATED_EXT_FUNCS@ */
#else
@@ -929,7 +955,7 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(beep) (SCREEN*); /* implemented:SP_FU
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*, short, short*, short*, short*); /* 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 */
@@ -945,8 +971,8 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(halfdelay) (SCREEN*, int); /* impleme
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*, short, short, short, short); /* implemented:SP_FUNC */
-extern NCURSES_EXPORT(int) NCURSES_SP_NAME(init_pair) (SCREEN*, short, short, short); /* 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 */
@@ -963,7 +989,7 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(noecho) (SCREEN*); /* implemented:SP_
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*, short, short*, short*); /* 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 */
@@ -978,9 +1004,9 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_attroff) (SCREEN*, const chtype);
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, short, void*); /* 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*, short); /* 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 */
@@ -994,6 +1020,7 @@ extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(termname) (SCREEN*); /* implemente
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 @NCURSES_EXT_FUNCS@
@@ -1022,7 +1049,7 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(use_legacy_coding) (SCREEN*, int); /*
/* attributes */
#define NCURSES_ATTR_SHIFT 8
-#define NCURSES_BITS(mask,shift) ((mask) << ((shift) + NCURSES_ATTR_SHIFT))
+#define NCURSES_BITS(mask,shift) (NCURSES_CAST(chtype,(mask)) << ((shift) + NCURSES_ATTR_SHIFT))
#define A_NORMAL (@cf_cv_1UL@ - @cf_cv_1UL@)
#define A_ATTRIBUTES NCURSES_BITS(~(@cf_cv_1UL@ - @cf_cv_1UL@),0)
@@ -1044,6 +1071,10 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(use_legacy_coding) (SCREEN*, int); /*
#define A_TOP NCURSES_BITS(@cf_cv_1UL@,21)
#define A_VERTICAL NCURSES_BITS(@cf_cv_1UL@,22)
+#if @NCURSES_EXT_FUNCS@
+#define A_ITALIC NCURSES_BITS(@cf_cv_1UL@,23) /* ncurses extension */
+#endif
+
/*
* Most of the pseudo functions are macros that either provide compatibility
* with older versions of curses, or provide inline functionality to improve
@@ -1084,7 +1115,7 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(use_legacy_coding) (SCREEN*, int); /*
*/
#define wgetstr(w, s) wgetnstr(w, s, -1)
-#define getnstr(s, n) wgetnstr(stdscr, s, n)
+#define getnstr(s, n) wgetnstr(stdscr, s, (n))
#define setterm(term) setupterm(term, 1, (int *)0)
@@ -1115,9 +1146,9 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(use_legacy_coding) (SCREEN*, int); /*
#define wattroff(win,at) wattr_off(win, NCURSES_CAST(attr_t, at), NULL)
#if !NCURSES_OPAQUE
-#if defined(NCURSES_WIDECHAR) && @NCURSES_EXT_COLORS@
+#if NCURSES_WIDECHAR && @NCURSES_EXT_COLORS@
#define wattrset(win,at) ((win) \
- ? ((win)->_color = PAIR_NUMBER(at), \
+ ? ((win)->_color = NCURSES_CAST(int, PAIR_NUMBER(at)), \
(win)->_attrs = NCURSES_CAST(attr_t, at), \
OK) \
: ERR)
@@ -1137,15 +1168,15 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(use_legacy_coding) (SCREEN*, int); /*
#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 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)->_maxy+1)
+#define redrawwin(win) wredrawln(win, 0, ((win) ? (win)->_maxy+1 : -1))
#endif /* NCURSES_OPAQUE */
#define waddstr(win,str) waddnstr(win,str,-1)
@@ -1154,55 +1185,55 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(use_legacy_coding) (SCREEN*, int); /*
/*
* 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)))
+#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 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 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 echochar(c) wechochar(stdscr,(c))
#define erase() werase(stdscr)
#define getch() wgetch(stdscr)
-#define getstr(str) wgetstr(stdscr,str)
+#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 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 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 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 timeout(delay) wtimeout(stdscr,(delay))
#define wdeleteln(win) winsdelln(win,-1)
#define winsertln(win) winsdelln(win,1)
@@ -1210,70 +1241,75 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(use_legacy_coding) (SCREEN*, int); /*
* 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)
+#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)->_bkgd)
+#define getbkgd(win) ((win) ? ((win)->_bkgd) : 0)
#endif /* NCURSES_OPAQUE */
#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 defined(NCURSES_WIDECHAR) && @NCURSES_EXT_COLORS@
-#define wattr_set(win,a,p,opts) ((win)->_attrs = ((a) & ~A_COLOR), \
- (win)->_color = (p), \
+#if NCURSES_WIDECHAR && @NCURSES_EXT_COLORS@
+#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)->_attrs)), \
- (void)((p) != (void *)0 && (*(p) = (short)(win)->_color)), \
+#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
-#define wattr_set(win,a,p,opts) ((win)->_attrs = (((a) & ~A_COLOR) | (attr_t)COLOR_PAIR(p)), OK)
-#define wattr_get(win,a,p,opts) ((void)((a) != (void *)0 && (*(a) = (win)->_attrs)), \
- (void)((p) != (void *)0 && (*(p) = (short)PAIR_NUMBER((win)->_attrs))), \
+#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
#endif /* NCURSES_OPAQUE */
@@ -1312,6 +1348,7 @@ NCURSES_EXPORT(int) vsscanf(const char *, const char *, va_list);
#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 wgetdelay(win) ((win) ? (win)->_delay : 0)
#define wgetparent(win) ((win) ? (win)->_parent : 0)
#define wgetscrreg(win,t,b) ((win) ? (*(t) = (win)->_regtop, *(b) = (win)->_regbottom, OK) : ERR)
#endif
diff --git a/include/curses.tail b/include/curses.tail
index 098c898..5f911ae 100644
--- a/include/curses.tail
+++ b/include/curses.tail
@@ -1,4 +1,4 @@
-/* $Id: curses.tail,v 1.20 2010/03/28 19:10:55 tom Exp $ */
+/* $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
@@ -133,7 +133,7 @@ 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);
-#ifdef NCURSES_WIDECHAR
+#if NCURSES_WIDECHAR
#define _tracech_t _tracecchar_t
extern NCURSES_EXPORT(char *) _tracecchar_t (const cchar_t *);
#define _tracech_t2 _tracecchar_t2
diff --git a/include/curses.wide b/include/curses.wide
index 44135ee..5d130a9 100644
--- a/include/curses.wide
+++ b/include/curses.wide
@@ -1,4 +1,4 @@
-/* $Id: curses.wide,v 1.42 2010/03/30 00:39:41 tom Exp $ */
+/* $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
@@ -6,11 +6,11 @@
*/
#define _XOPEN_CURSES 1
-#ifdef NCURSES_WIDECHAR
+#if NCURSES_WIDECHAR
extern NCURSES_EXPORT_VAR(cchar_t *) _nc_wacs;
-#define NCURSES_WACS(c) (&_nc_wacs[(unsigned char)c])
+#define NCURSES_WACS(c) (&_nc_wacs[NCURSES_CAST(unsigned char,(c))])
#define WACS_BSSB NCURSES_WACS('l')
#define WACS_SSBB NCURSES_WACS('m')
@@ -135,7 +135,7 @@ 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*, short*, void*); /* implemented */
+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 */
@@ -185,12 +185,12 @@ extern NCURSES_EXPORT(int) mvwins_wstr (WINDOW *, int, int, const wchar_t *); /*
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, short, const void *); /* 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, short, void *); /* implemented */
-extern NCURSES_EXPORT(int) vid_puts (attr_t, short, void *, NCURSES_OUTC); /* 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 */
@@ -221,8 +221,8 @@ extern NCURSES_EXPORT(int) wvline_set (WINDOW *, const cchar_t *, int); /* imple
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, short, void *); /* implemented:SP_FUNC */
-extern NCURSES_EXPORT(int) NCURSES_SP_NAME(vid_puts) (SCREEN*, attr_t, short, void *, NCURSES_SP_OUTC); /* 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
#ifndef NCURSES_NOMACROS
@@ -230,77 +230,77 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(vid_puts) (SCREEN*, attr_t, short, vo
/*
* 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)
+#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) (*wch = win->_bkgrnd, OK)
+#define wgetbkgrnd(win,wch) ((win) ? (*(wch) = (win)->_bkgrnd) : *(wch), OK)
#endif
-#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 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))
+#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 */
diff --git a/include/hashed_db.h b/include/hashed_db.h
index 4dd3933..1ae29b0 100644
--- a/include/hashed_db.h
+++ b/include/hashed_db.h
@@ -31,7 +31,7 @@
****************************************************************************/
/*
- * $Id: hashed_db.h,v 1.5 2006/08/19 15:58:34 tom Exp $
+ * $Id: hashed_db.h,v 1.6 2014/04/12 22:41:10 tom Exp $
*/
#ifndef HASHED_DB_H
@@ -41,6 +41,8 @@
#if USE_HASHED_DB
+#define DB_DBM_HSEARCH 0 /* quiet gcc -Wundef with db6 */
+
#include <db.h>
#ifndef DBN_SUFFIX
diff --git a/include/headers b/include/headers
index 6c36795..2f20bed 100644
--- a/include/headers
+++ b/include/headers
@@ -1,6 +1,6 @@
-# $Id: headers,v 1.10 2009/09/05 17:46:30 tom Exp $
+# $Id: headers,v 1.13 2013/10/20 00:32:21 tom Exp $
##############################################################################
-# Copyright (c) 1998-2007,2009 Free Software Foundation, Inc. #
+# 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"), #
@@ -29,14 +29,24 @@
#
# Author: Thomas E. Dickey 1996-on
#
-term.h
curses.h
unctrl.h
-termcap.h
ncurses_dll.h
+
+# Support for termcap (and tic, etc.), which can be a separate library
+@ termlib
+term.h
+termcap.h
+
+# Headers used only for tic, other programs using internal interfaces
@ ticlib
$(srcdir)/tic.h
$(srcdir)/term_entry.h
$(srcdir)/nc_tparm.h
+# Porting
+@ port_win32con
+$(srcdir)/ncurses_mingw.h
+$(srcdir)/nc_mingw.h
+
# vile:makemode
diff --git a/include/nc_alloc.h b/include/nc_alloc.h
index da70906..356f605 100644
--- a/include/nc_alloc.h
+++ b/include/nc_alloc.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
+ * 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 *
@@ -29,10 +29,11 @@
/****************************************************************************
* Author: Thomas E. Dickey 1996-on *
****************************************************************************/
-/* $Id: nc_alloc.h,v 1.18 2010/11/20 22:59:49 tom Exp $ */
+/* $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" {
@@ -94,6 +95,7 @@ extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_free_and_exit)(SCREEN*, int) GCC
/* 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
@@ -101,12 +103,14 @@ extern NCURSES_EXPORT(char *) _nc_strdup(const char *);
/* entries.c */
extern NCURSES_EXPORT(void) _nc_leaks_tinfo(void);
-#define typeMalloc(type,elts) (type *)malloc((elts)*sizeof(type))
-#define typeCalloc(type,elts) (type *)calloc((elts),sizeof(type))
-#define typeRealloc(type,elts,ptr) (type *)_nc_doalloc(ptr, (elts)*sizeof(type))
+#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
+/* *INDENT-ON* */
+
#endif /* NC_ALLOC_included */
diff --git a/include/nc_string.h b/include/nc_string.h
new file mode 100644
index 0000000..7e6ccd4
--- /dev/null
+++ b/include/nc_string.h
@@ -0,0 +1,77 @@
+/****************************************************************************
+ * 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
+
+#include <ncurses_cfg.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
+#define NCURSES_VOID (void)
+#endif
+
+#if USE_STRING_HACKS && HAVE_STRLCAT
+#define _nc_STRCAT(d,s,n) NCURSES_VOID strlcat((d),(s),NCURSES_CAST(size_t,n))
+#else
+#define _nc_STRCAT(d,s,n) NCURSES_VOID strcat((d),(s))
+#endif
+
+#if USE_STRING_HACKS && HAVE_STRLCPY
+#define _nc_STRCPY(d,s,n) NCURSES_VOID strlcpy((d),(s),NCURSES_CAST(size_t,n))
+#else
+#define _nc_STRCPY(d,s,n) NCURSES_VOID strcpy((d),(s))
+#endif
+
+#if USE_STRING_HACKS && HAVE_SNPRINTF
+#define _nc_SPRINTF NCURSES_VOID snprintf
+#define _nc_SLIMIT(n) NCURSES_CAST(size_t,n),
+#else
+#define _nc_SPRINTF NCURSES_VOID sprintf
+#define _nc_SLIMIT(n) /* nothing */
+#endif
+
+#endif /* STRING_HACKS_H */
diff --git a/include/nc_termios.h b/include/nc_termios.h
new file mode 100644
index 0000000..2217f07
--- /dev/null
+++ b/include/nc_termios.h
@@ -0,0 +1,161 @@
+/****************************************************************************
+ * Copyright (c) 2011,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: Thomas E. Dickey 2011 *
+ ****************************************************************************/
+
+/* $Id: nc_termios.h,v 1.3 2014/05/03 19:40:10 juergen Exp $ */
+
+#ifndef NC_TERMIOS_included
+#define NC_TERMIOS_included 1
+
+#if HAVE_TERMIOS_H && HAVE_TCGETATTR
+
+#else /* !HAVE_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
+#ifndef TCSAFLUSH
+#define TCSAFLUSH TCSETAF
+#endif
+#ifndef tcsetattr
+#define tcsetattr(fd, cmd, arg) ioctl(fd, cmd, arg)
+#endif
+#ifndef tcgetattr
+#define tcgetattr(fd, arg) ioctl(fd, TCGETA, arg)
+#endif
+#ifndef cfgetospeed
+#define cfgetospeed(t) ((t)->c_cflag & CBAUD)
+#endif
+#ifndef TCIFLUSH
+#define TCIFLUSH 0
+#endif
+#ifndef tcflush
+#define tcflush(fd, arg) ioctl(fd, TCFLSH, arg)
+#endif
+
+#else /* !HAVE_TERMIO_H */
+
+#if __MINGW32__
+
+/* lflag bits */
+#define ISIG 0x0001
+#define ICANON 0x0002
+#define ECHO 0x0004
+#define ECHOE 0x0008
+#define ECHOK 0x0010
+#define ECHONL 0x0020
+#define NOFLSH 0x0040
+#define IEXTEN 0x0100
+
+#define VEOF 4
+#define VERASE 5
+#define VINTR 6
+#define VKILL 7
+#define VMIN 9
+#define VQUIT 10
+#define VTIME 16
+
+/* iflag bits */
+#define IGNBRK 0x00001
+#define BRKINT 0x00002
+#define IGNPAR 0x00004
+#define INPCK 0x00010
+#define ISTRIP 0x00020
+#define INLCR 0x00040
+#define IGNCR 0x00080
+#define ICRNL 0x00100
+#define IXON 0x00400
+#define IXOFF 0x01000
+#define PARMRK 0x10000
+
+/* oflag bits */
+#define OPOST 0x00001
+
+/* cflag bits */
+#define CBAUD 0x0100f
+#define B0 0x00000
+#define B50 0x00001
+#define B75 0x00002
+#define B110 0x00003
+#define B134 0x00004
+#define B150 0x00005
+#define B200 0x00006
+#define B300 0x00007
+#define B600 0x00008
+#define B1200 0x00009
+#define B1800 0x0000a
+#define B2400 0x0000b
+#define B4800 0x0000c
+#define B9600 0x0000d
+
+#define CSIZE 0x00030
+#define CS8 0x00030
+#define CSTOPB 0x00040
+#define CREAD 0x00080
+#define PARENB 0x00100
+#define PARODD 0x00200
+#define HUPCL 0x00400
+#define CLOCAL 0x00800
+
+#define TCIFLUSH 0
+#define TCSADRAIN 3
+
+#ifndef cfgetospeed
+#define cfgetospeed(t) ((t)->c_cflag & CBAUD)
+#endif
+
+#ifndef tcsetattr
+#define tcsetattr(fd, opt, arg) _nc_mingw_tcsetattr(fd, opt, arg)
+#endif
+
+#ifndef tcgetattr
+#define tcgetattr(fd, arg) _nc_mingw_tcgetattr(fd, arg)
+#endif
+
+#ifndef tcflush
+#define tcflush(fd, queue) _nc_mingw_tcflush(fd, queue)
+#endif
+
+#undef ttyname
+#define ttyname(fd) NULL
+
+#endif /* __MINGW32__ */
+#endif /* HAVE_TERMIO_H */
+
+#endif /* HAVE_TERMIOS_H */
+
+#endif /* NC_TERMIOS_included */
diff --git a/include/nc_tparm.h b/include/nc_tparm.h
index a8dbcac..248f6c0 100644
--- a/include/nc_tparm.h
+++ b/include/nc_tparm.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2006,2010 Free Software Foundation, Inc. *
+ * 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 *
@@ -30,7 +30,7 @@
* Author: Thomas E. Dickey 2006 *
****************************************************************************/
-/* $Id: nc_tparm.h,v 1.5 2010/12/25 20:27:22 tom Exp $ */
+/* $Id: nc_tparm.h,v 1.6 2012/02/18 21:34:42 tom Exp $ */
#ifndef NC_TPARM_included
#define NC_TPARM_included 1
@@ -40,8 +40,12 @@
* assumption of the varargs code.
*/
#ifndef TPARM_ARG
+#ifdef NCURSES_TPARM_ARG
+#define TPARM_ARG NCURSES_TPARM_ARG
+#else
#define TPARM_ARG long
#endif
+#endif /* TPARAM_ARG */
#define TPARM_N(n) (TPARM_ARG)(n)
diff --git a/include/ncurses_defs b/include/ncurses_defs
index 42d5908..5a63b25 100644
--- a/include/ncurses_defs
+++ b/include/ncurses_defs
@@ -1,6 +1,6 @@
-# $Id: ncurses_defs,v 1.46 2011/03/22 09:17:59 tom Exp $
+# $Id: ncurses_defs,v 1.66 2014/09/05 08:46:16 tom Exp $
##############################################################################
-# Copyright (c) 2000-2010,2011 Free Software Foundation, Inc. #
+# Copyright (c) 2000-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"), #
@@ -33,7 +33,7 @@
BROKEN_LINKER
BSD_TPUTS
-CC_HAS_PROTOS
+CGETENT_CONST /* nothing */
CPP_HAS_PARAM_INIT
CURSES_ACS_ARRAY acs_map
CURSES_WACS_ARRAY _nc_wacs
@@ -41,6 +41,7 @@ DECL_ERRNO
ETIP_NEEDS_MATH_H
GCC_NORETURN /* nothing */
GCC_UNUSED /* nothing */
+HAVE_ASSUME_DEFAULT_COLORS
HAVE_BIG_CORE
HAVE_BSD_CGETENT
HAVE_BSD_SIGNAL_H
@@ -69,6 +70,7 @@ HAVE_GPM_H
HAVE_GPP_BUILTIN_H
HAVE_GXX_BUILTIN_H
HAVE_HAS_KEY
+HAVE_INTTYPES_H
HAVE_IOSTREAM
HAVE_ISASCII
HAVE_ISSETUGID
@@ -102,6 +104,7 @@ HAVE_PANEL_H
HAVE_POLL
HAVE_POLL_H
HAVE_PURIFY
+HAVE_PUTENV
HAVE_PUTWC
HAVE_PUTWIN 1
HAVE_REGEXPR_H_FUNCS
@@ -115,6 +118,7 @@ HAVE_SCR_DUMP 1
HAVE_SELECT
HAVE_SETBUF
HAVE_SETBUFFER
+HAVE_SETENV
HAVE_SETUPTERM 1
HAVE_SETVBUF
HAVE_SGTTY_H
@@ -123,7 +127,11 @@ HAVE_SIGVEC
HAVE_SIZECHANGE
HAVE_SLK_COLOR
HAVE_SLK_INIT 1
+HAVE_SNPRINTF
+HAVE_STDINT_H
HAVE_STRDUP
+HAVE_STRLCAT
+HAVE_STRLCPY
HAVE_STRSTR
HAVE_SYMLINK
HAVE_SYS_BSDTYPES_H
@@ -153,10 +161,17 @@ HAVE_TYPEAHEAD 1
HAVE_TYPEINFO
HAVE_TYPE_ATTR_T
HAVE_TYPE_SIGACTION
+HAVE_UNCTRL_H 1
HAVE_UNISTD_H
HAVE_UNLINK
HAVE_USE_DEFAULT_COLORS
+HAVE_USE_ENV 1
+HAVE_USE_EXTENDED_NAMES
+HAVE_USE_SCREEN
+HAVE_USE_WINDOW
HAVE_VFSCANF
+HAVE_VIDPUTS 1
+HAVE_VID_PUTS 1
HAVE_VSNPRINTF
HAVE_VSSCANF
HAVE_WCSRTOMBS
@@ -175,11 +190,12 @@ NCURSES_EXPANDED
NCURSES_EXT_COLORS
NCURSES_EXT_FUNCS
NCURSES_NO_PADDING
+NCURSES_OSPEED_COMPAT
NCURSES_PATHSEP ':'
+NCURSES_WIDECHAR
NEED_PTEM_H
NO_LEAKS
PURE_TERMINFO
-RETSIGTYPE
STDC_HEADERS
SVR4_ACTION
SVR4_TERMIO
@@ -189,7 +205,6 @@ TERMPATH "none"
TIME_WITH_SYS_TIME
TYPEOF_CHTYPE
USE_COLORFGBG
-USE_DATABASE
USE_GETCAP
USE_GETCAP_CACHE
USE_HARD_TABS
@@ -205,9 +220,9 @@ USE_REENTRANT
USE_SAFE_SPRINTF
USE_SCROLL_HINTS
USE_SIGWINCH
+USE_STRING_HACKS
USE_SYMLINKS
USE_SYSMOUSE
-USE_TERMCAP
USE_WEAK_SYMBOLS
USE_WIDEC_SUPPORT
USE_XMC_SUPPORT
diff --git a/include/ncurses_dll.h.in b/include/ncurses_dll.h.in
index 82c9b85..676850c 100644
--- a/include/ncurses_dll.h.in
+++ b/include/ncurses_dll.h.in
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2009 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,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 *
@@ -25,11 +25,27 @@
* 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 $ */
+/* $Id: ncurses_dll.h.in,v 1.9 2014/08/02 21:30:20 tom Exp $ */
#ifndef NCURSES_DLL_H_incl
#define NCURSES_DLL_H_incl 1
+/* 2014-08-02 workaround for broken MinGW compiler.
+ * Oddly, only TRACE is mapped to trace - the other -D's are okay.
+ * suggest TDM as an alternative.
+ */
+#if defined(__MINGW64__)
+#elif defined(__MINGW32__)
+#if (__GNUC__ == 4) && (__GNUC_MINOR__ == 8)
+
+#ifdef trace
+#undef trace
+#define TRACE
+#endif
+
+#endif /* broken compiler */
+#endif /* MingW */
+
/*
* For reentrant code, we map the various global variables into SCREEN by
* using functions to access them.
diff --git a/include/ncurses_mingw.h b/include/ncurses_mingw.h
index 4ea1dad..2bbad76 100644
--- a/include/ncurses_mingw.h
+++ b/include/ncurses_mingw.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2011,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 *
@@ -31,10 +31,10 @@
* *
****************************************************************************/
-/* $Id: ncurses_mingw.h,v 1.1 2008/12/14 19:22:16 juergen Exp $ */
+/* $Id: ncurses_mingw.h,v 1.3 2014/05/03 19:40:19 juergen Exp $ */
/*
- * This is a placholder up to now and describes what needs to be implemented
+ * This is a placeholder up to now and describes what needs to be implemented
* to support I/O to external terminals with ncurses on the Windows OS.
*/
@@ -47,118 +47,36 @@
#undef TERMIOS
#define TERMIOS 1
-#define InvalidHandle ((TERM_HANDLE)-1)
-#define InvalidConsoleHandle(s) ((s)==InvalidHandle)
-
typedef unsigned char cc_t;
-typedef unsigned int speed_t;
typedef unsigned int tcflag_t;
+typedef unsigned int speed_t;
+typedef unsigned short otcflag_t;
+typedef unsigned char ospeed_t;
-#define NCCS 32
+#define NCCS 18
struct termios
{
- tcflag_t c_iflag; /* input mode */
- tcflag_t c_oflag; /* output mode */
- tcflag_t c_cflag; /* control mode */
- tcflag_t c_lflag; /* local mode */
- cc_t c_line; /* line discipline */
- cc_t c_cc[NCCS]; /* control characters */
- speed_t c_ispeed; /* input speed */
- speed_t c_ospeed; /* c_ospeed */
+ tcflag_t c_iflag;
+ tcflag_t c_oflag;
+ tcflag_t c_cflag;
+ tcflag_t c_lflag;
+ char c_line;
+ cc_t c_cc[NCCS];
+ speed_t c_ispeed;
+ speed_t c_ospeed;
};
-/* c_cc chars */
-#define VINTR 0
-#define VQUIT 1
-#define VERASE 2
-#define VKILL 3
-#define VEOF 4
-#define VTIME 5
-#define VMIN 6
-
-/* c_iflag bits */
-#define ISTRIP 0000040
-#define INLCR 0000100
-#define IGNCR 0000200
-#define ICRNL 0000400
-#define BRKINT 0000002
-#define PARMRK 0000010
-#define IXON 0002000
-#define IGNBRK 0000001
-#define IGNPAR 0000004
-#define INPCK 0000020
-#define IXOFF 0010000
-
-/* c_oflag bits */
-#define OPOST 0000001
-
-/* c_cflag bit meaning */
-#define CBAUD 0010017
-#define CSIZE 0000060
-#define CS8 0000060
-#define B0 0000000
-#define B50 0000001
-#define B75 0000002
-#define B110 0000003
-#define B134 0000004
-#define B150 0000005
-#define B200 0000006
-#define B300 0000007
-#define B600 0000010
-#define B1200 0000011
-#define B1800 0000012
-#define B2400 0000013
-#define B4800 0000014
-#define B9600 0000015
-#define CLOCAL 0004000
-#define CREAD 0000200
-#define CSTOPB 0000100
-#define HUPCL 0002000
-#define PARENB 0000400
-#define PARODD 0001000
-
-/* c_lflag bits */
-#define ECHO 0000010
-#define ECHONL 0000100
-#define ISIG 0000001
-#define IEXTEN 0100000
-#define ICANON 0000002
-#define NOFLSH 0000200
-#define ECHOE 0000020
-#define ECHOK 0000040
-
-/* tcflush() */
-#define TCIFLUSH 0
-
-/* tcsetattr uses these */
-#define TCSADRAIN 1
-
-/* ioctls */
-#define TCGETA 0x5405
-#define TCFLSH 0x540B
-#define TIOCGWINSZ 0x5413
-
-extern int _nc_mingw_ioctl(int fd, long int request, struct termios* arg);
-extern void _nc_set_term_driver(void* term);
-
-#ifndef cfgetospeed
-#define cfgetospeed(t) ((t)->c_cflag & CBAUD)
-#endif
-
-#ifndef tcsetattr
-#define tcsetattr(fd, cmd, arg) _nc_mingw_ioctl(fd, cmd, arg)
-#endif
-
-#ifndef tcgetattr
-#define tcgetattr(fd, arg) _nc_mingw_ioctl(fd, TCGETA, arg)
-#endif
-
-#ifndef tcflush
-#define tcflush(fd, arg) _nc_mingw_ioctl(fd, TCFLSH, arg)
-#endif
-
-#undef ttyname
-#define ttyname(fd) NULL
-
-#endif
-#endif
+extern NCURSES_EXPORT(int) _nc_mingw_tcsetattr(
+ int fd,
+ int optional_actions,
+ const struct termios* arg);
+extern NCURSES_EXPORT(int) _nc_mingw_tcgetattr(
+ int fd,
+ struct termios* arg);
+extern NCURSES_EXPORT(int) _nc_mingw_tcflush(
+ int fd,
+ int queue);
+extern NCURSES_EXPORT(void) _nc_set_term_driver(void* term);
+
+#endif /* _NC_MINGWH */
+#endif /* __MINGW32__ */
diff --git a/include/term_entry.h b/include/term_entry.h
index 4770f86..b12710d 100644
--- a/include/term_entry.h
+++ b/include/term_entry.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. *
+ * 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 *
@@ -32,7 +32,7 @@
* and: Thomas E. Dickey 1998-on *
****************************************************************************/
-/* $Id: term_entry.h,v 1.37 2009/07/11 16:52:29 tom Exp $ */
+/* $Id: term_entry.h,v 1.45 2014/11/01 14:47:00 tom Exp $ */
/*
* term_entry.h -- interface to entry-manipulation code
@@ -47,28 +47,46 @@ extern "C" {
#include <term.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
+#if NCURSES_USE_TERMCAP
+ dbdEnvOnce2, /* the $TERMCAP environment variable */
+ dbdEnvList2, /* the $TERMPATH environment variable */
+ dbdCfgList2, /* the compiled-in TERMPATH */
+#endif
+ 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;
-
+ 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
@@ -132,7 +150,7 @@ 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 *, 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 *);
@@ -152,7 +170,7 @@ 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_set_writedir (const char *);
extern NCURSES_EXPORT(void) _nc_write_entry (TERMTYPE *const);
/* comp_parse.c: entry list handling */
@@ -166,9 +184,9 @@ 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
-
-#endif /* NCURSES_TERM_ENTRY_H_incl */
+#endif /* NCURSES_TERM_ENTRY_H_incl */
diff --git a/include/tic.h b/include/tic.h
index 4f3a21c..528a1b7 100644
--- a/include/tic.h
+++ b/include/tic.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2009 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2011,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 *
@@ -33,14 +33,14 @@
****************************************************************************/
/*
- * $Id: tic.h,v 1.65 2009/08/08 17:52:46 tom Exp $
+ * $Id: tic.h,v 1.69 2012/03/17 18:22:10 tom Exp $
* tic.h - Global variables and structures for the terminfo
* compiler.
*/
#ifndef __TIC_H
#define __TIC_H
-
+/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif
@@ -224,6 +224,12 @@ extern NCURSES_EXPORT(const struct alias *) _nc_get_alias_table (bool);
#define NOTFOUND ((struct name_table_entry *) 0)
+/*
+ * The casts are required for correct sign-propagation with systems such as
+ * AIX, IRIX64, Solaris which default to unsigned characters. The C standard
+ * leaves this detail unspecified.
+ */
+
/* out-of-band values for representing absent capabilities */
#define ABSENT_BOOLEAN ((signed char)-1) /* 255 */
#define ABSENT_NUMERIC (-1)
@@ -248,6 +254,8 @@ extern NCURSES_EXPORT(const struct alias *) _nc_get_alias_table (bool);
#define TERMINFO "/usr/share/terminfo"
#endif
+#ifdef NCURSES_TERM_ENTRY_H_incl
+
/* access.c */
extern NCURSES_EXPORT(unsigned) _nc_pathlast (const char *);
extern NCURSES_EXPORT(bool) _nc_is_abs_path (const char *);
@@ -270,6 +278,7 @@ extern NCURSES_EXPORT(void) _nc_reset_input (FILE *, char *);
extern NCURSES_EXPORT_VAR(int) _nc_curr_col;
extern NCURSES_EXPORT_VAR(int) _nc_curr_line;
extern NCURSES_EXPORT_VAR(int) _nc_syntax;
+extern NCURSES_EXPORT_VAR(int) _nc_strict_bsd;
extern NCURSES_EXPORT_VAR(long) _nc_comment_end;
extern NCURSES_EXPORT_VAR(long) _nc_comment_start;
extern NCURSES_EXPORT_VAR(long) _nc_curr_file_pos;
@@ -314,23 +323,6 @@ extern NCURSES_EXPORT_VAR(int) _nc_nulls_sent; /* Add one for every null sent *
extern const char * _nc_progname;
/* db_iterator.c */
-typedef enum {
- dbdTIC = 0,
-#if USE_DATABASE
- dbdEnvOnce,
- dbdHome,
- dbdEnvList,
- dbdCfgList,
- dbdCfgOnce,
-#endif
-#if USE_TERMCAP
- dbdEnvOnce2,
- dbdEnvList2,
- dbdCfgList2,
-#endif
- dbdLAST
-} DBDIRS;
-
extern NCURSES_EXPORT(const char *) _nc_next_db(DBDIRS *, int *);
extern NCURSES_EXPORT(const char *) _nc_tic_dir (const char *);
extern NCURSES_EXPORT(void) _nc_first_db(DBDIRS *, int *);
@@ -339,8 +331,11 @@ extern NCURSES_EXPORT(void) _nc_last_db(void);
/* write_entry.c */
extern NCURSES_EXPORT(int) _nc_tic_written (void);
+#endif /* NCURSES_TERM_ENTRY_H_incl */
+
#ifdef __cplusplus
}
#endif
+/* *INDENT-ON* */
#endif /* __TIC_H */