home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / CURS13_2.ZIP / CURSPRIV.H < prev    next >
Text File  |  1989-12-08  |  4KB  |  110 lines

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