Changeset 1354
- Timestamp:
 - Dec 25, 2008, 11:43:34 PM (17 years ago)
 - Location:
 - trunk/dll
 - Files:
 - 
      
- 21 edited
 
- 
          
  comp.c (modified) (3 diffs)
 - 
          
  filldir.c (modified) (9 diffs)
 - 
          
  filldir.h (modified) (2 diffs)
 - 
          
  flesh.c (modified) (4 diffs)
 - 
          
  fm3dlg.h (modified) (4 diffs)
 - 
          
  fm3dll.h (modified) (1 diff)
 - 
          
  fm3res.dlg (modified) (4 diffs)
 - 
          
  info.c (modified) (2 diffs)
 - 
          
  init.c (modified) (1 diff)
 - 
          
  mainwnd.c (modified) (4 diffs)
 - 
          
  misc.c (modified) (4 diffs)
 - 
          
  mkdir.c (modified) (6 diffs)
 - 
          
  notebook.c (modified) (5 diffs)
 - 
          
  notebook.h (modified) (1 diff)
 - 
          
  rename.c (modified) (4 diffs)
 - 
          
  seeall.c (modified) (3 diffs)
 - 
          
  treecnr.c (modified) (2 diffs)
 - 
          
  valid.c (modified) (7 diffs)
 - 
          
  valid.h (modified) (1 diff)
 - 
          
  worker.c (modified) (9 diffs)
 - 
          
  wrappers.c (modified) (4 diffs)
 
 
Legend:
- Unmodified
 - Added
 - Removed
 
- 
      
