1 |
|
---|
2 | /***********************************************************************
|
---|
3 |
|
---|
4 | $Id: wrappers.h 1839 2015-08-12 04:49:46Z stevenhl $
|
---|
5 |
|
---|
6 | Wrappers with error checking
|
---|
7 |
|
---|
8 | Copyright (c) 1993-98 M. Kimes
|
---|
9 | Copyright (c) 2008, 2015 Steven H. Levine
|
---|
10 |
|
---|
11 | 08 Dec 08 SHL Add missing OS2_INCLUDED check
|
---|
12 | 12 Jul 09 GKY Add xDosQueryAppType and xDoxAlloc... to allow FM/2 to load in high memory
|
---|
13 | 26 Aug 11 GKY Add a low mem version of xDosAlloc* wrappers; move error checking into all the
|
---|
14 | xDosAlloc* wrappers.
|
---|
15 | 09 Aug 15 SHL Add xDosGetInfoBlocks
|
---|
16 |
|
---|
17 | ***********************************************************************/
|
---|
18 |
|
---|
19 | #if !defined(WRAPPERS_H)
|
---|
20 | #define WRAPPERS_H
|
---|
21 |
|
---|
22 | #if !defined(OS2_INCLUDED)
|
---|
23 | #include <os2.h>
|
---|
24 | #endif
|
---|
25 |
|
---|
26 | APIRET xDosQueryAppType(PCSZ pszName, PULONG pFlags);
|
---|
27 |
|
---|
28 | APIRET xDosAllocSharedMem(PPVOID ppb,
|
---|
29 | PSZ pszName,
|
---|
30 | ULONG cb,
|
---|
31 | PCSZ pszSrcFile,
|
---|
32 | UINT uiLineNumber);
|
---|
33 |
|
---|
34 | APIRET xDosAllocMem(PPVOID ppb,
|
---|
35 | ULONG cb,
|
---|
36 | PCSZ pszSrcFile,
|
---|
37 | UINT uiLineNumber);
|
---|
38 |
|
---|
39 | APIRET xDosAllocMemLow(PPVOID ppb,
|
---|
40 | ULONG cb,
|
---|
41 | PCSZ pszSrcFile,
|
---|
42 | UINT uiLineNumber);
|
---|
43 |
|
---|
44 | APIRET xDosFindFirst(PSZ pszFileSpec,
|
---|
45 | PHDIR phdir,
|
---|
46 | ULONG flAttribute,
|
---|
47 | PVOID pfindbuf,
|
---|
48 | ULONG cbBuf,
|
---|
49 | PULONG pcFileNames,
|
---|
50 | ULONG ulInfoLevel);
|
---|
51 | APIRET xDosFindNext(HDIR hDir,
|
---|
52 | PVOID pfindbuf,
|
---|
53 | ULONG cbfindbuf,
|
---|
54 | PULONG pcFilenames,
|
---|
55 | ULONG ulInfoLevel); // 06 Oct 07 SHL Added
|
---|
56 |
|
---|
57 | #ifdef INCL_DOSPROCESS // // PPIB PTIB
|
---|
58 | APIRET xDosGetInfoBlocks(PTIB *pptib,
|
---|
59 | PPIB *pppib); // 2015-08-09 SHL added
|
---|
60 | #endif
|
---|
61 |
|
---|
62 | APIRET xDosSetPathInfo(PSZ pszPathName,
|
---|
63 | ULONG ulInfoLevel,
|
---|
64 | PVOID pInfoBuf,
|
---|
65 | ULONG cbInfoBuf,
|
---|
66 | ULONG flOptions);
|
---|
67 | PSZ xfgets(PSZ pszBuf, size_t cMaxBytes, FILE * fp, PCSZ pszSrcFile,
|
---|
68 | UINT uiLineNumber);
|
---|
69 | PSZ xfgets_bstripcr(PSZ pszBuf, size_t cMaxBytes, FILE * fp, PCSZ pszSrcFile,
|
---|
70 | UINT uiLineNumber);
|
---|
71 | FILE *xfopen(PCSZ pszFileName, PCSZ pszMode, PCSZ pszSrcFile,
|
---|
72 | UINT uiLineNumber, BOOL fSilent);
|
---|
73 | VOID xfree(PVOID pv, PCSZ pszSrcFile, UINT uiLineNumber);
|
---|
74 | FILE *xfsopen(PCSZ pszFileName, PCSZ pszMode, INT fSharemode, PCSZ pszSrcFile,
|
---|
75 | UINT uiLineNumber, BOOL fSilent);
|
---|
76 | PVOID xmalloc(size_t cBytes, PCSZ pszSrcFile, UINT uiLineNumber);
|
---|
77 | PVOID xmallocz(size_t cBytes, PCSZ pszSrcFile, UINT uiLineNumber);
|
---|
78 | PVOID xrealloc(PVOID pvIn, size_t cBytes, PCSZ pszSrcFile, UINT uiLineNumber);
|
---|
79 | PVOID xstrdup(PCSZ pszIn, PCSZ pszSrcFile, UINT uiLineNumber);
|
---|
80 |
|
---|
81 | // Data declarations
|
---|
82 | extern BOOL fNoLargeFileSupport;
|
---|
83 |
|
---|
84 | #endif // WRAPPERS_H
|
---|