|
From: Andre R. <and...@us...> - 2004-10-23 22:19:00
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv675/Frontier/Common/source Modified Files: fileops.c Log Message: Sanitized global includes. Include frontier.h in all source files. Move inclusion of system header files into osincludes.h. Index: fileops.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/fileops.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** fileops.c 17 Oct 2004 12:34:40 -0000 1.2 --- fileops.c 23 Oct 2004 22:18:51 -0000 1.3 *************** *** 24,45 **** ******************************************************************************/ ! #ifdef MACVERSION ! #include <Files.h> ! #include <Folders.h> ! #include <Gestalt.h> ! #include <Script.h> ! #include <StandardFile.h> ! #include <standard.h> ! #include <Math64.h> /*6.1b15 AR: for langgetextendedvolumeinfo*/ ! #endif #ifdef WIN95VERSION - #include "standard.h" #include "winregistry.h" - #undef abs - #include <shlobj.h> #endif - #include "filealias.h" #include "cursor.h" --- 24,34 ---- ******************************************************************************/ ! #include "frontier.h" ! #include "standard.h" #ifdef WIN95VERSION #include "winregistry.h" #endif #include "filealias.h" #include "cursor.h" *************** *** 58,92 **** #include "langinternal.h" /*for langbackgroundtask*/ - #ifdef MACVERSION - #ifdef flcomponent - - #include "SetUpA5.h" ! #endif ! #endif ! ! #define hasOpenDeny(volParms) (((volParms).vMAttrib & (1L << bHasOpenDeny)) != 0) ! ! enum { /*permissions used by MoreFile 1.1 code*/ ! dmNone = 0x0000, ! dmNoneDenyRd = 0x0010, ! dmNoneDenyWr = 0x0020, ! dmNoneDenyRdWr = 0x0030, ! dmRd = 0x0001, /* Single writer, multiple readers; the readers */ ! dmRdDenyRd = 0x0011, ! dmRdDenyWr = 0x0021, /* Browsing - equivalent to fsRdPerm */ ! dmRdDenyRdWr = 0x0031, ! dmWr = 0x0002, ! dmWrDenyRd = 0x0012, ! dmWrDenyWr = 0x0022, ! dmWrDenyRdWr = 0x0032, ! dmRdWr = 0x0003, /* Shared access - equivalent to fsRdWrShPerm */ ! dmRdWrDenyRd = 0x0013, ! dmRdWrDenyWr = 0x0023, /* Single writer, multiple readers; the writer */ ! dmRdWrDenyRdWr = 0x0033 /* Exclusive access - equivalent to fsRdWrPerm */ ! }; --- 47,87 ---- #include "langinternal.h" /*for langbackgroundtask*/ #ifdef MACVERSION ! #if TARGET_API_MAC_CARBON ! #include "MoreFilesX.h" ! #else ! pascal OSErr XGetVInfo(short volReference, StringPtr volName, short *vRefNum, ! UInt64 *freeBytes, UInt64 *totalBytes); ! #endif ! #ifdef flcomponent ! #include "SetUpA5.h" ! #endif + #define hasOpenDeny(volParms) (((volParms).vMAttrib & (1L << bHasOpenDeny)) != 0) + + #ifndef __MOREFILESEXTRAS__ + enum { /*permissions used by MoreFile 1.1 code*/ + dmNone = 0x0000, + dmNoneDenyRd = 0x0010, + dmNoneDenyWr = 0x0020, + dmNoneDenyRdWr = 0x0030, + dmRd = 0x0001, /* Single writer, multiple readers; the readers */ + dmRdDenyRd = 0x0011, + dmRdDenyWr = 0x0021, /* Browsing - equivalent to fsRdPerm */ + dmRdDenyRdWr = 0x0031, + dmWr = 0x0002, + dmWrDenyRd = 0x0012, + dmWrDenyWr = 0x0022, + dmWrDenyRdWr = 0x0032, + dmRdWr = 0x0003, /* Shared access - equivalent to fsRdWrShPerm */ + dmRdWrDenyRd = 0x0013, + dmRdWrDenyWr = 0x0023, /* Single writer, multiple readers; the writer */ + dmRdWrDenyRdWr = 0x0033 /* Exclusive access - equivalent to fsRdWrPerm */ + }; + #endif + + #endif *************** *** 134,147 **** - #ifdef MACVERSION - //copied from MoreFilesExtras.h - extern pascal OSErr XGetVInfo(short volReference, - StringPtr volName, - short *vRefNum, - UnsignedWide *freeBytes, - UnsignedWide *totalBytes); - - #endif - typedef struct tyfileinfo tyvolinfo; --- 129,132 ---- *************** *** 2108,2113 **** bigstring volname; #ifdef MACVERSION ! short vrefnum; ! UnsignedWide uwtotalbytes, uwfreebytes; #endif --- 2093,2100 ---- bigstring volname; #ifdef MACVERSION ! UInt64 ui64totalbytes, ui64freebytes; ! #if !TARGET_API_MAC_CARBON ! short vrefnum; ! #endif #endif *************** *** 2137,2153 **** #ifdef MACVERSION ! errnum = XGetVInfo (fs->vRefNum, nil, &vrefnum, &uwfreebytes, &uwtotalbytes); ! ! if (errnum != noErr) { volumeinfoerror (errnum); - return (false); } ! *totalbytes = (double) UnsignedWideToUInt64 (uwtotalbytes); ! ! *freebytes = (double) UnsignedWideToUInt64 (uwfreebytes); ! #endif --- 2124,2141 ---- #ifdef MACVERSION ! #if TARGET_API_MAC_CARBON ! errnum = FSGetVInfo (fs->vRefNum, nil, &ui64totalbytes, &ui64freebytes); ! #else ! errnum = XGetVInfo (fs->vRefNum, nil, &vrefnum, &ui64totalbytes, &ui64freebytes); ! #endif + if (errnum != noErr) { volumeinfoerror (errnum); return (false); } ! *totalbytes = (double) ui64totalbytes; ! *freebytes = (double) ui64freebytes; ! #endif *************** *** 3373,3406 **** #ifdef MACVERSION - #if TARGET_RT_MAC_CFM - - static pascal void iocompletion (ParmBlkPtr pb) { - - DisposePtr ((Ptr) pb); - } /*iocompletion*/ - - #if !TARGET_API_MAC_CARBON - static RoutineDescriptor iocompletionDesc = BUILD_ROUTINE_DESCRIPTOR (uppIOCompletionProcInfo, iocompletion); - - #define iocompletionUPP (&iocompletionDesc) - #else - //IOCompletionUPP iocompletionDesc = nil; - //#define iocompletionUPP(iocompletionDesc) - #endif - - - #else - - static pascal void iocompletion (ParmBlkPtr pb : __A0) { - - DisposePtr ((Ptr) pb); - } /*iocompletion*/ - - #define iocompletionUPP ((Register68kProcPtr) iocompletion) - - #endif - - - boolean getfullfilepath (bigstring bspath) { --- 3361,3364 ---- *************** *** 3424,3428 **** return ((ec == noErr) || (ec == fnfErr)); } /*filemakespec*/ ! #endif boolean initfile (void) { --- 3382,3388 ---- return ((ec == noErr) || (ec == fnfErr)); } /*filemakespec*/ ! ! #endif /*MACVERSION*/ ! boolean initfile (void) { |