From 97df2f335617625b7355c04e46175e316ef02544 Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Mon, 29 Jul 2019 00:58:02 +0000 Subject: [PATCH] ncurses 6.1 - patch 20190728 + fix a few more coverity warnings. + more documentation updates based on tctest. --- NEWS | 6 ++- VERSION | 2 +- c++/cursesapp.cc | 6 +-- c++/cursesapp.h | 6 +-- c++/cursesf.cc | 8 ++-- c++/cursesf.h | 12 ++--- c++/cursesm.cc | 10 ++-- c++/cursesm.h | 14 +++--- c++/cursesp.cc | 6 +-- c++/cursesp.h | 8 ++-- c++/cursesw.cc | 6 +-- c++/cursesw.h | 10 ++-- c++/cursslk.cc | 6 +-- c++/cursslk.h | 6 +-- c++/demo.cc | 10 ++-- dist.mk | 4 +- doc/hackguide.doc | 45 +++++++++--------- doc/html/hackguide.html | 78 ++++++++++++++++++-------------- doc/html/ncurses-intro.html | 32 +++++++------ doc/ncurses-intro.doc | 17 ++++--- ncurses/curses.priv.h | 16 ++++--- ncurses/tinfo/MKuserdefs.sh | 8 ++-- ncurses/tinfo/lib_setup.c | 28 ++++++++---- ncurses/tinfo/tinfo_driver.c | 18 +++++--- package/debian-mingw/changelog | 4 +- package/debian-mingw64/changelog | 4 +- package/debian/changelog | 4 +- package/mingw-ncurses.nsi | 4 +- package/mingw-ncurses.spec | 2 +- package/ncurses.spec | 2 +- package/ncursest.spec | 2 +- progs/tput.c | 6 +-- test/test_sgr.c | 3 +- 33 files changed, 214 insertions(+), 179 deletions(-) diff --git a/NEWS b/NEWS index bfcd06b9..d2e3848e 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.3354 2019/07/27 22:45:29 tom Exp $ +-- $Id: NEWS,v 1.3356 2019/07/28 18:49:10 tom Exp $ ------------------------------------------------------------------------------- This is a log of changes that ncurses has gone through since Zeyd started @@ -45,6 +45,10 @@ 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. +20190728 + + fix a few more coverity warnings. + + more documentation updates based on tctest. + 20190727 + fix a few coverity warnings. + documentation updates based on tctest. diff --git a/VERSION b/VERSION index 10b7086e..640fdb93 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5:0:10 6.1 20190727 +5:0:10 6.1 20190728 diff --git a/c++/cursesapp.cc b/c++/cursesapp.cc index ddab6fdf..e1ffa7a4 100644 --- a/c++/cursesapp.cc +++ b/c++/cursesapp.cc @@ -1,6 +1,6 @@ // * this is for making emacs happy: -*-Mode: C++;-*- /**************************************************************************** - * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. * + * Copyright (c) 1998-2008,2019 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 * @@ -35,7 +35,7 @@ #include "internal.h" #include "cursesapp.h" -MODULE_ID("$Id: cursesapp.cc,v 1.15 2008/08/16 17:15:35 tom Exp $") +MODULE_ID("$Id: cursesapp.cc,v 1.16 2019/07/28 19:55:27 tom Exp $") void NCursesApplication::init(bool bColors) @@ -68,7 +68,7 @@ NCursesApplication* NCursesApplication::theApp = 0; NCursesWindow* NCursesApplication::titleWindow = 0; NCursesApplication::SLK_Link* NCursesApplication::slk_stack = 0; -NCursesApplication::~NCursesApplication() +NCursesApplication::~NCursesApplication() THROWS(NCursesException) { Soft_Label_Key_Set* S; diff --git a/c++/cursesapp.h b/c++/cursesapp.h index e3cbc04c..a3d0aaf3 100644 --- a/c++/cursesapp.h +++ b/c++/cursesapp.h @@ -1,6 +1,6 @@ // * This makes emacs happy -*-Mode: C++;-*- /**************************************************************************** - * Copyright (c) 1998-2005,2011 Free Software Foundation, Inc. * + * Copyright (c) 1998-2011,2019 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 * @@ -31,7 +31,7 @@ * Author: Juergen Pfeifer, 1997 * ****************************************************************************/ -// $Id: cursesapp.h,v 1.12 2011/09/17 22:12:10 tom Exp $ +// $Id: cursesapp.h,v 1.13 2019/07/28 19:55:27 tom Exp $ #ifndef NCURSES_CURSESAPP_H_incl #define NCURSES_CURSESAPP_H_incl @@ -106,7 +106,7 @@ protected: } public: - virtual ~NCursesApplication(); + virtual ~NCursesApplication() THROWS(NCursesException); // Get a pointer to the current application object static NCursesApplication* getApplication() { diff --git a/c++/cursesf.cc b/c++/cursesf.cc index 79560547..4a7ad838 100644 --- a/c++/cursesf.cc +++ b/c++/cursesf.cc @@ -1,6 +1,6 @@ // * this is for making emacs happy: -*-Mode: C++;-*- /**************************************************************************** - * Copyright (c) 1998-2005,2011 Free Software Foundation, Inc. * + * Copyright (c) 1998-2011,2019 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 * @@ -35,9 +35,9 @@ #include "cursesf.h" #include "cursesapp.h" -MODULE_ID("$Id: cursesf.cc,v 1.22 2011/09/17 22:12:10 tom Exp $") +MODULE_ID("$Id: cursesf.cc,v 1.23 2019/07/28 19:55:27 tom Exp $") -NCursesFormField::~NCursesFormField () +NCursesFormField::~NCursesFormField () THROWS(NCursesException) { if (field) OnError(::free_field (field)); @@ -149,7 +149,7 @@ NCursesForm::InitForm(NCursesFormField* nfields[], setDefaultAttributes(); } -NCursesForm::~NCursesForm() +NCursesForm::~NCursesForm() THROWS(NCursesException) { UserHook* hook = reinterpret_cast(::form_userptr(form)); delete hook; diff --git a/c++/cursesf.h b/c++/cursesf.h index fe1f1aa9..746b222a 100644 --- a/c++/cursesf.h +++ b/c++/cursesf.h @@ -1,6 +1,6 @@ // * This makes emacs happy -*-Mode: C++;-*- /**************************************************************************** - * Copyright (c) 1998-2012,2014 Free Software Foundation, Inc. * + * Copyright (c) 1998-2014,2019 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 * @@ -31,7 +31,7 @@ * Author: Juergen Pfeifer, 1997 * ****************************************************************************/ -// $Id: cursesf.h,v 1.32 2014/08/09 22:06:11 Adam.Jiang Exp $ +// $Id: cursesf.h,v 1.33 2019/07/28 19:55:27 tom Exp $ #ifndef NCURSES_CURSESF_H_incl #define NCURSES_CURSESF_H_incl 1 @@ -151,7 +151,7 @@ public: { } - virtual ~NCursesFormField (); + virtual ~NCursesFormField () THROWS(NCursesException); // Duplicate the field at a new position inline NCursesFormField* dup(int first_row, int first_col) @@ -470,7 +470,7 @@ public: { } - virtual ~NCursesForm(); + virtual ~NCursesForm() THROWS(NCursesException); // Set the default attributes for the form virtual void setDefaultAttributes(); @@ -645,7 +645,7 @@ public: OnError(::set_field_userptr(field, STATIC_CAST(void *)(p_UserData))); } - virtual ~NCursesUserField() {}; + virtual ~NCursesUserField() THROWS(NCursesException) {}; inline const T* UserData (void) const { return reinterpret_cast(::field_userptr (field)); @@ -702,7 +702,7 @@ public: (p_UserData))); }; - virtual ~NCursesUserForm() { + virtual ~NCursesUserForm() THROWS(NCursesException) { }; inline T* UserData (void) { diff --git a/c++/cursesm.cc b/c++/cursesm.cc index 6ab0940d..64a38ffc 100644 --- a/c++/cursesm.cc +++ b/c++/cursesm.cc @@ -1,6 +1,6 @@ // * this is for making emacs happy: -*-Mode: C++;-*- /**************************************************************************** - * Copyright (c) 1998-2011,2017 Free Software Foundation, Inc. * + * Copyright (c) 1998-2017,2019 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 * @@ -35,9 +35,9 @@ #include "cursesm.h" #include "cursesapp.h" -MODULE_ID("$Id: cursesm.cc,v 1.24 2017/06/26 08:32:53 tom Exp $") +MODULE_ID("$Id: cursesm.cc,v 1.25 2019/07/28 19:55:27 tom Exp $") -NCursesMenuItem::~NCursesMenuItem() +NCursesMenuItem::~NCursesMenuItem() THROWS(NCursesException) { if (item) OnError(::free_item(item)); @@ -49,7 +49,7 @@ NCursesMenuItem::action() return FALSE; } -NCursesMenuCallbackItem::~NCursesMenuCallbackItem() +NCursesMenuCallbackItem::~NCursesMenuCallbackItem() THROWS(NCursesException) { } @@ -175,7 +175,7 @@ NCursesMenu::setDefaultAttributes() } } -NCursesMenu::~NCursesMenu() +NCursesMenu::~NCursesMenu() THROWS(NCursesException) { UserHook* hook = reinterpret_cast(::menu_userptr(menu)); delete hook; diff --git a/c++/cursesm.h b/c++/cursesm.h index f8f9665d..239941d8 100644 --- a/c++/cursesm.h +++ b/c++/cursesm.h @@ -1,6 +1,6 @@ // * This makes emacs happy -*-Mode: C++;-*- /**************************************************************************** - * Copyright (c) 1998-2012,2014 Free Software Foundation, Inc. * + * Copyright (c) 1998-2014,2019 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 * @@ -31,7 +31,7 @@ * Author: Juergen Pfeifer, 1997 * ****************************************************************************/ -// $Id: cursesm.h,v 1.30 2014/08/09 22:06:18 Adam.Jiang Exp $ +// $Id: cursesm.h,v 1.31 2019/07/28 19:55:27 tom Exp $ #ifndef NCURSES_CURSESM_H_incl #define NCURSES_CURSESM_H_incl 1 @@ -85,7 +85,7 @@ public: (void) rhs; } - virtual ~NCursesMenuItem (); + virtual ~NCursesMenuItem () THROWS(NCursesException); // Release the items memory inline const char* name () const { @@ -179,7 +179,7 @@ public: { } - virtual ~NCursesMenuCallbackItem(); + virtual ~NCursesMenuCallbackItem() THROWS(NCursesException); bool action(); }; @@ -332,7 +332,7 @@ public: { } - virtual ~NCursesMenu (); + virtual ~NCursesMenu () THROWS(NCursesException); // Retrieve the menus subwindow inline NCursesWindow& subWindow() const { @@ -606,7 +606,7 @@ public: OnError (::set_item_userptr (item, const_cast(reinterpret_cast(p_UserData)))); } - virtual ~NCursesUserItem() {} + virtual ~NCursesUserItem() THROWS(NCursesException) {} inline const T* UserData (void) const { return reinterpret_cast(::item_userptr (item)); @@ -657,7 +657,7 @@ public: set_user (const_cast(reinterpret_cast(p_UserData))); }; - virtual ~NCursesUserMenu() { + virtual ~NCursesUserMenu() THROWS(NCursesException) { }; inline T* UserData (void) { diff --git a/c++/cursesp.cc b/c++/cursesp.cc index 9c4eab69..83b7cc90 100644 --- a/c++/cursesp.cc +++ b/c++/cursesp.cc @@ -1,6 +1,6 @@ // * this is for making emacs happy: -*-Mode: C++;-*- /**************************************************************************** - * Copyright (c) 1998-2003,2005 Free Software Foundation, Inc. * + * Copyright (c) 1998-2005,2019 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 @@ #include "internal.h" #include "cursesp.h" -MODULE_ID("$Id: cursesp.cc,v 1.25 2005/08/06 22:12:36 tom Exp $") +MODULE_ID("$Id: cursesp.cc,v 1.26 2019/07/28 19:55:27 tom Exp $") NCursesPanel* NCursesPanel::dummy = static_cast(0); @@ -51,7 +51,7 @@ void NCursesPanel::init() ::set_panel_userptr(p, reinterpret_cast(hook)); } -NCursesPanel::~NCursesPanel() +NCursesPanel::~NCursesPanel() THROWS(NCursesException) { UserHook* hook = UserPointer(); assert(hook != 0 && hook->m_back==this && hook->m_owner==p); diff --git a/c++/cursesp.h b/c++/cursesp.h index 54b0d588..82b373bf 100644 --- a/c++/cursesp.h +++ b/c++/cursesp.h @@ -1,6 +1,6 @@ // * This makes emacs happy -*-Mode: C++;-*- /**************************************************************************** - * Copyright (c) 1998-2012,2014 Free Software Foundation, Inc. * + * Copyright (c) 1998-2014,2019 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 @@ #ifndef NCURSES_CURSESP_H_incl #define NCURSES_CURSESP_H_incl 1 -// $Id: cursesp.h,v 1.31 2014/08/09 22:06:26 Adam.Jiang Exp $ +// $Id: cursesp.h,v 1.32 2019/07/28 19:55:27 tom Exp $ #include @@ -131,7 +131,7 @@ public: { } - virtual ~NCursesPanel(); + virtual ~NCursesPanel() THROWS(NCursesException); // basic manipulation inline void hide() @@ -250,7 +250,7 @@ public: // This creates an user panel associated with the ::stdscr and user data // pointed to by p_UserData. - virtual ~NCursesUserPanel() {}; + virtual ~NCursesUserPanel() THROWS(NCursesException) {}; T* UserData (void) { diff --git a/c++/cursesw.cc b/c++/cursesw.cc index 16438770..42e5bda9 100644 --- a/c++/cursesw.cc +++ b/c++/cursesw.cc @@ -1,6 +1,6 @@ // * this is for making emacs happy: -*-Mode: C++;-*- /**************************************************************************** - * Copyright (c) 2007-2012,2014 Free Software Foundation, Inc. * + * Copyright (c) 2007-2014,2019 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 * @@ -42,7 +42,7 @@ #include "internal.h" #include "cursesw.h" -MODULE_ID("$Id: cursesw.cc,v 1.54 2014/02/01 22:10:42 tom Exp $") +MODULE_ID("$Id: cursesw.cc,v 1.55 2019/07/28 19:55:27 tom Exp $") #define COLORS_NEED_INITIALIZATION -1 #define COLORS_NOT_INITIALIZED 0 @@ -344,7 +344,7 @@ NCursesWindow::kill_subwindows() } -NCursesWindow::~NCursesWindow() +NCursesWindow::~NCursesWindow() THROWS(NCursesException) { kill_subwindows(); diff --git a/c++/cursesw.h b/c++/cursesw.h index 40b28f57..03528cc5 100644 --- a/c++/cursesw.h +++ b/c++/cursesw.h @@ -1,7 +1,7 @@ // * This makes emacs happy -*-Mode: C++;-*- // vile:cppmode /**************************************************************************** - * Copyright (c) 1998-2014,2017 Free Software Foundation, Inc. * + * Copyright (c) 1998-2017,2019 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 * @@ -31,7 +31,7 @@ #ifndef NCURSES_CURSESW_H_incl #define NCURSES_CURSESW_H_incl 1 -// $Id: cursesw.h,v 1.53 2017/11/21 00:37:23 tom Exp $ +// $Id: cursesw.h,v 1.54 2019/07/28 19:55:27 tom Exp $ extern "C" { # include @@ -837,7 +837,7 @@ public: { } - virtual ~NCursesWindow(); + virtual ~NCursesWindow() THROWS(NCursesException); NCursesWindow Clone(); // Make an exact copy of the window. @@ -1485,7 +1485,7 @@ public: { } - virtual ~NCursesPad() {} + virtual ~NCursesPad() THROWS(NCursesException) {} int echochar(const chtype ch) { return ::pechochar(w, ch); } // Put the attributed character onto the pad and immediately do a @@ -1546,7 +1546,7 @@ public: } // Construct the FramedPad with the given Window win as viewport. - virtual ~NCursesFramedPad() { + virtual ~NCursesFramedPad() THROWS(NCursesException) { delete getSubWindow(); } diff --git a/c++/cursslk.cc b/c++/cursslk.cc index 23785dfc..ef393632 100644 --- a/c++/cursslk.cc +++ b/c++/cursslk.cc @@ -1,6 +1,6 @@ // * this is for making emacs happy: -*-Mode: C++;-*- /**************************************************************************** - * Copyright (c) 1998-2005,2012 Free Software Foundation, Inc. * + * Copyright (c) 1998-2012,2019 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 * @@ -35,7 +35,7 @@ #include "cursslk.h" #include "cursesapp.h" -MODULE_ID("$Id: cursslk.cc,v 1.16 2012/02/23 10:41:56 tom Exp $") +MODULE_ID("$Id: cursslk.cc,v 1.17 2019/07/28 19:55:27 tom Exp $") Soft_Label_Key_Set::Soft_Label_Key& Soft_Label_Key_Set::Soft_Label_Key::operator=(char *text) @@ -88,7 +88,7 @@ Soft_Label_Key_Set::Soft_Label_Key_Set(Soft_Label_Key_Set::Label_Layout fmt) init(); } -Soft_Label_Key_Set::~Soft_Label_Key_Set() { +Soft_Label_Key_Set::~Soft_Label_Key_Set() THROWS(NCursesException) { if (!::isendwin()) clear(); delete[] slk_array; diff --git a/c++/cursslk.h b/c++/cursslk.h index 091695ee..c110a61c 100644 --- a/c++/cursslk.h +++ b/c++/cursslk.h @@ -1,6 +1,6 @@ // * this is for making emacs happy: -*-Mode: C++;-*- /**************************************************************************** - * Copyright (c) 1998-2003,2005 Free Software Foundation, Inc. * + * Copyright (c) 1998-2005,2019 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 * @@ -31,7 +31,7 @@ * Author: Juergen Pfeifer, 1997 * ****************************************************************************/ -// $Id: cursslk.h,v 1.13 2005/05/28 21:58:18 tom Exp $ +// $Id: cursslk.h,v 1.14 2019/07/28 19:55:27 tom Exp $ #ifndef NCURSES_CURSSLK_H_incl #define NCURSES_CURSSLK_H_incl @@ -161,7 +161,7 @@ public: init(); // allocate a new slk_array[] } - virtual ~Soft_Label_Key_Set(); + virtual ~Soft_Label_Key_Set() THROWS(NCursesException); // Get Label# i. Label counting starts with 1! NCURSES_IMPEXP Soft_Label_Key& operator[](int i); diff --git a/c++/demo.cc b/c++/demo.cc index 2423111d..37e50c76 100644 --- a/c++/demo.cc +++ b/c++/demo.cc @@ -1,6 +1,6 @@ // * This makes emacs happy -*-Mode: C++;-*- /**************************************************************************** - * Copyright (c) 1998-2017,2018 Free Software Foundation, Inc. * + * Copyright (c) 1998-2018,2019 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 * @@ -35,7 +35,7 @@ * Demo code for NCursesMenu and NCursesForm written by * Juergen Pfeifer * - * $Id: demo.cc,v 1.43 2018/06/24 00:07:22 tom Exp $ + * $Id: demo.cc,v 1.44 2019/07/28 19:55:27 tom Exp $ */ #include "internal.h" @@ -176,7 +176,7 @@ public: : NCursesUserItem(p_name, static_cast(0), p_UserData) {} - virtual ~MyAction() {} + virtual ~MyAction() THROWS(NCursesException) {} bool action() { SillyDemo a; @@ -295,7 +295,7 @@ public: { } - ~TestForm() { + ~TestForm() THROWS(NCursesException) { delete mft; delete ift; delete eft; @@ -473,7 +473,7 @@ public: { } - ~MyMenu() + ~MyMenu() THROWS(NCursesException) { P->hide(); delete P; diff --git a/dist.mk b/dist.mk index b1e4f6d8..8b4eb2d8 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.1297 2019/07/26 23:10:14 tom Exp $ +# $Id: dist.mk,v 1.1298 2019/07/28 10:39:10 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 = 6 NCURSES_MINOR = 1 -NCURSES_PATCH = 20190727 +NCURSES_PATCH = 20190728 # We don't append the patch to the version, since this only applies to releases VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR) diff --git a/doc/hackguide.doc b/doc/hackguide.doc index 2324322a..1bafad2a 100644 --- a/doc/hackguide.doc +++ b/doc/hackguide.doc @@ -205,7 +205,7 @@ How to Design Extensions If your bug produces a core-dump, please include a symbolic stack trace generated by gdb(1) or your local equivalent. Tell us about every terminal on which you have reproduced the bug - -- and every terminal on which you cannot. Ideally, sent us + -- and every terminal on which you cannot. Ideally, send us terminfo sources for all of these (yours might differ from ours). Include your ncurses version and your OS/machine type, of course! You can find your ncurses version in the curses.h file. @@ -352,10 +352,10 @@ The Engine Room Here are some more details about mouse event handling: - The lib_mouse()code is logically split into a lower level that accepts - event reports in a device-dependent format and an upper level that - parses mouse gestures and filters events. The mediating data structure - is a circular queue of event structures. + The lib_mouse() code is logically split into a lower level that + accepts event reports in a device-dependent format and an upper level + that parses mouse gestures and filters events. The mediating data + structure is a circular queue of event structures. Functionally, the lower level's job is to pick up primitive events and put them on the circular queue. This can happen in one of two ways: @@ -382,24 +382,23 @@ The Engine Room The brains of this operation are the modules hashmap.c, hardscroll.c and lib_doupdate.c; the latter two use lib_mvcur.c. Essentially, what happens looks like this: - - The hashmap.c module tries to detect vertical motion changes between - the real and virtual screens. This information is represented by the - oldindex members in the newscr structure. These are modified by - vertical-motion and clear operations, and both are re-initialized - after each update. To this change-journalling information, the hashmap - code adds deductions made using a modified Heckel algorithm on hash - values generated from the line contents. - - The hardscroll.c module computes an optimum set of scroll, insertion, - and deletion operations to make the indices match. It calls - _nc_mvcur_scrolln() in lib_mvcur.c to do those motions. - - Then lib_doupdate.c goes to work. Its job is to do line-by-line - transformations of curscr lines to newscr lines. Its main tool is the - routine mvcur() in lib_mvcur.c. This routine does cursor-movement - optimization, attempting to get from given screen location A to given - location B in the fewest output characters possible. + * The hashmap.c module tries to detect vertical motion changes + between the real and virtual screens. This information is + represented by the oldindex members in the newscr structure. These + are modified by vertical-motion and clear operations, and both are + re-initialized after each update. To this change-journalling + information, the hashmap code adds deductions made using a + modified Heckel algorithm on hash values generated from the line + contents. + * The hardscroll.c module computes an optimum set of scroll, + insertion, and deletion operations to make the indices match. It + calls _nc_mvcur_scrolln() in lib_mvcur.c to do those motions. + * Then lib_doupdate.c goes to work. Its job is to do line-by-line + transformations of curscr lines to newscr lines. Its main tool is + the routine mvcur() in lib_mvcur.c. This routine does + cursor-movement optimization, attempting to get from given screen + location A to given location B in the fewest output characters + possible. If you want to work on screen optimizations, you should use the fact that (in the trace-enabled version of the library) enabling the diff --git a/doc/html/hackguide.html b/doc/html/hackguide.html index 2ae0884f..3bf9d094 100644 --- a/doc/html/hackguide.html +++ b/doc/html/hackguide.html @@ -1,5 +1,5 @@