trunk/dll/comp.c
r1335 r1354 66 66 #include <share.h> 67 67 #include <io.h> 68 #include <ctype.h> 68 69 // #include <process.h> // _endthread 69 70 … … 115 116 #include "fortify.h" // 06 May 08 SHL added 116 117 #include "excputil.h" // xbeginthread 118 #include "info.h" // driveflags 117 119 118 120 typedef struct … … 549 551 break; 550 552 551 case IDM_MOVE: 552 if (hwndCnrS == WinWindowFromID(cmp->hwnd, COMP_RIGHTDIR)) 553 BldFullPathName(szNewName, cmp->leftdir, pciS->pszDisplayName); 554 else 555 BldFullPathName(szNewName, cmp->rightdir, pciS->pszDisplayName); 556 // Make directory if required 557 strcpy(szDirName, szNewName); 558 p = strrchr(szDirName, '\\'); 559 if (p) { 560 if (p > szDirName + 2) 561 p++; 562 *p = 0; 563 if (IsFile(szDirName) == -1) 564 MassMkdir(hwndMain, szDirName); 565 } 566 rc = docopyf(MOVE, pciS->pszFileName, "%s", szNewName); 567 if (!rc && stricmp(pciS->pszFileName, szNewName)) { 568 WinSendMsg(hwndCnrS, CM_SETRECORDEMPHASIS, MPFROMP(pciS), 569 MPFROM2SHORT(FALSE, CRA_SELECTED)); 570 if (pciD->rc.flRecordAttr & CRA_SELECTED) 571 WinSendMsg(hwndCnrD, CM_SETRECORDEMPHASIS, MPFROMP(pciD), 572 MPFROM2SHORT(FALSE, CRA_SELECTED)); 573 FreeCnrItemData(pciD); 574 pciD->pszFileName = xstrdup(szNewName, pszSrcFile, __LINE__); 575 if (hwndCnrS == WinWindowFromID(cmp->hwnd, COMP_RIGHTDIR)) { 576 pciD->pszDisplayName = pciD->pszFileName + strlen(cmp->leftdir); 577 if (cmp->leftdir[strlen(cmp->leftdir) - 1] != '\\') 578 pciD->pszDisplayName++; 579 } 580 else { 581 pciD->pszDisplayName = pciD->pszFileName + strlen(cmp->rightdir); 582 if (cmp->rightdir[strlen(cmp->rightdir) - 1] != '\\') 583 pciD->pszDisplayName++; 584 } 585 pciD->pszLongName = pciS->pszLongName; 586 pciS->pszLongName = NullStr; // 07 Sep 08 SHL avoid aliased pointer 587 if (pciD->pszSubject != NullStr) { 588 xfree(pciD->pszSubject, pszSrcFile, __LINE__); 589 pciD->pszSubject = NullStr; 590 } 591 pciD->attrFile = pciS->attrFile; 592 pciD->pszDispAttr = pciS->pszDispAttr; 593 pciD->flags = 0; // Just on one side 594 pciD->date = pciS->date; 595 pciD->time = pciS->time; 596 pciD->ladate = pciS->ladate; 597 pciD->latime = pciS->latime; 598 pciD->crdate = pciS->crdate; 599 pciD->crtime = pciS->crtime; 600 pciD->cbFile = pciS->cbFile; 601 pciD->easize = pciS->easize; 602 603 if (pciS->pszFileName != NullStr) { 604 xfree(pciS->pszFileName, pszSrcFile, __LINE__); 605 pciS->pszFileName = NullStr; 606 pciS->pszDisplayName = pciS->pszFileName; 607 pciS->rc.pszIcon = pciS->pszFileName; 608 } 609 if (pciS->pszSubject != NullStr) { 610 xfree(pciS->pszSubject, pszSrcFile, __LINE__); 611 pciS->pszSubject = NullStr; 612 } 613 pciS->flags = 0; // Just on one side 614 615 WinSendMsg(hwndCnrS, CM_INVALIDATERECORD, MPFROMP(&pciS), 616 MPFROM2SHORT(1, CMA_ERASE | CMA_TEXTCHANGED)); 617 618 WinSendMsg(hwndCnrD, CM_INVALIDATERECORD, MPFROMP(&pciD), 619 MPFROM2SHORT(1, CMA_ERASE | CMA_TEXTCHANGED)); 620 621 if (hwndCnrS == WinWindowFromID(cmp->hwnd, COMP_LEFTDIR)) 622 cmp->cmp->totalleft--; 623 else 624 cmp->cmp->totalright--; 625 } 626 else if (rc) { 627 rc = Dos_Error(MB_ENTERCANCEL, 628 rc, 629 HWND_DESKTOP, 630 pszSrcFile, 631 __LINE__, 632 GetPString(IDS_COMPMOVEFAILEDTEXT), 633 pciS->pszFileName, szNewName); 634 if (rc == MBID_CANCEL) // Cause loop to break 635 pciNextS = NULL; 636 } 637 break; 638 639 case IDM_COPY: 640 if (hwndCnrS == WinWindowFromID(cmp->hwnd, COMP_RIGHTDIR)) 641 BldFullPathName(szNewName, cmp->leftdir, pciS->pszDisplayName); 642 else 643 BldFullPathName(szNewName, cmp->rightdir, pciS->pszDisplayName); 644 // Make directory if required 645 strcpy(szDirName, szNewName); 646 p = strrchr(szDirName, '\\'); 647 if (p) { 648 if (p > szDirName + 2) 649 p++; 650 *p = 0; 651 if (IsFile(szDirName) == -1) 652 MassMkdir(hwndMain, szDirName); 653 } 654 rc = docopyf(COPY, pciS->pszFileName, "%s", szNewName); 655 if (rc) { 656 rc = Dos_Error(MB_ENTERCANCEL, 657 rc, 658 HWND_DESKTOP, 659 pszSrcFile, 660 __LINE__, 661 GetPString(IDS_COMPCOPYFAILEDTEXT), 662 pciS->pszFileName, szNewName); 663 if (rc == MBID_CANCEL) 664 pciNextS = NULL; // Cause loop to break 665 } 666 else { 667 WinSendMsg(hwndCnrS, CM_SETRECORDEMPHASIS, MPFROMP(pciS), 668 MPFROM2SHORT(FALSE, CRA_SELECTED)); 669 if (pciD->rc.flRecordAttr & CRA_SELECTED) 670 WinSendMsg(hwndCnrD, CM_SETRECORDEMPHASIS, MPFROMP(pciD), 671 MPFROM2SHORT(FALSE, CRA_SELECTED)); 672 // 12 Jan 08 SHL 673 if (pciD->pszFileName == NullStr) { 674 if (hwndCnrD == WinWindowFromID(cmp->hwnd, COMP_LEFTDIR)) 675 cmp->totalleft++; 676 else 677 cmp->totalright++; 678 } 679 FreeCnrItemData(pciD); 680 pciD->pszFileName = xstrdup(szNewName, pszSrcFile, __LINE__); 681 if (hwndCnrS == WinWindowFromID(cmp->hwnd, COMP_RIGHTDIR)) { 682 pciD->pszDisplayName = pciD->pszFileName + strlen(cmp->leftdir); 683 if (cmp->leftdir[strlen(cmp->leftdir) - 1] != '\\') 684 pciD->pszDisplayName++; 685 } 686 else { 687 pciD->pszDisplayName = pciD->pszFileName + strlen(cmp->rightdir); 688 if (cmp->rightdir[strlen(cmp->rightdir) - 1] != '\\') 689 pciD->pszDisplayName++; 690 } 691 pciD->attrFile = pciS->attrFile; 692 pciD->pszDispAttr = pciS->pszDispAttr; 693 pciD->flags = CNRITEM_EXISTS; // Now on both sides 694 pciD->date = pciS->date; 695 pciD->time = pciS->time; 696 pciD->ladate = pciS->ladate; 697 pciD->latime = pciS->latime; 698 pciD->crdate = pciS->crdate; 699 pciD->crtime = pciS->crtime; 700 pciD->cbFile = pciS->cbFile; 701 pciD->easize = pciS->easize; 702 703 // Forget status until we regenerate it 704 if (pciS->pszSubject != NullStr) { 705 xfree(pciS->pszSubject, pszSrcFile, __LINE__); 706 pciS->pszSubject = NullStr; 707 } 708 pciS->flags = CNRITEM_EXISTS; // Now on both sides 709 710 WinSendMsg(hwndCnrS, CM_INVALIDATERECORD, MPFROMP(&pciS), 711 MPFROM2SHORT(1, CMA_ERASE | CMA_TEXTCHANGED)); 712 WinSendMsg(hwndCnrD, CM_INVALIDATERECORD, MPFROMP(&pciD), 713 MPFROM2SHORT(1, CMA_ERASE | CMA_TEXTCHANGED)); 714 } 715 break; 553 case IDM_MOVE: 554 { 555 BOOL fResetVerify = FALSE; 556 557 if (hwndCnrS == WinWindowFromID(cmp->hwnd, COMP_RIGHTDIR)) 558 BldFullPathName(szNewName, cmp->leftdir, pciS->pszDisplayName); 559 else 560 BldFullPathName(szNewName, cmp->rightdir, pciS->pszDisplayName); 561 // Make directory if required 562 strcpy(szDirName, szNewName); 563 p = strrchr(szDirName, '\\'); 564 if (fVerify && (driveflags[toupper(*szNewName) - 'A'] & DRIVE_WRITEVERIFYOFF || 565 driveflags[toupper(*pciS->pszFileName) - 'A'] & DRIVE_WRITEVERIFYOFF)) { 566 DosSetVerify(FALSE); 567 fResetVerify = TRUE; 568 } 569 if (p) { 570 if (p > szDirName + 2) 571 p++; 572 *p = 0; 573 if (IsFile(szDirName) == -1) 574 MassMkdir(hwndMain, szDirName); 575 } 576 rc = docopyf(MOVE, pciS->pszFileName, "%s", szNewName); 577 if (fResetVerify) { 578 DosSetVerify(fVerify); 579 fResetVerify = FALSE; 580 } 581 if (!rc && stricmp(pciS->pszFileName, szNewName)) { 582 WinSendMsg(hwndCnrS, CM_SETRECORDEMPHASIS, MPFROMP(pciS), 583 MPFROM2SHORT(FALSE, CRA_SELECTED)); 584 if (pciD->rc.flRecordAttr & CRA_SELECTED) 585 WinSendMsg(hwndCnrD, CM_SETRECORDEMPHASIS, MPFROMP(pciD), 586 MPFROM2SHORT(FALSE, CRA_SELECTED)); 587 FreeCnrItemData(pciD); 588 pciD->pszFileName = xstrdup(szNewName, pszSrcFile, __LINE__); 589 if (hwndCnrS == WinWindowFromID(cmp->hwnd, COMP_RIGHTDIR)) { 590 pciD->pszDisplayName = pciD->pszFileName + strlen(cmp->leftdir); 591 if (cmp->leftdir[strlen(cmp->leftdir) - 1] != '\\') 592 pciD->pszDisplayName++; 593 } 594 else { 595 pciD->pszDisplayName = pciD->pszFileName + strlen(cmp->rightdir); 596 if (cmp->rightdir[strlen(cmp->rightdir) - 1] != '\\') 597 pciD->pszDisplayName++; 598 } 599 pciD->pszLongName = pciS->pszLongName; 600 pciS->pszLongName = NullStr; // 07 Sep 08 SHL avoid aliased pointer 601 if (pciD->pszSubject != NullStr) { 602 xfree(pciD->pszSubject, pszSrcFile, __LINE__); 603 pciD->pszSubject = NullStr; 604 } 605 pciD->attrFile = pciS->attrFile; 606 pciD->pszDispAttr = pciS->pszDispAttr; 607 pciD->flags = 0; // Just on one side 608 pciD->date = pciS->date; 609 pciD->time = pciS->time; 610 pciD->ladate = pciS->ladate; 611 pciD->latime = pciS->latime; 612 pciD->crdate = pciS->crdate; 613 pciD->crtime = pciS->crtime; 614 pciD->cbFile = pciS->cbFile; 615 pciD->easize = pciS->easize; 616 617 if (pciS->pszFileName != NullStr) { 618 xfree(pciS->pszFileName, pszSrcFile, __LINE__); 619 pciS->pszFileName = NullStr; 620 pciS->pszDisplayName = pciS->pszFileName; 621 pciS->rc.pszIcon = pciS->pszFileName; 622 } 623 if (pciS->pszSubject != NullStr) { 624 xfree(pciS->pszSubject, pszSrcFile, __LINE__); 625 pciS->pszSubject = NullStr; 626 } 627 pciS->flags = 0; // Just on one side 628 629 WinSendMsg(hwndCnrS, CM_INVALIDATERECORD, MPFROMP(&pciS), 630 MPFROM2SHORT(1, CMA_ERASE | CMA_TEXTCHANGED)); 631 632 WinSendMsg(hwndCnrD, CM_INVALIDATERECORD, MPFROMP(&pciD), 633 MPFROM2SHORT(1, CMA_ERASE | CMA_TEXTCHANGED)); 634 635 if (hwndCnrS == WinWindowFromID(cmp->hwnd, COMP_LEFTDIR)) 636 cmp->cmp->totalleft--; 637 else 638 cmp->cmp->totalright--; 639 } 640 else if (rc) { 641 rc = Dos_Error(MB_ENTERCANCEL, 642 rc, 643 HWND_DESKTOP, 644 pszSrcFile, 645 __LINE__, 646 GetPString(IDS_COMPMOVEFAILEDTEXT), 647 pciS->pszFileName, szNewName); 648 if (rc == MBID_CANCEL) // Cause loop to break 649 pciNextS = NULL; 650 } 651 break; 652 } 653 654 case IDM_COPY: 655 { 656 BOOL fResetVerify = FALSE; 657 658 if (hwndCnrS == WinWindowFromID(cmp->hwnd, COMP_RIGHTDIR)) 659 BldFullPathName(szNewName, cmp->leftdir, pciS->pszDisplayName); 660 else 661 BldFullPathName(szNewName, cmp->rightdir, pciS->pszDisplayName); 662 // Make directory if required 663 strcpy(szDirName, szNewName); 664 p = strrchr(szDirName, '\\'); 665 if (fVerify && (driveflags[toupper(*szNewName) - 'A'] & DRIVE_WRITEVERIFYOFF || 666 driveflags[toupper(*pciS->pszFileName) - 'A'] & DRIVE_WRITEVERIFYOFF)) { 667 DosSetVerify(FALSE); 668 fResetVerify = TRUE; 669 } 670 if (p) { 671 if (p > szDirName + 2) 672 p++; 673 *p = 0; 674 if (IsFile(szDirName) == -1) 675 MassMkdir(hwndMain, szDirName); 676 } 677 rc = docopyf(COPY, pciS->pszFileName, "%s", szNewName); 678 if (fResetVerify) { 679 DosSetVerify(fVerify); 680 fResetVerify = FALSE; 681 } 682 if (rc) { 683 rc = Dos_Error(MB_ENTERCANCEL, 684 rc, 685 HWND_DESKTOP, 686 pszSrcFile, 687 __LINE__, 688 GetPString(IDS_COMPCOPYFAILEDTEXT), 689 pciS->pszFileName, szNewName); 690 if (rc == MBID_CANCEL) 691 pciNextS = NULL; // Cause loop to break 692 } 693 else { 694 WinSendMsg(hwndCnrS, CM_SETRECORDEMPHASIS, MPFROMP(pciS), 695 MPFROM2SHORT(FALSE, CRA_SELECTED)); 696 if (pciD->rc.flRecordAttr & CRA_SELECTED) 697 WinSendMsg(hwndCnrD, CM_SETRECORDEMPHASIS, MPFROMP(pciD), 698 MPFROM2SHORT(FALSE, CRA_SELECTED)); 699 // 12 Jan 08 SHL 700 if (pciD->pszFileName == NullStr) { 701 if (hwndCnrD == WinWindowFromID(cmp->hwnd, COMP_LEFTDIR)) 702 cmp->totalleft++; 703 else 704 cmp->totalright++; 705 } 706 FreeCnrItemData(pciD); 707 pciD->pszFileName = xstrdup(szNewName, pszSrcFile, __LINE__); 708 if (hwndCnrS == WinWindowFromID(cmp->hwnd, COMP_RIGHTDIR)) { 709 pciD->pszDisplayName = pciD->pszFileName + strlen(cmp->leftdir); 710 if (cmp->leftdir[strlen(cmp->leftdir) - 1] != '\\') 711 pciD->pszDisplayName++; 712 } 713 else { 714 pciD->pszDisplayName = pciD->pszFileName + strlen(cmp->rightdir); 715 if (cmp->rightdir[strlen(cmp->rightdir) - 1] != '\\') 716 pciD->pszDisplayName++; 717 } 718 pciD->attrFile = pciS->attrFile; 719 pciD->pszDispAttr = pciS->pszDispAttr; 720 pciD->flags = CNRITEM_EXISTS; // Now on both sides 721 pciD->date = pciS->date; 722 pciD->time = pciS->time; 723 pciD->ladate = pciS->ladate; 724 pciD->latime = pciS->latime; 725 pciD->crdate = pciS->crdate; 726 pciD->crtime = pciS->crtime; 727 pciD->cbFile = pciS->cbFile; 728 pciD->easize = pciS->easize; 729 730 // Forget status until we regenerate it 731 if (pciS->pszSubject != NullStr) { 732 xfree(pciS->pszSubject, pszSrcFile, __LINE__); 733 pciS->pszSubject = NullStr; 734 } 735 pciS->flags = CNRITEM_EXISTS; // Now on both sides 736 737 WinSendMsg(hwndCnrS, CM_INVALIDATERECORD, MPFROMP(&pciS), 738 MPFROM2SHORT(1, CMA_ERASE | CMA_TEXTCHANGED)); 739 WinSendMsg(hwndCnrD, CM_INVALIDATERECORD, MPFROMP(&pciD), 740 MPFROM2SHORT(1, CMA_ERASE | CMA_TEXTCHANGED)); 741 } 742 break; 743 } 716 744 717 745 default:  - 
      
trunk/dll/filldir.c
r1347 r1354 118 118 CHAR *WPProgram; 119 119 volatile INT StubbyScanCount; 120 volatile INT ProcessDirCount; 120 121 121 122 typedef struct { … … 204 205 hmq = WinCreateMsgQueue(thab, 0); 205 206 if (hmq) { 207 StubbyScanCount++; 206 208 IncrThreadUsage(); 207 209 priority_normal(); 208 StubbyScanCount++;209 ret = Stubby(StubbyScan->hwndCnr, StubbyScan->pci);210 if (ret == 0 && !StubbyScan->RamDrive) {211 if (WinIsWindow((HAB)0, StubbyScan->hwndCnr)) 210 ret = Stubby(StubbyScan->hwndCnr, StubbyScan->pci); 211 //DbgMsg(pszSrcFile, __LINE__, "Stubby %i ", ret); 212 if (ret == 1) { 213 if (WinIsWindow((HAB)0, StubbyScan->hwndCnr)) { 212 214 WinSendMsg(StubbyScan->hwndCnr, 213 215 CM_INVALIDATERECORD, 214 216 MPFROMP(&StubbyScan->pci), 215 217 MPFROM2SHORT(1, CMA_ERASE | CMA_REPOSITION)); 218 if (fRScanLocal) { 219 if (!(driveflags[toupper(*StubbyScan->pci->pszFileName) - 'A'] & 220 ((fRScanNoWrite ? 0 : DRIVE_NOTWRITEABLE) | 221 (fRScanRemote ? 0 : DRIVE_REMOTE) | 222 (fRScanSlow ? 0 : DRIVE_SLOW) | 223 (fRScanVirtual ? 0 : DRIVE_VIRTUAL))) 224 && fInitialDriveScan) { 225 WinSendMsg(StubbyScan->hwndCnr, CM_EXPANDTREE, MPFROMP(StubbyScan->pci), MPVOID); 226 //DbgMsg(pszSrcFile, __LINE__, "expanded %x %s", StubbyScan->hwndCnr, StubbyScan->pci->pszFileName); 227 WinSendMsg(StubbyScan->hwndCnr, CM_COLLAPSETREE, MPFROMP(StubbyScan->pci), MPVOID); 228 } 229 } 230 else if ((fRScanRemote && (driveflags[toupper(*StubbyScan->pci->pszFileName) - 'A'] & 231 DRIVE_REMOTE)) || 232 (fRScanVirtual && (driveflags[toupper(*StubbyScan->pci->pszFileName) - 'A'] & 233 DRIVE_VIRTUAL)) && fInitialDriveScan) { 234 if (!(driveflags[toupper(*StubbyScan->pci->pszFileName) - 'A'] & 235 ((fRScanNoWrite ? NULL : DRIVE_NOTWRITEABLE) | 236 (fRScanSlow ? NULL : DRIVE_SLOW)))) { 237 WinSendMsg(StubbyScan->hwndCnr, CM_EXPANDTREE, MPFROMP(StubbyScan->pci), MPVOID); 238 //DbgMsg(pszSrcFile, __LINE__, "expanded %x %s", StubbyScan->hwndCnr, StubbyScan->pci->pszFileName); 239 WinSendMsg(StubbyScan->hwndCnr, CM_COLLAPSETREE, MPFROMP(StubbyScan->pci), MPVOID); 240 } 241 } 216 242 } 243 } 217 244 if (WinIsWindow((HAB)0, StubbyScan->hwndDrivesList)) { 218 245 WinSendMsg(StubbyScan->hwndDrivesList, … … 222 249 } 223 250 StubbyScanCount--; 224 if (StubbyScanCount == 0) 225 fInitialDriveScan = FALSE; 251 /* if (StubbyScanCount == 0) { 252 if (fInitialDriveScan) { 253 WinShowWindow(StubbyScan->hwndCnr, TRUE); 254 WinShowWindow(StubbyScan->hwndDrivesList, TRUE); 255 } 256 fInitialDriveScan = FALSE; 257 }*/ 226 258 WinDestroyMsgQueue(hmq); 227 259 } … … 231 263 free(StubbyScan); 232 264 } // if StubbyScan 265 # ifdef FORTIFY 266 Fortify_LeaveScope(); 267 # endif 268 269 // _endthread(); // 10 Dec 08 SHL 270 } 271 272 VOID ProcessDirectoryThread(VOID * arg) 273 { 274 PROCESSDIR *ProcessDir; 275 HAB thab; 276 HMQ hmq = (HMQ) 0; 277 //BOOL ret; 278 279 DosError(FERR_DISABLEHARDERR); 280 281 # ifdef FORTIFY 282 Fortify_EnterScope(); 283 # endif 284 285 ProcessDir = (PROCESSDIR *)arg; 286 if (ProcessDir && ProcessDir->pciParent && ProcessDir->pciParent->pszFileName && ProcessDir->hwndCnr) { 287 thab = WinInitialize(0); 288 if (thab) { 289 hmq = WinCreateMsgQueue(thab, 0); 290 if (hmq) { 291 ProcessDirCount ++; 292 IncrThreadUsage(); 293 priority_normal(); 294 ProcessDirectory(ProcessDir->hwndCnr, 295 ProcessDir->pciParent, 296 ProcessDir->szDirBase, 297 ProcessDir->filestoo, 298 ProcessDir->recurse, 299 ProcessDir->partial, 300 ProcessDir->stopflag, 301 ProcessDir->dcd, // Optional 302 ProcessDir->pulTotalFiles, // Optional 303 ProcessDir->pullTotalBytes); // Optional 304 ProcessDirCount --; 305 WinDestroyMsgQueue(hmq); 306 } 307 DecrThreadUsage(); 308 WinTerminate(thab); 309 } 310 free(ProcessDir); 311 } // if ProcessDir 233 312 # ifdef FORTIFY 234 313 Fortify_LeaveScope(); … … 1153 1232 MPFROM2SHORT(CMA_FIRSTCHILD, CMA_ITEMORDER)); 1154 1233 while (pci && (INT)pci != -1) { 1155 if (pci->attrFile & FILE_DIRECTORY) 1156 Stubby(hwndCnr, pci); 1234 if ((pci->attrFile & FILE_DIRECTORY)) 1235 if (fInitialDriveScan) 1236 Stubby(hwndCnr, pci); 1237 else { 1238 while (StubbyScanCount != 0) 1239 DosSleep(50); 1240 Stubby(hwndCnr, pci); 1241 } 1242 //Stubby(hwndCnr, pci); 1157 1243 pci = WinSendMsg(hwndCnr, CM_QUERYRECORD, MPFROMP(pci), 1158 1244 MPFROM2SHORT(CMA_NEXT, CMA_ITEMORDER)); … … 1217 1303 driveflags[x] &= (DRIVE_IGNORE | DRIVE_NOPRESCAN | DRIVE_NOLOADICONS | 1218 1304 DRIVE_NOLOADSUBJS | DRIVE_NOLOADLONGS | 1219 DRIVE_INCLUDEFILES | DRIVE_SLOW | DRIVE_NOSTATS); 1305 DRIVE_INCLUDEFILES | DRIVE_SLOW | DRIVE_NOSTATS | 1306 DRIVE_WRITEVERIFYOFF); 1220 1307 } 1221 1308 memset(driveserial, -1, sizeof(driveserial)); … … 1338 1425 driveflags[x] &= ~DRIVE_NOLONGNAMES; 1339 1426 } 1340 1427 if (!fVerifyOffChecked[x]) { 1428 if (driveflags[x] & DRIVE_REMOVABLE) 1429 driveflags[x] |= DRIVE_WRITEVERIFYOFF; 1430 if (!(driveflags[x] & DRIVE_IGNORE | DRIVE_INVALID)) { 1431 CHAR Key[80]; 1432 1433 sprintf(Key, "%c.VerifyOffChecked", (CHAR) (x + 'A')); 1434 fVerifyOffChecked[x] = TRUE; 1435 PrfWriteProfileData(fmprof, appname, Key, &fVerifyOffChecked[x], sizeof(BOOL)); 1436 } 1437 } 1341 1438 pci->rc.flRecordAttr |= CRA_RECORDREADONLY; 1342 1439 if ((ULONG)(toupper(*szDrive) - '@') == ulCurDriveNum) … … 1607 1704 } // while 1608 1705 StubbyScanCount--; 1609 if (StubbyScanCount == 0)1610 fInitialDriveScan = FALSE;1611 1706 } 1612 1707 if (hwndParent) … … 1702 1797 } 1703 1798 } 1704 1705 1799 didonce = TRUE; 1706 1800 if (fInitialDriveScan) { 1801 HWND hwndDrivesList = WinWindowFromID(WinQueryWindow(hwndParent, QW_PARENT), 1802 MAIN_DRIVELIST); 1803 while (StubbyScanCount != 0 || ProcessDirCount != 0) 1804 DosSleep(50); 1805 WinShowWindow(hwndCnr, TRUE); 1806 WinShowWindow(hwndDrivesList, TRUE); 1807 fInitialDriveScan = FALSE; 1808 } 1707 1809 } // FillTreeCnr 1708 1810  - 
      
trunk/dll/filldir.h
r1299 r1354 49 49 VOID FreeCnrItemData(PCNRITEM pci); 50 50 INT RemoveCnrItems(HWND hwnd, PCNRITEM pci, USHORT usCnt, USHORT usFlags); 51 VOID ProcessDirectoryThread(VOID * arg); 51 52 52 53 // Data declarations … … 57 58 extern HPOINTER hptrReadonly; 58 59 extern HPOINTER hptrSystem; 59 extern volatile INT StubbyScanCount; 60 extern volatile INT StubbyScanCount; 61 extern volatile INT ProcessDirCount; 62 63 typedef struct { 64 65 HWND hwndCnr; 66 PCNRITEM pciParent; 67 CHAR *szDirBase; 68 BOOL filestoo; 69 BOOL recurse; 70 BOOL partial; 71 CHAR *stopflag; 72 DIRCNRDATA *dcd; // Optional 73 ULONG *pulTotalFiles; // Optional 74 PULONGLONG pullTotalBytes; // Optional 75 } 76 PROCESSDIR; 60 77 61 78 #endif // FILLDIR_H  - 
      
trunk/dll/flesh.c
r1353 r1354 49 49 #include "notify.h" // Notify 50 50 #include "wrappers.h" // xfree 51 #include "excputil.h" // xbeginthread 51 52 52 53 // Data definitions … … 190 191 DRIVE_INCLUDEFILES) 191 192 includefiles = TRUE; 192 ProcessDirectory(hwndCnr, 193 pciParent, 194 pciParent->pszFileName, 195 includefiles, // filestoo 196 TRUE, // recurse 197 TRUE, // partial 198 NULL, // stop flag 199 dcd, 200 NULL, // total files 201 NULL); // total bytes 202 } 193 if (fInitialDriveScan) { 194 PROCESSDIR *ProcessDir; 195 196 ProcessDir = xmallocz(sizeof(PROCESSDIR), pszSrcFile, __LINE__); 197 if (!ProcessDir) 198 return FALSE; 199 ProcessDir->hwndCnr = hwndCnr; 200 ProcessDir->pciParent = pciParent; 201 ProcessDir->szDirBase = pciParent->pszFileName; 202 ProcessDir->filestoo = includefiles; 203 ProcessDir->recurse = TRUE; 204 ProcessDir->partial = TRUE; 205 ProcessDir->stopflag = NULL; 206 ProcessDir->dcd = dcd; 207 ProcessDir->pulTotalFiles = NULL; 208 ProcessDir->pullTotalBytes = NULL; 209 210 if (xbeginthread(ProcessDirectoryThread, 211 65536, 212 ProcessDir, 213 pszSrcFile, 214 __LINE__) == -1) 215 { 216 xfree(ProcessDir, pszSrcFile, __LINE__); 217 } 218 } 219 else { 220 ProcessDirectory(hwndCnr, 221 pciParent, 222 pciParent->pszFileName, 223 includefiles, // filestoo 224 TRUE, // recurse 225 TRUE, // partial 226 NULL, // stop flag 227 dcd, 228 NULL, // total files 229 NULL); // total bytes 230 } 231 } 232 driveflags[*pciParent->pszFileName - 'A'] |= DRIVE_RSCANNED; 203 233 return TRUE; 204 234 } … … 457 487 ri.cRecordsInsert = 1; 458 488 ri.fInvalidateRecord = TRUE; 459 DbgMsg(pszSrcFile, __LINE__, "Stubby %p CM_INSERTRECORD \"%s\" %.255s", hwndCnr, pci->pszFileName, pffb->achName); // 18 Dec 08 SHL fixme debug489 //DbgMsg(pszSrcFile, __LINE__, "Stubby %p CM_INSERTRECORD \"%s\" %.255s", hwndCnr, pci->pszFileName, pffb->achName); // 18 Dec 08 SHL fixme debug 460 490 if (!WinSendMsg(hwndCnr, 461 491 CM_INSERTRECORD, MPFROMP(pci), MPFROMP(&ri))) { … … 463 493 WinSetFocus(HWND_DESKTOP, hwndCnr); 464 494 if (WinIsWindow((HAB)0, hwndCnr)) { 465 DbgMsg(pszSrcFile, __LINE__, "Stubby %p CM_INSERTRECORD %s", hwndCnr, pci->pszFileName); // 18 Dec 08 SHL fixme debug495 //DbgMsg(pszSrcFile, __LINE__, "Stubby %p CM_INSERTRECORD %s", hwndCnr, pci->pszFileName); // 18 Dec 08 SHL fixme debug 466 496 if (!WinSendMsg(hwndCnr, 467 497 CM_INSERTRECORD, MPFROMP(pci), MPFROMP(&ri))) {  - 
      
trunk/dll/fm3dlg.h
r1306 r1354 689 689 #define CFGH_RUNFTPWORKDIR 25348 690 690 #define CFGH_RUNHTTPWORKDIR 25349 691 #define CFGH_LIBPATHSTRICTMAILRUN 25350 691 692 #define CFGH_RUNMAILWORKDIR 25351 692 693 #define CFGH_MAILRUN 25352 … … 695 696 #define CFGH_LIBPATHSTRICTHTTPRUN 25357 696 697 #define CFGH_LIBPATHSTRICTFTPRUN 25358 697 #define CFGH_FIND 25359698 #define CFGH_LIBPATHSTRICTMAILRUN 25360 698 #define CFGH_FIND 25359 699 699 700 700 701 #define CFGS_FRAME 25360 … … 706 707 #define CFGS_FORCELOWER 25366 707 708 #define CFGS_REMOTEBUG 25367 708 #define CFGS_NOREMOVABLESCAN 25368709 #define CFGS_NOREMOVABLESCAN 25368 709 710 #define CFGS_FILESTOGET 25369 710 711 #define CFGA_FRAME 25370 712 #define CFGA_QUICKARCFIND 25371 713 #define CFGA_DEFARCNAME 25372 714 #define CFGA_DEFARC 25373 715 #define CFGA_FOLDERAFTEREXTRACT 25374 716 #define CFGA_ARCSTUFFVISIBLE 25375 717 #define CFGA_VIRUS 25376 718 #define CFGA_EXTRACTPATH 25377 719 #define CFGA_FIND 25378 720 #define CFGA_FILENAMEPATH 25379 711 #define CFGS_RSCANLOCAL 25370 712 #define CFGS_RSCANREMOTE 25371 713 #define CFGS_RSCANVIRTUAL 25372 714 #define CFGS_RSCANSLOW 25373 715 #define CFGS_RSCANNOWRITE 25374 716 717 #define CFGA_FRAME 25380 718 #define CFGA_QUICKARCFIND 25381 719 #define CFGA_DEFARCNAME 25382 720 #define CFGA_DEFARC 25383 721 #define CFGA_FOLDERAFTEREXTRACT 25384 722 #define CFGA_ARCSTUFFVISIBLE 25385 723 #define CFGA_VIRUS 25386 724 #define CFGA_EXTRACTPATH 25387 725 #define CFGA_FIND 25388 726 #define CFGA_FILENAMEPATH 25389 721 727 722 728 #define CFG5_FRAME 25500 … … 902 908 #define DVS_NOSTATS 27017 903 909 #define DVS_RAMDISK 27018 910 #define DVS_WRITEVERIFYOFF 27019 911 #define DVS_RSCANNED 27020 904 912 905 913 #define MRG_FRAME 27100  - 
      
trunk/dll/fm3dll.h
r1325 r1354 155 155 #define DRIVE_NOSTATS 0x00010000 156 156 #define DRIVE_RAMDISK 0x00020000 157 #define DRIVE_WRITEVERIFYOFF 0x00040000 158 #define DRIVE_RSCANNED 0x00080000 157 159 158 160 #define SORT_FIRSTEXTENSION 0x00000001  - 
      
trunk/dll/fm3res.dlg
r1338 r1354 1915 1915 BEGIN 1916 1916 AUTOCHECKBOX "Load Subjects", CFGS_LOADSUBJECTS, 4, 128, 106, 10 1917 AUTOCHECKBOX "Load Longnames", CFGS_LOADLONGNAMES, 4, 116, 106, 1918 10 1919 AUTOCHECKBOX "Load file icons", CFGS_NOICONSFILES, 4, 104, 106, 1920 10 1917 AUTOCHECKBOX "Load Longnames", CFGS_LOADLONGNAMES, 4, 116, 106, 10 1918 AUTOCHECKBOX "Load file icons", CFGS_NOICONSFILES, 4, 104, 106, 10 1921 1919 AUTOCHECKBOX "Load dir icons", CFGS_NOICONSDIRS, 4, 92, 106, 10 1922 1920 AUTOCHECKBOX "Uppercase names", CFGS_FORCEUPPER, 4, 80, 106, 10 1923 1921 AUTOCHECKBOX "Lowercase names", CFGS_FORCELOWER, 4, 68, 106, 10 1924 1922 AUTOCHECKBOX "Remote find bug", CFGS_REMOTEBUG, 4, 56, 106, 10 1925 AUTOCHECKBOX "Don't scan removables", CFGS_NOREMOVABLESCAN, 4, 44, 1926 106, 10 1923 AUTOCHECKBOX "Don't scan removables", CFGS_NOREMOVABLESCAN, 4, 44, 106, 10 1927 1924 LTEXT "Find count", -1, 4, 28, 54, 12, NOT WS_GROUP 1928 1925 CONTROL "", CFGS_FILESTOGET, 44, 30, 64, 12, WC_SPINBUTTON, … … 1930 1927 SPBS_JUSTCENTER | WS_TABSTOP | SPBS_FASTSPIN | 1931 1928 WS_VISIBLE 1929 LTEXT "Recurse scan at startup:", -1, 130, 128, 106, 10, NOT WS_GROUP 1930 AUTOCHECKBOX "Local hard drives", CFGS_RSCANLOCAL, 136, 116, 106, 10 1931 AUTOCHECKBOX "Remote drives", CFGS_RSCANREMOTE, 136, 104, 106, 10 1932 AUTOCHECKBOX "Virtual drives", CFGS_RSCANVIRTUAL, 136, 92, 106, 10 1933 AUTOCHECKBOX "Slow drives of drive types selected", CFGS_RSCANSLOW, 1934 142, 80, 136, 10 1935 AUTOCHECKBOX "Read only drives of drive types selected", CFGS_RSCANNOWRITE, 1936 142, 68, 136, 10 1932 1937 PUSHBUTTON "~Help", IDM_HELP, 120, 4, 40, 14, BS_NOPOINTERFOCUS | 1933 1938 WS_GROUP … … 2034 2039 FCF_TITLEBAR 2035 2040 BEGIN 2036 CHECKBOX "Virtual Drive", DVS_VIRTUAL, 4, 12 2, 94, 10,2041 CHECKBOX "Virtual Drive", DVS_VIRTUAL, 4, 126, 94, 10, 2037 2042 BS_NOPOINTERFOCUS | NOT WS_TABSTOP 2038 2043 PRESPARAMS PP_FOREGROUNDCOLOR, 0x00808080L 2039 CHECKBOX "Removable", DVS_REMOVABLE, 4, 11 0, 94, 10,2044 CHECKBOX "Removable", DVS_REMOVABLE, 4, 114, 94, 10, 2040 2045 BS_NOPOINTERFOCUS | NOT WS_TABSTOP 2041 2046 PRESPARAMS PP_FOREGROUNDCOLOR, 0x00808080L 2042 CHECKBOX "RAMDISK", DVS_RAMDISK, 4, 98, 94, 10,2047 CHECKBOX "RAMDISK", DVS_RAMDISK, 4, 102, 98, 10, 2043 2048 BS_NOPOINTERFOCUS | NOT WS_TABSTOP 2044 2049 PRESPARAMS PP_FOREGROUNDCOLOR, 0x00808080L 2045 CHECKBOX "Remote Drive", DVS_REMOTE, 4, 86, 94, 10,2050 CHECKBOX "Remote Drive", DVS_REMOTE, 4, 90, 94, 10, 2046 2051 BS_NOPOINTERFOCUS | NOT WS_TABSTOP 2047 2052 PRESPARAMS PP_FOREGROUNDCOLOR, 0x00808080L 2048 CHECKBOX "CD-ROM", DVS_CDROM, 4, 7 4, 94, 10,2053 CHECKBOX "CD-ROM", DVS_CDROM, 4, 78, 94, 10, 2049 2054 BS_NOPOINTERFOCUS | NOT WS_TABSTOP 2050 2055 PRESPARAMS PP_FOREGROUNDCOLOR, 0x00808080L 2051 CHECKBOX "Zipstream", DVS_ZIPSTREAM, 4, 6 2, 94, 10,2056 CHECKBOX "Zipstream", DVS_ZIPSTREAM, 4, 66, 94, 10, 2052 2057 BS_NOPOINTERFOCUS | NOT WS_TABSTOP 2053 2058 PRESPARAMS PP_FOREGROUNDCOLOR, 0x00808080L 2054 CHECKBOX "Ignore", DVS_IGNORE, 4, 5 0, 94, 10,2059 CHECKBOX "Ignore", DVS_IGNORE, 4, 54, 94, 10, 2055 2060 BS_NOPOINTERFOCUS | NOT WS_TABSTOP 2056 2061 PRESPARAMS PP_FOREGROUNDCOLOR, 0x00808080L 2057 CHECKBOX "Boot drive", DVS_BOOT, 4, 38, 94, 10,2062 CHECKBOX "Boot drive", DVS_BOOT, 4, 42, 94, 10, 2058 2063 BS_NOPOINTERFOCUS | NOT WS_TABSTOP 2059 2064 PRESPARAMS PP_FOREGROUNDCOLOR, 0x00808080L 2060 CHECKBOX "Invalid", DVS_INVALID, 4, 26, 94, 10,2065 CHECKBOX "Invalid", DVS_INVALID, 4, 30, 94, 10, 2061 2066 BS_NOPOINTERFOCUS | NOT WS_TABSTOP 2062 2067 PRESPARAMS PP_FOREGROUNDCOLOR, 0x00808080L 2063 CHECKBOX " Not writeable", DVS_NOTWRITEABLE, 106, 122, 94, 10,2068 CHECKBOX "Recursive scan done", DVS_RSCANNED, 4, 18, 94, 10, 2064 2069 BS_NOPOINTERFOCUS | NOT WS_TABSTOP 2065 2070 PRESPARAMS PP_FOREGROUNDCOLOR, 0x00808080L 2066 CHECKBOX " ~No longnames", DVS_NOLONGNAMES, 106, 110, 94, 10,2071 CHECKBOX "Not writeable", DVS_NOTWRITEABLE, 106, 126, 94, 10, 2067 2072 BS_NOPOINTERFOCUS | NOT WS_TABSTOP 2068 2073 PRESPARAMS PP_FOREGROUNDCOLOR, 0x00808080L 2069 AUTOCHECKBOX "No ~Prescan", DVS_NOPRESCAN, 106, 98, 94, 10, 2070 BS_NOPOINTERFOCUS | NOT WS_TABSTOP 2071 AUTOCHECKBOX "~Don't load icons", DVS_NOLOADICONS, 106, 86, 94,10, BS_NOPOINTERFOCUS 2072 AUTOCHECKBOX "Don't load ~subjects", DVS_NOLOADSUBJS, 106, 74, 94,10, BS_NOPOINTERFOCUS 2073 AUTOCHECKBOX "Don't load ~longnames", DVS_NOLOADLONGS, 106, 62,106, 10, BS_NOPOINTERFOCUS 2074 AUTOCHECKBOX "Slo~w drive", DVS_SLOW, 106, 50, 94, 10, BS_NOPOINTERFOCUS 2075 AUTOCHECKBOX "Include ~files in tree", DVS_INCLUDEFILES, 106, 38,106, 10, BS_NOPOINTERFOCUS 2076 AUTOCHECKBOX "~No drive stats", DVS_NOSTATS, 106, 26,106, 10, BS_NOPOINTERFOCUS 2074 CHECKBOX "~No longnames", DVS_NOLONGNAMES, 106, 114, 94, 10, 2075 BS_NOPOINTERFOCUS | NOT WS_TABSTOP 2076 PRESPARAMS PP_FOREGROUNDCOLOR, 0x00808080L 2077 AUTOCHECKBOX "No ~Prescan", DVS_NOPRESCAN, 106, 102, 94, 10, 2078 BS_NOPOINTERFOCUS | NOT WS_TABSTOP 2079 AUTOCHECKBOX "~Don't load icons", DVS_NOLOADICONS, 106, 90, 94,10, BS_NOPOINTERFOCUS 2080 AUTOCHECKBOX "Don't load ~subjects", DVS_NOLOADSUBJS, 106, 78, 94,10, BS_NOPOINTERFOCUS 2081 AUTOCHECKBOX "Don't load ~longnames", DVS_NOLOADLONGS, 106, 66,106, 10, BS_NOPOINTERFOCUS 2082 AUTOCHECKBOX "Slo~w drive", DVS_SLOW, 106, 54, 94, 10, BS_NOPOINTERFOCUS 2083 AUTOCHECKBOX "Include ~files in tree", DVS_INCLUDEFILES, 106, 42,106, 10, BS_NOPOINTERFOCUS 2084 AUTOCHECKBOX "~No drive stats", DVS_NOSTATS, 106, 30, 106, 10, BS_NOPOINTERFOCUS 2085 AUTOCHECKBOX "Write ~verify off", DVS_WRITEVERIFYOFF, 106, 18, 106, 10, BS_NOPOINTERFOCUS 2077 2086 DEFPUSHBUTTON "Okay", DID_OK, 4, 4, 40, 14, BS_NOPOINTERFOCUS | WS_GROUP 2078 2087 PUSHBUTTON "~Help", IDM_HELP, 64, 4, 40, 14, BS_NOPOINTERFOCUS … … 2770 2779 AUTOCHECKBOX "~Link sets icon", CFGG_LINKSETSICON, 122, 128, 106, 2771 2780 10 2772 AUTOCHECKBOX "~Verify disk writes ", CFGG_VERIFYWRITES, 122, 116,2773 132, 102781 AUTOCHECKBOX "~Verify disk writes (also check individual driveflags)", 2782 CFGG_VERIFYWRITES, 122, 116, 162, 10 2774 2783 AUTOCHECKBOX "~Drag&drop dialog", CFGG_DNDDLG, 122, 104, 106, 10 2775 2784 AUTOCHECKBOX "Default delete ~permanent", CFGG_DEFAULTDELETEPERM, 122,  - 
      
trunk/dll/info.c
r1347 r1354 982 982 ((driveflags[drive] & DRIVE_INCLUDEFILES) != 0)); 983 983 WinCheckButton(hwnd,DVS_NOSTATS, 984 ((driveflags[drive] & DRIVE_NOSTATS) != 0)); 984 ((driveflags[drive] & DRIVE_NOSTATS) != 0)); 985 WinCheckButton(hwnd,DVS_WRITEVERIFYOFF, 986 ((driveflags[drive] & DRIVE_WRITEVERIFYOFF) != 0)); 987 WinCheckButton(hwnd,DVS_RSCANNED, 988 ((driveflags[drive] & DRIVE_RSCANNED) != 0)); 985 989 } 986 990 return 0; … … 1022 1026 driveflags[drive] |= DRIVE_NOSTATS; 1023 1027 else 1024 driveflags[drive] &= (~DRIVE_NOSTATS); 1028 driveflags[drive] &= (~DRIVE_NOSTATS); 1029 if (WinQueryButtonCheckstate(hwnd,DVS_WRITEVERIFYOFF)) 1030 driveflags[drive] |= DRIVE_WRITEVERIFYOFF; 1031 else 1032 driveflags[drive] &= (~DRIVE_WRITEVERIFYOFF); 1033 if (WinQueryButtonCheckstate(hwnd,DVS_RSCANNED)) 1034 driveflags[drive] |= DRIVE_RSCANNED; 1035 else 1036 driveflags[drive] &= (~DRIVE_RSCANNED); 1025 1037 { 1026 1038 ULONG flags; 1027 CHAR s[80];1028 1029 sprintf(s, "%c.DriveFlags", (CHAR) (drive + 'A'));1039 CHAR FlagKey[80]; 1040 1041 sprintf(FlagKey, "%c.DriveFlags", (CHAR) (drive + 'A')); 1030 1042 flags = driveflags[drive]; 1031 1043 flags &= (~(DRIVE_REMOVABLE | DRIVE_NOTWRITEABLE | 1032 1044 DRIVE_IGNORE | DRIVE_CDROM | 1033 DRIVE_NOLONGNAMES | DRIVE_REMOTE|1045 DRIVE_REMOTE | DRIVE_RSCANNED | 1034 1046 DRIVE_BOOT | DRIVE_INVALID | DRIVE_ZIPSTREAM | 1035 1047 DRIVE_VIRTUAL | DRIVE_RAMDISK)); 1036 PrfWriteProfileData(fmprof, appname, s, &flags, sizeof(ULONG));1048 PrfWriteProfileData(fmprof, appname, FlagKey, &flags, sizeof(ULONG)); 1037 1049 } 1038 1050 }  - 
      
