bug-ncurses
[Top][All Lists]
Advanced

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

Re: term.h internal capabilities


From: Thomas Dickey
Subject: Re: term.h internal capabilities
Date: Fri, 22 Apr 2016 20:55:16 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

On Fri, Apr 22, 2016 at 03:46:43PM -0400, Anmol Sethi wrote:
> What are the internal capabilities in term.h used for? 
> https://gist.github.com/nhooyr/e80b92ea08cc2a67cd0a3ceeca94744d

The ncurses library reads the compiled terminfo data into memory,
making an index to the data.  The names in term.h are the index.
Some programs use this data structure directly.  Others get the
terminal capabilities using tigetflag (booleans), tigetnum (numbers)
and tigetstr (strings).

The in-memory data structure is based on the compiled form, but
not identical.  The compiled form is described in term(5).
 
> I’m writing a pure go terminfo library and I’m not sure if I need to define
> these capabilities.  I’m assuming no?

no.  But read term(5), and consider implementing a reader for the
extended capabilities.  Your reader should check the magic code at
the beginning, and do some sanity checking -- the ncurses library
may be helpful.

-- 
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net

Attachment: signature.asc
Description: Digital signature


reply via email to

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