# Terminal Extensions

Read Time: 7 minute(s)

jtic -Options DescriptionFile

Where Options can be:

Option Description
-x the Description File contains extended capabilities
-v verbose mode

By default, the program jtic will take a source description file called terminfo.src and assume it contains standard terminfo names. The output will be to a file called /usr/lib/terminfo/x/xyz, where x/xyz depends upon the terminal name as contained in the description file.

You can use any alternative description file to terminfo.src by specifying the description file name on the command line. You can specify an alternative output directory to /usr/lib/terminfo by amending the TERMINFO environment variable. However, when you run a BASIC program that accesses these definitions in an alternative directory, the TERMINFO variable needs to match that when the definition was compiled. By default the jtic program assumes the description file contains standard terminfo definitions: e.g.

cuu1=\E[1A, cols#80,

If you want to create a binary with the extended capabilities, use the -x option. Remember when running jtic you will probably require root privileges to write to the /usr/lib/terminfo directory.

jtic Description File

To run jtic you need a description file to describe the capabilities. This file is very similar to that required by the UNIX tic command.

Comment lines start with # as the first character of each line. Blank lines are also counted as comment lines.

Terminal names. This tells jtic the names of the terminal definition. It is a list of names delimited by | characters. The final field is treated as a comment. Following the terminal names will be the binary definitions, integer values and string values for those terminals. When another set of terminal names are defined, the current definitions are written to file and the current definitions nulled. E.g.

vt100|vt100am|prism-ans|Simple vt100 support

Binary definition. These are just the name of the definition. E.g.xon

Integer value. The name of the definition followed by # then the value. E.g. cols#132

String value. The name of the definition followed by = followed by the string value. jtic supports all the functionality of tic, such as defining characters 1 to 26 using ^A through ^Z, specials such as \E for escape, \s for space, \t for tab. It also supports the if/else/endif structure and logical/arithmetic operations supported by tic. E.g. if_prtr_letter=\E[02l,

use=name. Resets the definition to that of a previously defined name in the definition. You can use this to create a terminfo definition for one or more names, and then base subsequent definitions on that. An example of using this can be found in the source $JBCRELEASEDIR/src/prism. E.g.use=ansi

The comments and terminal names must all start at column 1. The binaries, integers, strings and use=name must all have a leading tab character. There can be more than one binary, integer or string on a line, and each definition should be delimited by a comma. When invoked with the -x option a terminfo binary file with the suffix _jbase is generated for the extended capabilities.

# Extended Definitions

Access Long name Description
@(-53) if_slave_only Send data to slave printer only. No VDT display
@(-54) if_crt_type Returns VDT terminal type
@(-55) if_crt_graphics Returns a 1 if Regis graphics available
@(-59) if_crt_cuprot Clear all unprotected fields
@(-27) if_crt_132 Switch VDT to 132 column mode
@(-28) if_crt_80 Switch VDT to 80 column mode
@(-29) if_crt_dwide Display double wide characters
@(-30) if_crt_swide Display single wide characters
@(-32) if_crt_sron Set-up scrolling region. (Enter ? for help)
@(-33) if_crt_sroff Reset scrolling region to normal
@(-47) if_crt_udhdw Top half of double height line
@(-48) if_crt_bdhdw Bottom half of double height line
@(-60) if_prtr_executive Change paper size to executive
@(-61) if_prtr_a4 Change paper size to A4
@(-62) if_prtr_monarch Envelope type "Monarch"
@(-63) if_prtr_comm10 Envelope type "Commercial 10"
@(-64) if_prtr_interntldl Envelope type "International DL"
@(-65) if_prtr_reset Reset printer defaults
@(-66) if_prtr_envfeed Envelope feeder
@(-70) if_prtr_letter Change paper size to letter
@(-71) if_prtr_legal Change paper size to legal
@(-72) if_prtr_chgcpy Change number of copies to print on Laser
@(-73) if_prtr_cpwo1 Compressed print for Service WO form 1
@(-74) if_prtr_spcol Start printing at specified column
@(-75) if_prtr_sprow Start printing at specified row
@(-76) if_prtr_utray Use Upper Tray
@(-77) if_prtr_ltray Use Lower Tray
@(-78) if_prtr_portrt Portrait orientation
@(-79) if_prtr_land Landscape orientation
@(-80) if_prtr_simplx Simplex binding
@(-81) if_prtr_duplxl Duplex, long edge binding
@(-82) if_prtr_duplxs Duplex, short edge binding
@(-83) if_prtr_macro Call MACRO
@(-84) if_prtr_setdef Set default ( Font size, HMI, VMI )
@(-85) if_prtr_lpi2 2 lines per inch
@(-86) if_prtr_lpi3 3 lines per inch
@(-87) if_prtr_lpi4 4 lines per inch
@(-88) if_prtr_lpi6 6 lines per inch
@(-89) if_prtr_lpi8 8 lines per inch
@(-90) if_prtr_lpi12 12 lines per inch
@(-91) if_prtr_dwide Double wide mode
@(-92) if_prtr_swide Single wide mode
@(-93) if_prtr_96 96 column mode
@(-94) if_prtr_pld 1/2 line down
@(-95) if_prtr_plu 1/2 line up
@(-96) if_prtr_suon Superscript mode
@(-97) if_prtr_sbon Subscript mode
@(-98) if_prtr_ssoff Superscript and subscript off
@(-99) if_prtr_40 Double wide for 80 column mode (5 pitch)
@(-100) if_prtr_48 Double wide for 96 column mode (6 pitch)
@(-101) if_prtr_ff Top of form
@(-102) if_prtr_80 80 column mode (10 pitch)
@(-103) if_prtr_132 132 column mode (16 pitch)
@(-104) if_prtr_bold Bold
@(-105) if_prtr_ul Underline
@(-106) if_prtr_norm Turn off bold and underline
@(-107) if_prtr_hmi Set horizontal motion index to U-1
@(-108) if_prtr_vmi Set vertical motion index to U-1
@(-109) if_prtr_pson Proportional spacing on
@(-110) if_prtr_psoff Proportional spacing off
@(-111) if_prtr_1key Linefeed and backspace
@(-112) if_prtr_2key Linefeed
@(-113) if_prtr_3key Linefeed and space
@(-114) if_prtr_4key Backspace
@(-115) if_prtr_6key Space
@(-116) if_prtr_7key Negative linefeed and backspace
@(-117) if_prtr_8key Negative linefeed
@(-118) if_prtr_9key Negative linefeed and space
@(-119) if_prtr_cvd Coarse vertical distance ( 1 line = 1 inch)
@(-120) if_prtr_mvd Medium vertical distance ( 1 line = 1/6 inch )
@(-121) if_prtr_type Returns slave/printer type
@(-122) if_prtr_fvd Fine vertical distance ( 1 line = 1/48 inch)
@(-123) if_prtr_chd Coarse horizontal distance ( 1 space = 1 inch )
@(-124) if_prtr_mhd Medium horizontal distance ( 1 space = 1/12 inch )
@(-125) if_prtr_fhd Fine horizontal distance ( 1 space = 1/120 inch )
@(-126) if_prtr_status Retrieve slave/printer device status
@(-220) IF_PRTR_DUL_ON
@(-230) IF_PRTR_FONT_0
@(-231) IF_PRTR_FONT_1
@(-232) IF_PRTR_FONT_2
@(-233) IF_PRTR_FONT_3
@(-234) IF_PRTR_FONT_4
@(-235) IF_PRTR_FONT_5
@(-236) IF_PRTR_FONT_6
@(-237) IF_PRTR_FONT_7
@(-238) IF_PRTR_FONT_8
@(-239) IF_PRTR_FONT_9

# jBASE Extended terminfo definitions generation

To generate a terminfo extension file, using the jtic -x comamnd, setting any of the following terminfo strings references in lowercase. Ensure that the prt_video emulation flag is configured to true, for the required emulation.


Generate jBASE extension tic file

ED . Mytic
001 # My jBASE extension file for vt220
002 vt220|VT220
003 if_crt_132=My132String,
004 if_crt_80=My80String,

Generate jBASE terminfo extension file.

jtic -x Mytic

This generates a jBASE extension entry for vt220 in the terminfo database. e.g. /usr/lib/terminfo/v/vt220_ext_jbase

Test terminfo produces correct result

001 CRT "Output my 80 column terminfo command ":@(-28)
002 CRT "Output my 132 column terminfo command ":@(-27)
export TERM=vt220

Back to Terminal