home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / CURSES.LZH / CURSPRIV.H < prev    next >
Text File  |  1990-01-31  |  4KB  |  115 lines

  1. #ifndef CURSPRIV_H
  2. #define CURSPRIV_H
  3.  
  4. /****************************************************************/
  5. /*               CURSPRIV.H                */
  6. /* Header file for definitions and declarations for the        */
  7. /* PCcurses package. These definitions should not be gene-    */
  8. /* rally accessible to programmers.                */
  9. /****************************************************************/
  10. /* This version of curses is based on ncurses, a curses version    */
  11. /* originally written by Pavel Curtis at Cornell University.    */
  12. /* I have made substantial changes to make it run on IBM PC's,    */
  13. /* and therefore consider myself free to make it public domain.    */
  14. /*        Bjorn Larsson (...mcvax!enea!infovax!bl)    */
  15. /****************************************************************/
  16. /* 1.0:    Release:                    870515    */
  17. /* 1.1:    Add _chadd() for raw output routines:        880306    */
  18. /* 1.2:    Support (by #ifdef UCMASM) for uppercase-only        */
  19. /*    assembly routine names. If UCMASM if defined,        */
  20. /*    all assembler names are #defined as upper case.        */
  21. /*    Not needed if you do "MASM /MX. Also missing        */
  22. /*     declaration of cursesscroll(). Fixes thanks to        */
  23. /*    N.D. Pentcheff:                    881002    */ 
  24. /* 1.3:    All modules lint-checked with MSC '-W3' and        */
  25. /*    turbo'C' '-w -w-pro' switches:            881005    */
  26. /****************************************************************/
  27.  
  28. /* window properties */
  29.  
  30. #define    _SUBWIN        1        /* window is a subwindow */
  31. #define    _ENDLINE    2        /* last winline is last screen line */
  32. #define    _FULLWIN    4        /* window fills screen */
  33. #define    _SCROLLWIN    8        /* window lwr rgt is screen lwr rgt */
  34.  
  35. /* Miscellaneous */
  36.  
  37. #define    _INBUFSIZ    200        /* size of terminal input buffer */
  38. #define    _NO_CHANGE    -1        /* flags line edge unchanged */
  39.  
  40. #define    _BREAKCHAR    0x03        /* ^C character */
  41. #define _DCCHAR        0x08        /* Delete Char char (BS) */
  42. #define _DLCHAR        0x1b        /* Delete Line char (ESC) */
  43. #define    _GOCHAR        0x11        /* ^Q character */
  44. #define    _PRINTCHAR    0x10        /* ^P character */
  45. #define    _STOPCHAR    0x13        /* ^S character */
  46. #define     NUNGETCH    10        /* max # chars to ungetch() */
  47.  
  48. /* character mask definitions */
  49.  
  50. #define CHR_MSK    ((int) 0x00ff)        /* ASCIIZ character mask */
  51. #define    ATR_MSK    ((int) 0xff00)        /* attribute mask */
  52. #define ATR_NRM    ((int) 0x0000)        /* no special attributes */
  53.  
  54. /* type declarations */
  55.  
  56. typedef    struct
  57.   {
  58.   WINDOW  *tmpwin;            /* window used for updates */
  59.   int       cursrow;            /* position of physical cursor */
  60.   int       curscol;
  61.   bool       autocr;            /* if lf -> crlf */
  62.   bool       cbreak;            /* if terminal unbuffered */
  63.   bool       echo;            /* if terminal echo */
  64.   bool       raw;                /* if terminal raw mode */
  65.   bool       refrbrk;            /* if premature refresh brk allowed */
  66.   bool     orgcbr;            /* original MSDOS ^-BREAK setting */
  67.   }    cursv;
  68.  
  69. /* External variables */
  70.  
  71. extern    cursv   _cursvar;        /* curses variables */
  72.  
  73. /* 'C' standard library function declarations */
  74.  
  75. extern    char    *calloc();
  76. extern    char    *malloc();
  77. extern    void     free();
  78. extern    int     sprintf();
  79. extern    int     sscanf();
  80.  
  81. /* Curses internal functions, not to be used by programmers */
  82.  
  83. /* #Define UCMASM if your version of MASM does not support */
  84. /*  the '/MX' switch, or if you use another assembler */
  85.  
  86. #ifdef    UCMASM
  87. #define    _cursescattr    _CURSESCATTR
  88. #define    _cursescmode    _CURSESCMODE
  89. #define    _cursescursor    _CURSESCURSOR
  90. #define    _cursesgcb    _CURSESGCB
  91. #define    _cursesgcmode    _CURSESGCMODE
  92. #define    _cursesgcols    _CURSESGCOLS
  93. #define    _curseskey    _CURSESKEY
  94. #define    _cursesscroll    _CURSESSCROLL
  95. #define    _curseskeytst    _CURSESKEYTST
  96. #define    _cursesputc    _CURSESPUTC
  97. #define    _cursesscb    _CURSESSCB
  98. #endif
  99.  
  100. extern    int    _chadd();
  101. extern    void    _cursescattr();
  102. extern    void    _cursescmode();
  103. extern    void    _cursescursor();
  104. extern    int    _cursesgcb();
  105. extern    int    _cursesgcmode();
  106. extern    int    _cursesgcols();
  107. extern    int    _curseskey();
  108. extern    bool    _curseskeytst();
  109. extern    void    _cursesscroll();
  110. extern    bool    _cursespendch();
  111. extern    void    _cursesputc();
  112. extern    void    _cursesscb();
  113.  
  114. #endif CURSPRIV_H
  115.