home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_300 / 332_01 / curspriv.h < prev    next >
C/C++ Source or Header  |  1990-01-06  |  4KB  |  114 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 (bl@infovox.se)    */
  12. /****************************************************************/
  13. /* 1.4:  ERR/ OK redefinied in curses.h. Use of short        */
  14. /*     wherever possible Portability improvements:    900114    */
  15. /* 1.3:     All modules lint-checked with MSC '-W3' and        */
  16. /*     Turbo'C' '-w -w-pro' switches:            881005    */
  17. /* 1.2:     Support (by #ifdef UCMASM) for uppercase-only        */
  18. /*     assembly routine names. If UCMASM if defined,        */
  19. /*     all assembler names are #defined as upper case.    */
  20. /*     Not needed if you do "MASM /MX. Also missing        */
  21. /*      declaration of cursesscroll(). Fixes thanks to        */
  22. /*     N.D. Pentcheff:                881002    */ 
  23. /* 1.1:     Add _chadd() for raw output routines:        880306    */
  24. /* 1.0:     Release:                    870515    */
  25. /****************************************************************/
  26.  
  27. #define    CURSES_RCS_ID    "@(#)PCcurses     v.1.4  - 900114"
  28.  
  29. /* window properties */
  30.  
  31. #define    _SUBWIN        1        /* window is a subwindow */
  32. #define    _ENDLINE    2        /* last winline is last screen line */
  33. #define    _FULLWIN    4        /* window fills screen */
  34. #define    _SCROLLWIN    8        /* window lwr rgt is screen lwr rgt */
  35.  
  36. /* Miscellaneous */
  37.  
  38. #define    _INBUFSIZ    200        /* size of terminal input buffer */
  39. #define    _NO_CHANGE    -1        /* flags line edge unchanged */
  40.  
  41. #define    _BREAKCHAR    0x03        /* ^C character */
  42. #define _DCCHAR        0x08        /* Delete Char char (BS) */
  43. #define _DLCHAR        0x1b        /* Delete Line char (ESC) */
  44. #define    _GOCHAR        0x11        /* ^Q character */
  45. #define    _PRINTCHAR    0x10        /* ^P character */
  46. #define    _STOPCHAR    0x13        /* ^S character */
  47. #define     NUNGETCH    10        /* max # chars to ungetch() */
  48.  
  49. /* character mask definitions */
  50.  
  51. #define CHR_MSK    ((int) 0x00ff)        /* ASCIIZ character mask */
  52. #define    ATR_MSK    ((int) 0xff00)        /* attribute mask */
  53. #define ATR_NRM    ((int) 0x0000)        /* no special attributes */
  54.  
  55. /* type declarations */
  56.  
  57. typedef    struct
  58.   {
  59.   WINDOW  *tmpwin;            /* window used for updates */
  60.   short       cursrow;            /* position of physical cursor */
  61.   short       curscol;
  62.   bool       autocr;            /* if lf -> crlf */
  63.   bool       cbreak;            /* if terminal unbuffered */
  64.   bool       echo;            /* if terminal echo */
  65.   bool       raw;                /* if terminal raw mode */
  66.   bool       refrbrk;            /* if premature refresh brk allowed */
  67.   bool     orgcbr;            /* original MSDOS ^-BREAK setting */
  68.   }    cursv;
  69.  
  70. /* External variables */
  71.  
  72. extern    cursv   _cursvar;        /* curses variables */
  73.  
  74. /* 'C' standard library function declarations */
  75.  
  76. extern    char    *calloc();
  77. extern    char    *malloc();
  78. extern    void     free();
  79. extern    int     sprintf();
  80. extern    int     sscanf();
  81.  
  82. /* Curses internal functions, not to be used by programmers */
  83.  
  84. /* #Define UCMASM if your version of MASM does not support */
  85. /*  the '/MX' switch, or if you use another assembler */
  86.  
  87. #ifdef    UCMASM
  88. #define    _cursescattr    _CURSESCATTR
  89. #define    _cursescmode    _CURSESCMODE
  90. #define    _cursescursor    _CURSESCURSOR
  91. #define    _cursesgcb    _CURSESGCB
  92. #define    _cursesgcmode    _CURSESGCMODE
  93. #define    _cursesgcols    _CURSESGCOLS
  94. #define    _curseskey    _CURSESKEY
  95. #define    _cursesscroll    _CURSESSCROLL
  96. #define    _curseskeytst    _CURSESKEYTST
  97. #define    _cursesputc    _CURSESPUTC
  98. #define    _cursesscb    _CURSESSCB
  99. #endif
  100.  
  101. extern    int    _chadd();
  102. extern    void    _cursescattr();
  103. extern    void    _cursescmode();
  104. extern    void    _cursescursor();
  105. extern    int    _cursesgcb();
  106. extern    int    _cursesgcmode();
  107. extern    int    _cursesgcols();
  108. extern    int    _curseskey();
  109. extern    bool    _curseskeytst();
  110. extern    void    _cursesscroll();
  111. extern    bool    _cursespendch();
  112. extern    void    _cursesputc();
  113. extern    void    _cursesscb();
  114.