home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / cprog / vlib105.zip / VLIB.H < prev    next >
C/C++ Source or Header  |  1992-10-27  |  3KB  |  79 lines

  1. /*-------------------------------[ Vlib ]------------------------------*/
  2. /*                      Text File Viewer Library                       */
  3. /*---------------------------------------------------------------------*/
  4. /* Written by: Jeff Dunlop                                             */
  5. /* Copyright 1991 DB/Soft Publishing Co. All Rights Reserved           */
  6. /*---------------------------------------------------------------------*/
  7.  
  8. /*-------------------------------[ vlib.h ]----------------------------*/
  9. /*             Main header file for VLib file view library             */
  10. /*---------------------------------------------------------------------*/
  11.  
  12. /*--------------------------------------------------------------*/
  13. /*---------------------------[ defines ]------------------------*/
  14. /*--------------------------------------------------------------*/
  15.  
  16. #ifndef vlib_h
  17. #   define vlib_h
  18.  
  19. #define TRUE 1
  20. #define FALSE 0
  21.  
  22. #define VLIB_ARGERR   1
  23. #define VLIB_DOSERR   2
  24. #define VLIB_ALLOCERR 3
  25.  
  26. #define VL_BLACK           0
  27. #define VL_BLUE            1
  28. #define VL_GREEN           2
  29. #define VL_CYAN            3
  30. #define VL_RED             4
  31. #define VL_MAGENTA         5
  32. #define VL_BROWN           6
  33. #define VL_LIGHTGREY       7
  34. #define VL_DARKGREY        8
  35. #define VL_LIGHTBLUE       9
  36. #define VL_LIGHTGREEN      10
  37. #define VL_LIGHTCYAN       11
  38. #define VL_LIGHTRED        12
  39. #define VL_LIGHTMAGENTA    13
  40. #define VL_YELLOW          14
  41. #define VL_WHITE           15
  42.  
  43. /*--------------------------------------------------------------*/
  44. /*-------------------------[ structures ]-----------------------*/
  45. /*--------------------------------------------------------------*/
  46.  
  47. typedef struct
  48. {
  49.     int b_enable;               /* must be 1 to display border          */
  50.     char b_string[8];           /* ┌─┐│└─┘ is a typical example         */
  51.     unsigned char Foreground;
  52.     unsigned char Background;            /* the attribute for the border         */
  53.     unsigned char attr;
  54. } BORDER;
  55.  
  56. /*--------------------------------------------------------------*/
  57. /*--------------------[ function prototypes ]-------------------*/
  58. /*--------------------------------------------------------------*/
  59.  
  60. int vlLister(char *file_spec, int x1, int y1, int x2, int y2,
  61.            unsigned char Foreground, unsigned char Background,
  62.            unsigned buf_size, BORDER *border_info);
  63.  
  64. int vlGetCols(void);
  65. int vlGetRows(void);
  66. int vlIsDV(void);
  67. int vlIsEgaVga(void);
  68. int vlIsLshift(void);
  69. int vlIsMono(void);
  70. int vlIsRshift(void);
  71. int vlIsShift(void);
  72. unsigned char vlGetVidMode(void);
  73. unsigned vlGetVidbase(void);
  74. void vlCursorOff(void);
  75. void vlCursorSave(void);
  76. void vlCursorRestore(void);
  77.  
  78. #endif /* ifdef vlib_h */
  79.