home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgLangD.iso / C++-7 / DISK7 / SOURCE / STARTUP / INTERNAL.H$ / INTERNAL
Encoding:
Text File  |  1991-11-06  |  3.9 KB  |  172 lines

  1. /***
  2. *internal.h - contains declarations of internal routines and variables
  3. *
  4. *    Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. *    Declares routines and variables used internally by the C run-time.
  8. *    These variables are declared "near" for efficiency.
  9. *    [Internal]
  10. *
  11. ****/
  12.  
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16.  
  17. /* no _FAR_ in internal builds */        /* _FAR_DEFINED */
  18. #undef _FAR_                    /* _FAR_DEFINED */
  19. #define _FAR_                    /* _FAR_DEFINED */
  20.  
  21. #define _LOAD_DS        /* _LOAD_DGROUP */
  22.                 /* _LOAD_DGROUP */
  23. #define _NEAR_ __near
  24. #define _PASCAL_ __pascal
  25.  
  26. #if (_MSC_VER <= 600)
  27. #define __cdecl     _cdecl
  28. #define __far       _far
  29. #define __near      _near
  30. #define __pascal    _pascal
  31. #endif
  32.  
  33. /* conditionally define macro for Windows DLL libs */
  34. #ifdef    _WINDLL
  35. #define _WINSTATIC    static
  36. #else
  37. #define _WINSTATIC
  38. #endif
  39.  
  40. extern char __near _commode;    /* default file commit mode */
  41.  
  42. extern int __near _nfile;    /* # of OS file handles */
  43. #ifdef _QWIN
  44. extern int __near _wfile;    /* # of QWIN file handles */
  45. extern int __near _wnfile;    /* total # of file handles */
  46. #endif
  47.  
  48. extern char __near _osfile[];
  49.  
  50. extern char __near __dnames[];
  51. extern char __near __mnames[];
  52.  
  53. extern int __near _days[];
  54. extern int __near _lpdays[];
  55.  
  56. #ifdef _QWIN
  57. extern int __near _qwinused;      /* QWIN system in use flag */
  58. #endif
  59.  
  60. #ifdef _WINDOWS
  61. /* Underlying DOS version */
  62. extern unsigned int __near __cdecl _dosversion;
  63. extern unsigned char __near __cdecl _dosmajor;
  64. extern unsigned char __near __cdecl _dosminor;
  65. #endif
  66.  
  67. /*
  68. #ifdef    _WINDOWS
  69. #ifdef _WINDLL
  70. extern unsigned int _hModule;
  71. extern unsigned int _wDataSeg;
  72. extern unsigned int _wHeapSize;
  73. extern char __far * _lpszCmdLine;
  74. #else
  75. extern unsigned int _hInstance;
  76. extern unsigned int _hPrevInstance;
  77. extern char __far * _lpszCmdLine;
  78. extern int _cmdShow;
  79. #endif
  80. #endif
  81. */
  82.  
  83. #ifndef _TIME_T_DEFINED
  84. typedef unsigned long time_t;    /* time value */
  85. #define _TIME_T_DEFINED     /* avoid multiple def's of time_t */
  86. #endif
  87.  
  88. extern time_t _dtoxtime(int, int, int, int, int, int);
  89.  
  90. #ifdef _TM_DEFINED
  91. extern int _isindst(struct tm *);
  92. #endif
  93.  
  94. extern void __tzset(void);
  95.  
  96. /**
  97. ** This variable is in the C start-up; the length must be kept synchronized
  98. **  It is used by the *cenvarg.c modules
  99. **/
  100.  
  101. extern char __near _acfinfo[]; /* "_C_FILE_INFO=" */
  102.  
  103. #define CFI_LENGTH  12    /* "_C_FILE_INFO" is 12 bytes long */
  104.  
  105. /* functions used by exec/spawn family */
  106.  
  107. extern int _cenvarg(const char * const *, const char * const *,
  108.         char **, char **, char *, const char *, const char *);
  109. extern int _doexec(int, const char *, int, char *, char *, int, int, int, int, int, int, unsigned int);
  110. extern int _dospawn(int, const char *, char *, char *);
  111. extern int _execload(const char *, const char * const *, const char * const *);
  112.  
  113.  
  114. extern char *_find(char *);
  115.  
  116.  
  117. #ifdef    _FILE_DEFINED
  118.  
  119. extern FILE * __near _lastiob;
  120.  
  121. FILE *_getstream(void);
  122.  
  123. FILE *_openfile(const char *, const char *, int, FILE *);
  124.  
  125. void __near _getbuf(FILE *);
  126.  
  127. void __near _freebuf(FILE *);
  128.  
  129. int __near _stbuf(FILE *);
  130.  
  131. void __near _ftbuf(int, FILE *);
  132.  
  133. int __near _flush(FILE *);
  134.  
  135. /* input and output are the guts of the scanf/printf family */
  136.  
  137. #ifndef _VA_LIST_DEFINED
  138. typedef char _FAR_ *va_list;
  139. #define _VA_LIST_DEFINED
  140. #endif
  141.  
  142. extern int _input(FILE *, const unsigned char *, va_list);
  143. extern int _output(FILE *, const char *, void *);
  144.  
  145. #endif
  146.  
  147. extern int __near _cflush;
  148.  
  149. extern unsigned int __near _tmpoff;
  150.  
  151. extern unsigned int __near _tempoff;
  152.  
  153. extern unsigned int __near _old_pfxlen;
  154.  
  155. char * __near _getpath(const char *, char *, unsigned);
  156.  
  157. #ifdef __cplusplus
  158. }
  159. #endif
  160.  
  161. #ifdef __cplusplus
  162. #include <new.h>
  163.  
  164. extern "C" {
  165.     extern _PNH _pnhNearHeap;
  166.     extern _PNH _pnhFarHeap;
  167.     extern _PNHH _pnhhHugeHeap;
  168.     extern _PNHB _pnhbBasedHeap;
  169.     }
  170.  
  171. #endif    // __cplusplus
  172.