From: Thomas E. Dickey Date: Sun, 13 Dec 2009 01:36:17 +0000 (+0000) Subject: ncurses 5.7 - patch 20091212 X-Git-Tag: v5.8~58 X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=commitdiff_plain;h=3996fe0bf797f113d6abc4329cc869951735a4d8 ncurses 5.7 - patch 20091212 + correct transfer of multicolumn characters in multirow field_buffer(), which stopped at the end of the first row due to filling of unused entries in a cchar_t array with nulls. + updated nsterm* entries (Benjamin Sittler, Emanuele Giaquinta) + modify _nc_viscbuf2() and _tracecchar_t2() to show wide-character nulls. + use strdup() in set_menu_mark(), restore .marklen struct member on failure. + eliminate clause 3 from the UCB copyrights in read_termcap.c and tset.c per ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change (patch by Nicholas Marriott). + replace a malloc in tic.c with strdup, checking for failure (patch by Nicholas Marriott). + update config.guess, config.sub from http://savannah.gnu.org/projects/config --- diff --git a/NEWS b/NEWS index 7bcb7b7e..e002ce0a 100644 --- a/NEWS +++ b/NEWS @@ -25,7 +25,7 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: NEWS,v 1.1470 2009/12/05 22:07:39 tom Exp $ +-- $Id: NEWS,v 1.1473 2009/12/12 23:23:46 tom Exp $ ------------------------------------------------------------------------------- This is a log of changes that ncurses has gone through since Zeyd started @@ -45,6 +45,24 @@ See the AUTHORS file for the corresponding full names. Changes through 1.9.9e did not credit all contributions; it is not possible to add this information. +20091212 + + correct transfer of multicolumn characters in multirow + field_buffer(), which stopped at the end of the first row due to + filling of unused entries in a cchar_t array with nulls. + + updated nsterm* entries (Benjamin Sittler, Emanuele Giaquinta) + + modify _nc_viscbuf2() and _tracecchar_t2() to show wide-character + nulls. + + use strdup() in set_menu_mark(), restore .marklen struct member on + failure. + + eliminate clause 3 from the UCB copyrights in read_termcap.c and + tset.c per + ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change + (patch by Nicholas Marriott). + + replace a malloc in tic.c with strdup, checking for failure (patch by + Nicholas Marriott). + + update config.guess, config.sub from + http://savannah.gnu.org/projects/config + 20091205 + correct layout of working window used to extract data in wide-character configured by set_field_buffer (patch by Rafael diff --git a/config.guess b/config.guess index 3f51f4ea..dc84c68e 100755 --- a/config.guess +++ b/config.guess @@ -1,10 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. -timestamp='2008-12-19' +timestamp='2009-11-20' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -27,16 +27,16 @@ timestamp='2008-12-19' # the same distribution terms that you use for the rest of that program. -# Originally written by Per Bothner . -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. +# Originally written by Per Bothner. Please send patches (context +# diff format) to and include a ChangeLog +# entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD me=`echo "$0" | sed -e 's,.*/,,'` @@ -170,7 +170,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep __ELF__ >/dev/null + | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? @@ -324,12 +324,18 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; + s390x:SunOS:*:*) + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux${UNAME_RELEASE} + exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" @@ -653,7 +659,7 @@ EOF # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep __LP64__ >/dev/null + grep -q __LP64__ then HP_ARCH="hppa2.0w" else @@ -804,12 +810,12 @@ EOF i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; - *:Interix*:[3456]*) + *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; - EM64T | authenticamd | genuineintel) + authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) @@ -819,6 +825,9 @@ EOF [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; + 8664:Windows_NT:*) + echo x86_64-pc-mks + exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we @@ -848,6 +857,20 @@ EOF i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ @@ -870,6 +893,17 @@ EOF frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; + i*86:Linux:*:*) + LIBC=gnu + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; @@ -879,78 +913,34 @@ EOF m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; - mips:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips - #undef mipsel - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - mips64:Linux:*:*) + mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU - #undef mips64 - #undef mips64el + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mips64el + CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips64 + CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in @@ -959,8 +949,11 @@ EOF *) echo hppa-unknown-linux-gnu ;; esac exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux @@ -983,66 +976,6 @@ EOF xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g - s/.*supported targets: *// - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif - #else - #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^LIBC/{ - s: ::g - p - }'`" - test x"${LIBC}" != x && { - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit - } - test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } - ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both @@ -1071,7 +1004,7 @@ EOF i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) @@ -1115,8 +1048,11 @@ EOF pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i386. - echo i386-pc-msdosdjgpp + # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configury will decide that + # this is a cross-build. + echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 @@ -1176,7 +1112,7 @@ EOF rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) @@ -1269,6 +1205,16 @@ EOF *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in + i386) + eval $set_cc_for_build + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + UNAME_PROCESSOR="x86_64" + fi + fi ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} @@ -1350,6 +1296,9 @@ EOF i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; + i*86:AROS:*:*) + echo ${UNAME_MACHINE}-pc-aros + exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 diff --git a/config.sub b/config.sub index 9489dc78..2a55a507 100755 --- a/config.sub +++ b/config.sub @@ -1,10 +1,10 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. -timestamp='2008-12-11' +timestamp='2009-11-20' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -32,13 +32,16 @@ timestamp='2008-12-11' # Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. +# diff and a properly formatted GNU ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. @@ -122,6 +125,7 @@ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` @@ -148,10 +152,13 @@ case $os in -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray) + -apple | -axis | -knuth | -cray | -microblaze) os= basic_machine=$1 ;; + -bluegene*) + os=-cnk + ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 @@ -271,6 +278,7 @@ case $basic_machine in | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ + | moxie \ | mt \ | msp430 \ | nios | nios2 \ @@ -279,6 +287,7 @@ case $basic_machine in | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ + | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ @@ -286,13 +295,14 @@ case $basic_machine in | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ + | ubicom32 \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12) + m6811 | m68hc11 | m6812 | m68hc12 | picochip) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none @@ -335,7 +345,7 @@ case $basic_machine in | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ @@ -363,7 +373,7 @@ case $basic_machine in | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ - | romp-* | rs6000-* \ + | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ @@ -372,6 +382,7 @@ case $basic_machine in | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ | tron-* \ + | ubicom32-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ @@ -445,6 +456,10 @@ case $basic_machine in basic_machine=m68k-apollo os=-bsd ;; + aros) + basic_machine=i386-pc + os=-aros + ;; aux) basic_machine=m68k-apple os=-aux @@ -461,6 +476,10 @@ case $basic_machine in basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk + ;; c90) basic_machine=c90-cray os=-unicos @@ -713,6 +732,9 @@ case $basic_machine in basic_machine=ns32k-utek os=-sysv ;; + microblaze) + basic_machine=microblaze-xilinx + ;; mingw32) basic_machine=i386-pc os=-mingw32 @@ -1234,6 +1256,9 @@ case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. + -auroraux) + os=-auroraux + ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; @@ -1254,10 +1279,11 @@ case $os in # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ + | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ @@ -1276,7 +1302,7 @@ case $os in | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1606,7 +1632,7 @@ case $basic_machine in -sunos*) vendor=sun ;; - -aix*) + -cnk*|-aix*) vendor=ibm ;; -beos*) diff --git a/dist.mk b/dist.mk index 4d8c11b4..54d011ab 100644 --- a/dist.mk +++ b/dist.mk @@ -25,7 +25,7 @@ # use or other dealings in this Software without prior written # # authorization. # ############################################################################## -# $Id: dist.mk,v 1.734 2009/12/05 18:20:30 tom Exp $ +# $Id: dist.mk,v 1.735 2009/12/12 12:05:49 tom Exp $ # Makefile for creating ncurses distributions. # # This only needs to be used directly as a makefile by developers, but @@ -37,7 +37,7 @@ SHELL = /bin/sh # These define the major/minor/patch versions of ncurses. NCURSES_MAJOR = 5 NCURSES_MINOR = 7 -NCURSES_PATCH = 20091205 +NCURSES_PATCH = 20091212 # We don't append the patch to the version, since this only applies to releases VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR) diff --git a/form/frm_driver.c b/form/frm_driver.c index 67e4c39f..5a8f6b08 100644 --- a/form/frm_driver.c +++ b/form/frm_driver.c @@ -32,7 +32,7 @@ #include "form.priv.h" -MODULE_ID("$Id: frm_driver.c,v 1.95 2009/12/05 21:45:58 Rafael.Garrido.Fernandez Exp $") +MODULE_ID("$Id: frm_driver.c,v 1.96 2009/12/12 23:19:29 tom Exp $") /*---------------------------------------------------------------------------- This is the core module of the form library. It contains the majority @@ -4517,7 +4517,7 @@ field_buffer(const FIELD *field, int buffer) /* determine the number of bytes needed to store the expanded string */ for (n = 0; n < size; ++n) { - if (!isWidecExt(data[n])) + if (!isWidecExt(data[n]) && data[n].chars[0] != L'\0') { mbstate_t state; size_t next; @@ -4534,12 +4534,25 @@ field_buffer(const FIELD *field, int buffer) free(field->expanded[buffer]); field->expanded[buffer] = typeMalloc(char, need + 1); - /* expand the multibyte data */ + /* + * Expand the multibyte data. + * + * It may also be multi-column data. In that case, the data for a row + * may be null-padded to align to the dcols/drows layout (or it may + * contain embedded wide-character extensions). Change the null-padding + * to blanks as needed. + */ if ((result = field->expanded[buffer]) != 0) { wclear(field->working); - mvwadd_wchnstr(field->working, 0, 0, data, size); - mvwinnstr(field->working, 0, 0, result, (int)need); + wmove(field->working, 0, 0); + for (n = 0; n < size; ++n) + { + if (!isWidecExt(data[n]) && data[n].chars[0] != L'\0') + wadd_wch(field->working, &data[n]); + } + wmove(field->working, 0, 0); + winnstr(field->working, result, (int)need); } #else result = Address_Of_Nth_Buffer(field, buffer); diff --git a/menu/m_item_new.c b/menu/m_item_new.c index d7fe1f85..b2f4646f 100644 --- a/menu/m_item_new.c +++ b/menu/m_item_new.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. * + * Copyright (c) 1998-2006,2009 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -44,7 +44,7 @@ #endif #endif -MODULE_ID("$Id: m_item_new.c,v 1.27 2006/12/17 19:47:09 tom Exp $") +MODULE_ID("$Id: m_item_new.c,v 1.29 2009/12/12 18:31:28 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnmenu @@ -122,7 +122,7 @@ new_item(const char *name, const char *description) } else { - item = (ITEM *) calloc(1, sizeof(ITEM)); + item = typeCalloc(ITEM, 1); if (item) { *item = _nc_Default_Item; /* hope we have struct assignment */ @@ -219,7 +219,7 @@ set_menu_mark(MENU * menu, const char *mark) menu->marklen = l; if (l) { - menu->mark = (char *)malloc(l + 1); + menu->mark = strdup(mark); if (menu->mark) { strcpy(menu->mark, mark); @@ -229,6 +229,7 @@ set_menu_mark(MENU * menu, const char *mark) else { menu->mark = old_mark; + menu->marklen = (old_mark != 0) ? strlen(old_mark) : 0; RETURN(E_SYSTEM_ERROR); } } diff --git a/menu/m_new.c b/menu/m_new.c index 6068dc61..ca106c2d 100644 --- a/menu/m_new.c +++ b/menu/m_new.c @@ -37,7 +37,7 @@ #include "menu.priv.h" -MODULE_ID("$Id: m_new.c,v 1.19 2009/04/05 00:32:13 tom Exp $") +MODULE_ID("$Id: m_new.c,v 1.20 2009/12/12 18:31:28 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnmenu @@ -54,7 +54,7 @@ NCURSES_EXPORT(MENU *) NCURSES_SP_NAME(new_menu) (NCURSES_SP_DCLx ITEM ** items) { int err = E_SYSTEM_ERROR; - MENU *menu = (MENU *) calloc(1, sizeof(MENU)); + MENU *menu = typeCalloc(MENU, 1); T((T_CALLED("new_menu(%p,%p)"), SP_PARM, items)); if (menu) diff --git a/misc/terminfo.src b/misc/terminfo.src index e11172b3..bef4efa1 100644 --- a/misc/terminfo.src +++ b/misc/terminfo.src @@ -6,8 +6,8 @@ # Report bugs and new terminal descriptions to # bug-ncurses@gnu.org # -# $Revision: 1.354 $ -# $Date: 2009/10/31 17:28:35 $ +# $Revision: 1.355 $ +# $Date: 2009/12/12 23:04:39 $ # # The original header is preserved below for reference. It is noted that there # is a "newer" version which differs in some cosmetic details (but actually @@ -16604,17 +16604,102 @@ mac|macintosh|Macintosh with MacTerminal, mac-w|macterminal-w|Apple Macintosh with Macterminal in 132 column mode, cols#132, use=mac, +# nsterm*|Apple_Terminal - AppKit Terminal.app +# +# Terminal.app is a Terminal emulator bundled with NeXT's NeXTStep and +# OPENSTEP/Mach operating systems, and with Apple's Rhapsody, Mac OS X +# Server and Mac OS X operating systems. There is also a +# "terminal.app" in GNUStep, but I believe it to be an unrelated +# codebase and I have not attempted to describe it here. +# +# For NeXTStep, OPENSTEP/Mach, Rhapsody and Mac OS X Server 1.0, you +# are pretty much on your own. Use "nsterm-7-m" and hope for the best. +# You might also try "nsterm-7" and "nsterm-old" if you suspect your +# version supports color. +# +# To determine the version of Terminal.app you're using by running: +# +# echo "$TERM_PROGRAM" "$TERM_PROGRAM_VERSION" +# +# For Apple_Terminal v200+, use "nsterm-16color" (a.k.a. "nsterm") +# +# For Apple_Terminal v71+/v100+, use "nsterm-bce". +# +# For Apple_Terminal v51+, use "nsterm-7-c" or "nsterm-7-c-s". +# +# For Apple_Terminal v41+, use "nsterm-old", or "nsterm-s". +# +# For all earlier versions (Apple_Terminal), try "nsterm-7-m" +# (monochrome) or "nsterm-7" (color); "nsterm-7-m-s" and "nsterm-7-s" +# might work too, but really you're on your own here since these +# systems are very obsolete and I can't test them. I do welcome +# patches, though :). + +# Other Terminals: +# +# For GNUstep_Terminal, you're probably best off using "linux" or +# writing your own terminfo. + +# For MacTelnet, you're on your own. It's a different codebase, and +# seems to be somewhere between "vt102", "ncsa" and "xterm-color". + +# For iTerm.app, see "iterm". + +# # The AppKit Terminal.app descriptions all have names beginning with # "nsterm". Note that the statusline (-s) versions use the window # titlebar as a phony status line, and may produce warnings during -# compilation as a result ("tsl uses 0 parameters, expected 1".) Ignore -# these warnings, or even ignore these entries entirely. Apps which -# need to position the cursor or do other fancy stuff inside the status -# line won't work with these entries. They're primarily useful for -# programs like Pine which provide simple notifications in the status -# line. Please note that non-ASCII characters don't work right in the -# status line, since Terminal.app incorrectly interprets their Unicode -# codepoints as MacRoman codepoints. +# compilation as a result ("tsl uses 0 parameters, expected 1".) +# Ignore these warnings, or even ignore these entries entirely. Apps +# which need to position the cursor or do other fancy stuff inside the +# status line won't work with these entries. They're primarily useful +# for programs like Pine which provide simple notifications in the +# status line. Please note that non-ASCII characters don't work right +# in the status line, since Terminal.app incorrectly interprets their +# Unicode codepoints as MacRoman codepoints (in earlier Mac OS X +# versions) or only accepts status lines consisting entirely of +# characters from the first 256 Unicode positions (including C1 but +# not C0 or DEL.) +# +# The Mythology* of AppKit Terminal.app: +# +# In the days of NeXTSTep 0.x and 1.x there were two incompatible +# bundled terminal emulators, Shell and Terminal. Scott Hess wrote a +# shareware replacement for Terminal called "Stuart" which NeXT bought +# and used as the basis for the Terminal.app in NeXTstep 2+, +# OPENSTEP/Mach, Apple Rhapsody, Mac OS X Server 1.0, and Mac OS X. I +# don't know the TERM_PROGRAM and TERM_PROGRAM_VERSION settings or +# capabilities for the early versions, but I believe that the +# TERM_PROGRAM_VERSION may have been reset at some point. +# +# The early versions were tailored to the NeXT character set. Sometime +# after the Apple aquisition the encoding was swiched to MacRoman +# (initally with serious altcharset bugs due to incomplete conversion +# of the old NeXT code,) and then later to UTF-8. Alos sometime during +# or just prior to the early days of Mac OS X, the Terminal grew ANSI +# 8-color support (initially buggy when combined with attributes, but +# that was later fixed.) More recently, around Mac OS X version 10.3 +# or so (Terminal.app v100+) xterm-like 16-color support was added. In +# some versions (for instance 133-1 which shipped with Mac OS X +# version 10.4) this suffered from the bug, but that seems to +# have been fixed in Mac OS X version 10.5 (Terminal.app v240.2+). +# +# In the early days of Mac OS X the terminal was fairly buggy and +# would routinely crash under load. Many of these bugs seem to have +# been fixed around Mac OS X version 10.3 (Terminal.app v100+) but +# some may still remain. This change seems to correspond to +# Terminal.app reporting "xterm-color" as $TERM rather than "vt100" as +# it did previously. +# +# * This may correspond with what actually happened, but I don't +# know. It is based on guesswork, hearsay, private correspondence, +# my faulty memory, and the following online sources and references: +# +# [1] "Three Scotts and a Duane" by Simson L. Garfinkel +# http://www.nextcomputers.org/NeXTfiles/Articles/NeXTWORLD/93.8/93.8.Dec.Community1.html +# +# [2] NeXTSTEP entry from Wikipedia, the free encyclopedia +# https://secure.wikimedia.org/wikipedia/en/wiki/Nextstep # # * Renamed the AppKit Terminal.app entry from "Apple_Terminal" to # "nsterm" to comply with the name length and case conventions and @@ -16811,7 +16896,7 @@ nsterm-m|AppKit Terminal.app v41+ w/MacRoman charset (monochrome), nsterm-m-s|AppKit Terminal.app v41+ w/MacRoman charset (monochrome w/statusline), use=nsterm+s, use=nsterm+mac, -nsterm-old|Apple_Terminal|AppKit Terminal.app v41+ w/MacRoman charset (color), +nsterm-old|AppKit Terminal.app v41+ w/MacRoman charset (color), use=nsterm+c41, use=nsterm+mac, nsterm-c|AppKit Terminal.app v51+ w/MacRoman charset (full color), @@ -16823,32 +16908,51 @@ nsterm-s|AppKit Terminal.app v41+ w/MacRoman charset (color w/statusline), nsterm-c-s|AppKit Terminal.app v51+ w/MacRoman charset (full color w/statusline), use=nsterm+s, use=nsterm+c, use=nsterm+mac, - -# This entry is based on newsgroup comments by Alain Bench, Christian Ebert, -# and D P Schreber comparing to nsterm-c-s-acs. +# In Mac OS X version 10.5 the format of the preferences has changed +# and a new, more complex technique is needed, e.g., # -# D P Schreber notes that $TERM can be set in Terminal.app, e.g., -# defaults write com.apple.Terminal TermCapString nsterm-16color -# and that it is not set in Terminal's preferences dialog. +# python -c 'import sys,objc;NSUserDefaults=objc.lookUpClass( +# "NSUserDefaults");ud=NSUserDefaults.alloc(); +# ud.init();prefs=ud.persistentDomainForName_( +# "com.apple.Terminal");prefs["Window Settings"][ +# prefs["Default Window Settings"]]["TerminalType" +# ]=sys.argv[1];ud.setPersistentDomain_forName_(prefs, +# "com.apple.Terminal")' nsterm-16color +# +# and it is still not settable from the preferences dialog. This is +# tracked under rdar://problem/7365108 and rdar://problem/7365134 +# in Apple's bug reporter. nsterm-16color|AppKit Terminal.app v240.2+ with Mac OS X version 10.5, - npc, - civis=\E[?25l, cnorm=\E[?25h, - flash=\E[?5h$<200/>\E[?5l, kdch1=\E[3~, kend=\E[F, + mir, npc, + civis=\E[?25l, cnorm=\E[?25h, dch=\E[%p1%dP, dch1=\E[P, + flash=\E[?5h$<200/>\E[?5l, hpa=\E[%i%p1%dG, + ich=\E[%p1%d@, ich1=\E[@, kdch1=\E[3~, kend=\E[F, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, kf18=\E[22~, kf19=\E[33~, kf20=\E[34~, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, khome=\E[H, - knp=\E[6~, kpp=\E[5~, rmcup=\E[2J\E[?47l\E8, - smcup=\E7\E[?47h, use=nsterm-c-s-acs, + knp=\E[6~, kpp=\E[5~, rmcup=\E[2J\E[?47l\E8, rmir=\E[4l, + smcup=\E7\E[?47h, smir=\E[4h, vpa=\E[%i%p1%dd, + use=nsterm-c-s-acs, # The versions of Terminal.app in Mac OS X version 10.3.x seem to have # the background color erase bug. The newer version 240.2 in Mac OS X # version 10.5 does not. -nsterm-bce|AppKit Terminal.app v100.1.8+ (bce), +# +# This entry is based on newsgroup comments by Alain Bench, Christian Ebert, +# and D P Schreber comparing to nsterm-c-s-acs. +# +# In Mac OS X version 10.4 and earlier, D P Schreber notes that $TERM +# can be set in Terminal.app, e.g., +# +# defaults write com.apple.Terminal TermCapString nsterm-bce +# +# and that it is not set in Terminal's preferences dialog. +nsterm-bce|AppKit Terminal.app v71+/v100.1.8+ with Mac OS X version 10.3/10.4 (bce), bce, use=nsterm-16color, # This is an alias which should always point to the "current" version -nsterm|AppKit Terminal.app, +nsterm|Apple_Terminal|AppKit Terminal.app, use=nsterm-16color, # iTerm.app from http://iterm.sourceforge.net/ is an alternative (and @@ -21936,6 +22040,9 @@ v3220|LANPAR Vision II model 3220/3221/3222, # 2009-10-31 # * updated nsterm* entries (Benjamin Sittler, prompted by GenToo #206201) # +# 2009-12-12 +# * updated nsterm* entries (Benjamin Sittler, Emanuele Giaquinta) +# # The following sets edit modes for GNU EMACS. # Local Variables: # fill-prefix:"\t" diff --git a/ncurses/tinfo/read_termcap.c b/ncurses/tinfo/read_termcap.c index d94d1a42..4596be73 100644 --- a/ncurses/tinfo/read_termcap.c +++ b/ncurses/tinfo/read_termcap.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. * + * Copyright (c) 1998-2006,2009 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -58,7 +58,7 @@ #include #include -MODULE_ID("$Id: read_termcap.c,v 1.71 2006/07/29 12:06:51 tom Exp $") +MODULE_ID("$Id: read_termcap.c,v 1.73 2009/12/12 20:21:17 tom Exp $") #if !PURE_TERMINFO @@ -79,6 +79,15 @@ get_termpath(void) return result; } +/* + * Note: + * getcap(), cgetent(), etc., are BSD functions. A copy of those was added to + * this file in November 1995, derived from the BSD4.4 Lite sources. + * + * The initial adaptation uses 518 lines from that source. + * The current source (in 2009) uses 183 lines of BSD4.4 Lite (441 ignoring + * whitespace). + */ #if USE_GETCAP #if HAVE_BSD_CGETENT @@ -107,11 +116,7 @@ static int _nc_nfcmp(const char *, char *); * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/ncurses/trace/lib_traceatr.c b/ncurses/trace/lib_traceatr.c index 02560403..b3d3b7cf 100644 --- a/ncurses/trace/lib_traceatr.c +++ b/ncurses/trace/lib_traceatr.c @@ -43,7 +43,7 @@ #define CUR SP_TERMTYPE #endif -MODULE_ID("$Id: lib_traceatr.c,v 1.67 2009/11/21 23:06:40 tom Exp $") +MODULE_ID("$Id: lib_traceatr.c,v 1.68 2009/12/12 21:37:37 tom Exp $") #define COLOR_OF(c) ((c < 0) ? "default" : (c > 7 ? color_of(c) : colors[c].name)) @@ -325,8 +325,11 @@ _tracecchar_t2(int bufnum, const cchar_t *ch) (void) _nc_trace_bufcat(bufnum, "{ "); for (PUTC_i = 0; PUTC_i < CCHARW_MAX; ++PUTC_i) { PUTC_ch = ch->chars[PUTC_i]; - if (PUTC_ch == L'\0') + if (PUTC_ch == L'\0') { + if (PUTC_i == 0) + result = _nc_trace_bufcat(bufnum, "\\000"); break; + } PUTC_n = wcrtomb(PUTC_buf, ch->chars[PUTC_i], &PUT_st); if (PUTC_n <= 0) { if (PUTC_ch != L'\0') { diff --git a/ncurses/trace/visbuf.c b/ncurses/trace/visbuf.c index 820f84cb..afbb9429 100644 --- a/ncurses/trace/visbuf.c +++ b/ncurses/trace/visbuf.c @@ -42,7 +42,7 @@ #include #include -MODULE_ID("$Id: visbuf.c,v 1.34 2009/10/10 20:41:55 tom Exp $") +MODULE_ID("$Id: visbuf.c,v 1.35 2009/12/12 21:34:23 tom Exp $") #define NUM_VISBUFS 4 @@ -304,8 +304,11 @@ _nc_viscbuf2(int bufnum, const NCURSES_CH_T * buf, int len) int k; PUTC_ch = buf[j].chars[PUTC_i]; - if (PUTC_ch == L'\0') + if (PUTC_ch == L'\0') { + if (PUTC_i == 0) + result = _nc_trace_bufcat(bufnum, "\\000"); break; + } PUTC_n = (int) wcrtomb(PUTC_buf, buf[j].chars[PUTC_i], &PUT_st); if (PUTC_n <= 0) diff --git a/panel/p_new.c b/panel/p_new.c index 5d9d5082..df2440b4 100644 --- a/panel/p_new.c +++ b/panel/p_new.c @@ -38,7 +38,7 @@ */ #include "panel.priv.h" -MODULE_ID("$Id: p_new.c,v 1.14 2009/04/11 20:43:04 tom Exp $") +MODULE_ID("$Id: p_new.c,v 1.15 2009/12/12 18:30:29 tom Exp $") #ifdef TRACE static char *stdscr_id; @@ -66,7 +66,7 @@ root_panel(NCURSES_SP_DCL0) #if NO_LEAKS ph->destroy = del_panel; #endif - _nc_stdscr_pseudo_panel = (PANEL *) malloc(sizeof(PANEL)); + _nc_stdscr_pseudo_panel = typeMalloc(PANEL, 1); if (_nc_stdscr_pseudo_panel != 0) { PANEL *pan = _nc_stdscr_pseudo_panel; @@ -104,7 +104,7 @@ new_panel(WINDOW *win) (void)root_panel(NCURSES_SP_ARG); assert(_nc_stdscr_pseudo_panel); - if (!(win->_flags & _ISPAD) && (pan = (PANEL *) malloc(sizeof(PANEL)))) + if (!(win->_flags & _ISPAD) && (pan = typeMalloc(PANEL, 1))) { pan->win = win; pan->above = (PANEL *) 0; diff --git a/progs/tic.c b/progs/tic.c index c56fd993..3d894acd 100644 --- a/progs/tic.c +++ b/progs/tic.c @@ -44,7 +44,7 @@ #include #include -MODULE_ID("$Id: tic.c,v 1.138 2009/03/14 18:45:55 tom Exp $") +MODULE_ID("$Id: tic.c,v 1.139 2009/12/12 17:30:12 Nicholas.Marriott Exp $") const char *_nc_progname = "tic"; @@ -342,8 +342,12 @@ stripped(char *src) while (isspace(UChar(*src))) src++; if (*src != '\0') { - char *dst = strcpy((char *) malloc(strlen(src) + 1), src); - size_t len = strlen(dst); + char *dst; + size_t len; + + if ((dst = strdup(src)) == NULL) + failed("strdup"); + len = strlen(dst); while (--len != 0 && isspace(UChar(dst[len]))) dst[len] = '\0'; return dst; diff --git a/progs/tset.c b/progs/tset.c index 01648297..c7aefbc1 100644 --- a/progs/tset.c +++ b/progs/tset.c @@ -32,6 +32,22 @@ * and: Thomas E. Dickey 1996-on * ****************************************************************************/ +/* + * Notes: + * The initial adaptation from 4.4BSD Lite sources in September 1995 used 686 + * lines from that version, and made changes/additions for 150 lines. There + * was no reformatting, so with/without ignoring whitespace, the amount of + * change is the same. + * + * Comparing with current (2009) source, excluding this comment: + * a) 209 lines match identically to the 4.4BSD Lite sources, with 771 lines + * changed/added. + * a) Ignoring whitespace, the current version still uses 516 lines from the + * 4.4BSD Lite sources, with 402 lines changed/added. + * + * Raymond's original comment on this follows... + */ + /* * tset.c - terminal initialization utility * @@ -52,11 +68,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -107,7 +119,7 @@ char *ttyname(int fd); #include #include -MODULE_ID("$Id: tset.c,v 1.77 2009/03/14 19:08:35 tom Exp $") +MODULE_ID("$Id: tset.c,v 1.80 2009/12/12 19:49:03 tom Exp $") /* * SCO defines TIOCGSIZE and the corresponding struct. Other systems (SunOS, @@ -385,7 +397,7 @@ add_mapping(const char *port, char *arg) char *base = 0; copy = strdup(arg); - mapp = (MAP *) malloc(sizeof(MAP)); + mapp = typeMalloc(MAP, 1); if (copy == 0 || mapp == 0) failed("malloc"); mapp->next = 0;