home *** CD-ROM | disk | FTP | other *** search
/ PC Media 7 / PC MEDIA CD07.iso / share / prog / asyncmsc / vid.h < prev   
Encoding:
C/C++ Source or Header  |  1991-09-30  |  2.4 KB  |  83 lines

  1.  
  2. /* vid.h --- direct video routines for various compilers */
  3.  
  4. #ifndef VID_H
  5. #define VID_H
  6.  
  7. #ifdef _ZOR
  8. #include <disp.h>
  9. #define VID_eeol disp_eeol
  10. #define VID_eeop disp_eeop
  11. #define VID_clr_scr disp_eeop
  12. #define VID_puts disp_puts
  13. #define VID_move(A,B) disp_move(A,B)
  14. #define VID_putc disp_putc
  15. #define VID_startstand() disp_startstand()
  16. #define VID_endstand() disp_endstand()
  17. #define VID_printf disp_printf
  18. #define VID_open() disp_open()
  19. #define VID_getmode() disp_getmode()
  20. #define VID_flush() disp_flush()
  21. #define VID_close() disp_close()
  22.  
  23. #else
  24.  
  25. #ifdef _MSC
  26. #include <conio.h>
  27. #include <graph.h>
  28. #define DISP_NORMAL 0x07
  29. #define DISP_REVERSEVIDEO 0x70
  30. #define DISP_UNDERLINE        0x01
  31. #define DISP_NONDISPLAY        0x00
  32. /* The following attribute bits should be OR'ed in:    */
  33. #define DISP_INTENSITY        0x08
  34. #define DISP_BLINK        0x80
  35. /*****************************
  36.  * Values for disp_setcursortype():
  37.  */
  38. #define DISP_CURSORBLOCK (disp_mono ? 0x000C : 0x0007)    /* block cursor        */
  39. #define DISP_CURSORHALF     (disp_mono ? 0x060C : 0x0307)    /* half-size cursor */
  40. #define DISP_CURSORUL     (disp_mono ? 0x0B0C : 0x0707)    /* underline cursor */
  41. #define VID_eeol()
  42. #define VID_clr_scr() _clearscreen(_GCLEARSCREEN)
  43. #define VID_eeop() _clearscreen(_GCLEARSCREEN)
  44. #define VID_puts _outtext
  45. #define VID_move(A,B) _settextposition(A+1,B+1)
  46. #define VID_putc putch
  47. #define VID_startstand() _settextcolor(0);_setbkcolor(7L)
  48. #define VID_endstand() _settextcolor(7);_setbkcolor(0L)
  49. #define VID_open()
  50. #define VID_flush()
  51. #define VID_close()
  52.  
  53. #else
  54. /* assume use of TURBOC compiler */
  55. #include <conio.h>
  56. #define DISP_NORMAL 0x07
  57. #define DISP_REVERSEVIDEO 0x70
  58. #define DISP_UNDERLINE        0x01
  59. #define DISP_NONDISPLAY        0x00
  60. /* The following attribute bits should be OR'ed in:    */
  61. #define DISP_INTENSITY        0x08
  62. #define DISP_BLINK        0x80
  63. #define DISP_CURSORBLOCK 0x000C  /* block cursor        */
  64. #define DISP_CURSORHALF     0x060C  /* half-size cursor */
  65. #define DISP_CURSORUL     0x0B0C  /* underline cursor */
  66. #define VID_eeol clreol
  67. #define VID_clr_scr clrscr
  68. #define VID_eeop clrscr
  69. #define VID_puts cputs
  70. #define VID_move(A,B) gotoxy(B+1,A+1)
  71. #define VID_putc putch
  72. #define VID_startstand() (textattr(0x70))
  73. #define VID_endstand() (textattr(0x07))
  74. #define VID_printf cprintf
  75. #define VID_open()
  76. #define VID_getmode()
  77. #define VID_flush()
  78. #define VID_close()
  79.  
  80. #endif /* _MSC */
  81. #endif /* ZOR */
  82. #endif /* VID_H */
  83.