trunk/dll/init.c
r1351 r1354 1549 1549 PrfQueryProfileData(fmprof, appname, "RemoteBug", &fRemoteBug, &size); 1550 1550 size = sizeof(BOOL); 1551 PrfQueryProfileData(fmprof, appname, "RScanLocal", &fRScanLocal, &size); 1552 size = sizeof(BOOL); 1553 PrfQueryProfileData(fmprof, appname, "RScanRemote", &fRScanRemote, &size); 1554 size = sizeof(BOOL); 1555 PrfQueryProfileData(fmprof, appname, "RScanVirtual", &fRScanVirtual, &size); 1556 size = sizeof(BOOL); 1557 PrfQueryProfileData(fmprof, appname, "RScanSlow", &fRScanSlow, &size); 1558 size = sizeof(BOOL); 1559 PrfQueryProfileData(fmprof, appname, "RScanNoWrite", &fRScanNoWrite, &size); 1560 size = sizeof(BOOL); 1551 1561 PrfQueryProfileData(fmprof, appname, "Drag&DropDlg", &fDragndropDlg, &size); 1552 1562 size = sizeof(BOOL);  - 
      
trunk/dll/mainwnd.c
r1335 r1354 3419 3419 if (hwndDir) { 3420 3420 hwndC = WinWindowFromID(hwndDir, FID_CLIENT); 3421 if (hwndC) {3421 if (hwndC) { 3422 3422 HWND hwndCnr = WinWindowFromID(hwndC, DIR_CNR); 3423 3423 if (!hwndPPSave) { … … 3495 3495 MPFROMLONG(sizeof(CNRINFO)))) { 3496 3496 cnri.flWindowAttr = dcd->flWindowAttr; 3497 WinSendMsg(WinWindowFromID(hwndC, DIR_CNR),3498 CM_SETCNRINFO,3499 MPFROMP(&cnri),3500 MPFROMLONG(CMA_FLWINDOWATTR));3497 WinSendMsg(WinWindowFromID(hwndC, DIR_CNR), 3498 CM_SETCNRINFO, 3499 MPFROMP(&cnri), 3500 MPFROMLONG(CMA_FLWINDOWATTR)); 3501 3501 } 3502 3502 } … … 3504 3504 if (fDeleteState) 3505 3505 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L); 3506 if (!PostMsg(hwndCnr, UM_SETUP2, NULL, NULL))3507 WinSendMsg(hwndCnr, UM_SETUP2, NULL, NULL);3508 }3506 if (!PostMsg(hwndCnr, UM_SETUP2, NULL, NULL)) 3507 WinSendMsg(hwndCnr, UM_SETUP2, NULL, NULL); 3508 } 3509 3509 } 3510 3510 fRestored = TRUE; … … 5703 5703 WC_COMBOBOX, 5704 5704 (PSZ) NULL, 5705 WS_VISIBLE | CBS_DROPDOWN, 5705 //WS_VISIBLE | 5706 CBS_DROPDOWN, 5706 5707 (swp.x + 5707 5708 WinQuerySysValue(HWND_DESKTOP,  - 
      
