home *** CD-ROM | disk | FTP | other *** search
/ Point Programming 1 / PPROG1.ISO / c / vlib107 / vlib.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-10-01  |  3.2 KB  |  92 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. #ifdef __cplusplus
  61.  extern "C" {
  62. #endif
  63. int vlLister(char *file_spec, char *buf, int buflen, int x1, int y1, int x2,
  64.             int y2, unsigned char Foreground, unsigned char Background,
  65.            unsigned buf_size, BORDER *border_info);
  66. int vlBufLister(char *buf, unsigned buflen, int x1, int y1, int x2, int y2,
  67.            unsigned char Foreground, unsigned char Background,
  68.            unsigned buf_size, BORDER *border_info);
  69. int vlFileLister(char *file_spec, int x1, int y1, int x2, int y2,
  70.            unsigned char Foreground, unsigned char Background,
  71.            unsigned buf_size, BORDER *border_info);
  72.  
  73. int vlGetCols(void);
  74. int vlGetRows(void);
  75. int vlIsDV(void);
  76. int vlIsEgaVga(void);
  77. int vlIsLshift(void);
  78. int vlIsMono(void);
  79. int vlIsRshift(void);
  80. int vlIsShift(void);
  81. unsigned char vlGetVidMode(void);
  82. unsigned vlGetVidbase(void);
  83. void vlCursorOff(void);
  84. void vlCursorSave(void);
  85. void vlCursorRestore(void);
  86.  
  87. #ifdef __cplusplus
  88.  }
  89. #endif
  90.  
  91. #endif /* ifdef vlib_h */
  92.