|
|
1.1 root 1: /***
2: *dos.h - definitions for MS-DOS interface routines
3: *
1.1.1.2 root 4: * Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved.
1.1 root 5: *
6: *Purpose:
7: * Defines the structs and unions used for the direct DOS interface
8: * routines; includes macros to access the segment and offset
9: * values of far pointers, so that they may be used by the routines; and
10: * provides function prototypes for direct DOS interface functions.
11: *
12: ****/
13:
14: #ifndef _INC_DOS
15:
16: #ifdef __cplusplus
17: extern "C" {
18: #endif
19:
20:
1.1.1.3 ! root 21: /*
! 22: * Conditional macro definition for function calling type and variable type
! 23: * qualifiers.
! 24: */
! 25: #if ( (_MSC_VER >= 800) && (_M_IX86 >= 300) )
! 26:
! 27: /*
! 28: * Definitions for MS C8-32 (386/486) compiler
! 29: */
! 30: #define _CRTAPI1 __cdecl
! 31: #define _CRTAPI2 __cdecl
! 32:
! 33: #elif ( _MSC_VER == 600 )
! 34:
! 35: /*
! 36: * Definitions for old MS C6-386 compiler
! 37: */
! 38: #define _CRTAPI1 _cdecl
! 39: #define _CRTAPI2 _cdecl
! 40: #define _M_IX86 300
! 41:
! 42: #else
! 43:
! 44: /*
! 45: * Other compilers (e.g., MIPS)
! 46: */
! 47: #define _CRTAPI1
! 48: #define _CRTAPI2
! 49:
1.1.1.2 root 50: #endif
1.1 root 51:
52:
53:
1.1.1.3 ! root 54:
1.1 root 55: /* _getdiskfree structure (duplicated in DIRECT.H) */
56:
57: #ifndef _DISKFREE_T_DEFINED
58:
59: struct _diskfree_t {
60: unsigned total_clusters;
61: unsigned avail_clusters;
62: unsigned sectors_per_cluster;
63: unsigned bytes_per_sector;
64: };
65:
66: #define _DISKFREE_T_DEFINED
67:
68: #endif
69:
70:
71:
72: /* File attribute constants */
73:
74: #define _A_NORMAL 0x00 /* Normal file - No read/write restrictions */
75: #define _A_RDONLY 0x01 /* Read only file */
76: #define _A_HIDDEN 0x02 /* Hidden file */
77: #define _A_SYSTEM 0x04 /* System file */
78: #define _A_SUBDIR 0x10 /* Subdirectory */
79: #define _A_ARCH 0x20 /* Archive file */
80:
81: /* external variable declarations */
82:
1.1.1.2 root 83: #if defined(_WIN32_) || defined(_POSIX_)
84:
85: #ifdef _DLL
86:
87: #define _osversion (*_osversion_dll)
88: #define _osmajor (*_osmajor_dll)
89: #define _osminor (*_osminor_dll)
90: #define _baseversion (*_baseversion_dll)
91: #define _basemajor (*_basemajor_dll)
92: #define _baseminor (*_baseminor_dll)
93: #define _pgmptr (*_pgmptr_dll)
94:
95: extern unsigned int * _osversion_dll;
96: extern unsigned int * _osmajor_dll;
97: extern unsigned int * _osminor_dll;
98: extern unsigned int * _baseversion_dll;
99: extern unsigned int * _basemajor_dll;
100: extern unsigned int * _baseminor_dll;
101: extern char ** _pgmptr_dll;
1.1 root 102:
1.1.1.2 root 103: #else
104:
105:
106: extern unsigned int _osversion;
1.1 root 107: extern unsigned int _osmajor;
108: extern unsigned int _osminor;
109: extern unsigned int _baseversion;
110: extern unsigned int _basemajor;
111: extern unsigned int _baseminor;
1.1.1.2 root 112: extern char * _pgmptr;
113:
114: #endif
115:
116: #else /* ndef (_WIN32_ || _POSIX_) */
117:
118: extern unsigned int _osversion;
119:
120: #endif /* _WIN32_ */
121:
1.1 root 122:
123: /* function prototypes */
124:
1.1.1.3 ! root 125: unsigned _CRTAPI1 _getdiskfree(unsigned, struct _diskfree_t *);
1.1 root 126:
127: #if !__STDC__
128: /* Non-ANSI name for compatibility */
129: #define diskfree_t _diskfree_t
130: #endif /* __STDC__ */
131:
132: /* restore default alignment */
133:
134:
135: #ifdef __cplusplus
136: }
137: #endif
138:
139: #define _INC_DOS
140: #endif /* _INC_DOS */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.