home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1999 March B / SCO_CASTOR4RRT.iso / uccs / root.14 / udk / usr / add-on / include / chartam.h next >
Encoding:
C/C++ Source or Header  |  1998-08-19  |  4.6 KB  |  130 lines

  1. /*
  2.  * Copyright (c) 1998 The Santa Cruz Operation, Inc.. All Rights Reserved. 
  3.  *                                                                         
  4.  *        THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF THE               
  5.  *                   SANTA CRUZ OPERATION INC.                             
  6.  *                                                                         
  7.  *   The copyright notice above does not evidence any actual or intended   
  8.  *   publication of such source code.                                      
  9.  */
  10.  
  11. #ident    "@(#)libetitam:chartam.h    1.12"
  12. /********************************************************************
  13.  *                         chartam.h                                *
  14.  ********************************************************************
  15.  *                                                                  *
  16.  * This file attempts to successfully map all tam function calls    *
  17.  * to function calls within the conversion library for character    *
  18.  * terminals.  If a particular function is not supported in the     *
  19.  * conversion library then nasty preprocessor demons should prevent *
  20.  * user source from compiling.                                      *
  21.  *                                                                  *
  22.  ********************************************************************/
  23.  
  24. /* The following is from window.h */
  25.  
  26. #define NBORDER        0x1    /* Borderless */
  27. #define TRUE        (1)
  28. #define FALSE        (0)
  29. #define CERR        (-1)
  30.  
  31. /***
  32.  *** First define away all true TAM entry points
  33.  ***/
  34.  
  35. #ifndef lint
  36.  
  37. #define winit()            TAMwinit()
  38. #define iswind()        0
  39. #define wtargeton()        0
  40. #define wrastop(w,d1,d2,d3,d4,d5,d6,d7,d8,d9,d10,d11,d12,d13)    0
  41. #define wcreate(r,c,h,w,f)    TAMwcreate((short)(r),(short)(c),(short)(h),(short)(w),(unsigned short) (f))
  42.  
  43. #define wexit(s)        TAMwexit(s)
  44. #define wdelete(w)        TAMwdelete((short)(w))
  45. #define wselect(w)        TAMwselect((short)(w))
  46. #define wgetsel()        TAMwgetsel()
  47. #define wgetstat(w,s)        TAMwgetstat((short)(w),(WSTAT *)(s))
  48. #define wsetstat(w,s)        TAMwsetstat((short)(w),(WSTAT *)(s))
  49. #define wputc(w,c)        TAMwputc((short)(w),(char)(c))
  50. #define wputs(w,c)        TAMwputs((short)(w),(char*)(c))
  51. #define wprintf            TAMwprintf
  52. #define printw            TAMprintw
  53. #define wslk            TAMwslk            /* 2 forms of this call */
  54. #define wcmd(w,c)        TAMwcmd((short)(w),(char*)(c))
  55. #define wprompt(w,c)        TAMwprompt((short)(w),(char*)(c))
  56. #define wlabel(w,c)        TAMwlabel((short)(w),(char*)(c))
  57. #define wrefresh(w)        TAMwrefresh((short)(w))
  58. #define wuser(w,c)        TAMwuser((short)(w),(char*)(c))
  59. #define wgoto(w,r,c)        TAMwgoto((short)(w),(short)(r),(short)(c))
  60. #define wgetpos(w,r,c)        TAMwgetpos((short)(w),(int*)(r),(int*)(c))
  61. #define wgetc(w)        TAMwgetc((short)(w))
  62. #define kcodemap(c)        (char *)Virtual2Ansi((unsigned int)(c))
  63. #define keypad(d,f)        TAMkeypad((int)(d),(int)(f))
  64. #define wsetmouse(w,ms)        0
  65. #define wgetmouse(w,ms)        0
  66. #define wreadmouse(w,a,b,c,d)    0
  67. #define wprexec()        TAMwprexec()
  68. #define wpostwait()        TAMwpostwait()
  69. #define wnl(w,f)        0
  70. #define wicon(w, r, c, i)    0
  71. #define wicoff(w, r, c, i)    0
  72. #define track(w, t, o, b, w1)    TAMtrack ((short)(w))
  73. #define wndelay(w, b)        TAMwnodelay((short)(w),(int)(b))
  74.  
  75. /***
  76.  *** Compatibility routines from the TAM file "wcurses.c"
  77.  ***/
  78.  
  79. #define initscr()        TAMinitscr()
  80. #define nl()            0
  81. #define nonl()            0
  82. #define cbreak()        TAMcbreak()
  83. #define nocbreak()        TAMnocbreak()
  84. #define echo()            TAMecho()
  85. #define noecho()        TAMnoecho()
  86. #define inch()            TAMinch()
  87. #define getch()            TAMgetch()
  88. #define flushinp()        TAMflushinp()
  89. #define attron(m)        TAMattron((long)(m))
  90. #define attroff(m)        TAMattroff((long)(m))
  91. #define savetty()        TAMsavetty()
  92. #define resetty()        TAMresetty()
  93.  
  94. /***
  95.  *** Define TAM entry points that are really #define's in TAM
  96.  ***/
  97.  
  98. #define stdscr            wncur            /* In tam.h */
  99. #define addch(c)        wputc(wncur,c)
  100. #define addstr(s)        wputs(wncur,s)
  101. #define beep()            TAMbeep()
  102. #define clear()            TAMclear((short)(wncur))
  103. #define clearok(dum1, dum2)
  104. #define clrtobot()        TAMclrtobot((short)(wncur))
  105. #define clrtoeol()        TAMclrtoeol((short)(wncur))
  106. #define delch()            TAMdelch((short)(wncur))
  107. #define deleteln()        TAMdeleteln((short)(wncur))
  108. #define erase()            clear()
  109. #define flash()            beep()
  110. #define getyx(d,r,c)        wgetpos(wncur,&r,&c);
  111. #define insch(c)        TAMinsch((short)(wncur), (char)(c))
  112. #define insertln()        TAMinsertln((short)(wncur))
  113. #define leaveok(a,b)        0
  114. #define move(r,c)        wgoto(wncur,r,c)
  115. #define mvaddch(r,c,ch)        (move(r,c)==CERR?CERR:addch(ch))
  116. #define mvaddstr(r,c,s)        (move(r,c)==CERR?CERR:addstr(s))
  117. #define mvinch(r,c)        (move(r,c)==CERR?CERR:inch())
  118. #define nodelay(d,b)        TAMwnodelay((short)(wncur),(int)(b))
  119. #define refresh()        wrefresh(wncur)
  120.  
  121. extern void TAMwinit ();
  122. extern void TAMwexit ();
  123.  
  124. #else
  125.  
  126. extern void winit ();
  127. extern void wexit ();
  128.  
  129. #endif /* lint */
  130.