- Timestamp:
- Sep 12, 2009, 3:55:54 PM (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 +