Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/dircnrs.c
r1836 r1838 90 90 02 May 15 GKY Changes to allow a JAVA executable object to be created using "Real object" 91 91 menu item on a jar file. 92 02 Aug 15 GKY Remove unneed SubbyScan code and improve suppression of blank lines and 93 duplicate subdirectory name caused by running Stubby in worker threads. 92 94 93 95 ***********************************************************************/ … … 832 834 MPVOID, MPFROM2SHORT(CMA_FIRST, CMA_ITEMORDER)); 833 835 while (pci && (INT) pci != -1) { 836 if (!pci->pszFileName || !strcmp(pci->pszFileName, NullStr)) { 837 Runtime_Error(pszSrcFile, __LINE__, "pci->pszFileName NULL for %p", pci); 838 return 0; 839 } 834 840 if (pci->attrFile & FILE_DIRECTORY) { 835 841 pciC = WinSendMsg(dcd->hwndCnr, … … 837 843 MPFROMP(pci), 838 844 MPFROM2SHORT(CMA_FIRSTCHILD, CMA_ITEMORDER)); 839 if (!pciC) {840 Stubby(dcd->hwndCnr, pci);841 }845 if (!pciC) { 846 Stubby(dcd->hwndCnr, pci); 847 } 842 848 } 843 849 pci = WinSendMsg(dcd->hwndCnr, … … 895 901 if (fSwitchTreeOnDirChg) { 896 902 // Keep drive tree in sync with directory container 897 PSZ pszTempDir;898 while (fInitialDriveScan) {899 DosSleep(100); // Allow to complete900 } 903 PSZ pszTempDir; 904 while (fInitialDriveScan) 905 DosSleep(10); // Allow to complete 906 DosSleep(50); 901 907 pszTempDir = xstrdup(dcd->directory, pszSrcFile, __LINE__); 902 908 if (pszTempDir) { … … 1563 1569 WinSendMsg(hwnd, 1564 1570 CM_QUERYCNRINFO, 1565 MPFROMP(&cnri), MPFROMLONG(sizeof(CNRINFO)));1571 MPFROMP(&cnri), MPFROMLONG(sizeof(CNRINFO))); 1566 1572 cnri.pSortRecord = (PVOID) SortDirCnr; 1567 1573 WinSendMsg(hwnd, … … 1590 1596 cnri.flWindowAttr &= (~(CV_TREE | CV_ICON | CV_DETAIL | CV_TEXT)); 1591 1597 cnri.flWindowAttr |= (CV_NAME | CA_DETAILSVIEWTITLES | CV_MINI | 1592 CV_FLOW);1598 CV_FLOW); 1593 1599 cnri.pSortRecord = (PVOID) SortDirCnr; 1594 1600 … … 2122 2128 dcd->sortFlags |= SORT_REVERSE; 2123 2129 break; 2124 }2130 } 2125 2131 WinSendMsg(hwnd, CM_SORTRECORD, MPFROMP(SortDirCnr), 2126 2132 MPFROMLONG(dcd->sortFlags)); -
trunk/dll/filldir.c
r1836 r1838 109 109 14 Jun 15 GKY Changes to prevent trap in Filter, heap corruption and traps associated with it 110 110 19 Jun 15 JBS Ticket 514: Double free fix (which also fixes a memory leak) 111 02 Aug 15 GKY Serialize local hard drive scanning to reduce drive thrashing continue to scan 112 all other drive types in separate threads. 113 02 Aug 15 GKY Remove unneed SubbyScan code and improve suppression of blank lines and 114 duplicate subdirectory name caused by running Stubby in worker threads. 111 115 112 116 ***********************************************************************/ … … 263 267 ULONG flags = driveflags[toupper(*StubbyScan->pci->pszFileName) - 'A']; 264 268 265 if ((fRScanLocal && ~flags & DRIVE_REMOTE && ~flags & DRIVE_VIRTUAL) ||269 if ((fRScanLocal && flags & DRIVE_LOCALHD ) || 266 270 (fRScanRemote && flags & DRIVE_REMOTE) || 267 271 (fRScanVirtual && flags & DRIVE_VIRTUAL)) { … … 276 280 else { 277 281 Stubby(StubbyScan->hwndCnr, StubbyScan->pci); 278 } 282 } 283 if (flags & DRIVE_LOCALHD) 284 DosReleaseMutexSem(hmtxScanningLocalHD); 279 285 } 280 286 WinDestroyMsgQueue(hmq); … … 289 295 if (ProcessDirCount >= FixedVolume) { 290 296 DosReleaseMutexSem(hmtxScanning); 291 DosPostEventSem(hevTreeCnrScanComplete); 292 if (fInitialDriveScan && fSwitchTreeOnDirChg && hwndTree && fSaveState && pszFocusDir) { 293 // Keep drive tree in sync with directory container 294 if (!PostMsg(hwndTree, UM_SHOWME, MPFROMP(pszFocusDir), MPVOID)) 295 free(pszFocusDir); 296 } 297 DosPostEventSem(hevTreeCnrScanComplete); 297 298 ProcessDirCount = 0; 298 299 FixedVolume = 0; … … 981 982 (!filestoo && ~pffbFile->attrFile & FILE_DIRECTORY) || 982 983 (pffbFile->attrFile & FILE_DIRECTORY && 983 pffbFile->achName[0] == '.' &&984 !pffbFile->achName[0] || pffbFile->achName[0] == '.' && 984 985 (!pffbFile->achName[1] || 985 986 (pffbFile->achName[1] == '.' && !pffbFile->achName[2])))) { … … 1021 1022 pffbFile = papffbSelected[x]; 1022 1023 ullBytes = FillInRecordFromFFB(hwndCnr, pci, pszFileSpec, 1023 pffbFile, partial, dcd);1024 pffbFile, partial, dcd); 1024 1025 pci = (PCNRITEM) pci->rc.preccNextRecord; 1025 1026 ullTotalBytes += ullBytes; … … 1143 1144 } 1144 1145 ullBytes = FillInRecordFromFFB(hwndCnr, pci, pszFileSpec, 1145 pffbFile, partial, dcd);1146 pffbFile, partial, dcd); 1146 1147 pci = (PCNRITEM) pci->rc.preccNextRecord; 1147 1148 ullTotalBytes += ullBytes; … … 1251 1252 MPFROM2SHORT(CMA_FIRSTCHILD, CMA_ITEMORDER)); 1252 1253 while (pci && (INT)pci != -1) { 1254 if (!pci->pszFileName || !strcmp(pci->pszFileName, NullStr)) { 1255 Runtime_Error(pszSrcFile, __LINE__, "pci->pszFileName NULL for %p", pci); 1256 return; 1257 } 1253 1258 if ((pci->attrFile & FILE_DIRECTORY)) 1254 Stubby(hwndCnr, pci);1259 Stubby(hwndCnr, pci); 1255 1260 pci = WinSendMsg(hwndCnr, CM_QUERYRECORD, MPFROMP(pci), 1256 MPFROM2SHORT(CMA_NEXT, CMA_ITEMORDER));1261 MPFROM2SHORT(CMA_NEXT, CMA_ITEMORDER)); 1257 1262 } 1258 1263 } … … 1681 1686 if (~flags & DRIVE_INVALID && 1682 1687 ~flags & DRIVE_NOPRESCAN && (!fNoRemovableScan || ~flags & DRIVE_REMOVABLE)) { 1683 // DbgMsg(pszSrcFile, __LINE__, "Begin Thread %s", pci->pszFileName); 1684 if (xbeginthread(StubbyScanThread, 1685 65536, 1686 stubbyScan, 1687 pszSrcFile, __LINE__) == -1) 1688 xfree(stubbyScan, pszSrcFile, __LINE__); 1688 // DbgMsg(pszSrcFile, __LINE__, "Begin Thread %s", pci->pszFileName); 1689 if (flags & DRIVE_LOCALHD) { 1690 DosRequestMutexSem(hmtxScanningLocalHD, SEM_INDEFINITE_WAIT ); 1691 if (xbeginthread(StubbyScanThread, 1692 65536, 1693 stubbyScan, 1694 pszSrcFile, __LINE__) == -1) { 1695 DosReleaseMutexSem(hmtxScanningLocalHD); 1696 xfree(stubbyScan, pszSrcFile, __LINE__); 1697 } 1698 } 1699 else { 1700 if (xbeginthread(StubbyScanThread, 1701 65536, 1702 stubbyScan, 1703 pszSrcFile, __LINE__) == -1) 1704 xfree(stubbyScan, pszSrcFile, __LINE__); 1705 } 1689 1706 1690 1707 } // if drive needs to be scanned -
trunk/dll/init.c
r1830 r1838 131 131 30 Aug 14 GKY Add semaphore hmtxFiltering to prevent freeing dcd while filtering. Prevents 132 132 a trap when FM2 is shutdown while directory containers are still populating 133 02 Aug 15 GKY Serialize local hard drive scanning to reduce drive thrashing continue to scan 134 all other drive types in separate threads. 133 135 134 136 ***********************************************************************/ … … 233 235 HMTX hmtxFM2Globals; 234 236 HMTX hmtxScanning; 237 HMTX hmtxScanningLocalHD; 238 HMTX hmtxScanningLocal; 235 239 HMTX hmtxFiltering; 236 240 HEV hevTreeCnrScanComplete; … … 1165 1169 if (DosCreateMutexSem(NULL, &hmtxScanning, 0L, TRUE)) 1166 1170 Dos_Error(MB_CANCEL, rc, HWND_DESKTOP, pszSrcFile, __LINE__, 1171 PCSZ_DOSCREATEMUTEXSEM); 1172 if (DosCreateMutexSem(NULL, &hmtxScanningLocalHD, 0L, FALSE)) 1173 Dos_Error(MB_CANCEL, rc, HWND_DESKTOP, pszSrcFile, __LINE__, 1174 PCSZ_DOSCREATEMUTEXSEM); 1175 if (DosCreateMutexSem(NULL, &hmtxScanningLocal, 0L, FALSE)) 1176 Dos_Error(MB_CANCEL, rc, HWND_DESKTOP, pszSrcFile, __LINE__, 1167 1177 PCSZ_DOSCREATEMUTEXSEM); 1168 1178 if (DosCreateMutexSem(NULL, &hmtxFM2Delete, 0L, FALSE)) -
trunk/dll/init.h
r1786 r1838 41 41 30 Aug 14 GKY Add semaphore hmtxFiltering to prevent freeing dcd while filtering. Prevents 42 42 a trap when FM2 is shutdown while directory containers are still populating 43 02 Aug 15 GKY Serialize local hard drive scanning to reduce drive thrashing continue to scan 44 all other drive types in separate threads. 43 45 44 46 ***********************************************************************/ … … 238 240 extern HMTX hmtxFM2Delete; 239 241 extern HMTX hmtxScanning; 242 extern HMTX hmtxScanningLocalHD; 243 extern HMTX hmtxScanningLocal; 240 244 extern HMTX hmtxFiltering; 241 245 extern HEV hevTreeCnrScanComplete; -
trunk/dll/mainwnd.c
r1778 r1838 115 115 30 Dec 12 GKY Enhance traget directory drop to give the option of changing the directory or carrying out an 116 116 operation to the current target; Added an error message for target = None; 117 02 Aug 15 GKY Remove unneed SubbyScan code and improve suppression of blank lines and 118 duplicate subdirectory name caused by running Stubby in worker threads. 117 119 118 120 ***********************************************************************/ … … 3553 3555 continue; 3554 3556 } 3555 if (x == 0 && fSwitchTreeOnDirChg)3556 pszFocusDir = xstrdup(szDir, pszSrcFile, __LINE__);3557 3557 LoadDetailsSwitches(szKeyBase, &localdcd.ds, TRUE); 3558 3558 hwndDir = (HWND) WinSendMsg(hwndClient, -
trunk/dll/select.c
r1812 r1838 32 32 31 May 11 SHL Ensure mask->pszMasks[1] initialize to NULL if not used 33 33 13 Jun 15 GKY Fixed compare selection replaced pszFileNames with pszDisplayNames 34 02 Aug 15 GKY Remove unneed SubbyScan code and improve suppression of blank lines and 35 duplicate subdirectory name caused by running Stubby in worker threads. 34 36 35 37 ***********************************************************************/ … … 63 65 #include "stristr.h" // findstring 64 66 #include "fortify.h" 67 #if 0 68 #define __PMPRINTF__ 69 #include "PMPRINTF.H" 70 #endif 65 71 66 72 static PSZ pszSrcFile = __FILE__; … … 572 578 pci = (PCNRITEM) WinSendMsg(hwndCnr, CM_QUERYRECORD, MPFROMP(pciParent), 573 579 MPFROM2SHORT(CMA_FIRSTCHILD, CMA_ITEMORDER)); 574 if (pci) 575 DosSleep(0); 576 while (pci && (INT)pci != -1) { 580 while (pci && (INT)pci != -1) { 577 581 ExpandAll(hwndCnr, expand, pci); 578 582 pci = (PCNRITEM) WinSendMsg(hwndCnr, CM_QUERYRECORD, MPFROMP(pci),
Note:
See TracChangeset
for help on using the changeset viewer.
