idabsent
idabsent

Reputation: 21

magic number in compiled format of tic

I am reading about the terminfo file format and the format of tic compiled files. I found the documentation of this format, but in this documentation they write about the first two bytes in the file as 1A 01 in order of precedence. To check, I opened the compiled format of my terminal emulator and others, but they contain bytes 1E 02 in order of precedence. What's it?

hexdump(first 8 bytes) of /usr/share/terminfo/x/xterm+256color: 0000000 1E 02 30 00 1C 00 0F 00

Documentation: https://linux.die.net/man/5/term

Upvotes: 1

Views: 64

Answers (1)

Thomas Dickey
Thomas Dickey

Reputation: 54603

That's a very old copy of the manual page (at least 5 years: the linked terminfo manual page says 20090207). If you use the file program (assuming a reasonably up-to-date system), you'll see the answer.

Here's the expected output for that case:

/usr/share/terminfo/x/xterm+256color:     Compiled 32-bit terminfo entry "xterm+256color"

and for the manual's example

/usr/share/terminfo/a/adm3a: Compiled terminfo entry "adm3a"

The difference came in with ncurses 6.1 in January 2018, along with updates for term(5). The section Extended Number Format explains that a different magic number was needed to provide for 32-bit numbers versus the older 16-bit numbers.

Upvotes: 0

Related Questions