home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / progm / cxl-1.zip / CXLDEF.H next >
Text File  |  1989-03-27  |  4KB  |  121 lines

  1. /*
  2.    ┌──────────────────────────────────────────────────────────────────────────┐
  3.    │                                                                          │
  4.    │  CXLDEF.H  -  CXL is Copyright (c) 1987-1989 by Mike Smedley.            │
  5.    │                                                                          │
  6.    │  This header file contains miscellaneous function prototypes and         │
  7.    │  definitions.                                                            │
  8.    │                                                                          │
  9.    └──────────────────────────────────────────────────────────────────────────┘
  10. */
  11.  
  12. #if defined(__TURBOC__)                     /* Turbo C */
  13.     #if __STDC__
  14.         #define _Cdecl
  15.     #else
  16.         #define _Cdecl  cdecl
  17.     #endif
  18.     #define _Near
  19. #elif defined(__ZTC__)                      /* Zortech C++ */
  20.     #define _Cdecl
  21.     #define _Near
  22. #elif defined(M_I86) && !defined(__ZTC__)   /* Microsoft C/QuickC */
  23.     #if !defined(NO_EXT_KEYS)
  24.         #define _Cdecl  cdecl
  25.         #define _Near   near
  26.     #else
  27.         #define _Cdecl
  28.         #define _Near
  29.     #endif
  30. #elif defined(__POWERC__)                   /* Power C */
  31.     #define _Cdecl
  32.     #define _Near
  33. #endif
  34.  
  35. /*---------------------------[ function prototypes ]-------------------------*/
  36.  
  37. char           *_Cdecl biosver(void);
  38. int             _Cdecl clockcal(void);
  39. char           *_Cdecl cxlver(void);
  40. void            _Cdecl delay_(unsigned duration);
  41. unsigned        _Cdecl expmem(void);
  42. unsigned        _Cdecl extmem(void);
  43. int             _Cdecl fcrypt(char *file,char *key);
  44. int             _Cdecl gameport(void);
  45. int             _Cdecl machid(void);
  46. int             _Cdecl mathchip(void);
  47. int             _Cdecl numflop(void);
  48. int             _Cdecl numpar(void);
  49. int             _Cdecl numser(void);
  50. char           *_Cdecl randfile(void);
  51. void            _Cdecl sound_(unsigned pitch,unsigned duration);
  52. void            _Cdecl _stdoutch(int ch);
  53. char           *_Cdecl sysdate(int dtype);
  54. char           *_Cdecl systime(int ttype);
  55. int             _Cdecl tabstop(int col,int tabwidth);
  56. unsigned long   _Cdecl timer(void);
  57.  
  58. /*-----------------[ definitions for common control codes ]------------------*/
  59.  
  60. #define NUL  0
  61. #define BEL  7
  62. #define BS   8
  63. #define HT   9
  64. #define LF   10
  65. #define FF   12
  66. #define CR   13
  67. #define ESC  27
  68.  
  69. /*------------------------[ definition of NULL ]-----------------------------*/
  70.  
  71. #if !defined(NULL)
  72.     #if defined(__TURBOC__)                     /* Turbo C */
  73.         #if defined(__TINY__) || defined(__SMALL__) || defined(__MEDIUM__)
  74.             #define NULL    0
  75.         #else
  76.             #define NULL    0L
  77.         #endif
  78.     #elif defined(__ZTC__)                      /* Zortech C++ */
  79.         #ifdef LPTR
  80.             #define NULL    0L
  81.         #else
  82.             #define NULL    0
  83.         #endif
  84.     #elif defined(M_I86) && !defined(__ZTC__)   /* Microsoft C/QuickC */
  85.         #if defined(M_I86SM) || defined(M_I86MM)
  86.             #define NULL    0
  87.         #else
  88.             #define NULL    0L
  89.         #endif
  90.     #elif defined(__POWERC__)                   /* Power C */
  91.         #define NULL    0
  92.     #endif
  93. #endif
  94.  
  95. /*-----------------------[ Boolean logic conditions ]------------------------*/
  96.  
  97. #define NO      0
  98. #define YES     1
  99. #define FALSE   0
  100. #define TRUE    1
  101. #define OFF     0
  102. #define ON      1
  103.  
  104. /*----------------[ machine ID codes returned from machid() ]----------------*/
  105.  
  106. #define IBMPC       255     /* IBM PC             */
  107. #define IBMPCXT     254     /* IBM PC/XT          */
  108. #define IBMPCJR     253     /* IBM PCjr           */
  109. #define IBMPCAT     252     /* IBM PC/AT          */
  110. #define IBMPCXT2    251     /* IBM PC/XT          */
  111. #define IBMCONV     249     /* IBM PC Convertible */
  112. #define SPERRYPC    48      /* Sperry PC          */
  113.  
  114. /*-----------------------[ macro-function definitions ]-----------------------*/
  115.  
  116. #if !defined(MK_FP)
  117. #define MK_FP(seg,ofs)  ((void far *) (((unsigned long)(seg) << 16) | \
  118.                         (unsigned)(ofs)))
  119. #endif
  120. #define beep() _stdoutch(BEL)
  121.