ansi.icn: Procedures for ANSI-based terminal control

link ansi
August 14, 1996; Ralph E. Griswold and Richard Goerwitz
This file is in the public domain.

   This package of procedures implements a subset of the ANSI terminal
control sequences.  The names of the procedures are taken directly from
the ANSI names.  If it is necessary to use these routines with non-ANSI
devices, link in iolib.icn, and (optionally) iscreen.icn as well.  Use
will be made of whatever routines are made available via either of these
libraries.  Be careful of naming conflicts if you link in iscreen.icn.
It contains procedures like "clear" and "boldface."

      CUB(i)         Moves the cursor left i columns
      CUD(i)         Moves the cursor down i rows
      CUF(i)         Moves the cursor right i columns
      CUP(i,j)       Moves the cursor to row i, column j
      CUU(i)         Moves the cursor up i rows
      ED(i)          Erases screen: i = 0, cursor to end; i = 1,
                        beginning to cursor; i = 2, all (default 2)
      EL(i)          Erases data in cursor row: i = 0, cursor to
                        end; i = 1, beginning to cursor; i = 2, all
                        (default 0)
      SGR(i)         Sets video attributes: 0 = off; 1 = bold; 4 =
                        underscore; 5 = blink; 7 = reverse (default
                        0)

   Note that not all so-called ANSI terminals support every ANSI
screen control sequence - not even the limited subset included in
this file.

   If you plan on using these routines with non-ANSI magic-cookie
terminals (e.g. a Wyse-50) then it is strongly recommended that you
link in iolib or itlib *and* iscreen (not just iolib or itlib by
itself).  The routines WILL WORK with most magic cookie terminals;
they just don't always get all the modes displayed (because they
are basically too busy erasing the cookies).

Source code | Program Library Page | Icon Home Page