xref: /freebsd/contrib/file/magic/Magdir/terminfo (revision abcdc1b9)
1
2#------------------------------------------------------------------------------
3# $File: terminfo,v 1.13 2022/11/21 22:25:37 christos Exp $
4# terminfo:  file(1) magic for terminfo
5#
6# URL: https://invisible-island.net/ncurses/man/term.5.html
7# URL: https://invisible-island.net/ncurses/man/scr_dump.5.html
8#
9# Workaround for Targa image type by Joerg Jenderek
10# GRR: line below too general as it catches also
11# Targa image type 1 with 26 long identification field
12# and HELP.DSK
130	string		\032\001
14# 5th character of terminal name list, but not Targa image pixel size (15 16 24 32)
15>16	ubyte		>32
16# namelist, if more than 1 separated by "|" like "st|stterm| simpleterm 0.4.1"
17>>12	regex		\^[a-zA-Z0-9][a-zA-Z0-9.][^|]*	Compiled terminfo entry "%-s"
18!:mime	application/x-terminfo
19# no extension
20#!:ext
21#
22#------------------------------------------------------------------------------
23# The following was added for ncurses6 development:
24#------------------------------------------------------------------------------
25#
260	string		\036\002
27# imitate the legacy compiled-format, to get the entry-name printed
28>16	ubyte		>32
29# namelist, if more than 1 separated by "|" like "st|stterm| simpleterm 0. 4.1"
30>>12	regex		\^[a-zA-Z0-9][a-zA-Z0-9.][^|]*	Compiled 32-bit terminfo entry "%-s"
31!:mime	application/x-terminfo2
32#
33# While the compiled terminfo uses little-endian format regardless of
34# platform, SystemV screen dumps do not.  They came later, and that detail was
35# overlooked.
36#
37# AIX and HPUX use the SVr4 big-endian format
38# Solaris uses the SVr3 formats (sparc and x86 differ endian-ness)
390	beshort		0433 		SVr2 curses screen image, big-endian
40# GRR: line below too general as it catches Commodore C128 program (crc32.prg XLINK.PRG) with start address 1C01h handled by ./c64
410	beshort		0434		SVr3 curses screen image, big-endian
420	beshort		0435		SVr4 curses screen image, big-endian
43#
440	leshort		0433		SVr2 curses screen image, little-endian
450	leshort		0434		SVr3 curses screen image, little-endian
460	leshort		0435		SVr4 curses screen image, little-endian
47#
48# Rather than SVr4, Solaris "xcurses" writes this header:
490	regex		\^MAX=[0-9]+,[0-9]+$
50>1	regex		\^BEG=[0-9]+,[0-9]+$
51>2	regex		\^SCROLL=[0-9]+,[0-9]+$
52>3	regex		\^VMIN=[0-9]+$
53>4	regex		\^VTIME=[0-9]+$
54>5	regex		\^FLAGS=0x[[:xdigit:]]+$
55>6	regex		\^FG=[0-9],[0-9]+$
56>7	regex		\^BG=[0-9]+,[0-9]+,	Solaris xcurses screen image
57#
58# ncurses5 (and before) did not use a magic number, making screen dumps "data".
59# ncurses6 (2015) uses this format, ignoring byte-order
600	string	\210\210\210\210ncurses	ncurses6 screen image
61#
62# PDCurses added this in 2005
630	string		PDC\001		PDCurses screen image
64