| [1190] | 1 |  | 
|---|
|  | 2 | /*********************************************************************** | 
|---|
|  | 3 |  | 
|---|
| [1202] | 4 | $Id: wrappers.h 1628 2011-08-27 19:35:39Z gyoung $ | 
|---|
| [1190] | 5 |  | 
|---|
| [1327] | 6 | Wrappers with error checking | 
|---|
| [1190] | 7 |  | 
|---|
| [1202] | 8 | Copyright (c) 1993-98 M. Kimes | 
|---|
|  | 9 | Copyright (c) 2008 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 | 
|---|
|  | 14 | xDosAlloc* wrappers. | 
|---|
| [1190] | 15 |  | 
|---|
|  | 16 | ***********************************************************************/ | 
|---|
|  | 17 |  | 
|---|
|  | 18 | #if !defined(WRAPPERS_H) | 
|---|
|  | 19 | #define WRAPPERS_H | 
|---|
|  | 20 |  | 
|---|
| [1327] | 21 | #if !defined(OS2_INCLUDED) | 
|---|
|  | 22 | #include <os2.h> | 
|---|
|  | 23 | #endif | 
|---|
|  | 24 |  | 
|---|
| [1439] | 25 | APIRET xDosQueryAppType(PCSZ pszName, PULONG pFlags); | 
|---|
|  | 26 |  | 
|---|
| [1438] | 27 | APIRET xDosAllocSharedMem(PPVOID ppb, | 
|---|
|  | 28 | PSZ pszName, | 
|---|
|  | 29 | ULONG cb, | 
|---|
| [1627] | 30 | PCSZ pszSrcFile, | 
|---|
|  | 31 | UINT uiLineNumber); | 
|---|
| [1438] | 32 |  | 
|---|
|  | 33 | APIRET xDosAllocMem(PPVOID ppb, | 
|---|
|  | 34 | ULONG cb, | 
|---|
| [1439] | 35 | PCSZ pszSrcFile, | 
|---|
| [1627] | 36 | UINT uiLineNumber); | 
|---|
| [1438] | 37 |  | 
|---|
| [1627] | 38 | APIRET xDosAllocMemLow(PPVOID ppb, | 
|---|
|  | 39 | ULONG cb, | 
|---|
|  | 40 | PCSZ pszSrcFile, | 
|---|
|  | 41 | UINT uiLineNumber); | 
|---|
|  | 42 |  | 
|---|
| [1190] | 43 | APIRET xDosFindFirst(PSZ pszFileSpec, | 
|---|
|  | 44 | PHDIR phdir, | 
|---|
|  | 45 | ULONG  flAttribute, | 
|---|
|  | 46 | PVOID  pfindbuf, | 
|---|
|  | 47 | ULONG  cbBuf, | 
|---|
|  | 48 | PULONG pcFileNames, | 
|---|
|  | 49 | ULONG  ulInfoLevel); | 
|---|
|  | 50 | APIRET xDosFindNext(HDIR   hDir, | 
|---|
|  | 51 | PVOID  pfindbuf, | 
|---|
|  | 52 | ULONG  cbfindbuf, | 
|---|
|  | 53 | PULONG pcFilenames, | 
|---|
|  | 54 | ULONG  ulInfoLevel);        // 06 Oct 07 SHL Added | 
|---|
|  | 55 | APIRET xDosSetPathInfo(PSZ   pszPathName, | 
|---|
|  | 56 | ULONG ulInfoLevel, | 
|---|
|  | 57 | PVOID pInfoBuf, | 
|---|
|  | 58 | ULONG cbInfoBuf, | 
|---|
|  | 59 | ULONG flOptions); | 
|---|
|  | 60 | PSZ xfgets(PSZ pszBuf, size_t cMaxBytes, FILE * fp, PCSZ pszSrcFile, | 
|---|
|  | 61 | UINT uiLineNumber); | 
|---|
|  | 62 | PSZ xfgets_bstripcr(PSZ pszBuf, size_t cMaxBytes, FILE * fp, PCSZ pszSrcFile, | 
|---|
|  | 63 | UINT uiLineNumber); | 
|---|
|  | 64 | FILE *xfopen(PCSZ pszFileName, PCSZ pszMode, PCSZ pszSrcFile, | 
|---|
| [1544] | 65 | UINT uiLineNumber, BOOL fSilent); | 
|---|
| [1190] | 66 | VOID xfree(PVOID pv, PCSZ pszSrcFile, UINT uiLineNumber); | 
|---|
|  | 67 | FILE *xfsopen(PCSZ pszFileName, PCSZ pszMode, INT fSharemode, PCSZ pszSrcFile, | 
|---|
| [1544] | 68 | UINT uiLineNumber, BOOL fSilent); | 
|---|
| [1190] | 69 | PVOID xmalloc(size_t cBytes, PCSZ pszSrcFile, UINT uiLineNumber); | 
|---|
|  | 70 | PVOID xmallocz(size_t cBytes, PCSZ pszSrcFile, UINT uiLineNumber); | 
|---|
|  | 71 | PVOID xrealloc(PVOID pvIn, size_t cBytes, PCSZ pszSrcFile, UINT uiLineNumber); | 
|---|
|  | 72 | PVOID xstrdup(PCSZ pszIn, PCSZ pszSrcFile, UINT uiLineNumber); | 
|---|
|  | 73 |  | 
|---|
| [1215] | 74 | // Data declarations | 
|---|
|  | 75 | extern BOOL fNoLargeFileSupport; | 
|---|
| [1190] | 76 |  | 
|---|
|  | 77 | #endif // WRAPPERS_H | 
|---|