home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / ansisys / optans10 / optansi.ref < prev    next >
Encoding:
Text File  |  1992-06-14  |  11.4 KB  |  226 lines

  1. *******************************************************************************
  2.  
  3.                                OptANSI Library
  4.                                  version 1.0
  5.                          Copyright 1992 Michael Dannov
  6.  
  7.                   Optimizing ANSI Output Library for Borland C
  8.  
  9. *******************************************************************************
  10.                                QUICK REFERENCE
  11. *INCLUDE FILES*
  12. --FILENAME----USAGE/INFORMATION-----------------------------------------------
  13.   OPTANSI.H   Use in all applications and functions that use OptANSI functions
  14.               Declares macros, prototypes, and some structures
  15.   AUSER.H     Use if you prefer to use OptANSI functions as procedures instead
  16.               of functions that return a string, make sure to modify the macro
  17.               aout() to call an output function of your choice
  18.  
  19.  
  20. *GLOBAL VARIABLES*
  21. --VARIABLE---TYPE---DESCRIPTION-----------------------------------------------
  22.   acurattr   char   Current color
  23.   axpos      char   Current x position on screen
  24.   aypos      char   Current y position on screen
  25.   ashortcuts char   Flags for available ANSI shortcuts/behavior
  26.   astr      char15  Buffer area for ANSI result string
  27.  
  28.  
  29. *MACRO VALUES*
  30. --MACRO--VAL--NOTES-----------------------------------------------------------
  31.   ESC    27
  32.  
  33. ashotcuts macros
  34. --MACRO--BIT--RULES-----------------------------------------------------------
  35.   aBKSP   1   True if backspace (char 8, ^H) is nondestructive
  36.   aLF     2   True if linefeed (char 10, ^J) moves cursor down only, if
  37.               false, assumes LF is equivalent to CR/LF combination
  38.   aCR     4   True if carriage return (char 13, ^M) moves the cursor to
  39.               left margin on the same line only
  40.   aCLRSCR 8   True if clear screen (char 12, ^L) clears the entire screen
  41.               to the current color, Telix requires this true
  42.   aRESET  64  True if reset color (ESC[m) resets the color to lightgray on
  43.               black (7), almost always true, QModem might require this true
  44.   aNANSI  128 True if you want to use NANSI or FANSI extensions.
  45.  
  46. Colors
  47. --MACRO-------VAL--DESCRIPTION------------------------------------------------
  48.   BLACK        0   Dark colors
  49.   BLUE         1
  50.   GREEN        2
  51.   CYAN         3
  52.   RED          4
  53.   MAGENTA      5
  54.   BROWN        6
  55.   LIGHTGRAY    7
  56.   DARKGRAY     8   Light colors
  57.   LIGHTBLUE    9
  58.   LIGHTGREEN   10
  59.   LIGHTCYAN    11
  60.   LIGHTRED     12
  61.   LIGHTMAGENTA 13
  62.   YELLOW       14
  63.   WHITE        15
  64.   HIGHLIGHT    8   Add to Highlight Dark Colors Only
  65.   BLINK        128 Add to Blink any color
  66.  
  67. setmodes
  68. --MACRO--------VAL--NOTES-----------------------------------------------------
  69.   BW40          0   Text 40x25, 16 colors  (ANSI colors override B&W modes)
  70.   C40           1   Text 40x25, 16 colors
  71.   BW80          2   Text 80x25, 16 colors  (ANSI colors override B&W modes)
  72.   C80           3   Text 80x25, 16 colors
  73.   G320_200      4   Graphics 320x200, 4 colors
  74.   G320_200GR    5   Graphics 320x200, 4 grey colors
  75.   G640_200BW    6   Graphics 640x200, 2 colors - black & white
  76.   G320_200V     13  Graphics 320x200, 16 colors, (VGA)
  77.   G640_200V     14  Graphics 640x200, 16 colors, (VGA)
  78.   G640_350V     16  Graphics 640x350, 16 colors, (VGA)
  79.   G640_480BWV   17  Graphics 640x480, 2 colors - black & white, (VGA)
  80.   G640_480V     18  Graphics 640x480, 16 colors, (VGA)
  81.   G300_200V     19  Graphics 300x200, 256 colors, (VGA)
  82.   ROWS43        43  Switch to 43 row mode, NANSI ONLY
  83.   ROWS50        50  Switch to 50 row mode, NANSI ONLY
  84.   aCURSORWRAP   7   Changes cursorwrap variables
  85.   aBIOSTTY      97  Changes bios or writetty mode, NANSI ONLY
  86.   aWRITE_TTY    97  same as above
  87.   aBIOSTTY      97  same as above
  88.   aFASTSCROLL   98  Changes to fast scroll mode, NANSI ONLY
  89.   aGRAPHICSCURSOR 99 Changes graphics cursor, NANSI ONLY
  90.  
  91.  
  92.  
  93. *FUNCTIONS*
  94. --FUNCTION DECLARATION | DESCRIPTION------------------------CATAGORY/NOTES----
  95.  
  96.   char *ablink()                                            COLOR
  97.     Set blink bit of current color
  98.   char *aclrbol()                                           MISC / NONSTD
  99.     Clear line from cursor to beginning of line
  100.   char *aclreol()                                           MISC
  101.     Clears the line from the cursor to the end of the line
  102.   char *aclrline()                                          MISC / NONSTD
  103.     Clears entire line
  104.   char *aclrscr()                                           MISC
  105.     Clears the screen and homes the cursor
  106.   char *aclrscrabove()                                      MISC / NONSTD
  107.     Clears screen above and left of cursor position
  108.   char *aclrscrbelow()                                      MISC / NONSTD
  109.     Clears screen below and right of cursor position
  110.   char *acmd(char num, char cmd)                            MISC
  111.     Creates a universal ANSI string based on its parameters
  112.   char *acolor(char nc)                                     COLOR
  113.     Change current color/attribute
  114.   char *acursorwrap()                                       MISC
  115.     Turns cursorwrap on
  116.   char *adelchar(char x)                                    MISC / NONSTD
  117.     Deletes characters starting at cursor
  118.   char *adelline(char y)                                    MISC / NONSTD
  119.     Delete lines starting at current
  120.   char *adim()                                              COLOR
  121.     Clear highlight bit of current color
  122.   char *adown(char y)                                       LOCATE
  123.     Move the cursor down y positions
  124.   char *aforcecolor(char nc)                                COLOR
  125.     Forces color to new color value ignoring optimizations
  126.   char *aforcegotoxy(char x, char y)                        LOCATE
  127.     Forces location of the cursor to new x and y ignoring optimizations
  128.   char *agotoxy(char x, char y)                             LOCATE
  129.     Locates the cursor to new x and y location
  130.   char *ahighlight()                                        COLOR
  131.     Set highlight bit of current color
  132.   char *ahighvideo()                                        COLOR
  133.     Set highlight bit of current color
  134.   char *ahome()                                             LOCATE
  135.     Move cursor to top left corner of screen: 1, 1
  136.   int ainit()                                               MISC 
  137.     Initialize OptANSI functions and variables
  138.   char *ainschar(char x)                                    MISC / NONSTD
  139.     Insert chars starting at cursor
  140.   char *ainsline(char y)                                    MISC / NONSTD
  141.     Insert a line before the current line
  142.   char *ainvisible(equation)                                COLOR / NONSTD
  143.     Set current color to a color defined by invisible command
  144.   char *akeyboard(int key, char *str, char *buf)            MISC
  145.     Reassign keyboard keys
  146.   char *aleft(char x)                                       LOCATE
  147.     Move the cursor left x positions
  148.   char *alowvideo()                                         COLOR
  149.     Clear highlight bit of current color
  150.   char *amode(int mode, char cmd)                           MISC
  151.     Function for use with asetmode and aresetmode
  152.   char *anoblink()                                          COLOR
  153.     Clear blink bit of current color
  154.   char *anocursorwrap()                                     MISC
  155.     Turns cursorwrap off
  156.   char *anohighlight()                                      COLOR
  157.     Clear highlight bit of current color
  158.   char *anoinvisible(equation)                              COLOR / NANSI
  159.     Turn invisible off
  160.   char *anormvideo()                                        COLOR
  161.     Clear highlight bit of current color
  162.   anotshort(char nflags)                                    INIT
  163.     Define ashortcuts = all flags on except nflags
  164.   char *aresetcolor()                                       COLOR
  165.     Sets color to reset color, white on black (7)
  166.   char *aresetmode(int mode)                                MISC
  167.     Resets mode to an ANSI defined mode or changes display rules
  168.   char *arestorecursor()                                    LOCATE
  169.     Restore cursor position to saved position
  170.   int aresult(char *str)                                    MISC
  171.     Test result string returned from atest or atest1, if true ANSI present
  172.   int aresult1()                                            MISC / DOS MODE
  173.     Reads standard output then tests the string for expected ANSI result
  174.     string returned from atest1, should follow atest1
  175.   int aresult2()                                            MISC / DOS MODE
  176.     Tests for ANSI presence by checking the interrupts, does not require atest
  177.   char *areverse(equation)                                  COLOR / NONSTD
  178.     Set current color to a color defined by reverse command
  179.   char *aright(char x)                                      LOCATE
  180.     Move the cursor right x positions
  181.   char *asavecursor()                                       LOCATE
  182.     Save current cursor position
  183.   char *asetmode(int mode)                                  MISC
  184.     Sets mode to an ANSI defined mode or changes display rules
  185.   ashort(char flags)                                        INIT
  186.     Define ashortcuts = flags
  187.   ashortdos()                                               INIT
  188.     Set ashortcuts to default dos settings, ie: 
  189.     aBKSP, aCR, !aLF, !aCLRSCR, aRESET
  190.   ashorttelecom()                                           INIT
  191.     Set ashortcuts to default telecommunications settings, ie: 
  192.     !aBKSP | aCR | aLF | aCLRSCR | aRESET
  193.   char *atest()                                             MISC
  194.     Send ANSI Test presence string / Request cursor location
  195.   char *atest1()                                            MISC / DOS MODE
  196.     Flush standard input buffer then send ANSI test presence string /
  197.     Request cursor location
  198.   char *atextattr(char nc)                                  COLOR
  199.     Change current color/attribute 
  200.   char *atextbackground(char nb)                            COLOR
  201.     Change current background color
  202.   char *atextcolor(char nf)                                 COLOR
  203.     Change current foreground color
  204.   char *atextmode(int mode)                                 MISC
  205.     Sets mode to an ANSI defined text mode
  206.   char ATTR(char fr, char bk)                               COLOR
  207.     Calculate color from foreground and background values
  208.   char *aunderline(equation)                                COLOR / NONSTD
  209.     Set current color to a color defined by underline command
  210.   char *aup(char y)                                         LOCATE
  211.     Move the cursor up y positions
  212.   aupdatexy()                                               MISC / DOS MODE
  213.     Updates axpos and aypos using awherex and awherey functions
  214.   aupdatexy1()                                              MISC / DOS MODE
  215.     Updates axpos and aypos using low memory page 0 x and y values
  216.   unsigned awherexy(char *s)                                LOCATE
  217.     Interpret x and y cursor locations from atest result string, x=MSB, y=LSB
  218.   int SKEY(char key)                                        MISC
  219.     Calculates value for special keys for use in parameter for akeyboard
  220.  
  221. Functions that are identified as NONSTD, see OPTANSI.DOC for complete details.
  222.  
  223.  
  224.  
  225. *COMPILATION SWITCHES*
  226. --MACRO------RULES------------------------------------------------------------
  227.   NANSI      Set to 1 if you wish to include NANSI optimizing code in the lib
  228.   SIZE       Set to 1 to compile code to reduce code size over speed
  229.   REGISTERED Set to 1 if you are compiling registered source code
  230.