trunk/dll/misc.c
r1253 r1354 96 96 #include "commafmt.h" // CommaFmtULL 97 97 #include "fortify.h" 98 #include "info.h" // driveflags 98 99 99 100 #define CONTAINER_COLUMNS 13 /* Number of columns in details view */ … … 798 799 CHAR szData[CCHMAXPATH], testname[CCHMAXPATH]; 799 800 HWND hwndMLE = WinWindowFromID(hwnd, CID_MLE); 801 BOOL fResetVerify = FALSE; 800 802 801 803 if (pci && (INT) pci != -1 && !IsRoot(pci->pszFileName)) { … … 925 927 return (MRESULT) FALSE; 926 928 } 929 if (fVerify && (driveflags[toupper(*szData) - 'A'] & DRIVE_WRITEVERIFYOFF || 930 driveflags[toupper(*testname) - 'A'] & DRIVE_WRITEVERIFYOFF)) { 931 DosSetVerify(FALSE); 932 fResetVerify = TRUE; 933 } 927 934 if (docopyf(MOVE, szData, "%s", testname)) 928 935 Runtime_Error(pszSrcFile, __LINE__, "docopyf"); … … 945 952 } 946 953 } 954 } 955 if (fResetVerify) { 956 DosSetVerify(fVerify); 957 fResetVerify = FALSE; 947 958 } 948 959 }  - 
      
