Changeset 1439
- Timestamp:
- Jul 12, 2009, 11:57:04 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 31 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/arccnrs.c
r1438 r1439 76 76 08 Mar 09 GKY Removed variable aurguments from docopyf and unlinkf (not used) 77 77 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 78 79 79 80 ***********************************************************************/ … … 631 632 *p = 0; 632 633 DosError(FERR_DISABLEHARDERR); 633 if (! DosQueryAppType(s, &apptype) &&634 if (!xDosQueryAppType(s, &apptype) && 634 635 (apptype & FAPPTYP_DOS || 635 636 apptype & FAPPTYP_WINDOWSREAL || -
trunk/dll/autoview.c
r1438 r1439 29 29 07 Feb 09 GKY Eliminate Win_Error2 by moving function names to PCSZs used in Win_Error 30 30 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 31 32 32 33 ***********************************************************************/ … … 137 138 138 139 rc = xDosAllocMem((PPVOID) & pfealist, ealen, PAG_COMMIT | PAG_READ | 139 PAG_WRITE | OBJ_TILE);140 PAG_WRITE, pszSrcFile, __LINE__); 140 141 if (rc || !pfealist) 141 142 Dos_Error(MB_CANCEL, rc, hwnd, pszSrcFile, __LINE__, -
trunk/dll/avv.c
r1398 r1439 29 29 23 Nov 08 JBS Support use of CMD files in archiver definitions 30 30 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 31 32 32 33 ***********************************************************************/ … … 403 404 *error = 1; 404 405 else { 405 ret = (INT) DosQueryAppType(p, &apptype);406 ret = (INT) xDosQueryAppType(p, &apptype); 406 407 apptype &= (~FAPPTYP_32BIT); 407 408 if (!apptype || -
trunk/dll/cmdline.c
r1438 r1439 21 21 24 Aug 08 GKY Warn full drive on save of .DAT file; prevent loss of existing file 22 22 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 23 24 24 25 ***********************************************************************/ … … 434 435 } 435 436 } 436 if ( DosQueryAppType(executable, &apptype) ||437 if (xDosQueryAppType(executable, &apptype) || 437 438 (apptype && !(apptype & 438 439 (FAPPTYP_NOTWINDOWCOMPAT | -
trunk/dll/collect.c
r1430 r1439 66 66 08 Mar 09 GKY Additional strings move to PCSZs in init.c 67 67 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 68 70 69 71 ***********************************************************************/ … … 836 838 dcd->ullTotalBytes += FillInRecordFromFSA(dcd->hwndCnr, pci, 837 839 fullname, 838 &fs4, FALSE, NULL, dcd);840 &fs4, FALSE, 0, dcd); 839 841 memset(&ri, 0, sizeof(RECORDINSERT)); 840 842 ri.cb = sizeof(RECORDINSERT); -
trunk/dll/copyf.c
r1438 r1439 22 22 08 Mar 09 GKY Removed variable aurguments from docopyf and unlinkf (not used) 23 23 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 24 25 25 26 ***********************************************************************/ … … 313 314 ealen = sizeof(FEALIST) + 10; 314 315 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__); 316 318 if (rc) 317 319 Dos_Error(MB_CANCEL, rc, HWND_DESKTOP, pszSrcFile, __LINE__, -
trunk/dll/datamin.c
r1438 r1439 28 28 07 Feb 09 GKY Add *DateFormat functions to format dates based on locale 29 29 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 30 31 31 32 ***********************************************************************/ … … 853 854 854 855 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__); 856 858 if (rc) 857 859 Dos_Error(MB_CANCEL, rc, hwnd, pszSrcFile, __LINE__, … … 892 894 893 895 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__); 895 898 if (rc) 896 899 Dos_Error(MB_CANCEL, rc, hwnd, pszSrcFile, __LINE__, -
trunk/dll/dircnrs.c
r1438 r1439 804 804 MPFROMP(pci), 805 805 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 } 808 814 } 809 815 } … … 1611 1617 DIR_SORT), dcd->sortFlags, FALSE); 1612 1618 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); 1614 1621 } else 1615 1622 PostMsg(hwnd, WM_CLOSE, MPVOID, MPVOID); … … 2797 2804 if (Flesh(hwnd, pci) && 2798 2805 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 } 2801 2810 } 2802 2811 driveserial[toupper(*pci->pszFileName) - 'A'] = volser.serial; … … 2804 2813 } 2805 2814 else if (SHORT2FROMMP(mp1) == CN_EXPANDTREE) { 2806 if (Flesh(hwnd, pci) && !dcd->suspendview && fTopDir) 2815 if (Flesh(hwnd, pci) && !dcd->suspendview && fTopDir) { 2807 2816 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) { 2810 2821 WinSendMsg(hwnd, UM_FILTER, MPVOID, MPVOID); 2822 //DbgMsg(pszSrcFile, __LINE__, "UM_TOPDIR %p pci %p", hwnd, pci); 2823 } 2811 2824 } 2812 2825 } -
trunk/dll/eas.c
r1438 r1439 23 23 29 Feb 08 GKY Use xfree where appropriate 24 24 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 25 26 26 27 ***********************************************************************/ … … 199 200 ealen = sizeof(FEA2LIST) + strlen(s) + 64; 200 201 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__); 202 204 if (rc) 203 205 Dos_Error(MB_CANCEL, rc, HWND_DESKTOP, pszSrcFile, __LINE__, … … 1065 1067 1066 1068 rc = xDosAllocMem((PPVOID) & pfealist, ealen, 1067 OBJ_TILE | PAG_COMMIT | PAG_READ | PAG_WRITE);1069 PAG_COMMIT | PAG_READ | PAG_WRITE, pszSrcFile, __LINE__); 1068 1070 if (rc) 1069 1071 Dos_Error(MB_CANCEL, rc, HWND_DESKTOP, pszSrcFile, __LINE__, -
trunk/dll/filldir.c
r1438 r1439 71 71 06 Jun 09 GKY Add option to show file system type or drive label in tree 72 72 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 73 76 74 77 ***********************************************************************/ … … 220 223 priority_normal(); 221 224 ret = Stubby(StubbyScan->hwndCnr, StubbyScan->pci); 222 225 //DbgMsg(pszSrcFile, __LINE__, "Stubby %i ", ret); 223 226 if (ret == 1) { 224 227 if (WinIsWindow((HAB)0, StubbyScan->hwndCnr)) { … … 227 230 MPFROMP(&StubbyScan->pci), 228 231 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) { 245 241 if (!(driveflags[toupper(*StubbyScan->pci->pszFileName) - 'A'] & 246 242 ((fRScanNoWrite ? 0 : DRIVE_NOTWRITEABLE) | 247 243 (fRScanSlow ? 0 : DRIVE_SLOW)))) { 248 244 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); 250 246 WinSendMsg(StubbyScan->hwndCnr, CM_COLLAPSETREE, MPFROMP(StubbyScan->pci), MPVOID); 251 247 } … … 260 256 } 261 257 StubbyScanCount--; 262 /* if (StubbyScanCount == 0) {263 if (fInitialDriveScan) {264 WinShowWindow(StubbyScan->hwndCnr, TRUE);265 WinShowWindow(StubbyScan->hwndDrivesList, TRUE);266 }267 fInitialDriveScan = FALSE;268 }*/269 258 WinDestroyMsgQueue(hmq); 270 259 } … … 439 428 } // IsDefaultIcon 440 429 430 static 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 441 531 ULONGLONG FillInRecordFromFFB(HWND hwndCnr, 442 532 PCNRITEM pci, 443 533 const PSZ pszDirectory, 444 534 const PFILEFINDBUF4L pffb, 445 535 const BOOL partial, 446 536 DIRCNRDATA *dcd) 447 537 { … … 487 577 memcpy(p, pffb->achName, pffb->cchName + 1); 488 578 } 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 532 584 if (!pci->pszSubject) 533 585 pci->pszSubject = NullStr; 534 586 535 587 // 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 FORTIFY574 {575 unsigned tid = GetTidForWindow(hwndCnr);576 if (tid == 1)577 Fortify_ChangeScope(pci->pszLongName, -1);578 else579 Fortify_SetOwner(pci->pszLongName, 1);580 }581 # endif582 }583 }584 free(pfealist);585 }586 free(pgealist);587 }588 }589 588 if (!pci->pszLongName) 590 589 pci->pszLongName = NullStr; … … 595 594 else if (fForceLower) 596 595 strlwr(pci->pszFileName); 596 597 flags = driveflags[toupper(*pci->pszFileName) - 'A']; 597 598 598 599 // get an icon to use with it … … 728 729 { 729 730 HPOINTER hptr; 731 ULONG flags; 730 732 CHAR *p; 731 ULONG flags;732 733 CHAR szBuf[80]; 733 734 … … 736 737 pci->hwndCnr = hwndCnr; 737 738 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 780 743 if (!pci->pszSubject) 781 744 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 value817 value[pfea->cbValue] = 0; // Terminate818 if (*(USHORT *) value == EAT_ASCII) {819 p = value + sizeof(USHORT) * 2; // Point at value string820 pci->pszLongName = xstrdup(p, pszSrcFile, __LINE__);821 }822 }823 free(pfealist);824 }825 free(pgealist);826 }827 }828 745 if (!pci->pszLongName) 829 746 pci->pszLongName = NullStr; … … 833 750 else if (fForceLower) 834 751 strlwr(pci->pszFileName); 752 753 flags = driveflags[toupper(*pci->pszFileName) - 'A']; 835 754 836 755 if (pfsa4->attrFile & FILE_DIRECTORY) { … … 890 809 891 810 //comma format the file size for large file support 892 {811 if (*szFSType == 0) { 893 812 CHAR szBuf[30]; 894 813 CommaFmtULL(szBuf, sizeof(szBuf), pfsa4->cbFile, ' '); … … 904 823 # endif 905 824 } 825 else 826 pci->pszFmtFileSize = NullStr; 906 827 pci->date.day = pfsa4->fdateLastWrite.day; 907 828 pci->date.month = pfsa4->fdateLastWrite.month; … … 959 880 const BOOL recurse, 960 881 const BOOL partial, 961 882 CHAR *stopflag, 962 883 DIRCNRDATA *dcd, // Optional 963 884 ULONG *pulTotalFiles, // Optional … … 1264 1185 Stubby(hwndCnr, pci); 1265 1186 } 1266 //Stubby(hwndCnr, pci);1267 1187 pci = WinSendMsg(hwndCnr, CM_QUERYRECORD, MPFROMP(pci), 1268 1188 MPFROM2SHORT(CMA_NEXT, CMA_ITEMORDER)); … … 1288 1208 TRUE, // filestoo 1289 1209 FALSE, // recurse 1290 1291 1292 1210 TRUE, // partial 1211 dcd ? &dcd->stopflag : NULL, 1212 dcd, 1293 1213 NULL, // total files 1294 1214 pullTotalBytes); … … 1320 1240 BOOL drivesbuilt = FALSE; 1321 1241 ULONG startdrive = 3; 1322 static BOOL didonce = FALSE;1242 static BOOL didonce; 1323 1243 1324 1244 fDummy = TRUE; … … 1474 1394 FIL_QUERYEASIZEL, 1475 1395 &fsa4, (ULONG) sizeof(FILESTATUS4L)); 1476 // ERROR_BAD_NET_RSP = 58 1477 if (rc == 58) { 1396 if (rc == ERROR_BAD_NET_RESP) { 1478 1397 DosError(FERR_DISABLEHARDERR); 1479 1398 rc = DosQueryPathInfo(szDrive, … … 1527 1446 } 1528 1447 else { 1448 *szFSType = 0; 1529 1449 pci->rc.hptrIcon = hptrDunno; 1530 1450 pci->pszFileName = xstrdup(szDrive, pszSrcFile, __LINE__); 1531 1451 if (fShowFSTypeInTree || fShowDriveLabelInTree) { 1532 strcat(szDrive, " ["); 1533 strcat(szDrive, szFSType); 1534 strcat(szDrive, "]"); 1452 strcat(szDrive, " [?]"); 1535 1453 } 1536 1454 pci->pszDisplayName = xstrdup(szDrive, pszSrcFile, __LINE__); … … 1545 1463 driveserial[x] = -1; 1546 1464 } 1547 1465 } 1548 1466 else { 1549 1467 // diskette drive (A or B) … … 1719 1637 if (~flags & DRIVE_INVALID && 1720 1638 ~flags & DRIVE_NOPRESCAN && 1721 (!fNoRemovableScan || ~flags & DRIVE_REMOVABLE)) //&& !fDrivetoSkip[drvNum])1639 (!fNoRemovableScan || ~flags & DRIVE_REMOVABLE)) 1722 1640 { 1723 //if (DRIVE_RAMDISK)1724 // stubbyScan->RamDrive = TRUE;1725 1641 if (xbeginthread(StubbyScanThread, 1726 1642 65536, … … 1748 1664 MPFROMP(pci->pszFileName)); 1749 1665 } 1750 //fDrivetoSkip[drvNum] = FALSE;1751 1666 } 1752 1667 pci = pciNext; -
trunk/dll/fm3res.rc
r1430 r1439 48 48 14 Mar 09 GKY Remove unused strings; remove trailing \32s replaced with spaces. 49 49 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 50 51 51 52 ***********************************************************************/ … … 3275 3276 IDS_STATERESERVENAMETEXT "\"%s\" is a reserved state name" 3276 3277 IDS_DRAGDROPDIALOGTEXT "Drag & Drop Dialog" 3278 IDS_ERROREATYPETEXT "EA type 0x%x unexpected for %.*s" 3277 3279 3278 3280 // Add strings that need to be combined by GetPString here -
trunk/dll/fm3str.h
r1429 r1439 31 31 14 Mar 09 GKY Remove variables that were transferred to PCSZs 32 32 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 33 34 34 35 ***********************************************************************/ … … 1000 1001 #define IDS_STATERESERVENAMETEXT 1012 1001 1002 #define IDS_DRAGDROPDIALOGTEXT 1013 1003 #define IDS_ERROREATYPETEXT 1014 1002 1004 1003 1005 //The following strings were cut up form the string of the root name (ie IDS_SUGGEST1TEXT) -
trunk/dll/info.c
r1402 r1439 32 32 07 Feb 09 GKY Add *DateFormat functions to format dates based on locale 33 33 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 34 36 35 37 ***********************************************************************/ … … 756 758 WinCheckButton(hwnd, FLE_SYSTEM, ((fs.attrFile & FILE_SYSTEM) != 0)); 757 759 DosError(FERR_DISABLEHARDERR); 758 if (! DosQueryAppType(pfs->szFileName, &apptype)) {760 if (!xDosQueryAppType(pfs->szFileName, &apptype)) { 759 761 WinEnableWindow(WinWindowFromID(hwnd, FLE_OS2FS), TRUE); 760 762 WinEnableWindow(WinWindowFromID(hwnd, FLE_OS2WIN), TRUE); … … 1032 1034 else 1033 1035 driveflags[drive] &= (~DRIVE_WRITEVERIFYOFF); 1034 if (WinQueryButtonCheckstate(hwnd,DVS_RSCANNED))1035 driveflags[drive] |= DRIVE_RSCANNED;1036 else1037 driveflags[drive] &= (~DRIVE_RSCANNED);1038 1036 { 1039 1037 ULONG flags; -
trunk/dll/init.c
r1438 r1439 81 81 06 Jun 09 GKY Add option to show file system type or drive label in tree 82 82 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 83 84 84 85 ***********************************************************************/ … … 1149 1150 if (*FullPath) 1150 1151 fLVMGui = TRUE; 1151 if (! DosQueryAppType(PCSZ_DFSOS2EXE, &ulAppType))1152 if (!xDosQueryAppType(PCSZ_DFSOS2EXE, &ulAppType)) 1152 1153 fDFSee = TRUE; 1153 if (! DosQueryAppType(PCSZ_MINILVMEXE, &ulAppType))1154 if (!xDosQueryAppType(PCSZ_MINILVMEXE, &ulAppType)) 1154 1155 fMiniLVM = TRUE; 1155 if (! DosQueryAppType(PCSZ_FDISKPMEXE, &ulAppType))1156 if (!xDosQueryAppType(PCSZ_FDISKPMEXE, &ulAppType)) 1156 1157 fFDisk = TRUE; 1157 if (! DosQueryAppType(PCSZ_LVMEXE, &ulAppType))1158 if (!xDosQueryAppType(PCSZ_LVMEXE, &ulAppType)) 1158 1159 fLVM = TRUE; 1159 1160 1160 1161 // Check to see if we are running protect only 1161 if (! DosQueryAppType(GetCmdSpec(TRUE), &ulAppType)) {1162 if (!xDosQueryAppType(GetCmdSpec(TRUE), &ulAppType)) { 1162 1163 ret = runemf2(SEPARATE | WINDOWED | BACKGROUND | MINIMIZED, 1163 1164 (HWND) 0, pszSrcFile, __LINE__, NULL, NULL, -
trunk/dll/instant.c
r1438 r1439 13 13 22 Mar 07 GKY Use QWL_USER 14 14 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 15 16 16 17 ***********************************************************************/ … … 104 105 if (mem) { 105 106 rc = xDosAllocMem((PVOID) & bat, mem, 106 PAG_COMMIT | PAG_READ | PAG_WRITE );107 PAG_COMMIT | PAG_READ | PAG_WRITE, pszSrcFile, __LINE__); 107 108 if (rc || !bat) { 108 109 Dos_Error(MB_CANCEL, rc, HWND_DESKTOP, pszSrcFile, __LINE__, -
trunk/dll/killproc.c
r1438 r1439 21 21 10 Dec 08 SHL Integrate exception handler support 22 22 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 23 24 24 25 ***********************************************************************/ … … 117 118 WinSendDlgItemMsg(hwnd, KILL_LISTBOX, LM_DELETEALL, MPVOID, MPVOID); 118 119 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__); 120 121 if (rc) 121 122 Dos_Error(MB_CANCEL, rc, HWND_DESKTOP, pszSrcFile, __LINE__, … … 186 187 WinSendDlgItemMsg(hwnd, KILL_LISTBOX, LM_DELETEALL, MPVOID, MPVOID); 187 188 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__); 189 190 if (rc) 190 191 Dos_Error(MB_CANCEL, rc, HWND_DESKTOP, pszSrcFile, __LINE__, -
trunk/dll/mainwnd.c
r1438 r1439 89 89 21 Jun 09 GKY Added drive letter to bitmap buttons in drive bar; Eliminate static drive 90 90 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 91 93 92 94 ***********************************************************************/ … … 3325 3327 } 3326 3328 } 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 3329 3331 } 3330 3332 } -
trunk/dll/makefile
r1415 r1439 51 51 # 18 Dec 08 SHL Avoid extra fm3res.str builds 52 52 # 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 53 54 54 55 # Environment: see makefile_pre.mk … … 58 59 # FORTIFY - build with FORTIFYed memory 59 60 # USE_RC - build with rc.exe if defined, other build with wrc.exe 61 # HIMEM - build with changes to allow loading in high memory 60 62 61 63 BASE = fm3dll … … 96 98 !ifdef %FORTIFY # if defined in environment 97 99 FORTIFY = $(%FORTIFY) # use value from environment 100 !endif 101 102 !ifdef %HIMEM # if defined in environment 103 HIMEM = $(%HIMEM) # use value from environment 98 104 !endif 99 105 … … 150 156 !endif 151 157 158 !ifdef HIMEM 159 CFLAGS += -dHIMEM 160 !endif 161 152 162 # for fm3res only 153 163 CFLAGSR = -bt=os2 -mf -bd -bm -olirs -s -j -we -wx -zfp -zgp -zp4 -zq … … 211 221 $(BASERES).dll & 212 222 ipf\fm3.hlp 213 223 214 224 syms: $(SYMS) .symbolic 215 225 … … 312 322 @for %f in ($(BASE).dll $(BASERES).dll) do !lxlite /x- /b- %f 313 323 !endif 324 325 # Run for each dependent 326 loadhigh: $(BASE).dll $(BASERES).dll .symbolic 327 @for %f in ($(BASE).dll $(BASERES).dll) do !exehdr /hi %f 314 328 315 329 cleanobj: .symbolic -
trunk/dll/misc.c
r1438 r1439 60 60 28 Mar 09 GKY Add RemoveOldCnrSwitches to remove pre 3.16 style ini keys; 61 61 add State.version key for check 62 12 Jul 09 GKY Add xDosQueryAppType and xDoxAlloc... to allow FM/2 to load in high memory 62 63 63 64 ***********************************************************************/ … … 846 847 ealen = sizeof(FEALIST) + 9; 847 848 rc = xDosAllocMem((PPVOID) & pfealist, ealen + 64, 848 OBJ_TILE | PAG_COMMIT | PAG_READ | PAG_WRITE);849 PAG_COMMIT | PAG_READ | PAG_WRITE, pszSrcFile, __LINE__); 849 850 if (rc) 850 851 Dos_Error(MB_CANCEL, rc, HWND_DESKTOP, pszSrcFile, -
trunk/dll/mle.c
r1438 r1439 23 23 10 Dec 08 SHL Integrate exception handler support 24 24 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 25 26 26 27 ***********************************************************************/ … … 181 182 len++; 182 183 rc = xDosAllocMem((PVOID) & temp, 4096, 183 PAG_COMMIT | OBJ_TILE | PAG_READ | PAG_WRITE);184 PAG_COMMIT | PAG_READ | PAG_WRITE, pszSrcFile, __LINE__); 184 185 if (rc || !temp) 185 186 Dos_Error(MB_CANCEL, rc, h, pszSrcFile, __LINE__, … … 264 265 return FALSE; 265 266 rc = xDosAllocMem((PVOID) & temp, 32768L, 266 PAG_COMMIT | OBJ_TILE | PAG_READ | PAG_WRITE);267 PAG_COMMIT | PAG_READ | PAG_WRITE, pszSrcFile, __LINE__); 267 268 if (rc || !temp) { 268 269 Dos_Error(MB_CANCEL, rc, h, pszSrcFile, __LINE__, … … 536 537 if (len) { 537 538 rc = xDosAllocMem((PVOID) & hexbuff, 50001, 538 PAG_COMMIT | OBJ_TILE | PAG_READ | PAG_WRITE);539 PAG_COMMIT | PAG_READ | PAG_WRITE, pszSrcFile, __LINE__); 539 540 if (rc || !hexbuff) { 540 541 Dos_Error(MB_CANCEL, rc, h, pszSrcFile, __LINE__, … … 665 666 if (len && len != -1) { 666 667 rc = xDosAllocMem((PVOID) & buffer, 667 50000L, PAG_COMMIT | OBJ_TILE | PAG_READ | PAG_WRITE);668 50000L, PAG_COMMIT | PAG_READ | PAG_WRITE, pszSrcFile, __LINE__); 668 669 if (rc || !buffer) { 669 670 Dos_Error(MB_CANCEL, rc, h, pszSrcFile, __LINE__, … … 917 918 918 919 rc = xDosAllocMem((PVOID) & buffer, 4096L, 919 PAG_COMMIT | OBJ_TILE | PAG_READ | PAG_WRITE);920 PAG_COMMIT | PAG_READ | PAG_WRITE, pszSrcFile, __LINE__); 920 921 if (rc || !buffer) { 921 922 Dos_Error(MB_CANCEL, rc, h, pszSrcFile, __LINE__, -
trunk/dll/pathutil.c
r1438 r1439 14 14 15 Oct 08 GKY Fix NormalizeCmdLine to check all 5 executible extensions when no extension provided; 15 15 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 17 19 18 20 ***********************************************************************/ … … 197 199 } 198 200 else 199 ret = DosQueryAppType(szCmdLine, &ulAppType);201 ret = xDosQueryAppType(szCmdLine, &ulAppType); 200 202 BldQuotedFileName(pszNewCmdLine, szCmdLine); 201 203 if (ret) { … … 229 231 while (strchr(szCmdLine, '\"')) 230 232 remove_first_occurence_of_character("\"", szCmdLine); 231 ret = DosQueryAppType(szCmdLine, &ulAppType); // exe automatically appended233 ret = xDosQueryAppType(szCmdLine, &ulAppType); // exe automatically appended 232 234 if (!ret) 233 235 strcat(szCmdLine, PCSZ_DOTEXE); 234 236 else { 235 237 strcat(szCmdLine, PCSZ_DOTCOM); 236 ret = DosQueryAppType(szCmdLine, &ulAppType);238 ret = xDosQueryAppType(szCmdLine, &ulAppType); 237 239 if (ret) { 238 240 offset = strrchr(szCmdLine, '.' ); … … 266 268 if (*pszChar == ' ') { //test at every space for the end of the filename 267 269 *pszChar = '\0'; 268 ret = DosQueryAppType(szCmdLine, &ulAppType);270 ret = xDosQueryAppType(szCmdLine, &ulAppType); 269 271 if (!ret) { 270 272 strcat(szCmdLine, PCSZ_DOTEXE); … … 273 275 else { 274 276 strcat(szCmdLine, PCSZ_DOTCOM); 275 ret = DosQueryAppType(szCmdLine, &ulAppType);277 ret = xDosQueryAppType(szCmdLine, &ulAppType); 276 278 if (ret) { 277 279 offset = strrchr(szCmdLine, '.' ); -
trunk/dll/shadow.c
r1438 r1439 14 14 20 Aug 07 GKY Move #pragma alloc_text to end for OpenWatcom compat 15 15 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 16 17 17 18 ***********************************************************************/ … … 224 225 CHAR *p, *pp, szDir[CCHMAXPATH + 1], szBuffer[CCHMAXPATH + 1]; 225 226 226 if ( DosQueryAppType(list[x], &apt))227 if (xDosQueryAppType(list[x], &apt)) 227 228 apt = 0; 228 229 p = strrchr(list[x], '.'); -
trunk/dll/subj.c
r1438 r1439 15 15 01 Sep 07 GKY Use xDosSetPathInfo to fix case where FS3 buffer crosses 64k boundry 16 16 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 17 18 18 19 ***********************************************************************/ … … 126 127 ealen = sizeof(FEALIST) + 9; 127 128 rc = xDosAllocMem((PPVOID) & pfealist, ealen + 1L, 128 OBJ_TILE | PAG_COMMIT | PAG_READ | PAG_WRITE);129 PAG_COMMIT | PAG_READ | PAG_WRITE, pszSrcFile, __LINE__); 129 130 if (rc) 130 131 Dos_Error(MB_CANCEL, rc, hwnd, pszSrcFile, __LINE__, -
trunk/dll/systemf.c
r1438 r1439 26 26 03 Jan 09 GKY Check for system that is protectonly to gray out Dos/Win command lines and prevent 27 27 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 28 29 29 30 ***********************************************************************/ … … 701 702 hwnd = HWND_DESKTOP; 702 703 703 rc = xDosAllocMem((PVOID)&pszPgm,704 705 PAG_COMMIT | OBJ_TILE| PAG_READ | PAG_WRITE);704 rc = DosAllocMem((PVOID)&pszPgm, 705 MaxComLineStrg, 706 PAG_COMMIT | PAG_READ | PAG_WRITE); 706 707 if (rc) { 707 708 Dos_Error(MB_CANCEL,rc,hwnd,pszSrcFile,__LINE__,GetPString(IDS_OUTOFMEMORY)); … … 749 750 temp = *p; 750 751 if (temp) { 751 rc = xDosAllocMem((PVOID)&pszArgs,752 753 PAG_COMMIT | OBJ_TILE| PAG_READ | PAG_WRITE);752 rc = DosAllocMem((PVOID)&pszArgs, 753 MaxComLineStrg * 2, 754 PAG_COMMIT | PAG_READ | PAG_WRITE); 754 755 if (rc) 755 756 Dos_Error(MB_CANCEL,rc,hwnd,pszSrcFile,__LINE__,GetPString(IDS_OUTOFMEMORY)); … … 883 884 if (~type & FULLSCREEN) 884 885 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); 887 888 if (rc) { 888 889 Dos_Error(MB_CANCEL,rc,hwnd,pszSrcFile,__LINE__,GetPString(IDS_OUTOFMEMORY)); … … 1075 1076 useTermQ = FALSE; 1076 1077 else { 1078 # ifdef HIMEM 1079 useTermQ = FALSE; 1080 # else 1077 1081 rc = 0; 1078 1082 DosEnterCritSec(); … … 1097 1101 // if (!rc) fprintf(stderr,"%s %d qcreated ptib %x hTermQ %x\n",__FILE__, __LINE__,ptib,hTermQ); 1098 1102 } 1099 1100 1103 } // if 1st time 1104 useTermQ = hTermQ && hTermQSem; 1101 1105 if (!rc) 1102 DosExitCritSec(); 1106 DosExitCritSec(); 1107 # endif 1103 1108 } // if wait 1104 1109 … … 1140 1145 if (ret && ret != ERROR_SMG_START_IN_BACKGROUND) { 1141 1146 if (!fNoErrorMsg) 1142 1147 Dos_Error(MB_CANCEL,ret,hwnd,pszSrcFile,__LINE__, 1143 1148 GetPString(IDS_DOSSTARTSESSIONFAILEDTEXT),pszPgm,pszArgs, 1144 1149 pszCallingFile, uiLineNumber); // 26 May 08 SHL 1145 1150 } 1146 1151 else if (type & WAIT) { … … 1157 1162 for (ctr = 0;; ctr++) 1158 1163 { 1159 DosSleep(100);//05 Aug 07 GKY 2001164 DosSleep(50);//05 Aug 07 GKY 200 1160 1165 if (DosSetSession(ulSessID, &sd)) // Check if session gone (i.e. finished) 1161 1166 break; … … 1171 1176 if (ctr < 20) { 1172 1177 rc = DosReadQueue(hTermQ, &rq, &ulLength, (PPVOID)&pTermInfo, 0, 1173 1178 DCWW_NOWAIT, &bPriority, hTermQSem); 1174 1179 if (rc == ERROR_QUE_EMPTY) { 1175 1180 DosSleep(50);//05 Aug 07 GKY 100 … … 1178 1183 } 1179 1184 else { 1180 1185 if (ctr == 20) { 1181 1186 ShowSession(hwnd, sessPID); // Show long running session 1182 1187 } 1183 1188 rc = DosReadQueue(hTermQ, &rq, &ulLength, (PPVOID)&pTermInfo, 0, 1184 1189 DCWW_WAIT, &bPriority, 0); -
trunk/dll/treecnr.c
r1438 r1439 70 70 07 Jun 09 GKY Fixed double names in tree container when collapsed tree is accessed 71 71 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 72 75 ***********************************************************************/ 73 76 … … 274 277 if (!stricmp(dirname, pciP->pszFileName)) 275 278 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); 284 281 strcpy(szDir, dirname); 285 282 if (p - szDir >= strlen(szDir)) … … 336 333 MPFROM2SHORT(CMA_PARENT, CMA_ITEMORDER)); 337 334 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); 346 337 pciToSelect = pciP; 347 338 } … … 358 349 ShowCnrRecord(hwndCnr, (PMINIRECORDCORE) pciToSelect); 359 350 } 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); 368 353 if (!quickbail) { 369 354 WinSendMsg(hwndCnr, … … 375 360 } 376 361 WinEnableWindowUpdate(hwndCnr, TRUE); 377 //DosSleep(1); // Let GUI update378 362 } 379 363 … … 1829 1813 if (Flesh(hwnd, pci) && 1830 1814 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 } 1833 1819 } 1834 1820 driveserial[toupper(*pci->pszFileName) - 'A'] = volser.serial; … … 1843 1829 } 1844 1830 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 } 1850 1840 } 1851 1841 } … … 1942 1932 CHAR volumelabel[CCHMAXPATH]; 1943 1933 } 1944 volser; 1934 volser; 1935 CHAR FileSystem[CCHMAXPATH]; 1936 CHAR szBuf[CCHMAXPATH]; 1945 1937 1946 1938 pciL = pciP = pci; … … 1965 1957 INT removable, x = (INT) (toupper(*pci->pszFileName) - 'A'); 1966 1958 ULONG drvtype; 1967 CHAR FileSystem[CCHMAXPATH];1968 1959 1969 1960 DosError(FERR_DISABLEHARDERR); … … 2008 1999 driveflags[x] |= DRIVE_NOLONGNAMES; 2009 2000 } 2010 SelectDriveIcon(pciP); 2011 WinSendMsg(hwnd, 2012 CM_INVALIDATERECORD, 2013 MPFROMP(&pciP), 2014 MPFROM2SHORT(1, CMA_ERASE | CMA_REPOSITION)); 2001 SelectDriveIcon(pciP); 2015 2002 if (hwndMain) 2016 2003 PostMsg(hwndMain, UM_BUILDDRIVEBAR, MPVOID, MPVOID); … … 2022 2009 FSIL_VOLSER, &volser, 2023 2010 (ULONG) sizeof(volser)); 2024 2011 if (!status) { 2025 2012 if (!volser.serial || 2026 2013 driveserial[toupper(*pci->pszFileName) - 'A'] != … … 2036 2023 if (!pciL) 2037 2024 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 } 2039 2045 else { 2040 2046 driveserial[toupper(*pci->pszFileName) - 'A'] = -1; … … 2356 2362 dcd->suspendview = tempsusp; 2357 2363 PostMsg(hwnd, UM_RESCAN, MPVOID, MPVOID); 2364 //DbgMsg(pszSrcFile, __LINE__, "UM_RESCAN %p pci %s", hwnd, (CHAR *) mp1); 2358 2365 } 2359 2366 return 0; … … 2622 2629 runemf2(SEPARATE | WINDOWED | BACKGROUND | MINIMIZED | WAIT, 2623 2630 HWND_DESKTOP, pszSrcFile, __LINE__, NULL, NULL, 2624 2625 2631 "%s %s", PCSZ_LVMEXE, "/RediscoverPRM"); 2632 PostMsg(hwndTree, WM_COMMAND, MPFROM2SHORT(IDM_RESCAN, 0), MPVOID); 2626 2633 break; 2627 2634 -
trunk/dll/update.c
r1402 r1439 191 191 PostMsg(hwndCnr, UM_RESCAN, MPVOID, MPVOID); 192 192 if (pci->attrFile & FILE_DIRECTORY) { 193 /*if (fInitialDriveScan)193 if (fInitialDriveScan) 194 194 Stubby(hwndCnr, pci); 195 195 else { 196 196 while (StubbyScanCount != 0) 197 DosSleep(50); */198 Stubby(hwndCnr, pci);199 //}197 DosSleep(50); 198 //Stubby(hwndCnr, pci); 199 } 200 200 } 201 201 } … … 291 291 dcd->ullTotalBytes += ullTotalBytes; 292 292 } 293 /*if (fInitialDriveScan)293 if (fInitialDriveScan) 294 294 Stubby(hwndCnr, pci); 295 295 else { 296 296 while (StubbyScanCount != 0) 297 DosSleep(50); */298 Stubby(hwndCnr, pci);299 //}297 DosSleep(50); 298 //Stubby(hwndCnr, pci); 299 } 300 300 } 301 301 } … … 465 465 repos = TRUE; 466 466 if (pci->attrFile & FILE_DIRECTORY) { 467 /*if (fInitialDriveScan)467 if (fInitialDriveScan) 468 468 Stubby(hwndCnr, pci); 469 469 else { 470 470 while (StubbyScanCount != 0) 471 DosSleep(50); */472 Stubby(hwndCnr, pci);473 //}471 DosSleep(50); 472 //Stubby(hwndCnr, pci); 473 } 474 474 } 475 475 } … … 570 570 } 571 571 repos = TRUE; 572 /*if (fInitialDriveScan)572 if (fInitialDriveScan) 573 573 Stubby(hwndCnr, pci); 574 574 else { 575 575 while (StubbyScanCount != 0) 576 DosSleep(50); */577 Stubby(hwndCnr, pci);578 //}576 DosSleep(50); 577 //Stubby(hwndCnr, pci); 578 } 579 579 } 580 580 else -
trunk/dll/valid.c
r1438 r1439 35 35 When these high codes were it text files they showed as hex in new view. 36 36 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 37 38 38 39 ***********************************************************************/ … … 297 298 # define BUFFER_BYTES 8192 298 299 rc = xDosAllocMem(&pvBuffer, BUFFER_BYTES, 299 PAG_COMMIT | OBJ_TILE | PAG_READ | PAG_WRITE);300 PAG_COMMIT | PAG_READ | PAG_WRITE, pszSrcFile, __LINE__); 300 301 if (rc) { 301 302 Dos_Error(MB_CANCEL, rc, HWND_DESKTOP, pszSrcFile, __LINE__, … … 601 602 p = strrchr(filename, '.'); 602 603 if (p) 603 ret = DosQueryAppType(filename, &apptype);604 ret = xDosQueryAppType(filename, &apptype); 604 605 else { 605 606 … … 608 609 strcpy(fname, filename); 609 610 strcat(fname, "."); 610 ret = DosQueryAppType(fname, &apptype);611 ret = xDosQueryAppType(fname, &apptype); 611 612 } 612 613 if (apptype & (FAPPTYP_DLL | -
trunk/dll/wrappers.c
r1438 r1439 17 17 25 Dec 08 GKY Add code to allow write verify to be turned off on a per drive basis 18 18 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 19 20 20 21 ***********************************************************************/ … … 45 46 #include "info.h" // driveflags 46 47 #include "notebook.h" // fVerify 48 #include "pathutil.h" // MaxComLineStrg 47 49 48 50 // Data definitions … … 51 53 #pragma data_seg(GLOBAL1) 52 54 BOOL fNoLargeFileSupport; 55 56 APIRET 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 } 53 79 54 80 APIRET xDosAllocSharedMem(PPVOID ppb, … … 60 86 61 87 rc = DosAllocSharedMem(ppb, pszName, cb, flag | OBJ_ANY); 62 DbgMsg(pszSrcFile, __LINE__, "ppb %p", *ppb);88 //DbgMsg(pszSrcFile, __LINE__, "ppb %p", *ppb); 63 89 if (rc) 64 90 rc = DosAllocSharedMem(ppb, pszName, cb, flag); … … 68 94 APIRET xDosAllocMem(PPVOID ppb, 69 95 ULONG cb, 70 ULONG flag) 96 ULONG flag, 97 PCSZ pszSrcFile, 98 UINT uiLineNumber) 71 99 { 72 100 APIRET rc; 73 101 74 102 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); 76 104 if (rc) 77 105 rc = DosAllocMem(ppb, cb, flag); 78 DbgMsg(pszSrcFile, __LINE__, "ppb %p", *ppb);106 //DbgMsg(pszSrcFile, uiLineNumber, "ppb %p", *ppb); 79 107 return rc; 80 108 } -
trunk/dll/wrappers.h
r1438 r1439 10 10 11 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 12 13 13 14 ***********************************************************************/ … … 20 21 #endif 21 22 23 APIRET xDosQueryAppType(PCSZ pszName, PULONG pFlags); 24 22 25 APIRET xDosAllocSharedMem(PPVOID ppb, 23 26 PSZ pszName, … … 27 30 APIRET xDosAllocMem(PPVOID ppb, 28 31 ULONG cb, 29 ULONG flag); 32 ULONG flag, 33 PCSZ pszSrcFile, 34 UINT uiLineNumber); 30 35 31 36 APIRET xDosFindFirst(PSZ pszFileSpec, -
trunk/makefile
r1343 r1439 25 25 # 18 Nov 08 JBS Ticket 297: Various build improvements/corrections 26 26 # 14 Dec 08 SHL Build fm3.sym 27 # 12 Jul 09 GKY Allow FM/2 to load in high memory call exehdr /hi 27 28 28 29 # Environment - see makefile_pre.mk and dll\makefile … … 76 77 77 78 $(BASE).obj: $(BASE).c dll\version.h .autodepend 79 80 highmem: .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 78 88 79 89 # make EXE compenents -
trunk/makefile_pre.mk
r1282 r1439 16 16 # 06 Oct 08 SHL Pass DEBUG in CFLAGS; clean up USE_RC usage 17 17 # 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 18 19 19 20 # Environment: see dll\makefile … … 23 24 # FORTIFY - build with FORTIFYed memory 24 25 # USE_RC - build with rc.exe if defined, other build with wrc.exe 26 # HIMEM - build with changes to allow loading in high memory 25 27 26 28 CC = wcc386 … … 59 61 FORTIFY = $(%FORTIFY) # use value from environment 60 62 FORTIFY_OPT = FORTIFY=$(FORTIFY) # set in case needed by sub-make 63 !endif 64 !endif 65 66 !ifdef HIMEM # if defined on wmake command line 67 HIMEM_OPT = HIMEM=$(HIMEM) 68 !else 69 !ifdef %HIMEM # if defined in environment 70 HIMEM = $(%HIMEM) # use value from environment 71 HIMEM_OPT = HIMEM=$(HIMEM) 61 72 !endif 62 73 !endif
Note:
See TracChangeset
for help on using the changeset viewer.