home *** CD-ROM | disk | FTP | other *** search
- /*==================================================================
- File: MacOS_ConnectixUtils.h
-
- Contains: Miscellaneous utility routines used in program.
-
- Written by: Various
-
- Copyright: © 1995-2001 Connectix Corporation
- ==================================================================*/
-
- #ifndef CONNECTIXUTILS_H_
- #define CONNECTIXUTILS_H_
-
- #ifndef __FILES__
- #include <Files.h>
- #endif
-
- #ifndef __PROCESSES__
- #include <Processes.h>
- #endif
-
- enum
- {
- kPascalStringMaxLength = 255
- };
-
- const ProcessSerialNumber kCurrentProcessPSN = {0, kCurrentProcess};
-
- #if TARGET_CPU_68K
- #pragma parameter __D0 Min32(__D0, __D1)
- #endif
- SInt32 Min32 (SInt32 x, SInt32 y) THREEWORDINLINE(0xB280, 0x6E02, 0x2001);
-
- #if TARGET_CPU_68K
- #pragma parameter __D0 UMin32(__D0, __D1)
- #endif
- UInt32 UMin32 (UInt32 x, UInt32 y) THREEWORDINLINE(0xB280, 0x6202, 0x2001);
-
- SInt32 CompareBytes(const void * inSource, const void* inDest, UInt32 inByteCount);
- Boolean BytesMatch(const void * inSource, const void * inDest, UInt32 inByteCount);
- void FillMemory(void * inBase, UInt32 inByteCount, UInt8 inFillValue);
- void ZeroMemory(void * inBase, UInt32 inByteCount);
-
- OSErr FSGetDirectoryID(const FSSpec * inFileSpec, long * outDirID);
- OSErr MakeFSSpec(SInt16 inVRefNum, SInt32 inDirID, ConstStr255Param inName, FSSpec * outFileSpec);
-
- OSErr FSpGetCatInfo(const FSSpec * inSpec, CInfoPBPtr outCatInfo);
- OSErr FSpGetDirInfo(const FSSpec * inFileSpec, CInfoPBPtr outCInfoPB);
- OSErr FindFolderItemByTypeAndCreator( short inVRefNum, OSType inFolderType, Boolean inSearchSubdirectories, OSType inFileType, OSType inFileCreator, FSSpec * outFileSpec);
- OSErr FindDirectoryItemByTypeAndCreator( short inVRefNum, long inDirID, Boolean inSearchSubdirectories, OSType inFileType, OSType inFileCreator, FSSpec * outFileSpec);
-
- #endif // CONNECTIXUTILS_H_