trunk/dll/mkdir.c
r1348 r1354 44 44 CHAR targetdir[CCHMAXPATH]; 45 45 46 static PSZ pszSrcFile = __FILE__;46 //static PSZ pszSrcFile = __FILE__; 47 47 48 48 APIRET MassMkdir(HWND hwndClient, CHAR * dir) … … 74 74 if (!last) { 75 75 Broadcast((HAB) 0, hwndClient, UM_UPDATERECORD, MPFROMP(s), MPVOID); 76 DbgMsg(pszSrcFile, __LINE__, "UM_UPDATERECORD %s", s);76 //DbgMsg(pszSrcFile, __LINE__, "UM_UPDATERECORD %s", s); 77 77 } 78 78 else if (last == ERROR_ACCESS_DENIED) { … … 100 100 APIRET ret = 0, error; 101 101 INT isfile; 102 BOOL fResetVerify = FALSE; 102 103 103 104 if (DosQueryPathInfo(dir, FIL_QUERYFULLNAME, s, sizeof(s))) … … 141 142 return -3; 142 143 } 143 error = MassMkdir(hwndClient, s); 144 if (fVerify && driveflags[toupper(*s) - 'A'] & DRIVE_WRITEVERIFYOFF) { 145 DosSetVerify(FALSE); 146 fResetVerify = TRUE; 147 } 148 error = MassMkdir(hwnd, s); 149 if (fResetVerify) { 150 DosSetVerify(fVerify); 151 fResetVerify = FALSE; 152 } 144 153 if (error) { 145 154 Dos_Error(MB_CANCEL, … … 165 174 CHAR szBuff[CCHMAXPATH]; 166 175 APIRET error; 176 BOOL fResetVerify = FALSE; 167 177 168 178 Over: … … 190 200 goto Over; 191 201 } 202 if (fVerify && driveflags[toupper(*szBuff) - 'A'] & DRIVE_WRITEVERIFYOFF) { 203 DosSetVerify(FALSE); 204 fResetVerify = TRUE; 205 } 192 206 error = MassMkdir(hwnd, szBuff); 207 if (fResetVerify) { 208 DosSetVerify(fVerify); 209 fResetVerify = FALSE; 210 } 193 211 if (error) 194 212 Dos_Error(MB_ENTER,  - 
      
