VirtualBox

source: kBuild/trunk/src/fastdep/os2fake.h@ 1158

Last change on this file since 1158 was 7, checked in by bird, 22 years ago

Initial version from odin32.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.8 KB
Line 
1/* $Id: os2fake.h 7 2002-10-15 21:00:40Z bird $
2 *
3 * Structures, defines and function prototypes for the OS/2 fake library.
4 *
5 * Copyright (c) 2001 knut st. osmundsen ([email protected])
6 *
7 * Project Odin Software License can be found in LICENSE.TXT
8 *
9 */
10
11
12#ifndef _os2fake_h_
13#define _os2fake_h_
14
15
16/*******************************************************************************
17* Defined Constants And Macros *
18*******************************************************************************/
19#ifndef OS2ENTRY
20#define OS2ENTRY
21#endif
22
23#ifndef CCHMAXPATHCOMP
24#define CCHMAXPATHCOMP 256
25#endif
26
27#ifndef CCHMAXPATH
28#define CCHMAXPATH 260
29#endif
30
31#ifndef FIL_STANDARD
32#define FIL_STANDARD 1
33#define FIL_QUERYEASIZE 2
34#define FIL_QUERYEASFROMLIST 3
35#define FIL_QUERYFULLNAME 5
36#endif
37
38#define FILE_NORMAL 0x0000
39#define FILE_READONLY 0x0001
40#define FILE_HIDDEN 0x0002
41#define FILE_SYSTEM 0x0004
42#define FILE_DIRECTORY 0x0010
43#define FILE_ARCHIVED 0x0020
44
45#ifndef HDIR_CREATE
46#define HDIR_CREATE (-1)
47#endif
48
49#ifndef TRUE
50#define TRUE 1
51#endif
52#ifndef FALSE
53#define FALSE 0
54#endif
55
56#ifndef NO_ERROR
57#define NO_ERROR 0
58#endif
59
60
61
62/*******************************************************************************
63* Structures and Typedefs *
64*******************************************************************************/
65typedef char * PCH;
66
67typedef char * PSZ;
68typedef const char * PCSZ;
69
70typedef unsigned long ULONG;
71typedef ULONG * PULONG;
72
73typedef unsigned short USHORT;
74typedef USHORT * PUSHORT;
75
76#if !defined(_WINDEF_)
77typedef unsigned int UINT;
78typedef UINT * PUINT;
79
80typedef unsigned char UCHAR;
81typedef UCHAR * PUCHAR;
82
83#if !defined(CHAR)
84typedef char CHAR;
85typedef CHAR * PCHAR;
86#endif
87
88typedef unsigned long BOOL;
89typedef BOOL * PBOOL;
90#endif
91
92#if !defined(VOID)
93typedef void VOID;
94#endif
95#if !defined(_WINNT_) && !defined(PVOID)
96typedef VOID * PVOID;
97#endif
98
99typedef unsigned long HDIR;
100typedef HDIR * PHDIR;
101
102typedef unsigned long APIRET;
103
104
105typedef struct _FTIME /* ftime */
106{
107#if defined(__IBMC__) || defined(__IBMCPP__)
108 UINT twosecs : 5;
109 UINT minutes : 6;
110 UINT hours : 5;
111#else
112 USHORT twosecs : 5;
113 USHORT minutes : 6;
114 USHORT hours : 5;
115#endif
116} FTIME;
117typedef FTIME *PFTIME;
118
119
120typedef struct _FDATE /* fdate */
121{
122#if defined(__IBMC__) || defined(__IBMCPP__)
123 UINT day : 5;
124 UINT month : 4;
125 UINT year : 7;
126#else
127 USHORT day : 5;
128 USHORT month : 4;
129 USHORT year : 7;
130#endif
131} FDATE;
132typedef FDATE *PFDATE;
133
134
135typedef struct _FILESTATUS3 /* fsts3 */
136{
137 FDATE fdateCreation;
138 FTIME ftimeCreation;
139 FDATE fdateLastAccess;
140 FTIME ftimeLastAccess;
141 FDATE fdateLastWrite;
142 FTIME ftimeLastWrite;
143 ULONG cbFile;
144 ULONG cbFileAlloc;
145 ULONG attrFile;
146} FILESTATUS3;
147typedef FILESTATUS3 *PFILESTATUS3;
148
149typedef struct _FILEFINDBUF3 /* findbuf3 */
150{
151 ULONG oNextEntryOffset;
152 FDATE fdateCreation;
153 FTIME ftimeCreation;
154 FDATE fdateLastAccess;
155 FTIME ftimeLastAccess;
156 FDATE fdateLastWrite;
157 FTIME ftimeLastWrite;
158 ULONG cbFile;
159 ULONG cbFileAlloc;
160 ULONG attrFile;
161 UCHAR cchName;
162 CHAR achName[CCHMAXPATHCOMP];
163} FILEFINDBUF3;
164typedef FILEFINDBUF3 *PFILEFINDBUF3;
165
166
167/*******************************************************************************
168* Function Prototypes *
169*******************************************************************************/
170APIRET OS2ENTRY DosQueryPathInfo(
171 PCSZ pszPathName,
172 ULONG ulInfoLevel,
173 PVOID pInfoBuf,
174 ULONG cbInfoBuf);
175
176APIRET OS2ENTRY DosFindFirst(
177 PCSZ pszFileSpec,
178 PHDIR phdir,
179 ULONG flAttribute,
180 PVOID pFindBuf,
181 ULONG cbFindBuf,
182 PULONG pcFileNames,
183 ULONG ulInfoLevel);
184
185APIRET OS2ENTRY DosFindNext(
186 HDIR hDir,
187 PVOID pFindBuf,
188 ULONG cbFindBuf,
189 PULONG pcFileNames);
190
191APIRET OS2ENTRY DosFindClose(
192 HDIR hDir);
193
194
195
196#endif
197
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette