Changeset 1836 for trunk/dll/dircnrs.c
- Timestamp:
- Jul 15, 2015, 2:48:14 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/dircnrs.c
r1807 r1836 97 97 #include <ctype.h> 98 98 #include <limits.h> 99 //#include <malloc.h> // _msize _heapchk 99 100 // #include <process.h> // _beginthread 100 101 … … 169 170 #include "pathutil.h" // AddBackslashToPath 170 171 #include "copyf.h" // ignorereadonly 172 #if 0 173 #define __PMPRINTF__ 174 #include "PMPRINTF.H" 175 #endif 171 176 172 177 // Data definitions … … 791 796 } 792 797 else 793 *szFree = 0; 798 *szFree = 0; 799 DosRequestMutexSem(hmtxFiltering, SEM_INDEFINITE_WAIT); 794 800 commafmt(tf, sizeof(tf), dcd->totalfiles); 795 801 CommaFmtULL(tb, sizeof(tb), dcd->ullTotalBytes, ' '); 802 DosReleaseMutexSem(hmtxFiltering); 796 803 if (!fMoreButtons) { 797 804 sprintf(s, " [%s / %s]%s%s%s%s %s", … … 873 880 RemoveCnrItems(dcd->hwndCnr, NULL, 0, CMA_FREE | CMA_INVALIDATE | CMA_ERASE); 874 881 AdjustCnrColsForFSType(dcd->hwndCnr, dcd->directory, &dcd->ds, FALSE); 875 dcd->ullTotalBytes = dcd->totalfiles = 876 dcd->selectedfiles = dcd->selectedbytes = 0; 882 DosRequestMutexSem(hmtxFiltering, SEM_INDEFINITE_WAIT); 883 dcd->ullTotalBytes = dcd->totalfiles = dcd->selectedfiles = dcd->selectedbytes = 0; 884 DosReleaseMutexSem(hmtxFiltering); 877 885 WinSetDlgItemText(dcd->hwndClient, DIR_TOTALS, "0 / 0k"); 878 886 WinSetDlgItemText(dcd->hwndClient, DIR_SELECTED, "0 / 0k"); … … 1220 1228 DosRequestMutexSem(hmtxFiltering, SEM_INDEFINITE_WAIT); 1221 1229 xfree(dcd, pszSrcFile, __LINE__); 1230 dcd = NULL; 1222 1231 DosReleaseMutexSem(hmtxFiltering); 1223 1232 DosPostEventSem(CompactSem); … … 1475 1484 cnri.pszCnrTitle = dcd->directory; 1476 1485 WinSendMsg(hwnd, 1477 CM_SETCNRINFO, MPFROMP(&cnri), MPFROMLONG(CMA_CNRTITLE)); 1486 CM_SETCNRINFO, MPFROMP(&cnri), MPFROMLONG(CMA_CNRTITLE)); 1487 DosRequestMutexSem(hmtxFiltering, SEM_INDEFINITE_WAIT); 1478 1488 dcd->totalfiles = cnri.cRecords; 1479 1489 commafmt(tb, sizeof(tb), dcd->totalfiles); 1480 1490 CommaFmtULL(tf, sizeof(tf), dcd->ullTotalBytes, 'K'); 1491 DosReleaseMutexSem(hmtxFiltering); 1481 1492 sprintf(s, "%s / %s", tb, tf); 1482 1493 WinSetDlgItemText(dcd->hwndClient, DIR_TOTALS, s); … … 3258 3269 else { 3259 3270 3260 3261 3262 3271 MRESULT mre; 3272 3273 mre = CnrDirectEdit(hwnd, msg, mp1, mp2); 3263 3274 if (mre != (MRESULT) - 1) 3264 3275 return mre; … … 3304 3315 } 3305 3316 } 3306 if (!dcd->suspendview && hwndMain && 3317 if (!dcd->suspendview && hwndMain && pci->pszFileName != NullStr && 3307 3318 (pre->fEmphasisMask & CRA_CURSORED) && 3308 3319 (pci->rc.flRecordAttr & CRA_CURSORED) && … … 3513 3524 WinSendMsg(hwnd, WM_SAVEAPPLICATION, MPVOID, MPVOID); 3514 3525 if (LastDir == hwnd) 3515 LastDir = (HWND) 0; 3526 LastDir = (HWND) 0; 3527 DosRequestMutexSem(hmtxFiltering, SEM_INDEFINITE_WAIT); 3516 3528 if (dcd) { 3517 3529 dcd->stopflag++; … … 3533 3545 SWP_RESTORE | SWP_SHOW | SWP_ACTIVATE | SWP_ZORDER); 3534 3546 FreeList(dcd->lastselection); 3535 DosRequestMutexSem(hmtxFiltering, SEM_INDEFINITE_WAIT);3536 free(dcd);3537 DosReleaseMutexSem(hmtxFiltering);3538 3547 WinSetWindowPtr(hwnd, QWL_USER, NULL); 3539 3548 DosPostEventSem(CompactSem); 3540 3549 } 3550 DosReleaseMutexSem(hmtxFiltering); 3541 3551 WinDestroyWindow(WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT), 3542 3552 QW_PARENT)); … … 3555 3565 DirMenu = DirCnrMenu = FileMenu = (HWND) 0; 3556 3566 EmptyCnr(hwnd); 3567 DosRequestMutexSem(hmtxFiltering, SEM_INDEFINITE_WAIT); 3568 xfree(dcd, pszSrcFile, __LINE__); 3569 dcd = NULL; 3570 DosReleaseMutexSem(hmtxFiltering); 3557 3571 # ifdef FORTIFY 3558 3572 Fortify_LeaveScope();
Note:
See TracChangeset
for help on using the changeset viewer.