Changeset 1553
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/dircnrs.c
r1551 r1553 78 78 28 May 10 GKY Yet another attempt to prevent duplicate directory names in the tree by 79 79 suppressing SHOW_ME during initial drive scan. 80 20 Nov 10 GKY Rework scanning code to remove redundant scans, prevent double directory 81 entries in the tree container, fix related semaphore performance using 82 combination of event and mutex semaphores 80 83 81 84 ***********************************************************************/ … … 2821 2824 driveserial[toupper(*pci->pszFileName) - 'A'] != 2822 2825 volser.serial)) { 2823 if (Flesh(hwnd, pci) && 2824 SHORT2FROMMP(mp1) == CN_EXPANDTREE && 2825 !dcd->suspendview && fTopDir) { 2826 if (SHORT2FROMMP(mp1) == CN_EXPANDTREE && Flesh(hwnd, pci) && 2827 !dcd->suspendview && fTopDir ) { 2826 2828 PostMsg(hwnd, UM_TOPDIR, MPFROMP(pci), MPVOID); 2827 2829 //DbgMsg(pszSrcFile, __LINE__, "UM_TOPDIR %p pci %p", hwnd, pci); -
trunk/dll/filldir.c
r1551 r1553 84 84 15 Nov 09 GKY Avoid szBuf overflow in FillTreeCnr 85 85 15 Nov 09 GKY Optimize some check code 86 17 JAN 10 GKY Changes to get working with Watcom 1.9 Beta (1/16/10). Mostly cast CHAR CONSTANT * as CHAR *. 87 09 MAY 10 JBS Ticket 434 bug fixes, message box text improvements and parameter update improvements. 86 17 JAN 10 GKY Changes to get working with Watcom 1.9 Beta (1/16/10). 87 Mostly cast CHAR CONSTANT * as CHAR *. 88 09 MAY 10 JBS Ticket 434 bug fixes, message box text improvements and parameter update 89 improvements. 90 20 Nov 10 GKY Rework scanning code to remove redundant scans, prevent double directory 91 entries in the tree container, fix related semaphore performance using 92 combination of event and mutex semaphores 88 93 89 94 ***********************************************************************/ … … 262 267 ProcessDirCount, FixedVolume); 263 268 if (ProcessDirCount >= FixedVolume) { 269 DosReleaseMutexSem(hmtxScanning); 264 270 DosPostEventSem(hevTreeCnrScanComplete); 265 271 if (fInitialDriveScan && fSwitchTree && hwndTree && fSaveState && pszFocusDir) { -
trunk/dll/init.c
r1551 r1553 98 98 09 MAY 10 JBS Ticket 434: Make fDontSuggestAgain a "global" flag, not a per app flag 99 99 23 Oct 10 GKY Changes to populate and utilize a HELPTABLE for context specific help 100 20 Nov 10 GKY Rework scanning code to remove redundant scans, prevent double directory 101 entries in the tree container, fix related semaphore performance using 102 combination of event and mutex semaphores 100 103 101 104 ***********************************************************************/ … … 196 199 HMTX hmtxFM2Delete; 197 200 HMTX hmtxFM2Globals; 201 HMTX hmtxScanning; 198 202 HEV hevTreeCnrScanComplete; 199 203 ULONG OS2ver[2]; … … 1108 1112 if (DosCreateMutexSem(NULL, &hmtxFM2Globals, 0L, FALSE)) 1109 1113 Dos_Error(MB_CANCEL, rc, HWND_DESKTOP, pszSrcFile, __LINE__, 1114 PCSZ_DOSCREATEMUTEXSEM); 1115 if (DosCreateMutexSem(NULL, &hmtxScanning, 0L, FALSE)) 1116 Dos_Error(MB_CANCEL, rc, HWND_DESKTOP, pszSrcFile, __LINE__, 1110 1117 PCSZ_DOSCREATEMUTEXSEM); 1111 1118 if (DosCreateMutexSem(NULL, &hmtxFM2Delete, 0L, FALSE)) -
trunk/dll/init.h
r1551 r1553 23 23 inappropriate menu context choices 24 24 15 Nov 09 GKY Add more PCSZs 25 17 JAN 10 GKY Changes to get working with Watcom 1.9 Beta (1/16/10). Mostly cast CHAR CONSTANT * as CHAR *. 25 17 JAN 10 GKY Changes to get working with Watcom 1.9 Beta (1/16/10). 26 Mostly cast CHAR CONSTANT * as CHAR *. 27 20 Nov 10 GKY Rework scanning code to remove redundant scans, prevent double directory 28 entries in the tree container, fix related semaphore performance using 29 combination of event and mutex semaphores 26 30 27 31 ***********************************************************************/ … … 207 211 extern HMTX hmtxFM2Globals; 208 212 extern HMTX hmtxFM2Delete; 213 extern HMTX hmtxScanning; 209 214 extern HEV hevTreeCnrScanComplete; 210 215 #endif -
trunk/dll/treecnr.c
r1552 r1553 84 84 11 Apr 10 GKY Fix drive tree rescan failure and program hang caused by event sem 85 85 never being posted 86 20 Nov 10 GKY Rework scanning code to remove redundant scans, prevent double directory 87 entries in the tree container, fix related semaphore performance using 88 combination of event and mutex semaphores 86 89 87 90 ***********************************************************************/ … … 644 647 dcd = INSTDATA(hwnd); 645 648 if (dcd) { 646 649 BOOL tempsusp, tempfollow, temptop; 647 650 648 651 DosWaitEventSem(hevTreeCnrScanComplete, SEM_INDEFINITE_WAIT); … … 656 659 } 657 660 ShowTreeRec(dcd->hwndCnr, (CHAR *)mp1, fCollapseFirst, TRUE); 658 // fixme Is this PostMsg needed if recursive scan has already been done?659 661 PostMsg(hwndTree, WM_COMMAND, MPFROM2SHORT(IDM_UPDATE, 0), MPVOID); 660 662 dcd->suspendview = (USHORT) tempsusp; … … 771 773 if (cnri.cRecords) { 772 774 sprintf(s, GetPString(IDS_NUMDRIVESTEXT), cnri.cRecords); 773 if (pci && pci->pszFileName && *pci->pszFileName) {775 if (pci && (INT) pci != -1 && pci->pszFileName && *pci->pszFileName) { 774 776 if (!(driveflags[toupper(*pci->pszFileName) - 'A'] & 775 777 DRIVE_REMOVABLE) || … … 1827 1829 driveserial[toupper(*pci->pszFileName) - 'A'] != 1828 1830 volser.serial)) { 1829 if (Flesh(hwnd, pci) && 1830 SHORT2FROMMP(mp1) == CN_EXPANDTREE && 1831 !dcd->suspendview && fTopDir) { 1831 if (SHORT2FROMMP(mp1) == CN_EXPANDTREE && Flesh(hwnd, pci) 1832 &&!dcd->suspendview && fTopDir) { 1832 1833 PostMsg(hwnd, UM_TOPDIR, MPFROMP(pci), MPVOID); 1833 1834 //DbgMsg(pszSrcFile, __LINE__, "UM_TOPDIR %p pci %p", hwnd, pci); … … 1905 1906 INT x; 1906 1907 1907 Dos WaitEventSem(hevTreeCnrScanComplete, SEM_INDEFINITE_WAIT);1908 DosRequestMutexSem(hmtxScanning, SEM_INDEFINITE_WAIT); 1908 1909 DosResetEventSem(hevTreeCnrScanComplete, &ulScanPostCnt); 1909 1910 if (fFollowTree) … … 1984 1985 if (!status) { 1985 1986 if (!volser.serial || driveserial[x] != volser.serial) { 1986 UnFlesh(hwnd, pciP);1987 1987 Flesh(hwnd, pciP); 1988 1988 driveserial[x] = volser.serial; … … 1992 1992 MPFROMP(pciP), 1993 1993 MPFROM2SHORT(CMA_FIRSTCHILD, CMA_ITEMORDER)); 1994 if (!pciL) 1995 Flesh(hwnd, pciP); 1994 if (!pciL) { 1995 Flesh(hwnd, pciP); 1996 } 1996 1997 if ((fShowFSTypeInTree || fShowDriveLabelInTree) && 1997 1998 strlen(pciP->pszFileName) < 4) { … … 2790 2791 if (pci->flags & RECFLAGS_UNDERENV) 2791 2792 break; 2792 Dos WaitEventSem(hevTreeCnrScanComplete, SEM_INDEFINITE_WAIT);2793 DosRequestMutexSem(hmtxScanning, SEM_INDEFINITE_WAIT); 2793 2794 DosResetEventSem(hevTreeCnrScanComplete, &ulScanPostCnt); 2794 2795 UnFlesh(hwnd, pci); … … 2802 2803 else if (strlen(pci->pszFileName) < 4) { 2803 2804 SelectDriveIcon(pci); 2804 } 2805 if ((fShowFSTypeInTree || fShowDriveLabelInTree) && 2806 strlen(pci->pszFileName) < 4) { 2807 strcpy(szBuf, pci->pszFileName); 2808 strcat(szBuf, " ["); 2809 strcat(szBuf, fShowFSTypeInTree ? FileSystem : volser.volumelabel); 2810 strcat(szBuf, "]"); 2811 pci->pszDisplayName = xstrdup(szBuf, pszSrcFile, __LINE__); 2812 pci->rc.pszIcon = pci->pszDisplayName; 2813 } 2805 if (fShowFSTypeInTree || fShowDriveLabelInTree) { 2806 strcpy(szBuf, pci->pszFileName); 2807 strcat(szBuf, " ["); 2808 strcat(szBuf, fShowFSTypeInTree ? FileSystem : volser.volumelabel); 2809 strcat(szBuf, "]"); 2810 pci->pszDisplayName = xstrdup(szBuf, pszSrcFile, __LINE__); 2811 pci->rc.pszIcon = pci->pszDisplayName; 2812 } 2813 } 2814 2814 WinSendMsg(hwnd, 2815 2815 CM_INVALIDATERECORD,
Note:
See TracChangeset
for help on using the changeset viewer.