[1190] | 1 |
|
---|
| 2 | /***********************************************************************
|
---|
| 3 |
|
---|
[1202] | 4 | $Id: wrappers.h 1839 2015-08-12 04:49:46Z stevenhl $
|
---|
[1190] | 5 |
|
---|
[1327] | 6 | Wrappers with error checking
|
---|
[1190] | 7 |
|
---|
[1202] | 8 | Copyright (c) 1993-98 M. Kimes
|
---|
[1839] | 9 | Copyright (c) 2008, 2015 Steven H. Levine
|
---|
[1190] | 10 |
|
---|
[1327] | 11 | 08 Dec 08 SHL Add missing OS2_INCLUDED check
|
---|
[1439] | 12 | 12 Jul 09 GKY Add xDosQueryAppType and xDoxAlloc... to allow FM/2 to load in high memory
|
---|
[1627] | 13 | 26 Aug 11 GKY Add a low mem version of xDosAlloc* wrappers; move error checking into all the
|
---|
[1839] | 14 | xDosAlloc* wrappers.
|
---|
| 15 | 09 Aug 15 SHL Add xDosGetInfoBlocks
|
---|
[1190] | 16 |
|
---|
| 17 | ***********************************************************************/
|
---|
| 18 |
|
---|
| 19 | #if !defined(WRAPPERS_H)
|
---|
| 20 | #define WRAPPERS_H
|
---|
| 21 |
|
---|
[1327] | 22 | #if !defined(OS2_INCLUDED)
|
---|
| 23 | #include <os2.h>
|
---|
| 24 | #endif
|
---|
| 25 |
|
---|
[1439] | 26 | APIRET xDosQueryAppType(PCSZ pszName, PULONG pFlags);
|
---|
| 27 |
|
---|
[1438] | 28 | APIRET xDosAllocSharedMem(PPVOID ppb,
|
---|
[1839] | 29 | PSZ pszName,
|
---|
| 30 | ULONG cb,
|
---|
| 31 | PCSZ pszSrcFile,
|
---|
| 32 | UINT uiLineNumber);
|
---|
[1438] | 33 |
|
---|
| 34 | APIRET xDosAllocMem(PPVOID ppb,
|
---|
[1839] | 35 | ULONG cb,
|
---|
| 36 | PCSZ pszSrcFile,
|
---|
| 37 | UINT uiLineNumber);
|
---|
[1438] | 38 |
|
---|
[1627] | 39 | APIRET xDosAllocMemLow(PPVOID ppb,
|
---|
[1839] | 40 | ULONG cb,
|
---|
| 41 | PCSZ pszSrcFile,
|
---|
| 42 | UINT uiLineNumber);
|
---|
[1627] | 43 |
|
---|
[1190] | 44 | APIRET xDosFindFirst(PSZ pszFileSpec,
|
---|
| 45 | PHDIR phdir,
|
---|
[1839] | 46 | ULONG flAttribute,
|
---|
| 47 | PVOID pfindbuf,
|
---|
| 48 | ULONG cbBuf,
|
---|
[1190] | 49 | PULONG pcFileNames,
|
---|
[1839] | 50 | ULONG ulInfoLevel);
|
---|
| 51 | APIRET xDosFindNext(HDIR hDir,
|
---|
| 52 | PVOID pfindbuf,
|
---|
| 53 | ULONG cbfindbuf,
|
---|
[1190] | 54 | PULONG pcFilenames,
|
---|
[1839] | 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,
|
---|
[1190] | 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,
|
---|
[1544] | 72 | UINT uiLineNumber, BOOL fSilent);
|
---|
[1190] | 73 | VOID xfree(PVOID pv, PCSZ pszSrcFile, UINT uiLineNumber);
|
---|
| 74 | FILE *xfsopen(PCSZ pszFileName, PCSZ pszMode, INT fSharemode, PCSZ pszSrcFile,
|
---|
[1544] | 75 | UINT uiLineNumber, BOOL fSilent);
|
---|
[1190] | 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 |
|
---|
[1215] | 81 | // Data declarations
|
---|
| 82 | extern BOOL fNoLargeFileSupport;
|
---|
[1190] | 83 |
|
---|
| 84 | #endif // WRAPPERS_H
|
---|