From: Thomas E. Dickey Date: Sun, 14 Oct 2007 00:38:28 +0000 (+0000) Subject: ncurses 5.6 - patch 20071013 X-Git-Tag: v5.7~48 X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=commitdiff_plain;h=491a3f08b795f494ae17179338c31a11b18fd433 ncurses 5.6 - patch 20071013 + modify makefile rules to allow clear, tput and tset to be built without libtic. The other programs (infocmp, tic and toe) rely on that library. + add/modify null-pointer checks in several functions for SP and/or the WINDOW* parameter (report by Thorben Krueger). + fixes for field_buffer() in formw library (see Redhat Bugzilla #310071, patches by Miroslav Lichvar). + improve performance of NCURSES_CHAR_EQ code (patch by Miroslav Lichvar). + update/improve mlterm and rxvt terminfo entries, e.g., for the modified cursor- and keypad-keys -TD --- diff --git a/NEWS b/NEWS index 58dc2414..08efad14 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.1172 2007/10/06 21:32:14 tom Exp $ +-- $Id: NEWS,v 1.1177 2007/10/13 22:24:34 tom Exp $ ------------------------------------------------------------------------------- This is a log of changes that ncurses has gone through since Zeyd started @@ -45,6 +45,19 @@ 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. +20071013 + + modify makefile rules to allow clear, tput and tset to be built + without libtic. The other programs (infocmp, tic and toe) rely on + that library. + + add/modify null-pointer checks in several functions for SP and/or + the WINDOW* parameter (report by Thorben Krueger). + + fixes for field_buffer() in formw library (see Redhat Bugzilla + #310071, patches by Miroslav Lichvar). + + improve performance of NCURSES_CHAR_EQ code (patch by Miroslav + Lichvar). + + update/improve mlterm and rxvt terminfo entries, e.g., for + the modified cursor- and keypad-keys -TD + 20071006 + add code to curses.priv.h ifdef'd with NCURSES_CHAR_EQ, which changes the CharEq() macro to an inline function to allow comparing diff --git a/dist.mk b/dist.mk index 3fdd36f1..0ecf9aac 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.612 2007/10/06 19:39:13 tom Exp $ +# $Id: dist.mk,v 1.613 2007/10/13 11:47:05 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 = 6 -NCURSES_PATCH = 20071006 +NCURSES_PATCH = 20071013 # We don't append the patch to the version, since this only applies to releases VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR) diff --git a/form/fld_def.c b/form/fld_def.c index 2aa14f77..3559ba67 100644 --- a/form/fld_def.c +++ b/form/fld_def.c @@ -32,7 +32,7 @@ #include "form.priv.h" -MODULE_ID("$Id: fld_def.c,v 1.34 2007/02/03 23:37:46 tom Exp $") +MODULE_ID("$Id: fld_def.c,v 1.36 2007/10/13 19:29:58 tom Exp $") /* this can't be readonly */ static FIELD default_field = @@ -93,7 +93,7 @@ _nc_Make_Argument(const FIELDTYPE *typ, va_list *ap, int *err) assert(err != 0 && ap != (va_list *)0); if ((typ->status & _LINKED_TYPE) != 0) { - p = (TypeArgument *)malloc(sizeof(TypeArgument)); + p = typeMalloc(TypeArgument, 1); if (p != 0) { @@ -141,7 +141,7 @@ _nc_Copy_Argument(const FIELDTYPE *typ, const TypeArgument *argp, int *err) assert(err != 0 && argp != 0); if ((typ->status & _LINKED_TYPE) != 0) { - p = (TypeArgument *)malloc(sizeof(TypeArgument)); + p = typeMalloc(TypeArgument, 1); if (p != 0) { @@ -289,7 +289,7 @@ new_field(int rows, int cols, int frow, int fcol, int nrow, int nbuf) nrow >= 0 && nbuf >= 0 && ((err = E_SYSTEM_ERROR) != 0) && /* trick: this resets the default error */ - (New_Field = (FIELD *)malloc(sizeof(FIELD))) != 0) + (New_Field = typeMalloc(FIELD, 1)) != 0) { T((T_CREATE("field %p"), New_Field)); *New_Field = default_field; @@ -305,7 +305,7 @@ new_field(int rows, int cols, int frow, int fcol, int nrow, int nbuf) #if USE_WIDEC_SUPPORT New_Field->working = newpad(1, Buffer_Length(New_Field) + 1); - New_Field->expanded = (char **)calloc(1 + (unsigned)rows, sizeof(char *)); + New_Field->expanded = typeCalloc(char *, 1 + (unsigned)nbuf); #endif if (_nc_Copy_Type(New_Field, &default_field)) diff --git a/form/fld_dup.c b/form/fld_dup.c index 7091bce4..bbc38a3e 100644 --- a/form/fld_dup.c +++ b/form/fld_dup.c @@ -32,7 +32,7 @@ #include "form.priv.h" -MODULE_ID("$Id: fld_dup.c,v 1.11 2007/02/03 23:37:46 tom Exp $") +MODULE_ID("$Id: fld_dup.c,v 1.12 2007/10/13 19:30:21 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform @@ -56,7 +56,7 @@ dup_field(FIELD *field, int frow, int fcol) T((T_CALLED("dup_field(%p,%d,%d)"), field, frow, fcol)); if (field && (frow >= 0) && (fcol >= 0) && ((err = E_SYSTEM_ERROR) != 0) && /* trick : this resets the default error */ - (New_Field = (FIELD *)malloc(sizeof(FIELD)))) + (New_Field = typeMalloc(FIELD, 1))) { T((T_CREATE("field %p"), New_Field)); *New_Field = *_nc_Default_Field; diff --git a/form/fld_ftlink.c b/form/fld_ftlink.c index 30150661..4ed22192 100644 --- a/form/fld_ftlink.c +++ b/form/fld_ftlink.c @@ -32,7 +32,7 @@ #include "form.priv.h" -MODULE_ID("$Id: fld_ftlink.c,v 1.12 2007/02/03 23:37:46 tom Exp $") +MODULE_ID("$Id: fld_ftlink.c,v 1.13 2007/10/13 19:30:35 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform @@ -56,7 +56,7 @@ link_fieldtype(FIELDTYPE *type1, FIELDTYPE *type2) T((T_CALLED("link_fieldtype(%p,%p)"), type1, type2)); if (type1 && type2) { - nftyp = (FIELDTYPE *)malloc(sizeof(FIELDTYPE)); + nftyp = typeMalloc(FIELDTYPE, 1); if (nftyp) { diff --git a/form/fld_link.c b/form/fld_link.c index c0461afa..0aac7db7 100644 --- a/form/fld_link.c +++ b/form/fld_link.c @@ -32,7 +32,7 @@ #include "form.priv.h" -MODULE_ID("$Id: fld_link.c,v 1.10 2007/02/03 23:37:46 tom Exp $") +MODULE_ID("$Id: fld_link.c,v 1.11 2007/10/13 19:30:43 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform @@ -57,7 +57,7 @@ link_field(FIELD *field, int frow, int fcol) T((T_CALLED("link_field(%p,%d,%d)"), field, frow, fcol)); if (field && (frow >= 0) && (fcol >= 0) && ((err = E_SYSTEM_ERROR) != 0) && /* trick: this resets the default error */ - (New_Field = (FIELD *)malloc(sizeof(FIELD)))) + (New_Field = typeMalloc(FIELD, 1))) { T((T_CREATE("field %p"), New_Field)); *New_Field = *_nc_Default_Field; diff --git a/form/fld_newftyp.c b/form/fld_newftyp.c index 1ae38d67..c2984b10 100644 --- a/form/fld_newftyp.c +++ b/form/fld_newftyp.c @@ -32,7 +32,7 @@ #include "form.priv.h" -MODULE_ID("$Id: fld_newftyp.c,v 1.14 2007/02/03 23:37:46 tom Exp $") +MODULE_ID("$Id: fld_newftyp.c,v 1.15 2007/10/13 19:30:55 tom Exp $") static FIELDTYPE const default_fieldtype = { @@ -76,7 +76,7 @@ new_fieldtype(bool (*const field_check) (FIELD *, const void *), T((T_CALLED("new_fieldtype(%p,%p)"), field_check, char_check)); if ((field_check) || (char_check)) { - nftyp = (FIELDTYPE *)malloc(sizeof(FIELDTYPE)); + nftyp = typeMalloc(FIELDTYPE, 1); if (nftyp) { diff --git a/form/frm_def.c b/form/frm_def.c index c0a78554..c2044a39 100644 --- a/form/frm_def.c +++ b/form/frm_def.c @@ -32,7 +32,7 @@ #include "form.priv.h" -MODULE_ID("$Id: frm_def.c,v 1.21 2007/02/03 23:37:46 tom Exp $") +MODULE_ID("$Id: frm_def.c,v 1.22 2007/10/13 19:31:17 tom Exp $") /* this can't be readonly */ static FORM default_form = @@ -186,7 +186,7 @@ Connect_Fields(FORM *form, FIELD **fields) RETURN(E_BAD_ARGUMENT); /* allocate page structures */ - if ((pg = (_PAGE *) malloc(page_nr * sizeof(_PAGE))) != (_PAGE *) 0) + if ((pg = typeMalloc(_PAGE, page_nr)) != (_PAGE *) 0) { T((T_CREATE("_PAGE %p"), pg)); form->page = pg; @@ -291,7 +291,7 @@ new_form(FIELD **fields) { int err = E_SYSTEM_ERROR; - FORM *form = (FORM *)malloc(sizeof(FORM)); + FORM *form = typeMalloc(FORM, 1); T((T_CALLED("new_form(%p)"), fields)); if (form) diff --git a/form/frm_driver.c b/form/frm_driver.c index 2499f4da..cc7eb6e1 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.82 2007/06/02 22:59:24 tom Exp $") +MODULE_ID("$Id: frm_driver.c,v 1.84 2007/10/13 19:26:54 tom Exp $") /*---------------------------------------------------------------------------- This is the core module of the form library. It contains the majority @@ -4379,7 +4379,7 @@ set_field_buffer(FIELD *field, int buffer, const char *value) wclear(field->working); mvwaddstr(field->working, 0, 0, value); - if ((widevalue = (FIELD_CELL *)calloc(len + 1, sizeof(FIELD_CELL))) == 0) + if ((widevalue = typeCalloc(FIELD_CELL, len + 1)) == 0) { RETURN(E_SYSTEM_ERROR); } @@ -4476,7 +4476,7 @@ field_buffer(const FIELD *field, int buffer) { wclear(field->working); mvwadd_wchnstr(field->working, 0, 0, data, size); - mvwinnstr(field->working, 0, 0, result, (int)need + 1); + mvwinnstr(field->working, 0, 0, result, (int)need); } #else result = Address_Of_Nth_Buffer(field, buffer); diff --git a/form/fty_alnum.c b/form/fty_alnum.c index 2408b8cd..59dd2736 100644 --- a/form/fty_alnum.c +++ b/form/fty_alnum.c @@ -34,7 +34,7 @@ #include "form.priv.h" -MODULE_ID("$Id: fty_alnum.c,v 1.20 2007/02/03 23:37:46 tom Exp $") +MODULE_ID("$Id: fty_alnum.c,v 1.21 2007/10/13 19:31:52 tom Exp $") #define thisARG alnumARG @@ -55,7 +55,7 @@ thisARG; static void * Make_This_Type(va_list *ap) { - thisARG *argp = (thisARG *) malloc(sizeof(thisARG)); + thisARG *argp = typeMalloc(thisARG, 1); if (argp) { @@ -78,7 +78,7 @@ static void * Copy_This_Type(const void *argp) { const thisARG *ap = (const thisARG *)argp; - thisARG *result = (thisARG *) malloc(sizeof(thisARG)); + thisARG *result = typeMalloc(thisARG, 1); if (result) { diff --git a/form/fty_alpha.c b/form/fty_alpha.c index e9fb6f58..bd49544f 100644 --- a/form/fty_alpha.c +++ b/form/fty_alpha.c @@ -34,7 +34,7 @@ #include "form.priv.h" -MODULE_ID("$Id: fty_alpha.c,v 1.22 2007/02/03 23:37:46 tom Exp $") +MODULE_ID("$Id: fty_alpha.c,v 1.23 2007/10/13 19:32:09 tom Exp $") #define thisARG alphaARG @@ -55,7 +55,7 @@ thisARG; static void * Make_This_Type(va_list *ap) { - thisARG *argp = (thisARG *) malloc(sizeof(thisARG)); + thisARG *argp = typeMalloc(thisARG, 1); if (argp) { @@ -78,7 +78,7 @@ static void * Copy_This_Type(const void *argp) { const thisARG *ap = (const thisARG *)argp; - thisARG *result = (thisARG *) malloc(sizeof(thisARG)); + thisARG *result = typeMalloc(thisARG, 1); if (result) { diff --git a/form/fty_enum.c b/form/fty_enum.c index 6c39e9f4..c96a080d 100644 --- a/form/fty_enum.c +++ b/form/fty_enum.c @@ -34,7 +34,7 @@ #include "form.priv.h" -MODULE_ID("$Id: fty_enum.c,v 1.21 2007/02/03 23:37:46 tom Exp $") +MODULE_ID("$Id: fty_enum.c,v 1.22 2007/10/13 19:32:26 tom Exp $") typedef struct { @@ -56,7 +56,7 @@ enumARG; static void * Make_Enum_Type(va_list *ap) { - enumARG *argp = (enumARG *)malloc(sizeof(enumARG)); + enumARG *argp = typeMalloc(enumARG, 1); if (argp) { @@ -97,7 +97,7 @@ Copy_Enum_Type(const void *argp) { const enumARG *ap = (const enumARG *)argp; - result = (enumARG *)malloc(sizeof(enumARG)); + result = typeMalloc(enumARG, 1); if (result) { diff --git a/form/fty_int.c b/form/fty_int.c index d8ac3d03..8a5367f7 100644 --- a/form/fty_int.c +++ b/form/fty_int.c @@ -34,7 +34,7 @@ #include "form.priv.h" -MODULE_ID("$Id: fty_int.c,v 1.21 2007/02/03 23:37:46 tom Exp $") +MODULE_ID("$Id: fty_int.c,v 1.22 2007/10/13 19:32:40 tom Exp $") #if USE_WIDEC_SUPPORT #define isDigit(c) (iswdigit((wint_t)(c)) || isdigit(UChar(c))) @@ -63,7 +63,7 @@ thisARG; static void * Make_This_Type(va_list *ap) { - thisARG *argp = (thisARG *) malloc(sizeof(thisARG)); + thisARG *argp = typeMalloc(thisARG, 1); if (argp) { @@ -91,7 +91,7 @@ Copy_This_Type(const void *argp) if (argp) { - result = (thisARG *) malloc(sizeof(thisARG)); + result = typeMalloc(thisARG, 1); if (result) { T((T_CREATE("thisARG %p"), result)); diff --git a/form/fty_num.c b/form/fty_num.c index d45cb906..e74e8e36 100644 --- a/form/fty_num.c +++ b/form/fty_num.c @@ -34,7 +34,7 @@ #include "form.priv.h" -MODULE_ID("$Id: fty_num.c,v 1.24 2007/02/03 23:37:46 tom Exp $") +MODULE_ID("$Id: fty_num.c,v 1.25 2007/10/13 19:32:54 tom Exp $") #if HAVE_LOCALE_H #include @@ -74,7 +74,7 @@ thisARG; static void * Make_This_Type(va_list *ap) { - thisARG *argn = (thisARG *) malloc(sizeof(thisARG)); + thisARG *argn = typeMalloc(thisARG, 1); if (argn) { @@ -108,7 +108,7 @@ Copy_This_Type(const void *argp) if (argp) { - result = (thisARG *) malloc(sizeof(thisARG)); + result = typeMalloc(thisARG, 1); if (result) { T((T_CREATE("thisARG %p"), result)); diff --git a/form/fty_regex.c b/form/fty_regex.c index 5041ac14..247779f2 100644 --- a/form/fty_regex.c +++ b/form/fty_regex.c @@ -34,7 +34,7 @@ #include "form.priv.h" -MODULE_ID("$Id: fty_regex.c,v 1.20 2007/02/03 23:37:46 tom Exp $") +MODULE_ID("$Id: fty_regex.c,v 1.21 2007/10/13 19:33:50 tom Exp $") #if HAVE_REGEX_H_FUNCS /* We prefer POSIX regex */ #include @@ -105,17 +105,17 @@ Make_RegularExpression_Type(va_list *ap) char *rx = va_arg(*ap, char *); RegExp_Arg *preg; - preg = (RegExp_Arg *)malloc(sizeof(RegExp_Arg)); + preg = typeMalloc(RegExp_Arg, 1); if (preg) { T((T_CREATE("RegExp_Arg %p"), preg)); - if (((preg->pRegExp = (regex_t *) malloc(sizeof(regex_t))) != 0) + if (((preg->pRegExp = typeMalloc(regex_t, 1)) != 0) && !regcomp(preg->pRegExp, rx, (REG_EXTENDED | REG_NOSUB | REG_NEWLINE))) { T((T_CREATE("regex_t %p"), preg->pRegExp)); - preg->refCount = (unsigned long *)malloc(sizeof(unsigned long)); + preg->refCount = typeMalloc(unsigned long, 1); *(preg->refCount) = 1; } @@ -132,7 +132,7 @@ Make_RegularExpression_Type(va_list *ap) char *rx = va_arg(*ap, char *); RegExp_Arg *pArg; - pArg = (RegExp_Arg *)malloc(sizeof(RegExp_Arg)); + pArg = typeMalloc(RegExp_Arg, 1); if (pArg) { @@ -140,13 +140,13 @@ Make_RegularExpression_Type(va_list *ap) T((T_CREATE("RegExp_Arg %p"), pArg)); pArg->compiled_expression = NULL; - pArg->refCount = (unsigned long *)malloc(sizeof(unsigned long)); + pArg->refCount = typeMalloc(unsigned long, 1); *(pArg->refCount) = 1; do { - char *buf = (char *)malloc(blen); + char *buf = typeMalloc(char, blen); if (buf) { diff --git a/misc/terminfo.src b/misc/terminfo.src index 7f19f718..0d6c1096 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.310 $ -# $Date: 2007/08/18 22:27:38 $ +# $Revision: 1.312 $ +# $Date: 2007/10/13 17:26:29 $ # # 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 @@ -3582,14 +3582,25 @@ konsole|KDE console window, konsole-256color|KDE console window with xterm 256-colors, initc@, use=xterm+256color, use=konsole, -# Based on mlterm 2.9.2's mlterm.ti, with corrections/additions from reading -# the source code and running tack -TD +# This is mlterm 2.9.3's mlterm.ti, with some additions/corrections -TD # -# This is nominally a vt102 emulator, with features borrowed from rxvt and +# It is nominally a vt102 emulator, with features borrowed from rxvt and # xterm. # -# There are some problems with vttest: -# test of character sets leaves it in line-drawing mode. +# The function keys are numbered based on shift/control/alt modifiers, except +# that the control-modifier itself is used to spawn a new copy of mlterm (the +# "-P" option). So control/F1 to control/F12 may not be usable, depending on +# how it is configured. +# +# kf1 to kf12 \E[11~ to \E[24~ +# shift kf1 to kf12 \E[11;2~ to \E[24;2~ +# alt kf1 to kf12 \E[11;3~ to \E[24;3~ +# shift/alt kf1 to kf12 \E[11;4~ to \E[24;4~ +# control kf1 to kf12 \E[11;5~ to \E[24;5~ (maybe) +# control/shift kf1 to kf12 \E[11;6~ to \E[24;6~ +# control/alt kf1 to kf12 \E[11;7~ to \E[24;7~ +# control/shit/alt kf1 to kf12 \E[11;8~ to \E[24;8~ +# mlterm|multi lingual terminal emulator, am, eslok, km, mc5i, mir, msgr, npc, xenl, colors#8, cols#80, it#8, lines#24, pairs#64, @@ -3606,20 +3617,47 @@ mlterm|multi lingual terminal emulator, is2=\E7\E[r\E[m\E[?7h\E[?1;3;4;6l\E[4l\E8\E>, kbs=\177, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kdch1=\E[3~, kend=\EOF, kent=\EOM, kf1=\E[11~, kf10=\E[21~, - kf11=\E[23~, kf12=\E[24~, kf2=\E[12~, kf3=\E[13~, - kf4=\E[14~, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, - kf9=\E[20~, kfnd=\E[1~, khome=\EOH, kich1=\E[2~, - kmous=\E[M, knp=\E[6~, kpp=\E[5~, kslt=\E[4~, mc0=\E[i, - nel=\EE, op=\E[39;49m, rc=\E8, rev=\E[7m, ri=\EM, - rin=\E[%p1%dT, rmacs=\E(B, rmam=\E[?7l, - rmcup=\E[2J\E[?47l\E8, rmir=\E[4l, rmkx=\E[?1l\E>, + kf11=\E[23~, kf12=\E[24~, kf13=\E[11;2~, kf14=\E[12;2~, + kf15=\E[13;2~, kf16=\E[14;2~, kf17=\E[15;2~, + kf18=\E[17;2~, kf19=\E[18;2~, kf2=\E[12~, kf20=\E[19;2~, + kf21=\E[20;2~, kf22=\E[21;2~, kf23=\E[23;2~, + kf24=\E[24;2~, kf25=\E[11;5~, kf26=\E[12;5~, + kf27=\E[13;5~, kf28=\E[14;5~, kf29=\E[15;5~, kf3=\E[13~, + kf30=\E[17;5~, kf31=\E[18;5~, kf32=\E[19;5~, + kf33=\E[20;5~, kf34=\E[21;5~, kf35=\E[23;5~, + kf36=\E[24;5~, kf37=\E[11;6~, kf38=\E[12;6~, + kf39=\E[13;6~, kf4=\E[14~, kf40=\E[14;6~, kf41=\E[15;6~, + kf42=\E[17;6~, kf43=\E[18;6~, kf44=\E[19;6~, + kf45=\E[20;6~, kf46=\E[21;6~, kf47=\E[23;6~, + kf48=\E[24;6~, kf49=\E[11;3~, kf5=\E[15~, kf50=\E[12;3~, + kf51=\E[13;3~, kf52=\E[14;3~, kf53=\E[15;3~, + kf54=\E[17;3~, kf55=\E[18;3~, kf56=\E[19;3~, + kf57=\E[20;3~, kf58=\E[21;3~, kf59=\E[23;3~, kf6=\E[17~, + kf60=\E[24;3~, kf61=\E[11;4~, kf62=\E[12;4~, + kf63=\E[13;4~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, + kfnd=\E[1~, khome=\EOH, kich1=\E[2~, kmous=\E[M, knp=\E[6~, + kpp=\E[5~, kslt=\E[4~, mc0=\E[i, nel=\EE, op=\E[39;49m, + rc=\E8, rev=\E[7m, ri=\EM, rin=\E[%p1%dT, rmacs=\E(B, + rmam=\E[?7l, rmcup=\E[?1049l, rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[27m, rmul=\E[24m, rs2=\E7\E[r\E8\E[m\E[?7h\E[?1;3;4;6l\E[4l\E>\E[?1000l, sc=\E7, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;m%?%p9%t\E(0%e\E(B%;, - sgr0=\E[m\E(B, smacs=\E(0, smam=\E[?7h, smcup=\E7\E[?47h, + sgr0=\E[m\E(B, smacs=\E(0, smam=\E[?7h, smcup=\E[?1049h, smir=\E[4h, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, - tbc=\E[3g, vpa=\E[%i%p1%dd, use=vt100+enq, + tbc=\E[3g, u6=\E[%i%d;%dR, u7=\E[6n, u8=\E[?1;2c, u9=\E[c, + vpa=\E[%i%p1%dd, use=mlterm+pcfkeys, + +# The insert/delete/home/end keys do not respond to modifiers because mlterm +# looks in its termcap to decide which string to send. If it used terminfo +# (when available), it could use the extended names introduced for xterm. +mlterm+pcfkeys|fragment for PC-style fkeys, + kLFT=\EO1;2D, kNXT=\E[6;2~, kPRV=\E[5;2~, kRIT=\EO1;2C, + kDN=\EO1;2B, kDN5=\EO1;5B, kDN6=\EO1;6B, kIC5=\E[2;5~, + kIC6=\E[2;6~, kLFT5=\EO1;5D, kLFT6=\EO1;6D, + kNXT5=\E[6;5~, kNXT6=\E[6;6~, kPRV5=\E[5;5~, + kPRV6=\E[5;6~, kRIT5=\EO1;5C, kRIT6=\EO1;6C, kUP=\EO1;2A, + kUP5=\EO1;5A, kUP6=\EO1;6A, # From: Thomas Dickey 04 Oct 1997 # Updated: Oezguer Kesim 02 Nov 1997 @@ -3708,6 +3746,7 @@ rxvt-basic|rxvt terminal base (X Window System), # F18 ESC [ 32 ~ ESC [ 32 $ ESC [ 32 ^ ESC [ 32 @ # F19 ESC [ 33 ~ ESC [ 33 $ ESC [ 33 ^ ESC [ 33 @ # F20 ESC [ 34 ~ ESC [ 34 $ ESC [ 34 ^ ESC [ 34 @ +# # Application # Up ESC [ A ESC [ a ESC O a ESC O A # Down ESC [ B ESC [ b ESC O b ESC O B @@ -3735,10 +3774,18 @@ rxvt-basic|rxvt terminal base (X Window System), # XK_KP_8 8 ESC O x # XK_KP_9 9 ESC O y # +# The source-code for rxvt actually defines mappings for F21-F35, using +# "ESC [ 35 ~" to "ESC [ 49 ~". Keyboards with more than 12 function keys +# are rare, so this entry uses the shift- and control-modifiers as in +# xterm+pcfkeys to define keys past F12. +# +# kIC is normally not used, since rxvt performs a paste for that (shifted +# insert), unless private mode 35 is set. +# # kDN, kDN5, kDN6, etc are extensions based on the names from xterm+pcfkeys -TD # Removed kDN6, etc (control+shift) since rxvt does not implement this -TD rxvt+pcfkeys|fragment for PC-style fkeys, - kDC=\E[3$, kEND=\E[8$, kHOM=\E[7$, kIC=\E2$, kLFT=\E[d, + kDC=\E[3$, kEND=\E[8$, kHOM=\E[7$, kIC=\E[2$, kLFT=\E[d, kNXT=\E[6$, kPRV=\E[5$, kRIT=\E[c, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~, kel=\E[8\^, kend=\E[8~, kf1=\E[11~, kf10=\E[21~, kf11=\E[23~, @@ -3753,7 +3800,10 @@ rxvt+pcfkeys|fragment for PC-style fkeys, kf41=\E[33\^, kf42=\E[34\^, kf43=\E[23@, kf44=\E[24@, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, kfnd=\E[1~, khome=\E[7~, kich1=\E[2~, knp=\E[6~, kpp=\E[5~, - kslt=\E[4~, kDN=\E[b, kDN5=\EOb, kLFT5=\EOd, kRIT5=\EOc, + kslt=\E[4~, kDC5=\E[3\^, kDC6=\E[3@, kDN=\E[b, kDN5=\EOb, + kEND5=\E[8\^, kEND6=\E[8@, kHOM5=\E[7\^, kHOM6=\E[7@, + kIC5=\E[2\^, kIC6=\E[2@, kLFT5=\EOd, kNXT5=\E[6\^, + kNXT6=\E[6@, kPRV5=\E[5\^, kPRV6=\E[5@, kRIT5=\EOc, kUP=\E[a, kUP5=\EOa, rxvt|rxvt terminal emulator (X Window System), @@ -21524,6 +21574,13 @@ v3220|LANPAR Vision II model 3220/3221/3222, # 2007-08-18 # * add 9term entry (request by Juhapekka Tolvanen) -TD # +# 2007-10-13 +# * correct kIC in rxvt+pcfkeys (prompted by Debian #446444) -TD +# * add shift-control- and control-modified keys for rxvt editing +# keypad -TD +# * update mlterm entry to 2.9.3 -TD +# * add mlterm+pcfkeys -TD +# # The following sets edit modes for GNU EMACS. # Local Variables: # fill-prefix:"\t" diff --git a/ncurses/base/lib_addstr.c b/ncurses/base/lib_addstr.c index 7428f520..4e3a040c 100644 --- a/ncurses/base/lib_addstr.c +++ b/ncurses/base/lib_addstr.c @@ -44,7 +44,7 @@ #include -MODULE_ID("$Id: lib_addstr.c,v 1.47 2007/04/07 17:13:21 tom Exp $") +MODULE_ID("$Id: lib_addstr.c,v 1.48 2007/10/13 19:56:57 tom Exp $") NCURSES_EXPORT(int) waddnstr(WINDOW *win, const char *astr, int n) @@ -129,8 +129,8 @@ NCURSES_EXPORT(int) wadd_wchnstr(WINDOW *win, const cchar_t *astr, int n) { static const NCURSES_CH_T blank = NewChar(BLANK_TEXT); - NCURSES_SIZE_T y = win->_cury; - NCURSES_SIZE_T x = win->_curx; + NCURSES_SIZE_T y; + NCURSES_SIZE_T x; int code = OK; struct ldat *line; int i, j, start, len, end; @@ -140,6 +140,8 @@ wadd_wchnstr(WINDOW *win, const cchar_t *astr, int n) if (!win) returnCode(ERR); + y = win->_cury; + x = win->_curx; if (n < 0) { n = _nc_wchstrlen(astr); } diff --git a/ncurses/base/lib_redrawln.c b/ncurses/base/lib_redrawln.c index 548ca97e..6b0905f0 100644 --- a/ncurses/base/lib_redrawln.c +++ b/ncurses/base/lib_redrawln.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2001,2006 Free Software Foundation, Inc. * + * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -39,17 +39,20 @@ #include -MODULE_ID("$Id: lib_redrawln.c,v 1.11 2006/11/04 23:08:47 tom Exp $") +MODULE_ID("$Id: lib_redrawln.c,v 1.12 2007/10/13 20:08:56 tom Exp $") NCURSES_EXPORT(int) wredrawln(WINDOW *win, int beg, int num) { int i; int end; - size_t len = (win->_maxx + 1); + size_t len; T((T_CALLED("wredrawln(%p,%d,%d)"), win, beg, num)); + if (win == 0) + returnCode(ERR); + if (beg < 0) beg = 0; @@ -65,6 +68,7 @@ wredrawln(WINDOW *win, int beg, int num) if (end > win->_maxy + 1) end = win->_maxy + 1; + len = (win->_maxx + 1); if (len > (size_t) (curscr->_maxx + 1)) len = (size_t) (curscr->_maxx + 1); len *= sizeof(curscr->_line[0].text[0]); diff --git a/ncurses/base/lib_restart.c b/ncurses/base/lib_restart.c index 31719093..858ef65a 100644 --- a/ncurses/base/lib_restart.c +++ b/ncurses/base/lib_restart.c @@ -48,22 +48,22 @@ #include /* lines, columns, cur_term */ -MODULE_ID("$Id: lib_restart.c,v 1.7 2007/04/19 21:05:25 tom Exp $") +MODULE_ID("$Id: lib_restart.c,v 1.8 2007/10/13 19:59:47 tom Exp $") NCURSES_EXPORT(int) restartterm(NCURSES_CONST char *termp, int filenum, int *errret) { - int saveecho = SP->_echo; - int savecbreak = SP->_cbreak; - int saveraw = SP->_raw; - int savenl = SP->_nl; int result; T((T_CALLED("restartterm(%s,%d,%p)"), termp, filenum, errret)); if (setupterm(termp, filenum, errret) != OK) { result = ERR; - } else { + } else if (SP != 0) { + int saveecho = SP->_echo; + int savecbreak = SP->_cbreak; + int saveraw = SP->_raw; + int savenl = SP->_nl; if (saveecho) echo(); @@ -92,6 +92,8 @@ restartterm(NCURSES_CONST char *termp, int filenum, int *errret) #endif result = OK; + } else { + result = ERR; } returnCode(result); } diff --git a/ncurses/base/lib_slkset.c b/ncurses/base/lib_slkset.c index 9379b363..e19f88e6 100644 --- a/ncurses/base/lib_slkset.c +++ b/ncurses/base/lib_slkset.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2004,2005 Free Software Foundation, Inc. * + * Copyright (c) 1998-2005,2007 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,12 +44,12 @@ #endif #endif -MODULE_ID("$Id: lib_slkset.c,v 1.16 2006/12/17 19:47:09 tom Exp $") +MODULE_ID("$Id: lib_slkset.c,v 1.17 2007/10/13 20:08:46 tom Exp $") NCURSES_EXPORT(int) slk_set(int i, const char *astr, int format) { - SLK *slk = SP->_slk; + SLK *slk; int offset; int numchrs; int numcols; @@ -59,7 +59,12 @@ slk_set(int i, const char *astr, int format) T((T_CALLED("slk_set(%d, \"%s\", %d)"), i, str, format)); - if (slk == NULL || i < 1 || i > slk->labcnt || format < 0 || format > 2) + if (SP == 0 + || (slk = SP->_slk) == 0 + || i < 1 + || i > slk->labcnt + || format < 0 + || format > 2) returnCode(ERR); if (str == NULL) str = ""; diff --git a/ncurses/base/resizeterm.c b/ncurses/base/resizeterm.c index 61761bfa..02057b18 100644 --- a/ncurses/base/resizeterm.c +++ b/ncurses/base/resizeterm.c @@ -41,7 +41,7 @@ #include #include -MODULE_ID("$Id: resizeterm.c,v 1.22 2007/09/29 20:37:13 tom Exp $") +MODULE_ID("$Id: resizeterm.c,v 1.23 2007/10/13 20:12:13 tom Exp $") #define stolen_lines (screen_lines - SP->_lines_avail) @@ -250,12 +250,16 @@ NCURSES_EXPORT(int) resize_term(int ToLines, int ToCols) { int result = OK EXTRA_ARGS; - int was_stolen = (screen_lines - SP->_lines_avail); + int was_stolen; T((T_CALLED("resize_term(%d,%d) old(%d,%d)"), ToLines, ToCols, screen_lines, screen_columns)); + if (SP == 0) { + returnCode(ERR); + } + was_stolen = (screen_lines - SP->_lines_avail); if (is_term_resized(ToLines, ToCols)) { int myLines = CurLines = screen_lines; int myCols = CurCols = screen_columns; @@ -325,22 +329,25 @@ resize_term(int ToLines, int ToCols) NCURSES_EXPORT(int) resizeterm(int ToLines, int ToCols) { - int result = OK; - - SP->_sig_winch = FALSE; + int result = ERR; T((T_CALLED("resizeterm(%d,%d) old(%d,%d)"), ToLines, ToCols, screen_lines, screen_columns)); - if (is_term_resized(ToLines, ToCols)) { + if (SP != 0) { + result = OK; + SP->_sig_winch = FALSE; + + if (is_term_resized(ToLines, ToCols)) { #if USE_SIGWINCH - ungetch(KEY_RESIZE); /* so application can know this */ - clearok(curscr, TRUE); /* screen contents are unknown */ + ungetch(KEY_RESIZE); /* so application can know this */ + clearok(curscr, TRUE); /* screen contents are unknown */ #endif - result = resize_term(ToLines, ToCols); + result = resize_term(ToLines, ToCols); + } } returnCode(result); diff --git a/ncurses/curses.priv.h b/ncurses/curses.priv.h index 86505e83..940d535d 100644 --- a/ncurses/curses.priv.h +++ b/ncurses/curses.priv.h @@ -34,7 +34,7 @@ /* - * $Id: curses.priv.h,v 1.344 2007/10/06 21:29:02 tom Exp $ + * $Id: curses.priv.h,v 1.346 2007/10/13 18:55:29 Miroslav.Lichvar Exp $ * * curses.priv.h * @@ -936,43 +936,29 @@ extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T) _nc_have_sigwinch; #define NulColor /* nothing */ #endif -#define AttrEq(a,b) ((a).attr == (b).attr) -#define ExtcEq(a,b) ((a).ext_color == (b).ext_color) -#define TextEq(a,b) (!memcmp((a).chars, (b).chars, sizeof(a.chars))) - -/* - * cchar_t may not be packed, e.g., on a 64-bit platform. - * - * Set "NCURSES_CHAR_EQ" to use a workaround that compares the structure - * member-by-member so that valgrind will not see compares against the - * uninitialized filler bytes. - */ -#if NCURSES_CHAR_EQ -#if defined(USE_TERMLIB) && !defined(NEED_NCURSES_CH_T) -#else -static NCURSES_INLINE int -_nc_char_eq(NCURSES_CH_T a, NCURSES_CH_T b) -{ -#if NCURSES_EXT_COLORS - return (AttrEq(a,b) && TextEq(a,b) && ExtcEq(a,b)); -#else - return (AttrEq(a,b) && TextEq(a,b)); -#endif -} -#define CharEq(a,b) _nc_char_eq(a,b) -#endif -#else -#define CharEq(a,b) (!memcmp(&(a), &(b), sizeof(a))) -#endif - #define NulChar 0,0,0,0 /* FIXME: see CCHARW_MAX */ #define CharOf(c) ((c).chars[0]) #define AttrOf(c) ((c).attr) + #define AddAttr(c,a) AttrOf(c) |= ((a) & A_ATTRIBUTES) #define RemAttr(c,a) AttrOf(c) &= ~((a) & A_ATTRIBUTES) #define SetAttr(c,a) AttrOf(c) = ((a) & A_ATTRIBUTES) | WidecExt(c) + #define NewChar2(c,a) { a, { c, NulChar } NulColor } #define NewChar(ch) NewChar2(ChCharOf(ch), ChAttrOf(ch)) + +#if CCHARW_MAX == 5 +#define CharEq(a,b) (((a).attr == (b).attr) \ + && (a).chars[0] == (b).chars[0] \ + && (a).chars[1] == (b).chars[1] \ + && (a).chars[2] == (b).chars[2] \ + && (a).chars[3] == (b).chars[3] \ + && (a).chars[4] == (b).chars[4] \ + if_EXT_COLORS(&& (a).ext_color == (b).ext_color)) +#else +#define CharEq(a,b) (!memcmp(&(a), &(b), sizeof(a))) +#endif + #define SetChar(ch,c,a) do { \ NCURSES_CH_T *_cp = &ch; \ memset(_cp, 0, sizeof(ch)); \ diff --git a/ncurses/tty/hashmap.c b/ncurses/tty/hashmap.c index 6dc689e8..9b60df62 100644 --- a/ncurses/tty/hashmap.c +++ b/ncurses/tty/hashmap.c @@ -70,7 +70,7 @@ AUTHOR #include #include /* for back_color_erase */ -MODULE_ID("$Id: hashmap.c,v 1.55 2007/07/14 15:33:39 tom Exp $") +MODULE_ID("$Id: hashmap.c,v 1.56 2007/10/13 18:47:25 Miroslav.Lichvar Exp $") #ifdef HASHDEBUG @@ -131,8 +131,8 @@ update_cost(NCURSES_CH_T * from, NCURSES_CH_T * to) int cost = 0; int i; - for (i = TEXTWIDTH; i > 0; i--) - if (!(CharEq(*from++, *to++))) + for (i = TEXTWIDTH; i > 0; i--, from++, to++) + if (!(CharEq(*from, *to))) cost++; return cost; @@ -148,8 +148,8 @@ update_cost_from_blank(NCURSES_CH_T * to) if (back_color_erase) SetPair(blank, GetPair(stdscr->_nc_bkgd)); - for (i = TEXTWIDTH; i > 0; i--) - if (!(CharEq(blank, *to++))) + for (i = TEXTWIDTH; i > 0; i--, to++) + if (!(CharEq(blank, *to))) cost++; return cost; diff --git a/ncurses/tty/tty_update.c b/ncurses/tty/tty_update.c index 33c79c7c..86668136 100644 --- a/ncurses/tty/tty_update.c +++ b/ncurses/tty/tty_update.c @@ -74,7 +74,7 @@ #include #include -MODULE_ID("$Id: tty_update.c,v 1.242 2007/09/29 20:37:13 tom Exp $") +MODULE_ID("$Id: tty_update.c,v 1.243 2007/10/13 20:03:32 tom Exp $") /* * This define controls the line-breakout optimization. Every once in a @@ -624,6 +624,10 @@ doupdate(void) T((T_CALLED("doupdate()"))); + if (curscr == 0 + || newscr == 0) + returnCode(ERR); + #ifdef TRACE if (USE_TRACEF(TRACE_UPDATE)) { if (curscr->_clear) diff --git a/progs/Makefile.in b/progs/Makefile.in index a7602ab9..38f4e74f 100644 --- a/progs/Makefile.in +++ b/progs/Makefile.in @@ -1,4 +1,4 @@ -# $Id: Makefile.in,v 1.74 2007/04/28 15:47:19 tom Exp $ +# $Id: Makefile.in,v 1.77 2007/10/13 22:25:53 tom Exp $ ############################################################################## # Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. # # # @@ -99,7 +99,7 @@ LOCAL_LIBDIR = @top_builddir@/lib LD = @LD@ LINK = @LINK_PROGS@ $(LIBTOOL_LINK) -LDFLAGS = @EXTRA_LDFLAGS@ @LDFLAGS_STATIC@ @TICS_ARGS@ @TINFO_ARGS@ @LDFLAGS_SHARED@ @LDFLAGS@ @LD_MODEL@ @LIBS@ +LDFLAGS = @EXTRA_LDFLAGS@ @LDFLAGS@ LDFLAGS_LIBTOOL = $(LDFLAGS) $(CFLAGS_LIBTOOL) LDFLAGS_NORMAL = $(LDFLAGS) $(CFLAGS_NORMAL) @@ -109,6 +109,12 @@ LDFLAGS_SHARED = $(LDFLAGS) $(CFLAGS_SHARED) @LD_SHARED_OPTS@ LDFLAGS_DEFAULT = $(LDFLAGS_@DFT_UPR_MODEL@) +LIBS_TIC = @LDFLAGS_STATIC@ @TICS_ARGS@ @TINFO_ARGS@ @LDFLAGS_SHARED@ @LD_MODEL@ @LIBS@ +LDFLAGS_TIC = $(LDFLAGS_@DFT_UPR_MODEL@) $(LIBS_TIC) + +LIBS_TINFO = @LDFLAGS_STATIC@ @TINFO_ARGS@ @LDFLAGS_SHARED@ @LD_MODEL@ @LIBS@ +LDFLAGS_TINFO = $(LDFLAGS_@DFT_UPR_MODEL@) $(LIBS_TINFO) + LINT = @LINT@ LINT_OPTS = @LINT_OPTS@ LINT_LIBS = -lncurses @LIBS@ @@ -210,40 +216,38 @@ DEPS_TIC = \ $(MODEL)/dump_entry$o tic$x: $(DEPS_TIC) $(DEPS_CURSES) transform.h - @ECHO_LINK@ $(LINK) $(DEPS_TIC) $(LDFLAGS_DEFAULT) -o $@ + @ECHO_LINK@ $(LINK) $(DEPS_TIC) $(LDFLAGS_TIC) -o $@ DEPS_TOE = \ - $(MODEL)/toe$o \ - $(MODEL)/dump_entry$o + $(MODEL)/toe$o toe$x: $(DEPS_TOE) $(DEPS_CURSES) - @ECHO_LINK@ $(LINK) $(DEPS_TOE) $(LDFLAGS_DEFAULT) -o $@ + @ECHO_LINK@ $(LINK) $(DEPS_TOE) $(LDFLAGS_TIC) -o $@ DEPS_CLEAR = \ $(MODEL)/clear$o clear$x: $(DEPS_CLEAR) $(DEPS_CURSES) - @ECHO_LINK@ $(LINK) $(DEPS_CLEAR) $(LDFLAGS_DEFAULT) -o $@ + @ECHO_LINK@ $(LINK) $(DEPS_CLEAR) $(LDFLAGS_TINFO) -o $@ DEPS_TPUT = \ $(MODEL)/tput$o tput$x: $(DEPS_TPUT) $(DEPS_CURSES) transform.h - @ECHO_LINK@ $(LINK) $(DEPS_TPUT) $(LDFLAGS_DEFAULT) -o $@ + @ECHO_LINK@ $(LINK) $(DEPS_TPUT) $(LDFLAGS_TINFO) -o $@ DEPS_INFOCMP = \ $(MODEL)/infocmp$o \ $(MODEL)/dump_entry$o infocmp$x: $(DEPS_INFOCMP) $(DEPS_CURSES) - @ECHO_LINK@ $(LINK) $(DEPS_INFOCMP) $(LDFLAGS_DEFAULT) -o $@ + @ECHO_LINK@ $(LINK) $(DEPS_INFOCMP) $(LDFLAGS_TIC) -o $@ DEPS_TSET = \ - $(MODEL)/tset$o \ - $(MODEL)/dump_entry$o + $(MODEL)/tset$o tset$x: $(DEPS_TSET) $(DEPS_CURSES) transform.h - @ECHO_LINK@ $(LINK) $(DEPS_TSET) $(LDFLAGS_DEFAULT) -o $@ + @ECHO_LINK@ $(LINK) $(DEPS_TSET) $(LDFLAGS_TINFO) -o $@ termsort.c: $(srcdir)/MKtermsort.sh sh $(srcdir)/MKtermsort.sh $(AWK) $(srcdir)/../include/@TERMINFO_CAPS@ >$@ diff --git a/progs/clear.c b/progs/clear.c index 4e4aaa98..9f5a5438 100644 --- a/progs/clear.c +++ b/progs/clear.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. * + * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -36,9 +36,10 @@ * clear.c -- clears the terminal's screen */ +#define USE_LIBTINFO #include -MODULE_ID("$Id: clear.c,v 1.10 2006/05/20 17:47:47 tom Exp $") +MODULE_ID("$Id: clear.c,v 1.11 2007/10/13 22:16:02 tom Exp $") static int putch(int c) diff --git a/progs/progs.priv.h b/progs/progs.priv.h index 362c3b38..d445c336 100644 --- a/progs/progs.priv.h +++ b/progs/progs.priv.h @@ -30,7 +30,7 @@ * Author: Thomas E. Dickey 1997-on * ****************************************************************************/ /* - * $Id: progs.priv.h,v 1.32 2007/02/03 19:59:02 tom Exp $ + * $Id: progs.priv.h,v 1.33 2007/10/13 20:33:53 tom Exp $ * * progs.priv.h * @@ -114,8 +114,12 @@ extern int optind; #include #if HAVE_NC_FREEALL #undef ExitProgram +#ifdef USE_LIBTINFO +#define ExitProgram(code) _nc_free_tinfo(code) +#else #define ExitProgram(code) _nc_free_tic(code) #endif +#endif /* usually in */ #ifndef STDOUT_FILENO diff --git a/progs/toe.c b/progs/toe.c index e3749b2f..6bcff07f 100644 --- a/progs/toe.c +++ b/progs/toe.c @@ -40,13 +40,11 @@ #include -#include - #if USE_HASHED_DB #include #endif -MODULE_ID("$Id: toe.c,v 1.44 2007/07/21 17:45:59 tom Exp $") +MODULE_ID("$Id: toe.c,v 1.46 2007/10/13 22:26:38 tom Exp $") #define isDotname(name) (!strcmp(name, ".") || !strcmp(name, "..")) @@ -59,7 +57,6 @@ static void ExitProgram(int code) { _nc_free_entries(_nc_head); - _nc_leaks_dump_entry(); _nc_free_tic(code); } #endif diff --git a/progs/tput.c b/progs/tput.c index d594adbe..8745cc99 100644 --- a/progs/tput.c +++ b/progs/tput.c @@ -38,6 +38,7 @@ * Ross Ridge's mytinfo package. */ +#define USE_LIBTINFO #include #if !PURE_TERMINFO @@ -45,7 +46,7 @@ #endif #include -MODULE_ID("$Id: tput.c,v 1.40 2007/07/21 17:45:59 tom Exp $") +MODULE_ID("$Id: tput.c,v 1.41 2007/10/13 20:34:16 tom Exp $") #define PUTS(s) fputs(s, stdout) #define PUTCHAR(c) putchar(c) diff --git a/progs/tset.c b/progs/tset.c index 20679c5e..3d609122 100644 --- a/progs/tset.c +++ b/progs/tset.c @@ -73,6 +73,7 @@ * SUCH DAMAGE. */ +#define USE_LIBTINFO #define __INTERNAL_CAPS_VISIBLE /* we need to see has_hardware_tabs */ #include @@ -103,7 +104,7 @@ char *ttyname(int fd); #include #include -MODULE_ID("$Id: tset.c,v 1.69 2007/09/29 15:51:35 tom Exp $") +MODULE_ID("$Id: tset.c,v 1.70 2007/10/13 22:22:04 tom Exp $") extern char **environ;