home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / communic / ansi_bbs / ansi.txt < prev    next >
Encoding:
Text File  |  1992-01-05  |  9.6 KB  |  235 lines

  1.                               ANSI.LIB
  2.  
  3.                          Copyright (c) 1992
  4.  
  5.                          Asgard Software
  6.  
  7.  
  8.                             ^           ▄     ▄▄▄▄   ▄▄▄     ▄    ▄▄▄▄   ▄▄▄▄
  9.                            ▄█▄         █▀█   █▀▀▀█  █▀▀▀█   █▀█   █▀▀▀█░ █▀▀▀█
  10.        ^           ^       █▄█        █░  █░ █░     █░  █░ █░  █░ █░  █░ █░  █░
  11.       ▄▀▄   ^     ▄▀▄      █▄█        █▄▄▄█░ █████░ █░     █▄▄▄█░ █████  █░  █░
  12.       ███  █▀█    █▀█    ^ █▄█        █░  █░     █░ █░ ▀█░ █░  █░ █░ █░  █░  █░
  13.     ▐▀███▀███▀██▀██▀██▀▀██▀██▀██▀▌    █░  █░ █▄▄▄█░ █▄▄▄█░ █░  █░ █░  █░ █▄▄▄█░
  14.     ▐▄███▄███▄██▄██▄██··██▄██▄██▄▌    ▀   ▀  ▀▀▀▀▀  ▀▀▀▀▀  ▀   ▀  ▀   ▀  ▀▀▀▀
  15.  ▒▒▓▓▓████████████████████████▓▓▒▒▒░░
  16. ░▒▒▒▒▓▓▓▓████████████████████▓▓▓▓▓▒▒▒▒▒░       Software       B. B. S.
  17. ░▒▒▒▒▓▓▓▓▓▓███████████████▓████▓▓▓▒▒▒▒▒░░░
  18. ░░░▒▒▒▒▒▒▓▓▓▓▓███████████▓▓▓▓████▒▒▒▒░░░           1:271/15@fidonet
  19.    ░░░░░▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒████                21:100/0@taconet
  20.            ░░░░░░░░▒▒▒▒░░░░░░░░  ████              (804) 485-8803
  21.                                    ████            300/1200/2400 baud
  22.                                      ████
  23.         Jim Sloan                      ████
  24.         911 Bowden Ave.                  ████
  25.         Chesapeake, VA 23323               ████
  26.         (804) 485-7309                        ████       O   (Odin Awaits)
  27.                                                ████     ▀█▀
  28.                                                  ████   ▐ ▌
  29. ███████████████████████████████████████████████████████████████████████████████
  30. ███████████████████████████████████████████████████████████████████████████████
  31.  
  32.  
  33.                          Table Of Contents
  34.  
  35.           I.  Legal Stuff
  36.  
  37.          II.  Use of ANSI.LIB
  38.                A.  Functions
  39.                B.  External variables
  40.  
  41.         III.  Registration and Support
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.           I.  Legal Stuff
  54.  
  55.                Information in this document is subject to change without
  56.                notice and does not represent a commitment on the part of
  57.                Asgard Software.  The software described in this document
  58.                may be used and distributed freely.  No renumeration may
  59.                be charged without first contacting the author at the
  60.                above address.  The software described in this document
  61.                and this document are Copyright Asgard Software, 1992.
  62.                All rights reserved.  Any use of this library requires a
  63.                copyright statement specifying portions of the code are
  64.                copyright Asgard Software, 1992.  All rights reserved.
  65.  
  66.          II. Use of ANSI.LIB
  67.  
  68.                ANSI.LIB currently will handle the most frequently used
  69.                ANSI X3.64 terminal escape sequences used on BBS's.
  70.                These include:
  71.                     Cursor Backward Tab                ESC [ Pn Z
  72.                     Cursor Horizontal Tab              ESC [ Pn I
  73.                     Cursor Backward                    ESC [ Pn D
  74.                     Cursor Down                        ESC [ Pn B
  75.                     Cursor Forward                     ESC [ Pn C
  76.                     Cursor Position                    ESC [ Pn ; Pn H
  77.                     Cursor Up                          ESC [ Pn A
  78.                     Delete Line                        ESC [ Pn M
  79.                     Device Status Report (Detect ANSI) ESC [ 6 n
  80.                     Erase in Display (Clear Screen)    ESC [ Pn J
  81.                     Erase in Line                      ESC [ Pn K
  82.                     Horizontal & Vertical Position     ESC [ Pn ; Pn f
  83.                     Insert Line                        ESC [ Pn L
  84.                     Scroll Down                        ESC [ Pn T
  85.                     Scroll Up                          ESC [ Pn S
  86.                     Set Graphics Rendition             ESC [ Ps m
  87.  
  88.                All functions necessary to use ANSI.LIB are prototyped in
  89.                ANSI.H and explained here.
  90.  
  91.  
  92.                A.  Functions
  93.  
  94.                     int ansi_cmd(int ch)
  95.  
  96.                          This function is the heart of ANSI.LIB.  All
  97.                          ANSI sequences are handled through this
  98.                          function.
  99.  
  100.                          ansi_cmd will return true if it requires more
  101.                          characters to finish it's current sequence
  102.                          after processing the character ch.
  103.  
  104.                     void cls(int top_row, int left_column, int bottom_row,
  105.                               int right_column, int attribute);
  106.  
  107.                          This function will clear a portion of the
  108.                          screen set forth in it's parameters to the
  109.                          attribute specified.  All screen parameters are
  110.                          zero based, ie. uppermost row on screen is 0
  111.                          and leftmost column is 0.
  112.  
  113.                     void pos_curs(int row, int column)
  114.  
  115.                          This function will position the cursor to the
  116.                          specified coordinates.  Row and column are zero
  117.                          based.
  118.  
  119.                     void scroll_up(int top_row, int left_column,
  120.                               int bottom_row, int right_column,
  121.                               int number_of_rows, int attribute)
  122.  
  123.                          This function will scroll a portion of the
  124.                          screen up as specified in the parameters.
  125.                          Screen parameters are zero based as above in
  126.                          cls.
  127.  
  128.                     void scroll_dn(int top_row, int left_column,
  129.                               int bottom_row, int right_column,
  130.                               int number_of_rows, int attribute)
  131.  
  132.                          This function will scroll a portion of the
  133.                          screen down as specified in the parameters.
  134.                          Screen parameters are zero based as above in
  135.                          cls.
  136.  
  137.                     void (*send_out)(char *)
  138.  
  139.                          This is a pointer to a function that will
  140.                          process any outgoing string that is required in
  141.                          response to an ANSI sequence, ie. Device Status
  142.                          Report.  This should point to a function that
  143.                          will handle this array.
  144.  
  145.                     void write_char(int ch, int attr)
  146.  
  147.                          This function will write to the screen the
  148.                          character specified at the attribute specified.
  149.                          ANSI attribute as set by Set Graphics Rendition
  150.                          sequence would be attr.color and will be
  151.                          discussed in the following section on external
  152.                          variables.
  153.  
  154.                B.  External Variables
  155.  
  156.                     union ATTR attr
  157.  
  158.                          This is for declaration only.  Used internally
  159.                          by ANSI.LIB.
  160.  
  161.                     struct attr_bits
  162.  
  163.                          This is for decleration only.  Used internally
  164.                          by ANSI.LIB
  165.  
  166.                     attr.color
  167.  
  168.                          This is the attribute color set by the Set
  169.                          Graphics Rendition sequence.  This should be
  170.                          used when writing out characters to video using
  171.                          write_char.
  172.  
  173.                     bottom_row
  174.  
  175.                          This is the bottom most row on your video
  176.                          screen (zero based).  Default is 24.
  177.  
  178.                     fast_video
  179.  
  180.                          If this is set to 0, BIOS screen calls will be
  181.                          used to write to the video.  If set to 1, then
  182.                          video memory will be written to directly.
  183.                          Default is 0.
  184.  
  185.                     left_margin
  186.  
  187.                          This is the left most column of the video
  188.                          screen (zero based).  Default is 0.
  189.  
  190.                     right_margin
  191.  
  192.                          This is the right most column of the video
  193.                          screen (zero based).  Defualt is 79.
  194.  
  195.                     top_row
  196.  
  197.                          This is the upper most row of the video screen
  198.                          (zero based).  Default is 0.
  199.  
  200.  
  201.  
  202.         III.  Registration and Support
  203.  
  204.                The library supplied is compiled in medium model for
  205.                Microsoft C 5.x and above.
  206.  
  207.  
  208.                Registration is only $25US and you will recieve full
  209.                source for the library and free updates.  Please
  210.                send registration to:
  211.  
  212.                               Asgard Software
  213.                               c/o Jim Sloan
  214.                               911 Bowden Ave.
  215.                               Chesapeake, VA 23323
  216.  
  217.                Voice support is available on your dime at (804)485-7309.
  218.                Support is also available via
  219.  
  220.                               Asgard Software BBS
  221.                               (804)485-8803
  222.                               1:271/15@fidonet
  223.                               21:100/3@taconet
  224.  
  225.                     and through these other fine BBS's
  226.  
  227.                               Paula Abdul BBS
  228.                               (804)484-0348
  229.                               1:271/55@fidonet
  230.  
  231.                               Cyberpunk Imagery
  232.                               (804)498-7429
  233.                               1:271/25@fidonet
  234.                               21:100/0@taconet
  235.