From 9e3a472c069d718e4f510e8477373618f80227ae Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Sun, 20 Sep 2009 00:37:00 +0000 Subject: [PATCH] ncurses 5.7 - patch 20090919 + document return code from define_key (report by Mike Gran). + make some symbolic links in the terminfo directory-tree shorter (patch by Daniel Jacobowitz, forwarded by Sven Joachim).). + fix some groff warnings in terminfo.5, etc., from recent Debian changes. + change ncv and op capabilities in sun-color terminfo entry to match Sun's entry for this (report by Laszlo Peter). + improve interix smso terminfo capability by using reverse rather than bold (report by Kristof Zelechovski). --- NEWS | 13 ++++++++++++- dist.mk | 4 ++-- man/curs_attr.3x | 5 +++-- man/define_key.3x | 10 +++++++--- man/terminfo.head | 4 ++-- man/terminfo.tail | 20 ++++++++++---------- misc/terminfo.src | 35 +++++++++++++++++++++++++++++------ ncurses/tinfo/lib_cur_term.c | 6 +++++- ncurses/tinfo/write_entry.c | 10 +++++++--- 9 files changed, 77 insertions(+), 30 deletions(-) diff --git a/NEWS b/NEWS index 53274b72..749e0a01 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.1434 2009/09/12 23:38:28 tom Exp $ +-- $Id: NEWS,v 1.1437 2009/09/19 21:13:13 tom Exp $ ------------------------------------------------------------------------------- This is a log of changes that ncurses has gone through since Zeyd started @@ -45,6 +45,17 @@ 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. +20090919 + + document return code from define_key (report by Mike Gran). + + make some symbolic links in the terminfo directory-tree shorter + (patch by Daniel Jacobowitz, forwarded by Sven Joachim).). + + fix some groff warnings in terminfo.5, etc., from recent Debian + changes. + + change ncv and op capabilities in sun-color terminfo entry to match + Sun's entry for this (report by Laszlo Peter). + + improve interix smso terminfo capability by using reverse rather than + bold (report by Kristof Zelechovski). + 20090912 + add some test programs (and make these use the same special keys by sharing linedata.h functions): diff --git a/dist.mk b/dist.mk index e42a63be..38caf727 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.720 2009/09/08 10:31:07 tom Exp $ +# $Id: dist.mk,v 1.721 2009/09/19 17:21:51 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 = 20090912 +NCURSES_PATCH = 20090919 # We don't append the patch to the version, since this only applies to releases VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR) diff --git a/man/curs_attr.3x b/man/curs_attr.3x index cf58affe..4374bf27 100644 --- a/man/curs_attr.3x +++ b/man/curs_attr.3x @@ -1,6 +1,6 @@ '\" t .\"*************************************************************************** -.\" Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. * +.\" Copyright (c) 1998-2007,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 * @@ -27,7 +27,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_attr.3x,v 1.31 2007/03/17 20:30:33 tom Exp $ +.\" $Id: curs_attr.3x,v 1.32 2009/09/19 20:12:30 tom Exp $ .TH curs_attr 3X "" .na .hy 0 @@ -223,6 +223,7 @@ Older versions of this library did not force an update of the screen when changing the attributes. Use \fBtouchwin\fR to force the screen to match the updated attributes. .PP +.ne 9 .TS center ; l l . diff --git a/man/define_key.3x b/man/define_key.3x index 216a3cbc..d87b8f57 100644 --- a/man/define_key.3x +++ b/man/define_key.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998-2004,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 * @@ -28,7 +28,7 @@ .\" .\" Author: Thomas E. Dickey 1997 .\" -.\" $Id: define_key.3x,v 1.12 2006/02/25 21:49:19 tom Exp $ +.\" $Id: define_key.3x,v 1.13 2009/09/19 21:09:35 tom Exp $ .TH define_key 3X "" .SH NAME \fBdefine_key\fP \- define a keycode @@ -47,7 +47,11 @@ removed. Similarly, if the given keycode is negative or zero, any existing string for the given definition is removed. .SH RETURN VALUE -The keycode must be greater than zero, else ERR is returned. +The keycode must be greater than zero, and the string non-null, +otherwise ERR is returned. +ERR may also be returned if there is insufficient memory to allocate the +data to store the definition. +If no error is detected, OK is returned. .SH PORTABILITY These routines are specific to ncurses. They were not supported on Version 7, BSD or System V implementations. It is recommended that diff --git a/man/terminfo.head b/man/terminfo.head index 7455675a..448609c3 100644 --- a/man/terminfo.head +++ b/man/terminfo.head @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998-2004,2006 Free Software Foundation, Inc. * +.\" Copyright (c) 1998-2007,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 * @@ -26,7 +26,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: terminfo.head,v 1.16 2007/03/04 00:09:46 tom Exp $ +.\" $Id: terminfo.head,v 1.17 2009/09/19 19:59:38 tom Exp $ .TH terminfo 5 "" "" "File Formats" .ds n 5 .ds d @TERMINFO@ diff --git a/man/terminfo.tail b/man/terminfo.tail index d06d3a96..802a6f6b 100644 --- a/man/terminfo.tail +++ b/man/terminfo.tail @@ -1,4 +1,4 @@ -.\" $Id: terminfo.tail,v 1.49 2008/02/16 20:57:43 tom Exp $ +.\" $Id: terminfo.tail,v 1.50 2009/09/19 19:56:15 tom Exp $ .\" Beginning of terminfo.tail file .\" This file is part of ncurses. .\" See "terminfo.head" for copyright. @@ -759,9 +759,9 @@ For example, the DEC vt220 supports most of the modes: .PP .TS center; -l c c -l c c -lw28 lw6 lw2 lw20. +l l l +l l l +lw18 lw14 lw18. \fBtparm parameter attribute escape sequence\fP none none \\E[0m @@ -794,9 +794,9 @@ Writing out the above sequences, along with their dependencies yields .PP .TS center; -l c c -l c c -lw28 lw6 lw2 lw20. +l l l +l l l +lw18 lw14 lw18. \fBsequence when to output terminfo translation\fP \\E[0 always \\E[0 @@ -1174,9 +1174,9 @@ This alternate character set may be specified by the \fBacsc\fR capability. .PP .TS H center expand; -c l l c -c l l c -lw28 lw6 lw2 lw20. +l l l l +l l l l +lw25 lw10 lw6 lw6. .\".TH \fBGlyph ACS Ascii VT100\fR \fBName Name Default Name\fR diff --git a/misc/terminfo.src b/misc/terminfo.src index cf71f91b..20ac2161 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.348 $ -# $Date: 2009/05/02 22:23:20 $ +# $Revision: 1.350 $ +# $Date: 2009/09/19 19:32:02 $ # # 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 @@ -4842,11 +4842,28 @@ sun-type4|Sun Workstation console with type 4 keyboard, # Most of the current references to sun-color are from users wondering why this # is the default on install. Details from reading the wscons manpage, adding # cub, etc., here (rather than in the base sun-il entry) since it is not clear -# when those were added -TD +# when those were added -TD (2005-05-28) +# +# According to wscons manpage, color is supported only on IA systems. +# Sun's terminfo entry documents bold and smul/rmul capabilities, but wscons +# does not list these. It also sets ncv#3, however that corresponds to +# underline and standout. +# +# Since the documentation and terminfo do not agree, see also current code at +# http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/io/tem_safe.c +# +# That (actually a different driver which "supports" sun-color) also supports +# these features: +# vpa=\E[%i%p1%dd +# hpa=\E[%i%p1%d` +# cbt=\E[Z +# dim=\E[2m +# blink=\E[5m +# It supports bold, but not underline -TD (2009-09-19) sun-color|Sun Microsystems Workstation console with color support (IA systems), - colors#8, pairs#64, + colors#8, ncv#3, pairs#64, cub=\E[%p1%dD, cud=\E[%p1%dB, cuf=\E[%p1%dC, - cuu=\E[%p1%dA, home=\E[H, op=\E[m\E[p, setab=\E[4%p1%dm, + cuu=\E[%p1%dA, home=\E[H, op=\E[0m, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, setb=\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m, setf=\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m, @@ -5585,7 +5602,7 @@ interix|opennt|opennt-25|ntconsole|ntconsole-25|OpenNT-term compatible with colo rmcup=\E[2b\E[u\r\E[K, rmso=\E[m, rmul=\E[m, rs1=\Ec, sc=\E[s, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, setb=\E[%p1%{40}%+%dm, setf=\E[%p1%{30}%+%dm, - sgr0=\E[0m, smcup=\E[s\E[1b, smso=\E[1m, smul=\E[4m, + sgr0=\E[0m, smcup=\E[s\E[1b, smso=\E[7m, smul=\E[4m, opennt-35|ntconsole-35|OpenNT-term35 compatible with color, lines#35, use=opennt, @@ -21859,6 +21876,12 @@ v3220|LANPAR Vision II model 3220/3221/3222, # 2009-05-02 # * add vwmterm entry (Bryan Christ) # +# 2009-09-19 +# * change ncv and op capabilities in sun-color to match Sun's entry for +# this (report by Laszlo Peter) +# * improve interix smso by using reverse rather than bold (report by +# Kristof Zelechovski). +# # The following sets edit modes for GNU EMACS. # Local Variables: # fill-prefix:"\t" diff --git a/ncurses/tinfo/lib_cur_term.c b/ncurses/tinfo/lib_cur_term.c index 8c016eaa..7607d74e 100644 --- a/ncurses/tinfo/lib_cur_term.c +++ b/ncurses/tinfo/lib_cur_term.c @@ -40,7 +40,7 @@ #include /* TTY, cur_term */ #include /* ospeed */ -MODULE_ID("$Id: lib_cur_term.c,v 1.26 2009/09/05 18:05:27 tom Exp $") +MODULE_ID("$Id: lib_cur_term.c,v 1.27 2009/09/13 14:40:05 tom Exp $") #undef CUR #define CUR termp->type. @@ -66,7 +66,11 @@ _nc_get_cur_term(void) NCURSES_EXPORT(TERMINAL *) NCURSES_PUBLIC_VAR(cur_term) (void) { +#if NCURSES_SP_FUNCS + return NCURSES_SP_NAME(_nc_get_cur_term) (CURRENT_SCREEN); +#else return NCURSES_SP_NAME(_nc_get_cur_term) (NCURSES_SP_ARG); +#endif } #else diff --git a/ncurses/tinfo/write_entry.c b/ncurses/tinfo/write_entry.c index a89da905..057b3c22 100644 --- a/ncurses/tinfo/write_entry.c +++ b/ncurses/tinfo/write_entry.c @@ -54,7 +54,7 @@ #define TRACE_OUT(p) /*nothing */ #endif -MODULE_ID("$Id: write_entry.c,v 1.73 2009/04/18 21:01:38 tom Exp $") +MODULE_ID("$Id: write_entry.c,v 1.74 2009/09/19 20:30:48 Daniel.Jacobowitz Exp $") static int total_written; @@ -418,8 +418,12 @@ _nc_write_entry(TERMTYPE *const tp) { int code; #if USE_SYMLINKS - strcpy(symlinkname, "../"); - strncat(symlinkname, filename, sizeof(symlinkname) - 4); + if (first_name[0] == linkname[0]) + strncpy(symlinkname, first_name, sizeof(symlinkname) - 1); + else { + strcpy(symlinkname, "../"); + strncat(symlinkname, filename, sizeof(symlinkname) - 4); + } symlinkname[sizeof(symlinkname) - 1] = '\0'; #endif /* USE_SYMLINKS */ #if HAVE_REMOVE -- 2.44.0