Changeset 1439


Ignore:
Timestamp:
Jul 12, 2009, 11:57:04 PM (16 years ago)
Author:
Gregg Young
Message:

Changes to allow high mem loading of dll; Refactor .LONGNAME and .SUBJECT EA fetch to FetchCommonEAs. Add szFSType to FillInRecordFromFSA use to bypass EA scan and size formatting for tree container; Fix labels/FS type to work on scan on NOPRESCAN Drives; Fixed dbl directory names on restore of dir cnrs; (Tickets 47, 339, 363, 368, 369, 370)

Location:
trunk
Files:
31 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/arccnrs.c

    r1438 r1439  
    7676  08 Mar 09 GKY Removed variable aurguments from docopyf and unlinkf (not used)
    7777  12 Mar 09 SHL Use common SearchContainer
     78  12 Jul 09 GKY Add xDosQueryAppType and xDoxAlloc... to allow FM/2 to load in high memory
    7879
    7980***********************************************************************/
     
    631632      *p = 0;
    632633    DosError(FERR_DISABLEHARDERR);
    633     if (!DosQueryAppType(s, &apptype) &&
     634    if (!xDosQueryAppType(s, &apptype) &&
    634635        (apptype & FAPPTYP_DOS ||
    635636         apptype & FAPPTYP_WINDOWSREAL ||
  • trunk/dll/autoview.c

    r1438 r1439  
    2929  07 Feb 09 GKY Eliminate Win_Error2 by moving function names to PCSZs used in Win_Error
    3030  08 Mar 09 GKY Renamed commafmt.h i18nutil.h
     31  12 Jul 09 GKY Add xDosQueryAppType and xDoxAlloc... to allow FM/2 to load in high memory
    3132
    3233***********************************************************************/
     
    137138
    138139  rc = xDosAllocMem((PPVOID) & pfealist, ealen, PAG_COMMIT | PAG_READ |
    139                     PAG_WRITE | OBJ_TILE);
     140                    PAG_WRITE, pszSrcFile, __LINE__);
    140141  if (rc || !pfealist)
    141142    Dos_Error(MB_CANCEL, rc, hwnd, pszSrcFile, __LINE__,
  • trunk/dll/avv.c

    r1398 r1439  
    2929  23 Nov 08 JBS Support use of CMD files in archiver definitions
    3030  11 Jan 08 GKY Replace "ARCHIVER.BB2" in string file with global set at compile in init.c
     31  12 Jul 09 GKY Add xDosQueryAppType and xDoxAlloc... to allow FM/2 to load in high memory
    3132
    3233***********************************************************************/
     
    403404    *error = 1;
    404405  else {
    405     ret = (INT) DosQueryAppType(p, &apptype);
     406    ret = (INT) xDosQueryAppType(p, &apptype);
    406407    apptype &= (~FAPPTYP_32BIT);
    407408    if (!apptype ||
  • trunk/dll/cmdline.c

    r1438 r1439  
    2121  24 Aug 08 GKY Warn full drive on save of .DAT file; prevent loss of existing file
    2222  28 Jun 09 GKY Added AddBackslashToPath() to remove repeatative code.
     23  12 Jul 09 GKY Add xDosQueryAppType and xDoxAlloc... to allow FM/2 to load in high memory
    2324
    2425***********************************************************************/
     
    434435        }
    435436      }
    436       if (DosQueryAppType(executable, &apptype) ||
     437      if (xDosQueryAppType(executable, &apptype) ||
    437438          (apptype && !(apptype &
    438439                        (FAPPTYP_NOTWINDOWCOMPAT |
  • trunk/dll/collect.c

    r1430 r1439  
    6666  08 Mar 09 GKY Additional strings move to PCSZs in init.c
    6767  06 Jun 09 GKY Add option to show file system type or drive label in tree
     68  12 Jul 09 GKY Add szFSType to FillInRecordFromFSA use to bypass EA scan and size formatting
     69                for tree container
    6870
    6971***********************************************************************/
     
    836838                dcd->ullTotalBytes += FillInRecordFromFSA(dcd->hwndCnr, pci,
    837839                                                          fullname,
    838                                                           &fs4, FALSE, NULL, dcd);
     840                                                          &fs4, FALSE, 0, dcd);
    839841                memset(&ri, 0, sizeof(RECORDINSERT));
    840842                ri.cb = sizeof(RECORDINSERT);
  • trunk/dll/copyf.c

    r1438 r1439  
    2222  08 Mar 09 GKY Removed variable aurguments from docopyf and unlinkf (not used)
    2323  28 Jun 09 GKY Added AddBackslashToPath() to remove repeatative code.
     24  12 Jul 09 GKY Add xDosQueryAppType and xDoxAlloc... to allow FM/2 to load in high memory
    2425
    2526***********************************************************************/
     
    313314    ealen = sizeof(FEALIST) + 10;
    314315  rc = xDosAllocMem((PPVOID) & pfealist,
    315                     ealen + 32L, OBJ_TILE | PAG_COMMIT | PAG_READ | PAG_WRITE);
     316                    ealen + 32L, PAG_COMMIT | PAG_READ | PAG_WRITE,
     317                    pszSrcFile, __LINE__);
    316318  if (rc)
    317319    Dos_Error(MB_CANCEL, rc, HWND_DESKTOP, pszSrcFile, __LINE__,
  • trunk/dll/datamin.c

    r1438 r1439  
    2828  07 Feb 09 GKY Add *DateFormat functions to format dates based on locale
    2929  08 Mar 09 GKY Renamed commafmt.h i18nutil.h
     30  12 Jul 09 GKY Add xDosQueryAppType and xDoxAlloc... to allow FM/2 to load in high memory
    3031
    3132***********************************************************************/
     
    853854
    854855        rc = xDosAllocMem((PVOID)&pbh, USHRT_MAX + 4096,
    855                           PAG_COMMIT | OBJ_TILE | PAG_READ | PAG_WRITE);
     856                          PAG_COMMIT | PAG_READ | PAG_WRITE,
     857                          pszSrcFile, __LINE__);
    856858        if (rc)
    857859          Dos_Error(MB_CANCEL, rc, hwnd, pszSrcFile, __LINE__,
     
    892894
    893895        rc = xDosAllocMem((PVOID) & pbh, USHRT_MAX + 4096,
    894                           PAG_COMMIT | OBJ_TILE | PAG_READ | PAG_WRITE);
     896                          PAG_COMMIT | PAG_READ | PAG_WRITE,
     897                          pszSrcFile, __LINE__);
    895898        if (rc)
    896899          Dos_Error(MB_CANCEL, rc, hwnd, pszSrcFile, __LINE__,
  • trunk/dll/dircnrs.c

    r1438 r1439  
    804804                            MPFROMP(pci),
    805805                            MPFROM2SHORT(CMA_FIRSTCHILD, CMA_ITEMORDER));
    806           if (!pciC) {
    807             Stubby(dcd->hwndCnr, pci);
     806          if (!pciC) {
     807            if (fInitialDriveScan)
     808              Stubby(dcd->hwndCnr, pci);
     809            else {
     810              while (StubbyScanCount != 0)
     811                DosSleep(50);
     812              Stubby(dcd->hwndCnr, pci);
     813            }
    808814          }
    809815        }
     
    16111617              DIR_SORT), dcd->sortFlags, FALSE);
    16121618      SayView(WinWindowFromID(WinQueryWindow(hwnd, QW_PARENT),
    1613               DIR_VIEW), dcd->flWindowAttr);
     1619                              DIR_VIEW), dcd->flWindowAttr);
     1620      //DbgMsg(pszSrcFile, __LINE__, "UM_SETUP2 %p pci %p", hwnd, dcd);
    16141621    } else
    16151622      PostMsg(hwnd, WM_CLOSE, MPVOID, MPVOID);
     
    27972804                  if (Flesh(hwnd, pci) &&
    27982805                      SHORT2FROMMP(mp1) == CN_EXPANDTREE &&
    2799                       !dcd->suspendview && fTopDir)
    2800                     PostMsg(hwnd, UM_TOPDIR, MPFROMP(pci), MPVOID);
     2806                      !dcd->suspendview && fTopDir) {
     2807                    PostMsg(hwnd, UM_TOPDIR, MPFROMP(pci), MPVOID);
     2808                    //DbgMsg(pszSrcFile, __LINE__, "UM_TOPDIR %p pci %p", hwnd, pci);
     2809                  }
    28012810                }
    28022811                driveserial[toupper(*pci->pszFileName) - 'A'] = volser.serial;
     
    28042813            }
    28052814            else if (SHORT2FROMMP(mp1) == CN_EXPANDTREE) {
    2806               if (Flesh(hwnd, pci) && !dcd->suspendview && fTopDir)
     2815              if (Flesh(hwnd, pci) && !dcd->suspendview && fTopDir) {
    28072816                PostMsg(hwnd, UM_TOPDIR, MPFROMP(pci), MPVOID);
    2808             }
    2809             if (SHORT2FROMMP(mp1) == CN_EXPANDTREE && !dcd->suspendview)
     2817                //DbgMsg(pszSrcFile, __LINE__, "UM_TOPDIR %p pci %p", hwnd, pci);
     2818              }
     2819            }
     2820            if (SHORT2FROMMP(mp1) == CN_EXPANDTREE && !dcd->suspendview) {
    28102821              WinSendMsg(hwnd, UM_FILTER, MPVOID, MPVOID);
     2822              //DbgMsg(pszSrcFile, __LINE__, "UM_TOPDIR %p pci %p", hwnd, pci);
     2823            }
    28112824          }
    28122825        }
  • trunk/dll/eas.c

    r1438 r1439  
    2323  29 Feb 08 GKY Use xfree where appropriate
    2424  07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook.
     25  12 Jul 09 GKY Add xDosQueryAppType and xDoxAlloc... to allow FM/2 to load in high memory
    2526
    2627***********************************************************************/
     
    199200            ealen = sizeof(FEA2LIST) + strlen(s) + 64;
    200201            rc = xDosAllocMem((PPVOID) & pfealist, ealen + 1,
    201                               OBJ_TILE | PAG_COMMIT | PAG_READ | PAG_WRITE);
     202                              PAG_COMMIT | PAG_READ | PAG_WRITE,
     203                              pszSrcFile, __LINE__);
    202204            if (rc)
    203205              Dos_Error(MB_CANCEL, rc, HWND_DESKTOP, pszSrcFile, __LINE__,
     
    10651067
    10661068  rc = xDosAllocMem((PPVOID) & pfealist, ealen,
    1067                     OBJ_TILE | PAG_COMMIT | PAG_READ | PAG_WRITE);
     1069                    PAG_COMMIT | PAG_READ | PAG_WRITE, pszSrcFile, __LINE__);
    10681070  if (rc)
    10691071    Dos_Error(MB_CANCEL, rc, HWND_DESKTOP, pszSrcFile, __LINE__,
  • trunk/dll/filldir.c

    r1438 r1439  
    7171  06 Jun 09 GKY Add option to show file system type or drive label in tree
    7272  28 Jun 09 GKY Added AddBackslashToPath() to remove repeatative code.
     73  06 Jul 09 SHL Refactor .LONGNAME and .SUBJECT EA fetch to FetchCommonEAs
     74  12 Jul 09 GKY Add szFSType to FillInRecordFromFSA use to bypass EA scan and size formatting
     75                for tree container
    7376
    7477***********************************************************************/
     
    220223        priority_normal();
    221224        ret = Stubby(StubbyScan->hwndCnr, StubbyScan->pci);
    222         //DbgMsg(pszSrcFile, __LINE__, "Stubby %i ", ret);
     225        //DbgMsg(pszSrcFile, __LINE__, "Stubby %i ", ret);
    223226        if (ret == 1) {
    224227          if (WinIsWindow((HAB)0, StubbyScan->hwndCnr)) {
     
    227230                       MPFROMP(&StubbyScan->pci),
    228231                       MPFROM2SHORT(1, CMA_ERASE | CMA_REPOSITION));
    229             if (fRScanLocal) {
    230               if (!(driveflags[toupper(*StubbyScan->pci->pszFileName) - 'A'] &
    231                     ((fRScanNoWrite ? 0 : DRIVE_NOTWRITEABLE) |
    232                      (fRScanRemote ? 0 : DRIVE_REMOTE) |
    233                      (fRScanSlow ? 0 : DRIVE_SLOW) |
    234                      (fRScanVirtual ? 0 : DRIVE_VIRTUAL)))
    235                   && fInitialDriveScan) {
    236                 WinSendMsg(StubbyScan->hwndCnr, CM_EXPANDTREE, MPFROMP(StubbyScan->pci), MPVOID);
    237                 //DbgMsg(pszSrcFile, __LINE__, "expanded %x %s", StubbyScan->hwndCnr, StubbyScan->pci->pszFileName);
    238                 WinSendMsg(StubbyScan->hwndCnr, CM_COLLAPSETREE, MPFROMP(StubbyScan->pci), MPVOID);
    239               }
    240             }
    241             else  if ((fRScanRemote && (driveflags[toupper(*StubbyScan->pci->pszFileName) - 'A'] &
    242                       DRIVE_REMOTE)) ||
    243                       (fRScanVirtual && (driveflags[toupper(*StubbyScan->pci->pszFileName) - 'A'] &
    244                                          DRIVE_VIRTUAL)) && fInitialDriveScan) {
     232            if ((fRScanLocal &&
     233                (!(driveflags[toupper(*StubbyScan->pci->pszFileName) - 'A'] &
     234                   ((DRIVE_REMOTE | DRIVE_VIRTUAL)))) ||
     235                 (fRScanRemote &&
     236                  (driveflags[toupper(*StubbyScan->pci->pszFileName) - 'A'] &
     237                   DRIVE_REMOTE)) ||
     238                 (fRScanVirtual &&
     239                  (driveflags[toupper(*StubbyScan->pci->pszFileName) - 'A'] &
     240                   DRIVE_VIRTUAL))) && fInitialDriveScan) {
    245241              if (!(driveflags[toupper(*StubbyScan->pci->pszFileName) - 'A'] &
    246242                    ((fRScanNoWrite ? 0 : DRIVE_NOTWRITEABLE) |
    247243                     (fRScanSlow ? 0 : DRIVE_SLOW)))) {
    248244                WinSendMsg(StubbyScan->hwndCnr, CM_EXPANDTREE, MPFROMP(StubbyScan->pci), MPVOID);
    249                 //DbgMsg(pszSrcFile, __LINE__, "expanded %x %s", StubbyScan->hwndCnr, StubbyScan->pci->pszFileName);
     245                //DbgMsg(pszSrcFile, __LINE__, "expanded %x %p", StubbyScan->hwndCnr, StubbyScan->pci);
    250246                WinSendMsg(StubbyScan->hwndCnr, CM_COLLAPSETREE, MPFROMP(StubbyScan->pci), MPVOID);
    251247              }
     
    260256        }
    261257        StubbyScanCount--;
    262        /* if (StubbyScanCount == 0) {
    263           if (fInitialDriveScan) {
    264             WinShowWindow(StubbyScan->hwndCnr, TRUE);
    265             WinShowWindow(StubbyScan->hwndDrivesList, TRUE);
    266           }
    267           fInitialDriveScan = FALSE;
    268         }*/
    269258        WinDestroyMsgQueue(hmq);
    270259      }
     
    439428} // IsDefaultIcon
    440429
     430static VOID FetchCommonEAs(PCNRITEM pci)
     431{
     432  ULONG flags = driveflags[toupper(*pci->pszFileName) - 'A'];
     433  BOOL fLoadSubjectForDrive = fLoadSubject && ~flags & DRIVE_NOLOADSUBJS;
     434  BOOL fLoadLongNameForDrive = fLoadLongnames &&  ~flags & DRIVE_NOLONGNAMES &&
     435                               ~flags & DRIVE_NOLOADLONGS;
     436  if (fLoadSubjectForDrive || fLoadLongNameForDrive) {
     437    // Allocate space to hold GEA2s and .SUBJECT and .LONGNAME strings
     438    PGEA2LIST pgealist = xmallocz(sizeof(GEA2LIST) + sizeof(GEA2) + 64, pszSrcFile, __LINE__);
     439    if (pgealist) {
     440      APIRET rc;
     441      PFEA2LIST pfealist;
     442      ULONG offset;
     443      PGEA2 pgeaPrev = NULL;
     444      PGEA2 pgea = pgealist->list;      // Point at first available
     445      EAOP2 eaop;
     446      UINT state;
     447      //DbgMsg(pszSrcFile, __LINE__, "pszFileName %s", pci->pszFileName);
     448      for (state = 0; state < 2; state++) {
     449        PCSZ pcsz;
     450        switch (state) {
     451        case 0:
     452          pcsz = fLoadSubjectForDrive ? SUBJECT : NULL;
     453          break;
     454        case 1:
     455          pcsz = fLoadLongNameForDrive ? LONGNAME : NULL;
     456          break;
     457        }
     458        if (pcsz) {
     459          if (pgeaPrev) {
     460            pgeaPrev->oNextEntryOffset = (PSZ)pgea - (PSZ)pgeaPrev;
     461            //DbgMsg(pszSrcFile, __LINE__, "pgea %p oNextEntryOffset %u", pgeaPrev, pgeaPrev->oNextEntryOffset);
     462          }
     463          strcpy(pgea->szName, pcsz);
     464          pgea->cbName = strlen(pgea->szName);
     465          pgea->oNextEntryOffset = 0;
     466          //DbgMsg(pszSrcFile, __LINE__, "pgea %p cbName %u szName %s", pgea, pgea->cbName, pgea->szName);
     467          offset = sizeof(GEA2) + pgea->cbName; // Calc length including null
     468          offset = (offset + 3) & ~3;           // Doubleword align
     469          pgeaPrev = pgea;
     470          pgea = (PGEA2)((PSZ)pgea + offset);   // Point at next available
     471        }
     472      } // for
     473
     474      pgealist->cbList = (PSZ)pgea - (PSZ)pgealist;
     475      //DbgMsg(pszSrcFile, __LINE__, "pgealist %p cbList %u", pgealist, pgealist->cbList);
     476
     477      pfealist = xmallocz(4096, pszSrcFile, __LINE__);
     478      if (pfealist) {
     479        pfealist->cbList = 4096;
     480        eaop.fpGEA2List = pgealist;
     481        eaop.fpFEA2List = pfealist;
     482        eaop.oError = 0;
     483        rc = DosQueryPathInfo(pci->pszFileName, FIL_QUERYEASFROMLIST,
     484                              (PVOID) &eaop, (ULONG) sizeof(EAOP2));
     485        if (rc) {
     486          CHAR s[80];
     487          sprintf(s, "%s %s",PCSZ_DOSQUERYPATHINFO, "%s");
     488          Dos_Error(MB_ENTER, rc, HWND_DESKTOP, pszSrcFile, __LINE__,
     489                    s, pci->pszFileName);
     490        }
     491          //DbgMsg(pszSrcFile, __LINE__, "DosQueryPathInfo %s failed with rc %u ", pci->pszFileName, rc);
     492        else {
     493          PFEA2 pfea = eaop.fpFEA2List->list;
     494          while (pfea) {
     495            if (pfea->cbValue) {
     496              CHAR *achValue = pfea->szName + pfea->cbName + 1;
     497              if (*(USHORT *)achValue != EAT_ASCII)
     498                Dos_Error(MB_ENTER, rc, HWND_DESKTOP, pszSrcFile, __LINE__,
     499                          GetPString(IDS_ERROREATYPETEXT),
     500                          achValue, pfea->cbName, pfea->szName);
     501                //DbgMsg(pszSrcFile, __LINE__, "EA type 0x%x unexpected for %.*s", achValue, pfea->cbName, pfea->szName);
     502              else {
     503                CHAR ch = achValue[pfea->cbValue];
     504                PSZ pszValue;
     505                achValue[pfea->cbValue] = 0;
     506                pszValue = xstrdup(achValue + (sizeof(USHORT) * 2), pszSrcFile, __LINE__);
     507                achValue[pfea->cbValue] = ch;
     508                //DbgMsg(pszSrcFile, __LINE__, "pfea %p %.*s cbValue %u %s", pfea, pfea->cbName, pfea->szName, pfea->cbValue, pszValue);
     509                if (strncmp(pfea->szName, LONGNAME, pfea->cbName) == 0)
     510                  pci->pszLongName = pszValue;
     511                else if (strncmp(pfea->szName, SUBJECT, pfea->cbName) == 0)
     512                  pci->pszSubject = pszValue;
     513                else
     514                  Dos_Error(MB_ENTER, rc, HWND_DESKTOP, pszSrcFile, __LINE__,
     515                            GetPString(IDS_ERROREATYPETEXT), pfea, pfea->cbName, pfea->szName);
     516                  //DbgMsg(pszSrcFile, __LINE__, "pfea %p EA %.*s unexpected", pfea, pfea->cbName, pfea->szName);
     517              }
     518            }
     519            if (!pfea->oNextEntryOffset)
     520              break;
     521            pfea = (PFEA2)((PSZ)pfea + pfea->oNextEntryOffset);
     522          } // while
     523        }
     524        free(pfealist);
     525      }
     526      free(pgealist);
     527    }
     528  }
     529} // FetchCommonEAs
     530
    441531ULONGLONG FillInRecordFromFFB(HWND hwndCnr,
    442532                              PCNRITEM pci,
    443533                              const PSZ pszDirectory,
    444534                              const PFILEFINDBUF4L pffb,
    445                               const BOOL partial,
     535                              const BOOL partial,
    446536                              DIRCNRDATA *dcd)
    447537{
     
    487577    memcpy(p, pffb->achName, pffb->cchName + 1);
    488578  }
    489   flags = driveflags[toupper(*pci->pszFileName) - 'A'];
    490   // load the object's Subject, if required
    491   // pci->pszSubject = NullStr; dubplicate see below 12-05-08 GKY
    492   if (pffb->cbList > 4L &&
    493       dcd && fLoadSubject &&
    494       (isalpha(*pci->pszFileName) &&
    495        !(flags & DRIVE_NOLOADSUBJS)))
    496   {
    497     APIRET rc;
    498     EAOP2 eaop;
    499     PGEA2LIST pgealist;
    500     PFEA2LIST pfealist;
    501     PGEA2 pgea;
    502     PFEA2 pfea;
    503     CHAR *value;
    504 
    505     pgealist = xmallocz(sizeof(GEA2LIST) + 32, pszSrcFile, __LINE__);
    506     if (pgealist) {
    507       pgea = &pgealist->list[0];
    508       strcpy(pgea->szName, SUBJECT);
    509       pgea->cbName = strlen(pgea->szName);
    510       pgea->oNextEntryOffset = 0;
    511       pgealist->cbList = (sizeof(GEA2LIST) + pgea->cbName);
    512       pfealist = xmallocz(1532, pszSrcFile, __LINE__);
    513       if (pfealist) {
    514         pfealist->cbList = 1024;
    515         eaop.fpGEA2List = pgealist;
    516         eaop.fpFEA2List = pfealist;
    517         eaop.oError = 0;
    518         rc = DosQueryPathInfo(pci->pszFileName, FIL_QUERYEASFROMLIST,
    519                               (PVOID) & eaop, (ULONG) sizeof(EAOP2));
    520         if (!rc) {
    521           pfea = &eaop.fpFEA2List->list[0];
    522           value = pfea->szName + pfea->cbName + 1;
    523           value[pfea->cbValue] = 0;
    524           if (*(USHORT *) value == EAT_ASCII)
    525             pci->pszSubject = xstrdup(value + (sizeof(USHORT) * 2), pszSrcFile, __LINE__);
    526         }
    527         free(pfealist);
    528       }
    529       free(pgealist);
    530     }
    531   }
     579
     580  // load Subject and/or Longname EAs, if required and have EAs
     581  if (pffb->cbList > 4L && dcd)
     582    FetchCommonEAs(pci);
     583
    532584  if (!pci->pszSubject)
    533585    pci->pszSubject = NullStr;
    534586
    535587  // load the object's longname
    536   pci->pszLongName = NULL;
    537   if (fLoadLongnames &&
    538       dcd &&
    539       pffb->cbList > 4L &&
    540       isalpha(*pci->pszFileName) &&
    541       ~flags & DRIVE_NOLONGNAMES &&
    542       ~flags & DRIVE_NOLOADLONGS)
    543   {
    544     APIRET rc;
    545     EAOP2 eaop;
    546     PGEA2LIST pgealist;
    547     PFEA2LIST pfealist;
    548     PGEA2 pgea;
    549     PFEA2 pfea;
    550     CHAR *value;
    551 
    552     pgealist = xmallocz(sizeof(GEA2LIST) + 32, pszSrcFile, __LINE__);
    553     if (pgealist) {
    554       pgea = &pgealist->list[0];
    555       strcpy(pgea->szName, LONGNAME);
    556       pgea->cbName = strlen(pgea->szName);
    557       pgea->oNextEntryOffset = 0;
    558       pgealist->cbList = (sizeof(GEA2LIST) + pgea->cbName);
    559       pfealist = xmallocz(1532, pszSrcFile, __LINE__);
    560       if (pfealist) {
    561         pfealist->cbList = 1024;
    562         eaop.fpGEA2List = pgealist;
    563         eaop.fpFEA2List = pfealist;
    564         eaop.oError = 0;
    565         rc = DosQueryPathInfo(pci->pszFileName, FIL_QUERYEASFROMLIST,
    566                               (PVOID) & eaop, (ULONG) sizeof(EAOP2));
    567         if (!rc) {
    568           pfea = &eaop.fpFEA2List->list[0];
    569           value = pfea->szName + pfea->cbName + 1;
    570           value[pfea->cbValue] = 0;
    571           if (*(USHORT *) value == EAT_ASCII) {
    572             pci->pszLongName = xstrdup(value + (sizeof(USHORT) * 2), pszSrcFile, __LINE__);
    573 #           ifdef FORTIFY
    574             {
    575               unsigned tid = GetTidForWindow(hwndCnr);
    576               if (tid == 1)
    577                 Fortify_ChangeScope(pci->pszLongName, -1);
    578               else
    579                 Fortify_SetOwner(pci->pszLongName, 1);
    580             }
    581 #           endif
    582           }
    583         }
    584         free(pfealist);
    585       }
    586       free(pgealist);
    587     }
    588   }
    589588  if (!pci->pszLongName)
    590589    pci->pszLongName = NullStr;
     
    595594  else if (fForceLower)
    596595    strlwr(pci->pszFileName);
     596
     597  flags = driveflags[toupper(*pci->pszFileName) - 'A'];
    597598
    598599  // get an icon to use with it
     
    728729{
    729730  HPOINTER hptr;
     731  ULONG flags;
    730732  CHAR *p;
    731   ULONG flags;
    732733  CHAR szBuf[80];
    733734
     
    736737  pci->hwndCnr = hwndCnr;
    737738  pci->pszFileName = xstrdup(pszFileName, pszSrcFile, __LINE__);
    738   flags = driveflags[toupper(*pci->pszFileName) - 'A'];
    739   if ((pfsa4->cbList > 4) &&
    740       dcd &&
    741       fLoadSubject &&
    742       (!isalpha(*pci->pszFileName) ||
    743        !(flags & DRIVE_NOLOADSUBJS)))
    744   {
    745     APIRET rc;
    746     EAOP2 eaop;
    747     PGEA2LIST pgealist;
    748     PFEA2LIST pfealist;
    749     PGEA2 pgea;
    750     PFEA2 pfea;
    751     CHAR *value;
    752 
    753     pgealist = xmallocz(sizeof(GEA2LIST) + 32, pszSrcFile, __LINE__);
    754     if (pgealist) {
    755       pgea = &pgealist->list[0];
    756       strcpy(pgea->szName, SUBJECT);
    757       pgea->cbName = strlen(pgea->szName);
    758       pgea->oNextEntryOffset = 0;
    759       pgealist->cbList = (sizeof(GEA2LIST) + pgea->cbName);
    760       pfealist = xmallocz(1532, pszSrcFile, __LINE__);
    761       if (pfealist) {
    762         pfealist->cbList = 1024;
    763         eaop.fpGEA2List = pgealist;
    764         eaop.fpFEA2List = pfealist;
    765         eaop.oError = 0;
    766         rc = DosQueryPathInfo(pci->pszFileName, FIL_QUERYEASFROMLIST,
    767                               (PVOID) & eaop, (ULONG) sizeof(EAOP2));
    768         if (!rc) {
    769           pfea = &eaop.fpFEA2List->list[0];
    770           value = pfea->szName + pfea->cbName + 1;
    771           value[pfea->cbValue] = 0;
    772           if (*(USHORT *) value == EAT_ASCII)
    773             pci->pszSubject = xstrdup(value + (sizeof(USHORT) * 2), pszSrcFile, __LINE__);
    774         }
    775         free(pfealist);
    776       }
    777       free(pgealist);
    778     }
    779   }
     739
     740  if (pfsa4->cbList > 4L && dcd && *szFSType == 0)
     741    FetchCommonEAs(pci);
     742
    780743  if (!pci->pszSubject)
    781744    pci->pszSubject = NullStr;
    782 
    783   pci->pszLongName = NULL;
    784   if (fLoadLongnames &&
    785       dcd &&
    786       pfsa4->cbList > 4L &&
    787       isalpha(*pci->pszFileName) &&
    788       ~flags & DRIVE_NOLONGNAMES &&
    789       ~flags & DRIVE_NOLOADLONGS)
    790   {
    791     APIRET rc;
    792     EAOP2 eaop;
    793     PGEA2LIST pgealist;
    794     PFEA2LIST pfealist;
    795     PGEA2 pgea;
    796     PFEA2 pfea;
    797     CHAR *value;
    798 
    799     pgealist = xmallocz(sizeof(GEA2LIST) + 32, pszSrcFile, __LINE__);
    800     if (pgealist) {
    801       pgea = &pgealist->list[0];
    802       strcpy(pgea->szName, LONGNAME);
    803       pgea->cbName = strlen(pgea->szName);
    804       pgea->oNextEntryOffset = 0;
    805       pgealist->cbList = (sizeof(GEA2LIST) + pgea->cbName);
    806       pfealist = xmallocz(1532, pszSrcFile, __LINE__);
    807       if (pfealist) {
    808         pfealist->cbList = 1024;
    809         eaop.fpGEA2List = pgealist;
    810         eaop.fpFEA2List = pfealist;
    811         eaop.oError = 0;
    812         rc = DosQueryPathInfo(pci->pszFileName, FIL_QUERYEASFROMLIST,
    813                               (PVOID) & eaop, (ULONG) sizeof(EAOP2));
    814         if (!rc) {
    815           pfea = &eaop.fpFEA2List->list[0];
    816           value = pfea->szName + pfea->cbName + 1;      // Point at EA value
    817           value[pfea->cbValue] = 0;     // Terminate
    818           if (*(USHORT *) value == EAT_ASCII) {
    819             p = value + sizeof(USHORT) * 2;     // Point at value string
    820             pci->pszLongName = xstrdup(p, pszSrcFile, __LINE__);
    821           }
    822         }
    823         free(pfealist);
    824       }
    825       free(pgealist);
    826     }
    827   }
    828745  if (!pci->pszLongName)
    829746    pci->pszLongName = NullStr;
     
    833750  else if (fForceLower)
    834751    strlwr(pci->pszFileName);
     752
     753  flags = driveflags[toupper(*pci->pszFileName) - 'A'];
    835754
    836755  if (pfsa4->attrFile & FILE_DIRECTORY) {
     
    890809
    891810  //comma format the file size for large file support
    892   {
     811  if (*szFSType == 0) {
    893812    CHAR szBuf[30];
    894813    CommaFmtULL(szBuf, sizeof(szBuf), pfsa4->cbFile, ' ');
     
    904823#   endif
    905824  }
     825  else
     826    pci->pszFmtFileSize = NullStr;
    906827  pci->date.day = pfsa4->fdateLastWrite.day;
    907828  pci->date.month = pfsa4->fdateLastWrite.month;
     
    959880                      const BOOL recurse,
    960881                      const BOOL partial,
    961                       CHAR *stopflag,
     882                      CHAR *stopflag,
    962883                      DIRCNRDATA *dcd,  // Optional
    963884                      ULONG *pulTotalFiles,     // Optional
     
    12641185          Stubby(hwndCnr, pci);
    12651186        }
    1266         //Stubby(hwndCnr, pci);
    12671187      pci = WinSendMsg(hwndCnr, CM_QUERYRECORD, MPFROMP(pci),
    12681188                       MPFROM2SHORT(CMA_NEXT, CMA_ITEMORDER));
     
    12881208                   TRUE,                // filestoo
    12891209                   FALSE,               // recurse
    1290                    TRUE,                // partial
    1291                    dcd ? &dcd->stopflag : NULL,
    1292                    dcd,
     1210                   TRUE,                // partial
     1211                   dcd ? &dcd->stopflag : NULL,
     1212                   dcd,
    12931213                   NULL,                // total files
    12941214                   pullTotalBytes);
     
    13201240  BOOL drivesbuilt = FALSE;
    13211241  ULONG startdrive = 3;
    1322   static BOOL didonce = FALSE;
     1242  static BOOL didonce;
    13231243
    13241244  fDummy = TRUE;
     
    14741394                                  FIL_QUERYEASIZEL,
    14751395                                  &fsa4, (ULONG) sizeof(FILESTATUS4L));
    1476             // ERROR_BAD_NET_RSP = 58
    1477             if (rc == 58) {
     1396            if (rc == ERROR_BAD_NET_RESP) {
    14781397              DosError(FERR_DISABLEHARDERR);
    14791398              rc = DosQueryPathInfo(szDrive,
     
    15271446        }
    15281447        else {
     1448          *szFSType = 0;
    15291449          pci->rc.hptrIcon = hptrDunno;
    15301450          pci->pszFileName = xstrdup(szDrive, pszSrcFile, __LINE__);
    15311451          if (fShowFSTypeInTree || fShowDriveLabelInTree) {
    1532             strcat(szDrive, " [");
    1533             strcat(szDrive, szFSType);
    1534             strcat(szDrive, "]");
     1452            strcat(szDrive, " [?]");
    15351453          }
    15361454          pci->pszDisplayName = xstrdup(szDrive, pszSrcFile, __LINE__);
     
    15451463          driveserial[x] = -1;
    15461464        }
    1547       }
     1465        }
    15481466      else {
    15491467        // diskette drive (A or B)
     
    17191637          if (~flags & DRIVE_INVALID &&
    17201638              ~flags & DRIVE_NOPRESCAN &&
    1721               (!fNoRemovableScan || ~flags & DRIVE_REMOVABLE)) //&& !fDrivetoSkip[drvNum])
     1639              (!fNoRemovableScan || ~flags & DRIVE_REMOVABLE))
    17221640          {
    1723             //if (DRIVE_RAMDISK)
    1724             //  stubbyScan->RamDrive = TRUE;
    17251641            if (xbeginthread(StubbyScanThread,
    17261642                             65536,
     
    17481664                     MPFROMP(pci->pszFileName));
    17491665        }
    1750         //fDrivetoSkip[drvNum] = FALSE;
    17511666      }
    17521667      pci = pciNext;
  • trunk/dll/fm3res.rc

    r1430 r1439  
    4848  14 Mar 09 GKY Remove unused strings; remove trailing \32s replaced with spaces.
    4949  06 Jun 09 GKY Status line to show file sys/label not shown in tree; shortened to fit split status
     50  06 Jul 09 SHL Error message for Refactor .LONGNAME and .SUBJECT EA fetch to FetchCommonEAs
    5051
    5152***********************************************************************/
     
    32753276    IDS_STATERESERVENAMETEXT              "\"%s\" is a reserved state name"
    32763277    IDS_DRAGDROPDIALOGTEXT                "Drag & Drop Dialog"
     3278    IDS_ERROREATYPETEXT                   "EA type 0x%x unexpected for %.*s"
    32773279
    32783280    // Add strings that need to be combined by GetPString here
  • trunk/dll/fm3str.h

    r1429 r1439  
    3131  14 Mar 09 GKY Remove variables that were transferred to PCSZs
    3232  06 Jun 09 GKY Status line to show file sys/label not shown in tree; shortened to fit split status
     33  06 Jul 09 SHL Error message for Refactor .LONGNAME and .SUBJECT EA fetch to FetchCommonEAs
    3334
    3435***********************************************************************/
     
    10001001#define IDS_STATERESERVENAMETEXT                             1012
    10011002#define IDS_DRAGDROPDIALOGTEXT                               1013
     1003#define IDS_ERROREATYPETEXT                                  1014
    10021004
    10031005//The following strings were cut up form the string of the root name (ie IDS_SUGGEST1TEXT)
  • trunk/dll/info.c

    r1402 r1439  
    3232  07 Feb 09 GKY Add *DateFormat functions to format dates based on locale
    3333  08 Mar 09 GKY Renamed commafmt.h i18nutil.h
     34  12 Jul 09 GKY Add xDosQueryAppType and xDoxAlloc... to allow FM/2 to load in high memory
     35  12 Jul 09 GKY Remove code to update recursive scan setting which isn't user setable
    3436
    3537***********************************************************************/
     
    756758        WinCheckButton(hwnd, FLE_SYSTEM, ((fs.attrFile & FILE_SYSTEM) != 0));
    757759        DosError(FERR_DISABLEHARDERR);
    758         if (!DosQueryAppType(pfs->szFileName, &apptype)) {
     760        if (!xDosQueryAppType(pfs->szFileName, &apptype)) {
    759761          WinEnableWindow(WinWindowFromID(hwnd, FLE_OS2FS), TRUE);
    760762          WinEnableWindow(WinWindowFromID(hwnd, FLE_OS2WIN), TRUE);
     
    10321034        else
    10331035          driveflags[drive] &= (~DRIVE_WRITEVERIFYOFF);
    1034         if (WinQueryButtonCheckstate(hwnd,DVS_RSCANNED))
    1035           driveflags[drive] |= DRIVE_RSCANNED;
    1036         else
    1037           driveflags[drive] &= (~DRIVE_RSCANNED);
    10381036        {
    10391037          ULONG flags;
  • trunk/dll/init.c

    r1438 r1439  
    8181  06 Jun 09 GKY Add option to show file system type or drive label in tree
    8282  28 Jun 09 GKY Added AddBackslashToPath() to remove repeatative code.
     83  12 Jul 09 GKY Add xDosQueryAppType and xDoxAlloc... to allow FM/2 to load in high memory
    8384
    8485***********************************************************************/
     
    11491150    if (*FullPath)
    11501151      fLVMGui = TRUE;
    1151     if (!DosQueryAppType(PCSZ_DFSOS2EXE, &ulAppType))
     1152    if (!xDosQueryAppType(PCSZ_DFSOS2EXE, &ulAppType))
    11521153      fDFSee = TRUE;
    1153     if (!DosQueryAppType(PCSZ_MINILVMEXE, &ulAppType))
     1154    if (!xDosQueryAppType(PCSZ_MINILVMEXE, &ulAppType))
    11541155      fMiniLVM = TRUE;
    1155     if (!DosQueryAppType(PCSZ_FDISKPMEXE, &ulAppType))
     1156    if (!xDosQueryAppType(PCSZ_FDISKPMEXE, &ulAppType))
    11561157      fFDisk = TRUE;
    1157     if (!DosQueryAppType(PCSZ_LVMEXE, &ulAppType))
     1158    if (!xDosQueryAppType(PCSZ_LVMEXE, &ulAppType))
    11581159      fLVM = TRUE;
    11591160
    11601161    // Check to see if we are running protect only
    1161     if (!DosQueryAppType(GetCmdSpec(TRUE), &ulAppType)) {
     1162    if (!xDosQueryAppType(GetCmdSpec(TRUE), &ulAppType)) {
    11621163      ret = runemf2(SEPARATE | WINDOWED | BACKGROUND | MINIMIZED,
    11631164                    (HWND) 0, pszSrcFile, __LINE__, NULL, NULL,
  • trunk/dll/instant.c

    r1438 r1439  
    1313  22 Mar 07 GKY Use QWL_USER
    1414  20 Aug 07 GKY Move #pragma alloc_text to end for OpenWatcom compat
     15  12 Jul 09 GKY Add xDosQueryAppType and xDoxAlloc... to allow FM/2 to load in high memory
    1516
    1617***********************************************************************/
     
    104105        if (mem) {
    105106          rc = xDosAllocMem((PVOID) & bat, mem,
    106                             PAG_COMMIT | PAG_READ | PAG_WRITE);
     107                            PAG_COMMIT | PAG_READ | PAG_WRITE, pszSrcFile, __LINE__);
    107108          if (rc || !bat) {
    108109            Dos_Error(MB_CANCEL, rc, HWND_DESKTOP, pszSrcFile, __LINE__,
  • trunk/dll/killproc.c

    r1438 r1439  
    2121  10 Dec 08 SHL Integrate exception handler support
    2222  08 Mar 09 GKY Removed variable aurguments from docopyf and unlinkf (not used)
     23  12 Jul 09 GKY Add xDosQueryAppType and xDoxAlloc... to allow FM/2 to load in high memory
    2324
    2425***********************************************************************/
     
    117118  WinSendDlgItemMsg(hwnd, KILL_LISTBOX, LM_DELETEALL, MPVOID, MPVOID);
    118119  rc = xDosAllocMem((PVOID) & pbh, USHRT_MAX + 4096,
    119                     PAG_COMMIT | OBJ_TILE | PAG_READ | PAG_WRITE);
     120                    PAG_COMMIT | PAG_READ | PAG_WRITE, pszSrcFile, __LINE__);
    120121  if (rc)
    121122    Dos_Error(MB_CANCEL, rc, HWND_DESKTOP, pszSrcFile, __LINE__,
     
    186187  WinSendDlgItemMsg(hwnd, KILL_LISTBOX, LM_DELETEALL, MPVOID, MPVOID);
    187188  rc = xDosAllocMem((PVOID) & pbh, USHRT_MAX + 4096,
    188                     PAG_COMMIT | OBJ_TILE | PAG_READ | PAG_WRITE);
     189                    PAG_COMMIT | PAG_READ | PAG_WRITE, pszSrcFile, __LINE__);
    189190  if (rc)
    190191    Dos_Error(MB_CANCEL, rc, HWND_DESKTOP, pszSrcFile, __LINE__,
  • trunk/dll/mainwnd.c

    r1438 r1439  
    8989  21 Jun 09 GKY Added drive letter to bitmap buttons in drive bar; Eliminate static drive
    9090                letter windows; Use button ID to identify drive letter for processing.
     91  12 Jul 09 GKY Removed duplicate UM_SETUP2 message from RestoreDirCnrState caused dbl dir
     92                listings in tree
    9193
    9294***********************************************************************/
     
    33253327                  }
    33263328                }
    3327                 if (!PostMsg(hwndCnr, UM_SETUP2, NULL, NULL))
    3328                   WinSendMsg(hwndCnr, UM_SETUP2, NULL, NULL);
     3329                //if (!PostMsg(hwndCnr, UM_SETUP2, NULL, NULL)) //These were being called twice
     3330                //  WinSendMsg(hwndCnr, UM_SETUP2, NULL, NULL); //causing dup dir names in tree
    33293331              }
    33303332            }
  • trunk/dll/makefile

    r1415 r1439  
    5151# 18 Dec 08 SHL Avoid extra fm3res.str builds
    5252# 04 Feb 09 SHL Drop mkstr and fm3*.str now that we use STRINGTABLE
     53# 12 Jul 09 GKY Allow FM/2 to load in high memory call exehdr /hi
    5354
    5455# Environment: see makefile_pre.mk
     
    5859# FORTIFY - build with FORTIFYed memory
    5960# USE_RC - build with rc.exe if defined, other build with wrc.exe
     61# HIMEM - build with changes to allow loading in high memory
    6062
    6163BASE = fm3dll
     
    9698!ifdef %FORTIFY                 # if defined in environment
    9799FORTIFY = $(%FORTIFY)           # use value from environment
     100!endif
     101
     102!ifdef %HIMEM                   # if defined in environment
     103HIMEM = $(%HIMEM)               # use value from environment
    98104!endif
    99105
     
    150156!endif
    151157
     158!ifdef HIMEM
     159CFLAGS += -dHIMEM
     160!endif
     161
    152162# for fm3res only
    153163CFLAGSR = -bt=os2 -mf -bd -bm         -olirs -s     -j -we -wx -zfp -zgp -zp4 -zq
     
    211221     $(BASERES).dll &
    212222     ipf\fm3.hlp
    213 
     223     
    214224syms: $(SYMS) .symbolic
    215225
     
    312322  @for %f in ($(BASE).dll $(BASERES).dll) do !lxlite /x- /b- %f
    313323!endif
     324
     325# Run for each dependent
     326loadhigh: $(BASE).dll $(BASERES).dll .symbolic
     327  @for %f in ($(BASE).dll $(BASERES).dll) do !exehdr /hi %f
    314328
    315329cleanobj: .symbolic
  • trunk/dll/misc.c

    r1438 r1439  
    6060  28 Mar 09 GKY Add RemoveOldCnrSwitches to remove pre 3.16 style ini keys;
    6161                add State.version key for check
     62  12 Jul 09 GKY Add xDosQueryAppType and xDoxAlloc... to allow FM/2 to load in high memory
    6263
    6364***********************************************************************/
     
    846847            ealen = sizeof(FEALIST) + 9;
    847848          rc = xDosAllocMem((PPVOID) & pfealist, ealen + 64,
    848                             OBJ_TILE | PAG_COMMIT | PAG_READ | PAG_WRITE);
     849                            PAG_COMMIT | PAG_READ | PAG_WRITE, pszSrcFile, __LINE__);
    849850          if (rc)
    850851            Dos_Error(MB_CANCEL, rc, HWND_DESKTOP, pszSrcFile,
  • trunk/dll/mle.c

    r1438 r1439  
    2323  10 Dec 08 SHL Integrate exception handler support
    2424  08 Mar 09 GKY Additional strings move to PCSZs in init.c
     25  12 Jul 09 GKY Add xDosQueryAppType and xDoxAlloc... to allow FM/2 to load in high memory
    2526
    2627***********************************************************************/
     
    181182    len++;
    182183    rc = xDosAllocMem((PVOID) & temp, 4096,
    183                       PAG_COMMIT | OBJ_TILE | PAG_READ | PAG_WRITE);
     184                      PAG_COMMIT | PAG_READ | PAG_WRITE, pszSrcFile, __LINE__);
    184185    if (rc || !temp)
    185186      Dos_Error(MB_CANCEL, rc, h, pszSrcFile, __LINE__,
     
    264265    return FALSE;
    265266  rc = xDosAllocMem((PVOID) & temp, 32768L,
    266                     PAG_COMMIT | OBJ_TILE | PAG_READ | PAG_WRITE);
     267                    PAG_COMMIT | PAG_READ | PAG_WRITE, pszSrcFile, __LINE__);
    267268  if (rc || !temp) {
    268269    Dos_Error(MB_CANCEL, rc, h, pszSrcFile, __LINE__,
     
    536537    if (len) {
    537538      rc = xDosAllocMem((PVOID) & hexbuff, 50001,
    538                         PAG_COMMIT | OBJ_TILE | PAG_READ | PAG_WRITE);
     539                        PAG_COMMIT | PAG_READ | PAG_WRITE, pszSrcFile, __LINE__);
    539540      if (rc || !hexbuff) {
    540541        Dos_Error(MB_CANCEL, rc, h, pszSrcFile, __LINE__,
     
    665666    if (len && len != -1) {
    666667      rc = xDosAllocMem((PVOID) & buffer,
    667                         50000L, PAG_COMMIT | OBJ_TILE | PAG_READ | PAG_WRITE);
     668                        50000L, PAG_COMMIT | PAG_READ | PAG_WRITE, pszSrcFile, __LINE__);
    668669      if (rc || !buffer) {
    669670        Dos_Error(MB_CANCEL, rc, h, pszSrcFile, __LINE__,
     
    917918
    918919  rc = xDosAllocMem((PVOID) & buffer, 4096L,
    919                     PAG_COMMIT | OBJ_TILE | PAG_READ | PAG_WRITE);
     920                    PAG_COMMIT | PAG_READ | PAG_WRITE, pszSrcFile, __LINE__);
    920921  if (rc || !buffer) {
    921922    Dos_Error(MB_CANCEL, rc, h, pszSrcFile, __LINE__,
  • trunk/dll/pathutil.c

    r1438 r1439  
    1414  15 Oct 08 GKY Fix NormalizeCmdLine to check all 5 executible extensions when no extension provided;
    1515                use searchapath to check for existance of file types not checked by DosQAppType;
    16                 close DosFind.
     16                close DosFind.
     17  28 Jun 09 GKY Added AddBackslashToPath() to remove repeatative code
     18  12 Jul 09 GKY Add xDosQueryAppType and xDoxAlloc... to allow FM/2 to load in high memory
    1719
    1820***********************************************************************/
     
    197199      }
    198200      else
    199         ret = DosQueryAppType(szCmdLine, &ulAppType);
     201        ret = xDosQueryAppType(szCmdLine, &ulAppType);
    200202      BldQuotedFileName(pszNewCmdLine, szCmdLine);
    201203      if (ret) {
     
    229231        while (strchr(szCmdLine, '\"'))
    230232          remove_first_occurence_of_character("\"", szCmdLine);
    231         ret = DosQueryAppType(szCmdLine, &ulAppType); // exe automatically appended
     233        ret = xDosQueryAppType(szCmdLine, &ulAppType); // exe automatically appended
    232234        if (!ret)
    233235          strcat(szCmdLine, PCSZ_DOTEXE);
    234236        else {
    235237          strcat(szCmdLine, PCSZ_DOTCOM);
    236           ret = DosQueryAppType(szCmdLine, &ulAppType);
     238          ret = xDosQueryAppType(szCmdLine, &ulAppType);
    237239          if (ret) {
    238240            offset = strrchr(szCmdLine, '.' );
     
    266268          if (*pszChar == ' ') { //test at every space for the end of the filename
    267269            *pszChar = '\0';
    268             ret = DosQueryAppType(szCmdLine, &ulAppType);
     270            ret = xDosQueryAppType(szCmdLine, &ulAppType);
    269271            if (!ret) {
    270272              strcat(szCmdLine, PCSZ_DOTEXE);
     
    273275            else {
    274276              strcat(szCmdLine, PCSZ_DOTCOM);
    275               ret = DosQueryAppType(szCmdLine, &ulAppType);
     277              ret = xDosQueryAppType(szCmdLine, &ulAppType);
    276278              if (ret) {
    277279                offset = strrchr(szCmdLine, '.' );
  • trunk/dll/shadow.c

    r1438 r1439  
    1414  20 Aug 07 GKY Move #pragma alloc_text to end for OpenWatcom compat
    1515  08 Mar 09 GKY Additional strings move to PCSZs declare change
     16  12 Jul 09 GKY Add xDosQueryAppType and xDoxAlloc... to allow FM/2 to load in high memory
    1617
    1718***********************************************************************/
     
    224225        CHAR *p, *pp, szDir[CCHMAXPATH + 1], szBuffer[CCHMAXPATH + 1];
    225226
    226         if (DosQueryAppType(list[x], &apt))
     227        if (xDosQueryAppType(list[x], &apt))
    227228          apt = 0;
    228229        p = strrchr(list[x], '.');
  • trunk/dll/subj.c

    r1438 r1439  
    1515  01 Sep 07 GKY Use xDosSetPathInfo to fix case where FS3 buffer crosses 64k boundry
    1616  08 Mar 09 GKY Additional strings move to PCSZs
     17  12 Jul 09 GKY Add xDosQueryAppType and xDoxAlloc... to allow FM/2 to load in high memory
    1718
    1819***********************************************************************/
     
    126127        ealen = sizeof(FEALIST) + 9;
    127128      rc = xDosAllocMem((PPVOID) & pfealist, ealen + 1L,
    128                         OBJ_TILE | PAG_COMMIT | PAG_READ | PAG_WRITE);
     129                        PAG_COMMIT | PAG_READ | PAG_WRITE, pszSrcFile, __LINE__);
    129130      if (rc)
    130131        Dos_Error(MB_CANCEL, rc, hwnd, pszSrcFile, __LINE__,
  • trunk/dll/systemf.c

    r1438 r1439  
    2626  03 Jan 09 GKY Check for system that is protectonly to gray out Dos/Win command lines and prevent
    2727                Dos/Win programs from being inserted into the execute dialog with message why.
     28  12 Jul 09 GKY Allow FM/2 to load in high memory
    2829
    2930***********************************************************************/
     
    701702    hwnd = HWND_DESKTOP;
    702703
    703   rc = xDosAllocMem((PVOID)&pszPgm,
    704                     MaxComLineStrg,
    705                     PAG_COMMIT | OBJ_TILE | PAG_READ | PAG_WRITE);
     704  rc = DosAllocMem((PVOID)&pszPgm,
     705                   MaxComLineStrg,
     706                   PAG_COMMIT | PAG_READ | PAG_WRITE);
    706707  if (rc) {
    707708    Dos_Error(MB_CANCEL,rc,hwnd,pszSrcFile,__LINE__,GetPString(IDS_OUTOFMEMORY));
     
    749750      temp = *p;
    750751      if (temp) {
    751         rc = xDosAllocMem((PVOID)&pszArgs,
    752                           MaxComLineStrg * 2,
    753                           PAG_COMMIT | OBJ_TILE | PAG_READ | PAG_WRITE);
     752        rc = DosAllocMem((PVOID)&pszArgs,
     753                         MaxComLineStrg * 2,
     754                         PAG_COMMIT | PAG_READ | PAG_WRITE);
    754755        if (rc)
    755756          Dos_Error(MB_CANCEL,rc,hwnd,pszSrcFile,__LINE__,GetPString(IDS_OUTOFMEMORY));
     
    883884      if (~type & FULLSCREEN)
    884885        type |= WINDOWED;
    885       rc = xDosAllocMem((PVOID) & pszArgs, MaxComLineStrg * 2,
    886                         PAG_COMMIT | OBJ_TILE | PAG_READ | PAG_WRITE);
     886      rc = DosAllocMem((PVOID) & pszArgs, MaxComLineStrg * 2,
     887                       PAG_COMMIT | PAG_READ | PAG_WRITE);
    887888      if (rc) {
    888889        Dos_Error(MB_CANCEL,rc,hwnd,pszSrcFile,__LINE__,GetPString(IDS_OUTOFMEMORY));
     
    10751076        useTermQ = FALSE;
    10761077      else {
     1078# ifdef HIMEM
     1079        useTermQ = FALSE;
     1080# else
    10771081        rc = 0;
    10781082        DosEnterCritSec();
     
    10971101            // if (!rc) fprintf(stderr,"%s %d qcreated ptib %x hTermQ %x\n",__FILE__, __LINE__,ptib,hTermQ);
    10981102          }
    1099         } // if 1st time
    1100         useTermQ = hTermQ && hTermQSem;
     1103        } // if 1st time
     1104        useTermQ = hTermQ && hTermQSem;
    11011105        if (!rc)
    1102           DosExitCritSec();
     1106          DosExitCritSec();
     1107# endif
    11031108      } // if wait
    11041109
     
    11401145      if (ret && ret != ERROR_SMG_START_IN_BACKGROUND) {
    11411146        if (!fNoErrorMsg)
    1142         Dos_Error(MB_CANCEL,ret,hwnd,pszSrcFile,__LINE__,
     1147          Dos_Error(MB_CANCEL,ret,hwnd,pszSrcFile,__LINE__,
    11431148                  GetPString(IDS_DOSSTARTSESSIONFAILEDTEXT),pszPgm,pszArgs,
    1144                   pszCallingFile, uiLineNumber);        // 26 May 08 SHL
     1149                    pszCallingFile, uiLineNumber);        // 26 May 08 SHL
    11451150      }
    11461151      else if (type & WAIT) {
     
    11571162          for (ctr = 0;; ctr++)
    11581163          {
    1159             DosSleep(100);//05 Aug 07 GKY 200
     1164            DosSleep(50);//05 Aug 07 GKY 200
    11601165            if (DosSetSession(ulSessID, &sd))   // Check if session gone (i.e. finished)
    11611166              break;
     
    11711176            if (ctr < 20) {
    11721177              rc = DosReadQueue(hTermQ, &rq, &ulLength, (PPVOID)&pTermInfo, 0,
    1173                                 DCWW_NOWAIT, &bPriority, hTermQSem);
     1178                                DCWW_NOWAIT, &bPriority, hTermQSem);
    11741179              if (rc == ERROR_QUE_EMPTY) {
    11751180                DosSleep(50);//05 Aug 07 GKY 100
     
    11781183            }
    11791184            else {
    1180               if (ctr == 20) {
     1185              if (ctr == 20) {
    11811186                ShowSession(hwnd, sessPID);             // Show long running session
    1182               }
     1187              }
    11831188              rc = DosReadQueue(hTermQ, &rq, &ulLength, (PPVOID)&pTermInfo, 0,
    11841189                                DCWW_WAIT, &bPriority, 0);
  • trunk/dll/treecnr.c

    r1438 r1439  
    7070  07 Jun 09 GKY Fixed double names in tree container when collapsed tree is accessed
    7171                before recursive scan
     72  12 Jul 09 GKY Add option to show file system type or drive label in tree
     73                (get NOPRESCAN drives working)
     74
    7275***********************************************************************/
    7376
     
    274277        if (!stricmp(dirname, pciP->pszFileName))
    275278          break;                        // Found it
    276         if (~pciP->rc.flRecordAttr & CRA_EXPANDED) {
    277           if (!(driveflags[toupper(*pciP->pszFileName) - 'A'] & DRIVE_RSCANNED)) {
    278             WinSendMsg(hwndCnr, UM_RESCAN, MPFROMP(pciP), MPVOID);
    279             WinSendMsg(hwndCnr, CM_EXPANDTREE, MPFROMP(pciP), MPVOID);
    280           }
    281           else
    282             WinSendMsg(hwndCnr, CM_EXPANDTREE, MPFROMP(pciP), MPVOID);
    283         }
     279        if (~pciP->rc.flRecordAttr & CRA_EXPANDED)
     280          WinSendMsg(hwndCnr, CM_EXPANDTREE, MPFROMP(pciP), MPVOID);
    284281        strcpy(szDir, dirname);
    285282        if (p - szDir >= strlen(szDir))
     
    336333                          MPFROM2SHORT(CMA_PARENT, CMA_ITEMORDER));
    337334        if (pciP && (INT) pciP != -1) {
    338           if (!(pciP->rc.flRecordAttr & CRA_EXPANDED)) {
    339             if (!(driveflags[toupper(*pciP->pszFileName) - 'A'] & DRIVE_RSCANNED)) {
    340               WinSendMsg(hwndCnr, UM_RESCAN, MPFROMP(pciP), MPVOID);
    341               WinSendMsg(hwndCnr, CM_EXPANDTREE, MPFROMP(pciP), MPVOID);
    342             }
    343             else
    344               WinSendMsg(hwndCnr, CM_EXPANDTREE, MPFROMP(pciP), MPVOID);
    345           }
     335          if (!(pciP->rc.flRecordAttr & CRA_EXPANDED))
     336            WinSendMsg(hwndCnr, CM_EXPANDTREE, MPFROMP(pciP), MPVOID);
    346337          pciToSelect = pciP;
    347338        }
     
    358349        ShowCnrRecord(hwndCnr, (PMINIRECORDCORE) pciToSelect);
    359350      }
    360       if (fSwitchTreeExpand && ~pciToSelect->rc.flRecordAttr & CRA_EXPANDED) {
    361         if (!(driveflags[toupper(*pciToSelect->pszFileName) - 'A'] & DRIVE_RSCANNED)) {
    362           WinSendMsg(hwndCnr, UM_RESCAN, MPFROMP(pciToSelect), MPVOID);
    363           WinSendMsg(hwndCnr, CM_EXPANDTREE, MPFROMP(pciToSelect), MPVOID);
    364         }
    365         else
    366           WinSendMsg(hwndCnr, CM_EXPANDTREE, MPFROMP(pciToSelect), MPVOID);
    367       }
     351      if (fSwitchTreeExpand && ~pciToSelect->rc.flRecordAttr & CRA_EXPANDED)
     352        WinSendMsg(hwndCnr, CM_EXPANDTREE, MPFROMP(pciToSelect), MPVOID);
    368353      if (!quickbail) {
    369354        WinSendMsg(hwndCnr,
     
    375360  }
    376361  WinEnableWindowUpdate(hwndCnr, TRUE);
    377   //DosSleep(1);                        // Let GUI update
    378362}
    379363
     
    18291813                  if (Flesh(hwnd, pci) &&
    18301814                      SHORT2FROMMP(mp1) == CN_EXPANDTREE &&
    1831                       !dcd->suspendview && fTopDir)
    1832                     PostMsg(hwnd, UM_TOPDIR, MPFROMP(pci), MPVOID);
     1815                      !dcd->suspendview && fTopDir) {
     1816                    PostMsg(hwnd, UM_TOPDIR, MPFROMP(pci), MPVOID);
     1817                    //DbgMsg(pszSrcFile, __LINE__, "UM_TOPDIR %p pci %p", hwnd, pci);
     1818                  }
    18331819                }
    18341820                driveserial[toupper(*pci->pszFileName) - 'A'] = volser.serial;
     
    18431829            }
    18441830            else if (SHORT2FROMMP(mp1) == CN_EXPANDTREE) {
    1845               if (Flesh(hwnd, pci) && !dcd->suspendview && fTopDir)
    1846                 PostMsg(hwnd, UM_TOPDIR, MPFROMP(pci), MPVOID);
    1847             }
    1848             if (SHORT2FROMMP(mp1) == CN_EXPANDTREE && !dcd->suspendview)
    1849               WinSendMsg(hwnd, UM_FILTER, MPVOID, MPVOID);
     1831              if (Flesh(hwnd, pci) && !dcd->suspendview && fTopDir){
     1832                PostMsg(hwnd, UM_TOPDIR, MPFROMP(pci), MPVOID);
     1833                //DbgMsg(pszSrcFile, __LINE__, "UM_TOPDIR %p pci %p", hwnd, pci);
     1834              }
     1835            }
     1836            if (SHORT2FROMMP(mp1) == CN_EXPANDTREE && !dcd->suspendview){
     1837              WinSendMsg(hwnd, UM_FILTER, MPVOID, MPVOID);
     1838              //DbgMsg(pszSrcFile, __LINE__, "UM_FILTER %p pci %p", hwnd, pci);
     1839            }
    18501840          }
    18511841        }
     
    19421932            CHAR volumelabel[CCHMAXPATH];
    19431933          }
    1944           volser;
     1934          volser;
     1935          CHAR FileSystem[CCHMAXPATH];
     1936          CHAR szBuf[CCHMAXPATH];
    19451937
    19461938          pciL = pciP = pci;
     
    19651957            INT removable, x = (INT) (toupper(*pci->pszFileName) - 'A');
    19661958            ULONG drvtype;
    1967             CHAR FileSystem[CCHMAXPATH];
    19681959
    19691960            DosError(FERR_DISABLEHARDERR);
     
    20081999                driveflags[x] |= DRIVE_NOLONGNAMES;
    20092000              }
    2010               SelectDriveIcon(pciP);
    2011               WinSendMsg(hwnd,
    2012                          CM_INVALIDATERECORD,
    2013                          MPFROMP(&pciP),
    2014                          MPFROM2SHORT(1, CMA_ERASE | CMA_REPOSITION));
     2001              SelectDriveIcon(pciP);
    20152002              if (hwndMain)
    20162003                PostMsg(hwndMain, UM_BUILDDRIVEBAR, MPVOID, MPVOID);
     
    20222009                                  FSIL_VOLSER, &volser,
    20232010                                  (ULONG) sizeof(volser));
    2024           if (!status) {
     2011          if (!status) {
    20252012            if (!volser.serial ||
    20262013                driveserial[toupper(*pci->pszFileName) - 'A'] !=
     
    20362023            if (!pciL)
    20372024              Flesh(hwnd, pciP);
    2038           }
     2025            if (fShowFSTypeInTree) {
     2026              strcpy(szBuf, pciP->pszFileName);
     2027              strcat(szBuf, " [");
     2028              strcat(szBuf, FileSystem);
     2029              strcat(szBuf, "]");
     2030              pciP->pszDisplayName = xstrdup(szBuf, pszSrcFile, __LINE__);
     2031              }
     2032            else if (fShowDriveLabelInTree) {
     2033              strcpy(szBuf, pciP->pszFileName);
     2034              strcat(szBuf, " [");
     2035              strcat(szBuf, volser.volumelabel);
     2036              strcat(szBuf, "]");
     2037              pciP->pszDisplayName = xstrdup(szBuf, pszSrcFile, __LINE__);
     2038            }
     2039            pciP->rc.pszIcon = pciP->pszDisplayName;
     2040            WinSendMsg(hwnd,
     2041                       CM_INVALIDATERECORD,
     2042                       MPFROMP(&pciP),
     2043                       MPFROM2SHORT(1, CMA_ERASE | CMA_REPOSITION));
     2044          }
    20392045          else {
    20402046            driveserial[toupper(*pci->pszFileName) - 'A'] = -1;
     
    23562362      dcd->suspendview = tempsusp;
    23572363      PostMsg(hwnd, UM_RESCAN, MPVOID, MPVOID);
     2364      //DbgMsg(pszSrcFile, __LINE__, "UM_RESCAN %p pci %s", hwnd, (CHAR *) mp1);
    23582365    }
    23592366    return 0;
     
    26222629        runemf2(SEPARATE | WINDOWED | BACKGROUND | MINIMIZED | WAIT,
    26232630                HWND_DESKTOP, pszSrcFile, __LINE__, NULL, NULL,
    2624                 "%s %s", PCSZ_LVMEXE, "/RediscoverPRM");
    2625          PostMsg(hwndTree, WM_COMMAND, MPFROM2SHORT(IDM_RESCAN, 0), MPVOID);
     2631                "%s %s", PCSZ_LVMEXE, "/RediscoverPRM");
     2632        PostMsg(hwndTree, WM_COMMAND, MPFROM2SHORT(IDM_RESCAN, 0), MPVOID);
    26262633        break;
    26272634
  • trunk/dll/update.c

    r1402 r1439  
    191191            PostMsg(hwndCnr, UM_RESCAN, MPVOID, MPVOID);
    192192            if (pci->attrFile & FILE_DIRECTORY) {
    193               /*if (fInitialDriveScan)
     193              if (fInitialDriveScan)
    194194                Stubby(hwndCnr, pci);
    195195              else {
    196196                while (StubbyScanCount != 0)
    197                   DosSleep(50);*/
    198               Stubby(hwndCnr, pci);
    199               //}
     197                  DosSleep(50);
     198              //Stubby(hwndCnr, pci);
     199              }
    200200            }
    201201          }
     
    291291              dcd->ullTotalBytes += ullTotalBytes;
    292292            }
    293             /*if (fInitialDriveScan)
     293            if (fInitialDriveScan)
    294294              Stubby(hwndCnr, pci);
    295295            else {
    296296              while (StubbyScanCount != 0)
    297                 DosSleep(50);*/
    298             Stubby(hwndCnr, pci);
    299             //}
     297                DosSleep(50);
     298            //Stubby(hwndCnr, pci);
     299            }
    300300          }
    301301        }
     
    465465                repos = TRUE;
    466466                if (pci->attrFile & FILE_DIRECTORY) {
    467                   /*if (fInitialDriveScan)
     467                  if (fInitialDriveScan)
    468468                    Stubby(hwndCnr, pci);
    469469                  else {
    470470                    while (StubbyScanCount != 0)
    471                       DosSleep(50);*/
    472                 Stubby(hwndCnr, pci);
    473                  // }
     471                      DosSleep(50);
     472                //Stubby(hwndCnr, pci);
     473                  }
    474474                }
    475475              }
     
    570570                  }
    571571                  repos = TRUE;
    572                   /*if (fInitialDriveScan)
     572                  if (fInitialDriveScan)
    573573                    Stubby(hwndCnr, pci);
    574574                  else {
    575575                    while (StubbyScanCount != 0)
    576                       DosSleep(50);*/
    577                   Stubby(hwndCnr, pci);
    578                   //}
     576                      DosSleep(50);
     577                  //Stubby(hwndCnr, pci);
     578                  }
    579579                }
    580580                else
  • trunk/dll/valid.c

    r1438 r1439  
    3535                When these high codes were it text files they showed as hex in new view.
    3636  08 Mar 09 GKY Additional strings move to PCSZs
     37  12 Jul 09 GKY Add xDosQueryAppType and xDoxAlloc... to allow FM/2 to load in high memory
    3738
    3839***********************************************************************/
     
    297298# define BUFFER_BYTES 8192
    298299  rc = xDosAllocMem(&pvBuffer, BUFFER_BYTES,
    299                     PAG_COMMIT | OBJ_TILE | PAG_READ | PAG_WRITE);
     300                    PAG_COMMIT | PAG_READ | PAG_WRITE, pszSrcFile, __LINE__);
    300301  if (rc) {
    301302    Dos_Error(MB_CANCEL, rc, HWND_DESKTOP, pszSrcFile, __LINE__,
     
    601602    p = strrchr(filename, '.');
    602603    if (p)
    603       ret = DosQueryAppType(filename, &apptype);
     604      ret = xDosQueryAppType(filename, &apptype);
    604605    else {
    605606
     
    608609      strcpy(fname, filename);
    609610      strcat(fname, ".");
    610       ret = DosQueryAppType(fname, &apptype);
     611      ret = xDosQueryAppType(fname, &apptype);
    611612    }
    612613    if (apptype & (FAPPTYP_DLL |
  • trunk/dll/wrappers.c

    r1438 r1439  
    1717  25 Dec 08 GKY Add code to allow write verify to be turned off on a per drive basis
    1818  17 Jun 09 SHL Correct missing rc set
     19  12 Jul 09 GKY Add xDosQueryAppType and xDoxAlloc... to allow FM/2 to load in high memory
    1920
    2021***********************************************************************/
     
    4546#include "info.h"                       // driveflags
    4647#include "notebook.h"                   // fVerify
     48#include "pathutil.h"                   // MaxComLineStrg
    4749
    4850// Data definitions
     
    5153#pragma data_seg(GLOBAL1)
    5254BOOL fNoLargeFileSupport;
     55
     56APIRET xDosQueryAppType(PCSZ pszName, PULONG pFlags)
     57{
     58  APIRET rc;
     59# ifdef HIMEM
     60  char *pszPgm;
     61
     62  rc = DosAllocMem((PVOID)&pszPgm,
     63                   MaxComLineStrg,
     64                   PAG_COMMIT | PAG_READ | PAG_WRITE);
     65  if (rc) {
     66    Dos_Error(MB_CANCEL, rc, HWND_DESKTOP, pszSrcFile,
     67              __LINE__, GetPString(IDS_OUTOFMEMORY));
     68    return -1;
     69  }
     70  strcpy(pszPgm, pszName);
     71  rc = DosQueryAppType(pszPgm, pFlags);
     72  DosFreeMem(pszPgm);
     73  return rc;
     74# else
     75  rc = DosQueryAppType(pszName, pFlags);
     76  return rc;
     77# endif
     78}
    5379
    5480APIRET xDosAllocSharedMem(PPVOID ppb,
     
    6086
    6187  rc = DosAllocSharedMem(ppb, pszName, cb, flag | OBJ_ANY);
    62   DbgMsg(pszSrcFile, __LINE__, "ppb %p", *ppb);
     88  //DbgMsg(pszSrcFile, __LINE__, "ppb %p", *ppb);
    6389  if (rc)
    6490    rc = DosAllocSharedMem(ppb, pszName, cb, flag);
     
    6894APIRET xDosAllocMem(PPVOID ppb,
    6995                    ULONG cb,
    70                     ULONG flag)
     96                    ULONG flag,
     97                    PCSZ pszSrcFile,
     98                    UINT uiLineNumber)
    7199{
    72100  APIRET rc;
    73101
    74102  rc = DosAllocMem(ppb, cb, flag | OBJ_ANY);
    75   DbgMsg(pszSrcFile, __LINE__, "ppb %p %x", *ppb, rc);
     103  //DbgMsg(pszSrcFile, uiLineNumber, "ppb %p %x", *ppb, rc);
    76104  if (rc)
    77105    rc = DosAllocMem(ppb, cb, flag);
    78   DbgMsg(pszSrcFile, __LINE__, "ppb %p", *ppb);
     106  //DbgMsg(pszSrcFile, uiLineNumber, "ppb %p", *ppb);
    79107  return rc;
    80108}
  • trunk/dll/wrappers.h

    r1438 r1439  
    1010
    1111  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
    1213
    1314***********************************************************************/
     
    2021#endif
    2122
     23APIRET xDosQueryAppType(PCSZ pszName, PULONG pFlags);
     24
    2225APIRET xDosAllocSharedMem(PPVOID ppb,
    2326                          PSZ pszName,
     
    2730APIRET xDosAllocMem(PPVOID ppb,
    2831                    ULONG cb,
    29                     ULONG flag);
     32                    ULONG flag,
     33                    PCSZ pszSrcFile,
     34                    UINT uiLineNumber);
    3035
    3136APIRET xDosFindFirst(PSZ pszFileSpec,
  • trunk/makefile

    r1343 r1439  
    2525# 18 Nov 08 JBS Ticket 297: Various build improvements/corrections
    2626# 14 Dec 08 SHL Build fm3.sym
     27# 12 Jul 09 GKY Allow FM/2 to load in high memory call exehdr /hi
    2728
    2829# Environment - see makefile_pre.mk and dll\makefile
     
    7677
    7778$(BASE).obj: $(BASE).c dll\version.h .autodepend
     79
     80highmem: .symbolic
     81!ifdef HIMEM
     82  cd dll 
     83  $(MAKE) -h $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT) loadhigh
     84  cd ..
     85!else
     86  @echo "HIMEM not set"
     87!endif 
    7888
    7989# make EXE compenents
  • trunk/makefile_pre.mk

    r1282 r1439  
    1616# 06 Oct 08 SHL Pass DEBUG in CFLAGS; clean up USE_RC usage
    1717# 18 Nov 08 JBS Ticket 297: Various build improvements/corrections
     18# 12 Jul 09 GKY Allow FM/2 to load in high memory call exehdr /hi
    1819
    1920# Environment: see dll\makefile
     
    2324# FORTIFY - build with FORTIFYed memory
    2425# USE_RC - build with rc.exe if defined, other build with wrc.exe
     26# HIMEM - build with changes to allow loading in high memory
    2527
    2628CC = wcc386
     
    5961FORTIFY = $(%FORTIFY)                   # use value from environment
    6062FORTIFY_OPT = FORTIFY=$(FORTIFY)        # set in case needed by sub-make
     63!endif
     64!endif
     65
     66!ifdef HIMEM                    # if defined on wmake command line
     67HIMEM_OPT =  HIMEM=$(HIMEM)
     68!else
     69!ifdef %HIMEM                   # if defined in environment
     70HIMEM = $(%HIMEM)               # use value from environment
     71HIMEM_OPT =  HIMEM=$(HIMEM)
    6172!endif
    6273!endif
Note: See TracChangeset for help on using the changeset viewer.