home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 8 / CDASC08.ISO / NEWS / 677 / TSRTOOLS / TSRLIB.DOC < prev    next >
Text File  |  1993-10-07  |  65KB  |  863 lines

  1.     ------------------------------------------------------------------------
  2.     |                                                                      |
  3.     |                                                                      |
  4.     |                                                                      |
  5.     |                                                                      |
  6.     |                                                                      |
  7.     |                                                                      |
  8.     |                                                                      |
  9.     |                                                                      |
  10.     |                                                                      |
  11.     |                                                                      |
  12.     |                                                                      |
  13.     |                                                                      |
  14.     |                                                                      |
  15.     |                                                                      |
  16.     |                                                                      |
  17.     |                                                                      |
  18.     |                                                                      |
  19.     |                                                                      |
  20.     |                                                                      |
  21.     |                                                                      |
  22.     |                                                                      |
  23.     |                                                                      |
  24.     |                              T S R L I B                             |
  25.     |                                                                      |
  26.     |                              Version 1.5                             |
  27.     |                                                                      |
  28.     |                Copyright (C) 1993, Geoff Friesen B.Sc.               |
  29.     |                         All rights reserved.                         |
  30.     |                                                                      |
  31.     |                                                                      |
  32.     |                                                                      |
  33.     |                                                                      |
  34.     |                                                                      |
  35.     |                                                                      |
  36.     |                                                                      |
  37.     |                                                                      |
  38.     |                                                                      |
  39.     |                                                                      |
  40.     |                                                                      |
  41.     |                                                                      |
  42.     |                                                                      |
  43.     |                                                                      |
  44.     |                                                                      |
  45.     |                                                                      |
  46.     |                                                                      |
  47.     |                                                                      |
  48.     |                                                                      |
  49.     |                                                                      |
  50.     |                                                                      |
  51.     |                                                                      |
  52.     ------------------------------------------------------------------------
  53.  
  54.     ------------------------------------------------------------------------
  55.     |                                                                      |
  56.     |                             Introduction                             |
  57.     |                             ------------                             |
  58.     |                                                                      |
  59.     | A TSR application built with TSR TOOLKIT starts out as a C file with |
  60.     | a main () function.  Source code for all functions referenced inside |
  61.     | this file must be included as TSR TOOLKIT takes a source code only   |
  62.     | approach to building TSR applications.  There exists no mechanism to |
  63.     | link object modules.                                                 |
  64.     |                                                                      |
  65.     | TSRLIB is a source library of useful C functions that you can access |
  66.     | from within your TSR applications.  Function categories include file |
  67.     | and directory, string, video, keyboard, conversion, date and time.   |
  68.     | I refer to the mechanism for including these functions in the main C |
  69.     | file as "source linking".                                            |
  70.     |                                                                      |
  71.     | Each source file making up TSRLIB begins with a C #define directive. |
  72.     | This is followed by a symbol beginning with INCL_ and followed by    |
  73.     | the name of the source file.  Any source file that depends upon the  |
  74.     | presence of this source file uses the C #if, #include, and #endif    |
  75.     | directives to ensure that the file is included during compilation.   |
  76.     |                                                                      |
  77.     | Consider the following example.  Your main C file will need to call  |
  78.     | the v_border (), v_cputs (), and v_gotoxy () functions.  VBORDER.C   |
  79.     | contains the v_border () function source code, VCPUTS.C contains the |
  80.     | v_cputs () function source code, and VGOTOXY.C contains the          |
  81.     | v_gotoxy () function source code.  You would probably place the fol- |
  82.     | lowing directives at the end of the main C file.                     |
  83.     |                                                                      |
  84.     | #ifndef INCL_VBORDER                                                 |
  85.     | #include "vborder.C"                                                 |
  86.     | #endif                                                               |
  87.     |                                                                      |
  88.     | #ifndef INCL_VCPUTS                                                  |
  89.     | #include "vcputs.C"                                                  |
  90.     | #endif                                                               |
  91.     |                                                                      |
  92.     | #ifndef INCL_VGOTOXY                                                 |
  93.     | #include "vgotoxy.C"                                                 |
  94.     | #endif                                                               |
  95.     |                                                                      |
  96.     | If INCL_VBORDER is defined then v_border () source code has already  |
  97.     | been included.  Therefore, it will not be included again.  The same  |
  98.     | holds true for INCL_VCPUTS and INCL_VGOTOXY.  The directive checking |
  99.     | INCL_VGOTOXY is not really necessary because vborder.C contains the  |
  100.     | same directives to include vgotoxy.C since v_border () accesses the  |
  101.     | v_gotoxy () function.  However, you can duplicate the #include since |
  102.     | it ensures that vgotoxy.C is included only once.                     |
  103.     |                                                                      |
  104.     |                                                                      |
  105.     ------------------------------------------------------------------------
  106.                       - 2 -
  107.  
  108.     ------------------------------------------------------------------------
  109.     |                                                                      |
  110.     | TSRLIB is composed of a single include file TSRLIB.H and many source |
  111.     | files.  TSRLIB.H contains #include directives to the various BORLAND |
  112.     | header files, constants, and function prototypes for those functions |
  113.     | not prototyped in the BORLAND headers.  You will notice that I have  |
  114.     | included protoypes for various API functions.  These functions exist |
  115.     | in either the TSR kernel or the main C file.  I do not consider them |
  116.     | part of TSRLIB so I have not documented them in TSRLIB.DOC.  Consult |
  117.     | TSR.DOC for information on these functions.                          |
  118.     |                                                                      |
  119.     | The next section itemizes each source file.  The name of the file is |
  120.     | specified.  This is followed by the export define (the INCL_ define  |
  121.     | which the main C file or another library source file tests to see if |
  122.     | the source file has already been included).  Following, is a list of |
  123.     | import defines.  These are INCL_ directives which a source file uses |
  124.     | to ensure that source files which it requires are included.  A glo-  |
  125.     | bals section follows which lists global variables and functions that |
  126.     | normally would be private to the source file (unfortunately, this is |
  127.     | not possible with a source-only approach).  Finally, a list of func- |
  128.     | tion prototypes for each "visible" function in the source file is    |
  129.     | presented.                                                           |
  130.     |                                                                      |
  131.     |                                                                      |
  132.     |                                                                      |
  133.     |                                                                      |
  134.     |                                                                      |
  135.     |                                                                      |
  136.     |                                                                      |
  137.     |                                                                      |
  138.     |                                                                      |
  139.     |                                                                      |
  140.     |                                                                      |
  141.     |                                                                      |
  142.     |                                                                      |
  143.     |                                                                      |
  144.     |                                                                      |
  145.     |                                                                      |
  146.     |                                                                      |
  147.     |                                                                      |
  148.     |                                                                      |
  149.     |                                                                      |
  150.     |                                                                      |
  151.     |                                                                      |
  152.     |                                                                      |
  153.     |                                                                      |
  154.     |                                                                      |
  155.     |                                                                      |
  156.     |                                                                      |
  157.     |                                                                      |
  158.     |                                                                      |
  159.     ------------------------------------------------------------------------
  160.                                       - 3 -
  161.  
  162.     ------------------------------------------------------------------------
  163.     |                                                                      |
  164.     |                          TSRLIB Source Files                         |
  165.     |                          -------------------                         |
  166.     |                                                                      |
  167.     |                                                                      |
  168.     | * ATOI.C                                                             |
  169.     |                                                                      |
  170.     | EXPORT: INCL_ATOI                                                    |
  171.     |                                                                      |
  172.     | IMPORT: INCL_ISDIGIT                                                 |
  173.     |         INCL_ISSPACE                                                 |
  174.     |                                                                      |
  175.     | PROTO : int atoi (const char *s);                                    |
  176.     |                                                                      |
  177.     |                                                                      |
  178.     | * ATOL.C                                                             |
  179.     |                                                                      |
  180.     | EXPORT: INCL_ATOL                                                    |
  181.     |                                                                      |
  182.     | IMPORT: INCL_ISDIGIT                                                 |
  183.     |         INCL_ISSPACE                                                 |
  184.     |                                                                      |
  185.     | PROTO : long atol (const char *s);                                   |
  186.     |                                                                      |
  187.     |                                                                      |
  188.     | * ATTRIB.C                                                           |
  189.     |                                                                      |
  190.     | EXPORT: INCL_ATTRIB                                                  |
  191.     |                                                                      |
  192.     | GLOBAL: int attribute;                                               |
  193.     |                                                                      |
  194.     |                                                                      |
  195.     | * CHDIR.C                                                            |
  196.     |                                                                      |
  197.     | EXPORT: INCL_CHDIR                                                   |
  198.     |                                                                      |
  199.     | PROTO : int chdir (const char *path);                                |
  200.     |                                                                      |
  201.     |                                                                      |
  202.     | * CHMOD.C                                                            |
  203.     |                                                                      |
  204.     | EXPORT: INCL_CHMOD                                                   |
  205.     |                                                                      |
  206.     | PROTO : int _chmod (const char *path, int func, int attrib);         |
  207.     |                                                                      |
  208.     |                                                                      |
  209.     |                                                                      |
  210.     |                                                                      |
  211.     |                                                                      |
  212.     |                                                                      |
  213.     ------------------------------------------------------------------------
  214.                       - 4 -
  215.  
  216.     ------------------------------------------------------------------------
  217.     |                                                                      |
  218.     | * CLOSE.C                                                            |
  219.     |                                                                      |
  220.     | EXPORT: INCL_CLOSE                                                   |
  221.     |                                                                      |
  222.     | PROTO : int _close (int handle);                                     |
  223.     |                                                                      |
  224.     |                                                                      |
  225.     | * CREAT.C                                                            |
  226.     |                                                                      |
  227.     | EXPORT: INCL_CREAT                                                   |
  228.     |                                                                      |
  229.     | PROTO : int _creat (const char *path, int attrib);                   |
  230.     |                                                                      |
  231.     |                                                                      |
  232.     | * FILELENG.C                                                         |
  233.     |                                                                      |
  234.     | EXPORT: INCL_FILELENGTH                                              |
  235.     |                                                                      |
  236.     | IMPORT: INCL_LSEEK                                                   |
  237.     |         INCL_TELL                                                    |
  238.     |                                                                      |
  239.     | PROTO : long filelength (int handle);                                |
  240.     |                                                                      |
  241.     |                                                                      |
  242.     | * FIND.C                                                             |
  243.     |                                                                      |
  244.     | EXPORT: INCL_FIND                                                    |
  245.     |                                                                      |
  246.     | PROTO : int findfirst (const char *pathname, struct ffblk *ffblk,    |
  247.     |                        int attrib);                                  |
  248.     |         int findnext (struct ffblk *ffblk);                          |
  249.     |                                                                      |
  250.     |                                                                      |
  251.     | * FORMAT.C                                                           |
  252.     |                                                                      |
  253.     | EXPORT: INCL_FORMAT                                                  |
  254.     |                                                                      |
  255.     | GLOBAL: void _prt10 (unsigned num, char *str);                       |
  256.     |         void _prt16 (unsigned num, char *str, int hexcase);          |
  257.     |         void _prtl10 (unsigned long num, char *str);                 |
  258.     |         void _prtl16 (unsigned long num, char *str, int hexcase);    |
  259.     |                                                                      |
  260.     | PROTO : int pascal format (void (*func) (int), const char *fmt,      |
  261.     |                            void *ap);                                |
  262.     |                                                                      |
  263.     |                                                                      |
  264.     |                                                                      |
  265.     |                                                                      |
  266.     |                                                                      |
  267.     ------------------------------------------------------------------------
  268.                       - 5 -
  269.  
  270.     ------------------------------------------------------------------------
  271.     |                                                                      |
  272.     | * GETCURDI.C                                                         |
  273.     |                                                                      |
  274.     | EXPORT: INCL_GETCURDIR                                               |
  275.     |                                                                      |
  276.     | PROTO : int getcurdir (int drive, char *directory);                  |
  277.     |                                                                      |
  278.     |                                                                      |
  279.     | * GETDATE.C                                                          |
  280.     |                                                                      |
  281.     | EXPORT: INCL_GETDATE                                                 |
  282.     |                                                                      |
  283.     | PROTO : void getdate (struct date *datep);                           |
  284.     |                                                                      |
  285.     |                                                                      |
  286.     | * GETDISK.C                                                          |
  287.     |                                                                      |
  288.     | EXPORT: INCL_GETDISK                                                 |
  289.     |                                                                      |
  290.     | PROTO : int getdisk (void);                                          |
  291.     |                                                                      |
  292.     |                                                                      |
  293.     | * GETSTR.C                                                           |
  294.     |                                                                      |
  295.     | EXPORT: INCL_GETSTR                                                  |
  296.     |                                                                      |
  297.     | IMPORT: INCL_KFETCH                                                  |
  298.     |         INCL_STRLEN                                                  |
  299.     |         INCL_VCPUTS                                                  |
  300.     |         INCL_VGETMODE                                                |
  301.     |         INCL_VGETSHAPE                                               |
  302.     |         INCL_VGOTOXY                                                 |
  303.     |         INCL_VPUTCH                                                  |
  304.     |         INCL_VSCREEN                                                 |
  305.     |         INCL_VSETSHAPE                                               |
  306.     |         INCL_VWHEREX                                                 |
  307.     |         INCL_VWHEREY                                                 |
  308.     |                                                                      |
  309.     | PROTO : int getstr (char *buffer, unsigned char maxlen);             |
  310.     |                                                                      |
  311.     |                                                                      |
  312.     | * GETTIME.C                                                          |
  313.     |                                                                      |
  314.     | EXPORT: INCL_GETTIME                                                 |
  315.     |                                                                      |
  316.     | PROTO : void gettime (struct time *timep);                           |
  317.     |                                                                      |
  318.     |                                                                      |
  319.     |                                                                      |
  320.     |                                                                      |
  321.     ------------------------------------------------------------------------
  322.                       - 6 -
  323.  
  324.     ------------------------------------------------------------------------
  325.     |                                                                      |
  326.     | * GETVECT.C                                                          |
  327.     |                                                                      |
  328.     | EXPORT: INCL_GETVECT                                                 |
  329.     |                                                                      |
  330.     | PROTO : void interrupt (*getvect (int interruptno)) ();              |
  331.     |                                                                      |
  332.     |                                                                      |
  333.     | * ISALNUM.C                                                          |
  334.     |                                                                      |
  335.     | EXPORT: INCL_ISALNUM                                                 |
  336.     |                                                                      |
  337.     | IMPORT: INCL_ISALPHA                                                 |
  338.     |         INCL_ISDIGIT                                                 |
  339.     |                                                                      |
  340.     | PROTO : int isalnum (int c);                                         |
  341.     |                                                                      |
  342.     |                                                                      |
  343.     | * ISALPHA.C                                                          |
  344.     |                                                                      |
  345.     | EXPORT: INCL_ISALPHA                                                 |
  346.     |                                                                      |
  347.     | IMPORT: INCL_ISLOWER                                                 |
  348.     |         INCL_ISUPPER                                                 |
  349.     |                                                                      |
  350.     | PROTO : int isalpha (int c);                                         |
  351.     |                                                                      |
  352.     |                                                                      |
  353.     | * ISDIGIT.C                                                          |
  354.     |                                                                      |
  355.     | EXPORT: INCL_ISDIGIT                                                 |
  356.     |                                                                      |
  357.     | PROTO : int isdigit (int c);                                         |
  358.     |                                                                      |
  359.     |                                                                      |
  360.     | * ISLEAP.C                                                           |
  361.     |                                                                      |
  362.     | EXPORT: INCL_ISLEAP                                                  |
  363.     |                                                                      |
  364.     | PROTO : int isleap (int year);                                       |
  365.     |                                                                      |
  366.     |                                                                      |
  367.     | * ISLOWER.C                                                          |
  368.     |                                                                      |
  369.     | EXPORT: INCL_ISLOWER                                                 |
  370.     |                                                                      |
  371.     | PROTO : int islower (int c);                                         |
  372.     |                                                                      |
  373.     |                                                                      |
  374.     |                                                                      |
  375.     ------------------------------------------------------------------------
  376.                       - 7 -
  377.  
  378.     ------------------------------------------------------------------------
  379.     |                                                                      |
  380.     | * ISSPACE.C                                                          |
  381.     |                                                                      |
  382.     | EXPORT: INCL_ISSPACE                                                 |
  383.     |                                                                      |
  384.     | PROTO : int isspace (int c);                                         |
  385.     |                                                                      |
  386.     |                                                                      |
  387.     | * ISUPPER.C                                                          |
  388.     |                                                                      |
  389.     | EXPORT: INCL_ISUPPER                                                 |
  390.     |                                                                      |
  391.     | PROTO : int isupper (int c);                                         |
  392.     |                                                                      |
  393.     |                                                                      |
  394.     | * ISXDIGIT.C                                                         |
  395.     |                                                                      |
  396.     | EXPORT: INCL_ISXDIGIT                                                |
  397.     |                                                                      |
  398.     | IMPORT: INCL_ISALNUM                                                 |
  399.     |         INCL_TOUPPER                                                 |
  400.     |                                                                      |
  401.     | PROTO : int isxdigit (int c);                                        |
  402.     |                                                                      |
  403.     |                                                                      |
  404.     | * ITOA.C                                                             |
  405.     |                                                                      |
  406.     | EXPORT: INCL_ITOA                                                    |
  407.     |                                                                      |
  408.     | IMPORT: INCL_STRREV                                                  |
  409.     |                                                                      |
  410.     | PROTO : char *_itoa (int value, char *string);                       |
  411.     |                                                                      |
  412.     |                                                                      |
  413.     | * KFETCH.C                                                           |
  414.     |                                                                      |
  415.     | EXPORT: INCL_KFETCH                                                  |
  416.     |                                                                      |
  417.     | PROTO : int k_fetch (void);                                          |
  418.     |                                                                      |
  419.     |                                                                      |
  420.     | * KISKEY.C                                                           |
  421.     |                                                                      |
  422.     | EXPORT: INCL_KISKEY                                                  |
  423.     |                                                                      |
  424.     | PROTO : int k_iskey (void);                                          |
  425.     |                                                                      |
  426.     |                                                                      |
  427.     |                                                                      |
  428.     |                                                                      |
  429.     ------------------------------------------------------------------------
  430.                       - 8 -
  431.  
  432.     ------------------------------------------------------------------------
  433.     |                                                                      |
  434.     | * LSEEK.C                                                            |
  435.     |                                                                      |
  436.     | EXPORT: INCL_LSEEK                                                   |
  437.     |                                                                      |
  438.     | PROTO : long lseek (int handle, long offset, int fromwhere);         |
  439.     |                                                                      |
  440.     |                                                                      |
  441.     | * LTOA.C                                                             |
  442.     |                                                                      |
  443.     | EXPORT: INCL_LTOA                                                    |
  444.     |                                                                      |
  445.     | IMPORT: INCL_STRREV                                                  |
  446.     |                                                                      |
  447.     | PROTO : char *_ltoa (long value, char *string);                      |
  448.     |                                                                      |
  449.     |                                                                      |
  450.     | * MEMSWAP.C                                                          |
  451.     |                                                                      |
  452.     | EXPORT: INCL_MEMSWAP                                                 |
  453.     |                                                                      |
  454.     | PROTO : void memswap (void *addr1, void *addr2, size_t n);           |
  455.     |                                                                      |
  456.     |                                                                      |
  457.     | * MKDIR.C                                                            |
  458.     |                                                                      |
  459.     | EXPORT: INCL_MKDIR                                                   |
  460.     |                                                                      |
  461.     | PROTO : int mkdir (const char *path);                                |
  462.     |                                                                      |
  463.     |                                                                      |
  464.     | * OPEN.C                                                             |
  465.     |                                                                      |
  466.     | EXPORT: INCL_OPEN                                                    |
  467.     |                                                                      |
  468.     | PROTO : int _open (const char *filename, int oflags);                |
  469.     |                                                                      |
  470.     |                                                                      |
  471.     | * READ.C                                                             |
  472.     |                                                                      |
  473.     | EXPORT: INCL_READ                                                    |
  474.     |                                                                      |
  475.     | PROTO : int _read (int handle, void *buf, unsigned len);             |
  476.     |                                                                      |
  477.     |                                                                      |
  478.     | * RENAME.C                                                           |
  479.     |                                                                      |
  480.     | EXPORT: INCL_RENAME                                                  |
  481.     |                                                                      |
  482.     | PROTO : int rename (const char *oldname, const char *newname);       |
  483.     ------------------------------------------------------------------------
  484.                       - 9 -
  485.  
  486.     ------------------------------------------------------------------------
  487.     |                                                                      |
  488.     | * RMDIR.C                                                            |
  489.     |                                                                      |
  490.     | EXPORT: INCL_RMDIR                                                   |
  491.     |                                                                      |
  492.     | PROTO : int rmdir (const char *path);                                |
  493.     |                                                                      |
  494.     |                                                                      |
  495.     | * SETDATE.C                                                          |
  496.     |                                                                      |
  497.     | EXPORT: INCL_SETDATE                                                 |
  498.     |                                                                      |
  499.     | PROTO : void setdate (struct date *datep);                           |
  500.     |                                                                      |
  501.     |                                                                      |
  502.     | * SETDISK.C                                                          |
  503.     |                                                                      |
  504.     | EXPORT: INCL_SETDISK                                                 |
  505.     |                                                                      |
  506.     | PROTO : int setdisk (int drive);                                     |
  507.     |                                                                      |
  508.     |                                                                      |
  509.     | * SETTIME.C                                                          |
  510.     |                                                                      |
  511.     | EXPORT: INCL_SETTIME                                                 |
  512.     |                                                                      |
  513.     | PROTO : void settime (struct time *timep);                           |
  514.     |                                                                      |
  515.     |                                                                      |
  516.     | * SETVECT.C                                                          |
  517.     |                                                                      |
  518.     | EXPORT: INCL_SETVECT                                                 |
  519.     |                                                                      |
  520.     | PROTO : void setvect (int interruptno, void interrupt (*isr) ());    |
  521.     |                                                                      |
  522.     |                                                                      |
  523.     | * SPRINTF.C                                                          |
  524.     |                                                                      |
  525.     | EXPORT: INCL_SPRINTF                                                 |
  526.     |                                                                      |
  527.     | IMPORT: INCL_FORMAT                                                  |
  528.     |                                                                      |
  529.     | GLOBAL: char *sprintf_buffer;                                        |
  530.     |         void sprintf_putc (int c);                                   |
  531.     |                                                                      |
  532.     | PROTO : int sprintf (char *buffer, const char *fmt, ...);            |
  533.     |                                                                      |
  534.     |                                                                      |
  535.     |                                                                      |
  536.     |                                                                      |
  537.     ------------------------------------------------------------------------
  538.                      - 10 -
  539.  
  540.     ------------------------------------------------------------------------
  541.     |                                                                      |
  542.     | * STRCMP.C                                                           |
  543.     |                                                                      |
  544.     | EXPORT: INCL_STRCMP                                                  |
  545.     |                                                                      |
  546.     | PROTO : int strcmp (const char *s1, const char *s2);                 |
  547.     |                                                                      |
  548.     |                                                                      |
  549.     | * STRCPY.C                                                           |
  550.     |                                                                      |
  551.     | EXPORT: INCL_STRCPY                                                  |
  552.     |                                                                      |
  553.     | PROTO : char *strcpy (char *dest, const char *src);                  |
  554.     |                                                                      |
  555.     |                                                                      |
  556.     | * STRICMP.C                                                          |
  557.     |                                                                      |
  558.     | EXPORT: INCL_STRICMP                                                 |
  559.     |                                                                      |
  560.     | IMPORT: INCL_TOUPPER                                                 |
  561.     |                                                                      |
  562.     | PROTO : int stricmp (const char *s1, const char *s2);                |
  563.     |                                                                      |
  564.     |                                                                      |
  565.     | * STRLEN.C                                                           |
  566.     |                                                                      |
  567.     | EXPORT: INCL_STRLEN                                                  |
  568.     |                                                                      |
  569.     | PROTO : size_t strlen (const char *s);                               |
  570.     |                                                                      |
  571.     |                                                                      |
  572.     | * STRLWR.C                                                           |
  573.     |                                                                      |
  574.     | EXPORT: INCL_STRLWR                                                  |
  575.     |                                                                      |
  576.     | IMPORT: INCL_TOLOWER                                                 |
  577.     |                                                                      |
  578.     | PROTO : char *strlwr (char *s);                                      |
  579.     |                                                                      |
  580.     |                                                                      |
  581.     | * STRNCMP.C                                                          |
  582.     |                                                                      |
  583.     | EXPORT: INCL_STRNCMP                                                 |
  584.     |                                                                      |
  585.     | PROTO : int strncmp (const char *s1, const char *s2, size_t maxlen); |
  586.     |                                                                      |
  587.     |                                                                      |
  588.     |                                                                      |
  589.     |                                                                      |
  590.     |                                                                      |
  591.     ------------------------------------------------------------------------
  592.                      - 11 -
  593.  
  594.     ------------------------------------------------------------------------
  595.     |                                                                      |
  596.     |  * STRNCPY.C                                                         |
  597.     |                                                                      |
  598.     |  EXPORT: INCL_STRNCPY                                                |
  599.     |                                                                      |
  600.     |  PROTO : char *strncpy (char *dest, const char *src, size_t maxlen); |
  601.     |                                                                      |
  602.     |                                                                      |
  603.     |  * STRNICMP.C                                                        |
  604.     |                                                                      |
  605.     |  EXPORT: INCL_STRNICMP                                               |
  606.     |                                                                      |
  607.     |  IMPORT: INCL_TOUPPER                                                |
  608.     |                                                                      |
  609.     |  PROTO : int strnicmp (const char *s1, const char *s2,               |
  610.     |                        size_t maxlen);                               |
  611.     |                                                                      |
  612.     |                                                                      |
  613.     |  * STRREV.C                                                          |
  614.     |                                                                      |
  615.     |  EXPORT: INCL_STRREV                                                 |
  616.     |                                                                      |
  617.     |  IMPORT: INCL_STRLEN                                                 |
  618.     |                                                                      |
  619.     |  PROTO : char *strrev (char *s);                                     |
  620.     |                                                                      |
  621.     |                                                                      |
  622.     | * STRUPR.C                                                           |
  623.     |                                                                      |
  624.     | EXPORT: INCL_STRUPR                                                  |
  625.     |                                                                      |
  626.     | IMPORT: INCL_TOUPPER                                                 |
  627.     |                                                                      |
  628.     | PROTO : char *strupr (char *s);                                      |
  629.     |                                                                      |
  630.     |                                                                      |
  631.     | * TELL.C                                                             |
  632.     |                                                                      |
  633.     | EXPORT: INCL_TELL                                                    |
  634.     |                                                                      |
  635.     | IMPORT: INCL_LSEEK                                                   |
  636.     |                                                                      |
  637.     | PROTO : long tell (int handle);                                      |
  638.     |                                                                      |
  639.     |                                                                      |
  640.     |                                                                      |
  641.     |                                                                      |
  642.     |                                                                      |
  643.     |                                                                      |
  644.     |                                                                      |
  645.     ------------------------------------------------------------------------
  646.                      - 12 -
  647.  
  648.     ------------------------------------------------------------------------
  649.     |                                                                      |
  650.     | * TOLOWER.C                                                          |
  651.     |                                                                      |
  652.     | EXPORT: INCL_TOLOWER                                                 |
  653.     |                                                                      |
  654.     | IMPORT: INCL_ISUPPER                                                 |
  655.     |                                                                      |
  656.     | PROTO : int tolower (int ch);                                        |
  657.     |                                                                      |
  658.     |                                                                      |
  659.     | * TOUPPER.C                                                          |
  660.     |                                                                      |
  661.     | EXPORT: INCL_TOUPPER                                                 |
  662.     |                                                                      |
  663.     | IMPORT: INCL_ISLOWER                                                 |
  664.     |                                                                      |
  665.     | PROTO : int toupper (int ch);                                        |
  666.     |                                                                      |
  667.     |                                                                      |
  668.     | * UCURSOR.C                                                          |
  669.     |                                                                      |
  670.     | EXPORT: INCL_UCURSOR                                                 |
  671.     |                                                                      |
  672.     | GLOBAL: void update_cursor (void);                                   |
  673.     |                                                                      |
  674.     |                                                                      |
  675.     | * UNLINK.C                                                           |
  676.     |                                                                      |
  677.     | EXPORT: INCL_UNLINK                                                  |
  678.     |                                                                      |
  679.     | PROTO : int unlink (const char *filename);                           |
  680.     |                                                                      |
  681.     |                                                                      |
  682.     | * VAA.C                                                              |
  683.     |                                                                      |
  684.     | EXPORT: INCL_VAA                                                     |
  685.     |                                                                      |
  686.     | PROTO : int v_aa (void);                                             |
  687.     |                                                                      |
  688.     |                                                                      |
  689.     | * VBORDER.C                                                          |
  690.     |                                                                      |
  691.     | EXPORT: INCL_VBORDER                                                 |
  692.     |                                                                      |
  693.     | IMPORT: INCL_VGOTOXY                                                 |
  694.     |         INCL_VPUTCH                                                  |
  695.     |                                                                      |
  696.     | PROTO : void v_border (int style, int x, int y, int nx, int ny);     |
  697.     |                                                                      |
  698.     |                                                                      |
  699.     ------------------------------------------------------------------------
  700.                      - 13 -
  701.  
  702.     ------------------------------------------------------------------------
  703.     |                                                                      |
  704.     | * VCPRINTF.C                                                         |
  705.     |                                                                      |
  706.     | EXPORT: INCL_VCPRINTF                                                |
  707.     |                                                                      |
  708.     | IMPORT: INCL_FORMAT                                                  |
  709.     |         INCL_VPUTCH                                                  |
  710.     |                                                                      |
  711.     | GLOBAL: void v_cprintf_putc (int c);                                 |
  712.     |                                                                      |
  713.     | PROTO : int v_cprintf (const char *fmt, ...);                        |
  714.     |                                                                      |
  715.     |                                                                      |
  716.     | * VCPUTS.C                                                           |
  717.     |                                                                      |
  718.     | EXPORT: INCL_VCPUTS                                                  |
  719.     |                                                                      |
  720.     | IMPORT: INCL_ATTRIB                                                  |
  721.     |         INCL_UCURSOR                                                 |
  722.     |                                                                      |
  723.     | PROTO : int v_cputs (const char *str);                               |
  724.     |                                                                      |
  725.     |                                                                      |
  726.     | * VGETATTR.C                                                         |
  727.     |                                                                      |
  728.     | EXPORT: INCL_VGETATTR                                                |
  729.     |                                                                      |
  730.     | IMPORT: INCL_ATTRIB                                                  |
  731.     |                                                                      |
  732.     | PROTO : int v_getattr (void);                                        |
  733.     |                                                                      |
  734.     |                                                                      |
  735.     | * VGETMODE.C                                                         |
  736.     |                                                                      |
  737.     | EXPORT: INCL_VGETMODE                                                |
  738.     |                                                                      |
  739.     | PROTO : int v_getmode (void);                                        |
  740.     |                                                                      |
  741.     |                                                                      |
  742.     | * VGETSHAP.C                                                         |
  743.     |                                                                      |
  744.     | EXPORT: INCL_VGETSHAPE                                               |
  745.     |                                                                      |
  746.     | PROTO : int v_getshape (void);                                       |
  747.     |                                                                      |
  748.     |                                                                      |
  749.     |                                                                      |
  750.     |                                                                      |
  751.     |                                                                      |
  752.     |                                                                      |
  753.     ------------------------------------------------------------------------
  754.                      - 14 -
  755.  
  756.     ------------------------------------------------------------------------
  757.     |                                                                      |
  758.     | * VGOTOXY.C                                                          |
  759.     |                                                                      |
  760.     | EXPORT: INCL_VGOTOXY                                                 |
  761.     |                                                                      |
  762.     | PROTO : void v_gotoxy (int x, int y)                                 |
  763.     |                                                                      |
  764.     |                                                                      |
  765.     | * VPAINT.C                                                           |
  766.     |                                                                      |
  767.     | EXPORT: INCL_VPAINT                                                  |
  768.     |                                                                      |
  769.     | IMPORT: INCL_VGOTOXY                                                 |
  770.     |         INCL_VPUTCH                                                  |
  771.     |                                                                      |
  772.     | PROTO : void v_paint (int c, int x, int y, int nx, int ny);          |
  773.     |                                                                      |
  774.     |                                                                      |
  775.     | * VPUTCH.C                                                           |
  776.     |                                                                      |
  777.     | EXPORT: INCL_VPUTCH                                                  |
  778.     |                                                                      |
  779.     | IMPORT: INCL_ATTRIB                                                  |
  780.     |         INCL_UCURSOR                                                 |
  781.     |                                                                      |
  782.     | PROTO : int v_putch (int c, int count);                              |
  783.     |                                                                      |
  784.     |                                                                      |
  785.     | * VSCREEN.C                                                          |
  786.     |                                                                      |
  787.     | EXPORT: INCL_VSCREEN                                                 |
  788.     |                                                                      |
  789.     | PROTO : void v_screen (int cmd, int x, int y, int nx, int ny,        |
  790.     |                        void *buffer);                                |
  791.     |                                                                      |
  792.     |                                                                      |
  793.     | * VSCROLL.C                                                          |
  794.     |                                                                      |
  795.     | EXPORT: INCL_VSCROLL                                                 |
  796.     |                                                                      |
  797.     | PROTO : void v_scroll (int x, int y, int nx, int ny, int dir,        |
  798.     |                        int nblines, int attr);                       |
  799.     |                                                                      |
  800.     |                                                                      |
  801.     |                                                                      |
  802.     |                                                                      |
  803.     |                                                                      |
  804.     |                                                                      |
  805.     |                                                                      |
  806.     |                                                                      |
  807.     ------------------------------------------------------------------------
  808.                      - 15 -
  809.  
  810.     ------------------------------------------------------------------------
  811.     |                                                                      |
  812.     | * VSETATTR.C                                                         |
  813.     |                                                                      |
  814.     | EXPORT: INCL_VSETATTR                                                |
  815.     |                                                                      |
  816.     | IMPORT: INCL_ATTRIB                                                  |
  817.     |                                                                      |
  818.     | PROTO : void v_setattr (int attr);                                   |
  819.     |                                                                      |
  820.     |                                                                      |
  821.     | * VSETSHAP.C                                                         |
  822.     |                                                                      |
  823.     | EXPORT: INCL_VSETSHAPE                                               |
  824.     |                                                                      |
  825.     | PROTO : void v_setshape (int shape);                                 |
  826.     |                                                                      |
  827.     |                                                                      |
  828.     | * VSHADOW.C                                                          |
  829.     |                                                                      |
  830.     | EXPORT: INCL_VSHADOW                                                 |
  831.     |                                                                      |
  832.     | IMPORT: INCL_VSCREEN                                                 |
  833.     |                                                                      |
  834.     | PROTO : void v_shadow (int x1, int y1, int nx, int ny);              |
  835.     |                                                                      |
  836.     |                                                                      |
  837.     | * VWHEREX.C                                                          |
  838.     |                                                                      |
  839.     | EXPORT: INCL_VWHEREX                                                 |
  840.     |                                                                      |
  841.     | PROTO : int v_wherex (void);                                         |
  842.     |                                                                      |
  843.     |                                                                      |
  844.     | * VWHEREY.C                                                          |
  845.     |                                                                      |
  846.     | EXPORT: INCL_VWHEREY                                                 |
  847.     |                                                                      |
  848.     | PROTO : int v_wherey (void);                                         |
  849.     |                                                                      |
  850.     |                                                                      |
  851.     | * WRITE.C                                                            |
  852.     |                                                                      |
  853.     | EXPORT: INCL_WRITE                                                   |
  854.     |                                                                      |
  855.     | PROTO : int _write (int handle, void *buf, unsigned len);            |
  856.     |                                                                      |
  857.     |                                                                      |
  858.     |                                                                      |
  859.     |                                                                      |
  860.     |                                                                      |
  861.     ------------------------------------------------------------------------
  862.                      - 16 -
  863.