trunk/dll/notebook.c
r1306 r1354 82 82 #include "wrappers.h" // xmalloc 83 83 #include "fortify.h" 84 #include "info.h" // driveflags 84 85 85 86 static VOID SaveLastPageIndex(HWND hwnd); … … 133 134 BOOL fRealIdle; 134 135 BOOL fRemoteBug; 136 BOOL fRScanLocal; 137 BOOL fRScanRemote; 138 BOOL fRScanVirtual; 139 BOOL fRScanSlow; 140 BOOL fRScanNoWrite; 135 141 BOOL fSaveState; 136 142 BOOL fSeparateParms; … … 469 475 WinCheckButton(hwnd, CFGS_FORCEUPPER, fForceUpper); 470 476 WinCheckButton(hwnd, CFGS_NOREMOVABLESCAN, fNoRemovableScan); 477 WinCheckButton(hwnd, CFGS_RSCANLOCAL, fRScanLocal); 478 WinCheckButton(hwnd, CFGS_RSCANREMOTE, fRScanRemote); 479 WinCheckButton(hwnd, CFGS_RSCANVIRTUAL, fRScanVirtual); 480 WinCheckButton(hwnd, CFGS_RSCANSLOW, fRScanSlow); 481 WinCheckButton(hwnd, CFGS_RSCANNOWRITE, fRScanNoWrite); 471 482 WinCheckButton(hwnd, CFGS_REMOTEBUG, fRemoteBug); 472 483 WinSendDlgItemMsg(hwnd, CFGS_FILESTOGET, SPBM_SETCURRENTVALUE, … … 527 538 fRemoteBug = WinQueryButtonCheckstate(hwnd, CFGS_REMOTEBUG); 528 539 PrfWriteProfileData(fmprof, appname, "RemoteBug", &fRemoteBug, 540 sizeof(BOOL)); 541 fRScanLocal = WinQueryButtonCheckstate(hwnd, CFGS_RSCANLOCAL); 542 PrfWriteProfileData(fmprof, appname, "RScanLocal", &fRScanLocal, 543 sizeof(BOOL)); 544 fRScanRemote = WinQueryButtonCheckstate(hwnd, CFGS_RSCANREMOTE); 545 PrfWriteProfileData(fmprof, appname, "RScanRemote", &fRScanRemote, 546 sizeof(BOOL)); 547 fRScanVirtual = WinQueryButtonCheckstate(hwnd, CFGS_RSCANVIRTUAL); 548 PrfWriteProfileData(fmprof, appname, "RScanVirtual", &fRScanVirtual, 549 sizeof(BOOL)); 550 fRScanSlow = WinQueryButtonCheckstate(hwnd, CFGS_RSCANSLOW); 551 PrfWriteProfileData(fmprof, appname, "RScanSlow", &fRScanSlow, 552 sizeof(BOOL)); 553 fRScanNoWrite = WinQueryButtonCheckstate(hwnd, CFGS_RSCANNOWRITE); 554 PrfWriteProfileData(fmprof, appname, "RScanNoWrite", &fRScanNoWrite, 529 555 sizeof(BOOL)); 530 556 fNoRemovableScan = WinQueryButtonCheckstate(hwnd, CFGS_NOREMOVABLESCAN); … … 3273 3299 fFolderAfterExtract = FALSE; 3274 3300 fVerify = TRUE; 3301 DosSetVerify(TRUE); 3275 3302 fNoSearch = TRUE; 3276 DosSetVerify(TRUE);3277 3303 fForceUpper = FALSE; 3278 3304 fForceLower = TRUE;  - 
      
trunk/dll/notebook.h
r1241 r1354 74 74 extern BOOL fRealIdle; 75 75 extern BOOL fRemoteBug; 76 extern BOOL fRScanLocal; 77 extern BOOL fRScanRemote; 78 extern BOOL fRScanVirtual; 79 extern BOOL fRScanSlow; 80 extern BOOL fRScanNoWrite; 76 81 extern BOOL fSaveState; 77 82 extern BOOL fSeparateParms;  - 
      
trunk/dll/rename.c
r1226 r1354 17 17 18 18 #include <string.h> 19 #include <ctype.h> 19 20 20 21 #define INCL_WIN … … 36 37 #include "commafmt.h" // CommaFmtULL 37 38 #include "strips.h" // bstrip 39 #include "info.h" // driveflags 38 40 39 41 MRESULT EXPENTRY RenameProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) … … 238 240 CHAR newexist[CCHMAXPATH], fullname[CCHMAXPATH]; 239 241 INT was; 240 APIRET rc; 242 APIRET rc; 243 BOOL fResetVerify = FALSE; 241 244 242 245 *newexist = 0; … … 247 250 strcpy(fullname, newexist); 248 251 was = IsFile(fullname); 249 if (was == -1) { 250 rc = docopyf(MOVE, mv->target, "%s", fullname); 252 if (was == -1) { 253 if (fVerify && (driveflags[toupper(*mv->target) - 'A'] & DRIVE_WRITEVERIFYOFF || 254 driveflags[toupper(*fullname) - 'A'] & DRIVE_WRITEVERIFYOFF)) { 255 DosSetVerify(FALSE); 256 fResetVerify = TRUE; 257 } 258 rc = docopyf(MOVE, mv->target, "%s", fullname); 259 if (fResetVerify) { 260 DosSetVerify(fVerify); 261 fResetVerify = FALSE; 262 } 251 263 if (rc) { 252 264 if ((LONG) rc > 0)  - 
      
trunk/dll/seeall.c
r1335 r1354 613 613 INT type; 614 614 FILESTATUS4L fs4; 615 BOOL isnewer, existed ;615 BOOL isnewer, existed, fResetVerify = FALSE; 616 616 617 617 for (x = 0; list[x]; x++) { … … 731 731 message); 732 732 if (fRealIdle) 733 priority_idle(); 733 priority_idle(); 734 if (fVerify && (driveflags[toupper(*list[x]) - 'A'] & DRIVE_WRITEVERIFYOFF || 735 driveflags[toupper(*newname) - 'A'] & DRIVE_WRITEVERIFYOFF)) { 736 DosSetVerify(FALSE); 737 fResetVerify = TRUE; 738 } 734 739 if (plen) { 735 740 /* make directory/ies, if required */ … … 745 750 } 746 751 } 747 rc = docopyf(type, list[x], "%s", newname); 752 rc = docopyf(type, list[x], "%s", newname); 753 if (fResetVerify) { 754 DosSetVerify(fVerify); 755 fResetVerify = FALSE; 756 } 748 757 priority_normal(); 749 758 if (rc) {  - 
      
trunk/dll/treecnr.c
r1352 r1354 1945 1945 DRIVE_NOLOADICONS | DRIVE_NOLOADSUBJS | 1946 1946 DRIVE_NOLOADLONGS | DRIVE_INCLUDEFILES | 1947 DRIVE_SLOW | DRIVE_NOSTATS); 1947 DRIVE_SLOW | DRIVE_NOSTATS | 1948 DRIVE_WRITEVERIFYOFF); 1948 1949 1949 1950 if (removable == 1) … … 2740 2741 driveflags[toupper(*pci->pszFileName) - 'A'] &= 2741 2742 (DRIVE_IGNORE | DRIVE_NOPRESCAN | DRIVE_NOLOADICONS | 2742 DRIVE_NOLOADSUBJS | DRIVE_NOLOADLONGS | DRIVE_NOSTATS); 2743 DRIVE_NOLOADSUBJS | DRIVE_NOLOADLONGS | DRIVE_NOSTATS | 2744 DRIVE_WRITEVERIFYOFF); 2743 2745 DriveFlagsOne(toupper(*pci->pszFileName) - 'A'); 2744 2746 driveflag = driveflags[toupper(*pci->pszFileName) - 'A'];  - 
      
