-2

I'm using the termcaps library for my UI. And i wish to know if there is some way to change how the emulator behave ?

eg: Enable terminal scrollback buffer (termcap flag 'da' and 'db' set to one)

Thank you

Astt
  • 13
  • 3
  • Please provide further details and explanation about what you're asking for. On which environtment you want it to work? Unix-like ANSI standard terminal emulators like on OS X and Linux? Do you need the terminal scollback buffer on your application, and why? Doesn't a standard ANSI terminal already have the scrollbal buffer enable? Please provide more details to focus on the subjects of your question, and what particular "Behaviours" you need to change. It's unclear what you want. Also take a look at ANSI escapes, maybe that can help you: https://en.wikipedia.org/wiki/ANSI_escape_code – Zorgatone Dec 03 '15 at 12:12

1 Answers1

1

The termcap library does not modify the behavior of the terminal emulator. Instead, it provides an application with details about the capabilities of the terminal. Because different terminals may have similar capabilities, there are conventional names for the more common features.

The features you asked about are summarized in the terminfo(5) manual page as

   memory_above              da     da   display may be
                                         retained above the
                                         screen
   memory_below              db     db   display may be
                                         retained below the
                                         screen

The descriptions are terse, and might be improved by relating them to examples. However, these features are not often implemented in terminals because they do not correspond to anything in the ECMA-48 standard (also too terse). Looking at the terminal database, most of those which implemented them are HP terminals (and the emulator hpterm). Having used HP terminals (long ago), I think these capabilities describe a full-screen mode in which the terminal would echo cursor-keys as actual cursor movement, and allow vertical scrolling as a side effect. When doing this, the screen contents were not lost, but retained, and could be scrolled back into view.

None of the terminals you are likely to encounter support a feature like this.

Thomas Dickey
  • 51,086
  • 7
  • 70
  • 105