Changeset 90
- Timestamp:
- May 21, 2004, 5:15:19 PM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/dll/filldir.c ¶
r70 r90 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2001, 200 3Steven H.Levine9 Copyright (c) 2001, 2004 Steven H.Levine 10 10 11 11 Revisions 12 Sep 02 SHL - Rework symbols to understand code 12 12 08 Feb 03 SHL - DropHelp: calc EA size consistently 13 13 11 Jun 03 SHL - Add JFS and FAT32 support 14 10 Jan 04 SHL - ProcessDirectory: avoid most large drive failures 14 15 15 16 ***********************************************************************/ … … 33 34 34 35 35 HPOINTER IDFile (ULONG cmp) {36 36 HPOINTER IDFile (ULONG cmp) 37 { 37 38 HPOINTER hptr; 38 39 … … 523 524 PFILEFINDBUF4 paffbFound,*papffbSelected,pffbFile,paffbTotal = NULL,paffbTemp; 524 525 HDIR hdir = HDIR_CREATE; 525 ULONG ulMaxFiles,ulExtraBytes,ulM = 1 L,ulTotal = 0L;526 LONGnumbytes,totalbytes,returnbytes = 0L;526 ULONG ulMaxFiles,ulExtraBytes,ulM = 1,ulTotal = 0L; 527 ULONG numbytes,totalbytes,returnbytes = 0L; 527 528 PCH pchEndPath; 528 529 APIRET rc; … … 539 540 // ulExtraBytes = EXTRA_RECORD_BYTES2; 540 541 if((driveflags[toupper(*szDirBase) - 'A'] & DRIVE_REMOTE) && fRemoteBug) 541 ulM = 1 L;/* file system gets confused */542 ulM = 1; /* file system gets confused */ 542 543 else if(driveflags[toupper(*szDirBase) - 'A'] & DRIVE_ZIPSTREAM) 543 544 ulM = min(FilesToGet,225); /* anything more is wasted */ … … 554 555 ulMaxFiles = ulM; 555 556 pszFileSpec = malloc(CCHMAXPATH + 2); 556 paffbFound = malloc((ulM + 1 L) * sizeof(FILEFINDBUF4));557 papffbSelected = malloc((ulM + 1 L) * sizeof(PFILEFINDBUF4));557 paffbFound = malloc((ulM + 1) * sizeof(FILEFINDBUF4)); 558 papffbSelected = malloc((ulM + 1) * sizeof(PFILEFINDBUF4)); 558 559 if(paffbFound && papffbSelected && pszFileSpec) { 559 560 t = strlen(szDirBase); … … 624 625 numbytes = FillInRecordFromFFB(hwndCnr,pci,pszFileSpec, 625 626 pffbFile,partial,dcd); 626 if(numbytes > -1L) {627 if(numbytes != -1) { 627 628 pci = (PCNRITEM)pci->rc.preccNextRecord; 628 629 totalbytes += numbytes; 630 if (totalbytes == -1) 631 totalbytes--; // fixme for real someday 632 629 633 } 630 634 else { … … 649 653 CM_INSERTRECORD, 650 654 MPFROMP(pciFirst), 651 MPFROMP(&ri))) { 655 MPFROMP(&ri))) 656 { 652 657 DosSleep(100L); 653 658 WinSetFocus(HWND_DESKTOP,hwndCnr); … … 673 678 __LINE__, 674 679 GetPString(IDS_FILLDIRERR2TEXT)); 675 totalbytes = -1 L;680 totalbytes = -1; 676 681 if(WinIsWindow((HAB)0,hwndCnr)) { 677 682 pci = pciFirst; … … 695 700 __LINE__, 696 701 GetPString(IDS_FILLDIRERR3TEXT)); 697 totalbytes = -1 L;702 totalbytes = -1; 698 703 } 699 if(totalbytes > -1L) {704 if(totalbytes != -1) { 700 705 returnbytes += totalbytes; 706 if (returnbytes == -1) 707 returnbytes--; // fixme for real someday 701 708 if(foundany) 702 709 (*foundany) += ulMaxFiles; … … 760 767 numbytes = FillInRecordFromFFB(hwndCnr,pci,pszFileSpec, 761 768 pffbFile,partial,dcd); 762 if (numbytes > -1L) {769 if (numbytes != -1) { 763 770 pci = (PCNRITEM)pci->rc.preccNextRecord; 764 771 totalbytes += numbytes; 772 if (totalbytes == -1) 773 totalbytes--; // fixme for real someday 765 774 } 766 775 else { … … 790 799 WinSetFocus(HWND_DESKTOP,hwndCnr); 791 800 if(!WinSendMsg(hwndCnr,CM_INSERTRECORD, 792 MPFROMP(pciFirst),MPFROMP(&ri))) {793 801 MPFROMP(pciFirst),MPFROMP(&ri))) 802 { 794 803 { // SHL 795 804 CHAR sz[80]; … … 808 817 __LINE__, 809 818 GetPString(IDS_FILLDIRERR5TEXT)); 810 totalbytes = -1 L;819 totalbytes = -1; 811 820 if(WinIsWindow((HAB)0,hwndCnr)) { 812 821 pci = pciFirst; … … 828 837 __LINE__, 829 838 GetPString(IDS_FILLDIRERR3TEXT)); 830 totalbytes = -1 L;831 } 832 if(totalbytes > -1L) {839 totalbytes = -1; 840 } 841 if(totalbytes != -1) { 833 842 returnbytes += totalbytes; 843 if (returnbytes == -1) 844 returnbytes--; // fixme for real someday 834 845 if(foundany) 835 846 (*foundany) += ulMaxFiles; … … 868 879 869 880 870 ULONG FillDirCnr (HWND hwndCnr,CHAR *directory,DIRCNRDATA *dcd) {871 881 ULONG FillDirCnr (HWND hwndCnr,CHAR *directory,DIRCNRDATA *dcd) 882 { 872 883 ULONG ret; 873 884 … … 879 890 880 891 881 ULONG FillTreeCnr (HWND hwndCnr,HWND hwndParent) {882 892 ULONG FillTreeCnr (HWND hwndCnr,HWND hwndParent) 893 { 883 894 ULONG ulDriveNum,ulDriveMap,numtoinsert = 0L,drvtype; 884 895 PCNRITEM pci,pciFirst = NULL,pciNext,pciParent = NULL; … … 1422 1433 } 1423 1434 didonce = TRUE; 1424 return 0 L;1435 return 0; 1425 1436 } 1426 1437
Note:
See TracChangeset
for help on using the changeset viewer.