Changeset 1871 for trunk/dll/filldir.c
- Timestamp:
- Sep 21, 2015, 12:57:02 AM (10 years ago)
- File:
-
- 1 edited
-
trunk/dll/filldir.c (modified) (18 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/filldir.c
r1868 r1871 119 119 22 Aug 15 GKY Minimize the occurence of an A:\ Drive not ready error by moving the cursor 120 120 to the default drive. 121 24 AUG 15 GKY Remove fDummy code 121 24 Aug 15 GKY Remove fDummy code 122 20 Sep 15 GKY Add code for Flesh to skip the directory entry added by Stubby (eliminate 123 use of NULL/Nullstr pszFileNames by Stubby). Add code to relink pci chain 124 following rename, delete, etc. Add "Expanding" window text. 122 125 123 126 ***********************************************************************/ … … 242 245 } 243 246 244 staticHPOINTER IDFile(PSZ p)247 HPOINTER IDFile(PSZ p) 245 248 { 246 249 HPOINTER hptr; … … 304 307 } 305 308 306 staticBOOL IsDefaultIcon(HPOINTER hptr)309 BOOL IsDefaultIcon(HPOINTER hptr) 307 310 { 308 311 HPOINTER hptr2; … … 827 830 const BOOL recurse, 828 831 const BOOL partial, 829 CHAR *stopflag,832 CHAR *stopflag, 830 833 DIRCNRDATA *dcd, // Optional 831 834 ULONG *pulTotalFiles, // Optional 832 PULONGLONG pullTotalBytes) // Optional 835 PULONGLONG pullTotalBytes, // Optional 836 CHAR *LoadedFirstChild) // Optional 833 837 { 834 838 /** … … 856 860 PCNRITEM pci; 857 861 PCNRITEM pciFirst; 862 PCNRITEM pciNext; 858 863 RECORDINSERT ri; 859 864 BOOL ok = TRUE; … … 914 919 pffbFile = paffbFound; 915 920 ulSelCnt = 0; 916 for (;;) {921 for (;;) { 917 922 if (!*pffbFile->achName || 918 923 (!filestoo && ~pffbFile->attrFile & FILE_DIRECTORY) || … … 920 925 !pffbFile->achName[0] || pffbFile->achName[0] == '.' && 921 926 (!pffbFile->achName[1] || 922 (pffbFile->achName[1] == '.' && !pffbFile->achName[2])))) { 927 (pffbFile->achName[1] == '.' && !pffbFile->achName[2])) || 928 (LoadedFirstChild && !stricmp(LoadedFirstChild, pffbFile->achName)))) { 923 929 // ulFindCnt--; // Got . or .. or file to be skipped 924 930 } … … 959 965 ullBytes = FillInRecordFromFFB(hwndCnr, pci, pszFileSpec, 960 966 pffbFile, partial, dcd); 961 pci = (PCNRITEM) pci->rc.preccNextRecord; 967 pciNext = pci; 968 pci = (PCNRITEM) pci->rc.preccNextRecord; 969 if (pci && (INT) pci != -1) 970 pci->pciPrevious = pciNext; 962 971 ullTotalBytes += ullBytes; 963 972 } // for … … 1051 1060 ULONG ulRecsToInsert; 1052 1061 1053 if (pci == NULL) {1062 if (pci == NULL) { 1054 1063 if (!WinIsWindow(WinQueryAnchorBlock(hwndCnr), hwndCnr)) { 1055 1064 ok = FALSE; … … 1072 1081 else { 1073 1082 // 04 Jan 08 SHL FIXME like comp.c to handle less than ulSelCnt records 1074 if (hwndStatus && dcd && 1075 dcd->hwndFrame == WinQueryActiveWindow(dcd->hwndParent)) { 1076 WinSetWindowText(hwndStatus, (CHAR *) GetPString(IDS_PLEASEWAITCOUNTINGTEXT)); 1083 if (hwndStatus && dcd && dcd->hwndFrame == 1084 WinQueryActiveWindow(dcd->hwndParent)) { 1085 WinSetWindowText(hwndStatus, (CHAR *) GetPString(LoadedFirstChild ? 1086 IDS_PLEASEWAITEXPANDINGTEXT : 1087 IDS_PLEASEWAITCOUNTINGTEXT)); 1077 1088 } 1078 1089 pci = pciFirst; … … 1080 1091 } 1081 1092 ullBytes = FillInRecordFromFFB(hwndCnr, pci, pszFileSpec, 1082 pffbFile, partial, dcd); 1083 pci = (PCNRITEM) pci->rc.preccNextRecord; 1093 pffbFile, partial, dcd); 1094 pciNext = pci; 1095 pci = (PCNRITEM) pci->rc.preccNextRecord; 1096 if (pci && (INT) pci != -1) 1097 pci->pciPrevious = pciNext; 1084 1098 ullTotalBytes += ullBytes; 1085 1099 // 15 Sep 09 SHL allow timed updates to see … … 1190 1204 if (!pci->pszFileName || !strcmp(pci->pszFileName, NullStr)) { 1191 1205 // 2015-08-23 SHL FIXME debug 1192 DbgMsg(pszSrcFile, __LINE__, "ProcessDirectory pci %p pci->pszFileName %p %s",1193 pci, pci->pszFileName,1194 pci->pszFileName == NullStr ? "NullStr" : "NULL");1206 //DbgMsg(pszSrcFile, __LINE__, "ProcessDirectory pci %p pci->pszFileName %p %s", 1207 // pci, pci->pszFileName, 1208 // pci->pszFileName == NullStr ? "NullStr" : "NULL"); 1195 1209 Runtime_Error(pszSrcFile, __LINE__, "pci->pszFileName NULL for %p", pci); 1196 1210 return; 1197 1211 } 1198 1212 if ((pci->attrFile & FILE_DIRECTORY)) 1199 AddFleshWorkRequest(hwndCnr, pci, eStubby);1213 AddFleshWorkRequest(hwndCnr, pci, eStubby); 1200 1214 pci = WinSendMsg(hwndCnr, CM_QUERYRECORD, MPFROMP(pci), 1201 1215 MPFROM2SHORT(CMA_NEXT, CMA_ITEMORDER)); … … 1226 1240 dcd, 1227 1241 NULL, // total files 1228 pullTotalBytes); 1242 pullTotalBytes, 1243 0); 1229 1244 DosPostEventSem(CompactSem); 1230 1245 … … 1268 1283 static ULONG ulLastDriveMap; 1269 1284 1270 DbgMsg(pszSrcFile, __LINE__, "FillTreeCnr hwndCnr %x hwndParent %x", hwndCnr, hwndParent); // 2015-08-03 SHL FIXME debug1285 //DbgMsg(pszSrcFile, __LINE__, "FillTreeCnr hwndCnr %x hwndParent %x", hwndCnr, hwndParent); // 2015-08-03 SHL FIXME debug 1271 1286 1272 1287 *szSuggest = 0; … … 1675 1690 1676 1691 fInitialDriveScan = FALSE; 1677 DbgMsg(pszSrcFile, __LINE__, "fInitialDriveScan now FALSE"); // 2015-08-03 SHL FIXME debug1692 //DbgMsg(pszSrcFile, __LINE__, "fInitialDriveScan now FALSE"); // 2015-08-03 SHL FIXME debug 1678 1693 DosPostEventSem(CompactSem); 1679 1694 … … 1755 1770 didonce = TRUE; 1756 1771 1757 DbgMsg(pszSrcFile, __LINE__, "FillTreeCnr finished"); // 2015-08-03 SHL FIXME debug1772 //DbgMsg(pszSrcFile, __LINE__, "FillTreeCnr finished"); // 2015-08-03 SHL FIXME debug 1758 1773 1759 1774 } // FillTreeCnr … … 1973 1988 // USHORT usTimerCheckCountdown = RCI_ITEMS_PER_TIMER_CHECK; 1974 1989 PCNRITEM pci; 1990 PCNRITEM pciPrevious; 1975 1991 ITIMER_DESC itdSleep = { 0 }; // 30 May 11 GKY 1976 1992 … … 1995 2011 InitITimer(&itdSleep, 500); 1996 2012 while (pci) { 1997 FreeCnrItemData(pci); 1998 pci = (PCNRITEM)pci->rc.preccNextRecord; 2013 FreeCnrItemData(pci); 2014 if (usCnt > 0) 2015 pciPrevious = pci; 2016 pci = (PCNRITEM)pci->rc.preccNextRecord; 1999 2017 if (!pci) 2000 break; 2018 break; 2019 if (usCnt > 0 && pciPrevious && pciPrevious->pciPrevious) { 2020 pciPrevious->pciPrevious->rc.preccNextRecord = (MINIRECORDCORE *) pci; 2021 pci->pciPrevious = pciPrevious->pciPrevious; 2022 pciPrevious->pciPrevious = NULL; 2023 pciPrevious->rc.preccNextRecord = NULL; 2024 } 2001 2025 if (remaining && --remaining == 0) 2002 2026 break;
Note:
See TracChangeset
for help on using the changeset viewer.
