From: Thomas E. Dickey Date: Sun, 29 Jun 2008 00:12:36 +0000 (+0000) Subject: ncurses 5.6 - patch 20080628 X-Git-Tag: v5.7~20 X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=commitdiff_plain;h=3ce60e9f58cc00309981ed711d0b0d3362105881 ncurses 5.6 - patch 20080628 + correct some ifdef's needed for the broken-linker configuration. + make debugging library's $BAUDRATE feature work for termcap interface. + make $NCURSES_NO_PADDING feature work for termcap interface (prompted by comment on FreeBSD mailing list). + add screen.mlterm terminfo entry -TD + improve mlterm and mlterm+pcfkeys terminfo entries -TD --- diff --git a/NEWS b/NEWS index 2f027f4f..71714e34 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.1248 2008/06/21 23:26:56 tom Exp $ +-- $Id: NEWS,v 1.1252 2008/06/28 23:37:53 tom Exp $ ------------------------------------------------------------------------------- This is a log of changes that ncurses has gone through since Zeyd started @@ -45,6 +45,15 @@ 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. +20080628 + + correct some ifdef's needed for the broken-linker configuration. + + make debugging library's $BAUDRATE feature work for termcap + interface. + + make $NCURSES_NO_PADDING feature work for termcap interface (prompted + by comment on FreeBSD mailing list). + + add screen.mlterm terminfo entry -TD + + improve mlterm and mlterm+pcfkeys terminfo entries -TD + 20080621 + regenerated html documentation. + expand manpage description of parameters for form_driver() and diff --git a/configure.in b/configure.in index 1a4a0c86..baa4c415 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ dnl*************************************************************************** -dnl Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. * +dnl Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. * dnl * dnl Permission is hereby granted, free of charge, to any person obtaining a * dnl copy of this software and associated documentation files (the * @@ -28,14 +28,14 @@ dnl*************************************************************************** dnl dnl Author: Thomas E. Dickey 1995-on dnl -dnl $Id: configure.in,v 1.434 2008/05/17 19:50:19 tom Exp $ +dnl $Id: configure.in,v 1.435 2008/06/28 15:52:20 tom Exp $ dnl Process this file with autoconf to produce a configure script. dnl dnl See http://invisible-island.net/autoconf/ for additional information. dnl dnl --------------------------------------------------------------------------- AC_PREREQ(2.13.20020210) -AC_REVISION($Revision: 1.434 $) +AC_REVISION($Revision: 1.435 $) AC_INIT(ncurses/base/lib_initscr.c) AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin) diff --git a/dist.mk b/dist.mk index 044ba647..e28c4f10 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.647 2008/06/21 15:45:19 tom Exp $ +# $Id: dist.mk,v 1.648 2008/06/28 11:37:48 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 = 20080621 +NCURSES_PATCH = 20080628 # We don't append the patch to the version, since this only applies to releases VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR) diff --git a/misc/terminfo.src b/misc/terminfo.src index 8627cece..cdb2a4b8 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.328 $ -# $Date: 2008/04/29 00:49:41 $ +# $Revision: 1.330 $ +# $Date: 2008/06/28 17:22:46 $ # # 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 @@ -3671,7 +3671,7 @@ konsole-256color|KDE console window with xterm 256-colors, # 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~ +# control/shift/alt kf1 to kf12 \E[11;8~ to \E[24;8~ # mlterm|multi lingual terminal emulator, am, eslok, km, mc5i, mir, msgr, npc, xenl, @@ -3687,10 +3687,11 @@ mlterm|multi lingual terminal emulator, home=\E[H, hpa=\E[%i%p1%dG, ht=^I, hts=\EH, ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=^J, indn=\E[%p1%dS, 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, 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, + kbs=\177, kcbt=\E[Z, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, + kcuu1=\EOA, kdch1=\E[3~, kend=\EOF, kent=\EOM, kfnd=\E[1~, + khome=\EOH, kich1=\E[2~, kind=\EO1;2B, kmous=\E[M, + knp=\E[6~, kpp=\E[5~, kri=\EO1;2A, 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, @@ -3706,11 +3707,14 @@ mlterm|multi lingual terminal emulator, # (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, + kDN=\EO1;2B, kDN3=\EO1;3B, kDN4=\EO1;4B, kDN5=\EO1;5B, + kDN6=\EO1;6B, kDN7=\EO1;7B, kIC5=\E[2;5~, kIC6=\E[2;6~, + kLFT3=\EO1;3D, kLFT4=\EO1;4D, kLFT5=\EO1;5D, + kLFT6=\EO1;6D, kLFT7=\EO1;7D, kNXT5=\E[6;5~, + kNXT6=\E[6;6~, kPRV5=\E[5;5~, kPRV6=\E[5;6~, + kRIT3=\EO1;3C, kRIT4=\EO1;4C, kRIT5=\EO1;5C, + kRIT6=\EO1;6C, kRIT7=\EO1;7C, kUP=\EO1;2A, kUP3=\EO1;3A, + kUP4=\EO1;4A, kUP5=\EO1;5A, kUP6=\EO1;6A, kUP7=\EO1;7A, # From: Thomas Dickey 04 Oct 1997 # Updated: Oezguer Kesim 02 Nov 1997 @@ -4407,6 +4411,8 @@ screen.rxvt|screen in rxvt, screen.linux|screen in linux console, bw, kbs=\177, kcbt@, use=screen+fkeys, use=screen, +screen.mlterm|screen in mlterm, + use=screen+fkeys, use=mlterm, screen-w|VT 100/ANSI X3.64 virtual terminal with 132 cols, cols#132, use=screen, @@ -21679,6 +21685,10 @@ v3220|LANPAR Vision II model 3220/3221/3222, # 2008-04-28 # * add screen+fkeys (prompted by Debian # 478094) -TD # +# 2008-06-28 +# * add screen.mlterm -TD +# * improve mlterm and mlterm+pcfkeys -TD +# # The following sets edit modes for GNU EMACS. # Local Variables: # fill-prefix:"\t" diff --git a/ncurses/base/lib_getch.c b/ncurses/base/lib_getch.c index 372d4ac7..56e2a3a8 100644 --- a/ncurses/base/lib_getch.c +++ b/ncurses/base/lib_getch.c @@ -41,7 +41,7 @@ #include -MODULE_ID("$Id: lib_getch.c,v 1.95 2008/06/07 15:52:51 tom Exp $") +MODULE_ID("$Id: lib_getch.c,v 1.96 2008/06/28 23:29:20 tom Exp $") #include @@ -266,9 +266,9 @@ recur_wrefresh(WINDOW *win) /* temporarily switch to the window's screen to check/refresh */ _nc_lock_global(curses); save_SP = SP; - SP = sp; + _nc_set_screen(sp); recur_wrefresh(win); - SP = save_SP; + _nc_set_screen(save_SP); _nc_unlock_global(curses); } else #endif @@ -291,9 +291,9 @@ recur_wgetnstr(WINDOW *win, char *buf) /* temporarily switch to the window's screen to get cooked input */ _nc_lock_global(curses); save_SP = SP; - SP = sp; + _nc_set_screen(sp); rc = recur_wgetnstr(win, buf); - SP = save_SP; + _nc_set_screen(save_SP); _nc_unlock_global(curses); } else #endif diff --git a/ncurses/base/lib_set_term.c b/ncurses/base/lib_set_term.c index 46779e08..6fbf6ad7 100644 --- a/ncurses/base/lib_set_term.c +++ b/ncurses/base/lib_set_term.c @@ -44,7 +44,7 @@ #include /* cur_term */ #include -MODULE_ID("$Id: lib_set_term.c,v 1.113 2008/06/21 19:00:09 tom Exp $") +MODULE_ID("$Id: lib_set_term.c,v 1.115 2008/06/28 15:33:52 tom Exp $") NCURSES_EXPORT(SCREEN *) set_term(SCREEN *screenp) @@ -322,11 +322,7 @@ _nc_setupscreen(int slines GCC_UNUSED, SP->_ofp = output; SP->_cursor = -1; /* cannot know real cursor shape */ -#if NCURSES_NO_PADDING - SP->_no_padding = getenv("NCURSES_NO_PADDING") != 0; - TR(TRACE_CHARPUT | TRACE_MOVE, ("padding will%s be used", - SP->_no_padding ? " not" : "")); -#endif + SetNoPadding(SP); #if NCURSES_EXT_FUNCS SP->_default_color = FALSE; @@ -516,7 +512,7 @@ _nc_setupscreen(int slines GCC_UNUSED, /* initialize normal acs before wide, since we use mapping in the latter */ #if !USE_WIDEC_SUPPORT - if (_nc_unicode_locale() && _nc_locale_breaks_acs()) { + if (_nc_unicode_locale() && _nc_locale_breaks_acs(cur_term)) { acs_chars = NULL; ena_acs = NULL; enter_alt_charset_mode = NULL; @@ -528,7 +524,8 @@ _nc_setupscreen(int slines GCC_UNUSED, #if USE_WIDEC_SUPPORT _nc_init_wacs(); - SP->_screen_acs_fix = (_nc_unicode_locale() && _nc_locale_breaks_acs()); + SP->_screen_acs_fix = (_nc_unicode_locale() + && _nc_locale_breaks_acs(cur_term)); #endif env = _nc_get_locale(); SP->_legacy_coding = ((env == 0) diff --git a/ncurses/curses.priv.h b/ncurses/curses.priv.h index e609c133..c6fda33d 100644 --- a/ncurses/curses.priv.h +++ b/ncurses/curses.priv.h @@ -34,7 +34,7 @@ /* - * $Id: curses.priv.h,v 1.383 2008/06/07 14:13:19 tom Exp $ + * $Id: curses.priv.h,v 1.386 2008/06/28 15:27:47 tom Exp $ * * curses.priv.h * @@ -286,6 +286,15 @@ color_t; #define VIDATTR(attr, pair) vidattr(attr) #endif +#if NCURSES_NO_PADDING +#define GetNoPadding(sp) ((sp) ? (sp)->_no_padding : _nc_prescreen._no_padding) +#define SetNoPadding(sp) _nc_set_no_padding(sp) +extern NCURSES_EXPORT(void) _nc_set_no_padding(SCREEN *); +#else +#define GetNoPadding(sp) FALSE +#define SetNoPadding(sp) /*nothing*/ +#endif + #define WINDOW_ATTRS(w) ((w)->_attrs) #define SCREEN_ATTRS(s) (*((s)->_current_attr)) @@ -630,6 +639,9 @@ typedef struct { ripoff_t *rsp; TPARM_STATE tparm_state; TTY *saved_tty; /* savetty/resetty information */ +#if NCURSES_NO_PADDING + bool _no_padding; /* flag to set if padding disabled */ +#endif #if BROKEN_LINKER || USE_REENTRANT chtype *real_acs_map; int _LINES; @@ -700,7 +712,7 @@ struct screen { int slk_format; /* selected format for this screen */ /* cursor movement costs; units are 10ths of milliseconds */ #if NCURSES_NO_PADDING - int _no_padding; /* flag to set if padding disabled */ + bool _no_padding; /* flag to set if padding disabled */ #endif int _char_padding; /* cost of character put */ int _cr_cost; /* cost of (carriage_return) */ @@ -1477,7 +1489,7 @@ extern NCURSES_EXPORT(int) _nc_has_mouse (void); /* lib_setup.c */ extern NCURSES_EXPORT(char *) _nc_get_locale(void); extern NCURSES_EXPORT(int) _nc_unicode_locale(void); -extern NCURSES_EXPORT(int) _nc_locale_breaks_acs(void); +extern NCURSES_EXPORT(int) _nc_locale_breaks_acs(TERMINAL *); extern NCURSES_EXPORT(int) _nc_setupterm(NCURSES_CONST char *, int, int *, bool); extern NCURSES_EXPORT(void) _nc_get_screensize(SCREEN *, int *, int *); diff --git a/ncurses/fifo_defs.h b/ncurses/fifo_defs.h index 9655b417..fa9ae226 100644 --- a/ncurses/fifo_defs.h +++ b/ncurses/fifo_defs.h @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2002 Free Software Foundation, Inc. * + * Copyright (c) 1998-2002,2008 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 * @@ -34,7 +34,7 @@ /* * Common macros for lib_getch.c, lib_ungetch.c * - * $Id: fifo_defs.h,v 1.5 2008/05/03 20:08:16 tom Exp $ + * $Id: fifo_defs.h,v 1.6 2008/06/28 15:52:32 tom Exp $ */ #ifndef FIFO_DEFS_H diff --git a/ncurses/llib-lncurses b/ncurses/llib-lncurses index 485014d9..e1b439db 100644 --- a/ncurses/llib-lncurses +++ b/ncurses/llib-lncurses @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. * + * Copyright (c) 1998-2007,2008 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 * @@ -2661,7 +2661,8 @@ int _nc_unicode_locale(void) { return(*(int *)0); } #undef _nc_locale_breaks_acs -int _nc_locale_breaks_acs(void) +int _nc_locale_breaks_acs( + TERMINAL *termp) { return(*(int *)0); } #undef _nc_setupterm diff --git a/ncurses/llib-lncursest b/ncurses/llib-lncursest index 906da606..4d87ae42 100644 --- a/ncurses/llib-lncursest +++ b/ncurses/llib-lncursest @@ -2718,7 +2718,8 @@ int _nc_unicode_locale(void) { return(*(int *)0); } #undef _nc_locale_breaks_acs -int _nc_locale_breaks_acs(void) +int _nc_locale_breaks_acs( + TERMINAL *termp) { return(*(int *)0); } #undef _nc_setupterm diff --git a/ncurses/llib-lncursesw b/ncurses/llib-lncursesw index 50f57145..707beb39 100644 --- a/ncurses/llib-lncursesw +++ b/ncurses/llib-lncursesw @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2001-2005,2006 Free Software Foundation, Inc. * + * Copyright (c) 2001-2007,2008 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 * @@ -3407,7 +3407,8 @@ int _nc_unicode_locale(void) { return(*(int *)0); } #undef _nc_locale_breaks_acs -int _nc_locale_breaks_acs(void) +int _nc_locale_breaks_acs( + TERMINAL *termp) { return(*(int *)0); } #undef _nc_setupterm diff --git a/ncurses/tinfo/MKcodes.awk b/ncurses/tinfo/MKcodes.awk index db8ad554..b9ba636e 100644 --- a/ncurses/tinfo/MKcodes.awk +++ b/ncurses/tinfo/MKcodes.awk @@ -1,5 +1,5 @@ ############################################################################## -# Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. # +# Copyright (c) 1998-2007,2008 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 "Software"), # @@ -25,7 +25,7 @@ # use or other dealings in this Software without prior written # # authorization. # ############################################################################## -# $Id: MKcodes.awk,v 1.4 2007/11/03 20:24:15 tom Exp $ +# $Id: MKcodes.awk,v 1.5 2008/06/28 23:13:25 tom Exp $ function large_item(value) { result = sprintf("%d,", offset); offset = offset + length(value) + 1; @@ -140,6 +140,7 @@ END { print "" print "#define FREE_FIX(it) if (ptr_##it) { FreeAndNull(ptr_##it); }" print "" + print "#if NO_LEAKS" print "NCURSES_EXPORT(void)" print "_nc_codes_leaks(void)" print "{" @@ -149,6 +150,8 @@ END { print "FREE_FIX(strcodes)" } print "}" + print "#endif" + print "" print "#else" print "" print "#define DCL(it) NCURSES_EXPORT_VAR(IT) it[]" diff --git a/ncurses/tinfo/MKnames.awk b/ncurses/tinfo/MKnames.awk index 93e682c2..1fbb163b 100644 --- a/ncurses/tinfo/MKnames.awk +++ b/ncurses/tinfo/MKnames.awk @@ -1,5 +1,5 @@ ############################################################################## -# Copyright (c) 2007 Free Software Foundation, Inc. # +# Copyright (c) 2007,2008 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 "Software"), # @@ -25,7 +25,7 @@ # use or other dealings in this Software without prior written # # authorization. # ############################################################################## -# $Id: MKnames.awk,v 1.18 2007/11/03 20:24:15 tom Exp $ +# $Id: MKnames.awk,v 1.19 2008/06/28 23:13:13 tom Exp $ function large_item(value) { result = sprintf("%d,", offset); offset = offset + length(value) + 1; @@ -156,6 +156,7 @@ END { print "" print "#define FREE_FIX(it) if (ptr_##it) { FreeAndNull(ptr_##it); }" print "" + print "#if NO_LEAKS" print "NCURSES_EXPORT(void)" print "_nc_names_leaks(void)" print "{" @@ -168,6 +169,8 @@ END { print "FREE_FIX(strfnames)" } print "}" + print "#endif" + print "" print "#else" print "" print "#define DCL(it) NCURSES_EXPORT_VAR(IT) it[]" diff --git a/ncurses/tinfo/entries.c b/ncurses/tinfo/entries.c index 05f45ef0..0a43a17f 100644 --- a/ncurses/tinfo/entries.c +++ b/ncurses/tinfo/entries.c @@ -37,7 +37,7 @@ #include #include -MODULE_ID("$Id: entries.c,v 1.6 2008/06/21 21:25:01 tom Exp $") +MODULE_ID("$Id: entries.c,v 1.7 2008/06/28 23:08:51 tom Exp $") /**************************************************************************** * @@ -111,19 +111,18 @@ _nc_delink_entry(ENTRY * headp, TERMTYPE *tterm) NCURSES_EXPORT(void) _nc_leaks_tinfo(void) { +#if NO_LEAKS char *s; +#endif T((T_CALLED("_nc_free_tinfo()"))); #if NO_LEAKS _nc_free_tparm(); _nc_tgetent_leaks(); -#endif _nc_free_entries(_nc_head); _nc_get_type(0); _nc_first_name(0); -#if NO_LEAKS _nc_keyname_leaks(); -#endif #if BROKEN_LINKER || USE_REENTRANT _nc_names_leaks(); _nc_codes_leaks(); @@ -135,6 +134,7 @@ _nc_leaks_tinfo(void) if ((s = _nc_home_terminfo()) != 0) free(s); +#endif /* NO_LEAKS */ returnVoid; } diff --git a/ncurses/tinfo/lib_baudrate.c b/ncurses/tinfo/lib_baudrate.c index 28405bee..b9cdfda9 100644 --- a/ncurses/tinfo/lib_baudrate.c +++ b/ncurses/tinfo/lib_baudrate.c @@ -80,7 +80,7 @@ #undef USE_OLD_TTY #endif /* USE_OLD_TTY */ -MODULE_ID("$Id: lib_baudrate.c,v 1.26 2008/06/21 20:46:10 tom Exp $") +MODULE_ID("$Id: lib_baudrate.c,v 1.27 2008/06/28 15:19:24 tom Exp $") /* * int @@ -207,7 +207,7 @@ baudrate(void) * that take into account costs that depend on baudrate. */ #ifdef TRACE - if (SP && !isatty(fileno(SP->_ofp)) + if (!isatty(fileno(SP ? SP->_ofp : stdout)) && getenv("BAUDRATE") != 0) { int ret; if ((ret = _nc_getenv_num("BAUDRATE")) <= 0) diff --git a/ncurses/tinfo/lib_cur_term.c b/ncurses/tinfo/lib_cur_term.c index d0aad633..ce8868e7 100644 --- a/ncurses/tinfo/lib_cur_term.c +++ b/ncurses/tinfo/lib_cur_term.c @@ -40,12 +40,12 @@ #include /* TTY, cur_term */ #include /* ospeed */ -MODULE_ID("$Id: lib_cur_term.c,v 1.16 2008/06/07 22:22:16 tom Exp $") +MODULE_ID("$Id: lib_cur_term.c,v 1.17 2008/06/28 22:59:22 tom Exp $") #undef CUR #define CUR termp->type. -#if USE_REENTRANT +#if BROKEN_LINKER || USE_REENTRANT NCURSES_EXPORT(TERMINAL *) NCURSES_PUBLIC_VAR(cur_term) (void) { @@ -66,7 +66,7 @@ set_curterm(TERMINAL * termp) oldterm = cur_term; if (SP) SP->_term = termp; -#if USE_REENTRANT +#if BROKEN_LINKER || USE_REENTRANT _nc_prescreen._cur_term = termp; #else cur_term = termp; diff --git a/ncurses/tinfo/lib_data.c b/ncurses/tinfo/lib_data.c index f09ad226..d959509e 100644 --- a/ncurses/tinfo/lib_data.c +++ b/ncurses/tinfo/lib_data.c @@ -41,7 +41,7 @@ #include -MODULE_ID("$Id: lib_data.c,v 1.48 2008/06/07 14:03:15 tom Exp $") +MODULE_ID("$Id: lib_data.c,v 1.49 2008/06/28 12:46:53 tom Exp $") /* * OS/2's native linker complains if we don't initialize public data when @@ -217,6 +217,9 @@ NCURSES_EXPORT_VAR(NCURSES_PRESCREEN) _nc_prescreen = { NUM_VARS_0s, /* static_vars */ }, NULL, /* saved_tty */ +#if NCURSES_NO_PADDING + FALSE, /* flag to set if padding disabled */ +#endif #if BROKEN_LINKER || USE_REENTRANT NULL, /* real_acs_map */ 0, /* LINES */ diff --git a/ncurses/tinfo/lib_options.c b/ncurses/tinfo/lib_options.c index c633d468..eb170354 100644 --- a/ncurses/tinfo/lib_options.c +++ b/ncurses/tinfo/lib_options.c @@ -43,7 +43,7 @@ #include -MODULE_ID("$Id: lib_options.c,v 1.56 2008/06/07 14:01:46 tom Exp $") +MODULE_ID("$Id: lib_options.c,v 1.57 2008/06/28 23:31:15 tom Exp $") static int _nc_curs_set(SCREEN *, int); static int _nc_meta(SCREEN *, bool); @@ -251,9 +251,9 @@ _nc_keypad(SCREEN *sp, bool flag) /* cannot use use_screen(), since that is not in tinfo library */ _nc_lock_global(curses); save_sp = SP; - SP = sp; + _nc_set_screen(sp); rc = _nc_keypad(sp, flag); - SP = save_sp; + _nc_set_screen(save_sp); _nc_unlock_global(curses); } else #endif diff --git a/ncurses/tinfo/lib_setup.c b/ncurses/tinfo/lib_setup.c index 967d42a8..20c14e0f 100644 --- a/ncurses/tinfo/lib_setup.c +++ b/ncurses/tinfo/lib_setup.c @@ -53,7 +53,7 @@ #include /* lines, columns, cur_term */ -MODULE_ID("$Id: lib_setup.c,v 1.108 2008/06/21 21:00:18 tom Exp $") +MODULE_ID("$Id: lib_setup.c,v 1.109 2008/06/28 15:31:42 tom Exp $") /**************************************************************************** * @@ -99,6 +99,12 @@ MODULE_ID("$Id: lib_setup.c,v 1.108 2008/06/21 21:00:18 tom Exp $") # endif #endif +/* + * Reduce explicit use of "cur_term" global variable. + */ +#undef CUR +#define CUR termp->type. + /* * Wrap global variables in this module. */ @@ -193,6 +199,7 @@ NCURSES_EXPORT(void) _nc_get_screensize(SCREEN *sp, int *linep, int *colp) /* Obtain lines/columns values from the environment and/or terminfo entry */ { + TERMINAL *termp = cur_term; int my_tabsize; /* figure out the size of the screen */ @@ -297,6 +304,7 @@ _nc_get_screensize(SCREEN *sp, int *linep, int *colp) NCURSES_EXPORT(void) _nc_update_screensize(SCREEN *sp) { + TERMINAL *termp = cur_term; int old_lines = lines; int new_lines; int old_cols = columns; @@ -453,7 +461,7 @@ _nc_unicode_locale(void) * character set. */ NCURSES_EXPORT(int) -_nc_locale_breaks_acs(void) +_nc_locale_breaks_acs(TERMINAL * termp) { char *env; @@ -483,7 +491,7 @@ _nc_locale_breaks_acs(void) NCURSES_EXPORT(int) _nc_setupterm(NCURSES_CONST char *tname, int Filedes, int *errret, bool reuse) { - TERMINAL *term_ptr; + TERMINAL *termp; int status; START_TRACE(); @@ -528,22 +536,22 @@ _nc_setupterm(NCURSES_CONST char *tname, int Filedes, int *errret, bool reuse) * properly with this feature). */ if (reuse - && (term_ptr = cur_term) != 0 - && term_ptr->Filedes == Filedes - && term_ptr->_termname != 0 - && !strcmp(term_ptr->_termname, tname) - && _nc_name_match(term_ptr->type.term_names, tname, "|")) { + && (termp = cur_term) != 0 + && termp->Filedes == Filedes + && termp->_termname != 0 + && !strcmp(termp->_termname, tname) + && _nc_name_match(termp->type.term_names, tname, "|")) { T(("reusing existing terminal information and mode-settings")); } else { - term_ptr = typeCalloc(TERMINAL, 1); + termp = typeCalloc(TERMINAL, 1); - if (term_ptr == 0) { + if (termp == 0) { ret_error0(TGETENT_ERR, "Not enough memory to create terminal structure.\n"); } #if USE_DATABASE || USE_TERMCAP - status = grab_entry(tname, &term_ptr->type); + status = grab_entry(tname, &termp->type); #else status = TGETENT_NO; #endif @@ -553,13 +561,13 @@ _nc_setupterm(NCURSES_CONST char *tname, int Filedes, int *errret, bool reuse) const TERMTYPE *fallback = _nc_fallback(tname); if (fallback) { - term_ptr->type = *fallback; + termp->type = *fallback; status = TGETENT_YES; } } if (status != TGETENT_YES) { - del_curterm(term_ptr); + del_curterm(termp); if (status == TGETENT_ERR) { ret_error0(status, "terminals database is inaccessible\n"); } else if (status == TGETENT_NO) { @@ -567,17 +575,17 @@ _nc_setupterm(NCURSES_CONST char *tname, int Filedes, int *errret, bool reuse) } } #if !USE_REENTRANT - strncpy(ttytype, term_ptr->type.term_names, NAMESIZE - 1); + strncpy(ttytype, termp->type.term_names, NAMESIZE - 1); ttytype[NAMESIZE - 1] = '\0'; #endif - term_ptr->Filedes = Filedes; - term_ptr->_termname = strdup(tname); + termp->Filedes = Filedes; + termp->_termname = strdup(tname); - set_curterm(term_ptr); + set_curterm(termp); if (command_character && getenv("CC")) - do_prototype(term_ptr); + do_prototype(termp); /* * If an application calls setupterm() rather than initscr() or diff --git a/ncurses/tinfo/lib_termcap.c b/ncurses/tinfo/lib_termcap.c index ff97eea9..0d1a5ec2 100644 --- a/ncurses/tinfo/lib_termcap.c +++ b/ncurses/tinfo/lib_termcap.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. * + * Copyright (c) 1998-2007,2008 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 * @@ -45,7 +45,7 @@ #include -MODULE_ID("$Id: lib_termcap.c,v 1.61 2007/06/02 19:36:03 tom Exp $") +MODULE_ID("$Id: lib_termcap.c,v 1.62 2008/06/28 13:33:08 tom Exp $") NCURSES_EXPORT_VAR(char *) UP = 0; NCURSES_EXPORT_VAR(char *) BC = 0; @@ -164,6 +164,7 @@ tgetent(char *bufp, const char *name) LAST_BUF = bufp; LAST_USE = TRUE; + SetNoPadding(SP); (void) baudrate(); /* sets ospeed as a side-effect */ /* LINT_PREPRO diff --git a/ncurses/tinfo/lib_tputs.c b/ncurses/tinfo/lib_tputs.c index aab33519..a8b72768 100644 --- a/ncurses/tinfo/lib_tputs.c +++ b/ncurses/tinfo/lib_tputs.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2003,2007 Free Software Foundation, Inc. * + * Copyright (c) 1998-2007,2008 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 * @@ -29,6 +29,7 @@ /**************************************************************************** * Author: Zeyd M. Ben-Halim 1992,1995 * * and: Eric S. Raymond * + * and: Thomas E. Dickey 1996-on * ****************************************************************************/ /* @@ -45,13 +46,29 @@ #include /* ospeed */ #include -MODULE_ID("$Id: lib_tputs.c,v 1.64 2007/09/29 20:37:13 tom Exp $") +MODULE_ID("$Id: lib_tputs.c,v 1.66 2008/06/28 13:12:15 tom Exp $") NCURSES_EXPORT_VAR(char) PC = 0; /* used by termcap library */ NCURSES_EXPORT_VAR(NCURSES_OSPEED) ospeed = 0; /* used by termcap library */ NCURSES_EXPORT_VAR(int) _nc_nulls_sent = 0; /* used by 'tack' program */ +#if NCURSES_NO_PADDING +NCURSES_EXPORT(void) +_nc_set_no_padding(SCREEN *sp) +{ + bool no_padding = (getenv("NCURSES_NO_PADDING") != 0); + + if (sp) + sp->_no_padding = no_padding; + else + _nc_prescreen._no_padding = no_padding; + + TR(TRACE_CHARPUT | TRACE_MOVE, ("padding will%s be used", + GetNoPadding(sp) ? " not" : "")); +} +#endif + static int (*my_outch) (int c) = _nc_outch; NCURSES_EXPORT(int) @@ -147,7 +164,7 @@ tputs(const char *string, int affcnt, int (*outc) (int)) !xon_xoff && padding_baud_rate #if NCURSES_NO_PADDING - && (SP == 0 || !(SP->_no_padding)) + && !GetNoPadding(SP) #endif && (_nc_baudrate(ospeed) >= padding_baud_rate); } diff --git a/ncurses/trace/lib_tracechr.c b/ncurses/trace/lib_tracechr.c index 9846dc1d..990f11ce 100644 --- a/ncurses/trace/lib_tracechr.c +++ b/ncurses/trace/lib_tracechr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2005,2007 Free Software Foundation, Inc. * + * Copyright (c) 1998-2007,2008 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,7 +39,7 @@ #include -MODULE_ID("$Id: lib_tracechr.c,v 1.17 2008/05/31 19:57:47 tom Exp $") +MODULE_ID("$Id: lib_tracechr.c,v 1.18 2008/06/28 15:52:05 tom Exp $") #ifdef TRACE diff --git a/ncurses/tty/lib_mvcur.c b/ncurses/tty/lib_mvcur.c index 891b6487..530de327 100644 --- a/ncurses/tty/lib_mvcur.c +++ b/ncurses/tty/lib_mvcur.c @@ -155,7 +155,7 @@ #include #include -MODULE_ID("$Id: lib_mvcur.c,v 1.111 2008/05/24 14:36:54 Miroslav.Lichvar Exp $") +MODULE_ID("$Id: lib_mvcur.c,v 1.112 2008/06/28 12:50:46 tom Exp $") #define WANT_CHAR(y, x) SP->_newscr->_line[y].text[x] /* desired state */ #define BAUDRATE cur_term->_baudrate /* bits per second */ @@ -230,7 +230,7 @@ _nc_msec_cost(const char *const cap, int affcnt) } #if NCURSES_NO_PADDING - if (!(SP->_no_padding)) + if (!GetNoPadding(SP)) #endif cum_cost += number * 10; } else diff --git a/test/README b/test/README index e221812c..97ce54fd 100644 --- a/test/README +++ b/test/README @@ -1,5 +1,5 @@ ------------------------------------------------------------------------------- --- Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. -- +-- Copyright (c) 1998-2007,2008 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 -- @@ -25,7 +25,7 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: README,v 1.36 2008/04/05 16:24:14 tom Exp $ +-- $Id: README,v 1.37 2008/06/28 15:52:45 tom Exp $ ------------------------------------------------------------------------------- The programs in this directory are designed to test your newest toy :-)