Changeset 426 for trunk/dll/arccnrs.c
- Timestamp:
- Aug 3, 2006, 4:01:23 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/arccnrs.c
r423 r426 28 28 29 Jul 06 SHL Use xfgets_bstripcr 29 29 31 Jul 06 SHL Lower priority for archives with more than 1000 entries 30 02 Aug 06 SHL Add logic to stop processing large archives 30 31 31 32 ***********************************************************************/ … … 296 297 297 298 static INT FillArcCnr(HWND hwndCnr,CHAR *arcname,ARC_TYPE **arcinfo, 298 ULONGLONG *pullTotalBytes )299 ULONGLONG *pullTotalBytes, volatile PCHAR pStopFlag) 299 300 { 300 301 FILE *fp; … … 433 434 gotstart = !info->startlist || !*info->startlist; // If list has no start marker 434 435 435 while(!feof(fp) && !gotend ) {436 while(!feof(fp) && !gotend && !*pStopFlag) { 436 437 if (!xfgets_bstripcr(s,sizeof(s),fp,pszSrcFile,__LINE__)) 437 438 break; … … 615 616 lastpai = pai; 616 617 } 617 // Avoid hogging system iflarge archive618 if (numarcfiles == 100 0)619 618 // Avoid hogging system for large archive 619 if (numarcfiles == 100) 620 priority_idle(); 620 621 } 621 622 } … … 625 626 fclose(fp); 626 627 627 if (!numarcfiles || !gotstart || (!gotend && info->endlist && *info->endlist)) 628 if (*pStopFlag) 629 numarcfiles = 0; // Request close 630 else if (!numarcfiles || !gotstart || (!gotend && info->endlist && *info->endlist)) 628 631 { 629 632 // Oops … … 675 678 } 676 679 } // if opened 680 677 681 DosError(FERR_DISABLEHARDERR); 678 682 DosForceDelete(arctemp); 679 683 } 680 684 681 if (numarcfiles >= 500)685 if (numarcfiles) 682 686 priority_normal(); 683 687 … … 1337 1341 dcd->arcname, 1338 1342 &dcd->info, 1339 &dcd->ullTotalBytes); 1343 &dcd->ullTotalBytes, 1344 &dcd->stopflag); 1340 1345 if (!dcd->totalfiles) 1341 1346 PostMsg(dcd->hwndCnr,WM_CLOSE,MPVOID,MPVOID); … … 2719 2724 dcd->arcname, 2720 2725 &dcd->info, 2721 &dcd->ullTotalBytes); 2726 &dcd->ullTotalBytes, 2727 &dcd->stopflag); 2722 2728 PostMsg(dcd->hwndCnr,UM_RESCAN,MPVOID,MPVOID); 2723 2729 PostMsg(dcd->hwndCnr,UM_SETUP2,MPVOID,MPVOID);
Note:
See TracChangeset
for help on using the changeset viewer.