Changeset 917 for trunk/dll/comp.c


Ignore:
Timestamp:
Jan 11, 2008, 10:41:56 PM (18 years ago)
Author:
Steven Levine
Message:

Correct/enhance settings notebook navigation, ticket #188 (Steven)
Reopen settings notebook to last selected page unless overridden, ticket #188 (Steven)
More Compare Directory overflow tweaks (Steven)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/comp.c

    r907 r917  
    878878      FILELIST **filesl = NULL;
    879879      FILELIST **filesr = NULL;
    880       UINT numfilesl = 0;
    881       UINT numfilesr = 0;
     880      // UINT numfilesl = 0;            // 08 Jan 08 SHL fixme
     881      // UINT numfilesr = 0;
    882882      UINT numallocl = 0;
    883883      UINT numallocr = 0;
     
    914914      RemoveCnrItems(hwndRight, NULL, 0, CMA_FREE | CMA_INVALIDATE);
    915915      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;
    917918
    918919      // Build list of all files in left directory
     
    923924      FillDirList(cmp->leftdir, lenl, cmp->includesubdirs,
    924925                  &filesl, &cmp->cmp->totalleft, &numallocl);
    925       numfilesl = cmp->cmp->totalleft;
     926      // numfilesl = cmp->cmp->totalleft;       // 08 Jan 08 SHL fixme
    926927
    927928      if (filesl)
    928         qsort(filesl, numfilesl, sizeof(CHAR *), CompNames);
     929        qsort(filesl, cmp->cmp->totalleft, sizeof(CHAR *), CompNames);
    929930
    930931      // DbgMsg(pszSrcFile, __LINE__, "FillCnrsThread sorted filesl");
     
    938939        FillDirList(cmp->rightdir, lenr, cmp->includesubdirs,
    939940                    &filesr, &cmp->cmp->totalright, &numallocr);
    940         numfilesr = cmp->cmp->totalright;
     941        // numfilesr = cmp->cmp->totalright;
    941942      }
    942943      else {
     
    10521053                                                          &fb4,
    10531054                                                          &filesr,
    1054                                                           &numfilesr,
     1055                                                          &cmp->cmp->totalright,
    10551056                                                          &numallocr))
    10561057                                          break;
     
    10751076
    10761077      if (filesr)
    1077         qsort(filesr, numfilesr, sizeof(CHAR *), CompNames);
     1078        qsort(filesr, cmp->cmp->totalright, sizeof(CHAR *), CompNames);
    10781079
    10791080      // DbgMsg(pszSrcFile, __LINE__, "FillCnrsThread sorted filesr");
     
    11781179            // File appears on left side
    11791180            filesSeenL++;
     1181            cmp->cmp->totalleft = filesSeenL;
    11801182            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);
    11841183            pcil->pszFileName = xstrdup(szBuf, pszSrcFile, __LINE__);
    11851184            pcil->pszDisplayName = pcil->pszFileName + lenl;
     
    12171216            // File appears on right side
    12181217            filesSeenR++;
     1218            cmp->cmp->totalright = filesSeenR;
    12191219            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);
    12231220            pcir->pszFileName = xstrdup(szBuf, pszSrcFile, __LINE__);   // 31 Jul 07 SHL
    12241221            pcir->pszDisplayName = pcir->pszFileName + lenr;
     
    13741371          pcir = (PCNRITEM) pcir->rc.preccNextRecord;
    13751372
    1376           // Show running totals every 2 seconds
    1377           cmp->cmp->totalleft = filesSeenL;
    1378           cmp->cmp->totalright = filesSeenR;
    1379 
    13801373        } // while filling left or right
    13811374
     
    14041397            }
    14051398          }
    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
    14111400          recsNeeded = recsGotten;
    14121401        } // if insufficient resources
    1413 
    14141402
    14151403        if (filesl)
     
    14351423          Win_Error(hwndLeft, cmp->hwnd, pszSrcFile, __LINE__, "CM_INSERTRECORD");
    14361424          FreeCnrItemList(hwndLeft, pcilFirst);
    1437           numfilesl = 0;
     1425          // numfilesl = 0;             // 08 Jan 08 SHL fixme
     1426          cmp->cmp->totalleft = 0;
    14381427        }
    14391428
     
    14521441          RemoveCnrItems(hwndLeft, NULL, 0, CMA_FREE | CMA_INVALIDATE);
    14531442          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        }
    14591446
    14601447        // DbgMsg(pszSrcFile, __LINE__, "FillCnrsThread filled");
Note: See TracChangeset for help on using the changeset viewer.