trunk/dll/valid.c
r1351 r1354 68 68 CHAR *NTFS; 69 69 CHAR *RAMFS; 70 BOOL fVerifyOffChecked[26]; 70 71 71 72 APIRET MakeFullName(char *pszFileName) … … 598 599 strcat(fname, "."); 599 600 ret = DosQueryAppType(fname, &apptype); 600 } 601 } //fixme protectonly BMT GKY 23 Dec 08 601 602 if ((!ret && (!apptype || 602 603 (apptype & … … 691 692 driveflags[x] &= (DRIVE_IGNORE | DRIVE_NOPRESCAN | DRIVE_NOLOADICONS | 692 693 DRIVE_NOLOADSUBJS | DRIVE_NOLOADLONGS | 693 DRIVE_INCLUDEFILES | DRIVE_SLOW | DRIVE_NOSTATS); 694 DRIVE_INCLUDEFILES | DRIVE_SLOW | DRIVE_NOSTATS | 695 DRIVE_WRITEVERIFYOFF); 694 696 if (removable != -1) { 695 697 struct … … 751 753 VOID FillInDriveFlags(VOID * dummy) 752 754 { 753 ULONG ulDriveNum, ulDriveMap ;755 ULONG ulDriveNum, ulDriveMap, size; 754 756 register INT x; 755 757 … … 757 759 driveflags[x] &= (DRIVE_IGNORE | DRIVE_NOPRESCAN | DRIVE_NOLOADICONS | 758 760 DRIVE_NOLOADSUBJS | DRIVE_NOLOADLONGS | 759 DRIVE_INCLUDEFILES | DRIVE_SLOW | DRIVE_NOSTATS); 761 DRIVE_INCLUDEFILES | DRIVE_SLOW | DRIVE_NOSTATS | 762 DRIVE_WRITEVERIFYOFF); 760 763 memset(driveserial, -1, sizeof(driveserial)); 761 764 DosError(FERR_DISABLEHARDERR); … … 764 767 if (ulDriveMap & (1 << x) && !(driveflags[x] & DRIVE_IGNORE)) { 765 768 { 766 CHAR s[80];767 ULONG flags = 0, size = sizeof(ULONG);768 769 sprintf(s, "%c.DriveFlags", (CHAR) (x + 'A'));770 if (PrfQueryProfileData(fmprof, appname, s, &flags, &size) &&771 size == sizeof(ULONG))772 driveflags[x] |= flags;769 ULONG flags = 0, size = sizeof(ULONG); 770 CHAR FlagKey[80]; 771 772 sprintf(FlagKey, "%c.DriveFlags", (CHAR) (x + 'A')); 773 if (PrfQueryProfileData(fmprof, appname, FlagKey, &flags, &size) && 774 size == sizeof(ULONG)) 775 driveflags[x] |= flags; 773 776 } 774 777 … … 795 798 if (startdrive) 796 799 driveflags[startdrive - 1] |= DRIVE_BOOT; 800 } 801 { 802 INT x; 803 CHAR Key[80]; 804 805 for (x = 2; x < 26; x++) { 806 sprintf(Key, "%c.VerifyOffChecked", (CHAR) (x + 'A')); 807 size = sizeof(BOOL); 808 PrfQueryProfileData(fmprof, appname, Key, &fVerifyOffChecked[x], &size); 809 if (!fVerifyOffChecked[x]) { 810 if (driveflags[x] & DRIVE_REMOVABLE) 811 driveflags[x] |= DRIVE_WRITEVERIFYOFF; 812 if (!(driveflags[x] & DRIVE_IGNORE | DRIVE_INVALID)) { 813 fVerifyOffChecked[x] = TRUE; 814 PrfWriteProfileData(fmprof, appname, Key, &fVerifyOffChecked[x], sizeof(BOOL)); 815 } 816 } 817 } 797 818 } 798 819 }  - 
      
trunk/dll/valid.h
r1214 r1354 51 51 extern CHAR *NDFS32; 52 52 extern CHAR *RAMFS; 53 extern BOOL fVerifyOffChecked[26]; 53 54 54 55 #endif // VALID_H  - 
      
trunk/dll/worker.c
r1351 r1354 679 679 INT type; 680 680 FILESTATUS4L fs4; 681 BOOL isnewer, existed ;681 BOOL isnewer, existed, fResetVerify = FALSE; 682 682 683 683 type = (wk->li->type == IDM_RENAME) ? MOVE : … … 805 805 (usedtarget) ? GetPString(IDS_TOTARGETTEXT) : 806 806 NullStr); 807 AddNote(message); 807 AddNote(message); 808 if (fVerify && (driveflags[toupper(*wk->li->targetpath) - 'A'] & DRIVE_WRITEVERIFYOFF) | 809 (driveflags[toupper(*wk->li->list[x]) - 'A'] & DRIVE_WRITEVERIFYOFF)) { 810 DosSetVerify(FALSE); 811 fResetVerify = TRUE; 812 } 808 813 if (plen) { 809 814 /* make directory/ies, if required */ … … 822 827 if (fRealIdle) 823 828 priority_idle(); 824 rc = docopyf(type, wk->li->list[x], "%s", newname); 829 rc = docopyf(type, wk->li->list[x], "%s", newname); 830 if (fResetVerify) { 831 DosSetVerify(fVerify); 832 fResetVerify = FALSE; 833 } 825 834 priority_normal(); 826 835 if (rc) { … … 907 916 wk->li->list[x], 908 917 GetPString(IDS_TOTEXT), newname); 909 if ( //fSyncUpdates ||918 if ((driveflags[*wk->li->targetpath - 'A'] & DRIVE_RSCANNED) && 910 919 AddToList(wk->li->list[x], 911 920 &files, &numfiles, &numalloc)) … … 914 923 UM_UPDATERECORD, 915 924 MPFROMP(wk->li->list[x]), MPVOID); 916 if ( //fSyncUpdates ||925 if ((driveflags[*wk->li->targetpath - 'A'] & DRIVE_RSCANNED) && 917 926 AddToList(newname, &files, &numfiles, &numalloc)) 918 927 Broadcast(hab2, … … 1019 1028 Abort: 1020 1029 1021 if (files) { 1022 Broadcast(hab2, 1023 wk->hwndCnr, 1024 UM_UPDATERECORDLIST, MPFROMP(files), MPVOID); 1030 if (files) { 1031 if (driveflags[*wk->li->targetpath - 'A'] & DRIVE_RSCANNED) 1032 Broadcast(hab2, 1033 wk->hwndCnr, 1034 UM_UPDATERECORDLIST, MPFROMP(files), MPVOID); 1025 1035 // DbgMsg(pszSrcFile, __LINE__, "UM_UPDATERECORD %s", *files); 1026 1036 FreeList(files); … … 1611 1621 if (!wk->li->list || !wk->li->list[0]) 1612 1622 break; 1613 } 1623 } 1624 if (fVerify && driveflags[toupper(*wk->li->list[0]) - 'A'] & DRIVE_WRITEVERIFYOFF) 1625 DosSetVerify(FALSE); 1614 1626 DosRequestMutexSem(hmtxFM2Delete, SEM_INDEFINITE_WAIT); // Prevent race 12-3-08 GKY 1615 1627 for (x = 0; wk->li->list[x]; x++) { … … 1698 1710 __LINE__, 1699 1711 GetPString(IDS_DELETEFAILED2TEXT), 1700 wk->li->list[x]) == MBID_CANCEL) 1701 break; 1712 wk->li->list[x]) == MBID_CANCEL) { 1713 DosSetVerify(fVerify); 1714 break; 1715 } 1702 1716 } 1703 1717 else { … … 1717 1731 } 1718 1732 } // for 1719 } 1733 } 1734 if (fVerify) 1735 DosSetVerify(fVerify); 1720 1736 break; 1721 1737 } // switch  - 
      
trunk/dll/wrappers.c
r1215 r1354 21 21 #include <stdlib.h> 22 22 #include <string.h> 23 #include <ctype.h> 23 24 24 25 #define INCL_WIN … … 40 41 41 42 #include "fortify.h" // GetPString 43 #include "info.h" // driveflags 44 #include "notebook.h" // fVerify 42 45 43 46 // Data definitions … … 226 229 APIRET rc; 227 230 BOOL crosses = ((ULONG)pInfoBuf ^ 228 ((ULONG)pInfoBuf + cbInfoBuf - 1)) & 229 ~0xffff; 230 231 ((ULONG)pInfoBuf + cbInfoBuf - 1)) & ~0xffff; 232 BOOL fResetVerify = FALSE; 233 234 if (fVerify && driveflags[toupper(*pszPathName) - 'A'] & DRIVE_WRITEVERIFYOFF) { 235 DosSetVerify(FALSE); 236 fResetVerify = TRUE; 237 } 231 238 switch (ulInfoLevel) { 232 239 case FIL_STANDARD: … … 281 288 rc = ERROR_INVALID_PARAMETER; 282 289 } // switch 283 290 if (fResetVerify) { 291 DosSetVerify(fVerify); 292 fResetVerify = FALSE; 293 } 284 294 return rc; 285 295 }  
  Note:
 See   TracChangeset
 for help on using the changeset viewer.
  