[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

new modules terminfo, terminfo-h

From: Bruno Haible
Subject: new modules terminfo, terminfo-h
Date: Sun, 30 Jan 2022 17:12:39 +0100

The module 'termcap' implements the old-style approach to terminal
capabilities. Since ca. 1997, the preferred approach is 'terminfo',

  - 'termcap' has a buffer overflow problem in the API.
    See <https://man7.org/linux/man-pages/man5/terminfo.5.html>
    section "Pitfalls of Long Entries".

  - The mnemonics of termcap capabilities are hard to remember.
    See <https://tldp.org/HOWTO/Text-Terminal-HOWTO-16.html>
    section 16.1.

  - Over time, new capabilities get added to 'terminfo' but not
    to 'termcap'. Similarly, 'termcap' often does not know about
    TERM=xterm256-color, but 'terminfo' does.

  - The traditional implementation of 'termcap' reads a huge
    file with hundreds of terminal descriptions, although only one
    is needed.

Therefore it's better to prefer 'terminfo' over 'termcap'. These
modules implement it.

2022-01-30  Bruno Haible  <bruno@clisp.org>

        terminfo: Add tests.
        * tests/test-terminfo.c: New file.
        * modules/terminfo-tests: New file.

        terminfo, terminfo-h: New modules.
        * lib/terminfo.h: New file, from GNU gettext.
        * m4/terminfo.m4: New file, from GNU gettext.
        * modules/terminfo: New file, from GNU gettext.
        * modules/terminfo-h: New file, from GNU gettext.

Attachment: 0001-terminfo-terminfo-h-New-modules.patch
Description: Text Data

Attachment: 0002-terminfo-Add-tests.patch
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]