- Timestamp:
- Sep 12, 2009, 8:55:54 AM (15 years ago)
- Branches:
- clfs-1.2, clfs-2.1, clfs-3.0.0-systemd, clfs-3.0.0-sysvinit, master, systemd, sysvinit
- Children:
- 0cbb4b7
- Parents:
- badccbe
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
patches/ncurses-5.7-branch_update-20.patch
rbadccbe r18eabd2 1 1 Submitted By: Jim Gifford (jim at cross-lfs dot org) 2 Date: 0 7-19-20092 Date: 09-12-2009 3 3 Initial Package Version: 5.7 4 4 Origin: Upstream 5 5 Upstream Status: Applied 6 6 Description: This is a branch update for NCurses-5.7, and should be 7 rechecked periodically. This patch covers up to 5.7-20090 718.7 rechecked periodically. This patch covers up to 5.7-20090906. 8 8 9 9 diff -Naur ncurses-5.7.orig/aclocal.m4 ncurses-5.7/aclocal.m4 10 10 --- ncurses-5.7.orig/aclocal.m4 2008-10-25 15:15:32.000000000 -0700 11 +++ ncurses-5.7/aclocal.m4 2009-0 7-19 15:04:17.000000000 -070011 +++ ncurses-5.7/aclocal.m4 2009-09-12 08:51:54.000000000 -0700 12 12 @@ -1,5 +1,5 @@ 13 13 dnl*************************************************************************** … … 966 966 diff -Naur ncurses-5.7.orig/Ada95/gen/adacurses-config.in ncurses-5.7/Ada95/gen/adacurses-config.in 967 967 --- ncurses-5.7.orig/Ada95/gen/adacurses-config.in 2007-04-07 14:06:50.000000000 -0700 968 +++ ncurses-5.7/Ada95/gen/adacurses-config.in 2009-0 7-19 15:02:13.000000000 -0700968 +++ ncurses-5.7/Ada95/gen/adacurses-config.in 2009-09-12 08:51:08.000000000 -0700 969 969 @@ -1,18 +1,47 @@ 970 970 #! /bin/sh … … 1040 1040 diff -Naur ncurses-5.7.orig/Ada95/gen/gen.c ncurses-5.7/Ada95/gen/gen.c 1041 1041 --- ncurses-5.7.orig/Ada95/gen/gen.c 2008-10-04 14:59:37.000000000 -0700 1042 +++ ncurses-5.7/Ada95/gen/gen.c 2009-0 7-19 15:03:45.000000000 -07001042 +++ ncurses-5.7/Ada95/gen/gen.c 2009-09-12 08:51:23.000000000 -0700 1043 1043 @@ -1,5 +1,5 @@ 1044 1044 /**************************************************************************** … … 1079 1079 diff -Naur ncurses-5.7.orig/Ada95/gen/Makefile.in ncurses-5.7/Ada95/gen/Makefile.in 1080 1080 --- ncurses-5.7.orig/Ada95/gen/Makefile.in 2008-10-04 15:58:31.000000000 -0700 1081 +++ ncurses-5.7/Ada95/gen/Makefile.in 2009-0 7-19 15:02:13.000000000 -07001081 +++ ncurses-5.7/Ada95/gen/Makefile.in 2009-09-12 08:51:08.000000000 -0700 1082 1082 @@ -1,5 +1,5 @@ 1083 1083 ############################################################################## … … 1135 1135 diff -Naur ncurses-5.7.orig/Ada95/samples/Makefile.in ncurses-5.7/Ada95/samples/Makefile.in 1136 1136 --- ncurses-5.7.orig/Ada95/samples/Makefile.in 2006-12-17 08:45:02.000000000 -0800 1137 +++ ncurses-5.7/Ada95/samples/Makefile.in 2009-0 7-19 15:02:13.000000000 -07001137 +++ ncurses-5.7/Ada95/samples/Makefile.in 2009-09-12 08:51:08.000000000 -0700 1138 1138 @@ -1,5 +1,5 @@ 1139 1139 ############################################################################## … … 1174 1174 diff -Naur ncurses-5.7.orig/Ada95/src/Makefile.in ncurses-5.7/Ada95/src/Makefile.in 1175 1175 --- ncurses-5.7.orig/Ada95/src/Makefile.in 2007-09-15 11:22:24.000000000 -0700 1176 +++ ncurses-5.7/Ada95/src/Makefile.in 2009-0 7-19 15:02:13.000000000 -07001176 +++ ncurses-5.7/Ada95/src/Makefile.in 2009-09-12 08:51:08.000000000 -0700 1177 1177 @@ -1,5 +1,5 @@ 1178 1178 ############################################################################## … … 1266 1266 diff -Naur ncurses-5.7.orig/Ada95/src/terminal_interface-curses-mouse.adb ncurses-5.7/Ada95/src/terminal_interface-curses-mouse.adb 1267 1267 --- ncurses-5.7.orig/Ada95/src/terminal_interface-curses-mouse.adb 2008-07-26 11:51:11.000000000 -0700 1268 +++ ncurses-5.7/Ada95/src/terminal_interface-curses-mouse.adb 2009-0 7-19 15:01:57.000000000 -07001268 +++ ncurses-5.7/Ada95/src/terminal_interface-curses-mouse.adb 2009-09-12 08:50:52.000000000 -0700 1269 1269 @@ -35,8 +35,8 @@ 1270 1270 ------------------------------------------------------------------------------ … … 1289 1289 diff -Naur ncurses-5.7.orig/c++/cursesw.cc ncurses-5.7/c++/cursesw.cc 1290 1290 --- ncurses-5.7.orig/c++/cursesw.cc 2007-12-15 15:01:57.000000000 -0800 1291 +++ ncurses-5.7/c++/cursesw.cc 2009-0 7-19 15:03:48.000000000 -07001291 +++ ncurses-5.7/c++/cursesw.cc 2009-09-12 08:51:25.000000000 -0700 1292 1292 @@ -1,6 +1,6 @@ 1293 1293 // * this is for making emacs happy: -*-Mode: C++;-*- … … 1336 1336 diff -Naur ncurses-5.7.orig/c++/demo.cc ncurses-5.7/c++/demo.cc 1337 1337 --- ncurses-5.7.orig/c++/demo.cc 2008-08-04 10:16:57.000000000 -0700 1338 +++ ncurses-5.7/c++/demo.cc 2009-0 7-19 15:03:58.000000000 -07001338 +++ ncurses-5.7/c++/demo.cc 2009-09-12 08:51:35.000000000 -0700 1339 1339 @@ -35,7 +35,7 @@ 1340 1340 * Demo code for NCursesMenu and NCursesForm written by … … 1362 1362 diff -Naur ncurses-5.7.orig/c++/internal.h ncurses-5.7/c++/internal.h 1363 1363 --- ncurses-5.7.orig/c++/internal.h 2008-10-25 14:35:44.000000000 -0700 1364 +++ ncurses-5.7/c++/internal.h 2009-0 7-19 15:03:58.000000000 -07001364 +++ ncurses-5.7/c++/internal.h 2009-09-12 08:51:35.000000000 -0700 1365 1365 @@ -31,7 +31,7 @@ 1366 1366 * Author: Juergen Pfeifer, 1997 * … … 1386 1386 diff -Naur ncurses-5.7.orig/c++/Makefile.in ncurses-5.7/c++/Makefile.in 1387 1387 --- ncurses-5.7.orig/c++/Makefile.in 2007-04-28 08:29:12.000000000 -0700 1388 +++ ncurses-5.7/c++/Makefile.in 2009-0 7-19 15:03:48.000000000 -07001388 +++ ncurses-5.7/c++/Makefile.in 2009-09-12 08:51:25.000000000 -0700 1389 1389 @@ -1,6 +1,6 @@ 1390 1390 -# $Id: Makefile.in,v 1.84 2007/04/28 15:29:12 tom Exp $ … … 1444 1444 diff -Naur ncurses-5.7.orig/config.guess ncurses-5.7/config.guess 1445 1445 --- ncurses-5.7.orig/config.guess 2008-08-30 13:25:07.000000000 -0700 1446 +++ ncurses-5.7/config.guess 2009-0 7-19 15:02:08.000000000 -07001446 +++ ncurses-5.7/config.guess 2009-09-12 08:51:04.000000000 -0700 1447 1447 @@ -4,7 +4,7 @@ 1448 1448 # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 … … 1514 1514 diff -Naur ncurses-5.7.orig/config.sub ncurses-5.7/config.sub 1515 1515 --- ncurses-5.7.orig/config.sub 2008-08-30 13:25:02.000000000 -0700 1516 +++ ncurses-5.7/config.sub 2009-0 7-19 15:02:08.000000000 -07001516 +++ ncurses-5.7/config.sub 2009-09-12 08:51:04.000000000 -0700 1517 1517 @@ -4,7 +4,7 @@ 1518 1518 # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 … … 1598 1598 diff -Naur ncurses-5.7.orig/configure ncurses-5.7/configure 1599 1599 --- ncurses-5.7.orig/configure 2008-10-25 17:04:38.000000000 -0700 1600 +++ ncurses-5.7/configure 2009-0 7-19 15:04:17.000000000 -07001600 +++ ncurses-5.7/configure 2009-09-12 08:52:04.000000000 -0700 1601 1601 @@ -1,7 +1,7 @@ 1602 1602 #! /bin/sh 1603 1603 -# From configure.in Revision: 1.454 . 1604 +# From configure.in Revision: 1.47 2.1604 +# From configure.in Revision: 1.473 . 1605 1605 # Guess values for system-dependent variables and create Makefiles. 1606 1606 -# Generated by Autoconf 2.52.20080325. … … 3904 3904 +break 3905 3905 +done 3906 3907 -echo "$as_me:3831: checking for archiver options (symbol AR_OPTS)" >&5 3908 -echo $ECHO_N "checking for archiver options (symbol AR_OPTS)... $ECHO_C" >&6 3906 + 3909 3907 +fi 3910 3908 +fi … … 3918 3916 +fi 3919 3917 3920 - if test -z "$AR_OPTS" ; then3921 - AR_OPTS=rv3918 -echo "$as_me:3831: checking for archiver options (symbol AR_OPTS)" >&5 3919 -echo $ECHO_N "checking for archiver options (symbol AR_OPTS)... $ECHO_C" >&6 3922 3920 +fi 3923 3921 +if test -z "$ac_cv_prog_AR"; then … … 3944 3942 +done 3945 3943 3944 -if test -z "$AR_OPTS" ; then 3945 - AR_OPTS=rv 3946 3946 + test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar" 3947 3947 +fi 3948 3948 +fi 3949 3949 +ac_ct_AR=$ac_cv_prog_ac_ct_AR 3950 3950 +if test -n "$ac_ct_AR"; then … … 3955 3955 +echo "${ECHO_T}no" >&6 3956 3956 +fi 3957 + 3957 3958 3958 + AR=$ac_ct_AR 3959 3959 +else 3960 3960 + AR="$ac_cv_prog_AR" 3961 +fi 3962 + 3961 fi 3962 3963 -cf_cv_subst_AR_OPTS=$AR_OPTS 3964 -echo "$as_me:3840: result: $AR_OPTS" >&5 3965 -echo "${ECHO_T}$AR_OPTS" >&6 3963 3966 +echo "$as_me:4049: checking for options to update archives" >&5 3964 3967 +echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6 … … 3989 3992 + else 3990 3993 + test -n "$verbose" && echo " cannot compile test-program" 1>&6 3991 3992 -cf_cv_subst_AR_OPTS=$AR_OPTS 3993 -echo "$as_me:3840: result: $AR_OPTS" >&5 3994 -echo "${ECHO_T}$AR_OPTS" >&6 3994 + 3995 3995 +echo "${as_me-configure}:4078: testing cannot compile test-program ..." 1>&5 3996 3996 + … … 5265 5265 5266 5266 if test "$use_database" != no ; then 5267 @@ -5393, 7 +5690,7@@5267 @@ -5393,18 +5690,18 @@ 5268 5268 #define USE_DATABASE 1 5269 5269 EOF … … 5273 5273 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6 5274 5274 5275 # Check whether --enable-database or --disable-database was given. 5276 @@ -5401,10 +5698,10 @@ 5277 enableval="$enable_database" 5275 -# Check whether --enable-database or --disable-database was given. 5276 -if test "${enable_database+set}" = set; then 5277 - enableval="$enable_database" 5278 +# Check whether --with-database or --without-database was given. 5279 +if test "${with_database+set}" = set; then 5280 + withval="$with_database" 5278 5281 TERMINFO_SRC=$withval 5279 5282 fi; … … 13420 13423 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t 13421 13424 s,@gnat_exists@,$gnat_exists,;t t 13422 @@ -17493,6 +17964, 7@@13425 @@ -17493,6 +17964,8 @@ 13423 13426 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t 13424 13427 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t 13425 13428 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t 13426 13429 +s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t 13430 +s,@cross_compiling@,$cross_compiling,;t t 13427 13431 CEOF 13428 13432 13429 13433 EOF 13430 @@ -17607,7 +180 79,7 @@13434 @@ -17607,7 +18080,7 @@ 13431 13435 esac 13432 13436 13433 13437 if test x"$ac_file" != x-; then 13434 13438 - { echo "$as_me:17610: creating $ac_file" >&5 13435 + { echo "$as_me:1808 2: creating $ac_file" >&513439 + { echo "$as_me:18083: creating $ac_file" >&5 13436 13440 echo "$as_me: creating $ac_file" >&6;} 13437 13441 rm -f "$ac_file" 13438 13442 fi 13439 @@ -17625,7 +1809 7,7 @@13443 @@ -17625,7 +18098,7 @@ 13440 13444 -) echo $tmp/stdin ;; 13441 13445 [\\/$]*) 13442 13446 # Absolute (can't be DOS-style, as IFS=:) 13443 13447 - test -f "$f" || { { echo "$as_me:17628: error: cannot find input file: $f" >&5 13444 + test -f "$f" || { { echo "$as_me:1810 0: error: cannot find input file: $f" >&513448 + test -f "$f" || { { echo "$as_me:18101: error: cannot find input file: $f" >&5 13445 13449 echo "$as_me: error: cannot find input file: $f" >&2;} 13446 13450 { (exit 1); exit 1; }; } 13447 13451 echo $f;; 13448 @@ -17638,7 +1811 0,7 @@13452 @@ -17638,7 +18111,7 @@ 13449 13453 echo $srcdir/$f 13450 13454 else 13451 13455 # /dev/null tree 13452 13456 - { { echo "$as_me:17641: error: cannot find input file: $f" >&5 13453 + { { echo "$as_me:1811 3: error: cannot find input file: $f" >&513457 + { { echo "$as_me:18114: error: cannot find input file: $f" >&5 13454 13458 echo "$as_me: error: cannot find input file: $f" >&2;} 13455 13459 { (exit 1); exit 1; }; } 13456 13460 fi;; 13457 @@ -17704,7 +1817 6,7 @@13461 @@ -17704,7 +18177,7 @@ 13458 13462 * ) ac_file_in=$ac_file.in ;; 13459 13463 esac 13460 13464 13461 13465 - test x"$ac_file" != x- && { echo "$as_me:17707: creating $ac_file" >&5 13462 + test x"$ac_file" != x- && { echo "$as_me:181 79: creating $ac_file" >&513466 + test x"$ac_file" != x- && { echo "$as_me:18180: creating $ac_file" >&5 13463 13467 echo "$as_me: creating $ac_file" >&6;} 13464 13468 13465 13469 # First look for the input files in the build tree, otherwise in the 13466 @@ -17715,7 +1818 7,7 @@13470 @@ -17715,7 +18188,7 @@ 13467 13471 -) echo $tmp/stdin ;; 13468 13472 [\\/$]*) 13469 13473 # Absolute (can't be DOS-style, as IFS=:) 13470 13474 - test -f "$f" || { { echo "$as_me:17718: error: cannot find input file: $f" >&5 13471 + test -f "$f" || { { echo "$as_me:1819 0: error: cannot find input file: $f" >&513475 + test -f "$f" || { { echo "$as_me:18191: error: cannot find input file: $f" >&5 13472 13476 echo "$as_me: error: cannot find input file: $f" >&2;} 13473 13477 { (exit 1); exit 1; }; } 13474 13478 echo $f;; 13475 @@ -17728,7 +1820 0,7 @@13479 @@ -17728,7 +18201,7 @@ 13476 13480 echo $srcdir/$f 13477 13481 else 13478 13482 # /dev/null tree 13479 13483 - { { echo "$as_me:17731: error: cannot find input file: $f" >&5 13480 + { { echo "$as_me:1820 3: error: cannot find input file: $f" >&513484 + { { echo "$as_me:18204: error: cannot find input file: $f" >&5 13481 13485 echo "$as_me: error: cannot find input file: $f" >&2;} 13482 13486 { (exit 1); exit 1; }; } 13483 13487 fi;; 13484 @@ -17786,7 +1825 8,7 @@13488 @@ -17786,7 +18259,7 @@ 13485 13489 rm -f $tmp/in 13486 13490 if test x"$ac_file" != x-; then 13487 13491 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then 13488 13492 - { echo "$as_me:17789: $ac_file is unchanged" >&5 13489 + { echo "$as_me:1826 1: $ac_file is unchanged" >&513493 + { echo "$as_me:18262: $ac_file is unchanged" >&5 13490 13494 echo "$as_me: $ac_file is unchanged" >&6;} 13491 13495 else 13492 13496 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 13493 @@ -17873,40 +1834 5,44 @@13497 @@ -17873,40 +18346,44 @@ 13494 13498 for cf_item in $cf_LIST_MODELS 13495 13499 do … … 13547 13551 cf_depsuf=$cf_suffix 13548 13552 ;; 13549 @@ -18020,40 +1849 6,44 @@13553 @@ -18020,40 +18497,44 @@ 13550 13554 13551 13555 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%` … … 13603 13607 cf_depsuf=$cf_suffix 13604 13608 ;; 13605 @@ -18234,18 +1871 4,28 @@13609 @@ -18234,18 +18715,28 @@ 13606 13610 install.libs uninstall.libs \\ 13607 13611 install.data uninstall.data :: … … 13632 13636 if test -f $srcdir/$tack.h; then 13633 13637 cat >> Makefile <<CF_EOF 13634 @@ -18256,6 +1874 6,7 @@13638 @@ -18256,6 +18747,7 @@ 13635 13639 CF_EOF 13636 13640 fi … … 13642 13646 diff -Naur ncurses-5.7.orig/configure.in ncurses-5.7/configure.in 13643 13647 --- ncurses-5.7.orig/configure.in 2008-10-18 07:53:32.000000000 -0700 13644 +++ ncurses-5.7/configure.in 2009-0 7-19 15:04:17.000000000 -070013648 +++ ncurses-5.7/configure.in 2009-09-12 08:52:04.000000000 -0700 13645 13649 @@ -1,5 +1,5 @@ 13646 13650 dnl*************************************************************************** … … 13655 13659 dnl 13656 13660 -dnl $Id: configure.in,v 1.454 2008/10/18 14:53:32 tom Exp $ 13657 +dnl $Id: configure.in,v 1.47 2 2009/07/18 16:18:30 tom Exp $13661 +dnl $Id: configure.in,v 1.473 2009/08/15 16:28:00 tom Exp $ 13658 13662 dnl Process this file with autoconf to produce a configure script. 13659 13663 dnl … … 13663 13667 AC_PREREQ(2.13.20020210) 13664 13668 -AC_REVISION($Revision: 1.454 $) 13665 +AC_REVISION($Revision: 1.47 2$)13669 +AC_REVISION($Revision: 1.473 $) 13666 13670 AC_INIT(ncurses/base/lib_initscr.c) 13667 13671 AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin) … … 13722 13726 dnl Special option for use by system-builders: the install-prefix is used to 13723 13727 dnl adjust the location into which the actual install is done, so that an 13728 @@ -413,7 +445,7 @@ 13729 AC_DEFINE(USE_DATABASE) 13730 13731 AC_MSG_CHECKING(which terminfo source-file will be installed) 13732 - AC_ARG_ENABLE(database, 13733 + AC_ARG_WITH(database, 13734 [ --with-database=XXX specify terminfo source to install], 13735 [TERMINFO_SRC=$withval]) 13736 AC_MSG_RESULT($TERMINFO_SRC) 13724 13737 @@ -797,6 +829,15 @@ 13725 13738 [NCURSES_MMASK_T=auto]) … … 13925 13938 AC_DEFINE_UNQUOTED(NCURSES_VERSION_STRING, "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}") 13926 13939 13927 @@ -1765,11 +1860,2 3@@13940 @@ -1765,11 +1860,24 @@ 13928 13941 CF_SUBST_IF(["$ac_cv_header_termios_h" = yes], HAVE_TERMIOS_H, 1, 0) 13929 13942 … … 13942 13955 +fi 13943 13956 +AC_SUBST(MAKE_PC_FILES) 13957 +AC_SUBST(cross_compiling) 13944 13958 + 13945 13959 AC_OUTPUT( \ … … 13950 13964 include/unctrl.h \ 13951 13965 $SUB_MAKEFILES \ 13952 @@ -1796,13 +190 3,13 @@13966 @@ -1796,13 +1904,13 @@ 13953 13967 NCURSES_PATCH="$NCURSES_PATCH" 13954 13968 SRC_SUBDIRS="$SRC_SUBDIRS" … … 13967 13981 WITH_ECHO="$with_echo" 13968 13982 WITH_OVERWRITE="$with_overwrite" 13969 @@ -1821,6 +192 8,7 @@13983 @@ -1821,6 +1929,7 @@ 13970 13984 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix" 13971 13985 cf_cv_system_name="$cf_cv_system_name" … … 13977 13991 diff -Naur ncurses-5.7.orig/dist.mk ncurses-5.7/dist.mk 13978 13992 --- ncurses-5.7.orig/dist.mk 2008-11-01 17:58:38.000000000 -0700 13979 +++ ncurses-5.7/dist.mk 2009-0 7-19 15:04:17.000000000 -070013993 +++ ncurses-5.7/dist.mk 2009-09-12 08:52:10.000000000 -0700 13980 13994 @@ -25,7 +25,7 @@ 13981 13995 # use or other dealings in this Software without prior written # … … 13983 13997 ############################################################################## 13984 13998 -# $Id: dist.mk,v 1.671 2008/11/02 00:58:38 tom Exp $ 13985 +# $Id: dist.mk,v 1.7 09 2009/07/15 23:12:22tom Exp $13999 +# $Id: dist.mk,v 1.719 2009/09/06 14:11:10 tom Exp $ 13986 14000 # Makefile for creating ncurses distributions. 13987 14001 # … … 13992 14006 NCURSES_MINOR = 7 13993 14007 -NCURSES_PATCH = 20081102 13994 +NCURSES_PATCH = 20090 71814008 +NCURSES_PATCH = 20090906 13995 14009 13996 14010 # We don't append the patch to the version, since this only applies to releases … … 13998 14012 diff -Naur ncurses-5.7.orig/form/fld_def.c ncurses-5.7/form/fld_def.c 13999 14013 --- ncurses-5.7.orig/form/fld_def.c 2007-10-13 12:29:58.000000000 -0700 14000 +++ ncurses-5.7/form/fld_def.c 2009-0 7-19 15:02:23.000000000 -070014014 +++ ncurses-5.7/form/fld_def.c 2009-09-12 08:51:19.000000000 -0700 14001 14015 @@ -32,7 +32,7 @@ 14002 14016 … … 14020 14034 diff -Naur ncurses-5.7.orig/form/fld_newftyp.c ncurses-5.7/form/fld_newftyp.c 14021 14035 --- ncurses-5.7.orig/form/fld_newftyp.c 2007-10-13 12:30:55.000000000 -0700 14022 +++ ncurses-5.7/form/fld_newftyp.c 2009-0 7-19 15:03:51.000000000 -070014036 +++ ncurses-5.7/form/fld_newftyp.c 2009-09-12 08:51:28.000000000 -0700 14023 14037 @@ -1,5 +1,5 @@ 14024 14038 /**************************************************************************** … … 14051 14065 diff -Naur ncurses-5.7.orig/form/form.priv.h ncurses-5.7/form/form.priv.h 14052 14066 --- ncurses-5.7.orig/form/form.priv.h 2008-09-08 13:29:05.000000000 -0700 14053 +++ ncurses-5.7/form/form.priv.h 2009-0 7-19 15:03:51.000000000 -070014067 +++ ncurses-5.7/form/form.priv.h 2009-09-12 08:51:28.000000000 -0700 14054 14068 @@ -1,5 +1,5 @@ 14055 14069 /**************************************************************************** … … 14116 14130 diff -Naur ncurses-5.7.orig/form/frm_driver.c ncurses-5.7/form/frm_driver.c 14117 14131 --- ncurses-5.7.orig/form/frm_driver.c 2008-10-18 09:25:00.000000000 -0700 14118 +++ ncurses-5.7/form/frm_driver.c 2009-07-19 15:02:00.000000000 -0700 14132 +++ ncurses-5.7/form/frm_driver.c 2009-09-12 08:52:07.000000000 -0700 14133 @@ -1,5 +1,5 @@ 14134 /**************************************************************************** 14135 - * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. * 14136 + * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. * 14137 * * 14138 * Permission is hereby granted, free of charge, to any person obtaining a * 14139 * copy of this software and associated documentation files (the * 14119 14140 @@ -32,7 +32,7 @@ 14120 14141 … … 14122 14143 14123 14144 -MODULE_ID("$Id: frm_driver.c,v 1.88 2008/10/18 16:25:00 tom Exp $") 14124 +MODULE_ID("$Id: frm_driver.c,v 1. 89 2008/12/06 23:08:12tom Exp $")14145 +MODULE_ID("$Id: frm_driver.c,v 1.90 2009/08/29 19:02:25 tom Exp $") 14125 14146 14126 14147 /*---------------------------------------------------------------------------- 14127 14148 This is the core module of the form library. It contains the majority 14128 @@ -4366,6 +4366,7 @@ 14149 @@ -188,7 +188,7 @@ 14150 /* Macro to set the attributes for a fields window */ 14151 #define Set_Field_Window_Attributes(field,win) \ 14152 ( wbkgdset((win),(chtype)((field)->pad | (field)->back)), \ 14153 - wattrset((win),(field)->fore) ) 14154 + (void) wattrset((win),(field)->fore) ) 14155 14156 /* Logic to decide whether or not a field really appears on the form */ 14157 #define Field_Really_Appears(field) \ 14158 @@ -1073,9 +1073,13 @@ 14159 else 14160 { 14161 if (field->opts & O_VISIBLE) 14162 - Set_Field_Window_Attributes(field, win); 14163 + { 14164 + Set_Field_Window_Attributes(field, win); 14165 + } 14166 else 14167 - wattrset(win, WINDOW_ATTRS(fwin)); 14168 + { 14169 + (void)wattrset(win, WINDOW_ATTRS(fwin)); 14170 + } 14171 werase(win); 14172 } 14173 14174 @@ -4366,6 +4370,7 @@ 14129 14175 delwin(field->working); 14130 14176 field->working = newpad(field->drows, field->dcols); … … 14136 14182 diff -Naur ncurses-5.7.orig/form/frm_sub.c ncurses-5.7/form/frm_sub.c 14137 14183 --- ncurses-5.7.orig/form/frm_sub.c 2004-12-11 14:13:39.000000000 -0800 14138 +++ ncurses-5.7/form/frm_sub.c 2009-0 7-19 15:03:51.000000000 -070014184 +++ ncurses-5.7/form/frm_sub.c 2009-09-12 08:51:28.000000000 -0700 14139 14185 @@ -1,5 +1,5 @@ 14140 14186 /**************************************************************************** … … 14183 14229 diff -Naur ncurses-5.7.orig/form/frm_win.c ncurses-5.7/form/frm_win.c 14184 14230 --- ncurses-5.7.orig/form/frm_win.c 2004-12-11 14:15:27.000000000 -0800 14185 +++ ncurses-5.7/form/frm_win.c 2009-0 7-19 15:03:53.000000000 -070014231 +++ ncurses-5.7/form/frm_win.c 2009-09-12 08:51:30.000000000 -0700 14186 14232 @@ -1,5 +1,5 @@ 14187 14233 /**************************************************************************** … … 14244 14290 diff -Naur ncurses-5.7.orig/form/fty_generic.c ncurses-5.7/form/fty_generic.c 14245 14291 --- ncurses-5.7.orig/form/fty_generic.c 1969-12-31 16:00:00.000000000 -0800 14246 +++ ncurses-5.7/form/fty_generic.c 2009-0 7-19 15:04:11.000000000 -070014292 +++ ncurses-5.7/form/fty_generic.c 2009-09-12 08:51:49.000000000 -0700 14247 14293 @@ -0,0 +1,287 @@ 14248 14294 +/**************************************************************************** … … 14535 14581 diff -Naur ncurses-5.7.orig/form/Makefile.in ncurses-5.7/form/Makefile.in 14536 14582 --- ncurses-5.7.orig/form/Makefile.in 2007-04-28 07:56:11.000000000 -0700 14537 +++ ncurses-5.7/form/Makefile.in 2009-0 7-19 15:03:48.000000000 -070014583 +++ ncurses-5.7/form/Makefile.in 2009-09-12 08:51:25.000000000 -0700 14538 14584 @@ -1,6 +1,6 @@ 14539 14585 -# $Id: Makefile.in,v 1.47 2007/04/28 14:56:11 tom Exp $ … … 14564 14610 diff -Naur ncurses-5.7.orig/include/capdefaults.c ncurses-5.7/include/capdefaults.c 14565 14611 --- ncurses-5.7.orig/include/capdefaults.c 2008-08-04 05:33:42.000000000 -0700 14566 +++ ncurses-5.7/include/capdefaults.c 2009-0 7-19 15:02:22.000000000 -070014612 +++ ncurses-5.7/include/capdefaults.c 2009-09-12 08:51:17.000000000 -0700 14567 14613 @@ -32,7 +32,7 @@ 14568 14614 * and: Thomas E. Dickey 1996-on * … … 14590 14636 diff -Naur ncurses-5.7.orig/include/curses.h.in ncurses-5.7/include/curses.h.in 14591 14637 --- ncurses-5.7.orig/include/curses.h.in 2008-08-30 13:11:29.000000000 -0700 14592 +++ ncurses-5.7/include/curses.h.in 2009-0 7-19 15:04:17.000000000 -070014638 +++ ncurses-5.7/include/curses.h.in 2009-09-12 08:52:10.000000000 -0700 14593 14639 @@ -1,5 +1,5 @@ 14594 14640 /**************************************************************************** … … 14603 14649 14604 14650 -/* $Id: curses.h.in,v 1.187 2008/08/30 20:11:29 tom Exp $ */ 14605 +/* $Id: curses.h.in,v 1.20 4 2009/07/18 16:02:07tom Exp $ */14651 +/* $Id: curses.h.in,v 1.206 2009/09/06 15:55:10 tom Exp $ */ 14606 14652 14607 14653 #ifndef __NCURSES_H … … 14729 14775 extern NCURSES_EXPORT(int) keyok (int, bool); 14730 14776 extern NCURSES_EXPORT(int) resize_term (int, int); 14731 @@ -856,23 +869,13 3@@14777 @@ -856,23 +869,135 @@ 14732 14778 * These extensions provide access to information stored in the WINDOW even 14733 14779 * when NCURSES_OPAQUE is set: … … 14754 14800 +extern NCURSES_EXPORT(bool) is_nodelay (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */ 14755 14801 +extern NCURSES_EXPORT(bool) is_notimeout (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */ 14802 +extern NCURSES_EXPORT(bool) is_pad (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */ 14756 14803 +extern NCURSES_EXPORT(bool) is_scrollok (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */ 14804 +extern NCURSES_EXPORT(bool) is_subwin (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */ 14757 14805 +extern NCURSES_EXPORT(bool) is_syncok (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */ 14758 14806 +extern NCURSES_EXPORT(int) wgetscrreg (const WINDOW *, int *, int *); /* @GENERATED_EXT_FUNCS@ */ … … 14875 14923 14876 14924 #define NCURSES_ATTR_SHIFT 8 14877 @@ -971,9 +109 4,9@@14925 @@ -971,9 +1096,11 @@ 14878 14926 #if !NCURSES_OPAQUE 14879 14927 #if defined(_XOPEN_SOURCE_EXTENDED) && @NCURSES_EXT_COLORS@ 14880 14928 #define wattrset(win,at) ((win)->_color = PAIR_NUMBER(at), \ 14881 14929 - (win)->_attrs = (at)) 14882 + NCURSES_CAST(int, (win)->_attrs = (at))) 14930 + (win)->_attrs = (at), \ 14931 + NCURSES_CAST(int, (win)->_attrs)) 14883 14932 #else 14884 14933 -#define wattrset(win,at) ((win)->_attrs = (at)) 14885 +#define wattrset(win,at) NCURSES_CAST(int, (win)->_attrs = (at)) 14934 +#define wattrset(win,at) ((win)->_attrs = (at), \ 14935 + NCURSES_CAST(int, (win)->_attrs)) 14886 14936 #endif 14887 14937 #endif /* NCURSES_OPAQUE */ 14888 14938 14889 @@ -1173,7 +1296,7 @@ 14939 @@ -1148,16 +1275,18 @@ 14940 */ 14941 #if @NCURSES_EXT_FUNCS@ 14942 #if !NCURSES_OPAQUE 14943 -#define is_cleared(win) ((win)->_clear) 14944 -#define is_idcok(win) ((win)->_idcok) 14945 -#define is_idlok(win) ((win)->_idlok) 14946 -#define is_immedok(win) ((win)->_immed) 14947 -#define is_keypad(win) ((win)->_use_keypad) 14948 -#define is_leaveok(win) ((win)->_leaveok) 14949 -#define is_nodelay(win) ((win)->_delay == 0) 14950 -#define is_notimeout(win) ((win)->_notimeout) 14951 -#define is_scrollok(win) ((win)->_scroll) 14952 -#define is_syncok(win) ((win)->_sync) 14953 +#define is_cleared(win) ((win) ? (win)->_clear : FALSE) 14954 +#define is_idcok(win) ((win) ? (win)->_idcok : FALSE) 14955 +#define is_idlok(win) ((win) ? (win)->_idlok : FALSE) 14956 +#define is_immedok(win) ((win) ? (win)->_immed : FALSE) 14957 +#define is_keypad(win) ((win) ? (win)->_use_keypad : FALSE) 14958 +#define is_leaveok(win) ((win) ? (win)->_leaveok : FALSE) 14959 +#define is_nodelay(win) ((win) ? ((win)->_delay == 0) : FALSE) 14960 +#define is_notimeout(win) ((win) ? (win)->_notimeout : FALSE) 14961 +#define is_pad(win) ((win) ? ((win)->_flags & _ISPAD) != 0 : FALSE) 14962 +#define is_scrollok(win) ((win) ? (win)->_scroll : FALSE) 14963 +#define is_subwin(win) ((win) ? ((win)->_flags & _SUBWIN) != 0 : FALSE) 14964 +#define is_syncok(win) ((win) ? (win)->_sync : FALSE) 14965 #define wgetparent(win) ((win) ? (win)->_parent : 0) 14966 #define wgetscrreg(win,t,b) ((win) ? (*(t) = (win)->_regtop, *(b) = (win)->_regbottom, OK) : ERR) 14967 #endif 14968 @@ -1173,7 +1302,7 @@ 14890 14969 * It gives the ESC expire time in milliseconds. 14891 14970 * b. ttytype is needed for backward compatibility … … 14898 14977 diff -Naur ncurses-5.7.orig/include/curses.tail ncurses-5.7/include/curses.tail 14899 14978 --- ncurses-5.7.orig/include/curses.tail 2008-07-05 13:20:38.000000000 -0700 14900 +++ ncurses-5.7/include/curses.tail 2009-0 7-19 15:04:03.000000000 -070014979 +++ ncurses-5.7/include/curses.tail 2009-09-12 08:51:40.000000000 -0700 14901 14980 @@ -1,4 +1,4 @@ 14902 14981 -/* $Id: curses.tail,v 1.16 2008/07/05 20:20:38 tom Exp $ */ … … 14957 15036 diff -Naur ncurses-5.7.orig/include/curses.wide ncurses-5.7/include/curses.wide 14958 15037 --- ncurses-5.7.orig/include/curses.wide 2007-03-10 09:52:23.000000000 -0800 14959 +++ ncurses-5.7/include/curses.wide 2009-0 7-19 15:03:59.000000000 -070015038 +++ ncurses-5.7/include/curses.wide 2009-09-12 08:51:37.000000000 -0700 14960 15039 @@ -1,9 +1,11 @@ 14961 15040 -/* $Id: curses.wide,v 1.34 2007/03/10 17:52:23 tom Exp $ */ … … 14995 15074 14996 15075 /* 15076 diff -Naur ncurses-5.7.orig/include/headers ncurses-5.7/include/headers 15077 --- ncurses-5.7.orig/include/headers 2007-01-20 11:57:04.000000000 -0800 15078 +++ ncurses-5.7/include/headers 2009-09-12 08:52:09.000000000 -0700 15079 @@ -1,6 +1,6 @@ 15080 -# $Id: headers,v 1.9 2007/01/20 19:57:04 Miroslav.Lichvar Exp $ 15081 +# $Id: headers,v 1.10 2009/09/05 17:46:30 tom Exp $ 15082 ############################################################################## 15083 -# Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. # 15084 +# Copyright (c) 1998-2007,2009 Free Software Foundation, Inc. # 15085 # # 15086 # Permission is hereby granted, free of charge, to any person obtaining a # 15087 # copy of this software and associated documentation files (the "Software"), # 15088 @@ -33,7 +33,7 @@ 15089 curses.h 15090 unctrl.h 15091 termcap.h 15092 -$(srcdir)/ncurses_dll.h 15093 +ncurses_dll.h 15094 @ ticlib 15095 $(srcdir)/tic.h 15096 $(srcdir)/term_entry.h 14997 15097 diff -Naur ncurses-5.7.orig/include/Makefile.in ncurses-5.7/include/Makefile.in 14998 15098 --- ncurses-5.7.orig/include/Makefile.in 2001-12-08 10:50:06.000000000 -0800 14999 +++ ncurses-5.7/include/Makefile.in 2009-0 7-19 15:04:09.000000000 -070015000 @@ -1, 4 +1,4@@15099 +++ ncurses-5.7/include/Makefile.in 2009-09-12 08:52:04.000000000 -0700 15100 @@ -1,6 +1,6 @@ 15001 15101 -# $Id: Makefile.in,v 1.35 2001/12/08 18:50:06 tom Exp $ 15002 +# $Id: Makefile.in,v 1.3 6 2009/06/13 21:42:45tom Exp $15102 +# $Id: Makefile.in,v 1.37 2009/08/10 20:50:04 tom Exp $ 15003 15103 ############################################################################## 15004 # Copyright (c) 1998,2000,2001 Free Software Foundation, Inc. # 15104 -# Copyright (c) 1998,2000,2001 Free Software Foundation, Inc. # 15105 +# Copyright (c) 1998,2001,2009 Free Software Foundation, Inc. # 15005 15106 # # 15006 @@ -72,6 +72,7 @@ 15007 curses.h \ 15008 hashsize.h \ 15009 ncurses_def.h \ 15107 # Permission is hereby granted, free of charge, to any person obtaining a # 15108 # copy of this software and associated documentation files (the "Software"), # 15109 @@ -64,6 +64,7 @@ 15110 CONFIG_SRC = \ 15111 MKterm.h.awk \ 15112 curses.head \ 15010 15113 + ncurses_dll.h \ 15011 parametrized.h \15012 term.h15114 termcap.h \ 15115 unctrl.h 15013 15116 15014 15117 diff -Naur ncurses-5.7.orig/include/MKterm.h.awk.in ncurses-5.7/include/MKterm.h.awk.in 15015 15118 --- ncurses-5.7.orig/include/MKterm.h.awk.in 2008-05-24 16:13:59.000000000 -0700 15016 +++ ncurses-5.7/include/MKterm.h.awk.in 2009-0 7-19 15:03:59.000000000 -070015119 +++ ncurses-5.7/include/MKterm.h.awk.in 2009-09-12 08:51:37.000000000 -0700 15017 15120 @@ -1,7 +1,7 @@ 15018 15121 # vile:awkmode … … 15125 15228 diff -Naur ncurses-5.7.orig/include/nc_alloc.h ncurses-5.7/include/nc_alloc.h 15126 15229 --- ncurses-5.7.orig/include/nc_alloc.h 2008-09-27 15:30:33.000000000 -0700 15127 +++ ncurses-5.7/include/nc_alloc.h 2009-0 7-19 15:03:53.000000000 -070015230 +++ ncurses-5.7/include/nc_alloc.h 2009-09-12 08:51:30.000000000 -0700 15128 15231 @@ -1,5 +1,5 @@ 15129 15232 /**************************************************************************** … … 15161 15264 diff -Naur ncurses-5.7.orig/include/nc_mingw.h ncurses-5.7/include/nc_mingw.h 15162 15265 --- ncurses-5.7.orig/include/nc_mingw.h 1969-12-31 16:00:00.000000000 -0800 15163 +++ ncurses-5.7/include/nc_mingw.h 2009-0 7-19 15:04:11.000000000 -070015266 +++ ncurses-5.7/include/nc_mingw.h 2009-09-12 08:51:49.000000000 -0700 15164 15267 @@ -0,0 +1,59 @@ 15165 15268 +/**************************************************************************** … … 15224 15327 diff -Naur ncurses-5.7.orig/include/nc_panel.h ncurses-5.7/include/nc_panel.h 15225 15328 --- ncurses-5.7.orig/include/nc_panel.h 2008-08-04 11:26:46.000000000 -0700 15226 +++ ncurses-5.7/include/nc_panel.h 2009-0 7-19 15:04:13.000000000 -070015329 +++ ncurses-5.7/include/nc_panel.h 2009-09-12 08:51:50.000000000 -0700 15227 15330 @@ -1,5 +1,5 @@ 15228 15331 /**************************************************************************** … … 15290 15393 diff -Naur ncurses-5.7.orig/include/ncurses_defs ncurses-5.7/include/ncurses_defs 15291 15394 --- ncurses-5.7.orig/include/ncurses_defs 2008-09-06 08:57:41.000000000 -0700 15292 +++ ncurses-5.7/include/ncurses_defs 2009-0 7-19 15:03:58.000000000 -070015395 +++ ncurses-5.7/include/ncurses_defs 2009-09-12 08:51:35.000000000 -0700 15293 15396 @@ -1,4 +1,4 @@ 15294 15397 -# $Id: ncurses_defs,v 1.40 2008/09/06 15:57:41 tom Exp $ … … 15307 15410 diff -Naur ncurses-5.7.orig/include/ncurses_dll.h ncurses-5.7/include/ncurses_dll.h 15308 15411 --- ncurses-5.7.orig/include/ncurses_dll.h 2007-03-10 11:21:49.000000000 -0800 15309 +++ ncurses-5.7/include/ncurses_dll.h 2009-0 7-19 15:03:53.000000000 -070015412 +++ ncurses-5.7/include/ncurses_dll.h 2009-09-12 08:51:30.000000000 -0700 15310 15413 @@ -1,5 +1,5 @@ 15311 15414 /**************************************************************************** … … 15347 15450 diff -Naur ncurses-5.7.orig/include/ncurses_dll.h.in ncurses-5.7/include/ncurses_dll.h.in 15348 15451 --- ncurses-5.7.orig/include/ncurses_dll.h.in 1969-12-31 16:00:00.000000000 -0800 15349 +++ ncurses-5.7/include/ncurses_dll.h.in 2009-0 7-19 15:04:09.000000000 -070015452 +++ ncurses-5.7/include/ncurses_dll.h.in 2009-09-12 08:51:47.000000000 -0700 15350 15453 @@ -0,0 +1,86 @@ 15351 15454 +/**************************************************************************** … … 15437 15540 diff -Naur ncurses-5.7.orig/include/ncurses_mingw.h ncurses-5.7/include/ncurses_mingw.h 15438 15541 --- ncurses-5.7.orig/include/ncurses_mingw.h 1969-12-31 16:00:00.000000000 -0800 15439 +++ ncurses-5.7/include/ncurses_mingw.h 2009-0 7-19 15:04:11.000000000 -070015542 +++ ncurses-5.7/include/ncurses_mingw.h 2009-09-12 08:51:49.000000000 -0700 15440 15543 @@ -0,0 +1,164 @@ 15441 15544 +/**************************************************************************** … … 15605 15708 diff -Naur ncurses-5.7.orig/include/term_entry.h ncurses-5.7/include/term_entry.h 15606 15709 --- ncurses-5.7.orig/include/term_entry.h 2008-08-16 09:16:03.000000000 -0700 15607 +++ ncurses-5.7/include/term_entry.h 2009-0 7-19 15:04:15.000000000 -070015710 +++ ncurses-5.7/include/term_entry.h 2009-09-12 08:51:52.000000000 -0700 15608 15711 @@ -1,5 +1,5 @@ 15609 15712 /**************************************************************************** … … 15644 15747 diff -Naur ncurses-5.7.orig/include/tic.h ncurses-5.7/include/tic.h 15645 15748 --- ncurses-5.7.orig/include/tic.h 2007-08-11 09:12:43.000000000 -0700 15646 +++ ncurses-5.7/include/tic.h 2009-0 7-19 15:04:15.000000000 -070015749 +++ ncurses-5.7/include/tic.h 2009-09-12 08:52:02.000000000 -0700 15647 15750 @@ -1,5 +1,5 @@ 15648 15751 /**************************************************************************** … … 15657 15760 /* 15658 15761 - * $Id: tic.h,v 1.62 2007/08/11 16:12:43 tom Exp $ 15659 + * $Id: tic.h,v 1.6 3 2009/07/11 18:11:15tom Exp $15762 + * $Id: tic.h,v 1.65 2009/08/08 17:52:46 tom Exp $ 15660 15763 * tic.h - Global variables and structures for the terminfo 15661 15764 * compiler. 15662 15765 */ 15663 @@ -246,7 +246,7 @@ 15766 @@ -183,6 +183,8 @@ 15767 15768 #endif 15769 15770 +typedef short HashValue; 15771 + 15772 /* 15773 * The file comp_captab.c contains an array of these structures, one 15774 * per possible capability. These are indexed by a hash table array of 15775 @@ -193,10 +195,21 @@ 15776 { 15777 const char *nte_name; /* name to hash on */ 15778 int nte_type; /* BOOLEAN, NUMBER or STRING */ 15779 - short nte_index; /* index of associated variable in its array */ 15780 - short nte_link; /* index in table of next hash, or -1 */ 15781 + HashValue nte_index; /* index of associated variable in its array */ 15782 + HashValue nte_link; /* index in table of next hash, or -1 */ 15783 }; 15784 15785 + /* 15786 + * Use this structure to hide differences between terminfo and termcap 15787 + * tables. 15788 + */ 15789 +typedef struct { 15790 + unsigned table_size; 15791 + const HashValue *table_data; 15792 + HashValue (*hash_of)(const char *); 15793 + int (*compare_names)(const char *, const char *); 15794 +} HashData; 15795 + 15796 struct alias 15797 { 15798 const char *from; 15799 @@ -205,7 +218,8 @@ 15800 }; 15801 15802 extern NCURSES_EXPORT(const struct name_table_entry *) _nc_get_table (bool); 15803 -extern NCURSES_EXPORT(const short *) _nc_get_hash_table (bool); 15804 +extern NCURSES_EXPORT(const HashData *) _nc_get_hash_info (bool); 15805 +extern NCURSES_EXPORT(const HashValue *) _nc_get_hash_table (bool); 15806 extern NCURSES_EXPORT(const struct alias *) _nc_get_alias_table (bool); 15807 15808 #define NOTFOUND ((struct name_table_entry *) 0) 15809 @@ -244,9 +258,9 @@ 15810 15811 /* comp_hash.c: name lookup */ 15664 15812 extern NCURSES_EXPORT(struct name_table_entry const *) _nc_find_entry 15665 (const char *, const short *); 15813 - (const char *, const short *); 15814 + (const char *, const HashValue *); 15666 15815 extern NCURSES_EXPORT(struct name_table_entry const *) _nc_find_type_entry 15667 15816 - (const char *, int, const struct name_table_entry *); … … 15672 15821 diff -Naur ncurses-5.7.orig/include/unctrl.h.in ncurses-5.7/include/unctrl.h.in 15673 15822 --- ncurses-5.7.orig/include/unctrl.h.in 2001-03-24 13:53:25.000000000 -0800 15674 +++ ncurses-5.7/include/unctrl.h.in 2009-0 7-19 15:03:53.000000000 -070015823 +++ ncurses-5.7/include/unctrl.h.in 2009-09-12 08:51:30.000000000 -0700 15675 15824 @@ -1,5 +1,5 @@ 15676 15825 /**************************************************************************** … … 15702 15851 diff -Naur ncurses-5.7.orig/INSTALL ncurses-5.7/INSTALL 15703 15852 --- ncurses-5.7.orig/INSTALL 2008-11-02 13:13:51.000000000 -0800 15704 +++ ncurses-5.7/INSTALL 2009-0 7-19 15:04:17.000000000 -070015853 +++ ncurses-5.7/INSTALL 2009-09-12 08:51:59.000000000 -0700 15705 15854 @@ -1,5 +1,5 @@ 15706 15855 ------------------------------------------------------------------------------- … … 15715 15864 ------------------------------------------------------------------------------- 15716 15865 --- $Id: INSTALL,v 1.135 2008/11/02 21:13:51 tom Exp $ 15717 +-- $Id: INSTALL,v 1.1 39 2009/07/18 20:50:08tom Exp $15866 +-- $Id: INSTALL,v 1.140 2009/08/01 19:32:04 tom Exp $ 15718 15867 --------------------------------------------------------------------- 15719 15868 How to install Ncurses/Terminfo on your system … … 15780 15929 Tell the configure script to suppress the build of ncurses' application 15781 15930 programs (e.g., tic). The test applications will still be built if you 15931 @@ -1584,7 +1610,8 @@ 15932 tree is accessible (that is, in single-user mode or at OS installation 15933 time) the ncurses library can be compiled to include an array of 15934 pre-fetched fallback entries. This must be done on a machine which 15935 - has ncurses' infocmp and terminfo database installed. 15936 + has ncurses' infocmp and terminfo database installed (as well as 15937 + ncurses' tic and infocmp programs). 15938 15939 These entries are checked by setupterm() only when the conventional 15940 fetches from the terminfo tree and the termcap fallback (if configured) 15941 @@ -1735,6 +1762,10 @@ 15942 option), ncurses uses the development platform's tic to do the 15943 "make install.data" portion. 15944 15945 + The system's tic program is used to install the terminal database, 15946 + even for cross-compiles. For best results, the tic program should 15947 + be from the most current version of ncurses. 15948 + 15949 BUGS: 15950 Send any feedback to the ncurses mailing list at 15951 bug-ncurses@gnu.org. To subscribe send mail to 15782 15952 diff -Naur ncurses-5.7.orig/Makefile.in ncurses-5.7/Makefile.in 15783 15953 --- ncurses-5.7.orig/Makefile.in 2005-01-29 11:30:06.000000000 -0800 15784 +++ ncurses-5.7/Makefile.in 2009-0 7-19 15:04:11.000000000 -070015954 +++ ncurses-5.7/Makefile.in 2009-09-12 08:51:49.000000000 -0700 15785 15955 @@ -1,4 +1,4 @@ 15786 15956 -# $Id: Makefile.in,v 1.24 2005/01/29 19:30:06 tom Exp $ … … 15806 15976 diff -Naur ncurses-5.7.orig/man/curs_color.3x ncurses-5.7/man/curs_color.3x 15807 15977 --- ncurses-5.7.orig/man/curs_color.3x 2005-12-17 16:00:37.000000000 -0800 15808 +++ ncurses-5.7/man/curs_color.3x 2009-0 7-19 15:02:16.000000000 -070015978 +++ ncurses-5.7/man/curs_color.3x 2009-09-12 08:51:11.000000000 -0700 15809 15979 @@ -1,5 +1,5 @@ 15810 15980 .\"*************************************************************************** … … 15837 16007 diff -Naur ncurses-5.7.orig/man/curs_getcchar.3x ncurses-5.7/man/curs_getcchar.3x 15838 16008 --- ncurses-5.7.orig/man/curs_getcchar.3x 2008-05-17 12:37:05.000000000 -0700 15839 +++ ncurses-5.7/man/curs_getcchar.3x 2009-0 7-19 15:04:17.000000000 -070016009 +++ ncurses-5.7/man/curs_getcchar.3x 2009-09-12 08:51:54.000000000 -0700 15840 16010 @@ -1,5 +1,5 @@ 15841 16011 .\"*************************************************************************** … … 15866 16036 diff -Naur ncurses-5.7.orig/man/curs_mouse.3x ncurses-5.7/man/curs_mouse.3x 15867 16037 --- ncurses-5.7.orig/man/curs_mouse.3x 2006-12-30 15:43:34.000000000 -0800 15868 +++ ncurses-5.7/man/curs_mouse.3x 2009-0 7-19 15:01:57.000000000 -070016038 +++ ncurses-5.7/man/curs_mouse.3x 2009-09-12 08:52:07.000000000 -0700 15869 16039 @@ -1,6 +1,6 @@ 15870 16040 '\" t 15871 16041 .\"*************************************************************************** 15872 16042 -.\" Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. * 15873 +.\" Copyright (c) 1998-200 6,2008Free Software Foundation, Inc. *16043 +.\" Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. * 15874 16044 .\" * 15875 16045 .\" Permission is hereby granted, free of charge, to any person obtaining a * … … 15880 16050 .\" 15881 16051 -.\" $Id: curs_mouse.3x,v 1.30 2006/12/30 23:43:34 tom Exp $ 15882 +.\" $Id: curs_mouse.3x,v 1.3 1 2008/11/23 00:09:53tom Exp $16052 +.\" $Id: curs_mouse.3x,v 1.32 2009/08/29 18:11:58 tom Exp $ 15883 16053 .TH curs_mouse 3X "" 15884 16054 .na … … 15910 16080 cause an error beep when cooked mode is being simulated in a window by a 15911 16081 function such as \fBgetstr\fR that expects a linefeed for input-loop 16082 @@ -256,7 +262,7 @@ 16083 xterm's built-in mouse-tracking API or 16084 platform-specific drivers including 16085 .RS 16086 -Alessandro Rubini's gpm server. 16087 +Alessandro Rubini's gpm server 16088 .br 16089 FreeBSD sysmouse 16090 .br 16091 diff -Naur ncurses-5.7.orig/man/curs_opaque.3x ncurses-5.7/man/curs_opaque.3x 16092 --- ncurses-5.7.orig/man/curs_opaque.3x 2007-09-08 11:49:13.000000000 -0700 16093 +++ ncurses-5.7/man/curs_opaque.3x 2009-09-12 08:52:10.000000000 -0700 16094 @@ -1,5 +1,5 @@ 16095 .\"*************************************************************************** 16096 -.\" Copyright (c) 2007 Free Software Foundation, Inc. * 16097 +.\" Copyright (c) 2007,2009 Free Software Foundation, Inc. * 16098 .\" * 16099 .\" Permission is hereby granted, free of charge, to any person obtaining a * 16100 .\" copy of this software and associated documentation files (the * 16101 @@ -26,7 +26,7 @@ 16102 .\" authorization. * 16103 .\"*************************************************************************** 16104 .\" 16105 -.\" $Id: curs_opaque.3x,v 1.6 2007/09/08 18:49:13 tom Exp $ 16106 +.\" $Id: curs_opaque.3x,v 1.7 2009/09/06 16:01:55 tom Exp $ 16107 .TH curs_opaque 3X "" 16108 .na 16109 .hy 0 16110 @@ -38,8 +38,10 @@ 16111 \fBis_keypad\fR, 16112 \fBis_leaveok\fR, 16113 \fBis_nodelay\fR, 16114 -\fBis_timeout\fR, 16115 +\fBis_notimeout\fR, 16116 +\fBis_pad\fR, 16117 \fBis_scrollok\fR, 16118 +\fBis_subwin\fR, 16119 \fBis_syncok\fR - \fBcurses\fR window properties 16120 .ad 16121 .hy 16122 @@ -62,8 +64,12 @@ 16123 .br 16124 \fBbool is_notimeout(const WINDOW *win);\fR 16125 .br 16126 +\fBbool is_pad(const WINDOW *win);\fR 16127 +.br 16128 \fBbool is_scrollok(const WINDOW *win);\fR 16129 .br 16130 +\fBbool is_subwin(const WINDOW *win);\fR 16131 +.br 16132 \fBbool is_syncok(const WINDOW *win);\fR 16133 .br 16134 \fBWINDOW * wgetparent(const WINDOW *win);\fR 16135 @@ -99,9 +105,17 @@ 16136 \fBis_notimeout\fR 16137 returns the value set in \fBnotimeout\fR 16138 .TP 5 16139 +\fBis_pad\fR 16140 +returns TRUE if the window is a pad 16141 +i.e., created by \fBnewpad\fP 16142 +.TP 5 16143 \fBis_scrollok\fR 16144 returns the value set in \fBscrollok\fR 16145 .TP 5 16146 +\fBis_subwin\fR 16147 +returns TRUE if the window is a subwindow, 16148 +i.e., created by \fBsubwin\fP or \fBderwin\fP 16149 +.TP 5 16150 \fBis_syncok\fR 16151 returns the value set in \fBsyncok\fR 16152 .TP 5 15912 16153 diff -Naur ncurses-5.7.orig/man/form_field_validation.3x ncurses-5.7/man/form_field_validation.3x 15913 16154 --- ncurses-5.7.orig/man/form_field_validation.3x 2006-12-24 08:08:08.000000000 -0800 15914 +++ ncurses-5.7/man/form_field_validation.3x 2009-0 7-19 15:03:51.000000000 -070016155 +++ ncurses-5.7/man/form_field_validation.3x 2009-09-12 08:51:28.000000000 -0700 15915 16156 @@ -26,7 +26,7 @@ 15916 16157 .\" authorization. * … … 15935 16176 diff -Naur ncurses-5.7.orig/man/keybound.3x ncurses-5.7/man/keybound.3x 15936 16177 --- ncurses-5.7.orig/man/keybound.3x 2006-02-25 13:47:06.000000000 -0800 15937 +++ ncurses-5.7/man/keybound.3x 2009-0 7-19 15:02:02.000000000 -070016178 +++ ncurses-5.7/man/keybound.3x 2009-09-12 08:50:57.000000000 -0700 15938 16179 @@ -1,5 +1,5 @@ 15939 16180 .\"*************************************************************************** … … 15954 16195 \fBkeybound\fP \- return definition of keycode 15955 16196 .SH SYNOPSIS 16197 diff -Naur ncurses-5.7.orig/man/man_db.renames ncurses-5.7/man/man_db.renames 16198 --- ncurses-5.7.orig/man/man_db.renames 2008-10-25 16:24:03.000000000 -0700 16199 +++ ncurses-5.7/man/man_db.renames 2009-09-12 08:52:01.000000000 -0700 16200 @@ -1,5 +1,5 @@ 16201 ############################################################################## 16202 -# Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. # 16203 +# Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. # 16204 # # 16205 # Permission is hereby granted, free of charge, to any person obtaining a # 16206 # copy of this software and associated documentation files (the "Software"), # 16207 @@ -25,7 +25,7 @@ 16208 # use or other dealings in this Software without prior written # 16209 # authorization. # 16210 ############################################################################## 16211 -# $Id: man_db.renames,v 0.41 2008/10/25 23:24:03 tom Exp $ 16212 +# $Id: man_db.renames,v 0.43 2009/08/04 00:30:32 tom Exp $ 16213 # Manual-page renamings for the man_db program 16214 # 16215 # Files: 16216 @@ -152,6 +152,7 @@ 16217 resizeterm.3x resizeterm.3ncurses 16218 scanf.3s scanf.3 16219 system.3s system.3 16220 +tabs.1 tabs.1 16221 term.5 term.5 16222 term.7 term.7 16223 terminfo.5 terminfo.5 15956 16224 diff -Naur ncurses-5.7.orig/man/tabs.1 ncurses-5.7/man/tabs.1 15957 16225 --- ncurses-5.7.orig/man/tabs.1 1969-12-31 16:00:00.000000000 -0800 15958 +++ ncurses-5.7/man/tabs.1 2009-0 7-19 15:01:56.000000000 -070016226 +++ ncurses-5.7/man/tabs.1 2009-09-12 08:52:09.000000000 -0700 15959 16227 @@ -0,0 +1,143 @@ 15960 16228 +.\"*************************************************************************** 15961 +.\" Copyright (c) 2008 Free Software Foundation, Inc.*16229 +.\" Copyright (c) 2008,2009 Free Software Foundation, Inc. * 15962 16230 +.\" * 15963 16231 +.\" Permission is hereby granted, free of charge, to any person obtaining a * … … 15986 16254 +.\"*************************************************************************** 15987 16255 +.\" 15988 +.\" $Id: tabs.1,v 1. 2 2008/11/15 23:03:45tom Exp $15989 +.TH @TABS@ 1 M""16256 +.\" $Id: tabs.1,v 1.3 2009/09/05 17:06:08 tom Exp $ 16257 +.TH @TABS@ 1 "" 15990 16258 +.ds n 5 15991 16259 +.SH NAME … … 16103 16371 diff -Naur ncurses-5.7.orig/man/tset.1 ncurses-5.7/man/tset.1 16104 16372 --- ncurses-5.7.orig/man/tset.1 2006-12-24 07:00:30.000000000 -0800 16105 +++ ncurses-5.7/man/tset.1 2009-0 7-19 15:01:56.000000000 -070016373 +++ ncurses-5.7/man/tset.1 2009-09-12 08:50:51.000000000 -0700 16106 16374 @@ -1,5 +1,5 @@ 16107 16375 .\"*************************************************************************** … … 16124 16392 diff -Naur ncurses-5.7.orig/MANIFEST ncurses-5.7/MANIFEST 16125 16393 --- ncurses-5.7.orig/MANIFEST 2008-10-25 16:47:24.000000000 -0700 16126 +++ ncurses-5.7/MANIFEST 2009-0 7-19 15:04:15.000000000 -070016394 +++ ncurses-5.7/MANIFEST 2009-09-12 08:52:02.000000000 -0700 16127 16395 @@ -172,6 +172,7 @@ 16128 16396 ./Makefile.os2 … … 16196 16464 ./ncurses/modules 16197 16465 ./ncurses/tinfo/MKcaptab.awk 16198 @@ -870,6 +879,7 @@ 16466 @@ -863,6 +872,7 @@ 16467 ./ncurses/tinfo/lib_tparm.c 16468 ./ncurses/tinfo/lib_tputs.c 16469 ./ncurses/tinfo/lib_ttyflags.c 16470 +./ncurses/tinfo/make_hash.c 16471 ./ncurses/tinfo/make_keys.c 16472 ./ncurses/tinfo/name_match.c 16473 ./ncurses/tinfo/parse_entry.c 16474 @@ -870,6 +880,7 @@ 16199 16475 ./ncurses/tinfo/read_termcap.c 16200 16476 ./ncurses/tinfo/setbuf.c … … 16204 16480 ./ncurses/tinfo/use_screen.c 16205 16481 ./ncurses/tinfo/write_entry.c 16206 @@ -915,6 +92 5,8 @@16482 @@ -915,6 +926,8 @@ 16207 16483 ./ncurses/widechar/lib_vline_set.c 16208 16484 ./ncurses/widechar/lib_wacs.c … … 16213 16489 ./panel/headers 16214 16490 ./panel/llib-lpanel 16215 @@ -947,9 +9 59,11 @@16491 @@ -947,9 +960,11 @@ 16216 16492 ./progs/infocmp.c 16217 16493 ./progs/modules … … 16225 16501 ./tar-copy.sh 16226 16502 ./test/Makefile.in 16227 @@ -963,6 +97 7,7 @@16503 @@ -963,6 +978,7 @@ 16228 16504 ./test/cardfile.c 16229 16505 ./test/cardfile.dat … … 16233 16509 ./test/configure 16234 16510 ./test/configure.in 16235 @@ -973,6 +98 8,7 @@16511 @@ -973,6 +989,7 @@ 16236 16512 ./test/demo_menus.c 16237 16513 ./test/demo_panels.c … … 16241 16517 ./test/dots.c 16242 16518 ./test/dots_mvcur.c 16243 @@ -990,6 +100 6,7 @@16519 @@ -990,6 +1007,7 @@ 16244 16520 ./test/inch_wide.c 16245 16521 ./test/inchs.c … … 16251 16527 diff -Naur ncurses-5.7.orig/menu/Makefile.in ncurses-5.7/menu/Makefile.in 16252 16528 --- ncurses-5.7.orig/menu/Makefile.in 2007-04-28 07:56:11.000000000 -0700 16253 +++ ncurses-5.7/menu/Makefile.in 2009-0 7-19 15:03:48.000000000 -070016529 +++ ncurses-5.7/menu/Makefile.in 2009-09-12 08:51:25.000000000 -0700 16254 16530 @@ -1,6 +1,6 @@ 16255 16531 -# $Id: Makefile.in,v 1.48 2007/04/28 14:56:11 tom Exp $ … … 16280 16556 diff -Naur ncurses-5.7.orig/menu/m_attribs.c ncurses-5.7/menu/m_attribs.c 16281 16557 --- ncurses-5.7.orig/menu/m_attribs.c 2004-12-11 15:29:12.000000000 -0800 16282 +++ ncurses-5.7/menu/m_attribs.c 2009-0 7-19 15:03:51.000000000 -070016558 +++ ncurses-5.7/menu/m_attribs.c 2009-09-12 08:51:28.000000000 -0700 16283 16559 @@ -37,7 +37,7 @@ 16284 16560 … … 16310 16586 diff -Naur ncurses-5.7.orig/menu/m_cursor.c ncurses-5.7/menu/m_cursor.c 16311 16587 --- ncurses-5.7.orig/menu/m_cursor.c 2005-10-22 16:03:32.000000000 -0700 16312 +++ ncurses-5.7/menu/m_cursor.c 2009-0 7-19 15:02:23.000000000 -070016588 +++ ncurses-5.7/menu/m_cursor.c 2009-09-12 08:51:19.000000000 -0700 16313 16589 @@ -1,5 +1,5 @@ 16314 16590 /**************************************************************************** … … 16338 16614 diff -Naur ncurses-5.7.orig/menu/m_driver.c ncurses-5.7/menu/m_driver.c 16339 16615 --- ncurses-5.7.orig/menu/m_driver.c 2008-08-03 15:08:22.000000000 -0700 16340 +++ ncurses-5.7/menu/m_driver.c 2009-0 7-19 15:02:23.000000000 -070016616 +++ ncurses-5.7/menu/m_driver.c 2009-09-12 08:51:19.000000000 -0700 16341 16617 @@ -1,5 +1,5 @@ 16342 16618 /**************************************************************************** … … 16366 16642 diff -Naur ncurses-5.7.orig/menu/menu.h ncurses-5.7/menu/menu.h 16367 16643 --- ncurses-5.7.orig/menu/menu.h 2007-02-24 09:32:13.000000000 -0800 16368 +++ ncurses-5.7/menu/menu.h 2009-0 7-19 15:03:51.000000000 -070016644 +++ ncurses-5.7/menu/menu.h 2009-09-12 08:51:28.000000000 -0700 16369 16645 @@ -1,5 +1,5 @@ 16370 16646 /**************************************************************************** … … 16396 16672 diff -Naur ncurses-5.7.orig/menu/menu.priv.h ncurses-5.7/menu/menu.priv.h 16397 16673 --- ncurses-5.7.orig/menu/menu.priv.h 2005-01-15 17:02:23.000000000 -0800 16398 +++ ncurses-5.7/menu/menu.priv.h 2009-0 7-19 15:02:23.000000000 -070016674 +++ ncurses-5.7/menu/menu.priv.h 2009-09-12 08:51:19.000000000 -0700 16399 16675 @@ -1,5 +1,5 @@ 16400 16676 /**************************************************************************** … … 16429 16705 diff -Naur ncurses-5.7.orig/menu/m_global.c ncurses-5.7/menu/m_global.c 16430 16706 --- ncurses-5.7.orig/menu/m_global.c 2005-12-31 13:51:52.000000000 -0800 16431 +++ ncurses-5.7/menu/m_global.c 2009-0 7-19 15:02:23.000000000 -070016707 +++ ncurses-5.7/menu/m_global.c 2009-09-12 08:51:19.000000000 -0700 16432 16708 @@ -1,5 +1,5 @@ 16433 16709 /**************************************************************************** … … 16470 16746 diff -Naur ncurses-5.7.orig/menu/m_new.c ncurses-5.7/menu/m_new.c 16471 16747 --- ncurses-5.7.orig/menu/m_new.c 2006-11-04 11:04:06.000000000 -0800 16472 +++ ncurses-5.7/menu/m_new.c 2009-0 7-19 15:03:51.000000000 -070016748 +++ ncurses-5.7/menu/m_new.c 2009-09-12 08:51:28.000000000 -0700 16473 16749 @@ -1,5 +1,5 @@ 16474 16750 /**************************************************************************** … … 16557 16833 diff -Naur ncurses-5.7.orig/menu/m_pad.c ncurses-5.7/menu/m_pad.c 16558 16834 --- ncurses-5.7.orig/menu/m_pad.c 2004-12-25 13:40:58.000000000 -0800 16559 +++ ncurses-5.7/menu/m_pad.c 2009-0 7-19 15:03:51.000000000 -070016835 +++ ncurses-5.7/menu/m_pad.c 2009-09-12 08:51:28.000000000 -0700 16560 16836 @@ -37,19 +37,19 @@ 16561 16837 … … 16583 16859 diff -Naur ncurses-5.7.orig/menu/m_post.c ncurses-5.7/menu/m_post.c 16584 16860 --- ncurses-5.7.orig/menu/m_post.c 2004-12-25 15:57:04.000000000 -0800 16585 +++ ncurses-5.7/menu/m_post.c 2009-0 7-19 15:02:23.000000000 -070016861 +++ ncurses-5.7/menu/m_post.c 2009-09-12 08:51:19.000000000 -0700 16586 16862 @@ -1,5 +1,5 @@ 16587 16863 /**************************************************************************** … … 16620 16896 diff -Naur ncurses-5.7.orig/menu/m_sub.c ncurses-5.7/menu/m_sub.c 16621 16897 --- ncurses-5.7.orig/menu/m_sub.c 2004-12-25 13:38:31.000000000 -0800 16622 +++ ncurses-5.7/menu/m_sub.c 2009-0 7-19 15:03:51.000000000 -070016898 +++ ncurses-5.7/menu/m_sub.c 2009-09-12 08:51:28.000000000 -0700 16623 16899 @@ -37,7 +37,7 @@ 16624 16900 … … 16666 16942 diff -Naur ncurses-5.7.orig/menu/m_win.c ncurses-5.7/menu/m_win.c 16667 16943 --- ncurses-5.7.orig/menu/m_win.c 2004-12-25 13:39:20.000000000 -0800 16668 +++ ncurses-5.7/menu/m_win.c 2009-0 7-19 15:03:51.000000000 -070016944 +++ ncurses-5.7/menu/m_win.c 2009-09-12 08:51:28.000000000 -0700 16669 16945 @@ -37,7 +37,7 @@ 16670 16946 … … 16721 16997 diff -Naur ncurses-5.7.orig/misc/gen-pkgconfig.in ncurses-5.7/misc/gen-pkgconfig.in 16722 16998 --- ncurses-5.7.orig/misc/gen-pkgconfig.in 1969-12-31 16:00:00.000000000 -0800 16723 +++ ncurses-5.7/misc/gen-pkgconfig.in 2009-0 7-19 15:03:43.000000000 -070016999 +++ ncurses-5.7/misc/gen-pkgconfig.in 2009-09-12 08:51:21.000000000 -0700 16724 17000 @@ -0,0 +1,140 @@ 16725 17001 +#!@SHELL@ … … 16865 17141 diff -Naur ncurses-5.7.orig/misc/Makefile.in ncurses-5.7/misc/Makefile.in 16866 17142 --- ncurses-5.7.orig/misc/Makefile.in 2007-03-31 08:54:17.000000000 -0700 16867 +++ ncurses-5.7/misc/Makefile.in 2009-0 7-19 15:02:18.000000000 -070017143 +++ ncurses-5.7/misc/Makefile.in 2009-09-12 08:52:04.000000000 -0700 16868 17144 @@ -1,6 +1,6 @@ 16869 17145 -# $Id: Makefile.in,v 1.43 2007/03/31 15:54:17 tom Exp $ 16870 +# $Id: Makefile.in,v 1.5 1 2009/02/07 18:17:17 Miroslav.LichvarExp $17146 +# $Id: Makefile.in,v 1.52 2009/08/15 17:13:49 tom Exp $ 16871 17147 ############################################################################## 16872 17148 -# Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. # … … 16875 17151 # Permission is hereby granted, free of charge, to any person obtaining a # 16876 17152 # copy of this software and associated documentation files (the "Software"), # 16877 @@ -66,15 +66,17 @@ 17153 @@ -57,24 +57,23 @@ 17154 libdir = @libdir@ 17155 datadir = @datadir@ 17156 17157 -CC = @CC@ 17158 -HOSTCC = @BUILD_CC@ 17159 - 17160 tabsetdir = $(datadir)/tabset 17161 ticdir = @TERMINFO@ 17162 ticfile = $(ticdir).db 16878 17163 source = @TERMINFO_SRC@ 16879 17164 … … 16895 17180 install : install.data install.libs 16896 17181 16897 @@ -103,9 +105,17 @@ 17182 @@ -91,8 +90,7 @@ 17183 datadir=${datadir} \ 17184 ticdir=${ticdir} \ 17185 source=terminfo.tmp \ 17186 - THIS_CC="$(CC)" \ 17187 - THAT_CC="$(HOSTCC)" \ 17188 + cross_compiling=@cross_compiling@ \ 17189 $(SHELL) ./run_tic.sh 17190 @cd $(srcdir)/tabset && \ 17191 $(SHELL) -c 'for i in * ; do \ 17192 @@ -103,9 +101,17 @@ 16898 17193 16899 17194 NCURSES_CONFIG = ncurses@DFT_ARG_SUFFIX@@cf_cv_abi_version@-config … … 16914 17209 echo '** adjusting tabset paths' 16915 17210 sed -f run_tic.sed $(source) >terminfo.tmp 16916 @@ -118,7 +12 8,8 @@17211 @@ -118,7 +124,8 @@ 16917 17212 $(DESTDIR)$(bindir) \ 16918 17213 $(DESTDIR)$(libdir) \ … … 16924 17219 16925 17220 uninstall : uninstall.data uninstall.libs 16926 @@ -130,6 +1 41,7 @@17221 @@ -130,6 +137,7 @@ 16927 17222 16928 17223 uninstall.libs : … … 16932 17227 tags : 16933 17228 16934 @@ -138,11 +1 50,13 @@17229 @@ -138,11 +146,13 @@ 16935 17230 mostlyclean : 16936 17231 -rm -f terminfo.tmp … … 16948 17243 diff -Naur ncurses-5.7.orig/misc/ncu-indent ncurses-5.7/misc/ncu-indent 16949 17244 --- ncurses-5.7.orig/misc/ncu-indent 2008-08-03 08:46:44.000000000 -0700 16950 +++ ncurses-5.7/misc/ncu-indent 2009-0 7-19 15:02:23.000000000 -070017245 +++ ncurses-5.7/misc/ncu-indent 2009-09-12 08:51:19.000000000 -0700 16951 17246 @@ -26,7 +26,7 @@ 16952 17247 #* sale, use or other dealings in this Software without prior written * … … 16997 17292 diff -Naur ncurses-5.7.orig/misc/ncurses-config.in ncurses-5.7/misc/ncurses-config.in 16998 17293 --- ncurses-5.7.orig/misc/ncurses-config.in 2007-03-17 13:02:19.000000000 -0700 16999 +++ ncurses-5.7/misc/ncurses-config.in 2009-0 7-19 15:03:43.000000000 -070017294 +++ ncurses-5.7/misc/ncurses-config.in 2009-09-12 08:51:21.000000000 -0700 17000 17295 @@ -1,7 +1,7 @@ 17001 17296 #!@SHELL@ … … 17130 17425 --mandir echos the directory containing ${THIS} manpages 17131 17426 --terminfo echos the \$TERMINFO terminfo database path 17427 diff -Naur ncurses-5.7.orig/misc/run_tic.in ncurses-5.7/misc/run_tic.in 17428 --- ncurses-5.7.orig/misc/run_tic.in 2006-10-28 12:43:30.000000000 -0700 17429 +++ ncurses-5.7/misc/run_tic.in 2009-09-12 08:52:04.000000000 -0700 17430 @@ -1,7 +1,7 @@ 17431 #!@SHELL@ 17432 -# $Id: run_tic.in,v 1.23 2006/10/28 19:43:30 tom Exp $ 17433 +# $Id: run_tic.in,v 1.24 2009/08/15 17:19:36 tom Exp $ 17434 ############################################################################## 17435 -# Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. # 17436 +# Copyright (c) 1998-2006,2009 Free Software Foundation, Inc. # 17437 # # 17438 # Permission is hereby granted, free of charge, to any person obtaining a # 17439 # copy of this software and associated documentation files (the "Software"), # 17440 @@ -28,7 +28,7 @@ 17441 # authorization. # 17442 ############################################################################## 17443 # 17444 -# Author: Thomas E. Dickey 1996,2000 17445 +# Author: Thomas E. Dickey 1996-on 17446 # 17447 # This script is used to install terminfo.src using tic. We use a script 17448 # because the path checking is too awkward to do in a makefile. 17449 @@ -52,8 +52,7 @@ 17450 : ${ticdir=@TERMINFO@} 17451 : ${source=@TERMINFO_SRC@} 17452 : ${LN_S="@LN_S@"} 17453 -: ${THAT_CC=cc} 17454 -: ${THIS_CC=cc} 17455 +: ${cross_compiling=no} 17456 : ${ext_funcs=@NCURSES_EXT_FUNCS@} 17457 17458 test -z "${DESTDIR}" && DESTDIR= 17459 @@ -61,10 +60,10 @@ 17460 # Allow tic to run either from the install-path, or from the build-directory. 17461 # Do not do this if we appear to be cross-compiling. In that case, we rely 17462 # on the host's copy of tic to compile the terminfo database. 17463 -if test "$THAT_CC" = "$THIS_CC" ; then 17464 +if test "x$cross_compiling" = "xno" ; then 17465 case "$PATH" in 17466 -:*) PATH=../progs:../lib:${DESTDIR}$bindir$PATH ;; 17467 -*) PATH=../progs:../lib:${DESTDIR}$bindir:$PATH ;; 17468 +@PATH_SEPARATOR@*) PATH=../progs@PATH_SEPARATOR@../lib@PATH_SEPARATOR@${DESTDIR}$bindir$PATH ;; 17469 +*) PATH=../progs@PATH_SEPARATOR@../lib@PATH_SEPARATOR@${DESTDIR}$bindir@PATH_SEPARATOR@$PATH ;; 17470 esac 17471 export PATH 17472 SHLIB="sh $srcdir/shlib" 17132 17473 diff -Naur ncurses-5.7.orig/misc/terminfo.src ncurses-5.7/misc/terminfo.src 17133 17474 --- ncurses-5.7.orig/misc/terminfo.src 2008-10-12 16:03:54.000000000 -0700 17134 +++ ncurses-5.7/misc/terminfo.src 2009-0 7-19 15:03:58.000000000 -070017475 +++ ncurses-5.7/misc/terminfo.src 2009-09-12 08:51:35.000000000 -0700 17135 17476 @@ -6,8 +6,8 @@ 17136 17477 # Report bugs and new terminal descriptions to … … 17432 17773 diff -Naur ncurses-5.7.orig/mk-1st.awk ncurses-5.7/mk-1st.awk 17433 17774 --- ncurses-5.7.orig/mk-1st.awk 2007-03-24 15:10:55.000000000 -0700 17434 +++ ncurses-5.7/mk-1st.awk 2009-0 7-19 15:03:48.000000000 -070017775 +++ ncurses-5.7/mk-1st.awk 2009-09-12 08:51:25.000000000 -0700 17435 17776 @@ -1,6 +1,6 @@ 17436 17777 -# $Id: mk-1st.awk,v 1.78 2007/03/24 22:10:55 tom Exp $ … … 17477 17818 diff -Naur ncurses-5.7.orig/mk-dlls.sh ncurses-5.7/mk-dlls.sh 17478 17819 --- ncurses-5.7.orig/mk-dlls.sh 1969-12-31 16:00:00.000000000 -0800 17479 +++ ncurses-5.7/mk-dlls.sh 2009-0 7-19 15:04:11.000000000 -070017820 +++ ncurses-5.7/mk-dlls.sh 2009-09-12 08:51:49.000000000 -0700 17480 17821 @@ -0,0 +1,93 @@ 17481 17822 +#!/bin/sh … … 17574 17915 diff -Naur ncurses-5.7.orig/ncurses/base/define_key.c ncurses-5.7/ncurses/base/define_key.c 17575 17916 --- ncurses-5.7.orig/ncurses/base/define_key.c 2006-12-30 15:23:31.000000000 -0800 17576 +++ ncurses-5.7/ncurses/base/define_key.c 2009-0 7-19 15:03:59.000000000 -070017917 +++ ncurses-5.7/ncurses/base/define_key.c 2009-09-12 08:51:37.000000000 -0700 17577 17918 @@ -1,5 +1,5 @@ 17578 17919 /**************************************************************************** … … 17647 17988 diff -Naur ncurses-5.7.orig/ncurses/base/keybound.c ncurses-5.7/ncurses/base/keybound.c 17648 17989 --- ncurses-5.7.orig/ncurses/base/keybound.c 2006-06-17 11:19:24.000000000 -0700 17649 +++ ncurses-5.7/ncurses/base/keybound.c 2009-0 7-19 15:02:22.000000000 -070017990 +++ ncurses-5.7/ncurses/base/keybound.c 2009-09-12 08:51:17.000000000 -0700 17650 17991 @@ -1,5 +1,5 @@ 17651 17992 /**************************************************************************** … … 17698 18039 diff -Naur ncurses-5.7.orig/ncurses/base/key_defined.c ncurses-5.7/ncurses/base/key_defined.c 17699 18040 --- ncurses-5.7.orig/ncurses/base/key_defined.c 2006-12-30 15:22:55.000000000 -0800 17700 +++ ncurses-5.7/ncurses/base/key_defined.c 2009-0 7-19 15:02:22.000000000 -070018041 +++ ncurses-5.7/ncurses/base/key_defined.c 2009-09-12 08:51:17.000000000 -0700 17701 18042 @@ -1,5 +1,5 @@ 17702 18043 /**************************************************************************** … … 17744 18085 diff -Naur ncurses-5.7.orig/ncurses/base/keyok.c ncurses-5.7/ncurses/base/keyok.c 17745 18086 --- ncurses-5.7.orig/ncurses/base/keyok.c 2006-12-30 08:22:33.000000000 -0800 17746 +++ ncurses-5.7/ncurses/base/keyok.c 2009-0 7-19 15:04:06.000000000 -070018087 +++ ncurses-5.7/ncurses/base/keyok.c 2009-09-12 08:51:43.000000000 -0700 17747 18088 @@ -1,5 +1,5 @@ 17748 18089 /**************************************************************************** … … 17828 18169 diff -Naur ncurses-5.7.orig/ncurses/base/legacy_coding.c ncurses-5.7/ncurses/base/legacy_coding.c 17829 18170 --- ncurses-5.7.orig/ncurses/base/legacy_coding.c 2005-12-17 15:38:17.000000000 -0800 17830 +++ ncurses-5.7/ncurses/base/legacy_coding.c 2009-0 7-19 15:02:22.000000000 -070018171 +++ ncurses-5.7/ncurses/base/legacy_coding.c 2009-09-12 08:51:17.000000000 -0700 17831 18172 @@ -1,5 +1,5 @@ 17832 18173 /**************************************************************************** … … 17877 18218 diff -Naur ncurses-5.7.orig/ncurses/base/lib_addch.c ncurses-5.7/ncurses/base/lib_addch.c 17878 18219 --- ncurses-5.7.orig/ncurses/base/lib_addch.c 2008-08-16 12:20:04.000000000 -0700 17879 +++ ncurses-5.7/ncurses/base/lib_addch.c 2009-0 7-19 15:04:01.000000000 -070018220 +++ ncurses-5.7/ncurses/base/lib_addch.c 2009-09-12 08:52:01.000000000 -0700 17880 18221 @@ -1,5 +1,5 @@ 17881 18222 /**************************************************************************** … … 17890 18231 17891 18232 -MODULE_ID("$Id: lib_addch.c,v 1.113 2008/08/16 19:20:04 tom Exp $") 17892 +MODULE_ID("$Id: lib_addch.c,v 1.1 19 2009/05/15 23:47:26tom Exp $")18233 +MODULE_ID("$Id: lib_addch.c,v 1.121 2009/08/04 00:20:09 tom Exp $") 17893 18234 17894 18235 static const NCURSES_CH_T blankchar = NewChar(BLANK_TEXT); … … 17901 18242 +#define DeriveSP() SCREEN *sp = _nc_screen_of(win); 17902 18243 +#else 17903 +#define DeriveSP() /*nothing*/18244 +#define DeriveSP() /*nothing */ 17904 18245 +#endif 17905 18246 if_WIDEC({ … … 17910 18251 if (len >= -1) { 17911 18252 - /* handle EILSEQ */ 17912 + attr_t attr = AttrOf(ch); 17913 + 17914 + /* handle EILSEQ (i.e., when len >= -1) */ 17915 if (is8bits(CharOf(ch))) { 18253 - if (is8bits(CharOf(ch))) { 17916 18254 - const char *s = unctrl((chtype) CharOf(ch)); 17917 18255 - if (s[1] != 0) { 17918 18256 - return waddstr(win, s); 18257 + attr_t attr = AttrOf(ch); 18258 + 18259 + /* handle EILSEQ (i.e., when len >= -1) */ 18260 + if (len == -1 && is8bits(CharOf(ch))) { 17919 18261 + int rc = OK; 17920 18262 + const char *s = NCURSES_SP_NAME(unctrl) … … 17983 18325 - 17984 18326 +#if USE_REENTRANT 17985 + tabsize = sp->_TABSIZE;18327 + tabsize = *ptrTabsize(sp); 17986 18328 +#else 17987 18329 + tabsize = TABSIZE; … … 17993 18335 diff -Naur ncurses-5.7.orig/ncurses/base/lib_beep.c ncurses-5.7/ncurses/base/lib_beep.c 17994 18336 --- ncurses-5.7.orig/ncurses/base/lib_beep.c 2005-04-09 08:20:04.000000000 -0700 17995 +++ ncurses-5.7/ncurses/base/lib_beep.c 2009-0 7-19 15:04:03.000000000 -070018337 +++ ncurses-5.7/ncurses/base/lib_beep.c 2009-09-12 08:51:40.000000000 -0700 17996 18338 @@ -1,5 +1,5 @@ 17997 18339 /**************************************************************************** … … 18059 18401 +} 18060 18402 +#endif 18403 diff -Naur ncurses-5.7.orig/ncurses/base/lib_bkgd.c ncurses-5.7/ncurses/base/lib_bkgd.c 18404 --- ncurses-5.7.orig/ncurses/base/lib_bkgd.c 2008-03-22 17:09:14.000000000 -0700 18405 +++ ncurses-5.7/ncurses/base/lib_bkgd.c 2009-09-12 08:52:07.000000000 -0700 18406 @@ -1,5 +1,5 @@ 18407 /**************************************************************************** 18408 - * Copyright (c) 1998-2006,2008 Free Software Foundation, Inc. * 18409 + * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. * 18410 * * 18411 * Permission is hereby granted, free of charge, to any person obtaining a * 18412 * copy of this software and associated documentation files (the * 18413 @@ -36,7 +36,7 @@ 18414 18415 #include <curses.priv.h> 18416 18417 -MODULE_ID("$Id: lib_bkgd.c,v 1.36 2008/03/23 00:09:14 tom Exp $") 18418 +MODULE_ID("$Id: lib_bkgd.c,v 1.37 2009/08/29 19:02:25 tom Exp $") 18419 18420 /* 18421 * Set the window's background information. 18422 @@ -126,8 +126,8 @@ 18423 NCURSES_CH_T old_bkgrnd; 18424 wgetbkgrnd(win, &old_bkgrnd); 18425 18426 - wbkgrndset(win, CHREF(new_bkgd)); 18427 - wattrset(win, AttrOf(win->_nc_bkgd)); 18428 + (void) wbkgrndset(win, CHREF(new_bkgd)); 18429 + (void) wattrset(win, AttrOf(win->_nc_bkgd)); 18430 18431 for (y = 0; y <= win->_maxy; y++) { 18432 for (x = 0; x <= win->_maxx; x++) { 18061 18433 diff -Naur ncurses-5.7.orig/ncurses/base/lib_color.c ncurses-5.7/ncurses/base/lib_color.c 18062 18434 --- ncurses-5.7.orig/ncurses/base/lib_color.c 2007-04-07 10:07:28.000000000 -0700 18063 +++ ncurses-5.7/ncurses/base/lib_color.c 2009-0 7-19 15:04:06.000000000 -070018435 +++ ncurses-5.7/ncurses/base/lib_color.c 2009-09-12 08:52:05.000000000 -0700 18064 18436 @@ -1,5 +1,5 @@ 18065 18437 /**************************************************************************** 18066 18438 - * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. * 18067 + * Copyright (c) 1998-200 7,2009 Free Software Foundation, Inc. *18439 + * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. * 18068 18440 * * 18069 18441 * Permission is hereby granted, free of charge, to any person obtaining a * … … 18077 18449 18078 18450 /* lib_color.c 18079 @@ -42,7 +43,11 @@ 18080 #include <term.h> 18451 @@ -38,12 +39,33 @@ 18452 */ 18453 18454 #include <curses.priv.h> 18455 - 18456 -#include <term.h> 18081 18457 #include <tic.h> 18082 18458 … … 18086 18462 +#endif 18087 18463 + 18088 +MODULE_ID("$Id: lib_color.c,v 1.92 2009/06/06 20:26:16 tom Exp $") 18089 18464 +MODULE_ID("$Id: lib_color.c,v 1.95 2009/08/22 19:04:36 tom Exp $") 18465 + 18466 +#ifdef USE_TERM_DRIVER 18467 +#define CanChange InfoOf(SP_PARM).canchange 18468 +#define DefaultPalette InfoOf(SP_PARM).defaultPalette 18469 +#define HasColor InfoOf(SP_PARM).hascolor 18470 +#define InitColor InfoOf(SP_PARM).initcolor 18471 +#define MaxColors InfoOf(SP_PARM).maxcolors 18472 +#define MaxPairs InfoOf(SP_PARM).maxpairs 18473 +#define UseHlsPalette (DefaultPalette == _nc_hls_palette) 18474 +#else 18475 +#define CanChange can_change 18476 +#define DefaultPalette (hue_lightness_saturation ? hls_palette : cga_palette) 18477 +#define HasColor has_color 18478 +#define InitColor initialize_color 18479 +#define MaxColors max_colors 18480 +#define MaxPairs max_pairs 18481 +#define UseHlsPalette (hue_lightness_saturation) 18482 +#endif 18483 18484 +#ifndef USE_TERM_DRIVER 18090 18485 /* 18091 18486 * These should be screen structure members. They need to be globals for 18092 @@ -108,6 +113,13 @@ 18487 * historical reasons. So we assign them in start_color() and also in 18488 @@ -64,6 +86,7 @@ 18489 NCURSES_EXPORT_VAR(int) COLOR_PAIRS = 0; 18490 NCURSES_EXPORT_VAR(int) COLORS = 0; 18491 #endif 18492 +#endif /* !USE_TERM_DRIVER */ 18493 18494 #define DATA(r,g,b) {r,g,b, 0,0,0, 0} 18495 18496 @@ -71,7 +94,7 @@ 18497 18498 #define MAX_PALETTE 8 18499 18500 -#define OkColorHi(n) (((n) < COLORS) && ((n) < max_colors)) 18501 +#define OkColorHi(n) (((n) < COLORS) && ((n) < maxcolors)) 18502 #define InPalette(n) ((n) >= 0 && (n) < MAX_PALETTE) 18503 18504 /* 18505 @@ -106,29 +129,43 @@ 18506 DATA( 300, 50, 100), /* COLOR_CYAN */ 18507 DATA( 0, 50, 100), /* COLOR_WHITE */ 18093 18508 }; 18509 + 18510 +#ifdef USE_TERM_DRIVER 18511 +NCURSES_EXPORT_VAR(const color_t*) _nc_cga_palette = cga_palette; 18512 +NCURSES_EXPORT_VAR(const color_t*) _nc_hls_palette = hls_palette; 18513 +#endif 18514 + 18094 18515 /* *INDENT-ON* */ 18095 18516 … … 18099 18520 + */ 18100 18521 +#define ValidPair(pair) \ 18101 + ((SP != 0) && (pair >= 0) && (pair < SP->_pair_limit) && SP->_coloron)18522 + ((SP_PARM != 0) && (pair >= 0) && (pair < SP_PARM->_pair_limit) && SP_PARM->_coloron) 18102 18523 + 18103 18524 #if NCURSES_EXT_FUNCS 18104 18525 /* 18105 18526 * These are called from _nc_do_color(), which in turn is called from 18106 @@ -147,31 +159,39 @@ 18527 - * vidattr - so we have to assume that SP may be null. 18528 + * vidattr - so we have to assume that sp may be null. 18529 */ 18530 static int 18531 -default_fg(void) 18532 +default_fg(NCURSES_SP_DCL0) 18533 { 18534 - return (SP != 0) ? SP->_default_fg : COLOR_WHITE; 18535 + return (SP_PARM != 0) ? SP_PARM->_default_fg : COLOR_WHITE; 18107 18536 } 18537 18538 static int 18539 -default_bg(void) 18540 +default_bg(NCURSES_SP_DCL0) 18541 { 18542 - return SP != 0 ? SP->_default_bg : COLOR_BLACK; 18543 + return SP_PARM != 0 ? SP_PARM->_default_bg : COLOR_BLACK; 18544 } 18545 #else 18546 -#define default_fg() COLOR_WHITE 18547 -#define default_bg() COLOR_BLACK 18548 +#define default_fg(sp) COLOR_WHITE 18549 +#define default_bg(sp) COLOR_BLACK 18550 #endif 18551 18552 +#ifndef USE_TERM_DRIVER 18553 /* 18554 * SVr4 curses is known to interchange color codes (1,4) and (3,6), possibly 18555 * to maintain compatibility with a pre-ANSI scheme. The same scheme is 18556 @@ -145,52 +182,70 @@ 18557 } 18558 return c; 18559 } 18560 +#endif 18108 18561 18109 18562 static void … … 18111 18564 +set_background_color(NCURSES_SP_DCLx int bg, NCURSES_SP_OUTC outc) 18112 18565 { 18566 +#ifdef USE_TERM_DRIVER 18567 + CallDriver_3(SP_PARM, color, FALSE, bg, outc); 18568 +#else 18113 18569 if (set_a_background) { 18114 18570 TPUTS_TRACE("set_a_background"); … … 18124 18580 + 1, outc); 18125 18581 } 18582 +#endif 18126 18583 } 18127 18584 … … 18130 18587 +set_foreground_color(NCURSES_SP_DCLx int fg, NCURSES_SP_OUTC outc) 18131 18588 { 18589 +#ifdef USE_TERM_DRIVER 18590 + CallDriver_3(SP_PARM, color, TRUE, fg, outc); 18591 +#else 18132 18592 if (set_a_foreground) { 18133 18593 TPUTS_TRACE("set_a_foreground"); … … 18143 18603 + 1, outc); 18144 18604 } 18605 +#endif 18145 18606 } 18146 18607 … … 18149 18610 +init_color_table(NCURSES_SP_DCL0) 18150 18611 { 18151 const color_t *tp; 18612 - const color_t *tp; 18613 + const color_t *tp = DefaultPalette; 18152 18614 int n; 18153 @@ -179,18 +199,18 @@ 18154 tp = (hue_lightness_saturation) ? hls_palette : cga_palette; 18615 18616 - tp = (hue_lightness_saturation) ? hls_palette : cga_palette; 18617 + assert(tp != 0); 18618 + 18155 18619 for (n = 0; n < COLORS; n++) { 18156 18620 if (InPalette(n)) { … … 18159 18623 } else { 18160 18624 - SP->_color_table[n] = tp[n % MAX_PALETTE]; 18625 - if (hue_lightness_saturation) { 18626 - SP->_color_table[n].green = 100; 18161 18627 + SP_PARM->_color_table[n] = tp[n % MAX_PALETTE]; 18162 if (hue_lightness_saturation) { 18163 - SP->_color_table[n].green = 100; 18628 + if (UseHlsPalette) { 18164 18629 + SP_PARM->_color_table[n].green = 100; 18165 18630 } else { … … 18179 18644 } 18180 18645 } 18181 @@ -200, 7 +220,7@@18646 @@ -200,8 +255,11 @@ 18182 18647 * Reset the color pair, e.g., to whatever color pair 0 is. 18183 18648 */ … … 18186 18651 +reset_color_pair(NCURSES_SP_DCL0) 18187 18652 { 18653 +#ifdef USE_TERM_DRIVER 18654 + return CallDriver(SP_PARM, rescol); 18655 +#else 18188 18656 bool result = FALSE; 18189 18657 18190 @@ -218,15 +238,14 @@ 18658 if (orig_pair != 0) { 18659 @@ -210,6 +268,7 @@ 18660 result = TRUE; 18661 } 18662 return result; 18663 +#endif 18664 } 18665 18666 /* 18667 @@ -217,65 +276,93 @@ 18668 * badly-written terminal descriptions than for the relatively rare case where 18191 18669 * someone has changed the color definitions. 18192 18670 */ 18193 18671 -bool 18194 18672 -_nc_reset_colors(void) 18195 -{ 18196 +NCURSES_SP_NAME(_nc_reset_colors) (NCURSES_SP_DCL0) { 18673 +NCURSES_EXPORT(bool) 18674 +NCURSES_SP_NAME(_nc_reset_colors) (NCURSES_SP_DCL0) 18675 { 18197 18676 int result = FALSE; 18198 18677 18199 18678 - T((T_CALLED("_nc_reset_colors()"))); 18200 18679 - if (SP->_color_defs > 0) 18201 18680 - SP->_color_defs = -(SP->_color_defs); 18681 - 18682 - if (reset_color_pair()) 18683 + T((T_CALLED("_nc_reset_colors(%p)"), SP_PARM)); 18202 18684 + if (SP_PARM->_color_defs > 0) 18203 18685 + SP_PARM->_color_defs = -(SP_PARM->_color_defs); 18204 18205 - if (reset_color_pair())18206 18686 + if (reset_color_pair(NCURSES_SP_ARG)) 18207 18687 result = TRUE; 18688 + 18689 +#ifdef USE_TERM_DRIVER 18690 + result = CallDriver(SP_PARM, rescolors); 18691 +#else 18208 18692 if (orig_colors != 0) { 18209 18693 TPUTS_TRACE("orig_colors"); 18210 @@ -236,46 +255,69 @@ 18694 putp(orig_colors); 18695 result = TRUE; 18696 } 18697 +#endif 18211 18698 returnBool(result); 18212 18699 } 18213 18700 18214 18701 +#if NCURSES_SP_FUNCS 18215 + bool18702 +NCURSES_EXPORT(bool) 18216 18703 +_nc_reset_colors(void) 18217 18704 +{ … … 18225 18712 { 18226 18713 int result = ERR; 18227 18228 T((T_CALLED("start_color()"))); 18714 + int maxpairs = 0, maxcolors = 0; 18715 18716 - T((T_CALLED("start_color()"))); 18717 + T((T_CALLED("start_color(%p)"), SP_PARM)); 18229 18718 18230 18719 - if (SP == 0) { … … 18235 18724 result = OK; 18236 18725 } else { 18237 18726 - 18238 18727 - if (reset_color_pair() != TRUE) { 18239 18728 - set_foreground_color(default_fg(), _nc_outch); 18240 18729 - set_background_color(default_bg(), _nc_outch); 18730 + maxpairs = MaxPairs; 18731 + maxcolors = MaxColors; 18241 18732 + if (reset_color_pair(NCURSES_SP_ARG) != TRUE) { 18242 18733 + set_foreground_color(NCURSES_SP_ARGx 18243 + default_fg( ),18734 + default_fg(NCURSES_SP_ARG), 18244 18735 + NCURSES_SP_NAME(_nc_outch)); 18245 18736 + set_background_color(NCURSES_SP_ARGx 18246 + default_bg( ),18737 + default_bg(NCURSES_SP_ARG), 18247 18738 + NCURSES_SP_NAME(_nc_outch)); 18248 18739 } 18249 18740 18250 18741 - if (max_pairs > 0 && max_colors > 0) { 18251 18742 - SP->_pair_count = max_pairs; 18252 18743 - SP->_color_count = max_colors; 18253 + SP_PARM->_pair_limit = max_pairs; 18744 + if (maxpairs > 0 && maxcolors > 0) { 18745 + SP_PARM->_pair_limit = maxpairs; 18254 18746 + 18255 18747 +#if NCURSES_EXT_FUNCS … … 18258 18750 + * allow for default-color as a component of a color-pair. 18259 18751 + */ 18260 + SP_PARM->_pair_limit += (1 + (2 * max _colors));18752 + SP_PARM->_pair_limit += (1 + (2 * maxcolors)); 18261 18753 +#endif 18262 + SP_PARM->_pair_count = max _pairs;18263 + SP_PARM->_color_count = max _colors;18754 + SP_PARM->_pair_count = maxpairs; 18755 + SP_PARM->_color_count = maxcolors; 18264 18756 #if !USE_REENTRANT 18265 COLOR_PAIRS = max_pairs; 18266 COLORS = max_colors; 18757 - COLOR_PAIRS = max_pairs; 18758 - COLORS = max_colors; 18759 + COLOR_PAIRS = maxpairs; 18760 + COLORS = maxcolors; 18267 18761 #endif 18268 18762 … … 18273 18767 - SP->_color_pairs[0] = PAIR_OF(default_fg(), default_bg()); 18274 18768 - init_color_table(); 18275 + SP_PARM->_color_pairs = TYPE_CALLOC(colorpair_t, 18276 + SP_PARM->_pair_limit); 18769 + SP_PARM->_color_pairs = TYPE_CALLOC(colorpair_t, SP_PARM->_pair_limit); 18277 18770 + if (SP_PARM->_color_pairs != 0) { 18278 + SP_PARM->_color_table = TYPE_CALLOC(color_t, max _colors);18771 + SP_PARM->_color_table = TYPE_CALLOC(color_t, maxcolors); 18279 18772 + if (SP_PARM->_color_table != 0) { 18280 + SP_PARM->_color_pairs[0] = PAIR_OF(default_fg( ),18281 + default_bg( ));18773 + SP_PARM->_color_pairs[0] = PAIR_OF(default_fg(NCURSES_SP_ARG), 18774 + default_bg(NCURSES_SP_ARG)); 18282 18775 + init_color_table(NCURSES_SP_ARG); 18283 18776 … … 18295 18788 } 18296 18789 } else { 18297 @@ -285,6 +3 27,14 @@18790 @@ -285,6 +372,14 @@ 18298 18791 returnCode(result); 18299 18792 } … … 18310 18803 static void 18311 18804 rgb2hls(short r, short g, short b, short *h, short *l, short *s) 18312 @@ -328,24 + 378,72@@18805 @@ -328,24 +423,75 @@ 18313 18806 * values. 18314 18807 */ … … 18319 18812 colorpair_t result; 18320 18813 + colorpair_t previous; 18321 18322 T((T_CALLED("init_pair(%d,%d,%d)"), pair, f, b)); 18814 + int maxcolors; 18815 18816 - T((T_CALLED("init_pair(%d,%d,%d)"), pair, f, b)); 18817 + T((T_CALLED("init_pair(%p,%d,%d,%d)"), SP_PARM, pair, f, b)); 18323 18818 18324 18819 - if ((pair < 0) || (pair >= COLOR_PAIRS) || SP == 0 || !SP->_coloron) 18325 18820 + if (!ValidPair(pair)) 18326 18821 returnCode(ERR); 18822 + 18823 + maxcolors = MaxColors; 18327 18824 + 18328 18825 + previous = SP_PARM->_color_pairs[pair]; … … 18390 18887 #endif 18391 18888 { 18392 @@ -361, 8 +459,8@@18889 @@ -361,14 +507,14 @@ 18393 18890 * pair colors with the new ones). 18394 18891 */ … … 18400 18897 int y, x; 18401 18898 18402 for (y = 0; y <= curscr->_maxy; y++) { 18403 @@ -381,9 +479,9 @@ 18404 _nc_make_oldhash(y); 18899 - for (y = 0; y <= curscr->_maxy; y++) { 18900 - struct ldat *ptr = &(curscr->_line[y]); 18901 + for (y = 0; y <= CurScreen(SP_PARM)->_maxy; y++) { 18902 + struct ldat *ptr = &(CurScreen(SP_PARM)->_line[y]); 18903 bool changed = FALSE; 18904 - for (x = 0; x <= curscr->_maxx; x++) { 18905 + for (x = 0; x <= CurScreen(SP_PARM)->_maxx; x++) { 18906 if (GetPair(ptr->text[x]) == pair) { 18907 /* Set the old cell to zero to ensure it will be 18908 updated on the next doupdate() */ 18909 @@ -378,15 +524,19 @@ 18910 } 18911 } 18912 if (changed) 18913 - _nc_make_oldhash(y); 18914 + NCURSES_SP_NAME(_nc_make_oldhash) (NCURSES_SP_ARGx y); 18405 18915 } 18406 18916 } … … 18408 18918 - if (GET_SCREEN_PAIR(SP) == pair) 18409 18919 - SET_SCREEN_PAIR(SP, (chtype) (~0)); /* force attribute update */ 18920 18410 18921 + SP_PARM->_color_pairs[pair] = result; 18411 18922 + if (GET_SCREEN_PAIR(SP_PARM) == pair) 18412 18923 + SET_SCREEN_PAIR(SP_PARM, (chtype) (~0)); /* force attribute update */ 18413 18924 + 18925 +#ifdef USE_TERM_DRIVER 18926 + CallDriver_3(SP_PARM, initpair, pair, f, b); 18927 +#else 18414 18928 if (initialize_pair && InPalette(f) && InPalette(b)) { 18415 const color_t *tp = hue_lightness_saturation ? hls_palette : cga_palette; 18416 @@ -404,54 +502,79 @@ 18929 - const color_t *tp = hue_lightness_saturation ? hls_palette : cga_palette; 18930 + const color_t *tp = DefaultPalette; 18931 18932 TR(TRACE_ATTRS, 18933 ("initializing pair: pair = %d, fg=(%d,%d,%d), bg=(%d,%d,%d)", 18934 @@ -400,80 +550,139 @@ 18935 tp[f].red, tp[f].green, tp[f].blue, 18936 tp[b].red, tp[b].green, tp[b].blue)); 18937 } 18938 +#endif 18939 18417 18940 returnCode(OK); 18418 18941 } … … 18434 18957 { 18435 18958 int result = ERR; 18436 18437 T((T_CALLED("init_color(%d,%d,%d,%d)"), color, r, g, b)); 18438 18439 if (initialize_color != NULL 18959 + int maxcolors; 18960 + 18961 + T((T_CALLED("init_color(%p,%d,%d,%d,%d)"), SP_PARM, color, r, g, b)); 18962 18963 - T((T_CALLED("init_color(%d,%d,%d,%d)"), color, r, g, b)); 18964 + if (SP_PARM == 0) 18965 + returnCode(result); 18966 18967 - if (initialize_color != NULL 18440 18968 - && SP != 0 18441 18969 - && SP->_coloron 18442 + && SP_PARM != 0 18970 + maxcolors = MaxColors; 18971 + 18972 + if (InitColor 18443 18973 + && SP_PARM->_coloron 18444 18974 && (color >= 0 && OkColorHi(color)) … … 18454 18984 + SP_PARM->_color_table[color].b = b; 18455 18985 18456 if (hue_lightness_saturation) { 18986 - if (hue_lightness_saturation) { 18987 + if (UseHlsPalette) { 18457 18988 rgb2hls(r, g, b, 18458 18989 - &SP->_color_table[color].red, … … 18471 19002 } 18472 19003 19004 +#ifdef USE_TERM_DRIVER 19005 + CallDriver_4(SP_PARM, initcolor, color, r, g, b); 19006 +#else 18473 19007 TPUTS_TRACE("initialize_color"); 18474 19008 putp(TPARM_4(initialize_color, color, r, g, b)); 18475 19009 - SP->_color_defs = max(color + 1, SP->_color_defs); 19010 +#endif 18476 19011 + SP_PARM->_color_defs = max(color + 1, SP_PARM->_color_defs); 19012 + 18477 19013 result = OK; 18478 19014 } … … 18488 19024 +#endif 18489 19025 + 18490 NCURSES_EXPORT(bool) 18491 -can_change_color(void) 18492 +NCURSES_SP_NAME(can_change_color) (NCURSES_SP_DCL0) 18493 { 18494 T((T_CALLED("can_change_color()"))); 18495 returnCode((can_change != 0) ? TRUE : FALSE); 18496 } 18497 19026 +NCURSES_EXPORT(bool) 19027 +NCURSES_SP_NAME(can_change_color) (NCURSES_SP_DCL) 19028 +{ 19029 + T((T_CALLED("can_change_color(%p)"), SP_PARM)); 19030 + returnCode((CanChange != 0) ? TRUE : FALSE); 19031 +} 19032 + 18498 19033 +#if NCURSES_SP_FUNCS 18499 19034 NCURSES_EXPORT(bool) 19035 can_change_color(void) 19036 { 19037 - T((T_CALLED("can_change_color()"))); 19038 - returnCode((can_change != 0) ? TRUE : FALSE); 19039 + return NCURSES_SP_NAME(can_change_color) (CURRENT_SCREEN); 19040 } 19041 +#endif 19042 19043 NCURSES_EXPORT(bool) 18500 19044 -has_colors(void) 18501 +can_change_color(void)18502 +{18503 + return NCURSES_SP_NAME(can_change_color) (CURRENT_SCREEN);18504 +}18505 +#endif18506 +18507 +NCURSES_EXPORT(bool)18508 19045 +NCURSES_SP_NAME(has_colors) (NCURSES_SP_DCL0) 18509 19046 { 19047 + int code; 19048 + 18510 19049 T((T_CALLED("has_colors()"))); 18511 returnCode((VALID_NUMERIC(max_colors) && VALID_NUMERIC(max_pairs) 18512 @@ -462,18 +585,27 @@ 18513 || set_color_pair)) ? TRUE : FALSE); 19050 - returnCode((VALID_NUMERIC(max_colors) && VALID_NUMERIC(max_pairs) 19051 - && (((set_foreground != NULL) 19052 - && (set_background != NULL)) 19053 - || ((set_a_foreground != NULL) 19054 - && (set_a_background != NULL)) 19055 - || set_color_pair)) ? TRUE : FALSE); 19056 +#ifdef USE_TERM_DRIVER 19057 + code = HasColor; 19058 +#else 19059 + code = ((VALID_NUMERIC(max_colors) && VALID_NUMERIC(max_pairs) 19060 + && (((set_foreground != NULL) 19061 + && (set_background != NULL)) 19062 + || ((set_a_foreground != NULL) 19063 + && (set_a_background != NULL)) 19064 + || set_color_pair)) ? TRUE : FALSE); 19065 +#endif 19066 + returnCode(code); 18514 19067 } 18515 19068 … … 18524 19077 NCURSES_EXPORT(int) 18525 19078 -color_content(short color, short *r, short *g, short *b) 18526 +NCURSES_SP_NAME(color_content) (NCURSES_SP_DCLx short color, short *r,18527 + short *g, short *b)19079 +NCURSES_SP_NAME(color_content) (NCURSES_SP_DCLx 19080 + short color, short *r, short *g, short *b) 18528 19081 { 18529 int result; 18530 18531 T((T_CALLED("color_content(%d,%p,%p,%p)"), color, r, g, b)); 19082 - int result; 19083 + int result = ERR; 19084 + int maxcolors; 19085 + 19086 + T((T_CALLED("color_content(%p,%d,%p,%p,%p)"), SP_PARM, color, r, g, b)); 19087 + 19088 + if (SP_PARM == 0) 19089 + returnCode(result); 19090 19091 - T((T_CALLED("color_content(%d,%p,%p,%p)"), color, r, g, b)); 18532 19092 - if (color < 0 || !OkColorHi(color) || SP == 0 || !SP->_coloron) { 18533 + if (color < 0 || !OkColorHi(color) || SP_PARM == 0 || !SP_PARM->_coloron) { 19093 + maxcolors = MaxColors; 19094 + 19095 + if (color < 0 || !OkColorHi(color) || !SP_PARM->_coloron) { 18534 19096 result = ERR; 18535 19097 } else { … … 18543 19105 if (r) 18544 19106 *r = c_r; 18545 @@ -489,18 +6 21,27 @@19107 @@ -489,18 +698,27 @@ 18546 19108 returnCode(result); 18547 19109 } … … 18557 19119 + 18558 19120 +NCURSES_EXPORT(int) 18559 +NCURSES_SP_NAME(pair_content) (NCURSES_SP_DCLx short pair, short *f,18560 + short *b)19121 +NCURSES_SP_NAME(pair_content) (NCURSES_SP_DCLx 19122 + short pair, short *f, short *b) 18561 19123 { 18562 19124 int result; 18563 19125 18564 T((T_CALLED("pair_content(%d,%p,%p)"), pair, f, b)); 19126 - T((T_CALLED("pair_content(%d,%p,%p)"), pair, f, b)); 19127 + T((T_CALLED("pair_content(%p,%d,%p,%p)"), SP_PARM, pair, f, b)); 18565 19128 18566 19129 - if ((pair < 0) || (pair >= COLOR_PAIRS) || SP == 0 || !SP->_coloron) { … … 18575 19138 #if NCURSES_EXT_FUNCS 18576 19139 if (fg == COLOR_DEFAULT) 18577 @@ -520,27 +661,41 @@ 19140 @@ -514,33 +732,50 @@ 19141 if (b) 19142 *b = bg; 19143 19144 - TR(TRACE_ATTRS, ("...pair_content(%d,%d,%d)", pair, fg, bg)); 19145 + TR(TRACE_ATTRS, ("...pair_content(%p,%d,%d,%d)", SP_PARM, pair, fg, bg)); 19146 result = OK; 19147 } 18578 19148 returnCode(result); 18579 19149 } … … 18595 19165 + NCURSES_SP_OUTC outc) 18596 19166 { 19167 +#ifdef USE_TERM_DRIVER 19168 + CallDriver_4(SP_PARM, docolor, old_pair, pair, reverse, outc); 19169 +#else 18597 19170 NCURSES_COLOR_T fg = COLOR_DEFAULT; 18598 19171 NCURSES_COLOR_T bg = COLOR_DEFAULT; … … 18622 19195 if ((isDefaultColor(fg) && !isDefaultColor(old_fg)) 18623 19196 || (isDefaultColor(bg) && !isDefaultColor(old_bg))) { 18624 @@ -550,2 0 +705,20@@19197 @@ -550,29 +785,29 @@ 18625 19198 * the terminal description, treat it as screen's indicator of ECMA 18626 19199 * SGR 39 and SGR 49, and assume the two sequences are independent. … … 18649 19222 return; 18650 19223 } 18651 @@ -585,9 +740,22 @@ 19224 19225 #if NCURSES_EXT_FUNCS 19226 if (isDefaultColor(fg)) 19227 - fg = default_fg(); 19228 + fg = default_fg(NCURSES_SP_ARG); 19229 if (isDefaultColor(bg)) 19230 - bg = default_bg(); 19231 + bg = default_bg(NCURSES_SP_ARG); 19232 #endif 19233 19234 if (reverse) { 19235 @@ -585,9 +820,23 @@ 18652 19236 fg, bg)); 18653 19237 … … 18660 19244 + set_background_color(NCURSES_SP_ARGx bg, outc); 18661 19245 } 19246 +#endif 18662 19247 } 18663 19248 + … … 18676 19261 diff -Naur ncurses-5.7.orig/ncurses/base/lib_colorset.c ncurses-5.7/ncurses/base/lib_colorset.c 18677 19262 --- ncurses-5.7.orig/ncurses/base/lib_colorset.c 2005-01-29 13:40:51.000000000 -0800 18678 +++ ncurses-5.7/ncurses/base/lib_colorset.c 2009-0 7-19 15:02:16.000000000 -070019263 +++ ncurses-5.7/ncurses/base/lib_colorset.c 2009-09-12 08:51:11.000000000 -0700 18679 19264 @@ -1,5 +1,5 @@ 18680 19265 /**************************************************************************** … … 18724 19309 diff -Naur ncurses-5.7.orig/ncurses/base/lib_delwin.c ncurses-5.7/ncurses/base/lib_delwin.c 18725 19310 --- ncurses-5.7.orig/ncurses/base/lib_delwin.c 2008-06-07 07:10:56.000000000 -0700 18726 +++ ncurses-5.7/ncurses/base/lib_delwin.c 2009-0 7-19 15:04:03.000000000 -070019311 +++ ncurses-5.7/ncurses/base/lib_delwin.c 2009-09-12 08:51:40.000000000 -0700 18727 19312 @@ -1,5 +1,5 @@ 18728 19313 /**************************************************************************** … … 18781 19366 diff -Naur ncurses-5.7.orig/ncurses/base/lib_dft_fgbg.c ncurses-5.7/ncurses/base/lib_dft_fgbg.c 18782 19367 --- ncurses-5.7.orig/ncurses/base/lib_dft_fgbg.c 2005-11-26 12:03:38.000000000 -0800 18783 +++ ncurses-5.7/ncurses/base/lib_dft_fgbg.c 2009-0 7-19 15:04:04.000000000 -070019368 +++ ncurses-5.7/ncurses/base/lib_dft_fgbg.c 2009-09-12 08:51:42.000000000 -0700 18784 19369 @@ -1,5 +1,5 @@ 18785 19370 /**************************************************************************** … … 18888 19473 diff -Naur ncurses-5.7.orig/ncurses/base/lib_driver.c ncurses-5.7/ncurses/base/lib_driver.c 18889 19474 --- ncurses-5.7.orig/ncurses/base/lib_driver.c 1969-12-31 16:00:00.000000000 -0800 18890 +++ ncurses-5.7/ncurses/base/lib_driver.c 2009-0 7-19 15:04:11.000000000 -070019475 +++ ncurses-5.7/ncurses/base/lib_driver.c 2009-09-12 08:51:49.000000000 -0700 18891 19476 @@ -0,0 +1,142 @@ 18892 19477 +/**************************************************************************** … … 19034 19619 diff -Naur ncurses-5.7.orig/ncurses/base/lib_echo.c ncurses-5.7/ncurses/base/lib_echo.c 19035 19620 --- ncurses-5.7.orig/ncurses/base/lib_echo.c 2000-12-09 18:43:27.000000000 -0800 19036 +++ ncurses-5.7/ncurses/base/lib_echo.c 2009-0 7-19 15:02:22.000000000 -070019621 +++ ncurses-5.7/ncurses/base/lib_echo.c 2009-09-12 08:51:17.000000000 -0700 19037 19622 @@ -1,5 +1,5 @@ 19038 19623 /**************************************************************************** … … 19100 19685 diff -Naur ncurses-5.7.orig/ncurses/base/lib_endwin.c ncurses-5.7/ncurses/base/lib_endwin.c 19101 19686 --- ncurses-5.7.orig/ncurses/base/lib_endwin.c 2000-12-09 18:43:27.000000000 -0800 19102 +++ ncurses-5.7/ncurses/base/lib_endwin.c 2009-0 7-19 15:04:13.000000000 -070019687 +++ ncurses-5.7/ncurses/base/lib_endwin.c 2009-09-12 08:51:50.000000000 -0700 19103 19688 @@ -1,5 +1,5 @@ 19104 19689 /**************************************************************************** … … 19168 19753 diff -Naur ncurses-5.7.orig/ncurses/base/lib_flash.c ncurses-5.7/ncurses/base/lib_flash.c 19169 19754 --- ncurses-5.7.orig/ncurses/base/lib_flash.c 2000-12-09 18:43:27.000000000 -0800 19170 +++ ncurses-5.7/ncurses/base/lib_flash.c 2009-0 7-19 15:04:03.000000000 -070019755 +++ ncurses-5.7/ncurses/base/lib_flash.c 2009-09-12 08:51:40.000000000 -0700 19171 19756 @@ -1,5 +1,5 @@ 19172 19757 /**************************************************************************** … … 19237 19822 diff -Naur ncurses-5.7.orig/ncurses/base/lib_freeall.c ncurses-5.7/ncurses/base/lib_freeall.c 19238 19823 --- ncurses-5.7.orig/ncurses/base/lib_freeall.c 2008-09-27 06:09:57.000000000 -0700 19239 +++ ncurses-5.7/ncurses/base/lib_freeall.c 2009-0 7-19 15:03:59.000000000 -070019824 +++ ncurses-5.7/ncurses/base/lib_freeall.c 2009-09-12 08:51:37.000000000 -0700 19240 19825 @@ -1,5 +1,5 @@ 19241 19826 /**************************************************************************** … … 19363 19948 diff -Naur ncurses-5.7.orig/ncurses/base/lib_getch.c ncurses-5.7/ncurses/base/lib_getch.c 19364 19949 --- ncurses-5.7.orig/ncurses/base/lib_getch.c 2008-09-20 12:46:13.000000000 -0700 19365 +++ ncurses-5.7/ncurses/base/lib_getch.c 2009-0 7-19 15:04:13.000000000 -070019950 +++ ncurses-5.7/ncurses/base/lib_getch.c 2009-09-12 08:52:04.000000000 -0700 19366 19951 @@ -1,5 +1,5 @@ 19367 19952 /**************************************************************************** … … 19384 19969 19385 19970 -MODULE_ID("$Id: lib_getch.c,v 1.99 2008/09/20 19:46:13 tom Exp $") 19386 +MODULE_ID("$Id: lib_getch.c,v 1.10 4 2009/07/04 20:41:13 tomExp $")19971 +MODULE_ID("$Id: lib_getch.c,v 1.107 2009/08/15 20:41:24 Clemens.Ladisch Exp $") 19387 19972 19388 19973 #include <fifo_defs.h> … … 19391 19976 -#define GetEscdelay(sp) (sp)->_ESCDELAY 19392 19977 +#define GetEscdelay(sp) *_nc_ptr_Escdelay(sp) 19393 +NCURSES_EXPORT(int *)19394 +_nc_ptr_Escdelay(SCREEN *sp)19395 +{19396 + return ptrEscdelay(sp);19397 +}19398 19978 NCURSES_EXPORT(int) 19399 19979 NCURSES_PUBLIC_VAR(ESCDELAY) (void) … … 19401 19981 - return SP ? GetEscdelay(SP) : 1000; 19402 19982 + return *(_nc_ptr_Escdelay(CURRENT_SCREEN)); 19983 +} 19984 + 19985 +NCURSES_EXPORT(int *) 19986 +_nc_ptr_Escdelay(SCREEN *sp) 19987 +{ 19988 + return ptrEscdelay(sp); 19403 19989 } 19404 19990 #else … … 19406 19992 -NCURSES_EXPORT_VAR(int) 19407 19993 -ESCDELAY = 1000; /* max interval betw. chars in funkeys, in millisecs */ 19408 +NCURSES_EXPORT_VAR (int) 19409 + ESCDELAY = 1000; /* max interval betw. chars in funkeys, in millisecs */ 19994 +NCURSES_EXPORT_VAR(int) ESCDELAY = 1000; 19410 19995 #endif 19411 19996 … … 19426 20011 #else 19427 20012 + (void) SP_PARM; 19428 19429 19430 19431 20013 + ESCDELAY = value; 20014 +#endif 20015 + return code; 20016 +} 19432 20017 + 19433 20018 +#if NCURSES_SP_FUNCS … … 19439 20024 + code = NCURSES_SP_NAME(set_escdelay) (CURRENT_SCREEN, value); 19440 20025 +#else 19441 +ESCDELAY = value;20026 ESCDELAY = value; 19442 20027 + code = OK; 19443 +#endif19444 +return code;19445 +}19446 +#endif20028 #endif 20029 return code; 20030 } 20031 #endif 19447 20032 +#endif /* NCURSES_EXT_FUNCS */ 19448 20033 + … … 19459 20044 +#if NCURSES_SP_FUNCS 19460 20045 +NCURSES_EXPORT(int) 19461 +get_escdelay 20046 +get_escdelay(void) 19462 20047 +{ 19463 + return NCURSES_SP_NAME(get_escdelay) (CURRENT_SCREEN);20048 + return NCURSES_SP_NAME(get_escdelay) (CURRENT_SCREEN); 19464 20049 +} 19465 20050 +#endif 19466 20051 +#endif /* NCURSES_EXT_FUNCS */ 19467 20052 … … 19591 20176 #ifdef NCURSES_WGETCH_EVENTS 19592 20177 /* Return it first */ 19593 @@ -402, 7 +461,7@@20178 @@ -402,13 +461,13 @@ 19594 20179 rc = check_mouse_activity(sp, delay EVENTLIST_2nd(evl)); 19595 20180 … … 19600 20185 returnCode(KEY_CODE_YES); 19601 20186 } 20187 #endif 20188 if (!rc) { 20189 - returnCode(ERR); 20190 + goto check_sigwinch; 20191 } 20192 } 20193 /* else go on to read data available */ 19602 20194 @@ -427,7 +486,7 @@ 19603 20195 * increase the wait with mouseinterval(). … … 19639 20231 } 19640 20232 } 19641 @@ -645,7 +704,7 @@ 20233 @@ -470,6 +529,7 @@ 20234 } 20235 20236 if (ch == ERR) { 20237 + check_sigwinch: 20238 #if USE_SIZECHANGE 20239 if (_nc_handle_sigwinch(sp)) { 20240 _nc_update_screensize(sp); 20241 @@ -645,7 +705,7 @@ 19642 20242 TR(TRACE_IEVENT, ("waiting for rest of sequence")); 19643 20243 rc = check_mouse_activity(sp, timeleft EVENTLIST_2nd(evl)); … … 19650 20250 diff -Naur ncurses-5.7.orig/ncurses/base/lib_getstr.c ncurses-5.7/ncurses/base/lib_getstr.c 19651 20251 --- ncurses-5.7.orig/ncurses/base/lib_getstr.c 2008-08-16 12:20:04.000000000 -0700 19652 +++ ncurses-5.7/ncurses/base/lib_getstr.c 2009-0 7-19 15:03:59.000000000 -070020252 +++ ncurses-5.7/ncurses/base/lib_getstr.c 2009-09-12 08:51:37.000000000 -0700 19653 20253 @@ -1,5 +1,5 @@ 19654 20254 /**************************************************************************** … … 19716 20316 diff -Naur ncurses-5.7.orig/ncurses/base/lib_initscr.c ncurses-5.7/ncurses/base/lib_initscr.c 19717 20317 --- ncurses-5.7.orig/ncurses/base/lib_initscr.c 2008-08-16 14:20:48.000000000 -0700 19718 +++ ncurses-5.7/ncurses/base/lib_initscr.c 2009-0 7-19 15:03:51.000000000 -070020318 +++ ncurses-5.7/ncurses/base/lib_initscr.c 2009-09-12 08:51:28.000000000 -0700 19719 20319 @@ -1,5 +1,5 @@ 19720 20320 /**************************************************************************** … … 19747 20347 diff -Naur ncurses-5.7.orig/ncurses/base/lib_insch.c ncurses-5.7/ncurses/base/lib_insch.c 19748 20348 --- ncurses-5.7.orig/ncurses/base/lib_insch.c 2008-02-02 16:14:37.000000000 -0800 19749 +++ ncurses-5.7/ncurses/base/lib_insch.c 2009-0 7-19 15:04:04.000000000 -070020349 +++ ncurses-5.7/ncurses/base/lib_insch.c 2009-09-12 08:51:42.000000000 -0700 19750 20350 @@ -1,5 +1,5 @@ 19751 20351 /**************************************************************************** … … 19849 20449 diff -Naur ncurses-5.7.orig/ncurses/base/lib_insnstr.c ncurses-5.7/ncurses/base/lib_insnstr.c 19850 20450 --- ncurses-5.7.orig/ncurses/base/lib_insnstr.c 2004-02-28 15:44:56.000000000 -0800 19851 +++ ncurses-5.7/ncurses/base/lib_insnstr.c 2009-0 7-19 15:04:04.000000000 -070020451 +++ ncurses-5.7/ncurses/base/lib_insnstr.c 2009-09-12 08:51:42.000000000 -0700 19852 20452 @@ -1,5 +1,5 @@ 19853 20453 /**************************************************************************** … … 19882 20482 diff -Naur ncurses-5.7.orig/ncurses/base/lib_isendwin.c ncurses-5.7/ncurses/base/lib_isendwin.c 19883 20483 --- ncurses-5.7.orig/ncurses/base/lib_isendwin.c 2000-12-09 18:43:27.000000000 -0800 19884 +++ ncurses-5.7/ncurses/base/lib_isendwin.c 2009-0 7-19 15:02:20.000000000 -070020484 +++ ncurses-5.7/ncurses/base/lib_isendwin.c 2009-09-12 08:51:16.000000000 -0700 19885 20485 @@ -1,5 +1,5 @@ 19886 20486 /**************************************************************************** … … 19926 20526 diff -Naur ncurses-5.7.orig/ncurses/base/lib_mouse.c ncurses-5.7/ncurses/base/lib_mouse.c 19927 20527 --- ncurses-5.7.orig/ncurses/base/lib_mouse.c 2008-10-18 14:48:55.000000000 -0700 19928 +++ ncurses-5.7/ncurses/base/lib_mouse.c 2009-0 7-19 15:04:13.000000000 -070020528 +++ ncurses-5.7/ncurses/base/lib_mouse.c 2009-09-12 08:51:50.000000000 -0700 19929 20529 @@ -1,5 +1,5 @@ 19930 20530 /**************************************************************************** … … 20313 20913 diff -Naur ncurses-5.7.orig/ncurses/base/lib_mvwin.c ncurses-5.7/ncurses/base/lib_mvwin.c 20314 20914 --- ncurses-5.7.orig/ncurses/base/lib_mvwin.c 2006-02-25 14:53:46.000000000 -0800 20315 +++ ncurses-5.7/ncurses/base/lib_mvwin.c 2009-0 7-19 15:04:06.000000000 -070020915 +++ ncurses-5.7/ncurses/base/lib_mvwin.c 2009-09-12 08:51:43.000000000 -0700 20316 20916 @@ -1,5 +1,5 @@ 20317 20917 /**************************************************************************** … … 20360 20960 diff -Naur ncurses-5.7.orig/ncurses/base/lib_newterm.c ncurses-5.7/ncurses/base/lib_newterm.c 20361 20961 --- ncurses-5.7.orig/ncurses/base/lib_newterm.c 2008-08-16 14:20:48.000000000 -0700 20362 +++ ncurses-5.7/ncurses/base/lib_newterm.c 2009-0 7-19 15:03:59.000000000 -070020962 +++ ncurses-5.7/ncurses/base/lib_newterm.c 2009-09-12 08:52:10.000000000 -0700 20363 20963 @@ -1,5 +1,5 @@ 20364 20964 /**************************************************************************** … … 20376 20976 20377 20977 /* 20378 @@ -45,10 +46,1 4@@20978 @@ -45,10 +46,19 @@ 20379 20979 #define _POSIX_SOURCE 20380 20980 #endif 20381 20981 20982 -#include <term.h> /* clear_screen, cup & friends, cur_term */ 20382 20983 +#ifndef CUR 20383 +#define CUR SP_TERMTYPE 20984 +#define CUR SP_TERMTYPE 20384 20985 +#endif 20385 20986 + 20386 #include <term.h> /* clear_screen, cup & friends, cur_term */20387 20987 #include <tic.h> 20388 20988 20389 20989 -MODULE_ID("$Id: lib_newterm.c,v 1.73 2008/08/16 21:20:48 Werner.Fink Exp $") 20390 +MODULE_ID("$Id: lib_newterm.c,v 1.77 2009/05/10 00:48:29 tom Exp $") 20990 +MODULE_ID("$Id: lib_newterm.c,v 1.79 2009/09/06 15:13:41 tom Exp $") 20991 + 20992 +#ifdef USE_TERM_DRIVER 20993 +#define NumLabels InfoOf(SP_PARM).numlabels 20994 +#else 20995 +#define NumLabels num_labels 20996 +#endif 20391 20997 20392 20998 #ifndef ONLCR /* Allows compilation under the QNX 4.2 OS */ 20393 20999 #define ONLCR 0 20394 @@ -95,7 +100,7 @@ 21000 @@ -63,16 +73,17 @@ 21001 * is supposed to behave as if it calls newterm, we do it here. 21002 */ 21003 static NCURSES_INLINE int 21004 -_nc_initscr(void) 21005 +_nc_initscr(NCURSES_SP_DCL0) 21006 { 21007 int result = ERR; 21008 + TERMINAL *term = TerminalOf(SP_PARM); 21009 21010 /* for extended XPG4 conformance requires cbreak() at this point */ 21011 /* (SVr4 curses does this anyway) */ 21012 - if (cbreak() == OK) { 21013 + if (NCURSES_SP_NAME(cbreak) (NCURSES_SP_ARG) == OK) { 21014 TTY buf; 21015 21016 - buf = cur_term->Nttyb; 21017 + buf = term->Nttyb; 21018 #ifdef TERMIOS 21019 buf.c_lflag &= ~(ECHO | ECHONL); 21020 buf.c_iflag &= ~(ICRNL | INLCR | IGNCR); 21021 @@ -82,8 +93,9 @@ 21022 #else 21023 memset(&buf, 0, sizeof(buf)); 21024 #endif 21025 - if ((result = _nc_set_tty_mode(&buf)) == OK) 21026 - cur_term->Nttyb = buf; 21027 + result = NCURSES_SP_NAME(_nc_set_tty_mode) (NCURSES_SP_ARGx &buf); 21028 + if (result == OK) 21029 + term->Nttyb = buf; 21030 } 21031 return result; 21032 } 21033 @@ -95,13 +107,30 @@ 20395 21034 * initialized. 20396 21035 */ 20397 21036 NCURSES_EXPORT(void) 20398 -filter(void)20399 21037 +NCURSES_SP_NAME(filter) (NCURSES_SP_DCL0) 21038 +{ 21039 + START_TRACE(); 21040 + T((T_CALLED("filter(%p)"), SP_PARM)); 21041 +#if NCURSES_SP_FUNCS 21042 + if (IsPreScreen(SP_PARM)) { 21043 + SP_PARM->_filtered = TRUE; 21044 + } 21045 +#else 21046 + _nc_prescreen.filter_mode = TRUE; 21047 +#endif 21048 + returnVoid; 21049 +} 21050 + 21051 +#if NCURSES_SP_FUNCS 21052 +NCURSES_EXPORT(void) 21053 filter(void) 20400 21054 { 20401 21055 START_TRACE(); 20402 T((T_CALLED("filter"))); 20403 @@ -103,23 +108,42 @@ 21056 - T((T_CALLED("filter"))); 21057 + T((T_CALLED("filter()"))); 21058 _nc_prescreen.filter_mode = TRUE; 20404 21059 returnVoid; 20405 21060 } 20406 20407 +#if NCURSES_SP_FUNCS20408 +NCURSES_EXPORT(void)20409 +filter(void)20410 +{20411 + NCURSES_SP_NAME(filter) (CURRENT_SCREEN);20412 +}20413 21061 +#endif 20414 + 21062 20415 21063 #if NCURSES_EXT_FUNCS 20416 21064 /* 20417 * An extension, allowing the application to open a new screen without 21065 @@ -109,62 +138,105 @@ 20418 21066 * requiring it to also be filtered. 20419 21067 */ 20420 21068 NCURSES_EXPORT(void) 20421 -nofilter(void)20422 21069 +NCURSES_SP_NAME(nofilter) (NCURSES_SP_DCL0) 21070 +{ 21071 + START_TRACE(); 21072 + T((T_CALLED("nofilter(%p)"), SP_PARM)); 21073 +#if NCURSES_SP_FUNCS 21074 + if (IsPreScreen(SP_PARM)) { 21075 + SP_PARM->_filtered = FALSE; 21076 + } 21077 +#else 21078 + _nc_prescreen.filter_mode = FALSE; 21079 +#endif 21080 + returnVoid; 21081 +} 21082 + 21083 +#if NCURSES_SP_FUNCS 21084 +NCURSES_EXPORT(void) 21085 nofilter(void) 20423 21086 { 20424 21087 START_TRACE(); 20425 T((T_CALLED("nofilter"))); 21088 - T((T_CALLED("nofilter"))); 21089 + T((T_CALLED("nofilter()"))); 20426 21090 _nc_prescreen.filter_mode = FALSE; 20427 21091 returnVoid; 20428 21092 } 20429 +20430 +#if NCURSES_SP_FUNCS20431 +NCURSES_EXPORT(void)20432 +nofilter(void)20433 +{20434 + NCURSES_SP_NAME(nofilter) (CURRENT_SCREEN);20435 +}20436 21093 #endif 20437 21094 +#endif /* NCURSES_EXT_FUNCS */ … … 20446 21103 int value; 20447 21104 int errret; 20448 @@ -133,8 +157,8 @@ 21105 - SCREEN *current; 21106 SCREEN *result = 0; 21107 + SCREEN *current; 21108 TERMINAL *its_term; 21109 + FILE *_ofp = ofp ? ofp : stdout; 21110 + FILE *_ifp = ifp ? ifp : stdin; 21111 + int cols; 21112 + int numlab; 21113 +#ifdef USE_TERM_DRIVER 21114 + TERMINAL *new_term; 21115 +#endif 21116 21117 START_TRACE(); 21118 - T((T_CALLED("newterm(\"%s\",%p,%p)"), name, ofp, ifp)); 21119 + T((T_CALLED("newterm(%p, \"%s\", %p,%p)"), SP_PARM, name, ofp, ifp)); 21120 20449 21121 _nc_init_pthreads(); 20450 21122 _nc_lock_global(curses); … … 20456 21128 20457 21129 /* this loads the capability entry, then sets LINES and COLS */ 20458 if (setupterm(name, fileno(ofp), &errret) != ERR) { 20459 @@ -159,7 +183,7 @@ 21130 - if (setupterm(name, fileno(ofp), &errret) != ERR) { 21131 + if (setupterm(name, fileno(_ofp), &errret) != ERR) { 21132 int slk_format = _nc_globals.slk_format; 21133 21134 - /* 21135 - * This actually allocates the screen structure, and saves the original 21136 - * terminal settings. 21137 - */ 21138 _nc_set_screen(0); 21139 +#ifdef USE_TERM_DRIVER 21140 + assert(new_term != 0); 21141 +#endif 21142 21143 /* allow user to set maximum escape delay from the environment */ 21144 if ((value = _nc_getenv_num("ESCDELAY")) >= 0) { 21145 set_escdelay(value); 21146 } 21147 21148 + /* 21149 + * This actually allocates the screen structure, and saves the original 21150 + * terminal settings. 21151 + */ 21152 if (_nc_setupscreen(LINES, 21153 COLS, 21154 - ofp, 21155 + _ofp, 21156 _nc_prescreen.filter_mode, 21157 slk_format) == ERR) { 20460 21158 _nc_set_screen(current); 20461 21159 result = 0; 20462 21160 } else { 20463 21161 - assert(SP != 0); 21162 +#ifdef USE_TERM_DRIVER 21163 + TERMINAL_CONTROL_BLOCK *TCB; 21164 +#else 21165 + SP_PARM = CURRENT_SCREEN; 21166 +#endif 20464 21167 + assert(SP_PARM != 0); 21168 + cols = *(ptrCols(SP_PARM)); 21169 +#ifdef USE_TERM_DRIVER 21170 + TCB = (TERMINAL_CONTROL_BLOCK *) new_term; 21171 + TCB->csp = SP_PARM; 21172 +#endif 21173 + numlab = NumLabels; 21174 + 20465 21175 /* 20466 21176 * In setupterm() we did a set_curterm(), but it was before we set 20467 * SP. So the "current" screen's terminal pointer was overwritten 20468 @@ -233,3 +257,11 @@ 21177 - * SP. So the "current" screen's terminal pointer was overwritten 21178 - * with a different terminal. Later, in _nc_setupscreen(), we set 21179 - * SP and the terminal pointer in the new screen. 21180 + * CURRENT_SCREEN. So the "current" screen's terminal pointer was 21181 + * overwritten with a different terminal. Later, in 21182 + * _nc_setupscreen(), we set CURRENT_SCREEN and the terminal 21183 + * pointer in the new screen. 21184 * 21185 * Restore the terminal-pointer for the pre-existing screen, if 21186 * any. 21187 @@ -173,36 +245,41 @@ 21188 current->_term = its_term; 21189 21190 /* if the terminal type has real soft labels, set those up */ 21191 - if (slk_format && num_labels > 0 && SLK_STDFMT(slk_format)) 21192 + if (slk_format && NumLabels > 0 && SLK_STDFMT(slk_format)) 21193 _nc_slk_initialize(stdscr, COLS); 21194 21195 - SP->_ifd = fileno(ifp); 21196 - typeahead(fileno(ifp)); 21197 + SP_PARM->_ifd = fileno(_ifp); 21198 + NCURSES_SP_NAME(typeahead) (NCURSES_SP_ARGx fileno(_ifp)); 21199 #ifdef TERMIOS 21200 - SP->_use_meta = ((cur_term->Ottyb.c_cflag & CSIZE) == CS8 && 21201 - !(cur_term->Ottyb.c_iflag & ISTRIP)); 21202 + SP_PARM->_use_meta = ((cur_term->Ottyb.c_cflag & CSIZE) == CS8 && 21203 + !(cur_term->Ottyb.c_iflag & ISTRIP)); 21204 #else 21205 - SP->_use_meta = FALSE; 21206 + SP_PARM->_use_meta = FALSE; 21207 #endif 21208 - SP->_endwin = FALSE; 21209 - 21210 + SP_PARM->_endwin = FALSE; 21211 +#ifndef USE_TERM_DRIVER 21212 /* 21213 * Check whether we can optimize scrolling under dumb terminals in 21214 * case we do not have any of these capabilities, scrolling 21215 * optimization will be useless. 21216 */ 21217 - SP->_scrolling = ((scroll_forward && scroll_reverse) || 21218 - ((parm_rindex || 21219 - parm_insert_line || 21220 - insert_line) && 21221 - (parm_index || 21222 - parm_delete_line || 21223 - delete_line))); 21224 + SP_PARM->_scrolling = ((scroll_forward && scroll_reverse) || 21225 + ((parm_rindex || 21226 + parm_insert_line || 21227 + insert_line) && 21228 + (parm_index || 21229 + parm_delete_line || 21230 + delete_line))); 21231 +#endif 21232 21233 - baudrate(); /* sets a field in the SP structure */ 21234 + NCURSES_SP_NAME(baudrate) (NCURSES_SP_ARG); /* sets a field in the screen structure */ 21235 21236 - SP->_keytry = 0; 21237 + SP_PARM->_keytry = 0; 21238 21239 + /* compute movement costs so we can do better move optimization */ 21240 +#ifdef USE_TERM_DRIVER 21241 + TCBOf(SP_PARM)->drv->scinit(SP_PARM); 21242 +#else 21243 /* 21244 * Check for mismatched graphic-rendition capabilities. Most SVr4 21245 * terminfo trees contain entries that have rmul or rmso equated to 21246 @@ -213,23 +290,31 @@ 21247 * shouldn't be looking at this detail. 21248 */ 21249 #define SGR0_TEST(mode) (mode != 0) && (exit_attribute_mode == 0 || strcmp(mode, exit_attribute_mode)) 21250 - SP->_use_rmso = SGR0_TEST(exit_standout_mode); 21251 - SP->_use_rmul = SGR0_TEST(exit_underline_mode); 21252 + SP_PARM->_use_rmso = SGR0_TEST(exit_standout_mode); 21253 + SP_PARM->_use_rmul = SGR0_TEST(exit_underline_mode); 21254 21255 /* compute movement costs so we can do better move optimization */ 21256 _nc_mvcur_init(); 21257 21258 /* initialize terminal to a sane state */ 21259 _nc_screen_init(); 21260 +#endif 21261 21262 /* Initialize the terminal line settings. */ 21263 - _nc_initscr(); 21264 + _nc_initscr(NCURSES_SP_ARG); 21265 21266 _nc_signal_handler(TRUE); 21267 - 21268 - result = SP; 21269 + result = SP_PARM; 21270 } 21271 } 20469 21272 _nc_unlock_global(curses); 20470 21273 returnSP(result); … … 20480 21283 diff -Naur ncurses-5.7.orig/ncurses/base/lib_newwin.c ncurses-5.7/ncurses/base/lib_newwin.c 20481 21284 --- ncurses-5.7.orig/ncurses/base/lib_newwin.c 2008-06-07 06:58:09.000000000 -0700 20482 +++ ncurses-5.7/ncurses/base/lib_newwin.c 2009-0 7-19 15:04:06.000000000 -070021285 +++ ncurses-5.7/ncurses/base/lib_newwin.c 2009-09-12 08:52:10.000000000 -0700 20483 21286 @@ -1,5 +1,5 @@ 20484 21287 /**************************************************************************** … … 20501 21304 20502 21305 -MODULE_ID("$Id: lib_newwin.c,v 1.52 2008/06/07 13:58:09 tom Exp $") 20503 +MODULE_ID("$Id: lib_newwin.c,v 1. 58 2009/06/06 17:53:11tom Exp $")21306 +MODULE_ID("$Id: lib_newwin.c,v 1.60 2009/09/06 16:32:48 tom Exp $") 20504 21307 20505 21308 #define window_is(name) ((sp)->_##name == win) 20506 21309 20507 @@ -87,11 +88,11 @@ 21310 @@ -61,6 +62,17 @@ 21311 { 21312 SCREEN *sp; 21313 21314 +#ifdef USE_SP_WINDOWLIST 21315 + if ((sp = _nc_screen_of(win)) != 0) { 21316 + if (window_is(curscr)) { 21317 + remove_window(curscr); 21318 + } else if (window_is(stdscr)) { 21319 + remove_window(stdscr); 21320 + } else if (window_is(newscr)) { 21321 + remove_window(newscr); 21322 + } 21323 + } 21324 +#else 21325 for (each_screen(sp)) { 21326 if (window_is(curscr)) { 21327 remove_window(curscr); 21328 @@ -73,6 +85,7 @@ 21329 break; 21330 } 21331 } 21332 +#endif 21333 } 21334 21335 NCURSES_EXPORT(int) 21336 @@ -81,17 +94,20 @@ 21337 WINDOWLIST *p, *q; 21338 int i; 21339 int result = ERR; 21340 +#ifdef USE_SP_WINDOWLIST 21341 + SCREEN *sp = _nc_screen_of(win); /* pretend this is parameter */ 21342 +#endif 21343 21344 T((T_CALLED("_nc_freewin(%p)"), win)); 21345 20508 21346 if (win != 0) { 20509 if (_nc_try_global(curses) == 0) { 21347 - if (_nc_try_global(curses) == 0) { 21348 + if (_nc_nonsp_try_global(curses) == 0) { 20510 21349 q = 0; 20511 21350 - for (each_window(p)) { 20512 + for (each_window(SP , p)) {21351 + for (each_window(SP_PARM, p)) { 20513 21352 if (&(p->win) == win) { 20514 21353 remove_window_from_screen(win); 20515 21354 if (q == 0) 20516 21355 - _nc_windows = p->next; 20517 + WindowList(SP ) = p->next;21356 + WindowList(SP_PARM) = p->next; 20518 21357 else 20519 21358 q->next = p->next; 20520 21359 20521 @@ -115,7 +116,8 @@ 21360 @@ -108,30 +124,34 @@ 21361 } 21362 q = p; 21363 } 21364 - _nc_unlock_global(curses); 21365 + _nc_nonsp_unlock_global(curses); 21366 } 21367 } 21368 returnCode(result); 20522 21369 } 20523 21370 … … 20529 21376 WINDOW *win; 20530 21377 NCURSES_CH_T *ptr; 20531 @@ -127,11 +129,13 @@ 21378 int i; 21379 21380 - T((T_CALLED("newwin(%d,%d,%d,%d)"), num_lines, num_columns, begy, begx)); 21381 + T((T_CALLED("newwin(%p, %d,%d,%d,%d)"), SP_PARM, num_lines, num_columns, 21382 + begy, begx)); 21383 21384 if (begy < 0 || begx < 0 || num_lines < 0 || num_columns < 0) 20532 21385 returnWin(0); 20533 21386 … … 20546 21399 20547 21400 for (i = 0; i < num_lines; i++) { 20548 @@ -149, 9 +153,22@@21401 @@ -149,12 +169,28 @@ 20549 21402 returnWin(win); 20550 21403 } … … 20554 21407 +newwin(int num_lines, int num_columns, int begy, int begx) 20555 21408 +{ 20556 + return NCURSES_SP_NAME(newwin) (CURRENT_SCREEN, 20557 + num_lines, num_columns, 20558 + begy, begx); 21409 + WINDOW *win; 21410 + _nc_sp_lock_global(curses); 21411 + win = NCURSES_SP_NAME(newwin) (CURRENT_SCREEN, 21412 + num_lines, num_columns, begy, begx); 21413 + _nc_sp_unlock_global(curses); 21414 + return (win); 20559 21415 +} 20560 21416 +#endif … … 20563 21419 derwin(WINDOW *orig, int num_lines, int num_columns, int begy, int begx) 20564 21420 { 20565 +#if NCURSES_SP_FUNCS20566 + SCREEN *sp = CURRENT_SCREEN;20567 +#endif20568 21421 WINDOW *win; 20569 21422 int i; 20570 21423 int flags = _SUBWIN; 20571 @@ -177,8 +194,10 @@ 21424 +#if NCURSES_SP_FUNCS 21425 + SCREEN *sp = _nc_screen_of(orig); 21426 +#endif 21427 21428 T((T_CALLED("derwin(%p,%d,%d,%d,%d)"), orig, num_lines, num_columns, 21429 begy, begx)); 21430 @@ -177,8 +213,10 @@ 20572 21431 if (orig->_flags & _ISPAD) 20573 21432 flags |= _ISPAD; … … 20582 21441 20583 21442 win->_pary = begy; 20584 @@ -211,16 +2 30,22 @@21443 @@ -211,16 +249,22 @@ 20585 21444 } 20586 21445 … … 20597 21456 WINDOWLIST *wp; 20598 21457 WINDOW *win; 20599 bool is_pad = (flags & _ISPAD); 21458 - bool is_pad = (flags & _ISPAD); 21459 + bool is_padwin = (flags & _ISPAD); 20600 21460 20601 21461 - T((T_CALLED("_nc_makenew(%d,%d,%d,%d)"), num_lines, num_columns, begy, begx)); … … 20608 21468 20609 21469 if (!dimension_limit(num_lines) || !dimension_limit(num_columns)) 20610 @@ -244,14 +269,16 @@ 21470 @@ -236,7 +280,7 @@ 21471 returnWin(0); 21472 } 21473 21474 - _nc_lock_global(curses); 21475 + _nc_nonsp_lock_global(curses); 21476 21477 win->_curx = 0; 21478 win->_cury = 0; 21479 @@ -244,14 +288,16 @@ 20611 21480 win->_maxx = num_columns - 1; 20612 21481 win->_begy = begy; … … 20621 21490 - win->_clear = is_pad ? FALSE : (num_lines == screen_lines 20622 21491 - && num_columns == screen_columns); 20623 + win->_clear = (is_pad 21492 + win->_clear = (is_padwin 20624 21493 + ? FALSE 20625 21494 + : (num_lines == screen_lines(SP_PARM) … … 20628 21497 win->_idcok = TRUE; 20629 21498 win->_scroll = FALSE; 20630 @@ -300, 19 +327,19@@21499 @@ -300,23 +346,23 @@ 20631 21500 if_USE_SCROLL_HINTS(win->_line[i].oldindex = i); 20632 21501 } 20633 21502 20634 21503 - if (!is_pad && (begx + num_columns == screen_columns)) { 20635 + if (!is_pad && (begx + num_columns == screen_columns(SP_PARM))) {21504 + if (!is_padwin && (begx + num_columns == screen_columns(SP_PARM))) { 20636 21505 win->_flags |= _ENDLINE; 20637 21506 … … 20654 21523 T((T_CREATE("window %p"), win)); 20655 21524 20656 @@ -320,19 +347,37 @@ 21525 - _nc_unlock_global(curses); 21526 + _nc_nonsp_unlock_global(curses); 20657 21527 returnWin(win); 20658 21528 } 20659 21529 20660 +#if NCURSES_SP_FUNCS 20661 +NCURSES_EXPORT(WINDOW *) 20662 +_nc_makenew(int num_lines, int num_columns, int begy, int begx, int flags) 20663 +{ 20664 + return NCURSES_SP_NAME(_nc_makenew) (CURRENT_SCREEN, 20665 + num_lines, num_columns, 20666 + begy, begx, flags); 20667 +} 20668 +#endif 20669 + 20670 /* 20671 * wgetch() and other functions with a WINDOW* parameter may use a SCREEN* 21530 @@ -325,14 +371,22 @@ 20672 21531 * internally, and it is useful to allow those to be invoked without switching 20673 21532 * SCREEN's, e.g., for multi-threaded applications. … … 20702 21561 diff -Naur ncurses-5.7.orig/ncurses/base/lib_nl.c ncurses-5.7/ncurses/base/lib_nl.c 20703 21562 --- ncurses-5.7.orig/ncurses/base/lib_nl.c 2000-12-09 18:43:27.000000000 -0800 20704 +++ ncurses-5.7/ncurses/base/lib_nl.c 2009-0 7-19 15:04:13.000000000 -070021563 +++ ncurses-5.7/ncurses/base/lib_nl.c 2009-09-12 08:51:50.000000000 -0700 20705 21564 @@ -1,5 +1,5 @@ 20706 21565 /**************************************************************************** … … 20788 21647 diff -Naur ncurses-5.7.orig/ncurses/base/lib_pad.c ncurses-5.7/ncurses/base/lib_pad.c 20789 21648 --- ncurses-5.7.orig/ncurses/base/lib_pad.c 2006-10-14 13:47:13.000000000 -0700 20790 +++ ncurses-5.7/ncurses/base/lib_pad.c 2009-0 7-19 15:04:13.000000000 -070021649 +++ ncurses-5.7/ncurses/base/lib_pad.c 2009-09-12 08:51:50.000000000 -0700 20791 21650 @@ -1,5 +1,5 @@ 20792 21651 /**************************************************************************** … … 20945 21804 diff -Naur ncurses-5.7.orig/ncurses/base/lib_printw.c ncurses-5.7/ncurses/base/lib_printw.c 20946 21805 --- ncurses-5.7.orig/ncurses/base/lib_printw.c 2006-12-17 11:21:39.000000000 -0800 20947 +++ ncurses-5.7/ncurses/base/lib_printw.c 2009-0 7-19 15:03:53.000000000 -070021806 +++ ncurses-5.7/ncurses/base/lib_printw.c 2009-09-12 08:51:30.000000000 -0700 20948 21807 @@ -1,5 +1,5 @@ 20949 21808 /**************************************************************************** … … 20980 21839 diff -Naur ncurses-5.7.orig/ncurses/base/lib_redrawln.c ncurses-5.7/ncurses/base/lib_redrawln.c 20981 21840 --- ncurses-5.7.orig/ncurses/base/lib_redrawln.c 2007-10-13 13:08:56.000000000 -0700 20982 +++ ncurses-5.7/ncurses/base/lib_redrawln.c 2009-0 7-19 15:03:53.000000000 -070021841 +++ ncurses-5.7/ncurses/base/lib_redrawln.c 2009-09-12 08:51:30.000000000 -0700 20983 21842 @@ -1,5 +1,5 @@ 20984 21843 /**************************************************************************** … … 21048 21907 diff -Naur ncurses-5.7.orig/ncurses/base/lib_refresh.c ncurses-5.7/ncurses/base/lib_refresh.c 21049 21908 --- ncurses-5.7.orig/ncurses/base/lib_refresh.c 2007-09-29 13:39:34.000000000 -0700 21050 +++ ncurses-5.7/ncurses/base/lib_refresh.c 2009-0 7-19 15:04:06.000000000 -070021909 +++ ncurses-5.7/ncurses/base/lib_refresh.c 2009-09-12 08:51:43.000000000 -0700 21051 21910 @@ -1,5 +1,5 @@ 21052 21911 /**************************************************************************** … … 21182 22041 diff -Naur ncurses-5.7.orig/ncurses/base/lib_restart.c ncurses-5.7/ncurses/base/lib_restart.c 21183 22042 --- ncurses-5.7.orig/ncurses/base/lib_restart.c 2008-06-21 10:31:22.000000000 -0700 21184 +++ ncurses-5.7/ncurses/base/lib_restart.c 2009-0 7-19 15:03:58.000000000 -070022043 +++ ncurses-5.7/ncurses/base/lib_restart.c 2009-09-12 08:52:09.000000000 -0700 21185 22044 @@ -1,5 +1,5 @@ 21186 22045 /**************************************************************************** … … 21198 22057 21199 22058 /* 21200 @@ -44,49 +45,5 2@@22059 @@ -44,49 +45,58 @@ 21201 22060 #define _POSIX_SOURCE 21202 22061 #endif … … 21205 22064 - 21206 22065 -MODULE_ID("$Id: lib_restart.c,v 1.10 2008/06/21 17:31:22 tom Exp $") 21207 +MODULE_ID("$Id: lib_restart.c,v 1.1 1 2009/05/02 20:47:42tom Exp $")22066 +MODULE_ID("$Id: lib_restart.c,v 1.12 2009/08/30 17:59:13 tom Exp $") 21208 22067 21209 22068 NCURSES_EXPORT(int) … … 21215 22074 { 21216 22075 int result; 22076 +#ifdef USE_TERM_DRIVER 22077 + TERMINAL *new_term; 22078 +#endif 21217 22079 21218 22080 - T((T_CALLED("restartterm(%s,%d,%p)"), termp, filenum, errret)); 21219 22081 + T((T_CALLED("restartterm(%p,%s,%d,%p)"), SP_PARM, termp, filenum, errret)); 21220 22082 21221 if (setupterm(termp, filenum, errret) != OK) { 22083 - if (setupterm(termp, filenum, errret) != OK) { 22084 + if (TINFO_SETUP_TERM(&new_term, termp, filenum, errret, FALSE) != OK) { 21222 22085 result = ERR; 21223 22086 - } else if (SP != 0) { … … 21237 22100 + int savenl = SP_PARM->_nl; 21238 22101 + 22102 +#ifdef USE_TERM_DRIVER 22103 + SP_PARM->_term = new_term; 22104 +#endif 21239 22105 + if (saveecho) { 21240 22106 + NCURSES_SP_NAME(echo) (NCURSES_SP_ARG); … … 21253 22119 + NCURSES_SP_NAME(nocbreak) (NCURSES_SP_ARG); 21254 22120 + NCURSES_SP_NAME(raw) (NCURSES_SP_ARG); 21255 + } else { 22121 } else { 22122 - nocbreak(); 22123 - noraw(); 21256 22124 + NCURSES_SP_NAME(nocbreak) (NCURSES_SP_ARG); 21257 22125 + NCURSES_SP_NAME(noraw) (NCURSES_SP_ARG); … … 21259 22127 + if (savenl) { 21260 22128 + NCURSES_SP_NAME(nl) (NCURSES_SP_ARG); 21261 } else { 21262 - nocbreak(); 21263 - noraw(); 22129 + } else { 21264 22130 + NCURSES_SP_NAME(nonl) (NCURSES_SP_ARG); 21265 22131 } … … 21278 22144 21279 22145 result = OK; 21280 @@ -95,3 + 99,11 @@22146 @@ -95,3 +105,11 @@ 21281 22147 } 21282 22148 returnCode(result); … … 21292 22158 diff -Naur ncurses-5.7.orig/ncurses/base/lib_screen.c ncurses-5.7/ncurses/base/lib_screen.c 21293 22159 --- ncurses-5.7.orig/ncurses/base/lib_screen.c 2008-08-16 12:05:37.000000000 -0700 21294 +++ ncurses-5.7/ncurses/base/lib_screen.c 2009-0 7-19 15:04:06.000000000 -070022160 +++ ncurses-5.7/ncurses/base/lib_screen.c 2009-09-12 08:51:43.000000000 -0700 21295 22161 @@ -1,5 +1,5 @@ 21296 22162 /**************************************************************************** … … 21480 22346 diff -Naur ncurses-5.7.orig/ncurses/base/lib_set_term.c ncurses-5.7/ncurses/base/lib_set_term.c 21481 22347 --- ncurses-5.7.orig/ncurses/base/lib_set_term.c 2008-08-04 11:11:12.000000000 -0700 21482 +++ ncurses-5.7/ncurses/base/lib_set_term.c 2009-0 7-19 15:04:11.000000000 -070022348 +++ ncurses-5.7/ncurses/base/lib_set_term.c 2009-09-12 08:52:09.000000000 -0700 21483 22349 @@ -1,5 +1,5 @@ 21484 22350 /**************************************************************************** … … 21496 22362 21497 22363 /* 21498 @@ -44,7 +45,11 @@ 21499 #include <term.h> /* cur_term */ 22364 @@ -41,10 +42,21 @@ 22365 22366 #include <curses.priv.h> 22367 22368 -#include <term.h> /* cur_term */ 21500 22369 #include <tic.h> 21501 22370 … … 21505 22374 +#endif 21506 22375 + 21507 +MODULE_ID("$Id: lib_set_term.c,v 1.124 2009/06/27 21:36:14 tom Exp $") 22376 +MODULE_ID("$Id: lib_set_term.c,v 1.126 2009/09/05 18:18:10 tom Exp $") 22377 + 22378 +#ifdef USE_TERM_DRIVER 22379 +#define MaxColors InfoOf(sp).maxcolors 22380 +#define NumLabels InfoOf(sp).numlabels 22381 +#else 22382 +#define MaxColors max_colors 22383 +#define NumLabels num_labels 22384 +#endif 21508 22385 21509 22386 NCURSES_EXPORT(SCREEN *) 21510 22387 set_term(SCREEN *screenp) 21511 @@ -256,6 +261,9 @@ 22388 @@ -61,7 +73,7 @@ 22389 newSP = SP; 22390 22391 if (newSP != 0) { 22392 - set_curterm(newSP->_term); 22393 + TINFO_SET_CURTERM(newSP, newSP->_term); 22394 #if !USE_REENTRANT 22395 curscr = newSP->_curscr; 22396 newscr = newSP->_newscr; 22397 @@ -70,7 +82,7 @@ 22398 COLOR_PAIRS = newSP->_pair_count; 22399 #endif 22400 } else { 22401 - set_curterm(0); 22402 + TINFO_SET_CURTERM(oldSP, 0); 22403 #if !USE_REENTRANT 22404 curscr = 0; 22405 newscr = 0; 22406 @@ -129,6 +141,19 @@ 22407 22408 _nc_lock_global(curses); 22409 if (delink_screen(sp)) { 22410 +#ifdef USE_SP_RIPOFF 22411 + ripoff_t *rop; 22412 + if (safe_ripoff_sp && safe_ripoff_sp != safe_ripoff_stack) { 22413 + for (rop = safe_ripoff_stack; 22414 + rop != safe_ripoff_sp && (rop - safe_ripoff_stack) < N_RIPS; 22415 + rop++) { 22416 + if (rop->win) { 22417 + (void) delwin(rop->win); 22418 + rop->win = 0; 22419 + } 22420 + } 22421 + } 22422 +#endif 22423 22424 (void) _nc_freewin(sp->_curscr); 22425 (void) _nc_freewin(sp->_newscr); 22426 @@ -176,7 +201,7 @@ 22427 free(sp->_setbuf); 22428 } 22429 22430 - del_curterm(sp->_term); 22431 + NCURSES_SP_NAME(del_curterm) (NCURSES_SP_ARGx sp->_term); 22432 free(sp); 22433 22434 /* 22435 @@ -248,6 +273,41 @@ 22436 } 22437 #endif 22438 22439 +#if NCURSES_SP_FUNCS 22440 +/* 22441 + * In case of handling multiple screens, we need to have a screen before 22442 + * initialization in setupscreen takes place. This is to extend the substitute 22443 + * for some of the stuff in _nc_prescreen, especially for slk and ripoff 22444 + * handling which should be done per screen. 22445 + */ 22446 +NCURSES_EXPORT(SCREEN *) 22447 +new_prescr(void) 22448 +{ 22449 + SCREEN *sp = _nc_alloc_screen_sp(); 22450 + if (sp) { 22451 + sp->rsp = sp->rippedoff; 22452 + sp->_filtered = _nc_prescreen.filter_mode; 22453 + sp->_use_env = _nc_prescreen.use_env; 22454 +#if NCURSES_NO_PADDING 22455 + sp->_no_padding = _nc_prescreen._no_padding; 22456 +#endif 22457 + sp->slk_format = 0; 22458 + sp->_slk = 0; 22459 + sp->_prescreen = TRUE; 22460 + SP_PRE_INIT(sp); 22461 +#if USE_REENTRANT 22462 + sp->_TABSIZE = _nc_prescreen._TABSIZE; 22463 + sp->_ESCDELAY = _nc_prescreen._ESCDELAY; 22464 +#endif 22465 + _nc_set_screen(sp); 22466 + } 22467 + return sp; 22468 +} 22469 +#endif 22470 + 22471 +#define ReturnScreenError() _nc_set_screen(0); \ 22472 + returnCode(ERR) 22473 + 22474 /* OS-independent screen initializations */ 22475 NCURSES_EXPORT(int) 22476 _nc_setupscreen(int slines GCC_UNUSED, 22477 @@ -256,6 +316,9 @@ 21512 22478 bool filtered, 21513 22479 int slk_format) … … 21519 22485 int bottom_stolen = 0; 21520 22486 bool support_cookies = USE_XMC_SUPPORT; 21521 @@ -272,6 + 280,9 @@22487 @@ -272,6 +335,9 @@ 21522 22488 } 21523 22489 … … 21529 22495 _nc_screen_chain = SP; 21530 22496 21531 @@ -546,7 +557,7 @@ 22497 @@ -292,6 +358,9 @@ 22498 if (filtered) { 22499 slines = 1; 22500 SET_LINES(slines); 22501 +#ifdef USE_TERM_DRIVER 22502 + CallDriver(sp, setfilter); 22503 +#else 22504 clear_screen = 0; 22505 cursor_down = parm_down_cursor = 0; 22506 cursor_address = 0; 22507 @@ -299,6 +368,7 @@ 22508 row_address = 0; 22509 22510 cursor_home = carriage_return; 22511 +#endif 22512 T(("filter screensize %dx%d", LINES, COLS)); 22513 } 22514 #ifdef __DJGPP__ 22515 @@ -364,9 +434,9 @@ 22516 char sep1, sep2; 22517 int count = sscanf(env, "%d%c%d%c", &fg, &sep1, &bg, &sep2); 22518 if (count >= 1) { 22519 - SP->_default_fg = (fg >= 0 && fg < max_colors) ? fg : C_MASK; 22520 + SP->_default_fg = (fg >= 0 && fg < MaxColors) ? fg : C_MASK; 22521 if (count >= 3) { 22522 - SP->_default_bg = (bg >= 0 && bg < max_colors) ? bg : C_MASK; 22523 + SP->_default_bg = (bg >= 0 && bg < MaxColors) ? bg : C_MASK; 22524 } 22525 TR(TRACE_CHARPUT | TRACE_MOVE, 22526 ("from environment assumed fg=%d, bg=%d", 22527 @@ -390,20 +460,20 @@ 22528 p = extract_fgbg(p, &(SP->_default_bg)); 22529 TR(TRACE_CHARPUT | TRACE_MOVE, ("decoded fg=%d, bg=%d", 22530 SP->_default_fg, SP->_default_bg)); 22531 - if (SP->_default_fg >= max_colors) { 22532 + if (SP->_default_fg >= MaxColors) { 22533 if (set_a_foreground != ABSENT_STRING 22534 && !strcmp(set_a_foreground, "\033[3%p1%dm")) { 22535 set_a_foreground = "\033[3%?%p1%{8}%>%t9%e%p1%d%;m"; 22536 } else { 22537 - SP->_default_fg %= max_colors; 22538 + SP->_default_fg %= MaxColors; 22539 } 22540 } 22541 - if (SP->_default_bg >= max_colors) { 22542 + if (SP->_default_bg >= MaxColors) { 22543 if (set_a_background != ABSENT_STRING 22544 && !strcmp(set_a_background, "\033[4%p1%dm")) { 22545 set_a_background = "\033[4%?%p1%{8}%>%t9%e%p1%d%;m"; 22546 } else { 22547 - SP->_default_bg %= max_colors; 22548 + SP->_default_bg %= MaxColors; 22549 } 22550 } 22551 } 22552 @@ -546,7 +616,7 @@ 21532 22553 curscr = SP->_curscr; 21533 22554 #endif … … 21538 22559 21539 22560 newscr->_clear = TRUE; 21540 @@ -555,8 + 566,8 @@22561 @@ -555,8 +625,8 @@ 21541 22562 def_shell_mode(); 21542 22563 def_prog_mode(); … … 21549 22570 21550 22571 /* If we must simulate soft labels, grab off the line to be used. 21551 @@ -595,7 +606,7 @@ 22572 @@ -564,7 +634,7 @@ 22573 formats (4-4 or 3-2-3) for which there may be some hardware 22574 support. */ 22575 if (rop->hook == _nc_slk_initialize) 22576 - if (!(num_labels <= 0 || !SLK_STDFMT(slk_format))) 22577 + if (!(NumLabels <= 0 || !SLK_STDFMT(slk_format))) 22578 continue; 22579 if (rop->hook) { 22580 int count; 22581 @@ -595,7 +665,7 @@ 21552 22582 } 21553 22583 } … … 21558 22588 T(("creating stdscr")); 21559 22589 assert((SP->_lines_avail + SP->_topstolen + bottom_stolen) == slines); 21560 @@ -615,27 +6 26,39 @@22590 @@ -615,27 +685,39 @@ 21561 22591 * off from the top or bottom. 21562 22592 */ … … 21606 22636 START_TRACE(); 21607 22637 T((T_CALLED("ripoffline(%d,%p)"), line, init)); 21608 @@ -643,5 + 666,15 @@22638 @@ -643,5 +725,15 @@ 21609 22639 if (line == 0) 21610 22640 returnCode(OK); … … 21625 22655 diff -Naur ncurses-5.7.orig/ncurses/base/lib_slkatrof.c ncurses-5.7/ncurses/base/lib_slkatrof.c 21626 22656 --- ncurses-5.7.orig/ncurses/base/lib_slkatrof.c 2005-01-08 15:01:32.000000000 -0800 21627 +++ ncurses-5.7/ncurses/base/lib_slkatrof.c 2009-0 7-19 15:02:22.000000000 -070022657 +++ ncurses-5.7/ncurses/base/lib_slkatrof.c 2009-09-12 08:51:17.000000000 -0700 21628 22658 @@ -1,5 +1,5 @@ 21629 22659 /**************************************************************************** … … 21673 22703 diff -Naur ncurses-5.7.orig/ncurses/base/lib_slkatron.c ncurses-5.7/ncurses/base/lib_slkatron.c 21674 22704 --- ncurses-5.7.orig/ncurses/base/lib_slkatron.c 2005-01-08 15:02:01.000000000 -0800 21675 +++ ncurses-5.7/ncurses/base/lib_slkatron.c 2009-0 7-19 15:02:22.000000000 -070022705 +++ ncurses-5.7/ncurses/base/lib_slkatron.c 2009-09-12 08:51:17.000000000 -0700 21676 22706 @@ -1,5 +1,5 @@ 21677 22707 /**************************************************************************** … … 21721 22751 diff -Naur ncurses-5.7.orig/ncurses/base/lib_slkatr_set.c ncurses-5.7/ncurses/base/lib_slkatr_set.c 21722 22752 --- ncurses-5.7.orig/ncurses/base/lib_slkatr_set.c 2005-01-28 13:11:53.000000000 -0800 21723 +++ ncurses-5.7/ncurses/base/lib_slkatr_set.c 2009-0 7-19 15:02:22.000000000 -070022753 +++ ncurses-5.7/ncurses/base/lib_slkatr_set.c 2009-09-12 08:51:17.000000000 -0700 21724 22754 @@ -1,5 +1,5 @@ 21725 22755 /**************************************************************************** … … 21792 22822 diff -Naur ncurses-5.7.orig/ncurses/base/lib_slkatrset.c ncurses-5.7/ncurses/base/lib_slkatrset.c 21793 22823 --- ncurses-5.7.orig/ncurses/base/lib_slkatrset.c 2005-01-08 13:46:47.000000000 -0800 21794 +++ ncurses-5.7/ncurses/base/lib_slkatrset.c 2009-0 7-19 15:02:22.000000000 -070022824 +++ ncurses-5.7/ncurses/base/lib_slkatrset.c 2009-09-12 08:51:17.000000000 -0700 21795 22825 @@ -1,5 +1,5 @@ 21796 22826 /**************************************************************************** … … 21832 22862 diff -Naur ncurses-5.7.orig/ncurses/base/lib_slkattr.c ncurses-5.7/ncurses/base/lib_slkattr.c 21833 22863 --- ncurses-5.7.orig/ncurses/base/lib_slkattr.c 2005-01-08 13:44:28.000000000 -0800 21834 +++ ncurses-5.7/ncurses/base/lib_slkattr.c 2009-0 7-19 15:02:22.000000000 -070022864 +++ ncurses-5.7/ncurses/base/lib_slkattr.c 2009-09-12 08:51:17.000000000 -0700 21835 22865 @@ -1,5 +1,5 @@ 21836 22866 /**************************************************************************** … … 21876 22906 diff -Naur ncurses-5.7.orig/ncurses/base/lib_slk.c ncurses-5.7/ncurses/base/lib_slk.c 21877 22907 --- ncurses-5.7.orig/ncurses/base/lib_slk.c 2008-09-27 07:07:33.000000000 -0700 21878 +++ ncurses-5.7/ncurses/base/lib_slk.c 2009-0 7-19 15:04:17.000000000 -070022908 +++ ncurses-5.7/ncurses/base/lib_slk.c 2009-09-12 08:52:04.000000000 -0700 21879 22909 @@ -1,5 +1,5 @@ 21880 22910 /**************************************************************************** … … 21884 22914 * Permission is hereby granted, free of charge, to any person obtaining a * 21885 22915 * copy of this software and associated documentation files (the * 21886 @@ -41,26 +41, 81@@22916 @@ -41,26 +41,94 @@ 21887 22917 */ 21888 22918 … … 21897 22927 +#endif 21898 22928 + 21899 +MODULE_ID("$Id: lib_slk.c,v 1.40 2009/07/19 00:34:07 tom Exp $") 22929 +MODULE_ID("$Id: lib_slk.c,v 1.42 2009/08/15 23:05:02 tom Exp $") 22930 + 22931 +#ifdef USE_TERM_DRIVER 22932 +#define NumLabels InfoOf(SP_PARM).numlabels 22933 +#define NoColorVideo InfoOf(SP_PARM).nocolorvideo 22934 +#define LabelWidth InfoOf(SP_PARM).labelwidth 22935 +#define LabelHeight InfoOf(SP_PARM).labelheight 22936 +#else 22937 +#define NumLabels num_labels 22938 +#define NoColorVideo no_color_video 22939 +#define LabelWidth label_width 22940 +#define LabelHeight label_height 22941 +#endif 21900 22942 21901 22943 /* … … 21962 23004 + x += (i == 2 || i == 4) ? gap : 1; 21963 23005 + } 21964 + } else 21965 + returnCode(slk_failed(NCURSES_SP_ARG)); 23006 + } else { 23007 + return slk_failed(NCURSES_SP_ARG); 23008 + } 21966 23009 + } 21967 23010 + } … … 21974 23017 * Initialize soft labels. 21975 23018 * Called from newterm() 21976 @@ -68,108 +1 23,91 @@23019 @@ -68,108 +136,91 @@ 21977 23020 NCURSES_EXPORT(int) 21978 23021 _nc_slk_initialize(WINDOW *stwin, int cols) … … 21998 23041 + assert(term); 21999 23042 + 22000 + numlab = InfoOf(SP_PARM).numlabels;23043 + numlab = NumLabels; 22001 23044 + 22002 23045 + if (SP_PARM->_slk) { /* we did this already, so simply return */ … … 22019 23062 - if ((no_color_video & 1) == 0) 22020 23063 - SetAttr(SP->_slk->attr, A_STANDOUT); 22021 + if (( InfoOf(SP_PARM).nocolorvideo & 1) == 0)23064 + if ((NoColorVideo & 1) == 0) 22022 23065 + SetAttr(SP_PARM->_slk->attr, A_STANDOUT); 22023 23066 else … … 22044 23087 + : MAX_SKEY(SP_PARM->slk_format)); 22045 23088 + SP_PARM->_slk->maxlen = ((numlab > 0) 22046 + ? InfoOf(SP_PARM).labelwidth * InfoOf(SP_PARM).labelheight23089 + ? LabelWidth * LabelHeight 22047 23090 + : MAX_SKEY_LEN(SP_PARM->slk_format)); 22048 23091 + SP_PARM->_slk->labcnt = ((SP_PARM->_slk->maxlab < MAX_SKEY(SP_PARM->slk_format)) … … 22090 23133 - if (gap < 1) 22091 23134 - gap = 1; 22092 - 23135 + res = _nc_format_slks(NCURSES_SP_ARGx cols); 23136 22093 23137 - for (i = x = 0; i < SP->_slk->maxlab; i++) { 22094 23138 - SP->_slk->ent[i].ent_x = x; … … 22111 23155 - int gap = (cols - (SP->_slk->maxlab * max_length) - 5) 22112 23156 - / 2; 22113 + res = _nc_format_slks(NCURSES_SP_ARGx cols); 22114 23157 - 22115 23158 - if (gap < 1) 22116 23159 - gap = 1; … … 22139 23182 returnCode(res); 22140 23183 } 22141 @@ -178,14 +2 16,24 @@23184 @@ -178,14 +229,24 @@ 22142 23185 * Restore the soft labels on the screen. 22143 23186 */ … … 22173 23216 diff -Naur ncurses-5.7.orig/ncurses/base/lib_slkclear.c ncurses-5.7/ncurses/base/lib_slkclear.c 22174 23217 --- ncurses-5.7.orig/ncurses/base/lib_slkclear.c 2007-12-29 09:51:47.000000000 -0800 22175 +++ ncurses-5.7/ncurses/base/lib_slkclear.c 2009-0 7-19 15:02:22.000000000 -070023218 +++ ncurses-5.7/ncurses/base/lib_slkclear.c 2009-09-12 08:51:17.000000000 -0700 22176 23219 @@ -1,5 +1,5 @@ 22177 23220 /**************************************************************************** … … 22229 23272 diff -Naur ncurses-5.7.orig/ncurses/base/lib_slkcolor.c ncurses-5.7/ncurses/base/lib_slkcolor.c 22230 23273 --- ncurses-5.7.orig/ncurses/base/lib_slkcolor.c 2005-01-28 13:11:53.000000000 -0800 22231 +++ ncurses-5.7/ncurses/base/lib_slkcolor.c 2009-0 7-19 15:02:22.000000000 -070023274 +++ ncurses-5.7/ncurses/base/lib_slkcolor.c 2009-09-12 08:51:17.000000000 -0700 22232 23275 @@ -1,5 +1,5 @@ 22233 23276 /**************************************************************************** … … 22293 23336 diff -Naur ncurses-5.7.orig/ncurses/base/lib_slkinit.c ncurses-5.7/ncurses/base/lib_slkinit.c 22294 23337 --- ncurses-5.7.orig/ncurses/base/lib_slkinit.c 2008-01-12 12:23:39.000000000 -0800 22295 +++ ncurses-5.7/ncurses/base/lib_slkinit.c 2009-0 7-19 15:04:03.000000000 -070023338 +++ ncurses-5.7/ncurses/base/lib_slkinit.c 2009-09-12 08:51:40.000000000 -0700 22296 23339 @@ -1,5 +1,5 @@ 22297 23340 /**************************************************************************** … … 22358 23401 diff -Naur ncurses-5.7.orig/ncurses/base/lib_slklab.c ncurses-5.7/ncurses/base/lib_slklab.c 22359 23402 --- ncurses-5.7.orig/ncurses/base/lib_slklab.c 2003-03-29 14:53:48.000000000 -0800 22360 +++ ncurses-5.7/ncurses/base/lib_slklab.c 2009-0 7-19 15:02:22.000000000 -070023403 +++ ncurses-5.7/ncurses/base/lib_slklab.c 2009-09-12 08:51:17.000000000 -0700 22361 23404 @@ -1,5 +1,5 @@ 22362 23405 /**************************************************************************** … … 22405 23448 diff -Naur ncurses-5.7.orig/ncurses/base/lib_slkrefr.c ncurses-5.7/ncurses/base/lib_slkrefr.c 22406 23449 --- ncurses-5.7.orig/ncurses/base/lib_slkrefr.c 2008-09-27 07:07:53.000000000 -0700 22407 +++ ncurses-5.7/ncurses/base/lib_slkrefr.c 2009-0 7-19 15:04:06.000000000 -070023450 +++ ncurses-5.7/ncurses/base/lib_slkrefr.c 2009-09-12 08:52:07.000000000 -0700 22408 23451 @@ -1,5 +1,5 @@ 22409 23452 /**************************************************************************** … … 22413 23456 * Permission is hereby granted, free of charge, to any person obtaining a * 22414 23457 * copy of this software and associated documentation files (the * 22415 @@ -38,9 +38,1 2@@23458 @@ -38,9 +38,18 @@ 22416 23459 * Write SLK window to the (virtual) screen. 22417 23460 */ … … 22424 23467 +#endif 22425 23468 + 22426 +MODULE_ID("$Id: lib_slkrefr.c,v 1.21 2009/06/06 20:26:17 tom Exp $") 23469 +MODULE_ID("$Id: lib_slkrefr.c,v 1.24 2009/08/29 18:43:13 tom Exp $") 23470 + 23471 +#ifdef USE_TERM_DRIVER 23472 +#define NumLabels InfoOf(SP_PARM).numlabels 23473 +#else 23474 +#define NumLabels num_labels 23475 +#endif 22427 23476 22428 23477 /* 22429 23478 * Paint the info line for the PC style SLK emulation. 22430 @@ -66,31 + 69,47 @@23479 @@ -66,31 +75,47 @@ 22431 23480 * Write the soft labels to the soft-key window. 22432 23481 */ … … 22446 23495 + slk = sp->_slk; 22447 23496 + fmt = sp->slk_format; 22448 + numlab = InfoOf(sp).numlabels;23497 + numlab = NumLabels; 22449 23498 + 22450 23499 + if (slk->hidden) … … 22471 23520 - wattrset(slk->win, AttrOf(SP->_slk->attr)); 22472 23521 + if (sp->_slk) { 22473 + wattrset(slk->win, AttrOf(sp->_slk->attr));23522 + (void) wattrset(slk->win, AttrOf(sp->_slk->attr)); 22474 23523 } 22475 23524 waddstr(slk->win, slk->ent[i].form_text); … … 22478 23527 for the label window */ 22479 23528 - wattrset(slk->win, WINDOW_ATTRS(stdscr)); 22480 + wattrset(slk->win, WINDOW_ATTRS(StdScreen(sp)));23529 + (void) wattrset(slk->win, WINDOW_ATTRS(StdScreen(sp))); 22481 23530 } 22482 23531 } 22483 23532 slk->ent[i].dirty = FALSE; 22484 @@ -98,7 +1 17,10 @@23533 @@ -98,7 +123,10 @@ 22485 23534 } 22486 23535 slk->dirty = FALSE; … … 22494 23543 TPUTS_TRACE("label_off"); 22495 23544 putp(label_off); 22496 @@ -106,6 +1 28,7 @@23545 @@ -106,6 +134,7 @@ 22497 23546 TPUTS_TRACE("label_on"); 22498 23547 putp(label_on); … … 22502 23551 } 22503 23552 22504 @@ -113,32 +1 36,48 @@23553 @@ -113,32 +142,48 @@ 22505 23554 * Refresh the soft labels. 22506 23555 */ … … 22520 23569 - slk_intern_refresh(SP->_slk); 22521 23570 + slk_intern_refresh(SP_PARM); 22522 22523 - returnCode(wnoutrefresh(SP->_slk->win)); 23571 + 22524 23572 + returnCode(wnoutrefresh(SP_PARM->_slk->win)); 22525 23573 +} 22526 + 23574 23575 - returnCode(wnoutrefresh(SP->_slk->win)); 22527 23576 +#if NCURSES_SP_FUNCS 22528 23577 +NCURSES_EXPORT(int) … … 22565 23614 diff -Naur ncurses-5.7.orig/ncurses/base/lib_slkset.c ncurses-5.7/ncurses/base/lib_slkset.c 22566 23615 --- ncurses-5.7.orig/ncurses/base/lib_slkset.c 2007-10-13 13:08:46.000000000 -0700 22567 +++ ncurses-5.7/ncurses/base/lib_slkset.c 2009-0 7-19 15:02:22.000000000 -070023616 +++ ncurses-5.7/ncurses/base/lib_slkset.c 2009-09-12 08:51:17.000000000 -0700 22568 23617 @@ -1,5 +1,5 @@ 22569 23618 /**************************************************************************** … … 22626 23675 diff -Naur ncurses-5.7.orig/ncurses/base/lib_slktouch.c ncurses-5.7/ncurses/base/lib_slktouch.c 22627 23676 --- ncurses-5.7.orig/ncurses/base/lib_slktouch.c 2000-12-09 18:43:27.000000000 -0800 22628 +++ ncurses-5.7/ncurses/base/lib_slktouch.c 2009-0 7-19 15:02:22.000000000 -070023677 +++ ncurses-5.7/ncurses/base/lib_slktouch.c 2009-09-12 08:51:17.000000000 -0700 22629 23678 @@ -1,5 +1,5 @@ 22630 23679 /**************************************************************************** … … 22677 23726 diff -Naur ncurses-5.7.orig/ncurses/base/lib_ungetch.c ncurses-5.7/ncurses/base/lib_ungetch.c 22678 23727 --- ncurses-5.7.orig/ncurses/base/lib_ungetch.c 2008-05-31 09:44:54.000000000 -0700 22679 +++ ncurses-5.7/ncurses/base/lib_ungetch.c 2009-0 7-19 15:03:53.000000000 -070023728 +++ ncurses-5.7/ncurses/base/lib_ungetch.c 2009-09-12 08:51:30.000000000 -0700 22680 23729 @@ -1,5 +1,5 @@ 22681 23730 /**************************************************************************** … … 22733 23782 diff -Naur ncurses-5.7.orig/ncurses/base/lib_winch.c ncurses-5.7/ncurses/base/lib_winch.c 22734 23783 --- ncurses-5.7.orig/ncurses/base/lib_winch.c 2001-06-02 16:42:08.000000000 -0700 22735 +++ ncurses-5.7/ncurses/base/lib_winch.c 2009-0 7-19 15:02:22.000000000 -070023784 +++ ncurses-5.7/ncurses/base/lib_winch.c 2009-09-12 08:51:17.000000000 -0700 22736 23785 @@ -39,16 +39,16 @@ 22737 23786 … … 22757 23806 diff -Naur ncurses-5.7.orig/ncurses/base/lib_window.c ncurses-5.7/ncurses/base/lib_window.c 22758 23807 --- ncurses-5.7.orig/ncurses/base/lib_window.c 2008-06-07 07:12:56.000000000 -0700 22759 +++ ncurses-5.7/ncurses/base/lib_window.c 2009-0 7-19 15:03:53.000000000 -070023808 +++ ncurses-5.7/ncurses/base/lib_window.c 2009-09-12 08:51:30.000000000 -0700 22760 23809 @@ -1,5 +1,5 @@ 22761 23810 /**************************************************************************** … … 22804 23853 diff -Naur ncurses-5.7.orig/ncurses/base/MKkeyname.awk ncurses-5.7/ncurses/base/MKkeyname.awk 22805 23854 --- ncurses-5.7.orig/ncurses/base/MKkeyname.awk 2008-07-12 11:40:00.000000000 -0700 22806 +++ ncurses-5.7/ncurses/base/MKkeyname.awk 2009-0 7-19 15:03:59.000000000 -070023855 +++ ncurses-5.7/ncurses/base/MKkeyname.awk 2009-09-12 08:51:37.000000000 -0700 22807 23856 @@ -1,6 +1,6 @@ 22808 23857 -# $Id: MKkeyname.awk,v 1.40 2008/07/12 18:40:00 tom Exp $ … … 22857 23906 diff -Naur ncurses-5.7.orig/ncurses/base/MKlib_gen.sh ncurses-5.7/ncurses/base/MKlib_gen.sh 22858 23907 --- ncurses-5.7.orig/ncurses/base/MKlib_gen.sh 2008-08-30 12:20:50.000000000 -0700 22859 +++ ncurses-5.7/ncurses/base/MKlib_gen.sh 2009-0 7-19 15:02:22.000000000 -070023908 +++ ncurses-5.7/ncurses/base/MKlib_gen.sh 2009-09-12 08:51:17.000000000 -0700 22860 23909 @@ -2,7 +2,7 @@ 22861 23910 # … … 22878 23927 diff -Naur ncurses-5.7.orig/ncurses/base/MKunctrl.awk ncurses-5.7/ncurses/base/MKunctrl.awk 22879 23928 --- ncurses-5.7.orig/ncurses/base/MKunctrl.awk 2008-10-04 14:40:24.000000000 -0700 22880 +++ ncurses-5.7/ncurses/base/MKunctrl.awk 2009-0 7-19 15:04:13.000000000 -070023929 +++ ncurses-5.7/ncurses/base/MKunctrl.awk 2009-09-12 08:51:50.000000000 -0700 22881 23930 @@ -1,6 +1,6 @@ 22882 23931 -# $Id: MKunctrl.awk,v 1.23 2008/10/04 21:40:24 tom Exp $ … … 22944 23993 diff -Naur ncurses-5.7.orig/ncurses/base/nc_panel.c ncurses-5.7/ncurses/base/nc_panel.c 22945 23994 --- ncurses-5.7.orig/ncurses/base/nc_panel.c 2000-12-09 18:43:28.000000000 -0800 22946 +++ ncurses-5.7/ncurses/base/nc_panel.c 2009-0 7-19 15:03:51.000000000 -070023995 +++ ncurses-5.7/ncurses/base/nc_panel.c 2009-09-12 08:51:28.000000000 -0700 22947 23996 @@ -1,5 +1,5 @@ 22948 23997 /**************************************************************************** … … 22979 24028 diff -Naur ncurses-5.7.orig/ncurses/base/resizeterm.c ncurses-5.7/ncurses/base/resizeterm.c 22980 24029 --- ncurses-5.7.orig/ncurses/base/resizeterm.c 2008-06-07 06:58:40.000000000 -0700 22981 +++ ncurses-5.7/ncurses/base/resizeterm.c 2009-0 7-19 15:04:13.000000000 -070024030 +++ ncurses-5.7/ncurses/base/resizeterm.c 2009-09-12 08:52:09.000000000 -0700 22982 24031 @@ -1,5 +1,5 @@ 22983 24032 /**************************************************************************** … … 23007 24056 23008 24057 -#define stolen_lines (screen_lines - SP->_lines_avail) 23009 +MODULE_ID("$Id: resizeterm.c,v 1.4 0 2009/07/04 18:38:49tom Exp $")24058 +MODULE_ID("$Id: resizeterm.c,v 1.41 2009/08/30 16:18:58 tom Exp $") 23010 24059 23011 24060 /* … … 23122 24171 + _nc_format_slks( 23123 24172 +#if NCURSES_SP_FUNCS 23124 + _nc_screen_of(win),24173 + _nc_screen_of(win), 23125 24174 +#endif 23126 + ToCols);24175 + ToCols); 23127 24176 } else if (win->_begy >= bottom) { 23128 24177 /* … … 23197 24246 } 23198 24247 23199 _nc_lock_global(curses); 24248 - _nc_lock_global(curses); 24249 + _nc_nonsp_lock_global(curses); 23200 24250 23201 24251 - was_stolen = (screen_lines - SP->_lines_avail); … … 23242 24292 + screen_lines(SP_PARM) = ToLines; 23243 24293 + screen_columns(SP_PARM) = ToCols; 23244 + 24294 24295 - SP->_lines_avail = lines - was_stolen; 23245 24296 +#ifdef USE_TERM_DRIVER 23246 24297 + CallDriver_2(SP_PARM, setsize, ToLines, ToCols); … … 23250 24301 +#endif 23251 24302 23252 - SP->_lines_avail = lines - was_stolen;23253 + SP_PARM->_lines_avail = ToLines - was_stolen;23254 23255 24303 - if (SP->oldhash) { 23256 24304 - FreeAndNull(SP->oldhash); 24305 + SP_PARM->_lines_avail = ToLines - was_stolen; 24306 + 23257 24307 + if (SP_PARM->oldhash) { 23258 24308 + FreeAndNull(SP_PARM->oldhash); … … 23265 24315 #ifdef TRACE 23266 24316 if (USE_TRACEF(TRACE_UPDATE)) { 23267 @@ -383,6 +423,18 @@ 24317 @@ -378,11 +418,23 @@ 24318 SET_LINES(ToLines - was_stolen); 24319 SET_COLS(ToCols); 24320 24321 - _nc_unlock_global(curses); 24322 + _nc_nonsp_unlock_global(curses); 24323 23268 24324 returnCode(result); 23269 24325 } … … 23274 24330 +{ 23275 24331 + int res = ERR; 23276 + _nc_ lock_global(curses);24332 + _nc_sp_lock_global(curses); 23277 24333 + res = NCURSES_SP_NAME(resize_term) (CURRENT_SCREEN, ToLines, ToCols); 23278 + _nc_ unlock_global(curses);24334 + _nc_sp_unlock_global(curses); 23279 24335 + return (res); 23280 24336 +} … … 23369 24425 diff -Naur ncurses-5.7.orig/ncurses/base/safe_sprintf.c ncurses-5.7/ncurses/base/safe_sprintf.c 23370 24426 --- ncurses-5.7.orig/ncurses/base/safe_sprintf.c 2007-04-21 15:28:06.000000000 -0700 23371 +++ ncurses-5.7/ncurses/base/safe_sprintf.c 2009-0 7-19 15:03:53.000000000 -070024427 +++ ncurses-5.7/ncurses/base/safe_sprintf.c 2009-09-12 08:51:30.000000000 -0700 23372 24428 @@ -1,5 +1,5 @@ 23373 24429 /**************************************************************************** … … 23437 24493 diff -Naur ncurses-5.7.orig/ncurses/base/tries.c ncurses-5.7/ncurses/base/tries.c 23438 24494 --- ncurses-5.7.orig/ncurses/base/tries.c 2008-08-16 12:22:55.000000000 -0700 23439 +++ ncurses-5.7/ncurses/base/tries.c 2009-0 7-19 15:02:22.000000000 -070024495 +++ ncurses-5.7/ncurses/base/tries.c 2009-09-12 08:51:17.000000000 -0700 23440 24496 @@ -39,7 +39,7 @@ 23441 24497 … … 23460 24516 diff -Naur ncurses-5.7.orig/ncurses/base/wresize.c ncurses-5.7/ncurses/base/wresize.c 23461 24517 --- ncurses-5.7.orig/ncurses/base/wresize.c 2008-06-07 06:59:01.000000000 -0700 23462 +++ ncurses-5.7/ncurses/base/wresize.c 2009-0 7-19 15:04:03.000000000 -070024518 +++ ncurses-5.7/ncurses/base/wresize.c 2009-09-12 08:51:40.000000000 -0700 23463 24519 @@ -1,5 +1,5 @@ 23464 24520 /**************************************************************************** … … 23501 24557 diff -Naur ncurses-5.7.orig/ncurses/curses.priv.h ncurses-5.7/ncurses/curses.priv.h 23502 24558 --- ncurses-5.7.orig/ncurses/curses.priv.h 2008-10-04 14:37:45.000000000 -0700 23503 +++ ncurses-5.7/ncurses/curses.priv.h 2009-0 7-19 15:04:13.000000000 -070024559 +++ ncurses-5.7/ncurses/curses.priv.h 2009-09-12 08:52:09.000000000 -0700 23504 24560 @@ -1,5 +1,5 @@ 23505 24561 /**************************************************************************** … … 23519 24575 /* 23520 24576 - * $Id: curses.priv.h,v 1.394 2008/10/04 21:37:45 tom Exp $ 23521 + * $Id: curses.priv.h,v 1.43 0 2009/07/04 20:40:42tom Exp $24577 + * $Id: curses.priv.h,v 1.436 2009/08/30 18:13:54 tom Exp $ 23522 24578 * 23523 24579 * curses.priv.h … … 23648 24704 #define GetNoPadding(sp) FALSE 23649 24705 #define SetNoPadding(sp) /*nothing*/ 23650 @@ -302,17 +375,34 @@ 24706 @@ -301,18 +374,37 @@ 24707 #define GET_SCREEN_PAIR(s) GetPair(SCREEN_ATTRS(s)) 23651 24708 #define SET_SCREEN_PAIR(s,p) SetPair(SCREEN_ATTRS(s), p) 23652 24709 24710 +#if USE_REENTRANT || NCURSES_SP_FUNCS 24711 +NCURSES_EXPORT(int *) _nc_ptr_Lines (SCREEN *); 24712 +NCURSES_EXPORT(int *) _nc_ptr_Cols (SCREEN *); 24713 +NCURSES_EXPORT(int *) _nc_ptr_Tabsize (SCREEN *); 24714 +NCURSES_EXPORT(int *) _nc_ptr_Escdelay (SCREEN *); 24715 +#endif 24716 + 23653 24717 #if USE_REENTRANT 23654 24718 -NCURSES_EXPORT(int *) _nc_ptr_Lines (void); … … 23664 24728 -#define SET_COLS(value) COLS = value 23665 24729 + 23666 +NCURSES_EXPORT(int *) _nc_ptr_Lines (SCREEN *);23667 +NCURSES_EXPORT(int *) _nc_ptr_Cols (SCREEN *);23668 +NCURSES_EXPORT(int *) _nc_ptr_Tabsize (SCREEN *);23669 +NCURSES_EXPORT(int *) _nc_ptr_Escdelay (SCREEN *);23670 +23671 24730 +#define ptrLines(sp) (sp ? &(sp->_LINES) : &(_nc_prescreen._LINES)) 23672 24731 +#define ptrCols(sp) (sp ? &(sp->_COLS) : &(_nc_prescreen._COLS)) … … 23694 24753 23695 24754 #define TR_MUTEX(data) _tracef("%s@%d: me:%08lX COUNT:%2u/%2d/%6d/%2d/%s%9u: " #data, \ 23696 @@ -404,6 +494,8 @@ 24755 @@ -389,6 +481,36 @@ 24756 24757 #endif /* USE_PTHREADS */ 24758 24759 +/* 24760 + * When using sp-funcs, locks are targeted to SCREEN-level granularity. 24761 + * So the locking is done in the non-sp-func (which calls the sp-func) rather 24762 + * than in the sp-func itself. 24763 + * 24764 + * Use the _nc_nonsp_XXX functions in the function using "NCURSES_SP_NAME()". 24765 + * Use the _nc_sp_XXX functions in the function using "#if NCURSES_SP_FUNCS". 24766 + */ 24767 +#if NCURSES_SP_FUNCS 24768 + 24769 +#define _nc_nonsp_lock_global(name) /* nothing */ 24770 +#define _nc_nonsp_try_global(name) 0 24771 +#define _nc_nonsp_unlock_global(name) /* nothing */ 24772 + 24773 +#define _nc_sp_lock_global(name) _nc_lock_global(name) 24774 +#define _nc_sp_try_global(name) _nc_try_global(name) 24775 +#define _nc_sp_unlock_global(name) _nc_unlock_global(name) 24776 + 24777 +#else 24778 + 24779 +#define _nc_nonsp_lock_global(name) _nc_lock_global(name) 24780 +#define _nc_nonsp_try_global(name) _nc_try_global(name) 24781 +#define _nc_nonsp_unlock_global(name) _nc_unlock_global(name) 24782 + 24783 +#define _nc_sp_lock_global(name) /* nothing */ 24784 +#define _nc_sp_try_global(name) 0 24785 +#define _nc_sp_unlock_global(name) /* nothing */ 24786 + 24787 +#endif 24788 + 24789 #if HAVE_GETTIMEOFDAY 24790 # define PRECISE_GETTIME 1 24791 # define TimeType struct timeval 24792 @@ -404,6 +526,8 @@ 23697 24793 #define C_SHIFT 9 /* we need more bits than there are colors */ 23698 24794 #define C_MASK ((1 << C_SHIFT) - 1) … … 23703 24799 23704 24800 #define COLOR_DEFAULT C_MASK 23705 @@ -464,13 +5 56,13 @@24801 @@ -464,13 +588,13 @@ 23706 24802 } slk_ent; 23707 24803 … … 23723 24819 } SLK; 23724 24820 23725 @@ -493,10 + 585,10 @@24821 @@ -493,10 +617,10 @@ 23726 24822 typedef int (*TYPE_Gpm_Close) (void); 23727 24823 typedef int (*TYPE_Gpm_GetEvent) (Gpm_Event *); … … 23738 24834 /* link statically to GPM */ 23739 24835 #define my_gpm_fd &gpm_fd 23740 @@ -609,8 +7 01,10 @@24836 @@ -609,8 +733,10 @@ 23741 24837 int tgetent_index; 23742 24838 long tgetent_sequence; … … 23750 24846 #if USE_HOME_TERMINFO 23751 24847 char *home_terminfo; 23752 @@ -644,7 +7 38,9 @@24848 @@ -644,7 +770,9 @@ 23753 24849 char traceatr_color_buf[2][80]; 23754 24850 int traceatr_color_sel; … … 23761 24857 23762 24858 #ifdef USE_PTHREADS 23763 @@ -669,8 +7 65,10 @@24859 @@ -669,8 +797,10 @@ 23764 24860 bool use_env; 23765 24861 bool filter_mode; … … 23772 24868 TTY *saved_tty; /* savetty/resetty information */ 23773 24869 #if NCURSES_NO_PADDING 23774 @@ -680,6 + 778,8 @@24870 @@ -680,6 +810,8 @@ 23775 24871 chtype *real_acs_map; 23776 24872 int _LINES; … … 23781 24877 #ifdef TRACE 23782 24878 long _outchars; 23783 @@ -688,8 + 788,16 @@24879 @@ -688,8 +820,16 @@ 23784 24880 #endif 23785 24881 } NCURSES_PRESCREEN; … … 23800 24896 extern NCURSES_EXPORT_VAR(NCURSES_PRESCREEN) _nc_prescreen; 23801 24897 23802 @@ -703,6 +8 11,8 @@24898 @@ -703,6 +843,8 @@ 23803 24899 char *_setbuf; /* buffered I/O for output */ 23804 24900 bool _filtered; /* filter() was called */ … … 23809 24905 TERMINAL *_term; /* terminal type information */ 23810 24906 TTY _saved_tty; /* savetty/resetty information */ 23811 @@ -716,6 +8 26,10 @@24907 @@ -716,6 +858,10 @@ 23812 24908 WINDOW *_newscr; /* virtual screen to be updated to */ 23813 24909 WINDOW *_stdscr; /* screen's full-window context */ … … 23820 24916 TRIES *_key_ok; /* Disabled keys via keyok(,FALSE) */ 23821 24917 bool _tried; /* keypad mode was initialized */ 23822 @@ -794,11 +9 08,13 @@24918 @@ -794,11 +940,13 @@ 23823 24919 int _color_count; /* count of colors in palette */ 23824 24920 colorpair_t *_color_pairs; /* screen's color pair list */ … … 23834 24930 chtype _ok_attributes; /* valid attributes for terminal */ 23835 24931 chtype _xmc_suppress; /* attributes to suppress if xmc */ 23836 @@ -820,8 +9 36,9 @@24932 @@ -820,8 +968,9 @@ 23837 24933 */ 23838 24934 bool _nc_sp_idlok; … … 23846 24942 /* 23847 24943 * These are the data that support the mouse interface. 23848 @@ -875,7 + 992,7 @@24944 @@ -875,7 +1024,7 @@ 23849 24945 * This supports automatic resizing 23850 24946 */ … … 23855 24951 23856 24952 /* 23857 @@ -895,7 +10 12,7 @@24953 @@ -895,7 +1044,7 @@ 23858 24954 int _oldnum_size; 23859 24955 … … 23864 24960 int _legacy_coding; /* see use_legacy_coding() */ 23865 24961 23866 @@ -915,6 +10 32,15 @@24962 @@ -915,6 +1064,15 @@ 23867 24963 char tracechr_buf[40]; 23868 24964 char tracemse_buf[TRACEMSE_MAX]; … … 23880 24976 * ncurses/ncursesw are the same up to this point. 23881 24977 */ 23882 @@ -943,6 +1 069,20 @@24978 @@ -943,6 +1101,20 @@ 23883 24979 23884 24980 #define WINDOW_EXT(win,field) (((WINDOWLIST *)(win))->field) … … 23901 24997 #ifndef UCHAR_MAX 23902 24998 #define UCHAR_MAX 255 23903 @@ -1112,7 +12 52,7 @@24999 @@ -1112,7 +1284,7 @@ 23904 25000 AttrOf(dst) |= (ext + 1) 23905 25001 … … 23910 25006 || (!isWidecExt(ch) && \ 23911 25007 (ch).chars[1] == L'\0' && \ 23912 @@ -1214,8 +13 54,8 @@25008 @@ -1214,8 +1386,8 @@ 23913 25009 * Standardize/simplify common loops 23914 25010 */ … … 23921 25017 /* 23922 25018 * Prefixes for call/return points of library function traces. We use these to 23923 @@ -1263,7 +14 03,7 @@25019 @@ -1263,7 +1435,7 @@ 23924 25020 #define returnBool(code) TRACE_RETURN(code,bool) 23925 25021 #define returnCPtr(code) TRACE_RETURN(code,cptr) … … 23930 25026 #define returnPtr(code) TRACE_RETURN(code,ptr) 23931 25027 #define returnSP(code) TRACE_RETURN(code,sp) 23932 @@ -1322,7 +14 62,7 @@25028 @@ -1322,7 +1494,7 @@ 23933 25029 #define returnBool(code) return code 23934 25030 #define returnCPtr(code) return code … … 23939 25035 #define returnPtr(code) return code 23940 25036 #define returnSP(code) return code 23941 @@ -1348,7 +1 488,7 @@25037 @@ -1348,7 +1520,7 @@ 23942 25038 23943 25039 #define ALL_BUT_COLOR ((chtype)~(A_COLOR)) … … 23948 25044 #define toggle_attr_on(S,at) {\ 23949 25045 if (PAIR_NUMBER(at) > 0) {\ 23950 @@ -1367,38 +15 07,38 @@25046 @@ -1367,38 +1539,38 @@ 23951 25047 }\ 23952 25048 TR(TRACE_ATTRS, ("new attribute is %s", _traceattr((S))));} … … 24003 25099 24004 25100 /* 24005 @@ -1425,16 +15 65,28 @@25101 @@ -1425,16 +1597,28 @@ 24006 25102 extern NCURSES_EXPORT(void) _nc_toggle_attr_off (attr_t *, attr_t); 24007 25103 … … 24038 25134 #else 24039 25135 24040 @@ -1483,8 +16 35,8 @@25136 @@ -1483,8 +1667,8 @@ 24041 25137 #endif 24042 25138 … … 24049 25145 /* lib_addch.c */ 24050 25146 #if USE_WIDEC_SUPPORT 24051 @@ -1503,7 +16 55,7 @@25147 @@ -1503,7 +1687,7 @@ 24052 25148 extern NCURSES_EXPORT(int) _nc_wgetch(WINDOW *, unsigned long *, int EVENTLIST_2nd(_nc_eventlist *)); 24053 25149 … … 24058 25154 /* lib_mvcur.c */ 24059 25155 #define INFINITY 1000000 /* cost: too high to use */ 24060 @@ -1519,7 +1 671,7 @@25156 @@ -1519,7 +1703,7 @@ 24061 25157 extern NCURSES_EXPORT(void) _nc_screen_wrap (void); 24062 25158 … … 24067 25163 /* lib_mvcur.c */ 24068 25164 #define INFINITY 1000000 /* cost: too high to use */ 24069 @@ -1527,10 +1 679,13@@25165 @@ -1527,10 +1711,12 @@ 24070 25166 24071 25167 /* lib_setup.c */ … … 24078 25174 +extern NCURSES_EXPORT(int) _nc_locale_breaks_acs(TERMINAL *); 24079 25175 +extern NCURSES_EXPORT(int) _nc_setupterm(NCURSES_CONST char *, int, int *, bool); 24080 +extern NCURSES_EXPORT(void) _nc_get_screensize(SCREEN *, int *, int *);24081 25176 + 24082 25177 +/* lib_set_term.c */ … … 24085 25180 /* lib_tstp.c */ 24086 25181 #if USE_SIGWINCH 24087 @@ -1539,9 +1 694,6 @@25182 @@ -1539,9 +1725,6 @@ 24088 25183 #define _nc_handle_sigwinch(a) /* nothing */ 24089 25184 #endif … … 24095 25190 #if USE_WIDEC_SUPPORT 24096 25191 extern NCURSES_EXPORT(void) _nc_init_wacs(void); 24097 @@ -1577, 8 +1729,6@@25192 @@ -1577,9 +1760,8 @@ 24098 25193 24099 25194 /* elsewhere ... */ … … 24102 25197 -extern NCURSES_EXPORT(NCURSES_CONST char *) _nc_unctrl (SCREEN *, chtype); 24103 25198 extern NCURSES_EXPORT(SCREEN *) _nc_screen_of (WINDOW *); 25199 +extern NCURSES_EXPORT(TERMINAL*) _nc_get_cur_term (void); 24104 25200 extern NCURSES_EXPORT(WINDOW *) _nc_makenew (int, int, int, int, int); 24105 25201 extern NCURSES_EXPORT(char *) _nc_trace_buf (int, size_t); 24106 @@ -1592,12 +1742,14 @@ 25202 extern NCURSES_EXPORT(char *) _nc_trace_bufcat (int, const char *); 25203 @@ -1592,12 +1774,14 @@ 24107 25204 extern NCURSES_EXPORT(int) _nc_keypad (SCREEN *, bool); 24108 25205 extern NCURSES_EXPORT(int) _nc_ospeed (int); … … 24121 25218 extern NCURSES_EXPORT(void) _nc_freeall (void); 24122 25219 extern NCURSES_EXPORT(void) _nc_hash_map (void); 24123 @@ -1661,24 +18 13,33 @@25220 @@ -1661,24 +1845,33 @@ 24124 25221 24125 25222 #define USE_SETBUF_0 0 … … 24162 25259 24163 25260 /* 24164 @@ -1686,10 +18 47,11 @@25261 @@ -1686,10 +1879,11 @@ 24165 25262 * if the application is running multiple screens under X, it's quite possible 24166 25263 * they could all have type xterm but have different sizes! So... … … 24176 25273 /* 24177 25274 * Some constants related to SLK's 24178 @@ -1707,14 +1 869,240@@25275 @@ -1707,14 +1901,277 @@ 24179 25276 #define MAX_SKEY(fmt) (SLK_STDFMT(fmt)? MAX_SKEY_OLD : MAX_SKEY_PC) 24180 25277 #define MAX_SKEY_LEN(fmt) (SLK_STDFMT(fmt)? MAX_SKEY_LEN_OLD : MAX_SKEY_LEN_PC) … … 24208 25305 + sp->jump = outc 24209 25306 + 25307 +#ifdef USE_TERM_DRIVER 24210 25308 +struct DriverTCB; /* Terminal Control Block forward declaration */ 24211 25309 +typedef void* TERM_HANDLE; … … 24269 25367 +} TERM_DRIVER; 24270 25368 + 24271 +24272 25369 +typedef struct DriverTCB 24273 25370 +{ … … 24298 25395 +extern NCURSES_EXPORT_VAR(const color_t*) _nc_hls_palette; 24299 25396 + 25397 +extern NCURSES_EXPORT(int) _nc_get_driver(TERMINAL_CONTROL_BLOCK*, const char*, int*); 25398 +extern NCURSES_EXPORT(void) _nc_get_screensize_ex(SCREEN *, TERMINAL *, int *, int *); 25399 +#endif /* USE_TERM_DRIVER */ 25400 + 25401 +/* 25402 + * Entrypoints which are actually provided in the terminal driver, which would 25403 + * be an sp-name otherwise. 25404 + */ 24300 25405 +#ifdef USE_TERM_DRIVER 24301 +extern NCURSES_EXPORT(int) _nc_tinfo_has_key(SCREEN*, int); 24302 +extern NCURSES_EXPORT(int) _nc_tinfo_doupdate(SCREEN *sp); 24303 +extern NCURSES_EXPORT(int) _nc_tinfo_mvcur(SCREEN*,int,int,int,int); 24304 +extern NCURSES_EXPORT(int) _nc_get_driver(TERMINAL_CONTROL_BLOCK*, const char*, int*); 25406 +#define TINFO_HAS_KEY _nc_tinfo_has_key 25407 +#define TINFO_DOUPDATE _nc_tinfo_doupdate 25408 +#define TINFO_MVCUR _nc_tinfo_mvcur 25409 +extern NCURSES_EXPORT(int) TINFO_HAS_KEY(SCREEN*, int); 25410 +extern NCURSES_EXPORT(int) TINFO_DOUPDATE(SCREEN *); 25411 +extern NCURSES_EXPORT(int) TINFO_MVCUR(SCREEN*, int, int, int, int); 25412 +#else 25413 +#define TINFO_HAS_KEY NCURSES_SP_NAME(has_key) 25414 +#define TINFO_DOUPDATE NCURSES_SP_NAME(doupdate) 25415 +#define TINFO_MVCUR NCURSES_SP_NAME(mvcur) 24305 25416 +#endif 24306 25417 + 25418 +/* 25419 + * Entrypoints using an extra parameter with the terminal driver. 25420 + */ 25421 +#ifdef USE_TERM_DRIVER 25422 +extern NCURSES_EXPORT(void) _nc_get_screensize(SCREEN *, TERMINAL *, int *, int *); 25423 +extern NCURSES_EXPORT(int) _nc_setupterm_ex(TERMINAL **, NCURSES_CONST char *, int , int *, bool); 25424 +#define TINFO_GET_SIZE(sp, tp, lp, cp) \ 25425 + _nc_get_screensize(sp, tp, lp, cp) 25426 +#define TINFO_SET_CURTERM(sp, tp) \ 25427 + NCURSES_SP_NAME(set_curterm)(sp, tp) 25428 +#define TINFO_SETUP_TERM(tpp, name, fd, err, reuse) \ 25429 + _nc_setupterm_ex(tpp, name, fd, err, reuse) 25430 +#else /* !USE_TERM_DRIVER */ 25431 +extern NCURSES_EXPORT(void) _nc_get_screensize(SCREEN *, int *, int *); 25432 +#define TINFO_GET_SIZE(sp, tp, lp, cp) \ 25433 + _nc_get_screensize(sp, lp, cp) 25434 +#define TINFO_SET_CURTERM(sp, tp) \ 25435 + set_curterm(tp) 25436 +#define TINFO_SETUP_TERM(tpp, name, fd, err, reuse) \ 25437 + _nc_setupterm(name, fd, err, reuse) 25438 +#endif /* !USE_TERM_DRIVER */ 25439 + 25440 +#ifdef USE_TERM_DRIVER 24307 25441 +#ifdef __MINGW32__ 24308 25442 +#include <nc_mingw.h> … … 24310 25444 +#endif 24311 25445 +extern NCURSES_EXPORT_VAR(TERM_DRIVER) _nc_TINFO_DRIVER; 25446 +#endif 24312 25447 + 24313 25448 +#ifdef USE_TERM_DRIVER … … 24330 25465 + 24331 25466 +#if USE_REENTRANT 24332 +extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(_nc_ttytype)(SCREEN*);24333 25467 +extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_TABSIZE)(SCREEN*); 24334 25468 +extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(longname)(SCREEN*); … … 24343 25477 + * part of the API up to now 24344 25478 + */ 24345 +extern NCURSES_EXPORT(TERMINAL*) NCURSES_SP_NAME( cur_term)(SCREEN *sp);25479 +extern NCURSES_EXPORT(TERMINAL*) NCURSES_SP_NAME(_nc_get_cur_term) (SCREEN *sp); 24346 25480 +extern NCURSES_EXPORT(WINDOW *) NCURSES_SP_NAME(_nc_makenew) (SCREEN*, int, int, int, int, int); 24347 25481 +extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(_nc_reset_colors)(SCREEN*); … … 24421 25555 diff -Naur ncurses-5.7.orig/ncurses/llib-lncurses ncurses-5.7/ncurses/llib-lncurses 24422 25556 --- ncurses-5.7.orig/ncurses/llib-lncurses 2008-10-11 13:57:29.000000000 -0700 24423 +++ ncurses-5.7/ncurses/llib-lncurses 2009-0 7-19 15:04:11.000000000 -070025557 +++ ncurses-5.7/ncurses/llib-lncurses 2009-09-12 08:51:49.000000000 -0700 24424 25558 @@ -1,5 +1,5 @@ 24425 25559 /**************************************************************************** … … 26113 27247 diff -Naur ncurses-5.7.orig/ncurses/llib-lncursest ncurses-5.7/ncurses/llib-lncursest 26114 27248 --- ncurses-5.7.orig/ncurses/llib-lncursest 2008-10-11 14:13:13.000000000 -0700 26115 +++ ncurses-5.7/ncurses/llib-lncursest 2009-0 7-19 15:04:11.000000000 -070027249 +++ ncurses-5.7/ncurses/llib-lncursest 2009-09-12 08:51:49.000000000 -0700 26116 27250 @@ -1,5 +1,5 @@ 26117 27251 /**************************************************************************** … … 27859 28993 diff -Naur ncurses-5.7.orig/ncurses/llib-lncursestw ncurses-5.7/ncurses/llib-lncursestw 27860 28994 --- ncurses-5.7.orig/ncurses/llib-lncursestw 1969-12-31 16:00:00.000000000 -0800 27861 +++ ncurses-5.7/ncurses/llib-lncursestw 2009-0 7-19 15:04:11.000000000 -070028995 +++ ncurses-5.7/ncurses/llib-lncursestw 2009-09-12 08:51:49.000000000 -0700 27862 28996 @@ -0,0 +1,5192 @@ 27863 28997 +/**************************************************************************** … … 33055 34189 diff -Naur ncurses-5.7.orig/ncurses/llib-lncursesw ncurses-5.7/ncurses/llib-lncursesw 33056 34190 --- ncurses-5.7.orig/ncurses/llib-lncursesw 2008-10-11 14:03:02.000000000 -0700 33057 +++ ncurses-5.7/ncurses/llib-lncursesw 2009-0 7-19 15:04:11.000000000 -070034191 +++ ncurses-5.7/ncurses/llib-lncursesw 2009-09-12 08:51:49.000000000 -0700 33058 34192 @@ -1,5 +1,5 @@ 33059 34193 /**************************************************************************** … … 34824 35958 diff -Naur ncurses-5.7.orig/ncurses/Makefile.in ncurses-5.7/ncurses/Makefile.in 34825 35959 --- ncurses-5.7.orig/ncurses/Makefile.in 2008-10-18 07:11:54.000000000 -0700 34826 +++ ncurses-5.7/ncurses/Makefile.in 2009-0 7-19 15:04:13.000000000 -070035960 +++ ncurses-5.7/ncurses/Makefile.in 2009-09-12 08:52:04.000000000 -0700 34827 35961 @@ -1,6 +1,6 @@ 34828 35962 -# $Id: Makefile.in,v 1.113 2008/10/18 14:11:54 tom Exp $ 34829 +# $Id: Makefile.in,v 1.11 7 2009/07/04 16:36:11tom Exp $35963 +# $Id: Makefile.in,v 1.119 2009/08/10 09:06:37 tom Exp $ 34830 35964 ############################################################################## 34831 35965 -# Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. # … … 34869 36003 ################################################################################ 34870 36004 all \ 34871 @@ -204,7 +206,7 @@ 36005 @@ -200,11 +202,11 @@ 36006 $(BUILD_CC) -o $@ $(BUILD_CCFLAGS) $(tinfo)/make_keys.c $(BUILD_LDFLAGS) $(BUILD_LIBS) 36007 36008 make_hash$(BUILD_EXEEXT) : \ 36009 - $(tinfo)/comp_hash.c \ 36010 + $(tinfo)/make_hash.c \ 34872 36011 ../include/hashsize.h 34873 $(BUILD_CC) -o $@ $(BUILD_CCFLAGS) -DMAIN_PROGRAM $(tinfo)/comp_hash.c $(BUILD_LDFLAGS) $(BUILD_LIBS) 36012 - $(BUILD_CC) -o $@ $(BUILD_CCFLAGS) -DMAIN_PROGRAM $(tinfo)/comp_hash.c $(BUILD_LDFLAGS) $(BUILD_LIBS) 36013 + $(BUILD_CC) -o $@ $(BUILD_CCFLAGS) $(tinfo)/make_hash.c $(BUILD_LDFLAGS) $(BUILD_LIBS) 34874 36014 34875 36015 -./expanded.c : $(serial)/MKexpanded.sh 34876 +./expanded.c : curses.priv.h $(serial)/MKexpanded.sh36016 +./expanded.c : $(srcdir)/curses.priv.h $(serial)/MKexpanded.sh 34877 36017 sh -e $(serial)/MKexpanded.sh "$(CPP)" $(CPPFLAGS) > $@ 34878 36018 … … 34880 36020 diff -Naur ncurses-5.7.orig/ncurses/modules ncurses-5.7/ncurses/modules 34881 36021 --- ncurses-5.7.orig/ncurses/modules 2007-09-08 15:03:34.000000000 -0700 34882 +++ ncurses-5.7/ncurses/modules 2009-0 7-19 15:04:15.000000000 -070036022 +++ ncurses-5.7/ncurses/modules 2009-09-12 08:51:52.000000000 -0700 34883 36023 @@ -1,6 +1,6 @@ 34884 36024 -# $Id: modules,v 1.112 2007/09/08 22:03:34 tom Exp $ … … 34912 36052 diff -Naur ncurses-5.7.orig/ncurses/README ncurses-5.7/ncurses/README 34913 36053 --- ncurses-5.7.orig/ncurses/README 2006-04-22 15:19:37.000000000 -0700 34914 +++ ncurses-5.7/ncurses/README 2009-0 7-19 15:04:11.000000000 -070036054 +++ ncurses-5.7/ncurses/README 2009-09-12 08:51:49.000000000 -0700 34915 36055 @@ -1,5 +1,5 @@ 34916 36056 ------------------------------------------------------------------------------- … … 34950 36090 diff -Naur ncurses-5.7.orig/ncurses/tinfo/access.c ncurses-5.7/ncurses/tinfo/access.c 34951 36091 --- ncurses-5.7.orig/ncurses/tinfo/access.c 2007-11-17 16:57:53.000000000 -0800 34952 +++ ncurses-5.7/ncurses/tinfo/access.c 2009-0 7-19 15:03:51.000000000 -070036092 +++ ncurses-5.7/ncurses/tinfo/access.c 2009-09-12 08:51:28.000000000 -0700 34953 36093 @@ -1,5 +1,5 @@ 34954 36094 /**************************************************************************** … … 34978 36118 diff -Naur ncurses-5.7.orig/ncurses/tinfo/alloc_ttype.c ncurses-5.7/ncurses/tinfo/alloc_ttype.c 34979 36119 --- ncurses-5.7.orig/ncurses/tinfo/alloc_ttype.c 2008-10-12 09:12:00.000000000 -0700 34980 +++ ncurses-5.7/ncurses/tinfo/alloc_ttype.c 2009-0 7-19 15:03:53.000000000 -070036120 +++ ncurses-5.7/ncurses/tinfo/alloc_ttype.c 2009-09-12 08:51:30.000000000 -0700 34981 36121 @@ -1,5 +1,5 @@ 34982 36122 /**************************************************************************** … … 35125 36265 diff -Naur ncurses-5.7.orig/ncurses/tinfo/captoinfo.c ncurses-5.7/ncurses/tinfo/captoinfo.c 35126 36266 --- ncurses-5.7.orig/ncurses/tinfo/captoinfo.c 2008-08-16 12:24:51.000000000 -0700 35127 +++ ncurses-5.7/ncurses/tinfo/captoinfo.c 2009-0 7-19 15:03:48.000000000 -070036267 +++ ncurses-5.7/ncurses/tinfo/captoinfo.c 2009-09-12 08:51:25.000000000 -0700 35128 36268 @@ -1,5 +1,5 @@ 35129 36269 /**************************************************************************** … … 35153 36293 diff -Naur ncurses-5.7.orig/ncurses/tinfo/comp_hash.c ncurses-5.7/ncurses/tinfo/comp_hash.c 35154 36294 --- ncurses-5.7.orig/ncurses/tinfo/comp_hash.c 2008-08-16 10:06:53.000000000 -0700 35155 +++ ncurses-5.7/ncurses/tinfo/comp_hash.c 2009-0 7-19 15:04:17.000000000 -070036295 +++ ncurses-5.7/ncurses/tinfo/comp_hash.c 2009-09-12 08:52:02.000000000 -0700 35156 36296 @@ -1,5 +1,5 @@ 35157 36297 /**************************************************************************** … … 35161 36301 * Permission is hereby granted, free of charge, to any person obtaining a * 35162 36302 * copy of this software and associated documentation files (the * 35163 @@ -50,7 +50,7 @@ 35164 #define DEBUG(level, params) /*nothing */ 35165 #endif 35166 36303 @@ -44,110 +44,36 @@ 36304 #include <tic.h> 36305 #include <hashsize.h> 36306 36307 -#ifdef MAIN_PROGRAM 36308 -#include <ctype.h> 36309 -#undef DEBUG 36310 -#define DEBUG(level, params) /*nothing */ 36311 -#endif 36312 - 35167 36313 -MODULE_ID("$Id: comp_hash.c,v 1.36 2008/08/16 17:06:53 tom Exp $") 35168 +MODULE_ID("$Id: comp_hash.c,v 1.45 2009/07/18 20:30:21 tom Exp $") 35169 35170 static int hash_function(const char *); 35171 35172 @@ -91,8 +91,7 @@ 35173 hash_table[hashvalue] = i; 35174 } 35175 36314 - 36315 -static int hash_function(const char *); 36316 - 36317 -/* 36318 - * _nc_make_hash_table() 36319 - * 36320 - * Takes the entries in table[] and hashes them into hash_table[] 36321 - * by name. There are CAPTABSIZE entries in table[] and HASHTABSIZE 36322 - * slots in hash_table[]. 36323 - * 36324 - */ 36325 - 36326 -#ifdef MAIN_PROGRAM 36327 - 36328 -#undef MODULE_ID 36329 -#define MODULE_ID(id) /*nothing */ 36330 -#include <tinfo/doalloc.c> 36331 - 36332 -static void 36333 -_nc_make_hash_table(struct name_table_entry *table, 36334 - short *hash_table) 36335 -{ 36336 - short i; 36337 - int hashvalue; 36338 - int collisions = 0; 36339 - 36340 - for (i = 0; i < HASHTABSIZE; i++) { 36341 - hash_table[i] = -1; 36342 - } 36343 - for (i = 0; i < CAPTABSIZE; i++) { 36344 - hashvalue = hash_function(table[i].nte_name); 36345 - 36346 - if (hash_table[hashvalue] >= 0) 36347 - collisions++; 36348 - 36349 - if (hash_table[hashvalue] != 0) 36350 - table[i].nte_link = hash_table[hashvalue]; 36351 - hash_table[hashvalue] = i; 36352 - } 36353 - 35176 36354 - DEBUG(4, ("Hash table complete: %d collisions out of %d entries", 35177 36355 - collisions, CAPTABSIZE)); 35178 + printf("/* %d collisions out of %d entries */\n", collisions, CAPTABSIZE); 35179 } 35180 #endif 35181 35182 @@ -121,16 +120,24 @@ 35183 return (int) (sum % HASHTABSIZE); 35184 } 35185 35186 +#ifndef MAIN_PROGRAM 35187 + 35188 +#define SameName(a,b,termcap) (termcap ? !strncmp(a,b,2) : !strcmp(a,b)) 35189 +#if 0 35190 +static bool 35191 +same_name(const char *a, const char *b, bool termcap) 35192 +{ 35193 + fprintf(stderr, "compare(%s,%s)\n", a, b); 35194 + return SameName(a, b, termcap); 35195 +} 35196 +#else 35197 +#define same_name(a,b,termcap) SameName(a,b,termcap) 35198 +#endif 35199 + 36356 -} 36357 -#endif 36358 +MODULE_ID("$Id: comp_hash.c,v 1.48 2009/08/08 17:36:21 tom Exp $") 36359 35200 36360 /* 36361 - * int hash_function(string) 36362 - * 36363 - * Computes the hashing function on the given string. 36364 - * 36365 - * The current hash function is the sum of each consectutive pair 36366 - * of characters, taken as two-byte integers, mod HASHTABSIZE. 36367 - * 36368 + * Finds the entry for the given string in the hash table if present. 36369 + * Returns a pointer to the entry in the table or 0 if not found. 36370 */ 36371 - 36372 -static int 36373 -hash_function(const char *string) 36374 -{ 36375 - long sum = 0; 36376 - 36377 - DEBUG(9, ("hashing %s", string)); 36378 - while (*string) { 36379 - sum += (long) (*string + (*(string + 1) << 8)); 36380 - string++; 36381 - } 36382 - 36383 - DEBUG(9, ("sum is %ld", sum)); 36384 - return (int) (sum % HASHTABSIZE); 36385 -} 36386 - 36387 -/* 35201 36388 - * struct name_table_entry * 35202 36389 - * find_entry(string) … … 35205 36392 - * Returns a pointer to the entry in the table or 0 if not found. 35206 36393 - * 35207 + * Finds the entry for the given string in the hash table if present. 35208 + * Returns a pointer to the entry in the table or 0 if not found. 35209 */ 36394 - */ 35210 36395 - 35211 36396 -#ifndef MAIN_PROGRAM 36397 +/* entrypoint used by tack (do not alter) */ 35212 36398 NCURSES_EXPORT(struct name_table_entry const *) 35213 36399 _nc_find_entry(const char *string, 35214 const short *hash_table) 35215 @@ -142,11 +149,15 @@ 35216 hashvalue = hash_function(string); 35217 35218 if (hash_table[hashvalue] >= 0) { 36400 - const short *hash_table) 36401 + const HashValue * hash_table) 36402 { 36403 + bool termcap = (hash_table != _nc_get_hash_table(FALSE)); 36404 + const HashData *data = _nc_get_hash_info(termcap); 36405 int hashvalue; 36406 struct name_table_entry const *ptr = 0; 36407 struct name_table_entry const *real_table; 36408 36409 - hashvalue = hash_function(string); 36410 + hashvalue = data->hash_of(string); 36411 + 36412 + if (data->table_data[hashvalue] >= 0) { 36413 36414 - if (hash_table[hashvalue] >= 0) { 35219 36415 - real_table = _nc_get_table(hash_table != _nc_get_hash_table(FALSE)); 35220 + bool termcap = (hash_table != _nc_get_hash_table(FALSE)); 35221 + 35222 + real_table = _nc_get_table(termcap); 35223 ptr = real_table + hash_table[hashvalue]; 36416 - ptr = real_table + hash_table[hashvalue]; 35224 36417 - while (strcmp(ptr->nte_name, string) != 0) { 35225 36418 - if (ptr->nte_link < 0) 35226 36419 - return 0; 35227 + while (!same_name(ptr->nte_name, string, termcap)) { 36420 - ptr = real_table + (ptr->nte_link + hash_table[HASHTABSIZE]); 36421 + real_table = _nc_get_table(termcap); 36422 + ptr = real_table + data->table_data[hashvalue]; 36423 + while (!data->compare_names(ptr->nte_name, string)) { 35228 36424 + if (ptr->nte_link < 0) { 35229 36425 + ptr = 0; 35230 36426 + break; 35231 36427 + } 35232 ptr = real_table + (ptr->nte_link + hash_table[HASHTABSIZE]); 36428 + ptr = real_table + (ptr->nte_link 36429 + + data->table_data[data->table_size]); 35233 36430 } 35234 36431 } 35235 @@ -155,29 +166,36 @@ 36432 36433 @@ -155,216 +81,34 @@ 35236 36434 } 35237 36435 … … 35258 36456 { 35259 36457 - struct name_table_entry const *ptr; 35260 + struct name_table_entry const *ptr = NULL; 35261 + const short *hash_table = _nc_get_hash_table(termcap); 35262 + int hashvalue = hash_function(string); 35263 36458 - 35264 36459 - for (ptr = table; ptr < table + CAPTABSIZE; ptr++) { 35265 36460 - if (ptr->nte_type == type && strcmp(string, ptr->nte_name) == 0) 35266 36461 - return (ptr); 35267 + if (hash_table[hashvalue] >= 0) { 36462 - } 36463 - 36464 - return ((struct name_table_entry *) NULL); 36465 -} 36466 -#endif 36467 - 36468 -#ifdef MAIN_PROGRAM 36469 -/* 36470 - * This filter reads from standard input a list of tab-delimited columns, 36471 - * (e.g., from Caps.filtered) computes the hash-value of a specified column and 36472 - * writes the hashed tables to standard output. 36473 - * 36474 - * By compiling the hash table at build time, we're able to make the entire 36475 - * set of terminfo and termcap tables readonly (and also provide some runtime 36476 - * performance enhancement). 36477 - */ 36478 - 36479 -#define MAX_COLUMNS BUFSIZ /* this _has_ to be worst-case */ 36480 - 36481 -static char ** 36482 -parse_columns(char *buffer) 36483 -{ 36484 - static char **list; 36485 - 36486 - int col = 0; 36487 - 36488 - if (list == 0 && (list = typeCalloc(char *, MAX_COLUMNS)) == 0) 36489 - return (0); 36490 - 36491 - if (*buffer != '#') { 36492 - while (*buffer != '\0') { 36493 - char *s; 36494 - for (s = buffer; (*s != '\0') && !isspace(UChar(*s)); s++) 36495 - /*EMPTY */ ; 36496 - if (s != buffer) { 36497 - char mark = *s; 36498 - *s = '\0'; 36499 - if ((s - buffer) > 1 36500 - && (*buffer == '"') 36501 - && (s[-1] == '"')) { /* strip the quotes */ 36502 - assert(s > buffer + 1); 36503 - s[-1] = '\0'; 36504 - buffer++; 36505 - } 36506 - list[col] = buffer; 36507 - col++; 36508 - if (mark == '\0') 36509 - break; 36510 - while (*++s && isspace(UChar(*s))) 36511 - /*EMPTY */ ; 36512 - buffer = s; 36513 - } else 36514 + struct name_table_entry const *ptr = NULL; 36515 + const HashData *data = _nc_get_hash_info(termcap); 36516 + int hashvalue = data->hash_of(string); 36517 + 36518 + if (data->table_data[hashvalue] >= 0) { 35268 36519 + const struct name_table_entry *const table = _nc_get_table(termcap); 35269 36520 + 35270 + ptr = table + hash_table[hashvalue];36521 + ptr = table + data->table_data[hashvalue]; 35271 36522 + while (ptr->nte_type != type 35272 + || ! same_name(ptr->nte_name, string, termcap)) {36523 + || !data->compare_names(ptr->nte_name, string)) { 35273 36524 + if (ptr->nte_link < 0) { 35274 36525 + ptr = 0; 35275 + break; 35276 + } 35277 + ptr = table + (ptr->nte_link + hash_table[HASHTABSIZE]); 35278 + } 36526 break; 36527 - } 36528 - } 36529 - return col ? list : 0; 36530 -} 36531 - 36532 -int 36533 -main(int argc, char **argv) 36534 -{ 36535 - struct name_table_entry *name_table = typeCalloc(struct 36536 - name_table_entry, CAPTABSIZE); 36537 - short *hash_table = typeCalloc(short, HASHTABSIZE); 36538 - const char *root_name = ""; 36539 - int column = 0; 36540 - int bigstring = 0; 36541 - int n; 36542 - char buffer[BUFSIZ]; 36543 - 36544 - static const char *typenames[] = 36545 - {"BOOLEAN", "NUMBER", "STRING"}; 36546 - 36547 - short BoolCount = 0; 36548 - short NumCount = 0; 36549 - short StrCount = 0; 36550 - 36551 - /* The first argument is the column-number (starting with 0). 36552 - * The second is the root name of the tables to generate. 36553 - */ 36554 - if (argc <= 3 36555 - || (column = atoi(argv[1])) <= 0 36556 - || (column >= MAX_COLUMNS) 36557 - || *(root_name = argv[2]) == 0 36558 - || (bigstring = atoi(argv[3])) < 0 36559 - || name_table == 0 36560 - || hash_table == 0) { 36561 - fprintf(stderr, "usage: make_hash column root_name bigstring\n"); 36562 - exit(EXIT_FAILURE); 36563 - } 36564 - 36565 - /* 36566 - * Read the table into our arrays. 36567 - */ 36568 - for (n = 0; (n < CAPTABSIZE) && fgets(buffer, BUFSIZ, stdin);) { 36569 - char **list, *nlp = strchr(buffer, '\n'); 36570 - if (nlp) 36571 - *nlp = '\0'; 36572 - list = parse_columns(buffer); 36573 - if (list == 0) /* blank or comment */ 36574 - continue; 36575 - name_table[n].nte_link = -1; /* end-of-hash */ 36576 - name_table[n].nte_name = strdup(list[column]); 36577 - if (!strcmp(list[2], "bool")) { 36578 - name_table[n].nte_type = BOOLEAN; 36579 - name_table[n].nte_index = BoolCount++; 36580 - } else if (!strcmp(list[2], "num")) { 36581 - name_table[n].nte_type = NUMBER; 36582 - name_table[n].nte_index = NumCount++; 36583 - } else if (!strcmp(list[2], "str")) { 36584 - name_table[n].nte_type = STRING; 36585 - name_table[n].nte_index = StrCount++; 36586 - } else { 36587 - fprintf(stderr, "Unknown type: %s\n", list[2]); 36588 - exit(EXIT_FAILURE); 36589 - } 36590 - n++; 36591 - } 36592 - _nc_make_hash_table(name_table, hash_table); 36593 - 36594 - /* 36595 - * Write the compiled tables to standard output 36596 - */ 36597 - if (bigstring) { 36598 - int len = 0; 36599 - int nxt; 36600 - 36601 - printf("static const char %s_names_text[] = \\\n", root_name); 36602 - for (n = 0; n < CAPTABSIZE; n++) { 36603 - nxt = (int) strlen(name_table[n].nte_name) + 5; 36604 - if (nxt + len > 72) { 36605 - printf("\\\n"); 36606 - len = 0; 36607 } 36608 - printf("\"%s\\0\" ", name_table[n].nte_name); 36609 - len += nxt; 36610 - } 36611 - printf(";\n\n"); 36612 - 36613 - len = 0; 36614 - printf("static name_table_data const %s_names_data[] =\n", 36615 - root_name); 36616 - printf("{\n"); 36617 - for (n = 0; n < CAPTABSIZE; n++) { 36618 - printf("\t{ %15d,\t%10s,\t%3d, %3d }%c\n", 36619 - len, 36620 - typenames[name_table[n].nte_type], 36621 - name_table[n].nte_index, 36622 - name_table[n].nte_link, 36623 - n < CAPTABSIZE - 1 ? ',' : ' '); 36624 - len += (int) strlen(name_table[n].nte_name) + 1; 36625 + ptr = table + (ptr->nte_link + data->table_data[data->table_size]); 36626 } 36627 - printf("};\n\n"); 36628 - printf("static struct name_table_entry *_nc_%s_table = 0;\n\n", root_name); 36629 - } else { 36630 - 36631 - printf("static struct name_table_entry %s _nc_%s_table[] =\n", 36632 - bigstring ? "" : "const", 36633 - root_name); 36634 - printf("{\n"); 36635 - for (n = 0; n < CAPTABSIZE; n++) { 36636 - sprintf(buffer, "\"%s\"", 36637 - name_table[n].nte_name); 36638 - printf("\t{ %15s,\t%10s,\t%3d, %3d }%c\n", 36639 - buffer, 36640 - typenames[name_table[n].nte_type], 36641 - name_table[n].nte_index, 36642 - name_table[n].nte_link, 36643 - n < CAPTABSIZE - 1 ? ',' : ' '); 36644 - } 36645 - printf("};\n\n"); 36646 - } 36647 - 36648 - printf("static const short _nc_%s_hash_table[%d] =\n", 36649 - root_name, 36650 - HASHTABSIZE + 1); 36651 - printf("{\n"); 36652 - for (n = 0; n < HASHTABSIZE; n++) { 36653 - printf("\t%3d,\n", hash_table[n]); 35279 36654 } 35280 35281 - return ((struct name_table_entry *) NULL); 36655 - printf("\t0\t/* base-of-table */\n"); 36656 - printf("};\n\n"); 36657 - 36658 - printf("#if (BOOLCOUNT!=%d)||(NUMCOUNT!=%d)||(STRCOUNT!=%d)\n", 36659 - BoolCount, NumCount, StrCount); 36660 - printf("#error\t--> term.h and comp_captab.c disagree about the <--\n"); 36661 - printf("#error\t--> numbers of booleans, numbers and/or strings <--\n"); 36662 - printf("#endif\n\n"); 36663 36664 - free(hash_table); 36665 - return EXIT_SUCCESS; 35282 36666 + return ptr; 35283 36667 } 35284 #endif 35285 36668 -#endif 35286 36669 diff -Naur ncurses-5.7.orig/ncurses/tinfo/comp_parse.c ncurses-5.7/ncurses/tinfo/comp_parse.c 35287 36670 --- ncurses-5.7.orig/ncurses/tinfo/comp_parse.c 2008-08-16 14:58:16.000000000 -0700 35288 +++ ncurses-5.7/ncurses/tinfo/comp_parse.c 2009-0 7-19 15:04:17.000000000 -070036671 +++ ncurses-5.7/ncurses/tinfo/comp_parse.c 2009-09-12 08:51:54.000000000 -0700 35289 36672 @@ -1,5 +1,5 @@ 35290 36673 /**************************************************************************** … … 35327 36710 diff -Naur ncurses-5.7.orig/ncurses/tinfo/comp_scan.c ncurses-5.7/ncurses/tinfo/comp_scan.c 35328 36711 --- ncurses-5.7.orig/ncurses/tinfo/comp_scan.c 2008-08-16 12:22:55.000000000 -0700 35329 +++ ncurses-5.7/ncurses/tinfo/comp_scan.c 2009-0 7-19 15:03:59.000000000 -070036712 +++ ncurses-5.7/ncurses/tinfo/comp_scan.c 2009-09-12 08:51:37.000000000 -0700 35330 36713 @@ -51,7 +51,7 @@ 35331 36714 #include <term_entry.h> … … 35385 36768 diff -Naur ncurses-5.7.orig/ncurses/tinfo/entries.c ncurses-5.7/ncurses/tinfo/entries.c 35386 36769 --- ncurses-5.7.orig/ncurses/tinfo/entries.c 2008-09-27 06:11:10.000000000 -0700 35387 +++ ncurses-5.7/ncurses/tinfo/entries.c 2009-0 7-19 15:04:15.000000000 -070036770 +++ ncurses-5.7/ncurses/tinfo/entries.c 2009-09-12 08:51:52.000000000 -0700 35388 36771 @@ -1,5 +1,5 @@ 35389 36772 /**************************************************************************** … … 35437 36820 diff -Naur ncurses-5.7.orig/ncurses/tinfo/hashed_db.c ncurses-5.7/ncurses/tinfo/hashed_db.c 35438 36821 --- ncurses-5.7.orig/ncurses/tinfo/hashed_db.c 2006-08-19 12:48:38.000000000 -0700 35439 +++ ncurses-5.7/ncurses/tinfo/hashed_db.c 2009-0 7-19 15:02:02.000000000 -070036822 +++ ncurses-5.7/ncurses/tinfo/hashed_db.c 2009-09-12 08:50:57.000000000 -0700 35440 36823 @@ -1,5 +1,5 @@ 35441 36824 /**************************************************************************** … … 35543 36926 diff -Naur ncurses-5.7.orig/ncurses/tinfo/init_keytry.c ncurses-5.7/ncurses/tinfo/init_keytry.c 35544 36927 --- ncurses-5.7.orig/ncurses/tinfo/init_keytry.c 2008-05-24 14:44:51.000000000 -0700 35545 +++ ncurses-5.7/ncurses/tinfo/init_keytry.c 2009-0 7-19 15:03:59.000000000 -070036928 +++ ncurses-5.7/ncurses/tinfo/init_keytry.c 2009-09-12 08:51:37.000000000 -0700 35546 36929 @@ -1,5 +1,5 @@ 35547 36930 /**************************************************************************** … … 35590 36973 diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_acs.c ncurses-5.7/ncurses/tinfo/lib_acs.c 35591 36974 --- ncurses-5.7.orig/ncurses/tinfo/lib_acs.c 2008-08-16 12:22:55.000000000 -0700 35592 +++ ncurses-5.7/ncurses/tinfo/lib_acs.c 2009-0 7-19 15:04:06.000000000 -070036975 +++ ncurses-5.7/ncurses/tinfo/lib_acs.c 2009-09-12 08:51:43.000000000 -0700 35593 36976 @@ -1,5 +1,5 @@ 35594 36977 /**************************************************************************** … … 35700 37083 diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_baudrate.c ncurses-5.7/ncurses/tinfo/lib_baudrate.c 35701 37084 --- ncurses-5.7.orig/ncurses/tinfo/lib_baudrate.c 2008-06-28 08:19:24.000000000 -0700 35702 +++ ncurses-5.7/ncurses/tinfo/lib_baudrate.c 2009-0 7-19 15:03:59.000000000 -070037085 +++ ncurses-5.7/ncurses/tinfo/lib_baudrate.c 2009-09-12 08:51:37.000000000 -0700 35703 37086 @@ -1,5 +1,5 @@ 35704 37087 /**************************************************************************** … … 35787 37170 diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_cur_term.c ncurses-5.7/ncurses/tinfo/lib_cur_term.c 35788 37171 --- ncurses-5.7.orig/ncurses/tinfo/lib_cur_term.c 2008-08-16 12:22:55.000000000 -0700 35789 +++ ncurses-5.7/ncurses/tinfo/lib_cur_term.c 2009-0 7-19 15:04:04.000000000 -070037172 +++ ncurses-5.7/ncurses/tinfo/lib_cur_term.c 2009-09-12 08:52:09.000000000 -0700 35790 37173 @@ -1,5 +1,5 @@ 35791 37174 /**************************************************************************** … … 35795 37178 * Permission is hereby granted, free of charge, to any person obtaining a * 35796 37179 * copy of this software and associated documentation files (the * 35797 @@ -40, 12 +40,14@@37180 @@ -40,23 +40,41 @@ 35798 37181 #include <term_entry.h> /* TTY, cur_term */ 35799 37182 #include <termcap.h> /* ospeed */ 35800 37183 35801 37184 -MODULE_ID("$Id: lib_cur_term.c,v 1.18 2008/08/16 19:22:55 tom Exp $") 35802 +MODULE_ID("$Id: lib_cur_term.c,v 1.2 2 2009/05/30 13:55:19tom Exp $")37185 +MODULE_ID("$Id: lib_cur_term.c,v 1.26 2009/09/05 18:05:27 tom Exp $") 35803 37186 35804 37187 #undef CUR … … 35809 37192 +NCURSES_EXPORT_VAR(TERMINAL *) cur_term = 0; 35810 37193 +#elif BROKEN_LINKER || USE_REENTRANT 37194 + 37195 +NCURSES_EXPORT(TERMINAL *) 37196 +NCURSES_SP_NAME(_nc_get_cur_term) (NCURSES_SP_DCL0) 37197 +{ 37198 + return ((0 != TerminalOf(SP_PARM)) ? TerminalOf(SP_PARM) : CurTerm); 37199 +} 37200 + 37201 +#if NCURSES_SP_FUNCS 37202 +NCURSES_EXPORT(TERMINAL *) 37203 +_nc_get_cur_term(void) 37204 +{ 37205 + return NCURSES_SP_NAME(_nc_get_cur_term) (CURRENT_SCREEN); 37206 +} 37207 +#endif 37208 + 35811 37209 NCURSES_EXPORT(TERMINAL *) 35812 37210 NCURSES_PUBLIC_VAR(cur_term) (void) 35813 37211 { 35814 @@ -66,7 +68,9 @@ 37212 - return (SP != 0 && SP->_term != 0) ? SP->_term : _nc_prescreen._cur_term; 37213 + return NCURSES_SP_NAME(_nc_get_cur_term) (NCURSES_SP_ARG); 37214 } 37215 + 37216 #else 37217 NCURSES_EXPORT_VAR(TERMINAL *) cur_term = 0; 37218 #endif 37219 37220 NCURSES_EXPORT(TERMINAL *) 37221 -set_curterm(TERMINAL * termp) 37222 +NCURSES_SP_NAME(set_curterm) (NCURSES_SP_DCLx TERMINAL * termp) 37223 { 37224 TERMINAL *oldterm; 37225 37226 @@ -64,18 +82,27 @@ 37227 37228 _nc_lock_global(curses); 35815 37229 oldterm = cur_term; 35816 35817 37230 - if (SP) 37231 - SP->_term = termp; 35818 37232 -#if BROKEN_LINKER || USE_REENTRANT 37233 - _nc_prescreen._cur_term = termp; 37234 -#else 37235 + if (SP_PARM) 37236 + SP_PARM->_term = termp; 35819 37237 +#if BROKEN_LINKER && !USE_REENTRANT 35820 + cur_term = termp;35821 +#elif BROKEN_LINKER || USE_REENTRANT35822 _nc_prescreen._cur_term = termp;35823 #else35824 37238 cur_term = termp; 35825 @@ -84,7 +88,7 @@ 37239 +#else 37240 + CurTerm = termp; 37241 #endif 37242 if (termp != 0) { 37243 +#ifdef USE_TERM_DRIVER 37244 + TERMINAL_CONTROL_BLOCK *TCB = (TERMINAL_CONTROL_BLOCK *) termp; 37245 + ospeed = _nc_ospeed(termp->_baudrate); 37246 + if (TCB->drv->isTerminfo && termp->type.Strings) { 37247 + PC = (char) ((pad_char != NULL) ? pad_char[0] : 0); 37248 + } 37249 + TCB->csp = SP_PARM; 37250 +#else 37251 ospeed = _nc_ospeed(termp->_baudrate); 37252 if (termp->type.Strings) { 37253 PC = (char) ((pad_char != NULL) ? pad_char[0] : 0); 37254 } 37255 +#endif 37256 } 37257 _nc_unlock_global(curses); 37258 37259 @@ -83,23 +110,65 @@ 37260 return (oldterm); 35826 37261 } 35827 37262 37263 +#if NCURSES_SP_FUNCS 37264 +NCURSES_EXPORT(TERMINAL *) 37265 +set_curterm(TERMINAL * termp) 37266 +{ 37267 + return NCURSES_SP_NAME(set_curterm) (CURRENT_SCREEN, termp); 37268 +} 37269 +#endif 37270 + 35828 37271 NCURSES_EXPORT(int) 35829 37272 -del_curterm(TERMINAL * termp) … … 35832 37275 int rc = ERR; 35833 37276 35834 @@ -94,6 +98,10 @@ 37277 - T((T_CALLED("del_curterm(%p)"), termp)); 37278 + T((T_CALLED("del_curterm(%p, %p)"), SP_PARM, termp)); 37279 37280 - _nc_lock_global(curses); 35835 37281 if (termp != 0) { 37282 +#ifdef USE_TERM_DRIVER 37283 + TERMINAL_CONTROL_BLOCK *TCB = (TERMINAL_CONTROL_BLOCK *) termp; 37284 +#endif 37285 + TERMINAL *cur = ( 37286 +#if BROKEN_LINKER && !USE_REENTRANT 37287 + cur_term 37288 +#elif BROKEN_LINKER || USE_REENTRANT 37289 + NCURSES_SP_NAME(_nc_get_cur_term) (NCURSES_SP_ARG) 37290 +#else 37291 + cur_term 37292 +#endif 37293 + ); 37294 + 35836 37295 _nc_free_termtype(&(termp->type)); 37296 + if (termp == cur) 37297 + NCURSES_SP_NAME(set_curterm) (NCURSES_SP_ARGx 0); 37298 + 35837 37299 FreeIfNeeded(termp->_termname); 35838 37300 +#if USE_HOME_TERMINFO … … 35840 37302 + FreeAndNull(_nc_globals.home_terminfo); 35841 37303 +#endif 37304 +#ifdef USE_TERM_DRIVER 37305 + if (TCB->drv) 37306 + TCB->drv->release(TCB); 37307 +#endif 35842 37308 free(termp); 35843 if (termp == cur_term) 35844 set_curterm(0); 35845 @@ -103,3 +111,13 @@ 35846 35847 returnCode(rc); 35848 } 37309 - if (termp == cur_term) 37310 - set_curterm(0); 37311 + 37312 rc = OK; 37313 } 37314 + returnCode(rc); 37315 +} 35849 37316 + 35850 37317 +#if NCURSES_SP_FUNCS … … 35853 37320 +{ 35854 37321 + int rc = ERR; 37322 + 37323 + _nc_lock_global(curses); 35855 37324 + rc = NCURSES_SP_NAME(del_curterm) (CURRENT_SCREEN, termp); 37325 _nc_unlock_global(curses); 37326 37327 - returnCode(rc); 35856 37328 + return (rc); 35857 +}37329 } 35858 37330 +#endif 35859 37331 diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_data.c ncurses-5.7/ncurses/tinfo/lib_data.c 35860 37332 --- ncurses-5.7.orig/ncurses/tinfo/lib_data.c 2008-08-23 15:16:15.000000000 -0700 35861 +++ ncurses-5.7/ncurses/tinfo/lib_data.c 2009-0 7-19 15:04:09.000000000 -070037333 +++ ncurses-5.7/ncurses/tinfo/lib_data.c 2009-09-12 08:51:47.000000000 -0700 35862 37334 @@ -1,5 +1,5 @@ 35863 37335 /**************************************************************************** … … 35989 37461 diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_has_cap.c ncurses-5.7/ncurses/tinfo/lib_has_cap.c 35990 37462 --- ncurses-5.7.orig/ncurses/tinfo/lib_has_cap.c 2003-10-25 12:43:55.000000000 -0700 35991 +++ ncurses-5.7/ncurses/tinfo/lib_has_cap.c 2009-0 7-19 15:03:59.000000000 -070037463 +++ ncurses-5.7/ncurses/tinfo/lib_has_cap.c 2009-09-12 08:51:37.000000000 -0700 35992 37464 @@ -1,5 +1,5 @@ 35993 37465 /**************************************************************************** … … 36072 37544 diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_kernel.c ncurses-5.7/ncurses/tinfo/lib_kernel.c 36073 37545 --- ncurses-5.7.orig/ncurses/tinfo/lib_kernel.c 2004-05-08 10:11:21.000000000 -0700 36074 +++ ncurses-5.7/ncurses/tinfo/lib_kernel.c 2009-0 7-19 15:04:06.000000000 -070037546 +++ ncurses-5.7/ncurses/tinfo/lib_kernel.c 2009-09-12 08:51:43.000000000 -0700 36075 37547 @@ -1,5 +1,5 @@ 36076 37548 /**************************************************************************** … … 36227 37699 diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_longname.c ncurses-5.7/ncurses/tinfo/lib_longname.c 36228 37700 --- ncurses-5.7.orig/ncurses/tinfo/lib_longname.c 2000-12-09 18:55:07.000000000 -0800 36229 +++ ncurses-5.7/ncurses/tinfo/lib_longname.c 2009-0 7-19 15:03:59.000000000 -070037701 +++ ncurses-5.7/ncurses/tinfo/lib_longname.c 2009-09-12 08:51:37.000000000 -0700 36230 37702 @@ -1,5 +1,5 @@ 36231 37703 /**************************************************************************** … … 36300 37772 diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_napms.c ncurses-5.7/ncurses/tinfo/lib_napms.c 36301 37773 --- ncurses-5.7.orig/ncurses/tinfo/lib_napms.c 2008-05-03 14:34:13.000000000 -0700 36302 +++ ncurses-5.7/ncurses/tinfo/lib_napms.c 2009-0 7-19 15:04:06.000000000 -070037774 +++ ncurses-5.7/ncurses/tinfo/lib_napms.c 2009-09-12 08:51:43.000000000 -0700 36303 37775 @@ -1,5 +1,5 @@ 36304 37776 /**************************************************************************** … … 36354 37826 diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_options.c ncurses-5.7/ncurses/tinfo/lib_options.c 36355 37827 --- ncurses-5.7.orig/ncurses/tinfo/lib_options.c 2008-08-16 14:20:48.000000000 -0700 36356 +++ ncurses-5.7/ncurses/tinfo/lib_options.c 2009-0 7-19 15:04:13.000000000 -070037828 +++ ncurses-5.7/ncurses/tinfo/lib_options.c 2009-09-12 08:52:05.000000000 -0700 36357 37829 @@ -1,5 +1,5 @@ 36358 37830 /**************************************************************************** … … 36370 37842 36371 37843 /* 36372 @@ -43,14 +44,20 @@ 36373 36374 #include <term.h> 36375 37844 @@ -41,23 +42,28 @@ 37845 37846 #include <curses.priv.h> 37847 37848 -#include <term.h> 37849 - 36376 37850 -MODULE_ID("$Id: lib_options.c,v 1.58 2008/08/16 21:20:48 Werner.Fink Exp $") 36377 37851 +#ifndef CUR 36378 37852 +#define CUR SP_TERMTYPE 36379 37853 +#endif 36380 +36381 +MODULE_ID("$Id: lib_options.c,v 1.65 2009/07/04 18:14:31 tom Exp $")36382 37854 36383 37855 -static int _nc_curs_set(SCREEN *, int); 36384 static int _nc_meta(SCREEN *, bool); 37856 -static int _nc_meta(SCREEN *, bool); 37857 +MODULE_ID("$Id: lib_options.c,v 1.70 2009/08/16 14:16:38 tom Exp $") 36385 37858 36386 37859 NCURSES_EXPORT(int) 36387 37860 idlok(WINDOW *win, bool flag) 36388 37861 { 36389 +#if NCURSES_SP_FUNCS 36390 + SCREEN *sp = CURRENT_SCREEN; 36391 +#endif 37862 + int res = ERR; 36392 37863 T((T_CALLED("idlok(%p,%d)"), win, flag)); 36393 37864 36394 37865 if (win) { 36395 @@ -63,6 +70,9 @@ 37866 - _nc_idlok = win->_idlok = (flag && (has_il() || change_scroll_region)); 37867 - returnCode(OK); 37868 - } else 37869 - returnCode(ERR); 37870 + SCREEN *sp = _nc_screen_of(win); 37871 + if (sp && IsTermInfo(sp)) { 37872 + sp->_nc_sp_idlok = 37873 + win->_idlok = (flag && (NCURSES_SP_NAME(has_il) (NCURSES_SP_ARG) 37874 + || change_scroll_region)); 37875 + res = OK; 37876 + } 37877 + } 37878 + returnCode(res); 37879 } 37880 36396 37881 NCURSES_EXPORT(void) 36397 idcok(WINDOW *win, bool flag) 37882 @@ -65,25 +71,34 @@ 36398 37883 { 36399 +#if NCURSES_SP_FUNCS36400 + SCREEN *sp = CURRENT_SCREEN;36401 +#endif36402 37884 T((T_CALLED("idcok(%p,%d)"), win, flag)); 36403 37885 36404 if (win) 36405 @@ -72,18 +82,26 @@ 37886 - if (win) 37887 - _nc_idcok = win->_idcok = (flag && has_ic()); 37888 - 37889 + if (win) { 37890 + SCREEN *sp = _nc_screen_of(win); 37891 + sp->_nc_sp_idcok = win->_idcok = (flag && NCURSES_SP_NAME(has_ic) (NCURSES_SP_ARG)); 37892 + } 37893 returnVoid; 36406 37894 } 36407 37895 … … 36410 37898 +NCURSES_SP_NAME(halfdelay) (NCURSES_SP_DCLx int t) 36411 37899 { 36412 T((T_CALLED("halfdelay(%d)"), t)); 37900 - T((T_CALLED("halfdelay(%d)"), t)); 37901 + T((T_CALLED("halfdelay(%p,%d)"), SP_PARM, t)); 36413 37902 36414 37903 - if (t < 1 || t > 255 || SP == 0) 36415 + if (t < 1 || t > 255 || SP_PARM == 0)37904 + if (t < 1 || t > 255 || !IsValidTIScreen(SP_PARM)) 36416 37905 returnCode(ERR); 36417 37906 36418 37907 - cbreak(); 36419 37908 - SP->_cbreak = t + 1; 37909 + NCURSES_SP_NAME(cbreak) (NCURSES_SP_ARG); 36420 37910 + SP_PARM->_cbreak = t + 1; 36421 37911 returnCode(OK); … … 36433 37923 nodelay(WINDOW *win, bool flag) 36434 37924 { 36435 @@ -148,27 +166,64 @@ 37925 @@ -129,7 +144,7 @@ 37926 37927 if (win) { 37928 win->_use_keypad = flag; 37929 - returnCode(_nc_keypad(SP, flag)); 37930 + returnCode(_nc_keypad(_nc_screen_of(win), flag)); 37931 } else 37932 returnCode(ERR); 37933 } 37934 @@ -137,38 +152,106 @@ 37935 NCURSES_EXPORT(int) 37936 meta(WINDOW *win GCC_UNUSED, bool flag) 37937 { 37938 - int result; 37939 + int result = ERR; 37940 + SCREEN *sp = (win == 0) ? CURRENT_SCREEN : _nc_screen_of(win); 37941 37942 /* Ok, we stay relaxed and don't signal an error if win is NULL */ 37943 T((T_CALLED("meta(%p,%d)"), win, flag)); 37944 - result = _nc_meta(SP, flag); 37945 + 37946 + /* Ok, we stay relaxed and don't signal an error if win is NULL */ 37947 + 37948 + if (sp != 0) { 37949 + sp->_use_meta = flag; 37950 +#ifdef USE_TERM_DRIVER 37951 + if (IsTermInfo(sp)) { 37952 + if (flag) { 37953 + NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx "meta_on", meta_on); 37954 + } else { 37955 + NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx "meta_off", meta_off); 37956 + } 37957 + } 37958 +#else 37959 + if (flag) { 37960 + NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx "meta_on", meta_on); 37961 + } else { 37962 + NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx "meta_off", meta_off); 37963 + } 37964 +#endif 37965 + result = OK; 37966 + } 37967 returnCode(result); 37968 } 37969 36436 37970 /* curs_set() moved here to narrow the kernel interface */ 36437 37971 … … 36441 37975 { 36442 37976 - int result; 36443 + int result = ERR; 36444 + 37977 + int code = ERR; 36445 37978 + T((T_CALLED("curs_set(%p,%d)"), SP_PARM, vis)); 37979 37980 - T((T_CALLED("curs_set(%d)"), vis)); 37981 - result = _nc_curs_set(SP, vis); 37982 - returnCode(result); 36446 37983 + if (SP_PARM != 0 && vis >= 0 && vis <= 2) { 36447 37984 + int cursor = SP_PARM->_cursor; 36448 36449 - T((T_CALLED("curs_set(%d)"), vis)); 36450 - result = _nc_curs_set(SP, vis); 37985 + bool bBuiltIn = !IsTermInfo(SP_PARM); 36451 37986 + if (vis == cursor) { 36452 + result= cursor;37987 + code = cursor; 36453 37988 + } else { 36454 + switch (vis) { 36455 + case 2: 36456 + result = _nc_putp_flush("cursor_visible", cursor_visible); 36457 + break; 36458 + case 1: 36459 + result = _nc_putp_flush("cursor_normal", cursor_normal); 36460 + break; 36461 + case 0: 36462 + result = _nc_putp_flush("cursor_invisible", cursor_invisible); 36463 + break; 36464 + } 36465 + if (result != ERR) 36466 + result = (cursor == -1 ? 1 : cursor); 37989 + if (!bBuiltIn) { 37990 + switch (vis) { 37991 + case 2: 37992 + code = NCURSES_SP_NAME(_nc_putp_flush) (NCURSES_SP_ARGx 37993 + "cursor_visible", 37994 + cursor_visible); 37995 + break; 37996 + case 1: 37997 + code = NCURSES_SP_NAME(_nc_putp_flush) (NCURSES_SP_ARGx 37998 + "cursor_normal", 37999 + cursor_normal); 38000 + break; 38001 + case 0: 38002 + code = NCURSES_SP_NAME(_nc_putp_flush) (NCURSES_SP_ARGx 38003 + "cursor_invisible", 38004 + cursor_invisible); 38005 + break; 38006 + } 38007 + } else 38008 + code = ERR; 38009 + if (code != ERR) 38010 + code = (cursor == -1 ? 1 : cursor); 36467 38011 + SP_PARM->_cursor = vis; 36468 38012 + } 36469 38013 + } 36470 returnCode(result);38014 + returnCode(code); 36471 38015 } 36472 38016 … … 36475 38019 -typeahead(int fd) 36476 38020 +curs_set(int vis) 36477 +{ 38021 { 38022 - T((T_CALLED("typeahead(%d)"), fd)); 38023 - if (SP != 0) { 38024 - SP->_checkfd = fd; 36478 38025 + return (NCURSES_SP_NAME(curs_set) (CURRENT_SCREEN, vis)); 36479 38026 +} … … 36482 38029 +NCURSES_EXPORT(int) 36483 38030 +NCURSES_SP_NAME(typeahead) (NCURSES_SP_DCLx int fd) 36484 { 36485 T((T_CALLED("typeahead(%d)"), fd)); 36486 - if (SP != 0) { 36487 - SP->_checkfd = fd; 36488 + if (SP_PARM != 0) { 38031 +{ 38032 + T((T_CALLED("typeahead(%p, %d)"), SP_PARM, fd)); 38033 + if (IsValidTIScreen(SP_PARM)) { 36489 38034 + SP_PARM->_checkfd = fd; 36490 38035 returnCode(OK); … … 36505 38050 ** has_key() 36506 38051 ** 36507 @@ -190,11 +245,19 @@ 38052 @@ -189,42 +272,49 @@ 38053 || has_key_internal(keycode, tp->sibling)); 36508 38054 } 36509 38055 36510 NCURSES_EXPORT(int) 38056 +#ifdef USE_TERM_DRIVER 38057 +NCURSES_EXPORT(int) 38058 +TINFO_HAS_KEY(SCREEN *sp, int keycode) 38059 +{ 38060 + return IsValidTIScreen(sp) ? 38061 + has_key_internal(keycode, sp->_keytry) : 0; 38062 +} 38063 +#else 38064 +NCURSES_EXPORT(int) 36511 38065 +NCURSES_SP_NAME(has_key) (NCURSES_SP_DCLx int keycode) 36512 38066 +{ … … 36516 38070 + 36517 38071 +#if NCURSES_SP_FUNCS 36518 +NCURSES_EXPORT(int)38072 NCURSES_EXPORT(int) 36519 38073 has_key(int keycode) 36520 38074 { … … 36524 38078 } 36525 38079 +#endif 38080 +#endif 36526 38081 #endif /* NCURSES_EXT_FUNCS */ 36527 38082 36528 36529 @@ -202,29 +265,26 @@ 36530 36531 36532 38083 -/* 38084 - * Internal entrypoints use SCREEN* parameter to obtain capabilities rather 38085 - * than cur_term. 38086 - */ 38087 -#undef CUR 36533 38088 -#define CUR (sp->_term)->type. 36534 +#define CUR SP_TERMTYPE 36535 38089 - 36536 38090 -static int 36537 38091 -_nc_putp(const char *name GCC_UNUSED, const char *value) … … 36545 38099 - TPUTS_TRACE(name); 36546 38100 - rc = putp(value); 36547 + int rc = _nc_putp(name, value);38101 + int rc = NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx name, value); 36548 38102 + if (rc != ERR) { 36549 38103 + _nc_flush(); … … 36553 38107 36554 38108 -static int 36555 +#if NCURSES_SP_FUNCS38109 +#if 0 && NCURSES_SP_FUNCS 36556 38110 +NCURSES_EXPORT(int) 36557 38111 _nc_putp_flush(const char *name, const char *value) … … 36568 38122 /* Turn the keypad on/off 36569 38123 * 36570 @@ -245,12 +3 05,12 @@38124 @@ -245,12 +335,12 @@ 36571 38125 * has wgetch() reading in more than one thread. putp() and below 36572 38126 * may use SP explicitly. … … 36583 38137 rc = _nc_keypad(sp, flag); 36584 38138 _nc_set_screen(save_sp); 36585 @@ -276,45 +336,14 @@ 38139 @@ -258,10 +348,19 @@ 38140 } else 38141 #endif 38142 { 38143 +#ifdef USE_TERM_DRIVER 38144 + rc = CallDriver_1(sp, kpad, flag); 38145 + if (rc == OK) 38146 + sp->_keypad_on = flag; 38147 +#else 38148 if (flag) { 38149 - (void) _nc_putp_flush("keypad_xmit", keypad_xmit); 38150 + (void) NCURSES_SP_NAME(_nc_putp_flush) (NCURSES_SP_ARGx 38151 + "keypad_xmit", 38152 + keypad_xmit); 38153 } else if (!flag && keypad_local) { 38154 - (void) _nc_putp_flush("keypad_local", keypad_local); 38155 + (void) NCURSES_SP_NAME(_nc_putp_flush) (NCURSES_SP_ARGx 38156 + "keypad_local", 38157 + keypad_local); 38158 } 38159 38160 if (flag && !sp->_tried) { 38161 @@ -270,58 +369,8 @@ 38162 } 38163 sp->_keypad_on = flag; 38164 rc = OK; 38165 +#endif 38166 } 38167 } 38168 return (rc); 36586 38169 } 36587 36588 38170 - 38171 -static int 36589 38172 -_nc_curs_set(SCREEN *sp, int vis) 36590 38173 -{ … … 36618 38201 - 36619 38202 -static int 36620 36621 36622 36623 36624 36625 38203 -_nc_meta(SCREEN *sp, bool flag) 38204 -{ 38205 - int result = ERR; 38206 - 38207 - /* Ok, we stay relaxed and don't signal an error if win is NULL */ 38208 - 36626 38209 - if (SP != 0) { 36627 38210 - SP->_use_meta = flag; 36628 + if (sp != 0) { 36629 + sp->_use_meta = flag; 36630 36631 if (flag) { 36632 _nc_putp("meta_on", meta_on); 38211 - 38212 - if (flag) { 38213 - _nc_putp("meta_on", meta_on); 38214 - } else { 38215 - _nc_putp("meta_off", meta_off); 38216 - } 38217 - result = OK; 38218 - } 38219 - return result; 38220 -} 36633 38221 diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_print.c ncurses-5.7/ncurses/tinfo/lib_print.c 36634 38222 --- ncurses-5.7.orig/ncurses/tinfo/lib_print.c 2006-11-25 16:26:34.000000000 -0800 36635 +++ ncurses-5.7/ncurses/tinfo/lib_print.c 2009-0 7-19 15:04:06.000000000 -070038223 +++ ncurses-5.7/ncurses/tinfo/lib_print.c 2009-09-12 08:51:43.000000000 -0700 36636 38224 @@ -1,5 +1,5 @@ 36637 38225 /**************************************************************************** … … 36702 38290 diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_raw.c ncurses-5.7/ncurses/tinfo/lib_raw.c 36703 38291 --- ncurses-5.7.orig/ncurses/tinfo/lib_raw.c 2007-09-29 14:50:22.000000000 -0700 36704 +++ ncurses-5.7/ncurses/tinfo/lib_raw.c 2009-0 7-19 15:02:20.000000000 -070038292 +++ ncurses-5.7/ncurses/tinfo/lib_raw.c 2009-09-12 08:51:59.000000000 -0700 36705 38293 @@ -1,5 +1,5 @@ 36706 38294 /**************************************************************************** 36707 38295 - * Copyright (c) 1998-2002,2007 Free Software Foundation, Inc. * 36708 + * Copyright (c) 1998-200 7,2009 Free Software Foundation, Inc. *38296 + * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. * 36709 38297 * * 36710 38298 * Permission is hereby granted, free of charge, to any person obtaining a * … … 36720 38308 36721 38309 /* 36722 @@ -49,7 +50,7 @@ 38310 @@ -47,9 +48,8 @@ 38311 */ 38312 36723 38313 #include <curses.priv.h> 36724 38314 -#include <term.h> /* cur_term */ 36725 38315 36726 38316 -MODULE_ID("$Id: lib_raw.c,v 1.14 2007/09/29 21:50:22 tom Exp $") 36727 +MODULE_ID("$Id: lib_raw.c,v 1.1 5 2009/02/15 00:49:02 tom Exp $")38317 +MODULE_ID("$Id: lib_raw.c,v 1.17 2009/08/01 23:11:02 tom Exp $") 36728 38318 36729 38319 #if SVR4_TERMIO && !defined(_POSIX_SOURCE) 36730 38320 #define _POSIX_SOURCE 36731 @@ -61,7 +6 2,7 @@38321 @@ -61,7 +61,7 @@ 36732 38322 36733 38323 #ifdef __EMX__ … … 36738 38328 #define _nc_setmode(mode) /* nothing */ 36739 38329 #endif 36740 @@ -77,1 3 +78,13@@38330 @@ -77,19 +77,19 @@ 36741 38331 #endif /* TRACE */ 36742 38332 … … 36746 38336 { 36747 38337 int result = ERR; 36748 36749 T((T_CALLED("raw()"))); 36750 38338 + TERMINAL *termp; 38339 38340 - T((T_CALLED("raw()"))); 38341 - 36751 38342 - if (SP != 0 && cur_term != 0) { 36752 + if (SP_PARM != 0 && cur_term != 0) { 38343 + T((T_CALLED("raw(%p)"), SP_PARM)); 38344 + if ((termp = TerminalOf(SP_PARM)) != 0) { 36753 38345 TTY buf; 36754 38346 36755 38347 BEFORE("raw"); 36756 @@ -99,8 +100,8 @@ 38348 _nc_setmode(O_BINARY); 38349 38350 - buf = cur_term->Nttyb; 38351 + buf = termp->Nttyb; 38352 #ifdef TERMIOS 38353 buf.c_lflag &= ~(ICANON | ISIG | IEXTEN); 38354 buf.c_iflag &= ~(COOKED_INPUT); 38355 @@ -98,30 +98,39 @@ 38356 #else 36757 38357 buf.sg_flags |= RAW; 36758 38358 #endif 36759 38359 - if ((result = _nc_set_tty_mode(&buf)) == OK) { 36760 38360 - SP->_raw = TRUE; 36761 38361 - SP->_cbreak = 1; 38362 - cur_term->Nttyb = buf; 38363 + result = NCURSES_SP_NAME(_nc_set_tty_mode) (NCURSES_SP_ARGx &buf); 38364 + if (result == OK) { 36762 38365 + SP_PARM->_raw = TRUE; 36763 38366 + SP_PARM->_cbreak = 1; 36764 cur_term->Nttyb = buf;38367 + termp->Nttyb = buf; 36765 38368 } 36766 38369 AFTER("raw"); 36767 @@ -108,14 +109,22 @@ 38370 } 36768 38371 returnCode(result); 36769 38372 } … … 36773 38376 -cbreak(void) 36774 38377 +raw(void) 36775 +{ 38378 { 38379 - int result = ERR; 36776 38380 + return NCURSES_SP_NAME(raw) (CURRENT_SCREEN); 36777 38381 +} 36778 38382 +#endif 36779 + 38383 38384 - T((T_CALLED("cbreak()"))); 36780 38385 +NCURSES_EXPORT(int) 36781 38386 +NCURSES_SP_NAME(cbreak) (NCURSES_SP_DCL0) 36782 { 36783 int result = ERR; 36784 36785 T((T_CALLED("cbreak()"))); 38387 +{ 38388 + int result = ERR; 38389 + TERMINAL *termp; 36786 38390 36787 38391 - if (SP != 0 && cur_term != 0) { 36788 + if (SP_PARM != 0 && cur_term != 0) { 38392 + T((T_CALLED("cbreak(%p)"), SP_PARM)); 38393 + if ((termp = TerminalOf(SP_PARM)) != 0) { 36789 38394 TTY buf; 36790 38395 36791 38396 BEFORE("cbreak"); 36792 @@ -132,7 +141,7 @@ 38397 _nc_setmode(O_BINARY); 38398 38399 - buf = cur_term->Nttyb; 38400 + buf = termp->Nttyb; 38401 #ifdef TERMIOS 38402 buf.c_lflag &= ~ICANON; 38403 buf.c_iflag &= ~ICRNL; 38404 @@ -131,134 +140,172 @@ 38405 #else 36793 38406 buf.sg_flags |= CBREAK; 36794 38407 #endif 36795 38408 - if ((result = _nc_set_tty_mode(&buf)) == OK) { 36796 38409 - SP->_cbreak = 1; 38410 - cur_term->Nttyb = buf; 38411 + result = NCURSES_SP_NAME(_nc_set_tty_mode) (NCURSES_SP_ARGx &buf); 38412 + if (result == OK) { 36797 38413 + SP_PARM->_cbreak = 1; 36798 cur_term->Nttyb = buf;38414 + termp->Nttyb = buf; 36799 38415 } 36800 38416 AFTER("cbreak"); 36801 @@ -140,12 +149,20 @@ 38417 } 36802 38418 returnCode(result); 36803 38419 } … … 36820 38436 { 36821 38437 int result = ERR; 36822 36823 @@ -169,14 +186,22 @@ 38438 + TERMINAL *termp; 38439 38440 - T((T_CALLED("qiflush()"))); 38441 - 38442 - if (cur_term != 0) { 38443 + T((T_CALLED("qiflush(%p)"), SP_PARM)); 38444 + if ((termp = TerminalOf(SP_PARM)) != 0) { 38445 TTY buf; 38446 38447 BEFORE("qiflush"); 38448 - buf = cur_term->Nttyb; 38449 + buf = termp->Nttyb; 38450 #ifdef TERMIOS 38451 buf.c_lflag &= ~(NOFLSH); 38452 - result = _nc_set_tty_mode(&buf); 38453 + result = NCURSES_SP_NAME(_nc_set_tty_mode) (NCURSES_SP_ARGx &buf); 38454 #else 38455 /* FIXME */ 38456 #endif 38457 if (result == OK) 38458 - cur_term->Nttyb = buf; 38459 + termp->Nttyb = buf; 38460 AFTER("qiflush"); 38461 } 36824 38462 returnVoid; 36825 38463 } … … 36838 38476 { 36839 38477 int result = ERR; 36840 36841 T((T_CALLED("noraw()"))); 36842 38478 + TERMINAL *termp; 38479 38480 - T((T_CALLED("noraw()"))); 38481 - 36843 38482 - if (SP != 0 && cur_term != 0) { 36844 + if (SP_PARM != 0 && cur_term != 0) { 38483 + T((T_CALLED("noraw(%p)"), SP_PARM)); 38484 + if ((termp = TerminalOf(SP_PARM)) != 0) { 36845 38485 TTY buf; 36846 38486 36847 38487 BEFORE("noraw"); 36848 @@ -191,8 +216,8 @@ 38488 _nc_setmode(O_TEXT); 38489 38490 - buf = cur_term->Nttyb; 38491 + buf = termp->Nttyb; 38492 #ifdef TERMIOS 38493 buf.c_lflag |= ISIG | ICANON | 38494 - (cur_term->Ottyb.c_lflag & IEXTEN); 38495 + (termp->Ottyb.c_lflag & IEXTEN); 38496 buf.c_iflag |= COOKED_INPUT; 38497 #else 36849 38498 buf.sg_flags &= ~(RAW | CBREAK); 36850 38499 #endif 36851 38500 - if ((result = _nc_set_tty_mode(&buf)) == OK) { 36852 38501 - SP->_raw = FALSE; 36853 38502 - SP->_cbreak = 0; 38503 - cur_term->Nttyb = buf; 38504 + result = NCURSES_SP_NAME(_nc_set_tty_mode) (NCURSES_SP_ARGx &buf); 38505 + if (result == OK) { 36854 38506 + SP_PARM->_raw = FALSE; 36855 38507 + SP_PARM->_cbreak = 0; 36856 cur_term->Nttyb = buf;38508 + termp->Nttyb = buf; 36857 38509 } 36858 38510 AFTER("noraw"); 36859 @@ -200,14 +225,22 @@ 38511 } 36860 38512 returnCode(result); 36861 38513 } … … 36865 38517 -nocbreak(void) 36866 38518 +noraw(void) 36867 +{ 38519 { 38520 - int result = ERR; 36868 38521 + return NCURSES_SP_NAME(noraw) (CURRENT_SCREEN); 36869 38522 +} 36870 38523 +#endif 36871 + 38524 38525 - T((T_CALLED("nocbreak()"))); 36872 38526 +NCURSES_EXPORT(int) 36873 38527 +NCURSES_SP_NAME(nocbreak) (NCURSES_SP_DCL0) 36874 { 36875 int result = ERR; 36876 36877 T((T_CALLED("nocbreak()"))); 38528 +{ 38529 + int result = ERR; 38530 + TERMINAL *termp; 36878 38531 36879 38532 - if (SP != 0 && cur_term != 0) { 36880 + if (SP_PARM != 0 && cur_term != 0) { 38533 + T((T_CALLED("nocbreak(%p)"), SP_PARM)); 38534 + if ((termp = TerminalOf(SP_PARM)) != 0) { 36881 38535 TTY buf; 36882 38536 36883 38537 BEFORE("nocbreak"); 36884 @@ -221,7 +254,7 @@ 38538 _nc_setmode(O_TEXT); 38539 38540 - buf = cur_term->Nttyb; 38541 + buf = termp->Nttyb; 38542 #ifdef TERMIOS 38543 buf.c_lflag |= ICANON; 38544 buf.c_iflag |= ICRNL; 38545 #else 36885 38546 buf.sg_flags &= ~CBREAK; 36886 38547 #endif 36887 38548 - if ((result = _nc_set_tty_mode(&buf)) == OK) { 36888 38549 - SP->_cbreak = 0; 38550 - cur_term->Nttyb = buf; 38551 + result = NCURSES_SP_NAME(_nc_set_tty_mode) (NCURSES_SP_ARGx &buf); 38552 + if (result == OK) { 36889 38553 + SP_PARM->_cbreak = 0; 36890 cur_term->Nttyb = buf;38554 + termp->Nttyb = buf; 36891 38555 } 36892 38556 AFTER("nocbreak"); 36893 @@ -229,12 +262,20 @@ 38557 } 36894 38558 returnCode(result); 36895 38559 } 36896 38560 38561 -/* 38562 - * Note: 38563 - * this implementation may be wrong. See the comment under intrflush(). 38564 - */ 36897 38565 +#if NCURSES_SP_FUNCS 36898 38566 +NCURSES_EXPORT(int) … … 36903 38571 +#endif 36904 38572 + 36905 /*36906 * Note:36907 * this implementation may be wrong. See the comment under intrflush().36908 */36909 38573 NCURSES_EXPORT(void) 36910 38574 -noqiflush(void) … … 36912 38576 { 36913 38577 int result = ERR; 36914 36915 @@ -259,6 +300,14 @@ 38578 + TERMINAL *termp; 38579 38580 - T((T_CALLED("noqiflush()"))); 38581 - 38582 - if (cur_term != 0) { 38583 + T((T_CALLED("noqiflush(%p)"), SP_PARM)); 38584 + if ((termp = TerminalOf(SP_PARM)) != 0) { 38585 TTY buf; 38586 38587 BEFORE("noqiflush"); 38588 - buf = cur_term->Nttyb; 38589 + buf = termp->Nttyb; 38590 #ifdef TERMIOS 38591 buf.c_lflag |= NOFLSH; 38592 - result = _nc_set_tty_mode(&buf); 38593 + result = NCURSES_SP_NAME(_nc_set_tty_mode) (NCURSES_SP_ARGx &buf); 38594 #else 38595 /* FIXME */ 38596 #endif 38597 - if (result == OK) { 38598 - cur_term->Nttyb = buf; 38599 - } 38600 + if (result == OK) 38601 + termp->Nttyb = buf; 38602 AFTER("noqiflush"); 38603 } 36916 38604 returnVoid; 36917 38605 } … … 36928 38616 * This call does the same thing as the qiflush()/noqiflush() pair. We know 36929 38617 * for certain that SVr3 intrflush() tweaks the NOFLSH bit; on the other hand, 36930 @@ -267, 7 +316,7@@38618 @@ -267,30 +314,41 @@ 36931 38619 * curs_inopts(3x) is too exact to be coincidence. 36932 38620 */ … … 36936 38624 { 36937 38625 int result = ERR; 36938 36939 @@ -294,3 +343,11 @@ 38626 + TERMINAL *termp; 38627 38628 - T((T_CALLED("intrflush(%d)"), flag)); 38629 + T((T_CALLED("intrflush(%p,%d)"), SP_PARM, flag)); 38630 + if (SP_PARM == 0) 38631 + returnCode(ERR); 38632 38633 - if (cur_term != 0) { 38634 + if ((termp = TerminalOf(SP_PARM)) != 0) { 38635 TTY buf; 38636 38637 BEFORE("intrflush"); 38638 - buf = cur_term->Nttyb; 38639 + buf = termp->Nttyb; 38640 #ifdef TERMIOS 38641 if (flag) 38642 buf.c_lflag &= ~(NOFLSH); 38643 else 38644 buf.c_lflag |= (NOFLSH); 38645 - result = _nc_set_tty_mode(&buf); 38646 + result = NCURSES_SP_NAME(_nc_set_tty_mode) (NCURSES_SP_ARGx &buf); 38647 #else 38648 /* FIXME */ 38649 #endif 38650 if (result == OK) { 38651 - cur_term->Nttyb = buf; 38652 + termp->Nttyb = buf; 38653 } 38654 AFTER("intrflush"); 36940 38655 } 36941 38656 returnCode(result); … … 36951 38666 diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_setup.c ncurses-5.7/ncurses/tinfo/lib_setup.c 36952 38667 --- ncurses-5.7.orig/ncurses/tinfo/lib_setup.c 2008-08-03 15:42:33.000000000 -0700 36953 +++ ncurses-5.7/ncurses/tinfo/lib_setup.c 2009-0 7-19 15:04:06.000000000 -070038668 +++ ncurses-5.7/ncurses/tinfo/lib_setup.c 2009-09-12 08:52:09.000000000 -0700 36954 38669 @@ -1,5 +1,5 @@ 36955 38670 /**************************************************************************** … … 36967 38682 36968 38683 /* 36969 @@ -53,7 +54,7 @@ 36970 36971 #include <term.h> /* lines, columns, cur_term */ 36972 38684 @@ -51,9 +52,7 @@ 38685 #include <locale.h> 38686 #endif 38687 38688 -#include <term.h> /* lines, columns, cur_term */ 38689 - 36973 38690 -MODULE_ID("$Id: lib_setup.c,v 1.111 2008/08/03 22:42:33 tom Exp $") 36974 +MODULE_ID("$Id: lib_setup.c,v 1.11 7 2009/06/06 17:56:31tom Exp $")38691 +MODULE_ID("$Id: lib_setup.c,v 1.119 2009/09/05 20:10:02 tom Exp $") 36975 38692 36976 38693 /**************************************************************************** 36977 38694 * 36978 @@ -116,54 +117,68 @@ 36979 return cur_term ? cur_term->type.term_names : empty; 38695 @@ -109,61 +108,96 @@ 38696 * Wrap global variables in this module. 38697 */ 38698 #if USE_REENTRANT 38699 + 38700 NCURSES_EXPORT(char *) 38701 NCURSES_PUBLIC_VAR(ttytype) (void) 38702 { 38703 static char empty[] = ""; 38704 - return cur_term ? cur_term->type.term_names : empty; 38705 + char *result = empty; 38706 + 38707 +#if NCURSES_SP_FUNCS 38708 + if (CURRENT_SCREEN) { 38709 + TERMINAL *termp = TerminalOf(CURRENT_SCREEN); 38710 + if (termp != 0) { 38711 + result = termp->type.term_names; 38712 + } 38713 + } 38714 +#else 38715 + if (cur_term != 0) { 38716 + result = cur_term->type.term_names; 38717 + } 38718 +#endif 38719 + return result; 36980 38720 } 38721 + 36981 38722 NCURSES_EXPORT(int *) 36982 38723 -_nc_ptr_Lines(void) … … 36986 38727 + return ptrLines(sp); 36987 38728 } 38729 + 36988 38730 NCURSES_EXPORT(int) 36989 38731 NCURSES_PUBLIC_VAR(LINES) (void) … … 36992 38734 + return *_nc_ptr_Lines(CURRENT_SCREEN); 36993 38735 } 38736 + 36994 38737 NCURSES_EXPORT(int *) 36995 38738 -_nc_ptr_Cols(void) … … 36999 38742 + return ptrCols(sp); 37000 38743 } 38744 + 37001 38745 NCURSES_EXPORT(int) 37002 38746 NCURSES_PUBLIC_VAR(COLS) (void) … … 37005 38749 + return *_nc_ptr_Cols(CURRENT_SCREEN); 37006 38750 +} 38751 + 37007 38752 +NCURSES_EXPORT(int *) 37008 38753 +_nc_ptr_Tabsize(SCREEN *sp) … … 37010 38755 + return ptrTabsize(sp); 37011 38756 } 38757 + 37012 38758 NCURSES_EXPORT(int) 37013 38759 NCURSES_PUBLIC_VAR(TABSIZE) (void) … … 37056 38802 #if USE_SIGWINCH 37057 38803 /* 37058 @@ -188,1 3 +203,25@@38804 @@ -188,17 +222,56 @@ 37059 38805 #endif 37060 38806 37061 38807 NCURSES_EXPORT(void) 37062 -use_env(bool f)37063 38808 +NCURSES_SP_NAME(use_env) (NCURSES_SP_DCLx bool f) 37064 37065 T((T_CALLED("use_env()")));37066 - _nc_prescreen.use_env = f; 38809 +{ 38810 + T((T_CALLED("use_env(%p,%d)"), SP_PARM, (int) f)); 38811 +#if NCURSES_SP_FUNCS 37067 38812 + if (IsPreScreen(SP_PARM)) { 37068 38813 + SP_PARM->_use_env = f; 37069 + } else {37070 + _nc_prescreen.use_env = f;37071 38814 + } 38815 +#else 38816 + _nc_prescreen.use_env = f; 38817 +#endif 38818 + returnVoid; 38819 +} 38820 + 38821 +#if NCURSES_SP_FUNCS 38822 +NCURSES_EXPORT(void) 38823 use_env(bool f) 38824 { 38825 - T((T_CALLED("use_env()"))); 38826 + T((T_CALLED("use_env(%d)"), (int) f)); 38827 _nc_prescreen.use_env = f; 37072 38828 returnVoid; 37073 38829 } 37074 37075 +#if NCURSES_SP_FUNCS37076 +NCURSES_EXPORT(void)37077 +use_env(bool f)37078 +{37079 + NCURSES_SP_NAME(use_env) (CURRENT_SCREEN, f);37080 +}37081 38830 +#endif 37082 + 38831 37083 38832 NCURSES_EXPORT(void) 37084 _nc_get_screensize(SCREEN *sp, int *linep, int *colp) 38833 -_nc_get_screensize(SCREEN *sp, int *linep, int *colp) 38834 +_nc_get_screensize(SCREEN *sp, 38835 +#ifdef USE_TERM_DRIVER 38836 + TERMINAL * termp, 38837 +#endif 38838 + int *linep, int *colp) 37085 38839 /* Obtain lines/columns values from the environment and/or terminfo entry */ 37086 @@ -320,7 +347,7 @@ 38840 { 38841 +#ifdef USE_TERM_DRIVER 38842 + TERMINAL_CONTROL_BLOCK *TCB; 38843 + int my_tabsize; 38844 + 38845 + assert(termp != 0 && linep != 0 && colp != 0); 38846 + TCB = (TERMINAL_CONTROL_BLOCK *) termp; 38847 + 38848 + my_tabsize = TCB->info.tabsize; 38849 + TCB->drv->size(TCB, linep, colp); 38850 + 38851 +#if USE_REENTRANT 38852 + if (sp != 0) { 38853 + sp->_TABSIZE = my_tabsize; 38854 + } 38855 +#else 38856 + TABSIZE = my_tabsize; 38857 +#endif 38858 + T(("TABSIZE = %d", my_tabsize)); 38859 +#else /* !USE_TERM_DRIVER */ 38860 TERMINAL *termp = cur_term; 38861 int my_tabsize; 38862 38863 @@ -298,19 +371,31 @@ 38864 TABSIZE = my_tabsize; 38865 #endif 38866 T(("TABSIZE = %d", TABSIZE)); 38867 +#endif /* USE_TERM_DRIVER */ 38868 } 38869 38870 #if USE_SIZECHANGE 38871 NCURSES_EXPORT(void) 38872 _nc_update_screensize(SCREEN *sp) 38873 { 38874 + int new_lines; 38875 + int new_cols; 38876 + 38877 +#ifdef USE_TERM_DRIVER 38878 + int old_lines; 38879 + int old_cols; 38880 + 38881 + assert(sp != 0); 38882 + 38883 + CallDriver_2(sp, getsize, &old_lines, &old_cols); 38884 + 38885 +#else 38886 TERMINAL *termp = cur_term; 38887 int old_lines = lines; 38888 - int new_lines; 38889 int old_cols = columns; 38890 - int new_cols; 38891 +#endif 38892 38893 - _nc_get_screensize(sp, &new_lines, &new_cols); 38894 + TINFO_GET_SIZE(sp, sp->_term, &new_lines, &new_cols); 38895 38896 /* 38897 * See is_term_resized() and resizeterm(). 38898 @@ -320,7 +405,7 @@ 37087 38899 if (sp != 0 37088 38900 && sp->_resize != 0) { … … 37093 38905 } 37094 38906 } 37095 @@ -604,7 +631,7 @@ 38907 @@ -348,6 +433,7 @@ 38908 exit(EXIT_FAILURE);\ 38909 } 38910 38911 +#ifndef USE_TERM_DRIVER 38912 #if USE_DATABASE || USE_TERMCAP 38913 /* 38914 * Return 1 if entry found, 0 if not found, -1 if database not accessible, 38915 @@ -407,6 +493,7 @@ 38916 } 38917 } 38918 } 38919 +#endif /* !USE_TERM_DRIVER */ 38920 38921 /* 38922 * Find the locale which is in effect. 38923 @@ -486,18 +573,37 @@ 38924 return 0; 38925 } 38926 38927 -/* 38928 - * This entrypoint is called from tgetent() to allow a special case of reusing 38929 - * the same TERMINAL data (see comment). 38930 - */ 38931 NCURSES_EXPORT(int) 38932 -_nc_setupterm(NCURSES_CONST char *tname, int Filedes, int *errret, bool reuse) 38933 +TINFO_SETUP_TERM(TERMINAL ** tp, 38934 + NCURSES_CONST char *tname, 38935 + int Filedes, 38936 + int *errret, 38937 + bool reuse) 38938 { 38939 - TERMINAL *termp; 38940 +#ifdef USE_TERM_DRIVER 38941 + TERMINAL_CONTROL_BLOCK *TCB = 0; 38942 +#else 38943 int status; 38944 +#endif 38945 + TERMINAL *termp; 38946 + SCREEN *sp = 0; 38947 + int code = ERR; 38948 38949 START_TRACE(); 38950 + 38951 +#ifdef USE_TERM_DRIVER 38952 + T((T_CALLED("_nc_setupterm_ex(%p,%s,%d,%p)"), 38953 + tp, _nc_visbuf(tname), Filedes, errret)); 38954 + 38955 + if (tp == 0) { 38956 + ret_error0(TGETENT_ERR, 38957 + "Invalid parameter, internal error.\n"); 38958 + } else 38959 + termp = *tp; 38960 +#else 38961 + termp = cur_term; 38962 T((T_CALLED("setupterm(%s,%d,%p)"), _nc_visbuf(tname), Filedes, errret)); 38963 +#endif 38964 38965 if (tname == 0) { 38966 tname = getenv("TERM"); 38967 @@ -538,20 +644,34 @@ 38968 * properly with this feature). 38969 */ 38970 if (reuse 38971 - && (termp = cur_term) != 0 38972 + && (termp != 0) 38973 && termp->Filedes == Filedes 38974 && termp->_termname != 0 38975 && !strcmp(termp->_termname, tname) 38976 && _nc_name_match(termp->type.term_names, tname, "|")) { 38977 T(("reusing existing terminal information and mode-settings")); 38978 + code = OK; 38979 } else { 38980 - 38981 +#ifdef USE_TERM_DRIVER 38982 + termp = (TERMINAL *) typeCalloc(TERMINAL_CONTROL_BLOCK, 1); 38983 +#else 38984 termp = typeCalloc(TERMINAL, 1); 38985 - 38986 +#endif 38987 if (termp == 0) { 38988 ret_error0(TGETENT_ERR, 38989 "Not enough memory to create terminal structure.\n"); 38990 } 38991 +#ifdef USE_TERM_DRIVER 38992 + TCB = (TERMINAL_CONTROL_BLOCK *) termp; 38993 + code = _nc_get_driver(TCB, tname, errret); 38994 + if (code == OK) { 38995 + termp->Filedes = Filedes; 38996 + termp->_termname = strdup(tname); 38997 + } else { 38998 + ret_error0(TGETENT_ERR, 38999 + "Could not find any driver to handle this terminal.\n"); 39000 + } 39001 +#else 39002 #if USE_DATABASE || USE_TERMCAP 39003 status = grab_entry(tname, &termp->type); 39004 #else 39005 @@ -599,25 +719,57 @@ 39006 def_prog_mode(); 39007 baudrate(); 39008 } 39009 + code = OK; 39010 +#endif 39011 } 39012 39013 +#ifdef USE_TERM_DRIVER 39014 + *tp = termp; 39015 + NCURSES_SP_NAME(set_curterm) (sp, termp); 39016 + TCB->drv->init(TCB); 39017 +#else 39018 + sp = SP; 39019 +#endif 39020 + 37096 39021 /* 37097 39022 * We should always check the screensize, just in case. 37098 39023 */ 37099 39024 - _nc_get_screensize(SP, ptrLines(), ptrCols()); 37100 + _nc_get_screensize(SP, ptrLines(SP), ptrCols(SP));39025 + TINFO_GET_SIZE(sp, termp, ptrLines(sp), ptrCols(sp)); 37101 39026 37102 39027 if (errret) 37103 39028 *errret = TGETENT_YES; 39029 39030 +#ifndef USE_TERM_DRIVER 39031 if (generic_type) { 39032 ret_error(TGETENT_NO, "'%s': I need something more specific.\n", tname); 39033 } 39034 if (hard_copy) { 39035 ret_error(TGETENT_YES, "'%s': I can't handle hardcopy terminals.\n", tname); 39036 } 39037 - returnCode(OK); 39038 +#endif 39039 + returnCode(code); 39040 } 39041 39042 +#ifdef USE_TERM_DRIVER 39043 +/* 39044 + * This entrypoint is called from tgetent() to allow a special case of reusing 39045 + * the same TERMINAL data (see comment). 39046 + */ 39047 +NCURSES_EXPORT(int) 39048 +_nc_setupterm(NCURSES_CONST char *tname, 39049 + int Filedes, 39050 + int *errret, 39051 + bool reuse) 39052 +{ 39053 + int res; 39054 + TERMINAL *termp; 39055 + res = TINFO_SETUP_TERM(&termp, tname, Filedes, errret, reuse); 39056 + if (ERR != res) 39057 + NCURSES_SP_NAME(set_curterm) (CURRENT_SCREEN_PRE, termp); 39058 + return res; 39059 +} 39060 +#endif 39061 + 39062 /* 39063 * setupterm(termname, Filedes, errret) 39064 * 37104 39065 diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_termcap.c ncurses-5.7/ncurses/tinfo/lib_termcap.c 37105 39066 --- ncurses-5.7.orig/ncurses/tinfo/lib_termcap.c 2008-08-16 12:22:55.000000000 -0700 37106 +++ ncurses-5.7/ncurses/tinfo/lib_termcap.c 2009-0 7-19 15:04:15.000000000 -070039067 +++ ncurses-5.7/ncurses/tinfo/lib_termcap.c 2009-09-12 08:52:09.000000000 -0700 37107 39068 @@ -1,5 +1,5 @@ 37108 39069 /**************************************************************************** … … 37129 39090 +#endif 37130 39091 + 37131 +MODULE_ID("$Id: lib_termcap.c,v 1. 69 2009/07/11 18:14:21tom Exp $")39092 +MODULE_ID("$Id: lib_termcap.c,v 1.70 2009/08/30 17:16:00 tom Exp $") 37132 39093 37133 39094 NCURSES_EXPORT_VAR(char *) UP = 0; 37134 39095 NCURSES_EXPORT_VAR(char *) BC = 0; 37135 @@ -76,16 +81,2 8@@39096 @@ -76,16 +81,26 @@ 37136 39097 ***************************************************************************/ 37137 39098 … … 37151 39112 T((T_CALLED("tgetent()"))); 37152 39113 39114 - _nc_setupterm((NCURSES_CONST char *) name, STDOUT_FILENO, &errcode, TRUE); 39115 + TINFO_SETUP_TERM(&termp, (NCURSES_CONST char *) name, 39116 + STDOUT_FILENO, &errcode, TRUE); 39117 + 37153 39118 +#ifdef USE_TERM_DRIVER 37154 + _nc_setupterm_ex(&termp, (NCURSES_CONST char *) name,37155 + STDOUT_FILENO, &errcode, TRUE);37156 +37157 39119 + if (termp == 0 || 37158 39120 + !((TERMINAL_CONTROL_BLOCK *) termp)->drv->isTerminfo) 37159 39121 + return (errcode); 37160 +#else37161 _nc_setupterm((NCURSES_CONST char *) name, STDOUT_FILENO, &errcode, TRUE);37162 39122 +#endif 37163 39123 37164 39124 /* 37165 39125 * In general we cannot tell if the fixed sgr0 is still used by the 37166 @@ -109,9 +12 6,9 @@39126 @@ -109,9 +124,9 @@ 37167 39127 /* 37168 39128 * Also free the terminfo data that we loaded (much bigger leak). … … 37176 39136 if (LAST_TRM == trm) 37177 39137 LAST_TRM = 0; 37178 @@ -131,7 +14 8,7 @@39138 @@ -131,7 +146,7 @@ 37179 39139 } 37180 39140 CacheInx = best; … … 37185 39145 37186 39146 PC = 0; 37187 @@ -153,7 +1 70,7 @@39147 @@ -153,7 +168,7 @@ 37188 39148 if (backspace_if_not_bs != NULL) 37189 39149 BC = backspace_if_not_bs; … … 37194 39154 if (FIX_SGR0 != exit_attribute_mode) { 37195 39155 free(FIX_SGR0); 37196 @@ -164,8 +1 81,8 @@39156 @@ -164,8 +179,8 @@ 37197 39157 LAST_BUF = bufp; 37198 39158 LAST_USE = TRUE; … … 37205 39165 /* LINT_PREPRO 37206 39166 #if 0*/ 37207 @@ -177,6 +19 4,25 @@39167 @@ -177,6 +192,25 @@ 37208 39168 returnCode(errcode); 37209 39169 } … … 37231 39191 * 37232 39192 * tgetflag(str) 37233 @@ -187,2 3 +223,47@@39193 @@ -187,24 +221,48 @@ 37234 39194 ***************************************************************************/ 37235 39195 … … 37278 39238 - returnCode(0); /* Solaris does this */ 37279 39239 + returnCode(result); 37280 +}37281 + 39240 } 39241 37282 39242 +#if NCURSES_SP_FUNCS 37283 39243 +NCURSES_EXPORT(int) … … 37285 39245 +{ 37286 39246 + return NCURSES_SP_NAME(tgetflag) (CURRENT_SCREEN, id); 37287 39247 +} 37288 39248 +#endif 37289 39249 + 37290 39250 /*************************************************************************** 37291 39251 * 37292 @@ -215,25 +275,48 @@ 39252 * tgetnum(str) 39253 @@ -215,25 +273,48 @@ 37293 39254 ***************************************************************************/ 37294 39255 … … 37351 39312 * 37352 39313 * tgetstr(str, area) 37353 @@ -244,40 +32 7,62 @@39314 @@ -244,40 +325,62 @@ 37354 39315 ***************************************************************************/ 37355 39316 … … 37439 39400 diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_termname.c ncurses-5.7/ncurses/tinfo/lib_termname.c 37440 39401 --- ncurses-5.7.orig/ncurses/tinfo/lib_termname.c 2003-12-27 10:23:01.000000000 -0800 37441 +++ ncurses-5.7/ncurses/tinfo/lib_termname.c 2009-0 7-19 15:02:22.000000000 -070039402 +++ ncurses-5.7/ncurses/tinfo/lib_termname.c 2009-09-12 08:51:17.000000000 -0700 37442 39403 @@ -1,5 +1,5 @@ 37443 39404 /**************************************************************************** … … 37484 39445 diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_ti.c ncurses-5.7/ncurses/tinfo/lib_ti.c 37485 39446 --- ncurses-5.7.orig/ncurses/tinfo/lib_ti.c 2003-05-24 14:10:28.000000000 -0700 37486 +++ ncurses-5.7/ncurses/tinfo/lib_ti.c 2009-0 7-19 15:04:15.000000000 -070039447 +++ ncurses-5.7/ncurses/tinfo/lib_ti.c 2009-09-12 08:51:57.000000000 -0700 37487 39448 @@ -1,5 +1,5 @@ 37488 39449 /**************************************************************************** … … 37500 39461 37501 39462 #include <curses.priv.h> 37502 @@ -36,68 +37,15 0@@39463 @@ -36,68 +37,152 @@ 37503 39464 #include <term_entry.h> 37504 39465 #include <tic.h> 37505 39466 37506 39467 -MODULE_ID("$Id: lib_ti.c,v 1.23 2003/05/24 21:10:28 tom Exp $") 37507 +MODULE_ID("$Id: lib_ti.c,v 1.2 6 2009/07/11 18:14:21tom Exp $")39468 +MODULE_ID("$Id: lib_ti.c,v 1.27 2009/07/28 22:03:36 tom Exp $") 37508 39469 + 37509 39470 +#if 0 … … 37570 39531 -tigetnum(NCURSES_CONST char *str) 37571 39532 +tigetflag(NCURSES_CONST char *str) 37572 +{ 39533 { 39534 - unsigned i; 37573 39535 + return NCURSES_SP_NAME(tigetflag) (CURRENT_SCREEN, str); 37574 39536 +} 37575 39537 +#endif 37576 + 39538 39539 - T((T_CALLED("tigetnum(%s)"), str)); 37577 39540 +NCURSES_EXPORT(int) 37578 39541 +NCURSES_SP_NAME(tigetnum) (NCURSES_SP_DCLx NCURSES_CONST char *str) 37579 { 37580 - unsigned i; 39542 +{ 37581 39543 + int i, j; 37582 39544 + int result = CANCELLED_NUMERIC; /* Solaris returns a -1 on error */ 37583 37584 - T((T_CALLED("tigetnum(%s)"), str));37585 + T((T_CALLED("tigetnum(%p, %s)"), SP_PARM, str));37586 39545 37587 39546 - if (cur_term != 0) { … … 37593 39552 - returnCode(ABSENT_NUMERIC); 37594 39553 - returnCode(tp->Numbers[i]); 39554 + T((T_CALLED("tigetnum(%p, %s)"), SP_PARM, str)); 39555 + 37595 39556 + if (HasTInfoTerminal(SP_PARM)) { 37596 39557 + TERMTYPE *tp = &(TerminalOf(SP_PARM)->type); … … 37613 39574 } 37614 39575 +#endif 37615 + if (j >= 0 && VALID_NUMERIC(tp->Numbers[j])) 37616 + result = tp->Numbers[j]; 37617 + else 37618 + result = ABSENT_NUMERIC; 39576 + if (j >= 0) { 39577 + if (VALID_NUMERIC(tp->Numbers[j])) 39578 + result = tp->Numbers[j]; 39579 + else 39580 + result = ABSENT_NUMERIC; 39581 + } 37619 39582 } 37620 39583 … … 37688 39651 diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_tparm.c ncurses-5.7/ncurses/tinfo/lib_tparm.c 37689 39652 --- ncurses-5.7.orig/ncurses/tinfo/lib_tparm.c 2008-08-16 12:22:55.000000000 -0700 37690 +++ ncurses-5.7/ncurses/tinfo/lib_tparm.c 2009-0 7-19 15:02:22.000000000 -070039653 +++ ncurses-5.7/ncurses/tinfo/lib_tparm.c 2009-09-12 08:51:17.000000000 -0700 37691 39654 @@ -40,10 +40,9 @@ 37692 39655 #include <curses.priv.h> … … 37703 39666 diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_tputs.c ncurses-5.7/ncurses/tinfo/lib_tputs.c 37704 39667 --- ncurses-5.7.orig/ncurses/tinfo/lib_tputs.c 2008-06-28 06:12:15.000000000 -0700 37705 +++ ncurses-5.7/ncurses/tinfo/lib_tputs.c 2009-0 7-19 15:04:07.000000000 -070039668 +++ ncurses-5.7/ncurses/tinfo/lib_tputs.c 2009-09-12 08:51:45.000000000 -0700 37706 39669 @@ -1,5 +1,5 @@ 37707 39670 /**************************************************************************** … … 37984 39947 diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_ttyflags.c ncurses-5.7/ncurses/tinfo/lib_ttyflags.c 37985 39948 --- ncurses-5.7.orig/ncurses/tinfo/lib_ttyflags.c 2008-08-03 15:10:44.000000000 -0700 37986 +++ ncurses-5.7/ncurses/tinfo/lib_ttyflags.c 2009-0 7-19 15:04:06.000000000 -070039949 +++ ncurses-5.7/ncurses/tinfo/lib_ttyflags.c 2009-09-12 08:51:43.000000000 -0700 37987 39950 @@ -1,5 +1,5 @@ 37988 39951 /**************************************************************************** … … 38323 40286 } 38324 40287 +#endif 40288 diff -Naur ncurses-5.7.orig/ncurses/tinfo/make_hash.c ncurses-5.7/ncurses/tinfo/make_hash.c 40289 --- ncurses-5.7.orig/ncurses/tinfo/make_hash.c 1969-12-31 16:00:00.000000000 -0800 40290 +++ ncurses-5.7/ncurses/tinfo/make_hash.c 2009-09-12 08:52:02.000000000 -0700 40291 @@ -0,0 +1,294 @@ 40292 +/**************************************************************************** 40293 + * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. * 40294 + * * 40295 + * Permission is hereby granted, free of charge, to any person obtaining a * 40296 + * copy of this software and associated documentation files (the * 40297 + * "Software"), to deal in the Software without restriction, including * 40298 + * without limitation the rights to use, copy, modify, merge, publish, * 40299 + * distribute, distribute with modifications, sublicense, and/or sell * 40300 + * copies of the Software, and to permit persons to whom the Software is * 40301 + * furnished to do so, subject to the following conditions: * 40302 + * * 40303 + * The above copyright notice and this permission notice shall be included * 40304 + * in all copies or substantial portions of the Software. * 40305 + * * 40306 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * 40307 + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * 40308 + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * 40309 + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * 40310 + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * 40311 + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * 40312 + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * 40313 + * * 40314 + * Except as contained in this notice, the name(s) of the above copyright * 40315 + * holders shall not be used in advertising or otherwise to promote the * 40316 + * sale, use or other dealings in this Software without prior written * 40317 + * authorization. * 40318 + ****************************************************************************/ 40319 + 40320 +/**************************************************************************** 40321 + * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 * 40322 + * and: Eric S. Raymond <esr@snark.thyrsus.com> * 40323 + * and: Thomas E. Dickey 1996-on * 40324 + ****************************************************************************/ 40325 + 40326 +/* 40327 + * make_hash.c --- build-time program for constructing comp_captab.c 40328 + * 40329 + */ 40330 + 40331 +#include <curses.priv.h> 40332 + 40333 +#include <tic.h> 40334 +#include <hashsize.h> 40335 + 40336 +#include <ctype.h> 40337 + 40338 +MODULE_ID("$Id: make_hash.c,v 1.2 2009/08/08 17:42:41 tom Exp $") 40339 + 40340 +/* 40341 + * _nc_make_hash_table() 40342 + * 40343 + * Takes the entries in table[] and hashes them into hash_table[] 40344 + * by name. There are CAPTABSIZE entries in table[] and HASHTABSIZE 40345 + * slots in hash_table[]. 40346 + * 40347 + */ 40348 + 40349 +#undef MODULE_ID 40350 +#define MODULE_ID(id) /*nothing */ 40351 +#include <tinfo/doalloc.c> 40352 + 40353 +/* 40354 + * int hash_function(string) 40355 + * 40356 + * Computes the hashing function on the given string. 40357 + * 40358 + * The current hash function is the sum of each consectutive pair 40359 + * of characters, taken as two-byte integers, mod HASHTABSIZE. 40360 + * 40361 + */ 40362 + 40363 +static int 40364 +hash_function(const char *string) 40365 +{ 40366 + long sum = 0; 40367 + 40368 + while (*string) { 40369 + sum += (long) (*string + (*(string + 1) << 8)); 40370 + string++; 40371 + } 40372 + 40373 + return (int) (sum % HASHTABSIZE); 40374 +} 40375 + 40376 +static void 40377 +_nc_make_hash_table(struct name_table_entry *table, 40378 + HashValue * hash_table) 40379 +{ 40380 + short i; 40381 + int hashvalue; 40382 + int collisions = 0; 40383 + 40384 + for (i = 0; i < HASHTABSIZE; i++) { 40385 + hash_table[i] = -1; 40386 + } 40387 + for (i = 0; i < CAPTABSIZE; i++) { 40388 + hashvalue = hash_function(table[i].nte_name); 40389 + 40390 + if (hash_table[hashvalue] >= 0) 40391 + collisions++; 40392 + 40393 + if (hash_table[hashvalue] != 0) 40394 + table[i].nte_link = hash_table[hashvalue]; 40395 + hash_table[hashvalue] = i; 40396 + } 40397 + 40398 + printf("/* %d collisions out of %d entries */\n", collisions, CAPTABSIZE); 40399 +} 40400 + 40401 +/* 40402 + * This filter reads from standard input a list of tab-delimited columns, 40403 + * (e.g., from Caps.filtered) computes the hash-value of a specified column and 40404 + * writes the hashed tables to standard output. 40405 + * 40406 + * By compiling the hash table at build time, we're able to make the entire 40407 + * set of terminfo and termcap tables readonly (and also provide some runtime 40408 + * performance enhancement). 40409 + */ 40410 + 40411 +#define MAX_COLUMNS BUFSIZ /* this _has_ to be worst-case */ 40412 + 40413 +static char ** 40414 +parse_columns(char *buffer) 40415 +{ 40416 + static char **list; 40417 + 40418 + int col = 0; 40419 + 40420 + if (list == 0 && (list = typeCalloc(char *, MAX_COLUMNS)) == 0) 40421 + return (0); 40422 + 40423 + if (*buffer != '#') { 40424 + while (*buffer != '\0') { 40425 + char *s; 40426 + for (s = buffer; (*s != '\0') && !isspace(UChar(*s)); s++) 40427 + /*EMPTY */ ; 40428 + if (s != buffer) { 40429 + char mark = *s; 40430 + *s = '\0'; 40431 + if ((s - buffer) > 1 40432 + && (*buffer == '"') 40433 + && (s[-1] == '"')) { /* strip the quotes */ 40434 + assert(s > buffer + 1); 40435 + s[-1] = '\0'; 40436 + buffer++; 40437 + } 40438 + list[col] = buffer; 40439 + col++; 40440 + if (mark == '\0') 40441 + break; 40442 + while (*++s && isspace(UChar(*s))) 40443 + /*EMPTY */ ; 40444 + buffer = s; 40445 + } else 40446 + break; 40447 + } 40448 + } 40449 + return col ? list : 0; 40450 +} 40451 + 40452 +int 40453 +main(int argc, char **argv) 40454 +{ 40455 + struct name_table_entry *name_table = typeCalloc(struct 40456 + name_table_entry, CAPTABSIZE); 40457 + HashValue *hash_table = typeCalloc(HashValue, HASHTABSIZE); 40458 + const char *root_name = ""; 40459 + int column = 0; 40460 + int bigstring = 0; 40461 + int n; 40462 + char buffer[BUFSIZ]; 40463 + 40464 + static const char *typenames[] = 40465 + {"BOOLEAN", "NUMBER", "STRING"}; 40466 + 40467 + short BoolCount = 0; 40468 + short NumCount = 0; 40469 + short StrCount = 0; 40470 + 40471 + /* The first argument is the column-number (starting with 0). 40472 + * The second is the root name of the tables to generate. 40473 + */ 40474 + if (argc <= 3 40475 + || (column = atoi(argv[1])) <= 0 40476 + || (column >= MAX_COLUMNS) 40477 + || *(root_name = argv[2]) == 0 40478 + || (bigstring = atoi(argv[3])) < 0 40479 + || name_table == 0 40480 + || hash_table == 0) { 40481 + fprintf(stderr, "usage: make_hash column root_name bigstring\n"); 40482 + exit(EXIT_FAILURE); 40483 + } 40484 + 40485 + /* 40486 + * Read the table into our arrays. 40487 + */ 40488 + for (n = 0; (n < CAPTABSIZE) && fgets(buffer, BUFSIZ, stdin);) { 40489 + char **list, *nlp = strchr(buffer, '\n'); 40490 + if (nlp) 40491 + *nlp = '\0'; 40492 + list = parse_columns(buffer); 40493 + if (list == 0) /* blank or comment */ 40494 + continue; 40495 + name_table[n].nte_link = -1; /* end-of-hash */ 40496 + name_table[n].nte_name = strdup(list[column]); 40497 + if (!strcmp(list[2], "bool")) { 40498 + name_table[n].nte_type = BOOLEAN; 40499 + name_table[n].nte_index = BoolCount++; 40500 + } else if (!strcmp(list[2], "num")) { 40501 + name_table[n].nte_type = NUMBER; 40502 + name_table[n].nte_index = NumCount++; 40503 + } else if (!strcmp(list[2], "str")) { 40504 + name_table[n].nte_type = STRING; 40505 + name_table[n].nte_index = StrCount++; 40506 + } else { 40507 + fprintf(stderr, "Unknown type: %s\n", list[2]); 40508 + exit(EXIT_FAILURE); 40509 + } 40510 + n++; 40511 + } 40512 + _nc_make_hash_table(name_table, hash_table); 40513 + 40514 + /* 40515 + * Write the compiled tables to standard output 40516 + */ 40517 + if (bigstring) { 40518 + int len = 0; 40519 + int nxt; 40520 + 40521 + printf("static const char %s_names_text[] = \\\n", root_name); 40522 + for (n = 0; n < CAPTABSIZE; n++) { 40523 + nxt = (int) strlen(name_table[n].nte_name) + 5; 40524 + if (nxt + len > 72) { 40525 + printf("\\\n"); 40526 + len = 0; 40527 + } 40528 + printf("\"%s\\0\" ", name_table[n].nte_name); 40529 + len += nxt; 40530 + } 40531 + printf(";\n\n"); 40532 + 40533 + len = 0; 40534 + printf("static name_table_data const %s_names_data[] =\n", 40535 + root_name); 40536 + printf("{\n"); 40537 + for (n = 0; n < CAPTABSIZE; n++) { 40538 + printf("\t{ %15d,\t%10s,\t%3d, %3d }%c\n", 40539 + len, 40540 + typenames[name_table[n].nte_type], 40541 + name_table[n].nte_index, 40542 + name_table[n].nte_link, 40543 + n < CAPTABSIZE - 1 ? ',' : ' '); 40544 + len += (int) strlen(name_table[n].nte_name) + 1; 40545 + } 40546 + printf("};\n\n"); 40547 + printf("static struct name_table_entry *_nc_%s_table = 0;\n\n", root_name); 40548 + } else { 40549 + 40550 + printf("static struct name_table_entry %s _nc_%s_table[] =\n", 40551 + bigstring ? "" : "const", 40552 + root_name); 40553 + printf("{\n"); 40554 + for (n = 0; n < CAPTABSIZE; n++) { 40555 + sprintf(buffer, "\"%s\"", 40556 + name_table[n].nte_name); 40557 + printf("\t{ %15s,\t%10s,\t%3d, %3d }%c\n", 40558 + buffer, 40559 + typenames[name_table[n].nte_type], 40560 + name_table[n].nte_index, 40561 + name_table[n].nte_link, 40562 + n < CAPTABSIZE - 1 ? ',' : ' '); 40563 + } 40564 + printf("};\n\n"); 40565 + } 40566 + 40567 + printf("static const HashValue _nc_%s_hash_table[%d] =\n", 40568 + root_name, 40569 + HASHTABSIZE + 1); 40570 + printf("{\n"); 40571 + for (n = 0; n < HASHTABSIZE; n++) { 40572 + printf("\t%3d,\n", hash_table[n]); 40573 + } 40574 + printf("\t0\t/* base-of-table */\n"); 40575 + printf("};\n\n"); 40576 + 40577 + printf("#if (BOOLCOUNT!=%d)||(NUMCOUNT!=%d)||(STRCOUNT!=%d)\n", 40578 + BoolCount, NumCount, StrCount); 40579 + printf("#error\t--> term.h and comp_captab.c disagree about the <--\n"); 40580 + printf("#error\t--> numbers of booleans, numbers and/or strings <--\n"); 40581 + printf("#endif\n\n"); 40582 + 40583 + free(hash_table); 40584 + return EXIT_SUCCESS; 40585 +} 38325 40586 diff -Naur ncurses-5.7.orig/ncurses/tinfo/make_keys.c ncurses-5.7/ncurses/tinfo/make_keys.c 38326 40587 --- ncurses-5.7.orig/ncurses/tinfo/make_keys.c 2008-08-03 14:57:22.000000000 -0700 38327 +++ ncurses-5.7/ncurses/tinfo/make_keys.c 2009-0 7-19 15:02:22.000000000 -070040588 +++ ncurses-5.7/ncurses/tinfo/make_keys.c 2009-09-12 08:51:17.000000000 -0700 38328 40589 @@ -39,16 +39,16 @@ 38329 40590 #define USE_TERMLIB 1 … … 38368 40629 fprintf(ofp, "\t{ %4d, %-*.*s },\t/* %s */\n", 38369 40630 code, 40631 diff -Naur ncurses-5.7.orig/ncurses/tinfo/MKcaptab.sh ncurses-5.7/ncurses/tinfo/MKcaptab.sh 40632 --- ncurses-5.7.orig/ncurses/tinfo/MKcaptab.sh 2007-08-12 06:13:51.000000000 -0700 40633 +++ ncurses-5.7/ncurses/tinfo/MKcaptab.sh 2009-09-12 08:52:02.000000000 -0700 40634 @@ -1,6 +1,6 @@ 40635 #!/bin/sh 40636 ############################################################################## 40637 -# Copyright (c) 2007 Free Software Foundation, Inc. # 40638 +# Copyright (c) 2007,2009 Free Software Foundation, Inc. # 40639 # # 40640 # Permission is hereby granted, free of charge, to any person obtaining a # 40641 # copy of this software and associated documentation files (the "Software"), # 40642 @@ -26,12 +26,19 @@ 40643 # use or other dealings in this Software without prior written # 40644 # authorization. # 40645 ############################################################################## 40646 -# $Id: MKcaptab.sh,v 1.8 2007/08/12 13:13:51 tom Exp $ 40647 +# $Id: MKcaptab.sh,v 1.10 2009/08/08 17:19:25 tom Exp $ 40648 AWK=${1-awk} 40649 OPT1=${2-0} 40650 OPT2=${3-tinfo/MKcaptab.awk} 40651 DATA=${4-../include/Caps} 40652 40653 +cat <<EOF 40654 +/* 40655 + * generated by $0 40656 + */ 40657 + 40658 +EOF 40659 + 40660 cat <<'EOF' 40661 /* 40662 * comp_captab.c -- The names of the capabilities indexed via a hash 40663 @@ -58,7 +65,7 @@ 40664 static void 40665 next_string(const char *strings, unsigned *offset) 40666 { 40667 - *offset += strlen(strings + *offset) + 1; 40668 + *offset += strlen(strings + *offset) + 1; 40669 } 40670 40671 static const struct name_table_entry * 40672 @@ -66,21 +73,21 @@ 40673 const name_table_data *source, 40674 const char *strings) 40675 { 40676 - if (*actual == 0) { 40677 - *actual = typeCalloc(struct name_table_entry, CAPTABSIZE); 40678 - if (*actual != 0) { 40679 - unsigned n; 40680 - unsigned len = 0; 40681 - for (n = 0; n < CAPTABSIZE; ++n) { 40682 - (*actual)[n].nte_name = strings + len; 40683 - (*actual)[n].nte_type = source[n].nte_type; 40684 - (*actual)[n].nte_index = source[n].nte_index; 40685 - (*actual)[n].nte_link = source[n].nte_link; 40686 - next_string(strings, &len); 40687 - } 40688 - } 40689 + if (*actual == 0) { 40690 + *actual = typeCalloc(struct name_table_entry, CAPTABSIZE); 40691 + if (*actual != 0) { 40692 + unsigned n; 40693 + unsigned len = 0; 40694 + for (n = 0; n < CAPTABSIZE; ++n) { 40695 + (*actual)[n].nte_name = strings + len; 40696 + (*actual)[n].nte_type = source[n].nte_type; 40697 + (*actual)[n].nte_index = source[n].nte_index; 40698 + (*actual)[n].nte_link = source[n].nte_link; 40699 + next_string(strings, &len); 40700 + } 40701 } 40702 - return *actual; 40703 + } 40704 + return *actual; 40705 } 40706 40707 #define add_alias(field) \\ 40708 @@ -94,18 +101,18 @@ 40709 const char *strings, 40710 unsigned tablesize) 40711 { 40712 - if (*actual == 0) { 40713 - *actual = typeCalloc(struct alias, tablesize + 1); 40714 - if (*actual != 0) { 40715 - unsigned n; 40716 - for (n = 0; n < tablesize; ++n) { 40717 - add_alias(from); 40718 - add_alias(to); 40719 - add_alias(source); 40720 - } 40721 - } 40722 + if (*actual == 0) { 40723 + *actual = typeCalloc(struct alias, tablesize + 1); 40724 + if (*actual != 0) { 40725 + unsigned n; 40726 + for (n = 0; n < tablesize; ++n) { 40727 + add_alias(from); 40728 + add_alias(to); 40729 + add_alias(source); 40730 + } 40731 } 40732 - return *actual; 40733 + } 40734 + return *actual; 40735 } 40736 40737 #define build_names(root) _nc_build_names(&_nc_##root##_table, \\ 40738 @@ -122,27 +129,65 @@ 40739 40740 NCURSES_EXPORT(const struct name_table_entry *) _nc_get_table (bool termcap) 40741 { 40742 - return termcap ? build_names(cap) : build_names(info) ; 40743 + return termcap ? build_names(cap) : build_names(info) ; 40744 } 40745 40746 -NCURSES_EXPORT(const short *) _nc_get_hash_table (bool termcap) 40747 +/* entrypoint used by tack (do not alter) */ 40748 +NCURSES_EXPORT(const HashValue *) _nc_get_hash_table (bool termcap) 40749 { 40750 - return termcap ? _nc_cap_hash_table: _nc_info_hash_table ; 40751 + return termcap ? _nc_cap_hash_table: _nc_info_hash_table ; 40752 } 40753 40754 NCURSES_EXPORT(const struct alias *) _nc_get_alias_table (bool termcap) 40755 { 40756 - return termcap ? build_alias(cap) : build_alias(info) ; 40757 + return termcap ? build_alias(cap) : build_alias(info) ; 40758 +} 40759 + 40760 +static HashValue 40761 +hash_function(const char *string) 40762 +{ 40763 + long sum = 0; 40764 + 40765 + DEBUG(9, ("hashing %s", string)); 40766 + while (*string) { 40767 + sum += (long) (*string + (*(string + 1) << 8)); 40768 + string++; 40769 + } 40770 + 40771 + DEBUG(9, ("sum is %ld", sum)); 40772 + return (HashValue) (sum % HASHTABSIZE); 40773 +} 40774 + 40775 +static int 40776 +compare_cap_names(const char *a, const char *b) 40777 +{ 40778 + return !strncmp(a, b, 2); 40779 +} 40780 + 40781 +static int 40782 +compare_info_names(const char *a, const char *b) 40783 +{ 40784 + return !strcmp(a, b); 40785 +} 40786 + 40787 +static const HashData hash_data[2] = { 40788 + { HASHTABSIZE, _nc_info_hash_table, hash_function, compare_info_names }, 40789 + { HASHTABSIZE, _nc_cap_hash_table, hash_function, compare_cap_names } 40790 +}; 40791 + 40792 +NCURSES_EXPORT(const HashData *) _nc_get_hash_info (bool termcap) 40793 +{ 40794 + return &hash_data[(termcap != FALSE)]; 40795 } 40796 40797 #if NO_LEAKS 40798 NCURSES_EXPORT(void) _nc_comp_captab_leaks(void) 40799 { 40800 #if $OPT1 40801 - FreeIfNeeded(_nc_cap_table); 40802 - FreeIfNeeded(_nc_info_table); 40803 - FreeIfNeeded(_nc_capalias_table); 40804 - FreeIfNeeded(_nc_infoalias_table); 40805 + FreeIfNeeded(_nc_cap_table); 40806 + FreeIfNeeded(_nc_info_table); 40807 + FreeIfNeeded(_nc_capalias_table); 40808 + FreeIfNeeded(_nc_infoalias_table); 40809 #endif 40810 } 40811 #endif /* NO_LEAKS */ 38370 40812 diff -Naur ncurses-5.7.orig/ncurses/tinfo/MKcodes.awk ncurses-5.7/ncurses/tinfo/MKcodes.awk 38371 40813 --- ncurses-5.7.orig/ncurses/tinfo/MKcodes.awk 2008-06-28 16:13:25.000000000 -0700 38372 +++ ncurses-5.7/ncurses/tinfo/MKcodes.awk 2009-0 7-19 15:04:03.000000000 -070040814 +++ ncurses-5.7/ncurses/tinfo/MKcodes.awk 2009-09-12 08:51:40.000000000 -0700 38373 40815 @@ -1,5 +1,5 @@ 38374 40816 ############################################################################## … … 38432 40874 diff -Naur ncurses-5.7.orig/ncurses/tinfo/MKfallback.sh ncurses-5.7/ncurses/tinfo/MKfallback.sh 38433 40875 --- ncurses-5.7.orig/ncurses/tinfo/MKfallback.sh 2006-07-15 09:54:20.000000000 -0700 38434 +++ ncurses-5.7/ncurses/tinfo/MKfallback.sh 2009-0 7-19 15:03:53.000000000 -070040876 +++ ncurses-5.7/ncurses/tinfo/MKfallback.sh 2009-09-12 08:51:30.000000000 -0700 38435 40877 @@ -1,6 +1,6 @@ 38436 40878 #!/bin/sh … … 38460 40902 diff -Naur ncurses-5.7.orig/ncurses/tinfo/MKnames.awk ncurses-5.7/ncurses/tinfo/MKnames.awk 38461 40903 --- ncurses-5.7.orig/ncurses/tinfo/MKnames.awk 2008-10-11 14:07:56.000000000 -0700 38462 +++ ncurses-5.7/ncurses/tinfo/MKnames.awk 2009-0 7-19 15:03:45.000000000 -070040904 +++ ncurses-5.7/ncurses/tinfo/MKnames.awk 2009-09-12 08:51:23.000000000 -0700 38463 40905 @@ -1,5 +1,5 @@ 38464 40906 ############################################################################## … … 38531 40973 diff -Naur ncurses-5.7.orig/ncurses/tinfo/name_match.c ncurses-5.7/ncurses/tinfo/name_match.c 38532 40974 --- ncurses-5.7.orig/ncurses/tinfo/name_match.c 2008-08-03 12:49:33.000000000 -0700 38533 +++ ncurses-5.7/ncurses/tinfo/name_match.c 2009-0 7-19 15:02:22.000000000 -070040975 +++ ncurses-5.7/ncurses/tinfo/name_match.c 2009-09-12 08:51:17.000000000 -0700 38534 40976 @@ -31,10 +31,9 @@ 38535 40977 ****************************************************************************/ … … 38546 40988 diff -Naur ncurses-5.7.orig/ncurses/tinfo/parse_entry.c ncurses-5.7/ncurses/tinfo/parse_entry.c 38547 40989 --- ncurses-5.7.orig/ncurses/tinfo/parse_entry.c 2008-08-16 14:52:03.000000000 -0700 38548 +++ ncurses-5.7/ncurses/tinfo/parse_entry.c 2009-0 7-19 15:04:15.000000000 -070040990 +++ ncurses-5.7/ncurses/tinfo/parse_entry.c 2009-09-12 08:51:52.000000000 -0700 38549 40991 @@ -1,5 +1,5 @@ 38550 40992 /**************************************************************************** … … 38669 41111 diff -Naur ncurses-5.7.orig/ncurses/tinfo/setbuf.c ncurses-5.7/ncurses/tinfo/setbuf.c 38670 41112 --- ncurses-5.7.orig/ncurses/tinfo/setbuf.c 2007-05-12 12:04:02.000000000 -0700 38671 +++ ncurses-5.7/ncurses/tinfo/setbuf.c 2009-0 7-19 15:03:59.000000000 -070041113 +++ ncurses-5.7/ncurses/tinfo/setbuf.c 2009-09-12 08:51:56.000000000 -0700 38672 41114 @@ -1,5 +1,5 @@ 38673 41115 /**************************************************************************** … … 38691 41133 38692 41134 -MODULE_ID("$Id: setbuf.c,v 1.13 2007/05/12 19:04:02 tom Exp $") 38693 +MODULE_ID("$Id: setbuf.c,v 1.1 4 2009/05/09 23:09:00tom Exp $")41135 +MODULE_ID("$Id: setbuf.c,v 1.15 2009/05/23 22:13:44 tom Exp $") 38694 41136 38695 41137 /* 38696 41138 * If the output file descriptor is connected to a tty (the typical case) it 38697 @@ -98,11 +100, 11@@41139 @@ -98,11 +100,20 @@ 38698 41140 * buffer. So we disable this by default (there may yet be a workaround). 38699 41141 */ … … 38702 41144 +NCURSES_SP_NAME(_nc_set_buffer) (NCURSES_SP_DCLx FILE *ofp, bool buffered) 38703 41145 { 41146 + int Cols; 41147 + int Lines; 41148 + 41149 + if (0 == SP_PARM) 41150 + return; 41151 + 41152 + Cols = *(ptrCols(SP_PARM)); 41153 + Lines = *(ptrLines(SP_PARM)); 41154 + 38704 41155 /* optional optimization hack -- do before any output to ofp */ 38705 41156 #if HAVE_SETVBUF || HAVE_SETBUFFER … … 38709 41160 char *buf_ptr; 38710 41161 38711 @@ -115,10 +117,10 @@ 41162 @@ -114,11 +125,11 @@ 41163 setmode(ofp, O_BINARY); 38712 41164 #endif 38713 41165 if (buffered != 0) { 38714 41166 - buf_len = min(LINES * (COLS + 6), 2800); 38715 41167 - if ((buf_ptr = SP->_setbuf) == 0) { 41168 + buf_len = min(Lines * (Cols + 6), 2800); 38716 41169 + if ((buf_ptr = SP_PARM->_setbuf) == 0) { 38717 41170 if ((buf_ptr = typeMalloc(char, buf_len)) == NULL) … … 38722 41175 } 38723 41176 #if !USE_SETBUF_0 38724 @@ -144,7 +1 46,15 @@41177 @@ -144,7 +155,15 @@ 38725 41178 (void) setbuffer(ofp, buf_ptr, (int) buf_len); 38726 41179 #endif … … 38736 41189 +_nc_set_buffer(FILE *ofp, bool buffered) 38737 41190 +{ 38738 + returnNCURSES_SP_NAME(_nc_set_buffer) (CURRENT_SCREEN, ofp, buffered);41191 + NCURSES_SP_NAME(_nc_set_buffer) (CURRENT_SCREEN, ofp, buffered); 38739 41192 +} 38740 41193 +#endif 38741 41194 diff -Naur ncurses-5.7.orig/ncurses/tinfo/tinfo_driver.c ncurses-5.7/ncurses/tinfo/tinfo_driver.c 38742 41195 --- ncurses-5.7.orig/ncurses/tinfo/tinfo_driver.c 1969-12-31 16:00:00.000000000 -0800 38743 +++ ncurses-5.7/ncurses/tinfo/tinfo_driver.c 2009-0 7-19 15:04:11.000000000 -070041196 +++ ncurses-5.7/ncurses/tinfo/tinfo_driver.c 2009-09-12 08:52:05.000000000 -0700 38744 41197 @@ -0,0 +1,1389 @@ 38745 41198 +/**************************************************************************** … … 38787 41240 +#endif 38788 41241 + 38789 +MODULE_ID("$Id: tinfo_driver.c,v 1. 1 2009/05/23 22:40:30 juergenExp $")41242 +MODULE_ID("$Id: tinfo_driver.c,v 1.2 2009/08/16 14:17:08 tom Exp $") 38790 41243 + 38791 41244 +/* … … 38918 41371 +{ 38919 41372 + AssertTCB(); 38920 + return _nc_tinfo_doupdate(TCB->csp);41373 + return TINFO_DOUPDATE(TCB->csp); 38921 41374 +} 38922 41375 + … … 39690 42143 + SCREEN *sp = TCB->csp; 39691 42144 + AssertTCB(); 39692 + return _nc_tinfo_mvcur(sp, yold, xold, ynew, xnew);42145 + return TINFO_MVCUR(sp, yold, xold, ynew, xnew); 39693 42146 +} 39694 42147 + … … 40128 42581 + AssertTCB(); 40129 42582 + if (TCB->csp) 40130 + res = _nc_tinfo_has_key(TCB->csp, key) == 0 ? FALSE : TRUE;42583 + res = TINFO_HAS_KEY(TCB->csp, key) == 0 ? FALSE : TRUE; 40131 42584 + 40132 42585 + return res; … … 40134 42587 diff -Naur ncurses-5.7.orig/ncurses/tinfo/use_screen.c ncurses-5.7/ncurses/tinfo/use_screen.c 40135 42588 --- ncurses-5.7.orig/ncurses/tinfo/use_screen.c 2008-06-07 12:16:56.000000000 -0700 40136 +++ ncurses-5.7/ncurses/tinfo/use_screen.c 2009-0 7-19 15:02:22.000000000 -070042589 +++ ncurses-5.7/ncurses/tinfo/use_screen.c 2009-09-12 08:51:17.000000000 -0700 40137 42590 @@ -32,7 +32,7 @@ 40138 42591 … … 40155 42608 diff -Naur ncurses-5.7.orig/ncurses/tinfo/write_entry.c ncurses-5.7/ncurses/tinfo/write_entry.c 40156 42609 --- ncurses-5.7.orig/ncurses/tinfo/write_entry.c 2008-08-03 12:24:00.000000000 -0700 40157 +++ ncurses-5.7/ncurses/tinfo/write_entry.c 2009-0 7-19 15:03:53.000000000 -070042610 +++ ncurses-5.7/ncurses/tinfo/write_entry.c 2009-09-12 08:51:30.000000000 -0700 40158 42611 @@ -1,5 +1,5 @@ 40159 42612 /**************************************************************************** … … 40294 42747 diff -Naur ncurses-5.7.orig/ncurses/trace/lib_traceatr.c ncurses-5.7/ncurses/trace/lib_traceatr.c 40295 42748 --- ncurses-5.7.orig/ncurses/trace/lib_traceatr.c 2008-08-03 09:24:53.000000000 -0700 40296 +++ ncurses-5.7/ncurses/trace/lib_traceatr.c 2009-0 7-19 15:03:59.000000000 -070042749 +++ ncurses-5.7/ncurses/trace/lib_traceatr.c 2009-09-12 08:51:37.000000000 -0700 40297 42750 @@ -1,5 +1,5 @@ 40298 42751 /**************************************************************************** … … 40388 42841 diff -Naur ncurses-5.7.orig/ncurses/trace/lib_tracebits.c ncurses-5.7/ncurses/trace/lib_tracebits.c 40389 42842 --- ncurses-5.7.orig/ncurses/trace/lib_tracebits.c 2008-08-03 09:09:26.000000000 -0700 40390 +++ ncurses-5.7/ncurses/trace/lib_tracebits.c 2009-0 7-19 15:02:22.000000000 -070042843 +++ ncurses-5.7/ncurses/trace/lib_tracebits.c 2009-09-12 08:51:17.000000000 -0700 40391 42844 @@ -33,9 +33,8 @@ 40392 42845 ****************************************************************************/ … … 40402 42855 diff -Naur ncurses-5.7.orig/ncurses/trace/lib_trace.c ncurses-5.7/ncurses/trace/lib_trace.c 40403 42856 --- ncurses-5.7.orig/ncurses/trace/lib_trace.c 2008-08-23 11:04:29.000000000 -0700 40404 +++ ncurses-5.7/ncurses/trace/lib_trace.c 2009-0 7-19 15:02:23.000000000 -070042857 +++ ncurses-5.7/ncurses/trace/lib_trace.c 2009-09-12 08:51:19.000000000 -0700 40405 42858 @@ -1,5 +1,5 @@ 40406 42859 /**************************************************************************** … … 40462 42915 diff -Naur ncurses-5.7.orig/ncurses/trace/lib_tracechr.c ncurses-5.7/ncurses/trace/lib_tracechr.c 40463 42916 --- ncurses-5.7.orig/ncurses/trace/lib_tracechr.c 2008-08-03 08:39:29.000000000 -0700 40464 +++ ncurses-5.7/ncurses/trace/lib_tracechr.c 2009-0 7-19 15:03:53.000000000 -070042917 +++ ncurses-5.7/ncurses/trace/lib_tracechr.c 2009-09-12 08:51:30.000000000 -0700 40465 42918 @@ -1,5 +1,5 @@ 40466 42919 /**************************************************************************** … … 40508 42961 diff -Naur ncurses-5.7.orig/ncurses/trace/lib_tracedmp.c ncurses-5.7/ncurses/trace/lib_tracedmp.c 40509 42962 --- ncurses-5.7.orig/ncurses/trace/lib_tracedmp.c 2008-08-16 12:30:56.000000000 -0700 40510 +++ ncurses-5.7/ncurses/trace/lib_tracedmp.c 2009-0 7-19 15:03:53.000000000 -070042963 +++ ncurses-5.7/ncurses/trace/lib_tracedmp.c 2009-09-12 08:51:30.000000000 -0700 40511 42964 @@ -1,5 +1,5 @@ 40512 42965 /**************************************************************************** … … 40563 43016 diff -Naur ncurses-5.7.orig/ncurses/trace/lib_tracemse.c ncurses-5.7/ncurses/trace/lib_tracemse.c 40564 43017 --- ncurses-5.7.orig/ncurses/trace/lib_tracemse.c 2008-08-03 08:39:29.000000000 -0700 40565 +++ ncurses-5.7/ncurses/trace/lib_tracemse.c 2009-0 7-19 15:02:22.000000000 -070043018 +++ ncurses-5.7/ncurses/trace/lib_tracemse.c 2009-09-12 08:51:17.000000000 -0700 40566 43019 @@ -38,7 +38,7 @@ 40567 43020 … … 40584 43037 diff -Naur ncurses-5.7.orig/ncurses/trace/trace_tries.c ncurses-5.7/ncurses/trace/trace_tries.c 40585 43038 --- ncurses-5.7.orig/ncurses/trace/trace_tries.c 2008-08-03 08:43:30.000000000 -0700 40586 +++ ncurses-5.7/ncurses/trace/trace_tries.c 2009-0 7-19 15:03:48.000000000 -070043039 +++ ncurses-5.7/ncurses/trace/trace_tries.c 2009-09-12 08:51:25.000000000 -0700 40587 43040 @@ -1,5 +1,5 @@ 40588 43041 /**************************************************************************** … … 40612 43065 diff -Naur ncurses-5.7.orig/ncurses/trace/varargs.c ncurses-5.7/ncurses/trace/varargs.c 40613 43066 --- ncurses-5.7.orig/ncurses/trace/varargs.c 2008-08-03 08:42:49.000000000 -0700 40614 +++ ncurses-5.7/ncurses/trace/varargs.c 2009-0 7-19 15:02:22.000000000 -070043067 +++ ncurses-5.7/ncurses/trace/varargs.c 2009-09-12 08:51:17.000000000 -0700 40615 43068 @@ -34,7 +34,7 @@ 40616 43069 … … 40633 43086 diff -Naur ncurses-5.7.orig/ncurses/trace/visbuf.c ncurses-5.7/ncurses/trace/visbuf.c 40634 43087 --- ncurses-5.7.orig/ncurses/trace/visbuf.c 2008-08-04 16:07:39.000000000 -0700 40635 +++ ncurses-5.7/ncurses/trace/visbuf.c 2009-0 7-19 15:04:15.000000000 -070043088 +++ ncurses-5.7/ncurses/trace/visbuf.c 2009-09-12 08:51:52.000000000 -0700 40636 43089 @@ -1,5 +1,5 @@ 40637 43090 /**************************************************************************** … … 40693 43146 diff -Naur ncurses-5.7.orig/ncurses/tty/hardscroll.c ncurses-5.7/ncurses/tty/hardscroll.c 40694 43147 --- ncurses-5.7.orig/ncurses/tty/hardscroll.c 2008-08-03 16:49:30.000000000 -0700 40695 +++ ncurses-5.7/ncurses/tty/hardscroll.c 2009-0 7-19 15:03:53.000000000 -070043148 +++ ncurses-5.7/ncurses/tty/hardscroll.c 2009-09-12 08:51:30.000000000 -0700 40696 43149 @@ -1,5 +1,5 @@ 40697 43150 /**************************************************************************** … … 40912 43365 diff -Naur ncurses-5.7.orig/ncurses/tty/hashmap.c ncurses-5.7/ncurses/tty/hashmap.c 40913 43366 --- ncurses-5.7.orig/ncurses/tty/hashmap.c 2007-10-13 11:47:25.000000000 -0700 40914 +++ ncurses-5.7/ncurses/tty/hashmap.c 2009-0 7-19 15:03:59.000000000 -070043367 +++ ncurses-5.7/ncurses/tty/hashmap.c 2009-09-12 08:51:37.000000000 -0700 40915 43368 @@ -1,5 +1,5 @@ 40916 43369 /**************************************************************************** … … 41377 43830 diff -Naur ncurses-5.7.orig/ncurses/tty/lib_mvcur.c ncurses-5.7/ncurses/tty/lib_mvcur.c 41378 43831 --- ncurses-5.7.orig/ncurses/tty/lib_mvcur.c 2008-08-16 12:30:58.000000000 -0700 41379 +++ ncurses-5.7/ncurses/tty/lib_mvcur.c 2009-0 7-19 15:03:59.000000000 -070043832 +++ ncurses-5.7/ncurses/tty/lib_mvcur.c 2009-09-12 08:52:09.000000000 -0700 41380 43833 @@ -1,5 +1,5 @@ 41381 43834 /**************************************************************************** … … 41404 43857 41405 43858 /**************************************************************************** 41406 @@ -152,13 +153, 16@@43859 @@ -152,13 +153,21 @@ 41407 43860 */ 41408 43861 … … 41416 43869 +#endif 41417 43870 + 41418 +MODULE_ID("$Id: lib_mvcur.c,v 1.120 2009/05/10 00:52:29 tom Exp $") 43871 +MODULE_ID("$Id: lib_mvcur.c,v 1.121 2009/08/30 16:52:00 tom Exp $") 43872 + 43873 +#define WANT_CHAR(sp, y, x) (sp)->_newscr->_line[y].text[x] /* desired state */ 41419 43874 41420 43875 -#define WANT_CHAR(y, x) SP->_newscr->_line[y].text[x] /* desired state */ 41421 43876 -#define BAUDRATE cur_term->_baudrate /* bits per second */ 41422 +#define WANT_CHAR(sp, y, x) (sp)->_newscr->_line[y].text[x] /* desired state */ 43877 +#if NCURSES_SP_FUNCS 43878 +#define BAUDRATE(sp) sp->_term->_baudrate /* bits per second */ 43879 +#else 41423 43880 +#define BAUDRATE(sp) cur_term->_baudrate /* bits per second */ 43881 +#endif 41424 43882 41425 43883 #if defined(MAIN) || defined(NCURSES_TEST) 41426 43884 #include <sys/time.h> 41427 @@ -169,7 +17 3,7 @@43885 @@ -169,7 +178,7 @@ 41428 43886 41429 43887 #define OPT_SIZE 512 … … 41434 43892 /**************************************************************************** 41435 43893 * 41436 @@ -179,34 +18 3,34 @@43894 @@ -179,34 +188,34 @@ 41437 43895 41438 43896 #ifdef TRACE … … 41478 43936 { 41479 43937 if (cap == 0) 41480 @@ -230,45 +23 4,56@@43938 @@ -230,45 +239,59 @@ 41481 43939 } 41482 43940 … … 41536 43994 /* what to do at initialization time and after each shellout */ 41537 43995 { 43996 + if (SP_PARM && !IsTermInfo(SP_PARM)) 43997 + return; 43998 + 41538 43999 /* initialize screen for cursor access */ 41539 44000 if (enter_ca_mode) { … … 41546 44007 41547 44008 /* 41548 @@ -280,53 + 295,63 @@44009 @@ -280,53 +303,63 @@ 41549 44010 * they know the screen size. This is useful when you're running 41550 44011 * a vt100 emulation through xterm. … … 41640 44101 41641 44102 /* 41642 @@ -335,7 +36 0,7 @@44103 @@ -335,7 +368,7 @@ 41643 44104 * can treat it like absolute screen addressing. This seems to be true 41644 44105 * for all cursor_mem_address terminal types in the terminfo database. … … 41649 44110 /* 41650 44111 * Parametrized local-motion strings. This static cost computation 41651 @@ -361,40 +3 86,43 @@44112 @@ -361,40 +394,43 @@ 41652 44113 * All these averages depend on the assumption that all parameter values 41653 44114 * are equally probable. … … 41717 44178 /* 41718 44179 * If save_cursor is used within enter_ca_mode, we should not use it for 41719 @@ -411,30 +4 39,40@@44180 @@ -411,30 +447,42 @@ 41720 44181 } 41721 44182 … … 41727 44188 * called by doupdate's return-from-shellout code. 41728 44189 */ 44190 - _nc_mvcur_resume(); 41729 44191 + NCURSES_SP_NAME(_nc_mvcur_resume) (NCURSES_SP_ARG); 41730 +}41731 + 44192 } 44193 41732 44194 +#if NCURSES_SP_FUNCS 41733 +NCURSES_EXPORT(void) 44195 NCURSES_EXPORT(void) 44196 -_nc_mvcur_wrap(void) 41734 44197 +_nc_mvcur_init(void) 41735 44198 +{ 41736 44199 + NCURSES_SP_NAME(_nc_mvcur_init) (CURRENT_SCREEN); 41737 _nc_mvcur_resume(); 41738 } 44200 +} 41739 44201 +#endif 41740 41741 NCURSES_EXPORT(void) 41742 -_nc_mvcur_wrap(void) 44202 + 44203 +NCURSES_EXPORT(void) 41743 44204 +NCURSES_SP_NAME(_nc_mvcur_wrap) (NCURSES_SP_DCL0) 41744 44205 /* wrap up cursor-addressing mode */ … … 41746 44207 /* leave cursor at screen bottom */ 41747 44208 - mvcur(-1, -1, screen_lines - 1, 0); 41748 + mvcur(-1, -1, screen_lines(CURRENT_SCREEN) - 1, 0); 44209 + TINFO_MVCUR(NCURSES_SP_ARGx -1, -1, screen_lines(SP_PARM) - 1, 0); 44210 + 44211 + if (SP_PARM && !IsTermInfo(SP_PARM)) 44212 + return; 41749 44213 41750 44214 /* set cursor to normal mode */ … … 41768 44232 /* 41769 44233 * Reset terminal's tab counter. There's a long-time bug that 41770 @@ -444, 8 +482,16@@44234 @@ -444,9 +492,17 @@ 41771 44235 * escape sequences that reset things as column positions. 41772 44236 * Utter a \r to reset this invisibly. … … 41774 44238 - _nc_outch('\r'); 41775 44239 + NCURSES_SP_NAME(_nc_outch) (NCURSES_SP_ARGx '\r'); 41776 +}41777 + 44240 } 44241 41778 44242 +#if NCURSES_SP_FUNCS 41779 44243 +NCURSES_EXPORT(void) … … 41781 44245 +{ 41782 44246 + NCURSES_SP_NAME(_nc_mvcur_wrap) (CURRENT_SCREEN); 41783 44247 +} 41784 44248 +#endif 41785 44249 + 41786 44250 /**************************************************************************** 41787 44251 * 41788 @@ -486,8 +532,13 @@ 44252 * Optimized cursor movement 44253 @@ -486,8 +542,13 @@ 41789 44254 #define LASTTAB(fr) ((fr > 0) ? ((fr - 1) / init_tabs) * init_tabs : -1) 41790 44255 … … 41802 44267 { 41803 44268 string_desc save; 41804 @@ -500,38 +5 51,38 @@44269 @@ -500,38 +561,38 @@ 41805 44270 41806 44271 if (row_address != 0 … … 41851 44316 } 41852 44317 41853 @@ -550,17 +6 01,17 @@44318 @@ -550,17 +611,17 @@ 41854 44319 if (column_address 41855 44320 && _nc_safe_strcat(_nc_str_copy(target, &save), … … 41872 44337 41873 44338 if (cursor_right) { 41874 @@ -575,7 +6 26,7 @@44339 @@ -575,7 +636,7 @@ 41875 44340 41876 44341 for (fr = from_x; (nxt = NEXTTAB(fr)) <= to_x; fr = nxt) { … … 41881 44346 break; 41882 44347 } 41883 @@ -599,7 +6 50,7 @@44348 @@ -599,7 +660,7 @@ 41884 44349 && n < (int) check.s_size 41885 44350 && vcost == 0 … … 41890 44355 ovw = FALSE; 41891 44356 } 41892 @@ -616,8 +6 67,8 @@44357 @@ -616,8 +677,8 @@ 41893 44358 int i; 41894 44359 … … 41901 44366 || !Charable(ch) 41902 44367 #endif 41903 @@ -631,13 +6 82,13 @@44368 @@ -631,13 +692,13 @@ 41904 44369 int i; 41905 44370 … … 41918 44383 } 41919 44384 41920 @@ -650,10 +7 01,10 @@44385 @@ -650,10 +711,10 @@ 41921 44386 n = from_x - to_x; 41922 44387 … … 41931 44396 41932 44397 if (cursor_left) { 41933 @@ -667,7 +7 18,8 @@44398 @@ -667,7 +728,8 @@ 41934 44399 41935 44400 for (fr = from_x; (nxt = LASTTAB(fr)) >= to_x; fr = nxt) { … … 41941 44406 break; 41942 44407 } 41943 @@ -676,7 +7 28,9 @@44408 @@ -676,7 +738,9 @@ 41944 44409 } 41945 44410 #endif /* USE_HARD_TABS */ … … 41952 44417 if (lhcost < hcost 41953 44418 && _nc_safe_strcat(_nc_str_copy(target, &save), str)) { 41954 @@ -705,7 +7 59,7 @@44419 @@ -705,7 +769,7 @@ 41955 44420 */ 41956 44421 … … 41961 44426 { 41962 44427 string_desc result; 41963 @@ -723,9 +7 77,9 @@44428 @@ -723,9 +787,9 @@ 41964 44429 #define InitResult _nc_str_init(&result, buffer, sizeof(buffer)) 41965 44430 … … 41973 44438 #if defined(TRACE) || defined(NCURSES_TEST) 41974 44439 if (!(_nc_optimize_enable & OPTIMIZE_MVCUR)) 41975 @@ -740,7 + 794,7 @@44440 @@ -740,7 +804,7 @@ 41976 44441 * (like, say, local-movement \n getting mapped to some obscure 41977 44442 * character because A_ALTCHARSET is on). … … 41982 44447 if (!profiling) { 41983 44448 (void) fputs("nonlocal\n", stderr); 41984 @@ -754,8 +8 08,10 @@44449 @@ -754,8 +818,10 @@ 41985 44450 #ifndef NO_OPTIMIZE 41986 44451 /* tactic #1: use local movement */ … … 41995 44460 tactic = 1; 41996 44461 usecost = newcost; 41997 @@ -763,42 +8 19,51 @@44462 @@ -763,42 +829,51 @@ 41998 44463 41999 44464 /* tactic #2: use carriage-return + local movement */ … … 42063 44528 42064 44529 /* 42065 @@ -808,26 +8 73,39 @@44530 @@ -808,26 +883,39 @@ 42066 44531 InitResult; 42067 44532 switch (tactic) { … … 42109 44574 } 42110 44575 #endif /* !NO_OPTIMIZE */ 42111 @@ -845, 17 +923,19@@44576 @@ -845,25 +933,26 @@ 42112 44577 42113 44578 if (usecost != INFINITY) { … … 42125 44590 } 42126 44591 42127 -NCURSES_EXPORT(int)44592 NCURSES_EXPORT(int) 42128 44593 -mvcur(int yold, int xold, int ynew, int xnew) 44594 +TINFO_MVCUR(NCURSES_SP_DCLx int yold, int xold, int ynew, int xnew) 42129 44595 /* optimized cursor move from (yold, xold) to (ynew, xnew) */ 42130 +NCURSES_EXPORT(int)42131 +NCURSES_SP_NAME(mvcur) (NCURSES_SP_DCLx42132 + int yold, int xold, int ynew, int xnew)42133 44596 { 42134 44597 NCURSES_CH_T oldattr; 42135 44598 int code; 42136 @@ -863,7 +943,7 @@ 42137 TR(TRACE_CALLS | TRACE_MOVE, (T_CALLED("mvcur(%d,%d,%d,%d)"), 42138 yold, xold, ynew, xnew)); 44599 44600 - TR(TRACE_CALLS | TRACE_MOVE, (T_CALLED("mvcur(%d,%d,%d,%d)"), 44601 - yold, xold, ynew, xnew)); 44602 + TR(TRACE_CALLS | TRACE_MOVE, (T_CALLED("_nc_tinfo_mvcur(%p,%d,%d,%d,%d)"), 44603 + SP_PARM, yold, xold, ynew, xnew)); 42139 44604 42140 44605 - if (SP == 0) { … … 42143 44608 } else if (yold == ynew && xold == xnew) { 42144 44609 code = OK; 42145 @@ -874,9 +9 54,9 @@44610 @@ -874,9 +963,9 @@ 42146 44611 * column position implied by wraparound or the lack thereof and 42147 44612 * rolling up the screen to get ynew on the screen. … … 42156 44621 42157 44622 /* 42158 @@ -884,38 +9 64,40 @@44623 @@ -884,38 +973,40 @@ 42159 44624 * character set -- these have a strong tendency to screw up the CR & 42160 44625 * LF used for local character motions! … … 42210 44675 } 42211 44676 } 42212 @@ -929,27 +10 11,35 @@44677 @@ -929,27 +1020,35 @@ 42213 44678 } 42214 44679 } … … 42242 44707 } 42243 44708 42244 +#if NCURSES_SP_FUNCS 44709 +#if NCURSES_SP_FUNCS && !defined(USE_TERM_DRIVER) 42245 44710 +NCURSES_EXPORT(int) 42246 44711 +mvcur(int yold, int xold, int ynew, int xnew) … … 42253 44718 NCURSES_EXPORT_VAR(int) _nc_optimize_enable = OPTIMIZE_ALL; 42254 44719 #endif 42255 @@ -1212,25 +13 02,25 @@44720 @@ -1212,25 +1311,25 @@ 42256 44721 speeds[i], overhead, totalest); 42257 44722 } … … 42298 44763 diff -Naur ncurses-5.7.orig/ncurses/tty/lib_tstp.c ncurses-5.7/ncurses/tty/lib_tstp.c 42299 44764 --- ncurses-5.7.orig/ncurses/tty/lib_tstp.c 2008-05-03 09:24:56.000000000 -0700 42300 +++ ncurses-5.7/ncurses/tty/lib_tstp.c 2009-0 7-19 15:03:59.000000000 -070044765 +++ ncurses-5.7/ncurses/tty/lib_tstp.c 2009-09-12 08:51:37.000000000 -0700 42301 44766 @@ -1,5 +1,5 @@ 42302 44767 /**************************************************************************** … … 42440 44905 diff -Naur ncurses-5.7.orig/ncurses/tty/lib_twait.c ncurses-5.7/ncurses/tty/lib_twait.c 42441 44906 --- ncurses-5.7.orig/ncurses/tty/lib_twait.c 2008-08-30 13:08:19.000000000 -0700 42442 +++ ncurses-5.7/ncurses/tty/lib_twait.c 2009-0 7-19 15:03:53.000000000 -070044907 +++ ncurses-5.7/ncurses/tty/lib_twait.c 2009-09-12 08:51:30.000000000 -0700 42443 44908 @@ -1,5 +1,5 @@ 42444 44909 /**************************************************************************** … … 42647 45112 diff -Naur ncurses-5.7.orig/ncurses/tty/lib_vidattr.c ncurses-5.7/ncurses/tty/lib_vidattr.c 42648 45113 --- ncurses-5.7.orig/ncurses/tty/lib_vidattr.c 2007-06-30 14:58:04.000000000 -0700 42649 +++ ncurses-5.7/ncurses/tty/lib_vidattr.c 2009-0 7-19 15:04:09.000000000 -070045114 +++ ncurses-5.7/ncurses/tty/lib_vidattr.c 2009-09-12 08:52:04.000000000 -0700 42650 45115 @@ -1,5 +1,5 @@ 42651 45116 /**************************************************************************** … … 42676 45141 +#endif 42677 45142 + 42678 +MODULE_ID("$Id: lib_vidattr.c,v 1.5 7 2009/05/23 20:46:28tom Exp $")45143 +MODULE_ID("$Id: lib_vidattr.c,v 1.58 2009/08/15 22:12:01 tom Exp $") 42679 45144 42680 45145 -#define doPut(mode) TPUTS_TRACE(#mode); tputs(mode, 1, outc) … … 42810 45275 } 42811 45276 42812 @@ -282,2 7+297,53 @@45277 @@ -282,28 +297,53 @@ 42813 45278 if (reverse) 42814 45279 newmode |= A_REVERSE; … … 42861 45326 chtype attrs = A_NORMAL; 42862 45327 45328 - T((T_CALLED("termattrs()"))); 42863 45329 + T((T_CALLED("termattrs(%p)"), SP_PARM)); 42864 45330 +#ifdef USE_TERM_DRIVER … … 42867 45333 +#else 42868 45334 + 42869 T((T_CALLED("termattrs()")));42870 45335 if (enter_alt_charset_mode) 42871 45336 attrs |= A_ALTCHARSET; 42872 @@ -331,8 +372,17 @@ 45337 45338 @@ -331,8 +371,17 @@ 42873 45339 if (enter_underline_mode) 42874 45340 attrs |= A_UNDERLINE; … … 42892 45358 diff -Naur ncurses-5.7.orig/ncurses/tty/MKexpanded.sh ncurses-5.7/ncurses/tty/MKexpanded.sh 42893 45359 --- ncurses-5.7.orig/ncurses/tty/MKexpanded.sh 2005-01-01 17:06:40.000000000 -0800 42894 +++ ncurses-5.7/ncurses/tty/MKexpanded.sh 2009-0 7-19 15:04:13.000000000 -070045360 +++ ncurses-5.7/ncurses/tty/MKexpanded.sh 2009-09-12 08:51:50.000000000 -0700 42895 45361 @@ -1,6 +1,6 @@ 42896 45362 #! /bin/sh … … 42999 45465 diff -Naur ncurses-5.7.orig/ncurses/tty/tty_update.c ncurses-5.7/ncurses/tty/tty_update.c 43000 45466 --- ncurses-5.7.orig/ncurses/tty/tty_update.c 2008-08-30 13:08:19.000000000 -0700 43001 +++ ncurses-5.7/ncurses/tty/tty_update.c 2009-0 7-19 15:04:11.000000000 -070045467 +++ ncurses-5.7/ncurses/tty/tty_update.c 2009-09-12 08:52:05.000000000 -0700 43002 45468 @@ -1,5 +1,5 @@ 43003 45469 /**************************************************************************** … … 43015 45481 43016 45482 /*----------------------------------------------------------------- 43017 @@ -38,12 +39,1 7@@45483 @@ -38,12 +39,16 @@ 43018 45484 * 43019 45485 * The routine doupdate() and its dependents. … … 43024 45490 *-----------------------------------------------------------------*/ 43025 45491 43026 +#define NEED_NCURSES_CH_T 143027 45492 #include <curses.priv.h> 43028 45493 … … 43034 45499 #undef __BEOS__ 43035 45500 #endif 43036 @@ -76,9 +8 2,8 @@45501 @@ -76,9 +81,8 @@ 43037 45502 #endif 43038 45503 … … 43041 45506 43042 45507 -MODULE_ID("$Id: tty_update.c,v 1.246 2008/08/30 20:08:19 tom Exp $") 43043 +MODULE_ID("$Id: tty_update.c,v 1.258 2009/06/27 19:16:17 tom Exp$")45508 +MODULE_ID("$Id: tty_update.c,v 1.258.1.2 2009/08/16 14:20:30 tom Exp tom $") 43044 45509 43045 45510 /* 43046 45511 * This define controls the line-breakout optimization. Every once in a 43047 @@ -91,7 +9 6,7 @@45512 @@ -91,7 +95,7 @@ 43048 45513 */ 43049 45514 #define CHECK_INTERVAL 5 … … 43054 45519 static const NCURSES_CH_T blankchar = NewChar(BLANK_TEXT); 43055 45520 static NCURSES_CH_T normal = NewChar(BLANK_TEXT); 43056 @@ -103,13 +10 8,23 @@45521 @@ -103,13 +107,23 @@ 43057 45522 */ 43058 45523 /* #define POSITION_DEBUG */ … … 43079 45544 #ifdef POSITION_DEBUG 43080 45545 /**************************************************************************** 43081 @@ -119,7 +13 4,7 @@45546 @@ -119,7 +133,7 @@ 43082 45547 ****************************************************************************/ 43083 45548 … … 43088 45553 { 43089 45554 char buf[20]; 43090 @@ -129,10 +14 4,10 @@45555 @@ -129,10 +143,10 @@ 43091 45556 if (!_nc_tracing || (expected_y < 0 && expected_x < 0)) 43092 45557 return; … … 43102 45567 do { 43103 45568 int ask = sizeof(buf) - 1 - (s - buf); 43104 @@ -152,8 +16 7,12 @@45569 @@ -152,8 +166,12 @@ 43105 45570 if (expected_y < 0) 43106 45571 expected_y = y - 1; … … 43117 45582 y - 1, x - 1, expected_y, expected_x, legend); 43118 45583 } else { 43119 @@ -162,7 +18 1,7 @@45584 @@ -162,7 +180,7 @@ 43120 45585 } 43121 45586 } … … 43126 45591 43127 45592 /**************************************************************************** 43128 @@ -172,19 +19 1,20@@45593 @@ -172,19 +190,22 @@ 43129 45594 ****************************************************************************/ 43130 45595 … … 43143 45608 - mvcur(SP->_cursrow, SP->_curscol, row, col); 43144 45609 - position_check(SP->_cursrow, SP->_curscol, "GoTo2"); 43145 + NCURSES_SP_NAME(mvcur) (NCURSES_SP_ARGx SP_PARM->_cursrow, 43146 + SP_PARM->_curscol, row, col); 45610 + TINFO_MVCUR(NCURSES_SP_ARGx 45611 + SP_PARM->_cursrow, 45612 + SP_PARM->_curscol, 45613 + row, col); 43147 45614 + position_check(SP_PARM, SP_PARM->_cursrow, SP_PARM->_curscol, "GoTo2"); 43148 45615 } … … 43154 45621 int chlen = 1; 43155 45622 NCURSES_CH_T my_ch; 43156 @@ -194,7 +21 4,7 @@45623 @@ -194,7 +215,7 @@ 43157 45624 43158 45625 TR(TRACE_CHARPUT, ("PutAttrChar(%s) at (%d, %d)", … … 43163 45630 /* 43164 45631 * If this is not a valid character, there is nothing more to do. 43165 @@ -224,12 +24 4,12 @@45632 @@ -224,12 +245,12 @@ 43166 45633 */ 43167 45634 if (is8bits(CharOf(CHDEREF(ch))) … … 43180 45647 ; 43181 45648 } else { 43182 @@ -241,7 +26 1,7 @@45649 @@ -241,7 +262,7 @@ 43183 45650 #endif 43184 45651 … … 43189 45656 my_ch = CHDEREF(ch); /* work around const param */ 43190 45657 #if USE_WIDEC_SUPPORT 43191 @@ -251,8 +27 1,8 @@45658 @@ -251,8 +272,8 @@ 43192 45659 * character, and uses the wide-character mapping when we expect the 43193 45660 * normal one to be broken (by mis-design ;-). … … 43200 45667 my_ch = _nc_wacs[CharOf(my_ch)]; 43201 45668 } 43202 @@ -265,9 +28 5,9 @@45669 @@ -265,9 +286,9 @@ 43203 45670 */ 43204 45671 if (AttrOf(attr) & A_ALTCHARSET) { … … 43212 45679 if (temp == 0) 43213 45680 temp = ' '; 43214 @@ -282,28 +30 2,28 @@45681 @@ -282,28 +303,28 @@ 43215 45682 ch = CHREF(tilde); 43216 45683 } … … 43248 45715 { 43249 45716 bool have_pending = FALSE; 43250 @@ -313,13 +33 3,13 @@45717 @@ -313,13 +334,13 @@ 43251 45718 * have the refreshing slow down drastically (or stop) if there's an 43252 45719 * unread character available. … … 43265 45732 if (poll(fds, 1, 0) > 0) { 43266 45733 have_pending = TRUE; 43267 @@ -347,43 +36 7,52 @@45734 @@ -347,43 +368,52 @@ 43268 45735 ktimeout.tv_usec = 0; 43269 45736 … … 43333 45800 } 43334 45801 43335 @@ -391,7 +42 0,7 @@45802 @@ -391,7 +421,7 @@ 43336 45803 * Wrap the cursor position, i.e., advance to the beginning of the next line. 43337 45804 */ … … 43342 45809 if (eat_newline_glitch) { 43343 45810 /* 43344 @@ -407,40 +43 6,45 @@45811 @@ -407,40 +437,45 @@ 43345 45812 * it's safe to just tell the code that the cursor is in hyperspace and 43346 45813 * let the next mvcur() call straighten things out. … … 43406 45873 43407 45874 /* 43408 @@ -450,19 +48 4,19 @@45875 @@ -450,19 +485,19 @@ 43409 45876 * or can be output by clearing (A_COLOR in case of bce-terminal) are excluded. 43410 45877 */ … … 43431 45898 return FALSE; 43432 45899 } 43433 @@ -488,7 +52 2,7 @@45900 @@ -488,7 +523,7 @@ 43434 45901 * This code is optimized using ech and rep. 43435 45902 */ … … 43440 45907 int i; 43441 45908 43442 @@ -500,13 +53 4,13 @@45909 @@ -500,13 +535,13 @@ 43443 45910 NCURSES_CH_T ntext0; 43444 45911 … … 43456 45923 } 43457 45924 runcount = 2; 43458 @@ -523,10 +55 7,11 @@45925 @@ -523,10 +558,11 @@ 43459 45926 * which it would be marginally advantageous. 43460 45927 */ … … 43472 45939 /* 43473 45940 * If this is the last part of the given interval, 43474 @@ -534,27 +5 69,34 @@45941 @@ -534,27 +570,34 @@ 43475 45942 * last update on the line. 43476 45943 */ … … 43516 45983 ntext += runcount; 43517 45984 num -= runcount; 43518 @@ -563,7 +60 5,7 @@45985 @@ -563,7 +606,7 @@ 43519 45986 } 43520 45987 … … 43525 45992 } 43526 45993 43527 @@ -576,39 +61 8,40 @@45994 @@ -576,39 +619,40 @@ 43528 45995 * Returns: same as EmitRange 43529 45996 */ … … 43575 46042 43576 46043 /* leave unbracketed here so 'indent' works */ 43577 @@ -618,7 +66 1,7 @@46044 @@ -618,7 +662,7 @@ 43578 46045 if_USE_SCROLL_HINTS(win->_line[row].oldindex = row) 43579 46046 43580 46047 NCURSES_EXPORT(int) 43581 46048 -doupdate(void) 43582 + NCURSES_SP_NAME(doupdate)(NCURSES_SP_DCL0)46049 +TINFO_DOUPDATE(NCURSES_SP_DCL0) 43583 46050 { 43584 46051 int i; 43585 46052 int nonempty; 43586 @@ -626,30 +6 69,49 @@46053 @@ -626,30 +670,49 @@ 43587 46054 struct tms before, after; 43588 46055 #endif /* USE_TRACE_TIMES */ … … 43643 46110 * This is a transparent extension: XSI does not address it, 43644 46111 * and applications need not know that ncurses can do it. 43645 @@ -658,20 +72 0,20 @@46112 @@ -658,20 +721,20 @@ 43646 46113 * (this can happen in an xterm, for example), and resize the 43647 46114 * ncurses data structures accordingly. … … 43671 46138 #if USE_TRACE_TIMES 43672 46139 /* zero the metering machinery */ 43673 @@ -695,11 +75 7,11 @@46140 @@ -695,11 +758,11 @@ 43674 46141 int j, k; 43675 46142 attr_t rattr = A_NORMAL; … … 43687 46154 43688 46155 /* is an attribute turned on here? */ 43689 @@ -717,8 +7 79,8 @@46156 @@ -717,8 +780,8 @@ 43690 46157 * there's enough room to set the attribute before the first 43691 46158 * non-blank in the run. … … 43698 46165 continue; 43699 46166 } 43700 @@ -727,14 +7 89,14 @@46167 @@ -727,14 +790,14 @@ 43701 46168 for (k = 1; k <= magic_cookie_glitch; k++) { 43702 46169 if (j - k < 0 … … 43715 46182 : ":unsafe"))); 43716 46183 break; 43717 @@ -745,10 +80 7,11 @@46184 @@ -745,10 +808,11 @@ 43718 46185 int m, n = j; 43719 46186 … … 43731 46198 TR(TRACE_ATTRS, 43732 46199 ("Range attributed with %s ends at (%d, %d)", 43733 @@ -764,7 +82 7,8 @@46200 @@ -764,7 +828,8 @@ 43734 46201 foundit:; 43735 46202 … … 43741 46208 /* 43742 46209 * If there are safely-attributed blanks at the end of 43743 @@ -773,15 +83 7,15 @@46210 @@ -773,15 +838,15 @@ 43744 46211 */ 43745 46212 while (n >= 0 … … 43760 46227 TR(TRACE_ATTRS, 43761 46228 ("No room at end in %d,%d%s%s", 43762 @@ -789,7 +85 3,7 @@46229 @@ -789,7 +854,7 @@ 43763 46230 (ISBLANK(lastline[n + k]) 43764 46231 ? "" … … 43769 46236 : ":unsafe"))); 43770 46237 break; 43771 @@ -806,12 +87 0,12 @@46238 @@ -806,12 +871,12 @@ 43772 46239 _traceattr(turnon), i, j)); 43773 46240 … … 43786 46253 q = 0; 43787 46254 } 43788 @@ -837,7 +90 1,7 @@46255 @@ -837,7 +902,7 @@ 43789 46256 /* show altered highlights after magic-cookie check */ 43790 46257 if (USE_TRACEF(TRACE_UPDATE)) { … … 43795 46262 } 43796 46263 #endif /* TRACE */ 43797 @@ -845,23 +9 09,23 @@46264 @@ -845,23 +910,23 @@ 43798 46265 #endif /* USE_XMC_SUPPORT */ 43799 46266 … … 43828 46295 TR(TRACE_UPDATE, ("Transforming lines, nonempty %d", nonempty)); 43829 46296 for (i = 0; i < nonempty; i++) { 43830 @@ -869,7 +93 3,7 @@46297 @@ -869,7 +934,7 @@ 43831 46298 * Here is our line-breakout optimization. 43832 46299 */ … … 43837 46304 changedlines = 0; 43838 46305 } 43839 @@ -880,35 +94 4,35 @@46306 @@ -880,35 +945,35 @@ 43840 46307 * is normally set by _nc_scroll_window in the 43841 46308 * vertical-movement optimization code, … … 43888 46355 43889 46356 cleanup: 43890 @@ -921,10 +98 5,10 @@46357 @@ -921,10 +986,10 @@ 43891 46358 #if USE_XMC_SUPPORT 43892 46359 if (magic_cookie_glitch != 0) … … 43902 46369 #if USE_TRACE_TIMES 43903 46370 (void) times(&after); 43904 @@ -940,6 +100 4,14 @@46371 @@ -940,6 +1005,14 @@ 43905 46372 returnCode(OK); 43906 46373 } 43907 46374 43908 +#if NCURSES_SP_FUNCS 46375 +#if NCURSES_SP_FUNCS && !defined(USE_TERM_DRIVER) 43909 46376 +NCURSES_EXPORT(int) 43910 46377 +doupdate(void) 43911 46378 +{ 43912 + return NCURSES_SP_NAME(doupdate)(CURRENT_SCREEN);46379 + return TINFO_DOUPDATE(CURRENT_SCREEN); 43913 46380 +} 43914 46381 +#endif … … 43917 46384 * ClrBlank(win) 43918 46385 * 43919 @@ -951,14 +102 3,14 @@46386 @@ -951,14 +1024,14 @@ 43920 46387 * in the wbkgd() call. Assume 'stdscr' for this case. 43921 46388 */ … … 43935 46402 } 43936 46403 43937 @@ -970,23 +104 2,24 @@46404 @@ -970,23 +1043,24 @@ 43938 46405 */ 43939 46406 … … 43971 46438 } 43972 46439 43973 @@ -997,15 +107 0,16 @@46440 @@ -997,15 +1071,16 @@ 43974 46441 */ 43975 46442 … … 43993 46460 if (!CharEq(*cp, blank)) { 43994 46461 *cp = blank; 43995 @@ -1018,14 +109 2,14 @@46462 @@ -1018,14 +1093,14 @@ 43996 46463 } 43997 46464 … … 44013 46480 } 44014 46481 } 44015 @@ -1037,23 +111 1,29 @@46482 @@ -1037,23 +1112,29 @@ 44016 46483 */ 44017 46484 … … 44055 46522 } 44056 46523 44057 @@ -1065,26 +114 5,26 @@46524 @@ -1065,26 +1146,26 @@ 44058 46525 * screen, checking if each is blank, and one or more are changed. 44059 46526 */ … … 44088 46555 if (!ok) 44089 46556 top = row; 44090 @@ -1092,11 +117 2,11 @@46557 @@ -1092,11 +1173,11 @@ 44091 46558 44092 46559 /* don't use clr_eos for just one line if clr_eol available */ … … 44105 46572 } 44106 46573 } 44107 @@ -1105,15 +118 5,15 @@46574 @@ -1105,15 +1186,15 @@ 44108 46575 44109 46576 #if USE_XMC_SUPPORT … … 44127 46594 44128 46595 /* 44129 @@ -1135,19 +121 5,19 @@46596 @@ -1135,19 +1216,19 @@ 44130 46597 */ 44131 46598 … … 44153 46620 /* 44154 46621 * If we have colors, there is the possibility of having two color pairs 44155 @@ -1155,19 +123 5,20 @@46622 @@ -1155,19 +1236,20 @@ 44156 46623 * for this case, and update the old line with the new line's colors when 44157 46624 * they are equivalent. … … 44179 46646 } 44180 46647 } 44181 @@ -1177,7 +125 8,7 @@46648 @@ -1177,7 +1259,7 @@ 44182 46649 44183 46650 if (ceol_standout_glitch && clr_eol) { … … 44188 46655 attrchanged = TRUE; 44189 46656 break; 44190 @@ -1189,9 +127 0,13 @@46657 @@ -1189,9 +1271,13 @@ 44191 46658 firstChar = 0; 44192 46659 … … 44205 46672 44206 46673 /* 44207 @@ -1206,8 +129 1,8 @@46674 @@ -1206,8 +1292,8 @@ 44208 46675 * following operation. 44209 46676 */ … … 44216 46683 44217 46684 /* check for turn-on: 44218 @@ -1216,26 +130 1,30 @@46685 @@ -1216,26 +1302,30 @@ 44219 46686 */ 44220 46687 if (ISBLANK(newLine[n]) … … 44255 46722 } 44256 46723 44257 @@ -1246,38 +133 5,42 @@46724 @@ -1246,38 +1336,42 @@ 44258 46725 44259 46726 /* it may be cheap to clear leading whitespace with clr_bol */ … … 44311 46778 44312 46779 while (firstChar < nFirstChar) 44313 @@ -1286,29 +13 79,34 @@46780 @@ -1286,29 +1380,34 @@ 44314 46781 } 44315 46782 } else { … … 44353 46820 newLine + firstChar, 44354 46821 (nLastChar - firstChar + 1) * sizeof(NCURSES_CH_T)); 44355 @@ -1318,32 +141 6,44 @@46822 @@ -1318,32 +1417,44 @@ 44356 46823 } 44357 46824 … … 44411 46878 } else { 44412 46879 int nLastNonblank = nLastChar; 44413 @@ -1364,8 +147 4,13 @@46880 @@ -1364,8 +1475,13 @@ 44414 46881 44415 46882 n = min(oLastChar, nLastChar); … … 44427 46894 44428 46895 if (oLastChar < nLastChar) { 44429 @@ -1376,21 +149 1,26 @@46896 @@ -1376,21 +1492,26 @@ 44430 46897 --oLastChar; 44431 46898 } … … 44464 46931 /* 44465 46932 * The delete-char sequence will 44466 @@ -1400,18 +152 0,18 @@46933 @@ -1400,18 +1521,18 @@ 44467 46934 * setting the video attributes from 44468 46935 * the last character on the row. … … 44487 46954 return; 44488 46955 } 44489 @@ -1424,7 +154 4,7 @@46956 @@ -1424,7 +1545,7 @@ 44490 46957 */ 44491 46958 … … 44496 46963 int i, j; 44497 46964 bool fast_clear = (clear_screen || clr_eos || clr_eol); 44498 @@ -1432,9 +155 2,13 @@46965 @@ -1432,9 +1553,13 @@ 44499 46966 TR(TRACE_UPDATE, ("ClearScreen() called")); 44500 46967 … … 44513 46980 fast_clear = FALSE; 44514 46981 } 44515 @@ -1443,42 +156 7,46 @@46982 @@ -1443,42 +1568,46 @@ 44516 46983 44517 46984 if (fast_clear) { … … 44586 47053 44587 47054 TR(TRACE_UPDATE, ("screen cleared")); 44588 @@ -1492,49 +162 0,52 @@47055 @@ -1492,49 +1621,52 @@ 44589 47056 */ 44590 47057 … … 44651 47118 44652 47119 /* 44653 @@ -1545,22 +167 6,25 @@47120 @@ -1545,22 +1677,25 @@ 44654 47121 */ 44655 47122 … … 44684 47151 } 44685 47152 } 44686 @@ -1599,54 +173 3,66 @@47153 @@ -1599,54 +1734,66 @@ 44687 47154 44688 47155 /* Try to scroll up assuming given csr (miny, maxy). Returns ERR on failure */ … … 44774 47241 } 44775 47242 #endif 44776 @@ -1656,55 +180 2,66 @@47243 @@ -1656,55 +1803,66 @@ 44777 47244 /* Try to scroll down assuming given csr (miny, maxy). Returns ERR on failure */ 44778 47245 /* n > 0 */ … … 44864 47331 } 44865 47332 #endif 44866 @@ -1714,40 +187 1,46 @@47333 @@ -1714,40 +1872,46 @@ 44867 47334 /* scroll by using delete_line at del and insert_line at ins */ 44868 47335 /* n > 0 */ … … 44922 47389 } 44923 47390 44924 @@ -1763,15 +192 6,24 @@47391 @@ -1763,15 +1927,24 @@ 44925 47392 * save/restore cursor capabilities if the terminal has them. 44926 47393 */ … … 44950 47417 #if USE_XMC_SUPPORT 44951 47418 /* 44952 @@ -1787,34 +19 59,36 @@47419 @@ -1787,34 +1960,36 @@ 44953 47420 * Explicitly clear if stuff pushed off top of region might 44954 47421 * be saved by the terminal. … … 44998 47465 /* 44999 47466 * Clear the newly shifted-in text. 45000 @@ -1823,44 +199 7,49 @@47467 @@ -1823,44 +1998,49 @@ 45001 47468 && (non_dest_scroll_region || (memory_below && bot == maxy))) { 45002 47469 static const NCURSES_CH_T blank2 = NewChar(BLANK_TEXT); … … 45063 47530 /* 45064 47531 * Clear the newly shifted-in text. 45065 @@ -1869,8 +204 8,8 @@47532 @@ -1869,8 +2049,8 @@ 45066 47533 && (non_dest_scroll_region || (memory_above && top == 0))) { 45067 47534 static const NCURSES_CH_T blank2 = NewChar(BLANK_TEXT); … … 45074 47541 } 45075 47542 } 45076 @@ -1878,99 +205 7,159 @@47543 @@ -1878,99 +2058,159 @@ 45077 47544 if (res == ERR) 45078 47545 return (ERR); … … 45213 47680 45214 47681 - mvcur(SP->_cursrow, SP->_curscol, screen_lines - 1, 0); 45215 + NCURSES_SP_NAME(mvcur)(NCURSES_SP_ARGx45216 + 45217 + 45218 + 45219 + 47682 + TINFO_MVCUR(NCURSES_SP_ARGx 47683 + SP_PARM->_cursrow, 47684 + SP_PARM->_curscol, 47685 + screen_lines(SP_PARM) - 1, 47686 + 0); 45220 47687 45221 47688 - ClrToEOL(blank, TRUE); … … 45278 47745 diff -Naur ncurses-5.7.orig/ncurses/widechar/lib_add_wch.c ncurses-5.7/ncurses/widechar/lib_add_wch.c 45279 47746 --- ncurses-5.7.orig/ncurses/widechar/lib_add_wch.c 2006-12-02 13:19:17.000000000 -0800 45280 +++ ncurses-5.7/ncurses/widechar/lib_add_wch.c 2009-0 7-19 15:04:13.000000000 -070047747 +++ ncurses-5.7/ncurses/widechar/lib_add_wch.c 2009-09-12 08:51:56.000000000 -0700 45281 47748 @@ -1,5 +1,5 @@ 45282 47749 /**************************************************************************** … … 45286 47753 * Permission is hereby granted, free of charge, to any person obtaining a * 45287 47754 * copy of this software and associated documentation files (the * 45288 @@ -35,39 +35,3 89@@47755 @@ -35,39 +35,392 @@ 45289 47756 45290 47757 #include <curses.priv.h> … … 45297 47764 -NCURSES_EXPORT(int) 45298 47765 -wadd_wch(WINDOW *win, const cchar_t *wch) 45299 +MODULE_ID("$Id: lib_add_wch.c,v 1. 7 2009/07/04 21:59:25tom Exp $")47766 +MODULE_ID("$Id: lib_add_wch.c,v 1.8 2009/07/25 14:38:01 tom Exp $") 45300 47767 + 45301 47768 +/* clone/adapt lib_addch.c */ … … 45585 48052 + wchar_t *s; 45586 48053 + int tabsize = 8; 48054 +#if USE_REENTRANT 48055 + SCREEN *sp = _nc_screen_of(win); 48056 +#endif 45587 48057 + 45588 48058 + /* … … 45605 48075 + case '\t': 45606 48076 +#if USE_REENTRANT 45607 + tabsize = sp->_TABSIZE;48077 + tabsize = *ptrTabsize(sp); 45608 48078 +#else 45609 48079 + tabsize = TABSIZE; … … 45700 48170 45701 48171 TR(TRACE_VIRTPUT | TRACE_CCALLS, (T_RETURN("%d"), code)); 45702 @@ -77,37 +4 27,18 @@48172 @@ -77,37 +430,18 @@ 45703 48173 NCURSES_EXPORT(int) 45704 48174 wecho_wchar(WINDOW *win, const cchar_t *wch) … … 45748 48218 diff -Naur ncurses-5.7.orig/ncurses/widechar/lib_cchar.c ncurses-5.7/ncurses/widechar/lib_cchar.c 45749 48219 --- ncurses-5.7.orig/ncurses/widechar/lib_cchar.c 2007-05-12 12:03:06.000000000 -0700 45750 +++ ncurses-5.7/ncurses/widechar/lib_cchar.c 2009-0 7-19 15:04:17.000000000 -070048220 +++ ncurses-5.7/ncurses/widechar/lib_cchar.c 2009-09-12 08:51:54.000000000 -0700 45751 48221 @@ -1,5 +1,5 @@ 45752 48222 /**************************************************************************** … … 45791 48261 diff -Naur ncurses-5.7.orig/ncurses/widechar/lib_get_wch.c ncurses-5.7/ncurses/widechar/lib_get_wch.c 45792 48262 --- ncurses-5.7.orig/ncurses/widechar/lib_get_wch.c 2008-08-16 12:22:55.000000000 -0700 45793 +++ ncurses-5.7/ncurses/widechar/lib_get_wch.c 2009-0 7-19 15:03:53.000000000 -070048263 +++ ncurses-5.7/ncurses/widechar/lib_get_wch.c 2009-09-12 08:51:30.000000000 -0700 45794 48264 @@ -1,5 +1,5 @@ 45795 48265 /**************************************************************************** … … 45834 48304 diff -Naur ncurses-5.7.orig/ncurses/widechar/lib_get_wstr.c ncurses-5.7/ncurses/widechar/lib_get_wstr.c 45835 48305 --- ncurses-5.7.orig/ncurses/widechar/lib_get_wstr.c 2008-08-16 12:25:33.000000000 -0700 45836 +++ ncurses-5.7/ncurses/widechar/lib_get_wstr.c 2009-0 7-19 15:02:22.000000000 -070048306 +++ ncurses-5.7/ncurses/widechar/lib_get_wstr.c 2009-09-12 08:51:17.000000000 -0700 45837 48307 @@ -38,9 +38,8 @@ 45838 48308 */ … … 45848 48318 diff -Naur ncurses-5.7.orig/ncurses/widechar/lib_ins_wch.c ncurses-5.7/ncurses/widechar/lib_ins_wch.c 45849 48319 --- ncurses-5.7.orig/ncurses/widechar/lib_ins_wch.c 2005-12-03 12:24:19.000000000 -0800 45850 +++ ncurses-5.7/ncurses/widechar/lib_ins_wch.c 2009-0 7-19 15:04:04.000000000 -070048320 +++ ncurses-5.7/ncurses/widechar/lib_ins_wch.c 2009-09-12 08:51:42.000000000 -0700 45851 48321 @@ -1,5 +1,5 @@ 45852 48322 /**************************************************************************** … … 45885 48355 diff -Naur ncurses-5.7.orig/ncurses/widechar/lib_unget_wch.c ncurses-5.7/ncurses/widechar/lib_unget_wch.c 45886 48356 --- ncurses-5.7.orig/ncurses/widechar/lib_unget_wch.c 2008-06-07 07:50:37.000000000 -0700 45887 +++ ncurses-5.7/ncurses/widechar/lib_unget_wch.c 2009-0 7-19 15:03:53.000000000 -070048357 +++ ncurses-5.7/ncurses/widechar/lib_unget_wch.c 2009-09-12 08:51:30.000000000 -0700 45888 48358 @@ -1,5 +1,5 @@ 45889 48359 /**************************************************************************** … … 45942 48412 diff -Naur ncurses-5.7.orig/ncurses/widechar/lib_vid_attr.c ncurses-5.7/ncurses/widechar/lib_vid_attr.c 45943 48413 --- ncurses-5.7.orig/ncurses/widechar/lib_vid_attr.c 2007-06-30 15:03:02.000000000 -0700 45944 +++ ncurses-5.7/ncurses/widechar/lib_vid_attr.c 2009-0 7-19 15:04:00.000000000 -070048414 +++ ncurses-5.7/ncurses/widechar/lib_vid_attr.c 2009-09-12 08:51:37.000000000 -0700 45945 48415 @@ -1,5 +1,5 @@ 45946 48416 /**************************************************************************** … … 46174 48644 diff -Naur ncurses-5.7.orig/ncurses/widechar/lib_wacs.c ncurses-5.7/ncurses/widechar/lib_wacs.c 46175 48645 --- ncurses-5.7.orig/ncurses/widechar/lib_wacs.c 2006-12-17 07:16:17.000000000 -0800 46176 +++ ncurses-5.7/ncurses/widechar/lib_wacs.c 2009-0 7-19 15:02:22.000000000 -070048646 +++ ncurses-5.7/ncurses/widechar/lib_wacs.c 2009-09-12 08:51:17.000000000 -0700 46177 48647 @@ -31,9 +31,8 @@ 46178 48648 ****************************************************************************/ … … 46188 48658 diff -Naur ncurses-5.7.orig/ncurses/widechar/lib_wunctrl.c ncurses-5.7/ncurses/widechar/lib_wunctrl.c 46189 48659 --- ncurses-5.7.orig/ncurses/widechar/lib_wunctrl.c 2007-06-12 13:22:32.000000000 -0700 46190 +++ ncurses-5.7/ncurses/widechar/lib_wunctrl.c 2009-0 7-19 15:03:53.000000000 -070048660 +++ ncurses-5.7/ncurses/widechar/lib_wunctrl.c 2009-09-12 08:51:30.000000000 -0700 46191 48661 @@ -1,5 +1,5 @@ 46192 48662 /**************************************************************************** … … 46237 48707 diff -Naur ncurses-5.7.orig/ncurses/win32con/gettimeofday.c ncurses-5.7/ncurses/win32con/gettimeofday.c 46238 48708 --- ncurses-5.7.orig/ncurses/win32con/gettimeofday.c 1969-12-31 16:00:00.000000000 -0800 46239 +++ ncurses-5.7/ncurses/win32con/gettimeofday.c 2009-0 7-19 15:04:11.000000000 -070048709 +++ ncurses-5.7/ncurses/win32con/gettimeofday.c 2009-09-12 08:51:49.000000000 -0700 46240 48710 @@ -0,0 +1,51 @@ 46241 48711 +/**************************************************************************** … … 46292 48762 diff -Naur ncurses-5.7.orig/ncurses/win32con/win_driver.c ncurses-5.7/ncurses/win32con/win_driver.c 46293 48763 --- ncurses-5.7.orig/ncurses/win32con/win_driver.c 1969-12-31 16:00:00.000000000 -0800 46294 +++ ncurses-5.7/ncurses/win32con/win_driver.c 2009-0 7-19 15:04:11.000000000 -070048764 +++ ncurses-5.7/ncurses/win32con/win_driver.c 2009-09-12 08:51:49.000000000 -0700 46295 48765 @@ -0,0 +1,1085 @@ 46296 48766 +/**************************************************************************** … … 47381 49851 diff -Naur ncurses-5.7.orig/NEWS ncurses-5.7/NEWS 47382 49852 --- ncurses-5.7.orig/NEWS 2008-11-01 17:56:22.000000000 -0700 47383 +++ ncurses-5.7/NEWS 2009-0 7-19 15:04:17.000000000 -070049853 +++ ncurses-5.7/NEWS 2009-09-12 08:52:10.000000000 -0700 47384 49854 @@ -1,5 +1,5 @@ 47385 49855 ------------------------------------------------------------------------------- … … 47394 49864 ------------------------------------------------------------------------------- 47395 49865 --- $Id: NEWS,v 1.1320 2008/11/02 00:56:22 tom Exp $ 47396 +-- $Id: NEWS,v 1.14 09 2009/07/19 00:09:05tom Exp $49866 +-- $Id: NEWS,v 1.1430 2009/09/06 16:03:13 tom Exp $ 47397 49867 ------------------------------------------------------------------------------- 47398 49868 47399 49869 This is a log of changes that ncurses has gone through since Zeyd started 47400 @@ -45,6 +45,3 00@@49870 @@ -45,6 +45,362 @@ 47401 49871 Changes through 1.9.9e did not credit all contributions; 47402 49872 it is not possible to add this information. 47403 49873 49874 +20090906 49875 + + fix typo s/is_timeout/is_notimeout/ which made "man is_notimeout" not 49876 + work. 49877 + + add null-pointer checks to other opaque-functions. 49878 + + add is_pad() and is_subwin() functions for opaque access to WINDOW 49879 + (discussion with Mark Dickinson). 49880 + + correct merge to lib_newterm.c, which broke when sp-funcs was 49881 + enabled. 49882 + 49883 +20090905 49884 + + build-fix for building outside source-tree (report by Sven Joachim). 49885 + + fix Debian lintian warning for man/tabs.1 by making section number 49886 + agree with file-suffix (report by Sven Joachim). 49887 + + continue integrating "sp-funcs" by Juergen Pfeifer (incomplete). 49888 + 49889 +20090829 49890 + + workaround for bug in g++ 4.1-4.4 warnings for wattrset() macro on 49891 + amd64 (Debian #542031). 49892 + + fix typo in curs_mouse.3x (Debian #429198). 49893 + 49894 +20090822 49895 + + continue integrating "sp-funcs" by Juergen Pfeifer (incomplete). 49896 + 49897 +20090815 49898 + + correct use of terminfo capabilities for initializing soft-keys, 49899 + broken in 20090509 merging. 49900 + + modify wgetch() to ensure it checks SIGWINCH when it gets an error 49901 + in non-blocking mode (patch by Clemens Ladisch). 49902 + + use PATH_SEPARATOR symbol when substituting into run_tic.sh, to 49903 + help with builds on non-Unix platforms such as OS/2 EMX. 49904 + + modify scripting for misc/run_tic.sh to test configure script's 49905 + $cross_compiling variable directly rather than comparing host/build 49906 + compiler names (prompted by comment in GenToo #249363). 49907 + + fix configure script option --with-database, which was coded as an 49908 + enable-type switch. 49909 + + build-fixes for --srcdir (report by Frederic L W Meunier). 49910 + 49911 +20090808 49912 + + separate _nc_find_entry() and _nc_find_type_entry() from 49913 + implementation details of hash function. 49914 + 49915 +20090803 49916 + + add tabs.1 to man/man_db.renames 49917 + + modify lib_addch.c to compensate for removal of wide-character test 49918 + from unctrl() in 20090704 (Debian #539735). 49919 + 49920 +20090801 49921 + + improve discussion in INSTALL for use of system's tic/infocmp for 49922 + cross-compiling and building fallbacks. 49923 + + modify test/demo_termcap.c to correspond better to options in 49924 + test/demo_terminfo.c 49925 + + continue integrating "sp-funcs" by Juergen Pfeifer (incomplete). 49926 + + fix logic for 'V' in test/ncurses.c tests f/F. 49927 + 49928 +20090728 49929 + + correct logic in tigetnum(), which caused tput program to treat all 49930 + string capabilities as numeric (report by Rajeev V Pillai, 49931 + cf: 20090711). 49932 + 49933 +20090725 49934 + + continue integrating "sp-funcs" by Juergen Pfeifer (incomplete). 49935 + 47404 49936 +20090718 47405 49937 + + fix a null-pointer check in _nc_format_slks() in lib_slk.c, from … … 47701 50233 diff -Naur ncurses-5.7.orig/panel/Makefile.in ncurses-5.7/panel/Makefile.in 47702 50234 --- ncurses-5.7.orig/panel/Makefile.in 2007-04-28 07:56:11.000000000 -0700 47703 +++ ncurses-5.7/panel/Makefile.in 2009-0 7-19 15:03:48.000000000 -070050235 +++ ncurses-5.7/panel/Makefile.in 2009-09-12 08:51:25.000000000 -0700 47704 50236 @@ -1,6 +1,6 @@ 47705 50237 -# $Id: Makefile.in,v 1.52 2007/04/28 14:56:11 tom Exp $ … … 47730 50262 diff -Naur ncurses-5.7.orig/panel/p_above.c ncurses-5.7/panel/p_above.c 47731 50263 --- ncurses-5.7.orig/panel/p_above.c 2005-02-19 08:44:57.000000000 -0800 47732 +++ ncurses-5.7/panel/p_above.c 2009-0 7-19 15:03:51.000000000 -070050264 +++ ncurses-5.7/panel/p_above.c 2009-09-12 08:51:28.000000000 -0700 47733 50265 @@ -1,5 +1,5 @@ 47734 50266 /**************************************************************************** … … 47802 50334 diff -Naur ncurses-5.7.orig/panel/panel.c ncurses-5.7/panel/panel.c 47803 50335 --- ncurses-5.7.orig/panel/panel.c 2005-02-19 10:04:31.000000000 -0800 47804 +++ ncurses-5.7/panel/panel.c 2009-0 7-19 15:03:51.000000000 -070050336 +++ ncurses-5.7/panel/panel.c 2009-09-12 08:51:28.000000000 -0700 47805 50337 @@ -1,5 +1,5 @@ 47806 50338 /**************************************************************************** … … 47837 50369 diff -Naur ncurses-5.7.orig/panel/panel.h ncurses-5.7/panel/panel.h 47838 50370 --- ncurses-5.7.orig/panel/panel.h 2006-05-27 12:49:40.000000000 -0700 47839 +++ ncurses-5.7/panel/panel.h 2009-0 7-19 15:03:51.000000000 -070050371 +++ ncurses-5.7/panel/panel.h 2009-09-12 08:51:28.000000000 -0700 47840 50372 @@ -1,5 +1,5 @@ 47841 50373 /**************************************************************************** … … 47873 50405 diff -Naur ncurses-5.7.orig/panel/panel.priv.h ncurses-5.7/panel/panel.priv.h 47874 50406 --- ncurses-5.7.orig/panel/panel.priv.h 2008-09-27 15:36:11.000000000 -0700 47875 +++ ncurses-5.7/panel/panel.priv.h 2009-0 7-19 15:03:51.000000000 -070050407 +++ ncurses-5.7/panel/panel.priv.h 2009-09-12 08:51:28.000000000 -0700 47876 50408 @@ -1,5 +1,5 @@ 47877 50409 /**************************************************************************** … … 47986 50518 diff -Naur ncurses-5.7.orig/panel/p_below.c ncurses-5.7/panel/p_below.c 47987 50519 --- ncurses-5.7.orig/panel/p_below.c 2005-02-19 08:45:10.000000000 -0800 47988 +++ ncurses-5.7/panel/p_below.c 2009-0 7-19 15:03:51.000000000 -070050520 +++ ncurses-5.7/panel/p_below.c 2009-09-12 08:51:28.000000000 -0700 47989 50521 @@ -1,5 +1,5 @@ 47990 50522 /**************************************************************************** … … 48059 50591 diff -Naur ncurses-5.7.orig/panel/p_bottom.c ncurses-5.7/panel/p_bottom.c 48060 50592 --- ncurses-5.7.orig/panel/p_bottom.c 2005-02-19 08:38:16.000000000 -0800 48061 +++ ncurses-5.7/panel/p_bottom.c 2009-0 7-19 15:03:51.000000000 -070050593 +++ ncurses-5.7/panel/p_bottom.c 2009-09-12 08:51:28.000000000 -0700 48062 50594 @@ -1,5 +1,5 @@ 48063 50595 /**************************************************************************** … … 48094 50626 diff -Naur ncurses-5.7.orig/panel/p_delete.c ncurses-5.7/panel/p_delete.c 48095 50627 --- ncurses-5.7.orig/panel/p_delete.c 2005-02-19 08:38:45.000000000 -0800 48096 +++ ncurses-5.7/panel/p_delete.c 2009-0 7-19 15:03:51.000000000 -070050628 +++ ncurses-5.7/panel/p_delete.c 2009-09-12 08:51:28.000000000 -0700 48097 50629 @@ -1,5 +1,5 @@ 48098 50630 /**************************************************************************** … … 48135 50667 diff -Naur ncurses-5.7.orig/panel/p_hidden.c ncurses-5.7/panel/p_hidden.c 48136 50668 --- ncurses-5.7.orig/panel/p_hidden.c 2005-02-19 08:39:17.000000000 -0800 48137 +++ ncurses-5.7/panel/p_hidden.c 2009-0 7-19 15:03:51.000000000 -070050669 +++ ncurses-5.7/panel/p_hidden.c 2009-09-12 08:51:28.000000000 -0700 48138 50670 @@ -1,5 +1,5 @@ 48139 50671 /**************************************************************************** … … 48176 50708 diff -Naur ncurses-5.7.orig/panel/p_hide.c ncurses-5.7/panel/p_hide.c 48177 50709 --- ncurses-5.7.orig/panel/p_hide.c 2005-02-19 08:39:41.000000000 -0800 48178 +++ ncurses-5.7/panel/p_hide.c 2009-0 7-19 15:03:51.000000000 -070050710 +++ ncurses-5.7/panel/p_hide.c 2009-09-12 08:51:28.000000000 -0700 48179 50711 @@ -36,23 +36,27 @@ 48180 50712 */ … … 48215 50747 diff -Naur ncurses-5.7.orig/panel/p_move.c ncurses-5.7/panel/p_move.c 48216 50748 --- ncurses-5.7.orig/panel/p_move.c 2005-02-19 08:46:49.000000000 -0800 48217 +++ ncurses-5.7/panel/p_move.c 2009-0 7-19 15:03:51.000000000 -070050749 +++ ncurses-5.7/panel/p_move.c 2009-09-12 08:51:28.000000000 -0700 48218 50750 @@ -1,5 +1,5 @@ 48219 50751 /**************************************************************************** … … 48267 50799 diff -Naur ncurses-5.7.orig/panel/p_new.c ncurses-5.7/panel/p_new.c 48268 50800 --- ncurses-5.7.orig/panel/p_new.c 2008-08-04 11:25:48.000000000 -0700 48269 +++ ncurses-5.7/panel/p_new.c 2009-0 7-19 15:03:51.000000000 -070050801 +++ ncurses-5.7/panel/p_new.c 2009-09-12 08:51:28.000000000 -0700 48270 50802 @@ -1,5 +1,5 @@ 48271 50803 /**************************************************************************** … … 48335 50867 diff -Naur ncurses-5.7.orig/panel/p_replace.c ncurses-5.7/panel/p_replace.c 48336 50868 --- ncurses-5.7.orig/panel/p_replace.c 2005-02-19 08:41:31.000000000 -0800 48337 +++ ncurses-5.7/panel/p_replace.c 2009-0 7-19 15:03:51.000000000 -070050869 +++ ncurses-5.7/panel/p_replace.c 2009-09-12 08:51:28.000000000 -0700 48338 50870 @@ -36,23 +36,25 @@ 48339 50871 */ … … 48375 50907 diff -Naur ncurses-5.7.orig/panel/p_show.c ncurses-5.7/panel/p_show.c 48376 50908 --- ncurses-5.7.orig/panel/p_show.c 2005-02-19 08:42:02.000000000 -0800 48377 +++ ncurses-5.7/panel/p_show.c 2009-0 7-19 15:03:51.000000000 -070050909 +++ ncurses-5.7/panel/p_show.c 2009-09-12 08:51:28.000000000 -0700 48378 50910 @@ -36,34 +36,37 @@ 48379 50911 */ … … 48432 50964 diff -Naur ncurses-5.7.orig/panel/p_update.c ncurses-5.7/panel/p_update.c 48433 50965 --- ncurses-5.7.orig/panel/p_update.c 2005-02-19 08:49:47.000000000 -0800 48434 +++ ncurses-5.7/panel/p_update.c 2009-0 7-19 15:03:51.000000000 -070050966 +++ ncurses-5.7/panel/p_update.c 2009-09-12 08:51:28.000000000 -0700 48435 50967 @@ -1,5 +1,5 @@ 48436 50968 /**************************************************************************** … … 48506 51038 diff -Naur ncurses-5.7.orig/progs/Makefile.in ncurses-5.7/progs/Makefile.in 48507 51039 --- ncurses-5.7.orig/progs/Makefile.in 2008-09-07 06:58:55.000000000 -0700 48508 +++ ncurses-5.7/progs/Makefile.in 2009-0 7-19 15:03:48.000000000 -070051040 +++ ncurses-5.7/progs/Makefile.in 2009-09-12 08:51:25.000000000 -0700 48509 51041 @@ -1,6 +1,6 @@ 48510 51042 -# $Id: Makefile.in,v 1.79 2008/09/07 13:58:55 tom Exp $ … … 48617 51149 diff -Naur ncurses-5.7.orig/progs/modules ncurses-5.7/progs/modules 48618 51150 --- ncurses-5.7.orig/progs/modules 2006-12-23 16:53:21.000000000 -0800 48619 +++ ncurses-5.7/progs/modules 2009-0 7-19 15:03:43.000000000 -070051151 +++ ncurses-5.7/progs/modules 2009-09-12 08:51:21.000000000 -0700 48620 51152 @@ -1,7 +1,7 @@ 48621 51153 -# $Id: modules,v 1.13 2006/12/24 00:53:21 tom Exp $ … … 48640 51172 diff -Naur ncurses-5.7.orig/progs/tabs.c ncurses-5.7/progs/tabs.c 48641 51173 --- ncurses-5.7.orig/progs/tabs.c 1969-12-31 16:00:00.000000000 -0800 48642 +++ ncurses-5.7/progs/tabs.c 2009-0 7-19 15:01:57.000000000 -070051174 +++ ncurses-5.7/progs/tabs.c 2009-09-12 08:50:52.000000000 -0700 48643 51175 @@ -0,0 +1,506 @@ 48644 51176 +/**************************************************************************** … … 49150 51682 diff -Naur ncurses-5.7.orig/progs/tic.c ncurses-5.7/progs/tic.c 49151 51683 --- ncurses-5.7.orig/progs/tic.c 2008-09-13 09:59:24.000000000 -0700 49152 +++ ncurses-5.7/progs/tic.c 2009-0 7-19 15:03:43.000000000 -070051684 +++ ncurses-5.7/progs/tic.c 2009-09-12 08:51:21.000000000 -0700 49153 51685 @@ -1,5 +1,5 @@ 49154 51686 /**************************************************************************** … … 49183 51715 diff -Naur ncurses-5.7.orig/progs/tput.c ncurses-5.7/progs/tput.c 49184 51716 --- ncurses-5.7.orig/progs/tput.c 2008-07-13 04:05:12.000000000 -0700 49185 +++ ncurses-5.7/progs/tput.c 2009-0 7-19 15:03:43.000000000 -070051717 +++ ncurses-5.7/progs/tput.c 2009-09-12 08:51:21.000000000 -0700 49186 51718 @@ -1,5 +1,5 @@ 49187 51719 /**************************************************************************** … … 49213 51745 diff -Naur ncurses-5.7.orig/progs/transform.c ncurses-5.7/progs/transform.c 49214 51746 --- ncurses-5.7.orig/progs/transform.c 1969-12-31 16:00:00.000000000 -0800 49215 +++ ncurses-5.7/progs/transform.c 2009-0 7-19 15:03:43.000000000 -070051747 +++ ncurses-5.7/progs/transform.c 2009-09-12 08:51:21.000000000 -0700 49216 51748 @@ -0,0 +1,79 @@ 49217 51749 +/**************************************************************************** … … 49296 51828 diff -Naur ncurses-5.7.orig/progs/tset.c ncurses-5.7/progs/tset.c 49297 51829 --- ncurses-5.7.orig/progs/tset.c 2008-10-11 12:26:19.000000000 -0700 49298 +++ ncurses-5.7/progs/tset.c 2009-0 7-19 15:03:43.000000000 -070051830 +++ ncurses-5.7/progs/tset.c 2009-09-12 08:51:21.000000000 -0700 49299 51831 @@ -1,5 +1,5 @@ 49300 51832 /**************************************************************************** … … 49324 51856 diff -Naur ncurses-5.7.orig/README.MinGW ncurses-5.7/README.MinGW 49325 51857 --- ncurses-5.7.orig/README.MinGW 1969-12-31 16:00:00.000000000 -0800 49326 +++ ncurses-5.7/README.MinGW 2009-0 7-19 15:04:11.000000000 -070051858 +++ ncurses-5.7/README.MinGW 2009-09-12 08:51:49.000000000 -0700 49327 51859 @@ -0,0 +1,79 @@ 49328 51860 +------------------------------------------------------------------------------- … … 49407 51939 diff -Naur ncurses-5.7.orig/test/aclocal.m4 ncurses-5.7/test/aclocal.m4 49408 51940 --- ncurses-5.7.orig/test/aclocal.m4 2008-02-09 10:22:17.000000000 -0800 49409 +++ ncurses-5.7/test/aclocal.m4 2009-0 7-19 15:04:17.000000000 -070051941 +++ ncurses-5.7/test/aclocal.m4 2009-09-12 08:51:54.000000000 -0700 49410 51942 @@ -1,5 +1,5 @@ 49411 51943 dnl*************************************************************************** … … 50311 52843 +#endif 50312 52844 +]) 52845 diff -Naur ncurses-5.7.orig/test/blue.c ncurses-5.7/test/blue.c 52846 --- ncurses-5.7.orig/test/blue.c 2008-08-03 11:20:27.000000000 -0700 52847 +++ ncurses-5.7/test/blue.c 2009-09-12 08:52:07.000000000 -0700 52848 @@ -1,5 +1,5 @@ 52849 /**************************************************************************** 52850 - * Copyright (c) 1998-2006,2008 Free Software Foundation, Inc. * 52851 + * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. * 52852 * * 52853 * Permission is hereby granted, free of charge, to any person obtaining a * 52854 * copy of this software and associated documentation files (the * 52855 @@ -40,7 +40,7 @@ 52856 * results, use the ncurses(3) library. On non-Intel machines, SVr4 curses is 52857 * just as good. 52858 * 52859 - * $Id: blue.c,v 1.30 2008/08/03 18:20:27 tom Exp $ 52860 + * $Id: blue.c,v 1.31 2009/08/29 19:02:25 tom Exp $ 52861 */ 52862 52863 #include <test.priv.h> 52864 @@ -353,9 +353,9 @@ 52865 } 52866 52867 move(PROMPTROW, 0); 52868 - standout(); 52869 + (void) standout(); 52870 (void) printw("Finished deal %d - type any character to continue...", deal_number); 52871 - standend(); 52872 + (void) standend(); 52873 (void) getch(); 52874 } 52875 52876 @@ -386,7 +386,7 @@ 52877 { 52878 clear(); 52879 (void) printw("You finished the game in %d deals. This is ", deal); 52880 - standout(); 52881 + (void) standout(); 52882 if (deal < 2) 52883 (void) addstr("excellent"); 52884 else if (deal < 4) 52885 @@ -395,7 +395,7 @@ 52886 (void) addstr("average"); 52887 else 52888 (void) addstr("poor"); 52889 - standend(); 52890 + (void) standend(); 52891 (void) addstr(". "); 52892 refresh(); 52893 } 52894 diff -Naur ncurses-5.7.orig/test/bs.c ncurses-5.7/test/bs.c 52895 --- ncurses-5.7.orig/test/bs.c 2008-08-03 11:30:28.000000000 -0700 52896 +++ ncurses-5.7/test/bs.c 2009-09-12 08:52:07.000000000 -0700 52897 @@ -1,5 +1,5 @@ 52898 /**************************************************************************** 52899 - * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. * 52900 + * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. * 52901 * * 52902 * Permission is hereby granted, free of charge, to any person obtaining a * 52903 * copy of this software and associated documentation files (the * 52904 @@ -34,7 +34,7 @@ 52905 * v2.0 featuring strict ANSI/POSIX conformance, November 1993. 52906 * v2.1 with ncurses mouse support, September 1995 52907 * 52908 - * $Id: bs.c,v 1.47 2008/08/03 18:30:28 tom Exp $ 52909 + * $Id: bs.c,v 1.48 2009/08/29 19:02:25 tom Exp $ 52910 */ 52911 52912 #include <test.priv.h> 52913 @@ -374,7 +374,7 @@ 52914 for (j = 0; j < BWIDTH; j++) 52915 (void) addstr(" . "); 52916 #ifdef A_COLOR 52917 - attrset(0); 52918 + (void) attrset(0); 52919 #endif /* A_COLOR */ 52920 (void) addch(' '); 52921 (void) addch((chtype) (i + 'A')); 52922 @@ -392,7 +392,7 @@ 52923 for (j = 0; j < BWIDTH; j++) 52924 (void) addstr(" . "); 52925 #ifdef A_COLOR 52926 - attrset(0); 52927 + (void) attrset(0); 52928 #endif /* A_COLOR */ 52929 (void) addch(' '); 52930 (void) addch((chtype) (i + 'A')); 52931 @@ -773,7 +773,7 @@ 52932 #endif /* A_COLOR */ 52933 (void) addch(MARK_MISS); 52934 #ifdef A_COLOR 52935 - attrset(0); 52936 + (void) attrset(0); 52937 #endif /* A_COLOR */ 52938 } else { 52939 pgoto(y1, x1); 52940 @@ -799,7 +799,7 @@ 52941 #endif /* A_COLOR */ 52942 (void) addch(SHOWHIT); 52943 #ifdef A_COLOR 52944 - attrset(0); 52945 + (void) attrset(0); 52946 #endif /* A_COLOR */ 52947 } 52948 } 52949 @@ -841,7 +841,7 @@ 52950 #endif /* A_COLOR */ 52951 (void) addch((chtype) hits[PLAYER][curx][cury]); 52952 #ifdef A_COLOR 52953 - attrset(0); 52954 + (void) attrset(0); 52955 #endif /* A_COLOR */ 52956 52957 prompt(1, "You %s.", hit ? "scored a hit" : "missed"); 52958 @@ -971,7 +971,7 @@ 52959 #endif /* A_COLOR */ 52960 (void) addch((chtype) (hit ? SHOWHIT : SHOWSPLASH)); 52961 #ifdef A_COLOR 52962 - attrset(0); 52963 + (void) attrset(0); 52964 #endif /* A_COLOR */ 52965 52966 return hit ? (sunk ? S_SUNK : S_HIT) : S_MISS; 50313 52967 diff -Naur ncurses-5.7.orig/test/chgat.c ncurses-5.7/test/chgat.c 50314 52968 --- ncurses-5.7.orig/test/chgat.c 2008-02-09 15:19:13.000000000 -0800 50315 +++ ncurses-5.7/test/chgat.c 2009-0 7-19 15:04:17.000000000 -070052969 +++ ncurses-5.7/test/chgat.c 2009-09-12 08:51:54.000000000 -0700 50316 52970 @@ -1,5 +1,5 @@ 50317 52971 /**************************************************************************** … … 50350 53004 diff -Naur ncurses-5.7.orig/test/clip_printw.c ncurses-5.7/test/clip_printw.c 50351 53005 --- ncurses-5.7.orig/test/clip_printw.c 1969-12-31 16:00:00.000000000 -0800 50352 +++ ncurses-5.7/test/clip_printw.c 2009-0 7-19 15:04:17.000000000 -070050353 @@ -0,0 +1,37 7@@53006 +++ ncurses-5.7/test/clip_printw.c 2009-09-12 08:52:07.000000000 -0700 53007 @@ -0,0 +1,378 @@ 50354 53008 +/**************************************************************************** 50355 53009 + * Copyright (c) 2008,2009 Free Software Foundation, Inc. * … … 50380 53034 + ****************************************************************************/ 50381 53035 +/* 50382 + * $Id: clip_printw.c,v 1. 3 2009/07/17 09:28:52tom Exp $53036 + * $Id: clip_printw.c,v 1.4 2009/08/29 19:00:44 tom Exp $ 50383 53037 + * 50384 53038 + * demonstrate how to use printw without wrapping. … … 50681 53335 + switch (st.ch) { 50682 53336 + case '.': /* change from current position */ 50683 + wattrset(win, st.attr | COLOR_PAIR(st.pair));53337 + (void) wattrset(win, st.attr | COLOR_PAIR(st.pair)); 50684 53338 + if (st.count > 0) { 50685 53339 + need = st.count + 1; … … 50721 53375 + ExitProgram(EXIT_SUCCESS); 50722 53376 +} 53377 + 50723 53378 +#else 50724 53379 +int … … 50731 53386 diff -Naur ncurses-5.7.orig/test/configure ncurses-5.7/test/configure 50732 53387 --- ncurses-5.7.orig/test/configure 2008-09-06 15:11:48.000000000 -0700 50733 +++ ncurses-5.7/test/configure 2009-0 7-19 15:04:17.000000000 -070053388 +++ ncurses-5.7/test/configure 2009-09-12 08:51:54.000000000 -0700 50734 53389 @@ -194,6 +194,7 @@ 50735 53390 --with-Xaw3d link with Xaw 3d library … … 59248 61903 diff -Naur ncurses-5.7.orig/test/configure.in ncurses-5.7/test/configure.in 59249 61904 --- ncurses-5.7.orig/test/configure.in 2008-09-06 15:10:23.000000000 -0700 59250 +++ ncurses-5.7/test/configure.in 2009-0 7-19 15:04:17.000000000 -070061905 +++ ncurses-5.7/test/configure.in 2009-09-12 08:51:54.000000000 -0700 59251 61906 @@ -1,5 +1,5 @@ 59252 61907 dnl*************************************************************************** … … 59327 61982 diff -Naur ncurses-5.7.orig/test/demo_forms.c ncurses-5.7/test/demo_forms.c 59328 61983 --- ncurses-5.7.orig/test/demo_forms.c 2008-10-18 13:38:20.000000000 -0700 59329 +++ ncurses-5.7/test/demo_forms.c 2009-0 7-19 15:04:04.000000000 -070061984 +++ ncurses-5.7/test/demo_forms.c 2009-09-12 08:52:07.000000000 -0700 59330 61985 @@ -1,5 +1,5 @@ 59331 61986 /**************************************************************************** … … 59340 61995 /* 59341 61996 - * $Id: demo_forms.c,v 1.30 2008/10/18 20:38:20 tom Exp $ 59342 + * $Id: demo_forms.c,v 1.3 2 2009/05/30 16:52:42tom Exp $61997 + * $Id: demo_forms.c,v 1.33 2009/08/29 18:47:26 tom Exp $ 59343 61998 * 59344 61999 * Demonstrate a variety of functions from the form library. … … 59367 62022 set_field_buffer(f, 0, t_value); 59368 62023 } 62024 @@ -300,13 +307,13 @@ 62025 } 62026 62027 waddch(win, ' '); 62028 - wattrset(win, field_fore(field)); 62029 + (void) wattrset(win, field_fore(field)); 62030 waddstr(win, "fore"); 62031 wattroff(win, field_fore(field)); 62032 62033 waddch(win, '/'); 62034 62035 - wattrset(win, field_back(field)); 62036 + (void) wattrset(win, field_back(field)); 62037 waddstr(win, "back"); 62038 wattroff(win, field_back(field)); 62039 62040 @@ -317,7 +324,7 @@ 62041 for (nbuf = 0; nbuf <= 2; ++nbuf) { 62042 if ((buffer = field_buffer(field, nbuf)) != 0) { 62043 wprintw(win, "buffer %d:", nbuf); 62044 - wattrset(win, A_REVERSE); 62045 + (void) wattrset(win, A_REVERSE); 62046 waddstr(win, buffer); 62047 wattroff(win, A_REVERSE); 62048 waddstr(win, "\n"); 59369 62049 @@ -444,8 +451,11 @@ 59370 62050 … … 59380 62060 nl(); 59381 62061 62062 diff -Naur ncurses-5.7.orig/test/demo_termcap.c ncurses-5.7/test/demo_termcap.c 62063 --- ncurses-5.7.orig/test/demo_termcap.c 2008-02-09 10:08:36.000000000 -0800 62064 +++ ncurses-5.7/test/demo_termcap.c 2009-09-12 08:51:59.000000000 -0700 62065 @@ -1,5 +1,5 @@ 62066 /**************************************************************************** 62067 - * Copyright (c) 2005-2007,2008 Free Software Foundation, Inc. * 62068 + * Copyright (c) 2005-2008,2009 Free Software Foundation, Inc. * 62069 * * 62070 * Permission is hereby granted, free of charge, to any person obtaining a * 62071 * copy of this software and associated documentation files (the * 62072 @@ -29,7 +29,7 @@ 62073 /* 62074 * Author: Thomas E. Dickey 62075 * 62076 - * $Id: demo_termcap.c,v 1.7 2008/02/09 18:08:36 tom Exp $ 62077 + * $Id: demo_termcap.c,v 1.11 2009/08/02 00:02:53 tom Exp $ 62078 * 62079 * A simple demo of the termcap interface. 62080 */ 62081 @@ -38,10 +38,25 @@ 62082 62083 #if HAVE_TGETENT 62084 62085 +#if defined(HAVE_CURSES_DATA_BOOLNAMES) || defined(DECL_CURSES_DATA_BOOLNAMES) 62086 +#define USE_CODE_LISTS 1 62087 +#else 62088 +#define USE_CODE_LISTS 0 62089 +#endif 62090 + 62091 +#define FCOLS 8 62092 +#define FNAME(type) "%s %-*s = ", #type, FCOLS 62093 + 62094 +#if USE_CODE_LISTS 62095 +static bool b_opt = FALSE; 62096 +static bool n_opt = FALSE; 62097 +static bool s_opt = FALSE; 62098 +#endif 62099 + 62100 #define isCapName(c) (isgraph(c) && strchr("^#=:\\", c) == 0) 62101 62102 static void 62103 -dumpit(char *cap) 62104 +dumpit(NCURSES_CONST char *cap) 62105 { 62106 /* 62107 * One of the limitations of the termcap interface is that the library 62108 @@ -59,7 +74,7 @@ 62109 * Note that the strings returned are mostly terminfo format, since 62110 * ncurses does not convert except for a handful of special cases. 62111 */ 62112 - printf("str %s = ", cap); 62113 + printf(FNAME(str), cap); 62114 while (*str != 0) { 62115 int ch = UChar(*str++); 62116 switch (ch) { 62117 @@ -108,15 +123,17 @@ 62118 } 62119 printf("\n"); 62120 } else if ((num = tgetnum(cap)) >= 0) { 62121 - printf("num %s = %d\n", cap, num); 62122 + printf(FNAME(num), cap); 62123 + printf(" %d\n", num); 62124 } else if ((num = tgetflag(cap)) > 0) { 62125 - printf("flg %s\n", cap); 62126 + printf(FNAME(flg), cap); 62127 + printf("%s\n", "true"); 62128 } 62129 fflush(stdout); 62130 } 62131 62132 static void 62133 -demo_termcap(char *name) 62134 +brute_force(const char *name) 62135 { 62136 char buffer[1024]; 62137 62138 @@ -140,23 +157,142 @@ 62139 } 62140 } 62141 62142 +#if USE_CODE_LISTS 62143 +static void 62144 +demo_terminfo(NCURSES_CONST char *name) 62145 +{ 62146 + unsigned n; 62147 + NCURSES_CONST char *cap; 62148 + 62149 + printf("Terminal type \"%s\"\n", name); 62150 + setupterm(name, 1, (int *) 0); 62151 + 62152 + if (b_opt) { 62153 + for (n = 0;; ++n) { 62154 + cap = boolcodes[n]; 62155 + if (cap == 0) 62156 + break; 62157 + dumpit(cap); 62158 + } 62159 + } 62160 + 62161 + if (n_opt) { 62162 + for (n = 0;; ++n) { 62163 + cap = numcodes[n]; 62164 + if (cap == 0) 62165 + break; 62166 + dumpit(cap); 62167 + } 62168 + } 62169 + 62170 + if (s_opt) { 62171 + for (n = 0;; ++n) { 62172 + cap = strcodes[n]; 62173 + if (cap == 0) 62174 + break; 62175 + dumpit(cap); 62176 + } 62177 + } 62178 +} 62179 + 62180 +static void 62181 +usage(void) 62182 +{ 62183 + static const char *msg[] = 62184 + { 62185 + "Usage: demo_terminfo [options] [terminal]", 62186 + "", 62187 + "If no options are given, print all (boolean, numeric, string)", 62188 + "capabilities for the given terminal, using short names.", 62189 + "", 62190 + "Options:", 62191 + " -a try all names, print capabilities found", 62192 + " -b print boolean-capabilities", 62193 + " -n print numeric-capabilities", 62194 + " -r COUNT repeat for given count", 62195 + " -s print string-capabilities", 62196 + }; 62197 + unsigned n; 62198 + for (n = 0; n < SIZEOF(msg); ++n) { 62199 + fprintf(stderr, "%s\n", msg[n]); 62200 + } 62201 + ExitProgram(EXIT_FAILURE); 62202 +} 62203 +#endif 62204 + 62205 int 62206 main(int argc, char *argv[]) 62207 { 62208 int n; 62209 char *name; 62210 + bool a_opt = FALSE; 62211 62212 - if (argc > 1) { 62213 - for (n = 1; n < argc; ++n) { 62214 - demo_termcap(argv[n]); 62215 - } 62216 - } else if ((name = getenv("TERM")) != 0) { 62217 - demo_termcap(name); 62218 - } else { 62219 - static char dumb[] = "dumb"; 62220 - demo_termcap(dumb); 62221 +#if USE_CODE_LISTS 62222 + int repeat; 62223 + int r_opt = 1; 62224 + 62225 + while ((n = getopt(argc, argv, "abnr:s")) != -1) { 62226 + switch (n) { 62227 + case 'a': 62228 + a_opt = TRUE; 62229 + break; 62230 + case 'b': 62231 + b_opt = TRUE; 62232 + break; 62233 + case 'n': 62234 + n_opt = TRUE; 62235 + break; 62236 + case 'r': 62237 + if ((r_opt = atoi(optarg)) <= 0) 62238 + usage(); 62239 + break; 62240 + case 's': 62241 + s_opt = TRUE; 62242 + break; 62243 + default: 62244 + usage(); 62245 + break; 62246 + } 62247 } 62248 62249 + if (!(b_opt || n_opt || s_opt)) { 62250 + b_opt = TRUE; 62251 + n_opt = TRUE; 62252 + s_opt = TRUE; 62253 + } 62254 +#else 62255 + a_opt = TRUE; 62256 +#endif 62257 + 62258 + if (a_opt) { 62259 + if (optind < argc) { 62260 + for (n = optind; n < argc; ++n) { 62261 + brute_force(argv[n]); 62262 + } 62263 + } else if ((name = getenv("TERM")) != 0) { 62264 + brute_force(name); 62265 + } else { 62266 + static char dumb[] = "dumb"; 62267 + brute_force(dumb); 62268 + } 62269 + } 62270 +#if USE_CODE_LISTS 62271 + else { 62272 + for (repeat = 0; repeat < r_opt; ++repeat) { 62273 + if (optind < argc) { 62274 + for (n = optind; n < argc; ++n) { 62275 + demo_terminfo(argv[n]); 62276 + } 62277 + } else if ((name = getenv("TERM")) != 0) { 62278 + demo_terminfo(name); 62279 + } else { 62280 + static char dumb[] = "dumb"; 62281 + demo_terminfo(dumb); 62282 + } 62283 + } 62284 + } 62285 +#endif 62286 + 62287 ExitProgram(EXIT_SUCCESS); 62288 } 62289 59382 62290 diff -Naur ncurses-5.7.orig/test/demo_terminfo.c ncurses-5.7/test/demo_terminfo.c 59383 62291 --- ncurses-5.7.orig/test/demo_terminfo.c 1969-12-31 16:00:00.000000000 -0800 59384 +++ ncurses-5.7/test/demo_terminfo.c 2009-0 7-19 15:04:17.000000000 -070062292 +++ ncurses-5.7/test/demo_terminfo.c 2009-09-12 08:51:54.000000000 -0700 59385 62293 @@ -0,0 +1,304 @@ 59386 62294 +/**************************************************************************** … … 59690 62598 diff -Naur ncurses-5.7.orig/test/ditto.c ncurses-5.7/test/ditto.c 59691 62599 --- ncurses-5.7.orig/test/ditto.c 2008-08-04 06:21:41.000000000 -0700 59692 +++ ncurses-5.7/test/ditto.c 2009-0 7-19 15:04:17.000000000 -070062600 +++ ncurses-5.7/test/ditto.c 2009-09-12 08:51:54.000000000 -0700 59693 62601 @@ -29,7 +29,7 @@ 59694 62602 /* … … 59785 62693 diff -Naur ncurses-5.7.orig/test/edit_field.c ncurses-5.7/test/edit_field.c 59786 62694 --- ncurses-5.7.orig/test/edit_field.c 2008-10-18 13:40:20.000000000 -0700 59787 +++ ncurses-5.7/test/edit_field.c 2009-0 7-19 15:02:04.000000000 -070062695 +++ ncurses-5.7/test/edit_field.c 2009-09-12 08:50:59.000000000 -0700 59788 62696 @@ -26,7 +26,7 @@ 59789 62697 * authorization. * … … 59808 62716 diff -Naur ncurses-5.7.orig/test/edit_field.h ncurses-5.7/test/edit_field.h 59809 62717 --- ncurses-5.7.orig/test/edit_field.h 2006-06-03 09:38:57.000000000 -0700 59810 +++ ncurses-5.7/test/edit_field.h 2009-0 7-19 15:02:04.000000000 -070062718 +++ ncurses-5.7/test/edit_field.h 2009-09-12 08:50:59.000000000 -0700 59811 62719 @@ -1,5 +1,5 @@ 59812 62720 /**************************************************************************** … … 59838 62746 diff -Naur ncurses-5.7.orig/test/filter.c ncurses-5.7/test/filter.c 59839 62747 --- ncurses-5.7.orig/test/filter.c 2006-12-09 08:53:47.000000000 -0800 59840 +++ ncurses-5.7/test/filter.c 2009-0 7-19 15:02:00.000000000 -070062748 +++ ncurses-5.7/test/filter.c 2009-09-12 08:50:55.000000000 -0700 59841 62749 @@ -1,5 +1,5 @@ 59842 62750 /**************************************************************************** … … 59908 62816 keypad(stdscr, TRUE); 59909 62817 62818 diff -Naur ncurses-5.7.orig/test/firework.c ncurses-5.7/test/firework.c 62819 --- ncurses-5.7.orig/test/firework.c 2006-05-20 08:36:08.000000000 -0700 62820 +++ ncurses-5.7/test/firework.c 2009-09-12 08:52:07.000000000 -0700 62821 @@ -1,5 +1,5 @@ 62822 /**************************************************************************** 62823 - * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. * 62824 + * Copyright (c) 1998-2006,2009 Free Software Foundation, Inc. * 62825 * * 62826 * Permission is hereby granted, free of charge, to any person obtaining a * 62827 * copy of this software and associated documentation files (the * 62828 @@ -26,7 +26,7 @@ 62829 * authorization. * 62830 ****************************************************************************/ 62831 /* 62832 - * $Id: firework.c,v 1.24 2006/05/20 15:36:08 tom Exp $ 62833 + * $Id: firework.c,v 1.25 2009/08/29 19:02:25 tom Exp $ 62834 */ 62835 #include <test.priv.h> 62836 62837 @@ -94,14 +94,14 @@ 62838 showit(); 62839 62840 init_pair(1, get_colour(&bold), my_bg); 62841 - attrset(COLOR_PAIR(1) | bold); 62842 + (void) attrset(COLOR_PAIR(1) | bold); 62843 mvprintw(row - 1, col - 1, " - "); 62844 mvprintw(row + 0, col - 1, "-+-"); 62845 mvprintw(row + 1, col - 1, " - "); 62846 showit(); 62847 62848 init_pair(1, get_colour(&bold), my_bg); 62849 - attrset(COLOR_PAIR(1) | bold); 62850 + (void) attrset(COLOR_PAIR(1) | bold); 62851 mvprintw(row - 2, col - 2, " --- "); 62852 mvprintw(row - 1, col - 2, "-+++-"); 62853 mvprintw(row + 0, col - 2, "-+#+-"); 62854 @@ -110,7 +110,7 @@ 62855 showit(); 62856 62857 init_pair(1, get_colour(&bold), my_bg); 62858 - attrset(COLOR_PAIR(1) | bold); 62859 + (void) attrset(COLOR_PAIR(1) | bold); 62860 mvprintw(row - 2, col - 2, " +++ "); 62861 mvprintw(row - 1, col - 2, "++#++"); 62862 mvprintw(row + 0, col - 2, "+# #+"); 62863 @@ -119,7 +119,7 @@ 62864 showit(); 62865 62866 init_pair(1, get_colour(&bold), my_bg); 62867 - attrset(COLOR_PAIR(1) | bold); 62868 + (void) attrset(COLOR_PAIR(1) | bold); 62869 mvprintw(row - 2, col - 2, " # "); 62870 mvprintw(row - 1, col - 2, "## ##"); 62871 mvprintw(row + 0, col - 2, "# #"); 62872 @@ -128,7 +128,7 @@ 62873 showit(); 62874 62875 init_pair(1, get_colour(&bold), my_bg); 62876 - attrset(COLOR_PAIR(1) | bold); 62877 + (void) attrset(COLOR_PAIR(1) | bold); 62878 mvprintw(row - 2, col - 2, " # # "); 62879 mvprintw(row - 1, col - 2, "# #"); 62880 mvprintw(row + 0, col - 2, " "); 62881 @@ -173,7 +173,7 @@ 62882 direction = (start > end) ? -1 : 1; 62883 diff = abs(start - end); 62884 } while (diff < 2 || diff >= LINES - 2); 62885 - attrset(A_NORMAL); 62886 + (void) attrset(A_NORMAL); 62887 for (row = 0; row < diff; row++) { 62888 mvprintw(LINES - row, start + (row * direction), 62889 (direction < 0) ? "\\" : "/"); 59910 62890 diff -Naur ncurses-5.7.orig/test/firstlast.c ncurses-5.7/test/firstlast.c 59911 62891 --- ncurses-5.7.orig/test/firstlast.c 2006-04-01 11:03:18.000000000 -0800 59912 +++ ncurses-5.7/test/firstlast.c 2009-0 7-19 15:04:17.000000000 -070062892 +++ ncurses-5.7/test/firstlast.c 2009-09-12 08:51:54.000000000 -0700 59913 62893 @@ -1,5 +1,5 @@ 59914 62894 /**************************************************************************** … … 59948 62928 } 59949 62929 } 62930 diff -Naur ncurses-5.7.orig/test/gdc.c ncurses-5.7/test/gdc.c 62931 --- ncurses-5.7.orig/test/gdc.c 2008-08-03 16:58:42.000000000 -0700 62932 +++ ncurses-5.7/test/gdc.c 2009-09-12 08:52:07.000000000 -0700 62933 @@ -1,5 +1,5 @@ 62934 /**************************************************************************** 62935 - * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. * 62936 + * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. * 62937 * * 62938 * Permission is hereby granted, free of charge, to any person obtaining a * 62939 * copy of this software and associated documentation files (the * 62940 @@ -33,7 +33,7 @@ 62941 * modified 10-18-89 for curses (jrl) 62942 * 10-18-89 added signal handling 62943 * 62944 - * $Id: gdc.c,v 1.31 2008/08/03 23:58:42 tom Exp $ 62945 + * $Id: gdc.c,v 1.32 2009/08/29 19:02:25 tom Exp $ 62946 */ 62947 62948 #include <test.priv.h> 62949 @@ -78,7 +78,7 @@ 62950 int n; 62951 62952 if (hascolor) 62953 - attrset(COLOR_PAIR(PAIR_FRAMES)); 62954 + (void) attrset(COLOR_PAIR(PAIR_FRAMES)); 62955 62956 mvaddch(YBASE - 1, XBASE - 1, ACS_ULCORNER); 62957 hline(ACS_HLINE, XLENGTH); 62958 @@ -102,7 +102,7 @@ 62959 vline(ACS_VLINE, YDEPTH); 62960 62961 if (hascolor) 62962 - attrset(COLOR_PAIR(PAIR_OTHERS)); 62963 + (void) attrset(COLOR_PAIR(PAIR_OTHERS)); 62964 } 62965 62966 static void 62967 @@ -220,7 +220,7 @@ 62968 init_pair(PAIR_DIGITS, COLOR_BLACK, COLOR_RED); 62969 init_pair(PAIR_OTHERS, COLOR_RED, bg); 62970 init_pair(PAIR_FRAMES, COLOR_WHITE, bg); 62971 - attrset(COLOR_PAIR(PAIR_OTHERS)); 62972 + (void) attrset(COLOR_PAIR(PAIR_OTHERS)); 62973 } 62974 62975 restart: 62976 @@ -335,7 +335,7 @@ 62977 goto restart; 62978 case ERR: 62979 if (sigtermed) { 62980 - standend(); 62981 + (void) standend(); 62982 endwin(); 62983 fprintf(stderr, "gdc terminated by signal %d\n", sigtermed); 62984 ExitProgram(EXIT_FAILURE); 62985 @@ -345,7 +345,7 @@ 62986 continue; 62987 } 62988 } while (--count); 62989 - standend(); 62990 + (void) standend(); 62991 endwin(); 62992 ExitProgram(EXIT_SUCCESS); 62993 } 62994 diff -Naur ncurses-5.7.orig/test/hanoi.c ncurses-5.7/test/hanoi.c 62995 --- ncurses-5.7.orig/test/hanoi.c 2008-08-04 03:57:59.000000000 -0700 62996 +++ ncurses-5.7/test/hanoi.c 2009-09-12 08:52:07.000000000 -0700 62997 @@ -1,5 +1,5 @@ 62998 /**************************************************************************** 62999 - * Copyright (c) 1998-2006,2008 Free Software Foundation, Inc. * 63000 + * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. * 63001 * * 63002 * Permission is hereby granted, free of charge, to any person obtaining a * 63003 * copy of this software and associated documentation files (the * 63004 @@ -41,7 +41,7 @@ 63005 * 63006 * Date: 05.Nov.90 63007 * 63008 - * $Id: hanoi.c,v 1.27 2008/08/04 10:57:59 tom Exp $ 63009 + * $Id: hanoi.c,v 1.28 2009/08/29 19:02:25 tom Exp $ 63010 */ 63011 63012 #include <test.priv.h> 63013 @@ -229,7 +229,7 @@ 63014 mvaddstr(1, 24, "T O W E R S O F H A N O I"); 63015 mvaddstr(3, 34, "SJR 1990"); 63016 mvprintw(19, 5, "Moves : %d", NMoves); 63017 - attrset(A_REVERSE); 63018 + (void) attrset(A_REVERSE); 63019 mvaddstr(BASELINE, 8, 63020 " "); 63021 63022 @@ -241,7 +241,7 @@ 63023 mvaddch(BASELINE, LEFTPEG, '1'); 63024 mvaddch(BASELINE, MIDPEG, '2'); 63025 mvaddch(BASELINE, RIGHTPEG, '3'); 63026 - attrset(A_NORMAL); 63027 + (void) attrset(A_NORMAL); 63028 63029 /* Draw tiles */ 63030 for (peg = 0; peg < NPEGS; peg++) { 63031 @@ -251,16 +251,16 @@ 63032 memset(TileBuf, ' ', len); 63033 TileBuf[len] = '\0'; 63034 if (has_colors()) 63035 - attrset(COLOR_PAIR(LENTOIND(len))); 63036 + (void) attrset(COLOR_PAIR(LENTOIND(len))); 63037 else 63038 - attrset(A_REVERSE); 63039 + (void) attrset(A_REVERSE); 63040 mvaddstr(BASELINE - (SlotNo + 1), 63041 (int) (PegPos[peg] - len / 2), 63042 TileBuf); 63043 } 63044 } 63045 } 63046 - attrset(A_NORMAL); 63047 + (void) attrset(A_NORMAL); 63048 refresh(); 63049 } 63050 59950 63051 diff -Naur ncurses-5.7.orig/test/insdelln.c ncurses-5.7/test/insdelln.c 59951 63052 --- ncurses-5.7.orig/test/insdelln.c 1969-12-31 16:00:00.000000000 -0800 59952 +++ ncurses-5.7/test/insdelln.c 2009-0 7-19 15:04:17.000000000 -070063053 +++ ncurses-5.7/test/insdelln.c 2009-09-12 08:52:07.000000000 -0700 59953 63054 @@ -0,0 +1,387 @@ 59954 63055 +/**************************************************************************** … … 59980 63081 + ****************************************************************************/ 59981 63082 +/* 59982 + * $Id: insdelln.c,v 1. 2 2009/07/15 23:21:04tom Exp $63083 + * $Id: insdelln.c,v 1.3 2009/08/29 18:47:26 tom Exp $ 59983 63084 + * 59984 63085 + * test-driver for deleteln, wdeleteln, insdelln, winsdelln, insertln, winsertln … … 60254 63355 + 60255 63356 + do { 60256 + wattrset(win, st.attr | COLOR_PAIR(st.pair));63357 + (void) wattrset(win, st.attr | COLOR_PAIR(st.pair)); 60257 63358 + switch (st.ch) { 60258 63359 + case 'i': … … 60295 63396 + 60296 63397 + do { 60297 + attrset(st.attr | COLOR_PAIR(st.pair));63398 + (void) attrset(st.attr | COLOR_PAIR(st.pair)); 60298 63399 + switch (st.ch) { 60299 63400 + case 'i': … … 60341 63442 diff -Naur ncurses-5.7.orig/test/modules ncurses-5.7/test/modules 60342 63443 --- ncurses-5.7.orig/test/modules 2007-08-18 10:57:08.000000000 -0700 60343 +++ ncurses-5.7/test/modules 2009-0 7-19 15:04:15.000000000 -070063444 +++ ncurses-5.7/test/modules 2009-09-12 08:51:52.000000000 -0700 60344 63445 @@ -1,6 +1,6 @@ 60345 63446 -# $Id: modules,v 1.36 2007/08/18 17:57:08 tom Exp $ … … 60377 63478 diff -Naur ncurses-5.7.orig/test/ncurses.c ncurses-5.7/test/ncurses.c 60378 63479 --- ncurses-5.7.orig/test/ncurses.c 2008-09-27 07:34:58.000000000 -0700 60379 +++ ncurses-5.7/test/ncurses.c 2009-0 7-19 15:04:17.000000000 -070063480 +++ ncurses-5.7/test/ncurses.c 2009-09-12 08:52:07.000000000 -0700 60380 63481 @@ -1,5 +1,5 @@ 60381 63482 /**************************************************************************** … … 60390 63491 60391 63492 -$Id: ncurses.c,v 1.329 2008/09/27 14:34:58 tom Exp $ 60392 +$Id: ncurses.c,v 1.34 2 2009/07/18 11:48:42tom Exp $63493 +$Id: ncurses.c,v 1.345 2009/08/29 20:24:57 tom Exp $ 60393 63494 60394 63495 ***************************************************************************/ 60395 63496 63497 @@ -232,7 +232,7 @@ 63498 63499 echo(); 63500 getyx(win, y0, x0); 63501 - wattrset(win, A_REVERSE); 63502 + (void) wattrset(win, A_REVERSE); 63503 63504 x = (int) strlen(buffer); 63505 while (!done) { 60396 63506 @@ -318,6 +318,7 @@ 60397 63507 *target = 0; … … 60410 63520 static int 60411 63521 wGet_wchar(WINDOW *win, wint_t *result) 63522 @@ -363,7 +365,7 @@ 63523 63524 echo(); 63525 getyx(win, y0, x0); 63526 - wattrset(win, A_REVERSE); 63527 + (void) wattrset(win, A_REVERSE); 63528 63529 x = (int) wcslen(buffer); 63530 while (!done) { 60412 63531 @@ -483,7 +485,11 @@ 60413 63532 addstr("Shelling out..."); … … 60454 63573 static const char *help[] = 60455 63574 { 63575 @@ -610,12 +629,12 @@ 63576 int flg = ((strstr(help[n], "toggle") != 0) 63577 && (flags[UChar(*help[n])] != FALSE)); 63578 if (flg) 63579 - standout(); 63580 + (void) standout(); 63581 mvprintw(row, col, "%s", help[n]); 63582 if (col == 0) 63583 clrtoeol(); 63584 if (flg) 63585 - standend(); 63586 + (void) standend(); 63587 } 63588 wrefresh(stdscr); 63589 wmove(win, y, x); 60456 63590 @@ -657,7 +676,7 @@ 60457 63591 { … … 60577 63711 #endif 60578 63712 63713 @@ -1331,7 +1358,7 @@ 63714 addch(ch | attr); 63715 } 63716 } else { 63717 - attrset(attr); 63718 + (void) attrset(attr); 63719 addstr(attr_test_string); 63720 attroff(attr); 63721 } 60579 63722 @@ -1840,6 +1867,8 @@ 60580 63723 width = 4; … … 60658 63801 init_pair(pair, fg, bg); 60659 63802 attron((attr_t) COLOR_PAIR(pair)); 60660 @@ -1960, 6 +2002,8 @@63803 @@ -1960,16 +2002,18 @@ 60661 63804 attron((attr_t) A_ALTCHARSET); 60662 63805 if (opt_bold) … … 60667 63810 if (opt_nums) { 60668 63811 sprintf(numbered, "{%02X}", i); 60669 @@ -1968,8 +2012,8 @@ 63812 hello = numbered; 63813 } 60670 63814 printw("%-*.*s", width, width, hello); 60671 attrset(A_NORMAL); 63815 - attrset(A_NORMAL); 63816 + (void) attrset(A_NORMAL); 60672 63817 60673 63818 - if ((i % per_row) == 0 && (i % COLORS) == 0) { … … 60793 63938 done = TRUE; 60794 63939 continue; 63940 @@ -2324,9 +2395,9 @@ 63941 (i == current ? '>' : ' '), 63942 (i < (int) SIZEOF(the_color_names) 63943 ? the_color_names[i] : numeric)); 63944 - attrset(COLOR_PAIR(i)); 63945 + (void) attrset(COLOR_PAIR(i)); 63946 addstr(" "); 63947 - attrset(A_NORMAL); 63948 + (void) attrset(A_NORMAL); 63949 63950 color_content((short) i, &red, &green, &blue); 63951 addstr(" R = "); 63952 @@ -2334,20 +2405,20 @@ 63953 attron(A_STANDOUT); 63954 printw("%04d", red); 63955 if (current == i && field == 0) 63956 - attrset(A_NORMAL); 63957 + (void) attrset(A_NORMAL); 63958 addstr(", G = "); 63959 if (current == i && field == 1) 63960 attron(A_STANDOUT); 63961 printw("%04d", green); 63962 if (current == i && field == 1) 63963 - attrset(A_NORMAL); 63964 + (void) attrset(A_NORMAL); 63965 addstr(", B = "); 63966 if (current == i && field == 2) 63967 attron(A_STANDOUT); 63968 printw("%04d", blue); 63969 if (current == i && field == 2) 63970 - attrset(A_NORMAL); 63971 - attrset(A_NORMAL); 63972 + (void) attrset(A_NORMAL); 63973 + (void) attrset(A_NORMAL); 63974 printw(" ( %3d %3d %3d )", 63975 scaled_rgb(red), 63976 scaled_rgb(green), 60795 63977 @@ -2802,6 +2873,7 @@ 60796 63978 } attrs_to_cycle[] = { … … 60801 63983 { A_UNDERLINE, "underline" }, 60802 63984 }; 63985 @@ -2818,7 +2890,7 @@ 63986 *at_code = 0; 63987 break; 63988 case 'V': 63989 - if (*at_code == 1) 63990 + if (*at_code == 0) 63991 *at_code = SIZEOF(attrs_to_cycle) - 1; 63992 else 63993 *at_code -= 1; 60803 63994 @@ -2902,7 +2974,7 @@ 60804 63995 do { … … 60959 64150 60960 64151 } 64152 @@ -4954,7 +5037,7 @@ 64153 wbkgd(subWin, COLOR_PAIR(2) | ' '); 64154 } 64155 #endif 64156 - wattrset(subWin, A_BOLD); 64157 + (void) wattrset(subWin, A_BOLD); 64158 box(subWin, ACS_VLINE, ACS_HLINE); 64159 mvwaddstr(subWin, 2, 1, "This is a subwindow"); 64160 wrefresh(win); 64161 @@ -5774,18 +5857,18 @@ 64162 64163 switch (flavor) { 64164 case 0: 64165 - wattrset(win, A_NORMAL); 64166 + (void) wattrset(win, A_NORMAL); 64167 break; 64168 case 1: 64169 - wattrset(win, A_BOLD); 64170 + (void) wattrset(win, A_BOLD); 64171 break; 64172 case 2: 64173 init_pair(cpair, COLOR_BLUE, COLOR_WHITE); 64174 - wattrset(win, COLOR_PAIR(cpair) | A_NORMAL); 64175 + (void) wattrset(win, COLOR_PAIR(cpair) | A_NORMAL); 64176 break; 64177 case 3: 64178 init_pair(cpair, COLOR_WHITE, COLOR_BLUE); 64179 - wattrset(win, COLOR_PAIR(cpair) | A_BOLD); 64180 + (void) wattrset(win, COLOR_PAIR(cpair) | A_BOLD); 64181 break; 64182 } 64183 } 60961 64184 @@ -5804,7 +5887,7 @@ 60962 64185 break; … … 60968 64191 case 3: 60969 64192 wbkgdset(win, ' ' | A_NORMAL); 64193 @@ -5890,7 +5973,7 @@ 64194 break; 64195 } 64196 overlap_helpitem(state, item, msg); 64197 - wattrset(stdscr, A_NORMAL); 64198 + (void) wattrset(stdscr, A_NORMAL); 64199 wbkgdset(stdscr, ' ' | A_NORMAL); 64200 } 64201 move(LINES - 1, 0); 64202 @@ -5915,7 +5998,7 @@ 64203 { 64204 overlap_test_1_attr(a, flavor, col); 64205 fillwin(a, fill); 64206 - wattrset(a, A_NORMAL); 64207 + (void) wattrset(a, A_NORMAL); 64208 } 64209 64210 static void 64211 @@ -6497,7 +6580,7 @@ 64212 min_colors = -1; 64213 } 64214 #if NCURSES_VERSION_PATCH >= 20000708 64215 - else if (assumed_colors) 64216 + if (assumed_colors) 64217 assume_default_colors(default_fg, default_bg); 64218 #endif 64219 #endif 64220 diff -Naur ncurses-5.7.orig/test/newdemo.c ncurses-5.7/test/newdemo.c 64221 --- ncurses-5.7.orig/test/newdemo.c 2008-08-03 13:19:38.000000000 -0700 64222 +++ ncurses-5.7/test/newdemo.c 2009-09-12 08:52:07.000000000 -0700 64223 @@ -2,7 +2,7 @@ 64224 * newdemo.c - A demo program using PDCurses. The program illustrate 64225 * the use of colours for text output. 64226 * 64227 - * $Id: newdemo.c,v 1.31 2008/08/03 20:19:38 tom Exp $ 64228 + * $Id: newdemo.c,v 1.32 2009/08/29 18:47:26 tom Exp $ 64229 */ 64230 64231 #include <test.priv.h> 64232 @@ -84,7 +84,7 @@ 64233 if (pair > COLOR_PAIRS) 64234 pair = COLOR_PAIRS; 64235 init_pair(pair, foreground, background); 64236 - wattrset(win, COLOR_PAIR(pair)); 64237 + (void) wattrset(win, COLOR_PAIR(pair)); 64238 } 64239 } 64240 64241 @@ -96,7 +96,7 @@ 64242 pair = COLOR_PAIRS; 64243 attrs |= COLOR_PAIR(pair); 64244 } 64245 - wattrset(win, attrs); 64246 + (void) wattrset(win, attrs); 64247 return attrs; 64248 } 64249 60970 64250 diff -Naur ncurses-5.7.orig/test/programs ncurses-5.7/test/programs 60971 64251 --- ncurses-5.7.orig/test/programs 2008-08-16 14:47:39.000000000 -0700 60972 +++ ncurses-5.7/test/programs 2009-0 7-19 15:04:15.000000000 -070064252 +++ ncurses-5.7/test/programs 2009-09-12 08:51:52.000000000 -0700 60973 64253 @@ -1,6 +1,6 @@ 60974 64254 -# $Id: programs,v 1.14 2008/08/16 21:47:39 tom Exp $ … … 61006 64286 diff -Naur ncurses-5.7.orig/test/railroad.c ncurses-5.7/test/railroad.c 61007 64287 --- ncurses-5.7.orig/test/railroad.c 2008-02-09 10:08:43.000000000 -0800 61008 +++ ncurses-5.7/test/railroad.c 2009-0 7-19 15:02:23.000000000 -070064288 +++ ncurses-5.7/test/railroad.c 2009-09-12 08:51:19.000000000 -0700 61009 64289 @@ -29,7 +29,7 @@ 61010 64290 /* … … 61051 64331 } 61052 64332 64333 diff -Naur ncurses-5.7.orig/test/rain.c ncurses-5.7/test/rain.c 64334 --- ncurses-5.7.orig/test/rain.c 2008-05-24 16:34:34.000000000 -0700 64335 +++ ncurses-5.7/test/rain.c 2009-09-12 08:52:07.000000000 -0700 64336 @@ -1,5 +1,5 @@ 64337 /**************************************************************************** 64338 - * Copyright (c) 1998-2006,2008 Free Software Foundation, Inc. * 64339 + * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. * 64340 * * 64341 * Permission is hereby granted, free of charge, to any person obtaining a * 64342 * copy of this software and associated documentation files (the * 64343 @@ -26,7 +26,7 @@ 64344 * authorization. * 64345 ****************************************************************************/ 64346 /* 64347 - * $Id: rain.c,v 1.34 2008/05/24 23:34:34 tom Exp $ 64348 + * $Id: rain.c,v 1.35 2009/08/29 19:02:25 tom Exp $ 64349 */ 64350 #include <test.priv.h> 64351 64352 @@ -105,7 +105,7 @@ 64353 chtype color = COLOR_PAIR(z); 64354 if (z) 64355 color |= A_BOLD; 64356 - attrset(color); 64357 + (void) attrset(color); 64358 } 64359 return j; 64360 } 61053 64361 diff -Naur ncurses-5.7.orig/test/README ncurses-5.7/test/README 61054 64362 --- ncurses-5.7.orig/test/README 2008-10-18 14:02:45.000000000 -0700 61055 +++ ncurses-5.7/test/README 2009-0 7-19 15:04:15.000000000 -070064363 +++ ncurses-5.7/test/README 2009-09-12 08:51:52.000000000 -0700 61056 64364 @@ -25,7 +25,7 @@ 61057 64365 -- sale, use or other dealings in this Software without prior written -- … … 61393 64701 wscanw test: testcurs 61394 64702 wscrl test: ncurses testcurs 64703 diff -Naur ncurses-5.7.orig/test/tclock.c ncurses-5.7/test/tclock.c 64704 --- ncurses-5.7.orig/test/tclock.c 2005-04-16 09:39:27.000000000 -0700 64705 +++ ncurses-5.7/test/tclock.c 2009-09-12 08:52:07.000000000 -0700 64706 @@ -1,4 +1,4 @@ 64707 -/* $Id: tclock.c,v 1.25 2005/04/16 16:39:27 tom Exp $ */ 64708 +/* $Id: tclock.c,v 1.26 2009/08/29 18:47:26 tom Exp $ */ 64709 64710 #include <test.priv.h> 64711 64712 @@ -67,7 +67,7 @@ 64713 int d; 64714 64715 if (has_colors()) 64716 - attrset(COLOR_PAIR(pair)); 64717 + (void) attrset(COLOR_PAIR(pair)); 64718 64719 dx = x2 - from_x; 64720 dy = y2 - from_y; 64721 @@ -209,17 +209,17 @@ 64722 64723 dline(3, cx, cy, cx + mdx, cy - mdy, '#'); 64724 64725 - attrset(A_REVERSE); 64726 + (void) attrset(A_REVERSE); 64727 dline(2, cx, cy, cx + hdx, cy - hdy, '.'); 64728 attroff(A_REVERSE); 64729 64730 if (has_colors()) 64731 - attrset(COLOR_PAIR(1)); 64732 + (void) attrset(COLOR_PAIR(1)); 64733 64734 dline(1, cx, cy, cx + sdx, cy - sdy, 'O'); 64735 64736 if (has_colors()) 64737 - attrset(COLOR_PAIR(0)); 64738 + (void) attrset(COLOR_PAIR(0)); 64739 64740 text = ctime(&tim); 64741 mvprintw(2, 0, "%.*s", (int) (strlen(text) - 1), text); 64742 diff -Naur ncurses-5.7.orig/test/testaddch.c ncurses-5.7/test/testaddch.c 64743 --- ncurses-5.7.orig/test/testaddch.c 2006-04-01 11:08:03.000000000 -0800 64744 +++ ncurses-5.7/test/testaddch.c 2009-09-12 08:52:07.000000000 -0700 64745 @@ -1,5 +1,5 @@ 64746 /**************************************************************************** 64747 - * Copyright (c) 1998-2002,2006 Free Software Foundation, Inc. * 64748 + * Copyright (c) 1998-2006,2009 Free Software Foundation, Inc. * 64749 * * 64750 * Permission is hereby granted, free of charge, to any person obtaining a * 64751 * copy of this software and associated documentation files (the * 64752 @@ -29,7 +29,7 @@ 64753 * This is an example written by Alexander V. Lukyanov <lav@yars.free.net>, 64754 * to demonstrate an inconsistency between ncurses and SVr4 curses. 64755 * 64756 - * $Id: testaddch.c,v 1.6 2006/04/01 19:08:03 tom Exp $ 64757 + * $Id: testaddch.c,v 1.7 2009/08/29 19:02:25 tom Exp $ 64758 */ 64759 #include <test.priv.h> 64760 64761 @@ -66,7 +66,7 @@ 64762 attr = (i & 4) ? COLOR_PAIR(4) : 0; 64763 64764 bkgdset(back); 64765 - attrset(set); 64766 + (void) attrset(set); 64767 64768 attr_addstr("Test string with spaces -> <-\n", attr); 64769 } 64770 @@ -77,7 +77,7 @@ 64771 attr = (i & 4) ? COLOR_PAIR(4) : 0; 64772 64773 bkgdset(back); 64774 - attrset(set); 64775 + (void) attrset(set); 64776 64777 attr_addstr("Test string with spaces -> <-\n", attr); 64778 } 61395 64779 diff -Naur ncurses-5.7.orig/test/test_arrays.c ncurses-5.7/test/test_arrays.c 61396 64780 --- ncurses-5.7.orig/test/test_arrays.c 2008-02-09 10:09:43.000000000 -0800 61397 +++ ncurses-5.7/test/test_arrays.c 2009-0 7-19 15:04:17.000000000 -070064781 +++ ncurses-5.7/test/test_arrays.c 2009-09-12 08:51:54.000000000 -0700 61398 64782 @@ -26,7 +26,7 @@ 61399 64783 * authorization. * … … 61414 64798 #define DUMP(name) dump_array(#name, name) 61415 64799 64800 diff -Naur ncurses-5.7.orig/test/testcurs.c ncurses-5.7/test/testcurs.c 64801 --- ncurses-5.7.orig/test/testcurs.c 2008-08-03 10:58:09.000000000 -0700 64802 +++ ncurses-5.7/test/testcurs.c 2009-09-12 08:52:07.000000000 -0700 64803 @@ -7,7 +7,7 @@ 64804 * wrs(5/28/93) -- modified to be consistent (perform identically) with either 64805 * PDCurses or under Unix System V, R4 64806 * 64807 - * $Id: testcurs.c,v 1.39 2008/08/03 17:58:09 tom Exp $ 64808 + * $Id: testcurs.c,v 1.40 2009/08/29 18:47:26 tom Exp $ 64809 */ 64810 64811 #include <test.priv.h> 64812 @@ -682,7 +682,7 @@ 64813 if ((pad = newpad(50, 100)) != 0) { 64814 wattron(pad, A_REVERSE); 64815 mvwaddstr(pad, 5, 2, "This is a new pad"); 64816 - wattrset(pad, A_NORMAL); 64817 + (void) wattrset(pad, A_NORMAL); 64818 mvwaddstr(pad, 8, 0, 64819 "The end of this line should be truncated here:except now"); 64820 mvwaddstr(pad, 11, 1, "This line should not appear.It will now"); 64821 @@ -720,7 +720,7 @@ 64822 64823 assert((new_option >= 0) && (new_option < MAX_OPTIONS)); 64824 64825 - attrset(A_NORMAL); 64826 + (void) attrset(A_NORMAL); 64827 mvaddstr(3, 20, "PDCurses Test Program"); 64828 64829 for (i = 0; i < (int) MAX_OPTIONS; i++) 64830 @@ -729,9 +729,9 @@ 64831 if ((old_option >= 0) && (old_option < MAX_OPTIONS)) 64832 mvaddstr(5 + old_option, 25, command[old_option].text); 64833 64834 - attrset(A_REVERSE); 64835 + (void) attrset(A_REVERSE); 64836 mvaddstr(5 + new_option, 25, command[new_option].text); 64837 - attrset(A_NORMAL); 64838 + (void) attrset(A_NORMAL); 64839 mvaddstr(13, 3, 64840 "Use Up and Down Arrows to select - Enter to run - Q to quit"); 64841 refresh(); 64842 diff -Naur ncurses-5.7.orig/test/test_getstr.c ncurses-5.7/test/test_getstr.c 64843 --- ncurses-5.7.orig/test/test_getstr.c 2008-02-09 10:09:35.000000000 -0800 64844 +++ ncurses-5.7/test/test_getstr.c 2009-09-12 08:52:07.000000000 -0700 64845 @@ -1,5 +1,5 @@ 64846 /**************************************************************************** 64847 - * Copyright (c) 2007,2008 Free Software Foundation, Inc. * 64848 + * Copyright (c) 2007-2008,2009 Free Software Foundation, Inc. * 64849 * * 64850 * Permission is hereby granted, free of charge, to any person obtaining a * 64851 * copy of this software and associated documentation files (the * 64852 @@ -26,7 +26,7 @@ 64853 * authorization. * 64854 ****************************************************************************/ 64855 /* 64856 - * $Id: test_getstr.c,v 1.8 2008/02/09 18:09:35 tom Exp $ 64857 + * $Id: test_getstr.c,v 1.9 2009/08/29 19:02:25 tom Exp $ 64858 * 64859 * Author: Thomas E Dickey 64860 * 64861 @@ -271,7 +271,7 @@ 64862 *buffer = '\0'; 64863 rc = ERR; 64864 echo(); 64865 - wattrset(txtwin, A_REVERSE); 64866 + (void) wattrset(txtwin, A_REVERSE); 64867 switch (flavor) { 64868 case eGetStr: 64869 if (txtwin != stdscr) { 64870 @@ -309,7 +309,7 @@ 64871 break; 64872 } 64873 noecho(); 64874 - wattrset(txtwin, A_NORMAL); 64875 + (void) wattrset(txtwin, A_NORMAL); 64876 wprintw(strwin, "%d:%s", rc, buffer); 64877 wnoutrefresh(strwin); 64878 break; 64879 diff -Naur ncurses-5.7.orig/test/test_get_wstr.c ncurses-5.7/test/test_get_wstr.c 64880 --- ncurses-5.7.orig/test/test_get_wstr.c 2007-08-11 10:01:43.000000000 -0700 64881 +++ ncurses-5.7/test/test_get_wstr.c 2009-09-12 08:52:07.000000000 -0700 64882 @@ -1,5 +1,5 @@ 64883 /**************************************************************************** 64884 - * Copyright (c) 2007 Free Software Foundation, Inc. * 64885 + * Copyright (c) 2007,2009 Free Software Foundation, Inc. * 64886 * * 64887 * Permission is hereby granted, free of charge, to any person obtaining a * 64888 * copy of this software and associated documentation files (the * 64889 @@ -26,7 +26,7 @@ 64890 * authorization. * 64891 ****************************************************************************/ 64892 /* 64893 - * $Id: test_get_wstr.c,v 1.5 2007/08/11 17:01:43 tom Exp $ 64894 + * $Id: test_get_wstr.c,v 1.6 2009/08/29 19:02:25 tom Exp $ 64895 * 64896 * Author: Thomas E Dickey 64897 * 64898 @@ -269,7 +269,7 @@ 64899 *buffer = '\0'; 64900 rc = ERR; 64901 echo(); 64902 - wattrset(txtwin, A_REVERSE); 64903 + (void) wattrset(txtwin, A_REVERSE); 64904 switch (flavor) { 64905 case eGetStr: 64906 if (txtwin != stdscr) { 64907 @@ -307,9 +307,9 @@ 64908 break; 64909 } 64910 noecho(); 64911 - wattrset(txtwin, A_NORMAL); 64912 + (void) wattrset(txtwin, A_NORMAL); 64913 wprintw(strwin, "%d", rc); 64914 - waddwstr(strwin, (wchar_t *) buffer); 64915 + (void) waddwstr(strwin, (wchar_t *) buffer); 64916 wnoutrefresh(strwin); 64917 break; 64918 default: 64919 diff -Naur ncurses-5.7.orig/test/test_opaque.c ncurses-5.7/test/test_opaque.c 64920 --- ncurses-5.7.orig/test/test_opaque.c 2008-07-05 16:18:40.000000000 -0700 64921 +++ ncurses-5.7/test/test_opaque.c 2009-09-12 08:52:07.000000000 -0700 64922 @@ -1,5 +1,5 @@ 64923 /**************************************************************************** 64924 - * Copyright (c) 2007,2008 Free Software Foundation, Inc. * 64925 + * Copyright (c) 2007-2008,2009 Free Software Foundation, Inc. * 64926 * * 64927 * Permission is hereby granted, free of charge, to any person obtaining a * 64928 * copy of this software and associated documentation files (the * 64929 @@ -26,7 +26,7 @@ 64930 * authorization. * 64931 ****************************************************************************/ 64932 /* 64933 - * $Id: test_opaque.c,v 1.7 2008/07/05 23:18:40 tom Exp $ 64934 + * $Id: test_opaque.c,v 1.8 2009/08/29 19:02:25 tom Exp $ 64935 * 64936 * Author: Thomas E Dickey 64937 * 64938 @@ -185,10 +185,10 @@ 64939 { 64940 to_keyword(stswin, cell); 64941 if (active == cell) 64942 - wstandout(stswin); 64943 + (void) wstandout(stswin); 64944 wprintw(stswin, "%s:", name); 64945 if (active == cell) 64946 - wstandend(stswin); 64947 + (void) wstandend(stswin); 64948 } 64949 /* *INDENT-OFF* */ 64950 static struct { 61416 64951 diff -Naur ncurses-5.7.orig/test/test.priv.h ncurses-5.7/test/test.priv.h 61417 64952 --- ncurses-5.7.orig/test/test.priv.h 2008-10-04 14:53:41.000000000 -0700 61418 +++ ncurses-5.7/test/test.priv.h 2009-0 7-19 15:04:17.000000000 -070064953 +++ ncurses-5.7/test/test.priv.h 2009-09-12 08:51:54.000000000 -0700 61419 64954 @@ -1,5 +1,5 @@ 61420 64955 /**************************************************************************** … … 61577 65112 diff -Naur ncurses-5.7.orig/test/view.c ncurses-5.7/test/view.c 61578 65113 --- ncurses-5.7.orig/test/view.c 2008-09-06 15:10:50.000000000 -0700 61579 +++ ncurses-5.7/test/view.c 2009-0 7-19 15:04:17.000000000 -070065114 +++ ncurses-5.7/test/view.c 2009-09-12 08:51:54.000000000 -0700 61580 65115 @@ -1,5 +1,5 @@ 61581 65116 /**************************************************************************** … … 61638 65173 diff -Naur ncurses-5.7.orig/test/worm.c ncurses-5.7/test/worm.c 61639 65174 --- ncurses-5.7.orig/test/worm.c 2008-10-04 14:54:09.000000000 -0700 61640 +++ ncurses-5.7/test/worm.c 2009-0 7-19 15:03:58.000000000 -070065175 +++ ncurses-5.7/test/worm.c 2009-09-12 08:51:35.000000000 -0700 61641 65176 @@ -61,7 +61,7 @@ 61642 65177 traces will be dumped. The program stops and waits for one character of … … 61675 65210 } 61676 65211 #endif 65212 diff -Naur ncurses-5.7.orig/test/xmas.c ncurses-5.7/test/xmas.c 65213 --- ncurses-5.7.orig/test/xmas.c 2008-08-03 04:08:59.000000000 -0700 65214 +++ ncurses-5.7/test/xmas.c 2009-09-12 08:52:07.000000000 -0700 65215 @@ -92,7 +92,7 @@ 65216 /******************************************************************************/ 65217 65218 /* 65219 - * $Id: xmas.c,v 1.24 2008/08/03 11:08:59 tom Exp $ 65220 + * $Id: xmas.c,v 1.25 2009/08/29 18:47:26 tom Exp $ 65221 */ 65222 #include <test.priv.h> 65223 65224 @@ -170,7 +170,7 @@ 65225 unset_color(WINDOW *win) 65226 { 65227 if (has_colors()) 65228 - wattrset(win, COLOR_PAIR(0)); 65229 + (void) wattrset(win, COLOR_PAIR(0)); 65230 } 65231 65232 static void 65233 @@ -533,9 +533,9 @@ 65234 mvwaddch(treescrn4, 12, 23, ' '); 65235 65236 /*star */ 65237 - wstandout(treescrn4); 65238 + (void) wstandout(treescrn4); 65239 mvwaddch(treescrn4, 0, 12, '*'); 65240 - wstandend(treescrn4); 65241 + (void) wstandend(treescrn4); 65242 65243 /*strng1 */ 65244 mvwaddch(treescrn4, 3, 13, ' '); 65245 @@ -597,9 +597,9 @@ 65246 mvwaddch(treescrn6, 11, 23, ' '); 65247 65248 /*star */ 65249 - wstandout(treescrn6); 65250 + (void) wstandout(treescrn6); 65251 mvwaddch(treescrn6, 0, 12, '*'); 65252 - wstandend(treescrn6); 65253 + (void) wstandend(treescrn6); 65254 65255 /*strng1 */ 65256 65257 @@ -816,11 +816,11 @@ 65258 static int 65259 star(void) 65260 { 65261 - wattrset(treescrn2, A_BOLD | A_BLINK); 65262 + (void) wattrset(treescrn2, A_BOLD | A_BLINK); 65263 set_color(treescrn2, COLOR_YELLOW); 65264 65265 mvwaddch(treescrn2, 0, 12, (chtype) '*'); 65266 - wstandend(treescrn2); 65267 + (void) wstandend(treescrn2); 65268 65269 unset_color(treescrn2); 65270 wrefresh(treescrn2); 65271 @@ -831,7 +831,7 @@ 65272 static int 65273 strng1(void) 65274 { 65275 - wattrset(treescrn2, A_BOLD | A_BLINK); 65276 + (void) wattrset(treescrn2, A_BOLD | A_BLINK); 65277 set_color(treescrn2, COLOR_WHITE); 65278 65279 mvwaddch(treescrn2, 3, 13, (chtype) '\''); 65280 @@ -849,7 +849,7 @@ 65281 static int 65282 strng2(void) 65283 { 65284 - wattrset(treescrn2, A_BOLD | A_BLINK); 65285 + (void) wattrset(treescrn2, A_BOLD | A_BLINK); 65286 set_color(treescrn2, COLOR_WHITE); 65287 65288 mvwaddch(treescrn2, 5, 14, (chtype) '\''); 65289 @@ -870,7 +870,7 @@ 65290 static int 65291 strng3(void) 65292 { 65293 - wattrset(treescrn2, A_BOLD | A_BLINK); 65294 + (void) wattrset(treescrn2, A_BOLD | A_BLINK); 65295 set_color(treescrn2, COLOR_WHITE); 65296 65297 mvwaddch(treescrn2, 7, 16, (chtype) '\''); 65298 @@ -893,7 +893,7 @@ 65299 static int 65300 strng4(void) 65301 { 65302 - wattrset(treescrn2, A_BOLD | A_BLINK); 65303 + (void) wattrset(treescrn2, A_BOLD | A_BLINK); 65304 set_color(treescrn2, COLOR_WHITE); 65305 65306 mvwaddch(treescrn2, 9, 17, (chtype) '\''); 65307 @@ -921,7 +921,7 @@ 65308 static int 65309 strng5(void) 65310 { 65311 - wattrset(treescrn2, A_BOLD | A_BLINK); 65312 + (void) wattrset(treescrn2, A_BOLD | A_BLINK); 65313 set_color(treescrn2, COLOR_WHITE); 65314 65315 mvwaddch(treescrn2, 11, 19, (chtype) '\''); 61677 65316 diff -Naur ncurses-5.7.orig/TO-DO ncurses-5.7/TO-DO 61678 65317 --- ncurses-5.7.orig/TO-DO 2008-10-11 12:22:27.000000000 -0700 61679 +++ ncurses-5.7/TO-DO 2009-0 7-19 15:01:59.000000000 -070065318 +++ ncurses-5.7/TO-DO 2009-09-12 08:50:54.000000000 -0700 61680 65319 @@ -25,7 +25,7 @@ 61681 65320 -- sale, use or other dealings in this Software without prior written --
Note:
See TracChangeset
for help on using the changeset viewer.