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
That's a very old copy of the manual page (at least 5 years: the linked terminfo manual page says
20090207). If you use thefileprogram (assuming a reasonably up-to-date system), you'll see the answer.Here's the expected output for that case:
and for the manual's example
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.