Changeset 1627 for trunk/dll/eas.c


Ignore:
Timestamp:
Aug 26, 2011, 11:48:06 PM (14 years ago)
Author:
Gregg Young
Message:

Add a low mem version of xDosAlloc* wrappers; move error checking into all the xDosAlloc* wrappers. Ticket 471

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/eas.c

    r1547 r1627  
    2626  17 JAN 10 GKY Changes to get working with Watcom 1.9 Beta (1/16/10). Mostly cast CHAR CONSTANT * as CHAR *.
    2727  23 Oct 10 GKY Added button to allow opening of a new file's eas from the EA dialog.
     28  26 Aug 11 GKY Add a low mem version of xDosAlloc* wrappers; move error checking into all the
     29                xDosAlloc* wrappers.
    2830
    2931***********************************************************************/
     
    200202            ULONG ealen;
    201203            CHAR *eaval;
    202             APIRET rc;
    203204
    204205            ealen = sizeof(FEA2LIST) + strlen(s) + 64;
    205             rc = xDosAllocMem((PPVOID) & pfealist, ealen + 1,
     206            if (!xDosAllocMem((PPVOID) & pfealist, ealen + 1,
    206207                              PAG_COMMIT | PAG_READ | PAG_WRITE,
    207                               pszSrcFile, __LINE__);
    208             if (rc)
    209               Dos_Error(MB_CANCEL, rc, HWND_DESKTOP, pszSrcFile, __LINE__,
    210                         GetPString(IDS_OUTOFMEMORY));
    211             else {
     208                              pszSrcFile, __LINE__)) {
    212209              memset(pfealist, 0, ealen + 1);
    213210              pfealist->cbList = ealen;
     
    11081105  }
    11091106
    1110   rc = xDosAllocMem((PPVOID) & pfealist, ealen,
    1111                     PAG_COMMIT | PAG_READ | PAG_WRITE, pszSrcFile, __LINE__);
    1112   if (rc)
    1113     Dos_Error(MB_CANCEL, rc, HWND_DESKTOP, pszSrcFile, __LINE__,
    1114               GetPString(IDS_OUTOFMEMORY));
    1115   else {
     1107  if (!xDosAllocMem((PPVOID) & pfealist, ealen,
     1108                    PAG_COMMIT | PAG_READ | PAG_WRITE, pszSrcFile, __LINE__)) {
    11161109    memset(pfealist, 0, ealen);
    11171110    pfealist->list[0].oNextEntryOffset = 0;
Note: See TracChangeset for help on using the changeset viewer.