terminfo 2.5 KB

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