Changeset 70
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/filldir.c
r51 r70 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2001, 200 2Steven H.Levine9 Copyright (c) 2001, 2003 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 11 Jun 03 SHL - Add JFS and FAT32 support 13 14 14 15 ***********************************************************************/ … … 971 972 if(drvtype & DRIVE_REMOTE) 972 973 driveflags[x] |= DRIVE_REMOTE; 973 if(strcmp(FileSystem,HPFS) && 974 strcmp(FileSystem,HPFS386) && 975 strcmp(FileSystem,CDFS)) 974 if (strcmp(FileSystem,HPFS) && 975 strcmp(FileSystem,JFS) && 976 strcmp(FileSystem,CDFS) && 977 strcmp(FileSystem,FAT32) && 978 strcmp(FileSystem,HPFS386)) 979 { 976 980 driveflags[x] |= DRIVE_NOLONGNAMES; 981 } 977 982 if(!strcmp(FileSystem,CDFS)) { 978 983 removable = 1; 979 driveflags[x] |= (DRIVE_REMOVABLE | DRIVE_NOTWRITEABLE |980 DRIVE_CDROM );984 driveflags[x] |= DRIVE_REMOVABLE | DRIVE_NOTWRITEABLE | 985 DRIVE_CDROM; 981 986 } 982 else if(!stricmp(FileSystem,CBSIFS)) { 987 else if(!stricmp(FileSystem,CBSIFS)) 988 { 983 989 driveflags[x] |= DRIVE_ZIPSTREAM; 984 driveflags[x] &= (~DRIVE_REMOTE);990 driveflags[x] &= ~DRIVE_REMOTE; 985 991 if(drvtype & DRIVE_REMOVABLE) 986 992 driveflags[x] |= DRIVE_REMOVABLE; 987 993 if(!(drvtype & DRIVE_NOLONGNAMES)) 988 driveflags[x] &= (~DRIVE_NOLONGNAMES);994 driveflags[x] &= ~DRIVE_NOLONGNAMES; 989 995 } 990 996 -
trunk/dll/fm3dll.h
r49 r70 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2001, 200 2Steven H.Levine9 Copyright (c) 2001, 2003 Steven H.Levine 10 10 11 11 Revisions 12 Feb 03 SHL - Add CBLIST_TO_EASIZE 12 11 Jun 03 SHL - Add JFS and FAT32 support 12 13 13 14 ***********************************************************************/ … … 1237 1238 *DRMDRFLIST,*DRMDRFOS2FILE,*DRMDRFFM2ARC, 1238 1239 *DRM_FM2INIRECORD,*DRF_FM2INI,*SUBJECT,*LONGNAME, 1239 *HPFS,* HPFS386,*CDFS,*CBSIFS,*WPProgram,*FM3Folder,*FM3Tools;1240 *HPFS,*JFS,*CDFS,*FAT32,*HPFS386,*CBSIFS,*WPProgram,*FM3Folder,*FM3Tools; 1240 1241 DATADEF RGB2 RGBGREY,RGBBLACK; 1241 1242 DATADEF CHAR archiverbb2[CCHMAXPATH],StopPrinting,profile[CCHMAXPATH]; -
trunk/dll/init.c
r32 r70 10 10 11 11 Revisions 11 Jun 02 SHL - Add CheckVersion 12 11 Jun 03 SHL - Add JFS and FAT32 support 12 13 13 14 ***********************************************************************/ … … 218 219 LONGNAME = ".LONGNAME"; 219 220 HPFS = "HPFS"; 221 JFS = "JFS"; 220 222 CDFS = "CDFS"; 223 FAT32 = "FAT32"; 221 224 HPFS386 = "HPFS386"; 222 225 CBSIFS = "CBSIFS"; -
trunk/dll/misc.c
r2 r70 1 2 /*********************************************************************** 3 4 $Id$ 5 6 Misc support functions 7 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2003 Steven H.Levine 10 11 Revisions 11 Jun 03 SHL - Add JFS and FAT32 support 12 13 ***********************************************************************/ 14 1 15 #define INCL_DOS 2 16 #define INCL_WIN … … 298 312 299 313 300 BOOL AdjustCnrColRO (HWND hwndCnr,CHAR *title,BOOL readonly,BOOL toggle) {301 314 BOOL AdjustCnrColRO (HWND hwndCnr,CHAR *title,BOOL readonly,BOOL toggle) 315 { 302 316 PFIELDINFO pfi; 303 317 … … 340 354 x = CheckDrive(toupper(*directory),FileSystem,NULL); 341 355 if(x != -1) { 342 if(!stricmp(FileSystem,HPFS) || !stricmp(FileSystem,HPFS386)) { 356 if (!stricmp(FileSystem,HPFS) || 357 !stricmp(FileSystem,JFS) || 358 !stricmp(FileSystem,CDFS) || 359 !stricmp(FileSystem,FAT32) || 360 !stricmp(FileSystem,HPFS386)) 361 { 343 362 showem = TRUE; 344 363 showemA = TRUE; 345 364 } 346 else if(!strcmp(FileSystem,CDFS)) { 365 else if (!strcmp(FileSystem,CDFS)) 366 { 347 367 showem = TRUE; 348 368 showemA = FALSE; … … 351 371 showem = showemA = FALSE; 352 372 } 353 else /* assume FAT */ 373 else 374 { 375 /* assume FAT */ 354 376 showem = showemA = FALSE; 377 } 355 378 bool = (dcd) ? &dcd->detailsladate : &detailsladate; 356 379 AdjustCnrColVis(hwndCnr,GetPString(IDS_LADATE), -
trunk/dll/treecnr.c
r36 r70 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2001, 200 2Steven H.Levine9 Copyright (c) 2001, 2003 Steven H.Levine 10 10 11 11 Revisions 16 Oct 02 SHL - Handle large partitions 12 11 Jun 03 SHL - Add JFS and FAT32 support 12 13 13 14 ***********************************************************************/ … … 1835 1836 1836 1837 case CN_ENTER: 1837 if(mp2) {1838 1838 if(mp2) 1839 { 1839 1840 PCNRITEM pci = (PCNRITEM)((PNOTIFYRECORDENTER)mp2)->pRecord; 1840 1841 … … 2041 2042 DRIVE_NOTWRITEABLE | 2042 2043 DRIVE_CDROM); 2043 if(strcmp(FileSystem,HPFS) && strcmp(FileSystem,CDFS) && 2044 strcmp(FileSystem,HPFS386)) 2044 if (strcmp(FileSystem,HPFS) && 2045 strcmp(FileSystem,JFS) && 2046 strcmp(FileSystem,CDFS) && 2047 strcmp(FileSystem,FAT32) && 2048 strcmp(FileSystem,HPFS386)) 2049 { 2045 2050 driveflags[x] |= DRIVE_NOLONGNAMES; 2051 } 2046 2052 if(!strcmp(FileSystem,CBSIFS)) { 2047 2053 driveflags[x] |= DRIVE_ZIPSTREAM; -
trunk/dll/valid.c
r48 r70 10 10 11 11 Revisions 23 Nov 02 SHL - RootName: rework for sanity 12 13 12 27 Nov 02 SHL - MakeFullName: correct typo 13 11 Jun 03 SHL - Add JFS and FAT32 support 14 14 15 15 ***********************************************************************/ … … 168 168 169 169 170 INT CheckDrive (CHAR Drive, CHAR *FileSystem, ULONG *type) {171 170 INT CheckDrive (CHAR chDrive, CHAR *pszFileSystem, ULONG *pulType) 171 { 172 172 CHAR Path[3],*Buffer = NULL,*pfsn = NULL,*pfsd = NULL; 173 173 ULONG Size,Status,action,LengthIn,LengthOut; … … 176 176 PFSQBUFFER2 pfsq; 177 177 178 if (FileSystem)179 * FileSystem = 0;180 if (type)181 * type = 0;178 if (pszFileSystem) 179 *pszFileSystem = 0; 180 if (pulType) 181 *pulType = 0; 182 182 183 183 if(DosAllocMem((PVOID)&Buffer,4096, 184 184 PAG_COMMIT | OBJ_TILE | PAG_READ | PAG_WRITE)) { 185 185 DosBeep(50,50); 186 return -1; 187 } 188 189 Path[0] = Drive;186 return -1; // Say failed 187 } 188 189 Path[0] = chDrive; 190 190 Path[1] = ':'; 191 191 Path[2] = 0; … … 194 194 Status = DosQueryFSAttach(Path, 0, FSAIL_QUERYNAME, 195 195 (PFSQBUFFER2)Buffer, &Size); 196 if(Status) { /* can't get any info at all */ 196 if (Status) 197 { 198 /* can't get any info at all */ 197 199 DosFreeMem(Buffer); 198 200 DosError(FERR_DISABLEHARDERR); 199 return -1; 201 return -1; // Say failed 200 202 } 201 203 … … 204 206 pfsd = pfsn + pfsq->cbFSDName + 1; 205 207 206 if(FileSystem) { 207 strncpy(FileSystem, pfsn, CCHMAXPATH); 208 FileSystem[CCHMAXPATH - 1] = 0; 209 } 210 211 if(type && !strcmp(pfsn,CDFS)) 212 (*type) |= (DRIVE_NOTWRITEABLE | DRIVE_CDROM | DRIVE_REMOVABLE); 213 214 if(((PFSQBUFFER2)Buffer)->iType == FSAT_REMOTEDRV) { 215 if(type) 216 (*type) |= DRIVE_REMOTE; 217 if(type && !strcmp(pfsn,CBSIFS)) { 218 (*type) |= DRIVE_ZIPSTREAM; 219 (*type) &= (~DRIVE_REMOTE); 220 (*type) |= DRIVE_NOLONGNAMES; 221 if(pfsq->cbFSAData) { 222 208 if (pszFileSystem) 209 { 210 strncpy(pszFileSystem, pfsn, CCHMAXPATH); 211 pszFileSystem[CCHMAXPATH - 1] = 0; 212 } 213 214 if (pulType && !strcmp(pfsn,CDFS)) 215 *pulType |= DRIVE_NOTWRITEABLE | DRIVE_CDROM | DRIVE_REMOVABLE; 216 217 if (((PFSQBUFFER2)Buffer)->iType == FSAT_REMOTEDRV) 218 { 219 if (pulType) 220 *pulType |= DRIVE_REMOTE; 221 if (pulType && !strcmp(pfsn,CBSIFS)) 222 { 223 *pulType |= DRIVE_ZIPSTREAM; 224 *pulType &= ~DRIVE_REMOTE; 225 *pulType |= DRIVE_NOLONGNAMES; 226 if (pfsq->cbFSAData) 227 { 223 228 ULONG FType; 224 229 225 if(CheckDrive(*pfsd,NULL,&FType) != -1) { 226 if(FType & DRIVE_REMOVABLE) 227 (*type) |= DRIVE_REMOVABLE; 228 if(!(FType & DRIVE_NOLONGNAMES)) 229 (*type) &= (~DRIVE_NOLONGNAMES); 230 if (CheckDrive(*pfsd,NULL,&FType) != -1) 231 { 232 if (FType & DRIVE_REMOVABLE) 233 *pulType |= DRIVE_REMOVABLE; 234 if (~FType & DRIVE_NOLONGNAMES) 235 *pulType &= ~DRIVE_NOLONGNAMES; 230 236 } 231 237 } 232 238 } 233 if(type && (!strcmp(pfsn,HPFS) || !strcmp(pfsn,HPFS386))) 234 (*type) &= (~DRIVE_NOLONGNAMES); 239 if (pulType && 240 (!strcmp(pfsn,HPFS) || 241 !strcmp(pfsn,JFS) || 242 !strcmp(pfsn,FAT32) || 243 !strcmp(pfsn,HPFS386))) 244 { 245 *pulType &= ~DRIVE_NOLONGNAMES; 246 } 235 247 DosFreeMem(Buffer); 236 return 0; /* assume remotes are non-removable */ 237 } 238 239 if(strcmp(pfsn,HPFS) && strcmp(pfsn,CDFS) && strcmp(pfsn,HPFS386)) { 240 if(type) 241 (*type) |= DRIVE_NOLONGNAMES; 248 return 0; // Say non-removable 249 } 250 251 // Local drive 252 if (strcmp(pfsn,HPFS) && 253 strcmp(pfsn,JFS) && 254 strcmp(pfsn,CDFS) && 255 strcmp(pfsn,FAT32) && 256 strcmp(pfsn,HPFS386)) 257 { 258 if(pulType) 259 (*pulType) |= DRIVE_NOLONGNAMES; 242 260 } 243 261 … … 246 264 OPEN_ACCESS_READONLY | OPEN_SHARE_DENYNONE | 247 265 OPEN_FLAGS_DASD | OPEN_FLAGS_FAIL_ON_ERROR, 0); 248 if(Status) { 249 DosError(FERR_DISABLEHARDERR); 250 if(type) 251 (*type) |= DRIVE_REMOVABLE; 266 if(Status) 267 { 268 DosError(FERR_DISABLEHARDERR); 269 if (pulType) 270 *pulType |= DRIVE_REMOVABLE; // Assume removable if can not access 252 271 DosFreeMem(Buffer); 253 return (1); /* assume inaccessible local drives are removable */272 return 1; // Say removable 254 273 } 255 274 LengthIn = sizeof(Command); … … 260 279 &NonRemovable, sizeof(NonRemovable), &LengthOut); 261 280 DosClose(Handle); 262 if (!NonRemovable && type)263 (*type)|= DRIVE_REMOVABLE;281 if (!NonRemovable && pulType) 282 *pulType |= DRIVE_REMOVABLE; 264 283 DosFreeMem(Buffer); 265 return (NonRemovable)? 0 : 1;284 return NonRemovable ? 0 : 1; 266 285 } 267 286 … … 532 551 533 552 534 VOID DriveFlagsOne (INT x) {535 553 VOID DriveFlagsOne (INT x) 554 { 536 555 INT removable; 537 556 CHAR szDrive[] = " :\\",FileSystem[CCHMAXPATH]; … … 546 565 DRIVE_NOLOADSUBJS | DRIVE_NOLOADLONGS | 547 566 DRIVE_INCLUDEFILES | DRIVE_SLOW); 548 if(removable != -1) { 549 550 struct { 567 if(removable != -1) 568 { 569 struct 570 { 551 571 ULONG serial; 552 572 CHAR volumelength; … … 566 586 if(drvtype & DRIVE_REMOTE) 567 587 driveflags[x] |= DRIVE_REMOTE; 568 if(strcmp(FileSystem,HPFS) && 569 strcmp(FileSystem,HPFS386) && 570 strcmp(FileSystem,CDFS)) 588 if (strcmp(FileSystem,HPFS) && 589 strcmp(FileSystem,JFS) && 590 strcmp(FileSystem,CDFS) && 591 strcmp(FileSystem,FAT32) && 592 strcmp(FileSystem,HPFS386)) 593 { 571 594 driveflags[x] |= DRIVE_NOLONGNAMES; 595 } 572 596 if(!strcmp(FileSystem,CDFS)) { 573 597 removable = 1;
Note:
See TracChangeset
for help on using the changeset viewer.