Changeset 917 for trunk/dll/comp.c
- Timestamp:
- Jan 11, 2008, 10:41:56 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/comp.c
r907 r917 878 878 FILELIST **filesl = NULL; 879 879 FILELIST **filesr = NULL; 880 UINT numfilesl = 0;881 UINT numfilesr = 0;880 // UINT numfilesl = 0; // 08 Jan 08 SHL fixme 881 // UINT numfilesr = 0; 882 882 UINT numallocl = 0; 883 883 UINT numallocr = 0; … … 914 914 RemoveCnrItems(hwndRight, NULL, 0, CMA_FREE | CMA_INVALIDATE); 915 915 RemoveCnrItems(hwndLeft, NULL, 0, CMA_FREE | CMA_INVALIDATE); 916 cmp->cmp->totalleft = cmp->cmp->totalright = 0; 916 cmp->cmp->totalleft = 0; 917 cmp->cmp->totalright = 0; 917 918 918 919 // Build list of all files in left directory … … 923 924 FillDirList(cmp->leftdir, lenl, cmp->includesubdirs, 924 925 &filesl, &cmp->cmp->totalleft, &numallocl); 925 numfilesl = cmp->cmp->totalleft;926 // numfilesl = cmp->cmp->totalleft; // 08 Jan 08 SHL fixme 926 927 927 928 if (filesl) 928 qsort(filesl, numfilesl, sizeof(CHAR *), CompNames);929 qsort(filesl, cmp->cmp->totalleft, sizeof(CHAR *), CompNames); 929 930 930 931 // DbgMsg(pszSrcFile, __LINE__, "FillCnrsThread sorted filesl"); … … 938 939 FillDirList(cmp->rightdir, lenr, cmp->includesubdirs, 939 940 &filesr, &cmp->cmp->totalright, &numallocr); 940 numfilesr = cmp->cmp->totalright;941 // numfilesr = cmp->cmp->totalright; 941 942 } 942 943 else { … … 1052 1053 &fb4, 1053 1054 &filesr, 1054 & numfilesr,1055 &cmp->cmp->totalright, 1055 1056 &numallocr)) 1056 1057 break; … … 1075 1076 1076 1077 if (filesr) 1077 qsort(filesr, numfilesr, sizeof(CHAR *), CompNames);1078 qsort(filesr, cmp->cmp->totalright, sizeof(CHAR *), CompNames); 1078 1079 1079 1080 // DbgMsg(pszSrcFile, __LINE__, "FillCnrsThread sorted filesr"); … … 1178 1179 // File appears on left side 1179 1180 filesSeenL++; 1181 cmp->cmp->totalleft = filesSeenL; 1180 1182 BldFullPathName(szBuf, cmp->leftdir, filesl[l]->fname); 1181 //sprintf(szBuf, "%s%s%s", cmp->leftdir,1182 // (cmp->leftdir[strlen(cmp->leftdir) - 1] == '\\') ?1183 // NullStr : "\\", filesl[l]->fname);1184 1183 pcil->pszFileName = xstrdup(szBuf, pszSrcFile, __LINE__); 1185 1184 pcil->pszDisplayName = pcil->pszFileName + lenl; … … 1217 1216 // File appears on right side 1218 1217 filesSeenR++; 1218 cmp->cmp->totalright = filesSeenR; 1219 1219 BldFullPathName(szBuf, cmp->rightdir, filesr[r]->fname); 1220 //sprintf(szBuf, "%s%s%s", cmp->rightdir,1221 // (cmp->rightdir[strlen(cmp->rightdir) - 1] == '\\') ?1222 // NullStr : "\\", filesr[r]->fname);1223 1220 pcir->pszFileName = xstrdup(szBuf, pszSrcFile, __LINE__); // 31 Jul 07 SHL 1224 1221 pcir->pszDisplayName = pcir->pszFileName + lenr; … … 1374 1371 pcir = (PCNRITEM) pcir->rc.preccNextRecord; 1375 1372 1376 // Show running totals every 2 seconds1377 cmp->cmp->totalleft = filesSeenL;1378 cmp->cmp->totalright = filesSeenR;1379 1380 1373 } // while filling left or right 1381 1374 … … 1404 1397 } 1405 1398 } 1406 // Reduce counts to match what is in container 1407 if (numfilesl > filesSeenL) 1408 numfilesl = filesSeenL; 1409 if (numfilesr > filesSeenR) 1410 numfilesr = filesSeenR; 1399 // Reduce count to match what is in containers 1411 1400 recsNeeded = recsGotten; 1412 1401 } // if insufficient resources 1413 1414 1402 1415 1403 if (filesl) … … 1435 1423 Win_Error(hwndLeft, cmp->hwnd, pszSrcFile, __LINE__, "CM_INSERTRECORD"); 1436 1424 FreeCnrItemList(hwndLeft, pcilFirst); 1437 numfilesl = 0; 1425 // numfilesl = 0; // 08 Jan 08 SHL fixme 1426 cmp->cmp->totalleft = 0; 1438 1427 } 1439 1428 … … 1452 1441 RemoveCnrItems(hwndLeft, NULL, 0, CMA_FREE | CMA_INVALIDATE); 1453 1442 FreeCnrItemList(hwndRight, pcirFirst); 1454 numfilesr = 0; 1455 } 1456 1457 cmp->cmp->totalleft = numfilesl; 1458 cmp->cmp->totalright = numfilesr; 1443 // numfilesr = 0; 1444 cmp->cmp->totalright = 0; 1445 } 1459 1446 1460 1447 // DbgMsg(pszSrcFile, __LINE__, "FillCnrsThread filled");
Note:
See TracChangeset
for help on using the changeset viewer.