aboutsummaryrefslogtreecommitdiff
path: root/ncurses
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2014-03-01 00:40:26 +0000
committerXin LI <delphij@FreeBSD.org>2014-03-01 00:40:26 +0000
commitcea297eb34d2361e79529034397465068ae34ecd (patch)
treefbc3775582ebd1e6f026931751cfab6c588b643c /ncurses
parent6826a395a618014c4541ff6a654be0d3afb392a1 (diff)
downloadsrc-cea297eb34d2361e79529034397465068ae34ecd.tar.gz
src-cea297eb34d2361e79529034397465068ae34ecd.zip
Vendor import of ncurses 5.9 20140222 snapshot.vendor/ncurses/5.9-20140222
Notes
Notes: svn path=/vendor/ncurses/dist/; revision=262639 svn path=/vendor/ncurses/5.9-20140222/; revision=262640; tag=vendor/ncurses/5.9-20140222
Diffstat (limited to 'ncurses')
-rw-r--r--ncurses/Makefile.in29
-rw-r--r--ncurses/base/MKkeyname.awk30
-rwxr-xr-xncurses/base/MKlib_gen.sh43
-rw-r--r--ncurses/base/MKunctrl.awk6
-rw-r--r--ncurses/base/keybound.c9
-rw-r--r--ncurses/base/keyok.c64
-rw-r--r--ncurses/base/lib_addch.c16
-rw-r--r--ncurses/base/lib_addstr.c10
-rw-r--r--ncurses/base/lib_beep.c11
-rw-r--r--ncurses/base/lib_bkgd.c11
-rw-r--r--ncurses/base/lib_chgat.c16
-rw-r--r--ncurses/base/lib_color.c162
-rw-r--r--ncurses/base/lib_colorset.c8
-rw-r--r--ncurses/base/lib_dft_fgbg.c5
-rw-r--r--ncurses/base/lib_driver.c22
-rw-r--r--ncurses/base/lib_flash.c20
-rw-r--r--ncurses/base/lib_freeall.c20
-rw-r--r--ncurses/base/lib_getch.c39
-rw-r--r--ncurses/base/lib_getstr.c6
-rw-r--r--ncurses/base/lib_insch.c34
-rw-r--r--ncurses/base/lib_instr.c16
-rw-r--r--ncurses/base/lib_mouse.c417
-rw-r--r--ncurses/base/lib_newterm.c20
-rw-r--r--ncurses/base/lib_newwin.c17
-rw-r--r--ncurses/base/lib_overlay.c21
-rw-r--r--ncurses/base/lib_printw.c34
-rw-r--r--ncurses/base/lib_refresh.c17
-rw-r--r--ncurses/base/lib_restart.c10
-rw-r--r--ncurses/base/lib_scanw.c6
-rw-r--r--ncurses/base/lib_screen.c19
-rw-r--r--ncurses/base/lib_scroll.c8
-rw-r--r--ncurses/base/lib_set_term.c52
-rw-r--r--ncurses/base/lib_slkatr_set.c10
-rw-r--r--ncurses/base/lib_slkcolor.c10
-rw-r--r--ncurses/base/lib_slkrefr.c22
-rw-r--r--ncurses/base/lib_slkset.c17
-rw-r--r--ncurses/base/lib_touch.c6
-rw-r--r--ncurses/base/lib_ungetch.c11
-rw-r--r--ncurses/base/resizeterm.c83
-rw-r--r--ncurses/base/safe_sprintf.c20
-rw-r--r--ncurses/base/vsscanf.c8
-rw-r--r--ncurses/base/wresize.c9
-rw-r--r--ncurses/build.priv.h6
-rw-r--r--ncurses/curses.priv.h327
-rw-r--r--ncurses/fifo_defs.h46
-rw-r--r--ncurses/llib-lncurses456
-rw-r--r--ncurses/llib-lncursest424
-rw-r--r--ncurses/llib-lncursestw562
-rw-r--r--ncurses/llib-lncursesw568
-rw-r--r--ncurses/llib-ltic212
-rw-r--r--ncurses/llib-ltict212
-rw-r--r--ncurses/llib-ltictw212
-rw-r--r--ncurses/llib-lticw212
-rw-r--r--ncurses/llib-ltinfo1526
-rw-r--r--ncurses/llib-ltinfot1635
-rw-r--r--ncurses/llib-ltinfotw1668
-rw-r--r--ncurses/llib-ltinfow1559
-rw-r--r--ncurses/modules8
-rw-r--r--ncurses/tinfo/MKcaptab.sh10
-rw-r--r--ncurses/tinfo/access.c43
-rw-r--r--ncurses/tinfo/alloc_entry.c55
-rw-r--r--ncurses/tinfo/alloc_ttype.c55
-rw-r--r--ncurses/tinfo/captoinfo.c212
-rw-r--r--ncurses/tinfo/comp_error.c20
-rw-r--r--ncurses/tinfo/comp_expand.c19
-rw-r--r--ncurses/tinfo/comp_parse.c187
-rw-r--r--ncurses/tinfo/comp_scan.c171
-rw-r--r--ncurses/tinfo/db_iterator.c429
-rw-r--r--ncurses/tinfo/doalloc.c21
-rw-r--r--ncurses/tinfo/entries.c11
-rw-r--r--ncurses/tinfo/getenv_num.c21
-rw-r--r--ncurses/tinfo/hashed_db.c163
-rw-r--r--ncurses/tinfo/home_terminfo.c10
-rw-r--r--ncurses/tinfo/lib_acs.c7
-rw-r--r--ncurses/tinfo/lib_baudrate.c69
-rw-r--r--ncurses/tinfo/lib_cur_term.c22
-rw-r--r--ncurses/tinfo/lib_data.c15
-rw-r--r--ncurses/tinfo/lib_has_cap.c8
-rw-r--r--ncurses/tinfo/lib_napms.c12
-rw-r--r--ncurses/tinfo/lib_options.c45
-rw-r--r--ncurses/tinfo/lib_print.c10
-rw-r--r--ncurses/tinfo/lib_raw.c35
-rw-r--r--ncurses/tinfo/lib_setup.c164
-rw-r--r--ncurses/tinfo/lib_termcap.c51
-rw-r--r--ncurses/tinfo/lib_tgoto.c9
-rw-r--r--ncurses/tinfo/lib_ti.c16
-rw-r--r--ncurses/tinfo/lib_tparm.c31
-rw-r--r--ncurses/tinfo/lib_tputs.c92
-rw-r--r--ncurses/tinfo/lib_ttyflags.c10
-rw-r--r--ncurses/tinfo/make_hash.c52
-rw-r--r--ncurses/tinfo/make_keys.c6
-rw-r--r--ncurses/tinfo/name_match.c42
-rw-r--r--ncurses/tinfo/obsolete.c (renamed from ncurses/base/memmove.c)59
-rw-r--r--ncurses/tinfo/parse_entry.c40
-rw-r--r--ncurses/tinfo/read_entry.c310
-rw-r--r--ncurses/tinfo/read_termcap.c89
-rw-r--r--ncurses/tinfo/setbuf.c169
-rw-r--r--ncurses/tinfo/strings.c8
-rw-r--r--ncurses/tinfo/tinfo_driver.c199
-rw-r--r--ncurses/tinfo/trim_sgr0.c83
-rw-r--r--ncurses/tinfo/write_entry.c108
-rw-r--r--ncurses/trace/lib_trace.c23
-rw-r--r--ncurses/trace/lib_traceatr.c49
-rw-r--r--ncurses/trace/lib_tracebits.c24
-rw-r--r--ncurses/trace/lib_tracechr.c15
-rw-r--r--ncurses/trace/lib_tracedmp.c8
-rw-r--r--ncurses/trace/lib_tracemse.c44
-rw-r--r--ncurses/trace/trace_buf.c11
-rw-r--r--ncurses/trace/trace_tries.c37
-rw-r--r--ncurses/trace/varargs.c23
-rw-r--r--ncurses/trace/visbuf.c50
-rw-r--r--ncurses/tty/hardscroll.c24
-rw-r--r--ncurses/tty/hashmap.c6
-rw-r--r--ncurses/tty/lib_mvcur.c125
-rw-r--r--ncurses/tty/lib_tstp.c55
-rw-r--r--ncurses/tty/lib_twait.c64
-rw-r--r--ncurses/tty/lib_vidattr.c91
-rw-r--r--ncurses/tty/tty_display.h140
-rw-r--r--ncurses/tty/tty_input.h61
-rw-r--r--ncurses/tty/tty_update.c268
-rw-r--r--ncurses/wcwidth.h21
-rw-r--r--ncurses/widechar/lib_box_set.c6
-rw-r--r--ncurses/widechar/lib_cchar.c24
-rw-r--r--ncurses/widechar/lib_erasewchar.c8
-rw-r--r--ncurses/widechar/lib_get_wch.c9
-rw-r--r--ncurses/widechar/lib_get_wstr.c8
-rw-r--r--ncurses/widechar/lib_ins_wch.c6
-rw-r--r--ncurses/widechar/lib_inwstr.c11
-rw-r--r--ncurses/widechar/lib_slk_wset.c30
-rw-r--r--ncurses/widechar/lib_unget_wch.c6
-rw-r--r--ncurses/widechar/lib_vid_attr.c85
-rw-r--r--ncurses/widechar/lib_wacs.c36
-rw-r--r--ncurses/widechar/lib_wunctrl.c17
-rw-r--r--ncurses/widechar/widechars.c152
-rw-r--r--ncurses/win32con/win_driver.c590
135 files changed, 12721 insertions, 3621 deletions
diff --git a/ncurses/Makefile.in b/ncurses/Makefile.in
index 45a26b9d7eaa..f08bafb2b10f 100644
--- a/ncurses/Makefile.in
+++ b/ncurses/Makefile.in
@@ -1,6 +1,6 @@
-# $Id: Makefile.in,v 1.130 2010/11/27 21:45:27 tom Exp $
+# $Id: Makefile.in,v 1.139 2013/08/04 20:20:45 tom Exp $
##############################################################################
-# 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 "Software"), #
@@ -64,7 +64,11 @@ exec_prefix = @exec_prefix@
bindir = @bindir@
libdir = @libdir@
includedir = @includedir@
+datarootdir = @datarootdir@
datadir = @datadir@
+includesubdir = @includesubdir@
+
+INCLUDEDIR = $(DESTDIR)$(includedir)$(includesubdir)
LIBTOOL = @LIBTOOL@
LIBTOOL_CLEAN = @LIB_CLEAN@
@@ -84,6 +88,7 @@ ARFLAGS = @ARFLAGS@
AWK = @AWK@
LD = @LD@
LN_S = @LN_S@
+NM = @NM@
CTAGS = @CTAGS@
ETAGS = @ETAGS@
@@ -107,7 +112,7 @@ BUILD_LIBS = @BUILD_LIBS@
# is compiled into the build, or are test-programs that are not installed.
BUILD_EXEEXT = @BUILD_EXEEXT@
-x = @PROG_EXT@
+x = @EXEEXT@
CFLAGS_LIBTOOL = $(CCFLAGS)
CFLAGS_NORMAL = $(CCFLAGS)
@@ -125,6 +130,7 @@ SHLIB_LIST = $(SHLIB_DIRS) @SHLIB_LIST@
TINFO_LIST = $(SHLIB_DIRS) @TINFO_LIST@
TICS_LIST = $(SHLIB_DIRS) @TICS_LIST@
+RPATH_LIST = @RPATH_LIST@
MK_SHARED_LIB = @MK_SHARED_LIB@
NCURSES_MAJOR = @NCURSES_MAJOR@
@@ -134,7 +140,7 @@ ABI_VERSION = @cf_cv_abi_version@
RANLIB = @LIB_PREP@
-LIBRARIES = @LIBS_TO_MAKE@
+LIBRARIES = @Libs_To_Make@
LINT = @LINT@
LINT_OPTS = @LINT_OPTS@
@@ -254,6 +260,9 @@ tags:
@MAKE_UPPER_TAGS@TAGS:
@MAKE_UPPER_TAGS@ $(ETAGS) *.[ch] */*.[ch]
+ncurses.map : $(LIBRARIES)
+ $(NM) -p $(LIBRARIES) >$@
+
mostlyclean ::
-rm -f core tags TAGS *~ *.bak *.i *.ln *.atac trace
-rm -f $(TEST_PROGS)
@@ -262,7 +271,7 @@ clean :: mostlyclean
-rm -f $(AUTO_SRC)
-rm -f make_keys$(BUILD_EXEEXT)
-rm -f make_hash$(BUILD_EXEEXT)
- -rm -rf .libs
+ -rm -rf .libs *.dSYM *.map
distclean :: clean
-rm -f Makefile
@@ -282,21 +291,21 @@ test_progs : $(TEST_PROGS)
sh -e $(base)/MKlib_gen.sh "$(CPP) $(CPPFLAGS)" "$(AWK)" implemented <../include/curses.h >$@
captoinfo$x : $(tinfo)/captoinfo.c $(TEST_DEPS)
- @ECHO_LINK@ $(LIBTOOL_LINK) -o $@ $(CFLAGS_DEFAULT) -DMAIN $(tinfo)/captoinfo.c $(TEST_LDFLAGS)
+ @ECHO_LD@ $(LIBTOOL_LINK) -o $@ $(CFLAGS_DEFAULT) -DMAIN $(tinfo)/captoinfo.c $(TEST_LDFLAGS)
hardscroll$x : $(serial)/hardscroll.c $(TEST_DEPS)
- @ECHO_LINK@ $(LIBTOOL_LINK) -o $@ $(CFLAGS_DEFAULT) -DSCROLLDEBUG $(serial)/hardscroll.c $(TEST_LDFLAGS)
+ @ECHO_LD@ $(LIBTOOL_LINK) -o $@ $(CFLAGS_DEFAULT) -DSCROLLDEBUG $(serial)/hardscroll.c $(TEST_LDFLAGS)
hashmap$x : $(serial)/hashmap.c $(serial)/hardscroll.c $(TEST_DEPS)
- @ECHO_LINK@ $(LIBTOOL_LINK) -o $@ $(CFLAGS_DEFAULT) -DHASHDEBUG $(serial)/hashmap.c $(serial)/hardscroll.c $(TEST_LDFLAGS)
+ @ECHO_LD@ $(LIBTOOL_LINK) -o $@ $(CFLAGS_DEFAULT) -DHASHDEBUG $(serial)/hashmap.c $(serial)/hardscroll.c $(TEST_LDFLAGS)
lib_mvcur$x : $(serial)/lib_mvcur.c $(TEST_DEPS) \
../@DFT_OBJ_SUBDIR@/dump_entry$o
- @ECHO_LINK@ $(LIBTOOL_LINK) -o $@ $(CFLAGS_DEFAULT) -DNCURSES_TEST -I$(serial)/../../progs $(serial)/lib_mvcur.c ../@DFT_OBJ_SUBDIR@/dump_entry$o $(TEST_LDFLAGS)
+ @ECHO_LD@ $(LIBTOOL_LINK) -o $@ $(CFLAGS_DEFAULT) -DNCURSES_TEST -I$(serial)/../../progs $(serial)/lib_mvcur.c ../@DFT_OBJ_SUBDIR@/dump_entry$o $(TEST_LDFLAGS)
link_test$x : ./link_test.c $(TEST_DEPS) \
../@DFT_OBJ_SUBDIR@/link_test$o
- @ECHO_LINK@ $(CC) -o $@ $(CFLAGS_DEFAULT) ../@DFT_OBJ_SUBDIR@/link_test$o $(TEST_LDFLAGS)
+ @ECHO_LD@ $(CC) -o $@ $(CFLAGS_DEFAULT) ../@DFT_OBJ_SUBDIR@/link_test$o $(TEST_LDFLAGS)
../@DFT_OBJ_SUBDIR@/dump_entry$o:
cd ../progs && $(MAKE) ../@DFT_OBJ_SUBDIR@/dump_entry$o
diff --git a/ncurses/base/MKkeyname.awk b/ncurses/base/MKkeyname.awk
index bb2599acb558..790161193169 100644
--- a/ncurses/base/MKkeyname.awk
+++ b/ncurses/base/MKkeyname.awk
@@ -1,6 +1,6 @@
-# $Id: MKkeyname.awk,v 1.45 2010/12/19 01:36:14 tom Exp $
+# $Id: MKkeyname.awk,v 1.48 2013/08/24 17:37:22 tom Exp $
##############################################################################
-# Copyright (c) 1999-2009,2010 Free Software Foundation, Inc. #
+# Copyright (c) 1999-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"), #
@@ -65,6 +65,7 @@ END {
print ""
print "#define SIZEOF_TABLE 256"
print "#define MyTable _nc_globals.keyname_table"
+ print "#define MyInit _nc_globals.init_keyname"
print ""
print "NCURSES_EXPORT(NCURSES_CONST char *)"
print "safe_keyname (SCREEN *sp, int c)"
@@ -96,21 +97,36 @@ END {
print " if (result == 0 && (c >= 0 && c < SIZEOF_TABLE)) {"
print " if (MyTable == 0)"
print " MyTable = typeCalloc(char *, SIZEOF_TABLE);"
+ print ""
print " if (MyTable != 0) {"
+ print " int m_prefix = (sp == 0 || sp->_use_meta);"
+ print ""
+ print " /* if sense of meta() changed, discard cached data */"
+ print " if (MyInit != (m_prefix + 1)) {"
+ print " MyInit = m_prefix + 1;"
+ print " for (i = 0; i < SIZEOF_TABLE; ++i) {"
+ print " if (MyTable[i]) {"
+ print " FreeAndNull(MyTable[i]);"
+ print " }"
+ print " }"
+ print " }"
+ print ""
+ print " /* create and cache result as needed */"
print " if (MyTable[c] == 0) {"
print " int cc = c;"
print " p = name;"
- print " if (cc >= 128 && (sp == 0 || sp->_use_meta)) {"
- print " strcpy(p, \"M-\");"
+ print "#define P_LIMIT (sizeof(name) - (size_t) (p - name))"
+ print " if (cc >= 128 && m_prefix) {"
+ print " _nc_STRCPY(p, \"M-\", P_LIMIT);"
print " p += 2;"
print " cc -= 128;"
print " }"
print " if (cc < 32)"
- print " sprintf(p, \"^%c\", cc + '@');"
+ print " _nc_SPRINTF(p, _nc_SLIMIT(P_LIMIT) \"^%c\", cc + '@');"
print " else if (cc == 127)"
- print " strcpy(p, \"^?\");"
+ print " _nc_STRCPY(p, \"^?\", P_LIMIT);"
print " else"
- print " sprintf(p, \"%c\", cc);"
+ print " _nc_SPRINTF(p, _nc_SLIMIT(P_LIMIT) \"%c\", cc);"
print " MyTable[c] = strdup(name);"
print " }"
print " result = MyTable[c];"
diff --git a/ncurses/base/MKlib_gen.sh b/ncurses/base/MKlib_gen.sh
index 66ae295c607c..d8cc3c9751fa 100755
--- a/ncurses/base/MKlib_gen.sh
+++ b/ncurses/base/MKlib_gen.sh
@@ -2,7 +2,7 @@
#
# MKlib_gen.sh -- generate sources from curses.h macro definitions
#
-# ($Id: MKlib_gen.sh,v 1.43 2011/01/22 19:47:29 tom Exp $)
+# ($Id: MKlib_gen.sh,v 1.46 2011/06/04 19:14:08 tom Exp $)
#
##############################################################################
# Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. #
@@ -410,10 +410,45 @@ BEGIN {
print "#undef vwprintw"
}
/^DECLARATIONS/ {start = 1; next;}
- {if (start) print \$0;}
+ {
+ if (start) {
+ if ( "$USE" == "generated" ) {
+ print \$0;
+ } else if ( \$0 ~ /^[{}]?\$/ ) {
+ print \$0;
+ } else if ( \$0 ~ /;/ ) {
+ print \$0;
+ } else {
+ calls[start] = \$0;
+ print \$0;
+ start++;
+ }
+ }
+ }
END {
if ( "$USE" != "generated" ) {
- print "int main(void) { return 0; }"
+ print "int main(void)"
+ print "{"
+ for (n = 1; n < start; ++n) {
+ value = calls[n];
+ if ( value !~ /P_POUNDC/ ) {
+ gsub(/[[:blank:]]+/," ",value);
+ sub(/^[[:alnum:]_]+ /,"",value);
+ sub(/^\* /,"",value);
+ gsub(/[[:alnum:]_]+ \* /,"",value);
+ gsub(/ (const) /," ",value);
+ gsub(/ (int|short|attr_t|chtype|wchar_t|NCURSES_BOOL|NCURSES_OUTC|NCURSES_OUTC_sp|va_list) /," ",value);
+ gsub(/ void /,"",value);
+ sub(/^/,"call_",value);
+ gsub(/ (a[[:digit:]]|z) /, " 0 ", value);
+ gsub(/ int[[:blank:]]*[(][^)]+[)][(][^)]+[)]/, "0", value);
+ printf "\t%s;\n", value;
+ } else {
+ print value;
+ }
+ }
+ print " return 0;"
+ print "}"
}
}
EOF1
@@ -422,6 +457,8 @@ cat >$TMP <<EOF
#include <ncurses_cfg.h>
#undef NCURSES_NOMACROS
#include <curses.h>
+#include <term.h>
+#include <unctrl.h>
DECLARATIONS
diff --git a/ncurses/base/MKunctrl.awk b/ncurses/base/MKunctrl.awk
index 2140900e8c3b..51ceb6343920 100644
--- a/ncurses/base/MKunctrl.awk
+++ b/ncurses/base/MKunctrl.awk
@@ -1,6 +1,6 @@
-# $Id: MKunctrl.awk,v 1.26 2009/07/04 22:05:15 Clemens.Ladisch Exp $
+# $Id: MKunctrl.awk,v 1.27 2012/06/09 20:29:33 tom Exp $
##############################################################################
-# Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. #
+# Copyright (c) 1998-2009,2012 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -140,7 +140,7 @@ END {
} else {
stringname = "unctrl"
}
- print "\tint check = ChCharOf(ch);"
+ print "\tint check = (int) ChCharOf(ch);"
print "\tconst char *result;"
print ""
print "\tif (check >= 0 && check < (int)SIZEOF(unctrl_table)) {"
diff --git a/ncurses/base/keybound.c b/ncurses/base/keybound.c
index 65e6bfc63620..72790e840545 100644
--- a/ncurses/base/keybound.c
+++ b/ncurses/base/keybound.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1999-2006,2009 Free Software Foundation, Inc. *
+ * Copyright (c) 1999-2009,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 *
@@ -33,7 +33,7 @@
#include <curses.priv.h>
-MODULE_ID("$Id: keybound.c,v 1.10 2009/10/24 22:15:47 tom Exp $")
+MODULE_ID("$Id: keybound.c,v 1.11 2011/10/22 16:47:05 tom Exp $")
/*
* Returns the count'th string definition which is associated with the
@@ -46,7 +46,10 @@ NCURSES_SP_NAME(keybound) (NCURSES_SP_DCLx int code, int count)
T((T_CALLED("keybound(%p, %d,%d)"), (void *) SP_PARM, code, count));
if (SP_PARM != 0 && code >= 0) {
- result = _nc_expand_try(SP_PARM->_keytry, (unsigned) code, &count, 0);
+ result = _nc_expand_try(SP_PARM->_keytry,
+ (unsigned) code,
+ &count,
+ (size_t) 0);
}
returnPtr(result);
}
diff --git a/ncurses/base/keyok.c b/ncurses/base/keyok.c
index 0eacf4926300..00e936dacde9 100644
--- a/ncurses/base/keyok.c
+++ b/ncurses/base/keyok.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2006,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,7 +33,7 @@
#include <curses.priv.h>
-MODULE_ID("$Id: keyok.c,v 1.10 2009/10/24 22:15:47 tom Exp $")
+MODULE_ID("$Id: keyok.c,v 1.13 2012/11/18 02:14:35 tom Exp $")
/*
* Enable (or disable) ncurses' interpretation of a keycode by adding (or
@@ -50,37 +50,47 @@ NCURSES_SP_NAME(keyok) (NCURSES_SP_DCLx int c, bool flag)
{
int code = ERR;
- T((T_CALLED("keyok(%p, %d,%d)"), (void *) SP_PARM, c, flag));
+ if (HasTerminal(SP_PARM)) {
+ T((T_CALLED("keyok(%p, %d,%d)"), (void *) SP_PARM, c, flag));
#ifdef USE_TERM_DRIVER
- code = CallDriver_2(sp, kyOk, c, flag);
+ code = CallDriver_2(sp, kyOk, c, flag);
#else
- T((T_CALLED("keyok(%d,%d)"), c, flag));
- if (c >= 0) {
- int count = 0;
- char *s;
- unsigned ch = (unsigned) c;
+ T((T_CALLED("keyok(%d,%d)"), c, flag));
+ if (c >= 0) {
+ int count = 0;
+ char *s;
+ unsigned ch = (unsigned) c;
- if (flag) {
- while ((s = _nc_expand_try(SP_PARM->_key_ok, ch, &count, 0)) != 0
- && _nc_remove_key(&(SP_PARM->_key_ok), ch)) {
- code = _nc_add_to_try(&(SP_PARM->_keytry), s, ch);
- free(s);
- count = 0;
- if (code != OK)
- break;
- }
- } else {
- while ((s = _nc_expand_try(SP_PARM->_keytry, ch, &count, 0)) != 0
- && _nc_remove_key(&(SP_PARM->_keytry), ch)) {
- code = _nc_add_to_try(&(SP_PARM->_key_ok), s, ch);
- free(s);
- count = 0;
- if (code != OK)
- break;
+ if (flag) {
+ while ((s = _nc_expand_try(SP_PARM->_key_ok,
+ ch, &count, (size_t) 0)) != 0) {
+ if (_nc_remove_key(&(SP_PARM->_key_ok), ch)) {
+ code = _nc_add_to_try(&(SP_PARM->_keytry), s, ch);
+ free(s);
+ count = 0;
+ if (code != OK)
+ break;
+ } else {
+ free(s);
+ }
+ }
+ } else {
+ while ((s = _nc_expand_try(SP_PARM->_keytry,
+ ch, &count, (size_t) 0)) != 0) {
+ if (_nc_remove_key(&(SP_PARM->_keytry), ch)) {
+ code = _nc_add_to_try(&(SP_PARM->_key_ok), s, ch);
+ free(s);
+ count = 0;
+ if (code != OK)
+ break;
+ } else {
+ free(s);
+ }
+ }
}
}
- }
#endif
+ }
returnCode(code);
}
diff --git a/ncurses/base/lib_addch.c b/ncurses/base/lib_addch.c
index 515ebaf0b8fc..a7d498b490a0 100644
--- a/ncurses/base/lib_addch.c
+++ b/ncurses/base/lib_addch.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2009,2010 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 *
@@ -36,7 +36,7 @@
#include <curses.priv.h>
#include <ctype.h>
-MODULE_ID("$Id: lib_addch.c,v 1.124 2010/04/24 22:41:05 tom Exp $")
+MODULE_ID("$Id: lib_addch.c,v 1.128 2014/02/23 01:21:08 tom Exp $")
static const NCURSES_CH_T blankchar = NewChar(BLANK_TEXT);
@@ -209,7 +209,8 @@ _nc_build_wch(WINDOW *win, ARG_CH_T ch)
buffer[WINDOW_EXT(win, addch_used)] = '\0';
if ((len = (int) mbrtowc(&result,
buffer,
- WINDOW_EXT(win, addch_used), &state)) > 0) {
+ (size_t) WINDOW_EXT(win, addch_used),
+ &state)) > 0) {
attr_t attrs = AttrOf(CHDEREF(ch));
if_EXT_COLORS(int pair = GetPair(CHDEREF(ch)));
SetChar(CHDEREF(ch), result, attrs);
@@ -411,10 +412,12 @@ waddch_nosync(WINDOW *win, const NCURSES_CH_T ch)
#endif
const char *s = NCURSES_SP_NAME(unctrl) (NCURSES_SP_ARGx t);
int tabsize = 8;
+
/*
* If we are using the alternate character set, forget about locale.
* Otherwise, if unctrl() returns a single-character or the locale
- * claims the code is printable, treat it that way.
+ * claims the code is printable (and not also a control character),
+ * treat it that way.
*/
if ((AttrOf(ch) & A_ALTCHARSET)
|| (
@@ -424,14 +427,15 @@ waddch_nosync(WINDOW *win, const NCURSES_CH_T ch)
s[1] == 0
)
|| (
- isprint(t)
+ (isprint((int)t) && !iscntrl((int)t))
#if USE_WIDEC_SUPPORT
|| ((sp == 0 || !sp->_legacy_coding) &&
(WINDOW_EXT(win, addch_used)
|| !_nc_is_charable(CharOf(ch))))
#endif
- ))
+ )) {
return waddch_literal(win, ch);
+ }
/*
* Handle carriage control and other codes that are not printable, or are
diff --git a/ncurses/base/lib_addstr.c b/ncurses/base/lib_addstr.c
index d73ce00a4519..a1a55cb8bfd8 100644
--- a/ncurses/base/lib_addstr.c
+++ b/ncurses/base/lib_addstr.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2009,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 *
@@ -44,7 +44,7 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_addstr.c,v 1.51 2010/12/19 01:22:58 tom Exp $")
+MODULE_ID("$Id: lib_addstr.c,v 1.52 2011/05/28 23:02:09 tom Exp $")
NCURSES_EXPORT(int)
waddnstr(WINDOW *win, const char *astr, int n)
@@ -119,8 +119,10 @@ NCURSES_EXPORT(int)
_nc_wchstrlen(const cchar_t *s)
{
int result = 0;
- while (CharOf(s[result]) != L'\0') {
- result++;
+ if (s != 0) {
+ while (CharOf(s[result]) != L'\0') {
+ result++;
+ }
}
return result;
}
diff --git a/ncurses/base/lib_beep.c b/ncurses/base/lib_beep.c
index 9d7f7fd96f01..4e14cb74a2bf 100644
--- a/ncurses/base/lib_beep.c
+++ b/ncurses/base/lib_beep.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,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 *
@@ -46,7 +46,7 @@
#define CUR SP_TERMTYPE
#endif
-MODULE_ID("$Id: lib_beep.c,v 1.15 2009/10/24 22:02:14 tom Exp $")
+MODULE_ID("$Id: lib_beep.c,v 1.16 2013/01/12 17:26:25 tom Exp $")
/*
* beep()
@@ -71,12 +71,9 @@ NCURSES_SP_NAME(beep) (NCURSES_SP_DCL0)
if (cur_term == 0) {
res = ERR;
} else if (bell) {
- TPUTS_TRACE("bell");
- res = putp(bell);
- _nc_flush();
+ res = NCURSES_PUTP2_FLUSH("bell", bell);
} else if (flash_screen) {
- TPUTS_TRACE("flash_screen");
- res = putp(flash_screen);
+ res = NCURSES_PUTP2_FLUSH("flash_screen", flash_screen);
_nc_flush();
}
#endif
diff --git a/ncurses/base/lib_bkgd.c b/ncurses/base/lib_bkgd.c
index 0396ba8f47a8..7bcd3ffb5a3f 100644
--- a/ncurses/base/lib_bkgd.c
+++ b/ncurses/base/lib_bkgd.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2010,2011 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 *
@@ -36,7 +36,7 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_bkgd.c,v 1.43 2011/01/22 19:47:37 tom Exp $")
+MODULE_ID("$Id: lib_bkgd.c,v 1.48 2012/12/09 01:01:19 tom Exp $")
/*
* Set the window's background information.
@@ -85,6 +85,7 @@ wbkgrndset(WINDOW *win, const ARG_CH_T ch)
cchar_t wch;
int tmp;
+ memset(&wch, 0, sizeof(wch));
(void) wgetbkgrnd(win, &wch);
tmp = _nc_to_char((wint_t) CharOf(wch));
@@ -118,16 +119,18 @@ wbkgrnd(WINDOW *win, const ARG_CH_T ch)
{
int code = ERR;
int x, y;
- NCURSES_CH_T new_bkgd = CHDEREF(ch);
T((T_CALLED("wbkgd(%p,%s)"), (void *) win, _tracech_t(ch)));
if (win) {
+ NCURSES_CH_T new_bkgd = CHDEREF(ch);
NCURSES_CH_T old_bkgrnd;
+
+ memset(&old_bkgrnd, 0, sizeof(old_bkgrnd));
wgetbkgrnd(win, &old_bkgrnd);
(void) wbkgrndset(win, CHREF(new_bkgd));
- (void) wattrset(win, AttrOf(win->_nc_bkgd));
+ (void) wattrset(win, (int) AttrOf(win->_nc_bkgd));
for (y = 0; y <= win->_maxy; y++) {
for (x = 0; x <= win->_maxx; x++) {
diff --git a/ncurses/base/lib_chgat.c b/ncurses/base/lib_chgat.c
index cdddaeae995c..1eb1f59e2385 100644
--- a/ncurses/base/lib_chgat.c
+++ b/ncurses/base/lib_chgat.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2010,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 *
@@ -42,14 +42,22 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_chgat.c,v 1.9 2010/03/31 23:38:02 tom Exp $")
+MODULE_ID("$Id: lib_chgat.c,v 1.10 2014/02/01 22:13:31 tom Exp $")
NCURSES_EXPORT(int)
-wchgat(WINDOW *win, int n, attr_t attr, short color, const void *opts GCC_UNUSED)
+wchgat(WINDOW *win,
+ int n,
+ attr_t attr,
+ NCURSES_PAIRS_T color,
+ const void *opts GCC_UNUSED)
{
int i;
- T((T_CALLED("wchgat(%p,%d,%s,%d)"), (void *) win, n, _traceattr(attr), color));
+ T((T_CALLED("wchgat(%p,%d,%s,%d)"),
+ (void *) win,
+ n,
+ _traceattr(attr),
+ (int) color));
if (win) {
struct ldat *line = &(win->_line[win->_cury]);
diff --git a/ncurses/base/lib_color.c b/ncurses/base/lib_color.c
index a5c181c8b4b1..9f7250ddafff 100644
--- a/ncurses/base/lib_color.c
+++ b/ncurses/base/lib_color.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2009,2010 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 *
@@ -45,7 +45,7 @@
#define CUR SP_TERMTYPE
#endif
-MODULE_ID("$Id: lib_color.c,v 1.98 2010/04/24 22:57:53 tom Exp $")
+MODULE_ID("$Id: lib_color.c,v 1.109 2014/02/01 22:22:30 tom Exp $")
#ifdef USE_TERM_DRIVER
#define CanChange InfoOf(SP_PARM).canchange
@@ -264,8 +264,7 @@ reset_color_pair(NCURSES_SP_DCL0)
(void) SP_PARM;
if (orig_pair != 0) {
- TPUTS_TRACE("orig_pair");
- putp(orig_pair);
+ (void) NCURSES_PUTP2("orig_pair", orig_pair);
result = TRUE;
}
return result;
@@ -292,8 +291,7 @@ NCURSES_SP_NAME(_nc_reset_colors) (NCURSES_SP_DCL0)
result = CallDriver(SP_PARM, rescolors);
#else
if (orig_colors != 0) {
- TPUTS_TRACE("orig_colors");
- putp(orig_colors);
+ NCURSES_PUTP2("orig_colors", orig_colors);
result = TRUE;
}
#endif
@@ -331,6 +329,13 @@ NCURSES_SP_NAME(start_color) (NCURSES_SP_DCL0)
default_bg(NCURSES_SP_ARG),
NCURSES_SP_NAME(_nc_outch));
}
+#if !NCURSES_EXT_COLORS
+ /*
+ * Without ext-colors, we cannot represent more than 256 color pairs.
+ */
+ if (maxpairs > 256)
+ maxpairs = 256;
+#endif
if (maxpairs > 0 && maxcolors > 0) {
SP_PARM->_pair_limit = maxpairs;
@@ -383,10 +388,10 @@ start_color(void)
/* This function was originally written by Daniel Weaver <danw@znyx.com> */
static void
-rgb2hls(short r, short g, short b, short *h, short *l, short *s)
+rgb2hls(int r, int g, int b, NCURSES_COLOR_T *h, NCURSES_COLOR_T *l, NCURSES_COLOR_T *s)
/* convert RGB to HLS system */
{
- short min, max, t;
+ int min, max, t;
if ((min = g < r ? g : r) > b)
min = b;
@@ -394,7 +399,7 @@ rgb2hls(short r, short g, short b, short *h, short *l, short *s)
max = b;
/* calculate lightness */
- *l = (short) ((min + max) / 20);
+ *l = (NCURSES_COLOR_T) ((min + max) / 20);
if (min == max) { /* black, white and all shades of gray */
*h = 0;
@@ -404,19 +409,19 @@ rgb2hls(short r, short g, short b, short *h, short *l, short *s)
/* calculate saturation */
if (*l < 50)
- *s = (short) (((max - min) * 100) / (max + min));
+ *s = (NCURSES_COLOR_T) (((max - min) * 100) / (max + min));
else
- *s = (short) (((max - min) * 100) / (2000 - max - min));
+ *s = (NCURSES_COLOR_T) (((max - min) * 100) / (2000 - max - min));
/* calculate hue */
if (r == max)
- t = (short) (120 + ((g - b) * 60) / (max - min));
+ t = (NCURSES_COLOR_T) (120 + ((g - b) * 60) / (max - min));
else if (g == max)
- t = (short) (240 + ((b - r) * 60) / (max - min));
+ t = (NCURSES_COLOR_T) (240 + ((b - r) * 60) / (max - min));
else
- t = (short) (360 + ((r - g) * 60) / (max - min));
+ t = (NCURSES_COLOR_T) (360 + ((r - g) * 60) / (max - min));
- *h = t % 360;
+ *h = (NCURSES_COLOR_T) (t % 360);
}
/*
@@ -424,13 +429,20 @@ rgb2hls(short r, short g, short b, short *h, short *l, short *s)
* values.
*/
NCURSES_EXPORT(int)
-NCURSES_SP_NAME(init_pair) (NCURSES_SP_DCLx short pair, short f, short b)
+NCURSES_SP_NAME(init_pair) (NCURSES_SP_DCLx
+ NCURSES_PAIRS_T pair,
+ NCURSES_COLOR_T f,
+ NCURSES_COLOR_T b)
{
colorpair_t result;
colorpair_t previous;
int maxcolors;
- T((T_CALLED("init_pair(%p,%d,%d,%d)"), (void *) SP_PARM, pair, f, b));
+ T((T_CALLED("init_pair(%p,%d,%d,%d)"),
+ (void *) SP_PARM,
+ (int) pair,
+ (int) f,
+ (int) b));
if (!ValidPair(pair))
returnCode(ERR);
@@ -439,7 +451,7 @@ NCURSES_SP_NAME(init_pair) (NCURSES_SP_DCLx short pair, short f, short b)
previous = SP_PARM->_color_pairs[pair];
#if NCURSES_EXT_FUNCS
- if (SP_PARM->_default_color) {
+ if (SP_PARM->_default_color || SP_PARM->_assumed_color) {
bool isDefault = FALSE;
bool wasDefault = FALSE;
int default_pairs = SP_PARM->_default_pairs;
@@ -498,8 +510,9 @@ NCURSES_SP_NAME(init_pair) (NCURSES_SP_DCLx short pair, short f, short b)
{
if ((f < 0) || !OkColorHi(f)
|| (b < 0) || !OkColorHi(b)
- || (pair < 1))
+ || (pair < 1)) {
returnCode(ERR);
+ }
}
/*
@@ -541,15 +554,19 @@ NCURSES_SP_NAME(init_pair) (NCURSES_SP_DCLx short pair, short f, short b)
TR(TRACE_ATTRS,
("initializing pair: pair = %d, fg=(%d,%d,%d), bg=(%d,%d,%d)",
- pair,
- tp[f].red, tp[f].green, tp[f].blue,
- tp[b].red, tp[b].green, tp[b].blue));
-
- TPUTS_TRACE("initialize_pair");
- putp(TPARM_7(initialize_pair,
- pair,
- tp[f].red, tp[f].green, tp[f].blue,
- tp[b].red, tp[b].green, tp[b].blue));
+ (int) pair,
+ (int) tp[f].red, (int) tp[f].green, (int) tp[f].blue,
+ (int) tp[b].red, (int) tp[b].green, (int) tp[b].blue));
+
+ NCURSES_PUTP2("initialize_pair",
+ TPARM_7(initialize_pair,
+ pair,
+ (int) tp[f].red,
+ (int) tp[f].green,
+ (int) tp[f].blue,
+ (int) tp[b].red,
+ (int) tp[b].green,
+ (int) tp[b].blue));
}
#endif
@@ -558,7 +575,7 @@ NCURSES_SP_NAME(init_pair) (NCURSES_SP_DCLx short pair, short f, short b)
#if NCURSES_SP_FUNCS
NCURSES_EXPORT(int)
-init_pair(short pair, short f, short b)
+init_pair(NCURSES_COLOR_T pair, NCURSES_COLOR_T f, NCURSES_COLOR_T b)
{
return NCURSES_SP_NAME(init_pair) (CURRENT_SCREEN, pair, f, b);
}
@@ -568,7 +585,10 @@ init_pair(short pair, short f, short b)
NCURSES_EXPORT(int)
NCURSES_SP_NAME(init_color) (NCURSES_SP_DCLx
- short color, short r, short g, short b)
+ NCURSES_COLOR_T color,
+ NCURSES_COLOR_T r,
+ NCURSES_COLOR_T g,
+ NCURSES_COLOR_T b)
{
int result = ERR;
int maxcolors;
@@ -607,8 +627,8 @@ NCURSES_SP_NAME(init_color) (NCURSES_SP_DCLx
#ifdef USE_TERM_DRIVER
CallDriver_4(SP_PARM, initcolor, color, r, g, b);
#else
- TPUTS_TRACE("initialize_color");
- putp(TPARM_4(initialize_color, color, r, g, b));
+ NCURSES_PUTP2("initialize_color",
+ TPARM_4(initialize_color, color, r, g, b));
#endif
SP_PARM->_color_defs = max(color + 1, SP_PARM->_color_defs);
@@ -619,7 +639,10 @@ NCURSES_SP_NAME(init_color) (NCURSES_SP_DCLx
#if NCURSES_SP_FUNCS
NCURSES_EXPORT(int)
-init_color(short color, short r, short g, short b)
+init_color(NCURSES_COLOR_T color,
+ NCURSES_COLOR_T r,
+ NCURSES_COLOR_T g,
+ NCURSES_COLOR_T b)
{
return NCURSES_SP_NAME(init_color) (CURRENT_SCREEN, color, r, g, b);
}
@@ -628,8 +651,15 @@ init_color(short color, short r, short g, short b)
NCURSES_EXPORT(bool)
NCURSES_SP_NAME(can_change_color) (NCURSES_SP_DCL)
{
+ int result = FALSE;
+
T((T_CALLED("can_change_color(%p)"), (void *) SP_PARM));
- returnCode((CanChange != 0) ? TRUE : FALSE);
+
+ if (HasTerminal(SP_PARM) && (CanChange != 0)) {
+ result = TRUE;
+ }
+
+ returnCode(result);
}
#if NCURSES_SP_FUNCS
@@ -643,20 +673,22 @@ can_change_color(void)
NCURSES_EXPORT(bool)
NCURSES_SP_NAME(has_colors) (NCURSES_SP_DCL0)
{
- int code;
+ int code = FALSE;
(void) SP_PARM;
T((T_CALLED("has_colors()")));
+ if (HasTerminal(SP_PARM)) {
#ifdef USE_TERM_DRIVER
- code = HasColor;
+ code = HasColor;
#else
- code = ((VALID_NUMERIC(max_colors) && VALID_NUMERIC(max_pairs)
- && (((set_foreground != NULL)
- && (set_background != NULL))
- || ((set_a_foreground != NULL)
- && (set_a_background != NULL))
- || set_color_pair)) ? TRUE : FALSE);
+ code = ((VALID_NUMERIC(max_colors) && VALID_NUMERIC(max_pairs)
+ && (((set_foreground != NULL)
+ && (set_background != NULL))
+ || ((set_a_foreground != NULL)
+ && (set_a_background != NULL))
+ || set_color_pair)) ? TRUE : FALSE);
#endif
+ }
returnCode(code);
}
@@ -670,7 +702,10 @@ has_colors(void)
NCURSES_EXPORT(int)
NCURSES_SP_NAME(color_content) (NCURSES_SP_DCLx
- short color, short *r, short *g, short *b)
+ NCURSES_COLOR_T color,
+ NCURSES_COLOR_T *r,
+ NCURSES_COLOR_T *g,
+ NCURSES_COLOR_T *b)
{
int result = ERR;
int maxcolors;
@@ -710,7 +745,10 @@ NCURSES_SP_NAME(color_content) (NCURSES_SP_DCLx
#if NCURSES_SP_FUNCS
NCURSES_EXPORT(int)
-color_content(short color, short *r, short *g, short *b)
+color_content(NCURSES_COLOR_T color,
+ NCURSES_COLOR_T *r,
+ NCURSES_COLOR_T *g,
+ NCURSES_COLOR_T *b)
{
return NCURSES_SP_NAME(color_content) (CURRENT_SCREEN, color, r, g, b);
}
@@ -718,21 +756,23 @@ color_content(short color, short *r, short *g, short *b)
NCURSES_EXPORT(int)
NCURSES_SP_NAME(pair_content) (NCURSES_SP_DCLx
- short pair, short *f, short *b)
+ NCURSES_PAIRS_T pair,
+ NCURSES_COLOR_T *f,
+ NCURSES_COLOR_T *b)
{
int result;
T((T_CALLED("pair_content(%p,%d,%p,%p)"),
(void *) SP_PARM,
- pair,
+ (int) pair,
(void *) f,
(void *) b));
if (!ValidPair(pair)) {
result = ERR;
} else {
- NCURSES_COLOR_T fg = FORE_OF(SP_PARM->_color_pairs[pair]);
- NCURSES_COLOR_T bg = BACK_OF(SP_PARM->_color_pairs[pair]);
+ NCURSES_COLOR_T fg = (NCURSES_COLOR_T) FORE_OF(SP_PARM->_color_pairs[pair]);
+ NCURSES_COLOR_T bg = (NCURSES_COLOR_T) BACK_OF(SP_PARM->_color_pairs[pair]);
#if NCURSES_EXT_FUNCS
if (fg == COLOR_DEFAULT)
@@ -748,8 +788,8 @@ NCURSES_SP_NAME(pair_content) (NCURSES_SP_DCLx
TR(TRACE_ATTRS, ("...pair_content(%p,%d,%d,%d)",
(void *) SP_PARM,
- pair,
- fg, bg));
+ (int) pair,
+ (int) fg, (int) bg));
result = OK;
}
returnCode(result);
@@ -757,7 +797,7 @@ NCURSES_SP_NAME(pair_content) (NCURSES_SP_DCLx
#if NCURSES_SP_FUNCS
NCURSES_EXPORT(int)
-pair_content(short pair, short *f, short *b)
+pair_content(NCURSES_COLOR_T pair, NCURSES_COLOR_T *f, NCURSES_COLOR_T *b)
{
return NCURSES_SP_NAME(pair_content) (CURRENT_SCREEN, pair, f, b);
}
@@ -765,9 +805,9 @@ pair_content(short pair, short *f, short *b)
NCURSES_EXPORT(void)
NCURSES_SP_NAME(_nc_do_color) (NCURSES_SP_DCLx
- short old_pair,
- short pair,
- bool reverse,
+ int old_pair,
+ int pair,
+ int reverse,
NCURSES_SP_OUTC outc)
{
#ifdef USE_TERM_DRIVER
@@ -775,7 +815,8 @@ NCURSES_SP_NAME(_nc_do_color) (NCURSES_SP_DCLx
#else
NCURSES_COLOR_T fg = COLOR_DEFAULT;
NCURSES_COLOR_T bg = COLOR_DEFAULT;
- NCURSES_COLOR_T old_fg, old_bg;
+ NCURSES_COLOR_T old_fg = -1;
+ NCURSES_COLOR_T old_bg = -1;
if (!ValidPair(pair)) {
return;
@@ -787,13 +828,14 @@ NCURSES_SP_NAME(_nc_do_color) (NCURSES_SP_DCLx
1, outc);
return;
} else if (SP_PARM != 0) {
- pair_content((short) pair, &fg, &bg);
+ if (pair_content((NCURSES_COLOR_T) pair, &fg, &bg) == ERR)
+ return;
}
}
if (old_pair >= 0
&& SP_PARM != 0
- && pair_content(old_pair, &old_fg, &old_bg) != ERR) {
+ && pair_content((NCURSES_COLOR_T) old_pair, &old_fg, &old_bg) != ERR) {
if ((isDefaultColor(fg) && !isDefaultColor(old_fg))
|| (isDefaultColor(bg) && !isDefaultColor(old_bg))) {
#if NCURSES_EXT_FUNCS
@@ -822,9 +864,9 @@ NCURSES_SP_NAME(_nc_do_color) (NCURSES_SP_DCLx
#if NCURSES_EXT_FUNCS
if (isDefaultColor(fg))
- fg = (short) default_fg(NCURSES_SP_ARG);
+ fg = (NCURSES_COLOR_T) default_fg(NCURSES_SP_ARG);
if (isDefaultColor(bg))
- bg = (short) default_bg(NCURSES_SP_ARG);
+ bg = (NCURSES_COLOR_T) default_bg(NCURSES_SP_ARG);
#endif
if (reverse) {
@@ -847,7 +889,7 @@ NCURSES_SP_NAME(_nc_do_color) (NCURSES_SP_DCLx
#if NCURSES_SP_FUNCS
NCURSES_EXPORT(void)
-_nc_do_color(short old_pair, short pair, bool reverse, NCURSES_OUTC outc)
+_nc_do_color(int old_pair, int pair, int reverse, NCURSES_OUTC outc)
{
SetSafeOutcWrapper(outc);
NCURSES_SP_NAME(_nc_do_color) (CURRENT_SCREEN,
diff --git a/ncurses/base/lib_colorset.c b/ncurses/base/lib_colorset.c
index 6210a0e8a8f9..e9354860ad0d 100644
--- a/ncurses/base/lib_colorset.c
+++ b/ncurses/base/lib_colorset.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2005,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 *
@@ -41,14 +41,14 @@
#include <curses.priv.h>
#include <ctype.h>
-MODULE_ID("$Id: lib_colorset.c,v 1.13 2009/10/24 22:02:14 tom Exp $")
+MODULE_ID("$Id: lib_colorset.c,v 1.14 2014/02/01 22:10:42 tom Exp $")
NCURSES_EXPORT(int)
-wcolor_set(WINDOW *win, short color_pair_number, void *opts)
+wcolor_set(WINDOW *win, NCURSES_PAIRS_T color_pair_number, void *opts)
{
int code = ERR;
- T((T_CALLED("wcolor_set(%p,%d)"), (void *) win, color_pair_number));
+ T((T_CALLED("wcolor_set(%p,%d)"), (void *) win, (int) color_pair_number));
if (win
&& !opts
&& (SP != 0)
diff --git a/ncurses/base/lib_dft_fgbg.c b/ncurses/base/lib_dft_fgbg.c
index 4bb9fc2774a9..00cbafb39730 100644
--- a/ncurses/base/lib_dft_fgbg.c
+++ b/ncurses/base/lib_dft_fgbg.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2005,2009 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,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 *
@@ -37,7 +37,7 @@
#define CUR SP_TERMTYPE
#endif
-MODULE_ID("$Id: lib_dft_fgbg.c,v 1.25 2009/10/24 22:15:00 tom Exp $")
+MODULE_ID("$Id: lib_dft_fgbg.c,v 1.26 2011/04/23 18:28:18 tom Exp $")
/*
* Modify the behavior of color-pair 0 so that the library doesn't assume that
@@ -80,6 +80,7 @@ NCURSES_SP_NAME(assume_default_colors) (NCURSES_SP_DCLx int fg, int bg)
SP_PARM->_default_bg = isDefaultColor(bg) ? COLOR_DEFAULT : (bg & C_MASK);
if (SP_PARM->_color_pairs != 0) {
bool save = SP_PARM->_default_color;
+ SP_PARM->_assumed_color = TRUE;
SP_PARM->_default_color = TRUE;
init_pair(0, (short) fg, (short) bg);
SP_PARM->_default_color = save;
diff --git a/ncurses/base/lib_driver.c b/ncurses/base/lib_driver.c
index 40487609be4d..6301a5887d64 100644
--- a/ncurses/base/lib_driver.c
+++ b/ncurses/base/lib_driver.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2008-2009,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 2008-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 *
@@ -33,7 +33,7 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_driver.c,v 1.3 2010/12/20 00:29:17 tom Exp $")
+MODULE_ID("$Id: lib_driver.c,v 1.4 2012/09/22 19:32:46 tom Exp $")
typedef struct DriverEntry {
const char *name;
@@ -43,9 +43,9 @@ typedef struct DriverEntry {
static DRIVER_ENTRY DriverTable[] =
{
#ifdef __MINGW32__
- {"win", &_nc_WIN_DRIVER},
+ {"win32con", &_nc_WIN_DRIVER},
#endif
- {"tinfo", &_nc_TINFO_DRIVER}
+ {"tinfo", &_nc_TINFO_DRIVER} /* must be last */
};
NCURSES_EXPORT(int)
@@ -63,6 +63,20 @@ _nc_get_driver(TERMINAL_CONTROL_BLOCK * TCB, const char *name, int *errret)
for (i = 0; i < SIZEOF(DriverTable); i++) {
res = DriverTable[i].driver;
+ /*
+ * Use "#" (a character which cannot begin a terminal's name) to
+ * select specific driver from the table.
+ *
+ * In principle, we could have more than one non-terminfo driver,
+ * e.g., "win32gui".
+ */
+ if (name != 0 && *name == '#') {
+ size_t n = strlen(name + 1);
+ if (n != 0
+ && strncmp(name + 1, DriverTable[i].name, n)) {
+ continue;
+ }
+ }
if (res->CanHandle(TCB, name, errret)) {
use = res;
break;
diff --git a/ncurses/base/lib_flash.c b/ncurses/base/lib_flash.c
index 03f11d923b6d..3520177ea33f 100644
--- a/ncurses/base/lib_flash.c
+++ b/ncurses/base/lib_flash.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2000,2009 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2011,2013 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -46,7 +46,7 @@
#define CUR SP_TERMTYPE
#endif
-MODULE_ID("$Id: lib_flash.c,v 1.11 2009/10/24 22:02:14 tom Exp $")
+MODULE_ID("$Id: lib_flash.c,v 1.13 2013/01/12 17:26:07 tom Exp $")
/*
* flash()
@@ -66,15 +66,13 @@ NCURSES_SP_NAME(flash) (NCURSES_SP_DCL0)
if (SP_PARM != 0)
res = CallDriver_1(SP_PARM, doBeepOrFlash, FALSE);
#else
- /* FIXME: should make sure that we are not in altchar mode */
- if (flash_screen) {
- TPUTS_TRACE("flash_screen");
- res = putp(flash_screen);
- _nc_flush();
- } else if (bell) {
- TPUTS_TRACE("bell");
- res = putp(bell);
- _nc_flush();
+ if (HasTerminal(SP_PARM)) {
+ /* FIXME: should make sure that we are not in altchar mode */
+ if (flash_screen) {
+ res = NCURSES_PUTP2_FLUSH("flash_screen", flash_screen);
+ } else if (bell) {
+ res = NCURSES_PUTP2_FLUSH("bell", bell);
+ }
}
#endif
returnCode(res);
diff --git a/ncurses/base/lib_freeall.c b/ncurses/base/lib_freeall.c
index 5bcc974bc257..031374924f00 100644
--- a/ncurses/base/lib_freeall.c
+++ b/ncurses/base/lib_freeall.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2009,2010 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 *
@@ -39,7 +39,7 @@
extern int malloc_errfd; /* FIXME */
#endif
-MODULE_ID("$Id: lib_freeall.c,v 1.59 2010/01/23 17:57:43 tom Exp $")
+MODULE_ID("$Id: lib_freeall.c,v 1.62 2012/11/17 23:53:03 tom Exp $")
/*
* Free all ncurses data. This is used for testing only (there's no practical
@@ -70,19 +70,21 @@ NCURSES_SP_NAME(_nc_freeall) (NCURSES_SP_DCL0)
/* Delete only windows that're not a parent */
for (each_window(SP_PARM, p)) {
+ WINDOW *p_win = &(p->win);
bool found = FALSE;
for (each_window(SP_PARM, q)) {
+ WINDOW *q_win = &(q->win);
if ((p != q)
- && (q->win._flags & _SUBWIN)
- && (&(p->win) == q->win._parent)) {
+ && (q_win->_flags & _SUBWIN)
+ && (p_win == q_win->_parent)) {
found = TRUE;
break;
}
}
if (!found) {
- if (delwin(&(p->win)) != ERR)
+ if (delwin(p_win) != ERR)
deleted = TRUE;
break;
}
@@ -100,7 +102,7 @@ NCURSES_SP_NAME(_nc_freeall) (NCURSES_SP_DCL0)
(void) _nc_printf_string(0, empty_va);
#ifdef TRACE
- (void) _nc_trace_buf(-1, 0);
+ (void) _nc_trace_buf(-1, (size_t) 0);
#endif
#if USE_WIDEC_SUPPORT
FreeIfNeeded(_nc_wacs);
@@ -129,8 +131,9 @@ _nc_freeall(void)
NCURSES_EXPORT(void)
NCURSES_SP_NAME(_nc_free_and_exit) (NCURSES_SP_DCLx int code)
{
- char *last_setbuf = (SP_PARM != 0) ? SP_PARM->_setbuf : 0;
+ char *last_buffer = (SP_PARM != 0) ? SP_PARM->out_buffer : 0;
+ NCURSES_SP_NAME(_nc_flush) (NCURSES_SP_ARG);
NCURSES_SP_NAME(_nc_freeall) (NCURSES_SP_ARG);
#ifdef TRACE
trace(0); /* close trace file, freeing its setbuf */
@@ -139,8 +142,7 @@ NCURSES_SP_NAME(_nc_free_and_exit) (NCURSES_SP_DCLx int code)
free(_nc_varargs("?", fake));
}
#endif
- fclose(stdout);
- FreeIfNeeded(last_setbuf);
+ FreeIfNeeded(last_buffer);
exit(code);
}
diff --git a/ncurses/base/lib_getch.c b/ncurses/base/lib_getch.c
index 130c502431b3..0a04ef5a6e1b 100644
--- a/ncurses/base/lib_getch.c
+++ b/ncurses/base/lib_getch.c
@@ -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 *
@@ -42,7 +42,7 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_getch.c,v 1.121 2010/12/25 23:24:04 tom Exp $")
+MODULE_ID("$Id: lib_getch.c,v 1.126 2013/02/16 18:30:37 tom Exp $")
#include <fifo_defs.h>
@@ -133,7 +133,7 @@ check_mouse_activity(SCREEN *sp, int delay EVENTLIST_2nd(_nc_eventlist * evl))
int rc;
#ifdef USE_TERM_DRIVER
- rc = TCBOf(sp)->drv->testmouse(TCBOf(sp), delay);
+ rc = TCBOf(sp)->drv->testmouse(TCBOf(sp), delay EVENTLIST_2nd(evl));
#else
#if USE_SYSMOUSE
if ((sp->_mouse_type == M_SYSMOUSE)
@@ -163,7 +163,7 @@ check_mouse_activity(SCREEN *sp, int delay EVENTLIST_2nd(_nc_eventlist * evl))
static NCURSES_INLINE int
fifo_peek(SCREEN *sp)
{
- int ch = sp->_fifo[peek];
+ int ch = (peek >= 0) ? sp->_fifo[peek] : ERR;
TR(TRACE_IEVENT, ("peeking at %d", peek));
p_inc();
@@ -173,15 +173,16 @@ fifo_peek(SCREEN *sp)
static NCURSES_INLINE int
fifo_pull(SCREEN *sp)
{
- int ch;
- ch = sp->_fifo[head];
+ int ch = (head >= 0) ? sp->_fifo[head] : ERR;
+
TR(TRACE_IEVENT, ("pulling %s from %d", _nc_tracechar(sp, ch), head));
if (peek == head) {
h_inc();
peek = head;
- } else
+ } else {
h_inc();
+ }
#ifdef TRACE
if (USE_TRACEF(TRACE_IEVENT)) {
@@ -200,7 +201,7 @@ fifo_push(SCREEN *sp EVENTLIST_2nd(_nc_eventlist * evl))
int mask = 0;
(void) mask;
- if (tail == -1)
+ if (tail < 0)
return ERR;
#ifdef HIDE_EINTR
@@ -257,6 +258,13 @@ fifo_push(SCREEN *sp EVENTLIST_2nd(_nc_eventlist * evl))
n = 1;
} else
#endif
+#if USE_KLIBC_KBD
+ if (isatty(sp->_ifd) && sp->_cbreak) {
+ ch = _read_kbd(0, 1, !sp->_raw);
+ n = (ch == -1) ? -1 : 1;
+ sp->_extended_key = (ch == 0);
+ } else
+#endif
{ /* Can block... */
#ifdef USE_TERM_DRIVER
int buf;
@@ -270,7 +278,7 @@ fifo_push(SCREEN *sp EVENTLIST_2nd(_nc_eventlist * evl))
# endif
_nc_globals.read_thread = pthread_self();
# endif
- n = (int) read(sp->_ifd, &c2, 1);
+ n = (int) read(sp->_ifd, &c2, (size_t) 1);
#if USE_PTHREADS_EINTR
_nc_globals.read_thread = 0;
#endif
@@ -431,11 +439,11 @@ _nc_wgetch(WINDOW *win,
/* ungetch in reverse order */
#ifdef NCURSES_WGETCH_EVENTS
rc = recur_wgetnstr(win, buf);
- if (rc != KEY_EVENT)
+ if (rc != KEY_EVENT && rc != ERR)
safe_ungetch(sp, '\n');
#else
- (void) recur_wgetnstr(win, buf);
- safe_ungetch(sp, '\n');
+ if (recur_wgetnstr(win, buf) != ERR)
+ safe_ungetch(sp, '\n');
#endif
for (bufp = buf + strlen(buf); bufp > buf; bufp--)
safe_ungetch(sp, bufp[-1]);
@@ -569,7 +577,7 @@ _nc_wgetch(WINDOW *win,
*
* If carriage return is defined as a function key in the
* terminfo, e.g., kent, then Solaris may return either ^J (or ^M
- * if nonl() is set) or KEY_ENTER depending on the echo() mode.
+ * if nonl() is set) or KEY_ENTER depending on the echo() mode.
* We echo before translating carriage return based on nonl(),
* since the visual result simply moves the cursor to column 0.
*
@@ -709,10 +717,11 @@ kgetch(SCREEN *sp EVENTLIST_2nd(_nc_eventlist * evl))
if (ptr->value != 0) { /* sequence terminated */
TR(TRACE_IEVENT, ("end of sequence"));
- if (peek == tail)
+ if (peek == tail) {
fifo_clear(sp);
- else
+ } else {
head = peek;
+ }
return (ptr->value);
}
diff --git a/ncurses/base/lib_getstr.c b/ncurses/base/lib_getstr.c
index 21d8baa05c8b..0e446349ca17 100644
--- a/ncurses/base/lib_getstr.c
+++ b/ncurses/base/lib_getstr.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,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 *
@@ -40,14 +40,14 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_getstr.c,v 1.29 2009/10/24 21:59:02 tom Exp $")
+MODULE_ID("$Id: lib_getstr.c,v 1.30 2011/10/22 16:31:35 tom Exp $")
/*
* This wipes out the last character, no matter whether it was a tab, control
* or other character, and handles reverse wraparound.
*/
static char *
-WipeOut(WINDOW *win, int y, int x, char *first, char *last, bool echoed)
+WipeOut(WINDOW *win, int y, int x, char *first, char *last, int echoed)
{
if (last > first) {
*--last = '\0';
diff --git a/ncurses/base/lib_insch.c b/ncurses/base/lib_insch.c
index e21ec02bc84f..32eaed739443 100644
--- a/ncurses/base/lib_insch.c
+++ b/ncurses/base/lib_insch.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2008,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 *
@@ -43,7 +43,7 @@
#include <curses.priv.h>
#include <ctype.h>
-MODULE_ID("$Id: lib_insch.c,v 1.32 2009/10/24 22:04:35 tom Exp $")
+MODULE_ID("$Id: lib_insch.c,v 1.35 2013/05/18 21:58:56 tom Exp $")
/*
* Insert the given character, updating the current location to simplify
@@ -53,6 +53,7 @@ NCURSES_EXPORT(int)
_nc_insert_ch(SCREEN *sp, WINDOW *win, chtype ch)
{
int code = OK;
+ int ch8 = (int) ChCharOf(ch);
NCURSES_CH_T wch;
int count;
NCURSES_CONST char *s;
@@ -82,10 +83,9 @@ _nc_insert_ch(SCREEN *sp, WINDOW *win, chtype ch)
#if USE_WIDEC_SUPPORT
WINDOW_EXT(win, addch_used) == 0 &&
#endif
- is8bits(ChCharOf(ch)) &&
- (isprint(ChCharOf(ch)) ||
+ (isprint(ch8) ||
(ChAttrOf(ch) & A_ALTCHARSET) ||
- (sp != 0 && sp->_legacy_coding && !iscntrl(ChCharOf(ch))))) {
+ (sp != 0 && sp->_legacy_coding && !iscntrl(ch8)))) {
if (win->_curx <= win->_maxx) {
struct ldat *line = &(win->_line[win->_cury]);
NCURSES_CH_T *end = &(line->text[win->_curx]);
@@ -101,8 +101,8 @@ _nc_insert_ch(SCREEN *sp, WINDOW *win, chtype ch)
*temp1 = _nc_render(win, wch);
win->_curx++;
}
- } else if (is8bits(ChCharOf(ch)) && iscntrl(ChCharOf(ch))) {
- s = NCURSES_SP_NAME(unctrl) (NCURSES_SP_ARGx ChCharOf(ch));
+ } else if (iscntrl(ch8)) {
+ s = NCURSES_SP_NAME(unctrl) (NCURSES_SP_ARGx (chtype) ch8);
while (*s != '\0') {
code = _nc_insert_ch(sp, win, ChAttrOf(ch) | UChar(*s));
if (code != OK)
@@ -122,18 +122,14 @@ _nc_insert_ch(SCREEN *sp, WINDOW *win, chtype ch)
code = _nc_insert_wch(win, &wch);
} else if (count == -1) {
/* handle EILSEQ */
- if (is8bits(ch)) {
- s = NCURSES_SP_NAME(unctrl) (NCURSES_SP_ARGx ChCharOf(ch));
- if (strlen(s) > 1) {
- while (*s != '\0') {
- code = _nc_insert_ch(sp, win,
- ChAttrOf(ch) | UChar(*s));
- if (code != OK)
- break;
- ++s;
- }
- } else {
- code = ERR;
+ s = NCURSES_SP_NAME(unctrl) (NCURSES_SP_ARGx (chtype) ch8);
+ if (strlen(s) > 1) {
+ while (*s != '\0') {
+ code = _nc_insert_ch(sp, win,
+ ChAttrOf(ch) | UChar(*s));
+ if (code != OK)
+ break;
+ ++s;
}
} else {
code = ERR;
diff --git a/ncurses/base/lib_instr.c b/ncurses/base/lib_instr.c
index e6d1a739c94f..f708ecc51e4a 100644
--- a/ncurses/base/lib_instr.c
+++ b/ncurses/base/lib_instr.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,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 *
@@ -41,7 +41,7 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_instr.c,v 1.17 2009/10/24 22:55:45 tom Exp $")
+MODULE_ID("$Id: lib_instr.c,v 1.21 2014/02/01 22:09:27 tom Exp $")
NCURSES_EXPORT(int)
winnstr(WINDOW *win, char *str, int n)
@@ -64,7 +64,7 @@ winnstr(WINDOW *win, char *str, int n)
cchar_t *cell = &(win->_line[row].text[col]);
wchar_t *wch;
attr_t attrs;
- short pair;
+ NCURSES_PAIRS_T pair;
int n2;
bool done = FALSE;
mbstate_t state;
@@ -78,11 +78,15 @@ winnstr(WINDOW *win, char *str, int n)
if (getcchar(cell, wch, &attrs, &pair, 0) == OK) {
init_mb(state);
- n3 = wcstombs(0, wch, 0);
+ n3 = wcstombs(0, wch, (size_t) 0);
if (!isEILSEQ(n3) && (n3 != 0)) {
- if (((int) n3 + i) > n) {
+ size_t need = n3 + 10 + (size_t) i;
+ int have = (int) n3 + i;
+
+ /* check for loop-done as well as overflow */
+ if (have > n || (int) need <= 0) {
done = TRUE;
- } else if ((tmp = typeCalloc(char, n3 + 10)) == 0) {
+ } else if ((tmp = typeCalloc(char, need)) == 0) {
done = TRUE;
} else {
init_mb(state);
diff --git a/ncurses/base/lib_mouse.c b/ncurses/base/lib_mouse.c
index dac039551165..b0e0f613ebc3 100644
--- a/ncurses/base/lib_mouse.c
+++ b/ncurses/base/lib_mouse.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2010,2011 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 *
@@ -84,7 +84,7 @@
#define CUR SP_TERMTYPE
#endif
-MODULE_ID("$Id: lib_mouse.c,v 1.121 2011/01/22 19:47:47 tom Exp $")
+MODULE_ID("$Id: lib_mouse.c,v 1.141 2013/09/21 19:09:19 tom Exp $")
#include <tic.h>
@@ -112,7 +112,7 @@ make an error
#undef buttons /* symbol conflict in consio.h */
#undef mouse_info /* symbol conflict in consio.h */
#include <osreldate.h>
-#if (__FreeBSD_version >= 400017)
+#if defined(__DragonFly_version) || (defined(__FreeBSD__) && (__FreeBSD_version >= 400017))
#include <sys/consio.h>
#include <sys/fbio.h>
#else
@@ -120,6 +120,17 @@ make an error
#endif
#endif /* use_SYSMOUSE */
+#if USE_KLIBC_MOUSE
+#include <sys/socket.h>
+#define pipe(handles) socketpair(AF_LOCAL, SOCK_STREAM, 0, handles)
+#define DosWrite(hfile, pbuffer, cbwrite, pcbactual) \
+ write(hfile, pbuffer, cbwrite)
+#define DosExit(action, result ) /* do nothing */
+#define DosCreateThread(ptid, pfn, param, flag, cbStack) \
+ (*(ptid) = _beginthread(pfn, NULL, cbStack, \
+ (void *)param), (*(ptid) == -1))
+#endif
+
#define MY_TRACE TRACE_ICALLS|TRACE_IEVENT
#define MASK_RELEASE(x) (mmask_t) NCURSES_MOUSE_MASK(x, 001)
@@ -148,6 +159,9 @@ make an error
#define INVALID_EVENT -1
#define NORMAL_EVENT 0
+#define ValidEvent(ep) ((ep)->id != INVALID_EVENT)
+#define Invalidate(ep) (ep)->id = INVALID_EVENT
+
#if USE_GPM_SUPPORT
#ifndef LIBGPM_SONAME
@@ -211,7 +225,7 @@ write_event(SCREEN *sp, int down, int button, int x, int y)
char buf[6];
unsigned long ignore;
- strncpy(buf, key_mouse, 3); /* should be "\033[M" */
+ strcpy(buf, "\033[M"); /* should be the same as key_mouse */
buf[3] = ' ' + (button - 1) + (down ? 0 : 0x40);
buf[4] = ' ' + x - LEFT_COL + 1;
buf[5] = ' ' + y - TOP_ROW + 1;
@@ -219,7 +233,11 @@ write_event(SCREEN *sp, int down, int button, int x, int y)
}
static void
+#if USE_KLIBC_MOUSE
+mouse_server(void *param)
+#else
mouse_server(unsigned long param)
+#endif
{
SCREEN *sp = (SCREEN *) param;
unsigned short fWait = MOU_WAIT;
@@ -245,7 +263,8 @@ mouse_server(unsigned long param)
/* sit and wait on the event queue */
rc = MouReadEventQue(&mouev, &fWait, hmou);
if (rc) {
- sprintf(err, "Error reading mouse queue, rc=%lu.\r\n", rc);
+ _nc_SPRINTF(err, _nc_SLIMIT(sizeof(err))
+ "Error reading mouse queue, rc=%lu.\r\n", rc);
break;
}
if (!sp->_emxmouse_activated)
@@ -271,9 +290,11 @@ mouse_server(unsigned long param)
finish:
oldstate = mouev.fs;
}
- } else
- sprintf(err, "Error setting event mask, buttons=%d, rc=%lu.\r\n",
- nbuttons, rc);
+ } else {
+ _nc_SPRINTF(err, _nc_SLIMIT(sizeof(err))
+ "Error setting event mask, buttons=%d, rc=%lu.\r\n",
+ nbuttons, rc);
+ }
DosWrite(2, err, strlen(err), &rc);
MouClose(hmou);
@@ -367,20 +388,26 @@ enable_xterm_mouse(SCREEN *sp, int enable)
#if USE_EMX_MOUSE
sp->_emxmouse_activated = enable;
#else
- NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx
- "xterm-mouse",
- TPARM_1(sp->_mouse_xtermcap, enable));
+ NCURSES_PUTP2("xterm-mouse", TPARM_1(sp->_mouse_xtermcap, enable));
#endif
sp->_mouse_active = enable;
}
#if USE_GPM_SUPPORT
static bool
-allow_gpm_mouse(void)
+allow_gpm_mouse(SCREEN *sp)
{
bool result = FALSE;
- /* GPM does printf's without checking if stdout is a terminal */
+#if USE_WEAK_SYMBOLS
+ /* Danger Robinson: do not use dlopen for libgpm if already loaded */
+ if ((Gpm_Wgetch)) {
+ if (!sp->_mouse_gpm_loaded) {
+ T(("GPM library was already dlopen'd, not by us"));
+ }
+ } else
+#endif
+ /* GPM does printf's without checking if stdout is a terminal */
if (isatty(fileno(stdout))) {
char *list = getenv("NCURSES_GPM_TERMS");
char *env = getenv("TERM");
@@ -506,7 +533,7 @@ initialize_mousetype(SCREEN *sp)
/* Try gpm first, because gpm may be configured to run in xterm */
#if USE_GPM_SUPPORT
- if (allow_gpm_mouse()) {
+ if (allow_gpm_mouse(sp)) {
if (!sp->_mouse_gpm_loaded) {
#ifdef HAVE_LIBDL
load_gpm_library(sp);
@@ -673,7 +700,7 @@ _nc_mouse_init(SCREEN *sp)
sp->_mouse_eventp = FirstEV(sp);
for (i = 0; i < EV_MAX; i++)
- sp->_mouse_events[i].id = INVALID_EVENT;
+ Invalidate(sp->_mouse_events + i);
initialize_mousetype(sp);
@@ -750,6 +777,7 @@ _nc_mouse_event(SCREEN *sp)
eventp->bstate |= BUTTON3_RELEASED;
break;
default:
+ eventp->bstate |= REPORT_MOUSE_POSITION;
break;
}
@@ -830,7 +858,6 @@ _nc_mouse_inline(SCREEN *sp)
if (sp->_mouse_type == M_XTERM) {
unsigned char kbuf[4];
- mmask_t prev;
size_t grabbed;
int res;
@@ -896,35 +923,51 @@ _nc_mouse_inline(SCREEN *sp)
/* processing code goes here */
eventp->bstate = 0;
- prev = PREV(eventp)->bstate;
#if USE_EMX_MOUSE
#define PRESS_POSITION(n) \
- eventp->bstate = MASK_PRESS(n); \
- if (kbuf[0] & 0x40) \
- eventp->bstate = MASK_RELEASE(n)
+ do { \
+ eventp->bstate = MASK_PRESS(n); \
+ sp->_mouse_bstate |= MASK_PRESS(n); \
+ if (kbuf[0] & 0x40) { \
+ eventp->bstate = MASK_RELEASE(n); \
+ sp->_mouse_bstate &= ~MASK_PRESS(n); \
+ } \
+ } while (0)
#else
#define PRESS_POSITION(n) \
- eventp->bstate = (mmask_t) (prev & MASK_PRESS(n) \
- ? REPORT_MOUSE_POSITION \
- : MASK_PRESS(n))
+ do { \
+ eventp->bstate = (mmask_t) (sp->_mouse_bstate & MASK_PRESS(n) \
+ ? REPORT_MOUSE_POSITION \
+ : MASK_PRESS(n)); \
+ sp->_mouse_bstate |= MASK_PRESS(n); \
+ } while (0)
#endif
switch (kbuf[0] & 0x3) {
case 0x0:
- if (kbuf[0] & 64)
+ if ((kbuf[0] & 96) == 96) {
eventp->bstate = MASK_PRESS(4);
- else
+ /* Do not record in sp->_mouse_bstate; there will be no
+ * corresponding release event.
+ */
+ } else {
PRESS_POSITION(1);
+ }
break;
case 0x1:
+ if ((kbuf[0] & 96) == 96) {
#if NCURSES_MOUSE_VERSION == 2
- if (kbuf[0] & 64)
eventp->bstate = MASK_PRESS(5);
- else
+ /* See comment above for button 4 */
+#else
+ /* Ignore this event as it is not a true press of the button */
+ eventp->bstate = REPORT_MOUSE_POSITION;
#endif
+ } else {
PRESS_POSITION(2);
+ }
break;
case 0x2:
@@ -939,12 +982,13 @@ _nc_mouse_inline(SCREEN *sp)
* release, we can infer the button actually released by looking at
* the previous event.
*/
- if (prev & (BUTTON_PRESSED | BUTTON_RELEASED)) {
+ if (sp->_mouse_bstate & BUTTON_PRESSED) {
eventp->bstate = BUTTON_RELEASED;
for (b = 1; b <= MAX_BUTTONS; ++b) {
- if (!(prev & MASK_PRESS(b)))
+ if (!(sp->_mouse_bstate & MASK_PRESS(b)))
eventp->bstate &= ~MASK_RELEASE(b);
}
+ sp->_mouse_bstate = 0;
} else {
/*
* XFree86 xterm will return a stream of release-events to
@@ -985,7 +1029,7 @@ _nc_mouse_inline(SCREEN *sp)
}
static void
-mouse_activate(SCREEN *sp, bool on)
+mouse_activate(SCREEN *sp, int on)
{
if (!on && !sp->_mouse_initialized)
return;
@@ -994,7 +1038,7 @@ mouse_activate(SCREEN *sp, bool on)
return;
if (on) {
-
+ sp->_mouse_bstate = 0;
switch (sp->_mouse_type) {
case M_XTERM:
#if NCURSES_EXT_FUNCS
@@ -1074,10 +1118,13 @@ _nc_mouse_parse(SCREEN *sp, int runcount)
/* parse a run of atomic mouse events into a gesture */
{
MEVENT *eventp = sp->_mouse_eventp;
- MEVENT *ep, *runp, *next, *prev = PREV(eventp);
+ MEVENT *next, *ep;
+ MEVENT *first_valid = NULL;
+ MEVENT *first_invalid = NULL;
int n;
int b;
bool merge;
+ bool endLoop;
TR(MY_TRACE, ("_nc_mouse_parse(%d) called", runcount));
@@ -1094,7 +1141,8 @@ _nc_mouse_parse(SCREEN *sp, int runcount)
*
* It's possible that the run may not resolve to a single event (for
* example, if the user quadruple-clicks). If so, leading events
- * in the run are ignored.
+ * in the run are ignored if user does not call getmouse in a loop (getting
+ * them from newest to older).
*
* Note that this routine is independent of the format of the specific
* format of the pointing-device's reports. We can use it to parse
@@ -1102,79 +1150,110 @@ _nc_mouse_parse(SCREEN *sp, int runcount)
* button basis, as long as the device-dependent mouse code puts stuff
* on the queue in MEVENT format.
*/
- if (runcount == 1) {
- TR(MY_TRACE,
- ("_nc_mouse_parse: returning simple mouse event %s at slot %ld",
- _nc_tracemouse(sp, prev),
- (long) IndexEV(sp, prev)));
- return (prev->id >= NORMAL_EVENT)
- ? ((prev->bstate & sp->_mouse_mask) ? TRUE : FALSE)
- : FALSE;
- }
- /* find the start of the run */
- runp = eventp;
- for (n = runcount; n > 0; n--) {
- runp = PREV(runp);
+ /*
+ * Reset all events that were not set, in case the user sometimes calls
+ * getmouse only once and other times until there are no more events in
+ * queue.
+ *
+ * This also allows reaching the beginning of the run.
+ */
+ ep = eventp;
+ for (n = runcount; n < EV_MAX; n++) {
+ Invalidate(ep);
+ ep = NEXT(ep);
}
#ifdef TRACE
if (USE_TRACEF(TRACE_IEVENT)) {
_trace_slot(sp, "before mouse press/release merge:");
_tracef("_nc_mouse_parse: run starts at %ld, ends at %ld, count %d",
- RunParams(sp, eventp, runp),
+ RunParams(sp, eventp, ep),
runcount);
_nc_unlock_global(tracef);
}
#endif /* TRACE */
/* first pass; merge press/release pairs */
- do {
- merge = FALSE;
- for (ep = runp; (next = NEXT(ep)) != eventp; ep = next) {
+ endLoop = FALSE;
+ while (!endLoop) {
+ next = NEXT(ep);
+ if (next == eventp) {
+ /* Will end the loop, but compact before */
+ endLoop = TRUE;
+ } else {
#define MASK_CHANGED(x) (!(ep->bstate & MASK_PRESS(x)) \
== !(next->bstate & MASK_RELEASE(x)))
- if (ep->x == next->x && ep->y == next->y
+ if (ValidEvent(ep) && ValidEvent(next)
+ && ep->x == next->x && ep->y == next->y
&& (ep->bstate & BUTTON_PRESSED)
- && MASK_CHANGED(1)
- && MASK_CHANGED(2)
- && MASK_CHANGED(3)
- && MASK_CHANGED(4)
-#if NCURSES_MOUSE_VERSION == 2
- && MASK_CHANGED(5)
-#endif
- ) {
+ && (!(next->bstate & BUTTON_PRESSED))) {
+ bool changed = TRUE;
+
for (b = 1; b <= MAX_BUTTONS; ++b) {
- if ((sp->_mouse_mask & MASK_CLICK(b))
- && (ep->bstate & MASK_PRESS(b))) {
- ep->bstate &= ~MASK_PRESS(b);
- ep->bstate |= MASK_CLICK(b);
- merge = TRUE;
+ if (!MASK_CHANGED(b)) {
+ changed = FALSE;
+ break;
+ }
+ }
+
+ if (changed) {
+ merge = FALSE;
+ for (b = 1; b <= MAX_BUTTONS; ++b) {
+ if ((sp->_mouse_mask & MASK_CLICK(b))
+ && (ep->bstate & MASK_PRESS(b))) {
+ next->bstate &= ~MASK_RELEASE(b);
+ next->bstate |= MASK_CLICK(b);
+ merge = TRUE;
+ }
+ }
+ if (merge) {
+ Invalidate(ep);
}
}
- if (merge)
- next->id = INVALID_EVENT;
}
}
- } while
- (merge);
+ /* Compact valid events */
+ if (!ValidEvent(ep)) {
+ if ((first_valid != NULL) && (first_invalid == NULL)) {
+ first_invalid = ep;
+ }
+ } else {
+ if (first_valid == NULL) {
+ first_valid = ep;
+ } else if (first_invalid != NULL) {
+ *first_invalid = *ep;
+ Invalidate(ep);
+ first_invalid = NEXT(first_invalid);
+ }
+ }
+
+ ep = next;
+ }
+
+ if (first_invalid != NULL) {
+ eventp = first_invalid;
+ }
#ifdef TRACE
if (USE_TRACEF(TRACE_IEVENT)) {
_trace_slot(sp, "before mouse click merge:");
- _tracef("_nc_mouse_parse: run starts at %ld, ends at %ld, count %d",
- RunParams(sp, eventp, runp),
- runcount);
- _nc_unlock_global(tracef);
+ if (first_valid == NULL) {
+ _tracef("_nc_mouse_parse: no valid event");
+ } else {
+ _tracef("_nc_mouse_parse: run starts at %ld, ends at %ld, count %d",
+ RunParams(sp, eventp, first_valid),
+ runcount);
+ _nc_unlock_global(tracef);
+ }
}
#endif /* TRACE */
/*
- * Second pass; merge click runs. At this point, click events are
- * each followed by one invalid event. We merge click events
- * forward in the queue.
+ * Second pass; merge click runs. We merge click events forward in the
+ * queue. For example, double click can be changed to triple click.
*
* NOTE: There is a problem with this design! If the application
* allows enough click events to pile up in the circular queue so
@@ -1187,87 +1266,102 @@ _nc_mouse_parse(SCREEN *sp, int runcount)
* but the timer element would have to have sub-second resolution,
* which would get us into portability trouble.
*/
- do {
- MEVENT *follower;
-
- merge = FALSE;
- for (ep = runp; (next = NEXT(ep)) != eventp; ep = next)
- if (ep->id != INVALID_EVENT) {
- if (next->id != INVALID_EVENT)
- continue;
- follower = NEXT(next);
- if (follower->id == INVALID_EVENT)
- continue;
-
- /* merge click events forward */
- if ((ep->bstate & BUTTON_CLICKED)
- && (follower->bstate & BUTTON_CLICKED)) {
- for (b = 1; b <= MAX_BUTTONS; ++b) {
- if ((sp->_mouse_mask & MASK_DOUBLE_CLICK(b))
- && (follower->bstate & MASK_CLICK(b))) {
- follower->bstate &= ~MASK_CLICK(b);
- follower->bstate |= MASK_DOUBLE_CLICK(b);
- merge = TRUE;
- }
+ first_invalid = NULL;
+ endLoop = (first_valid == NULL);
+ ep = first_valid;
+ while (!endLoop) {
+ next = NEXT(ep);
+
+ if (next == eventp) {
+ /* Will end the loop, but check event type and compact before */
+ endLoop = TRUE;
+ } else if (!ValidEvent(next)) {
+ continue;
+ } else {
+ /* merge click events forward */
+ if ((ep->bstate & BUTTON_CLICKED)
+ && (next->bstate & BUTTON_CLICKED)) {
+ merge = FALSE;
+ for (b = 1; b <= MAX_BUTTONS; ++b) {
+ if ((sp->_mouse_mask & MASK_DOUBLE_CLICK(b))
+ && (ep->bstate & MASK_CLICK(b))
+ && (next->bstate & MASK_CLICK(b))) {
+ next->bstate &= ~MASK_CLICK(b);
+ next->bstate |= MASK_DOUBLE_CLICK(b);
+ merge = TRUE;
}
- if (merge)
- ep->id = INVALID_EVENT;
}
+ if (merge) {
+ Invalidate(ep);
+ }
+ }
- /* merge double-click events forward */
- if ((ep->bstate & BUTTON_DOUBLE_CLICKED)
- && (follower->bstate & BUTTON_CLICKED)) {
- for (b = 1; b <= MAX_BUTTONS; ++b) {
- if ((sp->_mouse_mask & MASK_TRIPLE_CLICK(b))
- && (follower->bstate & MASK_CLICK(b))) {
- follower->bstate &= ~MASK_CLICK(b);
- follower->bstate |= MASK_TRIPLE_CLICK(b);
- merge = TRUE;
- }
+ /* merge double-click events forward */
+ if ((ep->bstate & BUTTON_DOUBLE_CLICKED)
+ && (next->bstate & BUTTON_CLICKED)) {
+ merge = FALSE;
+ for (b = 1; b <= MAX_BUTTONS; ++b) {
+ if ((sp->_mouse_mask & MASK_TRIPLE_CLICK(b))
+ && (ep->bstate & MASK_DOUBLE_CLICK(b))
+ && (next->bstate & MASK_CLICK(b))) {
+ next->bstate &= ~MASK_CLICK(b);
+ next->bstate |= MASK_TRIPLE_CLICK(b);
+ merge = TRUE;
}
- if (merge)
- ep->id = INVALID_EVENT;
+ }
+ if (merge) {
+ Invalidate(ep);
}
}
- } while
- (merge);
+ }
-#ifdef TRACE
- if (USE_TRACEF(TRACE_IEVENT)) {
- _trace_slot(sp, "before mouse event queue compaction:");
- _tracef("_nc_mouse_parse: run starts at %ld, ends at %ld, count %d",
- RunParams(sp, eventp, runp),
- runcount);
- _nc_unlock_global(tracef);
- }
-#endif /* TRACE */
+ /* Discard event if it does not match event mask */
+ if (!(ep->bstate & sp->_mouse_mask2)) {
+ Invalidate(ep);
+ }
- /*
- * Now try to throw away trailing events flagged invalid, or that
- * don't match the current event mask.
- */
- for (; runcount; prev = PREV(eventp), runcount--)
- if (prev->id == INVALID_EVENT || !(prev->bstate & sp->_mouse_mask)) {
- sp->_mouse_eventp = eventp = prev;
+ /* Compact valid events */
+ if (!ValidEvent(ep)) {
+ if (ep == first_valid) {
+ first_valid = next;
+ } else if (first_invalid == NULL) {
+ first_invalid = ep;
+ }
+ } else if (first_invalid != NULL) {
+ *first_invalid = *ep;
+ Invalidate(ep);
+ first_invalid = NEXT(first_invalid);
}
+
+ ep = next;
+ }
+
+ if (first_invalid == NULL) {
+ first_invalid = eventp;
+ }
+ sp->_mouse_eventp = first_invalid;
+
#ifdef TRACE
- if (USE_TRACEF(TRACE_IEVENT)) {
- _trace_slot(sp, "after mouse event queue compaction:");
- _tracef("_nc_mouse_parse: run starts at %ld, ends at %ld, count %d",
- RunParams(sp, eventp, runp),
- runcount);
- _nc_unlock_global(tracef);
+ if (first_valid != NULL) {
+ if (USE_TRACEF(TRACE_IEVENT)) {
+ _trace_slot(sp, "after mouse event queue compaction:");
+ _tracef("_nc_mouse_parse: run starts at %ld, ends at %ld, count %d",
+ RunParams(sp, first_invalid, first_valid),
+ runcount);
+ _nc_unlock_global(tracef);
+ }
+ for (ep = first_valid; ep != first_invalid; ep = NEXT(ep)) {
+ if (ValidEvent(ep))
+ TR(MY_TRACE,
+ ("_nc_mouse_parse: returning composite mouse event %s at slot %ld",
+ _nc_tracemouse(sp, ep),
+ (long) IndexEV(sp, ep)));
+ }
}
- for (ep = runp; ep != eventp; ep = NEXT(ep))
- if (ep->id != INVALID_EVENT)
- TR(MY_TRACE,
- ("_nc_mouse_parse: returning composite mouse event %s at slot %ld",
- _nc_tracemouse(sp, ep),
- (long) IndexEV(sp, ep)));
#endif /* TRACE */
/* after all this, do we have a valid event? */
- return (PREV(eventp)->id != INVALID_EVENT);
+ return ValidEvent(PREV(first_invalid));
}
static void
@@ -1359,7 +1453,16 @@ NCURSES_SP_NAME(getmouse) (NCURSES_SP_DCLx MEVENT * aevent)
/* compute the current-event pointer */
MEVENT *prev = PREV(eventp);
- if (prev->id != INVALID_EVENT) {
+ /*
+ * Discard events not matching mask (there could be still some if
+ * _nc_mouse_parse was not called, e.g., when _nc_mouse_inline returns
+ * false).
+ */
+ while (ValidEvent(prev) && (!(prev->bstate & SP_PARM->_mouse_mask2))) {
+ Invalidate(prev);
+ prev = PREV(prev);
+ }
+ if (ValidEvent(prev)) {
/* copy the event we find there */
*aevent = *prev;
@@ -1367,9 +1470,16 @@ NCURSES_SP_NAME(getmouse) (NCURSES_SP_DCLx MEVENT * aevent)
_nc_tracemouse(SP_PARM, prev),
(long) IndexEV(SP_PARM, prev)));
- prev->id = INVALID_EVENT; /* so the queue slot becomes free */
- SP_PARM->_mouse_eventp = PREV(prev);
+ Invalidate(prev); /* so the queue slot becomes free */
+ SP_PARM->_mouse_eventp = prev;
result = OK;
+ } else {
+ /* Reset the provided event */
+ aevent->bstate = 0;
+ Invalidate(aevent);
+ aevent->x = 0;
+ aevent->y = 0;
+ aevent->z = 0;
}
}
returnCode(result);
@@ -1420,6 +1530,7 @@ NCURSES_SP_NAME(mousemask) (NCURSES_SP_DCLx mmask_t newmask, mmask_t * oldmask)
/* set the mouse event mask */
{
mmask_t result = 0;
+ int b;
T((T_CALLED("mousemask(%p,%#lx,%p)"),
(void *) SP_PARM,
@@ -1447,6 +1558,22 @@ NCURSES_SP_NAME(mousemask) (NCURSES_SP_DCLx mmask_t newmask, mmask_t * oldmask)
mouse_activate(SP_PARM, (bool) (result != 0));
SP_PARM->_mouse_mask = result;
+ SP_PARM->_mouse_mask2 = result;
+
+ /*
+ * Make a mask corresponding to the states we will need to
+ * retain (temporarily) while building up the state that the
+ * user asked for.
+ */
+ for (b = 1; b <= MAX_BUTTONS; ++b) {
+ if (SP_PARM->_mouse_mask2 & MASK_TRIPLE_CLICK(b))
+ SP_PARM->_mouse_mask2 |= MASK_DOUBLE_CLICK(b);
+ if (SP_PARM->_mouse_mask2 & MASK_DOUBLE_CLICK(b))
+ SP_PARM->_mouse_mask2 |= MASK_CLICK(b);
+ if (SP_PARM->_mouse_mask2 & MASK_CLICK(b))
+ SP_PARM->_mouse_mask2 |= (MASK_PRESS(b) |
+ MASK_RELEASE(b));
+ }
}
}
}
diff --git a/ncurses/base/lib_newterm.c b/ncurses/base/lib_newterm.c
index e12208b7d02d..435763d096ea 100644
--- a/ncurses/base/lib_newterm.c
+++ b/ncurses/base/lib_newterm.c
@@ -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 *
@@ -42,17 +42,13 @@
#include <curses.priv.h>
-#if SVR4_TERMIO && !defined(_POSIX_SOURCE)
-#define _POSIX_SOURCE
-#endif
-
#ifndef CUR
#define CUR SP_TERMTYPE
#endif
#include <tic.h>
-MODULE_ID("$Id: lib_newterm.c,v 1.86 2010/05/20 23:25:18 tom Exp $")
+MODULE_ID("$Id: lib_newterm.c,v 1.90 2013/09/28 21:02:56 tom Exp $")
#ifdef USE_TERM_DRIVER
#define NumLabels InfoOf(SP_PARM).numlabels
@@ -185,7 +181,7 @@ NCURSES_SP_NAME(newterm) (NCURSES_SP_DCLx
START_TRACE();
T((T_CALLED("newterm(%p, \"%s\", %p,%p)"),
(void *) SP_PARM,
- name,
+ (name ? name : ""),
(void *) ofp,
(void *) ifp));
@@ -283,7 +279,8 @@ NCURSES_SP_NAME(newterm) (NCURSES_SP_DCLx
NCURSES_SP_NAME(typeahead) (NCURSES_SP_ARGx fileno(_ifp));
#ifdef TERMIOS
SP_PARM->_use_meta = ((new_term->Ottyb.c_cflag & CSIZE) == CS8 &&
- !(new_term->Ottyb.c_iflag & ISTRIP));
+ !(new_term->Ottyb.c_iflag & ISTRIP)) ||
+ USE_KLIBC_KBD;
#else
SP_PARM->_use_meta = FALSE;
#endif
@@ -310,7 +307,7 @@ NCURSES_SP_NAME(newterm) (NCURSES_SP_DCLx
/* compute movement costs so we can do better move optimization */
#ifdef USE_TERM_DRIVER
TCBOf(SP_PARM)->drv->scinit(SP_PARM);
-#else
+#else /* ! USE_TERM_DRIVER */
/*
* Check for mismatched graphic-rendition capabilities. Most SVr4
* terminfo trees contain entries that have rmul or rmso equated to
@@ -323,13 +320,16 @@ NCURSES_SP_NAME(newterm) (NCURSES_SP_DCLx
#define SGR0_TEST(mode) (mode != 0) && (exit_attribute_mode == 0 || strcmp(mode, exit_attribute_mode))
SP_PARM->_use_rmso = SGR0_TEST(exit_standout_mode);
SP_PARM->_use_rmul = SGR0_TEST(exit_underline_mode);
+#if USE_ITALIC
+ SP_PARM->_use_ritm = SGR0_TEST(exit_italics_mode);
+#endif
/* compute movement costs so we can do better move optimization */
_nc_mvcur_init();
/* initialize terminal to a sane state */
_nc_screen_init();
-#endif
+#endif /* USE_TERM_DRIVER */
/* Initialize the terminal line settings. */
_nc_initscr(NCURSES_SP_ARG);
diff --git a/ncurses/base/lib_newwin.c b/ncurses/base/lib_newwin.c
index 72d8af84b703..a6c64beaaf4a 100644
--- a/ncurses/base/lib_newwin.c
+++ b/ncurses/base/lib_newwin.c
@@ -43,7 +43,7 @@
#include <curses.priv.h>
#include <stddef.h>
-MODULE_ID("$Id: lib_newwin.c,v 1.69 2011/03/07 21:58:17 tom Exp $")
+MODULE_ID("$Id: lib_newwin.c,v 1.71 2011/05/28 21:32:51 tom Exp $")
#define window_is(name) ((sp)->_##name == win)
@@ -141,7 +141,11 @@ NCURSES_SP_NAME(newwin) (NCURSES_SP_DCLx
T((T_CALLED("newwin(%p, %d,%d,%d,%d)"), (void *) SP_PARM, num_lines, num_columns,
begy, begx));
- if (begy < 0 || begx < 0 || num_lines < 0 || num_columns < 0)
+ if (begy < 0
+ || begx < 0
+ || num_lines < 0
+ || num_columns < 0
+ || SP_PARM == 0)
returnWin(0);
if (num_lines == 0)
@@ -235,10 +239,15 @@ derwin(WINDOW *orig, int num_lines, int num_columns, int begy, int begx)
NCURSES_EXPORT(WINDOW *)
subwin(WINDOW *w, int l, int c, int y, int x)
{
+ WINDOW *result = 0;
+
T((T_CALLED("subwin(%p, %d, %d, %d, %d)"), (void *) w, l, c, y, x));
- T(("parent has begy = %ld, begx = %ld", (long) w->_begy, (long) w->_begx));
+ if (w != 0) {
+ T(("parent has begy = %ld, begx = %ld", (long) w->_begy, (long) w->_begx));
- returnWin(derwin(w, l, c, y - w->_begy, x - w->_begx));
+ result = derwin(w, l, c, y - w->_begy, x - w->_begx);
+ }
+ returnWin(result);
}
static bool
diff --git a/ncurses/base/lib_overlay.c b/ncurses/base/lib_overlay.c
index bfb817bc3108..a206248a1e74 100644
--- a/ncurses/base/lib_overlay.c
+++ b/ncurses/base/lib_overlay.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,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 *
@@ -40,7 +40,7 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_overlay.c,v 1.29 2009/10/24 23:21:31 tom Exp $")
+MODULE_ID("$Id: lib_overlay.c,v 1.31 2013/04/06 23:47:13 tom Exp $")
static int
overlap(const WINDOW *const src, WINDOW *const dst, int const flag)
@@ -151,7 +151,10 @@ copywin(const WINDOW *src, WINDOW *dst,
dminrow, dmincol,
dmaxrow, dmaxcol, over));
- if (src && dst) {
+ if (src != 0
+ && dst != 0
+ && dmaxrow >= dminrow
+ && dmaxcol >= dmincol) {
_nc_lock_global(curses);
bk = AttrOf(dst->_nc_bkgd);
@@ -160,6 +163,7 @@ copywin(const WINDOW *src, WINDOW *dst,
/* make sure rectangle exists in source */
if ((sminrow + dmaxrow - dminrow) <= (src->_maxy + 1) &&
(smincol + dmaxcol - dmincol) <= (src->_maxx + 1)) {
+ bool copied = FALSE;
T(("rectangle exists in source"));
@@ -172,10 +176,18 @@ copywin(const WINDOW *src, WINDOW *dst,
dy <= dmaxrow;
sy++, dy++) {
+ if (dy < 0 || sy < 0)
+ continue;
+
touched = FALSE;
for (dx = dmincol, sx = smincol;
dx <= dmaxcol;
sx++, dx++) {
+
+ if (dx < 0 || sx < 0)
+ continue;
+ copied = TRUE;
+
if (over) {
if ((CharOf(src->_line[sy].text[sx]) != L(' ')) &&
(!CharEq(dst->_line[dy].text[dx],
@@ -201,7 +213,8 @@ copywin(const WINDOW *src, WINDOW *dst,
}
}
T(("finished copywin"));
- rc = OK;
+ if (copied)
+ rc = OK;
}
}
_nc_unlock_global(curses);
diff --git a/ncurses/base/lib_printw.c b/ncurses/base/lib_printw.c
index 963181d9a494..56528f6bc7a7 100644
--- a/ncurses/base/lib_printw.c
+++ b/ncurses/base/lib_printw.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2005,2009 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,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 *
@@ -27,7 +27,7 @@
****************************************************************************/
/****************************************************************************
- * Author: Thomas E. Dickey <dickey@clark.net> 1997 *
+ * Author: Thomas E. Dickey 1997-on *
****************************************************************************/
/*
@@ -39,7 +39,7 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_printw.c,v 1.20 2009/10/24 22:07:03 tom Exp $")
+MODULE_ID("$Id: lib_printw.c,v 1.23 2012/09/03 17:55:28 tom Exp $")
NCURSES_EXPORT(int)
printw(const char *fmt,...)
@@ -48,10 +48,11 @@ printw(const char *fmt,...)
int code;
#ifdef TRACE
- va_start(argp, fmt);
+ va_list argq;
+ va_start(argq, fmt);
T((T_CALLED("printw(%s%s)"),
- _nc_visbuf(fmt), _nc_varargs(fmt, argp)));
- va_end(argp);
+ _nc_visbuf(fmt), _nc_varargs(fmt, argq)));
+ va_end(argq);
#endif
va_start(argp, fmt);
@@ -68,10 +69,11 @@ wprintw(WINDOW *win, const char *fmt,...)
int code;
#ifdef TRACE
- va_start(argp, fmt);
+ va_list argq;
+ va_start(argq, fmt);
T((T_CALLED("wprintw(%p,%s%s)"),
- (void *) win, _nc_visbuf(fmt), _nc_varargs(fmt, argp)));
- va_end(argp);
+ (void *) win, _nc_visbuf(fmt), _nc_varargs(fmt, argq)));
+ va_end(argq);
#endif
va_start(argp, fmt);
@@ -88,10 +90,11 @@ mvprintw(int y, int x, const char *fmt,...)
int code;
#ifdef TRACE
- va_start(argp, fmt);
+ va_list argq;
+ va_start(argq, fmt);
T((T_CALLED("mvprintw(%d,%d,%s%s)"),
- y, x, _nc_visbuf(fmt), _nc_varargs(fmt, argp)));
- va_end(argp);
+ y, x, _nc_visbuf(fmt), _nc_varargs(fmt, argq)));
+ va_end(argq);
#endif
if ((code = move(y, x)) != ERR) {
@@ -109,10 +112,11 @@ mvwprintw(WINDOW *win, int y, int x, const char *fmt,...)
int code;
#ifdef TRACE
- va_start(argp, fmt);
+ va_list argq;
+ va_start(argq, fmt);
T((T_CALLED("mvwprintw(%d,%d,%p,%s%s)"),
- y, x, (void *) win, _nc_visbuf(fmt), _nc_varargs(fmt, argp)));
- va_end(argp);
+ y, x, (void *) win, _nc_visbuf(fmt), _nc_varargs(fmt, argq)));
+ va_end(argq);
#endif
if ((code = wmove(win, y, x)) != ERR) {
diff --git a/ncurses/base/lib_refresh.c b/ncurses/base/lib_refresh.c
index 8c02086a707d..a77bc487f21c 100644
--- a/ncurses/base/lib_refresh.c
+++ b/ncurses/base/lib_refresh.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2009,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 *
@@ -42,7 +42,7 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_refresh.c,v 1.44 2010/12/19 01:22:58 tom Exp $")
+MODULE_ID("$Id: lib_refresh.c,v 1.45 2011/06/25 19:02:22 Vassili.Courzakis Exp $")
NCURSES_EXPORT(int)
wrefresh(WINDOW *win)
@@ -90,12 +90,6 @@ wnoutrefresh(WINDOW *win)
#endif
T((T_CALLED("wnoutrefresh(%p)"), (void *) win));
-#ifdef TRACE
- if (USE_TRACEF(TRACE_UPDATE)) {
- _tracedump("...win", win);
- _nc_unlock_global(tracef);
- }
-#endif /* TRACE */
/*
* This function will break badly if we try to refresh a pad.
@@ -104,6 +98,13 @@ wnoutrefresh(WINDOW *win)
|| (win->_flags & _ISPAD))
returnCode(ERR);
+#ifdef TRACE
+ if (USE_TRACEF(TRACE_UPDATE)) {
+ _tracedump("...win", win);
+ _nc_unlock_global(tracef);
+ }
+#endif /* TRACE */
+
/* put them here so "win == 0" won't break our code */
begx = win->_begx;
begy = win->_begy;
diff --git a/ncurses/base/lib_restart.c b/ncurses/base/lib_restart.c
index b28cfd1f2ffd..3a3756e385e8 100644
--- a/ncurses/base/lib_restart.c
+++ b/ncurses/base/lib_restart.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2008,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 *
@@ -41,11 +41,7 @@
#include <curses.priv.h>
-#if SVR4_TERMIO && !defined(_POSIX_SOURCE)
-#define _POSIX_SOURCE
-#endif
-
-MODULE_ID("$Id: lib_restart.c,v 1.13 2009/10/24 22:47:43 tom Exp $")
+MODULE_ID("$Id: lib_restart.c,v 1.15 2012/12/08 20:40:06 tom Exp $")
NCURSES_EXPORT(int)
NCURSES_SP_NAME(restartterm) (NCURSES_SP_DCLx
@@ -55,7 +51,7 @@ NCURSES_SP_NAME(restartterm) (NCURSES_SP_DCLx
{
int result;
#ifdef USE_TERM_DRIVER
- TERMINAL *new_term;
+ TERMINAL *new_term = 0;
#endif
T((T_CALLED("restartterm(%p,%s,%d,%p)"),
diff --git a/ncurses/base/lib_scanw.c b/ncurses/base/lib_scanw.c
index a8621e63e172..637aa46ece01 100644
--- a/ncurses/base/lib_scanw.c
+++ b/ncurses/base/lib_scanw.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2001,2009 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,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 *
@@ -40,14 +40,14 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_scanw.c,v 1.12 2009/10/24 22:35:14 tom Exp $")
+MODULE_ID("$Id: lib_scanw.c,v 1.13 2011/10/22 16:31:35 tom Exp $")
NCURSES_EXPORT(int)
vwscanw(WINDOW *win, NCURSES_CONST char *fmt, va_list argp)
{
char buf[BUFSIZ];
- if (wgetnstr(win, buf, sizeof(buf) - 1) == ERR)
+ if (wgetnstr(win, buf, (int) sizeof(buf) - 1) == ERR)
return (ERR);
return (vsscanf(buf, fmt, argp));
diff --git a/ncurses/base/lib_screen.c b/ncurses/base/lib_screen.c
index 27212b790611..695ed30e7e10 100644
--- a/ncurses/base/lib_screen.c
+++ b/ncurses/base/lib_screen.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,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 *
@@ -39,7 +39,7 @@
#define CUR SP_TERMTYPE
#endif
-MODULE_ID("$Id: lib_screen.c,v 1.38 2009/10/24 22:08:55 tom Exp $")
+MODULE_ID("$Id: lib_screen.c,v 1.41 2011/10/22 15:03:11 tom Exp $")
#define MAX_SIZE 0x3fff /* 16k is big enough for a window or pad */
@@ -51,8 +51,11 @@ NCURSES_SP_NAME(getwin) (NCURSES_SP_DCLx FILE *filep)
T((T_CALLED("getwin(%p)"), (void *) filep));
+ if (filep == 0) {
+ returnWin(0);
+ }
clearerr(filep);
- if (fread(&tmp, 1, sizeof(WINDOW), filep) < sizeof(WINDOW)
+ if (fread(&tmp, (size_t) 1, sizeof(WINDOW), filep) < sizeof(WINDOW)
|| ferror(filep)
|| tmp._maxy == 0
|| tmp._maxy > MAX_SIZE
@@ -110,7 +113,7 @@ NCURSES_SP_NAME(getwin) (NCURSES_SP_DCLx FILE *filep)
for (n = 0; n <= nwin->_maxy; n++) {
clearerr(filep);
- if (fread(nwin->_line[n].text, 1, linesize, filep) < linesize
+ if (fread(nwin->_line[n].text, (size_t) 1, linesize, filep) < linesize
|| ferror(filep)) {
delwin(nwin);
returnWin(0);
@@ -141,7 +144,7 @@ putwin(WINDOW *win, FILE *filep)
size_t len = (size_t) (win->_maxx + 1);
clearerr(filep);
- if (fwrite(win, sizeof(WINDOW), 1, filep) != 1
+ if (fwrite(win, sizeof(WINDOW), (size_t) 1, filep) != 1
|| ferror(filep))
returnCode(code);
@@ -189,18 +192,20 @@ scr_restore(const char *file)
NCURSES_EXPORT(int)
scr_dump(const char *file)
{
+ int result;
FILE *fp = 0;
T((T_CALLED("scr_dump(%s)"), _nc_visbuf(file)));
if (_nc_access(file, W_OK) < 0
|| (fp = fopen(file, "wb")) == 0) {
- returnCode(ERR);
+ result = ERR;
} else {
(void) putwin(newscr, fp);
(void) fclose(fp);
- returnCode(OK);
+ result = OK;
}
+ returnCode(result);
}
NCURSES_EXPORT(int)
diff --git a/ncurses/base/lib_scroll.c b/ncurses/base/lib_scroll.c
index fe4e80804dae..8684e2519294 100644
--- a/ncurses/base/lib_scroll.c
+++ b/ncurses/base/lib_scroll.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2009,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 *
@@ -43,13 +43,13 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_scroll.c,v 1.28 2010/12/19 01:48:09 tom Exp $")
+MODULE_ID("$Id: lib_scroll.c,v 1.29 2011/10/22 16:34:50 tom Exp $")
NCURSES_EXPORT(void)
_nc_scroll_window(WINDOW *win,
int const n,
- NCURSES_SIZE_T const top,
- NCURSES_SIZE_T const bottom,
+ int const top,
+ int const bottom,
NCURSES_CH_T blank)
{
int limit;
diff --git a/ncurses/base/lib_set_term.c b/ncurses/base/lib_set_term.c
index df0a276aef8a..acf6bc1f71cd 100644
--- a/ncurses/base/lib_set_term.c
+++ b/ncurses/base/lib_set_term.c
@@ -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 *
@@ -47,7 +47,7 @@
#define CUR SP_TERMTYPE
#endif
-MODULE_ID("$Id: lib_set_term.c,v 1.138 2010/12/20 00:42:20 tom Exp $")
+MODULE_ID("$Id: lib_set_term.c,v 1.148 2013/08/31 13:33:06 tom Exp $")
#ifdef USE_TERM_DRIVER
#define MaxColors InfoOf(sp).maxcolors
@@ -188,18 +188,7 @@ delscreen(SCREEN *sp)
FreeIfNeeded(sp->_acs_map);
FreeIfNeeded(sp->_screen_acs_map);
- /*
- * If the associated output stream has been closed, we can discard the
- * set-buffer. Limit the error check to EBADF, since fflush may fail
- * for other reasons than trying to operate upon a closed stream.
- */
- if (sp->_ofp != 0
- && sp->_setbuf != 0
- && fflush(sp->_ofp) != 0
- && errno == EBADF) {
- free(sp->_setbuf);
- }
-
+ NCURSES_SP_NAME(_nc_flush) (NCURSES_SP_ARG);
NCURSES_SP_NAME(del_curterm) (NCURSES_SP_ARGx sp->_term);
free(sp);
@@ -272,8 +261,8 @@ extract_fgbg(char *src, int *result)
}
#endif
-#define ReturnScreenError() _nc_set_screen(0); \
- returnCode(ERR)
+#define ReturnScreenError() { _nc_set_screen(0); \
+ returnCode(ERR); } while (0)
/* OS-independent screen initializations */
NCURSES_EXPORT(int)
@@ -284,7 +273,7 @@ NCURSES_SP_NAME(_nc_setupscreen) (
int slines,
int scolumns,
FILE *output,
- bool filtered,
+ int filtered,
int slk_format)
{
char *env;
@@ -383,7 +372,15 @@ NCURSES_SP_NAME(_nc_setupscreen) (
sp->_lines = (NCURSES_SIZE_T) slines;
sp->_lines_avail = (NCURSES_SIZE_T) slines;
sp->_columns = (NCURSES_SIZE_T) scolumns;
+
+ fflush(output);
+ sp->_ofd = output ? fileno(output) : -1;
sp->_ofp = output;
+ sp->out_limit = (size_t) ((2 + slines) * (6 + scolumns));
+ if ((sp->out_buffer = malloc(sp->out_limit)) == 0)
+ sp->out_limit = 0;
+ sp->out_inuse = 0;
+
SP_PRE_INIT(sp);
SetNoPadding(sp);
@@ -510,16 +507,7 @@ NCURSES_SP_NAME(_nc_setupscreen) (
if (magic_cookie_glitch > 0) { /* tvi, wyse */
- sp->_xmc_triggers = sp->_ok_attributes & (
- A_STANDOUT |
- A_UNDERLINE |
- A_REVERSE |
- A_BLINK |
- A_DIM |
- A_BOLD |
- A_INVIS |
- A_PROTECT
- );
+ sp->_xmc_triggers = sp->_ok_attributes & XMC_CONFLICT;
#if 0
/*
* We "should" treat colors as an attribute. The wyse350 (and its
@@ -584,9 +572,13 @@ NCURSES_SP_NAME(_nc_setupscreen) (
NCURSES_SP_NAME(_nc_init_acs) (NCURSES_SP_ARG);
#if USE_WIDEC_SUPPORT
+ sp->_screen_unicode = _nc_unicode_locale();
_nc_init_wacs();
+ if (_nc_wacs == 0) {
+ ReturnScreenError();
+ }
- sp->_screen_acs_fix = (_nc_unicode_locale()
+ sp->_screen_acs_fix = (sp->_screen_unicode
&& _nc_locale_breaks_acs(sp->_term));
#endif
env = _nc_get_locale();
@@ -619,6 +611,7 @@ NCURSES_SP_NAME(_nc_setupscreen) (
#endif
#if USE_SIZECHANGE
sp->_resize = NCURSES_SP_NAME(resizeterm);
+ sp->_ungetch = safe_ungetch;
#endif
NewScreen(sp)->_clear = TRUE;
@@ -695,7 +688,7 @@ NCURSES_EXPORT(int)
_nc_setupscreen(int slines GCC_UNUSED,
int scolumns GCC_UNUSED,
FILE *output,
- bool filtered,
+ int filtered,
int slk_format)
{
SCREEN *sp = 0;
@@ -759,6 +752,7 @@ NCURSES_SP_NAME(ripoffline) (NCURSES_SP_DCLx
int line,
int (*init) (WINDOW *, int))
{
+ START_TRACE();
return NCURSES_SP_NAME(_nc_ripoffline) (NCURSES_SP_ARGx
(line < 0) ? -1 : 1,
init);
diff --git a/ncurses/base/lib_slkatr_set.c b/ncurses/base/lib_slkatr_set.c
index bd5f539672a7..a3132e9ced1a 100644
--- a/ncurses/base/lib_slkatr_set.c
+++ b/ncurses/base/lib_slkatr_set.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2005,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 *
@@ -38,12 +38,12 @@
*/
#include <curses.priv.h>
-MODULE_ID("$Id: lib_slkatr_set.c,v 1.14 2009/10/24 22:47:03 tom Exp $")
+MODULE_ID("$Id: lib_slkatr_set.c,v 1.15 2014/02/01 22:10:42 tom Exp $")
NCURSES_EXPORT(int)
NCURSES_SP_NAME(slk_attr_set) (NCURSES_SP_DCLx
const attr_t attr,
- short color_pair_number,
+ NCURSES_PAIRS_T color_pair_number,
void *opts)
{
int code = ERR;
@@ -51,7 +51,7 @@ NCURSES_SP_NAME(slk_attr_set) (NCURSES_SP_DCLx
T((T_CALLED("slk_attr_set(%p,%s,%d)"),
(void *) SP_PARM,
_traceattr(attr),
- color_pair_number));
+ (int) color_pair_number));
if (SP_PARM != 0
&& SP_PARM->_slk != 0
@@ -71,7 +71,7 @@ NCURSES_SP_NAME(slk_attr_set) (NCURSES_SP_DCLx
#if NCURSES_SP_FUNCS
NCURSES_EXPORT(int)
-slk_attr_set(const attr_t attr, short color_pair_number, void *opts)
+slk_attr_set(const attr_t attr, NCURSES_COLOR_T color_pair_number, void *opts)
{
return NCURSES_SP_NAME(slk_attr_set) (CURRENT_SCREEN, attr,
color_pair_number, opts);
diff --git a/ncurses/base/lib_slkcolor.c b/ncurses/base/lib_slkcolor.c
index c1211bcb884a..2cf9e5d7f121 100644
--- a/ncurses/base/lib_slkcolor.c
+++ b/ncurses/base/lib_slkcolor.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2005,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 *
@@ -38,14 +38,14 @@
*/
#include <curses.priv.h>
-MODULE_ID("$Id: lib_slkcolor.c,v 1.16 2009/10/24 22:12:21 tom Exp $")
+MODULE_ID("$Id: lib_slkcolor.c,v 1.17 2014/02/01 22:10:42 tom Exp $")
NCURSES_EXPORT(int)
-NCURSES_SP_NAME(slk_color) (NCURSES_SP_DCLx short color_pair_number)
+NCURSES_SP_NAME(slk_color) (NCURSES_SP_DCLx NCURSES_PAIRS_T color_pair_number)
{
int code = ERR;
- T((T_CALLED("slk_color(%p,%d)"), (void *) SP_PARM, color_pair_number));
+ T((T_CALLED("slk_color(%p,%d)"), (void *) SP_PARM, (int) color_pair_number));
if (SP_PARM != 0
&& SP_PARM->_slk != 0
@@ -61,7 +61,7 @@ NCURSES_SP_NAME(slk_color) (NCURSES_SP_DCLx short color_pair_number)
#if NCURSES_SP_FUNCS
NCURSES_EXPORT(int)
-slk_color(short color_pair_number)
+slk_color(NCURSES_PAIRS_T color_pair_number)
{
return NCURSES_SP_NAME(slk_color) (CURRENT_SCREEN, color_pair_number);
}
diff --git a/ncurses/base/lib_slkrefr.c b/ncurses/base/lib_slkrefr.c
index b06bf8d7f802..6d9fcd63507c 100644
--- a/ncurses/base/lib_slkrefr.c
+++ b/ncurses/base/lib_slkrefr.c
@@ -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 *
@@ -43,7 +43,7 @@
#define CUR SP_TERMTYPE
#endif
-MODULE_ID("$Id: lib_slkrefr.c,v 1.26 2010/05/01 19:17:28 tom Exp $")
+MODULE_ID("$Id: lib_slkrefr.c,v 1.29 2013/01/12 17:25:48 tom Exp $")
#ifdef USE_TERM_DRIVER
#define NumLabels InfoOf(SP_PARM).numlabels
@@ -100,22 +100,22 @@ slk_intern_refresh(SCREEN *sp)
CallDriver_2(sp, hwlabel, i + 1, slk->ent[i].form_text);
#else
if (i < num_labels) {
- TPUTS_TRACE("plab_norm");
- putp(TPARM_2(plab_norm, i + 1, slk->ent[i].form_text));
+ NCURSES_PUTP2("plab_norm",
+ TPARM_2(plab_norm,
+ i + 1,
+ slk->ent[i].form_text));
}
#endif
} else {
if (fmt == 4)
slk_paint_info(slk->win);
wmove(slk->win, SLK_LINES(fmt) - 1, slk->ent[i].ent_x);
- if (sp->_slk) {
- (void) wattrset(slk->win, AttrOf(sp->_slk->attr));
- }
+ (void) wattrset(slk->win, (int) AttrOf(slk->attr));
waddstr(slk->win, slk->ent[i].form_text);
/* if we simulate SLK's, it's looking much more
natural to use the current ATTRIBUTE also
for the label window */
- (void) wattrset(slk->win, WINDOW_ATTRS(StdScreen(sp)));
+ (void) wattrset(slk->win, (int) WINDOW_ATTRS(StdScreen(sp)));
}
}
slk->ent[i].dirty = FALSE;
@@ -128,11 +128,9 @@ slk_intern_refresh(SCREEN *sp)
CallDriver_1(sp, hwlabelOnOff, slk->hidden ? FALSE : TRUE);
#else
if (slk->hidden) {
- TPUTS_TRACE("label_off");
- putp(label_off);
+ NCURSES_PUTP2("label_off", label_off);
} else {
- TPUTS_TRACE("label_on");
- putp(label_on);
+ NCURSES_PUTP2("label_on", label_on);
}
#endif
}
diff --git a/ncurses/base/lib_slkset.c b/ncurses/base/lib_slkset.c
index 91483f103b23..9091e001a91d 100644
--- a/ncurses/base/lib_slkset.c
+++ b/ncurses/base/lib_slkset.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2009,2010 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 *
@@ -44,13 +44,13 @@
#endif
#endif
-MODULE_ID("$Id: lib_slkset.c,v 1.21 2010/12/25 23:43:58 tom Exp $")
+MODULE_ID("$Id: lib_slkset.c,v 1.24 2012/12/08 23:09:25 tom Exp $")
NCURSES_EXPORT(int)
NCURSES_SP_NAME(slk_set) (NCURSES_SP_DCLx int i, const char *astr, int format)
{
SLK *slk;
- int offset;
+ int offset = 0;
int numchrs;
int numcols;
int limit;
@@ -111,13 +111,12 @@ NCURSES_SP_NAME(slk_set) (NCURSES_SP_DCLx int i, const char *astr, int format)
slk->ent[i].ent_text[numchrs] = '\0';
if ((slk->ent[i].form_text = (char *) _nc_doalloc(slk->ent[i].form_text,
- (unsigned) (limit +
- numchrs + 1))
+ (size_t) (limit +
+ numchrs + 1))
) == 0)
returnCode(ERR);
switch (format) {
- default:
case 0: /* left-justified */
offset = 0;
break;
@@ -131,16 +130,16 @@ NCURSES_SP_NAME(slk_set) (NCURSES_SP_DCLx int i, const char *astr, int format)
if (offset <= 0)
offset = 0;
else
- memset(slk->ent[i].form_text, ' ', (unsigned) offset);
+ memset(slk->ent[i].form_text, ' ', (size_t) offset);
memcpy(slk->ent[i].form_text + offset,
slk->ent[i].ent_text,
- (unsigned) numchrs);
+ (size_t) numchrs);
if (offset < limit) {
memset(slk->ent[i].form_text + offset + numchrs,
' ',
- (unsigned) (limit - (offset + numcols)));
+ (size_t) (limit - (offset + numcols)));
}
slk->ent[i].form_text[numchrs - numcols + limit] = 0;
diff --git a/ncurses/base/lib_touch.c b/ncurses/base/lib_touch.c
index 8023c7058027..20ac9450f15f 100644
--- a/ncurses/base/lib_touch.c
+++ b/ncurses/base/lib_touch.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-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 *
@@ -43,7 +43,7 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_touch.c,v 1.11 2010/12/19 01:22:58 tom Exp $")
+MODULE_ID("$Id: lib_touch.c,v 1.12 2012/06/09 20:29:33 tom Exp $")
NCURSES_EXPORT(bool)
is_linetouched(WINDOW *win, int line)
@@ -84,7 +84,7 @@ wtouchln(WINDOW *win, int y, int n, int changed)
for (i = y; i < y + n; i++) {
if (i > win->_maxy)
break;
- win->_line[i].firstchar = changed ? 0 : _NOCHANGE;
+ win->_line[i].firstchar = (NCURSES_SIZE_T) (changed ? 0 : _NOCHANGE);
win->_line[i].lastchar = (NCURSES_SIZE_T) (changed
? win->_maxx
: _NOCHANGE);
diff --git a/ncurses/base/lib_ungetch.c b/ncurses/base/lib_ungetch.c
index 63a14cff7594..4ee9119e5c16 100644
--- a/ncurses/base/lib_ungetch.c
+++ b/ncurses/base/lib_ungetch.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2008,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 *
@@ -42,7 +42,7 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_ungetch.c,v 1.14 2009/10/24 22:12:21 tom Exp $")
+MODULE_ID("$Id: lib_ungetch.c,v 1.16 2012/08/04 17:38:53 tom Exp $")
#include <fifo_defs.h>
@@ -64,13 +64,14 @@ safe_ungetch(SCREEN *sp, int ch)
T((T_CALLED("ungetch(%p,%s)"), (void *) sp, _nc_tracechar(sp, ch)));
- if (tail != -1) {
- if (head == -1) {
+ if (sp != 0 && tail >= 0) {
+ if (head < 0) {
head = 0;
t_inc();
peek = tail; /* no raw keys */
- } else
+ } else {
h_dec();
+ }
sp->_fifo[head] = ch;
T(("ungetch %s ok", _nc_tracechar(sp, ch)));
diff --git a/ncurses/base/resizeterm.c b/ncurses/base/resizeterm.c
index 3f1d36e89d7a..03d52a448b09 100644
--- a/ncurses/base/resizeterm.c
+++ b/ncurses/base/resizeterm.c
@@ -45,7 +45,7 @@
#define CUR SP_TERMTYPE
#endif
-MODULE_ID("$Id: resizeterm.c,v 1.43 2011/01/10 01:34:49 tom Exp $")
+MODULE_ID("$Id: resizeterm.c,v 1.45 2012/07/07 17:07:23 tom Exp $")
/*
* If we're trying to be reentrant, do not want any local statics.
@@ -365,58 +365,71 @@ NCURSES_SP_NAME(resize_term) (NCURSES_SP_DCLx int ToLines, int ToCols)
}
#endif
if (ToLines > screen_lines(SP_PARM)) {
- increase_size(NCURSES_SP_ARGx
- myLines = ToLines, myCols, was_stolen EXTRA_ARGS);
+ result = increase_size(NCURSES_SP_ARGx
+ myLines = ToLines,
+ myCols,
+ was_stolen EXTRA_ARGS);
CurLines = myLines;
CurCols = myCols;
}
- if (ToCols > screen_columns(SP_PARM)) {
- increase_size(NCURSES_SP_ARGx
- myLines, myCols = ToCols, was_stolen EXTRA_ARGS);
+ if ((result == OK)
+ && (ToCols > screen_columns(SP_PARM))) {
+ result = increase_size(NCURSES_SP_ARGx
+ myLines,
+ myCols = ToCols,
+ was_stolen EXTRA_ARGS);
CurLines = myLines;
CurCols = myCols;
}
- if (ToLines < myLines ||
- ToCols < myCols) {
- decrease_size(NCURSES_SP_ARGx ToLines, ToCols, was_stolen EXTRA_ARGS);
+ if ((result == OK)
+ && (ToLines < myLines ||
+ ToCols < myCols)) {
+ result = decrease_size(NCURSES_SP_ARGx
+ ToLines,
+ ToCols,
+ was_stolen EXTRA_ARGS);
}
- screen_lines(SP_PARM) = (NCURSES_SIZE_T) ToLines;
- screen_columns(SP_PARM) = (NCURSES_SIZE_T) ToCols;
+ if (result == OK) {
+ screen_lines(SP_PARM) = (NCURSES_SIZE_T) ToLines;
+ screen_columns(SP_PARM) = (NCURSES_SIZE_T) ToCols;
#ifdef USE_TERM_DRIVER
- CallDriver_2(SP_PARM, setsize, ToLines, ToCols);
+ CallDriver_2(SP_PARM, setsize, ToLines, ToCols);
#else
- lines = (NCURSES_SIZE_T) ToLines;
- columns = (NCURSES_SIZE_T) ToCols;
+ lines = (NCURSES_SIZE_T) ToLines;
+ columns = (NCURSES_SIZE_T) ToCols;
#endif
- SP_PARM->_lines_avail = (NCURSES_SIZE_T) (ToLines - was_stolen);
+ SP_PARM->_lines_avail = (NCURSES_SIZE_T) (ToLines - was_stolen);
- if (SP_PARM->oldhash) {
- FreeAndNull(SP_PARM->oldhash);
- }
- if (SP_PARM->newhash) {
- FreeAndNull(SP_PARM->newhash);
- }
+ if (SP_PARM->oldhash) {
+ FreeAndNull(SP_PARM->oldhash);
+ }
+ if (SP_PARM->newhash) {
+ FreeAndNull(SP_PARM->newhash);
+ }
#ifdef TRACE
- if (USE_TRACEF(TRACE_UPDATE)) {
- SET_LINES(ToLines - was_stolen);
- SET_COLS(ToCols);
- show_window_sizes("after");
- _nc_unlock_global(tracef);
- }
+ if (USE_TRACEF(TRACE_UPDATE)) {
+ SET_LINES(ToLines - was_stolen);
+ SET_COLS(ToCols);
+ show_window_sizes("after");
+ _nc_unlock_global(tracef);
+ }
#endif
+ }
}
- /*
- * Always update LINES, to allow for call from lib_doupdate.c which
- * needs to have the count adjusted by the stolen (ripped off) lines.
- */
- SET_LINES(ToLines - was_stolen);
- SET_COLS(ToCols);
+ if (result == OK) {
+ /*
+ * Always update LINES, to allow for call from lib_doupdate.c which
+ * needs to have the count adjusted by the stolen (ripped off) lines.
+ */
+ SET_LINES(ToLines - was_stolen);
+ SET_COLS(ToCols);
+ }
_nc_nonsp_unlock_global(curses);
@@ -471,7 +484,6 @@ NCURSES_SP_NAME(resizeterm) (NCURSES_SP_DCLx int ToLines, int ToCols)
result = NCURSES_SP_NAME(resize_term) (NCURSES_SP_ARGx ToLines, ToCols);
#if USE_SIGWINCH
- safe_ungetch(SP_PARM, KEY_RESIZE); /* so application can know this */
clearok(CurScreen(SP_PARM), TRUE); /* screen contents are unknown */
/* ripped-off lines are a special case: if we did not lengthen
@@ -501,6 +513,9 @@ NCURSES_SP_NAME(resizeterm) (NCURSES_SP_DCLx int ToLines, int ToCols)
}
#endif
}
+#if USE_SIGWINCH
+ safe_ungetch(SP_PARM, KEY_RESIZE); /* so application can know this */
+#endif
}
returnCode(result);
diff --git a/ncurses/base/safe_sprintf.c b/ncurses/base/safe_sprintf.c
index e73307bac282..34abd2f8cf47 100644
--- a/ncurses/base/safe_sprintf.c
+++ b/ncurses/base/safe_sprintf.c
@@ -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 *
@@ -27,13 +27,13 @@
****************************************************************************/
/****************************************************************************
- * Author: Thomas E. Dickey <dickey@clark.net> 1997 *
+ * Author: Thomas E. Dickey 1997-on *
****************************************************************************/
#include <curses.priv.h>
#include <ctype.h>
-MODULE_ID("$Id: safe_sprintf.c,v 1.24 2010/06/05 22:22:27 tom Exp $")
+MODULE_ID("$Id: safe_sprintf.c,v 1.27 2013/01/20 01:04:32 tom Exp $")
#if USE_SAFE_SPRINTF
@@ -109,12 +109,16 @@ _nc_printf_length(const char *fmt, va_list ap)
} else if (state == Prec) {
prec = ival;
}
- sprintf(fmt_arg, "%d", ival);
+ _nc_SPRINTF(fmt_arg,
+ _nc_SLIMIT(sizeof(fmt_arg))
+ "%d", ival);
fmt_len += strlen(fmt_arg);
if ((format = _nc_doalloc(format, fmt_len)) == 0) {
+ free(buffer);
return -1;
}
- strcpy(&format[--f], fmt_arg);
+ --f;
+ _nc_STRCPY(&format[f], fmt_arg, fmt_len - f);
f = strlen(format);
} else if (isalpha(UChar(*fmt))) {
done = TRUE;
@@ -185,13 +189,13 @@ _nc_printf_length(const char *fmt, va_list ap)
format[f] = '\0';
switch (used) {
case 'i':
- sprintf(buffer, format, ival);
+ _nc_SPRINTF(buffer, _nc_SLIMIT(length) format, ival);
break;
case 'f':
- sprintf(buffer, format, fval);
+ _nc_SPRINTF(buffer, _nc_SLIMIT(length) format, fval);
break;
default:
- sprintf(buffer, format, pval);
+ _nc_SPRINTF(buffer, _nc_SLIMIT(length) format, pval);
break;
}
len += (int) strlen(buffer);
diff --git a/ncurses/base/vsscanf.c b/ncurses/base/vsscanf.c
index e6253c3a38a3..38c7926e6df2 100644
--- a/ncurses/base/vsscanf.c
+++ b/ncurses/base/vsscanf.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2004,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 *
@@ -38,7 +38,7 @@
#if !HAVE_VSSCANF
-MODULE_ID("$Id: vsscanf.c,v 1.18 2004/04/03 20:27:02 tom Exp $")
+MODULE_ID("$Id: vsscanf.c,v 1.20 2012/02/22 22:26:58 tom Exp $")
#if !(HAVE_VFSCANF || HAVE__DOSCAN)
@@ -293,12 +293,12 @@ vsscanf(const char *str, const char *format, va_list ap)
/* add %n, if the format was not that */
if (chunk != cAssigned) {
- strcat(my_fmt, "%n");
+ _nc_STRCAT(my_fmt, "%n", len_fmt);
}
switch (chunk) {
case cAssigned:
- strcat(my_fmt, "%n");
+ _nc_STRCAT(my_fmt, "%n", len_fmt);
pointer = &eaten;
break;
case cInt:
diff --git a/ncurses/base/wresize.c b/ncurses/base/wresize.c
index 9a6ea500727e..bc6b5732ea41 100644
--- a/ncurses/base/wresize.c
+++ b/ncurses/base/wresize.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2009,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 *
@@ -33,7 +33,7 @@
#include <curses.priv.h>
-MODULE_ID("$Id: wresize.c,v 1.34 2010/06/05 22:36:26 tom Exp $")
+MODULE_ID("$Id: wresize.c,v 1.35 2011/05/21 18:55:07 tom Exp $")
static int
cleanup_lines(struct ldat *data, int length)
@@ -175,9 +175,10 @@ wresize(WINDOW *win, int ToLines, int ToCols)
for (col = 0; col <= ToCols; ++col)
s[col] = win->_nc_bkgd;
}
- } else {
- assert(pline != 0);
+ } else if (pline != 0 && pline[win->_pary + row].text != 0) {
s = &pline[win->_pary + row].text[win->_parx];
+ } else {
+ s = 0;
}
if_USE_SCROLL_HINTS(new_lines[row].oldindex = row);
diff --git a/ncurses/build.priv.h b/ncurses/build.priv.h
index be00d73ea430..096a4431bc1e 100644
--- a/ncurses/build.priv.h
+++ b/ncurses/build.priv.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2010 Free Software Foundation, Inc. *
+ * Copyright (c) 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,9 +30,8 @@
* Author: Thomas E. Dickey 2010 *
****************************************************************************/
-
/*
- * $Id: build.priv.h,v 1.6 2010/05/22 20:30:35 tom Exp $
+ * $Id: build.priv.h,v 1.9 2012/02/22 22:17:02 tom Exp $
*
* build.priv.h
*
@@ -83,6 +82,7 @@ extern "C" {
#define SIZEOF(v) (sizeof(v) / sizeof(v[0]))
#include <nc_alloc.h>
+#include <nc_string.h>
/* declare these, to avoid needing term.h */
#if BROKEN_LINKER || USE_REENTRANT
diff --git a/ncurses/curses.priv.h b/ncurses/curses.priv.h
index 49346c122a70..7deffad5ea68 100644
--- a/ncurses/curses.priv.h
+++ b/ncurses/curses.priv.h
@@ -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 *
@@ -34,7 +34,7 @@
****************************************************************************/
/*
- * $Id: curses.priv.h,v 1.475 2011/01/22 21:10:19 tom Exp $
+ * $Id: curses.priv.h,v 1.530 2014/02/01 22:09:27 tom Exp $
*
* curses.priv.h
*
@@ -65,6 +65,7 @@ extern "C" {
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
+#include <sys/stat.h>
#if HAVE_UNISTD_H
#include <unistd.h>
@@ -85,6 +86,12 @@ extern "C" {
#include <errno.h>
+#if defined __hpux
+# ifndef EILSEQ
+# define EILSEQ 47
+# endif
+#endif
+
#ifndef PATH_MAX
# if defined(_POSIX_PATH_MAX)
# define PATH_MAX _POSIX_PATH_MAX
@@ -111,6 +118,14 @@ extern int errno;
#define USE_FUNC_POLL 0
#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+# include <stdint.h>
+# endif
+#endif
+
/* include signal.h before curses.h to work-around defect in glibc 2.1.3 */
#include <signal.h>
@@ -135,6 +150,15 @@ extern int errno;
#define USE_EMX_MOUSE 0
#endif
+/* kLIBC keyboard/mouse support */
+#if defined(__OS2__) && defined(__KLIBC__)
+#define USE_KLIBC_KBD 1
+#define USE_KLIBC_MOUSE 1
+#else
+#define USE_KLIBC_KBD 0
+#define USE_KLIBC_MOUSE 0
+#endif
+
#define DEFAULT_MAXCLICK 166
#define EV_MAX 8 /* size of mouse circular event queue */
@@ -192,6 +216,18 @@ extern NCURSES_EXPORT(void *) _nc_memmove (void *, const void *, size_t);
#endif
/*
+ * Either/both S_ISxxx and/or S_IFxxx are defined in sys/types.h; some systems
+ * lack one or the other.
+ */
+#ifndef S_ISDIR
+#define S_ISDIR(mode) ((mode & S_IFMT) == S_IFDIR)
+#endif
+
+#ifndef S_ISREG
+#define S_ISREG(mode) ((mode & S_IFMT) == S_IFREG)
+#endif
+
+/*
* Scroll hints are useless when hashmap is used
*/
#if !USE_SCROLL_HINTS
@@ -208,6 +244,8 @@ extern NCURSES_EXPORT(void *) _nc_memmove (void *, const void *, size_t);
#define if_USE_SCROLL_HINTS(stmt) /*nothing*/
#endif
+#include <nc_string.h>
+
/*
* Options for terminal drivers, etc...
*/
@@ -250,14 +288,6 @@ typedef TRIES {
* Structure for palette tables
*/
-typedef struct
-{
- short red, green, blue; /* what color_content() returns */
- short r, g, b; /* params to init_color() */
- int init; /* true if we called init_color() */
-}
-color_t;
-
#define MAXCOLUMNS 135
#define MAXLINES 66
#define FIFO_SIZE MAXCOLUMNS+2 /* for nocbreak mode input */
@@ -282,6 +312,14 @@ color_t;
#include <curses.h> /* we'll use -Ipath directive to get the right one! */
+typedef struct
+{
+ NCURSES_COLOR_T red, green, blue; /* what color_content() returns */
+ NCURSES_COLOR_T r, g, b; /* params to init_color() */
+ int init; /* true if we called init_color() */
+}
+color_t;
+
/*
* If curses.h did not expose the SCREEN-functions, then we do not need the
* parameter in the corresponding unextended functions.
@@ -312,7 +350,7 @@ color_t;
#define HasTerminal(sp) (((sp) != 0) && (0 != ((sp)->_term)))
#define IsValidScreen(sp) (HasTerminal(sp) && !IsPreScreen(sp))
-#if BROKEN_LINKER || USE_REENTRANT
+#if USE_REENTRANT
#define CurTerm _nc_prescreen._cur_term
#else
#define CurTerm cur_term
@@ -325,6 +363,7 @@ color_t;
#endif
#include <term.h>
+#include <nc_termios.h>
/*
* Reduce dependency on cur_term global by using terminfo data from SCREEN's
@@ -341,6 +380,16 @@ color_t;
#include <nc_tparm.h>
/*
+ * Simplify ifdef's for the "*_ATTR" macros in case italics are not configured.
+ */
+#ifdef A_ITALIC
+#define USE_ITALIC 1
+#else
+#define USE_ITALIC 0
+#define A_ITALIC 0
+#endif
+
+/*
* Use these macros internally, to make tracing less verbose. But leave the
* option for compiling the tracing into the library.
*/
@@ -365,7 +414,7 @@ color_t;
#define if_EXT_COLORS(stmt) stmt
#define SetPair(value,p) SetPair2((value).ext_color, AttrOf(value), p)
#define SetPair2(c,a,p) c = (p), \
- a = (unColor2(a) | (A_COLOR & ColorPair(oldColor(c))))
+ a = (unColor2(a) | (A_COLOR & (unsigned) ColorPair(oldColor(c))))
#define GetPair(value) GetPair2((value).ext_color, AttrOf(value))
#define GetPair2(c,a) ((c) ? (c) : PairNumber(a))
#define oldColor(p) (((p) > 255) ? 255 : (p))
@@ -373,11 +422,7 @@ color_t;
#define SET_WINDOW_PAIR(w,p) (w)->_color = (p)
#define SameAttrOf(a,b) (AttrOf(a) == AttrOf(b) && GetPair(a) == GetPair(b))
-#if NCURSES_SP_FUNCS
-#define VIDATTR(sp,attr,pair) NCURSES_SP_NAME(vid_attr)(sp, attr, pair, 0)
-#else
-#define VIDATTR(sp,attr,pair) vid_attr(attr, pair, 0)
-#endif
+#define VIDATTR(sp,attr,pair) NCURSES_SP_NAME(vid_puts)(NCURSES_SP_ARGx attr, (short) pair, 0, NCURSES_OUTC_FUNC)
#else /* !NCURSES_EXT_COLORS */
@@ -390,14 +435,14 @@ color_t;
WINDOW_ATTRS(w) |= (A_COLOR & (attr_t) ColorPair(p))
#define SameAttrOf(a,b) (AttrOf(a) == AttrOf(b))
-#if NCURSES_SP_FUNCS
-#define VIDATTR(sp,attr,pair) NCURSES_SP_NAME(vidattr)(sp, attr)
-#else
-#define VIDATTR(sp,attr,pair) vidattr(attr)
-#endif
+#define VIDATTR(sp,attr,pair) NCURSES_SP_NAME(vidputs)(NCURSES_SP_ARGx attr, NCURSES_OUTC_FUNC)
#endif /* NCURSES_EXT_COLORS */
+#define NCURSES_OUTC_FUNC NCURSES_SP_NAME(_nc_outch)
+#define NCURSES_PUTP2(name,value) NCURSES_SP_NAME(_nc_putp)(NCURSES_SP_ARGx name, value)
+#define NCURSES_PUTP2_FLUSH(name,value) NCURSES_SP_NAME(_nc_putp_flush)(NCURSES_SP_ARGx name, value)
+
#if NCURSES_NO_PADDING
#define GetNoPadding(sp) ((sp) ? (sp)->_no_padding : _nc_prescreen._no_padding)
#define SetNoPadding(sp) _nc_set_no_padding(sp)
@@ -467,6 +512,9 @@ NCURSES_EXPORT(int *) _nc_ptr_Escdelay (SCREEN *);
# endif
# define _declare(name) __extension__ extern __typeof__(name) name
# define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
+#else
+# undef USE_WEAK_SYMBOLS
+# define USE_WEAK_SYMBOLS 0
#endif
#endif
@@ -665,6 +713,9 @@ typedef struct {
#if USE_GPM_SUPPORT
#undef buttons /* term.h defines this, and gpm uses it! */
#include <gpm.h>
+#if USE_WEAK_SYMBOLS
+weak_symbol(Gpm_Wgetch);
+#endif
#ifdef HAVE_LIBDL
/* link dynamically to GPM */
@@ -766,17 +817,23 @@ struct DriverTCB; /* Terminal Control Block forward declaration */
#define INIT_TERM_DRIVER() /* nothing */
#endif
+typedef struct {
+ const char *name;
+ char *value;
+} ITERATOR_VARS;
+
/*
* Global data which is not specific to a screen.
*/
typedef struct {
+ SIG_ATOMIC_T have_sigtstp;
SIG_ATOMIC_T have_sigwinch;
SIG_ATOMIC_T cleanup_nested;
bool init_signals;
bool init_screen;
- const char *comp_sourcename;
+ char *comp_sourcename;
char *comp_termtype;
bool have_tic_directory;
@@ -788,6 +845,7 @@ typedef struct {
char *first_name;
char **keyname_table;
+ int init_keyname;
int slk_format;
@@ -798,6 +856,12 @@ typedef struct {
int tgetent_index;
long tgetent_sequence;
+ char *dbd_blob; /* string-heap for dbd_list[] */
+ char **dbd_list; /* distinct places to look for data */
+ int dbd_size; /* length of dbd_list[] */
+ time_t dbd_time; /* cache last updated */
+ ITERATOR_VARS dbd_vars[dbdLAST];
+
#ifndef USE_SP_WINDOWLIST
WINDOWLIST *_nc_windowlist;
#define WindowList(sp) _nc_globals._nc_windowlist
@@ -891,6 +955,7 @@ typedef struct {
const char *_tputs_trace;
#endif
#endif
+ bool use_tioctl;
} NCURSES_PRESCREEN;
/*
@@ -911,11 +976,13 @@ extern NCURSES_EXPORT_VAR(NCURSES_PRESCREEN) _nc_prescreen;
*/
struct screen {
- int _ifd; /* input file ptr for screen */
+ int _ifd; /* input file descriptor for screen */
+ int _ofd; /* output file descriptor for screen */
FILE *_ofp; /* output file ptr for screen */
- char *_setbuf; /* buffered I/O for output */
+ char *out_buffer; /* output buffer */
+ size_t out_limit; /* output buffer size */
+ size_t out_inuse; /* output buffer current use */
bool _filtered; /* filter() was called */
- bool _buffered; /* setvbuf uses _setbuf data */
bool _prescreen; /* is in prescreen phase */
bool _use_env; /* LINES & COLS from environment? */
int _checkfd; /* filedesc for typeahead check */
@@ -1015,6 +1082,7 @@ struct screen {
int _pair_count; /* count of color pairs */
int _pair_limit; /* actual limit of color-pairs */
#if NCURSES_EXT_FUNCS
+ bool _assumed_color; /* use assumed colors */
bool _default_color; /* use default colors */
bool _has_sgr_39_49; /* has ECMA default color support */
int _default_fg; /* assumed default foreground */
@@ -1031,6 +1099,13 @@ struct screen {
/* used in lib_vidattr.c */
bool _use_rmso; /* true if we may use 'rmso' */
bool _use_rmul; /* true if we may use 'rmul' */
+#if USE_ITALIC
+ bool _use_ritm; /* true if we may use 'ritm' */
+#endif
+
+#if USE_KLIBC_KBD
+ bool _extended_key; /* true if an extended key */
+#endif
/*
* These data correspond to the state of the idcok() and idlok()
@@ -1055,7 +1130,9 @@ struct screen {
void (*_mouse_wrap) (SCREEN *);
int _mouse_fd; /* file-descriptor, if any */
bool _mouse_active; /* true if initialized */
- mmask_t _mouse_mask;
+ mmask_t _mouse_mask; /* set via mousemask() */
+ mmask_t _mouse_mask2; /* OR's in press/release bits */
+ mmask_t _mouse_bstate;
NCURSES_CONST char *_mouse_xtermcap; /* string to enable/disable mouse */
MEVENT _mouse_events[EV_MAX]; /* hold the last mouse event seen */
MEVENT *_mouse_eventp; /* next free slot in event queue */
@@ -1102,6 +1179,7 @@ struct screen {
*/
#if USE_SIZECHANGE
int (*_resize)(NCURSES_SP_DCLx int y, int x);
+ int (*_ungetch)(SCREEN *, int);
#endif
/*
@@ -1120,7 +1198,6 @@ struct screen {
int *_oldnum_list;
int _oldnum_size;
- bool _cleanup; /* cleanup after int/quit signal */
NCURSES_SP_OUTC _outch; /* output handler if not putc */
int _legacy_coding; /* see use_legacy_coding() */
@@ -1158,7 +1235,10 @@ struct screen {
* UTF-8, but do not permit ACS at the same time (see tty_update.c).
*/
bool _screen_acs_fix;
+ bool _screen_unicode;
#endif
+
+ bool _use_tioctl;
};
extern NCURSES_EXPORT_VAR(SCREEN *) _nc_screen_chain;
@@ -1168,7 +1248,7 @@ extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T) _nc_have_sigwinch;
WINDOWLIST *next;
SCREEN *screen; /* screen containing the window */
WINDOW win; /* WINDOW_EXT() needs to account for offset */
-#ifdef NCURSES_WIDECHAR
+#if NCURSES_WIDECHAR
char addch_work[(MB_LEN_MAX * 9) + 1];
unsigned addch_used; /* number of bytes in addch_work[] */
int addch_x; /* x-position for addch_work[] */
@@ -1189,7 +1269,7 @@ extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T) _nc_have_sigwinch;
sp->_endwin = TRUE; \
sp->_cursor = -1; \
WindowList(sp) = 0; \
- sp->_outch = NCURSES_SP_NAME(_nc_outch); \
+ sp->_outch = NCURSES_OUTC_FUNC; \
sp->jump = 0 \
/* usually in <limits.h> */
@@ -1267,8 +1347,8 @@ extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T) _nc_have_sigwinch;
#define UChar(c) ((unsigned char)(c))
#define UShort(c) ((unsigned short)(c))
-#define ChCharOf(c) ((c) & (chtype)A_CHARTEXT)
-#define ChAttrOf(c) ((c) & (chtype)A_ATTRIBUTES)
+#define ChCharOf(c) ((chtype)(c) & (chtype)A_CHARTEXT)
+#define ChAttrOf(c) ((chtype)(c) & (chtype)A_ATTRIBUTES)
#ifndef MB_LEN_MAX
#define MB_LEN_MAX 8 /* should be >= MB_CUR_MAX, but that may be a function */
@@ -1322,9 +1402,9 @@ extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T) _nc_have_sigwinch;
#define PUTC_DATA char PUTC_buf[MB_LEN_MAX]; int PUTC_i, PUTC_n; \
mbstate_t PUT_st; wchar_t PUTC_ch
#define PUTC_INIT init_mb (PUT_st)
-#define PUTC(ch,b) do { if(!isWidecExt(ch)) { \
+#define PUTC(ch) do { if(!isWidecExt(ch)) { \
if (Charable(ch)) { \
- fputc(CharOf(ch), b); \
+ NCURSES_OUTC_FUNC (NCURSES_SP_ARGx CharOf(ch)); \
COUNT_OUTCHARS(1); \
} else { \
PUTC_INIT; \
@@ -1336,10 +1416,14 @@ extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T) _nc_have_sigwinch;
(ch).chars[PUTC_i], &PUT_st); \
if (PUTC_n <= 0) { \
if (PUTC_ch && is8bits(PUTC_ch) && PUTC_i == 0) \
- putc(PUTC_ch,b); \
+ NCURSES_OUTC_FUNC (NCURSES_SP_ARGx CharOf(ch)); \
break; \
+ } else { \
+ int PUTC_j; \
+ for (PUTC_j = 0; PUTC_j < PUTC_n; ++PUTC_j) { \
+ NCURSES_OUTC_FUNC (NCURSES_SP_ARGx PUTC_buf[PUTC_j]); \
+ } \
} \
- IGNORE_RC(fwrite(PUTC_buf, (unsigned) PUTC_n, 1, b)); \
} \
COUNT_OUTCHARS(PUTC_i); \
} } } while (0)
@@ -1362,7 +1446,7 @@ extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T) _nc_have_sigwinch;
AttrOf(dst) |= (attr_t) (ext + 1)
#define if_WIDEC(code) code
-#define Charable(ch) ((SP_PARM != 0 && SP_PARM->_legacy_coding) \
+#define Charable(ch) ((SP_PARM->_legacy_coding) \
|| (AttrOf(ch) & A_ALTCHARSET) \
|| (!isWidecExt(ch) && \
(ch).chars[1] == L'\0' && \
@@ -1383,8 +1467,8 @@ extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T) _nc_have_sigwinch;
#define CHDEREF(wch) wch
#define ARG_CH_T NCURSES_CH_T
#define CARG_CH_T NCURSES_CH_T
-#define PUTC_DATA int data = 0
-#define PUTC(ch,b) do { data = CharOf(ch); putc(data,b); } while (0)
+#define PUTC_DATA /* nothing */
+#define PUTC(ch) NCURSES_OUTC_FUNC (NCURSES_SP_ARGx (int) ch)
#define BLANK (' '|A_NORMAL)
#define ZEROS ('\0'|A_NORMAL)
@@ -1412,25 +1496,25 @@ extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T) _nc_have_sigwinch;
#define CHANGED_CELL(line,col) \
if (line->firstchar == _NOCHANGE) \
- line->firstchar = line->lastchar = (NCURSES_SIZE_T) col; \
+ line->firstchar = line->lastchar = (NCURSES_SIZE_T) (col); \
else if ((col) < line->firstchar) \
- line->firstchar = (NCURSES_SIZE_T) col; \
+ line->firstchar = (NCURSES_SIZE_T) (col); \
else if ((col) > line->lastchar) \
- line->lastchar = (NCURSES_SIZE_T) col
+ line->lastchar = (NCURSES_SIZE_T) (col)
#define CHANGED_RANGE(line,start,end) \
if (line->firstchar == _NOCHANGE \
|| line->firstchar > (start)) \
- line->firstchar = (NCURSES_SIZE_T) start; \
+ line->firstchar = (NCURSES_SIZE_T) (start); \
if (line->lastchar == _NOCHANGE \
|| line->lastchar < (end)) \
- line->lastchar = (NCURSES_SIZE_T) end
+ line->lastchar = (NCURSES_SIZE_T) (end)
#define CHANGED_TO_EOL(line,start,end) \
if (line->firstchar == _NOCHANGE \
|| line->firstchar > (start)) \
- line->firstchar = (NCURSES_SIZE_T) start; \
- line->lastchar = (NCURSES_SIZE_T) end
+ line->firstchar = (NCURSES_SIZE_T) (start); \
+ line->lastchar = (NCURSES_SIZE_T) (end)
#define SIZEOF(v) (sizeof(v)/sizeof(v[0]))
@@ -1444,6 +1528,20 @@ extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T) _nc_have_sigwinch;
#include <nc_alloc.h>
/*
+ * Use these for tic/infocmp malloc failures. Generally the ncurses library
+ * tries to limp along after a failure.
+ */
+#define TYPE_MALLOC(type, size, name) \
+ name = typeMalloc(type, size); \
+ if (name == 0) \
+ _nc_err_abort(MSG_NO_MEMORY)
+
+#define TYPE_REALLOC(type, size, name) \
+ name = typeRealloc(type, size, name); \
+ if (name == 0) \
+ _nc_err_abort(MSG_NO_MEMORY)
+
+/*
* TTY bit definition for converting tabs to spaces.
*/
#ifdef TAB3
@@ -1528,7 +1626,7 @@ extern NCURSES_EXPORT(void) _nc_locked_tracef (const char *, ...) GCC_PRINTFLIKE
#define returnVoidPtr(code) TRACE_RETURN(code,void_ptr)
#define returnWin(code) TRACE_RETURN(code,win)
-extern NCURSES_EXPORT(NCURSES_BOOL) _nc_retrace_bool (NCURSES_BOOL);
+extern NCURSES_EXPORT(NCURSES_BOOL) _nc_retrace_bool (int);
extern NCURSES_EXPORT(NCURSES_CONST void *) _nc_retrace_cvoid_ptr (NCURSES_CONST void *);
extern NCURSES_EXPORT(SCREEN *) _nc_retrace_sp (SCREEN *);
extern NCURSES_EXPORT(WINDOW *) _nc_retrace_win (WINDOW *);
@@ -1539,7 +1637,7 @@ extern NCURSES_EXPORT(char *) _nc_varargs (const char *, va_list);
extern NCURSES_EXPORT(chtype) _nc_retrace_chtype (chtype);
extern NCURSES_EXPORT(const char *) _nc_altcharset_name(attr_t, chtype);
extern NCURSES_EXPORT(const char *) _nc_retrace_cptr (const char *);
-extern NCURSES_EXPORT(char) _nc_retrace_char (char);
+extern NCURSES_EXPORT(char) _nc_retrace_char (int);
extern NCURSES_EXPORT(int) _nc_retrace_int (int);
extern NCURSES_EXPORT(int) _nc_retrace_int_attr_t (attr_t);
extern NCURSES_EXPORT(mmask_t) _nc_retrace_mmask_t (SCREEN *, mmask_t);
@@ -1619,7 +1717,9 @@ extern NCURSES_EXPORT(void) name (void); \
NCURSES_EXPORT(void) name (void) { }
#define ALL_BUT_COLOR ((chtype)~(A_COLOR))
-#define NONBLANK_ATTR (A_NORMAL|A_BOLD|A_DIM|A_BLINK)
+#define NONBLANK_ATTR (A_BOLD | A_DIM | A_BLINK | A_ITALIC)
+#define TPARM_ATTR (A_STANDOUT | A_UNDERLINE | A_REVERSE | A_BLINK | A_DIM | A_BOLD | A_ALTCHARSET | A_INVIS | A_PROTECT)
+#define XMC_CONFLICT (A_STANDOUT | A_UNDERLINE | A_REVERSE | A_BLINK | A_DIM | A_BOLD | A_INVIS | A_PROTECT | A_ITALIC)
#define XMC_CHANGES(c) ((c) & SP_PARM->_xmc_suppress)
#define toggle_attr_on(S,at) {\
@@ -1795,6 +1895,8 @@ extern NCURSES_EXPORT(int) _nc_insert_ch(SCREEN *, WINDOW *, chtype);
/* lib_mvcur.c */
#define INFINITY 1000000 /* cost: too high to use */
+extern NCURSES_EXPORT(int) _nc_mvcur(int yold, int xold, int ynew, int xnew);
+
extern NCURSES_EXPORT(void) _nc_mvcur_init (void);
extern NCURSES_EXPORT(void) _nc_mvcur_resume (void);
extern NCURSES_EXPORT(void) _nc_mvcur_wrap (void);
@@ -1816,12 +1918,31 @@ extern NCURSES_EXPORT(bool) _nc_has_mouse (SCREEN *);
extern NCURSES_EXPORT(char *) _nc_get_locale(void);
extern NCURSES_EXPORT(int) _nc_unicode_locale(void);
extern NCURSES_EXPORT(int) _nc_locale_breaks_acs(TERMINAL *);
-extern NCURSES_EXPORT(int) _nc_setupterm(NCURSES_CONST char *, int, int *, bool);
-extern NCURSES_EXPORT(void) _nc_tinfo_cmdch(TERMINAL *, char);
+extern NCURSES_EXPORT(int) _nc_setupterm(NCURSES_CONST char *, int, int *, int);
+extern NCURSES_EXPORT(void) _nc_tinfo_cmdch(TERMINAL *, int);
/* lib_set_term.c */
extern NCURSES_EXPORT(int) _nc_ripoffline(int, int(*)(WINDOW*, int));
+/* lib_setup.c */
+#define ret_error(code, fmt, arg) if (errret) {\
+ *errret = code;\
+ returnCode(ERR);\
+ } else {\
+ fprintf(stderr, fmt, arg);\
+ exit(EXIT_FAILURE);\
+ }
+
+#define ret_error1(code, fmt, arg) ret_error(code, "'%s': " fmt, arg)
+
+#define ret_error0(code, msg) if (errret) {\
+ *errret = code;\
+ returnCode(ERR);\
+ } else {\
+ fprintf(stderr, msg);\
+ exit(EXIT_FAILURE);\
+ }
+
/* lib_tstp.c */
#if USE_SIGWINCH
extern NCURSES_EXPORT(int) _nc_handle_sigwinch(SCREEN *);
@@ -1875,16 +1996,17 @@ extern NCURSES_EXPORT(int) _nc_access (const char *, int);
extern NCURSES_EXPORT(int) _nc_baudrate (int);
extern NCURSES_EXPORT(int) _nc_freewin (WINDOW *);
extern NCURSES_EXPORT(int) _nc_getenv_num (const char *);
-extern NCURSES_EXPORT(int) _nc_keypad (SCREEN *, bool);
+extern NCURSES_EXPORT(int) _nc_keypad (SCREEN *, int);
extern NCURSES_EXPORT(int) _nc_ospeed (int);
extern NCURSES_EXPORT(int) _nc_outch (int);
+extern NCURSES_EXPORT(int) _nc_putchar (int);
extern NCURSES_EXPORT(int) _nc_putp(const char *, const char *);
extern NCURSES_EXPORT(int) _nc_putp_flush(const char *, const char *);
extern NCURSES_EXPORT(int) _nc_read_termcap_entry (const char *const, TERMTYPE *const);
-extern NCURSES_EXPORT(int) _nc_setupscreen (int, int, FILE *, bool, int);
extern NCURSES_EXPORT(int) _nc_setup_tinfo(const char *, TERMTYPE *);
+extern NCURSES_EXPORT(int) _nc_setupscreen (int, int, FILE *, int, int);
extern NCURSES_EXPORT(int) _nc_timed_wait (SCREEN *, int, int, int * EVENTLIST_2nd(_nc_eventlist *));
-extern NCURSES_EXPORT(void) _nc_do_color (short, short, bool, NCURSES_OUTC);
+extern NCURSES_EXPORT(void) _nc_do_color (int, int, int, NCURSES_OUTC);
extern NCURSES_EXPORT(void) _nc_flush (void);
extern NCURSES_EXPORT(void) _nc_free_and_exit (int) GCC_NORETURN;
extern NCURSES_EXPORT(void) _nc_free_entry (ENTRY *, TERMTYPE *);
@@ -1895,8 +2017,9 @@ extern NCURSES_EXPORT(void) _nc_keep_tic_dir (const char *);
extern NCURSES_EXPORT(void) _nc_make_oldhash (int i);
extern NCURSES_EXPORT(void) _nc_scroll_oldhash (int n, int top, int bot);
extern NCURSES_EXPORT(void) _nc_scroll_optimize (void);
-extern NCURSES_EXPORT(void) _nc_set_buffer (FILE *, bool);
-extern NCURSES_EXPORT(void) _nc_signal_handler (bool);
+extern NCURSES_EXPORT(void) _nc_set_buffer (FILE *, int);
+extern NCURSES_EXPORT(void) _nc_setenv_num (const char *, int);
+extern NCURSES_EXPORT(void) _nc_signal_handler (int);
extern NCURSES_EXPORT(void) _nc_synchook (WINDOW *);
extern NCURSES_EXPORT(void) _nc_trace_tries (TRIES *);
@@ -1905,7 +2028,9 @@ extern NCURSES_EXPORT(void) _nc_alloc_entry_leaks(void);
extern NCURSES_EXPORT(void) _nc_captoinfo_leaks(void);
extern NCURSES_EXPORT(void) _nc_codes_leaks(void);
extern NCURSES_EXPORT(void) _nc_comp_captab_leaks(void);
+extern NCURSES_EXPORT(void) _nc_comp_error_leaks(void);
extern NCURSES_EXPORT(void) _nc_comp_scan_leaks(void);
+extern NCURSES_EXPORT(void) _nc_db_iterator_leaks(void);
extern NCURSES_EXPORT(void) _nc_keyname_leaks(void);
extern NCURSES_EXPORT(void) _nc_names_leaks(void);
extern NCURSES_EXPORT(void) _nc_tgetent_leaks(void);
@@ -1914,7 +2039,7 @@ extern NCURSES_EXPORT(void) _nc_tgetent_leaks(void);
#if !(defined(USE_TERMLIB) || defined(USE_BUILD_CC))
extern NCURSES_EXPORT(NCURSES_CH_T) _nc_render (WINDOW *, NCURSES_CH_T);
extern NCURSES_EXPORT(int) _nc_waddch_nosync (WINDOW *, const NCURSES_CH_T);
-extern NCURSES_EXPORT(void) _nc_scroll_window (WINDOW *, int const, NCURSES_SIZE_T const, NCURSES_SIZE_T const, NCURSES_CH_T);
+extern NCURSES_EXPORT(void) _nc_scroll_window (WINDOW *, int const, int const, int const, NCURSES_CH_T);
#endif
#if USE_WIDEC_SUPPORT
@@ -1946,8 +2071,26 @@ extern NCURSES_EXPORT(int) _nc_eventlist_timeout(_nc_eventlist *);
* Wide-character macros to hide some platform-differences.
*/
#if USE_WIDEC_SUPPORT
+
+#if defined(__MINGW32__)
+/*
+ * MinGW has wide-character functions, but they do not work correctly.
+ */
+
+extern int __MINGW_NOTHROW _nc_wctomb(char *, wchar_t);
+#define wctomb(s,wc) _nc_wctomb(s,wc)
+#define wcrtomb(s,wc,n) _nc_wctomb(s,wc)
+
+extern int __MINGW_NOTHROW _nc_mbtowc(wchar_t *, const char *, size_t);
+#define mbtowc(pwc,s,n) _nc_mbtowc(pwc,s,n)
+
+extern int __MINGW_NOTHROW _nc_mblen(const char *, size_t);
+#define mblen(s,n) _nc_mblen(s, n)
+
+#endif /* __MINGW32__ */
+
#if HAVE_MBTOWC && HAVE_MBLEN
-#define reset_mbytes(state) IGNORE_RC(mblen(NULL, 0)), IGNORE_RC(mbtowc(NULL, NULL, 0))
+#define reset_mbytes(state) IGNORE_RC(mblen(NULL, (size_t) 0)), IGNORE_RC(mbtowc(NULL, NULL, (size_t) 0))
#define count_mbytes(buffer,length,state) mblen(buffer,length)
#define check_mbytes(wch,buffer,length,state) \
(int) mbtowc(&wch, buffer, length)
@@ -1960,7 +2103,8 @@ extern NCURSES_EXPORT(int) _nc_eventlist_timeout(_nc_eventlist *);
#else
make an error
#endif
-#endif
+
+#endif /* USE_WIDEC_SUPPORT */
/*
* Not everyone has vsscanf(), but we'd like to use it for scanw().
@@ -2049,9 +2193,9 @@ extern NCURSES_EXPORT(int) _nc_get_tty_mode(TTY *);
#define SetSafeOutcWrapper(outc) \
SCREEN* sp = CURRENT_SCREEN; \
+ struct screen outc_wrapper; \
if (sp==0) { \
- struct screen dummy; \
- sp = &dummy; \
+ sp = &outc_wrapper; \
memset(sp,0,sizeof(struct screen)); \
sp->_outch = _nc_outc_wrapper; \
}\
@@ -2084,39 +2228,39 @@ typedef struct _termInfo
typedef struct term_driver {
bool isTerminfo;
- bool (*CanHandle)(struct DriverTCB*,const char*,int*);
+ bool (*CanHandle)(struct DriverTCB*, const char*, int*);
void (*init)(struct DriverTCB*);
void (*release)(struct DriverTCB*);
int (*size)(struct DriverTCB*, int* Line, int *Cols);
- int (*sgmode)(struct DriverTCB*, bool setFlag, TTY*);
+ int (*sgmode)(struct DriverTCB*, int setFlag, TTY*);
chtype (*conattr)(struct DriverTCB*);
int (*hwcur)(struct DriverTCB*, int yold, int xold, int y, int x);
- int (*mode)(struct DriverTCB*, bool progFlag, bool defFlag);
+ int (*mode)(struct DriverTCB*, int progFlag, int defFlag);
bool (*rescol)(struct DriverTCB*);
bool (*rescolors)(struct DriverTCB*);
- void (*color)(struct DriverTCB*,bool fore, int color, int(*)(SCREEN*,int));
- int (*doBeepOrFlash)(struct DriverTCB*, bool);
- void (*initpair)(struct DriverTCB*,short,short,short);
- void (*initcolor)(struct DriverTCB*,short,short,short,short);
- void (*docolor)(struct DriverTCB*,short,short,bool,int(*)(SCREEN*,int));
+ void (*color)(struct DriverTCB*, int fore, int color, int(*)(SCREEN*, int));
+ int (*doBeepOrFlash)(struct DriverTCB*, int);
+ void (*initpair)(struct DriverTCB*, int, int, int);
+ void (*initcolor)(struct DriverTCB*, int, int, int, int);
+ void (*docolor)(struct DriverTCB*, int, int, int, int(*)(SCREEN*, int));
void (*initmouse)(struct DriverTCB*);
- int (*testmouse)(struct DriverTCB*,int);
+ int (*testmouse)(struct DriverTCB*, int EVENTLIST_2nd(_nc_eventlist*));
void (*setfilter)(struct DriverTCB*);
- void (*hwlabel)(struct DriverTCB*,int,char*);
- void (*hwlabelOnOff)(struct DriverTCB*,bool);
+ void (*hwlabel)(struct DriverTCB*, int, char*);
+ void (*hwlabelOnOff)(struct DriverTCB*, int);
int (*update)(struct DriverTCB*);
- int (*defaultcolors)(struct DriverTCB*,int,int);
- int (*print)(struct DriverTCB*,char*,int);
- int (*getsize)(struct DriverTCB*,int*,int*);
- int (*setsize)(struct DriverTCB*,int,int);
- void (*initacs)(struct DriverTCB*,chtype*,chtype*);
+ int (*defaultcolors)(struct DriverTCB*, int, int);
+ int (*print)(struct DriverTCB*, char*, int);
+ int (*getsize)(struct DriverTCB*, int*, int*);
+ int (*setsize)(struct DriverTCB*, int, int);
+ void (*initacs)(struct DriverTCB*, chtype*, chtype*);
void (*scinit)(SCREEN *);
void (*scexit)(SCREEN *);
- int (*twait)(struct DriverTCB*,int,int,int* EVENTLIST_2nd(_nc_eventlist*));
- int (*read)(struct DriverTCB*,int*);
- int (*nap)(struct DriverTCB*,int);
- int (*kpad)(struct DriverTCB*, bool);
- int (*kyOk)(struct DriverTCB*, int, bool);
+ int (*twait)(struct DriverTCB*, int, int, int* EVENTLIST_2nd(_nc_eventlist*));
+ int (*read)(struct DriverTCB*, int*);
+ int (*nap)(struct DriverTCB*, int);
+ int (*kpad)(struct DriverTCB*, int);
+ int (*kyOk)(struct DriverTCB*, int, int);
bool (*kyExist)(struct DriverTCB*, int);
} TERM_DRIVER;
@@ -2166,7 +2310,7 @@ extern NCURSES_EXPORT(int) TINFO_MVCUR(SCREEN*, int, int, int, int);
#else
#define TINFO_HAS_KEY NCURSES_SP_NAME(has_key)
#define TINFO_DOUPDATE NCURSES_SP_NAME(doupdate)
-#define TINFO_MVCUR NCURSES_SP_NAME(mvcur)
+#define TINFO_MVCUR NCURSES_SP_NAME(_nc_mvcur)
#endif
/*
@@ -2174,7 +2318,7 @@ extern NCURSES_EXPORT(int) TINFO_MVCUR(SCREEN*, int, int, int, int);
*/
#ifdef USE_TERM_DRIVER
extern NCURSES_EXPORT(void) _nc_get_screensize(SCREEN *, TERMINAL *, int *, int *);
-extern NCURSES_EXPORT(int) _nc_setupterm_ex(TERMINAL **, NCURSES_CONST char *, int , int *, bool);
+extern NCURSES_EXPORT(int) _nc_setupterm_ex(TERMINAL **, NCURSES_CONST char *, int , int *, int);
#define TINFO_GET_SIZE(sp, tp, lp, cp) \
_nc_get_screensize(sp, tp, lp, cp)
#define TINFO_SET_CURTERM(sp, tp) \
@@ -2200,12 +2344,13 @@ extern NCURSES_EXPORT_VAR(TERM_DRIVER) _nc_TINFO_DRIVER;
#endif
#ifdef USE_TERM_DRIVER
-#define IsTermInfo(sp) (TCBOf(sp) && ((TCBOf(sp)->drv->isTerminfo)))
+#define IsTermInfo(sp) ((TCBOf(sp) != 0) && ((TCBOf(sp)->drv->isTerminfo)))
+#define HasTInfoTerminal(sp) ((0 != TerminalOf(sp)) && IsTermInfo(sp))
#else
#define IsTermInfo(sp) TRUE
+#define HasTInfoTerminal(sp) (0 != TerminalOf(sp))
#endif
-#define HasTInfoTerminal(sp) ((0 != TerminalOf(sp)) && IsTermInfo(sp))
#define IsValidTIScreen(sp) (HasTInfoTerminal(sp))
/*
@@ -2239,7 +2384,9 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_curs_set)(SCREEN*,int);
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_get_tty_mode)(SCREEN*,TTY*);
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_mcprint)(SCREEN*,char*, int);
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_msec_cost)(SCREEN*, const char *, int);
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_mvcur)(SCREEN*, int, int, int, int);
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_outch)(SCREEN*, int);
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_putchar)(SCREEN*, int);
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_putp)(SCREEN*, const char *, const char*);
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_putp_flush)(SCREEN*, const char *, const char *);
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_resetty)(SCREEN*);
@@ -2250,12 +2397,12 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_scr_init)(SCREEN*,const char
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_scr_restore)(SCREEN*, const char*);
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_scrolln)(SCREEN*, int, int, int, int);
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_set_tty_mode)(SCREEN*, TTY*);
-extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_setupscreen)(SCREEN**, int, int, FILE *, bool, int);
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_setupscreen)(SCREEN**, int, int, FILE *, int, int);
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_tgetent)(SCREEN*,char*,const char *);
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_tigetnum)(SCREEN*,NCURSES_CONST char*);
-extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_vid_attr)(SCREEN *, attr_t, short, void *);
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_vid_attr)(SCREEN *, attr_t, NCURSES_COLOR_T, void *);
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_vidputs)(SCREEN*,chtype,int(*) (SCREEN*, int));
-extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_do_color)(SCREEN*, short, short, bool, NCURSES_SP_OUTC);
+extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_do_color)(SCREEN*, int, int, int, NCURSES_SP_OUTC);
extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_do_xmc_glitch)(SCREEN*, attr_t);
extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_flush)(SCREEN*);
extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_free_and_exit)(SCREEN*, int) GCC_NORETURN;
@@ -2271,7 +2418,7 @@ extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_screen_resume)(SCREEN*);
extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_screen_wrap)(SCREEN*);
extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_scroll_oldhash)(SCREEN*, int n, int top, int bot);
extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_scroll_optimize)(SCREEN*);
-extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_set_buffer)(SCREEN*, FILE *, bool);
+extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_set_buffer)(SCREEN*, FILE *, int);
extern NCURSES_EXPORT(void) _nc_cookie_init(SCREEN *sp);
diff --git a/ncurses/fifo_defs.h b/ncurses/fifo_defs.h
index fa9ae2264635..c0c795a81634 100644
--- a/ncurses/fifo_defs.h
+++ b/ncurses/fifo_defs.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2002,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2008,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 *
@@ -34,7 +34,7 @@
/*
* Common macros for lib_getch.c, lib_ungetch.c
*
- * $Id: fifo_defs.h,v 1.6 2008/06/28 15:52:32 tom Exp $
+ * $Id: fifo_defs.h,v 1.7 2012/08/04 15:59:17 tom Exp $
*/
#ifndef FIFO_DEFS_H
@@ -45,14 +45,42 @@
/* peek points to next uninterpreted character */
#define peek sp->_fifopeek
-#define h_inc() { head == FIFO_SIZE-1 ? head = 0 : head++; if (head == tail) head = -1, tail = 0;}
-#define h_dec() { head == 0 ? head = FIFO_SIZE-1 : head--; if (head == tail) tail = -1;}
-#define t_inc() { tail == FIFO_SIZE-1 ? tail = 0 : tail++; if (tail == head) tail = -1;}
-#define t_dec() { tail == 0 ? tail = FIFO_SIZE-1 : tail--; if (head == tail) fifo_clear(sp);}
-#define p_inc() { peek == FIFO_SIZE-1 ? peek = 0 : peek++;}
+#define h_inc() { \
+ (head >= FIFO_SIZE-1) \
+ ? head = 0 \
+ : head++; \
+ if (head == tail) \
+ head = -1, tail = 0; \
+ }
+#define h_dec() { \
+ (head <= 0) \
+ ? head = FIFO_SIZE-1 \
+ : head--; \
+ if (head == tail) \
+ tail = -1; \
+ }
+#define t_inc() { \
+ (tail >= FIFO_SIZE-1) \
+ ? tail = 0 \
+ : tail++; \
+ if (tail == head) \
+ tail = -1; \
+ }
+#define t_dec() { \
+ (tail <= 0) \
+ ? tail = FIFO_SIZE-1 \
+ : tail--; \
+ if (head == tail) \
+ fifo_clear(sp); \
+ }
+#define p_inc() { \
+ (peek >= FIFO_SIZE-1) \
+ ? peek = 0 \
+ : peek++; \
+ }
-#define cooked_key_in_fifo() ((head != -1) && (peek != head))
-#define raw_key_in_fifo() ((head != -1) && (peek != tail))
+#define cooked_key_in_fifo() ((head >= 0) && (peek != head))
+#define raw_key_in_fifo() ((head >= 0) && (peek != tail))
#undef HIDE_EINTR
diff --git a/ncurses/llib-lncurses b/ncurses/llib-lncurses
index 48f42830272a..d98dcd596326 100644
--- a/ncurses/llib-lncurses
+++ b/ncurses/llib-lncurses
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2011,2013 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -27,7 +27,7 @@
****************************************************************************/
/****************************************************************************
- * Author: Thomas E. Dickey 1996-2010,2011 *
+ * Author: Thomas E. Dickey 1996-on *
****************************************************************************/
/* LINTLIBRARY */
@@ -95,8 +95,6 @@ void _nc_scroll_oldhash(
/* ./base/lib_addch.c */
-#include <ctype.h>
-
#undef _nc_render
chtype _nc_render(
WINDOW *win,
@@ -219,8 +217,6 @@ int wclrtoeol(
/* ./base/lib_color.c */
-#include <tic.h>
-
#undef COLOR_PAIRS
int COLOR_PAIRS;
#undef COLORS
@@ -329,17 +325,17 @@ int pair_content(
#undef _nc_do_color_sp
void _nc_do_color_sp(
SCREEN *sp,
- short old_pair,
- short pair,
- NCURSES_BOOL reverse,
+ int old_pair,
+ int pair,
+ int reverse,
NCURSES_OUTC_sp outc)
{ /* void */ }
#undef _nc_do_color
void _nc_do_color(
- short old_pair,
- short pair,
- NCURSES_BOOL reverse,
+ int old_pair,
+ int pair,
+ int reverse,
NCURSES_OUTC outc)
{ /* void */ }
@@ -418,85 +414,85 @@ int flash(void)
/* ./lib_gen.c */
#undef addch
-int addch(
+int (addch)(
const chtype z)
{ return(*(int *)0); }
#undef addchnstr
-int addchnstr(
+int (addchnstr)(
const chtype *a1,
int z)
{ return(*(int *)0); }
#undef addchstr
-int addchstr(
+int (addchstr)(
const chtype *z)
{ return(*(int *)0); }
#undef addnstr
-int addnstr(
+int (addnstr)(
const char *a1,
int z)
{ return(*(int *)0); }
#undef addstr
-int addstr(
+int (addstr)(
const char *z)
{ return(*(int *)0); }
#undef attroff
-int attroff(
+int (attroff)(
NCURSES_ATTR_T z)
{ return(*(int *)0); }
#undef attron
-int attron(
+int (attron)(
NCURSES_ATTR_T z)
{ return(*(int *)0); }
#undef attrset
-int attrset(
+int (attrset)(
NCURSES_ATTR_T z)
{ return(*(int *)0); }
#undef attr_get
-int attr_get(
+int (attr_get)(
attr_t *a1,
short *a2,
void *z)
{ return(*(int *)0); }
#undef attr_off
-int attr_off(
+int (attr_off)(
attr_t a1,
void *z)
{ return(*(int *)0); }
#undef attr_on
-int attr_on(
+int (attr_on)(
attr_t a1,
void *z)
{ return(*(int *)0); }
#undef attr_set
-int attr_set(
+int (attr_set)(
attr_t a1,
short a2,
void *z)
{ return(*(int *)0); }
#undef bkgd
-int bkgd(
+int (bkgd)(
chtype z)
{ return(*(int *)0); }
#undef bkgdset
-void bkgdset(
+void (bkgdset)(
chtype z)
{ /* void */ }
#undef border
-int border(
+int (border)(
chtype a1,
chtype a2,
chtype a3,
@@ -508,14 +504,14 @@ int border(
{ return(*(int *)0); }
#undef box
-int box(
+int (box)(
WINDOW *a1,
chtype a2,
chtype z)
{ return(*(int *)0); }
#undef chgat
-int chgat(
+int (chgat)(
int a1,
attr_t a2,
short a3,
@@ -523,137 +519,137 @@ int chgat(
{ return(*(int *)0); }
#undef clear
-int clear(void)
+int (clear)(void)
{ return(*(int *)0); }
#undef clrtobot
-int clrtobot(void)
+int (clrtobot)(void)
{ return(*(int *)0); }
#undef clrtoeol
-int clrtoeol(void)
+int (clrtoeol)(void)
{ return(*(int *)0); }
#undef color_set
-int color_set(
+int (color_set)(
short a1,
void *z)
{ return(*(int *)0); }
#undef COLOR_PAIR
-int COLOR_PAIR(
+int (COLOR_PAIR)(
int z)
{ return(*(int *)0); }
#undef delch
-int delch(void)
+int (delch)(void)
{ return(*(int *)0); }
#undef deleteln
-int deleteln(void)
+int (deleteln)(void)
{ return(*(int *)0); }
#undef echochar
-int echochar(
+int (echochar)(
const chtype z)
{ return(*(int *)0); }
#undef erase
-int erase(void)
+int (erase)(void)
{ return(*(int *)0); }
#undef getbkgd
-chtype getbkgd(
+chtype (getbkgd)(
WINDOW *z)
{ return(*(chtype *)0); }
#undef getch
-int getch(void)
+int (getch)(void)
{ return(*(int *)0); }
#undef getnstr
-int getnstr(
+int (getnstr)(
char *a1,
int z)
{ return(*(int *)0); }
#undef getstr
-int getstr(
+int (getstr)(
char *z)
{ return(*(int *)0); }
#undef hline
-int hline(
+int (hline)(
chtype a1,
int z)
{ return(*(int *)0); }
#undef inch
-chtype inch(void)
+chtype (inch)(void)
{ return(*(chtype *)0); }
#undef inchnstr
-int inchnstr(
+int (inchnstr)(
chtype *a1,
int z)
{ return(*(int *)0); }
#undef inchstr
-int inchstr(
+int (inchstr)(
chtype *z)
{ return(*(int *)0); }
#undef innstr
-int innstr(
+int (innstr)(
char *a1,
int z)
{ return(*(int *)0); }
#undef insch
-int insch(
+int (insch)(
chtype z)
{ return(*(int *)0); }
#undef insdelln
-int insdelln(
+int (insdelln)(
int z)
{ return(*(int *)0); }
#undef insertln
-int insertln(void)
+int (insertln)(void)
{ return(*(int *)0); }
#undef insnstr
-int insnstr(
+int (insnstr)(
const char *a1,
int z)
{ return(*(int *)0); }
#undef insstr
-int insstr(
+int (insstr)(
const char *z)
{ return(*(int *)0); }
#undef instr
-int instr(
+int (instr)(
char *z)
{ return(*(int *)0); }
#undef move
-int move(
+int (move)(
int a1,
int z)
{ return(*(int *)0); }
#undef mvaddch
-int mvaddch(
+int (mvaddch)(
int a1,
int a2,
const chtype z)
{ return(*(int *)0); }
#undef mvaddchnstr
-int mvaddchnstr(
+int (mvaddchnstr)(
int a1,
int a2,
const chtype *a3,
@@ -661,14 +657,14 @@ int mvaddchnstr(
{ return(*(int *)0); }
#undef mvaddchstr
-int mvaddchstr(
+int (mvaddchstr)(
int a1,
int a2,
const chtype *z)
{ return(*(int *)0); }
#undef mvaddnstr
-int mvaddnstr(
+int (mvaddnstr)(
int a1,
int a2,
const char *a3,
@@ -676,14 +672,14 @@ int mvaddnstr(
{ return(*(int *)0); }
#undef mvaddstr
-int mvaddstr(
+int (mvaddstr)(
int a1,
int a2,
const char *z)
{ return(*(int *)0); }
#undef mvchgat
-int mvchgat(
+int (mvchgat)(
int a1,
int a2,
int a3,
@@ -693,19 +689,19 @@ int mvchgat(
{ return(*(int *)0); }
#undef mvdelch
-int mvdelch(
+int (mvdelch)(
int a1,
int z)
{ return(*(int *)0); }
#undef mvgetch
-int mvgetch(
+int (mvgetch)(
int a1,
int z)
{ return(*(int *)0); }
#undef mvgetnstr
-int mvgetnstr(
+int (mvgetnstr)(
int a1,
int a2,
char *a3,
@@ -713,14 +709,14 @@ int mvgetnstr(
{ return(*(int *)0); }
#undef mvgetstr
-int mvgetstr(
+int (mvgetstr)(
int a1,
int a2,
char *z)
{ return(*(int *)0); }
#undef mvhline
-int mvhline(
+int (mvhline)(
int a1,
int a2,
chtype a3,
@@ -728,13 +724,13 @@ int mvhline(
{ return(*(int *)0); }
#undef mvinch
-chtype mvinch(
+chtype (mvinch)(
int a1,
int z)
{ return(*(chtype *)0); }
#undef mvinchnstr
-int mvinchnstr(
+int (mvinchnstr)(
int a1,
int a2,
chtype *a3,
@@ -742,14 +738,14 @@ int mvinchnstr(
{ return(*(int *)0); }
#undef mvinchstr
-int mvinchstr(
+int (mvinchstr)(
int a1,
int a2,
chtype *z)
{ return(*(int *)0); }
#undef mvinnstr
-int mvinnstr(
+int (mvinnstr)(
int a1,
int a2,
char *a3,
@@ -757,14 +753,14 @@ int mvinnstr(
{ return(*(int *)0); }
#undef mvinsch
-int mvinsch(
+int (mvinsch)(
int a1,
int a2,
chtype z)
{ return(*(int *)0); }
#undef mvinsnstr
-int mvinsnstr(
+int (mvinsnstr)(
int a1,
int a2,
const char *a3,
@@ -772,21 +768,21 @@ int mvinsnstr(
{ return(*(int *)0); }
#undef mvinsstr
-int mvinsstr(
+int (mvinsstr)(
int a1,
int a2,
const char *z)
{ return(*(int *)0); }
#undef mvinstr
-int mvinstr(
+int (mvinstr)(
int a1,
int a2,
char *z)
{ return(*(int *)0); }
#undef mvvline
-int mvvline(
+int (mvvline)(
int a1,
int a2,
chtype a3,
@@ -794,7 +790,7 @@ int mvvline(
{ return(*(int *)0); }
#undef mvwaddch
-int mvwaddch(
+int (mvwaddch)(
WINDOW *a1,
int a2,
int a3,
@@ -802,7 +798,7 @@ int mvwaddch(
{ return(*(int *)0); }
#undef mvwaddchnstr
-int mvwaddchnstr(
+int (mvwaddchnstr)(
WINDOW *a1,
int a2,
int a3,
@@ -811,7 +807,7 @@ int mvwaddchnstr(
{ return(*(int *)0); }
#undef mvwaddchstr
-int mvwaddchstr(
+int (mvwaddchstr)(
WINDOW *a1,
int a2,
int a3,
@@ -819,7 +815,7 @@ int mvwaddchstr(
{ return(*(int *)0); }
#undef mvwaddnstr
-int mvwaddnstr(
+int (mvwaddnstr)(
WINDOW *a1,
int a2,
int a3,
@@ -828,7 +824,7 @@ int mvwaddnstr(
{ return(*(int *)0); }
#undef mvwaddstr
-int mvwaddstr(
+int (mvwaddstr)(
WINDOW *a1,
int a2,
int a3,
@@ -836,7 +832,7 @@ int mvwaddstr(
{ return(*(int *)0); }
#undef mvwchgat
-int mvwchgat(
+int (mvwchgat)(
WINDOW *a1,
int a2,
int a3,
@@ -847,21 +843,21 @@ int mvwchgat(
{ return(*(int *)0); }
#undef mvwdelch
-int mvwdelch(
+int (mvwdelch)(
WINDOW *a1,
int a2,
int z)
{ return(*(int *)0); }
#undef mvwgetch
-int mvwgetch(
+int (mvwgetch)(
WINDOW *a1,
int a2,
int z)
{ return(*(int *)0); }
#undef mvwgetnstr
-int mvwgetnstr(
+int (mvwgetnstr)(
WINDOW *a1,
int a2,
int a3,
@@ -870,7 +866,7 @@ int mvwgetnstr(
{ return(*(int *)0); }
#undef mvwgetstr
-int mvwgetstr(
+int (mvwgetstr)(
WINDOW *a1,
int a2,
int a3,
@@ -878,7 +874,7 @@ int mvwgetstr(
{ return(*(int *)0); }
#undef mvwhline
-int mvwhline(
+int (mvwhline)(
WINDOW *a1,
int a2,
int a3,
@@ -887,14 +883,14 @@ int mvwhline(
{ return(*(int *)0); }
#undef mvwinch
-chtype mvwinch(
+chtype (mvwinch)(
WINDOW *a1,
int a2,
int z)
{ return(*(chtype *)0); }
#undef mvwinchnstr
-int mvwinchnstr(
+int (mvwinchnstr)(
WINDOW *a1,
int a2,
int a3,
@@ -903,7 +899,7 @@ int mvwinchnstr(
{ return(*(int *)0); }
#undef mvwinchstr
-int mvwinchstr(
+int (mvwinchstr)(
WINDOW *a1,
int a2,
int a3,
@@ -911,7 +907,7 @@ int mvwinchstr(
{ return(*(int *)0); }
#undef mvwinnstr
-int mvwinnstr(
+int (mvwinnstr)(
WINDOW *a1,
int a2,
int a3,
@@ -920,7 +916,7 @@ int mvwinnstr(
{ return(*(int *)0); }
#undef mvwinsch
-int mvwinsch(
+int (mvwinsch)(
WINDOW *a1,
int a2,
int a3,
@@ -928,7 +924,7 @@ int mvwinsch(
{ return(*(int *)0); }
#undef mvwinsnstr
-int mvwinsnstr(
+int (mvwinsnstr)(
WINDOW *a1,
int a2,
int a3,
@@ -937,7 +933,7 @@ int mvwinsnstr(
{ return(*(int *)0); }
#undef mvwinsstr
-int mvwinsstr(
+int (mvwinsstr)(
WINDOW *a1,
int a2,
int a3,
@@ -945,7 +941,7 @@ int mvwinsstr(
{ return(*(int *)0); }
#undef mvwinstr
-int mvwinstr(
+int (mvwinstr)(
WINDOW *a1,
int a2,
int a3,
@@ -953,7 +949,7 @@ int mvwinstr(
{ return(*(int *)0); }
#undef mvwvline
-int mvwvline(
+int (mvwvline)(
WINDOW *a1,
int a2,
int a3,
@@ -962,117 +958,117 @@ int mvwvline(
{ return(*(int *)0); }
#undef PAIR_NUMBER
-int PAIR_NUMBER(
+int (PAIR_NUMBER)(
int z)
{ return(*(int *)0); }
#undef redrawwin
-int redrawwin(
+int (redrawwin)(
WINDOW *z)
{ return(*(int *)0); }
#undef refresh
-int refresh(void)
+int (refresh)(void)
{ return(*(int *)0); }
#undef scrl
-int scrl(
+int (scrl)(
int z)
{ return(*(int *)0); }
#undef scroll
-int scroll(
+int (scroll)(
WINDOW *z)
{ return(*(int *)0); }
#undef setscrreg
-int setscrreg(
+int (setscrreg)(
int a1,
int z)
{ return(*(int *)0); }
#undef standout
-int standout(void)
+int (standout)(void)
{ return(*(int *)0); }
#undef standend
-int standend(void)
+int (standend)(void)
{ return(*(int *)0); }
#undef timeout
-void timeout(
+void (timeout)(
int z)
{ /* void */ }
#undef touchline
-int touchline(
+int (touchline)(
WINDOW *a1,
int a2,
int z)
{ return(*(int *)0); }
#undef touchwin
-int touchwin(
+int (touchwin)(
WINDOW *z)
{ return(*(int *)0); }
#undef untouchwin
-int untouchwin(
+int (untouchwin)(
WINDOW *z)
{ return(*(int *)0); }
#undef vline
-int vline(
+int (vline)(
chtype a1,
int z)
{ return(*(int *)0); }
#undef vw_printw
-int vw_printw(
+int (vw_printw)(
WINDOW *a1,
const char *a2,
va_list z)
{ return(*(int *)0); }
#undef vw_scanw
-int vw_scanw(
+int (vw_scanw)(
WINDOW *a1,
char *a2,
va_list z)
{ return(*(int *)0); }
#undef waddchstr
-int waddchstr(
+int (waddchstr)(
WINDOW *a1,
const chtype *z)
{ return(*(int *)0); }
#undef waddstr
-int waddstr(
+int (waddstr)(
WINDOW *a1,
const char *z)
{ return(*(int *)0); }
#undef wattron
-int wattron(
+int (wattron)(
WINDOW *a1,
int z)
{ return(*(int *)0); }
#undef wattroff
-int wattroff(
+int (wattroff)(
WINDOW *a1,
int z)
{ return(*(int *)0); }
#undef wattrset
-int wattrset(
+int (wattrset)(
WINDOW *a1,
int z)
{ return(*(int *)0); }
#undef wattr_get
-int wattr_get(
+int (wattr_get)(
WINDOW *a1,
attr_t *a2,
short *a3,
@@ -1080,7 +1076,7 @@ int wattr_get(
{ return(*(int *)0); }
#undef wattr_set
-int wattr_set(
+int (wattr_set)(
WINDOW *a1,
attr_t a2,
short a3,
@@ -1088,168 +1084,168 @@ int wattr_set(
{ return(*(int *)0); }
#undef wdeleteln
-int wdeleteln(
+int (wdeleteln)(
WINDOW *z)
{ return(*(int *)0); }
#undef wgetstr
-int wgetstr(
+int (wgetstr)(
WINDOW *a1,
char *z)
{ return(*(int *)0); }
#undef winchstr
-int winchstr(
+int (winchstr)(
WINDOW *a1,
chtype *z)
{ return(*(int *)0); }
#undef winsertln
-int winsertln(
+int (winsertln)(
WINDOW *z)
{ return(*(int *)0); }
#undef winsstr
-int winsstr(
+int (winsstr)(
WINDOW *a1,
const char *z)
{ return(*(int *)0); }
#undef winstr
-int winstr(
+int (winstr)(
WINDOW *a1,
char *z)
{ return(*(int *)0); }
#undef wstandout
-int wstandout(
+int (wstandout)(
WINDOW *z)
{ return(*(int *)0); }
#undef wstandend
-int wstandend(
+int (wstandend)(
WINDOW *z)
{ return(*(int *)0); }
#undef getattrs
-int getattrs(
+int (getattrs)(
const WINDOW *z)
{ return(*(int *)0); }
#undef getcurx
-int getcurx(
+int (getcurx)(
const WINDOW *z)
{ return(*(int *)0); }
#undef getcury
-int getcury(
+int (getcury)(
const WINDOW *z)
{ return(*(int *)0); }
#undef getbegx
-int getbegx(
+int (getbegx)(
const WINDOW *z)
{ return(*(int *)0); }
#undef getbegy
-int getbegy(
+int (getbegy)(
const WINDOW *z)
{ return(*(int *)0); }
#undef getmaxx
-int getmaxx(
+int (getmaxx)(
const WINDOW *z)
{ return(*(int *)0); }
#undef getmaxy
-int getmaxy(
+int (getmaxy)(
const WINDOW *z)
{ return(*(int *)0); }
#undef getparx
-int getparx(
+int (getparx)(
const WINDOW *z)
{ return(*(int *)0); }
#undef getpary
-int getpary(
+int (getpary)(
const WINDOW *z)
{ return(*(int *)0); }
#undef wgetparent
-WINDOW *wgetparent(
+WINDOW *(wgetparent)(
const WINDOW *z)
{ return(*(WINDOW **)0); }
#undef is_cleared
-NCURSES_BOOL is_cleared(
+NCURSES_BOOL (is_cleared)(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
#undef is_idcok
-NCURSES_BOOL is_idcok(
+NCURSES_BOOL (is_idcok)(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
#undef is_idlok
-NCURSES_BOOL is_idlok(
+NCURSES_BOOL (is_idlok)(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
#undef is_immedok
-NCURSES_BOOL is_immedok(
+NCURSES_BOOL (is_immedok)(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
#undef is_keypad
-NCURSES_BOOL is_keypad(
+NCURSES_BOOL (is_keypad)(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
#undef is_leaveok
-NCURSES_BOOL is_leaveok(
+NCURSES_BOOL (is_leaveok)(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
#undef is_nodelay
-NCURSES_BOOL is_nodelay(
+NCURSES_BOOL (is_nodelay)(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
#undef is_notimeout
-NCURSES_BOOL is_notimeout(
+NCURSES_BOOL (is_notimeout)(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
#undef is_pad
-NCURSES_BOOL is_pad(
+NCURSES_BOOL (is_pad)(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
#undef is_scrollok
-NCURSES_BOOL is_scrollok(
+NCURSES_BOOL (is_scrollok)(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
#undef is_subwin
-NCURSES_BOOL is_subwin(
+NCURSES_BOOL (is_subwin)(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
#undef is_syncok
-NCURSES_BOOL is_syncok(
+NCURSES_BOOL (is_syncok)(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
#undef wgetscrreg
-int wgetscrreg(
+int (wgetscrreg)(
const WINDOW *a1,
int *a2,
int *z)
{ return(*(int *)0); }
#undef mouse_trafo
-NCURSES_BOOL mouse_trafo(
+NCURSES_BOOL (mouse_trafo)(
int *a1,
int *a2,
NCURSES_BOOL z)
@@ -1257,8 +1253,6 @@ NCURSES_BOOL mouse_trafo(
/* ./base/lib_getch.c */
-#include <fifo_defs.h>
-
#undef ESCDELAY
int ESCDELAY;
@@ -1523,6 +1517,23 @@ void _nc_mvcur_wrap_sp(
void _nc_mvcur_wrap(void)
{ /* void */ }
+#undef _nc_mvcur_sp
+int _nc_mvcur_sp(
+ SCREEN *sp,
+ int yold,
+ int xold,
+ int ynew,
+ int xnew)
+ { return(*(int *)0); }
+
+#undef _nc_mvcur
+int _nc_mvcur(
+ int yold,
+ int xold,
+ int ynew,
+ int xnew)
+ { return(*(int *)0); }
+
#undef mvcur_sp
int mvcur_sp(
SCREEN *sp,
@@ -1932,8 +1943,8 @@ int scr_set(
void _nc_scroll_window(
WINDOW *win,
int const n,
- short const top,
- short const bottom,
+ int const top,
+ int const bottom,
chtype blank)
{ /* void */ }
@@ -1978,7 +1989,7 @@ int _nc_setupscreen_sp(
int slines,
int scolumns,
FILE *output,
- NCURSES_BOOL filtered,
+ int filtered,
int slk_format)
{ return(*(int *)0); }
@@ -1987,7 +1998,7 @@ int _nc_setupscreen(
int slines,
int scolumns,
FILE *output,
- NCURSES_BOOL filtered,
+ int filtered,
int slk_format)
{ return(*(int *)0); }
@@ -2263,11 +2274,9 @@ char *_tracemouse(
/* ./tty/lib_tstp.c */
-#include <SigAction.h>
-
#undef _nc_signal_handler
void _nc_signal_handler(
- NCURSES_BOOL enable)
+ int enable)
{ /* void */ }
/* ./base/lib_ungetch.c */
@@ -2425,9 +2434,6 @@ char *_nc_printf_string(
/* ./tty/tty_update.c */
-#include <sys/time.h>
-#include <sys/times.h>
-
#undef doupdate_sp
int doupdate_sp(
SCREEN *sp)
@@ -2504,12 +2510,6 @@ char *_nc_varargs(
va_list ap)
{ return(*(char **)0); }
-/* ./base/memmove.c */
-
-#undef _nc_memmove
-void _nc_memmove(void)
- { /* void */ }
-
/* ./base/vsscanf.c */
#undef _nc_vsscanf
@@ -2769,7 +2769,7 @@ void _nc_align_termtype(
#undef _nc_copy_termtype
void _nc_copy_termtype(
TERMTYPE *dst,
- TERMTYPE *src)
+ const TERMTYPE *src)
{ /* void */ }
/* ./codes.c */
@@ -2783,8 +2783,6 @@ char *const strcodes[] = {0};
/* ./comp_captab.c */
-#include <hashsize.h>
-
#undef _nc_get_table
const struct name_table_entry *_nc_get_table(
NCURSES_BOOL termcap)
@@ -2959,6 +2957,12 @@ int _nc_getenv_num(
const char *name)
{ return(*(int *)0); }
+#undef _nc_setenv_num
+void _nc_setenv_num(
+ const char *name,
+ int value)
+ { /* void */ }
+
/* ./tinfo/home_terminfo.c */
#undef _nc_home_terminfo
@@ -2967,15 +2971,6 @@ char *_nc_home_terminfo(void)
/* ./tinfo/init_keytry.c */
-#if 0
-
-#include <init_keytry.h>
-
-#undef _nc_tinfo_fkeys
-const struct tinfo_fkeys _nc_tinfo_fkeys[] = {0};
-
-#endif
-
#undef _nc_init_keytry
void _nc_init_keytry(
SCREEN *sp)
@@ -2997,8 +2992,6 @@ void _nc_init_acs(void)
/* ./tinfo/lib_baudrate.c */
-#include <termcap.h>
-
struct speed {
int s;
int sp;
@@ -3144,8 +3137,6 @@ char *longname(void)
/* ./tinfo/lib_napms.c */
-#include <time.h>
-
#undef napms_sp
int napms_sp(
SCREEN *sp,
@@ -3255,7 +3246,7 @@ int _nc_putp_flush_sp(
#undef _nc_keypad
int _nc_keypad(
SCREEN *sp,
- NCURSES_BOOL flag)
+ int flag)
{ return(*(int *)0); }
/* ./tinfo/lib_raw.c */
@@ -3329,10 +3320,6 @@ int intrflush(
/* ./tinfo/lib_setup.c */
-#include <locale.h>
-#include <sys/ioctl.h>
-#include <langinfo.h>
-
#undef ttytype
char ttytype[256];
#undef LINES
@@ -3364,11 +3351,22 @@ void use_env_sp(
NCURSES_BOOL f)
{ /* void */ }
+#undef use_tioctl_sp
+void use_tioctl_sp(
+ SCREEN *sp,
+ NCURSES_BOOL f)
+ { /* void */ }
+
#undef use_env
void use_env(
NCURSES_BOOL f)
{ /* void */ }
+#undef use_tioctl
+void use_tioctl(
+ NCURSES_BOOL f)
+ { /* void */ }
+
#undef _nc_get_screensize
void _nc_get_screensize(
SCREEN *sp,
@@ -3390,7 +3388,7 @@ int _nc_setup_tinfo(
#undef _nc_tinfo_cmdch
void _nc_tinfo_cmdch(
TERMINAL *termp,
- char proto)
+ int proto)
{ /* void */ }
#undef _nc_get_locale
@@ -3411,7 +3409,7 @@ int _nc_setupterm(
char *tname,
int Filedes,
int *errret,
- NCURSES_BOOL reuse)
+ int reuse)
{ return(*(int *)0); }
#undef new_prescr
@@ -3439,12 +3437,6 @@ int tgetent_sp(
const char *name)
{ return(*(int *)0); }
-#if 0
-
-#include <capdefaults.c>
-
-#endif
-
#undef tgetent
int tgetent(
char *bufp,
@@ -3550,7 +3542,7 @@ int _nc_tparm_err;
int _nc_tparm_analyze(
const char *string,
char *p_is_s[9],
- int *popcount)
+ int *_nc_popcount)
{ return(*(int *)0); }
#undef tparm
@@ -3570,7 +3562,7 @@ char *tiparm(
#undef PC
char PC;
#undef ospeed
-NCURSES_OSPEED ospeed;
+short ospeed;
#undef _nc_nulls_sent
int _nc_nulls_sent;
@@ -3610,12 +3602,28 @@ int _nc_outch(
int ch)
{ return(*(int *)0); }
+#undef _nc_putchar_sp
+int _nc_putchar_sp(
+ SCREEN *sp,
+ int ch)
+ { return(*(int *)0); }
+
+#undef _nc_putchar
+int _nc_putchar(
+ int ch)
+ { return(*(int *)0); }
+
#undef putp_sp
int putp_sp(
SCREEN *sp,
const char *string)
{ return(*(int *)0); }
+#undef putp
+int putp(
+ const char *string)
+ { return(*(int *)0); }
+
#undef _nc_putp_sp
int _nc_putp_sp(
SCREEN *sp,
@@ -3623,11 +3631,6 @@ int _nc_putp_sp(
const char *string)
{ return(*(int *)0); }
-#undef putp
-int putp(
- const char *string)
- { return(*(int *)0); }
-
#undef _nc_putp
int _nc_putp(
const char *name,
@@ -3678,12 +3681,12 @@ void _tracef(
#undef _nc_retrace_bool
NCURSES_BOOL _nc_retrace_bool(
- NCURSES_BOOL code)
+ int code)
{ return(*(NCURSES_BOOL *)0); }
#undef _nc_retrace_char
char _nc_retrace_char(
- char code)
+ int code)
{ return(*(char *)0); }
#undef _nc_retrace_int
@@ -3917,9 +3920,27 @@ char *const strnames[] = {0};
#undef strfnames
char *const strfnames[] = {0};
+/* ./tinfo/obsolete.c */
+
+#undef _nc_set_buffer_sp
+void _nc_set_buffer_sp(
+ SCREEN *sp,
+ FILE *ofp,
+ int buffered)
+ { /* void */ }
+
+#undef _nc_set_buffer
+void _nc_set_buffer(
+ FILE *ofp,
+ int buffered)
+ { /* void */ }
+
/* ./tinfo/read_entry.c */
-#include <hashed_db.h>
+#undef _nc_init_termtype
+void _nc_init_termtype(
+ TERMTYPE *const tp)
+ { /* void */ }
#undef _nc_read_termtype
int _nc_read_termtype(
@@ -3943,27 +3964,8 @@ int _nc_read_entry(
/* ./tinfo/read_termcap.c */
-#include <sys/types.h>
-
-#undef _nc_read_termcap_entry
-int _nc_read_termcap_entry(
- const char *const tn,
- TERMTYPE *const tp)
- { return(*(int *)0); }
-
-/* ./tinfo/setbuf.c */
-
-#undef _nc_set_buffer_sp
-void _nc_set_buffer_sp(
- SCREEN *sp,
- FILE *ofp,
- NCURSES_BOOL buffered)
- { /* void */ }
-
-#undef _nc_set_buffer
-void _nc_set_buffer(
- FILE *ofp,
- NCURSES_BOOL buffered)
+#undef _nc_read_termcap
+void _nc_read_termcap(void)
{ /* void */ }
/* ./tinfo/strings.c */
@@ -4189,6 +4191,8 @@ int _nc_resolve_uses(
#undef _nc_syntax
int _nc_syntax;
+#undef _nc_strict_bsd
+int _nc_strict_bsd;
#undef _nc_curr_file_pos
long _nc_curr_file_pos;
#undef _nc_comment_start
diff --git a/ncurses/llib-lncursest b/ncurses/llib-lncursest
index f5739cb1e79d..3401ad363cbc 100644
--- a/ncurses/llib-lncursest
+++ b/ncurses/llib-lncursest
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2008-2010,2011 Free Software Foundation, Inc. *
+ * Copyright (c) 2008-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 *
@@ -332,17 +332,17 @@ int pair_content(
#undef _nc_do_color_sp
void _nc_do_color_sp(
SCREEN *sp,
- short old_pair,
- short pair,
- NCURSES_BOOL reverse,
+ int old_pair,
+ int pair,
+ int reverse,
NCURSES_OUTC_sp outc)
{ /* void */ }
#undef _nc_do_color
void _nc_do_color(
- short old_pair,
- short pair,
- NCURSES_BOOL reverse,
+ int old_pair,
+ int pair,
+ int reverse,
NCURSES_OUTC outc)
{ /* void */ }
@@ -420,86 +420,88 @@ int flash(void)
/* ./lib_gen.c */
+#include <ncurses_cfg.h>
+
#undef addch
-int addch(
+int (addch)(
const chtype z)
{ return(*(int *)0); }
#undef addchnstr
-int addchnstr(
+int (addchnstr)(
const chtype *a1,
int z)
{ return(*(int *)0); }
#undef addchstr
-int addchstr(
+int (addchstr)(
const chtype *z)
{ return(*(int *)0); }
#undef addnstr
-int addnstr(
+int (addnstr)(
const char *a1,
int z)
{ return(*(int *)0); }
#undef addstr
-int addstr(
+int (addstr)(
const char *z)
{ return(*(int *)0); }
#undef attroff
-int attroff(
- NCURSES_ATTR_T z)
+int (attroff)(
+ int z)
{ return(*(int *)0); }
#undef attron
-int attron(
- NCURSES_ATTR_T z)
+int (attron)(
+ int z)
{ return(*(int *)0); }
#undef attrset
-int attrset(
- NCURSES_ATTR_T z)
+int (attrset)(
+ int z)
{ return(*(int *)0); }
#undef attr_get
-int attr_get(
+int (attr_get)(
attr_t *a1,
short *a2,
void *z)
{ return(*(int *)0); }
#undef attr_off
-int attr_off(
+int (attr_off)(
attr_t a1,
void *z)
{ return(*(int *)0); }
#undef attr_on
-int attr_on(
+int (attr_on)(
attr_t a1,
void *z)
{ return(*(int *)0); }
#undef attr_set
-int attr_set(
+int (attr_set)(
attr_t a1,
short a2,
void *z)
{ return(*(int *)0); }
#undef bkgd
-int bkgd(
+int (bkgd)(
chtype z)
{ return(*(int *)0); }
#undef bkgdset
-void bkgdset(
+void (bkgdset)(
chtype z)
{ /* void */ }
#undef border
-int border(
+int (border)(
chtype a1,
chtype a2,
chtype a3,
@@ -511,14 +513,14 @@ int border(
{ return(*(int *)0); }
#undef box
-int box(
+int (box)(
WINDOW *a1,
chtype a2,
chtype z)
{ return(*(int *)0); }
#undef chgat
-int chgat(
+int (chgat)(
int a1,
attr_t a2,
short a3,
@@ -526,137 +528,137 @@ int chgat(
{ return(*(int *)0); }
#undef clear
-int clear(void)
+int (clear)(void)
{ return(*(int *)0); }
#undef clrtobot
-int clrtobot(void)
+int (clrtobot)(void)
{ return(*(int *)0); }
#undef clrtoeol
-int clrtoeol(void)
+int (clrtoeol)(void)
{ return(*(int *)0); }
#undef color_set
-int color_set(
+int (color_set)(
short a1,
void *z)
{ return(*(int *)0); }
#undef COLOR_PAIR
-int COLOR_PAIR(
+int (COLOR_PAIR)(
int z)
{ return(*(int *)0); }
#undef delch
-int delch(void)
+int (delch)(void)
{ return(*(int *)0); }
#undef deleteln
-int deleteln(void)
+int (deleteln)(void)
{ return(*(int *)0); }
#undef echochar
-int echochar(
+int (echochar)(
const chtype z)
{ return(*(int *)0); }
#undef erase
-int erase(void)
+int (erase)(void)
{ return(*(int *)0); }
#undef getbkgd
-chtype getbkgd(
+chtype (getbkgd)(
WINDOW *z)
{ return(*(chtype *)0); }
#undef getch
-int getch(void)
+int (getch)(void)
{ return(*(int *)0); }
#undef getnstr
-int getnstr(
+int (getnstr)(
char *a1,
int z)
{ return(*(int *)0); }
#undef getstr
-int getstr(
+int (getstr)(
char *z)
{ return(*(int *)0); }
#undef hline
-int hline(
+int (hline)(
chtype a1,
int z)
{ return(*(int *)0); }
#undef inch
-chtype inch(void)
+chtype (inch)(void)
{ return(*(chtype *)0); }
#undef inchnstr
-int inchnstr(
+int (inchnstr)(
chtype *a1,
int z)
{ return(*(int *)0); }
#undef inchstr
-int inchstr(
+int (inchstr)(
chtype *z)
{ return(*(int *)0); }
#undef innstr
-int innstr(
+int (innstr)(
char *a1,
int z)
{ return(*(int *)0); }
#undef insch
-int insch(
+int (insch)(
chtype z)
{ return(*(int *)0); }
#undef insdelln
-int insdelln(
+int (insdelln)(
int z)
{ return(*(int *)0); }
#undef insertln
-int insertln(void)
+int (insertln)(void)
{ return(*(int *)0); }
#undef insnstr
-int insnstr(
+int (insnstr)(
const char *a1,
int z)
{ return(*(int *)0); }
#undef insstr
-int insstr(
+int (insstr)(
const char *z)
{ return(*(int *)0); }
#undef instr
-int instr(
+int (instr)(
char *z)
{ return(*(int *)0); }
#undef move
-int move(
+int (move)(
int a1,
int z)
{ return(*(int *)0); }
#undef mvaddch
-int mvaddch(
+int (mvaddch)(
int a1,
int a2,
const chtype z)
{ return(*(int *)0); }
#undef mvaddchnstr
-int mvaddchnstr(
+int (mvaddchnstr)(
int a1,
int a2,
const chtype *a3,
@@ -664,14 +666,14 @@ int mvaddchnstr(
{ return(*(int *)0); }
#undef mvaddchstr
-int mvaddchstr(
+int (mvaddchstr)(
int a1,
int a2,
const chtype *z)
{ return(*(int *)0); }
#undef mvaddnstr
-int mvaddnstr(
+int (mvaddnstr)(
int a1,
int a2,
const char *a3,
@@ -679,14 +681,14 @@ int mvaddnstr(
{ return(*(int *)0); }
#undef mvaddstr
-int mvaddstr(
+int (mvaddstr)(
int a1,
int a2,
const char *z)
{ return(*(int *)0); }
#undef mvchgat
-int mvchgat(
+int (mvchgat)(
int a1,
int a2,
int a3,
@@ -696,19 +698,19 @@ int mvchgat(
{ return(*(int *)0); }
#undef mvdelch
-int mvdelch(
+int (mvdelch)(
int a1,
int z)
{ return(*(int *)0); }
#undef mvgetch
-int mvgetch(
+int (mvgetch)(
int a1,
int z)
{ return(*(int *)0); }
#undef mvgetnstr
-int mvgetnstr(
+int (mvgetnstr)(
int a1,
int a2,
char *a3,
@@ -716,14 +718,14 @@ int mvgetnstr(
{ return(*(int *)0); }
#undef mvgetstr
-int mvgetstr(
+int (mvgetstr)(
int a1,
int a2,
char *z)
{ return(*(int *)0); }
#undef mvhline
-int mvhline(
+int (mvhline)(
int a1,
int a2,
chtype a3,
@@ -731,13 +733,13 @@ int mvhline(
{ return(*(int *)0); }
#undef mvinch
-chtype mvinch(
+chtype (mvinch)(
int a1,
int z)
{ return(*(chtype *)0); }
#undef mvinchnstr
-int mvinchnstr(
+int (mvinchnstr)(
int a1,
int a2,
chtype *a3,
@@ -745,14 +747,14 @@ int mvinchnstr(
{ return(*(int *)0); }
#undef mvinchstr
-int mvinchstr(
+int (mvinchstr)(
int a1,
int a2,
chtype *z)
{ return(*(int *)0); }
#undef mvinnstr
-int mvinnstr(
+int (mvinnstr)(
int a1,
int a2,
char *a3,
@@ -760,14 +762,14 @@ int mvinnstr(
{ return(*(int *)0); }
#undef mvinsch
-int mvinsch(
+int (mvinsch)(
int a1,
int a2,
chtype z)
{ return(*(int *)0); }
#undef mvinsnstr
-int mvinsnstr(
+int (mvinsnstr)(
int a1,
int a2,
const char *a3,
@@ -775,21 +777,21 @@ int mvinsnstr(
{ return(*(int *)0); }
#undef mvinsstr
-int mvinsstr(
+int (mvinsstr)(
int a1,
int a2,
const char *z)
{ return(*(int *)0); }
#undef mvinstr
-int mvinstr(
+int (mvinstr)(
int a1,
int a2,
char *z)
{ return(*(int *)0); }
#undef mvvline
-int mvvline(
+int (mvvline)(
int a1,
int a2,
chtype a3,
@@ -797,7 +799,7 @@ int mvvline(
{ return(*(int *)0); }
#undef mvwaddch
-int mvwaddch(
+int (mvwaddch)(
WINDOW *a1,
int a2,
int a3,
@@ -805,7 +807,7 @@ int mvwaddch(
{ return(*(int *)0); }
#undef mvwaddchnstr
-int mvwaddchnstr(
+int (mvwaddchnstr)(
WINDOW *a1,
int a2,
int a3,
@@ -814,7 +816,7 @@ int mvwaddchnstr(
{ return(*(int *)0); }
#undef mvwaddchstr
-int mvwaddchstr(
+int (mvwaddchstr)(
WINDOW *a1,
int a2,
int a3,
@@ -822,7 +824,7 @@ int mvwaddchstr(
{ return(*(int *)0); }
#undef mvwaddnstr
-int mvwaddnstr(
+int (mvwaddnstr)(
WINDOW *a1,
int a2,
int a3,
@@ -831,7 +833,7 @@ int mvwaddnstr(
{ return(*(int *)0); }
#undef mvwaddstr
-int mvwaddstr(
+int (mvwaddstr)(
WINDOW *a1,
int a2,
int a3,
@@ -839,7 +841,7 @@ int mvwaddstr(
{ return(*(int *)0); }
#undef mvwchgat
-int mvwchgat(
+int (mvwchgat)(
WINDOW *a1,
int a2,
int a3,
@@ -850,21 +852,21 @@ int mvwchgat(
{ return(*(int *)0); }
#undef mvwdelch
-int mvwdelch(
+int (mvwdelch)(
WINDOW *a1,
int a2,
int z)
{ return(*(int *)0); }
#undef mvwgetch
-int mvwgetch(
+int (mvwgetch)(
WINDOW *a1,
int a2,
int z)
{ return(*(int *)0); }
#undef mvwgetnstr
-int mvwgetnstr(
+int (mvwgetnstr)(
WINDOW *a1,
int a2,
int a3,
@@ -873,7 +875,7 @@ int mvwgetnstr(
{ return(*(int *)0); }
#undef mvwgetstr
-int mvwgetstr(
+int (mvwgetstr)(
WINDOW *a1,
int a2,
int a3,
@@ -881,7 +883,7 @@ int mvwgetstr(
{ return(*(int *)0); }
#undef mvwhline
-int mvwhline(
+int (mvwhline)(
WINDOW *a1,
int a2,
int a3,
@@ -890,14 +892,14 @@ int mvwhline(
{ return(*(int *)0); }
#undef mvwinch
-chtype mvwinch(
+chtype (mvwinch)(
WINDOW *a1,
int a2,
int z)
{ return(*(chtype *)0); }
#undef mvwinchnstr
-int mvwinchnstr(
+int (mvwinchnstr)(
WINDOW *a1,
int a2,
int a3,
@@ -906,7 +908,7 @@ int mvwinchnstr(
{ return(*(int *)0); }
#undef mvwinchstr
-int mvwinchstr(
+int (mvwinchstr)(
WINDOW *a1,
int a2,
int a3,
@@ -914,7 +916,7 @@ int mvwinchstr(
{ return(*(int *)0); }
#undef mvwinnstr
-int mvwinnstr(
+int (mvwinnstr)(
WINDOW *a1,
int a2,
int a3,
@@ -923,7 +925,7 @@ int mvwinnstr(
{ return(*(int *)0); }
#undef mvwinsch
-int mvwinsch(
+int (mvwinsch)(
WINDOW *a1,
int a2,
int a3,
@@ -931,7 +933,7 @@ int mvwinsch(
{ return(*(int *)0); }
#undef mvwinsnstr
-int mvwinsnstr(
+int (mvwinsnstr)(
WINDOW *a1,
int a2,
int a3,
@@ -940,7 +942,7 @@ int mvwinsnstr(
{ return(*(int *)0); }
#undef mvwinsstr
-int mvwinsstr(
+int (mvwinsstr)(
WINDOW *a1,
int a2,
int a3,
@@ -948,7 +950,7 @@ int mvwinsstr(
{ return(*(int *)0); }
#undef mvwinstr
-int mvwinstr(
+int (mvwinstr)(
WINDOW *a1,
int a2,
int a3,
@@ -956,7 +958,7 @@ int mvwinstr(
{ return(*(int *)0); }
#undef mvwvline
-int mvwvline(
+int (mvwvline)(
WINDOW *a1,
int a2,
int a3,
@@ -965,117 +967,117 @@ int mvwvline(
{ return(*(int *)0); }
#undef PAIR_NUMBER
-int PAIR_NUMBER(
+int (PAIR_NUMBER)(
int z)
{ return(*(int *)0); }
#undef redrawwin
-int redrawwin(
+int (redrawwin)(
WINDOW *z)
{ return(*(int *)0); }
#undef refresh
-int refresh(void)
+int (refresh)(void)
{ return(*(int *)0); }
#undef scrl
-int scrl(
+int (scrl)(
int z)
{ return(*(int *)0); }
#undef scroll
-int scroll(
+int (scroll)(
WINDOW *z)
{ return(*(int *)0); }
#undef setscrreg
-int setscrreg(
+int (setscrreg)(
int a1,
int z)
{ return(*(int *)0); }
#undef standout
-int standout(void)
+int (standout)(void)
{ return(*(int *)0); }
#undef standend
-int standend(void)
+int (standend)(void)
{ return(*(int *)0); }
#undef timeout
-void timeout(
+void (timeout)(
int z)
{ /* void */ }
#undef touchline
-int touchline(
+int (touchline)(
WINDOW *a1,
int a2,
int z)
{ return(*(int *)0); }
#undef touchwin
-int touchwin(
+int (touchwin)(
WINDOW *z)
{ return(*(int *)0); }
#undef untouchwin
-int untouchwin(
+int (untouchwin)(
WINDOW *z)
{ return(*(int *)0); }
#undef vline
-int vline(
+int (vline)(
chtype a1,
int z)
{ return(*(int *)0); }
#undef vw_printw
-int vw_printw(
+int (vw_printw)(
WINDOW *a1,
const char *a2,
va_list z)
{ return(*(int *)0); }
#undef vw_scanw
-int vw_scanw(
+int (vw_scanw)(
WINDOW *a1,
char *a2,
va_list z)
{ return(*(int *)0); }
#undef waddchstr
-int waddchstr(
+int (waddchstr)(
WINDOW *a1,
const chtype *z)
{ return(*(int *)0); }
#undef waddstr
-int waddstr(
+int (waddstr)(
WINDOW *a1,
const char *z)
{ return(*(int *)0); }
#undef wattron
-int wattron(
+int (wattron)(
WINDOW *a1,
int z)
{ return(*(int *)0); }
#undef wattroff
-int wattroff(
+int (wattroff)(
WINDOW *a1,
int z)
{ return(*(int *)0); }
#undef wattrset
-int wattrset(
+int (wattrset)(
WINDOW *a1,
int z)
{ return(*(int *)0); }
#undef wattr_get
-int wattr_get(
+int (wattr_get)(
WINDOW *a1,
attr_t *a2,
short *a3,
@@ -1083,7 +1085,7 @@ int wattr_get(
{ return(*(int *)0); }
#undef wattr_set
-int wattr_set(
+int (wattr_set)(
WINDOW *a1,
attr_t a2,
short a3,
@@ -1091,168 +1093,168 @@ int wattr_set(
{ return(*(int *)0); }
#undef wdeleteln
-int wdeleteln(
+int (wdeleteln)(
WINDOW *z)
{ return(*(int *)0); }
#undef wgetstr
-int wgetstr(
+int (wgetstr)(
WINDOW *a1,
char *z)
{ return(*(int *)0); }
#undef winchstr
-int winchstr(
+int (winchstr)(
WINDOW *a1,
chtype *z)
{ return(*(int *)0); }
#undef winsertln
-int winsertln(
+int (winsertln)(
WINDOW *z)
{ return(*(int *)0); }
#undef winsstr
-int winsstr(
+int (winsstr)(
WINDOW *a1,
const char *z)
{ return(*(int *)0); }
#undef winstr
-int winstr(
+int (winstr)(
WINDOW *a1,
char *z)
{ return(*(int *)0); }
#undef wstandout
-int wstandout(
+int (wstandout)(
WINDOW *z)
{ return(*(int *)0); }
#undef wstandend
-int wstandend(
+int (wstandend)(
WINDOW *z)
{ return(*(int *)0); }
#undef getattrs
-int getattrs(
+int (getattrs)(
const WINDOW *z)
{ return(*(int *)0); }
#undef getcurx
-int getcurx(
+int (getcurx)(
const WINDOW *z)
{ return(*(int *)0); }
#undef getcury
-int getcury(
+int (getcury)(
const WINDOW *z)
{ return(*(int *)0); }
#undef getbegx
-int getbegx(
+int (getbegx)(
const WINDOW *z)
{ return(*(int *)0); }
#undef getbegy
-int getbegy(
+int (getbegy)(
const WINDOW *z)
{ return(*(int *)0); }
#undef getmaxx
-int getmaxx(
+int (getmaxx)(
const WINDOW *z)
{ return(*(int *)0); }
#undef getmaxy
-int getmaxy(
+int (getmaxy)(
const WINDOW *z)
{ return(*(int *)0); }
#undef getparx
-int getparx(
+int (getparx)(
const WINDOW *z)
{ return(*(int *)0); }
#undef getpary
-int getpary(
+int (getpary)(
const WINDOW *z)
{ return(*(int *)0); }
#undef wgetparent
-WINDOW *wgetparent(
+WINDOW *(wgetparent)(
const WINDOW *z)
{ return(*(WINDOW **)0); }
#undef is_cleared
-NCURSES_BOOL is_cleared(
+NCURSES_BOOL (is_cleared)(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
#undef is_idcok
-NCURSES_BOOL is_idcok(
+NCURSES_BOOL (is_idcok)(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
#undef is_idlok
-NCURSES_BOOL is_idlok(
+NCURSES_BOOL (is_idlok)(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
#undef is_immedok
-NCURSES_BOOL is_immedok(
+NCURSES_BOOL (is_immedok)(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
#undef is_keypad
-NCURSES_BOOL is_keypad(
+NCURSES_BOOL (is_keypad)(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
#undef is_leaveok
-NCURSES_BOOL is_leaveok(
+NCURSES_BOOL (is_leaveok)(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
#undef is_nodelay
-NCURSES_BOOL is_nodelay(
+NCURSES_BOOL (is_nodelay)(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
#undef is_notimeout
-NCURSES_BOOL is_notimeout(
+NCURSES_BOOL (is_notimeout)(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
#undef is_pad
-NCURSES_BOOL is_pad(
+NCURSES_BOOL (is_pad)(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
#undef is_scrollok
-NCURSES_BOOL is_scrollok(
+NCURSES_BOOL (is_scrollok)(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
#undef is_subwin
-NCURSES_BOOL is_subwin(
+NCURSES_BOOL (is_subwin)(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
#undef is_syncok
-NCURSES_BOOL is_syncok(
+NCURSES_BOOL (is_syncok)(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
#undef wgetscrreg
-int wgetscrreg(
+int (wgetscrreg)(
const WINDOW *a1,
int *a2,
int *z)
{ return(*(int *)0); }
#undef mouse_trafo
-NCURSES_BOOL mouse_trafo(
+NCURSES_BOOL (mouse_trafo)(
int *a1,
int *a2,
NCURSES_BOOL z)
@@ -1532,6 +1534,23 @@ void _nc_mvcur_wrap_sp(
void _nc_mvcur_wrap(void)
{ /* void */ }
+#undef _nc_mvcur_sp
+int _nc_mvcur_sp(
+ SCREEN *sp,
+ int yold,
+ int xold,
+ int ynew,
+ int xnew)
+ { return(*(int *)0); }
+
+#undef _nc_mvcur
+int _nc_mvcur(
+ int yold,
+ int xold,
+ int ynew,
+ int xnew)
+ { return(*(int *)0); }
+
#undef mvcur_sp
int mvcur_sp(
SCREEN *sp,
@@ -1598,6 +1617,8 @@ SCREEN *newterm(
/* ./base/lib_newwin.c */
+#include "/usr/lib/gcc/x86_64-linux-gnu/4.4.5/include/stddef.h"
+
#undef _nc_freewin
int _nc_freewin(
WINDOW *win)
@@ -1987,7 +2008,7 @@ int _nc_setupscreen_sp(
int slines,
int scolumns,
FILE *output,
- NCURSES_BOOL filtered,
+ int filtered,
int slk_format)
{ return(*(int *)0); }
@@ -1996,7 +2017,7 @@ int _nc_setupscreen(
int slines,
int scolumns,
FILE *output,
- NCURSES_BOOL filtered,
+ int filtered,
int slk_format)
{ return(*(int *)0); }
@@ -2276,7 +2297,7 @@ char *_tracemouse(
#undef _nc_signal_handler
void _nc_signal_handler(
- NCURSES_BOOL enable)
+ int enable)
{ /* void */ }
/* ./base/lib_ungetch.c */
@@ -2513,12 +2534,6 @@ char *_nc_varargs(
va_list ap)
{ return(*(char **)0); }
-/* ./base/memmove.c */
-
-#undef _nc_memmove
-void _nc_memmove(void)
- { /* void */ }
-
/* ./base/vsscanf.c */
#undef _nc_vsscanf
@@ -2778,7 +2793,7 @@ void _nc_align_termtype(
#undef _nc_copy_termtype
void _nc_copy_termtype(
TERMTYPE *dst,
- TERMTYPE *src)
+ const TERMTYPE *src)
{ /* void */ }
/* ./codes.c */
@@ -2882,6 +2897,8 @@ struct name_table_entry const *_nc_find_type_entry(
/* ./tinfo/db_iterator.c */
+#include <time.h>
+
#undef _nc_tic_dir
const char *_nc_tic_dir(
const char *path)
@@ -2973,6 +2990,12 @@ int _nc_getenv_num(
const char *name)
{ return(*(int *)0); }
+#undef _nc_setenv_num
+void _nc_setenv_num(
+ const char *name,
+ int value)
+ { /* void */ }
+
/* ./tinfo/home_terminfo.c */
#undef _nc_home_terminfo
@@ -3313,7 +3336,7 @@ int _nc_putp_flush_sp(
#undef _nc_keypad
int _nc_keypad(
SCREEN *sp,
- NCURSES_BOOL flag)
+ int flag)
{ return(*(int *)0); }
/* ./tinfo/lib_raw.c */
@@ -3444,11 +3467,22 @@ void use_env_sp(
NCURSES_BOOL f)
{ /* void */ }
+#undef use_tioctl_sp
+void use_tioctl_sp(
+ SCREEN *sp,
+ NCURSES_BOOL f)
+ { /* void */ }
+
#undef use_env
void use_env(
NCURSES_BOOL f)
{ /* void */ }
+#undef use_tioctl
+void use_tioctl(
+ NCURSES_BOOL f)
+ { /* void */ }
+
#undef _nc_get_screensize
void _nc_get_screensize(
SCREEN *sp,
@@ -3470,7 +3504,7 @@ int _nc_setup_tinfo(
#undef _nc_tinfo_cmdch
void _nc_tinfo_cmdch(
TERMINAL *termp,
- char proto)
+ int proto)
{ /* void */ }
#undef _nc_get_locale
@@ -3491,7 +3525,7 @@ int _nc_setupterm(
char *tname,
int Filedes,
int *errret,
- NCURSES_BOOL reuse)
+ int reuse)
{ return(*(int *)0); }
#undef new_prescr
@@ -3630,7 +3664,7 @@ int _nc_tparm_err;
int _nc_tparm_analyze(
const char *string,
char *p_is_s[9],
- int *popcount)
+ int *_nc_popcount)
{ return(*(int *)0); }
#undef tparm
@@ -3650,7 +3684,7 @@ char *tiparm(
#undef PC
char PC;
#undef ospeed
-NCURSES_OSPEED ospeed;
+short ospeed;
#undef _nc_nulls_sent
int _nc_nulls_sent;
@@ -3690,12 +3724,28 @@ int _nc_outch(
int ch)
{ return(*(int *)0); }
+#undef _nc_putchar_sp
+int _nc_putchar_sp(
+ SCREEN *sp,
+ int ch)
+ { return(*(int *)0); }
+
+#undef _nc_putchar
+int _nc_putchar(
+ int ch)
+ { return(*(int *)0); }
+
#undef putp_sp
int putp_sp(
SCREEN *sp,
const char *string)
{ return(*(int *)0); }
+#undef putp
+int putp(
+ const char *string)
+ { return(*(int *)0); }
+
#undef _nc_putp_sp
int _nc_putp_sp(
SCREEN *sp,
@@ -3703,11 +3753,6 @@ int _nc_putp_sp(
const char *string)
{ return(*(int *)0); }
-#undef putp
-int putp(
- const char *string)
- { return(*(int *)0); }
-
#undef _nc_putp
int _nc_putp(
const char *name,
@@ -3772,12 +3817,12 @@ void _tracef(
#undef _nc_retrace_bool
NCURSES_BOOL _nc_retrace_bool(
- NCURSES_BOOL code)
+ int code)
{ return(*(NCURSES_BOOL *)0); }
#undef _nc_retrace_char
char _nc_retrace_char(
- char code)
+ int code)
{ return(*(char *)0); }
#undef _nc_retrace_int
@@ -4033,10 +4078,30 @@ char *const *_nc_strnames(void)
char *const *_nc_strfnames(void)
{ return(*(char **)0); }
+/* ./tinfo/obsolete.c */
+
+#undef _nc_set_buffer_sp
+void _nc_set_buffer_sp(
+ SCREEN *sp,
+ FILE *ofp,
+ int buffered)
+ { /* void */ }
+
+#undef _nc_set_buffer
+void _nc_set_buffer(
+ FILE *ofp,
+ int buffered)
+ { /* void */ }
+
/* ./tinfo/read_entry.c */
#include <hashed_db.h>
+#undef _nc_init_termtype
+void _nc_init_termtype(
+ TERMTYPE *const tp)
+ { /* void */ }
+
#undef _nc_read_termtype
int _nc_read_termtype(
TERMTYPE *ptr,
@@ -4061,25 +4126,8 @@ int _nc_read_entry(
#include <sys/types.h>
-#undef _nc_read_termcap_entry
-int _nc_read_termcap_entry(
- const char *const tn,
- TERMTYPE *const tp)
- { return(*(int *)0); }
-
-/* ./tinfo/setbuf.c */
-
-#undef _nc_set_buffer_sp
-void _nc_set_buffer_sp(
- SCREEN *sp,
- FILE *ofp,
- NCURSES_BOOL buffered)
- { /* void */ }
-
-#undef _nc_set_buffer
-void _nc_set_buffer(
- FILE *ofp,
- NCURSES_BOOL buffered)
+#undef _nc_read_termcap
+void _nc_read_termcap(void)
{ /* void */ }
/* ./tinfo/strings.c */
@@ -4305,6 +4353,8 @@ int _nc_resolve_uses(
#undef _nc_syntax
int _nc_syntax;
+#undef _nc_strict_bsd
+int _nc_strict_bsd;
#undef _nc_curr_file_pos
long _nc_curr_file_pos;
#undef _nc_comment_start
diff --git a/ncurses/llib-lncursestw b/ncurses/llib-lncursestw
index 5230bc758aff..b1919c43e822 100644
--- a/ncurses/llib-lncursestw
+++ b/ncurses/llib-lncursestw
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2009-2010,2011 Free Software Foundation, Inc. *
+ * Copyright (c) 2009-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 *
@@ -27,7 +27,7 @@
****************************************************************************/
/****************************************************************************
- * Author: Thomas E. Dickey 2009-2010,2011 *
+ * Author: Thomas E. Dickey 2009-on *
****************************************************************************/
/* LINTLIBRARY */
@@ -369,17 +369,17 @@ int pair_content(
#undef _nc_do_color_sp
void _nc_do_color_sp(
SCREEN *sp,
- short old_pair,
- short pair,
- NCURSES_BOOL reverse,
+ int old_pair,
+ int pair,
+ int reverse,
NCURSES_OUTC_sp outc)
{ /* void */ }
#undef _nc_do_color
void _nc_do_color(
- short old_pair,
- short pair,
- NCURSES_BOOL reverse,
+ int old_pair,
+ int pair,
+ int reverse,
NCURSES_OUTC outc)
{ /* void */ }
@@ -457,86 +457,88 @@ int flash(void)
/* ./lib_gen.c */
+#include <ncurses_cfg.h>
+
#undef addch
-int addch(
+int (addch)(
const chtype z)
{ return(*(int *)0); }
#undef addchnstr
-int addchnstr(
+int (addchnstr)(
const chtype *a1,
int z)
{ return(*(int *)0); }
#undef addchstr
-int addchstr(
+int (addchstr)(
const chtype *z)
{ return(*(int *)0); }
#undef addnstr
-int addnstr(
+int (addnstr)(
const char *a1,
int z)
{ return(*(int *)0); }
#undef addstr
-int addstr(
+int (addstr)(
const char *z)
{ return(*(int *)0); }
#undef attroff
-int attroff(
- NCURSES_ATTR_T z)
+int (attroff)(
+ int z)
{ return(*(int *)0); }
#undef attron
-int attron(
- NCURSES_ATTR_T z)
+int (attron)(
+ int z)
{ return(*(int *)0); }
#undef attrset
-int attrset(
- NCURSES_ATTR_T z)
+int (attrset)(
+ int z)
{ return(*(int *)0); }
#undef attr_get
-int attr_get(
+int (attr_get)(
attr_t *a1,
short *a2,
void *z)
{ return(*(int *)0); }
#undef attr_off
-int attr_off(
+int (attr_off)(
attr_t a1,
void *z)
{ return(*(int *)0); }
#undef attr_on
-int attr_on(
+int (attr_on)(
attr_t a1,
void *z)
{ return(*(int *)0); }
#undef attr_set
-int attr_set(
+int (attr_set)(
attr_t a1,
short a2,
void *z)
{ return(*(int *)0); }
#undef bkgd
-int bkgd(
+int (bkgd)(
chtype z)
{ return(*(int *)0); }
#undef bkgdset
-void bkgdset(
+void (bkgdset)(
chtype z)
{ /* void */ }
#undef border
-int border(
+int (border)(
chtype a1,
chtype a2,
chtype a3,
@@ -548,14 +550,14 @@ int border(
{ return(*(int *)0); }
#undef box
-int box(
+int (box)(
WINDOW *a1,
chtype a2,
chtype z)
{ return(*(int *)0); }
#undef chgat
-int chgat(
+int (chgat)(
int a1,
attr_t a2,
short a3,
@@ -563,137 +565,137 @@ int chgat(
{ return(*(int *)0); }
#undef clear
-int clear(void)
+int (clear)(void)
{ return(*(int *)0); }
#undef clrtobot
-int clrtobot(void)
+int (clrtobot)(void)
{ return(*(int *)0); }
#undef clrtoeol
-int clrtoeol(void)
+int (clrtoeol)(void)
{ return(*(int *)0); }
#undef color_set
-int color_set(
+int (color_set)(
short a1,
void *z)
{ return(*(int *)0); }
#undef COLOR_PAIR
-int COLOR_PAIR(
+int (COLOR_PAIR)(
int z)
{ return(*(int *)0); }
#undef delch
-int delch(void)
+int (delch)(void)
{ return(*(int *)0); }
#undef deleteln
-int deleteln(void)
+int (deleteln)(void)
{ return(*(int *)0); }
#undef echochar
-int echochar(
+int (echochar)(
const chtype z)
{ return(*(int *)0); }
#undef erase
-int erase(void)
+int (erase)(void)
{ return(*(int *)0); }
#undef getbkgd
-chtype getbkgd(
+chtype (getbkgd)(
WINDOW *z)
{ return(*(chtype *)0); }
#undef getch
-int getch(void)
+int (getch)(void)
{ return(*(int *)0); }
#undef getnstr
-int getnstr(
+int (getnstr)(
char *a1,
int z)
{ return(*(int *)0); }
#undef getstr
-int getstr(
+int (getstr)(
char *z)
{ return(*(int *)0); }
#undef hline
-int hline(
+int (hline)(
chtype a1,
int z)
{ return(*(int *)0); }
#undef inch
-chtype inch(void)
+chtype (inch)(void)
{ return(*(chtype *)0); }
#undef inchnstr
-int inchnstr(
+int (inchnstr)(
chtype *a1,
int z)
{ return(*(int *)0); }
#undef inchstr
-int inchstr(
+int (inchstr)(
chtype *z)
{ return(*(int *)0); }
#undef innstr
-int innstr(
+int (innstr)(
char *a1,
int z)
{ return(*(int *)0); }
#undef insch
-int insch(
+int (insch)(
chtype z)
{ return(*(int *)0); }
#undef insdelln
-int insdelln(
+int (insdelln)(
int z)
{ return(*(int *)0); }
#undef insertln
-int insertln(void)
+int (insertln)(void)
{ return(*(int *)0); }
#undef insnstr
-int insnstr(
+int (insnstr)(
const char *a1,
int z)
{ return(*(int *)0); }
#undef insstr
-int insstr(
+int (insstr)(
const char *z)
{ return(*(int *)0); }
#undef instr
-int instr(
+int (instr)(
char *z)
{ return(*(int *)0); }
#undef move
-int move(
+int (move)(
int a1,
int z)
{ return(*(int *)0); }
#undef mvaddch
-int mvaddch(
+int (mvaddch)(
int a1,
int a2,
const chtype z)
{ return(*(int *)0); }
#undef mvaddchnstr
-int mvaddchnstr(
+int (mvaddchnstr)(
int a1,
int a2,
const chtype *a3,
@@ -701,14 +703,14 @@ int mvaddchnstr(
{ return(*(int *)0); }
#undef mvaddchstr
-int mvaddchstr(
+int (mvaddchstr)(
int a1,
int a2,
const chtype *z)
{ return(*(int *)0); }
#undef mvaddnstr
-int mvaddnstr(
+int (mvaddnstr)(
int a1,
int a2,
const char *a3,
@@ -716,14 +718,14 @@ int mvaddnstr(
{ return(*(int *)0); }
#undef mvaddstr
-int mvaddstr(
+int (mvaddstr)(
int a1,
int a2,
const char *z)
{ return(*(int *)0); }
#undef mvchgat
-int mvchgat(
+int (mvchgat)(
int a1,
int a2,
int a3,
@@ -733,19 +735,19 @@ int mvchgat(
{ return(*(int *)0); }
#undef mvdelch
-int mvdelch(
+int (mvdelch)(
int a1,
int z)
{ return(*(int *)0); }
#undef mvgetch
-int mvgetch(
+int (mvgetch)(
int a1,
int z)
{ return(*(int *)0); }
#undef mvgetnstr
-int mvgetnstr(
+int (mvgetnstr)(
int a1,
int a2,
char *a3,
@@ -753,14 +755,14 @@ int mvgetnstr(
{ return(*(int *)0); }
#undef mvgetstr
-int mvgetstr(
+int (mvgetstr)(
int a1,
int a2,
char *z)
{ return(*(int *)0); }
#undef mvhline
-int mvhline(
+int (mvhline)(
int a1,
int a2,
chtype a3,
@@ -768,13 +770,13 @@ int mvhline(
{ return(*(int *)0); }
#undef mvinch
-chtype mvinch(
+chtype (mvinch)(
int a1,
int z)
{ return(*(chtype *)0); }
#undef mvinchnstr
-int mvinchnstr(
+int (mvinchnstr)(
int a1,
int a2,
chtype *a3,
@@ -782,14 +784,14 @@ int mvinchnstr(
{ return(*(int *)0); }
#undef mvinchstr
-int mvinchstr(
+int (mvinchstr)(
int a1,
int a2,
chtype *z)
{ return(*(int *)0); }
#undef mvinnstr
-int mvinnstr(
+int (mvinnstr)(
int a1,
int a2,
char *a3,
@@ -797,14 +799,14 @@ int mvinnstr(
{ return(*(int *)0); }
#undef mvinsch
-int mvinsch(
+int (mvinsch)(
int a1,
int a2,
chtype z)
{ return(*(int *)0); }
#undef mvinsnstr
-int mvinsnstr(
+int (mvinsnstr)(
int a1,
int a2,
const char *a3,
@@ -812,21 +814,21 @@ int mvinsnstr(
{ return(*(int *)0); }
#undef mvinsstr
-int mvinsstr(
+int (mvinsstr)(
int a1,
int a2,
const char *z)
{ return(*(int *)0); }
#undef mvinstr
-int mvinstr(
+int (mvinstr)(
int a1,
int a2,
char *z)
{ return(*(int *)0); }
#undef mvvline
-int mvvline(
+int (mvvline)(
int a1,
int a2,
chtype a3,
@@ -834,7 +836,7 @@ int mvvline(
{ return(*(int *)0); }
#undef mvwaddch
-int mvwaddch(
+int (mvwaddch)(
WINDOW *a1,
int a2,
int a3,
@@ -842,7 +844,7 @@ int mvwaddch(
{ return(*(int *)0); }
#undef mvwaddchnstr
-int mvwaddchnstr(
+int (mvwaddchnstr)(
WINDOW *a1,
int a2,
int a3,
@@ -851,7 +853,7 @@ int mvwaddchnstr(
{ return(*(int *)0); }
#undef mvwaddchstr
-int mvwaddchstr(
+int (mvwaddchstr)(
WINDOW *a1,
int a2,
int a3,
@@ -859,7 +861,7 @@ int mvwaddchstr(
{ return(*(int *)0); }
#undef mvwaddnstr
-int mvwaddnstr(
+int (mvwaddnstr)(
WINDOW *a1,
int a2,
int a3,
@@ -868,7 +870,7 @@ int mvwaddnstr(
{ return(*(int *)0); }
#undef mvwaddstr
-int mvwaddstr(
+int (mvwaddstr)(
WINDOW *a1,
int a2,
int a3,
@@ -876,7 +878,7 @@ int mvwaddstr(
{ return(*(int *)0); }
#undef mvwchgat
-int mvwchgat(
+int (mvwchgat)(
WINDOW *a1,
int a2,
int a3,
@@ -887,21 +889,21 @@ int mvwchgat(
{ return(*(int *)0); }
#undef mvwdelch
-int mvwdelch(
+int (mvwdelch)(
WINDOW *a1,
int a2,
int z)
{ return(*(int *)0); }
#undef mvwgetch
-int mvwgetch(
+int (mvwgetch)(
WINDOW *a1,
int a2,
int z)
{ return(*(int *)0); }
#undef mvwgetnstr
-int mvwgetnstr(
+int (mvwgetnstr)(
WINDOW *a1,
int a2,
int a3,
@@ -910,7 +912,7 @@ int mvwgetnstr(
{ return(*(int *)0); }
#undef mvwgetstr
-int mvwgetstr(
+int (mvwgetstr)(
WINDOW *a1,
int a2,
int a3,
@@ -918,7 +920,7 @@ int mvwgetstr(
{ return(*(int *)0); }
#undef mvwhline
-int mvwhline(
+int (mvwhline)(
WINDOW *a1,
int a2,
int a3,
@@ -927,14 +929,14 @@ int mvwhline(
{ return(*(int *)0); }
#undef mvwinch
-chtype mvwinch(
+chtype (mvwinch)(
WINDOW *a1,
int a2,
int z)
{ return(*(chtype *)0); }
#undef mvwinchnstr
-int mvwinchnstr(
+int (mvwinchnstr)(
WINDOW *a1,
int a2,
int a3,
@@ -943,7 +945,7 @@ int mvwinchnstr(
{ return(*(int *)0); }
#undef mvwinchstr
-int mvwinchstr(
+int (mvwinchstr)(
WINDOW *a1,
int a2,
int a3,
@@ -951,7 +953,7 @@ int mvwinchstr(
{ return(*(int *)0); }
#undef mvwinnstr
-int mvwinnstr(
+int (mvwinnstr)(
WINDOW *a1,
int a2,
int a3,
@@ -960,7 +962,7 @@ int mvwinnstr(
{ return(*(int *)0); }
#undef mvwinsch
-int mvwinsch(
+int (mvwinsch)(
WINDOW *a1,
int a2,
int a3,
@@ -968,7 +970,7 @@ int mvwinsch(
{ return(*(int *)0); }
#undef mvwinsnstr
-int mvwinsnstr(
+int (mvwinsnstr)(
WINDOW *a1,
int a2,
int a3,
@@ -977,7 +979,7 @@ int mvwinsnstr(
{ return(*(int *)0); }
#undef mvwinsstr
-int mvwinsstr(
+int (mvwinsstr)(
WINDOW *a1,
int a2,
int a3,
@@ -985,7 +987,7 @@ int mvwinsstr(
{ return(*(int *)0); }
#undef mvwinstr
-int mvwinstr(
+int (mvwinstr)(
WINDOW *a1,
int a2,
int a3,
@@ -993,7 +995,7 @@ int mvwinstr(
{ return(*(int *)0); }
#undef mvwvline
-int mvwvline(
+int (mvwvline)(
WINDOW *a1,
int a2,
int a3,
@@ -1002,129 +1004,129 @@ int mvwvline(
{ return(*(int *)0); }
#undef PAIR_NUMBER
-int PAIR_NUMBER(
+int (PAIR_NUMBER)(
int z)
{ return(*(int *)0); }
#undef redrawwin
-int redrawwin(
+int (redrawwin)(
WINDOW *z)
{ return(*(int *)0); }
#undef refresh
-int refresh(void)
+int (refresh)(void)
{ return(*(int *)0); }
#undef scrl
-int scrl(
+int (scrl)(
int z)
{ return(*(int *)0); }
#undef scroll
-int scroll(
+int (scroll)(
WINDOW *z)
{ return(*(int *)0); }
#undef setscrreg
-int setscrreg(
+int (setscrreg)(
int a1,
int z)
{ return(*(int *)0); }
#undef slk_attr_off
-int slk_attr_off(
+int (slk_attr_off)(
const attr_t a1,
void *z)
{ return(*(int *)0); }
#undef slk_attr_on
-int slk_attr_on(
+int (slk_attr_on)(
attr_t a1,
void *z)
{ return(*(int *)0); }
#undef standout
-int standout(void)
+int (standout)(void)
{ return(*(int *)0); }
#undef standend
-int standend(void)
+int (standend)(void)
{ return(*(int *)0); }
#undef timeout
-void timeout(
+void (timeout)(
int z)
{ /* void */ }
#undef touchline
-int touchline(
+int (touchline)(
WINDOW *a1,
int a2,
int z)
{ return(*(int *)0); }
#undef touchwin
-int touchwin(
+int (touchwin)(
WINDOW *z)
{ return(*(int *)0); }
#undef untouchwin
-int untouchwin(
+int (untouchwin)(
WINDOW *z)
{ return(*(int *)0); }
#undef vline
-int vline(
+int (vline)(
chtype a1,
int z)
{ return(*(int *)0); }
#undef vw_printw
-int vw_printw(
+int (vw_printw)(
WINDOW *a1,
const char *a2,
va_list z)
{ return(*(int *)0); }
#undef vw_scanw
-int vw_scanw(
+int (vw_scanw)(
WINDOW *a1,
char *a2,
va_list z)
{ return(*(int *)0); }
#undef waddchstr
-int waddchstr(
+int (waddchstr)(
WINDOW *a1,
const chtype *z)
{ return(*(int *)0); }
#undef waddstr
-int waddstr(
+int (waddstr)(
WINDOW *a1,
const char *z)
{ return(*(int *)0); }
#undef wattron
-int wattron(
+int (wattron)(
WINDOW *a1,
int z)
{ return(*(int *)0); }
#undef wattroff
-int wattroff(
+int (wattroff)(
WINDOW *a1,
int z)
{ return(*(int *)0); }
#undef wattrset
-int wattrset(
+int (wattrset)(
WINDOW *a1,
int z)
{ return(*(int *)0); }
#undef wattr_get
-int wattr_get(
+int (wattr_get)(
WINDOW *a1,
attr_t *a2,
short *a3,
@@ -1132,7 +1134,7 @@ int wattr_get(
{ return(*(int *)0); }
#undef wattr_set
-int wattr_set(
+int (wattr_set)(
WINDOW *a1,
attr_t a2,
short a3,
@@ -1140,205 +1142,205 @@ int wattr_set(
{ return(*(int *)0); }
#undef wdeleteln
-int wdeleteln(
+int (wdeleteln)(
WINDOW *z)
{ return(*(int *)0); }
#undef wgetstr
-int wgetstr(
+int (wgetstr)(
WINDOW *a1,
char *z)
{ return(*(int *)0); }
#undef winchstr
-int winchstr(
+int (winchstr)(
WINDOW *a1,
chtype *z)
{ return(*(int *)0); }
#undef winsertln
-int winsertln(
+int (winsertln)(
WINDOW *z)
{ return(*(int *)0); }
#undef winsstr
-int winsstr(
+int (winsstr)(
WINDOW *a1,
const char *z)
{ return(*(int *)0); }
#undef winstr
-int winstr(
+int (winstr)(
WINDOW *a1,
char *z)
{ return(*(int *)0); }
#undef wstandout
-int wstandout(
+int (wstandout)(
WINDOW *z)
{ return(*(int *)0); }
#undef wstandend
-int wstandend(
+int (wstandend)(
WINDOW *z)
{ return(*(int *)0); }
#undef getattrs
-int getattrs(
+int (getattrs)(
const WINDOW *z)
{ return(*(int *)0); }
#undef getcurx
-int getcurx(
+int (getcurx)(
const WINDOW *z)
{ return(*(int *)0); }
#undef getcury
-int getcury(
+int (getcury)(
const WINDOW *z)
{ return(*(int *)0); }
#undef getbegx
-int getbegx(
+int (getbegx)(
const WINDOW *z)
{ return(*(int *)0); }
#undef getbegy
-int getbegy(
+int (getbegy)(
const WINDOW *z)
{ return(*(int *)0); }
#undef getmaxx
-int getmaxx(
+int (getmaxx)(
const WINDOW *z)
{ return(*(int *)0); }
#undef getmaxy
-int getmaxy(
+int (getmaxy)(
const WINDOW *z)
{ return(*(int *)0); }
#undef getparx
-int getparx(
+int (getparx)(
const WINDOW *z)
{ return(*(int *)0); }
#undef getpary
-int getpary(
+int (getpary)(
const WINDOW *z)
{ return(*(int *)0); }
#undef wgetparent
-WINDOW *wgetparent(
+WINDOW *(wgetparent)(
const WINDOW *z)
{ return(*(WINDOW **)0); }
#undef is_cleared
-NCURSES_BOOL is_cleared(
+NCURSES_BOOL (is_cleared)(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
#undef is_idcok
-NCURSES_BOOL is_idcok(
+NCURSES_BOOL (is_idcok)(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
#undef is_idlok
-NCURSES_BOOL is_idlok(
+NCURSES_BOOL (is_idlok)(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
#undef is_immedok
-NCURSES_BOOL is_immedok(
+NCURSES_BOOL (is_immedok)(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
#undef is_keypad
-NCURSES_BOOL is_keypad(
+NCURSES_BOOL (is_keypad)(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
#undef is_leaveok
-NCURSES_BOOL is_leaveok(
+NCURSES_BOOL (is_leaveok)(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
#undef is_nodelay
-NCURSES_BOOL is_nodelay(
+NCURSES_BOOL (is_nodelay)(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
#undef is_notimeout
-NCURSES_BOOL is_notimeout(
+NCURSES_BOOL (is_notimeout)(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
#undef is_pad
-NCURSES_BOOL is_pad(
+NCURSES_BOOL (is_pad)(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
#undef is_scrollok
-NCURSES_BOOL is_scrollok(
+NCURSES_BOOL (is_scrollok)(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
#undef is_subwin
-NCURSES_BOOL is_subwin(
+NCURSES_BOOL (is_subwin)(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
#undef is_syncok
-NCURSES_BOOL is_syncok(
+NCURSES_BOOL (is_syncok)(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
#undef wgetscrreg
-int wgetscrreg(
+int (wgetscrreg)(
const WINDOW *a1,
int *a2,
int *z)
{ return(*(int *)0); }
#undef add_wch
-int add_wch(
+int (add_wch)(
const cchar_t *z)
{ return(*(int *)0); }
#undef add_wchnstr
-int add_wchnstr(
+int (add_wchnstr)(
const cchar_t *a1,
int z)
{ return(*(int *)0); }
#undef add_wchstr
-int add_wchstr(
+int (add_wchstr)(
const cchar_t *z)
{ return(*(int *)0); }
#undef addnwstr
-int addnwstr(
+int (addnwstr)(
const wchar_t *a1,
int z)
{ return(*(int *)0); }
#undef addwstr
-int addwstr(
+int (addwstr)(
const wchar_t *z)
{ return(*(int *)0); }
#undef bkgrnd
-int bkgrnd(
+int (bkgrnd)(
const cchar_t *z)
{ return(*(int *)0); }
#undef bkgrndset
-void bkgrndset(
+void (bkgrndset)(
const cchar_t *z)
{ /* void */ }
#undef border_set
-int border_set(
+int (border_set)(
const cchar_t *a1,
const cchar_t *a2,
const cchar_t *a3,
@@ -1350,96 +1352,96 @@ int border_set(
{ return(*(int *)0); }
#undef box_set
-int box_set(
+int (box_set)(
WINDOW *a1,
const cchar_t *a2,
const cchar_t *z)
{ return(*(int *)0); }
#undef echo_wchar
-int echo_wchar(
+int (echo_wchar)(
const cchar_t *z)
{ return(*(int *)0); }
#undef get_wch
-int get_wch(
+int (get_wch)(
wint_t *z)
{ return(*(int *)0); }
#undef get_wstr
-int get_wstr(
+int (get_wstr)(
wint_t *z)
{ return(*(int *)0); }
#undef getbkgrnd
-int getbkgrnd(
+int (getbkgrnd)(
cchar_t *z)
{ return(*(int *)0); }
#undef getn_wstr
-int getn_wstr(
+int (getn_wstr)(
wint_t *a1,
int z)
{ return(*(int *)0); }
#undef hline_set
-int hline_set(
+int (hline_set)(
const cchar_t *a1,
int z)
{ return(*(int *)0); }
#undef in_wch
-int in_wch(
+int (in_wch)(
cchar_t *z)
{ return(*(int *)0); }
#undef in_wchnstr
-int in_wchnstr(
+int (in_wchnstr)(
cchar_t *a1,
int z)
{ return(*(int *)0); }
#undef in_wchstr
-int in_wchstr(
+int (in_wchstr)(
cchar_t *z)
{ return(*(int *)0); }
#undef innwstr
-int innwstr(
+int (innwstr)(
wchar_t *a1,
int z)
{ return(*(int *)0); }
#undef ins_nwstr
-int ins_nwstr(
+int (ins_nwstr)(
const wchar_t *a1,
int z)
{ return(*(int *)0); }
#undef ins_wch
-int ins_wch(
+int (ins_wch)(
const cchar_t *z)
{ return(*(int *)0); }
#undef ins_wstr
-int ins_wstr(
+int (ins_wstr)(
const wchar_t *z)
{ return(*(int *)0); }
#undef inwstr
-int inwstr(
+int (inwstr)(
wchar_t *z)
{ return(*(int *)0); }
#undef mvadd_wch
-int mvadd_wch(
+int (mvadd_wch)(
int a1,
int a2,
const cchar_t *z)
{ return(*(int *)0); }
#undef mvadd_wchnstr
-int mvadd_wchnstr(
+int (mvadd_wchnstr)(
int a1,
int a2,
const cchar_t *a3,
@@ -1447,14 +1449,14 @@ int mvadd_wchnstr(
{ return(*(int *)0); }
#undef mvadd_wchstr
-int mvadd_wchstr(
+int (mvadd_wchstr)(
int a1,
int a2,
const cchar_t *z)
{ return(*(int *)0); }
#undef mvaddnwstr
-int mvaddnwstr(
+int (mvaddnwstr)(
int a1,
int a2,
const wchar_t *a3,
@@ -1462,28 +1464,28 @@ int mvaddnwstr(
{ return(*(int *)0); }
#undef mvaddwstr
-int mvaddwstr(
+int (mvaddwstr)(
int a1,
int a2,
const wchar_t *z)
{ return(*(int *)0); }
#undef mvget_wch
-int mvget_wch(
+int (mvget_wch)(
int a1,
int a2,
wint_t *z)
{ return(*(int *)0); }
#undef mvget_wstr
-int mvget_wstr(
+int (mvget_wstr)(
int a1,
int a2,
wint_t *z)
{ return(*(int *)0); }
#undef mvgetn_wstr
-int mvgetn_wstr(
+int (mvgetn_wstr)(
int a1,
int a2,
wint_t *a3,
@@ -1491,7 +1493,7 @@ int mvgetn_wstr(
{ return(*(int *)0); }
#undef mvhline_set
-int mvhline_set(
+int (mvhline_set)(
int a1,
int a2,
const cchar_t *a3,
@@ -1499,14 +1501,14 @@ int mvhline_set(
{ return(*(int *)0); }
#undef mvin_wch
-int mvin_wch(
+int (mvin_wch)(
int a1,
int a2,
cchar_t *z)
{ return(*(int *)0); }
#undef mvin_wchnstr
-int mvin_wchnstr(
+int (mvin_wchnstr)(
int a1,
int a2,
cchar_t *a3,
@@ -1514,14 +1516,14 @@ int mvin_wchnstr(
{ return(*(int *)0); }
#undef mvin_wchstr
-int mvin_wchstr(
+int (mvin_wchstr)(
int a1,
int a2,
cchar_t *z)
{ return(*(int *)0); }
#undef mvinnwstr
-int mvinnwstr(
+int (mvinnwstr)(
int a1,
int a2,
wchar_t *a3,
@@ -1529,7 +1531,7 @@ int mvinnwstr(
{ return(*(int *)0); }
#undef mvins_nwstr
-int mvins_nwstr(
+int (mvins_nwstr)(
int a1,
int a2,
const wchar_t *a3,
@@ -1537,28 +1539,28 @@ int mvins_nwstr(
{ return(*(int *)0); }
#undef mvins_wch
-int mvins_wch(
+int (mvins_wch)(
int a1,
int a2,
const cchar_t *z)
{ return(*(int *)0); }
#undef mvins_wstr
-int mvins_wstr(
+int (mvins_wstr)(
int a1,
int a2,
const wchar_t *z)
{ return(*(int *)0); }
#undef mvinwstr
-int mvinwstr(
+int (mvinwstr)(
int a1,
int a2,
wchar_t *z)
{ return(*(int *)0); }
#undef mvvline_set
-int mvvline_set(
+int (mvvline_set)(
int a1,
int a2,
const cchar_t *a3,
@@ -1566,7 +1568,7 @@ int mvvline_set(
{ return(*(int *)0); }
#undef mvwadd_wch
-int mvwadd_wch(
+int (mvwadd_wch)(
WINDOW *a1,
int a2,
int a3,
@@ -1574,7 +1576,7 @@ int mvwadd_wch(
{ return(*(int *)0); }
#undef mvwadd_wchnstr
-int mvwadd_wchnstr(
+int (mvwadd_wchnstr)(
WINDOW *a1,
int a2,
int a3,
@@ -1583,7 +1585,7 @@ int mvwadd_wchnstr(
{ return(*(int *)0); }
#undef mvwadd_wchstr
-int mvwadd_wchstr(
+int (mvwadd_wchstr)(
WINDOW *a1,
int a2,
int a3,
@@ -1591,7 +1593,7 @@ int mvwadd_wchstr(
{ return(*(int *)0); }
#undef mvwaddnwstr
-int mvwaddnwstr(
+int (mvwaddnwstr)(
WINDOW *a1,
int a2,
int a3,
@@ -1600,7 +1602,7 @@ int mvwaddnwstr(
{ return(*(int *)0); }
#undef mvwaddwstr
-int mvwaddwstr(
+int (mvwaddwstr)(
WINDOW *a1,
int a2,
int a3,
@@ -1608,7 +1610,7 @@ int mvwaddwstr(
{ return(*(int *)0); }
#undef mvwget_wch
-int mvwget_wch(
+int (mvwget_wch)(
WINDOW *a1,
int a2,
int a3,
@@ -1616,7 +1618,7 @@ int mvwget_wch(
{ return(*(int *)0); }
#undef mvwget_wstr
-int mvwget_wstr(
+int (mvwget_wstr)(
WINDOW *a1,
int a2,
int a3,
@@ -1624,7 +1626,7 @@ int mvwget_wstr(
{ return(*(int *)0); }
#undef mvwgetn_wstr
-int mvwgetn_wstr(
+int (mvwgetn_wstr)(
WINDOW *a1,
int a2,
int a3,
@@ -1633,7 +1635,7 @@ int mvwgetn_wstr(
{ return(*(int *)0); }
#undef mvwhline_set
-int mvwhline_set(
+int (mvwhline_set)(
WINDOW *a1,
int a2,
int a3,
@@ -1642,7 +1644,7 @@ int mvwhline_set(
{ return(*(int *)0); }
#undef mvwin_wch
-int mvwin_wch(
+int (mvwin_wch)(
WINDOW *a1,
int a2,
int a3,
@@ -1650,7 +1652,7 @@ int mvwin_wch(
{ return(*(int *)0); }
#undef mvwin_wchnstr
-int mvwin_wchnstr(
+int (mvwin_wchnstr)(
WINDOW *a1,
int a2,
int a3,
@@ -1659,7 +1661,7 @@ int mvwin_wchnstr(
{ return(*(int *)0); }
#undef mvwin_wchstr
-int mvwin_wchstr(
+int (mvwin_wchstr)(
WINDOW *a1,
int a2,
int a3,
@@ -1667,7 +1669,7 @@ int mvwin_wchstr(
{ return(*(int *)0); }
#undef mvwinnwstr
-int mvwinnwstr(
+int (mvwinnwstr)(
WINDOW *a1,
int a2,
int a3,
@@ -1676,7 +1678,7 @@ int mvwinnwstr(
{ return(*(int *)0); }
#undef mvwins_nwstr
-int mvwins_nwstr(
+int (mvwins_nwstr)(
WINDOW *a1,
int a2,
int a3,
@@ -1685,7 +1687,7 @@ int mvwins_nwstr(
{ return(*(int *)0); }
#undef mvwins_wch
-int mvwins_wch(
+int (mvwins_wch)(
WINDOW *a1,
int a2,
int a3,
@@ -1693,7 +1695,7 @@ int mvwins_wch(
{ return(*(int *)0); }
#undef mvwins_wstr
-int mvwins_wstr(
+int (mvwins_wstr)(
WINDOW *a1,
int a2,
int a3,
@@ -1701,7 +1703,7 @@ int mvwins_wstr(
{ return(*(int *)0); }
#undef mvwinwstr
-int mvwinwstr(
+int (mvwinwstr)(
WINDOW *a1,
int a2,
int a3,
@@ -1709,7 +1711,7 @@ int mvwinwstr(
{ return(*(int *)0); }
#undef mvwvline_set
-int mvwvline_set(
+int (mvwvline_set)(
WINDOW *a1,
int a2,
int a3,
@@ -1718,49 +1720,49 @@ int mvwvline_set(
{ return(*(int *)0); }
#undef vline_set
-int vline_set(
+int (vline_set)(
const cchar_t *a1,
int z)
{ return(*(int *)0); }
#undef wadd_wchstr
-int wadd_wchstr(
+int (wadd_wchstr)(
WINDOW *a1,
const cchar_t *z)
{ return(*(int *)0); }
#undef waddwstr
-int waddwstr(
+int (waddwstr)(
WINDOW *a1,
const wchar_t *z)
{ return(*(int *)0); }
#undef wget_wstr
-int wget_wstr(
+int (wget_wstr)(
WINDOW *a1,
wint_t *z)
{ return(*(int *)0); }
#undef wgetbkgrnd
-int wgetbkgrnd(
+int (wgetbkgrnd)(
WINDOW *a1,
cchar_t *z)
{ return(*(int *)0); }
#undef win_wchstr
-int win_wchstr(
+int (win_wchstr)(
WINDOW *a1,
cchar_t *z)
{ return(*(int *)0); }
#undef wins_wstr
-int wins_wstr(
+int (wins_wstr)(
WINDOW *a1,
const wchar_t *z)
{ return(*(int *)0); }
#undef mouse_trafo
-NCURSES_BOOL mouse_trafo(
+NCURSES_BOOL (mouse_trafo)(
int *a1,
int *a2,
NCURSES_BOOL z)
@@ -2040,6 +2042,23 @@ void _nc_mvcur_wrap_sp(
void _nc_mvcur_wrap(void)
{ /* void */ }
+#undef _nc_mvcur_sp
+int _nc_mvcur_sp(
+ SCREEN *sp,
+ int yold,
+ int xold,
+ int ynew,
+ int xnew)
+ { return(*(int *)0); }
+
+#undef _nc_mvcur
+int _nc_mvcur(
+ int yold,
+ int xold,
+ int ynew,
+ int xnew)
+ { return(*(int *)0); }
+
#undef mvcur_sp
int mvcur_sp(
SCREEN *sp,
@@ -2106,6 +2125,8 @@ SCREEN *newterm(
/* ./base/lib_newwin.c */
+#include "/usr/lib/gcc/x86_64-linux-gnu/4.4.5/include/stddef.h"
+
#undef _nc_freewin
int _nc_freewin(
WINDOW *win)
@@ -2495,7 +2516,7 @@ int _nc_setupscreen_sp(
int slines,
int scolumns,
FILE *output,
- NCURSES_BOOL filtered,
+ int filtered,
int slk_format)
{ return(*(int *)0); }
@@ -2504,7 +2525,7 @@ int _nc_setupscreen(
int slines,
int scolumns,
FILE *output,
- NCURSES_BOOL filtered,
+ int filtered,
int slk_format)
{ return(*(int *)0); }
@@ -2786,7 +2807,7 @@ char *_tracemouse(
#undef _nc_signal_handler
void _nc_signal_handler(
- NCURSES_BOOL enable)
+ int enable)
{ /* void */ }
/* ./base/lib_ungetch.c */
@@ -3023,12 +3044,6 @@ char *_nc_varargs(
va_list ap)
{ return(*(char **)0); }
-/* ./base/memmove.c */
-
-#undef _nc_memmove
-void _nc_memmove(void)
- { /* void */ }
-
/* ./base/vsscanf.c */
#undef _nc_vsscanf
@@ -3563,7 +3578,7 @@ void _nc_align_termtype(
#undef _nc_copy_termtype
void _nc_copy_termtype(
TERMTYPE *dst,
- TERMTYPE *src)
+ const TERMTYPE *src)
{ /* void */ }
/* ./codes.c */
@@ -3667,6 +3682,8 @@ struct name_table_entry const *_nc_find_type_entry(
/* ./tinfo/db_iterator.c */
+#include <time.h>
+
#undef _nc_tic_dir
const char *_nc_tic_dir(
const char *path)
@@ -3758,6 +3775,12 @@ int _nc_getenv_num(
const char *name)
{ return(*(int *)0); }
+#undef _nc_setenv_num
+void _nc_setenv_num(
+ const char *name,
+ int value)
+ { /* void */ }
+
/* ./tinfo/home_terminfo.c */
#undef _nc_home_terminfo
@@ -4098,7 +4121,7 @@ int _nc_putp_flush_sp(
#undef _nc_keypad
int _nc_keypad(
SCREEN *sp,
- NCURSES_BOOL flag)
+ int flag)
{ return(*(int *)0); }
/* ./tinfo/lib_raw.c */
@@ -4229,11 +4252,22 @@ void use_env_sp(
NCURSES_BOOL f)
{ /* void */ }
+#undef use_tioctl_sp
+void use_tioctl_sp(
+ SCREEN *sp,
+ NCURSES_BOOL f)
+ { /* void */ }
+
#undef use_env
void use_env(
NCURSES_BOOL f)
{ /* void */ }
+#undef use_tioctl
+void use_tioctl(
+ NCURSES_BOOL f)
+ { /* void */ }
+
#undef _nc_get_screensize
void _nc_get_screensize(
SCREEN *sp,
@@ -4255,7 +4289,7 @@ int _nc_setup_tinfo(
#undef _nc_tinfo_cmdch
void _nc_tinfo_cmdch(
TERMINAL *termp,
- char proto)
+ int proto)
{ /* void */ }
#undef _nc_get_locale
@@ -4276,7 +4310,7 @@ int _nc_setupterm(
char *tname,
int Filedes,
int *errret,
- NCURSES_BOOL reuse)
+ int reuse)
{ return(*(int *)0); }
#undef new_prescr
@@ -4415,7 +4449,7 @@ int _nc_tparm_err;
int _nc_tparm_analyze(
const char *string,
char *p_is_s[9],
- int *popcount)
+ int *_nc_popcount)
{ return(*(int *)0); }
#undef tparm
@@ -4435,7 +4469,7 @@ char *tiparm(
#undef PC
char PC;
#undef ospeed
-NCURSES_OSPEED ospeed;
+short ospeed;
#undef _nc_nulls_sent
int _nc_nulls_sent;
@@ -4475,12 +4509,28 @@ int _nc_outch(
int ch)
{ return(*(int *)0); }
+#undef _nc_putchar_sp
+int _nc_putchar_sp(
+ SCREEN *sp,
+ int ch)
+ { return(*(int *)0); }
+
+#undef _nc_putchar
+int _nc_putchar(
+ int ch)
+ { return(*(int *)0); }
+
#undef putp_sp
int putp_sp(
SCREEN *sp,
const char *string)
{ return(*(int *)0); }
+#undef putp
+int putp(
+ const char *string)
+ { return(*(int *)0); }
+
#undef _nc_putp_sp
int _nc_putp_sp(
SCREEN *sp,
@@ -4488,11 +4538,6 @@ int _nc_putp_sp(
const char *string)
{ return(*(int *)0); }
-#undef putp
-int putp(
- const char *string)
- { return(*(int *)0); }
-
#undef _nc_putp
int _nc_putp(
const char *name,
@@ -4557,12 +4602,12 @@ void _tracef(
#undef _nc_retrace_bool
NCURSES_BOOL _nc_retrace_bool(
- NCURSES_BOOL code)
+ int code)
{ return(*(NCURSES_BOOL *)0); }
#undef _nc_retrace_char
char _nc_retrace_char(
- char code)
+ int code)
{ return(*(char *)0); }
#undef _nc_retrace_int
@@ -4829,10 +4874,30 @@ char *const *_nc_strnames(void)
char *const *_nc_strfnames(void)
{ return(*(char **)0); }
+/* ./tinfo/obsolete.c */
+
+#undef _nc_set_buffer_sp
+void _nc_set_buffer_sp(
+ SCREEN *sp,
+ FILE *ofp,
+ int buffered)
+ { /* void */ }
+
+#undef _nc_set_buffer
+void _nc_set_buffer(
+ FILE *ofp,
+ int buffered)
+ { /* void */ }
+
/* ./tinfo/read_entry.c */
#include <hashed_db.h>
+#undef _nc_init_termtype
+void _nc_init_termtype(
+ TERMTYPE *const tp)
+ { /* void */ }
+
#undef _nc_read_termtype
int _nc_read_termtype(
TERMTYPE *ptr,
@@ -4857,25 +4922,8 @@ int _nc_read_entry(
#include <sys/types.h>
-#undef _nc_read_termcap_entry
-int _nc_read_termcap_entry(
- const char *const tn,
- TERMTYPE *const tp)
- { return(*(int *)0); }
-
-/* ./tinfo/setbuf.c */
-
-#undef _nc_set_buffer_sp
-void _nc_set_buffer_sp(
- SCREEN *sp,
- FILE *ofp,
- NCURSES_BOOL buffered)
- { /* void */ }
-
-#undef _nc_set_buffer
-void _nc_set_buffer(
- FILE *ofp,
- NCURSES_BOOL buffered)
+#undef _nc_read_termcap
+void _nc_read_termcap(void)
{ /* void */ }
/* ./tinfo/strings.c */
@@ -5123,6 +5171,8 @@ int _nc_resolve_uses(
#undef _nc_syntax
int _nc_syntax;
+#undef _nc_strict_bsd
+int _nc_strict_bsd;
#undef _nc_curr_file_pos
long _nc_curr_file_pos;
#undef _nc_comment_start
diff --git a/ncurses/llib-lncursesw b/ncurses/llib-lncursesw
index 28e68034ea8d..be768d716b9c 100644
--- a/ncurses/llib-lncursesw
+++ b/ncurses/llib-lncursesw
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2001-2010,2011 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 *
@@ -27,7 +27,7 @@
****************************************************************************/
/****************************************************************************
- * Author: Thomas E. Dickey 2001-2010,2011 *
+ * Author: Thomas E. Dickey 2001-on *
****************************************************************************/
/* LINTLIBRARY */
@@ -366,17 +366,17 @@ int pair_content(
#undef _nc_do_color_sp
void _nc_do_color_sp(
SCREEN *sp,
- short old_pair,
- short pair,
- NCURSES_BOOL reverse,
+ int old_pair,
+ int pair,
+ int reverse,
NCURSES_OUTC_sp outc)
{ /* void */ }
#undef _nc_do_color
void _nc_do_color(
- short old_pair,
- short pair,
- NCURSES_BOOL reverse,
+ int old_pair,
+ int pair,
+ int reverse,
NCURSES_OUTC outc)
{ /* void */ }
@@ -454,86 +454,88 @@ int flash(void)
/* ./lib_gen.c */
+#include <ncurses_cfg.h>
+
#undef addch
-int addch(
+int (addch)(
const chtype z)
{ return(*(int *)0); }
#undef addchnstr
-int addchnstr(
+int (addchnstr)(
const chtype *a1,
int z)
{ return(*(int *)0); }
#undef addchstr
-int addchstr(
+int (addchstr)(
const chtype *z)
{ return(*(int *)0); }
#undef addnstr
-int addnstr(
+int (addnstr)(
const char *a1,
int z)
{ return(*(int *)0); }
#undef addstr
-int addstr(
+int (addstr)(
const char *z)
{ return(*(int *)0); }
#undef attroff
-int attroff(
- NCURSES_ATTR_T z)
+int (attroff)(
+ int z)
{ return(*(int *)0); }
#undef attron
-int attron(
- NCURSES_ATTR_T z)
+int (attron)(
+ int z)
{ return(*(int *)0); }
#undef attrset
-int attrset(
- NCURSES_ATTR_T z)
+int (attrset)(
+ int z)
{ return(*(int *)0); }
#undef attr_get
-int attr_get(
+int (attr_get)(
attr_t *a1,
short *a2,
void *z)
{ return(*(int *)0); }
#undef attr_off
-int attr_off(
+int (attr_off)(
attr_t a1,
void *z)
{ return(*(int *)0); }
#undef attr_on
-int attr_on(
+int (attr_on)(
attr_t a1,
void *z)
{ return(*(int *)0); }
#undef attr_set
-int attr_set(
+int (attr_set)(
attr_t a1,
short a2,
void *z)
{ return(*(int *)0); }
#undef bkgd
-int bkgd(
+int (bkgd)(
chtype z)
{ return(*(int *)0); }
#undef bkgdset
-void bkgdset(
+void (bkgdset)(
chtype z)
{ /* void */ }
#undef border
-int border(
+int (border)(
chtype a1,
chtype a2,
chtype a3,
@@ -545,14 +547,14 @@ int border(
{ return(*(int *)0); }
#undef box
-int box(
+int (box)(
WINDOW *a1,
chtype a2,
chtype z)
{ return(*(int *)0); }
#undef chgat
-int chgat(
+int (chgat)(
int a1,
attr_t a2,
short a3,
@@ -560,137 +562,137 @@ int chgat(
{ return(*(int *)0); }
#undef clear
-int clear(void)
+int (clear)(void)
{ return(*(int *)0); }
#undef clrtobot
-int clrtobot(void)
+int (clrtobot)(void)
{ return(*(int *)0); }
#undef clrtoeol
-int clrtoeol(void)
+int (clrtoeol)(void)
{ return(*(int *)0); }
#undef color_set
-int color_set(
+int (color_set)(
short a1,
void *z)
{ return(*(int *)0); }
#undef COLOR_PAIR
-int COLOR_PAIR(
+int (COLOR_PAIR)(
int z)
{ return(*(int *)0); }
#undef delch
-int delch(void)
+int (delch)(void)
{ return(*(int *)0); }
#undef deleteln
-int deleteln(void)
+int (deleteln)(void)
{ return(*(int *)0); }
#undef echochar
-int echochar(
+int (echochar)(
const chtype z)
{ return(*(int *)0); }
#undef erase
-int erase(void)
+int (erase)(void)
{ return(*(int *)0); }
#undef getbkgd
-chtype getbkgd(
+chtype (getbkgd)(
WINDOW *z)
{ return(*(chtype *)0); }
#undef getch
-int getch(void)
+int (getch)(void)
{ return(*(int *)0); }
#undef getnstr
-int getnstr(
+int (getnstr)(
char *a1,
int z)
{ return(*(int *)0); }
#undef getstr
-int getstr(
+int (getstr)(
char *z)
{ return(*(int *)0); }
#undef hline
-int hline(
+int (hline)(
chtype a1,
int z)
{ return(*(int *)0); }
#undef inch
-chtype inch(void)
+chtype (inch)(void)
{ return(*(chtype *)0); }
#undef inchnstr
-int inchnstr(
+int (inchnstr)(
chtype *a1,
int z)
{ return(*(int *)0); }
#undef inchstr
-int inchstr(
+int (inchstr)(
chtype *z)
{ return(*(int *)0); }
#undef innstr
-int innstr(
+int (innstr)(
char *a1,
int z)
{ return(*(int *)0); }
#undef insch
-int insch(
+int (insch)(
chtype z)
{ return(*(int *)0); }
#undef insdelln
-int insdelln(
+int (insdelln)(
int z)
{ return(*(int *)0); }
#undef insertln
-int insertln(void)
+int (insertln)(void)
{ return(*(int *)0); }
#undef insnstr
-int insnstr(
+int (insnstr)(
const char *a1,
int z)
{ return(*(int *)0); }
#undef insstr
-int insstr(
+int (insstr)(
const char *z)
{ return(*(int *)0); }
#undef instr
-int instr(
+int (instr)(
char *z)
{ return(*(int *)0); }
#undef move
-int move(
+int (move)(
int a1,
int z)
{ return(*(int *)0); }
#undef mvaddch
-int mvaddch(
+int (mvaddch)(
int a1,
int a2,
const chtype z)
{ return(*(int *)0); }
#undef mvaddchnstr
-int mvaddchnstr(
+int (mvaddchnstr)(
int a1,
int a2,
const chtype *a3,
@@ -698,14 +700,14 @@ int mvaddchnstr(
{ return(*(int *)0); }
#undef mvaddchstr
-int mvaddchstr(
+int (mvaddchstr)(
int a1,
int a2,
const chtype *z)
{ return(*(int *)0); }
#undef mvaddnstr
-int mvaddnstr(
+int (mvaddnstr)(
int a1,
int a2,
const char *a3,
@@ -713,14 +715,14 @@ int mvaddnstr(
{ return(*(int *)0); }
#undef mvaddstr
-int mvaddstr(
+int (mvaddstr)(
int a1,
int a2,
const char *z)
{ return(*(int *)0); }
#undef mvchgat
-int mvchgat(
+int (mvchgat)(
int a1,
int a2,
int a3,
@@ -730,19 +732,19 @@ int mvchgat(
{ return(*(int *)0); }
#undef mvdelch
-int mvdelch(
+int (mvdelch)(
int a1,
int z)
{ return(*(int *)0); }
#undef mvgetch
-int mvgetch(
+int (mvgetch)(
int a1,
int z)
{ return(*(int *)0); }
#undef mvgetnstr
-int mvgetnstr(
+int (mvgetnstr)(
int a1,
int a2,
char *a3,
@@ -750,14 +752,14 @@ int mvgetnstr(
{ return(*(int *)0); }
#undef mvgetstr
-int mvgetstr(
+int (mvgetstr)(
int a1,
int a2,
char *z)
{ return(*(int *)0); }
#undef mvhline
-int mvhline(
+int (mvhline)(
int a1,
int a2,
chtype a3,
@@ -765,13 +767,13 @@ int mvhline(
{ return(*(int *)0); }
#undef mvinch
-chtype mvinch(
+chtype (mvinch)(
int a1,
int z)
{ return(*(chtype *)0); }
#undef mvinchnstr
-int mvinchnstr(
+int (mvinchnstr)(
int a1,
int a2,
chtype *a3,
@@ -779,14 +781,14 @@ int mvinchnstr(
{ return(*(int *)0); }
#undef mvinchstr
-int mvinchstr(
+int (mvinchstr)(
int a1,
int a2,
chtype *z)
{ return(*(int *)0); }
#undef mvinnstr
-int mvinnstr(
+int (mvinnstr)(
int a1,
int a2,
char *a3,
@@ -794,14 +796,14 @@ int mvinnstr(
{ return(*(int *)0); }
#undef mvinsch
-int mvinsch(
+int (mvinsch)(
int a1,
int a2,
chtype z)
{ return(*(int *)0); }
#undef mvinsnstr
-int mvinsnstr(
+int (mvinsnstr)(
int a1,
int a2,
const char *a3,
@@ -809,21 +811,21 @@ int mvinsnstr(
{ return(*(int *)0); }
#undef mvinsstr
-int mvinsstr(
+int (mvinsstr)(
int a1,
int a2,
const char *z)
{ return(*(int *)0); }
#undef mvinstr
-int mvinstr(
+int (mvinstr)(
int a1,
int a2,
char *z)
{ return(*(int *)0); }
#undef mvvline
-int mvvline(
+int (mvvline)(
int a1,
int a2,
chtype a3,
@@ -831,7 +833,7 @@ int mvvline(
{ return(*(int *)0); }
#undef mvwaddch
-int mvwaddch(
+int (mvwaddch)(
WINDOW *a1,
int a2,
int a3,
@@ -839,7 +841,7 @@ int mvwaddch(
{ return(*(int *)0); }
#undef mvwaddchnstr
-int mvwaddchnstr(
+int (mvwaddchnstr)(
WINDOW *a1,
int a2,
int a3,
@@ -848,7 +850,7 @@ int mvwaddchnstr(
{ return(*(int *)0); }
#undef mvwaddchstr
-int mvwaddchstr(
+int (mvwaddchstr)(
WINDOW *a1,
int a2,
int a3,
@@ -856,7 +858,7 @@ int mvwaddchstr(
{ return(*(int *)0); }
#undef mvwaddnstr
-int mvwaddnstr(
+int (mvwaddnstr)(
WINDOW *a1,
int a2,
int a3,
@@ -865,7 +867,7 @@ int mvwaddnstr(
{ return(*(int *)0); }
#undef mvwaddstr
-int mvwaddstr(
+int (mvwaddstr)(
WINDOW *a1,
int a2,
int a3,
@@ -873,7 +875,7 @@ int mvwaddstr(
{ return(*(int *)0); }
#undef mvwchgat
-int mvwchgat(
+int (mvwchgat)(
WINDOW *a1,
int a2,
int a3,
@@ -884,21 +886,21 @@ int mvwchgat(
{ return(*(int *)0); }
#undef mvwdelch
-int mvwdelch(
+int (mvwdelch)(
WINDOW *a1,
int a2,
int z)
{ return(*(int *)0); }
#undef mvwgetch
-int mvwgetch(
+int (mvwgetch)(
WINDOW *a1,
int a2,
int z)
{ return(*(int *)0); }
#undef mvwgetnstr
-int mvwgetnstr(
+int (mvwgetnstr)(
WINDOW *a1,
int a2,
int a3,
@@ -907,7 +909,7 @@ int mvwgetnstr(
{ return(*(int *)0); }
#undef mvwgetstr
-int mvwgetstr(
+int (mvwgetstr)(
WINDOW *a1,
int a2,
int a3,
@@ -915,7 +917,7 @@ int mvwgetstr(
{ return(*(int *)0); }
#undef mvwhline
-int mvwhline(
+int (mvwhline)(
WINDOW *a1,
int a2,
int a3,
@@ -924,14 +926,14 @@ int mvwhline(
{ return(*(int *)0); }
#undef mvwinch
-chtype mvwinch(
+chtype (mvwinch)(
WINDOW *a1,
int a2,
int z)
{ return(*(chtype *)0); }
#undef mvwinchnstr
-int mvwinchnstr(
+int (mvwinchnstr)(
WINDOW *a1,
int a2,
int a3,
@@ -940,7 +942,7 @@ int mvwinchnstr(
{ return(*(int *)0); }
#undef mvwinchstr
-int mvwinchstr(
+int (mvwinchstr)(
WINDOW *a1,
int a2,
int a3,
@@ -948,7 +950,7 @@ int mvwinchstr(
{ return(*(int *)0); }
#undef mvwinnstr
-int mvwinnstr(
+int (mvwinnstr)(
WINDOW *a1,
int a2,
int a3,
@@ -957,7 +959,7 @@ int mvwinnstr(
{ return(*(int *)0); }
#undef mvwinsch
-int mvwinsch(
+int (mvwinsch)(
WINDOW *a1,
int a2,
int a3,
@@ -965,7 +967,7 @@ int mvwinsch(
{ return(*(int *)0); }
#undef mvwinsnstr
-int mvwinsnstr(
+int (mvwinsnstr)(
WINDOW *a1,
int a2,
int a3,
@@ -974,7 +976,7 @@ int mvwinsnstr(
{ return(*(int *)0); }
#undef mvwinsstr
-int mvwinsstr(
+int (mvwinsstr)(
WINDOW *a1,
int a2,
int a3,
@@ -982,7 +984,7 @@ int mvwinsstr(
{ return(*(int *)0); }
#undef mvwinstr
-int mvwinstr(
+int (mvwinstr)(
WINDOW *a1,
int a2,
int a3,
@@ -990,7 +992,7 @@ int mvwinstr(
{ return(*(int *)0); }
#undef mvwvline
-int mvwvline(
+int (mvwvline)(
WINDOW *a1,
int a2,
int a3,
@@ -999,129 +1001,129 @@ int mvwvline(
{ return(*(int *)0); }
#undef PAIR_NUMBER
-int PAIR_NUMBER(
+int (PAIR_NUMBER)(
int z)
{ return(*(int *)0); }
#undef redrawwin
-int redrawwin(
+int (redrawwin)(
WINDOW *z)
{ return(*(int *)0); }
#undef refresh
-int refresh(void)
+int (refresh)(void)
{ return(*(int *)0); }
#undef scrl
-int scrl(
+int (scrl)(
int z)
{ return(*(int *)0); }
#undef scroll
-int scroll(
+int (scroll)(
WINDOW *z)
{ return(*(int *)0); }
#undef setscrreg
-int setscrreg(
+int (setscrreg)(
int a1,
int z)
{ return(*(int *)0); }
#undef slk_attr_off
-int slk_attr_off(
+int (slk_attr_off)(
const attr_t a1,
void *z)
{ return(*(int *)0); }
#undef slk_attr_on
-int slk_attr_on(
+int (slk_attr_on)(
attr_t a1,
void *z)
{ return(*(int *)0); }
#undef standout
-int standout(void)
+int (standout)(void)
{ return(*(int *)0); }
#undef standend
-int standend(void)
+int (standend)(void)
{ return(*(int *)0); }
#undef timeout
-void timeout(
+void (timeout)(
int z)
{ /* void */ }
#undef touchline
-int touchline(
+int (touchline)(
WINDOW *a1,
int a2,
int z)
{ return(*(int *)0); }
#undef touchwin
-int touchwin(
+int (touchwin)(
WINDOW *z)
{ return(*(int *)0); }
#undef untouchwin
-int untouchwin(
+int (untouchwin)(
WINDOW *z)
{ return(*(int *)0); }
#undef vline
-int vline(
+int (vline)(
chtype a1,
int z)
{ return(*(int *)0); }
#undef vw_printw
-int vw_printw(
+int (vw_printw)(
WINDOW *a1,
const char *a2,
va_list z)
{ return(*(int *)0); }
#undef vw_scanw
-int vw_scanw(
+int (vw_scanw)(
WINDOW *a1,
char *a2,
va_list z)
{ return(*(int *)0); }
#undef waddchstr
-int waddchstr(
+int (waddchstr)(
WINDOW *a1,
const chtype *z)
{ return(*(int *)0); }
#undef waddstr
-int waddstr(
+int (waddstr)(
WINDOW *a1,
const char *z)
{ return(*(int *)0); }
#undef wattron
-int wattron(
+int (wattron)(
WINDOW *a1,
int z)
{ return(*(int *)0); }
#undef wattroff
-int wattroff(
+int (wattroff)(
WINDOW *a1,
int z)
{ return(*(int *)0); }
#undef wattrset
-int wattrset(
+int (wattrset)(
WINDOW *a1,
int z)
{ return(*(int *)0); }
#undef wattr_get
-int wattr_get(
+int (wattr_get)(
WINDOW *a1,
attr_t *a2,
short *a3,
@@ -1129,7 +1131,7 @@ int wattr_get(
{ return(*(int *)0); }
#undef wattr_set
-int wattr_set(
+int (wattr_set)(
WINDOW *a1,
attr_t a2,
short a3,
@@ -1137,205 +1139,205 @@ int wattr_set(
{ return(*(int *)0); }
#undef wdeleteln
-int wdeleteln(
+int (wdeleteln)(
WINDOW *z)
{ return(*(int *)0); }
#undef wgetstr
-int wgetstr(
+int (wgetstr)(
WINDOW *a1,
char *z)
{ return(*(int *)0); }
#undef winchstr
-int winchstr(
+int (winchstr)(
WINDOW *a1,
chtype *z)
{ return(*(int *)0); }
#undef winsertln
-int winsertln(
+int (winsertln)(
WINDOW *z)
{ return(*(int *)0); }
#undef winsstr
-int winsstr(
+int (winsstr)(
WINDOW *a1,
const char *z)
{ return(*(int *)0); }
#undef winstr
-int winstr(
+int (winstr)(
WINDOW *a1,
char *z)
{ return(*(int *)0); }
#undef wstandout
-int wstandout(
+int (wstandout)(
WINDOW *z)
{ return(*(int *)0); }
#undef wstandend
-int wstandend(
+int (wstandend)(
WINDOW *z)
{ return(*(int *)0); }
#undef getattrs
-int getattrs(
+int (getattrs)(
const WINDOW *z)
{ return(*(int *)0); }
#undef getcurx
-int getcurx(
+int (getcurx)(
const WINDOW *z)
{ return(*(int *)0); }
#undef getcury
-int getcury(
+int (getcury)(
const WINDOW *z)
{ return(*(int *)0); }
#undef getbegx
-int getbegx(
+int (getbegx)(
const WINDOW *z)
{ return(*(int *)0); }
#undef getbegy
-int getbegy(
+int (getbegy)(
const WINDOW *z)
{ return(*(int *)0); }
#undef getmaxx
-int getmaxx(
+int (getmaxx)(
const WINDOW *z)
{ return(*(int *)0); }
#undef getmaxy
-int getmaxy(
+int (getmaxy)(
const WINDOW *z)
{ return(*(int *)0); }
#undef getparx
-int getparx(
+int (getparx)(
const WINDOW *z)
{ return(*(int *)0); }
#undef getpary
-int getpary(
+int (getpary)(
const WINDOW *z)
{ return(*(int *)0); }
#undef wgetparent
-WINDOW *wgetparent(
+WINDOW *(wgetparent)(
const WINDOW *z)
{ return(*(WINDOW **)0); }
#undef is_cleared
-NCURSES_BOOL is_cleared(
+NCURSES_BOOL (is_cleared)(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
#undef is_idcok
-NCURSES_BOOL is_idcok(
+NCURSES_BOOL (is_idcok)(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
#undef is_idlok
-NCURSES_BOOL is_idlok(
+NCURSES_BOOL (is_idlok)(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
#undef is_immedok
-NCURSES_BOOL is_immedok(
+NCURSES_BOOL (is_immedok)(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
#undef is_keypad
-NCURSES_BOOL is_keypad(
+NCURSES_BOOL (is_keypad)(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
#undef is_leaveok
-NCURSES_BOOL is_leaveok(
+NCURSES_BOOL (is_leaveok)(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
#undef is_nodelay
-NCURSES_BOOL is_nodelay(
+NCURSES_BOOL (is_nodelay)(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
#undef is_notimeout
-NCURSES_BOOL is_notimeout(
+NCURSES_BOOL (is_notimeout)(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
#undef is_pad
-NCURSES_BOOL is_pad(
+NCURSES_BOOL (is_pad)(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
#undef is_scrollok
-NCURSES_BOOL is_scrollok(
+NCURSES_BOOL (is_scrollok)(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
#undef is_subwin
-NCURSES_BOOL is_subwin(
+NCURSES_BOOL (is_subwin)(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
#undef is_syncok
-NCURSES_BOOL is_syncok(
+NCURSES_BOOL (is_syncok)(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
#undef wgetscrreg
-int wgetscrreg(
+int (wgetscrreg)(
const WINDOW *a1,
int *a2,
int *z)
{ return(*(int *)0); }
#undef add_wch
-int add_wch(
+int (add_wch)(
const cchar_t *z)
{ return(*(int *)0); }
#undef add_wchnstr
-int add_wchnstr(
+int (add_wchnstr)(
const cchar_t *a1,
int z)
{ return(*(int *)0); }
#undef add_wchstr
-int add_wchstr(
+int (add_wchstr)(
const cchar_t *z)
{ return(*(int *)0); }
#undef addnwstr
-int addnwstr(
+int (addnwstr)(
const wchar_t *a1,
int z)
{ return(*(int *)0); }
#undef addwstr
-int addwstr(
+int (addwstr)(
const wchar_t *z)
{ return(*(int *)0); }
#undef bkgrnd
-int bkgrnd(
+int (bkgrnd)(
const cchar_t *z)
{ return(*(int *)0); }
#undef bkgrndset
-void bkgrndset(
+void (bkgrndset)(
const cchar_t *z)
{ /* void */ }
#undef border_set
-int border_set(
+int (border_set)(
const cchar_t *a1,
const cchar_t *a2,
const cchar_t *a3,
@@ -1347,96 +1349,96 @@ int border_set(
{ return(*(int *)0); }
#undef box_set
-int box_set(
+int (box_set)(
WINDOW *a1,
const cchar_t *a2,
const cchar_t *z)
{ return(*(int *)0); }
#undef echo_wchar
-int echo_wchar(
+int (echo_wchar)(
const cchar_t *z)
{ return(*(int *)0); }
#undef get_wch
-int get_wch(
+int (get_wch)(
wint_t *z)
{ return(*(int *)0); }
#undef get_wstr
-int get_wstr(
+int (get_wstr)(
wint_t *z)
{ return(*(int *)0); }
#undef getbkgrnd
-int getbkgrnd(
+int (getbkgrnd)(
cchar_t *z)
{ return(*(int *)0); }
#undef getn_wstr
-int getn_wstr(
+int (getn_wstr)(
wint_t *a1,
int z)
{ return(*(int *)0); }
#undef hline_set
-int hline_set(
+int (hline_set)(
const cchar_t *a1,
int z)
{ return(*(int *)0); }
#undef in_wch
-int in_wch(
+int (in_wch)(
cchar_t *z)
{ return(*(int *)0); }
#undef in_wchnstr
-int in_wchnstr(
+int (in_wchnstr)(
cchar_t *a1,
int z)
{ return(*(int *)0); }
#undef in_wchstr
-int in_wchstr(
+int (in_wchstr)(
cchar_t *z)
{ return(*(int *)0); }
#undef innwstr
-int innwstr(
+int (innwstr)(
wchar_t *a1,
int z)
{ return(*(int *)0); }
#undef ins_nwstr
-int ins_nwstr(
+int (ins_nwstr)(
const wchar_t *a1,
int z)
{ return(*(int *)0); }
#undef ins_wch
-int ins_wch(
+int (ins_wch)(
const cchar_t *z)
{ return(*(int *)0); }
#undef ins_wstr
-int ins_wstr(
+int (ins_wstr)(
const wchar_t *z)
{ return(*(int *)0); }
#undef inwstr
-int inwstr(
+int (inwstr)(
wchar_t *z)
{ return(*(int *)0); }
#undef mvadd_wch
-int mvadd_wch(
+int (mvadd_wch)(
int a1,
int a2,
const cchar_t *z)
{ return(*(int *)0); }
#undef mvadd_wchnstr
-int mvadd_wchnstr(
+int (mvadd_wchnstr)(
int a1,
int a2,
const cchar_t *a3,
@@ -1444,14 +1446,14 @@ int mvadd_wchnstr(
{ return(*(int *)0); }
#undef mvadd_wchstr
-int mvadd_wchstr(
+int (mvadd_wchstr)(
int a1,
int a2,
const cchar_t *z)
{ return(*(int *)0); }
#undef mvaddnwstr
-int mvaddnwstr(
+int (mvaddnwstr)(
int a1,
int a2,
const wchar_t *a3,
@@ -1459,28 +1461,28 @@ int mvaddnwstr(
{ return(*(int *)0); }
#undef mvaddwstr
-int mvaddwstr(
+int (mvaddwstr)(
int a1,
int a2,
const wchar_t *z)
{ return(*(int *)0); }
#undef mvget_wch
-int mvget_wch(
+int (mvget_wch)(
int a1,
int a2,
wint_t *z)
{ return(*(int *)0); }
#undef mvget_wstr
-int mvget_wstr(
+int (mvget_wstr)(
int a1,
int a2,
wint_t *z)
{ return(*(int *)0); }
#undef mvgetn_wstr
-int mvgetn_wstr(
+int (mvgetn_wstr)(
int a1,
int a2,
wint_t *a3,
@@ -1488,7 +1490,7 @@ int mvgetn_wstr(
{ return(*(int *)0); }
#undef mvhline_set
-int mvhline_set(
+int (mvhline_set)(
int a1,
int a2,
const cchar_t *a3,
@@ -1496,14 +1498,14 @@ int mvhline_set(
{ return(*(int *)0); }
#undef mvin_wch
-int mvin_wch(
+int (mvin_wch)(
int a1,
int a2,
cchar_t *z)
{ return(*(int *)0); }
#undef mvin_wchnstr
-int mvin_wchnstr(
+int (mvin_wchnstr)(
int a1,
int a2,
cchar_t *a3,
@@ -1511,14 +1513,14 @@ int mvin_wchnstr(
{ return(*(int *)0); }
#undef mvin_wchstr
-int mvin_wchstr(
+int (mvin_wchstr)(
int a1,
int a2,
cchar_t *z)
{ return(*(int *)0); }
#undef mvinnwstr
-int mvinnwstr(
+int (mvinnwstr)(
int a1,
int a2,
wchar_t *a3,
@@ -1526,7 +1528,7 @@ int mvinnwstr(
{ return(*(int *)0); }
#undef mvins_nwstr
-int mvins_nwstr(
+int (mvins_nwstr)(
int a1,
int a2,
const wchar_t *a3,
@@ -1534,28 +1536,28 @@ int mvins_nwstr(
{ return(*(int *)0); }
#undef mvins_wch
-int mvins_wch(
+int (mvins_wch)(
int a1,
int a2,
const cchar_t *z)
{ return(*(int *)0); }
#undef mvins_wstr
-int mvins_wstr(
+int (mvins_wstr)(
int a1,
int a2,
const wchar_t *z)
{ return(*(int *)0); }
#undef mvinwstr
-int mvinwstr(
+int (mvinwstr)(
int a1,
int a2,
wchar_t *z)
{ return(*(int *)0); }
#undef mvvline_set
-int mvvline_set(
+int (mvvline_set)(
int a1,
int a2,
const cchar_t *a3,
@@ -1563,7 +1565,7 @@ int mvvline_set(
{ return(*(int *)0); }
#undef mvwadd_wch
-int mvwadd_wch(
+int (mvwadd_wch)(
WINDOW *a1,
int a2,
int a3,
@@ -1571,7 +1573,7 @@ int mvwadd_wch(
{ return(*(int *)0); }
#undef mvwadd_wchnstr
-int mvwadd_wchnstr(
+int (mvwadd_wchnstr)(
WINDOW *a1,
int a2,
int a3,
@@ -1580,7 +1582,7 @@ int mvwadd_wchnstr(
{ return(*(int *)0); }
#undef mvwadd_wchstr
-int mvwadd_wchstr(
+int (mvwadd_wchstr)(
WINDOW *a1,
int a2,
int a3,
@@ -1588,7 +1590,7 @@ int mvwadd_wchstr(
{ return(*(int *)0); }
#undef mvwaddnwstr
-int mvwaddnwstr(
+int (mvwaddnwstr)(
WINDOW *a1,
int a2,
int a3,
@@ -1597,7 +1599,7 @@ int mvwaddnwstr(
{ return(*(int *)0); }
#undef mvwaddwstr
-int mvwaddwstr(
+int (mvwaddwstr)(
WINDOW *a1,
int a2,
int a3,
@@ -1605,7 +1607,7 @@ int mvwaddwstr(
{ return(*(int *)0); }
#undef mvwget_wch
-int mvwget_wch(
+int (mvwget_wch)(
WINDOW *a1,
int a2,
int a3,
@@ -1613,7 +1615,7 @@ int mvwget_wch(
{ return(*(int *)0); }
#undef mvwget_wstr
-int mvwget_wstr(
+int (mvwget_wstr)(
WINDOW *a1,
int a2,
int a3,
@@ -1621,7 +1623,7 @@ int mvwget_wstr(
{ return(*(int *)0); }
#undef mvwgetn_wstr
-int mvwgetn_wstr(
+int (mvwgetn_wstr)(
WINDOW *a1,
int a2,
int a3,
@@ -1630,7 +1632,7 @@ int mvwgetn_wstr(
{ return(*(int *)0); }
#undef mvwhline_set
-int mvwhline_set(
+int (mvwhline_set)(
WINDOW *a1,
int a2,
int a3,
@@ -1639,7 +1641,7 @@ int mvwhline_set(
{ return(*(int *)0); }
#undef mvwin_wch
-int mvwin_wch(
+int (mvwin_wch)(
WINDOW *a1,
int a2,
int a3,
@@ -1647,7 +1649,7 @@ int mvwin_wch(
{ return(*(int *)0); }
#undef mvwin_wchnstr
-int mvwin_wchnstr(
+int (mvwin_wchnstr)(
WINDOW *a1,
int a2,
int a3,
@@ -1656,7 +1658,7 @@ int mvwin_wchnstr(
{ return(*(int *)0); }
#undef mvwin_wchstr
-int mvwin_wchstr(
+int (mvwin_wchstr)(
WINDOW *a1,
int a2,
int a3,
@@ -1664,7 +1666,7 @@ int mvwin_wchstr(
{ return(*(int *)0); }
#undef mvwinnwstr
-int mvwinnwstr(
+int (mvwinnwstr)(
WINDOW *a1,
int a2,
int a3,
@@ -1673,7 +1675,7 @@ int mvwinnwstr(
{ return(*(int *)0); }
#undef mvwins_nwstr
-int mvwins_nwstr(
+int (mvwins_nwstr)(
WINDOW *a1,
int a2,
int a3,
@@ -1682,7 +1684,7 @@ int mvwins_nwstr(
{ return(*(int *)0); }
#undef mvwins_wch
-int mvwins_wch(
+int (mvwins_wch)(
WINDOW *a1,
int a2,
int a3,
@@ -1690,7 +1692,7 @@ int mvwins_wch(
{ return(*(int *)0); }
#undef mvwins_wstr
-int mvwins_wstr(
+int (mvwins_wstr)(
WINDOW *a1,
int a2,
int a3,
@@ -1698,7 +1700,7 @@ int mvwins_wstr(
{ return(*(int *)0); }
#undef mvwinwstr
-int mvwinwstr(
+int (mvwinwstr)(
WINDOW *a1,
int a2,
int a3,
@@ -1706,7 +1708,7 @@ int mvwinwstr(
{ return(*(int *)0); }
#undef mvwvline_set
-int mvwvline_set(
+int (mvwvline_set)(
WINDOW *a1,
int a2,
int a3,
@@ -1715,49 +1717,49 @@ int mvwvline_set(
{ return(*(int *)0); }
#undef vline_set
-int vline_set(
+int (vline_set)(
const cchar_t *a1,
int z)
{ return(*(int *)0); }
#undef wadd_wchstr
-int wadd_wchstr(
+int (wadd_wchstr)(
WINDOW *a1,
const cchar_t *z)
{ return(*(int *)0); }
#undef waddwstr
-int waddwstr(
+int (waddwstr)(
WINDOW *a1,
const wchar_t *z)
{ return(*(int *)0); }
#undef wget_wstr
-int wget_wstr(
+int (wget_wstr)(
WINDOW *a1,
wint_t *z)
{ return(*(int *)0); }
#undef wgetbkgrnd
-int wgetbkgrnd(
+int (wgetbkgrnd)(
WINDOW *a1,
cchar_t *z)
{ return(*(int *)0); }
#undef win_wchstr
-int win_wchstr(
+int (win_wchstr)(
WINDOW *a1,
cchar_t *z)
{ return(*(int *)0); }
#undef wins_wstr
-int wins_wstr(
+int (wins_wstr)(
WINDOW *a1,
const wchar_t *z)
{ return(*(int *)0); }
#undef mouse_trafo
-NCURSES_BOOL mouse_trafo(
+NCURSES_BOOL (mouse_trafo)(
int *a1,
int *a2,
NCURSES_BOOL z)
@@ -2031,6 +2033,23 @@ void _nc_mvcur_wrap_sp(
void _nc_mvcur_wrap(void)
{ /* void */ }
+#undef _nc_mvcur_sp
+int _nc_mvcur_sp(
+ SCREEN *sp,
+ int yold,
+ int xold,
+ int ynew,
+ int xnew)
+ { return(*(int *)0); }
+
+#undef _nc_mvcur
+int _nc_mvcur(
+ int yold,
+ int xold,
+ int ynew,
+ int xnew)
+ { return(*(int *)0); }
+
#undef mvcur_sp
int mvcur_sp(
SCREEN *sp,
@@ -2097,6 +2116,8 @@ SCREEN *newterm(
/* ./base/lib_newwin.c */
+#include "/usr/lib/gcc/x86_64-linux-gnu/4.4.5/include/stddef.h"
+
#undef _nc_freewin
int _nc_freewin(
WINDOW *win)
@@ -2440,8 +2461,8 @@ int scr_set(
void _nc_scroll_window(
WINDOW *win,
int const n,
- short const top,
- short const bottom,
+ int const top,
+ int const bottom,
cchar_t blank)
{ /* void */ }
@@ -2486,7 +2507,7 @@ int _nc_setupscreen_sp(
int slines,
int scolumns,
FILE *output,
- NCURSES_BOOL filtered,
+ int filtered,
int slk_format)
{ return(*(int *)0); }
@@ -2495,7 +2516,7 @@ int _nc_setupscreen(
int slines,
int scolumns,
FILE *output,
- NCURSES_BOOL filtered,
+ int filtered,
int slk_format)
{ return(*(int *)0); }
@@ -2777,7 +2798,7 @@ char *_tracemouse(
#undef _nc_signal_handler
void _nc_signal_handler(
- NCURSES_BOOL enable)
+ int enable)
{ /* void */ }
/* ./base/lib_ungetch.c */
@@ -3014,12 +3035,6 @@ char *_nc_varargs(
va_list ap)
{ return(*(char **)0); }
-/* ./base/memmove.c */
-
-#undef _nc_memmove
-void _nc_memmove(void)
- { /* void */ }
-
/* ./base/vsscanf.c */
#undef _nc_vsscanf
@@ -3554,7 +3569,7 @@ void _nc_align_termtype(
#undef _nc_copy_termtype
void _nc_copy_termtype(
TERMTYPE *dst,
- TERMTYPE *src)
+ const TERMTYPE *src)
{ /* void */ }
/* ./codes.c */
@@ -3653,6 +3668,8 @@ struct name_table_entry const *_nc_find_type_entry(
/* ./tinfo/db_iterator.c */
+#include <time.h>
+
#undef _nc_tic_dir
const char *_nc_tic_dir(
const char *path)
@@ -3744,6 +3761,12 @@ int _nc_getenv_num(
const char *name)
{ return(*(int *)0); }
+#undef _nc_setenv_num
+void _nc_setenv_num(
+ const char *name,
+ int value)
+ { /* void */ }
+
/* ./tinfo/home_terminfo.c */
#undef _nc_home_terminfo
@@ -3929,8 +3952,6 @@ char *longname(void)
/* ./tinfo/lib_napms.c */
-#include <time.h>
-
#undef napms_sp
int napms_sp(
SCREEN *sp,
@@ -4040,7 +4061,7 @@ int _nc_putp_flush_sp(
#undef _nc_keypad
int _nc_keypad(
SCREEN *sp,
- NCURSES_BOOL flag)
+ int flag)
{ return(*(int *)0); }
/* ./tinfo/lib_raw.c */
@@ -4149,11 +4170,22 @@ void use_env_sp(
NCURSES_BOOL f)
{ /* void */ }
+#undef use_tioctl_sp
+void use_tioctl_sp(
+ SCREEN *sp,
+ NCURSES_BOOL f)
+ { /* void */ }
+
#undef use_env
void use_env(
NCURSES_BOOL f)
{ /* void */ }
+#undef use_tioctl
+void use_tioctl(
+ NCURSES_BOOL f)
+ { /* void */ }
+
#undef _nc_get_screensize
void _nc_get_screensize(
SCREEN *sp,
@@ -4175,7 +4207,7 @@ int _nc_setup_tinfo(
#undef _nc_tinfo_cmdch
void _nc_tinfo_cmdch(
TERMINAL *termp,
- char proto)
+ int proto)
{ /* void */ }
#undef _nc_get_locale
@@ -4196,7 +4228,7 @@ int _nc_setupterm(
char *tname,
int Filedes,
int *errret,
- NCURSES_BOOL reuse)
+ int reuse)
{ return(*(int *)0); }
#undef new_prescr
@@ -4335,7 +4367,7 @@ int _nc_tparm_err;
int _nc_tparm_analyze(
const char *string,
char *p_is_s[9],
- int *popcount)
+ int *_nc_popcount)
{ return(*(int *)0); }
#undef tparm
@@ -4355,7 +4387,7 @@ char *tiparm(
#undef PC
char PC;
#undef ospeed
-NCURSES_OSPEED ospeed;
+short ospeed;
#undef _nc_nulls_sent
int _nc_nulls_sent;
@@ -4395,12 +4427,28 @@ int _nc_outch(
int ch)
{ return(*(int *)0); }
+#undef _nc_putchar_sp
+int _nc_putchar_sp(
+ SCREEN *sp,
+ int ch)
+ { return(*(int *)0); }
+
+#undef _nc_putchar
+int _nc_putchar(
+ int ch)
+ { return(*(int *)0); }
+
#undef putp_sp
int putp_sp(
SCREEN *sp,
const char *string)
{ return(*(int *)0); }
+#undef putp
+int putp(
+ const char *string)
+ { return(*(int *)0); }
+
#undef _nc_putp_sp
int _nc_putp_sp(
SCREEN *sp,
@@ -4408,11 +4456,6 @@ int _nc_putp_sp(
const char *string)
{ return(*(int *)0); }
-#undef putp
-int putp(
- const char *string)
- { return(*(int *)0); }
-
#undef _nc_putp
int _nc_putp(
const char *name,
@@ -4463,12 +4506,12 @@ void _tracef(
#undef _nc_retrace_bool
NCURSES_BOOL _nc_retrace_bool(
- NCURSES_BOOL code)
+ int code)
{ return(*(NCURSES_BOOL *)0); }
#undef _nc_retrace_char
char _nc_retrace_char(
- char code)
+ int code)
{ return(*(char *)0); }
#undef _nc_retrace_int
@@ -4713,10 +4756,30 @@ char *const strnames[] = {0};
#undef strfnames
char *const strfnames[] = {0};
+/* ./tinfo/obsolete.c */
+
+#undef _nc_set_buffer_sp
+void _nc_set_buffer_sp(
+ SCREEN *sp,
+ FILE *ofp,
+ int buffered)
+ { /* void */ }
+
+#undef _nc_set_buffer
+void _nc_set_buffer(
+ FILE *ofp,
+ int buffered)
+ { /* void */ }
+
/* ./tinfo/read_entry.c */
#include <hashed_db.h>
+#undef _nc_init_termtype
+void _nc_init_termtype(
+ TERMTYPE *const tp)
+ { /* void */ }
+
#undef _nc_read_termtype
int _nc_read_termtype(
TERMTYPE *ptr,
@@ -4741,25 +4804,8 @@ int _nc_read_entry(
#include <sys/types.h>
-#undef _nc_read_termcap_entry
-int _nc_read_termcap_entry(
- const char *const tn,
- TERMTYPE *const tp)
- { return(*(int *)0); }
-
-/* ./tinfo/setbuf.c */
-
-#undef _nc_set_buffer_sp
-void _nc_set_buffer_sp(
- SCREEN *sp,
- FILE *ofp,
- NCURSES_BOOL buffered)
- { /* void */ }
-
-#undef _nc_set_buffer
-void _nc_set_buffer(
- FILE *ofp,
- NCURSES_BOOL buffered)
+#undef _nc_read_termcap
+void _nc_read_termcap(void)
{ /* void */ }
/* ./tinfo/strings.c */
@@ -5007,6 +5053,8 @@ int _nc_resolve_uses(
#undef _nc_syntax
int _nc_syntax;
+#undef _nc_strict_bsd
+int _nc_strict_bsd;
#undef _nc_curr_file_pos
long _nc_curr_file_pos;
#undef _nc_comment_start
diff --git a/ncurses/llib-ltic b/ncurses/llib-ltic
new file mode 100644
index 000000000000..981bb196706a
--- /dev/null
+++ b/ncurses/llib-ltic
@@ -0,0 +1,212 @@
+/****************************************************************************
+ * Copyright (c) 2012 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Thomas E. Dickey 2012 *
+ ****************************************************************************/
+/* LINTLIBRARY */
+
+/* ./tinfo/alloc_entry.c */
+
+#include <curses.priv.h>
+#include <tic.h>
+
+#undef _nc_init_entry
+void _nc_init_entry(
+ TERMTYPE *const tp)
+ { /* void */ }
+
+#undef _nc_copy_entry
+ENTRY *_nc_copy_entry(
+ ENTRY *oldp)
+ { return(*(ENTRY **)0); }
+
+#undef _nc_save_str
+char *_nc_save_str(
+ const char *const string)
+ { return(*(char **)0); }
+
+#undef _nc_wrap_entry
+void _nc_wrap_entry(
+ ENTRY *const ep,
+ NCURSES_BOOL copy_strings)
+ { /* void */ }
+
+#undef _nc_merge_entry
+void _nc_merge_entry(
+ TERMTYPE *const to,
+ TERMTYPE *const from)
+ { /* void */ }
+
+/* ./tinfo/captoinfo.c */
+
+#include <ctype.h>
+
+#undef _nc_captoinfo
+char *_nc_captoinfo(
+ const char *cap,
+ const char *s,
+ int const parameterized)
+ { return(*(char **)0); }
+
+#undef _nc_infotocap
+char *_nc_infotocap(
+ const char *cap,
+ const char *str,
+ int const parameterized)
+ { return(*(char **)0); }
+
+/* ./tinfo/comp_expand.c */
+
+#undef _nc_tic_expand
+char *_nc_tic_expand(
+ const char *srcp,
+ NCURSES_BOOL tic_format,
+ int numbers)
+ { return(*(char **)0); }
+
+/* ./tinfo/comp_parse.c */
+
+#undef _nc_check_termtype2
+void (*_nc_check_termtype2)(
+ TERMTYPE *p1,
+ NCURSES_BOOL p2);
+#undef _nc_check_termtype
+void (*_nc_check_termtype)(
+ TERMTYPE *p1);
+
+#undef _nc_entry_match
+NCURSES_BOOL _nc_entry_match(
+ char *n1,
+ char *n2)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef _nc_read_entry_source
+void _nc_read_entry_source(
+ FILE *fp,
+ char *buf,
+ int literal,
+ NCURSES_BOOL silent,
+ NCURSES_BOOL (*hook)(
+ ENTRY *p1))
+ { /* void */ }
+
+#undef _nc_resolve_uses2
+int _nc_resolve_uses2(
+ NCURSES_BOOL fullresolve,
+ NCURSES_BOOL literal)
+ { return(*(int *)0); }
+
+#undef _nc_resolve_uses
+int _nc_resolve_uses(
+ NCURSES_BOOL fullresolve)
+ { return(*(int *)0); }
+
+/* ./tinfo/comp_scan.c */
+
+#undef _nc_syntax
+int _nc_syntax;
+#undef _nc_strict_bsd
+int _nc_strict_bsd;
+#undef _nc_curr_file_pos
+long _nc_curr_file_pos;
+#undef _nc_comment_start
+long _nc_comment_start;
+#undef _nc_comment_end
+long _nc_comment_end;
+#undef _nc_start_line
+long _nc_start_line;
+#undef _nc_curr_token
+struct token _nc_curr_token;
+#undef _nc_disable_period
+NCURSES_BOOL _nc_disable_period;
+
+#undef _nc_reset_input
+void _nc_reset_input(
+ FILE *fp,
+ char *buf)
+ { /* void */ }
+
+#undef _nc_get_token
+int _nc_get_token(
+ NCURSES_BOOL silent)
+ { return(*(int *)0); }
+
+#undef _nc_trans_string
+int _nc_trans_string(
+ char *ptr,
+ char *last)
+ { return(*(int *)0); }
+
+#undef _nc_push_token
+void _nc_push_token(
+ int tokclass)
+ { /* void */ }
+
+#undef _nc_panic_mode
+void _nc_panic_mode(
+ char ch)
+ { /* void */ }
+
+/* ./tinfo/parse_entry.c */
+
+#undef _nc_parse_entry
+int _nc_parse_entry(
+ struct entry *entryp,
+ int literal,
+ NCURSES_BOOL silent)
+ { return(*(int *)0); }
+
+#undef _nc_capcmp
+int _nc_capcmp(
+ const char *s,
+ const char *t)
+ { return(*(int *)0); }
+
+typedef struct {
+ const char *from;
+ const char *to;
+} assoc;
+
+/* ./tinfo/write_entry.c */
+
+#include <hashed_db.h>
+
+#undef _nc_set_writedir
+void _nc_set_writedir(
+ char *dir)
+ { /* void */ }
+
+#undef _nc_write_entry
+void _nc_write_entry(
+ TERMTYPE *const tp)
+ { /* void */ }
+
+#undef _nc_tic_written
+int _nc_tic_written(void)
+ { return(*(int *)0); }
diff --git a/ncurses/llib-ltict b/ncurses/llib-ltict
new file mode 100644
index 000000000000..8371c1824876
--- /dev/null
+++ b/ncurses/llib-ltict
@@ -0,0 +1,212 @@
+/****************************************************************************
+ * Copyright (c) 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 2013 *
+ ****************************************************************************/
+/* LINTLIBRARY */
+
+/* ./tinfo/alloc_entry.c */
+
+#include <curses.priv.h>
+#include <tic.h>
+
+#undef _nc_init_entry
+void _nc_init_entry(
+ TERMTYPE *const tp)
+ { /* void */ }
+
+#undef _nc_copy_entry
+ENTRY *_nc_copy_entry(
+ ENTRY *oldp)
+ { return(*(ENTRY **)0); }
+
+#undef _nc_save_str
+char *_nc_save_str(
+ const char *const string)
+ { return(*(char **)0); }
+
+#undef _nc_wrap_entry
+void _nc_wrap_entry(
+ ENTRY *const ep,
+ NCURSES_BOOL copy_strings)
+ { /* void */ }
+
+#undef _nc_merge_entry
+void _nc_merge_entry(
+ TERMTYPE *const to,
+ TERMTYPE *const from)
+ { /* void */ }
+
+/* ./tinfo/captoinfo.c */
+
+#include <ctype.h>
+
+#undef _nc_captoinfo
+char *_nc_captoinfo(
+ const char *cap,
+ const char *s,
+ int const parameterized)
+ { return(*(char **)0); }
+
+#undef _nc_infotocap
+char *_nc_infotocap(
+ const char *cap,
+ const char *str,
+ int const parameterized)
+ { return(*(char **)0); }
+
+/* ./tinfo/comp_expand.c */
+
+#undef _nc_tic_expand
+char *_nc_tic_expand(
+ const char *srcp,
+ NCURSES_BOOL tic_format,
+ int numbers)
+ { return(*(char **)0); }
+
+/* ./tinfo/comp_parse.c */
+
+#undef _nc_check_termtype2
+void (*_nc_check_termtype2)(
+ TERMTYPE *p1,
+ NCURSES_BOOL p2);
+#undef _nc_check_termtype
+void (*_nc_check_termtype)(
+ TERMTYPE *p1);
+
+#undef _nc_entry_match
+NCURSES_BOOL _nc_entry_match(
+ char *n1,
+ char *n2)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef _nc_read_entry_source
+void _nc_read_entry_source(
+ FILE *fp,
+ char *buf,
+ int literal,
+ NCURSES_BOOL silent,
+ NCURSES_BOOL (*hook)(
+ ENTRY *p1))
+ { /* void */ }
+
+#undef _nc_resolve_uses2
+int _nc_resolve_uses2(
+ NCURSES_BOOL fullresolve,
+ NCURSES_BOOL literal)
+ { return(*(int *)0); }
+
+#undef _nc_resolve_uses
+int _nc_resolve_uses(
+ NCURSES_BOOL fullresolve)
+ { return(*(int *)0); }
+
+/* ./tinfo/comp_scan.c */
+
+#undef _nc_syntax
+int _nc_syntax;
+#undef _nc_strict_bsd
+int _nc_strict_bsd;
+#undef _nc_curr_file_pos
+long _nc_curr_file_pos;
+#undef _nc_comment_start
+long _nc_comment_start;
+#undef _nc_comment_end
+long _nc_comment_end;
+#undef _nc_start_line
+long _nc_start_line;
+#undef _nc_curr_token
+struct token _nc_curr_token;
+#undef _nc_disable_period
+NCURSES_BOOL _nc_disable_period;
+
+#undef _nc_reset_input
+void _nc_reset_input(
+ FILE *fp,
+ char *buf)
+ { /* void */ }
+
+#undef _nc_get_token
+int _nc_get_token(
+ NCURSES_BOOL silent)
+ { return(*(int *)0); }
+
+#undef _nc_trans_string
+int _nc_trans_string(
+ char *ptr,
+ char *last)
+ { return(*(int *)0); }
+
+#undef _nc_push_token
+void _nc_push_token(
+ int tokclass)
+ { /* void */ }
+
+#undef _nc_panic_mode
+void _nc_panic_mode(
+ char ch)
+ { /* void */ }
+
+/* ./tinfo/parse_entry.c */
+
+#undef _nc_parse_entry
+int _nc_parse_entry(
+ struct entry *entryp,
+ int literal,
+ NCURSES_BOOL silent)
+ { return(*(int *)0); }
+
+#undef _nc_capcmp
+int _nc_capcmp(
+ const char *s,
+ const char *t)
+ { return(*(int *)0); }
+
+typedef struct {
+ const char *from;
+ const char *to;
+} assoc;
+
+/* ./tinfo/write_entry.c */
+
+#include <hashed_db.h>
+
+#undef _nc_set_writedir
+void _nc_set_writedir(
+ char *dir)
+ { /* void */ }
+
+#undef _nc_write_entry
+void _nc_write_entry(
+ TERMTYPE *const tp)
+ { /* void */ }
+
+#undef _nc_tic_written
+int _nc_tic_written(void)
+ { return(*(int *)0); }
diff --git a/ncurses/llib-ltictw b/ncurses/llib-ltictw
new file mode 100644
index 000000000000..981bb196706a
--- /dev/null
+++ b/ncurses/llib-ltictw
@@ -0,0 +1,212 @@
+/****************************************************************************
+ * Copyright (c) 2012 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Thomas E. Dickey 2012 *
+ ****************************************************************************/
+/* LINTLIBRARY */
+
+/* ./tinfo/alloc_entry.c */
+
+#include <curses.priv.h>
+#include <tic.h>
+
+#undef _nc_init_entry
+void _nc_init_entry(
+ TERMTYPE *const tp)
+ { /* void */ }
+
+#undef _nc_copy_entry
+ENTRY *_nc_copy_entry(
+ ENTRY *oldp)
+ { return(*(ENTRY **)0); }
+
+#undef _nc_save_str
+char *_nc_save_str(
+ const char *const string)
+ { return(*(char **)0); }
+
+#undef _nc_wrap_entry
+void _nc_wrap_entry(
+ ENTRY *const ep,
+ NCURSES_BOOL copy_strings)
+ { /* void */ }
+
+#undef _nc_merge_entry
+void _nc_merge_entry(
+ TERMTYPE *const to,
+ TERMTYPE *const from)
+ { /* void */ }
+
+/* ./tinfo/captoinfo.c */
+
+#include <ctype.h>
+
+#undef _nc_captoinfo
+char *_nc_captoinfo(
+ const char *cap,
+ const char *s,
+ int const parameterized)
+ { return(*(char **)0); }
+
+#undef _nc_infotocap
+char *_nc_infotocap(
+ const char *cap,
+ const char *str,
+ int const parameterized)
+ { return(*(char **)0); }
+
+/* ./tinfo/comp_expand.c */
+
+#undef _nc_tic_expand
+char *_nc_tic_expand(
+ const char *srcp,
+ NCURSES_BOOL tic_format,
+ int numbers)
+ { return(*(char **)0); }
+
+/* ./tinfo/comp_parse.c */
+
+#undef _nc_check_termtype2
+void (*_nc_check_termtype2)(
+ TERMTYPE *p1,
+ NCURSES_BOOL p2);
+#undef _nc_check_termtype
+void (*_nc_check_termtype)(
+ TERMTYPE *p1);
+
+#undef _nc_entry_match
+NCURSES_BOOL _nc_entry_match(
+ char *n1,
+ char *n2)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef _nc_read_entry_source
+void _nc_read_entry_source(
+ FILE *fp,
+ char *buf,
+ int literal,
+ NCURSES_BOOL silent,
+ NCURSES_BOOL (*hook)(
+ ENTRY *p1))
+ { /* void */ }
+
+#undef _nc_resolve_uses2
+int _nc_resolve_uses2(
+ NCURSES_BOOL fullresolve,
+ NCURSES_BOOL literal)
+ { return(*(int *)0); }
+
+#undef _nc_resolve_uses
+int _nc_resolve_uses(
+ NCURSES_BOOL fullresolve)
+ { return(*(int *)0); }
+
+/* ./tinfo/comp_scan.c */
+
+#undef _nc_syntax
+int _nc_syntax;
+#undef _nc_strict_bsd
+int _nc_strict_bsd;
+#undef _nc_curr_file_pos
+long _nc_curr_file_pos;
+#undef _nc_comment_start
+long _nc_comment_start;
+#undef _nc_comment_end
+long _nc_comment_end;
+#undef _nc_start_line
+long _nc_start_line;
+#undef _nc_curr_token
+struct token _nc_curr_token;
+#undef _nc_disable_period
+NCURSES_BOOL _nc_disable_period;
+
+#undef _nc_reset_input
+void _nc_reset_input(
+ FILE *fp,
+ char *buf)
+ { /* void */ }
+
+#undef _nc_get_token
+int _nc_get_token(
+ NCURSES_BOOL silent)
+ { return(*(int *)0); }
+
+#undef _nc_trans_string
+int _nc_trans_string(
+ char *ptr,
+ char *last)
+ { return(*(int *)0); }
+
+#undef _nc_push_token
+void _nc_push_token(
+ int tokclass)
+ { /* void */ }
+
+#undef _nc_panic_mode
+void _nc_panic_mode(
+ char ch)
+ { /* void */ }
+
+/* ./tinfo/parse_entry.c */
+
+#undef _nc_parse_entry
+int _nc_parse_entry(
+ struct entry *entryp,
+ int literal,
+ NCURSES_BOOL silent)
+ { return(*(int *)0); }
+
+#undef _nc_capcmp
+int _nc_capcmp(
+ const char *s,
+ const char *t)
+ { return(*(int *)0); }
+
+typedef struct {
+ const char *from;
+ const char *to;
+} assoc;
+
+/* ./tinfo/write_entry.c */
+
+#include <hashed_db.h>
+
+#undef _nc_set_writedir
+void _nc_set_writedir(
+ char *dir)
+ { /* void */ }
+
+#undef _nc_write_entry
+void _nc_write_entry(
+ TERMTYPE *const tp)
+ { /* void */ }
+
+#undef _nc_tic_written
+int _nc_tic_written(void)
+ { return(*(int *)0); }
diff --git a/ncurses/llib-lticw b/ncurses/llib-lticw
new file mode 100644
index 000000000000..981bb196706a
--- /dev/null
+++ b/ncurses/llib-lticw
@@ -0,0 +1,212 @@
+/****************************************************************************
+ * Copyright (c) 2012 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Thomas E. Dickey 2012 *
+ ****************************************************************************/
+/* LINTLIBRARY */
+
+/* ./tinfo/alloc_entry.c */
+
+#include <curses.priv.h>
+#include <tic.h>
+
+#undef _nc_init_entry
+void _nc_init_entry(
+ TERMTYPE *const tp)
+ { /* void */ }
+
+#undef _nc_copy_entry
+ENTRY *_nc_copy_entry(
+ ENTRY *oldp)
+ { return(*(ENTRY **)0); }
+
+#undef _nc_save_str
+char *_nc_save_str(
+ const char *const string)
+ { return(*(char **)0); }
+
+#undef _nc_wrap_entry
+void _nc_wrap_entry(
+ ENTRY *const ep,
+ NCURSES_BOOL copy_strings)
+ { /* void */ }
+
+#undef _nc_merge_entry
+void _nc_merge_entry(
+ TERMTYPE *const to,
+ TERMTYPE *const from)
+ { /* void */ }
+
+/* ./tinfo/captoinfo.c */
+
+#include <ctype.h>
+
+#undef _nc_captoinfo
+char *_nc_captoinfo(
+ const char *cap,
+ const char *s,
+ int const parameterized)
+ { return(*(char **)0); }
+
+#undef _nc_infotocap
+char *_nc_infotocap(
+ const char *cap,
+ const char *str,
+ int const parameterized)
+ { return(*(char **)0); }
+
+/* ./tinfo/comp_expand.c */
+
+#undef _nc_tic_expand
+char *_nc_tic_expand(
+ const char *srcp,
+ NCURSES_BOOL tic_format,
+ int numbers)
+ { return(*(char **)0); }
+
+/* ./tinfo/comp_parse.c */
+
+#undef _nc_check_termtype2
+void (*_nc_check_termtype2)(
+ TERMTYPE *p1,
+ NCURSES_BOOL p2);
+#undef _nc_check_termtype
+void (*_nc_check_termtype)(
+ TERMTYPE *p1);
+
+#undef _nc_entry_match
+NCURSES_BOOL _nc_entry_match(
+ char *n1,
+ char *n2)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef _nc_read_entry_source
+void _nc_read_entry_source(
+ FILE *fp,
+ char *buf,
+ int literal,
+ NCURSES_BOOL silent,
+ NCURSES_BOOL (*hook)(
+ ENTRY *p1))
+ { /* void */ }
+
+#undef _nc_resolve_uses2
+int _nc_resolve_uses2(
+ NCURSES_BOOL fullresolve,
+ NCURSES_BOOL literal)
+ { return(*(int *)0); }
+
+#undef _nc_resolve_uses
+int _nc_resolve_uses(
+ NCURSES_BOOL fullresolve)
+ { return(*(int *)0); }
+
+/* ./tinfo/comp_scan.c */
+
+#undef _nc_syntax
+int _nc_syntax;
+#undef _nc_strict_bsd
+int _nc_strict_bsd;
+#undef _nc_curr_file_pos
+long _nc_curr_file_pos;
+#undef _nc_comment_start
+long _nc_comment_start;
+#undef _nc_comment_end
+long _nc_comment_end;
+#undef _nc_start_line
+long _nc_start_line;
+#undef _nc_curr_token
+struct token _nc_curr_token;
+#undef _nc_disable_period
+NCURSES_BOOL _nc_disable_period;
+
+#undef _nc_reset_input
+void _nc_reset_input(
+ FILE *fp,
+ char *buf)
+ { /* void */ }
+
+#undef _nc_get_token
+int _nc_get_token(
+ NCURSES_BOOL silent)
+ { return(*(int *)0); }
+
+#undef _nc_trans_string
+int _nc_trans_string(
+ char *ptr,
+ char *last)
+ { return(*(int *)0); }
+
+#undef _nc_push_token
+void _nc_push_token(
+ int tokclass)
+ { /* void */ }
+
+#undef _nc_panic_mode
+void _nc_panic_mode(
+ char ch)
+ { /* void */ }
+
+/* ./tinfo/parse_entry.c */
+
+#undef _nc_parse_entry
+int _nc_parse_entry(
+ struct entry *entryp,
+ int literal,
+ NCURSES_BOOL silent)
+ { return(*(int *)0); }
+
+#undef _nc_capcmp
+int _nc_capcmp(
+ const char *s,
+ const char *t)
+ { return(*(int *)0); }
+
+typedef struct {
+ const char *from;
+ const char *to;
+} assoc;
+
+/* ./tinfo/write_entry.c */
+
+#include <hashed_db.h>
+
+#undef _nc_set_writedir
+void _nc_set_writedir(
+ char *dir)
+ { /* void */ }
+
+#undef _nc_write_entry
+void _nc_write_entry(
+ TERMTYPE *const tp)
+ { /* void */ }
+
+#undef _nc_tic_written
+int _nc_tic_written(void)
+ { return(*(int *)0); }
diff --git a/ncurses/llib-ltinfo b/ncurses/llib-ltinfo
new file mode 100644
index 000000000000..79ac2293e370
--- /dev/null
+++ b/ncurses/llib-ltinfo
@@ -0,0 +1,1526 @@
+/****************************************************************************
+ * 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 *
+ ****************************************************************************/
+/* LINTLIBRARY */
+
+/* ./tinfo/access.c */
+
+#include <curses.priv.h>
+#include <ctype.h>
+#include <tic.h>
+
+#undef _nc_rootname
+char *_nc_rootname(
+ char *path)
+ { return(*(char **)0); }
+
+#undef _nc_is_abs_path
+NCURSES_BOOL _nc_is_abs_path(
+ const char *path)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef _nc_pathlast
+unsigned _nc_pathlast(
+ const char *path)
+ { return(*(unsigned *)0); }
+
+#undef _nc_basename
+char *_nc_basename(
+ char *path)
+ { return(*(char **)0); }
+
+#undef _nc_access
+int _nc_access(
+ const char *path,
+ int mode)
+ { return(*(int *)0); }
+
+#undef _nc_is_dir_path
+NCURSES_BOOL _nc_is_dir_path(
+ const char *path)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef _nc_is_file_path
+NCURSES_BOOL _nc_is_file_path(
+ const char *path)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef _nc_env_access
+int _nc_env_access(void)
+ { return(*(int *)0); }
+
+/* ./tinfo/add_tries.c */
+
+#undef _nc_add_to_try
+int _nc_add_to_try(
+ TRIES **tree,
+ const char *str,
+ unsigned code)
+ { return(*(int *)0); }
+
+/* ./tinfo/alloc_ttype.c */
+
+#undef _nc_align_termtype
+void _nc_align_termtype(
+ TERMTYPE *to,
+ TERMTYPE *from)
+ { /* void */ }
+
+#undef _nc_copy_termtype
+void _nc_copy_termtype(
+ TERMTYPE *dst,
+ const TERMTYPE *src)
+ { /* void */ }
+
+/* ./codes.c */
+
+#undef boolcodes
+char *const boolcodes[] = {0};
+#undef numcodes
+char *const numcodes[] = {0};
+#undef strcodes
+char *const strcodes[] = {0};
+
+/* ./comp_captab.c */
+
+#include <hashsize.h>
+
+#undef _nc_get_table
+const struct name_table_entry *_nc_get_table(
+ NCURSES_BOOL termcap)
+ { return(*(const struct name_table_entry **)0); }
+
+#undef _nc_get_hash_table
+const HashValue *_nc_get_hash_table(
+ NCURSES_BOOL termcap)
+ { return(*(const HashValue **)0); }
+
+#undef _nc_get_alias_table
+const struct alias *_nc_get_alias_table(
+ NCURSES_BOOL termcap)
+ { return(*(const struct alias **)0); }
+
+#undef _nc_get_hash_info
+const HashData *_nc_get_hash_info(
+ NCURSES_BOOL termcap)
+ { return(*(const HashData **)0); }
+
+/* ./tinfo/comp_error.c */
+
+#undef _nc_suppress_warnings
+NCURSES_BOOL _nc_suppress_warnings;
+#undef _nc_curr_line
+int _nc_curr_line;
+#undef _nc_curr_col
+int _nc_curr_col;
+
+#undef _nc_get_source
+const char *_nc_get_source(void)
+ { return(*(const char **)0); }
+
+#undef _nc_set_source
+void _nc_set_source(
+ const char *const name)
+ { /* void */ }
+
+#undef _nc_set_type
+void _nc_set_type(
+ const char *const name)
+ { /* void */ }
+
+#undef _nc_get_type
+void _nc_get_type(
+ char *name)
+ { /* void */ }
+
+#undef _nc_warning
+void _nc_warning(
+ const char *const fmt,
+ ...)
+ { /* void */ }
+
+#undef _nc_err_abort
+void _nc_err_abort(
+ const char *const fmt,
+ ...)
+ { /* void */ }
+
+#undef _nc_syserr_abort
+void _nc_syserr_abort(
+ const char *const fmt,
+ ...)
+ { /* void */ }
+
+/* ./tinfo/comp_hash.c */
+
+#undef _nc_find_entry
+struct name_table_entry const *_nc_find_entry(
+ const char *string,
+ const HashValue *hash_table)
+ { return(*(struct name_table_entry const **)0); }
+
+#undef _nc_find_type_entry
+struct name_table_entry const *_nc_find_type_entry(
+ const char *string,
+ int type,
+ NCURSES_BOOL termcap)
+ { return(*(struct name_table_entry const **)0); }
+
+/* ./tinfo/db_iterator.c */
+
+#include <time.h>
+
+#undef _nc_tic_dir
+const char *_nc_tic_dir(
+ const char *path)
+ { return(*(const char **)0); }
+
+#undef _nc_keep_tic_dir
+void _nc_keep_tic_dir(
+ const char *path)
+ { /* void */ }
+
+#undef _nc_last_db
+void _nc_last_db(void)
+ { /* void */ }
+
+#undef _nc_next_db
+const char *_nc_next_db(
+ DBDIRS *state,
+ int *offset)
+ { return(*(const char **)0); }
+
+#undef _nc_first_db
+void _nc_first_db(
+ DBDIRS *state,
+ int *offset)
+ { /* void */ }
+
+/* ./tinfo/doalloc.c */
+
+#undef _nc_doalloc
+void *_nc_doalloc(
+ void *oldp,
+ size_t amount)
+ { return(*(void **)0); }
+
+/* ./tinfo/entries.c */
+
+#undef _nc_head
+ENTRY *_nc_head;
+#undef _nc_tail
+ENTRY *_nc_tail;
+
+#undef _nc_free_entry
+void _nc_free_entry(
+ ENTRY *headp,
+ TERMTYPE *tterm)
+ { /* void */ }
+
+#undef _nc_free_entries
+void _nc_free_entries(
+ ENTRY *headp)
+ { /* void */ }
+
+#undef _nc_delink_entry
+ENTRY *_nc_delink_entry(
+ ENTRY *headp,
+ TERMTYPE *tterm)
+ { return(*(ENTRY **)0); }
+
+#undef _nc_leaks_tinfo
+void _nc_leaks_tinfo(void)
+ { /* void */ }
+
+/* ./fallback.c */
+
+#undef _nc_fallback
+const TERMTYPE *_nc_fallback(
+ const char *name)
+ { return(*(const TERMTYPE **)0); }
+
+/* ./tinfo/free_ttype.c */
+
+#undef _nc_free_termtype
+void _nc_free_termtype(
+ TERMTYPE *ptr)
+ { /* void */ }
+
+#undef _nc_user_definable
+NCURSES_BOOL _nc_user_definable;
+
+#undef use_extended_names
+int use_extended_names(
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+/* ./tinfo/getenv_num.c */
+
+#undef _nc_getenv_num
+int _nc_getenv_num(
+ const char *name)
+ { return(*(int *)0); }
+
+#undef _nc_setenv_num
+void _nc_setenv_num(
+ const char *name,
+ int value)
+ { /* void */ }
+
+/* ./tinfo/home_terminfo.c */
+
+#undef _nc_home_terminfo
+char *_nc_home_terminfo(void)
+ { return(*(char **)0); }
+
+/* ./tinfo/init_keytry.c */
+
+#if 0
+
+#include <init_keytry.h>
+
+#undef _nc_tinfo_fkeys
+const struct tinfo_fkeys _nc_tinfo_fkeys[] = {0};
+
+#endif
+
+#undef _nc_init_keytry
+void _nc_init_keytry(
+ SCREEN *sp)
+ { /* void */ }
+
+/* ./tinfo/lib_acs.c */
+
+#undef acs_map
+chtype acs_map[128];
+
+#undef _nc_init_acs_sp
+void _nc_init_acs_sp(
+ SCREEN *sp)
+ { /* void */ }
+
+#undef _nc_init_acs
+void _nc_init_acs(void)
+ { /* void */ }
+
+/* ./tinfo/lib_baudrate.c */
+
+#include <termcap.h>
+
+struct speed {
+ int s;
+ int sp;
+};
+
+#undef _nc_baudrate
+int _nc_baudrate(
+ int OSpeed)
+ { return(*(int *)0); }
+
+#undef _nc_ospeed
+int _nc_ospeed(
+ int BaudRate)
+ { return(*(int *)0); }
+
+#undef baudrate_sp
+int baudrate_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef baudrate
+int baudrate(void)
+ { return(*(int *)0); }
+
+/* ./tinfo/lib_cur_term.c */
+
+#undef cur_term
+TERMINAL *cur_term;
+
+#undef set_curterm_sp
+TERMINAL *set_curterm_sp(
+ SCREEN *sp,
+ TERMINAL *termp)
+ { return(*(TERMINAL **)0); }
+
+#undef set_curterm
+TERMINAL *set_curterm(
+ TERMINAL *termp)
+ { return(*(TERMINAL **)0); }
+
+#undef del_curterm_sp
+int del_curterm_sp(
+ SCREEN *sp,
+ TERMINAL *termp)
+ { return(*(int *)0); }
+
+#undef del_curterm
+int del_curterm(
+ TERMINAL *termp)
+ { return(*(int *)0); }
+
+/* ./tinfo/lib_data.c */
+
+#undef stdscr
+WINDOW *stdscr;
+#undef curscr
+WINDOW *curscr;
+#undef newscr
+WINDOW *newscr;
+#undef _nc_screen_chain
+SCREEN *_nc_screen_chain;
+#undef SP
+SCREEN *SP;
+#undef _nc_globals
+NCURSES_GLOBALS _nc_globals;
+#undef _nc_prescreen
+NCURSES_PRESCREEN _nc_prescreen;
+
+#undef _nc_screen_of
+SCREEN *_nc_screen_of(
+ WINDOW *win)
+ { return(*(SCREEN **)0); }
+
+/* ./tinfo/lib_has_cap.c */
+
+#undef has_ic_sp
+NCURSES_BOOL has_ic_sp(
+ SCREEN *sp)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef has_ic
+NCURSES_BOOL has_ic(void)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef has_il_sp
+NCURSES_BOOL has_il_sp(
+ SCREEN *sp)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef has_il
+NCURSES_BOOL has_il(void)
+ { return(*(NCURSES_BOOL *)0); }
+
+/* ./tinfo/lib_kernel.c */
+
+#undef erasechar_sp
+char erasechar_sp(
+ SCREEN *sp)
+ { return(*(char *)0); }
+
+#undef erasechar
+char erasechar(void)
+ { return(*(char *)0); }
+
+#undef killchar_sp
+char killchar_sp(
+ SCREEN *sp)
+ { return(*(char *)0); }
+
+#undef killchar
+char killchar(void)
+ { return(*(char *)0); }
+
+#undef flushinp_sp
+int flushinp_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef flushinp
+int flushinp(void)
+ { return(*(int *)0); }
+
+/* ./lib_keyname.c */
+
+struct kn { short offset; int code; };
+
+#undef keyname_sp
+char *keyname_sp(
+ SCREEN *sp,
+ int c)
+ { return(*(char **)0); }
+
+#undef keyname
+char *keyname(
+ int c)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_longname.c */
+
+#undef longname
+char *longname(void)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_napms.c */
+
+#include <sys/time.h>
+
+#undef napms_sp
+int napms_sp(
+ SCREEN *sp,
+ int ms)
+ { return(*(int *)0); }
+
+#undef napms
+int napms(
+ int ms)
+ { return(*(int *)0); }
+
+/* ./tinfo/lib_options.c */
+
+#undef idlok
+int idlok(
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+#undef idcok
+void idcok(
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { /* void */ }
+
+#undef halfdelay_sp
+int halfdelay_sp(
+ SCREEN *sp,
+ int t)
+ { return(*(int *)0); }
+
+#undef halfdelay
+int halfdelay(
+ int t)
+ { return(*(int *)0); }
+
+#undef nodelay
+int nodelay(
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+#undef notimeout
+int notimeout(
+ WINDOW *win,
+ NCURSES_BOOL f)
+ { return(*(int *)0); }
+
+#undef wtimeout
+void wtimeout(
+ WINDOW *win,
+ int delay)
+ { /* void */ }
+
+#undef keypad
+int keypad(
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+#undef meta
+int meta(
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+#undef curs_set_sp
+int curs_set_sp(
+ SCREEN *sp,
+ int vis)
+ { return(*(int *)0); }
+
+#undef curs_set
+int curs_set(
+ int vis)
+ { return(*(int *)0); }
+
+#undef typeahead_sp
+int typeahead_sp(
+ SCREEN *sp,
+ int fd)
+ { return(*(int *)0); }
+
+#undef typeahead
+int typeahead(
+ int fd)
+ { return(*(int *)0); }
+
+#undef has_key_sp
+int has_key_sp(
+ SCREEN *sp,
+ int keycode)
+ { return(*(int *)0); }
+
+#undef has_key
+int has_key(
+ int keycode)
+ { return(*(int *)0); }
+
+#undef _nc_putp_flush_sp
+int _nc_putp_flush_sp(
+ SCREEN *sp,
+ const char *name,
+ const char *value)
+ { return(*(int *)0); }
+
+#undef _nc_keypad
+int _nc_keypad(
+ SCREEN *sp,
+ int flag)
+ { return(*(int *)0); }
+
+/* ./tinfo/lib_raw.c */
+
+#undef raw_sp
+int raw_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef raw
+int raw(void)
+ { return(*(int *)0); }
+
+#undef cbreak_sp
+int cbreak_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef cbreak
+int cbreak(void)
+ { return(*(int *)0); }
+
+#undef qiflush_sp
+void qiflush_sp(
+ SCREEN *sp)
+ { /* void */ }
+
+#undef qiflush
+void qiflush(void)
+ { /* void */ }
+
+#undef noraw_sp
+int noraw_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef noraw
+int noraw(void)
+ { return(*(int *)0); }
+
+#undef nocbreak_sp
+int nocbreak_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef nocbreak
+int nocbreak(void)
+ { return(*(int *)0); }
+
+#undef noqiflush_sp
+void noqiflush_sp(
+ SCREEN *sp)
+ { /* void */ }
+
+#undef noqiflush
+void noqiflush(void)
+ { /* void */ }
+
+#undef intrflush_sp
+int intrflush_sp(
+ SCREEN *sp,
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+#undef intrflush
+int intrflush(
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+/* ./tinfo/lib_setup.c */
+
+#include <locale.h>
+#include <sys/ioctl.h>
+#include <langinfo.h>
+
+#undef ttytype
+char ttytype[256];
+#undef LINES
+int LINES;
+#undef COLS
+int COLS;
+#undef TABSIZE
+int TABSIZE;
+
+#undef set_tabsize_sp
+int set_tabsize_sp(
+ SCREEN *sp,
+ int value)
+ { return(*(int *)0); }
+
+#undef set_tabsize
+int set_tabsize(
+ int value)
+ { return(*(int *)0); }
+
+#undef _nc_handle_sigwinch
+int _nc_handle_sigwinch(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef use_env_sp
+void use_env_sp(
+ SCREEN *sp,
+ NCURSES_BOOL f)
+ { /* void */ }
+
+#undef use_tioctl_sp
+void use_tioctl_sp(
+ SCREEN *sp,
+ NCURSES_BOOL f)
+ { /* void */ }
+
+#undef use_env
+void use_env(
+ NCURSES_BOOL f)
+ { /* void */ }
+
+#undef use_tioctl
+void use_tioctl(
+ NCURSES_BOOL f)
+ { /* void */ }
+
+#undef _nc_get_screensize
+void _nc_get_screensize(
+ SCREEN *sp,
+ int *linep,
+ int *colp)
+ { /* void */ }
+
+#undef _nc_update_screensize
+void _nc_update_screensize(
+ SCREEN *sp)
+ { /* void */ }
+
+#undef _nc_setup_tinfo
+int _nc_setup_tinfo(
+ const char *const tn,
+ TERMTYPE *const tp)
+ { return(*(int *)0); }
+
+#undef _nc_tinfo_cmdch
+void _nc_tinfo_cmdch(
+ TERMINAL *termp,
+ int proto)
+ { /* void */ }
+
+#undef _nc_get_locale
+char *_nc_get_locale(void)
+ { return(*(char **)0); }
+
+#undef _nc_unicode_locale
+int _nc_unicode_locale(void)
+ { return(*(int *)0); }
+
+#undef _nc_locale_breaks_acs
+int _nc_locale_breaks_acs(
+ TERMINAL *termp)
+ { return(*(int *)0); }
+
+#undef _nc_setupterm
+int _nc_setupterm(
+ char *tname,
+ int Filedes,
+ int *errret,
+ int reuse)
+ { return(*(int *)0); }
+
+#undef new_prescr
+SCREEN *new_prescr(void)
+ { return(*(SCREEN **)0); }
+
+#undef setupterm
+int setupterm(
+ char *tname,
+ int Filedes,
+ int *errret)
+ { return(*(int *)0); }
+
+/* ./tinfo/lib_termcap.c */
+
+#undef UP
+char *UP;
+#undef BC
+char *BC;
+
+#undef tgetent_sp
+int tgetent_sp(
+ SCREEN *sp,
+ char *bufp,
+ const char *name)
+ { return(*(int *)0); }
+
+#if 0
+
+#include <capdefaults.c>
+
+#endif
+
+#undef tgetent
+int tgetent(
+ char *bufp,
+ const char *name)
+ { return(*(int *)0); }
+
+#undef tgetflag_sp
+int tgetflag_sp(
+ SCREEN *sp,
+ char *id)
+ { return(*(int *)0); }
+
+#undef tgetflag
+int tgetflag(
+ char *id)
+ { return(*(int *)0); }
+
+#undef tgetnum_sp
+int tgetnum_sp(
+ SCREEN *sp,
+ char *id)
+ { return(*(int *)0); }
+
+#undef tgetnum
+int tgetnum(
+ char *id)
+ { return(*(int *)0); }
+
+#undef tgetstr_sp
+char *tgetstr_sp(
+ SCREEN *sp,
+ char *id,
+ char **area)
+ { return(*(char **)0); }
+
+#undef tgetstr
+char *tgetstr(
+ char *id,
+ char **area)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_termname.c */
+
+#undef termname_sp
+char *termname_sp(
+ SCREEN *sp)
+ { return(*(char **)0); }
+
+#undef termname
+char *termname(void)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_tgoto.c */
+
+#undef tgoto
+char *tgoto(
+ const char *string,
+ int x,
+ int y)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_ti.c */
+
+#undef tigetflag_sp
+int tigetflag_sp(
+ SCREEN *sp,
+ char *str)
+ { return(*(int *)0); }
+
+#undef tigetflag
+int tigetflag(
+ char *str)
+ { return(*(int *)0); }
+
+#undef tigetnum_sp
+int tigetnum_sp(
+ SCREEN *sp,
+ char *str)
+ { return(*(int *)0); }
+
+#undef tigetnum
+int tigetnum(
+ char *str)
+ { return(*(int *)0); }
+
+#undef tigetstr_sp
+char *tigetstr_sp(
+ SCREEN *sp,
+ char *str)
+ { return(*(char **)0); }
+
+#undef tigetstr
+char *tigetstr(
+ char *str)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_tparm.c */
+
+#undef _nc_tparm_err
+int _nc_tparm_err;
+
+#undef _nc_tparm_analyze
+int _nc_tparm_analyze(
+ const char *string,
+ char *p_is_s[9],
+ int *_nc_popcount)
+ { return(*(int *)0); }
+
+#undef tparm
+char *tparm(
+ char *string,
+ ...)
+ { return(*(char **)0); }
+
+#undef tiparm
+char *tiparm(
+ const char *string,
+ ...)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_tputs.c */
+
+#undef PC
+char PC;
+#undef ospeed
+short ospeed;
+#undef _nc_nulls_sent
+int _nc_nulls_sent;
+
+#undef _nc_set_no_padding
+void _nc_set_no_padding(
+ SCREEN *sp)
+ { /* void */ }
+
+#undef delay_output_sp
+int delay_output_sp(
+ SCREEN *sp,
+ int ms)
+ { return(*(int *)0); }
+
+#undef delay_output
+int delay_output(
+ int ms)
+ { return(*(int *)0); }
+
+#undef _nc_flush_sp
+void _nc_flush_sp(
+ SCREEN *sp)
+ { /* void */ }
+
+#undef _nc_flush
+void _nc_flush(void)
+ { /* void */ }
+
+#undef _nc_outch_sp
+int _nc_outch_sp(
+ SCREEN *sp,
+ int ch)
+ { return(*(int *)0); }
+
+#undef _nc_outch
+int _nc_outch(
+ int ch)
+ { return(*(int *)0); }
+
+#undef _nc_putchar_sp
+int _nc_putchar_sp(
+ SCREEN *sp,
+ int ch)
+ { return(*(int *)0); }
+
+#undef _nc_putchar
+int _nc_putchar(
+ int ch)
+ { return(*(int *)0); }
+
+#undef putp_sp
+int putp_sp(
+ SCREEN *sp,
+ const char *string)
+ { return(*(int *)0); }
+
+#undef putp
+int putp(
+ const char *string)
+ { return(*(int *)0); }
+
+#undef _nc_putp_sp
+int _nc_putp_sp(
+ SCREEN *sp,
+ const char *name,
+ const char *string)
+ { return(*(int *)0); }
+
+#undef _nc_putp
+int _nc_putp(
+ const char *name,
+ const char *string)
+ { return(*(int *)0); }
+
+#undef tputs_sp
+int tputs_sp(
+ SCREEN *sp,
+ const char *string,
+ int affcnt,
+ NCURSES_OUTC_sp outc)
+ { return(*(int *)0); }
+
+#undef _nc_outc_wrapper
+int _nc_outc_wrapper(
+ SCREEN *sp,
+ int c)
+ { return(*(int *)0); }
+
+#undef tputs
+int tputs(
+ const char *string,
+ int affcnt,
+ int (*outc)(
+ int p1))
+ { return(*(int *)0); }
+
+/* ./trace/lib_trace.c */
+
+#undef _nc_tracing
+unsigned _nc_tracing;
+#undef _nc_tputs_trace
+const char *_nc_tputs_trace = {0};
+#undef _nc_outchars
+long _nc_outchars;
+
+#undef trace
+void trace(
+ const unsigned int tracelevel)
+ { /* void */ }
+
+#undef _tracef
+void _tracef(
+ const char *fmt,
+ ...)
+ { /* void */ }
+
+#undef _nc_retrace_bool
+NCURSES_BOOL _nc_retrace_bool(
+ int code)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef _nc_retrace_char
+char _nc_retrace_char(
+ int code)
+ { return(*(char *)0); }
+
+#undef _nc_retrace_int
+int _nc_retrace_int(
+ int code)
+ { return(*(int *)0); }
+
+#undef _nc_retrace_unsigned
+unsigned _nc_retrace_unsigned(
+ unsigned code)
+ { return(*(unsigned *)0); }
+
+#undef _nc_retrace_ptr
+char *_nc_retrace_ptr(
+ char *code)
+ { return(*(char **)0); }
+
+#undef _nc_retrace_cptr
+const char *_nc_retrace_cptr(
+ const char *code)
+ { return(*(const char **)0); }
+
+#undef _nc_retrace_cvoid_ptr
+void *_nc_retrace_cvoid_ptr(
+ void *code)
+ { return(*(void **)0); }
+
+#undef _nc_retrace_void_ptr
+void *_nc_retrace_void_ptr(
+ void *code)
+ { return(*(void **)0); }
+
+#undef _nc_retrace_sp
+SCREEN *_nc_retrace_sp(
+ SCREEN *code)
+ { return(*(SCREEN **)0); }
+
+#undef _nc_retrace_win
+WINDOW *_nc_retrace_win(
+ WINDOW *code)
+ { return(*(WINDOW **)0); }
+
+/* ./trace/lib_traceatr.c */
+
+#undef _traceattr2
+char *_traceattr2(
+ int bufnum,
+ chtype newmode)
+ { return(*(char **)0); }
+
+#undef _traceattr
+char *_traceattr(
+ attr_t newmode)
+ { return(*(char **)0); }
+
+#undef _nc_retrace_int_attr_t
+int _nc_retrace_int_attr_t(
+ attr_t code)
+ { return(*(int *)0); }
+
+#undef _nc_retrace_attr_t
+attr_t _nc_retrace_attr_t(
+ attr_t code)
+ { return(*(attr_t *)0); }
+
+#undef _nc_altcharset_name
+const char *_nc_altcharset_name(
+ attr_t attr,
+ chtype ch)
+ { return(*(const char **)0); }
+
+#undef _tracechtype2
+char *_tracechtype2(
+ int bufnum,
+ chtype ch)
+ { return(*(char **)0); }
+
+#undef _tracechtype
+char *_tracechtype(
+ chtype ch)
+ { return(*(char **)0); }
+
+#undef _nc_retrace_chtype
+chtype _nc_retrace_chtype(
+ chtype code)
+ { return(*(chtype *)0); }
+
+/* ./trace/lib_tracebits.c */
+
+typedef struct {
+ unsigned int val;
+ const char *name;
+} BITNAMES;
+
+#undef _nc_trace_ttymode
+char *_nc_trace_ttymode(
+ struct termios *tty)
+ { return(*(char **)0); }
+
+#undef _nc_tracebits
+char *_nc_tracebits(void)
+ { return(*(char **)0); }
+
+/* ./trace/lib_tracechr.c */
+
+#undef _nc_tracechar
+char *_nc_tracechar(
+ SCREEN *sp,
+ int ch)
+ { return(*(char **)0); }
+
+#undef _tracechar
+char *_tracechar(
+ int ch)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_ttyflags.c */
+
+#undef _nc_get_tty_mode_sp
+int _nc_get_tty_mode_sp(
+ SCREEN *sp,
+ struct termios *buf)
+ { return(*(int *)0); }
+
+#undef _nc_get_tty_mode
+int _nc_get_tty_mode(
+ struct termios *buf)
+ { return(*(int *)0); }
+
+#undef _nc_set_tty_mode_sp
+int _nc_set_tty_mode_sp(
+ SCREEN *sp,
+ struct termios *buf)
+ { return(*(int *)0); }
+
+#undef _nc_set_tty_mode
+int _nc_set_tty_mode(
+ struct termios *buf)
+ { return(*(int *)0); }
+
+#undef def_shell_mode_sp
+int def_shell_mode_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef def_shell_mode
+int def_shell_mode(void)
+ { return(*(int *)0); }
+
+#undef def_prog_mode_sp
+int def_prog_mode_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef def_prog_mode
+int def_prog_mode(void)
+ { return(*(int *)0); }
+
+#undef reset_prog_mode_sp
+int reset_prog_mode_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef reset_prog_mode
+int reset_prog_mode(void)
+ { return(*(int *)0); }
+
+#undef reset_shell_mode_sp
+int reset_shell_mode_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef reset_shell_mode
+int reset_shell_mode(void)
+ { return(*(int *)0); }
+
+#undef savetty_sp
+int savetty_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef savetty
+int savetty(void)
+ { return(*(int *)0); }
+
+#undef resetty_sp
+int resetty_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef resetty
+int resetty(void)
+ { return(*(int *)0); }
+
+/* ./tty/lib_twait.c */
+
+#undef _nc_timed_wait
+int _nc_timed_wait(
+ SCREEN *sp,
+ int mode,
+ int milliseconds,
+ int *timeleft)
+ { return(*(int *)0); }
+
+/* ./tinfo/name_match.c */
+
+#undef _nc_first_name
+char *_nc_first_name(
+ const char *const sp)
+ { return(*(char **)0); }
+
+#undef _nc_name_match
+int _nc_name_match(
+ const char *const namelst,
+ const char *const name,
+ const char *const delim)
+ { return(*(int *)0); }
+
+/* ./names.c */
+
+#undef boolnames
+char *const boolnames[] = {0};
+#undef boolfnames
+char *const boolfnames[] = {0};
+#undef numnames
+char *const numnames[] = {0};
+#undef numfnames
+char *const numfnames[] = {0};
+#undef strnames
+char *const strnames[] = {0};
+#undef strfnames
+char *const strfnames[] = {0};
+
+/* ./tinfo/obsolete.c */
+
+#undef _nc_set_buffer_sp
+void _nc_set_buffer_sp(
+ SCREEN *sp,
+ FILE *ofp,
+ int buffered)
+ { /* void */ }
+
+#undef _nc_set_buffer
+void _nc_set_buffer(
+ FILE *ofp,
+ int buffered)
+ { /* void */ }
+
+/* ./tinfo/read_entry.c */
+
+#include <hashed_db.h>
+
+#undef _nc_init_termtype
+void _nc_init_termtype(
+ TERMTYPE *const tp)
+ { /* void */ }
+
+#undef _nc_read_termtype
+int _nc_read_termtype(
+ TERMTYPE *ptr,
+ char *buffer,
+ int limit)
+ { return(*(int *)0); }
+
+#undef _nc_read_file_entry
+int _nc_read_file_entry(
+ const char *const filename,
+ TERMTYPE *ptr)
+ { return(*(int *)0); }
+
+#undef _nc_read_entry
+int _nc_read_entry(
+ const char *const name,
+ char *const filename,
+ TERMTYPE *const tp)
+ { return(*(int *)0); }
+
+/* ./tinfo/read_termcap.c */
+
+#include <sys/types.h>
+
+#undef _nc_read_termcap
+void _nc_read_termcap(void)
+ { /* void */ }
+
+/* ./tinfo/strings.c */
+
+#undef _nc_str_init
+string_desc *_nc_str_init(
+ string_desc *dst,
+ char *src,
+ size_t len)
+ { return(*(string_desc **)0); }
+
+#undef _nc_str_null
+string_desc *_nc_str_null(
+ string_desc *dst,
+ size_t len)
+ { return(*(string_desc **)0); }
+
+#undef _nc_str_copy
+string_desc *_nc_str_copy(
+ string_desc *dst,
+ string_desc *src)
+ { return(*(string_desc **)0); }
+
+#undef _nc_safe_strcat
+NCURSES_BOOL _nc_safe_strcat(
+ string_desc *dst,
+ const char *src)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef _nc_safe_strcpy
+NCURSES_BOOL _nc_safe_strcpy(
+ string_desc *dst,
+ const char *src)
+ { return(*(NCURSES_BOOL *)0); }
+
+/* ./trace/trace_buf.c */
+
+#undef _nc_trace_buf
+char *_nc_trace_buf(
+ int bufnum,
+ size_t want)
+ { return(*(char **)0); }
+
+#undef _nc_trace_bufcat
+char *_nc_trace_bufcat(
+ int bufnum,
+ const char *value)
+ { return(*(char **)0); }
+
+/* ./trace/trace_tries.c */
+
+#undef _nc_trace_tries
+void _nc_trace_tries(
+ TRIES *tree)
+ { /* void */ }
+
+/* ./base/tries.c */
+
+#undef _nc_expand_try
+char *_nc_expand_try(
+ TRIES *tree,
+ unsigned code,
+ int *count,
+ size_t len)
+ { return(*(char **)0); }
+
+#undef _nc_remove_key
+int _nc_remove_key(
+ TRIES **tree,
+ unsigned code)
+ { return(*(int *)0); }
+
+#undef _nc_remove_string
+int _nc_remove_string(
+ TRIES **tree,
+ const char *string)
+ { return(*(int *)0); }
+
+/* ./tinfo/trim_sgr0.c */
+
+#undef _nc_trim_sgr0
+char *_nc_trim_sgr0(
+ TERMTYPE *tp)
+ { return(*(char **)0); }
+
+/* ./unctrl.c */
+
+#undef unctrl_sp
+char *unctrl_sp(
+ SCREEN *sp,
+ chtype ch)
+ { return(*(char **)0); }
+
+#undef unctrl
+char *unctrl(
+ chtype ch)
+ { return(*(char **)0); }
+
+/* ./trace/visbuf.c */
+
+#undef _nc_visbuf2
+const char *_nc_visbuf2(
+ int bufnum,
+ const char *buf)
+ { return(*(const char **)0); }
+
+#undef _nc_visbuf
+const char *_nc_visbuf(
+ const char *buf)
+ { return(*(const char **)0); }
+
+#undef _nc_visbufn
+const char *_nc_visbufn(
+ const char *buf,
+ int len)
+ { return(*(const char **)0); }
+
+#undef _nc_viscbuf2
+const char *_nc_viscbuf2(
+ int bufnum,
+ const chtype *buf,
+ int len)
+ { return(*(const char **)0); }
+
+#undef _nc_viscbuf
+const char *_nc_viscbuf(
+ const chtype *buf,
+ int len)
+ { return(*(const char **)0); }
+
+/* ./base/define_key.c */
+
+#undef define_key_sp
+int define_key_sp(
+ SCREEN *sp,
+ const char *str,
+ int keycode)
+ { return(*(int *)0); }
+
+#undef define_key
+int define_key(
+ const char *str,
+ int keycode)
+ { return(*(int *)0); }
+
+/* ./tinfo/hashed_db.c */
+
+#undef _nc_hashed_db
+void _nc_hashed_db(void)
+ { /* void */ }
+
+/* ./base/key_defined.c */
+
+#undef key_defined_sp
+int key_defined_sp(
+ SCREEN *sp,
+ const char *str)
+ { return(*(int *)0); }
+
+#undef key_defined
+int key_defined(
+ const char *str)
+ { return(*(int *)0); }
+
+/* ./base/keybound.c */
+
+#undef keybound_sp
+char *keybound_sp(
+ SCREEN *sp,
+ int code,
+ int count)
+ { return(*(char **)0); }
+
+#undef keybound
+char *keybound(
+ int code,
+ int count)
+ { return(*(char **)0); }
+
+/* ./base/keyok.c */
+
+#undef keyok_sp
+int keyok_sp(
+ SCREEN *sp,
+ int c,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+#undef keyok
+int keyok(
+ int c,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+/* ./base/version.c */
+
+#undef curses_version
+const char *curses_version(void)
+ { return(*(const char **)0); }
diff --git a/ncurses/llib-ltinfot b/ncurses/llib-ltinfot
new file mode 100644
index 000000000000..4f66f6a057d2
--- /dev/null
+++ b/ncurses/llib-ltinfot
@@ -0,0 +1,1635 @@
+/****************************************************************************
+ * Copyright (c) 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 2013 *
+ ****************************************************************************/
+/* LINTLIBRARY */
+
+/* ./tinfo/access.c */
+
+#include <curses.priv.h>
+#include <ctype.h>
+#include <tic.h>
+
+#undef _nc_rootname
+char *_nc_rootname(
+ char *path)
+ { return(*(char **)0); }
+
+#undef _nc_is_abs_path
+NCURSES_BOOL _nc_is_abs_path(
+ const char *path)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef _nc_pathlast
+unsigned _nc_pathlast(
+ const char *path)
+ { return(*(unsigned *)0); }
+
+#undef _nc_basename
+char *_nc_basename(
+ char *path)
+ { return(*(char **)0); }
+
+#undef _nc_access
+int _nc_access(
+ const char *path,
+ int mode)
+ { return(*(int *)0); }
+
+#undef _nc_is_dir_path
+NCURSES_BOOL _nc_is_dir_path(
+ const char *path)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef _nc_is_file_path
+NCURSES_BOOL _nc_is_file_path(
+ const char *path)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef _nc_env_access
+int _nc_env_access(void)
+ { return(*(int *)0); }
+
+/* ./tinfo/add_tries.c */
+
+#undef _nc_add_to_try
+int _nc_add_to_try(
+ TRIES **tree,
+ const char *str,
+ unsigned code)
+ { return(*(int *)0); }
+
+/* ./tinfo/alloc_ttype.c */
+
+#undef _nc_align_termtype
+void _nc_align_termtype(
+ TERMTYPE *to,
+ TERMTYPE *from)
+ { /* void */ }
+
+#undef _nc_copy_termtype
+void _nc_copy_termtype(
+ TERMTYPE *dst,
+ const TERMTYPE *src)
+ { /* void */ }
+
+/* ./codes.c */
+
+#undef _nc_boolcodes
+char *const *_nc_boolcodes(void)
+ { return(*(char **)0); }
+
+#undef _nc_numcodes
+char *const *_nc_numcodes(void)
+ { return(*(char **)0); }
+
+#undef _nc_strcodes
+char *const *_nc_strcodes(void)
+ { return(*(char **)0); }
+
+/* ./comp_captab.c */
+
+#include <hashsize.h>
+
+#undef _nc_get_table
+const struct name_table_entry *_nc_get_table(
+ NCURSES_BOOL termcap)
+ { return(*(const struct name_table_entry **)0); }
+
+#undef _nc_get_hash_table
+const HashValue *_nc_get_hash_table(
+ NCURSES_BOOL termcap)
+ { return(*(const HashValue **)0); }
+
+#undef _nc_get_alias_table
+const struct alias *_nc_get_alias_table(
+ NCURSES_BOOL termcap)
+ { return(*(const struct alias **)0); }
+
+#undef _nc_get_hash_info
+const HashData *_nc_get_hash_info(
+ NCURSES_BOOL termcap)
+ { return(*(const HashData **)0); }
+
+/* ./tinfo/comp_error.c */
+
+#undef _nc_suppress_warnings
+NCURSES_BOOL _nc_suppress_warnings;
+#undef _nc_curr_line
+int _nc_curr_line;
+#undef _nc_curr_col
+int _nc_curr_col;
+
+#undef _nc_get_source
+const char *_nc_get_source(void)
+ { return(*(const char **)0); }
+
+#undef _nc_set_source
+void _nc_set_source(
+ const char *const name)
+ { /* void */ }
+
+#undef _nc_set_type
+void _nc_set_type(
+ const char *const name)
+ { /* void */ }
+
+#undef _nc_get_type
+void _nc_get_type(
+ char *name)
+ { /* void */ }
+
+#undef _nc_warning
+void _nc_warning(
+ const char *const fmt,
+ ...)
+ { /* void */ }
+
+#undef _nc_err_abort
+void _nc_err_abort(
+ const char *const fmt,
+ ...)
+ { /* void */ }
+
+#undef _nc_syserr_abort
+void _nc_syserr_abort(
+ const char *const fmt,
+ ...)
+ { /* void */ }
+
+/* ./tinfo/comp_hash.c */
+
+#undef _nc_find_entry
+struct name_table_entry const *_nc_find_entry(
+ const char *string,
+ const HashValue *hash_table)
+ { return(*(struct name_table_entry const **)0); }
+
+#undef _nc_find_type_entry
+struct name_table_entry const *_nc_find_type_entry(
+ const char *string,
+ int type,
+ NCURSES_BOOL termcap)
+ { return(*(struct name_table_entry const **)0); }
+
+/* ./tinfo/db_iterator.c */
+
+#include <time.h>
+
+#undef _nc_tic_dir
+const char *_nc_tic_dir(
+ const char *path)
+ { return(*(const char **)0); }
+
+#undef _nc_keep_tic_dir
+void _nc_keep_tic_dir(
+ const char *path)
+ { /* void */ }
+
+#undef _nc_last_db
+void _nc_last_db(void)
+ { /* void */ }
+
+#undef _nc_next_db
+const char *_nc_next_db(
+ DBDIRS *state,
+ int *offset)
+ { return(*(const char **)0); }
+
+#undef _nc_first_db
+void _nc_first_db(
+ DBDIRS *state,
+ int *offset)
+ { /* void */ }
+
+/* ./tinfo/doalloc.c */
+
+#undef _nc_doalloc
+void *_nc_doalloc(
+ void *oldp,
+ size_t amount)
+ { return(*(void **)0); }
+
+/* ./tinfo/entries.c */
+
+#undef _nc_head
+ENTRY *_nc_head;
+#undef _nc_tail
+ENTRY *_nc_tail;
+
+#undef _nc_free_entry
+void _nc_free_entry(
+ ENTRY *headp,
+ TERMTYPE *tterm)
+ { /* void */ }
+
+#undef _nc_free_entries
+void _nc_free_entries(
+ ENTRY *headp)
+ { /* void */ }
+
+#undef _nc_delink_entry
+ENTRY *_nc_delink_entry(
+ ENTRY *headp,
+ TERMTYPE *tterm)
+ { return(*(ENTRY **)0); }
+
+#undef _nc_leaks_tinfo
+void _nc_leaks_tinfo(void)
+ { /* void */ }
+
+/* ./fallback.c */
+
+#undef _nc_fallback
+const TERMTYPE *_nc_fallback(
+ const char *name)
+ { return(*(const TERMTYPE **)0); }
+
+/* ./tinfo/free_ttype.c */
+
+#undef _nc_free_termtype
+void _nc_free_termtype(
+ TERMTYPE *ptr)
+ { /* void */ }
+
+#undef _nc_user_definable
+NCURSES_BOOL _nc_user_definable;
+
+#undef use_extended_names
+int use_extended_names(
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+/* ./tinfo/getenv_num.c */
+
+#undef _nc_getenv_num
+int _nc_getenv_num(
+ const char *name)
+ { return(*(int *)0); }
+
+#undef _nc_setenv_num
+void _nc_setenv_num(
+ const char *name,
+ int value)
+ { /* void */ }
+
+/* ./tinfo/home_terminfo.c */
+
+#undef _nc_home_terminfo
+char *_nc_home_terminfo(void)
+ { return(*(char **)0); }
+
+/* ./tinfo/init_keytry.c */
+
+#if 0
+
+#include <init_keytry.h>
+
+#undef _nc_tinfo_fkeys
+const struct tinfo_fkeys _nc_tinfo_fkeys[] = {0};
+
+#endif
+
+#undef _nc_init_keytry
+void _nc_init_keytry(
+ SCREEN *sp)
+ { /* void */ }
+
+/* ./tinfo/lib_acs.c */
+
+#undef _nc_acs_map
+chtype *_nc_acs_map(void)
+ { return(*(chtype **)0); }
+
+#undef _nc_init_acs_sp
+void _nc_init_acs_sp(
+ SCREEN *sp)
+ { /* void */ }
+
+#undef _nc_init_acs
+void _nc_init_acs(void)
+ { /* void */ }
+
+/* ./tinfo/lib_baudrate.c */
+
+#include <termcap.h>
+
+struct speed {
+ int s;
+ int sp;
+};
+
+#undef _nc_baudrate
+int _nc_baudrate(
+ int OSpeed)
+ { return(*(int *)0); }
+
+#undef _nc_ospeed
+int _nc_ospeed(
+ int BaudRate)
+ { return(*(int *)0); }
+
+#undef baudrate_sp
+int baudrate_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef baudrate
+int baudrate(void)
+ { return(*(int *)0); }
+
+/* ./tinfo/lib_cur_term.c */
+
+#undef _nc_get_cur_term_sp
+TERMINAL *_nc_get_cur_term_sp(
+ SCREEN *sp)
+ { return(*(TERMINAL **)0); }
+
+#undef _nc_get_cur_term
+TERMINAL *_nc_get_cur_term(void)
+ { return(*(TERMINAL **)0); }
+
+#undef _nc_cur_term
+TERMINAL *_nc_cur_term(void)
+ { return(*(TERMINAL **)0); }
+
+#undef set_curterm_sp
+TERMINAL *set_curterm_sp(
+ SCREEN *sp,
+ TERMINAL *termp)
+ { return(*(TERMINAL **)0); }
+
+#undef set_curterm
+TERMINAL *set_curterm(
+ TERMINAL *termp)
+ { return(*(TERMINAL **)0); }
+
+#undef del_curterm_sp
+int del_curterm_sp(
+ SCREEN *sp,
+ TERMINAL *termp)
+ { return(*(int *)0); }
+
+#undef del_curterm
+int del_curterm(
+ TERMINAL *termp)
+ { return(*(int *)0); }
+
+/* ./tinfo/lib_data.c */
+
+#undef _nc_stdscr
+WINDOW *_nc_stdscr(void)
+ { return(*(WINDOW **)0); }
+
+#undef _nc_curscr
+WINDOW *_nc_curscr(void)
+ { return(*(WINDOW **)0); }
+
+#undef _nc_newscr
+WINDOW *_nc_newscr(void)
+ { return(*(WINDOW **)0); }
+
+#undef _nc_screen_chain
+SCREEN *_nc_screen_chain;
+#undef SP
+SCREEN *SP;
+#undef _nc_globals
+NCURSES_GLOBALS _nc_globals;
+#undef _nc_prescreen
+NCURSES_PRESCREEN _nc_prescreen;
+
+#undef _nc_screen_of
+SCREEN *_nc_screen_of(
+ WINDOW *win)
+ { return(*(SCREEN **)0); }
+
+#undef _nc_init_pthreads
+void _nc_init_pthreads(void)
+ { /* void */ }
+
+#undef _nc_mutex_init
+void _nc_mutex_init(
+ pthread_mutex_t *obj)
+ { /* void */ }
+
+#undef _nc_mutex_lock
+int _nc_mutex_lock(
+ pthread_mutex_t *obj)
+ { return(*(int *)0); }
+
+#undef _nc_mutex_trylock
+int _nc_mutex_trylock(
+ pthread_mutex_t *obj)
+ { return(*(int *)0); }
+
+#undef _nc_mutex_unlock
+int _nc_mutex_unlock(
+ pthread_mutex_t *obj)
+ { return(*(int *)0); }
+
+/* ./tinfo/lib_has_cap.c */
+
+#undef has_ic_sp
+NCURSES_BOOL has_ic_sp(
+ SCREEN *sp)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef has_ic
+NCURSES_BOOL has_ic(void)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef has_il_sp
+NCURSES_BOOL has_il_sp(
+ SCREEN *sp)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef has_il
+NCURSES_BOOL has_il(void)
+ { return(*(NCURSES_BOOL *)0); }
+
+/* ./tinfo/lib_kernel.c */
+
+#undef erasechar_sp
+char erasechar_sp(
+ SCREEN *sp)
+ { return(*(char *)0); }
+
+#undef erasechar
+char erasechar(void)
+ { return(*(char *)0); }
+
+#undef killchar_sp
+char killchar_sp(
+ SCREEN *sp)
+ { return(*(char *)0); }
+
+#undef killchar
+char killchar(void)
+ { return(*(char *)0); }
+
+#undef flushinp_sp
+int flushinp_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef flushinp
+int flushinp(void)
+ { return(*(int *)0); }
+
+/* ./lib_keyname.c */
+
+struct kn { short offset; int code; };
+
+#undef keyname_sp
+char *keyname_sp(
+ SCREEN *sp,
+ int c)
+ { return(*(char **)0); }
+
+#undef keyname
+char *keyname(
+ int c)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_longname.c */
+
+#undef longname_sp
+char *longname_sp(
+ SCREEN *sp)
+ { return(*(char **)0); }
+
+#undef longname
+char *longname(void)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_napms.c */
+
+#undef napms_sp
+int napms_sp(
+ SCREEN *sp,
+ int ms)
+ { return(*(int *)0); }
+
+#undef napms
+int napms(
+ int ms)
+ { return(*(int *)0); }
+
+/* ./tinfo/lib_options.c */
+
+#undef idlok
+int idlok(
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+#undef idcok
+void idcok(
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { /* void */ }
+
+#undef halfdelay_sp
+int halfdelay_sp(
+ SCREEN *sp,
+ int t)
+ { return(*(int *)0); }
+
+#undef halfdelay
+int halfdelay(
+ int t)
+ { return(*(int *)0); }
+
+#undef nodelay
+int nodelay(
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+#undef notimeout
+int notimeout(
+ WINDOW *win,
+ NCURSES_BOOL f)
+ { return(*(int *)0); }
+
+#undef wtimeout
+void wtimeout(
+ WINDOW *win,
+ int delay)
+ { /* void */ }
+
+#undef keypad
+int keypad(
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+#undef meta
+int meta(
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+#undef curs_set_sp
+int curs_set_sp(
+ SCREEN *sp,
+ int vis)
+ { return(*(int *)0); }
+
+#undef curs_set
+int curs_set(
+ int vis)
+ { return(*(int *)0); }
+
+#undef typeahead_sp
+int typeahead_sp(
+ SCREEN *sp,
+ int fd)
+ { return(*(int *)0); }
+
+#undef typeahead
+int typeahead(
+ int fd)
+ { return(*(int *)0); }
+
+#undef has_key_sp
+int has_key_sp(
+ SCREEN *sp,
+ int keycode)
+ { return(*(int *)0); }
+
+#undef has_key
+int has_key(
+ int keycode)
+ { return(*(int *)0); }
+
+#undef _nc_putp_flush_sp
+int _nc_putp_flush_sp(
+ SCREEN *sp,
+ const char *name,
+ const char *value)
+ { return(*(int *)0); }
+
+#undef _nc_keypad
+int _nc_keypad(
+ SCREEN *sp,
+ int flag)
+ { return(*(int *)0); }
+
+/* ./tinfo/lib_raw.c */
+
+#undef raw_sp
+int raw_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef raw
+int raw(void)
+ { return(*(int *)0); }
+
+#undef cbreak_sp
+int cbreak_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef cbreak
+int cbreak(void)
+ { return(*(int *)0); }
+
+#undef qiflush_sp
+void qiflush_sp(
+ SCREEN *sp)
+ { /* void */ }
+
+#undef qiflush
+void qiflush(void)
+ { /* void */ }
+
+#undef noraw_sp
+int noraw_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef noraw
+int noraw(void)
+ { return(*(int *)0); }
+
+#undef nocbreak_sp
+int nocbreak_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef nocbreak
+int nocbreak(void)
+ { return(*(int *)0); }
+
+#undef noqiflush_sp
+void noqiflush_sp(
+ SCREEN *sp)
+ { /* void */ }
+
+#undef noqiflush
+void noqiflush(void)
+ { /* void */ }
+
+#undef intrflush_sp
+int intrflush_sp(
+ SCREEN *sp,
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+#undef intrflush
+int intrflush(
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+/* ./tinfo/lib_setup.c */
+
+#include <locale.h>
+#include <sys/ioctl.h>
+#include <langinfo.h>
+
+#undef _nc_ttytype
+char *_nc_ttytype(void)
+ { return(*(char **)0); }
+
+#undef _nc_ptr_Lines
+int *_nc_ptr_Lines(
+ SCREEN *sp)
+ { return(*(int **)0); }
+
+#undef _nc_LINES
+int _nc_LINES(void)
+ { return(*(int *)0); }
+
+#undef _nc_ptr_Cols
+int *_nc_ptr_Cols(
+ SCREEN *sp)
+ { return(*(int **)0); }
+
+#undef _nc_COLS
+int _nc_COLS(void)
+ { return(*(int *)0); }
+
+#undef _nc_ptr_Tabsize
+int *_nc_ptr_Tabsize(
+ SCREEN *sp)
+ { return(*(int **)0); }
+
+#undef _nc_TABSIZE
+int _nc_TABSIZE(void)
+ { return(*(int *)0); }
+
+#undef set_tabsize_sp
+int set_tabsize_sp(
+ SCREEN *sp,
+ int value)
+ { return(*(int *)0); }
+
+#undef set_tabsize
+int set_tabsize(
+ int value)
+ { return(*(int *)0); }
+
+#undef _nc_handle_sigwinch
+int _nc_handle_sigwinch(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef use_env_sp
+void use_env_sp(
+ SCREEN *sp,
+ NCURSES_BOOL f)
+ { /* void */ }
+
+#undef use_tioctl_sp
+void use_tioctl_sp(
+ SCREEN *sp,
+ NCURSES_BOOL f)
+ { /* void */ }
+
+#undef use_env
+void use_env(
+ NCURSES_BOOL f)
+ { /* void */ }
+
+#undef use_tioctl
+void use_tioctl(
+ NCURSES_BOOL f)
+ { /* void */ }
+
+#undef _nc_get_screensize
+void _nc_get_screensize(
+ SCREEN *sp,
+ int *linep,
+ int *colp)
+ { /* void */ }
+
+#undef _nc_update_screensize
+void _nc_update_screensize(
+ SCREEN *sp)
+ { /* void */ }
+
+#undef _nc_setup_tinfo
+int _nc_setup_tinfo(
+ const char *const tn,
+ TERMTYPE *const tp)
+ { return(*(int *)0); }
+
+#undef _nc_tinfo_cmdch
+void _nc_tinfo_cmdch(
+ TERMINAL *termp,
+ int proto)
+ { /* void */ }
+
+#undef _nc_get_locale
+char *_nc_get_locale(void)
+ { return(*(char **)0); }
+
+#undef _nc_unicode_locale
+int _nc_unicode_locale(void)
+ { return(*(int *)0); }
+
+#undef _nc_locale_breaks_acs
+int _nc_locale_breaks_acs(
+ TERMINAL *termp)
+ { return(*(int *)0); }
+
+#undef _nc_setupterm
+int _nc_setupterm(
+ char *tname,
+ int Filedes,
+ int *errret,
+ int reuse)
+ { return(*(int *)0); }
+
+#undef new_prescr
+SCREEN *new_prescr(void)
+ { return(*(SCREEN **)0); }
+
+#undef setupterm
+int setupterm(
+ char *tname,
+ int Filedes,
+ int *errret)
+ { return(*(int *)0); }
+
+/* ./tinfo/lib_termcap.c */
+
+#undef UP
+char *UP;
+#undef BC
+char *BC;
+
+#undef tgetent_sp
+int tgetent_sp(
+ SCREEN *sp,
+ char *bufp,
+ const char *name)
+ { return(*(int *)0); }
+
+#if 0
+
+#include <capdefaults.c>
+
+#endif
+
+#undef tgetent
+int tgetent(
+ char *bufp,
+ const char *name)
+ { return(*(int *)0); }
+
+#undef tgetflag_sp
+int tgetflag_sp(
+ SCREEN *sp,
+ char *id)
+ { return(*(int *)0); }
+
+#undef tgetflag
+int tgetflag(
+ char *id)
+ { return(*(int *)0); }
+
+#undef tgetnum_sp
+int tgetnum_sp(
+ SCREEN *sp,
+ char *id)
+ { return(*(int *)0); }
+
+#undef tgetnum
+int tgetnum(
+ char *id)
+ { return(*(int *)0); }
+
+#undef tgetstr_sp
+char *tgetstr_sp(
+ SCREEN *sp,
+ char *id,
+ char **area)
+ { return(*(char **)0); }
+
+#undef tgetstr
+char *tgetstr(
+ char *id,
+ char **area)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_termname.c */
+
+#undef termname_sp
+char *termname_sp(
+ SCREEN *sp)
+ { return(*(char **)0); }
+
+#undef termname
+char *termname(void)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_tgoto.c */
+
+#undef tgoto
+char *tgoto(
+ const char *string,
+ int x,
+ int y)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_ti.c */
+
+#undef tigetflag_sp
+int tigetflag_sp(
+ SCREEN *sp,
+ char *str)
+ { return(*(int *)0); }
+
+#undef tigetflag
+int tigetflag(
+ char *str)
+ { return(*(int *)0); }
+
+#undef tigetnum_sp
+int tigetnum_sp(
+ SCREEN *sp,
+ char *str)
+ { return(*(int *)0); }
+
+#undef tigetnum
+int tigetnum(
+ char *str)
+ { return(*(int *)0); }
+
+#undef tigetstr_sp
+char *tigetstr_sp(
+ SCREEN *sp,
+ char *str)
+ { return(*(char **)0); }
+
+#undef tigetstr
+char *tigetstr(
+ char *str)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_tparm.c */
+
+#undef _nc_tparm_err
+int _nc_tparm_err;
+
+#undef _nc_tparm_analyze
+int _nc_tparm_analyze(
+ const char *string,
+ char *p_is_s[9],
+ int *_nc_popcount)
+ { return(*(int *)0); }
+
+#undef tparm
+char *tparm(
+ char *string,
+ ...)
+ { return(*(char **)0); }
+
+#undef tiparm
+char *tiparm(
+ const char *string,
+ ...)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_tputs.c */
+
+#undef PC
+char PC;
+#undef ospeed
+short ospeed;
+#undef _nc_nulls_sent
+int _nc_nulls_sent;
+
+#undef _nc_set_no_padding
+void _nc_set_no_padding(
+ SCREEN *sp)
+ { /* void */ }
+
+#undef delay_output_sp
+int delay_output_sp(
+ SCREEN *sp,
+ int ms)
+ { return(*(int *)0); }
+
+#undef delay_output
+int delay_output(
+ int ms)
+ { return(*(int *)0); }
+
+#undef _nc_flush_sp
+void _nc_flush_sp(
+ SCREEN *sp)
+ { /* void */ }
+
+#undef _nc_flush
+void _nc_flush(void)
+ { /* void */ }
+
+#undef _nc_outch_sp
+int _nc_outch_sp(
+ SCREEN *sp,
+ int ch)
+ { return(*(int *)0); }
+
+#undef _nc_outch
+int _nc_outch(
+ int ch)
+ { return(*(int *)0); }
+
+#undef _nc_putchar_sp
+int _nc_putchar_sp(
+ SCREEN *sp,
+ int ch)
+ { return(*(int *)0); }
+
+#undef _nc_putchar
+int _nc_putchar(
+ int ch)
+ { return(*(int *)0); }
+
+#undef putp_sp
+int putp_sp(
+ SCREEN *sp,
+ const char *string)
+ { return(*(int *)0); }
+
+#undef putp
+int putp(
+ const char *string)
+ { return(*(int *)0); }
+
+#undef _nc_putp_sp
+int _nc_putp_sp(
+ SCREEN *sp,
+ const char *name,
+ const char *string)
+ { return(*(int *)0); }
+
+#undef _nc_putp
+int _nc_putp(
+ const char *name,
+ const char *string)
+ { return(*(int *)0); }
+
+#undef tputs_sp
+int tputs_sp(
+ SCREEN *sp,
+ const char *string,
+ int affcnt,
+ NCURSES_OUTC_sp outc)
+ { return(*(int *)0); }
+
+#undef _nc_outc_wrapper
+int _nc_outc_wrapper(
+ SCREEN *sp,
+ int c)
+ { return(*(int *)0); }
+
+#undef tputs
+int tputs(
+ const char *string,
+ int affcnt,
+ int (*outc)(
+ int p1))
+ { return(*(int *)0); }
+
+/* ./trace/lib_trace.c */
+
+#undef _nc_tracing
+unsigned _nc_tracing;
+
+#undef _nc__nc_tputs_trace
+const char *_nc__nc_tputs_trace(void)
+ { return(*(const char **)0); }
+
+#undef _nc__nc_outchars
+long _nc__nc_outchars(void)
+ { return(*(long *)0); }
+
+#undef _nc_set_tputs_trace
+void _nc_set_tputs_trace(
+ const char *s)
+ { /* void */ }
+
+#undef _nc_count_outchars
+void _nc_count_outchars(
+ long increment)
+ { /* void */ }
+
+#undef trace
+void trace(
+ const unsigned int tracelevel)
+ { /* void */ }
+
+#undef _tracef
+void _tracef(
+ const char *fmt,
+ ...)
+ { /* void */ }
+
+#undef _nc_retrace_bool
+NCURSES_BOOL _nc_retrace_bool(
+ int code)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef _nc_retrace_char
+char _nc_retrace_char(
+ int code)
+ { return(*(char *)0); }
+
+#undef _nc_retrace_int
+int _nc_retrace_int(
+ int code)
+ { return(*(int *)0); }
+
+#undef _nc_retrace_unsigned
+unsigned _nc_retrace_unsigned(
+ unsigned code)
+ { return(*(unsigned *)0); }
+
+#undef _nc_retrace_ptr
+char *_nc_retrace_ptr(
+ char *code)
+ { return(*(char **)0); }
+
+#undef _nc_retrace_cptr
+const char *_nc_retrace_cptr(
+ const char *code)
+ { return(*(const char **)0); }
+
+#undef _nc_retrace_cvoid_ptr
+void *_nc_retrace_cvoid_ptr(
+ void *code)
+ { return(*(void **)0); }
+
+#undef _nc_retrace_void_ptr
+void *_nc_retrace_void_ptr(
+ void *code)
+ { return(*(void **)0); }
+
+#undef _nc_retrace_sp
+SCREEN *_nc_retrace_sp(
+ SCREEN *code)
+ { return(*(SCREEN **)0); }
+
+#undef _nc_retrace_win
+WINDOW *_nc_retrace_win(
+ WINDOW *code)
+ { return(*(WINDOW **)0); }
+
+#undef _nc_use_tracef
+int _nc_use_tracef(
+ unsigned mask)
+ { return(*(int *)0); }
+
+#undef _nc_locked_tracef
+void _nc_locked_tracef(
+ const char *fmt,
+ ...)
+ { /* void */ }
+
+/* ./trace/lib_traceatr.c */
+
+#undef _traceattr2
+char *_traceattr2(
+ int bufnum,
+ chtype newmode)
+ { return(*(char **)0); }
+
+#undef _traceattr
+char *_traceattr(
+ attr_t newmode)
+ { return(*(char **)0); }
+
+#undef _nc_retrace_int_attr_t
+int _nc_retrace_int_attr_t(
+ attr_t code)
+ { return(*(int *)0); }
+
+#undef _nc_retrace_attr_t
+attr_t _nc_retrace_attr_t(
+ attr_t code)
+ { return(*(attr_t *)0); }
+
+#undef _nc_altcharset_name
+const char *_nc_altcharset_name(
+ attr_t attr,
+ chtype ch)
+ { return(*(const char **)0); }
+
+#undef _tracechtype2
+char *_tracechtype2(
+ int bufnum,
+ chtype ch)
+ { return(*(char **)0); }
+
+#undef _tracechtype
+char *_tracechtype(
+ chtype ch)
+ { return(*(char **)0); }
+
+#undef _nc_retrace_chtype
+chtype _nc_retrace_chtype(
+ chtype code)
+ { return(*(chtype *)0); }
+
+/* ./trace/lib_tracebits.c */
+
+typedef struct {
+ unsigned int val;
+ const char *name;
+} BITNAMES;
+
+#undef _nc_trace_ttymode
+char *_nc_trace_ttymode(
+ struct termios *tty)
+ { return(*(char **)0); }
+
+#undef _nc_tracebits
+char *_nc_tracebits(void)
+ { return(*(char **)0); }
+
+/* ./trace/lib_tracechr.c */
+
+#undef _nc_tracechar
+char *_nc_tracechar(
+ SCREEN *sp,
+ int ch)
+ { return(*(char **)0); }
+
+#undef _tracechar
+char *_tracechar(
+ int ch)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_ttyflags.c */
+
+#undef _nc_get_tty_mode_sp
+int _nc_get_tty_mode_sp(
+ SCREEN *sp,
+ struct termios *buf)
+ { return(*(int *)0); }
+
+#undef _nc_get_tty_mode
+int _nc_get_tty_mode(
+ struct termios *buf)
+ { return(*(int *)0); }
+
+#undef _nc_set_tty_mode_sp
+int _nc_set_tty_mode_sp(
+ SCREEN *sp,
+ struct termios *buf)
+ { return(*(int *)0); }
+
+#undef _nc_set_tty_mode
+int _nc_set_tty_mode(
+ struct termios *buf)
+ { return(*(int *)0); }
+
+#undef def_shell_mode_sp
+int def_shell_mode_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef def_shell_mode
+int def_shell_mode(void)
+ { return(*(int *)0); }
+
+#undef def_prog_mode_sp
+int def_prog_mode_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef def_prog_mode
+int def_prog_mode(void)
+ { return(*(int *)0); }
+
+#undef reset_prog_mode_sp
+int reset_prog_mode_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef reset_prog_mode
+int reset_prog_mode(void)
+ { return(*(int *)0); }
+
+#undef reset_shell_mode_sp
+int reset_shell_mode_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef reset_shell_mode
+int reset_shell_mode(void)
+ { return(*(int *)0); }
+
+#undef savetty_sp
+int savetty_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef savetty
+int savetty(void)
+ { return(*(int *)0); }
+
+#undef resetty_sp
+int resetty_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef resetty
+int resetty(void)
+ { return(*(int *)0); }
+
+/* ./tty/lib_twait.c */
+
+#include <sys/time.h>
+
+#undef _nc_timed_wait
+int _nc_timed_wait(
+ SCREEN *sp,
+ int mode,
+ int milliseconds,
+ int *timeleft)
+ { return(*(int *)0); }
+
+/* ./tinfo/name_match.c */
+
+#undef _nc_first_name
+char *_nc_first_name(
+ const char *const sp)
+ { return(*(char **)0); }
+
+#undef _nc_name_match
+int _nc_name_match(
+ const char *const namelst,
+ const char *const name,
+ const char *const delim)
+ { return(*(int *)0); }
+
+/* ./names.c */
+
+#undef _nc_boolnames
+char *const *_nc_boolnames(void)
+ { return(*(char **)0); }
+
+#undef _nc_boolfnames
+char *const *_nc_boolfnames(void)
+ { return(*(char **)0); }
+
+#undef _nc_numnames
+char *const *_nc_numnames(void)
+ { return(*(char **)0); }
+
+#undef _nc_numfnames
+char *const *_nc_numfnames(void)
+ { return(*(char **)0); }
+
+#undef _nc_strnames
+char *const *_nc_strnames(void)
+ { return(*(char **)0); }
+
+#undef _nc_strfnames
+char *const *_nc_strfnames(void)
+ { return(*(char **)0); }
+
+/* ./tinfo/obsolete.c */
+
+#undef _nc_set_buffer_sp
+void _nc_set_buffer_sp(
+ SCREEN *sp,
+ FILE *ofp,
+ int buffered)
+ { /* void */ }
+
+#undef _nc_set_buffer
+void _nc_set_buffer(
+ FILE *ofp,
+ int buffered)
+ { /* void */ }
+
+/* ./tinfo/read_entry.c */
+
+#include <hashed_db.h>
+
+#undef _nc_init_termtype
+void _nc_init_termtype(
+ TERMTYPE *const tp)
+ { /* void */ }
+
+#undef _nc_read_termtype
+int _nc_read_termtype(
+ TERMTYPE *ptr,
+ char *buffer,
+ int limit)
+ { return(*(int *)0); }
+
+#undef _nc_read_file_entry
+int _nc_read_file_entry(
+ const char *const filename,
+ TERMTYPE *ptr)
+ { return(*(int *)0); }
+
+#undef _nc_read_entry
+int _nc_read_entry(
+ const char *const name,
+ char *const filename,
+ TERMTYPE *const tp)
+ { return(*(int *)0); }
+
+/* ./tinfo/read_termcap.c */
+
+#include <sys/types.h>
+
+#undef _nc_read_termcap
+void _nc_read_termcap(void)
+ { /* void */ }
+
+/* ./tinfo/strings.c */
+
+#undef _nc_str_init
+string_desc *_nc_str_init(
+ string_desc *dst,
+ char *src,
+ size_t len)
+ { return(*(string_desc **)0); }
+
+#undef _nc_str_null
+string_desc *_nc_str_null(
+ string_desc *dst,
+ size_t len)
+ { return(*(string_desc **)0); }
+
+#undef _nc_str_copy
+string_desc *_nc_str_copy(
+ string_desc *dst,
+ string_desc *src)
+ { return(*(string_desc **)0); }
+
+#undef _nc_safe_strcat
+NCURSES_BOOL _nc_safe_strcat(
+ string_desc *dst,
+ const char *src)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef _nc_safe_strcpy
+NCURSES_BOOL _nc_safe_strcpy(
+ string_desc *dst,
+ const char *src)
+ { return(*(NCURSES_BOOL *)0); }
+
+/* ./trace/trace_buf.c */
+
+#undef _nc_trace_buf
+char *_nc_trace_buf(
+ int bufnum,
+ size_t want)
+ { return(*(char **)0); }
+
+#undef _nc_trace_bufcat
+char *_nc_trace_bufcat(
+ int bufnum,
+ const char *value)
+ { return(*(char **)0); }
+
+/* ./trace/trace_tries.c */
+
+#undef _nc_trace_tries
+void _nc_trace_tries(
+ TRIES *tree)
+ { /* void */ }
+
+/* ./base/tries.c */
+
+#undef _nc_expand_try
+char *_nc_expand_try(
+ TRIES *tree,
+ unsigned code,
+ int *count,
+ size_t len)
+ { return(*(char **)0); }
+
+#undef _nc_remove_key
+int _nc_remove_key(
+ TRIES **tree,
+ unsigned code)
+ { return(*(int *)0); }
+
+#undef _nc_remove_string
+int _nc_remove_string(
+ TRIES **tree,
+ const char *string)
+ { return(*(int *)0); }
+
+/* ./tinfo/trim_sgr0.c */
+
+#undef _nc_trim_sgr0
+char *_nc_trim_sgr0(
+ TERMTYPE *tp)
+ { return(*(char **)0); }
+
+/* ./unctrl.c */
+
+#undef unctrl_sp
+char *unctrl_sp(
+ SCREEN *sp,
+ chtype ch)
+ { return(*(char **)0); }
+
+#undef unctrl
+char *unctrl(
+ chtype ch)
+ { return(*(char **)0); }
+
+/* ./trace/visbuf.c */
+
+#undef _nc_visbuf2
+const char *_nc_visbuf2(
+ int bufnum,
+ const char *buf)
+ { return(*(const char **)0); }
+
+#undef _nc_visbuf
+const char *_nc_visbuf(
+ const char *buf)
+ { return(*(const char **)0); }
+
+#undef _nc_visbufn
+const char *_nc_visbufn(
+ const char *buf,
+ int len)
+ { return(*(const char **)0); }
+
+#undef _nc_viscbuf2
+const char *_nc_viscbuf2(
+ int bufnum,
+ const chtype *buf,
+ int len)
+ { return(*(const char **)0); }
+
+#undef _nc_viscbuf
+const char *_nc_viscbuf(
+ const chtype *buf,
+ int len)
+ { return(*(const char **)0); }
+
+/* ./base/define_key.c */
+
+#undef define_key_sp
+int define_key_sp(
+ SCREEN *sp,
+ const char *str,
+ int keycode)
+ { return(*(int *)0); }
+
+#undef define_key
+int define_key(
+ const char *str,
+ int keycode)
+ { return(*(int *)0); }
+
+/* ./tinfo/hashed_db.c */
+
+#undef _nc_hashed_db
+void _nc_hashed_db(void)
+ { /* void */ }
+
+/* ./base/key_defined.c */
+
+#undef key_defined_sp
+int key_defined_sp(
+ SCREEN *sp,
+ const char *str)
+ { return(*(int *)0); }
+
+#undef key_defined
+int key_defined(
+ const char *str)
+ { return(*(int *)0); }
+
+/* ./base/keybound.c */
+
+#undef keybound_sp
+char *keybound_sp(
+ SCREEN *sp,
+ int code,
+ int count)
+ { return(*(char **)0); }
+
+#undef keybound
+char *keybound(
+ int code,
+ int count)
+ { return(*(char **)0); }
+
+/* ./base/keyok.c */
+
+#undef keyok_sp
+int keyok_sp(
+ SCREEN *sp,
+ int c,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+#undef keyok
+int keyok(
+ int c,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+/* ./base/version.c */
+
+#undef curses_version
+const char *curses_version(void)
+ { return(*(const char **)0); }
diff --git a/ncurses/llib-ltinfotw b/ncurses/llib-ltinfotw
new file mode 100644
index 000000000000..ec9b63d443ff
--- /dev/null
+++ b/ncurses/llib-ltinfotw
@@ -0,0 +1,1668 @@
+/****************************************************************************
+ * 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 *
+ ****************************************************************************/
+/* LINTLIBRARY */
+
+/* ./tinfo/access.c */
+
+#include <curses.priv.h>
+#include <ctype.h>
+#include <tic.h>
+
+#undef _nc_rootname
+char *_nc_rootname(
+ char *path)
+ { return(*(char **)0); }
+
+#undef _nc_is_abs_path
+NCURSES_BOOL _nc_is_abs_path(
+ const char *path)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef _nc_pathlast
+unsigned _nc_pathlast(
+ const char *path)
+ { return(*(unsigned *)0); }
+
+#undef _nc_basename
+char *_nc_basename(
+ char *path)
+ { return(*(char **)0); }
+
+#undef _nc_access
+int _nc_access(
+ const char *path,
+ int mode)
+ { return(*(int *)0); }
+
+#undef _nc_is_dir_path
+NCURSES_BOOL _nc_is_dir_path(
+ const char *path)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef _nc_is_file_path
+NCURSES_BOOL _nc_is_file_path(
+ const char *path)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef _nc_env_access
+int _nc_env_access(void)
+ { return(*(int *)0); }
+
+/* ./tinfo/add_tries.c */
+
+#undef _nc_add_to_try
+int _nc_add_to_try(
+ TRIES **tree,
+ const char *str,
+ unsigned code)
+ { return(*(int *)0); }
+
+/* ./tinfo/alloc_ttype.c */
+
+#undef _nc_align_termtype
+void _nc_align_termtype(
+ TERMTYPE *to,
+ TERMTYPE *from)
+ { /* void */ }
+
+#undef _nc_copy_termtype
+void _nc_copy_termtype(
+ TERMTYPE *dst,
+ const TERMTYPE *src)
+ { /* void */ }
+
+/* ./codes.c */
+
+#undef _nc_boolcodes
+char *const *_nc_boolcodes(void)
+ { return(*(char **)0); }
+
+#undef _nc_numcodes
+char *const *_nc_numcodes(void)
+ { return(*(char **)0); }
+
+#undef _nc_strcodes
+char *const *_nc_strcodes(void)
+ { return(*(char **)0); }
+
+/* ./comp_captab.c */
+
+#include <hashsize.h>
+
+#undef _nc_get_table
+const struct name_table_entry *_nc_get_table(
+ NCURSES_BOOL termcap)
+ { return(*(const struct name_table_entry **)0); }
+
+#undef _nc_get_hash_table
+const HashValue *_nc_get_hash_table(
+ NCURSES_BOOL termcap)
+ { return(*(const HashValue **)0); }
+
+#undef _nc_get_alias_table
+const struct alias *_nc_get_alias_table(
+ NCURSES_BOOL termcap)
+ { return(*(const struct alias **)0); }
+
+#undef _nc_get_hash_info
+const HashData *_nc_get_hash_info(
+ NCURSES_BOOL termcap)
+ { return(*(const HashData **)0); }
+
+/* ./tinfo/comp_error.c */
+
+#undef _nc_suppress_warnings
+NCURSES_BOOL _nc_suppress_warnings;
+#undef _nc_curr_line
+int _nc_curr_line;
+#undef _nc_curr_col
+int _nc_curr_col;
+
+#undef _nc_get_source
+const char *_nc_get_source(void)
+ { return(*(const char **)0); }
+
+#undef _nc_set_source
+void _nc_set_source(
+ const char *const name)
+ { /* void */ }
+
+#undef _nc_set_type
+void _nc_set_type(
+ const char *const name)
+ { /* void */ }
+
+#undef _nc_get_type
+void _nc_get_type(
+ char *name)
+ { /* void */ }
+
+#undef _nc_warning
+void _nc_warning(
+ const char *const fmt,
+ ...)
+ { /* void */ }
+
+#undef _nc_err_abort
+void _nc_err_abort(
+ const char *const fmt,
+ ...)
+ { /* void */ }
+
+#undef _nc_syserr_abort
+void _nc_syserr_abort(
+ const char *const fmt,
+ ...)
+ { /* void */ }
+
+/* ./tinfo/comp_hash.c */
+
+#undef _nc_find_entry
+struct name_table_entry const *_nc_find_entry(
+ const char *string,
+ const HashValue *hash_table)
+ { return(*(struct name_table_entry const **)0); }
+
+#undef _nc_find_type_entry
+struct name_table_entry const *_nc_find_type_entry(
+ const char *string,
+ int type,
+ NCURSES_BOOL termcap)
+ { return(*(struct name_table_entry const **)0); }
+
+/* ./tinfo/db_iterator.c */
+
+#include <time.h>
+
+#undef _nc_tic_dir
+const char *_nc_tic_dir(
+ const char *path)
+ { return(*(const char **)0); }
+
+#undef _nc_keep_tic_dir
+void _nc_keep_tic_dir(
+ const char *path)
+ { /* void */ }
+
+#undef _nc_last_db
+void _nc_last_db(void)
+ { /* void */ }
+
+#undef _nc_next_db
+const char *_nc_next_db(
+ DBDIRS *state,
+ int *offset)
+ { return(*(const char **)0); }
+
+#undef _nc_first_db
+void _nc_first_db(
+ DBDIRS *state,
+ int *offset)
+ { /* void */ }
+
+/* ./tinfo/doalloc.c */
+
+#undef _nc_doalloc
+void *_nc_doalloc(
+ void *oldp,
+ size_t amount)
+ { return(*(void **)0); }
+
+/* ./tinfo/entries.c */
+
+#undef _nc_head
+ENTRY *_nc_head;
+#undef _nc_tail
+ENTRY *_nc_tail;
+
+#undef _nc_free_entry
+void _nc_free_entry(
+ ENTRY *headp,
+ TERMTYPE *tterm)
+ { /* void */ }
+
+#undef _nc_free_entries
+void _nc_free_entries(
+ ENTRY *headp)
+ { /* void */ }
+
+#undef _nc_delink_entry
+ENTRY *_nc_delink_entry(
+ ENTRY *headp,
+ TERMTYPE *tterm)
+ { return(*(ENTRY **)0); }
+
+#undef _nc_leaks_tinfo
+void _nc_leaks_tinfo(void)
+ { /* void */ }
+
+/* ./fallback.c */
+
+#undef _nc_fallback
+const TERMTYPE *_nc_fallback(
+ const char *name)
+ { return(*(const TERMTYPE **)0); }
+
+/* ./tinfo/free_ttype.c */
+
+#undef _nc_free_termtype
+void _nc_free_termtype(
+ TERMTYPE *ptr)
+ { /* void */ }
+
+#undef _nc_user_definable
+NCURSES_BOOL _nc_user_definable;
+
+#undef use_extended_names
+int use_extended_names(
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+/* ./tinfo/getenv_num.c */
+
+#undef _nc_getenv_num
+int _nc_getenv_num(
+ const char *name)
+ { return(*(int *)0); }
+
+#undef _nc_setenv_num
+void _nc_setenv_num(
+ const char *name,
+ int value)
+ { /* void */ }
+
+/* ./tinfo/home_terminfo.c */
+
+#undef _nc_home_terminfo
+char *_nc_home_terminfo(void)
+ { return(*(char **)0); }
+
+/* ./tinfo/init_keytry.c */
+
+#if 0
+
+#include <init_keytry.h>
+
+#undef _nc_tinfo_fkeys
+const struct tinfo_fkeys _nc_tinfo_fkeys[] = {0};
+
+#endif
+
+#undef _nc_init_keytry
+void _nc_init_keytry(
+ SCREEN *sp)
+ { /* void */ }
+
+/* ./tinfo/lib_acs.c */
+
+#undef _nc_acs_map
+chtype *_nc_acs_map(void)
+ { return(*(chtype **)0); }
+
+#undef _nc_init_acs_sp
+void _nc_init_acs_sp(
+ SCREEN *sp)
+ { /* void */ }
+
+#undef _nc_init_acs
+void _nc_init_acs(void)
+ { /* void */ }
+
+/* ./tinfo/lib_baudrate.c */
+
+#include <termcap.h>
+
+struct speed {
+ int s;
+ int sp;
+};
+
+#undef _nc_baudrate
+int _nc_baudrate(
+ int OSpeed)
+ { return(*(int *)0); }
+
+#undef _nc_ospeed
+int _nc_ospeed(
+ int BaudRate)
+ { return(*(int *)0); }
+
+#undef baudrate_sp
+int baudrate_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef baudrate
+int baudrate(void)
+ { return(*(int *)0); }
+
+/* ./tinfo/lib_cur_term.c */
+
+#undef _nc_get_cur_term_sp
+TERMINAL *_nc_get_cur_term_sp(
+ SCREEN *sp)
+ { return(*(TERMINAL **)0); }
+
+#undef _nc_get_cur_term
+TERMINAL *_nc_get_cur_term(void)
+ { return(*(TERMINAL **)0); }
+
+#undef _nc_cur_term
+TERMINAL *_nc_cur_term(void)
+ { return(*(TERMINAL **)0); }
+
+#undef set_curterm_sp
+TERMINAL *set_curterm_sp(
+ SCREEN *sp,
+ TERMINAL *termp)
+ { return(*(TERMINAL **)0); }
+
+#undef set_curterm
+TERMINAL *set_curterm(
+ TERMINAL *termp)
+ { return(*(TERMINAL **)0); }
+
+#undef del_curterm_sp
+int del_curterm_sp(
+ SCREEN *sp,
+ TERMINAL *termp)
+ { return(*(int *)0); }
+
+#undef del_curterm
+int del_curterm(
+ TERMINAL *termp)
+ { return(*(int *)0); }
+
+/* ./tinfo/lib_data.c */
+
+#undef _nc_stdscr
+WINDOW *_nc_stdscr(void)
+ { return(*(WINDOW **)0); }
+
+#undef _nc_curscr
+WINDOW *_nc_curscr(void)
+ { return(*(WINDOW **)0); }
+
+#undef _nc_newscr
+WINDOW *_nc_newscr(void)
+ { return(*(WINDOW **)0); }
+
+#undef _nc_screen_chain
+SCREEN *_nc_screen_chain;
+#undef SP
+SCREEN *SP;
+#undef _nc_globals
+NCURSES_GLOBALS _nc_globals;
+#undef _nc_prescreen
+NCURSES_PRESCREEN _nc_prescreen;
+
+#undef _nc_screen_of
+SCREEN *_nc_screen_of(
+ WINDOW *win)
+ { return(*(SCREEN **)0); }
+
+#undef _nc_init_pthreads
+void _nc_init_pthreads(void)
+ { /* void */ }
+
+#undef _nc_mutex_init
+void _nc_mutex_init(
+ pthread_mutex_t *obj)
+ { /* void */ }
+
+#undef _nc_mutex_lock
+int _nc_mutex_lock(
+ pthread_mutex_t *obj)
+ { return(*(int *)0); }
+
+#undef _nc_mutex_trylock
+int _nc_mutex_trylock(
+ pthread_mutex_t *obj)
+ { return(*(int *)0); }
+
+#undef _nc_mutex_unlock
+int _nc_mutex_unlock(
+ pthread_mutex_t *obj)
+ { return(*(int *)0); }
+
+/* ./tinfo/lib_has_cap.c */
+
+#undef has_ic_sp
+NCURSES_BOOL has_ic_sp(
+ SCREEN *sp)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef has_ic
+NCURSES_BOOL has_ic(void)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef has_il_sp
+NCURSES_BOOL has_il_sp(
+ SCREEN *sp)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef has_il
+NCURSES_BOOL has_il(void)
+ { return(*(NCURSES_BOOL *)0); }
+
+/* ./tinfo/lib_kernel.c */
+
+#undef erasechar_sp
+char erasechar_sp(
+ SCREEN *sp)
+ { return(*(char *)0); }
+
+#undef erasechar
+char erasechar(void)
+ { return(*(char *)0); }
+
+#undef killchar_sp
+char killchar_sp(
+ SCREEN *sp)
+ { return(*(char *)0); }
+
+#undef killchar
+char killchar(void)
+ { return(*(char *)0); }
+
+#undef flushinp_sp
+int flushinp_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef flushinp
+int flushinp(void)
+ { return(*(int *)0); }
+
+/* ./lib_keyname.c */
+
+struct kn { short offset; int code; };
+
+#undef keyname_sp
+char *keyname_sp(
+ SCREEN *sp,
+ int c)
+ { return(*(char **)0); }
+
+#undef keyname
+char *keyname(
+ int c)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_longname.c */
+
+#undef longname_sp
+char *longname_sp(
+ SCREEN *sp)
+ { return(*(char **)0); }
+
+#undef longname
+char *longname(void)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_napms.c */
+
+#undef napms_sp
+int napms_sp(
+ SCREEN *sp,
+ int ms)
+ { return(*(int *)0); }
+
+#undef napms
+int napms(
+ int ms)
+ { return(*(int *)0); }
+
+/* ./tinfo/lib_options.c */
+
+#undef idlok
+int idlok(
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+#undef idcok
+void idcok(
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { /* void */ }
+
+#undef halfdelay_sp
+int halfdelay_sp(
+ SCREEN *sp,
+ int t)
+ { return(*(int *)0); }
+
+#undef halfdelay
+int halfdelay(
+ int t)
+ { return(*(int *)0); }
+
+#undef nodelay
+int nodelay(
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+#undef notimeout
+int notimeout(
+ WINDOW *win,
+ NCURSES_BOOL f)
+ { return(*(int *)0); }
+
+#undef wtimeout
+void wtimeout(
+ WINDOW *win,
+ int delay)
+ { /* void */ }
+
+#undef keypad
+int keypad(
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+#undef meta
+int meta(
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+#undef curs_set_sp
+int curs_set_sp(
+ SCREEN *sp,
+ int vis)
+ { return(*(int *)0); }
+
+#undef curs_set
+int curs_set(
+ int vis)
+ { return(*(int *)0); }
+
+#undef typeahead_sp
+int typeahead_sp(
+ SCREEN *sp,
+ int fd)
+ { return(*(int *)0); }
+
+#undef typeahead
+int typeahead(
+ int fd)
+ { return(*(int *)0); }
+
+#undef has_key_sp
+int has_key_sp(
+ SCREEN *sp,
+ int keycode)
+ { return(*(int *)0); }
+
+#undef has_key
+int has_key(
+ int keycode)
+ { return(*(int *)0); }
+
+#undef _nc_putp_flush_sp
+int _nc_putp_flush_sp(
+ SCREEN *sp,
+ const char *name,
+ const char *value)
+ { return(*(int *)0); }
+
+#undef _nc_keypad
+int _nc_keypad(
+ SCREEN *sp,
+ int flag)
+ { return(*(int *)0); }
+
+/* ./tinfo/lib_raw.c */
+
+#undef raw_sp
+int raw_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef raw
+int raw(void)
+ { return(*(int *)0); }
+
+#undef cbreak_sp
+int cbreak_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef cbreak
+int cbreak(void)
+ { return(*(int *)0); }
+
+#undef qiflush_sp
+void qiflush_sp(
+ SCREEN *sp)
+ { /* void */ }
+
+#undef qiflush
+void qiflush(void)
+ { /* void */ }
+
+#undef noraw_sp
+int noraw_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef noraw
+int noraw(void)
+ { return(*(int *)0); }
+
+#undef nocbreak_sp
+int nocbreak_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef nocbreak
+int nocbreak(void)
+ { return(*(int *)0); }
+
+#undef noqiflush_sp
+void noqiflush_sp(
+ SCREEN *sp)
+ { /* void */ }
+
+#undef noqiflush
+void noqiflush(void)
+ { /* void */ }
+
+#undef intrflush_sp
+int intrflush_sp(
+ SCREEN *sp,
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+#undef intrflush
+int intrflush(
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+/* ./tinfo/lib_setup.c */
+
+#include <locale.h>
+#include <sys/ioctl.h>
+#include <langinfo.h>
+
+#undef _nc_ttytype
+char *_nc_ttytype(void)
+ { return(*(char **)0); }
+
+#undef _nc_ptr_Lines
+int *_nc_ptr_Lines(
+ SCREEN *sp)
+ { return(*(int **)0); }
+
+#undef _nc_LINES
+int _nc_LINES(void)
+ { return(*(int *)0); }
+
+#undef _nc_ptr_Cols
+int *_nc_ptr_Cols(
+ SCREEN *sp)
+ { return(*(int **)0); }
+
+#undef _nc_COLS
+int _nc_COLS(void)
+ { return(*(int *)0); }
+
+#undef _nc_ptr_Tabsize
+int *_nc_ptr_Tabsize(
+ SCREEN *sp)
+ { return(*(int **)0); }
+
+#undef _nc_TABSIZE
+int _nc_TABSIZE(void)
+ { return(*(int *)0); }
+
+#undef set_tabsize_sp
+int set_tabsize_sp(
+ SCREEN *sp,
+ int value)
+ { return(*(int *)0); }
+
+#undef set_tabsize
+int set_tabsize(
+ int value)
+ { return(*(int *)0); }
+
+#undef _nc_handle_sigwinch
+int _nc_handle_sigwinch(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef use_env_sp
+void use_env_sp(
+ SCREEN *sp,
+ NCURSES_BOOL f)
+ { /* void */ }
+
+#undef use_tioctl_sp
+void use_tioctl_sp(
+ SCREEN *sp,
+ NCURSES_BOOL f)
+ { /* void */ }
+
+#undef use_env
+void use_env(
+ NCURSES_BOOL f)
+ { /* void */ }
+
+#undef use_tioctl
+void use_tioctl(
+ NCURSES_BOOL f)
+ { /* void */ }
+
+#undef _nc_get_screensize
+void _nc_get_screensize(
+ SCREEN *sp,
+ int *linep,
+ int *colp)
+ { /* void */ }
+
+#undef _nc_update_screensize
+void _nc_update_screensize(
+ SCREEN *sp)
+ { /* void */ }
+
+#undef _nc_setup_tinfo
+int _nc_setup_tinfo(
+ const char *const tn,
+ TERMTYPE *const tp)
+ { return(*(int *)0); }
+
+#undef _nc_tinfo_cmdch
+void _nc_tinfo_cmdch(
+ TERMINAL *termp,
+ int proto)
+ { /* void */ }
+
+#undef _nc_get_locale
+char *_nc_get_locale(void)
+ { return(*(char **)0); }
+
+#undef _nc_unicode_locale
+int _nc_unicode_locale(void)
+ { return(*(int *)0); }
+
+#undef _nc_locale_breaks_acs
+int _nc_locale_breaks_acs(
+ TERMINAL *termp)
+ { return(*(int *)0); }
+
+#undef _nc_setupterm
+int _nc_setupterm(
+ char *tname,
+ int Filedes,
+ int *errret,
+ int reuse)
+ { return(*(int *)0); }
+
+#undef new_prescr
+SCREEN *new_prescr(void)
+ { return(*(SCREEN **)0); }
+
+#undef setupterm
+int setupterm(
+ char *tname,
+ int Filedes,
+ int *errret)
+ { return(*(int *)0); }
+
+/* ./tinfo/lib_termcap.c */
+
+#undef UP
+char *UP;
+#undef BC
+char *BC;
+
+#undef tgetent_sp
+int tgetent_sp(
+ SCREEN *sp,
+ char *bufp,
+ const char *name)
+ { return(*(int *)0); }
+
+#if 0
+
+#include <capdefaults.c>
+
+#endif
+
+#undef tgetent
+int tgetent(
+ char *bufp,
+ const char *name)
+ { return(*(int *)0); }
+
+#undef tgetflag_sp
+int tgetflag_sp(
+ SCREEN *sp,
+ char *id)
+ { return(*(int *)0); }
+
+#undef tgetflag
+int tgetflag(
+ char *id)
+ { return(*(int *)0); }
+
+#undef tgetnum_sp
+int tgetnum_sp(
+ SCREEN *sp,
+ char *id)
+ { return(*(int *)0); }
+
+#undef tgetnum
+int tgetnum(
+ char *id)
+ { return(*(int *)0); }
+
+#undef tgetstr_sp
+char *tgetstr_sp(
+ SCREEN *sp,
+ char *id,
+ char **area)
+ { return(*(char **)0); }
+
+#undef tgetstr
+char *tgetstr(
+ char *id,
+ char **area)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_termname.c */
+
+#undef termname_sp
+char *termname_sp(
+ SCREEN *sp)
+ { return(*(char **)0); }
+
+#undef termname
+char *termname(void)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_tgoto.c */
+
+#undef tgoto
+char *tgoto(
+ const char *string,
+ int x,
+ int y)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_ti.c */
+
+#undef tigetflag_sp
+int tigetflag_sp(
+ SCREEN *sp,
+ char *str)
+ { return(*(int *)0); }
+
+#undef tigetflag
+int tigetflag(
+ char *str)
+ { return(*(int *)0); }
+
+#undef tigetnum_sp
+int tigetnum_sp(
+ SCREEN *sp,
+ char *str)
+ { return(*(int *)0); }
+
+#undef tigetnum
+int tigetnum(
+ char *str)
+ { return(*(int *)0); }
+
+#undef tigetstr_sp
+char *tigetstr_sp(
+ SCREEN *sp,
+ char *str)
+ { return(*(char **)0); }
+
+#undef tigetstr
+char *tigetstr(
+ char *str)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_tparm.c */
+
+#undef _nc_tparm_err
+int _nc_tparm_err;
+
+#undef _nc_tparm_analyze
+int _nc_tparm_analyze(
+ const char *string,
+ char *p_is_s[9],
+ int *_nc_popcount)
+ { return(*(int *)0); }
+
+#undef tparm
+char *tparm(
+ char *string,
+ ...)
+ { return(*(char **)0); }
+
+#undef tiparm
+char *tiparm(
+ const char *string,
+ ...)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_tputs.c */
+
+#undef PC
+char PC;
+#undef ospeed
+short ospeed;
+#undef _nc_nulls_sent
+int _nc_nulls_sent;
+
+#undef _nc_set_no_padding
+void _nc_set_no_padding(
+ SCREEN *sp)
+ { /* void */ }
+
+#undef delay_output_sp
+int delay_output_sp(
+ SCREEN *sp,
+ int ms)
+ { return(*(int *)0); }
+
+#undef delay_output
+int delay_output(
+ int ms)
+ { return(*(int *)0); }
+
+#undef _nc_flush_sp
+void _nc_flush_sp(
+ SCREEN *sp)
+ { /* void */ }
+
+#undef _nc_flush
+void _nc_flush(void)
+ { /* void */ }
+
+#undef _nc_outch_sp
+int _nc_outch_sp(
+ SCREEN *sp,
+ int ch)
+ { return(*(int *)0); }
+
+#undef _nc_outch
+int _nc_outch(
+ int ch)
+ { return(*(int *)0); }
+
+#undef _nc_putchar_sp
+int _nc_putchar_sp(
+ SCREEN *sp,
+ int ch)
+ { return(*(int *)0); }
+
+#undef _nc_putchar
+int _nc_putchar(
+ int ch)
+ { return(*(int *)0); }
+
+#undef putp_sp
+int putp_sp(
+ SCREEN *sp,
+ const char *string)
+ { return(*(int *)0); }
+
+#undef putp
+int putp(
+ const char *string)
+ { return(*(int *)0); }
+
+#undef _nc_putp_sp
+int _nc_putp_sp(
+ SCREEN *sp,
+ const char *name,
+ const char *string)
+ { return(*(int *)0); }
+
+#undef _nc_putp
+int _nc_putp(
+ const char *name,
+ const char *string)
+ { return(*(int *)0); }
+
+#undef tputs_sp
+int tputs_sp(
+ SCREEN *sp,
+ const char *string,
+ int affcnt,
+ NCURSES_OUTC_sp outc)
+ { return(*(int *)0); }
+
+#undef _nc_outc_wrapper
+int _nc_outc_wrapper(
+ SCREEN *sp,
+ int c)
+ { return(*(int *)0); }
+
+#undef tputs
+int tputs(
+ const char *string,
+ int affcnt,
+ int (*outc)(
+ int p1))
+ { return(*(int *)0); }
+
+/* ./trace/lib_trace.c */
+
+#undef _nc_tracing
+unsigned _nc_tracing;
+
+#undef _nc__nc_tputs_trace
+const char *_nc__nc_tputs_trace(void)
+ { return(*(const char **)0); }
+
+#undef _nc__nc_outchars
+long _nc__nc_outchars(void)
+ { return(*(long *)0); }
+
+#undef _nc_set_tputs_trace
+void _nc_set_tputs_trace(
+ const char *s)
+ { /* void */ }
+
+#undef _nc_count_outchars
+void _nc_count_outchars(
+ long increment)
+ { /* void */ }
+
+#undef trace
+void trace(
+ const unsigned int tracelevel)
+ { /* void */ }
+
+#undef _tracef
+void _tracef(
+ const char *fmt,
+ ...)
+ { /* void */ }
+
+#undef _nc_retrace_bool
+NCURSES_BOOL _nc_retrace_bool(
+ int code)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef _nc_retrace_char
+char _nc_retrace_char(
+ int code)
+ { return(*(char *)0); }
+
+#undef _nc_retrace_int
+int _nc_retrace_int(
+ int code)
+ { return(*(int *)0); }
+
+#undef _nc_retrace_unsigned
+unsigned _nc_retrace_unsigned(
+ unsigned code)
+ { return(*(unsigned *)0); }
+
+#undef _nc_retrace_ptr
+char *_nc_retrace_ptr(
+ char *code)
+ { return(*(char **)0); }
+
+#undef _nc_retrace_cptr
+const char *_nc_retrace_cptr(
+ const char *code)
+ { return(*(const char **)0); }
+
+#undef _nc_retrace_cvoid_ptr
+void *_nc_retrace_cvoid_ptr(
+ void *code)
+ { return(*(void **)0); }
+
+#undef _nc_retrace_void_ptr
+void *_nc_retrace_void_ptr(
+ void *code)
+ { return(*(void **)0); }
+
+#undef _nc_retrace_sp
+SCREEN *_nc_retrace_sp(
+ SCREEN *code)
+ { return(*(SCREEN **)0); }
+
+#undef _nc_retrace_win
+WINDOW *_nc_retrace_win(
+ WINDOW *code)
+ { return(*(WINDOW **)0); }
+
+#undef _nc_use_tracef
+int _nc_use_tracef(
+ unsigned mask)
+ { return(*(int *)0); }
+
+#undef _nc_locked_tracef
+void _nc_locked_tracef(
+ const char *fmt,
+ ...)
+ { /* void */ }
+
+/* ./trace/lib_traceatr.c */
+
+#undef _traceattr2
+char *_traceattr2(
+ int bufnum,
+ chtype newmode)
+ { return(*(char **)0); }
+
+#undef _traceattr
+char *_traceattr(
+ attr_t newmode)
+ { return(*(char **)0); }
+
+#undef _nc_retrace_int_attr_t
+int _nc_retrace_int_attr_t(
+ attr_t code)
+ { return(*(int *)0); }
+
+#undef _nc_retrace_attr_t
+attr_t _nc_retrace_attr_t(
+ attr_t code)
+ { return(*(attr_t *)0); }
+
+#undef _nc_altcharset_name
+const char *_nc_altcharset_name(
+ attr_t attr,
+ chtype ch)
+ { return(*(const char **)0); }
+
+#undef _tracechtype2
+char *_tracechtype2(
+ int bufnum,
+ chtype ch)
+ { return(*(char **)0); }
+
+#undef _tracechtype
+char *_tracechtype(
+ chtype ch)
+ { return(*(char **)0); }
+
+#undef _nc_retrace_chtype
+chtype _nc_retrace_chtype(
+ chtype code)
+ { return(*(chtype *)0); }
+
+#undef _tracecchar_t2
+char *_tracecchar_t2(
+ int bufnum,
+ const cchar_t *ch)
+ { return(*(char **)0); }
+
+#undef _tracecchar_t
+char *_tracecchar_t(
+ const cchar_t *ch)
+ { return(*(char **)0); }
+
+/* ./trace/lib_tracebits.c */
+
+typedef struct {
+ unsigned int val;
+ const char *name;
+} BITNAMES;
+
+#undef _nc_trace_ttymode
+char *_nc_trace_ttymode(
+ struct termios *tty)
+ { return(*(char **)0); }
+
+#undef _nc_tracebits
+char *_nc_tracebits(void)
+ { return(*(char **)0); }
+
+/* ./trace/lib_tracechr.c */
+
+#undef _nc_tracechar
+char *_nc_tracechar(
+ SCREEN *sp,
+ int ch)
+ { return(*(char **)0); }
+
+#undef _tracechar
+char *_tracechar(
+ int ch)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_ttyflags.c */
+
+#undef _nc_get_tty_mode_sp
+int _nc_get_tty_mode_sp(
+ SCREEN *sp,
+ struct termios *buf)
+ { return(*(int *)0); }
+
+#undef _nc_get_tty_mode
+int _nc_get_tty_mode(
+ struct termios *buf)
+ { return(*(int *)0); }
+
+#undef _nc_set_tty_mode_sp
+int _nc_set_tty_mode_sp(
+ SCREEN *sp,
+ struct termios *buf)
+ { return(*(int *)0); }
+
+#undef _nc_set_tty_mode
+int _nc_set_tty_mode(
+ struct termios *buf)
+ { return(*(int *)0); }
+
+#undef def_shell_mode_sp
+int def_shell_mode_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef def_shell_mode
+int def_shell_mode(void)
+ { return(*(int *)0); }
+
+#undef def_prog_mode_sp
+int def_prog_mode_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef def_prog_mode
+int def_prog_mode(void)
+ { return(*(int *)0); }
+
+#undef reset_prog_mode_sp
+int reset_prog_mode_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef reset_prog_mode
+int reset_prog_mode(void)
+ { return(*(int *)0); }
+
+#undef reset_shell_mode_sp
+int reset_shell_mode_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef reset_shell_mode
+int reset_shell_mode(void)
+ { return(*(int *)0); }
+
+#undef savetty_sp
+int savetty_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef savetty
+int savetty(void)
+ { return(*(int *)0); }
+
+#undef resetty_sp
+int resetty_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef resetty
+int resetty(void)
+ { return(*(int *)0); }
+
+/* ./tty/lib_twait.c */
+
+#include <sys/time.h>
+
+#undef _nc_timed_wait
+int _nc_timed_wait(
+ SCREEN *sp,
+ int mode,
+ int milliseconds,
+ int *timeleft)
+ { return(*(int *)0); }
+
+/* ./tinfo/name_match.c */
+
+#undef _nc_first_name
+char *_nc_first_name(
+ const char *const sp)
+ { return(*(char **)0); }
+
+#undef _nc_name_match
+int _nc_name_match(
+ const char *const namelst,
+ const char *const name,
+ const char *const delim)
+ { return(*(int *)0); }
+
+/* ./names.c */
+
+#undef _nc_boolnames
+char *const *_nc_boolnames(void)
+ { return(*(char **)0); }
+
+#undef _nc_boolfnames
+char *const *_nc_boolfnames(void)
+ { return(*(char **)0); }
+
+#undef _nc_numnames
+char *const *_nc_numnames(void)
+ { return(*(char **)0); }
+
+#undef _nc_numfnames
+char *const *_nc_numfnames(void)
+ { return(*(char **)0); }
+
+#undef _nc_strnames
+char *const *_nc_strnames(void)
+ { return(*(char **)0); }
+
+#undef _nc_strfnames
+char *const *_nc_strfnames(void)
+ { return(*(char **)0); }
+
+/* ./tinfo/obsolete.c */
+
+#undef _nc_set_buffer_sp
+void _nc_set_buffer_sp(
+ SCREEN *sp,
+ FILE *ofp,
+ int buffered)
+ { /* void */ }
+
+#undef _nc_set_buffer
+void _nc_set_buffer(
+ FILE *ofp,
+ int buffered)
+ { /* void */ }
+
+/* ./tinfo/read_entry.c */
+
+#include <hashed_db.h>
+
+#undef _nc_init_termtype
+void _nc_init_termtype(
+ TERMTYPE *const tp)
+ { /* void */ }
+
+#undef _nc_read_termtype
+int _nc_read_termtype(
+ TERMTYPE *ptr,
+ char *buffer,
+ int limit)
+ { return(*(int *)0); }
+
+#undef _nc_read_file_entry
+int _nc_read_file_entry(
+ const char *const filename,
+ TERMTYPE *ptr)
+ { return(*(int *)0); }
+
+#undef _nc_read_entry
+int _nc_read_entry(
+ const char *const name,
+ char *const filename,
+ TERMTYPE *const tp)
+ { return(*(int *)0); }
+
+/* ./tinfo/read_termcap.c */
+
+#include <sys/types.h>
+
+#undef _nc_read_termcap
+void _nc_read_termcap(void)
+ { /* void */ }
+
+/* ./tinfo/strings.c */
+
+#undef _nc_str_init
+string_desc *_nc_str_init(
+ string_desc *dst,
+ char *src,
+ size_t len)
+ { return(*(string_desc **)0); }
+
+#undef _nc_str_null
+string_desc *_nc_str_null(
+ string_desc *dst,
+ size_t len)
+ { return(*(string_desc **)0); }
+
+#undef _nc_str_copy
+string_desc *_nc_str_copy(
+ string_desc *dst,
+ string_desc *src)
+ { return(*(string_desc **)0); }
+
+#undef _nc_safe_strcat
+NCURSES_BOOL _nc_safe_strcat(
+ string_desc *dst,
+ const char *src)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef _nc_safe_strcpy
+NCURSES_BOOL _nc_safe_strcpy(
+ string_desc *dst,
+ const char *src)
+ { return(*(NCURSES_BOOL *)0); }
+
+/* ./trace/trace_buf.c */
+
+#undef _nc_trace_buf
+char *_nc_trace_buf(
+ int bufnum,
+ size_t want)
+ { return(*(char **)0); }
+
+#undef _nc_trace_bufcat
+char *_nc_trace_bufcat(
+ int bufnum,
+ const char *value)
+ { return(*(char **)0); }
+
+/* ./trace/trace_tries.c */
+
+#undef _nc_trace_tries
+void _nc_trace_tries(
+ TRIES *tree)
+ { /* void */ }
+
+/* ./base/tries.c */
+
+#undef _nc_expand_try
+char *_nc_expand_try(
+ TRIES *tree,
+ unsigned code,
+ int *count,
+ size_t len)
+ { return(*(char **)0); }
+
+#undef _nc_remove_key
+int _nc_remove_key(
+ TRIES **tree,
+ unsigned code)
+ { return(*(int *)0); }
+
+#undef _nc_remove_string
+int _nc_remove_string(
+ TRIES **tree,
+ const char *string)
+ { return(*(int *)0); }
+
+/* ./tinfo/trim_sgr0.c */
+
+#undef _nc_trim_sgr0
+char *_nc_trim_sgr0(
+ TERMTYPE *tp)
+ { return(*(char **)0); }
+
+/* ./unctrl.c */
+
+#undef unctrl_sp
+char *unctrl_sp(
+ SCREEN *sp,
+ chtype ch)
+ { return(*(char **)0); }
+
+#undef unctrl
+char *unctrl(
+ chtype ch)
+ { return(*(char **)0); }
+
+/* ./trace/visbuf.c */
+
+#undef _nc_visbuf2
+const char *_nc_visbuf2(
+ int bufnum,
+ const char *buf)
+ { return(*(const char **)0); }
+
+#undef _nc_visbuf
+const char *_nc_visbuf(
+ const char *buf)
+ { return(*(const char **)0); }
+
+#undef _nc_visbufn
+const char *_nc_visbufn(
+ const char *buf,
+ int len)
+ { return(*(const char **)0); }
+
+#undef _nc_viswbuf2
+const char *_nc_viswbuf2(
+ int bufnum,
+ const wchar_t *buf)
+ { return(*(const char **)0); }
+
+#undef _nc_viswbuf
+const char *_nc_viswbuf(
+ const wchar_t *buf)
+ { return(*(const char **)0); }
+
+#undef _nc_viswbufn
+const char *_nc_viswbufn(
+ const wchar_t *buf,
+ int len)
+ { return(*(const char **)0); }
+
+#undef _nc_viswibuf
+const char *_nc_viswibuf(
+ const wint_t *buf)
+ { return(*(const char **)0); }
+
+#undef _nc_viscbuf2
+const char *_nc_viscbuf2(
+ int bufnum,
+ const cchar_t *buf,
+ int len)
+ { return(*(const char **)0); }
+
+#undef _nc_viscbuf
+const char *_nc_viscbuf(
+ const cchar_t *buf,
+ int len)
+ { return(*(const char **)0); }
+
+/* ./base/define_key.c */
+
+#undef define_key_sp
+int define_key_sp(
+ SCREEN *sp,
+ const char *str,
+ int keycode)
+ { return(*(int *)0); }
+
+#undef define_key
+int define_key(
+ const char *str,
+ int keycode)
+ { return(*(int *)0); }
+
+/* ./tinfo/hashed_db.c */
+
+#undef _nc_hashed_db
+void _nc_hashed_db(void)
+ { /* void */ }
+
+/* ./base/key_defined.c */
+
+#undef key_defined_sp
+int key_defined_sp(
+ SCREEN *sp,
+ const char *str)
+ { return(*(int *)0); }
+
+#undef key_defined
+int key_defined(
+ const char *str)
+ { return(*(int *)0); }
+
+/* ./base/keybound.c */
+
+#undef keybound_sp
+char *keybound_sp(
+ SCREEN *sp,
+ int code,
+ int count)
+ { return(*(char **)0); }
+
+#undef keybound
+char *keybound(
+ int code,
+ int count)
+ { return(*(char **)0); }
+
+/* ./base/keyok.c */
+
+#undef keyok_sp
+int keyok_sp(
+ SCREEN *sp,
+ int c,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+#undef keyok
+int keyok(
+ int c,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+/* ./base/version.c */
+
+#undef curses_version
+const char *curses_version(void)
+ { return(*(const char **)0); }
diff --git a/ncurses/llib-ltinfow b/ncurses/llib-ltinfow
new file mode 100644
index 000000000000..f219698304bc
--- /dev/null
+++ b/ncurses/llib-ltinfow
@@ -0,0 +1,1559 @@
+/****************************************************************************
+ * 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 *
+ ****************************************************************************/
+/* LINTLIBRARY */
+
+/* ./tinfo/access.c */
+
+#include <curses.priv.h>
+#include <ctype.h>
+#include <tic.h>
+
+#undef _nc_rootname
+char *_nc_rootname(
+ char *path)
+ { return(*(char **)0); }
+
+#undef _nc_is_abs_path
+NCURSES_BOOL _nc_is_abs_path(
+ const char *path)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef _nc_pathlast
+unsigned _nc_pathlast(
+ const char *path)
+ { return(*(unsigned *)0); }
+
+#undef _nc_basename
+char *_nc_basename(
+ char *path)
+ { return(*(char **)0); }
+
+#undef _nc_access
+int _nc_access(
+ const char *path,
+ int mode)
+ { return(*(int *)0); }
+
+#undef _nc_is_dir_path
+NCURSES_BOOL _nc_is_dir_path(
+ const char *path)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef _nc_is_file_path
+NCURSES_BOOL _nc_is_file_path(
+ const char *path)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef _nc_env_access
+int _nc_env_access(void)
+ { return(*(int *)0); }
+
+/* ./tinfo/add_tries.c */
+
+#undef _nc_add_to_try
+int _nc_add_to_try(
+ TRIES **tree,
+ const char *str,
+ unsigned code)
+ { return(*(int *)0); }
+
+/* ./tinfo/alloc_ttype.c */
+
+#undef _nc_align_termtype
+void _nc_align_termtype(
+ TERMTYPE *to,
+ TERMTYPE *from)
+ { /* void */ }
+
+#undef _nc_copy_termtype
+void _nc_copy_termtype(
+ TERMTYPE *dst,
+ const TERMTYPE *src)
+ { /* void */ }
+
+/* ./codes.c */
+
+#undef boolcodes
+char *const boolcodes[] = {0};
+#undef numcodes
+char *const numcodes[] = {0};
+#undef strcodes
+char *const strcodes[] = {0};
+
+/* ./comp_captab.c */
+
+#include <hashsize.h>
+
+#undef _nc_get_table
+const struct name_table_entry *_nc_get_table(
+ NCURSES_BOOL termcap)
+ { return(*(const struct name_table_entry **)0); }
+
+#undef _nc_get_hash_table
+const HashValue *_nc_get_hash_table(
+ NCURSES_BOOL termcap)
+ { return(*(const HashValue **)0); }
+
+#undef _nc_get_alias_table
+const struct alias *_nc_get_alias_table(
+ NCURSES_BOOL termcap)
+ { return(*(const struct alias **)0); }
+
+#undef _nc_get_hash_info
+const HashData *_nc_get_hash_info(
+ NCURSES_BOOL termcap)
+ { return(*(const HashData **)0); }
+
+/* ./tinfo/comp_error.c */
+
+#undef _nc_suppress_warnings
+NCURSES_BOOL _nc_suppress_warnings;
+#undef _nc_curr_line
+int _nc_curr_line;
+#undef _nc_curr_col
+int _nc_curr_col;
+
+#undef _nc_get_source
+const char *_nc_get_source(void)
+ { return(*(const char **)0); }
+
+#undef _nc_set_source
+void _nc_set_source(
+ const char *const name)
+ { /* void */ }
+
+#undef _nc_set_type
+void _nc_set_type(
+ const char *const name)
+ { /* void */ }
+
+#undef _nc_get_type
+void _nc_get_type(
+ char *name)
+ { /* void */ }
+
+#undef _nc_warning
+void _nc_warning(
+ const char *const fmt,
+ ...)
+ { /* void */ }
+
+#undef _nc_err_abort
+void _nc_err_abort(
+ const char *const fmt,
+ ...)
+ { /* void */ }
+
+#undef _nc_syserr_abort
+void _nc_syserr_abort(
+ const char *const fmt,
+ ...)
+ { /* void */ }
+
+/* ./tinfo/comp_hash.c */
+
+#undef _nc_find_entry
+struct name_table_entry const *_nc_find_entry(
+ const char *string,
+ const HashValue *hash_table)
+ { return(*(struct name_table_entry const **)0); }
+
+#undef _nc_find_type_entry
+struct name_table_entry const *_nc_find_type_entry(
+ const char *string,
+ int type,
+ NCURSES_BOOL termcap)
+ { return(*(struct name_table_entry const **)0); }
+
+/* ./tinfo/db_iterator.c */
+
+#include <time.h>
+
+#undef _nc_tic_dir
+const char *_nc_tic_dir(
+ const char *path)
+ { return(*(const char **)0); }
+
+#undef _nc_keep_tic_dir
+void _nc_keep_tic_dir(
+ const char *path)
+ { /* void */ }
+
+#undef _nc_last_db
+void _nc_last_db(void)
+ { /* void */ }
+
+#undef _nc_next_db
+const char *_nc_next_db(
+ DBDIRS *state,
+ int *offset)
+ { return(*(const char **)0); }
+
+#undef _nc_first_db
+void _nc_first_db(
+ DBDIRS *state,
+ int *offset)
+ { /* void */ }
+
+/* ./tinfo/doalloc.c */
+
+#undef _nc_doalloc
+void *_nc_doalloc(
+ void *oldp,
+ size_t amount)
+ { return(*(void **)0); }
+
+/* ./tinfo/entries.c */
+
+#undef _nc_head
+ENTRY *_nc_head;
+#undef _nc_tail
+ENTRY *_nc_tail;
+
+#undef _nc_free_entry
+void _nc_free_entry(
+ ENTRY *headp,
+ TERMTYPE *tterm)
+ { /* void */ }
+
+#undef _nc_free_entries
+void _nc_free_entries(
+ ENTRY *headp)
+ { /* void */ }
+
+#undef _nc_delink_entry
+ENTRY *_nc_delink_entry(
+ ENTRY *headp,
+ TERMTYPE *tterm)
+ { return(*(ENTRY **)0); }
+
+#undef _nc_leaks_tinfo
+void _nc_leaks_tinfo(void)
+ { /* void */ }
+
+/* ./fallback.c */
+
+#undef _nc_fallback
+const TERMTYPE *_nc_fallback(
+ const char *name)
+ { return(*(const TERMTYPE **)0); }
+
+/* ./tinfo/free_ttype.c */
+
+#undef _nc_free_termtype
+void _nc_free_termtype(
+ TERMTYPE *ptr)
+ { /* void */ }
+
+#undef _nc_user_definable
+NCURSES_BOOL _nc_user_definable;
+
+#undef use_extended_names
+int use_extended_names(
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+/* ./tinfo/getenv_num.c */
+
+#undef _nc_getenv_num
+int _nc_getenv_num(
+ const char *name)
+ { return(*(int *)0); }
+
+#undef _nc_setenv_num
+void _nc_setenv_num(
+ const char *name,
+ int value)
+ { /* void */ }
+
+/* ./tinfo/home_terminfo.c */
+
+#undef _nc_home_terminfo
+char *_nc_home_terminfo(void)
+ { return(*(char **)0); }
+
+/* ./tinfo/init_keytry.c */
+
+#if 0
+
+#include <init_keytry.h>
+
+#undef _nc_tinfo_fkeys
+const struct tinfo_fkeys _nc_tinfo_fkeys[] = {0};
+
+#endif
+
+#undef _nc_init_keytry
+void _nc_init_keytry(
+ SCREEN *sp)
+ { /* void */ }
+
+/* ./tinfo/lib_acs.c */
+
+#undef acs_map
+chtype acs_map[128];
+
+#undef _nc_init_acs_sp
+void _nc_init_acs_sp(
+ SCREEN *sp)
+ { /* void */ }
+
+#undef _nc_init_acs
+void _nc_init_acs(void)
+ { /* void */ }
+
+/* ./tinfo/lib_baudrate.c */
+
+#include <termcap.h>
+
+struct speed {
+ int s;
+ int sp;
+};
+
+#undef _nc_baudrate
+int _nc_baudrate(
+ int OSpeed)
+ { return(*(int *)0); }
+
+#undef _nc_ospeed
+int _nc_ospeed(
+ int BaudRate)
+ { return(*(int *)0); }
+
+#undef baudrate_sp
+int baudrate_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef baudrate
+int baudrate(void)
+ { return(*(int *)0); }
+
+/* ./tinfo/lib_cur_term.c */
+
+#undef cur_term
+TERMINAL *cur_term;
+
+#undef set_curterm_sp
+TERMINAL *set_curterm_sp(
+ SCREEN *sp,
+ TERMINAL *termp)
+ { return(*(TERMINAL **)0); }
+
+#undef set_curterm
+TERMINAL *set_curterm(
+ TERMINAL *termp)
+ { return(*(TERMINAL **)0); }
+
+#undef del_curterm_sp
+int del_curterm_sp(
+ SCREEN *sp,
+ TERMINAL *termp)
+ { return(*(int *)0); }
+
+#undef del_curterm
+int del_curterm(
+ TERMINAL *termp)
+ { return(*(int *)0); }
+
+/* ./tinfo/lib_data.c */
+
+#undef stdscr
+WINDOW *stdscr;
+#undef curscr
+WINDOW *curscr;
+#undef newscr
+WINDOW *newscr;
+#undef _nc_screen_chain
+SCREEN *_nc_screen_chain;
+#undef SP
+SCREEN *SP;
+#undef _nc_globals
+NCURSES_GLOBALS _nc_globals;
+#undef _nc_prescreen
+NCURSES_PRESCREEN _nc_prescreen;
+
+#undef _nc_screen_of
+SCREEN *_nc_screen_of(
+ WINDOW *win)
+ { return(*(SCREEN **)0); }
+
+/* ./tinfo/lib_has_cap.c */
+
+#undef has_ic_sp
+NCURSES_BOOL has_ic_sp(
+ SCREEN *sp)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef has_ic
+NCURSES_BOOL has_ic(void)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef has_il_sp
+NCURSES_BOOL has_il_sp(
+ SCREEN *sp)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef has_il
+NCURSES_BOOL has_il(void)
+ { return(*(NCURSES_BOOL *)0); }
+
+/* ./tinfo/lib_kernel.c */
+
+#undef erasechar_sp
+char erasechar_sp(
+ SCREEN *sp)
+ { return(*(char *)0); }
+
+#undef erasechar
+char erasechar(void)
+ { return(*(char *)0); }
+
+#undef killchar_sp
+char killchar_sp(
+ SCREEN *sp)
+ { return(*(char *)0); }
+
+#undef killchar
+char killchar(void)
+ { return(*(char *)0); }
+
+#undef flushinp_sp
+int flushinp_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef flushinp
+int flushinp(void)
+ { return(*(int *)0); }
+
+/* ./lib_keyname.c */
+
+struct kn { short offset; int code; };
+
+#undef keyname_sp
+char *keyname_sp(
+ SCREEN *sp,
+ int c)
+ { return(*(char **)0); }
+
+#undef keyname
+char *keyname(
+ int c)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_longname.c */
+
+#undef longname
+char *longname(void)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_napms.c */
+
+#include <sys/time.h>
+
+#undef napms_sp
+int napms_sp(
+ SCREEN *sp,
+ int ms)
+ { return(*(int *)0); }
+
+#undef napms
+int napms(
+ int ms)
+ { return(*(int *)0); }
+
+/* ./tinfo/lib_options.c */
+
+#undef idlok
+int idlok(
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+#undef idcok
+void idcok(
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { /* void */ }
+
+#undef halfdelay_sp
+int halfdelay_sp(
+ SCREEN *sp,
+ int t)
+ { return(*(int *)0); }
+
+#undef halfdelay
+int halfdelay(
+ int t)
+ { return(*(int *)0); }
+
+#undef nodelay
+int nodelay(
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+#undef notimeout
+int notimeout(
+ WINDOW *win,
+ NCURSES_BOOL f)
+ { return(*(int *)0); }
+
+#undef wtimeout
+void wtimeout(
+ WINDOW *win,
+ int delay)
+ { /* void */ }
+
+#undef keypad
+int keypad(
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+#undef meta
+int meta(
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+#undef curs_set_sp
+int curs_set_sp(
+ SCREEN *sp,
+ int vis)
+ { return(*(int *)0); }
+
+#undef curs_set
+int curs_set(
+ int vis)
+ { return(*(int *)0); }
+
+#undef typeahead_sp
+int typeahead_sp(
+ SCREEN *sp,
+ int fd)
+ { return(*(int *)0); }
+
+#undef typeahead
+int typeahead(
+ int fd)
+ { return(*(int *)0); }
+
+#undef has_key_sp
+int has_key_sp(
+ SCREEN *sp,
+ int keycode)
+ { return(*(int *)0); }
+
+#undef has_key
+int has_key(
+ int keycode)
+ { return(*(int *)0); }
+
+#undef _nc_putp_flush_sp
+int _nc_putp_flush_sp(
+ SCREEN *sp,
+ const char *name,
+ const char *value)
+ { return(*(int *)0); }
+
+#undef _nc_keypad
+int _nc_keypad(
+ SCREEN *sp,
+ int flag)
+ { return(*(int *)0); }
+
+/* ./tinfo/lib_raw.c */
+
+#undef raw_sp
+int raw_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef raw
+int raw(void)
+ { return(*(int *)0); }
+
+#undef cbreak_sp
+int cbreak_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef cbreak
+int cbreak(void)
+ { return(*(int *)0); }
+
+#undef qiflush_sp
+void qiflush_sp(
+ SCREEN *sp)
+ { /* void */ }
+
+#undef qiflush
+void qiflush(void)
+ { /* void */ }
+
+#undef noraw_sp
+int noraw_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef noraw
+int noraw(void)
+ { return(*(int *)0); }
+
+#undef nocbreak_sp
+int nocbreak_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef nocbreak
+int nocbreak(void)
+ { return(*(int *)0); }
+
+#undef noqiflush_sp
+void noqiflush_sp(
+ SCREEN *sp)
+ { /* void */ }
+
+#undef noqiflush
+void noqiflush(void)
+ { /* void */ }
+
+#undef intrflush_sp
+int intrflush_sp(
+ SCREEN *sp,
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+#undef intrflush
+int intrflush(
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+/* ./tinfo/lib_setup.c */
+
+#include <locale.h>
+#include <sys/ioctl.h>
+#include <langinfo.h>
+
+#undef ttytype
+char ttytype[256];
+#undef LINES
+int LINES;
+#undef COLS
+int COLS;
+#undef TABSIZE
+int TABSIZE;
+
+#undef set_tabsize_sp
+int set_tabsize_sp(
+ SCREEN *sp,
+ int value)
+ { return(*(int *)0); }
+
+#undef set_tabsize
+int set_tabsize(
+ int value)
+ { return(*(int *)0); }
+
+#undef _nc_handle_sigwinch
+int _nc_handle_sigwinch(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef use_env_sp
+void use_env_sp(
+ SCREEN *sp,
+ NCURSES_BOOL f)
+ { /* void */ }
+
+#undef use_tioctl_sp
+void use_tioctl_sp(
+ SCREEN *sp,
+ NCURSES_BOOL f)
+ { /* void */ }
+
+#undef use_env
+void use_env(
+ NCURSES_BOOL f)
+ { /* void */ }
+
+#undef use_tioctl
+void use_tioctl(
+ NCURSES_BOOL f)
+ { /* void */ }
+
+#undef _nc_get_screensize
+void _nc_get_screensize(
+ SCREEN *sp,
+ int *linep,
+ int *colp)
+ { /* void */ }
+
+#undef _nc_update_screensize
+void _nc_update_screensize(
+ SCREEN *sp)
+ { /* void */ }
+
+#undef _nc_setup_tinfo
+int _nc_setup_tinfo(
+ const char *const tn,
+ TERMTYPE *const tp)
+ { return(*(int *)0); }
+
+#undef _nc_tinfo_cmdch
+void _nc_tinfo_cmdch(
+ TERMINAL *termp,
+ int proto)
+ { /* void */ }
+
+#undef _nc_get_locale
+char *_nc_get_locale(void)
+ { return(*(char **)0); }
+
+#undef _nc_unicode_locale
+int _nc_unicode_locale(void)
+ { return(*(int *)0); }
+
+#undef _nc_locale_breaks_acs
+int _nc_locale_breaks_acs(
+ TERMINAL *termp)
+ { return(*(int *)0); }
+
+#undef _nc_setupterm
+int _nc_setupterm(
+ char *tname,
+ int Filedes,
+ int *errret,
+ int reuse)
+ { return(*(int *)0); }
+
+#undef new_prescr
+SCREEN *new_prescr(void)
+ { return(*(SCREEN **)0); }
+
+#undef setupterm
+int setupterm(
+ char *tname,
+ int Filedes,
+ int *errret)
+ { return(*(int *)0); }
+
+/* ./tinfo/lib_termcap.c */
+
+#undef UP
+char *UP;
+#undef BC
+char *BC;
+
+#undef tgetent_sp
+int tgetent_sp(
+ SCREEN *sp,
+ char *bufp,
+ const char *name)
+ { return(*(int *)0); }
+
+#if 0
+
+#include <capdefaults.c>
+
+#endif
+
+#undef tgetent
+int tgetent(
+ char *bufp,
+ const char *name)
+ { return(*(int *)0); }
+
+#undef tgetflag_sp
+int tgetflag_sp(
+ SCREEN *sp,
+ char *id)
+ { return(*(int *)0); }
+
+#undef tgetflag
+int tgetflag(
+ char *id)
+ { return(*(int *)0); }
+
+#undef tgetnum_sp
+int tgetnum_sp(
+ SCREEN *sp,
+ char *id)
+ { return(*(int *)0); }
+
+#undef tgetnum
+int tgetnum(
+ char *id)
+ { return(*(int *)0); }
+
+#undef tgetstr_sp
+char *tgetstr_sp(
+ SCREEN *sp,
+ char *id,
+ char **area)
+ { return(*(char **)0); }
+
+#undef tgetstr
+char *tgetstr(
+ char *id,
+ char **area)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_termname.c */
+
+#undef termname_sp
+char *termname_sp(
+ SCREEN *sp)
+ { return(*(char **)0); }
+
+#undef termname
+char *termname(void)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_tgoto.c */
+
+#undef tgoto
+char *tgoto(
+ const char *string,
+ int x,
+ int y)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_ti.c */
+
+#undef tigetflag_sp
+int tigetflag_sp(
+ SCREEN *sp,
+ char *str)
+ { return(*(int *)0); }
+
+#undef tigetflag
+int tigetflag(
+ char *str)
+ { return(*(int *)0); }
+
+#undef tigetnum_sp
+int tigetnum_sp(
+ SCREEN *sp,
+ char *str)
+ { return(*(int *)0); }
+
+#undef tigetnum
+int tigetnum(
+ char *str)
+ { return(*(int *)0); }
+
+#undef tigetstr_sp
+char *tigetstr_sp(
+ SCREEN *sp,
+ char *str)
+ { return(*(char **)0); }
+
+#undef tigetstr
+char *tigetstr(
+ char *str)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_tparm.c */
+
+#undef _nc_tparm_err
+int _nc_tparm_err;
+
+#undef _nc_tparm_analyze
+int _nc_tparm_analyze(
+ const char *string,
+ char *p_is_s[9],
+ int *_nc_popcount)
+ { return(*(int *)0); }
+
+#undef tparm
+char *tparm(
+ char *string,
+ ...)
+ { return(*(char **)0); }
+
+#undef tiparm
+char *tiparm(
+ const char *string,
+ ...)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_tputs.c */
+
+#undef PC
+char PC;
+#undef ospeed
+short ospeed;
+#undef _nc_nulls_sent
+int _nc_nulls_sent;
+
+#undef _nc_set_no_padding
+void _nc_set_no_padding(
+ SCREEN *sp)
+ { /* void */ }
+
+#undef delay_output_sp
+int delay_output_sp(
+ SCREEN *sp,
+ int ms)
+ { return(*(int *)0); }
+
+#undef delay_output
+int delay_output(
+ int ms)
+ { return(*(int *)0); }
+
+#undef _nc_flush_sp
+void _nc_flush_sp(
+ SCREEN *sp)
+ { /* void */ }
+
+#undef _nc_flush
+void _nc_flush(void)
+ { /* void */ }
+
+#undef _nc_outch_sp
+int _nc_outch_sp(
+ SCREEN *sp,
+ int ch)
+ { return(*(int *)0); }
+
+#undef _nc_outch
+int _nc_outch(
+ int ch)
+ { return(*(int *)0); }
+
+#undef _nc_putchar_sp
+int _nc_putchar_sp(
+ SCREEN *sp,
+ int ch)
+ { return(*(int *)0); }
+
+#undef _nc_putchar
+int _nc_putchar(
+ int ch)
+ { return(*(int *)0); }
+
+#undef putp_sp
+int putp_sp(
+ SCREEN *sp,
+ const char *string)
+ { return(*(int *)0); }
+
+#undef putp
+int putp(
+ const char *string)
+ { return(*(int *)0); }
+
+#undef _nc_putp_sp
+int _nc_putp_sp(
+ SCREEN *sp,
+ const char *name,
+ const char *string)
+ { return(*(int *)0); }
+
+#undef _nc_putp
+int _nc_putp(
+ const char *name,
+ const char *string)
+ { return(*(int *)0); }
+
+#undef tputs_sp
+int tputs_sp(
+ SCREEN *sp,
+ const char *string,
+ int affcnt,
+ NCURSES_OUTC_sp outc)
+ { return(*(int *)0); }
+
+#undef _nc_outc_wrapper
+int _nc_outc_wrapper(
+ SCREEN *sp,
+ int c)
+ { return(*(int *)0); }
+
+#undef tputs
+int tputs(
+ const char *string,
+ int affcnt,
+ int (*outc)(
+ int p1))
+ { return(*(int *)0); }
+
+/* ./trace/lib_trace.c */
+
+#undef _nc_tracing
+unsigned _nc_tracing;
+#undef _nc_tputs_trace
+const char *_nc_tputs_trace = {0};
+#undef _nc_outchars
+long _nc_outchars;
+
+#undef trace
+void trace(
+ const unsigned int tracelevel)
+ { /* void */ }
+
+#undef _tracef
+void _tracef(
+ const char *fmt,
+ ...)
+ { /* void */ }
+
+#undef _nc_retrace_bool
+NCURSES_BOOL _nc_retrace_bool(
+ int code)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef _nc_retrace_char
+char _nc_retrace_char(
+ int code)
+ { return(*(char *)0); }
+
+#undef _nc_retrace_int
+int _nc_retrace_int(
+ int code)
+ { return(*(int *)0); }
+
+#undef _nc_retrace_unsigned
+unsigned _nc_retrace_unsigned(
+ unsigned code)
+ { return(*(unsigned *)0); }
+
+#undef _nc_retrace_ptr
+char *_nc_retrace_ptr(
+ char *code)
+ { return(*(char **)0); }
+
+#undef _nc_retrace_cptr
+const char *_nc_retrace_cptr(
+ const char *code)
+ { return(*(const char **)0); }
+
+#undef _nc_retrace_cvoid_ptr
+void *_nc_retrace_cvoid_ptr(
+ void *code)
+ { return(*(void **)0); }
+
+#undef _nc_retrace_void_ptr
+void *_nc_retrace_void_ptr(
+ void *code)
+ { return(*(void **)0); }
+
+#undef _nc_retrace_sp
+SCREEN *_nc_retrace_sp(
+ SCREEN *code)
+ { return(*(SCREEN **)0); }
+
+#undef _nc_retrace_win
+WINDOW *_nc_retrace_win(
+ WINDOW *code)
+ { return(*(WINDOW **)0); }
+
+/* ./trace/lib_traceatr.c */
+
+#undef _traceattr2
+char *_traceattr2(
+ int bufnum,
+ chtype newmode)
+ { return(*(char **)0); }
+
+#undef _traceattr
+char *_traceattr(
+ attr_t newmode)
+ { return(*(char **)0); }
+
+#undef _nc_retrace_int_attr_t
+int _nc_retrace_int_attr_t(
+ attr_t code)
+ { return(*(int *)0); }
+
+#undef _nc_retrace_attr_t
+attr_t _nc_retrace_attr_t(
+ attr_t code)
+ { return(*(attr_t *)0); }
+
+#undef _nc_altcharset_name
+const char *_nc_altcharset_name(
+ attr_t attr,
+ chtype ch)
+ { return(*(const char **)0); }
+
+#undef _tracechtype2
+char *_tracechtype2(
+ int bufnum,
+ chtype ch)
+ { return(*(char **)0); }
+
+#undef _tracechtype
+char *_tracechtype(
+ chtype ch)
+ { return(*(char **)0); }
+
+#undef _nc_retrace_chtype
+chtype _nc_retrace_chtype(
+ chtype code)
+ { return(*(chtype *)0); }
+
+#undef _tracecchar_t2
+char *_tracecchar_t2(
+ int bufnum,
+ const cchar_t *ch)
+ { return(*(char **)0); }
+
+#undef _tracecchar_t
+char *_tracecchar_t(
+ const cchar_t *ch)
+ { return(*(char **)0); }
+
+/* ./trace/lib_tracebits.c */
+
+typedef struct {
+ unsigned int val;
+ const char *name;
+} BITNAMES;
+
+#undef _nc_trace_ttymode
+char *_nc_trace_ttymode(
+ struct termios *tty)
+ { return(*(char **)0); }
+
+#undef _nc_tracebits
+char *_nc_tracebits(void)
+ { return(*(char **)0); }
+
+/* ./trace/lib_tracechr.c */
+
+#undef _nc_tracechar
+char *_nc_tracechar(
+ SCREEN *sp,
+ int ch)
+ { return(*(char **)0); }
+
+#undef _tracechar
+char *_tracechar(
+ int ch)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_ttyflags.c */
+
+#undef _nc_get_tty_mode_sp
+int _nc_get_tty_mode_sp(
+ SCREEN *sp,
+ struct termios *buf)
+ { return(*(int *)0); }
+
+#undef _nc_get_tty_mode
+int _nc_get_tty_mode(
+ struct termios *buf)
+ { return(*(int *)0); }
+
+#undef _nc_set_tty_mode_sp
+int _nc_set_tty_mode_sp(
+ SCREEN *sp,
+ struct termios *buf)
+ { return(*(int *)0); }
+
+#undef _nc_set_tty_mode
+int _nc_set_tty_mode(
+ struct termios *buf)
+ { return(*(int *)0); }
+
+#undef def_shell_mode_sp
+int def_shell_mode_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef def_shell_mode
+int def_shell_mode(void)
+ { return(*(int *)0); }
+
+#undef def_prog_mode_sp
+int def_prog_mode_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef def_prog_mode
+int def_prog_mode(void)
+ { return(*(int *)0); }
+
+#undef reset_prog_mode_sp
+int reset_prog_mode_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef reset_prog_mode
+int reset_prog_mode(void)
+ { return(*(int *)0); }
+
+#undef reset_shell_mode_sp
+int reset_shell_mode_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef reset_shell_mode
+int reset_shell_mode(void)
+ { return(*(int *)0); }
+
+#undef savetty_sp
+int savetty_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef savetty
+int savetty(void)
+ { return(*(int *)0); }
+
+#undef resetty_sp
+int resetty_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef resetty
+int resetty(void)
+ { return(*(int *)0); }
+
+/* ./tty/lib_twait.c */
+
+#undef _nc_timed_wait
+int _nc_timed_wait(
+ SCREEN *sp,
+ int mode,
+ int milliseconds,
+ int *timeleft)
+ { return(*(int *)0); }
+
+/* ./tinfo/name_match.c */
+
+#undef _nc_first_name
+char *_nc_first_name(
+ const char *const sp)
+ { return(*(char **)0); }
+
+#undef _nc_name_match
+int _nc_name_match(
+ const char *const namelst,
+ const char *const name,
+ const char *const delim)
+ { return(*(int *)0); }
+
+/* ./names.c */
+
+#undef boolnames
+char *const boolnames[] = {0};
+#undef boolfnames
+char *const boolfnames[] = {0};
+#undef numnames
+char *const numnames[] = {0};
+#undef numfnames
+char *const numfnames[] = {0};
+#undef strnames
+char *const strnames[] = {0};
+#undef strfnames
+char *const strfnames[] = {0};
+
+/* ./tinfo/obsolete.c */
+
+#undef _nc_set_buffer_sp
+void _nc_set_buffer_sp(
+ SCREEN *sp,
+ FILE *ofp,
+ int buffered)
+ { /* void */ }
+
+#undef _nc_set_buffer
+void _nc_set_buffer(
+ FILE *ofp,
+ int buffered)
+ { /* void */ }
+
+/* ./tinfo/read_entry.c */
+
+#include <hashed_db.h>
+
+#undef _nc_init_termtype
+void _nc_init_termtype(
+ TERMTYPE *const tp)
+ { /* void */ }
+
+#undef _nc_read_termtype
+int _nc_read_termtype(
+ TERMTYPE *ptr,
+ char *buffer,
+ int limit)
+ { return(*(int *)0); }
+
+#undef _nc_read_file_entry
+int _nc_read_file_entry(
+ const char *const filename,
+ TERMTYPE *ptr)
+ { return(*(int *)0); }
+
+#undef _nc_read_entry
+int _nc_read_entry(
+ const char *const name,
+ char *const filename,
+ TERMTYPE *const tp)
+ { return(*(int *)0); }
+
+/* ./tinfo/read_termcap.c */
+
+#include <sys/types.h>
+
+#undef _nc_read_termcap
+void _nc_read_termcap(void)
+ { /* void */ }
+
+/* ./tinfo/strings.c */
+
+#undef _nc_str_init
+string_desc *_nc_str_init(
+ string_desc *dst,
+ char *src,
+ size_t len)
+ { return(*(string_desc **)0); }
+
+#undef _nc_str_null
+string_desc *_nc_str_null(
+ string_desc *dst,
+ size_t len)
+ { return(*(string_desc **)0); }
+
+#undef _nc_str_copy
+string_desc *_nc_str_copy(
+ string_desc *dst,
+ string_desc *src)
+ { return(*(string_desc **)0); }
+
+#undef _nc_safe_strcat
+NCURSES_BOOL _nc_safe_strcat(
+ string_desc *dst,
+ const char *src)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef _nc_safe_strcpy
+NCURSES_BOOL _nc_safe_strcpy(
+ string_desc *dst,
+ const char *src)
+ { return(*(NCURSES_BOOL *)0); }
+
+/* ./trace/trace_buf.c */
+
+#undef _nc_trace_buf
+char *_nc_trace_buf(
+ int bufnum,
+ size_t want)
+ { return(*(char **)0); }
+
+#undef _nc_trace_bufcat
+char *_nc_trace_bufcat(
+ int bufnum,
+ const char *value)
+ { return(*(char **)0); }
+
+/* ./trace/trace_tries.c */
+
+#undef _nc_trace_tries
+void _nc_trace_tries(
+ TRIES *tree)
+ { /* void */ }
+
+/* ./base/tries.c */
+
+#undef _nc_expand_try
+char *_nc_expand_try(
+ TRIES *tree,
+ unsigned code,
+ int *count,
+ size_t len)
+ { return(*(char **)0); }
+
+#undef _nc_remove_key
+int _nc_remove_key(
+ TRIES **tree,
+ unsigned code)
+ { return(*(int *)0); }
+
+#undef _nc_remove_string
+int _nc_remove_string(
+ TRIES **tree,
+ const char *string)
+ { return(*(int *)0); }
+
+/* ./tinfo/trim_sgr0.c */
+
+#undef _nc_trim_sgr0
+char *_nc_trim_sgr0(
+ TERMTYPE *tp)
+ { return(*(char **)0); }
+
+/* ./unctrl.c */
+
+#undef unctrl_sp
+char *unctrl_sp(
+ SCREEN *sp,
+ chtype ch)
+ { return(*(char **)0); }
+
+#undef unctrl
+char *unctrl(
+ chtype ch)
+ { return(*(char **)0); }
+
+/* ./trace/visbuf.c */
+
+#undef _nc_visbuf2
+const char *_nc_visbuf2(
+ int bufnum,
+ const char *buf)
+ { return(*(const char **)0); }
+
+#undef _nc_visbuf
+const char *_nc_visbuf(
+ const char *buf)
+ { return(*(const char **)0); }
+
+#undef _nc_visbufn
+const char *_nc_visbufn(
+ const char *buf,
+ int len)
+ { return(*(const char **)0); }
+
+#undef _nc_viswbuf2
+const char *_nc_viswbuf2(
+ int bufnum,
+ const wchar_t *buf)
+ { return(*(const char **)0); }
+
+#undef _nc_viswbuf
+const char *_nc_viswbuf(
+ const wchar_t *buf)
+ { return(*(const char **)0); }
+
+#undef _nc_viswbufn
+const char *_nc_viswbufn(
+ const wchar_t *buf,
+ int len)
+ { return(*(const char **)0); }
+
+#undef _nc_viswibuf
+const char *_nc_viswibuf(
+ const wint_t *buf)
+ { return(*(const char **)0); }
+
+#undef _nc_viscbuf2
+const char *_nc_viscbuf2(
+ int bufnum,
+ const cchar_t *buf,
+ int len)
+ { return(*(const char **)0); }
+
+#undef _nc_viscbuf
+const char *_nc_viscbuf(
+ const cchar_t *buf,
+ int len)
+ { return(*(const char **)0); }
+
+/* ./base/define_key.c */
+
+#undef define_key_sp
+int define_key_sp(
+ SCREEN *sp,
+ const char *str,
+ int keycode)
+ { return(*(int *)0); }
+
+#undef define_key
+int define_key(
+ const char *str,
+ int keycode)
+ { return(*(int *)0); }
+
+/* ./tinfo/hashed_db.c */
+
+#undef _nc_hashed_db
+void _nc_hashed_db(void)
+ { /* void */ }
+
+/* ./base/key_defined.c */
+
+#undef key_defined_sp
+int key_defined_sp(
+ SCREEN *sp,
+ const char *str)
+ { return(*(int *)0); }
+
+#undef key_defined
+int key_defined(
+ const char *str)
+ { return(*(int *)0); }
+
+/* ./base/keybound.c */
+
+#undef keybound_sp
+char *keybound_sp(
+ SCREEN *sp,
+ int code,
+ int count)
+ { return(*(char **)0); }
+
+#undef keybound
+char *keybound(
+ int code,
+ int count)
+ { return(*(char **)0); }
+
+/* ./base/keyok.c */
+
+#undef keyok_sp
+int keyok_sp(
+ SCREEN *sp,
+ int c,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+#undef keyok
+int keyok(
+ int c,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+/* ./base/version.c */
+
+#undef curses_version
+const char *curses_version(void)
+ { return(*(const char **)0); }
diff --git a/ncurses/modules b/ncurses/modules
index caf1799fa87d..b3b973210fc4 100644
--- a/ncurses/modules
+++ b/ncurses/modules
@@ -1,6 +1,6 @@
-# $Id: modules,v 1.117 2010/08/07 18:41:02 tom Exp $
+# $Id: modules,v 1.120 2013/01/26 22:17:55 tom Exp $
##############################################################################
-# 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 "Software"), #
@@ -115,7 +115,6 @@ tty_update lib $(serial) $(HEADER_DEPS)
varargs lib $(trace) $(HEADER_DEPS)
# Modules for porting
-memmove lib $(base) $(HEADER_DEPS)
vsscanf lib $(base) $(HEADER_DEPS)
# actually an extension, but with its own configure option (--disable-leaks)
@@ -199,9 +198,9 @@ lib_ttyflags lib $(tinfo) $(HEADER_DEPS)
lib_twait lib $(serial) $(HEADER_DEPS)
name_match lib $(tinfo) $(HEADER_DEPS) $(INCDIR)/tic.h
names lib . $(HEADER_DEPS)
+obsolete lib $(tinfo) $(HEADER_DEPS)
read_entry lib $(tinfo) $(HEADER_DEPS) $(INCDIR)/tic.h $(INCDIR)/hashed_db.h
read_termcap lib $(tinfo) $(HEADER_DEPS) $(INCDIR)/tic.h
-setbuf lib $(tinfo) $(HEADER_DEPS)
strings lib $(tinfo) $(HEADER_DEPS)
trace_buf lib $(trace) $(HEADER_DEPS)
trace_tries lib $(trace) $(HEADER_DEPS)
@@ -236,6 +235,7 @@ lib_driver lib $(base) $(HEADER_DEPS)
@ port_win32con
gettimeofday lib $(win32con) $(HEADER_DEPS)
wcwidth lib $(win32con) $(HEADER_DEPS)
+widechars lib $(wide) $(HEADER_DEPS)
win_driver lib $(win32con) $(HEADER_DEPS)
@ port_tinfo
diff --git a/ncurses/tinfo/MKcaptab.sh b/ncurses/tinfo/MKcaptab.sh
index 4d1b53a5bd9a..20c94a639b9a 100644
--- a/ncurses/tinfo/MKcaptab.sh
+++ b/ncurses/tinfo/MKcaptab.sh
@@ -1,6 +1,6 @@
#!/bin/sh
##############################################################################
-# Copyright (c) 2007-2009,2010 Free Software Foundation, Inc. #
+# Copyright (c) 2007-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"), #
@@ -26,7 +26,7 @@
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: MKcaptab.sh,v 1.13 2010/12/25 23:43:58 tom Exp $
+# $Id: MKcaptab.sh,v 1.14 2011/10/22 16:34:50 tom Exp $
AWK=${1-awk}
OPT1=${2-0}
OPT2=${3-tinfo/MKcaptab.awk}
@@ -99,12 +99,12 @@ static const struct alias *
_nc_build_alias(struct alias **actual,
const alias_table_data *source,
const char *strings,
- unsigned tablesize)
+ size_t tablesize)
{
if (*actual == 0) {
*actual = typeCalloc(struct alias, tablesize + 1);
if (*actual != 0) {
- unsigned n;
+ size_t n;
for (n = 0; n < tablesize; ++n) {
add_alias(from);
add_alias(to);
@@ -178,7 +178,7 @@ tcap_hash(const char *string)
static int
compare_tcap_names(const char *a, const char *b)
{
- return !strncmp(a, b, TCAP_LEN);
+ return !strncmp(a, b, (size_t) TCAP_LEN);
}
static int
diff --git a/ncurses/tinfo/access.c b/ncurses/tinfo/access.c
index 87c4f462fd4f..d9876875382d 100644
--- a/ncurses/tinfo/access.c
+++ b/ncurses/tinfo/access.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2009,2010 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,11 +33,18 @@
#include <curses.priv.h>
#include <ctype.h>
-#include <sys/stat.h>
#include <tic.h>
-MODULE_ID("$Id: access.c,v 1.16 2010/01/23 17:57:43 tom Exp $")
+MODULE_ID("$Id: access.c,v 1.23 2012/09/01 19:21:29 tom Exp $")
+
+#ifdef __TANDEM
+#define ROOT_UID 65535
+#endif
+
+#ifndef ROOT_UID
+#define ROOT_UID 0
+#endif
#define LOWERCASE(c) ((isalpha(UChar(c)) && isupper(UChar(c))) ? tolower(UChar(c)) : (c))
@@ -53,7 +60,7 @@ _nc_rootname(char *path)
result = temp;
#if !MIXEDCASE_FILENAMES
for (s = result; *s != '\0'; ++s) {
- *s = LOWERCASE(*s);
+ *s = (char) LOWERCASE(*s);
}
#endif
#if defined(PROG_EXT)
@@ -108,24 +115,33 @@ _nc_basename(char *path)
NCURSES_EXPORT(int)
_nc_access(const char *path, int mode)
{
- if (access(path, mode) < 0) {
+ int result;
+
+ if (path == 0) {
+ result = -1;
+ } else if (access(path, mode) < 0) {
if ((mode & W_OK) != 0
&& errno == ENOENT
&& strlen(path) < PATH_MAX) {
char head[PATH_MAX];
- char *leaf = _nc_basename(strcpy(head, path));
+ char *leaf;
+ _nc_STRCPY(head, path, sizeof(head));
+ leaf = _nc_basename(head);
if (leaf == 0)
leaf = head;
*leaf = '\0';
if (head == leaf)
- (void) strcpy(head, ".");
+ _nc_STRCPY(head, ".", sizeof(head));
- return access(head, R_OK | W_OK | X_OK);
+ result = access(head, R_OK | W_OK | X_OK);
+ } else {
+ result = -1;
}
- return -1;
+ } else {
+ result = 0;
}
- return 0;
+ return result;
}
NCURSES_EXPORT(bool)
@@ -135,7 +151,7 @@ _nc_is_dir_path(const char *path)
struct stat sb;
if (stat(path, &sb) == 0
- && (sb.st_mode & S_IFMT) == S_IFDIR) {
+ && S_ISDIR(sb.st_mode)) {
result = TRUE;
}
return result;
@@ -148,7 +164,7 @@ _nc_is_file_path(const char *path)
struct stat sb;
if (stat(path, &sb) == 0
- && (sb.st_mode & S_IFMT) == S_IFREG) {
+ && S_ISREG(sb.st_mode)) {
result = TRUE;
}
return result;
@@ -170,6 +186,7 @@ _nc_env_access(void)
|| getgid() != getegid())
return FALSE;
#endif
- return getuid() != 0 && geteuid() != 0; /* ...finally, disallow root */
+ /* ...finally, disallow root */
+ return (getuid() != ROOT_UID) && (geteuid() != ROOT_UID);
}
#endif
diff --git a/ncurses/tinfo/alloc_entry.c b/ncurses/tinfo/alloc_entry.c
index 506fb386d208..14ea39118837 100644
--- a/ncurses/tinfo/alloc_entry.c
+++ b/ncurses/tinfo/alloc_entry.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2008,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 *
@@ -47,7 +47,7 @@
#include <tic.h>
-MODULE_ID("$Id: alloc_entry.c,v 1.51 2010/12/25 23:06:01 tom Exp $")
+MODULE_ID("$Id: alloc_entry.c,v 1.58 2013/08/17 19:20:38 tom Exp $")
#define ABSENT_OFFSET -1
#define CANCELLED_OFFSET -2
@@ -61,8 +61,6 @@ NCURSES_EXPORT(void)
_nc_init_entry(TERMTYPE *const tp)
/* initialize a terminal type data block */
{
- unsigned i;
-
#if NO_LEAKS
if (tp == 0) {
if (stringbuf != 0) {
@@ -73,33 +71,11 @@ _nc_init_entry(TERMTYPE *const tp)
#endif
if (stringbuf == 0)
- stringbuf = (char *) malloc(MAX_STRTAB);
-
-#if NCURSES_XNAMES
- tp->num_Booleans = BOOLCOUNT;
- tp->num_Numbers = NUMCOUNT;
- tp->num_Strings = STRCOUNT;
- tp->ext_Booleans = 0;
- tp->ext_Numbers = 0;
- tp->ext_Strings = 0;
-#endif
- if (tp->Booleans == 0)
- tp->Booleans = typeMalloc(NCURSES_SBOOL, BOOLCOUNT);
- if (tp->Numbers == 0)
- tp->Numbers = typeMalloc(short, NUMCOUNT);
- if (tp->Strings == 0)
- tp->Strings = typeMalloc(char *, STRCOUNT);
-
- for_each_boolean(i, tp)
- tp->Booleans[i] = FALSE;
-
- for_each_number(i, tp)
- tp->Numbers[i] = ABSENT_NUMERIC;
-
- for_each_string(i, tp)
- tp->Strings[i] = ABSENT_STRING;
+ TYPE_MALLOC(char, (size_t) MAX_STRTAB, stringbuf);
next_free = 0;
+
+ _nc_init_termtype(tp);
}
NCURSES_EXPORT(ENTRY *)
@@ -131,13 +107,13 @@ _nc_save_str(const char *const string)
result = (stringbuf + next_free - 1);
}
} else if (next_free + len < MAX_STRTAB) {
- strcpy(&stringbuf[next_free], string);
+ _nc_STRCPY(&stringbuf[next_free], string, MAX_STRTAB);
DEBUG(7, ("Saved string %s", _nc_visbuf(string)));
DEBUG(7, ("at location %d", (int) next_free));
next_free += len;
result = (stringbuf + old_next_free);
} else {
- _nc_warning("Too much data, some is lost");
+ _nc_warning("Too much data, some is lost: %s", string);
}
return result;
}
@@ -194,8 +170,7 @@ _nc_wrap_entry(ENTRY * const ep, bool copy_strings)
useoffsets[i] = (int) (ep->uses[i].name - stringbuf);
}
- if ((tp->str_table = typeMalloc(char, next_free)) == (char *) 0)
- _nc_err_abort(MSG_NO_MEMORY);
+ TYPE_MALLOC(char, next_free, tp->str_table);
(void) memcpy(tp->str_table, stringbuf, next_free);
tp->term_names = tp->str_table + n;
@@ -216,16 +191,18 @@ _nc_wrap_entry(ENTRY * const ep, bool copy_strings)
if ((n = (unsigned) NUM_EXT_NAMES(tp)) != 0) {
if (n < SIZEOF(offsets)) {
size_t length = 0;
+ size_t offset;
for (i = 0; i < n; i++) {
length += strlen(tp->ext_Names[i]) + 1;
offsets[i] = (int) (tp->ext_Names[i] - stringbuf);
}
- if ((tp->ext_str_table = typeMalloc(char, length)) == 0)
- _nc_err_abort(MSG_NO_MEMORY);
- for (i = 0, length = 0; i < n; i++) {
- tp->ext_Names[i] = tp->ext_str_table + length;
- strcpy(tp->ext_Names[i], stringbuf + offsets[i]);
- length += strlen(tp->ext_Names[i]) + 1;
+ TYPE_MALLOC(char, length, tp->ext_str_table);
+ for (i = 0, offset = 0; i < n; i++) {
+ tp->ext_Names[i] = tp->ext_str_table + offset;
+ _nc_STRCPY(tp->ext_Names[i],
+ stringbuf + offsets[i],
+ length - offset);
+ offset += strlen(tp->ext_Names[i]) + 1;
}
}
}
diff --git a/ncurses/tinfo/alloc_ttype.c b/ncurses/tinfo/alloc_ttype.c
index b02cb9c6010e..35c92dd8c2b9 100644
--- a/ncurses/tinfo/alloc_ttype.c
+++ b/ncurses/tinfo/alloc_ttype.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1999-2009,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1999-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 *
@@ -42,7 +42,7 @@
#include <tic.h>
-MODULE_ID("$Id: alloc_ttype.c,v 1.22 2010/12/19 00:24:09 tom Exp $")
+MODULE_ID("$Id: alloc_ttype.c,v 1.27 2013/06/08 16:54:50 tom Exp $")
#if NCURSES_XNAMES
/*
@@ -104,7 +104,7 @@ realign_data(TERMTYPE *to, char **ext_Names,
if (to->ext_Booleans != ext_Booleans) {
EXTEND_NUM(num_Booleans, ext_Booleans);
- to->Booleans = typeRealloc(NCURSES_SBOOL, to->num_Booleans, to->Booleans);
+ TYPE_REALLOC(NCURSES_SBOOL, to->num_Booleans, to->Booleans);
for (n = to->ext_Booleans - 1,
m = ext_Booleans - 1,
base = to->num_Booleans - (m + 1); m >= 0; m--) {
@@ -116,9 +116,10 @@ realign_data(TERMTYPE *to, char **ext_Names,
}
to->ext_Booleans = UShort(ext_Booleans);
}
+
if (to->ext_Numbers != ext_Numbers) {
EXTEND_NUM(num_Numbers, ext_Numbers);
- to->Numbers = typeRealloc(short, to->num_Numbers, to->Numbers);
+ TYPE_REALLOC(short, to->num_Numbers, to->Numbers);
for (n = to->ext_Numbers - 1,
m = ext_Numbers - 1,
base = to->num_Numbers - (m + 1); m >= 0; m--) {
@@ -132,7 +133,7 @@ realign_data(TERMTYPE *to, char **ext_Names,
}
if (to->ext_Strings != ext_Strings) {
EXTEND_NUM(num_Strings, ext_Strings);
- to->Strings = typeRealloc(char *, to->num_Strings, to->Strings);
+ TYPE_REALLOC(char *, to->num_Strings, to->Strings);
for (n = to->ext_Strings - 1,
m = ext_Strings - 1,
base = to->num_Strings - (m + 1); m >= 0; m--) {
@@ -301,7 +302,7 @@ _nc_ins_ext_name(TERMTYPE *tp, char *name, int token_type)
}
}
- tp->ext_Names = typeRealloc(char *, total, tp->ext_Names);
+ TYPE_REALLOC(char *, total, tp->ext_Names);
for (k = total - 1; k > j; k--)
tp->ext_Names[k] = tp->ext_Names[k - 1];
tp->ext_Names[j] = name;
@@ -311,21 +312,21 @@ _nc_ins_ext_name(TERMTYPE *tp, char *name, int token_type)
case BOOLEAN:
tp->ext_Booleans++;
tp->num_Booleans++;
- tp->Booleans = typeRealloc(NCURSES_SBOOL, tp->num_Booleans, tp->Booleans);
+ TYPE_REALLOC(NCURSES_SBOOL, tp->num_Booleans, tp->Booleans);
for (k = (unsigned) (tp->num_Booleans - 1); k > j; k--)
tp->Booleans[k] = tp->Booleans[k - 1];
break;
case NUMBER:
tp->ext_Numbers++;
tp->num_Numbers++;
- tp->Numbers = typeRealloc(short, tp->num_Numbers, tp->Numbers);
+ TYPE_REALLOC(short, tp->num_Numbers, tp->Numbers);
for (k = (unsigned) (tp->num_Numbers - 1); k > j; k--)
tp->Numbers[k] = tp->Numbers[k - 1];
break;
case STRING:
tp->ext_Strings++;
tp->num_Strings++;
- tp->Strings = typeRealloc(char *, tp->num_Strings, tp->Strings);
+ TYPE_REALLOC(char *, tp->num_Strings, tp->Strings);
for (k = (unsigned) (tp->num_Strings - 1); k > j; k--)
tp->Strings[k] = tp->Strings[k - 1];
break;
@@ -417,7 +418,7 @@ _nc_align_termtype(TERMTYPE *to, TERMTYPE *from)
* into it, updating to's counts for booleans, etc. Fortunately we do
* this only for the terminfo compiler (tic) and comparer (infocmp).
*/
- ext_Names = typeMalloc(char *, (size_t)(na + nb));
+ TYPE_MALLOC(char *, (size_t)(na + nb), ext_Names);
if (to->ext_Strings && (from->ext_Booleans + from->ext_Numbers))
adjust_cancels(to, from);
@@ -461,7 +462,7 @@ _nc_align_termtype(TERMTYPE *to, TERMTYPE *from)
if (nb != (ext_Booleans + ext_Numbers + ext_Strings)) {
nb = (ext_Booleans + ext_Numbers + ext_Strings);
realign_data(from, ext_Names, ext_Booleans, ext_Numbers, ext_Strings);
- from->ext_Names = typeRealloc(char *, (size_t) nb, from->ext_Names);
+ TYPE_REALLOC(char *, (size_t) nb, from->ext_Names);
memcpy(from->ext_Names, ext_Names, sizeof(char *) * (size_t) nb);
DEBUG(2, ("realigned %d extended names for '%s' (from)",
NUM_EXT_NAMES(from), from->term_names));
@@ -473,22 +474,27 @@ _nc_align_termtype(TERMTYPE *to, TERMTYPE *from)
#endif
NCURSES_EXPORT(void)
-_nc_copy_termtype(TERMTYPE *dst, TERMTYPE *src)
+_nc_copy_termtype(TERMTYPE *dst, const TERMTYPE *src)
{
+#if NCURSES_XNAMES
unsigned i;
+#endif
*dst = *src; /* ...to copy the sizes and string-tables */
- dst->Booleans = typeMalloc(NCURSES_SBOOL, NUM_BOOLEANS(dst));
- dst->Numbers = typeMalloc(short, NUM_NUMBERS(dst));
- dst->Strings = typeMalloc(char *, NUM_STRINGS(dst));
-
- /* FIXME: use memcpy for these and similar loops */
- for_each_boolean(i, dst)
- dst->Booleans[i] = src->Booleans[i];
- for_each_number(i, dst)
- dst->Numbers[i] = src->Numbers[i];
- for_each_string(i, dst)
- dst->Strings[i] = src->Strings[i];
+
+ TYPE_MALLOC(NCURSES_SBOOL, NUM_BOOLEANS(dst), dst->Booleans);
+ TYPE_MALLOC(short, NUM_NUMBERS(dst), dst->Numbers);
+ TYPE_MALLOC(char *, NUM_STRINGS(dst), dst->Strings);
+
+ memcpy(dst->Booleans,
+ src->Booleans,
+ NUM_BOOLEANS(dst) * sizeof(dst->Booleans[0]));
+ memcpy(dst->Numbers,
+ src->Numbers,
+ NUM_NUMBERS(dst) * sizeof(dst->Numbers[0]));
+ memcpy(dst->Strings,
+ src->Strings,
+ NUM_STRINGS(dst) * sizeof(dst->Strings[0]));
/* FIXME: we probably should also copy str_table and ext_str_table,
* but tic and infocmp are not written to exploit that (yet).
@@ -496,11 +502,10 @@ _nc_copy_termtype(TERMTYPE *dst, TERMTYPE *src)
#if NCURSES_XNAMES
if ((i = NUM_EXT_NAMES(src)) != 0) {
- dst->ext_Names = typeMalloc(char *, i);
+ TYPE_MALLOC(char *, i, dst->ext_Names);
memcpy(dst->ext_Names, src->ext_Names, i * sizeof(char *));
} else {
dst->ext_Names = 0;
}
#endif
-
}
diff --git a/ncurses/tinfo/captoinfo.c b/ncurses/tinfo/captoinfo.c
index a0da44dea989..e02e622b0de3 100644
--- a/ncurses/tinfo/captoinfo.c
+++ b/ncurses/tinfo/captoinfo.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2009,2010 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 *
@@ -93,7 +93,7 @@
#include <ctype.h>
#include <tic.h>
-MODULE_ID("$Id: captoinfo.c,v 1.58 2010/12/04 20:08:19 tom Exp $")
+MODULE_ID("$Id: captoinfo.c,v 1.77 2012/12/30 00:50:40 tom Exp $")
#define MAX_PUSHED 16 /* max # args we can push onto the stack */
@@ -114,9 +114,7 @@ init_string(void)
/* initialize 'my_string', 'my_length' */
{
if (my_string == 0)
- my_string = typeMalloc(char, my_length = 256);
- if (my_string == 0)
- _nc_err_abort(MSG_NO_MEMORY);
+ TYPE_MALLOC(char, my_length = 256, my_string);
*my_string = '\0';
return my_string;
@@ -133,7 +131,7 @@ save_string(char *d, const char *const s)
_nc_err_abort(MSG_NO_MEMORY);
d = my_string + have;
}
- (void) strcpy(d, s);
+ _nc_STRCPY(d, s, my_length - have);
return d + strlen(d);
}
@@ -240,6 +238,12 @@ getparm(int parm, int n)
else if (parm == 2)
parm = 1;
}
+
+ while (n--) {
+ dp = save_string(dp, "%p");
+ dp = save_char(dp, '0' + parm);
+ }
+
if (onstack == parm) {
if (n > 1) {
_nc_warning("string may not be optimal");
@@ -255,11 +259,6 @@ getparm(int parm, int n)
onstack = parm;
- while (n--) {
- dp = save_string(dp, "%p");
- dp = save_char(dp, '0' + parm);
- }
-
if (seenn && parm < 3) {
dp = save_string(dp, "%{96}%^");
}
@@ -469,73 +468,9 @@ _nc_captoinfo(const char *cap, const char *s, int const parameterized)
break;
}
break;
-#ifdef REVISIBILIZE
- case '\\':
- dp = save_char(dp, *s++);
- dp = save_char(dp, *s++);
- break;
- case '\n':
- dp = save_string(dp, "\\n");
- s++;
- break;
- case '\t':
- dp = save_string(dp, "\\t");
- s++;
- break;
- case '\r':
- dp = save_string(dp, "\\r");
- s++;
- break;
- case '\200':
- dp = save_string(dp, "\\0");
- s++;
- break;
- case '\f':
- dp = save_string(dp, "\\f");
- s++;
- break;
- case '\b':
- dp = save_string(dp, "\\b");
- s++;
- break;
- case ' ':
- dp = save_string(dp, "\\s");
- s++;
- break;
- case '^':
- dp = save_string(dp, "\\^");
- s++;
- break;
- case ':':
- dp = save_string(dp, "\\:");
- s++;
- break;
- case ',':
- dp = save_string(dp, "\\,");
- s++;
- break;
- default:
- if (*s == '\033') {
- dp = save_string(dp, "\\E");
- s++;
- } else if (*s > 0 && *s < 32) {
- dp = save_char(dp, '^');
- dp = save_char(dp, *s + '@');
- s++;
- } else if (*s <= 0 || *s >= 127) {
- dp = save_char(dp, '\\');
- dp = save_char(dp, ((*s & 0300) >> 6) + '0');
- dp = save_char(dp, ((*s & 0070) >> 3) + '0');
- dp = save_char(dp, (*s & 0007) + '0');
- s++;
- } else
- dp = save_char(dp, *s++);
- break;
-#else
default:
dp = save_char(dp, *s++);
break;
-#endif
}
}
@@ -578,7 +513,7 @@ bcd_expression(const char *str)
{
char buffer[80];
int tst;
- sprintf(buffer, fmt, ch1, ch2);
+ _nc_SPRINTF(buffer, _nc_SLIMIT(sizeof(buffer)) fmt, ch1, ch2);
tst = strlen(buffer) - 1;
assert(len == tst);
}
@@ -597,10 +532,13 @@ save_tc_char(char *bufptr, int c1)
bufptr = save_char(bufptr, '\\');
bufptr = save_char(bufptr, c1);
} else {
- if (c1 == (c1 & 0x1f)) /* iscntrl() returns T on 255 */
- (void) strcpy(temp, unctrl((chtype) c1));
- else
- (void) sprintf(temp, "\\%03o", c1);
+ if (c1 == (c1 & 0x1f)) { /* iscntrl() returns T on 255 */
+ _nc_SPRINTF(temp, _nc_SLIMIT(sizeof(temp))
+ "%.20s", unctrl((chtype) c1));
+ } else {
+ _nc_SPRINTF(temp, _nc_SLIMIT(sizeof(temp))
+ "\\%03o", c1);
+ }
bufptr = save_string(bufptr, temp);
}
return bufptr;
@@ -646,13 +584,15 @@ _nc_infotocap(const char *cap GCC_UNUSED, const char *str, int const parameteriz
int in0, in1, in2;
char ch1 = 0, ch2 = 0;
char *bufptr = init_string();
+ char octal[4];
int len;
bool syntax_error = FALSE;
/* we may have to move some trailing mandatory padding up front */
padding = str + strlen(str) - 1;
- if (padding > str && *padding == '>' && *--padding == '/') {
- --padding;
+ if (padding > str && *padding == '>') {
+ if (*--padding == '/')
+ --padding;
while (isdigit(UChar(*padding)) || *padding == '.' || *padding == '*')
padding--;
if (padding > str && *padding == '<' && *--padding == '$')
@@ -663,7 +603,7 @@ _nc_infotocap(const char *cap GCC_UNUSED, const char *str, int const parameteriz
bufptr = save_char(bufptr, *padding++);
}
- for (; *str && str != trimmed; str++) {
+ for (; *str && ((trimmed == 0) || (str < trimmed)); str++) {
int c1, c2;
char *cp = 0;
@@ -685,8 +625,72 @@ _nc_infotocap(const char *cap GCC_UNUSED, const char *str, int const parameteriz
} else if (str[1] == ',') {
bufptr = save_char(bufptr, *++str);
} else {
+ int xx1, xx2;
+
bufptr = save_char(bufptr, *str++);
- bufptr = save_char(bufptr, *str);
+ xx1 = *str;
+ if (_nc_strict_bsd) {
+ if (isdigit(UChar(xx1))) {
+ int pad = 0;
+
+ if (!isdigit(UChar(str[1])))
+ pad = 2;
+ else if (str[1] && !isdigit(UChar(str[2])))
+ pad = 1;
+
+ /*
+ * Test for "\0", "\00" or "\000" and transform those
+ * into "\200".
+ */
+ if (xx1 == '0'
+ && ((pad == 2) || (str[1] == '0'))
+ && ((pad >= 1) || (str[2] == '0'))) {
+ xx2 = '2';
+ } else {
+ xx2 = '0';
+ pad = 0; /* FIXME - optionally pad to 3 digits */
+ }
+ while (pad-- > 0) {
+ bufptr = save_char(bufptr, xx2);
+ xx2 = '0';
+ }
+ } else if (strchr("E\\nrtbf", xx1) == 0) {
+ switch (xx1) {
+ case 'e':
+ xx1 = 'E';
+ break;
+ case 'l':
+ xx1 = 'n';
+ break;
+ case 's':
+ bufptr = save_char(bufptr, '0');
+ bufptr = save_char(bufptr, '4');
+ xx1 = '0';
+ break;
+ case ':':
+ /*
+ * Note: termcap documentation claims that ":"
+ * must be escaped as "\072", however the
+ * documentation is incorrect - read the code.
+ * The replacement does not work reliably,
+ * so the advice is not helpful.
+ */
+ bufptr = save_char(bufptr, '0');
+ bufptr = save_char(bufptr, '7');
+ xx1 = '2';
+ break;
+ default:
+ /* should not happen, but handle this anyway */
+ _nc_SPRINTF(octal, _nc_SLIMIT(sizeof(octal))
+ "%03o", UChar(xx1));
+ bufptr = save_char(bufptr, octal[0]);
+ bufptr = save_char(bufptr, octal[1]);
+ xx1 = octal[2];
+ break;
+ }
+ }
+ }
+ bufptr = save_char(bufptr, xx1);
}
} else if (str[0] == '$' && str[1] == '<') { /* discard padding */
str += 2;
@@ -703,7 +707,8 @@ _nc_infotocap(const char *cap GCC_UNUSED, const char *str, int const parameteriz
&& ((in0 == 4 && in1 == 10 && in2 == 48)
|| (in0 == 3 && in1 == 9 && in2 == 38))) {
/* dumb-down an optimized case from xterm-256color for termcap */
- str = strstr(str, ";m");
+ if ((str = strstr(str, ";m")) == 0)
+ break; /* cannot happen */
++str;
if (in2 == 48) {
bufptr = save_string(bufptr, "[48;5;%dm");
@@ -720,13 +725,13 @@ _nc_infotocap(const char *cap GCC_UNUSED, const char *str, int const parameteriz
bufptr = save_tc_inequality(bufptr, c1, c2);
} else if (sscanf(str, "%%?%%{%d}%%>%%t%%'%c'%%+%%;", &c1, &ch2) == 2) {
str = strchr(str, ';');
- bufptr = save_tc_inequality(bufptr, c1, c2);
+ bufptr = save_tc_inequality(bufptr, c1, ch2);
} else if (sscanf(str, "%%?%%'%c'%%>%%t%%{%d}%%+%%;", &ch1, &c2) == 2) {
str = strchr(str, ';');
- bufptr = save_tc_inequality(bufptr, c1, c2);
+ bufptr = save_tc_inequality(bufptr, ch1, c2);
} else if (sscanf(str, "%%?%%'%c'%%>%%t%%'%c'%%+%%;", &ch1, &ch2) == 2) {
str = strchr(str, ';');
- bufptr = save_tc_inequality(bufptr, c1, c2);
+ bufptr = save_tc_inequality(bufptr, ch1, ch2);
} else if ((len = bcd_expression(str)) != 0) {
str += len;
bufptr = save_string(bufptr, "%B");
@@ -741,15 +746,15 @@ _nc_infotocap(const char *cap GCC_UNUSED, const char *str, int const parameteriz
bufptr = save_tc_char(bufptr, c1);
}
/* FIXME: this "works" for 'delta' */
- else if (strncmp(str, "%{2}%*%-", 8) == 0) {
+ else if (strncmp(str, "%{2}%*%-", (size_t) 8) == 0) {
str += 7;
bufptr = save_string(bufptr, "%D");
- } else if (strncmp(str, "%{96}%^", 7) == 0) {
+ } else if (strncmp(str, "%{96}%^", (size_t) 7) == 0) {
str += 6;
if (saw_m++ == 0) {
bufptr = save_string(bufptr, "%n");
}
- } else if (strncmp(str, "%{127}%^", 8) == 0) {
+ } else if (strncmp(str, "%{127}%^", (size_t) 8) == 0) {
str += 7;
if (saw_n++ == 0) {
bufptr = save_string(bufptr, "%m");
@@ -772,8 +777,25 @@ _nc_infotocap(const char *cap GCC_UNUSED, const char *str, int const parameteriz
case '8':
case '9':
bufptr = save_char(bufptr, '%');
- while (isdigit(UChar(*str)))
- bufptr = save_char(bufptr, *str++);
+ ch1 = 0;
+ ch2 = 0;
+ while (isdigit(UChar(*str))) {
+ ch2 = ch1;
+ ch1 = *str++;
+ if (_nc_strict_bsd) {
+ if (ch1 > '3')
+ return 0;
+ } else {
+ bufptr = save_char(bufptr, ch1);
+ }
+ }
+ if (_nc_strict_bsd) {
+ if (ch2 != 0 && ch2 != '0')
+ return 0;
+ if (ch1 < '2')
+ ch1 = 'd';
+ bufptr = save_char(bufptr, ch1);
+ }
if (strchr("doxX.", *str)) {
if (*str != 'd') /* termcap doesn't have octal, hex */
return 0;
@@ -794,6 +816,8 @@ _nc_infotocap(const char *cap GCC_UNUSED, const char *str, int const parameteriz
* termcap notation.
*/
case 's':
+ if (_nc_strict_bsd)
+ return 0;
bufptr = save_string(bufptr, "%s");
break;
@@ -826,7 +850,7 @@ _nc_infotocap(const char *cap GCC_UNUSED, const char *str, int const parameteriz
* but that may not be the end of the string.
*/
assert(str != 0);
- if (*str == '\0')
+ if (str == 0 || *str == '\0')
break;
} /* endwhile (*str) */
diff --git a/ncurses/tinfo/comp_error.c b/ncurses/tinfo/comp_error.c
index 56c362a4f7dd..ff0acc799815 100644
--- a/ncurses/tinfo/comp_error.c
+++ b/ncurses/tinfo/comp_error.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2005,2007 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 *
@@ -41,7 +41,7 @@
#include <tic.h>
-MODULE_ID("$Id: comp_error.c,v 1.31 2007/04/21 23:38:32 tom Exp $")
+MODULE_ID("$Id: comp_error.c,v 1.36 2012/02/22 22:34:31 tom Exp $")
NCURSES_EXPORT_VAR(bool) _nc_suppress_warnings = FALSE;
NCURSES_EXPORT_VAR(int) _nc_curr_line = 0; /* current line # in input */
@@ -59,7 +59,8 @@ _nc_get_source(void)
NCURSES_EXPORT(void)
_nc_set_source(const char *const name)
{
- SourceName = name;
+ FreeIfNeeded(SourceName);
+ SourceName = strdup(name);
}
NCURSES_EXPORT(void)
@@ -70,7 +71,7 @@ _nc_set_type(const char *const name)
if (TermType != 0) {
TermType[0] = '\0';
if (name)
- strncat(TermType, name, MAX_NAME_SIZE);
+ strncat(TermType, name, (size_t) MAX_NAME_SIZE);
}
}
@@ -84,7 +85,7 @@ _nc_get_type(char *name)
}
#endif
if (name != 0)
- strcpy(name, TermType != 0 ? TermType : "");
+ _nc_STRCPY(name, TermType != 0 ? TermType : "", MAX_NAME_SIZE);
}
static NCURSES_INLINE void
@@ -151,3 +152,12 @@ _nc_syserr_abort(const char *const fmt,...)
exit(EXIT_FAILURE);
#endif
}
+
+#if NO_LEAKS
+NCURSES_EXPORT(void)
+_nc_comp_error_leaks(void)
+{
+ FreeAndNull(SourceName);
+ FreeAndNull(TermType);
+}
+#endif
diff --git a/ncurses/tinfo/comp_expand.c b/ncurses/tinfo/comp_expand.c
index 71012b6355e3..2ab06ebabc89 100644
--- a/ncurses/tinfo/comp_expand.c
+++ b/ncurses/tinfo/comp_expand.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2008,2010 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 *
@@ -35,7 +35,7 @@
#include <ctype.h>
#include <tic.h>
-MODULE_ID("$Id: comp_expand.c,v 1.21 2010/01/16 17:11:23 tom Exp $")
+MODULE_ID("$Id: comp_expand.c,v 1.25 2012/03/24 18:37:17 tom Exp $")
static int
trailing_spaces(const char *src)
@@ -49,6 +49,8 @@ trailing_spaces(const char *src)
#define REALCTL(s) (UChar(*(s)) < 127 && iscntrl(UChar(*(s))))
#define REALPRINT(s) (UChar(*(s)) < 127 && isprint(UChar(*(s))))
+#define P_LIMIT(p) (length - (size_t)(p))
+
NCURSES_EXPORT(char *)
_nc_tic_expand(const char *srcp, bool tic_format, int numbers)
{
@@ -61,15 +63,15 @@ _nc_tic_expand(const char *srcp, bool tic_format, int numbers)
size_t need = (2 + strlen(str)) * 4;
int ch;
-#if NO_LEAKS
if (srcp == 0) {
+#if NO_LEAKS
if (buffer != 0) {
FreeAndNull(buffer);
length = 0;
}
+#endif
return 0;
}
-#endif
if (buffer == 0 || need > length) {
if ((buffer = typeRealloc(char, length = need, buffer)) == 0)
return 0;
@@ -90,7 +92,8 @@ _nc_tic_expand(const char *srcp, bool tic_format, int numbers)
&& str[1] != '\\'
&& REALPRINT(str + 1)
&& str[2] == S_QUOTE) {
- sprintf(buffer + bufp, "{%d}", str[1]);
+ _nc_SPRINTF(buffer + bufp, _nc_SLIMIT(P_LIMIT(bufp))
+ "{%d}", str[1]);
bufp += (int) strlen(buffer + bufp);
str += 2;
} else {
@@ -177,10 +180,12 @@ _nc_tic_expand(const char *srcp, bool tic_format, int numbers)
#define UnCtl(c) ((c) + '@')
else if (REALCTL(str) && ch != '\\'
&& (!islong || isdigit(UChar(str[1])))) {
- (void) sprintf(&buffer[bufp], "^%c", UnCtl(ch));
+ _nc_SPRINTF(&buffer[bufp], _nc_SLIMIT(P_LIMIT(bufp))
+ "^%c", UnCtl(ch));
bufp += 2;
} else {
- (void) sprintf(&buffer[bufp], "\\%03o", ch);
+ _nc_SPRINTF(&buffer[bufp], _nc_SLIMIT(P_LIMIT(bufp))
+ "\\%03o", ch);
bufp += 4;
}
diff --git a/ncurses/tinfo/comp_parse.c b/ncurses/tinfo/comp_parse.c
index 8204d75a8193..82a61a52e35d 100644
--- a/ncurses/tinfo/comp_parse.c
+++ b/ncurses/tinfo/comp_parse.c
@@ -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 *
@@ -35,15 +35,10 @@
/*
* comp_parse.c -- parser driver loop and use handling.
*
- * _nc_read_entry_source(FILE *, literal, bool, bool (*hook)())
- * _nc_resolve_uses2(void)
- * _nc_free_entries(void)
- *
* Use this code by calling _nc_read_entry_source() on as many source
* files as you like (either terminfo or termcap syntax). If you
* want use-resolution, call _nc_resolve_uses2(). To free the list
* storage, do _nc_free_entries().
- *
*/
#include <curses.priv.h>
@@ -52,7 +47,7 @@
#include <tic.h>
-MODULE_ID("$Id: comp_parse.c,v 1.73 2010/12/25 23:06:37 tom Exp $")
+MODULE_ID("$Id: comp_parse.c,v 1.90 2013/08/31 15:22:31 tom Exp $")
static void sanity_check2(TERMTYPE *, bool);
NCURSES_IMPEXP void NCURSES_API(*_nc_check_termtype2) (TERMTYPE *, bool) = sanity_check2;
@@ -61,6 +56,8 @@ NCURSES_IMPEXP void NCURSES_API(*_nc_check_termtype2) (TERMTYPE *, bool) = sanit
static void sanity_check(TERMTYPE *);
NCURSES_IMPEXP void NCURSES_API(*_nc_check_termtype) (TERMTYPE *) = sanity_check;
+static void fixup_acsc(TERMTYPE *, int);
+
static void
enqueue(ENTRY * ep)
/* add an entry to the in-core list */
@@ -86,16 +83,28 @@ force_bar(char *dst, char *src)
if (len > MAX_NAME_SIZE)
len = MAX_NAME_SIZE;
(void) strncpy(dst, src, len);
- (void) strcpy(dst + len, "|");
+ _nc_STRCPY(dst + len, "|", MAX_NAME_SIZE);
src = dst;
}
return src;
}
#define ForceBar(dst, src) ((strchr(src, '|') == 0) ? force_bar(dst, src) : src)
-NCURSES_EXPORT(bool)
-_nc_entry_match(char *n1, char *n2)
-/* do any of the aliases in a pair of terminal names match? */
+#if NCURSES_USE_TERMCAP && NCURSES_XNAMES
+static char *
+skip_index(char *name)
+{
+ char *bar = strchr(name, '|');
+
+ if (bar != 0 && (bar - name) == 2)
+ name = bar + 1;
+
+ return name;
+}
+#endif
+
+static bool
+check_collisions(char *n1, char *n2, int counter)
{
char *pstart, *qstart, *pend, *qend;
char nc1[MAX_NAME_SIZE + 2];
@@ -104,15 +113,95 @@ _nc_entry_match(char *n1, char *n2)
n1 = ForceBar(nc1, n1);
n2 = ForceBar(nc2, n2);
- for (pstart = n1; (pend = strchr(pstart, '|')); pstart = pend + 1)
- for (qstart = n2; (qend = strchr(qstart, '|')); qstart = qend + 1)
+#if NCURSES_USE_TERMCAP && NCURSES_XNAMES
+ if ((_nc_syntax == SYN_TERMCAP) && _nc_user_definable) {
+ n1 = skip_index(n1);
+ n2 = skip_index(n2);
+ }
+#endif
+
+ for (pstart = n1; (pend = strchr(pstart, '|')); pstart = pend + 1) {
+ for (qstart = n2; (qend = strchr(qstart, '|')); qstart = qend + 1) {
if ((pend - pstart == qend - qstart)
- && memcmp(pstart, qstart, (size_t) (pend - pstart)) == 0)
+ && memcmp(pstart, qstart, (size_t) (pend - pstart)) == 0) {
+ if (counter > 0)
+ (void) fprintf(stderr, "Name collision '%.*s' between\n",
+ (int) (pend - pstart), pstart);
return (TRUE);
+ }
+ }
+ }
return (FALSE);
}
+static char *
+next_name(char *name)
+{
+ if (*name != '\0')
+ ++name;
+ return name;
+}
+
+static char *
+name_ending(char *name)
+{
+ if (*name == '\0') {
+ name = 0;
+ } else {
+ while (*name != '\0' && *name != '|')
+ ++name;
+ }
+ return name;
+}
+
+/*
+ * Essentially, find the conflict reported in check_collisions() and remove
+ * it from the second name, unless that happens to be the last alias.
+ */
+static bool
+remove_collision(char *n1, char *n2)
+{
+ char *p2 = n2;
+ char *pstart, *qstart, *pend, *qend;
+ bool removed = FALSE;
+
+#if NCURSES_USE_TERMCAP && NCURSES_XNAMES
+ if ((_nc_syntax == SYN_TERMCAP) && _nc_user_definable) {
+ n1 = skip_index(n1);
+ p2 = n2 = skip_index(n2);
+ }
+#endif
+
+ for (pstart = n1; (pend = name_ending(pstart)); pstart = next_name(pend)) {
+ for (qstart = n2; (qend = name_ending(qstart)); qstart = next_name(qend)) {
+ if ((pend - pstart == qend - qstart)
+ && memcmp(pstart, qstart, (size_t) (pend - pstart)) == 0) {
+ if (qstart != p2 || *qend == '|') {
+ if (*qend == '|')
+ ++qend;
+ while ((*qstart++ = *qend++) != '\0') ;
+ fprintf(stderr, "...now\t%s\n", p2);
+ } else {
+ fprintf(stderr, "Cannot remove alias '%.*s'\n",
+ (int) (qend - qstart), qstart);
+ }
+ removed = TRUE;
+ break;
+ }
+ }
+ }
+
+ return removed;
+}
+
+/* do any of the aliases in a pair of terminal names match? */
+NCURSES_EXPORT(bool)
+_nc_entry_match(char *n1, char *n2)
+{
+ return check_collisions(n1, n2, 0);
+}
+
/****************************************************************************
*
* Entry compiler and resolution logic
@@ -198,19 +287,19 @@ _nc_resolve_uses2(bool fullresolve, bool literal)
for_entry_list(rp) {
if (qp > rp
- && _nc_entry_match(qp->tterm.term_names, rp->tterm.term_names)) {
- matchcount++;
- if (matchcount == 1) {
- (void) fprintf(stderr, "Name collision between %s",
- _nc_first_name(qp->tterm.term_names));
- multiples++;
+ && check_collisions(qp->tterm.term_names,
+ rp->tterm.term_names,
+ matchcount + 1)) {
+ if (!matchcount++) {
+ (void) fprintf(stderr, "\t%s\n", rp->tterm.term_names);
+ }
+ (void) fprintf(stderr, "and\t%s\n", qp->tterm.term_names);
+ if (!remove_collision(rp->tterm.term_names,
+ qp->tterm.term_names)) {
+ ++multiples;
}
- if (matchcount >= 1)
- (void) fprintf(stderr, " %s", _nc_first_name(rp->tterm.term_names));
}
}
- if (matchcount >= 1)
- (void) putc('\n', stderr);
}
if (multiples > 0)
return (FALSE);
@@ -256,9 +345,7 @@ _nc_resolve_uses2(bool fullresolve, bool literal)
DEBUG(2, ("%s: resolving use=%s (compiled)",
child, lookfor));
- rp = typeMalloc(ENTRY, 1);
- if (rp == 0)
- _nc_err_abort(MSG_NO_MEMORY);
+ TYPE_MALLOC(ENTRY, 1, rp);
rp->tterm = thisterm;
rp->nuses = 0;
rp->next = lastread;
@@ -378,7 +465,34 @@ _nc_resolve_uses2(bool fullresolve, bool literal)
for_entry_list(qp) {
_nc_curr_line = (int) qp->startline;
_nc_set_type(_nc_first_name(qp->tterm.term_names));
- _nc_check_termtype2(&qp->tterm, literal);
+ /*
+ * tic overrides this function pointer to provide more verbose
+ * checking.
+ */
+ if (_nc_check_termtype2 != sanity_check2) {
+ SCREEN *save_SP = SP;
+ SCREEN fake_sp;
+ TERMINAL fake_tm;
+ TERMINAL *save_tm = cur_term;
+
+ /*
+ * Setup so that tic can use ordinary terminfo interface
+ * to obtain capability information.
+ */
+ memset(&fake_sp, 0, sizeof(fake_sp));
+ memset(&fake_tm, 0, sizeof(fake_tm));
+ fake_sp._term = &fake_tm;
+ fake_tm.type = qp->tterm;
+ _nc_set_screen(&fake_sp);
+ set_curterm(&fake_tm);
+
+ _nc_check_termtype2(&qp->tterm, literal);
+
+ _nc_set_screen(save_SP);
+ set_curterm(save_tm);
+ } else {
+ fixup_acsc(&qp->tterm, literal);
+ }
}
DEBUG(2, ("SANITY CHECK FINISHED"));
}
@@ -403,6 +517,17 @@ _nc_resolve_uses(bool fullresolve)
#define CUR tp->
static void
+fixup_acsc(TERMTYPE *tp, int literal)
+{
+ if (!literal) {
+ if (acs_chars == 0
+ && enter_alt_charset_mode != 0
+ && exit_alt_charset_mode != 0)
+ acs_chars = strdup(VT_ACSC);
+ }
+}
+
+static void
sanity_check2(TERMTYPE *tp, bool literal)
{
if (!PRESENT(exit_attribute_mode)) {
@@ -422,16 +547,14 @@ sanity_check2(TERMTYPE *tp, bool literal)
#endif /* __UNUSED__ */
PAIRED(enter_standout_mode, exit_standout_mode);
PAIRED(enter_underline_mode, exit_underline_mode);
+ PAIRED(enter_italics_mode, exit_italics_mode);
}
/* we do this check/fix in postprocess_termcap(), but some packagers
* prefer to bypass it...
*/
if (!literal) {
- if (acs_chars == 0
- && enter_alt_charset_mode != 0
- && exit_alt_charset_mode != 0)
- acs_chars = strdup(VT_ACSC);
+ fixup_acsc(tp, literal);
ANDMISSING(enter_alt_charset_mode, acs_chars);
ANDMISSING(exit_alt_charset_mode, acs_chars);
}
diff --git a/ncurses/tinfo/comp_scan.c b/ncurses/tinfo/comp_scan.c
index 8725b2edb7eb..fe6e8e7631ce 100644
--- a/ncurses/tinfo/comp_scan.c
+++ b/ncurses/tinfo/comp_scan.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2008,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 *
@@ -50,7 +50,7 @@
#include <ctype.h>
#include <tic.h>
-MODULE_ID("$Id: comp_scan.c,v 1.89 2010/12/25 23:06:37 tom Exp $")
+MODULE_ID("$Id: comp_scan.c,v 1.102 2013/11/16 19:57:50 tom Exp $")
/*
* Maximum length of string capability we'll accept before raising an error.
@@ -61,6 +61,7 @@ MODULE_ID("$Id: comp_scan.c,v 1.89 2010/12/25 23:06:37 tom Exp $")
#define iswhite(ch) (ch == ' ' || ch == '\t')
NCURSES_EXPORT_VAR (int) _nc_syntax = 0; /* termcap or terminfo? */
+NCURSES_EXPORT_VAR (int) _nc_strict_bsd = 1; /* ncurses extended termcap? */
NCURSES_EXPORT_VAR (long) _nc_curr_file_pos = 0; /* file offset of current line */
NCURSES_EXPORT_VAR (long) _nc_comment_start = 0; /* start of comment range before name */
NCURSES_EXPORT_VAR (long) _nc_comment_end = 0; /* end of comment range before name */
@@ -127,14 +128,19 @@ _nc_reset_input(FILE *fp, char *buf)
* Returns the final nonblank character on the current input buffer
*/
static int
-last_char(void)
+last_char(int from_end)
{
size_t len = strlen(bufptr);
+ int result = 0;
+
while (len--) {
- if (!isspace(UChar(bufptr[len])))
- return bufptr[len];
+ if (!isspace(UChar(bufptr[len]))) {
+ if (from_end < (int) len)
+ result = bufptr[(int) len - from_end];
+ break;
+ }
}
- return 0;
+ return result;
}
/*
@@ -195,7 +201,8 @@ next_char(void)
result = typeRealloc(char, allocated, result);
if (result == 0)
return (EOF);
- bufstart = result;
+ if (bufstart)
+ bufstart = result;
}
if (used == 0)
_nc_curr_file_pos = ftell(yyin);
@@ -212,7 +219,7 @@ next_char(void)
}
} else {
if (used != 0)
- strcat(result, "\n");
+ _nc_STRCAT(result, "\n", allocated);
}
if ((bufptr = bufstart) != 0) {
used = strlen(bufptr);
@@ -256,12 +263,12 @@ next_char(void)
}
static void
-push_back(char c)
+push_back(int c)
/* push a character back onto the input stream */
{
if (bufptr == bufstart)
_nc_syserr_abort("Can't backspace off beginning of line");
- *--bufptr = c;
+ *--bufptr = (char) c;
_nc_curr_col--;
}
@@ -299,6 +306,8 @@ eat_escaped_newline(int ch)
*tok_ptr++ = (char) ch; \
*tok_ptr = '\0'
+static char *tok_buf;
+
/*
* int
* get_token()
@@ -336,15 +345,14 @@ NCURSES_EXPORT(int)
_nc_get_token(bool silent)
{
static const char terminfo_punct[] = "@%&*!#";
- static char *tok_buf;
- char *after_list;
- char *after_name;
+ char *after_name; /* after primary name */
+ char *after_list; /* after primary and alias list */
char *numchk;
char *tok_ptr;
char *s;
char numbuf[80];
- int ch;
+ int ch, c0, c1;
int dot_flag = FALSE;
int type;
long number;
@@ -372,11 +380,10 @@ _nc_get_token(bool silent)
if (end_of_stream()) {
yyin = 0;
- next_char(); /* frees its allocated memory */
+ (void) next_char(); /* frees its allocated memory */
if (tok_buf != 0) {
if (_nc_curr_token.tk_name == tok_buf)
_nc_curr_token.tk_name = 0;
- FreeAndNull(tok_buf);
}
return (EOF);
}
@@ -390,6 +397,7 @@ _nc_get_token(bool silent)
}
ch = eat_escaped_newline(ch);
+ _nc_curr_token.tk_valstring = 0;
#ifdef TRACE
old_line = _nc_curr_line;
@@ -424,7 +432,7 @@ _nc_get_token(bool silent)
#if NCURSES_EXT_FUNCS
&& !(ch == '.' && _nc_disable_period)
#endif
- && !strchr(terminfo_punct, (char) ch)) {
+ && ((strchr) (terminfo_punct, (char) ch) == 0)) {
if (!silent)
_nc_warning("Illegal character (expected alphanumeric or %s) - '%s'",
terminfo_punct, unctrl(UChar(ch)));
@@ -457,7 +465,7 @@ _nc_get_token(bool silent)
after_list = tok_ptr;
if (after_name == 0)
after_name = tok_ptr;
- } else if (ch == ':' && last_char() != ',') {
+ } else if (ch == ':' && last_char(0) != ',') {
_nc_syntax = SYN_TERMCAP;
separator = ':';
break;
@@ -471,12 +479,64 @@ _nc_get_token(bool silent)
if (after_name == 0)
break;
/*
- * If we see a comma, we assume this is terminfo unless we
- * subsequently run into a colon. But we don't stop
- * looking for a colon until hitting a newline. This
- * allows commas to be embedded in description fields of
- * either syntax.
+ * We saw a comma, but are not entirely sure this is
+ * terminfo format, since we can still be parsing the
+ * description field (for either syntax).
+ *
+ * A properly formatted termcap line ends with either a
+ * colon, or a backslash after a colon. It is possible
+ * to have a backslash in the middle of a capability, but
+ * then there would be no leading whitespace on the next
+ * line - something we want to discourage.
*/
+ c0 = last_char(0);
+ c1 = last_char(1);
+ if (c1 != ':' && c0 != '\\' && c0 != ':') {
+ bool capability = FALSE;
+
+ /*
+ * Since it is not termcap, assume the line is terminfo
+ * format. However, the comma can be embedded in a
+ * description field. It also can be a separator
+ * between a description field and a capability.
+ *
+ * Improve the guess by checking if the next word after
+ * the comma does not look like a capability. In that
+ * case, extend the description past the comma.
+ */
+ for (s = bufptr; isspace(UChar(*s)); ++s) {
+ ;
+ }
+ if (islower(UChar(*s))) {
+ char *name = s;
+ while (isalnum(UChar(*s))) {
+ ++s;
+ }
+ if (*s == '#' || *s == '=' || *s == '@') {
+ /*
+ * Checking solely with syntax allows us to
+ * support extended capabilities with string
+ * values.
+ */
+ capability = TRUE;
+ } else if (*s == ',') {
+ c0 = *s;
+ *s = '\0';
+ /*
+ * Otherwise, we can handle predefined boolean
+ * capabilities, still aided by syntax.
+ */
+ if (_nc_find_entry(name,
+ _nc_get_hash_table(FALSE))) {
+ capability = TRUE;
+ }
+ *s = (char) c0;
+ }
+ }
+ if (capability) {
+ break;
+ }
+ }
} else
ch = eat_escaped_newline(ch);
@@ -748,7 +808,7 @@ _nc_trans_string(char *ptr, char *last)
if (!(is7bits(c) && isprint(c))) {
_nc_warning("Illegal ^ character - '%s'", unctrl(UChar(c)));
}
- if (c == '?') {
+ if (c == '?' && (_nc_syntax != SYN_TERMCAP)) {
*(ptr++) = '\177';
if (_nc_tracing)
_nc_warning("Allow ^? as synonym for \\177");
@@ -758,23 +818,29 @@ _nc_trans_string(char *ptr, char *last)
*(ptr++) = (char) (c);
}
} else if (c == '\\') {
+ bool strict_bsd = ((_nc_syntax == SYN_TERMCAP) && _nc_strict_bsd);
+
c = next_char();
if (c == EOF)
_nc_err_abort(MSG_NO_INPUTS);
- if (c >= '0' && c <= '7') {
+#define isoctal(c) ((c) >= '0' && (c) <= '7')
+
+ if (isoctal(c) || (strict_bsd && isdigit(c))) {
number = c - '0';
for (i = 0; i < 2; i++) {
c = next_char();
if (c == EOF)
_nc_err_abort(MSG_NO_INPUTS);
- if (c < '0' || c > '7') {
+ if (!isoctal(c)) {
if (isdigit(c)) {
- _nc_warning("Non-octal digit `%c' in \\ sequence", c);
- /* allow the digit; it'll do less harm */
+ if (!strict_bsd) {
+ _nc_warning("Non-octal digit `%c' in \\ sequence", c);
+ /* allow the digit; it'll do less harm */
+ }
} else {
- push_back((char) c);
+ push_back(c);
break;
}
}
@@ -782,21 +848,16 @@ _nc_trans_string(char *ptr, char *last)
number = number * 8 + c - '0';
}
- if (number == 0)
+ number = UChar(number);
+ if (number == 0 && !strict_bsd)
number = 0200;
*(ptr++) = (char) number;
} else {
switch (c) {
case 'E':
- case 'e':
*(ptr++) = '\033';
break;
- case 'a':
- *(ptr++) = '\007';
- break;
-
- case 'l':
case 'n':
*(ptr++) = '\n';
break;
@@ -809,10 +870,6 @@ _nc_trans_string(char *ptr, char *last)
*(ptr++) = '\010';
break;
- case 's':
- *(ptr++) = ' ';
- break;
-
case 'f':
*(ptr++) = '\014';
break;
@@ -833,16 +890,33 @@ _nc_trans_string(char *ptr, char *last)
*(ptr++) = ',';
break;
- case ':':
- *(ptr++) = ':';
- break;
-
case '\n':
continue;
default:
- _nc_warning("Illegal character '%s' in \\ sequence",
- unctrl(UChar(c)));
+ if ((_nc_syntax == SYN_TERMINFO) || !_nc_strict_bsd) {
+ switch (c) {
+ case 'a':
+ c = '\007';
+ break;
+ case 'e':
+ c = '\033';
+ break;
+ case 'l':
+ c = '\n';
+ break;
+ case 's':
+ c = ' ';
+ break;
+ case ':':
+ c = ':';
+ break;
+ default:
+ _nc_warning("Illegal character '%s' in \\ sequence",
+ unctrl(UChar(c)));
+ break;
+ }
+ }
/* FALLTHRU */
case '|':
*(ptr++) = (char) c;
@@ -862,7 +936,7 @@ _nc_trans_string(char *ptr, char *last)
if (!ignored) {
if (_nc_curr_col <= 1) {
- push_back((char) c);
+ push_back(c);
c = '\n';
break;
}
@@ -934,5 +1008,8 @@ _nc_comp_scan_leaks(void)
if (pushname != 0) {
FreeAndNull(pushname);
}
+ if (tok_buf != 0) {
+ FreeAndNull(tok_buf);
+ }
}
#endif
diff --git a/ncurses/tinfo/db_iterator.c b/ncurses/tinfo/db_iterator.c
index 82665cb54be6..a14fb2161e01 100644
--- a/ncurses/tinfo/db_iterator.c
+++ b/ncurses/tinfo/db_iterator.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2006-2007,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 2006-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 *
@@ -36,13 +36,142 @@
#include <curses.priv.h>
+#include <time.h>
#include <tic.h>
-MODULE_ID("$Id: db_iterator.c,v 1.9 2010/12/25 23:00:25 tom Exp $")
+#if USE_HASHED_DB
+#include <hashed_db.h>
+#endif
+
+MODULE_ID("$Id: db_iterator.c,v 1.38 2013/12/14 21:23:20 tom Exp $")
#define HaveTicDirectory _nc_globals.have_tic_directory
#define KeepTicDirectory _nc_globals.keep_tic_directory
#define TicDirectory _nc_globals.tic_directory
+#define my_blob _nc_globals.dbd_blob
+#define my_list _nc_globals.dbd_list
+#define my_size _nc_globals.dbd_size
+#define my_time _nc_globals.dbd_time
+#define my_vars _nc_globals.dbd_vars
+
+static void
+add_to_blob(const char *text, size_t limit)
+{
+ (void) limit;
+
+ if (*text != '\0') {
+ char *last = my_blob + strlen(my_blob);
+ if (last != my_blob)
+ *last++ = NCURSES_PATHSEP;
+ _nc_STRCPY(last, text, limit);
+ }
+}
+
+static bool
+check_existence(const char *name, struct stat *sb)
+{
+ bool result = FALSE;
+
+ if (stat(name, sb) == 0
+ && (S_ISDIR(sb->st_mode) || S_ISREG(sb->st_mode))) {
+ result = TRUE;
+ }
+#if USE_HASHED_DB
+ else if (strlen(name) < PATH_MAX - sizeof(DBM_SUFFIX)) {
+ char temp[PATH_MAX];
+ _nc_SPRINTF(temp, _nc_SLIMIT(sizeof(temp)) "%s%s", name, DBM_SUFFIX);
+ if (stat(temp, sb) == 0 && S_ISREG(sb->st_mode)) {
+ result = TRUE;
+ }
+ }
+#endif
+ return result;
+}
+
+/*
+ * Store the latest value of an environment variable in my_vars[] so we can
+ * detect if one changes, invalidating the cached search-list.
+ */
+static bool
+update_getenv(const char *name, DBDIRS which)
+{
+ bool result = FALSE;
+
+ if (which < dbdLAST) {
+ char *value;
+
+ if ((value = getenv(name)) == 0 || (value = strdup(value)) == 0) {
+ ;
+ } else if (my_vars[which].name == 0 || strcmp(my_vars[which].name, name)) {
+ FreeIfNeeded(my_vars[which].value);
+ my_vars[which].name = name;
+ my_vars[which].value = value;
+ result = TRUE;
+ } else if ((my_vars[which].value != 0) ^ (value != 0)) {
+ FreeIfNeeded(my_vars[which].value);
+ my_vars[which].value = value;
+ result = TRUE;
+ } else if (value != 0 && strcmp(value, my_vars[which].value)) {
+ FreeIfNeeded(my_vars[which].value);
+ my_vars[which].value = value;
+ result = TRUE;
+ } else {
+ free(value);
+ }
+ }
+ return result;
+}
+
+static char *
+cache_getenv(const char *name, DBDIRS which)
+{
+ char *result = 0;
+
+ (void) update_getenv(name, which);
+ if (which < dbdLAST) {
+ result = my_vars[which].value;
+ }
+ return result;
+}
+
+/*
+ * The cache expires if at least a second has passed since the initial lookup,
+ * or if one of the environment variables changed.
+ *
+ * Only a few applications use multiple lookups of terminal entries, seems that
+ * aside from bulk I/O such as tic and toe, that leaves interactive programs
+ * which should not be modifying the terminal databases in a way that would
+ * invalidate the search-list.
+ *
+ * The "1-second" is to allow for user-directed changes outside the program.
+ */
+static bool
+cache_expired(void)
+{
+ bool result = FALSE;
+ time_t now = time((time_t *) 0);
+
+ if (now > my_time) {
+ result = TRUE;
+ } else {
+ DBDIRS n;
+ for (n = (DBDIRS) 0; n < dbdLAST; ++n) {
+ if (my_vars[n].name != 0
+ && update_getenv(my_vars[n].name, n)) {
+ result = TRUE;
+ break;
+ }
+ }
+ }
+ return result;
+}
+
+static void
+free_cache(void)
+{
+ FreeAndNull(my_blob);
+ FreeAndNull(my_list);
+}
/*
* Record the "official" location of the terminfo directory, according to
@@ -51,17 +180,20 @@ MODULE_ID("$Id: db_iterator.c,v 1.9 2010/12/25 23:00:25 tom Exp $")
NCURSES_EXPORT(const char *)
_nc_tic_dir(const char *path)
{
+ T(("_nc_tic_dir %s", NonNull(path)));
if (!KeepTicDirectory) {
if (path != 0) {
TicDirectory = path;
HaveTicDirectory = TRUE;
- } else if (!HaveTicDirectory && use_terminfo_vars()) {
- char *envp;
- if ((envp = getenv("TERMINFO")) != 0)
- return _nc_tic_dir(envp);
+ } else if (HaveTicDirectory == 0) {
+ if (use_terminfo_vars()) {
+ char *envp;
+ if ((envp = getenv("TERMINFO")) != 0)
+ return _nc_tic_dir(envp);
+ }
}
}
- return TicDirectory;
+ return TicDirectory ? TicDirectory : TERMINFO;
}
/*
@@ -77,61 +209,16 @@ _nc_keep_tic_dir(const char *path)
}
/*
- * Process the list of :-separated directories, looking for the terminal type.
- * We don't use strtok because it does not show us empty tokens.
- */
-#define ThisDbList _nc_globals.dbi_list
-#define ThisDbSize _nc_globals.dbi_size
-
-/*
* Cleanup.
*/
NCURSES_EXPORT(void)
_nc_last_db(void)
{
- if (ThisDbList != 0) {
- FreeAndNull(ThisDbList);
+ if (my_blob != 0 && cache_expired()) {
+ free_cache();
}
- ThisDbSize = 0;
}
-/* The TERMINFO_DIRS value, if defined by the configure script, begins with a
- * ":", which will be interpreted as TERMINFO.
- */
-static const char *
-next_list_item(const char *source, int *offset)
-{
- if (source != 0) {
- FreeIfNeeded(ThisDbList);
- ThisDbList = strdup(source);
- ThisDbSize = (int) strlen(source);
- }
-
- if (ThisDbList != 0 && ThisDbSize && *offset < ThisDbSize) {
- static char system_db[] = TERMINFO;
- char *result = ThisDbList + *offset;
- char *marker = strchr(result, NCURSES_PATHSEP);
-
- /*
- * Put a null on the marker if a separator was found. Set the offset
- * to the next position after the marker so we can call this function
- * again, using the data at the offset.
- */
- if (marker == 0) {
- *offset += (int) strlen(result);
- } else {
- *marker++ = 0;
- *offset = (int) (marker - ThisDbList);
- }
- if (*result == 0 && result != (ThisDbList + ThisDbSize))
- result = system_db;
- return result;
- }
- return 0;
-}
-
-#define NEXT_DBD(var, offset) next_list_item((*offset == 0) ? var : 0, offset)
-
/*
* This is a simple iterator which allows the caller to step through the
* possible locations for a terminfo directory. ncurses uses this to find
@@ -141,84 +228,186 @@ NCURSES_EXPORT(const char *)
_nc_next_db(DBDIRS * state, int *offset)
{
const char *result;
- char *envp;
-
- while (*state < dbdLAST) {
- DBDIRS next = (DBDIRS) ((int) (*state) + 1);
+ (void) offset;
+ if ((int) *state < my_size
+ && my_list != 0
+ && my_list[*state] != 0) {
+ result = my_list[*state];
+ (*state)++;
+ } else {
result = 0;
+ }
+ if (result != 0) {
+ T(("_nc_next_db %d %s", *state, result));
+ }
+ return result;
+}
- switch (*state) {
- case dbdTIC:
- if (HaveTicDirectory)
- result = _nc_tic_dir(0);
- break;
-#if USE_DATABASE
- case dbdEnvOnce:
- if (use_terminfo_vars()) {
- if ((envp = getenv("TERMINFO")) != 0)
- result = _nc_tic_dir(envp);
- }
- break;
- case dbdHome:
- if (use_terminfo_vars()) {
- result = _nc_home_terminfo();
- }
- break;
- case dbdEnvList:
- if (use_terminfo_vars()) {
- if ((result = NEXT_DBD(getenv("TERMINFO_DIRS"), offset)) != 0)
- next = *state;
- }
- break;
- case dbdCfgList:
+NCURSES_EXPORT(void)
+_nc_first_db(DBDIRS * state, int *offset)
+{
+ bool cache_has_expired = FALSE;
+ *state = dbdTIC;
+ *offset = 0;
+
+ T(("_nc_first_db"));
+
+ /* build a blob containing all of the strings we will use for a lookup
+ * table.
+ */
+ if (my_blob == 0 || (cache_has_expired = cache_expired())) {
+ size_t blobsize = 0;
+ const char *values[dbdLAST];
+ struct stat *my_stat;
+ int j, k;
+
+ if (cache_has_expired)
+ free_cache();
+
+ for (j = 0; j < dbdLAST; ++j)
+ values[j] = 0;
+
+ /*
+ * This is the first item in the list, and is used only when tic is
+ * writing to the database, as a performance improvement.
+ */
+ values[dbdTIC] = TicDirectory;
+
+#if NCURSES_USE_DATABASE
#ifdef TERMINFO_DIRS
- if ((result = NEXT_DBD(TERMINFO_DIRS, offset)) != 0)
- next = *state;
+ values[dbdCfgList] = TERMINFO_DIRS;
#endif
- break;
- case dbdCfgOnce:
-#ifndef TERMINFO_DIRS
- result = TERMINFO;
+#ifdef TERMINFO
+ values[dbdCfgOnce] = TERMINFO;
#endif
- break;
-#endif /* USE_DATABASE */
-#if USE_TERMCAP
- case dbdEnvOnce2:
- if (use_terminfo_vars()) {
- if ((envp = getenv("TERMCAP")) != 0)
- result = _nc_tic_dir(envp);
- }
- break;
- case dbdEnvList2:
- if (use_terminfo_vars()) {
- if ((result = NEXT_DBD(getenv("TERMPATH"), offset)) != 0)
- next = *state;
+#endif
+
+#if NCURSES_USE_TERMCAP
+ values[dbdCfgList2] = TERMPATH;
+#endif
+
+ if (use_terminfo_vars()) {
+#if NCURSES_USE_DATABASE
+ values[dbdEnvOnce] = cache_getenv("TERMINFO", dbdEnvOnce);
+ values[dbdHome] = _nc_home_terminfo();
+ (void) cache_getenv("HOME", dbdHome);
+ values[dbdEnvList] = cache_getenv("TERMINFO_DIRS", dbdEnvList);
+
+#endif
+#if NCURSES_USE_TERMCAP
+ values[dbdEnvOnce2] = cache_getenv("TERMCAP", dbdEnvOnce2);
+ /* only use $TERMCAP if it is an absolute path */
+ if (values[dbdEnvOnce2] != 0
+ && *values[dbdEnvOnce2] != '/') {
+ values[dbdEnvOnce2] = 0;
}
- break;
- case dbdCfgList2:
- if ((result = NEXT_DBD(TERMPATH, offset)) != 0)
- next = *state;
- break;
-#endif /* USE_TERMCAP */
- case dbdLAST:
- break;
+ values[dbdEnvList2] = cache_getenv("TERMPATH", dbdEnvList2);
+#endif /* NCURSES_USE_TERMCAP */
}
- if (*state != next) {
- *state = next;
- *offset = 0;
- _nc_last_db();
+
+ for (j = 0; j < dbdLAST; ++j) {
+ if (values[j] == 0)
+ values[j] = "";
+ blobsize += 2 + strlen(values[j]);
}
- if (result != 0) {
- return result;
+
+ my_blob = malloc(blobsize);
+ if (my_blob != 0) {
+ *my_blob = '\0';
+ for (j = 0; j < dbdLAST; ++j) {
+ add_to_blob(values[j], blobsize);
+ }
+
+ /* Now, build an array which will be pointers to the distinct
+ * strings in the blob.
+ */
+ blobsize = 2;
+ for (j = 0; my_blob[j] != '\0'; ++j) {
+ if (my_blob[j] == NCURSES_PATHSEP)
+ ++blobsize;
+ }
+ my_list = typeCalloc(char *, blobsize);
+ my_stat = typeCalloc(struct stat, blobsize);
+ if (my_list != 0 && my_stat != 0) {
+ k = 0;
+ my_list[k++] = my_blob;
+ for (j = 0; my_blob[j] != '\0'; ++j) {
+ if (my_blob[j] == NCURSES_PATHSEP) {
+ my_blob[j] = '\0';
+ my_list[k++] = &my_blob[j + 1];
+ }
+ }
+
+ /*
+ * Eliminate duplicates from the list.
+ */
+ for (j = 0; my_list[j] != 0; ++j) {
+#ifdef TERMINFO
+ if (*my_list[j] == '\0')
+ my_list[j] = strdup(TERMINFO);
+#endif
+ for (k = 0; k < j; ++k) {
+ if (!strcmp(my_list[j], my_list[k])) {
+ k = j - 1;
+ while ((my_list[j] = my_list[j + 1]) != 0) {
+ ++j;
+ }
+ j = k;
+ break;
+ }
+ }
+ }
+
+ /*
+ * Eliminate non-existent databases, and those that happen to
+ * be symlinked to another location.
+ */
+ for (j = 0; my_list[j] != 0; ++j) {
+ bool found = check_existence(my_list[j], &my_stat[j]);
+#if HAVE_LINK
+ if (found) {
+ for (k = 0; k < j; ++k) {
+ if (my_stat[j].st_dev == my_stat[k].st_dev
+ && my_stat[j].st_ino == my_stat[k].st_ino) {
+ found = FALSE;
+ break;
+ }
+ }
+ }
+#endif
+ if (!found) {
+ k = j;
+ while ((my_list[k] = my_list[k + 1]) != 0) {
+ ++k;
+ }
+ --j;
+ }
+ }
+ my_size = j;
+ my_time = time((time_t *) 0);
+ } else {
+ FreeAndNull(my_blob);
+ }
+ free(my_stat);
}
}
- return 0;
}
-NCURSES_EXPORT(void)
-_nc_first_db(DBDIRS * state, int *offset)
+#if NO_LEAKS
+void
+_nc_db_iterator_leaks(void)
{
- *state = dbdTIC;
- *offset = 0;
+ DBDIRS which;
+
+ if (my_blob != 0)
+ FreeAndNull(my_blob);
+ if (my_list != 0)
+ FreeAndNull(my_list);
+ for (which = 0; (int) which < dbdLAST; ++which) {
+ my_vars[which].name = 0;
+ FreeIfNeeded(my_vars[which].value);
+ my_vars[which].value = 0;
+ }
}
+#endif
diff --git a/ncurses/tinfo/doalloc.c b/ncurses/tinfo/doalloc.c
index fe2a009d19b4..7c502b09f9c1 100644
--- a/ncurses/tinfo/doalloc.c
+++ b/ncurses/tinfo/doalloc.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2000,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 *
@@ -39,7 +39,7 @@
#include <curses.priv.h>
-MODULE_ID("$Id: doalloc.c,v 1.8 2002/08/31 21:48:11 Philippe.Blain Exp $")
+MODULE_ID("$Id: doalloc.c,v 1.11 2012/11/03 19:27:41 tom Exp $")
NCURSES_EXPORT(void *)
_nc_doalloc(void *oldp, size_t amount)
@@ -56,20 +56,3 @@ _nc_doalloc(void *oldp, size_t amount)
}
return newp;
}
-
-#if !HAVE_STRDUP
-NCURSES_EXPORT(char *)
-_nc_strdup(const char *src)
-{
- char *dst;
- if (src != 0) {
- dst = typeMalloc(char, strlen(src) + 1);
- if (dst != 0) {
- (void) strcpy(dst, src);
- }
- } else {
- dst = 0;
- }
- return dst;
-}
-#endif
diff --git a/ncurses/tinfo/entries.c b/ncurses/tinfo/entries.c
index b1e14a803f31..e84033d47f1d 100644
--- a/ncurses/tinfo/entries.c
+++ b/ncurses/tinfo/entries.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2006-2009,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 2006-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 *
@@ -37,7 +37,7 @@
#include <tic.h>
-MODULE_ID("$Id: entries.c,v 1.17 2010/01/23 17:57:43 tom Exp $")
+MODULE_ID("$Id: entries.c,v 1.21 2012/05/05 20:33:44 tom Exp $")
/****************************************************************************
*
@@ -96,6 +96,9 @@ _nc_delink_entry(ENTRY * headp, TERMTYPE *tterm)
if (last != 0) {
last->next = ep->next;
}
+ if (ep->next != 0) {
+ ep->next->last = last;
+ }
if (ep == _nc_head) {
_nc_head = ep->next;
}
@@ -128,19 +131,21 @@ _nc_leaks_tinfo(void)
_nc_free_entries(_nc_head);
_nc_get_type(0);
_nc_first_name(0);
+ _nc_db_iterator_leaks();
_nc_keyname_leaks();
#if BROKEN_LINKER || USE_REENTRANT
_nc_names_leaks();
_nc_codes_leaks();
FreeIfNeeded(_nc_prescreen.real_acs_map);
#endif
+ _nc_comp_error_leaks();
if ((s = _nc_home_terminfo()) != 0)
free(s);
#ifdef TRACE
trace(0);
- _nc_trace_buf(-1, 0);
+ _nc_trace_buf(-1, (size_t) 0);
#endif
#endif /* NO_LEAKS */
diff --git a/ncurses/tinfo/getenv_num.c b/ncurses/tinfo/getenv_num.c
index a90cc08d297c..d5e35cb46638 100644
--- a/ncurses/tinfo/getenv_num.c
+++ b/ncurses/tinfo/getenv_num.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998,2000 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 *
@@ -36,7 +36,7 @@
#include <curses.priv.h>
-MODULE_ID("$Id: getenv_num.c,v 1.3 2000/12/10 02:55:07 tom Exp $")
+MODULE_ID("$Id: getenv_num.c,v 1.6 2013/09/28 20:25:08 tom Exp $")
NCURSES_EXPORT(int)
_nc_getenv_num(const char *name)
@@ -54,3 +54,20 @@ _nc_getenv_num(const char *name)
return (int) value;
}
+
+NCURSES_EXPORT(void)
+_nc_setenv_num(const char *name, int value)
+{
+ if (name != 0 && value >= 0) {
+ char buffer[128];
+#if HAVE_SETENV
+ _nc_SPRINTF(buffer, _nc_SLIMIT(sizeof(buffer)) "%d", value);
+ setenv(name, buffer, 1);
+#elif HAVE_PUTENV
+ char *s;
+ _nc_SPRINTF(buffer, _nc_SLIMIT(sizeof(buffer)) "%s=%d", name, value);
+ if ((s = strdup(buffer)) != 0)
+ putenv(s);
+#endif
+ }
+}
diff --git a/ncurses/tinfo/hashed_db.c b/ncurses/tinfo/hashed_db.c
index bf7a968ee96d..b59420585eac 100644
--- a/ncurses/tinfo/hashed_db.c
+++ b/ncurses/tinfo/hashed_db.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2006,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 2006-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 *
@@ -36,12 +36,81 @@
#if USE_HASHED_DB
-MODULE_ID("$Id: hashed_db.c,v 1.14 2008/12/13 20:59:02 tom Exp $")
+MODULE_ID("$Id: hashed_db.c,v 1.17 2013/12/15 00:33:01 tom Exp $")
#if HASHED_DB_API >= 2
static DBC *cursor;
#endif
+typedef struct _myconn {
+ struct _myconn *next;
+ DB *db;
+ char *path;
+ bool modify;
+} MYCONN;
+
+static MYCONN *connections;
+
+static void
+cleanup(void)
+{
+ while (connections != 0) {
+ _nc_db_close(connections->db);
+ }
+}
+
+static DB *
+find_connection(const char *path, bool modify)
+{
+ DB *result = 0;
+ MYCONN *p;
+
+ for (p = connections; p != 0; p = p->next) {
+ if (!strcmp(p->path, path) && p->modify == modify) {
+ result = p->db;
+ break;
+ }
+ }
+
+ return result;
+}
+
+static void
+drop_connection(DB * db)
+{
+ MYCONN *p, *q;
+
+ for (p = connections, q = 0; p != 0; q = p, p = p->next) {
+ if (p->db == db) {
+ if (q != 0)
+ q->next = p->next;
+ else
+ connections = p->next;
+ free(p->path);
+ free(p);
+ break;
+ }
+ }
+}
+
+static void
+make_connection(DB * db, const char *path, bool modify)
+{
+ MYCONN *p = typeCalloc(MYCONN, 1);
+
+ if (p != 0) {
+ p->db = db;
+ p->path = strdup(path);
+ p->modify = modify;
+ if (p->path != 0) {
+ p->next = connections;
+ connections = p;
+ } else {
+ free(p);
+ }
+ }
+}
+
/*
* Open the database.
*/
@@ -51,50 +120,57 @@ _nc_db_open(const char *path, bool modify)
DB *result = 0;
int code;
+ if (connections == 0)
+ atexit(cleanup);
+
+ if ((result = find_connection(path, modify)) == 0) {
+
#if HASHED_DB_API >= 4
- db_create(&result, NULL, 0);
- if ((code = result->open(result,
- NULL,
- path,
- NULL,
- DB_HASH,
- modify ? DB_CREATE : DB_RDONLY,
- 0644)) != 0) {
- result = 0;
- }
+ db_create(&result, NULL, 0);
+ if ((code = result->open(result,
+ NULL,
+ path,
+ NULL,
+ DB_HASH,
+ modify ? DB_CREATE : DB_RDONLY,
+ 0644)) != 0) {
+ result = 0;
+ }
#elif HASHED_DB_API >= 3
- db_create(&result, NULL, 0);
- if ((code = result->open(result,
- path,
- NULL,
- DB_HASH,
- modify ? DB_CREATE : DB_RDONLY,
- 0644)) != 0) {
- result = 0;
- }
+ db_create(&result, NULL, 0);
+ if ((code = result->open(result,
+ path,
+ NULL,
+ DB_HASH,
+ modify ? DB_CREATE : DB_RDONLY,
+ 0644)) != 0) {
+ result = 0;
+ }
#elif HASHED_DB_API >= 2
- if ((code = db_open(path,
- DB_HASH,
- modify ? DB_CREATE : DB_RDONLY,
- 0644,
- (DB_ENV *) 0,
- (DB_INFO *) 0,
- &result)) != 0) {
- result = 0;
- }
+ if ((code = db_open(path,
+ DB_HASH,
+ modify ? DB_CREATE : DB_RDONLY,
+ 0644,
+ (DB_ENV *) 0,
+ (DB_INFO *) 0,
+ &result)) != 0) {
+ result = 0;
+ }
#else
- if ((result = dbopen(path,
- modify ? (O_CREAT | O_RDWR) : O_RDONLY,
- 0644,
- DB_HASH,
- NULL)) == 0) {
- code = errno;
- }
+ if ((result = dbopen(path,
+ modify ? (O_CREAT | O_RDWR) : O_RDONLY,
+ 0644,
+ DB_HASH,
+ NULL)) == 0) {
+ code = errno;
+ }
#endif
- if (result != 0) {
- T(("opened %s", path));
- } else {
- T(("cannot open %s: %s", path, strerror(code)));
+ if (result != 0) {
+ make_connection(result, path, modify);
+ T(("opened %s", path));
+ } else {
+ T(("cannot open %s: %s", path, strerror(code)));
+ }
}
return result;
}
@@ -107,6 +183,7 @@ _nc_db_close(DB * db)
{
int result;
+ drop_connection(db);
#if HASHED_DB_API >= 2
result = db->close(db, 0);
#else
@@ -209,7 +286,7 @@ NCURSES_EXPORT(bool)
_nc_db_have_index(DBT * key, DBT * data, char **buffer, int *size)
{
bool result = FALSE;
- int used = data->size - 1;
+ int used = (int) data->size - 1;
char *have = (char *) data->data;
(void) key;
@@ -232,7 +309,7 @@ NCURSES_EXPORT(bool)
_nc_db_have_data(DBT * key, DBT * data, char **buffer, int *size)
{
bool result = FALSE;
- int used = data->size - 1;
+ int used = (int) data->size - 1;
char *have = (char *) data->data;
if (*have++ == 0) {
diff --git a/ncurses/tinfo/home_terminfo.c b/ncurses/tinfo/home_terminfo.c
index 69d69f95bf7c..e77f71c2aeb1 100644
--- a/ncurses/tinfo/home_terminfo.c
+++ b/ncurses/tinfo/home_terminfo.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2008,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-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 *
@@ -37,7 +37,7 @@
#include <curses.priv.h>
#include <tic.h>
-MODULE_ID("$Id: home_terminfo.c,v 1.12 2010/12/25 23:43:58 tom Exp $")
+MODULE_ID("$Id: home_terminfo.c,v 1.15 2012/10/27 21:49:14 tom Exp $")
/* ncurses extension...fall back on user's private directory */
@@ -54,10 +54,8 @@ _nc_home_terminfo(void)
if (MyBuffer == 0) {
if ((home = getenv("HOME")) != 0) {
size_t want = (strlen(home) + sizeof(PRIVATE_INFO));
- MyBuffer = typeMalloc(char, want);
- if (MyBuffer == 0)
- _nc_err_abort(MSG_NO_MEMORY);
- (void) sprintf(MyBuffer, PRIVATE_INFO, home);
+ TYPE_MALLOC(char, want, MyBuffer);
+ _nc_SPRINTF(MyBuffer, _nc_SLIMIT(want) PRIVATE_INFO, home);
}
}
result = MyBuffer;
diff --git a/ncurses/tinfo/lib_acs.c b/ncurses/tinfo/lib_acs.c
index d8fdedca843f..704eda5c9a29 100644
--- a/ncurses/tinfo/lib_acs.c
+++ b/ncurses/tinfo/lib_acs.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * 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 *
@@ -39,7 +39,7 @@
#define CUR SP_TERMTYPE
#endif
-MODULE_ID("$Id: lib_acs.c,v 1.43 2010/12/25 23:00:45 tom Exp $")
+MODULE_ID("$Id: lib_acs.c,v 1.44 2013/01/12 17:24:42 tom Exp $")
#if BROKEN_LINKER || USE_REENTRANT
#define MyBuffer _nc_prescreen.real_acs_map
@@ -169,8 +169,7 @@ NCURSES_SP_NAME(_nc_init_acs) (NCURSES_SP_DCL0)
CallDriver_2(SP_PARM, initacs, real_map, fake_map);
#else
if (ena_acs != NULL) {
- TPUTS_TRACE("ena_acs");
- putp(ena_acs);
+ NCURSES_PUTP2("ena_acs", ena_acs);
}
#if NCURSES_EXT_FUNCS
/*
diff --git a/ncurses/tinfo/lib_baudrate.c b/ncurses/tinfo/lib_baudrate.c
index 9302f022b89c..252d03c593d8 100644
--- a/ncurses/tinfo/lib_baudrate.c
+++ b/ncurses/tinfo/lib_baudrate.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * 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 *
@@ -49,7 +49,7 @@
* of the indices up to B115200 fit nicely in a 'short', allowing us to retain
* ospeed's type for compatibility.
*/
-#if (defined(__FreeBSD__) && (__FreeBSD_version < 700000)) || defined(__NetBSD__) || defined(__OpenBSD__)
+#if NCURSES_OSPEED_COMPAT && ((defined(__FreeBSD__) && (__FreeBSD_version < 700000)) || defined(__NetBSD__) || defined(__OpenBSD__))
#undef B0
#undef B50
#undef B75
@@ -79,7 +79,7 @@
#undef USE_OLD_TTY
#endif /* USE_OLD_TTY */
-MODULE_ID("$Id: lib_baudrate.c,v 1.31 2010/12/19 01:50:50 tom Exp $")
+MODULE_ID("$Id: lib_baudrate.c,v 1.34 2013/12/15 01:29:02 tom Exp $")
/*
* int
@@ -90,54 +90,55 @@ MODULE_ID("$Id: lib_baudrate.c,v 1.31 2010/12/19 01:50:50 tom Exp $")
*/
struct speed {
- int s; /* value for 'ospeed' is an index */
+ NCURSES_OSPEED s; /* values for 'ospeed' */
int sp; /* the actual speed */
};
+#define DATA(number) { B##number, number }
+
static struct speed const speeds[] =
{
- {B0, 0},
- {B50, 50},
- {B75, 75},
- {B110, 110},
- {B134, 134},
- {B150, 150},
- {B200, 200},
- {B300, 300},
- {B600, 600},
- {B1200, 1200},
- {B1800, 1800},
- {B2400, 2400},
- {B4800, 4800},
- {B9600, 9600},
+ DATA(0),
+ DATA(50),
+ DATA(75),
+ DATA(110),
+ DATA(134),
+ DATA(150),
+ DATA(200),
+ DATA(300),
+ DATA(600),
+ DATA(1200),
+ DATA(1800),
+ DATA(2400),
+ DATA(4800),
+ DATA(9600),
#ifdef B19200
- {B19200, 19200},
-#else
-#ifdef EXTA
+ DATA(19200),
+#elif defined(EXTA)
{EXTA, 19200},
#endif
-#endif
#ifdef B38400
- {B38400, 38400},
-#else
-#ifdef EXTB
+ DATA(38400),
+#elif defined(EXTB)
{EXTB, 38400},
#endif
-#endif
#ifdef B57600
- {B57600, 57600},
+ DATA(57600),
#endif
+ /* ifdef to prevent overflow when OLD_TTY is not available */
+#if !(NCURSES_OSPEED_COMPAT && defined(__FreeBSD__) && (__FreeBSD_version > 700000))
#ifdef B115200
- {B115200, 115200},
+ DATA(115200),
#endif
#ifdef B230400
- {B230400, 230400},
+ DATA(230400),
#endif
#ifdef B460800
- {B460800, 460800},
+ DATA(460800),
#endif
#ifdef B921600
- {B921600, 921600},
+ DATA(921600),
+#endif
#endif
};
@@ -167,7 +168,7 @@ _nc_baudrate(int OSpeed)
}
}
#if !USE_REENTRANT
- if (OSpeed == last_OSpeed) {
+ if (OSpeed != last_OSpeed) {
last_OSpeed = OSpeed;
last_baudrate = result;
}
@@ -219,8 +220,8 @@ NCURSES_SP_NAME(baudrate) (NCURSES_SP_DCL0)
if (IsValidTIScreen(SP_PARM)) {
#ifdef USE_OLD_TTY
- result = cfgetospeed(&(TerminalOf(SP_PARM)->Nttyb));
- ospeed = _nc_ospeed(result);
+ result = (int) cfgetospeed(&(TerminalOf(SP_PARM)->Nttyb));
+ ospeed = (NCURSES_OSPEED) _nc_ospeed(result);
#else /* !USE_OLD_TTY */
#ifdef TERMIOS
ospeed = (NCURSES_OSPEED) cfgetospeed(&(TerminalOf(SP_PARM)->Nttyb));
diff --git a/ncurses/tinfo/lib_cur_term.c b/ncurses/tinfo/lib_cur_term.c
index 86e130e78527..eaaacbcbe51f 100644
--- a/ncurses/tinfo/lib_cur_term.c
+++ b/ncurses/tinfo/lib_cur_term.c
@@ -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 *
@@ -39,14 +39,12 @@
#include <curses.priv.h>
#include <termcap.h> /* ospeed */
-MODULE_ID("$Id: lib_cur_term.c,v 1.30 2010/12/19 01:38:45 tom Exp $")
+MODULE_ID("$Id: lib_cur_term.c,v 1.32 2013/10/28 00:10:27 tom Exp $")
#undef CUR
#define CUR termp->type.
-#if BROKEN_LINKER && !USE_REENTRANT
-NCURSES_EXPORT_VAR(TERMINAL *) cur_term = 0;
-#elif BROKEN_LINKER || USE_REENTRANT
+#if USE_REENTRANT
NCURSES_EXPORT(TERMINAL *)
NCURSES_SP_NAME(_nc_get_cur_term) (NCURSES_SP_DCL0)
@@ -55,6 +53,7 @@ NCURSES_SP_NAME(_nc_get_cur_term) (NCURSES_SP_DCL0)
}
#if NCURSES_SP_FUNCS
+
NCURSES_EXPORT(TERMINAL *)
_nc_get_cur_term(void)
{
@@ -87,10 +86,10 @@ NCURSES_SP_NAME(set_curterm) (NCURSES_SP_DCLx TERMINAL * termp)
oldterm = cur_term;
if (SP_PARM)
SP_PARM->_term = termp;
-#if BROKEN_LINKER && !USE_REENTRANT
- cur_term = termp;
-#else
+#if USE_REENTRANT
CurTerm = termp;
+#else
+ cur_term = termp;
#endif
if (termp != 0) {
#ifdef USE_TERM_DRIVER
@@ -133,9 +132,7 @@ NCURSES_SP_NAME(del_curterm) (NCURSES_SP_DCLx TERMINAL * termp)
TERMINAL_CONTROL_BLOCK *TCB = (TERMINAL_CONTROL_BLOCK *) termp;
#endif
TERMINAL *cur = (
-#if BROKEN_LINKER && !USE_REENTRANT
- cur_term
-#elif BROKEN_LINKER || USE_REENTRANT
+#if USE_REENTRANT
NCURSES_SP_NAME(_nc_get_cur_term) (NCURSES_SP_ARG)
#else
cur_term
@@ -148,8 +145,9 @@ NCURSES_SP_NAME(del_curterm) (NCURSES_SP_DCLx TERMINAL * termp)
FreeIfNeeded(termp->_termname);
#if USE_HOME_TERMINFO
- if (_nc_globals.home_terminfo != 0)
+ if (_nc_globals.home_terminfo != 0) {
FreeAndNull(_nc_globals.home_terminfo);
+ }
#endif
#ifdef USE_TERM_DRIVER
if (TCB->drv)
diff --git a/ncurses/tinfo/lib_data.c b/ncurses/tinfo/lib_data.c
index 195ddf978ab6..06b6f88077e4 100644
--- a/ncurses/tinfo/lib_data.c
+++ b/ncurses/tinfo/lib_data.c
@@ -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 *
@@ -42,7 +42,7 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_data.c,v 1.61 2010/05/15 22:06:56 tom Exp $")
+MODULE_ID("$Id: lib_data.c,v 1.66 2013/08/24 17:28:24 tom Exp $")
/*
* OS/2's native linker complains if we don't initialize public data when
@@ -114,6 +114,7 @@ NCURSES_EXPORT_VAR(SCREEN *) SP = NULL; /* Some linkers require initialized data
#define TGETENT_0s { TGETENT_0, TGETENT_0, TGETENT_0, TGETENT_0 }
NCURSES_EXPORT_VAR(NCURSES_GLOBALS) _nc_globals = {
+ 0, /* have_sigtstp */
0, /* have_sigwinch */
0, /* cleanup_nested */
@@ -125,13 +126,14 @@ NCURSES_EXPORT_VAR(NCURSES_GLOBALS) _nc_globals = {
FALSE, /* have_tic_directory */
FALSE, /* keep_tic_directory */
- TERMINFO, /* tic_directory */
+ 0, /* tic_directory */
NULL, /* dbi_list */
0, /* dbi_size */
NULL, /* first_name */
NULL, /* keyname_table */
+ 0, /* init_keyname */
0, /* slk_format */
@@ -142,6 +144,12 @@ NCURSES_EXPORT_VAR(NCURSES_GLOBALS) _nc_globals = {
0, /* tgetent_index */
0, /* tgetent_sequence */
+ 0, /* dbd_blob */
+ 0, /* dbd_list */
+ 0, /* dbd_size */
+ 0, /* dbd_time */
+ { { 0, 0 } }, /* dbd_vars */
+
#ifndef USE_SP_WINDOWLIST
0, /* _nc_windowlist */
#endif
@@ -249,6 +257,7 @@ NCURSES_EXPORT_VAR(NCURSES_PRESCREEN) _nc_prescreen = {
NULL, /* _tputs_trace */
#endif
#endif
+ FALSE, /* use_tioctl */
};
/* *INDENT-ON* */
diff --git a/ncurses/tinfo/lib_has_cap.c b/ncurses/tinfo/lib_has_cap.c
index d1b9b8d966da..17e59d535173 100644
--- a/ncurses/tinfo/lib_has_cap.c
+++ b/ncurses/tinfo/lib_has_cap.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2009 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,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 *
@@ -46,7 +46,7 @@
#define CUR SP_TERMTYPE
#endif
-MODULE_ID("$Id: lib_has_cap.c,v 1.9 2009/10/24 22:15:47 tom Exp $")
+MODULE_ID("$Id: lib_has_cap.c,v 1.10 2013/11/16 19:57:22 tom Exp $")
NCURSES_EXPORT(bool)
NCURSES_SP_NAME(has_ic) (NCURSES_SP_DCL0)
@@ -55,7 +55,7 @@ NCURSES_SP_NAME(has_ic) (NCURSES_SP_DCL0)
T((T_CALLED("has_ic(%p)"), (void *) SP_PARM));
- if (IsValidTIScreen(SP_PARM) && IsTermInfo(SP_PARM)) {
+ if (HasTInfoTerminal(SP_PARM)) {
code = ((insert_character || parm_ich
|| (enter_insert_mode && exit_insert_mode))
&& (delete_character || parm_dch)) ? TRUE : FALSE;
@@ -77,7 +77,7 @@ NCURSES_SP_NAME(has_il) (NCURSES_SP_DCL0)
{
bool code = FALSE;
T((T_CALLED("has_il(%p)"), (void *) SP_PARM));
- if (IsValidTIScreen(SP_PARM) && IsTermInfo(SP_PARM)) {
+ if (HasTInfoTerminal(SP_PARM)) {
code = ((insert_line || parm_insert_line)
&& (delete_line || parm_delete_line)) ? TRUE : FALSE;
}
diff --git a/ncurses/tinfo/lib_napms.c b/ncurses/tinfo/lib_napms.c
index 1e6abda10d09..36f1d25b8057 100644
--- a/ncurses/tinfo/lib_napms.c
+++ b/ncurses/tinfo/lib_napms.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2008,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 *
@@ -51,17 +51,21 @@
#endif
#endif
-MODULE_ID("$Id: lib_napms.c,v 1.20 2009/11/07 20:37:30 tom Exp $")
+MODULE_ID("$Id: lib_napms.c,v 1.23 2012/06/30 22:08:24 tom Exp $")
NCURSES_EXPORT(int)
NCURSES_SP_NAME(napms) (NCURSES_SP_DCLx int ms)
{
- (void) SP_PARM;
T((T_CALLED("napms(%d)"), ms));
#ifdef USE_TERM_DRIVER
- CallDriver_1(SP_PARM, nap, ms);
+ if (HasTerminal(SP_PARM)) {
+ CallDriver_1(SP_PARM, nap, ms);
+ }
#else /* !USE_TERM_DRIVER */
+#if NCURSES_SP_FUNCS
+ (void) sp;
+#endif
#if HAVE_NANOSLEEP
{
struct timespec request, remaining;
diff --git a/ncurses/tinfo/lib_options.c b/ncurses/tinfo/lib_options.c
index 654bf940aa1f..e1cda4ebb61a 100644
--- a/ncurses/tinfo/lib_options.c
+++ b/ncurses/tinfo/lib_options.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2011,2013 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -46,7 +46,7 @@
#define CUR SP_TERMTYPE
#endif
-MODULE_ID("$Id: lib_options.c,v 1.71 2009/10/24 21:56:15 tom Exp $")
+MODULE_ID("$Id: lib_options.c,v 1.76 2013/12/14 22:23:58 tom Exp $")
NCURSES_EXPORT(int)
idlok(WINDOW *win, bool flag)
@@ -56,7 +56,11 @@ idlok(WINDOW *win, bool flag)
if (win) {
SCREEN *sp = _nc_screen_of(win);
- if (sp && IsTermInfo(sp)) {
+ if (sp != 0
+#ifdef USE_TERM_DRIVER
+ && IsTermInfo(sp)
+#endif
+ ) {
sp->_nc_sp_idlok =
win->_idlok = (flag && (NCURSES_SP_NAME(has_il) (NCURSES_SP_ARG)
|| change_scroll_region));
@@ -165,16 +169,16 @@ meta(WINDOW *win GCC_UNUSED, bool flag)
#ifdef USE_TERM_DRIVER
if (IsTermInfo(sp)) {
if (flag) {
- NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx "meta_on", meta_on);
+ NCURSES_PUTP2("meta_on", meta_on);
} else {
- NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx "meta_off", meta_off);
+ NCURSES_PUTP2("meta_off", meta_off);
}
}
#else
if (flag) {
- NCURSES_SP_NAME(_nc_putp) (NCURSES_SP