      A MFBCAP(5)           UNIX Programmer's Manual            MFBCAP(5)e       NAME4      mfbcap - graphics terminal capability data base   SYNOPSIS      ~cad/lib/mfbcap   DESCRIPTIONiK      _M_F_B_C_A_P is a data base describing graphics terminals, used,iL      _e._g., by _k_i_c(1) and _m_f_b(3).  Terminals are described inM      _M_F_B_C_A_P by defining a set of capabilities that they have, and(?      by describing how operations are performed.  Output delaysnJ      and initialization sequences are also included in _M_F_B_C_A_P.  J      Entries in _M_F_B_C_A_P consist of a set of comma (,) separated@      fields.  Entries may continue onto multiple lines by begin-@      ning a continuation line with either a tab or space charac-?      ter.  The first entry for each terminal gives the names by ?      which the terminal is known, separated by vertical bar (|) A      characters.  The first name is always 2 characters long, thei>      second name given is the most common abbreviation for the<      terminal, and the last name given should be a long nameA      fully identifying the terminal.  The second name should con-c@      tain no blanks; the last name may contain blanks for reada-@      bility.  For compatability with other operating systems, it<      is recommended that the device names use all UPPER CASE
      LETTERS.l   CAPABILITIESA      The Parms column indicates which of the four possible param-c@      eters are used in the encoding/decoding of string variable.;      Upper case letters signify that the parameter value issG      passed to the _m_f_b(_3) routine, and lower case letters iden-e#      tify values that are returned.n  .      Name     Type        Parms    DescriptionH      8BB      boolean              transmit in 8 Bit Binary using LITOUTG      ALUEOR   string               set ALU writing mode to Exclusive ORpM      ALUJAM   string               set ALU writing mode to JAM (replace mode)i>      ALUNOR   string               set ALU writing mode to NOR=      ALUOR    string               set ALU writing mode to ORw?      APT      boolean              Accurately Positionable Text :      BELL     string               ring the terminals BELL5      BLD      boolean              BLinkers Definablem/      BLE      string               BLinkers EndS1      BLS      string      XYZT     BLinkers Starta3                                    X = off color IDsE                                    Y = red/hue intensity when blinkedhM                                    Z = green/lightness intensity when blinkedmM                                    T = blue/saturation intensity when blinkedsP      BU1      numeric              value returned by BUtton 1 of pointing deviceP      BU2      numeric              value returned by BUtton 2 of pointing deviceP      BU3      numeric              value returned by BUtton 3 of pointing device      A Printed 9/3/83               6/21/83                            1             A MFBCAP(5)           UNIX Programmer's Manual            MFBCAP(5)t      P      BU4      numeric              value returned by BUtton 4 of pointing deviceP      BU5      numeric              value returned by BUtton 5 of pointing deviceP      BU6      numeric              value returned by BUtton 6 of pointing deviceP      BU7      numeric              value returned by BUtton 7 of pointing deviceP      BU8      numeric              value returned by BUtton 8 of pointing deviceP      BU9      numeric              value returned by BUtton 9 of pointing deviceQ      BU10     numeric              value returned by BUtton 10 of pointing device Q      BU11     numeric              value returned by BUtton 11 of pointing devicenQ      BU12     numeric              value returned by BUtton 12 of pointing devicei4      DBS      string      XYZT     Draw Box Sequence1                                    X = lower leftt3                                    Y = lower bottomt2                                    Z = upper right0                                    T = upper top7      DCS      string      XYZ      Draw Circle Sequence :                                    X = center x coordinate:                                    Y = center y coordinate7                                    Z = radius of circles:      DFP      boolean              Definable Fill Patterns:      DLP      boolean              Definable Line Patterns5      DLS      string      XYZT     Draw Line Sequencet9                                    X,Y = start coordinatef7                                    Z,T = end coordinate >      DLT      string      XY       Draw Line To (x,y) sequenceG                                    X,Y = next current graphics position ;      DSL      string      XYZT     Draw Solid Line sequence 9                                    X,Y = start coordinate 7                                    Z,T = end coordinateBD      DSLT     string      XY       Draw Solid Line To (x,y) sequenceG                                    X,Y = next current graphics position :      DSB      string      XYZT     Draw Solid Box sequence1                                    X = lower left 3                                    Y = lower bottom12                                    Z = upper right0                                    T = upper top:      FDE      string      X        Fill pattern Define End/                                    X = style IDt=      FDF      string      XY       Fill pattern Define Format2/                                    X = style IDFR                                    Y = one 8 bit row/col of the fill pattern arrayE      FDH      numeric              Fill pattern Define Height in rows @      FDR      boolean              Fill pattern Define Row major<      FDS      string      X        Fill pattern Define Start/                                    X = style IDuG      FDW      numeric              Fill pattern Define Width in columns8I      FPOLY    boolean              terminal is capable of Filled POLYgons <      GCH      numeric              Graphics Character HeightK      GCS      string               Graphics Clear Screen (in current color) ;      GCW      numeric              Graphics Character Widthl9      GFS      string               Graphics Finish String A      GIS      string               Graphics Initialization Stringi4      GTE      string               Graphics Text End      A Printed 9/3/83               6/21/83                            2             A MFBCAP(5)           UNIX Programmer's Manual            MFBCAP(5)r      >      GTH      numeric              Graphics Text Height offsetE      GTO      boolean              Graphics Text Overstrikes old text B      GTR      boolean              Graphics Text Replaces old text6      GTS      string      XYZ      Graphics Text StartM                                    X,Y = lower left coordinate of text stringtJ                                    Z = number of characters in text string=      GTW      numeric              Graphics Text Width offset G      HLS      boolean              convert RGB color definitions to HLS E      ICS      string               Initialize predefined Color Styles F      IFP      string               Initialize predefined Fill PatternsD      ILS      string               Initialize predefined Line Styles>      KYB      string               KeYboard Backspace sequence:      KYBRD    boolean              Terminal has a KeYBoaRD8      KYE      string               KeYboard End sequence:      KYS      string      XY       KeYboard Start sequenceQ                                    X,Y = lower left coordinate of keyboard window 4      KYX      numeric              KeYboard X offset4      KYY      numeric              KeYboard Y offset2      LDE      string      X        Line Define End/                                    X = style ID 5      LDF      string      XY       Line Define Format /                                    X = style IDE9                                    Y = 8 bit fill patternm@      LDL      numeric              Line Define Length (in bytes)4      LDS      string      X        Line Define Start/                                    X = style IDeQ      MCE      string               device behaves like the following MfbCap Entry ;      MCL      numeric              Maximum number of Colors B      MFP      numeric              Maximum number of Fill Patterns@      MLS      numeric              Maximum number of Line Styles4      MPS      string      XY       Move Pen SequenceK                                    X,Y = coordinate to move graphics cursort7      MXC      numeric              Maximum X Coordinaten7      MYC      numeric              Maximum Y Coordinatey5      NBL      numeric              Number of BLinkersxD      NPB      numeric              Number of Pointing device ButtonsM      OFFDX    numeric              length of OFF screen memory in X Direction M      OFFDY    numeric              length of OFF screen memory in Y DirectiongK      OFFMX    numeric              minimum X coodinate of OFF screen Memory K      OFFMY    numeric              minimum Y coodinate of OFF screen Memory C      OMO      string               Overstrike text Mode On sequences>      PDB      boolean              Pointing Device has Buttons6      PDE      string               Pointing Device EndD      PDF      string      xyzt     Pointing Device coordinate Format9                                    x,y = input coordinate 1                                    z = key pushed 2                                    t = button mask@      PDR      string               Pointing Device initiate Read8      PDS      string               Pointing Device Start            A Printed 9/3/83               6/21/83                            3d            A MFBCAP(5)           UNIX Programmer's Manual            MFBCAP(5)L      7      PLE      string      XY       PoLygon End sequencecQ                                    X,Y = first coordinate in the polygon sequence 9      PLS      string      XYZ      PoLygon Start sequence ?                                    X,Y = first of Z coordinates <                                    Z = number of coordinatesH      PLSOL    string      XYZ      PoLygon start sequence for SOLid fill?                                    X,Y = first of Z coordinates <                                    Z = number of coordinates?      PLV      string      XY       send PoLygon Vertex sequence P                                    X,Y = next coordinate in the polygon sequence?      POD      boolean              terminal has POinting DevicenI      PRBOFF   string               disable Pointing device Rubber BandingSH      PRBON    string               enable Pointing device Rubber BandingP      PRI      boolean              Pointing Read Immediately returns coordinates;      RAW      boolean              drive device in RAW modeuF      RLS      boolean              Reissue Line Style before each line@      RMO      string               Replace text Mode On sequence:      ROT      boolean              ROTatable graphics text7      RTS      string      X        Rotate Text SequenceMV                                    X = angle of rotation in degrees (-360 <= X <= 360);      RSCPE    string               RaSter CoPy End sequencee=      RSCPS    string               RaSter CoPy Start sequenceiO      RSCSF    boolean              transmit RaSter Copy Source coordinate FirstoC      RSDST    string      XYZT     RaSter copy DeSTination sequences?                                    X,Y = destination coordinatemJ                                    Z,T = length,width of area to be copied>      RSSRC    string      XYZT     RaSter copy SouRCe sequence:                                    X,Y = source coordinateJ                                    Z,T = length,width of area to be copied2      SCS      string      X        Set Color Style3                                    X = new color ID 3      SFP      string      X        Set Fill Pattern :                                    X = new fill pattern ID1      SLS      string      X        Set Line Style 8                                    X = new line style ID6      SRM      string      X        Set video Read Mask8                                    X = channel read mask9      SSFP     string      X        Set Solid Fill Patternr:                                    X = new fill pattern ID7      SSLS     string      X        Set Solid Line StyleX8                                    X = new line style ID2      TTY      boolean              device is a TTY=      VLT      boolean              Video Lookup Table present 4      VTE      string      XYZT     Video Table Entry<                                    X = color ID of new entry8                                    Y = red/hue intensity@                                    Z = green/lightness intensity@                                    T = blue/saturation intensity@      VTI      numeric              Video Table maximum IntensityO      VTL      numeric              VLT Length expressed as number of bit planes           A Printed 9/3/83               6/21/83                            4             A MFBCAP(5)           UNIX Programmer's Manual            MFBCAP(5)       3      VWM      string      X        Video Write Maskl9                                    X = channel write mask ?      WPX      string      XY       Write PiXel at coordinate XY         A Sample Entryi  A      The following entry describes the HP 2648.  (This particularcA      2648 entry may be outdated, and is used as an example only.)         #*      # HP2648 with keyboard cursor control      #5      h0|H0|2648|HP2648|HP2648A|Hewlett-Packard 2648A, >               TTY, APT, MXC#719, MYC#359, MCL#2, MFP#8, MLS#2,               GTO, DFP, DLP,!               MPS=E*pa%X%d,%Y%dZ, &               DLT=E*pf%X%d,%Y%dZ, RLS,,               DBS=E*m3b%X%d,%Y%d,%Z%d,%T%dE,0               DSL=E*m1BE*pa%X%d,%Y%d,%Z%d,%T%dZ,+               DLS=E*pa%X%d,%Y%d,%Z%d,%T%dZ,R+               WPX=E*pa%X%d,%Y%d,%X%d,%Y%dZ,                 PLS=E*pa%X%d,%Y%d,               PLV=,%X%d,%Y%d,                PLE=,%X%d,%Y%dZ,$               LDL#1, LDF=E*m%Y%d 1C,3               GCS=E*d%X%+A%c$<#500>, GCH#11, GCW#7,n*               GFS=EHEJE*mRE*dlaeD$<#2500>,&               GIS=E*mRE*dlafC$<#3500>,%               GTE=E*dT, GTH#1, GTW#1,e%               GTS=E*pa%X%d,%Y%dZE*dS,                KYBRD, KYB=^H,*               KYS=E*pa%X%d,%Y%dZE*m4aE*dS,%               KYE=E*dT, KYX#1, KYY#1,                 SFP=E&f%X%+1%cE21,               SCS=E*m%X%+1%cA,               SLS=E*m2B,+               FDH#8, FDW#8, FDR, FDF= %Y%3, &               FDS=E&f1a%X%+1%ck36LE*m,               FDE=D$<#90>,)               POD, PDR=E*s4 21, PDS=E*dK, &               PRBON=E*dM, PRBOFF=E*dN,2               PDF=+%d,%X+%d,%Y%3%Z%c, PDE= 21E*dL,      M      Capabilities in _M_F_B_C_A_P are of three types: Boolean capabili- A      ties  which  indicate  that the terminal has some particular A      feature, numeric capabilities giving the size of the  termi- A      nal,  and string capabilities which give a sequence that cand7      be used to perform particular terminal operations.           A Printed 9/3/83               6/21/83                            5e            A MFBCAP(5)           UNIX Programmer's Manual            MFBCAP(5)             Types of Capabilities  A      All capabilities have an identifying  code.   For  instance,nA      because  the  HP2648  has  "accurately  positionable text" (IE      _i._e., graphics text may be positioned with lower left cornermA      at  any  pixel  on  the screen ) is indicated by the boolean A      APT.  Hence the description  of  the  HP2648  includes  APT.PA      Numeric  capabilities  are followed by the character `#' andgA      then the value.  Thus MXC which specifies the maximum  value A      of the X coordinate on the terminal viewport gives the valueP      `719' for the HP2648.  #      Formatting String Capabilitiesg  A      String variables have a formatting capability to be used for A      encoding  numbers  into  ASCII  strings  and  decoding ASCII2A      strings into numbers.  An example of the former is the capa-2A      bility  DBS  (  for  Draw  Box  Sequence ), which takes four A      numbers (X, Y, Z, and T) and generates the  proper  sequence A      to  draw a box from the lower left corner (X,Y) to the upperrA      right corner (Z,T).  An example of a string  decode  is  the A      capability  PDF  ( for Pointing Device Format ), which takes A      an ASCII string from the input stream and extracts  from  itiA      an  x and y coordinate, a key (if one was pushed) and a but- -      tonmask (if a cursor button was pushed).         String Formatting  A      The string variables have a formatting capability which usesnA      four  variables  (X,  Y,  Z,  and  T) to generate a formatedXU      string (with _M_F_B_G_e_n_C_o_d_e), or generates four variables (X, Y,tS      Z,  and T) from a formated string (with _M_F_B_D_e_c_o_d_e). Two tem- A      porary registers represented by the  letters  R  and  r  are A      available.   All  operations  begin with a percent sign `%',       and they are listed below:s  0      Com     Command Description encode/(decode)>      %X      set value/(X variable) to the X variable/(value).>      %Y      set value/(Y variable) to the Y variable/(value).>      %Z      set value/(Z variable) to the Z variable/(value).>      %T      set value/(T variable) to the T variable/(value).:      %C      set value to the current foreground color ID.6      %F      set value to the current fill pattern ID.4      %L      set value to the current line style ID.C      %d      output/(input) value in variable length decimal formatXJ      %2      output/(input) value converting to/(from) two decimal digits.L      %3      output/(input) value converting to/(from) three decimal digits.;      %c      output/(input) least significant byte of value                withoutconversions.7      %h1     output/(input) least significant four bits :              converting to/(from) one ASCII hex character.2      %h2     output/(input) least significant byte      A Printed 9/3/83               6/21/83                            6             A MFBCAP(5)           UNIX Programmer's Manual            MFBCAP(5)       ;              converting to/(from) two ASCII hex characters. 9      %h3     output/(input) least significant twelve bitsa=              converting to/(from) three ASCII hex characters.b:      %h4     output/(input) least significant sixteen bits<              converting to/(from) four ASCII hex characters.8      %o1     output/(input) least significant three bits<              converting to/(from) one ASCII octal character.6      %o2     output/(input) least significant six bits=              converting to/(from) two ASCII octal characters.d7      %o3     output/(input) least significant nine bits ?              converting to/(from) three ASCII octal characters. 9      %o4     output/(input) least significant twelve bitsc>              converting to/(from) four ASCII octal characters.:      %o5     output/(input) least significant fifteen bits>              converting to/(from) five ASCII octal characters.:      %o6     output/(input) least significant sixteen bits=              converting to/(from) six ASCII octal characters. 8      %t1     output/(input) X and Y in Tektronix format.8      %t2     output/(input) Z and T in Tektronix format.B      %t3     output X and R in Tektronix format (MFBGenCode only).B      %t4     output R and Y in Tektronix format (MFBGenCode only).B      %t5     output R and r in Tektronix format (MFBGenCode only).>      %ti     output/(input) value in Tektronix integer format.3      %tr     output value in Tektronix real format.d<      %R      store/(retrieve) value in temporary register 1.<      %r      store/(retrieve) value in temporary register 2.      %+x     add x to value.#      %-x     subtract x from value.e!      %*x     multiply value by x.b      %/x     divide value by x. )      %>>x    shift value right by x bits.u(      %<<x    shift value left by x bits.      %|x     OR x with value.       %&x     AND x with value.      %^x     EOR x with value."      %=x     set value equal to x.8      %ax     set value equal to the absolute value of x.1      %~      Complement value ( 1's complement ).o>      %@      output a single null character (MFBGenCode only).      %%      gives `%`.t8      %B      BCD (2 decimal digits encoded in one byte).(      %D      Delta Data (backwards bcd).                Where x can be:  D      (1)     One byte - the numeric value of this byte is used as x.  I      (2)     The character "#" followed by a decimal integer value for x.3  M      (3)     The character "%" followed by C, F, L, X, Y, Z, T, r, or R - the :              value of C, F, L, X, Y, Z, T, r or R is used.        A Printed 9/3/83               6/21/83                            7X            A MFBCAP(5)           UNIX Programmer's Manual            MFBCAP(5)*      Q      The command formats are similar to those found in _t_e_r_m_c_a_p(_5) S      or  _t_e_r_m_i_n_f_o(_5),  but  are  more complicated due to the moreF1      rigorous requirements of graphics terminals.         Preparing Descriptions   M      We now outline how to prepare _M_F_B_C_A_P descriptions of  graph- A      ics terminals.  The most effective way to prepare a terminallA      description is to build up a  description  gradually,  using I      partial  descriptions  with  simple  _m_f_b(_3) test routines toaA      check that they are correct.  Be aware that a  very  unusuallA      terminal  may  expose  deficiencies  in  the  ability of the M      _M_F_B_C_A_P file to describe it.  To easily test a  new  terminal A      description you can set the environment variable MFBCAP to a5A      pathname of a file containing the description you are  work- A      ing on.  After setting the environment variable, any programnS      that uses _m_f_b(_3), _e._g.,  _k_i_c,  will  look  at  the  pathname A      defined    by    the   environment   variable   instead   of -      ~_c_a_d/_l_i_b/_m_f_b_c_a_p.e        Delaysd  A      Delays may be embedded anywhere in a string  capability  andiA      is  distinguished by the $< and > brackets.  The number con- A      tained within these brackets describes  the  delay  in  mil-IA      liseconds  to  be  generated  and  must conform to the abovewE      description for the variable 'x' ( _e._g., an integer constantsA      must  be preceded by the character "#").  Before each delay, "      the output buffer is flushed.        Basic Capabilities%  A      The number of pixels on a horizontal row of the  display  iseA      given  by the MXC numeric capability, and the number of pix-uA      els in a vertical column is given  by  the  MXY  capability. A      The  number  of colors available on the display is specifiedCA      by the MCL capability.  For black and white terminals,  suchiA      as  the  HP2648,  the MCL capability is defined as two.  The.A      maximum number of stipple fill patterns and line  styles  ise@      given by the MFP and MLS numeric capabilities respectively.  A      Off screen memory refers to an area of the viewport in pixelcA      coordinates  which is not displayed.  The lower, left corner A      of the off screen memory is specified by the OFFMX and OFFMYeA      numeric  capabilities.   The  horizontal  length  of the off A      screen memory is specified by the OFFDX numeric  capability,PA      and the vertical width of the off screen memory is specified_%      by the OFFDY numeric capability.t  M      _M_F_B_C_A_P allows two sequences for initializing and  uninitial-gA      izing the terminal.  The first initialization string sent topA      the terminal is given by the GIS format string.   This  willc      A Printed 9/3/83               6/21/83                            8a            A MFBCAP(5)           UNIX Programmer's Manual            MFBCAP(5)n      A      be  the  first  sequence  sent  to the graphics device.  ThesA      graphics finish/termination string is given by the GFS  for-sA      mat  string.   This  will  be  the last sequence sent to the       graphics device._  A      The initialization character  sequences  for  color  styles,sA      fill styles, and line styles are defined respectively by thet&      ICS, IFP, and ILS format strings.  A      The sequence to ring the terminals bell or alarm is  definedb2      by the BELL string and defaults to control-G.        Setting Colors and Styles  A      The character sequence for setting  the  current  foreground A      color  is  defined by the SCS format string.  All subsequent A      geometries will be drawn in this color.  The format for set-aA      ting  the  current  line  style  is  given by the SLS format A      string, and the format for setting the current fill style isaA      given  by  the  SFP  format  string.   All subsequent lines,tM      boxes, and polygons will be drawn with these styles.  _M_F_B_C_A_PtA      assumes  that  style zero defines a solid line and fill pat-lA      tern.  If this is  not  the  case  for  a  particular  frame%A      buffer, or the format for setting a solid line or fill styleiA      is inconsistent with that for other line styles, such as  isiA      the  case  for  the HP9872, a character sequence for setting A      the solid line or fill style is defined by the SSLS and SSFPnA      format  strings  respectively.   If  it is necessary for thecA      current line style to be reissued before a line is drawn (aslA      is  the  case for the HP 2648), then the RLS boolean must bet-      present in the _M_F_B_C_A_P entry.c        Basic Geometries   A      The character sequence for moving the current graphics posi-oA      tion  to a x,y pixel coordinate is defined by the MPS formatnA      string.  The format for drawing a line in the  current  linetA      style  from  the  current  graphics  position to a x,y pixel A      coordinate is defined by the DLT format string.  The charac-aA      ter sequence to draw a line in the current line style from aaA      x,y pixel coordinate to a z,t pixel coordinate is defined byaA      the  DLS  format string.  If the command for drawing a solidxA      line is different from that for a non-solid line, the  char-tA      acter sequence to draw a solid line from a x,y pixel coordi- A      nate to a z,t pixel coordinate may be  defined  by  the  DSLxA      string capability.  The format for drawing a solid line fromxA      the current graphics position to a x,y pixel  coordinate  is%'      defined by the DSLT format string.   A      The sequence for drawing a box  in  the  current  foreground A      color  from the lower left x,y pixel coordinate to the upper A      right z,t pixel coordinate is specified by  the  DBS  formats      A Printed 9/3/83               6/21/83                            9b            A MFBCAP(5)           UNIX Programmer's Manual            MFBCAP(5)y      A      string.  Because some terminals, such as the Tektronix 4113,cA      have special raster commands for drawing solid boxes, a for-fA      mat for drawing solid boxes may be specified by the DSB for-u      mat string.  A      The format for setting a pixel in the current color  at  thew>      x,y pixel coordinate is defined by the WPX format string.  A      The format for drawing a circle with its center at  the  x,yyA      pixel  coordinate and having a radius of z pixels is definedl      by the DCS format string.  A      The format for clearing the entire  screen  to  the  current A      color  is  given  by  the GCS format string.  If there is nofA      such command sequence, it may be substituted by the  commandoA      sequence  that  will  write a solid box in the current colors      over the entire screen.  A      There are three format strings for defining  the  terminal'ssA      polygon  command  sequence.  First the PLS starting sequencebA      is used to define x,y as the first of z  pixel  coordinates.iA      This  character sequence will be followed by z-1 occurrences A      of the PLV format string which defines  the  remaining  ver- A      tices  of  the  polygonal path.  Finally, an ending sequencecA      that is defined by the  PLE  format  string  terminates  thegA      polygon  sequence.   For  terminals  which have inconsistentiA      formats for drawing solid polygons, the PLSOL  sequence  mayaA      be  used  in  place of the PLS sequence.  If the terminal isiA      capable of drawing a filled polygon in the current fill pat- M      tern,  then  the  FPOLY  boolean should appear in the _M_F_B_C_A_Pi      entry.         Video Layer Table  A      If the terminal has  a  video  layer  table,  then  the  VLTtY      boolean must be present in the _M_F_B_C_A_P entry.  _M_F_B_C_A_P assumesdA      that the VLT uses the  red-green-blue  system  for  defining A      colors.   If  the  HLS boolean capability is specified, theniA      the  RGB  arguments  become  HLS  (hue-lightness-saturation) A      values.  The maximum intensity of red, green, or blue in theeA      VLT (or the lightness or saturation if using the HLS system) A      is given by the VTI numeric capability.  The format for set- A      ting a particular entry of the VLT is given by the VTE  for- A      mat string.  The VTL numeric value can be used to define the <      length of the VLT in terms of the number of bit planes.        Defining Styles  A      The  LDS  string  capability  defines   the   sequence   for A      (re)defining  a  line  style  corresponding  to a particular A      style ID.  The LDF format string is used to define an  eight A      bit mask that represents the new line style.  The LDE format       A Printed 9/3/83               6/21/83                           10l            A MFBCAP(5)           UNIX Programmer's Manual            MFBCAP(5)r      <      string terminates the definition of the new line style.  A      The definition of a new fill  pattern  is  more  complicated A      than  is  the  case  for  line  styles.   It is necessary to A      transform an eight by eight intensity  array  into  whateveriA      command  syntax is required by the terminal.  The FDS string_A      capability is used to begin the  (re)definition  of  a  fill A      pattern.  The FDF format string defines one row or column of A      the fill pattern using an eight bit mask  (one  row  of  the A      eight  by  eight  intensity  array).   If the FDR boolean is A      present, then it is assumed that the fill pattern  is  being A      defined  by  rows  in which case the FDF sequence is sent by A      the number of times defined by the FDH  numeric  capability.gA      Otherwise, it is assumed that the fill pattern is defined bytA      columns, and the FDF sequence is sent by the number of timeszA      defined by the FDW numeric capability.  If, for example, the A      number of rows in the fill pattern is ten, the FDF  sequencedA      is  first  transmitted  using  each of the eight rows of thelA      initial  eight  by  eight  intensity  array,  and  then  thetA      sequence  is  sent  twice using the first and second rows ofeA      the initial intensity array.  The  FDE  format  string  ter- 4      minates the definition of the new fill pattern.        Raster Capabilities  A      There are four format strings for  defining  the  terminal's A      raster  copy  command  sequence.   First  the RSCPS starting A      sequence is used to begin the  raster  copy  command.   This A      character  sequence will be followed the RSSRC format stringrA      which defines the lower,  left  coordinate  and  length  and A      width  of  the source area and the RSDST format string whichoA      defines the lower left coordinate and the length  and  widthcA      of  the  destination area.  The RSSRC sequence appears firsthA      only if the RSCSF boolean is defined.   Finally,  an  endingtA      sequence  that  is  defined  by the RSCPE format string ter- &      minates the raster copy sequence.        Graphic Texts  M      _M_F_B_C_A_P supports a single font graphic text.  The height  and A      width of the text font are given respectively by the GCH and A      GCW numeric capabilities.  Graphics text is  displayed  with A      three  format strings.  A text string with z characters with A      a lower left justification at the x,y  pixel  coordinate  is A      begun  with  the format string defined by GTS.  This will betA      followed by the transmission of the z  characters  and  ter-sA      minated  by  the  format string defined by GTE.  The graphic A      text can offset from the current graphics position  by  set-rA      ting  the  numeric  capabilities GTH and GTW.  The followingnA      figure demonstrates the assumed character font for  the  twoiA      characters  "gh".   The  character  "0" marks a pixel in theoA      character font, and the character "X" marks  the  x,y  pixel       A Printed 9/3/83               6/21/83                           11F            A MFBCAP(5)           UNIX Programmer's Manual            MFBCAP(5)n      A      coordinate  to  which  the  two  characters where justified. A      Note that the GCH, GCW, GTH, and  GTW  numeric  capabilities *      must always be non-negative integers.  :                          _    . . . . . .      0 . . . . .:                          |    .         .      0         .:                          |    .         .      0         .:                          |    . 0 0 0 0 .      0 0 0 0   .:                          |    0         0      0       0 .:                          |    0         0      0         0:                  _     GCH    0         0      0         0:                  |       |    X 0 0 0 0 0      0         0:                  |       |    .         0      .         .:                GTH       |    .         0      .         .:                  |       |    0         0      .         .:                  |       |    . 0 0 0 0 .      . . . . . .                  -       -0                               | -GCW- | -GTW-  |      A      If the terminal supports rotatable graphic  text,  then  thetM      ROT boolean is present in the _M_F_B_C_A_P entry.  If rotated text A      is desired the RTS character sequence is issued prior to therA      the  GTS sequence and defines a rotation of x degrees, where       x is between -360 and 360.h  M      _M_F_B_C_A_P supports two graphic text modes.  If the graphic textaA      can  be  destructive, then the GTR boolean is present in theeM      _M_F_B_C_A_P entry, and the RMO format string specifies the  char-TA      acter  sequence  for  entering  the destructive graphic textoA      mode.  If the terminal has graphic text that can overstrike,tM      then the GTO boolean is present in the _M_F_B_C_A_P entry, and thenA      OMO format string defines the character sequence for  enter-u,      ing the overstriking graphic text mode.        Keyboard Controli  A      For  terminals  with  special  keyboard/cursor   operations,eM      _M_F_B_C_A_P provides a set of string capabilities for controllinglA      keyboard  input.   The  keyboard  is  initialized,  and  theaA      current  graphics position is moved to the x,y pixel coordi-dA      nate by the KYS format string.  The current  graphics  posi- A      tion  can  be offset upward from the above x,y pixel coordi-A      nate by setting values to the KYX and KYY numeric  capabili-eA      ties.  The keyboard backspace sequence is defined by the KYBLA      format string (the is NO default for  the  backspace  format A      string).   The  keyboard  is uninitialized by the KYE format       string.  A      If the terminal does not have the above capabilities, a key-iI      board  input  routine,  such as that used in _m_f_b(_3), can use       A Printed 9/3/83               6/21/83                           12             A MFBCAP(5)           UNIX Programmer's Manual            MFBCAP(5)a      A      the terminals graphic text  capabilities  to  echo  keyboardt"      characters on a command line.        Pointing Device.T  A      If the terminal has a pointing device, then the POD  boolean M      is  present in the _M_F_B_C_A_P entry.  If the pointing device has A      buttons, then the PDB boolean is set, the number of  buttonswA      is  given  by  the  NPB  numeric  capability, and the valueswA      returned by the respective buttons of  the  pointing  device >      are defined by the BU1 through BU12 numeric capabilities.  A      The graphics pointing device is  initialized  with  the  PDS A      format string.  The PDR format string places the terminal inrA      a waiting mode until the first  graphic  input.   When  this_A      event occurs, the locator event is decoded by the PDF formatcA      string.  The graphic pointing device is uninitialized by thef      PDE format string.e  A      If the PRI boolean is set, one character is read immediatelyA      after  the  pointing  device initialization sequence PDS and A      before the pointing device is enabled by PDR.  This is  use-A      ful  for  terminals  that  have  a  cursor  and can read itsTA      current position but do not have the capability of a graphicoE      event  (  _i._e., an x,y pixel coordinate that is read immedi- <      ately after a key or button is pushed on the terminal).  A      The pointing device encoding format string PDF  must  assume A      that  the pointing device will send one signature character.KA      After the pointing is activated by the  PDR  format  string,rA      the  first  character  transmitted from the terminal must begA      identical to the first character of the PDF  format  string.rS      If  the  characters do not match, then the _M_F_B_D_e_c_o_d_e routineiI      used by _m_f_b(_3) will return  the  first  character  that  waso!      transmitted by the terminal.a  A      The PRBON string capability defines the  character  sequencetA      to  enable rubber banding of the pointing device, and PRBOFFaM      disables the rubber banding. _M_F_B_C_A_P assumes that the  centertA      of  rubber banding is the current graphics position that cani7      be defined by the MPS format string defined above.n        Special Modes  A      If the graphics device is to be handled as a TTY,  then  the M      TTY  boolean  must  be  present in the _M_F_B_C_A_P entry.  If the A      graphics encoding can produce 8  bit,  nonASCII  characters,oA      then the 8BB boolean must be included.  If the graphics dev-aG      ice is a TTY and is to be driven in a _R_A_W mode, then the RAWdI      boolean  must be included.  See the manual for _t_t_y(_4). Typi-iA      cally, this mode is used only if the device has no keyboard._        A Printed 9/3/83               6/21/83                           13i            A MFBCAP(5)           UNIX Programmer's Manual            MFBCAP(5)t      M      _M_F_B_C_A_P supports four ALU writing modes.  These are the modes A      in  which  a  pixel  is updated when written over.  The fourlA      possible modes are JAM (replace mode),  OR,  EOR,  and  NOR.tA      The  sequences  for  setting  these modes are ALUJAM, ALUOR,p%      ALUEOR, and ALUNOR respectively.r        Similar Terminals  A      If there are two very similar terminals, one can be  definedwA      as  being  like  the other but with certain exceptions.  The A      string capability MCE is given with the name of the  similar A      terminal.   The  MCE  must be the last capability defined iniA      the entry, and the combined length of the two  entries  must G      not  exceed  4096 characters.  Because _m_f_b routines scan the A      entry from left to right,  and  because  the  MCE  entry  iscA      replaced  by the corresponding entry, the capabilities given A      on the left override identical capabilities defined for  the A      similar  terminal.   This  is  useful for defining different A      modes for a terminal, or for defining  terminals  with  dif-       ferent peripherals.     FILES A      ~cad/lib/mfbcap         file  containing  terminal  descrip- 
      tions   SEE ALSO"      termcap(5), mfb(3), kic(CAD1)   AUTHOR      Giles Billingsley   BUGSA      The total length of a single entry (excluding  only  escaped $      new lines) may not exceed 8192.  A      There is a restriction that allows a  simple  parser  to  be M      used  for the _M_F_B_C_A_P file.  The delimiter is assumed to be a.A      comma that is not immediately preceded by a slash (\)  char- A      acter.   String  capabilities  that  terminate  with a slashnA      character (as is the case  for  the  vt125)  must  thereforeTA      separate the delimiting comma and the slash character with an      padding character.n  A      Not all programs support all  entries.   There  are  entriesy)      that may not be used by any program.                   A Printed 9/3/83               6/21/83                           14       