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