home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 October: Mac OS SDK / Dev.CD Oct 00 SDK1.toast / Development Kits / Cross Platform / QuickTime 4.1.2 Windows SDK / CIncludes / Files.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-04-12  |  171.9 KB  |  3 lines  |  [TEXT/R*ch]

  1. /*
  2.      File:        Files.h
  3.  
  4.      Contains:    File Manager (MFS, HFS, and HFS+) Interfaces.
  5.  
  6.      Version:    Technology:    Mac OS 8.5
  7.                  Release:    QuickTime 4.1
  8.  
  9.      Copyright:    (c) 1985-1999 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __FILES__
  18. #define __FILES__
  19.  
  20. #ifndef __MACTYPES__
  21.     #include <MacTypes.h>
  22. #endif
  23.  
  24. #ifndef __MIXEDMODE__
  25.     #include <MixedMode.h>
  26. #endif
  27.  
  28. #ifndef __OSUTILS__
  29.     #include <OSUtils.h>
  30. #endif
  31.  
  32. #ifndef __TEXTCOMMON__
  33.     #include <TextCommon.h>
  34. #endif
  35.  
  36. #ifndef __UTCUTILS__
  37.     #include <UTCUtils.h>
  38. #endif
  39.  
  40.  
  41. /* Finder constants were moved to Finder.* */
  42. #ifndef __FINDER__
  43.     #include <Finder.h>
  44. #endif
  45.  
  46.  
  47.  
  48.  
  49. #if PRAGMA_ONCE
  50. #pragma once
  51. #endif
  52.  
  53. #ifdef __cplusplus
  54. extern "C" {
  55. #endif
  56.  
  57. #if PRAGMA_IMPORT
  58. #pragma import on
  59. #endif
  60.  
  61. #if PRAGMA_STRUCT_ALIGN
  62.     #pragma options align=mac68k
  63. #elif PRAGMA_STRUCT_PACKPUSH
  64.     #pragma pack(push, 2)
  65. #elif PRAGMA_STRUCT_PACK
  66.     #pragma pack(2)
  67. #endif
  68.  
  69. /* HFSUniStr255 is the Unicode equivalent of Str255 */
  70.  
  71. struct HFSUniStr255 {
  72.     UInt16                             length;                        /* number of unicode characters */
  73.     UniChar                         unicode[255];                /* unicode characters */
  74. };
  75. typedef struct HFSUniStr255                HFSUniStr255;
  76.  
  77. typedef const HFSUniStr255 *            ConstHFSUniStr255Param;
  78. enum {
  79.     fsCurPerm                    = 0x00,                            /* open access permissions in ioPermssn */
  80.     fsRdPerm                    = 0x01,
  81.     fsWrPerm                    = 0x02,
  82.     fsRdWrPerm                    = 0x03,
  83.     fsRdWrShPerm                = 0x04,
  84.     fsRdDenyPerm                = 0x10,                            /* for use with OpenDeny and OpenRFDeny */
  85.     fsWrDenyPerm                = 0x20                            /* for use with OpenDeny and OpenRFDeny */
  86. };
  87.  
  88. enum {
  89.     fsRtParID                    = 1,
  90.     fsRtDirID                    = 2
  91. };
  92.  
  93. enum {
  94.     fsAtMark                    = 0,                            /* positioning modes in ioPosMode */
  95.     fsFromStart                    = 1,
  96.     fsFromLEOF                    = 2,
  97.     fsFromMark                    = 3
  98. };
  99.  
  100. enum {
  101.                                                                 /* ioPosMode flags */
  102.     pleaseCacheBit                = 4,                            /* please cache this request */
  103.     pleaseCacheMask                = 0x0010,
  104.     noCacheBit                    = 5,                            /* please don't cache this request */
  105.     noCacheMask                    = 0x0020,
  106.     rdVerifyBit                    = 6,                            /* read verify mode */
  107.     rdVerifyMask                = 0x0040,
  108.     rdVerify                    = 64,                            /* old name of rdVerifyMask */
  109.     forceReadBit                = 6,
  110.     forceReadMask                = 0x0040,
  111.     newLineBit                    = 7,                            /* newline mode */
  112.     newLineMask                    = 0x0080,
  113.     newLineCharMask                = 0xFF00                        /* newline character */
  114. };
  115.  
  116.  
  117. enum {
  118.                                                                 /* CatSearch Search bitmask Constants */
  119.     fsSBPartialName                = 1,
  120.     fsSBFullName                = 2,
  121.     fsSBFlAttrib                = 4,
  122.     fsSBFlFndrInfo                = 8,
  123.     fsSBFlLgLen                    = 32,
  124.     fsSBFlPyLen                    = 64,
  125.     fsSBFlRLgLen                = 128,
  126.     fsSBFlRPyLen                = 256,
  127.     fsSBFlCrDat                    = 512,
  128.     fsSBFlMdDat                    = 1024,
  129.     fsSBFlBkDat                    = 2048,
  130.     fsSBFlXFndrInfo                = 4096,
  131.     fsSBFlParID                    = 8192,
  132.     fsSBNegate                    = 16384,
  133.     fsSBDrUsrWds                = 8,
  134.     fsSBDrNmFls                    = 16,
  135.     fsSBDrCrDat                    = 512,
  136.     fsSBDrMdDat                    = 1024,
  137.     fsSBDrBkDat                    = 2048,
  138.     fsSBDrFndrInfo                = 4096,
  139.     fsSBDrParID                    = 8192
  140. };
  141.  
  142. enum {
  143.                                                                 /* CatSearch Search bit value Constants */
  144.     fsSBPartialNameBit            = 0,                            /*ioFileName points to a substring*/
  145.     fsSBFullNameBit                = 1,                            /*ioFileName points to a match string*/
  146.     fsSBFlAttribBit                = 2,                            /*search includes file attributes*/
  147.     fsSBFlFndrInfoBit            = 3,                            /*search includes finder info*/
  148.     fsSBFlLgLenBit                = 5,                            /*search includes data logical length*/
  149.     fsSBFlPyLenBit                = 6,                            /*search includes data physical length*/
  150.     fsSBFlRLgLenBit                = 7,                            /*search includes resource logical length*/
  151.     fsSBFlRPyLenBit                = 8,                            /*search includes resource physical length*/
  152.     fsSBFlCrDatBit                = 9,                            /*search includes create date*/
  153.     fsSBFlMdDatBit                = 10,                            /*search includes modification date*/
  154.     fsSBFlBkDatBit                = 11,                            /*search includes backup date*/
  155.     fsSBFlXFndrInfoBit            = 12,                            /*search includes extended finder info*/
  156.     fsSBFlParIDBit                = 13,                            /*search includes file's parent ID*/
  157.     fsSBNegateBit                = 14,                            /*return all non-matches*/
  158.     fsSBDrUsrWdsBit                = 3,                            /*search includes directory finder info*/
  159.     fsSBDrNmFlsBit                = 4,                            /*search includes directory valence*/
  160.     fsSBDrCrDatBit                = 9,                            /*directory-named version of fsSBFlCrDatBit*/
  161.     fsSBDrMdDatBit                = 10,                            /*directory-named version of fsSBFlMdDatBit*/
  162.     fsSBDrBkDatBit                = 11,                            /*directory-named version of fsSBFlBkDatBit*/
  163.     fsSBDrFndrInfoBit            = 12,                            /*directory-named version of fsSBFlXFndrInfoBit*/
  164.     fsSBDrParIDBit                = 13                            /*directory-named version of fsSBFlParIDBit*/
  165. };
  166.  
  167. enum {
  168.                                                                 /* vMAttrib (GetVolParms) bit position constants */
  169.     bLimitFCBs                    = 31,
  170.     bLocalWList                    = 30,
  171.     bNoMiniFndr                    = 29,
  172.     bNoVNEdit                    = 28,
  173.     bNoLclSync                    = 27,
  174.     bTrshOffLine                = 26,
  175.     bNoSwitchTo                    = 25,
  176.     bNoDeskItems                = 20,
  177.     bNoBootBlks                    = 19,
  178.     bAccessCntl                    = 18,
  179.     bNoSysDir                    = 17,
  180.     bHasExtFSVol                = 16,
  181.     bHasOpenDeny                = 15,
  182.     bHasCopyFile                = 14,
  183.     bHasMoveRename                = 13,
  184.     bHasDesktopMgr                = 12,
  185.     bHasShortName                = 11,
  186.     bHasFolderLock                = 10,
  187.     bHasPersonalAccessPrivileges = 9,
  188.     bHasUserGroupList            = 8,
  189.     bHasCatSearch                = 7,
  190.     bHasFileIDs                    = 6,
  191.     bHasBTreeMgr                = 5,
  192.     bHasBlankAccessPrivileges    = 4,
  193.     bSupportsAsyncRequests        = 3,                            /* asynchronous requests to this volume are handled correctly at any time*/
  194.     bSupportsTrashVolumeCache    = 2
  195. };
  196.  
  197. enum {
  198.                                                                 /* vMExtendedAttributes (GetVolParms) bit position constants */
  199.     bIsEjectable                = 0,                            /* volume is in an ejectable disk drive */
  200.     bSupportsHFSPlusAPIs        = 1,                            /* volume supports HFS Plus APIs directly (not through compatibility layer) */
  201.     bSupportsFSCatalogSearch    = 2,                            /* volume supports FSCatalogSearch */
  202.     bSupportsFSExchangeObjects    = 3,                            /* volume supports FSExchangeObjects */
  203.     bSupports2TBFiles            = 4,                            /* volume supports supports 2 terabyte files */
  204.     bSupportsLongNames            = 5,                            /* volume supports file/directory/volume names longer than 31 characters */
  205.     bSupportsMultiScriptNames    = 6,                            /* volume supports file/directory/volume names with characters from multiple script systems */
  206.     bSupportsNamedForks            = 7,                            /* volume supports forks beyond the data and resource forks */
  207.     bSupportsSubtreeIterators    = 8,                            /* volume supports recursive iterators not at the volume root */
  208.     bL2PCanMapFileBlocks        = 9                                /* volume supports Lg2Phys SPI correctly */
  209. };
  210.  
  211. enum {
  212.                                                                 /* Desktop Database icon Constants */
  213.     kLargeIcon                    = 1,
  214.     kLarge4BitIcon                = 2,
  215.     kLarge8BitIcon                = 3,
  216.     kSmallIcon                    = 4,
  217.     kSmall4BitIcon                = 5,
  218.     kSmall8BitIcon                = 6
  219. };
  220.  
  221. enum {
  222.     kLargeIconSize                = 256,
  223.     kLarge4BitIconSize            = 512,
  224.     kLarge8BitIconSize            = 1024,
  225.     kSmallIconSize                = 64,
  226.     kSmall4BitIconSize            = 128,
  227.     kSmall8BitIconSize            = 256
  228. };
  229.  
  230. enum {
  231.                                                                 /* Large Volume Constants */
  232.     kWidePosOffsetBit            = 8,
  233.     kUseWidePositioning            = (1 << kWidePosOffsetBit),
  234.     kMaximumBlocksIn4GB            = 0x007FFFFF
  235. };
  236.  
  237. enum {
  238.                                                                 /* Foreign Privilege Model Identifiers */
  239.     fsUnixPriv                    = 1
  240. };
  241.  
  242. enum {
  243.                                                                 /* Authentication Constants */
  244.     kNoUserAuthentication        = 1,
  245.     kPassword                    = 2,
  246.     kEncryptPassword            = 3,
  247.     kTwoWayEncryptPassword        = 6
  248. };
  249.  
  250.  
  251. /* mapping codes (ioObjType) for MapName & MapID */
  252. enum {
  253.     kOwnerID2Name                = 1,
  254.     kGroupID2Name                = 2,
  255.     kOwnerName2ID                = 3,
  256.     kGroupName2ID                = 4,                            /* types of oj object to be returned (ioObjType) for _GetUGEntry */
  257.     kReturnNextUser                = 1,
  258.     kReturnNextGroup            = 2,
  259.     kReturnNextUG                = 3
  260. };
  261.  
  262. /* vcbFlags bits */
  263. enum {
  264.     kVCBFlagsIdleFlushBit        = 3,                            /* Set if volume should be flushed at idle time */
  265.     kVCBFlagsIdleFlushMask        = 0x0008,
  266.     kVCBFlagsHFSPlusAPIsBit        = 4,                            /* Set if volume implements HFS Plus APIs itself (not via emulation) */
  267.     kVCBFlagsHFSPlusAPIsMask    = 0x0010,
  268.     kVCBFlagsHardwareGoneBit    = 5,                            /* Set if disk driver returned a hardwareGoneErr to Read or Write */
  269.     kVCBFlagsHardwareGoneMask    = 0x0020,
  270.     kVCBFlagsVolumeDirtyBit        = 15,                            /* Set if volume information has changed since the last FlushVol */
  271.     kVCBFlagsVolumeDirtyMask    = 0x8000
  272. };
  273.  
  274. /* ioFlAttrib bits returned by PBGetCatInfo */
  275. enum {
  276.                                                                 /* file and directory attributes in ioFlAttrib */
  277.     kioFlAttribLockedBit        = 0,                            /* Set if file or directory is locked */
  278.     kioFlAttribLockedMask        = 0x01,
  279.     kioFlAttribResOpenBit        = 2,                            /* Set if resource fork is open */
  280.     kioFlAttribResOpenMask        = 0x04,
  281.     kioFlAttribDataOpenBit        = 3,                            /* Set if data fork is open */
  282.     kioFlAttribDataOpenMask        = 0x08,
  283.     kioFlAttribDirBit            = 4,                            /* Set if this is a directory */
  284.     kioFlAttribDirMask            = 0x10,
  285.     ioDirFlg                    = 4,                            /* Set if this is a directory (old name) */
  286.     ioDirMask                    = 0x10,
  287.     kioFlAttribCopyProtBit        = 6,                            /* Set if AppleShare server "copy-protects" the file */
  288.     kioFlAttribCopyProtMask        = 0x40,
  289.     kioFlAttribFileOpenBit        = 7,                            /* Set if file (either fork) is open */
  290.     kioFlAttribFileOpenMask        = 0x80,                            /* ioFlAttrib for directories only */
  291.     kioFlAttribInSharedBit        = 2,                            /* Set if the directory is within a shared area of the directory hierarchy */
  292.     kioFlAttribInSharedMask        = 0x04,
  293.     kioFlAttribMountedBit        = 3,                            /* Set if the directory is a share point that is mounted by some user */
  294.     kioFlAttribMountedMask        = 0x08,
  295.     kioFlAttribSharePointBit    = 5,                            /* Set if the directory is a share point */
  296.     kioFlAttribSharePointMask    = 0x20
  297. };
  298.  
  299. /* ioFCBFlags bits returned by PBGetFCBInfo */
  300. enum {
  301.     kioFCBWriteBit                = 8,                            /* Data can be written to this file */
  302.     kioFCBWriteMask                = 0x0100,
  303.     kioFCBResourceBit            = 9,                            /* This file is a resource fork */
  304.     kioFCBResourceMask            = 0x0200,
  305.     kioFCBWriteLockedBit        = 10,                            /* File has a locked byte range */
  306.     kioFCBWriteLockedMask        = 0x0400,
  307.     kioFCBLargeFileBit            = 11,                            /* File may grow beyond 2GB; cache uses file blocks, not bytes */
  308.     kioFCBLargeFileMask            = 0x0800,
  309.     kioFCBSharedWriteBit        = 12,                            /* File is open for shared write access */
  310.     kioFCBSharedWriteMask        = 0x1000,
  311.     kioFCBFileLockedBit            = 13,                            /* File is locked (write-protected) */
  312.     kioFCBFileLockedMask        = 0x2000,
  313.     kioFCBOwnClumpBit            = 14,                            /* File has clump size specified in FCB */
  314.     kioFCBOwnClumpMask            = 0x4000,
  315.     kioFCBModifiedBit            = 15,                            /* File has changed since it was last flushed */
  316.     kioFCBModifiedMask            = 0x8000
  317. };
  318.  
  319. /* ioACUser bits returned by PBGetCatInfo */
  320. /* Note: you must clear ioACUser before calling PBGetCatInfo because some file systems do not use this field */
  321. enum {
  322.     kioACUserNoSeeFolderBit        = 0,                            /* Set if user does not have See Folder privileges */
  323.     kioACUserNoSeeFolderMask    = 0x01,
  324.     kioACUserNoSeeFilesBit        = 1,                            /* Set if user does not have See Files privileges */
  325.     kioACUserNoSeeFilesMask        = 0x02,
  326.     kioACUserNoMakeChangesBit    = 2,                            /* Set if user does not have Make Changes privileges */
  327.     kioACUserNoMakeChangesMask    = 0x04,
  328.     kioACUserNotOwnerBit        = 7,                            /* Set if user is not owner of the directory */
  329.     kioACUserNotOwnerMask        = 0x80
  330. };
  331.  
  332. /* Folder and File values of access privileges in ioACAccess */
  333. enum {
  334.     kioACAccessOwnerBit            = 31,                            /* User is owner of directory */
  335.     kioACAccessOwnerMask        = (long)0x80000000,
  336.     kioACAccessBlankAccessBit    = 28,                            /* Directory has blank access privileges */
  337.     kioACAccessBlankAccessMask    = 0x10000000,
  338.     kioACAccessUserWriteBit        = 26,                            /* User has write privileges */
  339.     kioACAccessUserWriteMask    = 0x04000000,
  340.     kioACAccessUserReadBit        = 25,                            /* User has read privileges */
  341.     kioACAccessUserReadMask        = 0x02000000,
  342.     kioACAccessUserSearchBit    = 24,                            /* User has search privileges */
  343.     kioACAccessUserSearchMask    = 0x01000000,
  344.     kioACAccessEveryoneWriteBit    = 18,                            /* Everyone has write privileges */
  345.     kioACAccessEveryoneWriteMask = 0x00040000,
  346.     kioACAccessEveryoneReadBit    = 17,                            /* Everyone has read privileges */
  347.     kioACAccessEveryoneReadMask    = 0x00020000,
  348.     kioACAccessEveryoneSearchBit = 16,                            /* Everyone has search privileges */
  349.     kioACAccessEveryoneSearchMask = 0x00010000,
  350.     kioACAccessGroupWriteBit    = 10,                            /* Group has write privileges */
  351.     kioACAccessGroupWriteMask    = 0x00000400,
  352.     kioACAccessGroupReadBit        = 9,                            /* Group has read privileges */
  353.     kioACAccessGroupReadMask    = 0x00000200,
  354.     kioACAccessGroupSearchBit    = 8,                            /* Group has search privileges */
  355.     kioACAccessGroupSearchMask    = 0x00000100,
  356.     kioACAccessOwnerWriteBit    = 2,                            /* Owner has write privileges */
  357.     kioACAccessOwnerWriteMask    = 0x00000004,
  358.     kioACAccessOwnerReadBit        = 1,                            /* Owner has read privileges */
  359.     kioACAccessOwnerReadMask    = 0x00000002,
  360.     kioACAccessOwnerSearchBit    = 0,                            /* Owner has search privileges */
  361.     kioACAccessOwnerSearchMask    = 0x00000001,
  362.     kfullPrivileges                = 0x00070007,                    /* all privileges for everybody and owner*/
  363.     kownerPrivileges            = 0x00000007                    /* all privileges for owner only*/
  364. };
  365.  
  366. /* values of user IDs and group IDs */
  367. enum {
  368.     knoUser                        = 0,
  369.     kadministratorUser            = 1
  370. };
  371.  
  372. enum {
  373.     knoGroup                    = 0
  374. };
  375.  
  376.  
  377.  
  378. struct GetVolParmsInfoBuffer {
  379.     short                             vMVersion;                    /*version number*/
  380.     long                             vMAttrib;                    /*bit vector of attributes (see vMAttrib constants)*/
  381.     Handle                             vMLocalHand;                /*handle to private data*/
  382.     long                             vMServerAdr;                /*AppleTalk server address or zero*/
  383.                                                                 /*        vMVersion 1 GetVolParmsInfoBuffer ends here */
  384.     long                             vMVolumeGrade;                /*approx. speed rating or zero if unrated*/
  385.     short                             vMForeignPrivID;            /*foreign privilege model supported or zero if none*/
  386.                                                                 /*        vMVersion 2 GetVolParmsInfoBuffer ends here */
  387.     long                             vMExtendedAttributes;        /*extended attribute bits (see vMExtendedAttributes constants)*/
  388.                                                                 /*        vMVersion 3 GetVolParmsInfoBuffer ends here */
  389. };
  390. typedef struct GetVolParmsInfoBuffer    GetVolParmsInfoBuffer;
  391. typedef union ParamBlockRec             ParamBlockRec;
  392.  
  393. typedef ParamBlockRec *                    ParmBlkPtr;
  394. typedef CALLBACK_API( void , IOCompletionProcPtr )(ParmBlkPtr paramBlock);
  395. /*
  396.     WARNING: IOCompletionProcPtr uses register based parameters under classic 68k
  397.              and cannot be written in a high-level language without 
  398.              the help of mixed mode or assembly glue.
  399. */
  400. typedef REGISTER_UPP_TYPE(IOCompletionProcPtr)                     IOCompletionUPP;
  401.  
  402. struct IOParam {
  403.     QElemPtr                         qLink;                        /*queue link in header*/
  404.     short                             qType;                        /*type byte for safety check*/
  405.     short                             ioTrap;                        /*FS: the Trap*/
  406.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  407.     IOCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  408.     volatile OSErr                     ioResult;                    /*result code*/
  409.     StringPtr                         ioNamePtr;                    /*ptr to Vol:FileName string*/
  410.     short                             ioVRefNum;                    /*volume refnum (DrvNum for Eject and MountVol)*/
  411.     short                             ioRefNum;                    /*refNum for I/O operation*/
  412.     SInt8                             ioVersNum;                    /*version number*/
  413.     SInt8                             ioPermssn;                    /*Open: permissions (byte)*/
  414.     Ptr                             ioMisc;                        /*Rename: new name (GetEOF,SetEOF: logical end of file) (Open: optional ptr to buffer) (SetFileType: new type)*/
  415.     Ptr                             ioBuffer;                    /*data buffer Ptr*/
  416.     long                             ioReqCount;                    /*requested byte count; also = ioNewDirID*/
  417.     long                             ioActCount;                    /*actual byte count completed*/
  418.     short                             ioPosMode;                    /*initial file positioning*/
  419.     long                             ioPosOffset;                /*file position offset*/
  420. };
  421. typedef struct IOParam                    IOParam;
  422. typedef IOParam *                        IOParamPtr;
  423.  
  424. struct FileParam {
  425.     QElemPtr                         qLink;                        /*queue link in header*/
  426.     short                             qType;                        /*type byte for safety check*/
  427.     short                             ioTrap;                        /*FS: the Trap*/
  428.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  429.     IOCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  430.     volatile OSErr                     ioResult;                    /*result code*/
  431.     StringPtr                         ioNamePtr;                    /*ptr to Vol:FileName string*/
  432.     short                             ioVRefNum;                    /*volume refnum (DrvNum for Eject and MountVol)*/
  433.     short                             ioFRefNum;                    /*reference number*/
  434.     SInt8                             ioFVersNum;                    /*version number*/
  435.     SInt8                             filler1;
  436.     short                             ioFDirIndex;                /*GetFInfo directory index*/
  437.     SInt8                             ioFlAttrib;                    /*GetFInfo: in-use bit=7, lock bit=0*/
  438.     SInt8                             ioFlVersNum;                /*file version number*/
  439.     FInfo                             ioFlFndrInfo;                /*user info*/
  440.     unsigned long                     ioFlNum;                    /*GetFInfo: file number; TF- ioDirID*/
  441.     unsigned short                     ioFlStBlk;                    /*start file block (0 if none)*/
  442.     long                             ioFlLgLen;                    /*logical length (EOF)*/
  443.     long                             ioFlPyLen;                    /*physical length*/
  444.     unsigned short                     ioFlRStBlk;                    /*start block rsrc fork*/
  445.     long                             ioFlRLgLen;                    /*file logical length rsrc fork*/
  446.     long                             ioFlRPyLen;                    /*file physical length rsrc fork*/
  447.     unsigned long                     ioFlCrDat;                    /*file creation date& time (32 bits in secs)*/
  448.     unsigned long                     ioFlMdDat;                    /*last modified date and time*/
  449. };
  450. typedef struct FileParam                FileParam;
  451. typedef FileParam *                        FileParamPtr;
  452.  
  453. struct VolumeParam {
  454.     QElemPtr                         qLink;                        /*queue link in header*/
  455.     short                             qType;                        /*type byte for safety check*/
  456.     short                             ioTrap;                        /*FS: the Trap*/
  457.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  458.     IOCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  459.     volatile OSErr                     ioResult;                    /*result code*/
  460.     StringPtr                         ioNamePtr;                    /*ptr to Vol:FileName string*/
  461.     short                             ioVRefNum;                    /*volume refnum (DrvNum for Eject and MountVol)*/
  462.     long                             filler2;
  463.     short                             ioVolIndex;                    /*volume index number*/
  464.     unsigned long                     ioVCrDate;                    /*creation date and time*/
  465.     unsigned long                     ioVLsBkUp;                    /*last backup date and time*/
  466.     unsigned short                     ioVAtrb;                    /*volume attrib*/
  467.     unsigned short                     ioVNmFls;                    /*number of files in directory*/
  468.     unsigned short                     ioVDirSt;                    /*start block of file directory*/
  469.     short                             ioVBlLn;                    /*GetVolInfo: length of dir in blocks*/
  470.     unsigned short                     ioVNmAlBlks;                /*for compatibilty ioVNmAlBlks * ioVAlBlkSiz <= 2 GB*/
  471.     unsigned long                     ioVAlBlkSiz;                /*for compatibilty ioVAlBlkSiz is <= $0000FE00 (65,024)*/
  472.     unsigned long                     ioVClpSiz;                    /*GetVolInfo: bytes to allocate at a time*/
  473.     unsigned short                     ioAlBlSt;                    /*starting disk(512-byte) block in block map*/
  474.     unsigned long                     ioVNxtFNum;                    /*GetVolInfo: next free file number*/
  475.     unsigned short                     ioVFrBlk;                    /*GetVolInfo: # free alloc blks for this vol*/
  476. };
  477. typedef struct VolumeParam                VolumeParam;
  478. typedef VolumeParam *                    VolumeParamPtr;
  479.  
  480. struct CntrlParam {
  481.     QElemPtr                         qLink;                        /*queue link in header*/
  482.     short                             qType;                        /*type byte for safety check*/
  483.     short                             ioTrap;                        /*FS: the Trap*/
  484.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  485.     IOCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  486.     volatile OSErr                     ioResult;                    /*result code*/
  487.     StringPtr                         ioNamePtr;                    /*ptr to Vol:FileName string*/
  488.     short                             ioVRefNum;                    /*volume refnum (DrvNum for Eject and MountVol)*/
  489.     short                             ioCRefNum;                    /*refNum for I/O operation*/
  490.     short                             csCode;                        /*word for control status code*/
  491.     short                             csParam[11];                /*operation-defined parameters*/
  492. };
  493. typedef struct CntrlParam                CntrlParam;
  494. typedef CntrlParam *                    CntrlParamPtr;
  495.  
  496. struct SlotDevParam {
  497.     QElemPtr                         qLink;                        /*queue link in header*/
  498.     short                             qType;                        /*type byte for safety check*/
  499.     short                             ioTrap;                        /*FS: the Trap*/
  500.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  501.     IOCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  502.     volatile OSErr                     ioResult;                    /*result code*/
  503.     StringPtr                         ioNamePtr;                    /*ptr to Vol:FileName string*/
  504.     short                             ioVRefNum;                    /*volume refnum (DrvNum for Eject and MountVol)*/
  505.     short                             ioSRefNum;
  506.     SInt8                             ioSVersNum;
  507.     SInt8                             ioSPermssn;
  508.     Ptr                             ioSMix;
  509.     short                             ioSFlags;
  510.     SInt8                             ioSlot;
  511.     SInt8                             ioID;
  512. };
  513. typedef struct SlotDevParam                SlotDevParam;
  514. typedef SlotDevParam *                    SlotDevParamPtr;
  515.  
  516. struct MultiDevParam {
  517.     QElemPtr                         qLink;                        /*queue link in header*/
  518.     short                             qType;                        /*type byte for safety check*/
  519.     short                             ioTrap;                        /*FS: the Trap*/
  520.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  521.     IOCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  522.     volatile OSErr                     ioResult;                    /*result code*/
  523.     StringPtr                         ioNamePtr;                    /*ptr to Vol:FileName string*/
  524.     short                             ioVRefNum;                    /*volume refnum (DrvNum for Eject and MountVol)*/
  525.     short                             ioMRefNum;
  526.     SInt8                             ioMVersNum;
  527.     SInt8                             ioMPermssn;
  528.     Ptr                             ioMMix;
  529.     short                             ioMFlags;
  530.     Ptr                             ioSEBlkPtr;
  531. };
  532. typedef struct MultiDevParam            MultiDevParam;
  533. typedef MultiDevParam *                    MultiDevParamPtr;
  534.  
  535. union ParamBlockRec {
  536.     IOParam                         ioParam;
  537.     FileParam                         fileParam;
  538.     VolumeParam                     volumeParam;
  539.     CntrlParam                         cntrlParam;
  540.     SlotDevParam                     slotDevParam;
  541.     MultiDevParam                     multiDevParam;
  542. };
  543.  
  544.  
  545. struct HFileInfo {
  546.     QElemPtr                         qLink;                        /*queue link in header*/
  547.     short                             qType;                        /*type byte for safety check*/
  548.     short                             ioTrap;                        /*FS: the Trap*/
  549.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  550.     IOCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  551.     volatile OSErr                     ioResult;                    /*result code*/
  552.     StringPtr                         ioNamePtr;                    /*ptr to Vol:FileName string*/
  553.     short                             ioVRefNum;                    /*volume refnum (DrvNum for Eject and MountVol)*/
  554.     short                             ioFRefNum;
  555.     SInt8                             ioFVersNum;
  556.     SInt8                             filler1;
  557.     short                             ioFDirIndex;
  558.     SInt8                             ioFlAttrib;
  559.     SInt8                             ioACUser;
  560.     FInfo                             ioFlFndrInfo;
  561.     long                             ioDirID;
  562.     unsigned short                     ioFlStBlk;
  563.     long                             ioFlLgLen;
  564.     long                             ioFlPyLen;
  565.     unsigned short                     ioFlRStBlk;
  566.     long                             ioFlRLgLen;
  567.     long                             ioFlRPyLen;
  568.     unsigned long                     ioFlCrDat;
  569.     unsigned long                     ioFlMdDat;
  570.     unsigned long                     ioFlBkDat;
  571.     FXInfo                             ioFlXFndrInfo;
  572.     long                             ioFlParID;
  573.     long                             ioFlClpSiz;
  574. };
  575. typedef struct HFileInfo                HFileInfo;
  576.  
  577. struct DirInfo {
  578.     QElemPtr                         qLink;                        /*queue link in header*/
  579.     short                             qType;                        /*type byte for safety check*/
  580.     short                             ioTrap;                        /*FS: the Trap*/
  581.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  582.     IOCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  583.     volatile OSErr                     ioResult;                    /*result code*/
  584.     StringPtr                         ioNamePtr;                    /*ptr to Vol:FileName string*/
  585.     short                             ioVRefNum;                    /*volume refnum (DrvNum for Eject and MountVol)*/
  586.     short                             ioFRefNum;
  587.     SInt8                             ioFVersNum;
  588.     SInt8                             filler1;
  589.     short                             ioFDirIndex;
  590.     SInt8                             ioFlAttrib;
  591.     SInt8                             ioACUser;
  592.     DInfo                             ioDrUsrWds;
  593.     long                             ioDrDirID;
  594.     unsigned short                     ioDrNmFls;
  595.     short                             filler3[9];
  596.     unsigned long                     ioDrCrDat;
  597.     unsigned long                     ioDrMdDat;
  598.     unsigned long                     ioDrBkDat;
  599.     DXInfo                             ioDrFndrInfo;
  600.     long                             ioDrParID;
  601. };
  602. typedef struct DirInfo                    DirInfo;
  603.  
  604. union CInfoPBRec {
  605.     HFileInfo                         hFileInfo;
  606.     DirInfo                         dirInfo;
  607. };
  608. typedef union CInfoPBRec                CInfoPBRec;
  609.  
  610. typedef CInfoPBRec *                    CInfoPBPtr;
  611.  
  612. struct XCInfoPBRec {
  613.     QElemPtr                         qLink;
  614.     short                             qType;
  615.     short                             ioTrap;
  616.     Ptr                             ioCmdAddr;
  617.     ProcPtr                         ioCompletion;                /* --> A pointer to a completion routine */
  618.     volatile OSErr                     ioResult;                    /* --> The result code of the function */
  619.     StringPtr                         ioNamePtr;                    /* --> Pointer to pathname to object */
  620.     short                             ioVRefNum;                    /* --> A volume specification */
  621.     long                             filler1;
  622.     StringPtr                         ioShortNamePtr;                /* <-> A pointer to the short name string buffer - required! */
  623.     short                             filler2;
  624.     short                             ioPDType;                    /* <-- The ProDOS file type */
  625.     long                             ioPDAuxType;                /* <-- The ProDOS aux type */
  626.     long                             filler3[2];
  627.     long                             ioDirID;                    /* --> A directory ID */
  628. };
  629. typedef struct XCInfoPBRec                XCInfoPBRec;
  630.  
  631. typedef XCInfoPBRec *                    XCInfoPBPtr;
  632. /* Catalog position record */
  633.  
  634. struct CatPositionRec {
  635.     long                             initialize;
  636.     short                             priv[6];
  637. };
  638. typedef struct CatPositionRec            CatPositionRec;
  639.  
  640. struct FSSpec {
  641.     short                             vRefNum;
  642.     long                             parID;
  643.     StrFileName                     name;                        /* a Str63 on MacOS*/
  644. };
  645. typedef struct FSSpec                    FSSpec;
  646. typedef FSSpec *                        FSSpecPtr;
  647. typedef FSSpecPtr *                        FSSpecHandle;
  648. /* pointer to array of FSSpecs */
  649. typedef FSSpecPtr                         FSSpecArrayPtr;
  650. /* 
  651.     The only difference between "const FSSpec*" and "ConstFSSpecPtr" is 
  652.     that as a parameter, ConstFSSpecPtr is allowed to be NULL 
  653. */
  654.  
  655. typedef const FSSpec *                    ConstFSSpecPtr;
  656. /* 
  657.     The following are structures to be filled out with the _PBGetVolMountInfo call
  658.     and passed back into the _PBVolumeMount call for external file system mounts. 
  659. */
  660. /* the "signature" of the file system */
  661. typedef OSType                             VolumeType;
  662. enum {
  663.                                                                 /* the signature for AppleShare */
  664.     AppleShareMediaType            = FOUR_CHAR_CODE('afpm')
  665. };
  666.  
  667. /*
  668.     VolMount stuff was once in FSM.*
  669. */
  670.  
  671. struct VolMountInfoHeader {
  672.     short                             length;                        /* length of location data (including self) */
  673.     VolumeType                         media;                        /* type of media.  Variable length data follows */
  674. };
  675. typedef struct VolMountInfoHeader        VolMountInfoHeader;
  676.  
  677. typedef VolMountInfoHeader *            VolMountInfoPtr;
  678. /* The new volume mount info record.  The old one is included for compatibility. 
  679.     the new record allows access by foriegn filesystems writers to the flags 
  680.     portion of the record. This portion is now public.  
  681. */
  682.  
  683. struct VolumeMountInfoHeader {
  684.     short                             length;                        /* length of location data (including self) */
  685.     VolumeType                         media;                        /* type of media (must be registered with Apple) */
  686.     short                             flags;                        /* volume mount flags. Variable length data follows */
  687. };
  688. typedef struct VolumeMountInfoHeader    VolumeMountInfoHeader;
  689. typedef VolumeMountInfoHeader *            VolumeMountInfoHeaderPtr;
  690. /* volume mount flags */
  691. enum {
  692.     volMountNoLoginMsgFlagBit    = 0,                            /* Input to VolumeMount: If set, the file system */
  693.     volMountNoLoginMsgFlagMask    = 0x0001,                        /*  should suppresss any log-in message/greeting dialog */
  694.     volMountExtendedFlagsBit    = 7,                            /* Input to VolumeMount: If set, the mount info is a */
  695.     volMountExtendedFlagsMask    = 0x0080,                        /*  AFPXVolMountInfo record for 3.7 AppleShare Client */
  696.     volMountInteractBit            = 15,                            /* Input to VolumeMount: If set, it's OK for the file system */
  697.     volMountInteractMask        = 0x8000,                        /*  to perform user interaction to mount the volume */
  698.     volMountChangedBit            = 14,                            /* Output from VoumeMount: If set, the volume was mounted, but */
  699.     volMountChangedMask            = 0x4000,                        /*  the volume mounting information record needs to be updated. */
  700.     volMountFSReservedMask        = 0x00FF,                        /* bits 0-7 are defined by each file system for its own use */
  701.     volMountSysReservedMask        = 0xFF00                        /* bits 8-15 are reserved for Apple system use */
  702. };
  703.  
  704.  
  705.  
  706.  
  707. struct AFPVolMountInfo {
  708.     short                             length;                        /* length of location data (including self) */
  709.     VolumeType                         media;                        /* type of media */
  710.     short                             flags;                        /* bits for no messages, no reconnect */
  711.     SInt8                             nbpInterval;                /* NBP Interval parameter (IM2, p.322) */
  712.     SInt8                             nbpCount;                    /* NBP Interval parameter (IM2, p.322) */
  713.     short                             uamType;                    /* User Authentication Method */
  714.     short                             zoneNameOffset;                /* short positive offset from start of struct to Zone Name */
  715.     short                             serverNameOffset;            /* offset to pascal Server Name string */
  716.     short                             volNameOffset;                /* offset to pascal Volume Name string */
  717.     short                             userNameOffset;                /* offset to pascal User Name string */
  718.     short                             userPasswordOffset;            /* offset to pascal User Password string */
  719.     short                             volPasswordOffset;            /* offset to pascal Volume Password string */
  720.     char                             AFPData[144];                /* variable length data may follow */
  721. };
  722. typedef struct AFPVolMountInfo            AFPVolMountInfo;
  723. typedef AFPVolMountInfo *                AFPVolMountInfoPtr;
  724.  
  725.  
  726. /* AFPXVolMountInfo is the new AFP volume mount info record, requires the 3.7 AppleShare Client */
  727.  
  728. struct AFPXVolMountInfo {
  729.     short                             length;                        /* length of location data (including self) */
  730.     VolumeType                         media;                        /* type of media */
  731.     short                             flags;                        /* bits for no messages, no reconnect */
  732.     SInt8                             nbpInterval;                /* NBP Interval parameter (IM2, p.322) */
  733.     SInt8                             nbpCount;                    /* NBP Interval parameter (IM2, p.322) */
  734.     short                             uamType;                    /* User Authentication Method type */
  735.     short                             zoneNameOffset;                /* short positive offset from start of struct to Zone Name */
  736.     short                             serverNameOffset;            /* offset to pascal Server Name string */
  737.     short                             volNameOffset;                /* offset to pascal Volume Name string */
  738.     short                             userNameOffset;                /* offset to pascal User Name string */
  739.     short                             userPasswordOffset;            /* offset to pascal User Password string */
  740.     short                             volPasswordOffset;            /* offset to pascal Volume Password string */
  741.     short                             extendedFlags;                /* extended flags word */
  742.     short                             uamNameOffset;                /* offset to a pascal UAM name string */
  743.     short                             alternateAddressOffset;        /* offset to Alternate Addresses in tagged format */
  744.     char                             AFPData[176];                /* variable length data may follow */
  745. };
  746. typedef struct AFPXVolMountInfo            AFPXVolMountInfo;
  747. typedef AFPXVolMountInfo *                AFPXVolMountInfoPtr;
  748. enum {
  749.     kAFPExtendedFlagsAlternateAddressMask = 1                    /*  bit in AFPXVolMountInfo.extendedFlags that means alternateAddressOffset is used*/
  750. };
  751.  
  752.  
  753. enum {
  754.                                                                 /* constants for use in AFPTagData.fType field*/
  755.     kAFPTagTypeIP                = 0x01,                            /* 4 byte IP address (MSB first)                    */
  756.     kAFPTagTypeIPPort            = 0x02,                            /* 4 byte IP address, 2 byte port (MSB first)        */
  757.     kAFPTagTypeDDP                = 0x03,                            /* Net,Node,Socket Sent by the server, currently unused by the client    */
  758.     kAFPTagTypeDNS                = 0x04                            /* DNS name in  address:port format    (total length variable up to 254 chars of dns name)                */
  759. };
  760.  
  761.  
  762. enum {
  763.                                                                 /* constants for use in AFPTagData.fLength field*/
  764.     kAFPTagLengthIP                = 0x06,
  765.     kAFPTagLengthIPPort            = 0x08,
  766.     kAFPTagLengthDDP            = 0x06
  767. };
  768.  
  769.  
  770. struct AFPTagData {
  771.     UInt8                             fLength;                    /* length of this data tag including the fLength field */
  772.     UInt8                             fType;
  773.     UInt8                             fData[1];                    /* variable length data */
  774. };
  775. typedef struct AFPTagData                AFPTagData;
  776.  
  777. struct AFPAlternateAddress {
  778.                                                                 /* ooo.NOTE: fVersion was missing in 3.2 Universal Interfaces*/
  779.     UInt8                             fVersion;                    /* version of the structure (currently 0x00)*/
  780.     UInt8                             fAddressCount;
  781.     UInt8                             fAddressList[1];            /* actually variable length packed set of AFPTagData */
  782. };
  783. typedef struct AFPAlternateAddress        AFPAlternateAddress;
  784.  
  785. struct DTPBRec {
  786.     QElemPtr                         qLink;                        /*queue link in header*/
  787.     short                             qType;                        /*type byte for safety check*/
  788.     short                             ioTrap;                        /*FS: the Trap*/
  789.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  790.     IOCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  791.     volatile OSErr                     ioResult;                    /*result code*/
  792.     StringPtr                         ioNamePtr;                    /*ptr to Vol:FileName string*/
  793.     short                             ioVRefNum;                    /*volume refnum (DrvNum for Eject and MountVol)*/
  794.     short                             ioDTRefNum;                    /* desktop refnum */
  795.     short                             ioIndex;
  796.     long                             ioTagInfo;
  797.     Ptr                             ioDTBuffer;
  798.     long                             ioDTReqCount;
  799.     long                             ioDTActCount;
  800.     SInt8                             ioFiller1;
  801.     SInt8                             ioIconType;
  802.     short                             ioFiller2;
  803.     long                             ioDirID;
  804.     OSType                             ioFileCreator;
  805.     OSType                             ioFileType;
  806.     long                             ioFiller3;
  807.     long                             ioDTLgLen;
  808.     long                             ioDTPyLen;
  809.     short                             ioFiller4[14];
  810.     long                             ioAPPLParID;
  811. };
  812. typedef struct DTPBRec                    DTPBRec;
  813.  
  814. typedef DTPBRec *                        DTPBPtr;
  815.  
  816.  
  817. struct HIOParam {
  818.     QElemPtr                         qLink;                        /*queue link in header*/
  819.     short                             qType;                        /*type byte for safety check*/
  820.     short                             ioTrap;                        /*FS: the Trap*/
  821.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  822.     IOCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  823.     volatile OSErr                     ioResult;                    /*result code*/
  824.     StringPtr                         ioNamePtr;                    /*ptr to Vol:FileName string*/
  825.     short                             ioVRefNum;                    /*volume refnum (DrvNum for Eject and MountVol)*/
  826.     short                             ioRefNum;
  827.     SInt8                             ioVersNum;
  828.     SInt8                             ioPermssn;
  829.     Ptr                             ioMisc;
  830.     Ptr                             ioBuffer;
  831.     long                             ioReqCount;
  832.     long                             ioActCount;
  833.     short                             ioPosMode;
  834.     long                             ioPosOffset;
  835. };
  836. typedef struct HIOParam                    HIOParam;
  837. typedef HIOParam *                        HIOParamPtr;
  838.  
  839. struct HFileParam {
  840.     QElemPtr                         qLink;                        /*queue link in header*/
  841.     short                             qType;                        /*type byte for safety check*/
  842.     short                             ioTrap;                        /*FS: the Trap*/
  843.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  844.     IOCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  845.     volatile OSErr                     ioResult;                    /*result code*/
  846.     StringPtr                         ioNamePtr;                    /*ptr to Vol:FileName string*/
  847.     short                             ioVRefNum;                    /*volume refnum (DrvNum for Eject and MountVol)*/
  848.     short                             ioFRefNum;
  849.     SInt8                             ioFVersNum;
  850.     SInt8                             filler1;
  851.     short                             ioFDirIndex;
  852.     SInt8                             ioFlAttrib;
  853.     SInt8                             ioFlVersNum;
  854.     FInfo                             ioFlFndrInfo;
  855.     long                             ioDirID;
  856.     unsigned short                     ioFlStBlk;
  857.     long                             ioFlLgLen;
  858.     long                             ioFlPyLen;
  859.     unsigned short                     ioFlRStBlk;
  860.     long                             ioFlRLgLen;
  861.     long                             ioFlRPyLen;
  862.     unsigned long                     ioFlCrDat;
  863.     unsigned long                     ioFlMdDat;
  864. };
  865. typedef struct HFileParam                HFileParam;
  866. typedef HFileParam *                    HFileParamPtr;
  867.  
  868. struct HVolumeParam {
  869.     QElemPtr                         qLink;                        /*queue link in header*/
  870.     short                             qType;                        /*type byte for safety check*/
  871.     short                             ioTrap;                        /*FS: the Trap*/
  872.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  873.     IOCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  874.     volatile OSErr                     ioResult;                    /*result code*/
  875.     StringPtr                         ioNamePtr;                    /*ptr to Vol:FileName string*/
  876.     short                             ioVRefNum;                    /*volume refnum (DrvNum for Eject and MountVol)*/
  877.     long                             filler2;
  878.     short                             ioVolIndex;
  879.     unsigned long                     ioVCrDate;
  880.     unsigned long                     ioVLsMod;
  881.     short                             ioVAtrb;
  882.     unsigned short                     ioVNmFls;
  883.     unsigned short                     ioVBitMap;
  884.     unsigned short                     ioAllocPtr;
  885.     unsigned short                     ioVNmAlBlks;
  886.     unsigned long                     ioVAlBlkSiz;
  887.     unsigned long                     ioVClpSiz;
  888.     unsigned short                     ioAlBlSt;
  889.     unsigned long                     ioVNxtCNID;
  890.     unsigned short                     ioVFrBlk;
  891.     unsigned short                     ioVSigWord;
  892.     short                             ioVDrvInfo;
  893.     short                             ioVDRefNum;
  894.     short                             ioVFSID;
  895.     unsigned long                     ioVBkUp;
  896.     short                             ioVSeqNum;
  897.     unsigned long                     ioVWrCnt;
  898.     unsigned long                     ioVFilCnt;
  899.     unsigned long                     ioVDirCnt;
  900.     long                             ioVFndrInfo[8];
  901. };
  902. typedef struct HVolumeParam                HVolumeParam;
  903. typedef HVolumeParam *                    HVolumeParamPtr;
  904.  
  905. struct XIOParam {
  906.     QElemPtr                         qLink;
  907.     short                             qType;
  908.     short                             ioTrap;
  909.     Ptr                             ioCmdAddr;
  910.     IOCompletionUPP                 ioCompletion;
  911.     volatile OSErr                     ioResult;
  912.     StringPtr                         ioNamePtr;
  913.     short                             ioVRefNum;
  914.     short                             ioRefNum;
  915.     SInt8                             ioVersNum;
  916.     SInt8                             ioPermssn;
  917.     Ptr                             ioMisc;
  918.     Ptr                             ioBuffer;
  919.     long                             ioReqCount;
  920.     long                             ioActCount;
  921.     short                             ioPosMode;                    /* must have kUseWidePositioning bit set */
  922.     wide                             ioWPosOffset;                /* wide positioning offset */
  923. };
  924. typedef struct XIOParam                    XIOParam;
  925. typedef XIOParam *                        XIOParamPtr;
  926.  
  927. struct XVolumeParam {
  928.     QElemPtr                         qLink;
  929.     short                             qType;
  930.     short                             ioTrap;
  931.     Ptr                             ioCmdAddr;
  932.     IOCompletionUPP                 ioCompletion;
  933.     volatile OSErr                     ioResult;
  934.     StringPtr                         ioNamePtr;
  935.     short                             ioVRefNum;
  936.     unsigned long                     ioXVersion;                    /* this XVolumeParam version (0) */
  937.     short                             ioVolIndex;
  938.     unsigned long                     ioVCrDate;
  939.     unsigned long                     ioVLsMod;
  940.     short                             ioVAtrb;
  941.     unsigned short                     ioVNmFls;
  942.     unsigned short                     ioVBitMap;
  943.     unsigned short                     ioAllocPtr;
  944.     unsigned short                     ioVNmAlBlks;
  945.     unsigned long                     ioVAlBlkSiz;
  946.     unsigned long                     ioVClpSiz;
  947.     unsigned short                     ioAlBlSt;
  948.     unsigned long                     ioVNxtCNID;
  949.     unsigned short                     ioVFrBlk;
  950.     unsigned short                     ioVSigWord;
  951.     short                             ioVDrvInfo;
  952.     short                             ioVDRefNum;
  953.     short                             ioVFSID;
  954.     unsigned long                     ioVBkUp;
  955.     short                             ioVSeqNum;
  956.     unsigned long                     ioVWrCnt;
  957.     unsigned long                     ioVFilCnt;
  958.     unsigned long                     ioVDirCnt;
  959.     long                             ioVFndrInfo[8];
  960.     UInt64                             ioVTotalBytes;                /* total number of bytes on volume */
  961.     UInt64                             ioVFreeBytes;                /* number of free bytes on volume */
  962. };
  963. typedef struct XVolumeParam                XVolumeParam;
  964. typedef XVolumeParam *                    XVolumeParamPtr;
  965.  
  966. struct AccessParam {
  967.     QElemPtr                         qLink;                        /*queue link in header*/
  968.     short                             qType;                        /*type byte for safety check*/
  969.     short                             ioTrap;                        /*FS: the Trap*/
  970.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  971.     IOCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  972.     volatile OSErr                     ioResult;                    /*result code*/
  973.     StringPtr                         ioNamePtr;                    /*ptr to Vol:FileName string*/
  974.     short                             ioVRefNum;                    /*volume refnum (DrvNum for Eject and MountVol)*/
  975.     short                             filler3;
  976.     short                             ioDenyModes;                /*access rights data*/
  977.     short                             filler4;
  978.     SInt8                             filler5;
  979.     SInt8                             ioACUser;                    /*access rights for directory only*/
  980.     long                             filler6;
  981.     long                             ioACOwnerID;                /*owner ID*/
  982.     long                             ioACGroupID;                /*group ID*/
  983.     long                             ioACAccess;                    /*access rights*/
  984.     long                             ioDirID;
  985. };
  986. typedef struct AccessParam                AccessParam;
  987. typedef AccessParam *                    AccessParamPtr;
  988.  
  989. struct ObjParam {
  990.     QElemPtr                         qLink;                        /*queue link in header*/
  991.     short                             qType;                        /*type byte for safety check*/
  992.     short                             ioTrap;                        /*FS: the Trap*/
  993.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  994.     IOCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  995.     volatile OSErr                     ioResult;                    /*result code*/
  996.     StringPtr                         ioNamePtr;                    /*ptr to Vol:FileName string*/
  997.     short                             ioVRefNum;                    /*volume refnum (DrvNum for Eject and MountVol)*/
  998.     short                             filler7;
  999.     short                             ioObjType;                    /*function code*/
  1000.     StringPtr                         ioObjNamePtr;                /*ptr to returned creator/group name*/
  1001.     long                             ioObjID;                    /*creator/group ID*/
  1002. };
  1003. typedef struct ObjParam                    ObjParam;
  1004. typedef ObjParam *                        ObjParamPtr;
  1005.  
  1006. struct CopyParam {
  1007.     QElemPtr                         qLink;                        /*queue link in header*/
  1008.     short                             qType;                        /*type byte for safety check*/
  1009.     short                             ioTrap;                        /*FS: the Trap*/
  1010.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  1011.     IOCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  1012.     volatile OSErr                     ioResult;                    /*result code*/
  1013.     StringPtr                         ioNamePtr;                    /*ptr to Vol:FileName string*/
  1014.     short                             ioVRefNum;                    /*volume refnum (DrvNum for Eject and MountVol)*/
  1015.     short                             ioDstVRefNum;                /*destination vol identifier*/
  1016.     short                             filler8;
  1017.     StringPtr                         ioNewName;                    /*ptr to destination pathname*/
  1018.     StringPtr                         ioCopyName;                    /*ptr to optional name*/
  1019.     long                             ioNewDirID;                    /*destination directory ID*/
  1020.     long                             filler14;
  1021.     long                             filler15;
  1022.     long                             ioDirID;
  1023. };
  1024. typedef struct CopyParam                CopyParam;
  1025. typedef CopyParam *                        CopyParamPtr;
  1026.  
  1027. struct WDParam {
  1028.     QElemPtr                         qLink;                        /*queue link in header*/
  1029.     short                             qType;                        /*type byte for safety check*/
  1030.     short                             ioTrap;                        /*FS: the Trap*/
  1031.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  1032.     IOCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  1033.     volatile OSErr                     ioResult;                    /*result code*/
  1034.     StringPtr                         ioNamePtr;                    /*ptr to Vol:FileName string*/
  1035.     short                             ioVRefNum;                    /*volume refnum (DrvNum for Eject and MountVol)*/
  1036.     short                             filler9;
  1037.     short                             ioWDIndex;
  1038.     long                             ioWDProcID;
  1039.     short                             ioWDVRefNum;
  1040.     short                             filler10;
  1041.     long                             filler11;
  1042.     long                             filler12;
  1043.     long                             filler13;
  1044.     long                             ioWDDirID;
  1045. };
  1046. typedef struct WDParam                    WDParam;
  1047. typedef WDParam *                        WDParamPtr;
  1048.  
  1049. struct FIDParam {
  1050.     QElemPtr                         qLink;                        /*queue link in header*/
  1051.     short                             qType;                        /*type byte for safety check*/
  1052.     short                             ioTrap;                        /*FS: the Trap*/
  1053.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  1054.     IOCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  1055.     volatile OSErr                     ioResult;                    /*result code*/
  1056.     StringPtr                         ioNamePtr;                    /*ptr to Vol:FileName string*/
  1057.     short                             ioVRefNum;                    /*volume refnum (DrvNum for Eject and MountVol)*/
  1058.     long                             filler14;
  1059.     StringPtr                         ioDestNamePtr;                /* dest file name */
  1060.     long                             filler15;
  1061.     long                             ioDestDirID;                /* dest file's directory id */
  1062.     long                             filler16;
  1063.     long                             filler17;
  1064.     long                             ioSrcDirID;                    /* source file's directory id */
  1065.     short                             filler18;
  1066.     long                             ioFileID;                    /* file ID */
  1067. };
  1068. typedef struct FIDParam                    FIDParam;
  1069. typedef FIDParam *                        FIDParamPtr;
  1070.  
  1071. struct ForeignPrivParam {
  1072.     QElemPtr                         qLink;                        /*queue link in header*/
  1073.     short                             qType;                        /*type byte for safety check*/
  1074.     short                             ioTrap;                        /*FS: the Trap*/
  1075.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  1076.     IOCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  1077.     volatile OSErr                     ioResult;                    /*result code*/
  1078.     StringPtr                         ioNamePtr;                    /*ptr to Vol:FileName string*/
  1079.     short                             ioVRefNum;                    /*volume refnum (DrvNum for Eject and MountVol)*/
  1080.     long                             ioFiller21;
  1081.     long                             ioFiller22;
  1082.     Ptr                             ioForeignPrivBuffer;
  1083.     long                             ioForeignPrivActCount;
  1084.     long                             ioForeignPrivReqCount;
  1085.     long                             ioFiller23;
  1086.     long                             ioForeignPrivDirID;
  1087.     long                             ioForeignPrivInfo1;
  1088.     long                             ioForeignPrivInfo2;
  1089.     long                             ioForeignPrivInfo3;
  1090.     long                             ioForeignPrivInfo4;
  1091. };
  1092. typedef struct ForeignPrivParam            ForeignPrivParam;
  1093. typedef ForeignPrivParam *                ForeignPrivParamPtr;
  1094.  
  1095. struct CSParam {
  1096.     QElemPtr                         qLink;                        /*queue link in header*/
  1097.     short                             qType;                        /*type byte for safety check*/
  1098.     short                             ioTrap;                        /*FS: the Trap*/
  1099.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  1100.     IOCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  1101.     volatile OSErr                     ioResult;                    /*result code*/
  1102.     StringPtr                         ioNamePtr;                    /*ptr to Vol:FileName string*/
  1103.     short                             ioVRefNum;                    /*volume refnum (DrvNum for Eject and MountVol)*/
  1104.     FSSpecPtr                         ioMatchPtr;                    /* match array */
  1105.     long                             ioReqMatchCount;            /* maximum allowable matches */
  1106.     long                             ioActMatchCount;            /* actual match count */
  1107.     long                             ioSearchBits;                /* search criteria selector */
  1108.     CInfoPBPtr                         ioSearchInfo1;                /* search values and range lower bounds */
  1109.     CInfoPBPtr                         ioSearchInfo2;                /* search values and range upper bounds */
  1110.     long                             ioSearchTime;                /* length of time to run search */
  1111.     CatPositionRec                     ioCatPosition;                /* current position in the catalog */
  1112.     Ptr                             ioOptBuffer;                /* optional performance enhancement buffer */
  1113.     long                             ioOptBufSize;                /* size of buffer pointed to by ioOptBuffer */
  1114. };
  1115. typedef struct CSParam                    CSParam;
  1116. typedef CSParam *                        CSParamPtr;
  1117.  
  1118. union HParamBlockRec {
  1119.     HIOParam                         ioParam;
  1120.     HFileParam                         fileParam;
  1121.     HVolumeParam                     volumeParam;
  1122.     AccessParam                     accessParam;
  1123.     ObjParam                         objParam;
  1124.     CopyParam                         copyParam;
  1125.     WDParam                         wdParam;
  1126.     FIDParam                         fidParam;
  1127.     CSParam                         csParam;
  1128.     ForeignPrivParam                 foreignPrivParam;
  1129. };
  1130. typedef union HParamBlockRec            HParamBlockRec;
  1131.  
  1132.  
  1133.  
  1134. typedef HParamBlockRec *                HParmBlkPtr;
  1135.  
  1136.  
  1137. struct CMovePBRec {
  1138.     QElemPtr                         qLink;
  1139.     short                             qType;
  1140.     short                             ioTrap;
  1141.     Ptr                             ioCmdAddr;
  1142.     IOCompletionUPP                 ioCompletion;
  1143.     volatile OSErr                     ioResult;
  1144.     StringPtr                         ioNamePtr;
  1145.     short                             ioVRefNum;
  1146.     long                             filler1;
  1147.     StringPtr                         ioNewName;
  1148.     long                             filler2;
  1149.     long                             ioNewDirID;
  1150.     long                             filler3[2];
  1151.     long                             ioDirID;
  1152. };
  1153. typedef struct CMovePBRec                CMovePBRec;
  1154.  
  1155. typedef CMovePBRec *                    CMovePBPtr;
  1156.  
  1157. struct WDPBRec {
  1158.     QElemPtr                         qLink;
  1159.     short                             qType;
  1160.     short                             ioTrap;
  1161.     Ptr                             ioCmdAddr;
  1162.     IOCompletionUPP                 ioCompletion;
  1163.     volatile OSErr                     ioResult;
  1164.     StringPtr                         ioNamePtr;
  1165.     short                             ioVRefNum;
  1166.     short                             filler1;
  1167.     short                             ioWDIndex;
  1168.     long                             ioWDProcID;
  1169.     short                             ioWDVRefNum;
  1170.     short                             filler2[7];
  1171.     long                             ioWDDirID;
  1172. };
  1173. typedef struct WDPBRec                    WDPBRec;
  1174.  
  1175. typedef WDPBRec *                        WDPBPtr;
  1176.  
  1177. struct FCBPBRec {
  1178.     QElemPtr                         qLink;
  1179.     short                             qType;
  1180.     short                             ioTrap;
  1181.     Ptr                             ioCmdAddr;
  1182.     IOCompletionUPP                 ioCompletion;
  1183.     volatile OSErr                     ioResult;
  1184.     StringPtr                         ioNamePtr;
  1185.     short                             ioVRefNum;
  1186.     short                             ioRefNum;
  1187.     short                             filler;
  1188.     short                             ioFCBIndx;
  1189.     short                             filler1;
  1190.     long                             ioFCBFlNm;
  1191.     short                             ioFCBFlags;
  1192.     unsigned short                     ioFCBStBlk;
  1193.     long                             ioFCBEOF;
  1194.     long                             ioFCBPLen;
  1195.     long                             ioFCBCrPs;
  1196.     short                             ioFCBVRefNum;
  1197.     long                             ioFCBClpSiz;
  1198.     long                             ioFCBParID;
  1199. };
  1200. typedef struct FCBPBRec                    FCBPBRec;
  1201.  
  1202. typedef FCBPBRec *                        FCBPBPtr;
  1203.  
  1204. struct VCB {
  1205.     QElemPtr                         qLink;
  1206.     short                             qType;
  1207.     short                             vcbFlags;
  1208.     unsigned short                     vcbSigWord;
  1209.     unsigned long                     vcbCrDate;
  1210.     unsigned long                     vcbLsMod;
  1211.     short                             vcbAtrb;
  1212.     unsigned short                     vcbNmFls;
  1213.     short                             vcbVBMSt;
  1214.     short                             vcbAllocPtr;
  1215.     unsigned short                     vcbNmAlBlks;
  1216.     long                             vcbAlBlkSiz;
  1217.     long                             vcbClpSiz;
  1218.     short                             vcbAlBlSt;
  1219.     long                             vcbNxtCNID;
  1220.     unsigned short                     vcbFreeBks;
  1221.     Str27                             vcbVN;
  1222.     short                             vcbDrvNum;
  1223.     short                             vcbDRefNum;
  1224.     short                             vcbFSID;
  1225.     short                             vcbVRefNum;
  1226.     Ptr                             vcbMAdr;
  1227.     Ptr                             vcbBufAdr;
  1228.     short                             vcbMLen;
  1229.     short                             vcbDirIndex;
  1230.     short                             vcbDirBlk;
  1231.     unsigned long                     vcbVolBkUp;
  1232.     unsigned short                     vcbVSeqNum;
  1233.     long                             vcbWrCnt;
  1234.     long                             vcbXTClpSiz;
  1235.     long                             vcbCTClpSiz;
  1236.     unsigned short                     vcbNmRtDirs;
  1237.     long                             vcbFilCnt;
  1238.     long                             vcbDirCnt;
  1239.     long                             vcbFndrInfo[8];
  1240.     unsigned short                     vcbVCSize;
  1241.     unsigned short                     vcbVBMCSiz;
  1242.     unsigned short                     vcbCtlCSiz;
  1243.     unsigned short                     vcbXTAlBlks;
  1244.     unsigned short                     vcbCTAlBlks;
  1245.     short                             vcbXTRef;
  1246.     short                             vcbCTRef;
  1247.     Ptr                             vcbCtlBuf;
  1248.     long                             vcbDirIDM;
  1249.     short                             vcbOffsM;
  1250. };
  1251. typedef struct VCB                        VCB;
  1252. typedef VCB *                            VCBPtr;
  1253.  
  1254. struct DrvQEl {
  1255.     QElemPtr                         qLink;
  1256.     short                             qType;
  1257.     short                             dQDrive;
  1258.     short                             dQRefNum;
  1259.     short                             dQFSID;
  1260.     unsigned short                     dQDrvSz;
  1261.     unsigned short                     dQDrvSz2;
  1262. };
  1263. typedef struct DrvQEl                    DrvQEl;
  1264. typedef DrvQEl *                        DrvQElPtr;
  1265. #if OPAQUE_UPP_TYPES
  1266.     EXTERN_API(IOCompletionUPP)
  1267.     NewIOCompletionUPP               (IOCompletionProcPtr        userRoutine);
  1268.  
  1269.     EXTERN_API(void)
  1270.     DisposeIOCompletionUPP           (IOCompletionUPP            userUPP);
  1271.  
  1272.     EXTERN_API(void)
  1273.     InvokeIOCompletionUPP           (ParmBlkPtr                paramBlock,
  1274.                                     IOCompletionUPP            userUPP);
  1275.  
  1276. #else
  1277.     enum { uppIOCompletionProcInfo = 0x00009802 };                     /* register no_return_value Func(4_bytes:A0) */
  1278.     #define NewIOCompletionUPP(userRoutine)                         (IOCompletionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppIOCompletionProcInfo, GetCurrentArchitecture())
  1279.     #define DisposeIOCompletionUPP(userUPP)                         DisposeRoutineDescriptor(userUPP)
  1280.     #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1281.     #pragma parameter InvokeIOCompletionUPP(__A0, __A1)
  1282.     void InvokeIOCompletionUPP(ParmBlkPtr paramBlock, IOCompletionUPP userUPP) = 0x4E91;
  1283.     #else
  1284.         #define InvokeIOCompletionUPP(paramBlock, userUPP)                 CALL_ONE_PARAMETER_UPP((userUPP), uppIOCompletionProcInfo, (paramBlock))
  1285.     #endif
  1286. #endif
  1287. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  1288. #define NewIOCompletionProc(userRoutine)                         NewIOCompletionUPP(userRoutine)
  1289. #define CallIOCompletionProc(userRoutine, paramBlock)            InvokeIOCompletionUPP(paramBlock, userRoutine)
  1290.  
  1291. /*
  1292.    PBOpenSync(), PBOpenAsync(), PBOpenImmed() were moved to Devices.h
  1293.    PBCloseSync(), PBCloseAsync(), PBCloseImmed() were moved to Devices.h
  1294.    PBReadSync(), PBReadAsync(), PBReadImmed() were moved to Devices.h
  1295.    PBWriteSync(), PBWriteAsync(), PBWriteImmed() were moved to Devices.h
  1296. */
  1297.  
  1298.  
  1299. #if CALL_NOT_IN_CARBON
  1300.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1301.                                                                                             #pragma parameter __D0 PBGetVInfoSync(__A0)
  1302.                                                                                             #endif
  1303. EXTERN_API( OSErr ) PBGetVInfoSync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA007);
  1304.  
  1305. #endif  /* CALL_NOT_IN_CARBON */
  1306.  
  1307. #if CALL_NOT_IN_CARBON
  1308.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1309.                                                                                             #pragma parameter __D0 PBGetVInfoAsync(__A0)
  1310.                                                                                             #endif
  1311. EXTERN_API( OSErr ) PBGetVInfoAsync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA407);
  1312.  
  1313. #endif  /* CALL_NOT_IN_CARBON */
  1314.  
  1315.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1316.                                                                                             #pragma parameter __D0 PBXGetVolInfoSync(__A0)
  1317.                                                                                             #endif
  1318. EXTERN_API( OSErr ) PBXGetVolInfoSync(XVolumeParamPtr paramBlock)                            TWOWORDINLINE(0x7012, 0xA060);
  1319.  
  1320.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1321.                                                                                             #pragma parameter __D0 PBXGetVolInfoAsync(__A0)
  1322.                                                                                             #endif
  1323. EXTERN_API( OSErr ) PBXGetVolInfoAsync(XVolumeParamPtr paramBlock)                            TWOWORDINLINE(0x7012, 0xA460);
  1324.  
  1325. #if CALL_NOT_IN_CARBON
  1326.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1327.                                                                                             #pragma parameter __D0 PBGetVolSync(__A0)
  1328.                                                                                             #endif
  1329. EXTERN_API( OSErr ) PBGetVolSync(ParmBlkPtr paramBlock)                                        ONEWORDINLINE(0xA014);
  1330.  
  1331. #endif  /* CALL_NOT_IN_CARBON */
  1332.  
  1333. #if CALL_NOT_IN_CARBON
  1334.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1335.                                                                                             #pragma parameter __D0 PBGetVolAsync(__A0)
  1336.                                                                                             #endif
  1337. EXTERN_API( OSErr ) PBGetVolAsync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA414);
  1338.  
  1339. #endif  /* CALL_NOT_IN_CARBON */
  1340.  
  1341. #if CALL_NOT_IN_CARBON
  1342.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1343.                                                                                             #pragma parameter __D0 PBSetVolSync(__A0)
  1344.                                                                                             #endif
  1345. EXTERN_API( OSErr ) PBSetVolSync(ParmBlkPtr paramBlock)                                        ONEWORDINLINE(0xA015);
  1346.  
  1347. #endif  /* CALL_NOT_IN_CARBON */
  1348.  
  1349. #if CALL_NOT_IN_CARBON
  1350.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1351.                                                                                             #pragma parameter __D0 PBSetVolAsync(__A0)
  1352.                                                                                             #endif
  1353. EXTERN_API( OSErr ) PBSetVolAsync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA415);
  1354.  
  1355. #endif  /* CALL_NOT_IN_CARBON */
  1356.  
  1357.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1358.                                                                                             #pragma parameter __D0 PBFlushVolSync(__A0)
  1359.                                                                                             #endif
  1360. EXTERN_API( OSErr ) PBFlushVolSync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA013);
  1361.  
  1362.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1363.                                                                                             #pragma parameter __D0 PBFlushVolAsync(__A0)
  1364.                                                                                             #endif
  1365. EXTERN_API( OSErr ) PBFlushVolAsync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA413);
  1366.  
  1367. #if CALL_NOT_IN_CARBON
  1368.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1369.                                                                                             #pragma parameter __D0 PBHTrashVolumeCachesSync(__A0)
  1370.                                                                                             #endif
  1371. EXTERN_API( OSErr ) PBHTrashVolumeCachesSync(ParmBlkPtr paramBlock)                            ONEWORDINLINE(0xA213);
  1372.  
  1373. #endif  /* CALL_NOT_IN_CARBON */
  1374.  
  1375. #if CALL_NOT_IN_CARBON
  1376.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1377.                                                                                             #pragma parameter __D0 PBCreateSync(__A0)
  1378.                                                                                             #endif
  1379. EXTERN_API( OSErr ) PBCreateSync(ParmBlkPtr paramBlock)                                        ONEWORDINLINE(0xA008);
  1380.  
  1381. #endif  /* CALL_NOT_IN_CARBON */
  1382.  
  1383. #if CALL_NOT_IN_CARBON
  1384.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1385.                                                                                             #pragma parameter __D0 PBCreateAsync(__A0)
  1386.                                                                                             #endif
  1387. EXTERN_API( OSErr ) PBCreateAsync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA408);
  1388.  
  1389. #endif  /* CALL_NOT_IN_CARBON */
  1390.  
  1391. #if CALL_NOT_IN_CARBON
  1392.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1393.                                                                                             #pragma parameter __D0 PBDeleteSync(__A0)
  1394.                                                                                             #endif
  1395. EXTERN_API( OSErr ) PBDeleteSync(ParmBlkPtr paramBlock)                                        ONEWORDINLINE(0xA009);
  1396.  
  1397. #endif  /* CALL_NOT_IN_CARBON */
  1398.  
  1399. #if CALL_NOT_IN_CARBON
  1400.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1401.                                                                                             #pragma parameter __D0 PBDeleteAsync(__A0)
  1402.                                                                                             #endif
  1403. EXTERN_API( OSErr ) PBDeleteAsync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA409);
  1404.  
  1405. #endif  /* CALL_NOT_IN_CARBON */
  1406.  
  1407. #if CALL_NOT_IN_CARBON
  1408.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1409.                                                                                             #pragma parameter __D0 PBOpenDFSync(__A0)
  1410.                                                                                             #endif
  1411. EXTERN_API( OSErr ) PBOpenDFSync(ParmBlkPtr paramBlock)                                        TWOWORDINLINE(0x701A, 0xA060);
  1412.  
  1413. #endif  /* CALL_NOT_IN_CARBON */
  1414.  
  1415. #if CALL_NOT_IN_CARBON
  1416.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1417.                                                                                             #pragma parameter __D0 PBOpenDFAsync(__A0)
  1418.                                                                                             #endif
  1419. EXTERN_API( OSErr ) PBOpenDFAsync(ParmBlkPtr paramBlock)                                    TWOWORDINLINE(0x701A, 0xA460);
  1420.  
  1421. #endif  /* CALL_NOT_IN_CARBON */
  1422.  
  1423. #if CALL_NOT_IN_CARBON
  1424.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1425.                                                                                             #pragma parameter __D0 PBOpenRFSync(__A0)
  1426.                                                                                             #endif
  1427. EXTERN_API( OSErr ) PBOpenRFSync(ParmBlkPtr paramBlock)                                        ONEWORDINLINE(0xA00A);
  1428.  
  1429. #endif  /* CALL_NOT_IN_CARBON */
  1430.  
  1431. #if CALL_NOT_IN_CARBON
  1432.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1433.                                                                                             #pragma parameter __D0 PBOpenRFAsync(__A0)
  1434.                                                                                             #endif
  1435. EXTERN_API( OSErr ) PBOpenRFAsync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA40A);
  1436.  
  1437. #endif  /* CALL_NOT_IN_CARBON */
  1438.  
  1439. #if CALL_NOT_IN_CARBON
  1440.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1441.                                                                                             #pragma parameter __D0 PBRenameSync(__A0)
  1442.                                                                                             #endif
  1443. EXTERN_API( OSErr ) PBRenameSync(ParmBlkPtr paramBlock)                                        ONEWORDINLINE(0xA00B);
  1444.  
  1445. #endif  /* CALL_NOT_IN_CARBON */
  1446.  
  1447. #if CALL_NOT_IN_CARBON
  1448.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1449.                                                                                             #pragma parameter __D0 PBRenameAsync(__A0)
  1450.                                                                                             #endif
  1451. EXTERN_API( OSErr ) PBRenameAsync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA40B);
  1452.  
  1453. #endif  /* CALL_NOT_IN_CARBON */
  1454.  
  1455. #if CALL_NOT_IN_CARBON
  1456.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1457.                                                                                             #pragma parameter __D0 PBGetFInfoSync(__A0)
  1458.                                                                                             #endif
  1459. EXTERN_API( OSErr ) PBGetFInfoSync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA00C);
  1460.  
  1461. #endif  /* CALL_NOT_IN_CARBON */
  1462.  
  1463. #if CALL_NOT_IN_CARBON
  1464.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1465.                                                                                             #pragma parameter __D0 PBGetFInfoAsync(__A0)
  1466.                                                                                             #endif
  1467. EXTERN_API( OSErr ) PBGetFInfoAsync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA40C);
  1468.  
  1469. #endif  /* CALL_NOT_IN_CARBON */
  1470.  
  1471. #if CALL_NOT_IN_CARBON
  1472.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1473.                                                                                             #pragma parameter __D0 PBSetFInfoSync(__A0)
  1474.                                                                                             #endif
  1475. EXTERN_API( OSErr ) PBSetFInfoSync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA00D);
  1476.  
  1477. #endif  /* CALL_NOT_IN_CARBON */
  1478.  
  1479. #if CALL_NOT_IN_CARBON
  1480.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1481.                                                                                             #pragma parameter __D0 PBSetFInfoAsync(__A0)
  1482.                                                                                             #endif
  1483. EXTERN_API( OSErr ) PBSetFInfoAsync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA40D);
  1484.  
  1485. #endif  /* CALL_NOT_IN_CARBON */
  1486.  
  1487. #if CALL_NOT_IN_CARBON
  1488.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1489.                                                                                             #pragma parameter __D0 PBSetFLockSync(__A0)
  1490.                                                                                             #endif
  1491. EXTERN_API( OSErr ) PBSetFLockSync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA041);
  1492.  
  1493. #endif  /* CALL_NOT_IN_CARBON */
  1494.  
  1495. #if CALL_NOT_IN_CARBON
  1496.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1497.                                                                                             #pragma parameter __D0 PBSetFLockAsync(__A0)
  1498.                                                                                             #endif
  1499. EXTERN_API( OSErr ) PBSetFLockAsync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA441);
  1500.  
  1501. #endif  /* CALL_NOT_IN_CARBON */
  1502.  
  1503. #if CALL_NOT_IN_CARBON
  1504.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1505.                                                                                             #pragma parameter __D0 PBRstFLockSync(__A0)
  1506.                                                                                             #endif
  1507. EXTERN_API( OSErr ) PBRstFLockSync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA042);
  1508.  
  1509. #endif  /* CALL_NOT_IN_CARBON */
  1510.  
  1511. #if CALL_NOT_IN_CARBON
  1512.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1513.                                                                                             #pragma parameter __D0 PBRstFLockAsync(__A0)
  1514.                                                                                             #endif
  1515. EXTERN_API( OSErr ) PBRstFLockAsync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA442);
  1516.  
  1517. #endif  /* CALL_NOT_IN_CARBON */
  1518.  
  1519. #if CALL_NOT_IN_CARBON
  1520.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1521.                                                                                             #pragma parameter __D0 PBSetFVersSync(__A0)
  1522.                                                                                             #endif
  1523. EXTERN_API( OSErr ) PBSetFVersSync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA043);
  1524.  
  1525. #endif  /* CALL_NOT_IN_CARBON */
  1526.  
  1527. #if CALL_NOT_IN_CARBON
  1528.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1529.                                                                                             #pragma parameter __D0 PBSetFVersAsync(__A0)
  1530.                                                                                             #endif
  1531. EXTERN_API( OSErr ) PBSetFVersAsync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA443);
  1532.  
  1533. #endif  /* CALL_NOT_IN_CARBON */
  1534.  
  1535.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1536.                                                                                             #pragma parameter __D0 PBAllocateSync(__A0)
  1537.                                                                                             #endif
  1538. EXTERN_API( OSErr ) PBAllocateSync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA010);
  1539.  
  1540.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1541.                                                                                             #pragma parameter __D0 PBAllocateAsync(__A0)
  1542.                                                                                             #endif
  1543. EXTERN_API( OSErr ) PBAllocateAsync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA410);
  1544.  
  1545.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1546.                                                                                             #pragma parameter __D0 PBGetEOFSync(__A0)
  1547.                                                                                             #endif
  1548. EXTERN_API( OSErr ) PBGetEOFSync(ParmBlkPtr paramBlock)                                        ONEWORDINLINE(0xA011);
  1549.  
  1550.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1551.                                                                                             #pragma parameter __D0 PBGetEOFAsync(__A0)
  1552.                                                                                             #endif
  1553. EXTERN_API( OSErr ) PBGetEOFAsync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA411);
  1554.  
  1555.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1556.                                                                                             #pragma parameter __D0 PBSetEOFSync(__A0)
  1557.                                                                                             #endif
  1558. EXTERN_API( OSErr ) PBSetEOFSync(ParmBlkPtr paramBlock)                                        ONEWORDINLINE(0xA012);
  1559.  
  1560.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1561.                                                                                             #pragma parameter __D0 PBSetEOFAsync(__A0)
  1562.                                                                                             #endif
  1563. EXTERN_API( OSErr ) PBSetEOFAsync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA412);
  1564.  
  1565.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1566.                                                                                             #pragma parameter __D0 PBGetFPosSync(__A0)
  1567.                                                                                             #endif
  1568. EXTERN_API( OSErr ) PBGetFPosSync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA018);
  1569.  
  1570.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1571.                                                                                             #pragma parameter __D0 PBGetFPosAsync(__A0)
  1572.                                                                                             #endif
  1573. EXTERN_API( OSErr ) PBGetFPosAsync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA418);
  1574.  
  1575.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1576.                                                                                             #pragma parameter __D0 PBSetFPosSync(__A0)
  1577.                                                                                             #endif
  1578. EXTERN_API( OSErr ) PBSetFPosSync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA044);
  1579.  
  1580.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1581.                                                                                             #pragma parameter __D0 PBSetFPosAsync(__A0)
  1582.                                                                                             #endif
  1583. EXTERN_API( OSErr ) PBSetFPosAsync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA444);
  1584.  
  1585.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1586.                                                                                             #pragma parameter __D0 PBFlushFileSync(__A0)
  1587.                                                                                             #endif
  1588. EXTERN_API( OSErr ) PBFlushFileSync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA045);
  1589.  
  1590.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1591.                                                                                             #pragma parameter __D0 PBFlushFileAsync(__A0)
  1592.                                                                                             #endif
  1593. EXTERN_API( OSErr ) PBFlushFileAsync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA445);
  1594.  
  1595.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1596.                                                                                             #pragma parameter __D0 PBMountVol(__A0)
  1597.                                                                                             #endif
  1598. EXTERN_API( OSErr ) PBMountVol(ParmBlkPtr paramBlock)                                        ONEWORDINLINE(0xA00F);
  1599.  
  1600.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1601.                                                                                             #pragma parameter __D0 PBUnmountVol(__A0)
  1602.                                                                                             #endif
  1603. EXTERN_API( OSErr ) PBUnmountVol(ParmBlkPtr paramBlock)                                        ONEWORDINLINE(0xA00E);
  1604.  
  1605.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1606.                                                                                             #pragma parameter __D0 PBUnmountVolImmed(__A0)
  1607.                                                                                             #endif
  1608. EXTERN_API( OSErr ) PBUnmountVolImmed(ParmBlkPtr paramBlock)                                ONEWORDINLINE(0xA20E);
  1609.  
  1610.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1611.                                                                                             #pragma parameter __D0 PBEject(__A0)
  1612.                                                                                             #endif
  1613. EXTERN_API( OSErr ) PBEject(ParmBlkPtr paramBlock)                                            ONEWORDINLINE(0xA017);
  1614.  
  1615.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1616.                                                                                             #pragma parameter __D0 PBOffLine(__A0)
  1617.                                                                                             #endif
  1618. EXTERN_API( OSErr ) PBOffLine(ParmBlkPtr paramBlock)                                        ONEWORDINLINE(0xA035);
  1619.  
  1620.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1621.                                                                                             #pragma parameter __D0 PBCatSearchSync(__A0)
  1622.                                                                                             #endif
  1623. EXTERN_API( OSErr ) PBCatSearchSync(CSParamPtr paramBlock)                                    TWOWORDINLINE(0x7018, 0xA260);
  1624.  
  1625.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1626.                                                                                             #pragma parameter __D0 PBCatSearchAsync(__A0)
  1627.                                                                                             #endif
  1628. EXTERN_API( OSErr ) PBCatSearchAsync(CSParamPtr paramBlock)                                    TWOWORDINLINE(0x7018, 0xA660);
  1629.  
  1630. #if CALL_NOT_IN_CARBON
  1631. EXTERN_API( OSErr )
  1632. SetVol                            (ConstStr63Param         volName, /* can be NULL */
  1633.                                  short                     vRefNum);
  1634.  
  1635. #endif  /* CALL_NOT_IN_CARBON */
  1636.  
  1637. EXTERN_API( OSErr )
  1638. UnmountVol                        (ConstStr63Param         volName, /* can be NULL */
  1639.                                  short                     vRefNum);
  1640.  
  1641. EXTERN_API( OSErr )
  1642. Eject                            (ConstStr63Param         volName, /* can be NULL */
  1643.                                  short                     vRefNum);
  1644.  
  1645. EXTERN_API( OSErr )
  1646. FlushVol                        (ConstStr63Param         volName, /* can be NULL */
  1647.                                  short                     vRefNum);
  1648.  
  1649. EXTERN_API( OSErr )
  1650. HSetVol                            (ConstStr63Param         volName, /* can be NULL */
  1651.                                  short                     vRefNum,
  1652.                                  long                     dirID);
  1653.  
  1654. /* AddDrive() was moved to Devices.h*/
  1655.  
  1656. #if CALL_NOT_IN_CARBON
  1657. EXTERN_API( OSErr )
  1658. FSOpen                            (ConstStr255Param         fileName,
  1659.                                  short                     vRefNum,
  1660.                                  short *                refNum);
  1661.  
  1662. #endif  /* CALL_NOT_IN_CARBON */
  1663.  
  1664. #if CALL_NOT_IN_CARBON
  1665. EXTERN_API( OSErr )
  1666. OpenDF                            (ConstStr255Param         fileName,
  1667.                                  short                     vRefNum,
  1668.                                  short *                refNum);
  1669.  
  1670. #endif  /* CALL_NOT_IN_CARBON */
  1671.  
  1672. EXTERN_API( OSErr )
  1673. FSClose                            (short                     refNum);
  1674.  
  1675. EXTERN_API( OSErr )
  1676. FSRead                            (short                     refNum,
  1677.                                  long *                    count,
  1678.                                  void *                    buffPtr);
  1679.  
  1680. EXTERN_API( OSErr )
  1681. FSWrite                            (short                     refNum,
  1682.                                  long *                    count,
  1683.                                  const void *            buffPtr);
  1684.  
  1685. #if CALL_NOT_IN_CARBON
  1686. EXTERN_API( OSErr )
  1687. GetVInfo                        (short                     drvNum,
  1688.                                  StringPtr                 volName,
  1689.                                  short *                vRefNum,
  1690.                                  long *                    freeBytes);
  1691.  
  1692. #endif  /* CALL_NOT_IN_CARBON */
  1693.  
  1694. #if CALL_NOT_IN_CARBON
  1695. EXTERN_API( OSErr )
  1696. GetFInfo                        (ConstStr255Param         fileName,
  1697.                                  short                     vRefNum,
  1698.                                  FInfo *                fndrInfo);
  1699.  
  1700. #endif  /* CALL_NOT_IN_CARBON */
  1701.  
  1702. #if CALL_NOT_IN_CARBON
  1703. EXTERN_API( OSErr )
  1704. GetVol                            (StringPtr                 volName,
  1705.                                  short *                vRefNum);
  1706.  
  1707. #endif  /* CALL_NOT_IN_CARBON */
  1708.  
  1709. #if CALL_NOT_IN_CARBON
  1710. EXTERN_API( OSErr )
  1711. Create                            (ConstStr255Param         fileName,
  1712.                                  short                     vRefNum,
  1713.                                  OSType                 creator,
  1714.                                  OSType                 fileType);
  1715.  
  1716. #endif  /* CALL_NOT_IN_CARBON */
  1717.  
  1718. #if CALL_NOT_IN_CARBON
  1719. EXTERN_API( OSErr )
  1720. FSDelete                        (ConstStr255Param         fileName,
  1721.                                  short                     vRefNum);
  1722.  
  1723. #endif  /* CALL_NOT_IN_CARBON */
  1724.  
  1725. #if CALL_NOT_IN_CARBON
  1726. EXTERN_API( OSErr )
  1727. OpenRF                            (ConstStr255Param         fileName,
  1728.                                  short                     vRefNum,
  1729.                                  short *                refNum);
  1730.  
  1731. #endif  /* CALL_NOT_IN_CARBON */
  1732.  
  1733. #if CALL_NOT_IN_CARBON
  1734. EXTERN_API( OSErr )
  1735. Rename                            (ConstStr255Param         oldName,
  1736.                                  short                     vRefNum,
  1737.                                  ConstStr255Param         newName);
  1738.  
  1739. #endif  /* CALL_NOT_IN_CARBON */
  1740.  
  1741. #if CALL_NOT_IN_CARBON
  1742. EXTERN_API( OSErr )
  1743. SetFInfo                        (ConstStr255Param         fileName,
  1744.                                  short                     vRefNum,
  1745.                                  const FInfo *            fndrInfo);
  1746.  
  1747. #endif  /* CALL_NOT_IN_CARBON */
  1748.  
  1749. #if CALL_NOT_IN_CARBON
  1750. EXTERN_API( OSErr )
  1751. SetFLock                        (ConstStr255Param         fileName,
  1752.                                  short                     vRefNum);
  1753.  
  1754. #endif  /* CALL_NOT_IN_CARBON */
  1755.  
  1756. #if CALL_NOT_IN_CARBON
  1757. EXTERN_API( OSErr )
  1758. RstFLock                        (ConstStr255Param         fileName,
  1759.                                  short                     vRefNum);
  1760.  
  1761. #endif  /* CALL_NOT_IN_CARBON */
  1762.  
  1763. EXTERN_API( OSErr )
  1764. Allocate                        (short                     refNum,
  1765.                                  long *                    count);
  1766.  
  1767. EXTERN_API( OSErr )
  1768. GetEOF                            (short                     refNum,
  1769.                                  long *                    logEOF);
  1770.  
  1771. EXTERN_API( OSErr )
  1772. SetEOF                            (short                     refNum,
  1773.                                  long                     logEOF);
  1774.  
  1775. EXTERN_API( OSErr )
  1776. GetFPos                            (short                     refNum,
  1777.                                  long *                    filePos);
  1778.  
  1779. EXTERN_API( OSErr )
  1780. SetFPos                            (short                     refNum,
  1781.                                  short                     posMode,
  1782.                                  long                     posOff);
  1783.  
  1784. EXTERN_API( OSErr )
  1785. GetVRefNum                        (short                     fileRefNum,
  1786.                                  short *                vRefNum);
  1787.  
  1788. #if CALL_NOT_IN_CARBON
  1789. EXTERN_API_C( OSErr )
  1790. fsopen                            (const char *            fileName,
  1791.                                  short                     vRefNum,
  1792.                                  short *                refNum);
  1793.  
  1794. #endif  /* CALL_NOT_IN_CARBON */
  1795.  
  1796. #if CALL_NOT_IN_CARBON
  1797. EXTERN_API_C( OSErr )
  1798. getvinfo                        (short                     drvNum,
  1799.                                  char *                    volName,
  1800.                                  short *                vRefNum,
  1801.                                  long *                    freeBytes);
  1802.  
  1803. #endif  /* CALL_NOT_IN_CARBON */
  1804.  
  1805. #if CALL_NOT_IN_CARBON
  1806. EXTERN_API_C( OSErr )
  1807. getfinfo                        (const char *            fileName,
  1808.                                  short                     vRefNum,
  1809.                                  FInfo *                fndrInfo);
  1810.  
  1811. #endif  /* CALL_NOT_IN_CARBON */
  1812.  
  1813. #if CALL_NOT_IN_CARBON
  1814. EXTERN_API_C( OSErr )
  1815. getvol                            (char *                    volName,
  1816.                                  short *                vRefNum);
  1817.  
  1818. #endif  /* CALL_NOT_IN_CARBON */
  1819.  
  1820. #if CALL_NOT_IN_CARBON
  1821. EXTERN_API_C( OSErr )
  1822. setvol                            (const char *            volName,
  1823.                                  short                     vRefNum);
  1824.  
  1825. #endif  /* CALL_NOT_IN_CARBON */
  1826.  
  1827. #if CALL_NOT_IN_CARBON
  1828. EXTERN_API_C( OSErr )
  1829. unmountvol                        (const char *            volName,
  1830.                                  short                     vRefNum);
  1831.  
  1832. #endif  /* CALL_NOT_IN_CARBON */
  1833.  
  1834. #if CALL_NOT_IN_CARBON
  1835. EXTERN_API_C( OSErr )
  1836. eject                            (const char *            volName,
  1837.                                  short                     vRefNum);
  1838.  
  1839. #endif  /* CALL_NOT_IN_CARBON */
  1840.  
  1841. #if CALL_NOT_IN_CARBON
  1842. EXTERN_API_C( OSErr )
  1843. flushvol                        (const char *            volName,
  1844.                                  short                     vRefNum);
  1845.  
  1846. #endif  /* CALL_NOT_IN_CARBON */
  1847.  
  1848. #if CALL_NOT_IN_CARBON
  1849. EXTERN_API_C( OSErr )
  1850. create                            (const char *            fileName,
  1851.                                  short                     vRefNum,
  1852.                                  OSType                 creator,
  1853.                                  OSType                 fileType);
  1854.  
  1855. #endif  /* CALL_NOT_IN_CARBON */
  1856.  
  1857. #if CALL_NOT_IN_CARBON
  1858. EXTERN_API_C( OSErr )
  1859. fsdelete                        (const char *            fileName,
  1860.                                  short                     vRefNum);
  1861.  
  1862. #endif  /* CALL_NOT_IN_CARBON */
  1863.  
  1864. #if CALL_NOT_IN_CARBON
  1865. EXTERN_API_C( OSErr )
  1866. openrf                            (const char *            fileName,
  1867.                                  short                     vRefNum,
  1868.                                  short *                refNum);
  1869.  
  1870. #endif  /* CALL_NOT_IN_CARBON */
  1871.  
  1872. #if CALL_NOT_IN_CARBON
  1873. EXTERN_API_C( OSErr )
  1874. fsrename                        (const char *            oldName,
  1875.                                  short                     vRefNum,
  1876.                                  const char *            newName);
  1877.  
  1878. #endif  /* CALL_NOT_IN_CARBON */
  1879.  
  1880. #if CALL_NOT_IN_CARBON
  1881. EXTERN_API_C( OSErr )
  1882. setfinfo                        (const char *            fileName,
  1883.                                  short                     vRefNum,
  1884.                                  const FInfo *            fndrInfo);
  1885.  
  1886. #endif  /* CALL_NOT_IN_CARBON */
  1887.  
  1888. #if CALL_NOT_IN_CARBON
  1889. EXTERN_API_C( OSErr )
  1890. setflock                        (const char *            fileName,
  1891.                                  short                     vRefNum);
  1892.  
  1893. #endif  /* CALL_NOT_IN_CARBON */
  1894.  
  1895. #if CALL_NOT_IN_CARBON
  1896. EXTERN_API_C( OSErr )
  1897. rstflock                        (const char *            fileName,
  1898.                                  short                     vRefNum);
  1899.  
  1900. #endif  /* CALL_NOT_IN_CARBON */
  1901.  
  1902. #if CALL_NOT_IN_CARBON
  1903.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1904.                                                                                             #pragma parameter __D0 PBOpenWDSync(__A0)
  1905.                                                                                             #endif
  1906. EXTERN_API( OSErr ) PBOpenWDSync(WDPBPtr paramBlock)                                        TWOWORDINLINE(0x7001, 0xA260);
  1907.  
  1908. #endif  /* CALL_NOT_IN_CARBON */
  1909.  
  1910. #if CALL_NOT_IN_CARBON
  1911.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1912.                                                                                             #pragma parameter __D0 PBOpenWDAsync(__A0)
  1913.                                                                                             #endif
  1914. EXTERN_API( OSErr ) PBOpenWDAsync(WDPBPtr paramBlock)                                        TWOWORDINLINE(0x7001, 0xA660);
  1915.  
  1916. #endif  /* CALL_NOT_IN_CARBON */
  1917.  
  1918. #if CALL_NOT_IN_CARBON
  1919.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1920.                                                                                             #pragma parameter __D0 PBCloseWDSync(__A0)
  1921.                                                                                             #endif
  1922. EXTERN_API( OSErr ) PBCloseWDSync(WDPBPtr paramBlock)                                        TWOWORDINLINE(0x7002, 0xA260);
  1923.  
  1924. #endif  /* CALL_NOT_IN_CARBON */
  1925.  
  1926. #if CALL_NOT_IN_CARBON
  1927.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1928.                                                                                             #pragma parameter __D0 PBCloseWDAsync(__A0)
  1929.                                                                                             #endif
  1930. EXTERN_API( OSErr ) PBCloseWDAsync(WDPBPtr paramBlock)                                        TWOWORDINLINE(0x7002, 0xA660);
  1931.  
  1932. #endif  /* CALL_NOT_IN_CARBON */
  1933.  
  1934.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1935.                                                                                             #pragma parameter __D0 PBHSetVolSync(__A0)
  1936.                                                                                             #endif
  1937. EXTERN_API( OSErr ) PBHSetVolSync(WDPBPtr paramBlock)                                        ONEWORDINLINE(0xA215);
  1938.  
  1939.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1940.                                                                                             #pragma parameter __D0 PBHSetVolAsync(__A0)
  1941.                                                                                             #endif
  1942. EXTERN_API( OSErr ) PBHSetVolAsync(WDPBPtr paramBlock)                                        ONEWORDINLINE(0xA615);
  1943.  
  1944.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1945.                                                                                             #pragma parameter __D0 PBHGetVolSync(__A0)
  1946.                                                                                             #endif
  1947. EXTERN_API( OSErr ) PBHGetVolSync(WDPBPtr paramBlock)                                        ONEWORDINLINE(0xA214);
  1948.  
  1949.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1950.                                                                                             #pragma parameter __D0 PBHGetVolAsync(__A0)
  1951.                                                                                             #endif
  1952. EXTERN_API( OSErr ) PBHGetVolAsync(WDPBPtr paramBlock)                                        ONEWORDINLINE(0xA614);
  1953.  
  1954.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1955.                                                                                             #pragma parameter __D0 PBCatMoveSync(__A0)
  1956.                                                                                             #endif
  1957. EXTERN_API( OSErr ) PBCatMoveSync(CMovePBPtr paramBlock)                                    TWOWORDINLINE(0x7005, 0xA260);
  1958.  
  1959.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1960.                                                                                             #pragma parameter __D0 PBCatMoveAsync(__A0)
  1961.                                                                                             #endif
  1962. EXTERN_API( OSErr ) PBCatMoveAsync(CMovePBPtr paramBlock)                                    TWOWORDINLINE(0x7005, 0xA660);
  1963.  
  1964.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1965.                                                                                             #pragma parameter __D0 PBDirCreateSync(__A0)
  1966.                                                                                             #endif
  1967. EXTERN_API( OSErr ) PBDirCreateSync(HParmBlkPtr paramBlock)                                    TWOWORDINLINE(0x7006, 0xA260);
  1968.  
  1969.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1970.                                                                                             #pragma parameter __D0 PBDirCreateAsync(__A0)
  1971.                                                                                             #endif
  1972. EXTERN_API( OSErr ) PBDirCreateAsync(HParmBlkPtr paramBlock)                                TWOWORDINLINE(0x7006, 0xA660);
  1973.  
  1974. #if CALL_NOT_IN_CARBON
  1975.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1976.                                                                                             #pragma parameter __D0 PBGetWDInfoSync(__A0)
  1977.                                                                                             #endif
  1978. EXTERN_API( OSErr ) PBGetWDInfoSync(WDPBPtr paramBlock)                                        TWOWORDINLINE(0x7007, 0xA260);
  1979.  
  1980. #endif  /* CALL_NOT_IN_CARBON */
  1981.  
  1982. #if CALL_NOT_IN_CARBON
  1983.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1984.                                                                                             #pragma parameter __D0 PBGetWDInfoAsync(__A0)
  1985.                                                                                             #endif
  1986. EXTERN_API( OSErr ) PBGetWDInfoAsync(WDPBPtr paramBlock)                                    TWOWORDINLINE(0x7007, 0xA660);
  1987.  
  1988. #endif  /* CALL_NOT_IN_CARBON */
  1989.  
  1990.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1991.                                                                                             #pragma parameter __D0 PBGetFCBInfoSync(__A0)
  1992.                                                                                             #endif
  1993. EXTERN_API( OSErr ) PBGetFCBInfoSync(FCBPBPtr paramBlock)                                    TWOWORDINLINE(0x7008, 0xA260);
  1994.  
  1995.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1996.                                                                                             #pragma parameter __D0 PBGetFCBInfoAsync(__A0)
  1997.                                                                                             #endif
  1998. EXTERN_API( OSErr ) PBGetFCBInfoAsync(FCBPBPtr paramBlock)                                    TWOWORDINLINE(0x7008, 0xA660);
  1999.  
  2000.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2001.                                                                                             #pragma parameter __D0 PBGetCatInfoSync(__A0)
  2002.                                                                                             #endif
  2003. EXTERN_API( OSErr ) PBGetCatInfoSync(CInfoPBPtr paramBlock)                                    TWOWORDINLINE(0x7009, 0xA260);
  2004.  
  2005.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2006.                                                                                             #pragma parameter __D0 PBGetCatInfoAsync(__A0)
  2007.                                                                                             #endif
  2008. EXTERN_API( OSErr ) PBGetCatInfoAsync(CInfoPBPtr paramBlock)                                TWOWORDINLINE(0x7009, 0xA660);
  2009.  
  2010.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2011.                                                                                             #pragma parameter __D0 PBSetCatInfoSync(__A0)
  2012.                                                                                             #endif
  2013. EXTERN_API( OSErr ) PBSetCatInfoSync(CInfoPBPtr paramBlock)                                    TWOWORDINLINE(0x700A, 0xA260);
  2014.  
  2015.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2016.                                                                                             #pragma parameter __D0 PBSetCatInfoAsync(__A0)
  2017.                                                                                             #endif
  2018. EXTERN_API( OSErr ) PBSetCatInfoAsync(CInfoPBPtr paramBlock)                                TWOWORDINLINE(0x700A, 0xA660);
  2019.  
  2020.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2021.                                                                                             #pragma parameter __D0 PBAllocContigSync(__A0)
  2022.                                                                                             #endif
  2023. EXTERN_API( OSErr ) PBAllocContigSync(ParmBlkPtr paramBlock)                                ONEWORDINLINE(0xA210);
  2024.  
  2025.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2026.                                                                                             #pragma parameter __D0 PBAllocContigAsync(__A0)
  2027.                                                                                             #endif
  2028. EXTERN_API( OSErr ) PBAllocContigAsync(ParmBlkPtr paramBlock)                                ONEWORDINLINE(0xA610);
  2029.  
  2030.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2031.                                                                                             #pragma parameter __D0 PBLockRangeSync(__A0)
  2032.                                                                                             #endif
  2033. EXTERN_API( OSErr ) PBLockRangeSync(ParmBlkPtr paramBlock)                                    TWOWORDINLINE(0x7010, 0xA260);
  2034.  
  2035.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2036.                                                                                             #pragma parameter __D0 PBLockRangeAsync(__A0)
  2037.                                                                                             #endif
  2038. EXTERN_API( OSErr ) PBLockRangeAsync(ParmBlkPtr paramBlock)                                    TWOWORDINLINE(0x7010, 0xA660);
  2039.  
  2040.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2041.                                                                                             #pragma parameter __D0 PBUnlockRangeSync(__A0)
  2042.                                                                                             #endif
  2043. EXTERN_API( OSErr ) PBUnlockRangeSync(ParmBlkPtr paramBlock)                                TWOWORDINLINE(0x7011, 0xA260);
  2044.  
  2045.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2046.                                                                                             #pragma parameter __D0 PBUnlockRangeAsync(__A0)
  2047.                                                                                             #endif
  2048. EXTERN_API( OSErr ) PBUnlockRangeAsync(ParmBlkPtr paramBlock)                                TWOWORDINLINE(0x7011, 0xA660);
  2049.  
  2050.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2051.                                                                                             #pragma parameter __D0 PBSetVInfoSync(__A0)
  2052.                                                                                             #endif
  2053. EXTERN_API( OSErr ) PBSetVInfoSync(HParmBlkPtr paramBlock)                                    TWOWORDINLINE(0x700B, 0xA260);
  2054.  
  2055.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2056.                                                                                             #pragma parameter __D0 PBSetVInfoAsync(__A0)
  2057.                                                                                             #endif
  2058. EXTERN_API( OSErr ) PBSetVInfoAsync(HParmBlkPtr paramBlock)                                    TWOWORDINLINE(0x700B, 0xA660);
  2059.  
  2060.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2061.                                                                                             #pragma parameter __D0 PBHGetVInfoSync(__A0)
  2062.                                                                                             #endif
  2063. EXTERN_API( OSErr ) PBHGetVInfoSync(HParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA207);
  2064.  
  2065.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2066.                                                                                             #pragma parameter __D0 PBHGetVInfoAsync(__A0)
  2067.                                                                                             #endif
  2068. EXTERN_API( OSErr ) PBHGetVInfoAsync(HParmBlkPtr paramBlock)                                ONEWORDINLINE(0xA607);
  2069.  
  2070.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2071.                                                                                             #pragma parameter __D0 PBHOpenSync(__A0)
  2072.                                                                                             #endif
  2073. EXTERN_API( OSErr ) PBHOpenSync(HParmBlkPtr paramBlock)                                        ONEWORDINLINE(0xA200);
  2074.  
  2075.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2076.                                                                                             #pragma parameter __D0 PBHOpenAsync(__A0)
  2077.                                                                                             #endif
  2078. EXTERN_API( OSErr ) PBHOpenAsync(HParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA600);
  2079.  
  2080.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2081.                                                                                             #pragma parameter __D0 PBHOpenRFSync(__A0)
  2082.                                                                                             #endif
  2083. EXTERN_API( OSErr ) PBHOpenRFSync(HParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA20A);
  2084.  
  2085.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2086.                                                                                             #pragma parameter __D0 PBHOpenRFAsync(__A0)
  2087.                                                                                             #endif
  2088. EXTERN_API( OSErr ) PBHOpenRFAsync(HParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA60A);
  2089.  
  2090.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2091.                                                                                             #pragma parameter __D0 PBHOpenDFSync(__A0)
  2092.                                                                                             #endif
  2093. EXTERN_API( OSErr ) PBHOpenDFSync(HParmBlkPtr paramBlock)                                    TWOWORDINLINE(0x701A, 0xA260);
  2094.  
  2095.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2096.                                                                                             #pragma parameter __D0 PBHOpenDFAsync(__A0)
  2097.                                                                                             #endif
  2098. EXTERN_API( OSErr ) PBHOpenDFAsync(HParmBlkPtr paramBlock)                                    TWOWORDINLINE(0x701A, 0xA660);
  2099.  
  2100.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2101.                                                                                             #pragma parameter __D0 PBHCreateSync(__A0)
  2102.                                                                                             #endif
  2103. EXTERN_API( OSErr ) PBHCreateSync(HParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA208);
  2104.  
  2105.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2106.                                                                                             #pragma parameter __D0 PBHCreateAsync(__A0)
  2107.                                                                                             #endif
  2108. EXTERN_API( OSErr ) PBHCreateAsync(HParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA608);
  2109.  
  2110.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2111.                                                                                             #pragma parameter __D0 PBHDeleteSync(__A0)
  2112.                                                                                             #endif
  2113. EXTERN_API( OSErr ) PBHDeleteSync(HParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA209);
  2114.  
  2115.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2116.                                                                                             #pragma parameter __D0 PBHDeleteAsync(__A0)
  2117.                                                                                             #endif
  2118. EXTERN_API( OSErr ) PBHDeleteAsync(HParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA609);
  2119.  
  2120.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2121.                                                                                             #pragma parameter __D0 PBHRenameSync(__A0)
  2122.                                                                                             #endif
  2123. EXTERN_API( OSErr ) PBHRenameSync(HParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA20B);
  2124.  
  2125.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2126.                                                                                             #pragma parameter __D0 PBHRenameAsync(__A0)
  2127.                                                                                             #endif
  2128. EXTERN_API( OSErr ) PBHRenameAsync(HParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA60B);
  2129.  
  2130.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2131.                                                                                             #pragma parameter __D0 PBHRstFLockSync(__A0)
  2132.                                                                                             #endif
  2133. EXTERN_API( OSErr ) PBHRstFLockSync(HParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA242);
  2134.  
  2135.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2136.                                                                                             #pragma parameter __D0 PBHRstFLockAsync(__A0)
  2137.                                                                                             #endif
  2138. EXTERN_API( OSErr ) PBHRstFLockAsync(HParmBlkPtr paramBlock)                                ONEWORDINLINE(0xA642);
  2139.  
  2140.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2141.                                                                                             #pragma parameter __D0 PBHSetFLockSync(__A0)
  2142.                                                                                             #endif
  2143. EXTERN_API( OSErr ) PBHSetFLockSync(HParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA241);
  2144.  
  2145.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2146.                                                                                             #pragma parameter __D0 PBHSetFLockAsync(__A0)
  2147.                                                                                             #endif
  2148. EXTERN_API( OSErr ) PBHSetFLockAsync(HParmBlkPtr paramBlock)                                ONEWORDINLINE(0xA641);
  2149.  
  2150.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2151.                                                                                             #pragma parameter __D0 PBHGetFInfoSync(__A0)
  2152.                                                                                             #endif
  2153. EXTERN_API( OSErr ) PBHGetFInfoSync(HParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA20C);
  2154.  
  2155.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2156.                                                                                             #pragma parameter __D0 PBHGetFInfoAsync(__A0)
  2157.                                                                                             #endif
  2158. EXTERN_API( OSErr ) PBHGetFInfoAsync(HParmBlkPtr paramBlock)                                ONEWORDINLINE(0xA60C);
  2159.  
  2160.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2161.                                                                                             #pragma parameter __D0 PBHSetFInfoSync(__A0)
  2162.                                                                                             #endif
  2163. EXTERN_API( OSErr ) PBHSetFInfoSync(HParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA20D);
  2164.  
  2165.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2166.                                                                                             #pragma parameter __D0 PBHSetFInfoAsync(__A0)
  2167.                                                                                             #endif
  2168. EXTERN_API( OSErr ) PBHSetFInfoAsync(HParmBlkPtr paramBlock)                                ONEWORDINLINE(0xA60D);
  2169.  
  2170.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2171.                                                                                             #pragma parameter __D0 PBMakeFSSpecSync(__A0)
  2172.                                                                                             #endif
  2173. EXTERN_API( OSErr ) PBMakeFSSpecSync(HParmBlkPtr paramBlock)                                TWOWORDINLINE(0x701B, 0xA260);
  2174.  
  2175.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2176.                                                                                             #pragma parameter __D0 PBMakeFSSpecAsync(__A0)
  2177.                                                                                             #endif
  2178. EXTERN_API( OSErr ) PBMakeFSSpecAsync(HParmBlkPtr paramBlock)                                TWOWORDINLINE(0x701B, 0xA660);
  2179.  
  2180. #if CALL_NOT_IN_CARBON
  2181. EXTERN_API( void ) FInitQueue(void )                                                                ONEWORDINLINE(0xA016);
  2182.  
  2183. #endif  /* CALL_NOT_IN_CARBON */
  2184.  
  2185. #if CALL_NOT_IN_CARBON
  2186. EXTERN_API( QHdrPtr )
  2187. GetFSQHdr                        (void)                                                        THREEWORDINLINE(0x2EBC, 0x0000, 0x0360);
  2188.  
  2189. #endif  /* CALL_NOT_IN_CARBON */
  2190.  
  2191. EXTERN_API( QHdrPtr )
  2192. GetVCBQHdr                        (void)                                                        THREEWORDINLINE(0x2EBC, 0x0000, 0x0356);
  2193.  
  2194. /* GetDrvQHdr was moved to Devices.h*/
  2195.  
  2196. EXTERN_API( OSErr )
  2197. HGetVol                            (StringPtr                 volName,
  2198.                                  short *                vRefNum,
  2199.                                  long *                    dirID);
  2200.  
  2201. EXTERN_API( OSErr )
  2202. HOpen                            (short                     vRefNum,
  2203.                                  long                     dirID,
  2204.                                  ConstStr255Param         fileName,
  2205.                                  SInt8                     permission,
  2206.                                  short *                refNum);
  2207.  
  2208. EXTERN_API( OSErr )
  2209. HOpenDF                            (short                     vRefNum,
  2210.                                  long                     dirID,
  2211.                                  ConstStr255Param         fileName,
  2212.                                  SInt8                     permission,
  2213.                                  short *                refNum);
  2214.  
  2215. EXTERN_API( OSErr )
  2216. HOpenRF                            (short                     vRefNum,
  2217.                                  long                     dirID,
  2218.                                  ConstStr255Param         fileName,
  2219.                                  SInt8                     permission,
  2220.                                  short *                refNum);
  2221.  
  2222. EXTERN_API( OSErr )
  2223. AllocContig                        (short                     refNum,
  2224.                                  long *                    count);
  2225.  
  2226. EXTERN_API( OSErr )
  2227. HCreate                            (short                     vRefNum,
  2228.                                  long                     dirID,
  2229.                                  ConstStr255Param         fileName,
  2230.                                  OSType                 creator,
  2231.                                  OSType                 fileType);
  2232.  
  2233. EXTERN_API( OSErr )
  2234. DirCreate                        (short                     vRefNum,
  2235.                                  long                     parentDirID,
  2236.                                  ConstStr255Param         directoryName,
  2237.                                  long *                    createdDirID);
  2238.  
  2239. EXTERN_API( OSErr )
  2240. HDelete                            (short                     vRefNum,
  2241.                                  long                     dirID,
  2242.                                  ConstStr255Param         fileName);
  2243.  
  2244. EXTERN_API( OSErr )
  2245. HGetFInfo                        (short                     vRefNum,
  2246.                                  long                     dirID,
  2247.                                  ConstStr255Param         fileName,
  2248.                                  FInfo *                fndrInfo);
  2249.  
  2250. EXTERN_API( OSErr )
  2251. HSetFInfo                        (short                     vRefNum,
  2252.                                  long                     dirID,
  2253.                                  ConstStr255Param         fileName,
  2254.                                  const FInfo *            fndrInfo);
  2255.  
  2256. EXTERN_API( OSErr )
  2257. HSetFLock                        (short                     vRefNum,
  2258.                                  long                     dirID,
  2259.                                  ConstStr255Param         fileName);
  2260.  
  2261. EXTERN_API( OSErr )
  2262. HRstFLock                        (short                     vRefNum,
  2263.                                  long                     dirID,
  2264.                                  ConstStr255Param         fileName);
  2265.  
  2266. EXTERN_API( OSErr )
  2267. HRename                            (short                     vRefNum,
  2268.                                  long                     dirID,
  2269.                                  ConstStr255Param         oldName,
  2270.                                  ConstStr255Param         newName);
  2271.  
  2272. EXTERN_API( OSErr )
  2273. CatMove                            (short                     vRefNum,
  2274.                                  long                     dirID,
  2275.                                  ConstStr255Param         oldName,
  2276.                                  long                     newDirID,
  2277.                                  ConstStr255Param         newName);
  2278.  
  2279. #if CALL_NOT_IN_CARBON
  2280. EXTERN_API( OSErr )
  2281. OpenWD                            (short                     vRefNum,
  2282.                                  long                     dirID,
  2283.                                  long                     procID,
  2284.                                  short *                wdRefNum);
  2285.  
  2286. #endif  /* CALL_NOT_IN_CARBON */
  2287.  
  2288. #if CALL_NOT_IN_CARBON
  2289. EXTERN_API( OSErr )
  2290. CloseWD                            (short                     wdRefNum);
  2291.  
  2292. #endif  /* CALL_NOT_IN_CARBON */
  2293.  
  2294. #if CALL_NOT_IN_CARBON
  2295. EXTERN_API( OSErr )
  2296. GetWDInfo                        (short                     wdRefNum,
  2297.                                  short *                vRefNum,
  2298.                                  long *                    dirID,
  2299.                                  long *                    procID);
  2300.  
  2301. #endif  /* CALL_NOT_IN_CARBON */
  2302.  
  2303. /*  shared environment  */
  2304.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2305.                                                                                             #pragma parameter __D0 PBHGetVolParmsSync(__A0)
  2306.                                                                                             #endif
  2307. EXTERN_API( OSErr ) PBHGetVolParmsSync(HParmBlkPtr paramBlock)                                TWOWORDINLINE(0x7030, 0xA260);
  2308.  
  2309.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2310.                                                                                             #pragma parameter __D0 PBHGetVolParmsAsync(__A0)
  2311.                                                                                             #endif
  2312. EXTERN_API( OSErr ) PBHGetVolParmsAsync(HParmBlkPtr paramBlock)                                TWOWORDINLINE(0x7030, 0xA660);
  2313.  
  2314.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2315.                                                                                             #pragma parameter __D0 PBHGetLogInInfoSync(__A0)
  2316.                                                                                             #endif
  2317. EXTERN_API( OSErr ) PBHGetLogInInfoSync(HParmBlkPtr paramBlock)                                TWOWORDINLINE(0x7031, 0xA260);
  2318.  
  2319.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2320.                                                                                             #pragma parameter __D0 PBHGetLogInInfoAsync(__A0)
  2321.                                                                                             #endif
  2322. EXTERN_API( OSErr ) PBHGetLogInInfoAsync(HParmBlkPtr paramBlock)                            TWOWORDINLINE(0x7031, 0xA660);
  2323.  
  2324.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2325.                                                                                             #pragma parameter __D0 PBHGetDirAccessSync(__A0)
  2326.                                                                                             #endif
  2327. EXTERN_API( OSErr ) PBHGetDirAccessSync(HParmBlkPtr paramBlock)                                TWOWORDINLINE(0x7032, 0xA260);
  2328.  
  2329.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2330.                                                                                             #pragma parameter __D0 PBHGetDirAccessAsync(__A0)
  2331.                                                                                             #endif
  2332. EXTERN_API( OSErr ) PBHGetDirAccessAsync(HParmBlkPtr paramBlock)                            TWOWORDINLINE(0x7032, 0xA660);
  2333.  
  2334.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2335.                                                                                             #pragma parameter __D0 PBHSetDirAccessSync(__A0)
  2336.                                                                                             #endif
  2337. EXTERN_API( OSErr ) PBHSetDirAccessSync(HParmBlkPtr paramBlock)                                TWOWORDINLINE(0x7033, 0xA260);
  2338.  
  2339.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2340.                                                                                             #pragma parameter __D0 PBHSetDirAccessAsync(__A0)
  2341.                                                                                             #endif
  2342. EXTERN_API( OSErr ) PBHSetDirAccessAsync(HParmBlkPtr paramBlock)                            TWOWORDINLINE(0x7033, 0xA660);
  2343.  
  2344.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2345.                                                                                             #pragma parameter __D0 PBHMapIDSync(__A0)
  2346.                                                                                             #endif
  2347. EXTERN_API( OSErr ) PBHMapIDSync(HParmBlkPtr paramBlock)                                    TWOWORDINLINE(0x7034, 0xA260);
  2348.  
  2349.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2350.                                                                                             #pragma parameter __D0 PBHMapIDAsync(__A0)
  2351.                                                                                             #endif
  2352. EXTERN_API( OSErr ) PBHMapIDAsync(HParmBlkPtr paramBlock)                                    TWOWORDINLINE(0x7034, 0xA660);
  2353.  
  2354.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2355.                                                                                             #pragma parameter __D0 PBHMapNameSync(__A0)
  2356.                                                                                             #endif
  2357. EXTERN_API( OSErr ) PBHMapNameSync(HParmBlkPtr paramBlock)                                    TWOWORDINLINE(0x7035, 0xA260);
  2358.  
  2359.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2360.                                                                                             #pragma parameter __D0 PBHMapNameAsync(__A0)
  2361.                                                                                             #endif
  2362. EXTERN_API( OSErr ) PBHMapNameAsync(HParmBlkPtr paramBlock)                                    TWOWORDINLINE(0x7035, 0xA660);
  2363.  
  2364.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2365.                                                                                             #pragma parameter __D0 PBHCopyFileSync(__A0)
  2366.                                                                                             #endif
  2367. EXTERN_API( OSErr ) PBHCopyFileSync(HParmBlkPtr paramBlock)                                    TWOWORDINLINE(0x7036, 0xA260);
  2368.  
  2369.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2370.                                                                                             #pragma parameter __D0 PBHCopyFileAsync(__A0)
  2371.                                                                                             #endif
  2372. EXTERN_API( OSErr ) PBHCopyFileAsync(HParmBlkPtr paramBlock)                                TWOWORDINLINE(0x7036, 0xA660);
  2373.  
  2374.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2375.                                                                                             #pragma parameter __D0 PBHMoveRenameSync(__A0)
  2376.                                                                                             #endif
  2377. EXTERN_API( OSErr ) PBHMoveRenameSync(HParmBlkPtr paramBlock)                                TWOWORDINLINE(0x7037, 0xA260);
  2378.  
  2379.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2380.                                                                                             #pragma parameter __D0 PBHMoveRenameAsync(__A0)
  2381.                                                                                             #endif
  2382. EXTERN_API( OSErr ) PBHMoveRenameAsync(HParmBlkPtr paramBlock)                                TWOWORDINLINE(0x7037, 0xA660);
  2383.  
  2384.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2385.                                                                                             #pragma parameter __D0 PBHOpenDenySync(__A0)
  2386.                                                                                             #endif
  2387. EXTERN_API( OSErr ) PBHOpenDenySync(HParmBlkPtr paramBlock)                                    TWOWORDINLINE(0x7038, 0xA260);
  2388.  
  2389.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2390.                                                                                             #pragma parameter __D0 PBHOpenDenyAsync(__A0)
  2391.                                                                                             #endif
  2392. EXTERN_API( OSErr ) PBHOpenDenyAsync(HParmBlkPtr paramBlock)                                TWOWORDINLINE(0x7038, 0xA660);
  2393.  
  2394.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2395.                                                                                             #pragma parameter __D0 PBHOpenRFDenySync(__A0)
  2396.                                                                                             #endif
  2397. EXTERN_API( OSErr ) PBHOpenRFDenySync(HParmBlkPtr paramBlock)                                TWOWORDINLINE(0x7039, 0xA260);
  2398.  
  2399.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2400.                                                                                             #pragma parameter __D0 PBHOpenRFDenyAsync(__A0)
  2401.                                                                                             #endif
  2402. EXTERN_API( OSErr ) PBHOpenRFDenyAsync(HParmBlkPtr paramBlock)                                TWOWORDINLINE(0x7039, 0xA660);
  2403.  
  2404.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2405.                                                                                             #pragma parameter __D0 PBGetXCatInfoSync(__A0)
  2406.                                                                                             #endif
  2407. EXTERN_API( OSErr ) PBGetXCatInfoSync(XCInfoPBPtr paramBlock)                                TWOWORDINLINE(0x703A, 0xA260);
  2408.  
  2409.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2410.                                                                                             #pragma parameter __D0 PBGetXCatInfoAsync(__A0)
  2411.                                                                                             #endif
  2412. EXTERN_API( OSErr ) PBGetXCatInfoAsync(XCInfoPBPtr paramBlock)                                TWOWORDINLINE(0x703A, 0xA660);
  2413.  
  2414.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2415.                                                                                             #pragma parameter __D0 PBExchangeFilesSync(__A0)
  2416.                                                                                             #endif
  2417. EXTERN_API( OSErr ) PBExchangeFilesSync(HParmBlkPtr paramBlock)                                TWOWORDINLINE(0x7017, 0xA260);
  2418.  
  2419.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2420.                                                                                             #pragma parameter __D0 PBExchangeFilesAsync(__A0)
  2421.                                                                                             #endif
  2422. EXTERN_API( OSErr ) PBExchangeFilesAsync(HParmBlkPtr paramBlock)                            TWOWORDINLINE(0x7017, 0xA660);
  2423.  
  2424.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2425.                                                                                             #pragma parameter __D0 PBCreateFileIDRefSync(__A0)
  2426.                                                                                             #endif
  2427. EXTERN_API( OSErr ) PBCreateFileIDRefSync(HParmBlkPtr paramBlock)                            TWOWORDINLINE(0x7014, 0xA260);
  2428.  
  2429.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2430.                                                                                             #pragma parameter __D0 PBCreateFileIDRefAsync(__A0)
  2431.                                                                                             #endif
  2432. EXTERN_API( OSErr ) PBCreateFileIDRefAsync(HParmBlkPtr paramBlock)                            TWOWORDINLINE(0x7014, 0xA660);
  2433.  
  2434.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2435.                                                                                             #pragma parameter __D0 PBResolveFileIDRefSync(__A0)
  2436.                                                                                             #endif
  2437. EXTERN_API( OSErr ) PBResolveFileIDRefSync(HParmBlkPtr paramBlock)                            TWOWORDINLINE(0x7016, 0xA260);
  2438.  
  2439.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2440.                                                                                             #pragma parameter __D0 PBResolveFileIDRefAsync(__A0)
  2441.                                                                                             #endif
  2442. EXTERN_API( OSErr ) PBResolveFileIDRefAsync(HParmBlkPtr paramBlock)                            TWOWORDINLINE(0x7016, 0xA660);
  2443.  
  2444.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2445.                                                                                             #pragma parameter __D0 PBDeleteFileIDRefSync(__A0)
  2446.                                                                                             #endif
  2447. EXTERN_API( OSErr ) PBDeleteFileIDRefSync(HParmBlkPtr paramBlock)                            TWOWORDINLINE(0x7015, 0xA260);
  2448.  
  2449.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2450.                                                                                             #pragma parameter __D0 PBDeleteFileIDRefAsync(__A0)
  2451.                                                                                             #endif
  2452. EXTERN_API( OSErr ) PBDeleteFileIDRefAsync(HParmBlkPtr paramBlock)                            TWOWORDINLINE(0x7015, 0xA660);
  2453.  
  2454.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2455.                                                                                             #pragma parameter __D0 PBGetForeignPrivsSync(__A0)
  2456.                                                                                             #endif
  2457. EXTERN_API( OSErr ) PBGetForeignPrivsSync(HParmBlkPtr paramBlock)                            TWOWORDINLINE(0x7060, 0xA260);
  2458.  
  2459.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2460.                                                                                             #pragma parameter __D0 PBGetForeignPrivsAsync(__A0)
  2461.                                                                                             #endif
  2462. EXTERN_API( OSErr ) PBGetForeignPrivsAsync(HParmBlkPtr paramBlock)                            TWOWORDINLINE(0x7060, 0xA660);
  2463.  
  2464.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2465.                                                                                             #pragma parameter __D0 PBSetForeignPrivsSync(__A0)
  2466.                                                                                             #endif
  2467. EXTERN_API( OSErr ) PBSetForeignPrivsSync(HParmBlkPtr paramBlock)                            TWOWORDINLINE(0x7061, 0xA260);
  2468.  
  2469.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2470.                                                                                             #pragma parameter __D0 PBSetForeignPrivsAsync(__A0)
  2471.                                                                                             #endif
  2472. EXTERN_API( OSErr ) PBSetForeignPrivsAsync(HParmBlkPtr paramBlock)                            TWOWORDINLINE(0x7061, 0xA660);
  2473.  
  2474. /*  Desktop Manager  */
  2475.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2476.                                                                                             #pragma parameter __D0 PBDTGetPath(__A0)
  2477.                                                                                             #endif
  2478. EXTERN_API( OSErr ) PBDTGetPath(DTPBPtr paramBlock)                                            TWOWORDINLINE(0x7020, 0xA260);
  2479.  
  2480.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2481.                                                                                             #pragma parameter __D0 PBDTCloseDown(__A0)
  2482.                                                                                             #endif
  2483. EXTERN_API( OSErr ) PBDTCloseDown(DTPBPtr paramBlock)                                        TWOWORDINLINE(0x7021, 0xA260);
  2484.  
  2485.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2486.                                                                                             #pragma parameter __D0 PBDTAddIconSync(__A0)
  2487.                                                                                             #endif
  2488. EXTERN_API( OSErr ) PBDTAddIconSync(DTPBPtr paramBlock)                                        TWOWORDINLINE(0x7022, 0xA260);
  2489.  
  2490.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2491.                                                                                             #pragma parameter __D0 PBDTAddIconAsync(__A0)
  2492.                                                                                             #endif
  2493. EXTERN_API( OSErr ) PBDTAddIconAsync(DTPBPtr paramBlock)                                    TWOWORDINLINE(0x7022, 0xA660);
  2494.  
  2495.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2496.                                                                                             #pragma parameter __D0 PBDTGetIconSync(__A0)
  2497.                                                                                             #endif
  2498. EXTERN_API( OSErr ) PBDTGetIconSync(DTPBPtr paramBlock)                                        TWOWORDINLINE(0x7023, 0xA260);
  2499.  
  2500.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2501.                                                                                             #pragma parameter __D0 PBDTGetIconAsync(__A0)
  2502.                                                                                             #endif
  2503. EXTERN_API( OSErr ) PBDTGetIconAsync(DTPBPtr paramBlock)                                    TWOWORDINLINE(0x7023, 0xA660);
  2504.  
  2505.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2506.                                                                                             #pragma parameter __D0 PBDTGetIconInfoSync(__A0)
  2507.                                                                                             #endif
  2508. EXTERN_API( OSErr ) PBDTGetIconInfoSync(DTPBPtr paramBlock)                                    TWOWORDINLINE(0x7024, 0xA260);
  2509.  
  2510.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2511.                                                                                             #pragma parameter __D0 PBDTGetIconInfoAsync(__A0)
  2512.                                                                                             #endif
  2513. EXTERN_API( OSErr ) PBDTGetIconInfoAsync(DTPBPtr paramBlock)                                TWOWORDINLINE(0x7024, 0xA660);
  2514.  
  2515.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2516.                                                                                             #pragma parameter __D0 PBDTAddAPPLSync(__A0)
  2517.                                                                                             #endif
  2518. EXTERN_API( OSErr ) PBDTAddAPPLSync(DTPBPtr paramBlock)                                        TWOWORDINLINE(0x7025, 0xA260);
  2519.  
  2520.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2521.                                                                                             #pragma parameter __D0 PBDTAddAPPLAsync(__A0)
  2522.                                                                                             #endif
  2523. EXTERN_API( OSErr ) PBDTAddAPPLAsync(DTPBPtr paramBlock)                                    TWOWORDINLINE(0x7025, 0xA660);
  2524.  
  2525.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2526.                                                                                             #pragma parameter __D0 PBDTRemoveAPPLSync(__A0)
  2527.                                                                                             #endif
  2528. EXTERN_API( OSErr ) PBDTRemoveAPPLSync(DTPBPtr paramBlock)                                    TWOWORDINLINE(0x7026, 0xA260);
  2529.  
  2530.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2531.                                                                                             #pragma parameter __D0 PBDTRemoveAPPLAsync(__A0)
  2532.                                                                                             #endif
  2533. EXTERN_API( OSErr ) PBDTRemoveAPPLAsync(DTPBPtr paramBlock)                                    TWOWORDINLINE(0x7026, 0xA660);
  2534.  
  2535.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2536.                                                                                             #pragma parameter __D0 PBDTGetAPPLSync(__A0)
  2537.                                                                                             #endif
  2538. EXTERN_API( OSErr ) PBDTGetAPPLSync(DTPBPtr paramBlock)                                        TWOWORDINLINE(0x7027, 0xA260);
  2539.  
  2540.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2541.                                                                                             #pragma parameter __D0 PBDTGetAPPLAsync(__A0)
  2542.                                                                                             #endif
  2543. EXTERN_API( OSErr ) PBDTGetAPPLAsync(DTPBPtr paramBlock)                                    TWOWORDINLINE(0x7027, 0xA660);
  2544.  
  2545.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2546.                                                                                             #pragma parameter __D0 PBDTSetCommentSync(__A0)
  2547.                                                                                             #endif
  2548. EXTERN_API( OSErr ) PBDTSetCommentSync(DTPBPtr paramBlock)                                    TWOWORDINLINE(0x7028, 0xA260);
  2549.  
  2550.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2551.                                                                                             #pragma parameter __D0 PBDTSetCommentAsync(__A0)
  2552.                                                                                             #endif
  2553. EXTERN_API( OSErr ) PBDTSetCommentAsync(DTPBPtr paramBlock)                                    TWOWORDINLINE(0x7028, 0xA660);
  2554.  
  2555.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2556.                                                                                             #pragma parameter __D0 PBDTRemoveCommentSync(__A0)
  2557.                                                                                             #endif
  2558. EXTERN_API( OSErr ) PBDTRemoveCommentSync(DTPBPtr paramBlock)                                TWOWORDINLINE(0x7029, 0xA260);
  2559.  
  2560.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2561.                                                                                             #pragma parameter __D0 PBDTRemoveCommentAsync(__A0)
  2562.                                                                                             #endif
  2563. EXTERN_API( OSErr ) PBDTRemoveCommentAsync(DTPBPtr paramBlock)                                TWOWORDINLINE(0x7029, 0xA660);
  2564.  
  2565.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2566.                                                                                             #pragma parameter __D0 PBDTGetCommentSync(__A0)
  2567.                                                                                             #endif
  2568. EXTERN_API( OSErr ) PBDTGetCommentSync(DTPBPtr paramBlock)                                    TWOWORDINLINE(0x702A, 0xA260);
  2569.  
  2570.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2571.                                                                                             #pragma parameter __D0 PBDTGetCommentAsync(__A0)
  2572.                                                                                             #endif
  2573. EXTERN_API( OSErr ) PBDTGetCommentAsync(DTPBPtr paramBlock)                                    TWOWORDINLINE(0x702A, 0xA660);
  2574.  
  2575.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2576.                                                                                             #pragma parameter __D0 PBDTFlushSync(__A0)
  2577.                                                                                             #endif
  2578. EXTERN_API( OSErr ) PBDTFlushSync(DTPBPtr paramBlock)                                        TWOWORDINLINE(0x702B, 0xA260);
  2579.  
  2580.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2581.                                                                                             #pragma parameter __D0 PBDTFlushAsync(__A0)
  2582.                                                                                             #endif
  2583. EXTERN_API( OSErr ) PBDTFlushAsync(DTPBPtr paramBlock)                                        TWOWORDINLINE(0x702B, 0xA660);
  2584.  
  2585.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2586.                                                                                             #pragma parameter __D0 PBDTResetSync(__A0)
  2587.                                                                                             #endif
  2588. EXTERN_API( OSErr ) PBDTResetSync(DTPBPtr paramBlock)                                        TWOWORDINLINE(0x702C, 0xA260);
  2589.  
  2590.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2591.                                                                                             #pragma parameter __D0 PBDTResetAsync(__A0)
  2592.                                                                                             #endif
  2593. EXTERN_API( OSErr ) PBDTResetAsync(DTPBPtr paramBlock)                                        TWOWORDINLINE(0x702C, 0xA660);
  2594.  
  2595.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2596.                                                                                             #pragma parameter __D0 PBDTGetInfoSync(__A0)
  2597.                                                                                             #endif
  2598. EXTERN_API( OSErr ) PBDTGetInfoSync(DTPBPtr paramBlock)                                        TWOWORDINLINE(0x702D, 0xA260);
  2599.  
  2600.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2601.                                                                                             #pragma parameter __D0 PBDTGetInfoAsync(__A0)
  2602.                                                                                             #endif
  2603. EXTERN_API( OSErr ) PBDTGetInfoAsync(DTPBPtr paramBlock)                                    TWOWORDINLINE(0x702D, 0xA660);
  2604.  
  2605.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2606.                                                                                             #pragma parameter __D0 PBDTOpenInform(__A0)
  2607.                                                                                             #endif
  2608. EXTERN_API( OSErr ) PBDTOpenInform(DTPBPtr paramBlock)                                        TWOWORDINLINE(0x702E, 0xA060);
  2609.  
  2610.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2611.                                                                                             #pragma parameter __D0 PBDTDeleteSync(__A0)
  2612.                                                                                             #endif
  2613. EXTERN_API( OSErr ) PBDTDeleteSync(DTPBPtr paramBlock)                                        TWOWORDINLINE(0x702F, 0xA060);
  2614.  
  2615.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2616.                                                                                             #pragma parameter __D0 PBDTDeleteAsync(__A0)
  2617.                                                                                             #endif
  2618. EXTERN_API( OSErr ) PBDTDeleteAsync(DTPBPtr paramBlock)                                        TWOWORDINLINE(0x702F, 0xA460);
  2619.  
  2620. /*  VolumeMount traps  */
  2621.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2622.                                                                                             #pragma parameter __D0 PBGetVolMountInfoSize(__A0)
  2623.                                                                                             #endif
  2624. EXTERN_API( OSErr ) PBGetVolMountInfoSize(ParmBlkPtr paramBlock)                            TWOWORDINLINE(0x703F, 0xA260);
  2625.  
  2626.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2627.                                                                                             #pragma parameter __D0 PBGetVolMountInfo(__A0)
  2628.                                                                                             #endif
  2629. EXTERN_API( OSErr ) PBGetVolMountInfo(ParmBlkPtr paramBlock)                                TWOWORDINLINE(0x7040, 0xA260);
  2630.  
  2631.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2632.                                                                                             #pragma parameter __D0 PBVolumeMount(__A0)
  2633.                                                                                             #endif
  2634. EXTERN_API( OSErr ) PBVolumeMount(ParmBlkPtr paramBlock)                                    TWOWORDINLINE(0x7041, 0xA260);
  2635.  
  2636. /*  FSp traps  */
  2637. EXTERN_API( OSErr )
  2638. FSMakeFSSpec                    (short                     vRefNum,
  2639.                                  long                     dirID,
  2640.                                  ConstStr255Param         fileName,
  2641.                                  FSSpec *                spec)                                TWOWORDINLINE(0x7001, 0xAA52);
  2642.  
  2643. EXTERN_API( OSErr )
  2644. FSpOpenDF                        (const FSSpec *            spec,
  2645.                                  SInt8                     permission,
  2646.                                  short *                refNum)                                TWOWORDINLINE(0x7002, 0xAA52);
  2647.  
  2648. EXTERN_API( OSErr )
  2649. FSpOpenRF                        (const FSSpec *            spec,
  2650.                                  SInt8                     permission,
  2651.                                  short *                refNum)                                TWOWORDINLINE(0x7003, 0xAA52);
  2652.  
  2653. EXTERN_API( OSErr )
  2654. FSpCreate                        (const FSSpec *            spec,
  2655.                                  OSType                 creator,
  2656.                                  OSType                 fileType,
  2657.                                  ScriptCode             scriptTag)                            TWOWORDINLINE(0x7004, 0xAA52);
  2658.  
  2659. EXTERN_API( OSErr )
  2660. FSpDirCreate                    (const FSSpec *            spec,
  2661.                                  ScriptCode             scriptTag,
  2662.                                  long *                    createdDirID)                        TWOWORDINLINE(0x7005, 0xAA52);
  2663.  
  2664. EXTERN_API( OSErr )
  2665. FSpDelete                        (const FSSpec *            spec)                                TWOWORDINLINE(0x7006, 0xAA52);
  2666.  
  2667. EXTERN_API( OSErr )
  2668. FSpGetFInfo                        (const FSSpec *            spec,
  2669.                                  FInfo *                fndrInfo)                            TWOWORDINLINE(0x7007, 0xAA52);
  2670.  
  2671. EXTERN_API( OSErr )
  2672. FSpSetFInfo                        (const FSSpec *            spec,
  2673.                                  const FInfo *            fndrInfo)                            TWOWORDINLINE(0x7008, 0xAA52);
  2674.  
  2675. EXTERN_API( OSErr )
  2676. FSpSetFLock                        (const FSSpec *            spec)                                TWOWORDINLINE(0x7009, 0xAA52);
  2677.  
  2678. EXTERN_API( OSErr )
  2679. FSpRstFLock                        (const FSSpec *            spec)                                TWOWORDINLINE(0x700A, 0xAA52);
  2680.  
  2681. EXTERN_API( OSErr )
  2682. FSpRename                        (const FSSpec *            spec,
  2683.                                  ConstStr255Param         newName)                            TWOWORDINLINE(0x700B, 0xAA52);
  2684.  
  2685. EXTERN_API( OSErr )
  2686. FSpCatMove                        (const FSSpec *            source,
  2687.                                  const FSSpec *            dest)                                TWOWORDINLINE(0x700C, 0xAA52);
  2688.  
  2689. EXTERN_API( OSErr )
  2690. FSpExchangeFiles                (const FSSpec *            source,
  2691.                                  const FSSpec *            dest)                                TWOWORDINLINE(0x700F, 0xAA52);
  2692.  
  2693.  
  2694.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2695.                                                                                             #pragma parameter __D0 PBShareSync(__A0)
  2696.                                                                                             #endif
  2697. EXTERN_API( OSErr ) PBShareSync(HParmBlkPtr paramBlock)                                        TWOWORDINLINE(0x7042, 0xA260);
  2698.  
  2699.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2700.                                                                                             #pragma parameter __D0 PBShareAsync(__A0)
  2701.                                                                                             #endif
  2702. EXTERN_API( OSErr ) PBShareAsync(HParmBlkPtr paramBlock)                                    TWOWORDINLINE(0x7042, 0xA660);
  2703.  
  2704.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2705.                                                                                             #pragma parameter __D0 PBUnshareSync(__A0)
  2706.                                                                                             #endif
  2707. EXTERN_API( OSErr ) PBUnshareSync(HParmBlkPtr paramBlock)                                    TWOWORDINLINE(0x7043, 0xA260);
  2708.  
  2709.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2710.                                                                                             #pragma parameter __D0 PBUnshareAsync(__A0)
  2711.                                                                                             #endif
  2712. EXTERN_API( OSErr ) PBUnshareAsync(HParmBlkPtr paramBlock)                                    TWOWORDINLINE(0x7043, 0xA660);
  2713.  
  2714.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2715.                                                                                             #pragma parameter __D0 PBGetUGEntrySync(__A0)
  2716.                                                                                             #endif
  2717. EXTERN_API( OSErr ) PBGetUGEntrySync(HParmBlkPtr paramBlock)                                TWOWORDINLINE(0x7044, 0xA260);
  2718.  
  2719.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2720.                                                                                             #pragma parameter __D0 PBGetUGEntryAsync(__A0)
  2721.                                                                                             #endif
  2722. EXTERN_API( OSErr ) PBGetUGEntryAsync(HParmBlkPtr paramBlock)                                TWOWORDINLINE(0x7044, 0xA660);
  2723.  
  2724.  
  2725.  
  2726.  
  2727. #if TARGET_CPU_68K
  2728. /*
  2729.     PBGetAltAccess and PBSetAltAccess are obsolete and will not be supported 
  2730.     on PowerPC. Equivalent functionality is provided by the routines 
  2731.     PBGetForeignPrivs and PBSetForeignPrivs.
  2732. */
  2733.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2734.                                                                                             #pragma parameter __D0 PBGetAltAccessSync(__A0)
  2735.                                                                                             #endif
  2736. EXTERN_API( OSErr ) PBGetAltAccessSync(HParmBlkPtr paramBlock)                                TWOWORDINLINE(0x7060, 0xA060);
  2737.  
  2738.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2739.                                                                                             #pragma parameter __D0 PBGetAltAccessAsync(__A0)
  2740.                                                                                             #endif
  2741. EXTERN_API( OSErr ) PBGetAltAccessAsync(HParmBlkPtr paramBlock)                                TWOWORDINLINE(0x7060, 0xA460);
  2742.  
  2743.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2744.                                                                                             #pragma parameter __D0 PBSetAltAccessSync(__A0)
  2745.                                                                                             #endif
  2746. EXTERN_API( OSErr ) PBSetAltAccessSync(HParmBlkPtr paramBlock)                                TWOWORDINLINE(0x7061, 0xA060);
  2747.  
  2748.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2749.                                                                                             #pragma parameter __D0 PBSetAltAccessAsync(__A0)
  2750.                                                                                             #endif
  2751. EXTERN_API( OSErr ) PBSetAltAccessAsync(HParmBlkPtr paramBlock)                                TWOWORDINLINE(0x7061, 0xA460);
  2752.  
  2753. #define PBSetAltAccess(pb, async) ((async) ? PBSetAltAccessAsync(pb) : PBSetAltAccessSync(pb))
  2754. #define PBGetAltAccess(pb, async) ((async) ? PBGetAltAccessAsync(pb) : PBGetAltAccessSync(pb))
  2755. #endif  /* TARGET_CPU_68K */
  2756.  
  2757.  
  2758. /*
  2759.     The PBxxx() routines are obsolete.  
  2760.     
  2761.     Use the PBxxxSync() or PBxxxAsync() version instead.
  2762. */
  2763. #define PBGetVInfo(pb, async) ((async) ? PBGetVInfoAsync(pb) : PBGetVInfoSync(pb))
  2764. #define PBXGetVolInfo(pb, async) ((async) ? PBXGetVolInfoAsync(pb) : PBXGetVolInfoSync(pb))
  2765. #define PBGetVol(pb, async) ((async) ? PBGetVolAsync(pb) : PBGetVolSync(pb))
  2766. #define PBSetVol(pb, async) ((async) ? PBSetVolAsync(pb) : PBSetVolSync(pb))
  2767. #define PBFlushVol(pb, async) ((async) ? PBFlushVolAsync(pb) : PBFlushVolSync(pb))
  2768. #define PBCreate(pb, async) ((async) ? PBCreateAsync(pb) : PBCreateSync(pb))
  2769. #define PBDelete(pb, async) ((async) ? PBDeleteAsync(pb) : PBDeleteSync(pb))
  2770. #define PBOpenDF(pb, async) ((async) ? PBOpenDFAsync(pb) : PBOpenDFSync(pb))
  2771. #define PBOpenRF(pb, async) ((async) ? PBOpenRFAsync(pb) : PBOpenRFSync(pb))
  2772. #define PBRename(pb, async) ((async) ? PBRenameAsync(pb) : PBRenameSync(pb))
  2773. #define PBGetFInfo(pb, async) ((async) ? PBGetFInfoAsync(pb) : PBGetFInfoSync(pb))
  2774. #define PBSetFInfo(pb, async) ((async) ? PBSetFInfoAsync(pb) : PBSetFInfoSync(pb))
  2775. #define PBSetFLock(pb, async) ((async) ? PBSetFLockAsync(pb) : PBSetFLockSync(pb))
  2776. #define PBRstFLock(pb, async) ((async) ? PBRstFLockAsync(pb) : PBRstFLockSync(pb))
  2777. #define PBSetFVers(pb, async) ((async) ? PBSetFVersAsync(pb) : PBSetFVersSync(pb))
  2778. #define PBAllocate(pb, async) ((async) ? PBAllocateAsync(pb) : PBAllocateSync(pb))
  2779. #define PBGetEOF(pb, async) ((async) ? PBGetEOFAsync(pb) : PBGetEOFSync(pb))
  2780. #define PBSetEOF(pb, async) ((async) ? PBSetEOFAsync(pb) : PBSetEOFSync(pb))
  2781. #define PBGetFPos(pb, async) ((async) ? PBGetFPosAsync(pb) : PBGetFPosSync(pb))
  2782. #define PBSetFPos(pb, async) ((async) ? PBSetFPosAsync(pb) : PBSetFPosSync(pb))
  2783. #define PBFlushFile(pb, async) ((async) ? PBFlushFileAsync(pb) : PBFlushFileSync(pb))
  2784. #define PBCatSearch(pb, async) ((async) ? PBCatSearchAsync(pb) : PBCatSearchSync(pb))
  2785. #define PBOpenWD(pb, async) ((async) ? PBOpenWDAsync(pb) : PBOpenWDSync(pb))
  2786. #define PBCloseWD(pb, async) ((async) ? PBCloseWDAsync(pb) : PBCloseWDSync(pb))
  2787. #define PBHSetVol(pb, async) ((async) ? PBHSetVolAsync(pb) : PBHSetVolSync(pb))
  2788. #define PBHGetVol(pb, async) ((async) ? PBHGetVolAsync(pb) : PBHGetVolSync(pb))
  2789. #define PBCatMove(pb, async) ((async) ? PBCatMoveAsync(pb) : PBCatMoveSync(pb))
  2790. #define PBDirCreate(pb, async) ((async) ? PBDirCreateAsync(pb) : PBDirCreateSync(pb))
  2791. #define PBGetWDInfo(pb, async) ((async) ? PBGetWDInfoAsync(pb) : PBGetWDInfoSync(pb))
  2792. #define PBGetFCBInfo(pb, async) ((async) ? PBGetFCBInfoAsync(pb) : PBGetFCBInfoSync(pb))
  2793. #define PBGetCatInfo(pb, async) ((async) ? PBGetCatInfoAsync(pb) : PBGetCatInfoSync(pb))
  2794. #define PBSetCatInfo(pb, async) ((async) ? PBSetCatInfoAsync(pb) : PBSetCatInfoSync(pb))
  2795. #define PBAllocContig(pb, async) ((async) ? PBAllocContigAsync(pb) : PBAllocContigSync(pb))
  2796. #define PBLockRange(pb, async) ((async) ? PBLockRangeAsync(pb) : PBLockRangeSync(pb))
  2797. #define PBUnlockRange(pb, async) ((async) ? PBUnlockRangeAsync(pb) : PBUnlockRangeSync(pb))
  2798. #define PBSetVInfo(pb, async) ((async) ? PBSetVInfoAsync(pb) : PBSetVInfoSync(pb))
  2799. #define PBHGetVInfo(pb, async) ((async) ? PBHGetVInfoAsync(pb) : PBHGetVInfoSync(pb))
  2800. #define PBHOpen(pb, async) ((async) ? PBHOpenAsync(pb) : PBHOpenSync(pb))
  2801. #define PBHOpenRF(pb, async) ((async) ? PBHOpenRFAsync(pb) : PBHOpenRFSync(pb))
  2802. #define PBHOpenDF(pb, async) ((async) ? PBHOpenDFAsync(pb) : PBHOpenDFSync(pb))
  2803. #define PBHCreate(pb, async) ((async) ? PBHCreateAsync(pb) : PBHCreateSync(pb))
  2804. #define PBHDelete(pb, async) ((async) ? PBHDeleteAsync(pb) : PBHDeleteSync(pb))
  2805. #define PBHRename(pb, async) ((async) ? PBHRenameAsync(pb) : PBHRenameSync(pb))
  2806. #define PBHRstFLock(pb, async) ((async) ? PBHRstFLockAsync(pb) : PBHRstFLockSync(pb))
  2807. #define PBHSetFLock(pb, async) ((async) ? PBHSetFLockAsync(pb) : PBHSetFLockSync(pb))
  2808. #define PBHGetFInfo(pb, async) ((async) ? PBHGetFInfoAsync(pb) : PBHGetFInfoSync(pb))
  2809. #define PBHSetFInfo(pb, async) ((async) ? PBHSetFInfoAsync(pb) : PBHSetFInfoSync(pb))
  2810. #define PBMakeFSSpec(pb, async) ((async) ? PBMakeFSSpecAsync(pb) : PBMakeFSSpecSync(pb))
  2811. #define PBHGetVolParms(pb, async) ((async) ? PBHGetVolParmsAsync(pb) : PBHGetVolParmsSync(pb))
  2812. #define PBHGetLogInInfo(pb, async) ((async) ? PBHGetLogInInfoAsync(pb) : PBHGetLogInInfoSync(pb))
  2813. #define PBHGetDirAccess(pb, async) ((async) ? PBHGetDirAccessAsync(pb) : PBHGetDirAccessSync(pb))
  2814. #define PBHSetDirAccess(pb, async) ((async) ? PBHSetDirAccessAsync(pb) : PBHSetDirAccessSync(pb))
  2815. #define PBHMapID(pb, async) ((async) ? PBHMapIDAsync(pb) : PBHMapIDSync(pb))
  2816. #define PBHMapName(pb, async) ((async) ? PBHMapNameAsync(pb) : PBHMapNameSync(pb))
  2817. #define PBHCopyFile(pb, async) ((async) ? PBHCopyFileAsync(pb) : PBHCopyFileSync(pb))
  2818. #define PBHMoveRename(pb, async) ((async) ? PBHMoveRenameAsync(pb) : PBHMoveRenameSync(pb))
  2819. #define PBHOpenDeny(pb, async) ((async) ? PBHOpenDenyAsync(pb) : PBHOpenDenySync(pb))
  2820. #define PBHOpenRFDeny(pb, async) ((async) ? PBHOpenRFDenyAsync(pb) : PBHOpenRFDenySync(pb))
  2821. #define PBExchangeFiles(pb, async) ((async) ? PBExchangeFilesAsync(pb) : PBExchangeFilesSync(pb))
  2822. #define PBCreateFileIDRef(pb, async) ((async) ? PBCreateFileIDRefAsync(pb) : PBCreateFileIDRefSync(pb))
  2823. #define PBResolveFileIDRef(pb, async) ((async) ? PBResolveFileIDRefAsync(pb) : PBResolveFileIDRefSync(pb))
  2824. #define PBDeleteFileIDRef(pb, async) ((async) ? PBDeleteFileIDRefAsync(pb) : PBDeleteFileIDRefSync(pb))
  2825. #define PBGetForeignPrivs(pb, async) ((async) ? PBGetForeignPrivsAsync(pb) : PBGetForeignPrivsSync(pb))
  2826. #define PBSetForeignPrivs(pb, async) ((async) ? PBSetForeignPrivsAsync(pb) : PBSetForeignPrivsSync(pb))
  2827. #define PBDTAddIcon(pb, async) ((async) ? PBDTAddIconAsync(pb) : PBDTAddIconSync(pb))
  2828. #define PBDTGetIcon(pb, async) ((async) ? PBDTGetIconAsync(pb) : PBDTGetIconSync(pb))
  2829. #define PBDTGetIconInfo(pb, async) ((async) ? PBDTGetIconInfoAsync(pb) : PBDTGetIconInfoSync(pb))
  2830. #define PBDTAddAPPL(pb, async) ((async) ? PBDTAddAPPLAsync(pb) : PBDTAddAPPLSync(pb))
  2831. #define PBDTRemoveAPPL(pb, async) ((async) ? PBDTRemoveAPPLAsync(pb) : PBDTRemoveAPPLSync(pb))
  2832. #define PBDTGetAPPL(pb, async) ((async) ? PBDTGetAPPLAsync(pb) : PBDTGetAPPLSync(pb))
  2833. #define PBDTSetComment(pb, async) ((async) ? PBDTSetCommentAsync(pb) : PBDTSetCommentSync(pb))
  2834. #define PBDTRemoveComment(pb, async) ((async) ? PBDTRemoveCommentAsync(pb) : PBDTRemoveCommentSync(pb))
  2835. #define PBDTGetComment(pb, async) ((async) ? PBDTGetCommentAsync(pb) : PBDTGetCommentSync(pb))
  2836. #define PBDTFlush(pb, async) ((async) ? PBDTFlushAsync(pb) : PBDTFlushSync(pb))
  2837. #define PBDTReset(pb, async) ((async) ? PBDTResetAsync(pb) : PBDTResetSync(pb))
  2838. #define PBDTGetInfo(pb, async) ((async) ? PBDTGetInfoAsync(pb) : PBDTGetInfoSync(pb))
  2839. #define PBDTDelete(pb, async) ((async) ? PBDTDeleteAsync(pb) : PBDTDeleteSync(pb))
  2840.  
  2841.  
  2842. typedef SInt16                             FSVolumeRefNum;
  2843. enum {
  2844.     kFSInvalidVolumeRefNum        = 0
  2845. };
  2846.  
  2847. #if TARGET_OS_WIN32
  2848.  
  2849. struct FSRef {
  2850.     UInt8                             hidden[600];                /* private to File Manager; oo need symbolic constant */
  2851. };
  2852. typedef struct FSRef                    FSRef;
  2853. #else
  2854.  
  2855. struct FSRef {
  2856.     UInt8                             hidden[80];                    /* private to File Manager; oo need symbolic constant */
  2857. };
  2858. typedef struct FSRef                    FSRef;
  2859. #endif  /* TARGET_OS_WIN32 */
  2860.  
  2861. typedef FSRef *                            FSRefPtr;
  2862. /*    CatalogInfoBitmap describes which fields of the CatalogInfo you wish to get or set.*/
  2863.  
  2864. typedef UInt32                             FSCatalogInfoBitmap;
  2865. enum {
  2866.     kFSCatInfoNone                = 0x00000000,
  2867.     kFSCatInfoTextEncoding        = 0x00000001,
  2868.     kFSCatInfoNodeFlags            = 0x00000002,                    /* Locked (bit 0) and directory (bit 4) only */
  2869.     kFSCatInfoVolume            = 0x00000004,
  2870.     kFSCatInfoParentDirID        = 0x00000008,
  2871.     kFSCatInfoNodeID            = 0x00000010,
  2872.     kFSCatInfoCreateDate        = 0x00000020,
  2873.     kFSCatInfoContentMod        = 0x00000040,
  2874.     kFSCatInfoAttrMod            = 0x00000080,
  2875.     kFSCatInfoAccessDate        = 0x00000100,
  2876.     kFSCatInfoBackupDate        = 0x00000200,
  2877.     kFSCatInfoPermissions        = 0x00000400,                    /* Should this be finer granularity? */
  2878.     kFSCatInfoFinderInfo        = 0x00000800,
  2879.     kFSCatInfoFinderXInfo        = 0x00001000,
  2880.     kFSCatInfoValence            = 0x00002000,                    /* Folders only, zero for files */
  2881.     kFSCatInfoDataSizes            = 0x00004000,                    /* Data fork logical and physical size */
  2882.     kFSCatInfoRsrcSizes            = 0x00008000,                    /* Resource fork logical and physical size */
  2883.     kFSCatInfoSharingFlags        = 0x00010000,                    /* sharingFlags: kioFlAttribMountedBit, kioFlAttribSharePointBit */
  2884.     kFSCatInfoUserPrivs            = 0x00020000,                    /* userPrivileges */
  2885.     kFSCatInfoAllDates            = 0x000003E0,
  2886.     kFSCatInfoGettableInfo        = 0x0003FFFF,
  2887.     kFSCatInfoSettableInfo        = 0x00001FE3,                    /* flags, dates, permissions, Finder info, text encoding */
  2888.     kFSCatInfoReserved            = (long)0xFFFC0000                /* bits that are currently reserved */
  2889. };
  2890.  
  2891. /*    Constants for nodeFlags field of FSCatalogInfo*/
  2892. enum {
  2893.     kFSNodeLockedBit            = 0,
  2894.     kFSNodeLockedMask            = 0x0001,
  2895.     kFSNodeIsDirectoryBit        = 4,
  2896.     kFSNodeIsDirectoryMask        = 0x0010
  2897. };
  2898.  
  2899.  
  2900. struct FSCatalogInfo {
  2901.     UInt16                             nodeFlags;                    /* node flags */
  2902.     FSVolumeRefNum                     volume;                        /* object's volume ref */
  2903.     UInt32                             parentDirID;                /* parent directory's ID */
  2904.     UInt32                             nodeID;                        /* file/directory ID */
  2905.     UInt8                             sharingFlags;                /* kioFlAttribMountedBit and kioFlAttribSharePointBit */
  2906.     UInt8                             userPrivileges;                /* user's effective AFP privileges (same as ioACUser) */
  2907.     UInt8                             reserved1;
  2908.     UInt8                             reserved2;
  2909.     UTCDateTime                     createDate;                    /* date and time of creation */
  2910.     UTCDateTime                     contentModDate;                /* date and time of last fork modification */
  2911.     UTCDateTime                     attributeModDate;            /* date and time of last attribute modification */
  2912.     UTCDateTime                     accessDate;                    /* date and time of last access (for Mac OS X) */
  2913.     UTCDateTime                     backupDate;                    /* date and time of last backup */
  2914.  
  2915.     UInt32                             permissions[4];                /* permissions (for Mac OS X) */
  2916.  
  2917.     UInt8                             finderInfo[16];                /* Finder information part 1 */
  2918.     UInt8                             extFinderInfo[16];            /* Finder information part 2 */
  2919.  
  2920.     UInt64                             dataLogicalSize;            /* files only */
  2921.     UInt64                             dataPhysicalSize;            /* files only */
  2922.     UInt64                             rsrcLogicalSize;            /* files only */
  2923.     UInt64                             rsrcPhysicalSize;            /* files only */
  2924.  
  2925.     UInt32                             valence;                    /* folders only */
  2926.     TextEncoding                     textEncodingHint;
  2927. };
  2928. typedef struct FSCatalogInfo            FSCatalogInfo;
  2929. typedef FSCatalogInfo *                    FSCatalogInfoPtr;
  2930.  
  2931. struct FSRefParam {
  2932.     QElemPtr                         qLink;                        /*queue link in header*/
  2933.     short                             qType;                        /*type byte for safety check*/
  2934.     short                             ioTrap;                        /*FS: the Trap*/
  2935.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  2936.     IOCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  2937.     volatile OSErr                     ioResult;                    /*result code*/
  2938.     ConstStringPtr                     ioNamePtr;                    /*ptr to Vol:FileName string*/
  2939.     short                             ioVRefNum;                    /*volume refnum (DrvNum for Eject and MountVol)*/
  2940.  
  2941.     SInt16                             reserved1;                    /* was ioRefNum */
  2942.     UInt8                             reserved2;                    /* was ioVersNum */
  2943.     UInt8                             reserved3;                    /* was ioPermssn */
  2944.  
  2945.     const FSRef *                    ref;                        /* Input ref; the target of the call */
  2946.     FSCatalogInfoBitmap             whichInfo;
  2947.     FSCatalogInfo *                    catInfo;
  2948.     UniCharCount                     nameLength;                    /* input name length for create/rename */
  2949.     const UniChar *                    name;                        /* input name for create/rename */
  2950.     long                             ioDirID;
  2951.     FSSpec *                        spec;
  2952.     FSRef *                            parentRef;                    /* ref of directory to move another ref to */
  2953.     FSRef *                            newRef;                        /* Output ref */
  2954.     TextEncoding                     textEncodingHint;            /* for Rename, MakeFSRefUnicode */
  2955.     HFSUniStr255 *                    outName;                    /* Output name for GetCatalogInfo */
  2956. };
  2957. typedef struct FSRefParam                FSRefParam;
  2958. typedef FSRefParam *                    FSRefParamPtr;
  2959. typedef struct OpaqueFSIterator*         FSIterator;
  2960. enum {
  2961.     kFSIterateFlat                = 0,                            /* Immediate children of container only */
  2962.     kFSIterateSubtree            = 1,                            /* Entire subtree rooted at container */
  2963.     kFSIterateReserved            = (long)0xFFFFFFFE
  2964. };
  2965.  
  2966.  
  2967. typedef OptionBits                         FSIteratorFlags;
  2968. enum {
  2969.                                                                 /* CatalogSearch constants */
  2970.     fsSBNodeID                    = 0x00008000,                    /* search by range of nodeID */
  2971.     fsSBAttributeModDate        = 0x00010000,                    /* search by range of attributeModDate */
  2972.     fsSBAccessDate                = 0x00020000,                    /* search by range of accessDate */
  2973.     fsSBPermissions                = 0x00040000,                    /* search by value/mask of permissions */
  2974.     fsSBNodeIDBit                = 15,
  2975.     fsSBAttributeModDateBit        = 16,
  2976.     fsSBAccessDateBit            = 17,
  2977.     fsSBPermissionsBit            = 18
  2978. };
  2979.  
  2980.  
  2981. struct FSSearchParams {
  2982.     Duration                         searchTime;                    /* a Time Manager duration */
  2983.     OptionBits                         searchBits;                    /* which fields to search on */
  2984.     UniCharCount                     searchNameLength;
  2985.     const UniChar *                    searchName;
  2986.     FSCatalogInfo *                    searchInfo1;                /* values and lower bounds */
  2987.     FSCatalogInfo *                    searchInfo2;                /* masks and upper bounds */
  2988. };
  2989. typedef struct FSSearchParams            FSSearchParams;
  2990. typedef FSSearchParams *                FSSearchParamsPtr;
  2991.  
  2992. struct FSCatalogBulkParam {
  2993.     QElemPtr                         qLink;                        /*queue link in header*/
  2994.     short                             qType;                        /*type byte for safety check*/
  2995.     short                             ioTrap;                        /*FS: the Trap*/
  2996.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  2997.     IOCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  2998.     volatile OSErr                     ioResult;                    /*result code*/
  2999.     Boolean                         containerChanged;            /* true if container changed since last iteration */
  3000.     UInt8                             reserved;                    /* make following fields 4-byte aligned */
  3001.  
  3002.     FSIteratorFlags                 iteratorFlags;
  3003.     FSIterator                         iterator;
  3004.     const FSRef *                    container;                    /* directory/volume to iterate */
  3005.     ItemCount                         maximumItems;
  3006.     ItemCount                         actualItems;
  3007.     FSCatalogInfoBitmap             whichInfo;
  3008.     FSCatalogInfo *                    catalogInfo;                /* returns an array */
  3009.     FSRef *                            refs;                        /* returns an array */
  3010.     FSSpec *                        specs;                        /* returns an array */
  3011.     HFSUniStr255 *                    names;                        /* returns an array */
  3012.     const FSSearchParams *            searchParams;
  3013. };
  3014. typedef struct FSCatalogBulkParam        FSCatalogBulkParam;
  3015. typedef FSCatalogBulkParam *            FSCatalogBulkParamPtr;
  3016.  
  3017. typedef UInt16                             FSAllocationFlags;
  3018. enum {
  3019.     kFSAllocDefaultFlags        = 0x0000,                        /* as much as possible, not contiguous */
  3020.     kFSAllocAllOrNothingMask    = 0x0001,                        /* allocate all of the space, or nothing */
  3021.     kFSAllocContiguousMask        = 0x0002,                        /* new space must be one contiguous piece */
  3022.     kFSAllocNoRoundUpMask        = 0x0004,                        /* don't round up allocation to clump size */
  3023.     kFSAllocReservedMask        = 0xFFF8                        /* these bits are reserved and must not be set */
  3024. };
  3025.  
  3026.  
  3027. struct FSForkIOParam {
  3028.     QElemPtr                         qLink;                        /*queue link in header*/
  3029.     short                             qType;                        /*type byte for safety check*/
  3030.     short                             ioTrap;                        /*FS: the Trap*/
  3031.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  3032.     IOCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  3033.     volatile OSErr                     ioResult;                    /*result code*/
  3034.     void *                            reserved1;                    /* was ioNamePtr */
  3035.     SInt16                             reserved2;                    /* was ioVRefNum */
  3036.     SInt16                             forkRefNum;                    /* same as ioRefNum */
  3037.     UInt8                             reserved3;                    /* was ioVersNum */
  3038.     SInt8                             permissions;                /* desired access to the fork */
  3039.     const FSRef *                    ref;                        /* which object to open */
  3040.  
  3041.  
  3042.     Ptr                             buffer;                        /*data buffer Ptr*/
  3043.     UInt32                             requestCount;                /*requested byte count*/
  3044.     UInt32                             actualCount;                /*actual byte count completed*/
  3045.     UInt16                             positionMode;                /*initial file positioning*/
  3046.     SInt64                             positionOffset;                /*file position offset*/
  3047.  
  3048.     FSAllocationFlags                 allocationFlags;
  3049.     UInt64                             allocationAmount;
  3050.  
  3051.     UniCharCount                     forkNameLength;                /* input; length of fork name */
  3052.     const UniChar *                    forkName;                    /* input; name of fork */
  3053.  
  3054.     CatPositionRec                     forkIterator;
  3055.     HFSUniStr255 *                    outForkName;                /* output; name of fork */
  3056. };
  3057. typedef struct FSForkIOParam            FSForkIOParam;
  3058. typedef FSForkIOParam *                    FSForkIOParamPtr;
  3059.  
  3060. struct FSForkInfo {
  3061.     SInt8                             flags;                        /* copy of FCB flags */
  3062.     SInt8                             permissions;
  3063.     FSVolumeRefNum                     volume;
  3064.     UInt32                             reserved2;
  3065.     UInt32                             nodeID;                        /* file or directory ID */
  3066.     UInt32                             forkID;                        /* fork ID */
  3067.     UInt64                             currentPosition;
  3068.     UInt64                             logicalEOF;
  3069.     UInt64                             physicalEOF;
  3070.     UInt64                             process;                    /* should be ProcessSerialNumber */
  3071. };
  3072. typedef struct FSForkInfo                FSForkInfo;
  3073. typedef FSForkInfo *                    FSForkInfoPtr;
  3074.  
  3075. struct FSForkCBInfoParam {
  3076.     QElemPtr                         qLink;                        /*queue link in header*/
  3077.     short                             qType;                        /*type byte for safety check*/
  3078.     short                             ioTrap;                        /*FS: the Trap*/
  3079.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  3080.     IOCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  3081.     volatile OSErr                     ioResult;                    /*result code*/
  3082.     SInt16                             desiredRefNum;                /* 0 to iterate, non-0 for specific refnum */
  3083.     SInt16                             volumeRefNum;                /* volume to match, or 0 for all volumes */
  3084.     SInt16                             iterator;                    /* 0 to start iteration */
  3085.     SInt16                             actualRefNum;                /* actual refnum found */
  3086.  
  3087.     FSRef *                            ref;
  3088.     FSForkInfo *                    forkInfo;
  3089.     HFSUniStr255 *                    forkName;
  3090. };
  3091. typedef struct FSForkCBInfoParam        FSForkCBInfoParam;
  3092. typedef FSForkCBInfoParam *                FSForkCBInfoParamPtr;
  3093.  
  3094. typedef UInt32                             FSVolumeInfoBitmap;
  3095. enum {
  3096.     kFSVolInfoNone                = 0x0000,
  3097.     kFSVolInfoCreateDate        = 0x0001,
  3098.     kFSVolInfoModDate            = 0x0002,
  3099.     kFSVolInfoBackupDate        = 0x0004,
  3100.     kFSVolInfoCheckedDate        = 0x0008,
  3101.     kFSVolInfoFileCount            = 0x0010,
  3102.     kFSVolInfoDirCount            = 0x0020,
  3103.     kFSVolInfoSizes                = 0x0040,                        /* totalBytes and freeBytes */
  3104.     kFSVolInfoBlocks            = 0x0080,                        /* blockSize, totalBlocks, freeBlocks */
  3105.     kFSVolInfoNextAlloc            = 0x0100,
  3106.     kFSVolInfoRsrcClump            = 0x0200,
  3107.     kFSVolInfoDataClump            = 0x0400,
  3108.     kFSVolInfoNextID            = 0x0800,
  3109.     kFSVolInfoFinderInfo        = 0x1000,
  3110.     kFSVolInfoFlags                = 0x2000,
  3111.     kFSVolInfoFSInfo            = 0x4000,                        /* filesystemID, signature */
  3112.     kFSVolInfoDriveInfo            = 0x8000,                        /* driveNumber, driverRefNum */
  3113.     kFSVolInfoGettableInfo        = 0xFFFF,                        /* This seems like it is here just for completeness */
  3114.     kFSVolInfoSettableInfo        = 0x3004                        /* backup date, Finder info, flags */
  3115. };
  3116.  
  3117.  
  3118.  
  3119. struct FSVolumeInfo {
  3120.                                                                 /* Dates -- zero means "never" or "unknown" */
  3121.     UTCDateTime                     createDate;
  3122.     UTCDateTime                     modifyDate;
  3123.     UTCDateTime                     backupDate;
  3124.     UTCDateTime                     checkedDate;
  3125.  
  3126.                                                                 /* File/Folder counts -- return zero if unknown */
  3127.     UInt32                             fileCount;                    /* total files on volume */
  3128.     UInt32                             folderCount;                /* total folders on volume */
  3129.                                                                 /* Note: no root directory counts */
  3130.  
  3131.     UInt64                             totalBytes;                    /* total number of bytes on volume */
  3132.     UInt64                             freeBytes;                    /* number of free bytes on volume */
  3133.  
  3134.                                                                 /* HFS and HFS Plus specific.  Set fields to zero if not appropriate */
  3135.     UInt32                             blockSize;                    /* size (in bytes) of allocation blocks */
  3136.     UInt32                             totalBlocks;                /* number of allocation blocks in volume */
  3137.     UInt32                             freeBlocks;                    /* number of unused allocation blocks */
  3138.     UInt32                             nextAllocation;                /* start of next allocation search */
  3139.     UInt32                             rsrcClumpSize;                /* default resource fork clump size */
  3140.     UInt32                             dataClumpSize;                /* default data fork clump size */
  3141.     UInt32                             nextCatalogID;                /* next unused catalog node ID ooo OYG ooo need to make HFSVolumes.h work Should be HFSCatalogNodeID*/
  3142.     UInt8                             finderInfo[32];                /* information used by Finder */
  3143.  
  3144.                                                                 /* Identifying information */
  3145.     UInt16                             flags;                        /* ioVAtrb */
  3146.     UInt16                             filesystemID;                /* ioVFSID */
  3147.     UInt16                             signature;                    /* ioVSigWord, unique within an FSID */
  3148.     UInt16                             driveNumber;                /* ioVDrvInfo */
  3149.     short                             driverRefNum;                /* ioVDRefNum */
  3150. };
  3151. typedef struct FSVolumeInfo                FSVolumeInfo;
  3152. typedef FSVolumeInfo *                    FSVolumeInfoPtr;
  3153.  
  3154. struct FSVolumeInfoParam {
  3155.     QElemPtr                         qLink;                        /*queue link in header*/
  3156.     short                             qType;                        /*type byte for safety check*/
  3157.     short                             ioTrap;                        /*FS: the Trap*/
  3158.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  3159.     IOCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  3160.     volatile OSErr                     ioResult;                    /*result code*/
  3161.     StringPtr                         ioNamePtr;                    /* unused */
  3162.     FSVolumeRefNum                     ioVRefNum;                    /* volume refnum */
  3163.  
  3164.     UInt32                             volumeIndex;                /* index, or 0 to use ioVRefNum */
  3165.     FSVolumeInfoBitmap                 whichInfo;                    /* which volumeInfo fields to get/set */
  3166.     FSVolumeInfo *                    volumeInfo;                    /* information about the volume */
  3167.     HFSUniStr255 *                    volumeName;                    /* output; pointer to volume name */
  3168.     FSRef *                            ref;                        /* volume's FSRef */
  3169. };
  3170. typedef struct FSVolumeInfoParam        FSVolumeInfoParam;
  3171. typedef FSVolumeInfoParam *                FSVolumeInfoParamPtr;
  3172. /*
  3173.       MakeFSRef
  3174.       Create an FSRef for an existing object specified by a combination
  3175.       of volume refnum, parent directory, and pathname.
  3176.       ->    ioCompletion    A pointer to a completion routine
  3177.       <-    ioResult        The result code of the function
  3178.       ->    ioNamePtr        A pointer to a pathname
  3179.       ->    ioVRefNum        A volume specification
  3180.       ->    ioDirID            A directory ID
  3181.       <-    newRef            A pointer to an FSRef
  3182. */
  3183. EXTERN_API( OSErr )
  3184. FSpMakeFSRef                    (const FSSpec *            source,
  3185.                                  FSRef *                newRef)                                THREEWORDINLINE(0x303C, 0x041A, 0xAA52);
  3186.  
  3187.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3188.                                                                                             #pragma parameter __D0 PBMakeFSRefSync(__A0)
  3189.                                                                                             #endif
  3190. EXTERN_API( OSErr )
  3191. PBMakeFSRefSync                    (FSRefParam *            paramBlock)                            TWOWORDINLINE(0x706E, 0xA260);
  3192.  
  3193.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3194.                                                                                             #pragma parameter PBMakeFSRefAsync(__A0)
  3195.                                                                                             #endif
  3196. EXTERN_API( void )
  3197. PBMakeFSRefAsync                (FSRefParam *            paramBlock)                            TWOWORDINLINE(0x706E, 0xA660);
  3198.  
  3199.  
  3200. /*
  3201.       MakeFSRefUnicode
  3202.       Create an FSRef for an existing object specified by 
  3203.       Parent FSRef and Unicode name.
  3204.       ->    ioCompletion    A pointer to a completion routine
  3205.       <-    ioResult        The result code of the function
  3206.       ->    ref                A pointer to the parent directory FSRef
  3207.       ->    name            A pointer to Unicde name
  3208.       ->    nameLength        The length of the Unicode Name
  3209.     ->  textEncodingHint A suggested text encoding to use for the name
  3210.       <-    newRef            A pointer to an FSRef
  3211. */
  3212. EXTERN_API( OSErr )
  3213. FSMakeFSRefUnicode                (const FSRef *            parentRef,
  3214.                                  UniCharCount             nameLength,
  3215.                                  const UniChar *        name,
  3216.                                  TextEncoding             textEncodingHint,
  3217.                                  FSRef *                newRef)                                THREEWORDINLINE(0x303C, 0x0A1B, 0xAA52);
  3218.  
  3219.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3220.                                                                                             #pragma parameter __D0 PBMakeFSRefUnicodeSync(__A0)
  3221.                                                                                             #endif
  3222. EXTERN_API( OSErr )
  3223. PBMakeFSRefUnicodeSync            (FSRefParam *            paramBlock)                            TWOWORDINLINE(0x707A, 0xA260);
  3224.  
  3225.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3226.                                                                                             #pragma parameter PBMakeFSRefUnicodeAsync(__A0)
  3227.                                                                                             #endif
  3228. EXTERN_API( void )
  3229. PBMakeFSRefUnicodeAsync            (FSRefParam *            paramBlock)                            TWOWORDINLINE(0x707A, 0xA660);
  3230.  
  3231.  
  3232. /*
  3233.       CompareFSRefs
  3234.       Test whether two FSRefs refer to the same file or directory.
  3235.       If they do, noErr is returned.  Otherwise, an appropriate error
  3236.       (such as errFSRefsDifferent) is returned.
  3237.       ->    ioCompletion    A pointer to a completion routine
  3238.       <-    ioResult        The result code of the function
  3239.       ->    ref                A pointer to the first FSRef
  3240.       ->    parentRef        A pointer to the second FSRef
  3241. */
  3242. EXTERN_API( OSErr )
  3243. FSCompareFSRefs                    (const FSRef *            ref1,
  3244.                                  const FSRef *            ref2)                                THREEWORDINLINE(0x303C, 0x0435, 0xAA52);
  3245.  
  3246.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3247.                                                                                             #pragma parameter __D0 PBCompareFSRefsSync(__A0)
  3248.                                                                                             #endif
  3249. EXTERN_API( OSErr )
  3250. PBCompareFSRefsSync                (FSRefParam *            paramBlock)                            TWOWORDINLINE(0x707C, 0xA260);
  3251.  
  3252.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3253.                                                                                             #pragma parameter PBCompareFSRefsAsync(__A0)
  3254.                                                                                             #endif
  3255. EXTERN_API( void )
  3256. PBCompareFSRefsAsync            (FSRefParam *            paramBlock)                            TWOWORDINLINE(0x707C, 0xA660);
  3257.  
  3258.  
  3259. /*
  3260.       CreateFileUnicode
  3261.       Creates a new file.  The input filename is in Unicode.
  3262.       You can optionally set catalog info for the file.
  3263.       ->    ioCompletion    A pointer to a completion routine
  3264.       <-    ioResult        The result code of the function
  3265.       ->    ref                The directory where the file is to be created
  3266.       ->    whichInfo        Which catalog info fields to set
  3267.       ->    catInfo            The values for catalog info fields to set; may be NULL
  3268.       ->    nameLength        Number of Unicode characters in the file's name
  3269.       ->    name            A pointer to the Unicode name
  3270.       <-    spec            A pointer to the FSSpec for the new directory; may be NULL
  3271.       <-    newRef            A pointer to the FSRef for the new file; may be NULL
  3272. */
  3273. EXTERN_API( OSErr )
  3274. FSCreateFileUnicode                (const FSRef *            parentRef,
  3275.                                  UniCharCount             nameLength,
  3276.                                  const UniChar *        name,
  3277.                                  FSCatalogInfoBitmap     whichInfo,
  3278.                                  const FSCatalogInfo *    catalogInfo, /* can be NULL */
  3279.                                  FSRef *                newRef, /* can be NULL */
  3280.                                  FSSpec *                newSpec) /* can be NULL */            THREEWORDINLINE(0x303C, 0x0E1C, 0xAA52);
  3281.  
  3282.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3283.                                                                                             #pragma parameter __D0 PBCreateFileUnicodeSync(__A0)
  3284.                                                                                             #endif
  3285. EXTERN_API( OSErr )
  3286. PBCreateFileUnicodeSync            (FSRefParam *            paramBlock)                            TWOWORDINLINE(0x7070, 0xA260);
  3287.  
  3288.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3289.                                                                                             #pragma parameter PBCreateFileUnicodeAsync(__A0)
  3290.                                                                                             #endif
  3291. EXTERN_API( void )
  3292. PBCreateFileUnicodeAsync        (FSRefParam *            paramBlock)                            TWOWORDINLINE(0x7070, 0xA660);
  3293.  
  3294.  
  3295. /*
  3296.       CreateDirectoryUnicode
  3297.       Creates a new directory.  The input directory name is in Unicode.
  3298.       You can optionally set catalog info for the directory.
  3299.       ->    ioCompletion    A pointer to a completion routine
  3300.       <-    ioResult        The result code of the function
  3301.       ->    ref                The parent directory where the directory is to be created
  3302.       ->    whichInfo        Which catalog info fields to set
  3303.       ->    catInfo            The values for catalog info fields to set; may be NULL
  3304.       ->    nameLength        Number of Unicode characters in the directory's name
  3305.       ->    name            A pointer to the Unicode name
  3306.       <-    ioDirID            The DirID of the new directory
  3307.       <-    spec            A pointer to the FSSpec for the new directory; may be NULL
  3308.       <-    newRef            A pointer to the FSRef for the new directory; may be NULL
  3309. */
  3310. EXTERN_API( OSErr )
  3311. FSCreateDirectoryUnicode        (const FSRef *            parentRef,
  3312.                                  UniCharCount             nameLength,
  3313.                                  const UniChar *        name,
  3314.                                  FSCatalogInfoBitmap     whichInfo,
  3315.                                  const FSCatalogInfo *    catalogInfo, /* can be NULL */
  3316.                                  FSRef *                newRef, /* can be NULL */
  3317.                                  FSSpec *                newSpec, /* can be NULL */
  3318.                                  UInt32 *                newDirID) /* can be NULL */            THREEWORDINLINE(0x303C, 0x101D, 0xAA52);
  3319.  
  3320.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3321.                                                                                             #pragma parameter __D0 PBCreateDirectoryUnicodeSync(__A0)
  3322.                                                                                             #endif
  3323. EXTERN_API( OSErr )
  3324. PBCreateDirectoryUnicodeSync    (FSRefParam *            paramBlock)                            TWOWORDINLINE(0x7071, 0xA260);
  3325.  
  3326.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3327.                                                                                             #pragma parameter PBCreateDirectoryUnicodeAsync(__A0)
  3328.                                                                                             #endif
  3329. EXTERN_API( void )
  3330. PBCreateDirectoryUnicodeAsync    (FSRefParam *            paramBlock)                            TWOWORDINLINE(0x7071, 0xA660);
  3331.  
  3332.  
  3333. /*
  3334.       DeleteObject
  3335.       Deletes an existing file or directory.
  3336.       ->    ioCompletion    A pointer to a completion routine
  3337.       <-    ioResult        The result code of the function
  3338.       ->    ref                The file or directory to be deleted
  3339. */
  3340. EXTERN_API( OSErr )
  3341. FSDeleteObject                    (const FSRef *            ref)                                THREEWORDINLINE(0x303C, 0x021E, 0xAA52);
  3342.  
  3343.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3344.                                                                                             #pragma parameter __D0 PBDeleteObjectSync(__A0)
  3345.                                                                                             #endif
  3346. EXTERN_API( OSErr )
  3347. PBDeleteObjectSync                (FSRefParam *            paramBlock)                            TWOWORDINLINE(0x7072, 0xA260);
  3348.  
  3349.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3350.                                                                                             #pragma parameter PBDeleteObjectAsync(__A0)
  3351.                                                                                             #endif
  3352. EXTERN_API( void )
  3353. PBDeleteObjectAsync                (FSRefParam *            paramBlock)                            TWOWORDINLINE(0x7072, 0xA660);
  3354.  
  3355.  
  3356. /*
  3357.       MoveObject
  3358.       Move an existing file or directory into a different directory.
  3359.       ->    ioCompletion    A pointer to a completion routine
  3360.       <-    ioResult        The result code of the function
  3361.       ->    ref                The file or directory to be moved
  3362.       ->    parentRef        The file or directory will be moved into this directory
  3363.       <-    newRef            A new FSRef for the file or directory in its new location;
  3364.                           optional, may be NULL
  3365.       NOTE: Moving an object may change its FSRef.  If you want to continue to
  3366.       refer to the object, you should pass a non-NULL pointer in newRef and use
  3367.       that returned FSRef to access the object after the move.  The FSRef passed
  3368.       in "ref" may or may not be usable to access the object after it is moved.
  3369.       "newRef" may point to the same storage as "parentRef" or "ref".
  3370. */
  3371. EXTERN_API( OSErr )
  3372. FSMoveObject                    (const FSRef *            ref,
  3373.                                  const FSRef *            destDirectory,
  3374.                                  FSRef *                newRef) /* can be NULL */            THREEWORDINLINE(0x303C, 0x061F, 0xAA52);
  3375.  
  3376.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3377.                                                                                             #pragma parameter __D0 PBMoveObjectSync(__A0)
  3378.                                                                                             #endif
  3379. EXTERN_API( OSErr )
  3380. PBMoveObjectSync                (FSRefParam *            paramBlock)                            TWOWORDINLINE(0x7073, 0xA260);
  3381.  
  3382.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3383.                                                                                             #pragma parameter PBMoveObjectAsync(__A0)
  3384.                                                                                             #endif
  3385. EXTERN_API( void )
  3386. PBMoveObjectAsync                (FSRefParam *            paramBlock)                            TWOWORDINLINE(0x7073, 0xA660);
  3387.  
  3388.  
  3389. /*
  3390.       ExchangeObjects
  3391.       swap the contents of two files.
  3392.       ->    ioCompletion    A pointer to a completion routine
  3393.       <-    ioResult        The result code of the function
  3394.       ->    ref                The first file 
  3395.       ->    parentRef        The second file 
  3396. */
  3397. EXTERN_API( OSErr )
  3398. FSExchangeObjects                (const FSRef *            ref,
  3399.                                  const FSRef *            destRef)                            THREEWORDINLINE(0x303C, 0x0421, 0xAA52);
  3400.  
  3401.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3402.                                                                                             #pragma parameter __D0 PBExchangeObjectsSync(__A0)
  3403.                                                                                             #endif
  3404. EXTERN_API( OSErr )
  3405. PBExchangeObjectsSync            (FSRefParam *            paramBlock)                            TWOWORDINLINE(0x7075, 0xA260);
  3406.  
  3407.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3408.                                                                                             #pragma parameter PBExchangeObjectsAsync(__A0)
  3409.                                                                                             #endif
  3410. EXTERN_API( void )
  3411. PBExchangeObjectsAsync            (FSRefParam *            paramBlock)                            TWOWORDINLINE(0x7075, 0xA660);
  3412.  
  3413.  
  3414. /*
  3415.       RenameUnicode
  3416.       Change the name of an existing file or directory.  The new name is in
  3417.       Unicode.
  3418.       ->    ioCompletion    A pointer to a completion routine
  3419.       <-    ioResult        The result code of the function
  3420.       ->    ref                The file or directory to be moved
  3421.       ->    nameLength        Number of Unicode characters in the new name
  3422.       ->    name            A pointer to the new Unicode name
  3423.     ->  textEncodingHint A suggested text encoding to use for the name
  3424.       <-    newRef            A new FSRef for the file or directory; may be NULL
  3425.       NOTE: Renaming an object may change its FSRef.  If you want to continue to
  3426.       refer to the object, you should pass a non-NULL pointer in newRef and use
  3427.       that returned FSRef to access the object after the rename.  The FSRef passed
  3428.       in "ref" may or may not be usable to access the object after it is renamed.
  3429.       "newRef" may point to the same storage as "ref".
  3430. */
  3431. EXTERN_API( OSErr )
  3432. FSRenameUnicode                    (const FSRef *            ref,
  3433.                                  UniCharCount             nameLength,
  3434.                                  const UniChar *        name,
  3435.                                  TextEncoding             textEncodingHint,
  3436.                                  FSRef *                newRef) /* can be NULL */            THREEWORDINLINE(0x303C, 0x0A20, 0xAA52);
  3437.  
  3438.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3439.                                                                                             #pragma parameter __D0 PBRenameUnicodeSync(__A0)
  3440.                                                                                             #endif
  3441. EXTERN_API( OSErr )
  3442. PBRenameUnicodeSync                (FSRefParam *            paramBlock)                            TWOWORDINLINE(0x7074, 0xA260);
  3443.  
  3444.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3445.                                                                                             #pragma parameter PBRenameUnicodeAsync(__A0)
  3446.                                                                                             #endif
  3447. EXTERN_API( void )
  3448. PBRenameUnicodeAsync            (FSRefParam *            paramBlock)                            TWOWORDINLINE(0x7074, 0xA660);
  3449.  
  3450.  
  3451. /*
  3452.       GetCatalogInfo
  3453.       Returns various information about a given file or directory.
  3454.       ->    ioCompletion    A pointer to a completion routine
  3455.       <-    ioResult        The result code of the function
  3456.       ->    ref                The file or directory whose information is to be returned
  3457.       ->    whichInfo        Which catalog info fields to get
  3458.       <-    catInfo            The returned values of catalog info fields; may be NULL
  3459.       <-    spec            A pointer to the FSSpec for the object; may be NULL
  3460.       <-    parentRef        A pointer to the FSRef for the object's parent directory; may be NULL
  3461.       <-    outName            The Unicode name is returned here.  This pointer may be NULL.
  3462.       Note: All of the outputs are optional; if you don't want that particular output, just
  3463.       set its pointer to NULL.  This is the call to use to map from an FSRef to an FSSpec.
  3464. */
  3465. EXTERN_API( OSErr )
  3466. FSGetCatalogInfo                (const FSRef *            ref,
  3467.                                  FSCatalogInfoBitmap     whichInfo,
  3468.                                  FSCatalogInfo *        catalogInfo, /* can be NULL */
  3469.                                  HFSUniStr255 *            outName, /* can be NULL */
  3470.                                  FSSpec *                fsSpec, /* can be NULL */
  3471.                                  FSRef *                parentRef) /* can be NULL */        THREEWORDINLINE(0x303C, 0x0C22, 0xAA52);
  3472.  
  3473.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3474.                                                                                             #pragma parameter __D0 PBGetCatalogInfoSync(__A0)
  3475.                                                                                             #endif
  3476. EXTERN_API( OSErr )
  3477. PBGetCatalogInfoSync            (FSRefParam *            paramBlock)                            TWOWORDINLINE(0x7076, 0xA260);
  3478.  
  3479.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3480.                                                                                             #pragma parameter PBGetCatalogInfoAsync(__A0)
  3481.                                                                                             #endif
  3482. EXTERN_API( void )
  3483. PBGetCatalogInfoAsync            (FSRefParam *            paramBlock)                            TWOWORDINLINE(0x7076, 0xA660);
  3484.  
  3485.  
  3486. /*
  3487.       SetCatalogInfo
  3488.       Set catalog information about a given file or directory.
  3489.       ->    ioCompletion    A pointer to a completion routine
  3490.       <-    ioResult        The result code of the function
  3491.       ->    ref                The file or directory whose information is to be changed
  3492.       ->    whichInfo        Which catalog info fields to set
  3493.       ->    catInfo            The new values of catalog info fields
  3494.       Note: Only some of the catalog info fields may be set.  The settable fields
  3495.       are given by the constant kFSCatInfoSettableInfo; no other bits may be set in
  3496.       whichInfo.
  3497. */
  3498. EXTERN_API( OSErr )
  3499. FSSetCatalogInfo                (const FSRef *            ref,
  3500.                                  FSCatalogInfoBitmap     whichInfo,
  3501.                                  const FSCatalogInfo *    catalogInfo)                        THREEWORDINLINE(0x303C, 0x0623, 0xAA52);
  3502.  
  3503.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3504.                                                                                             #pragma parameter __D0 PBSetCatalogInfoSync(__A0)
  3505.                                                                                             #endif
  3506. EXTERN_API( OSErr )
  3507. PBSetCatalogInfoSync            (FSRefParam *            paramBlock)                            TWOWORDINLINE(0x7077, 0xA260);
  3508.  
  3509.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3510.                                                                                             #pragma parameter PBSetCatalogInfoAsync(__A0)
  3511.                                                                                             #endif
  3512. EXTERN_API( void )
  3513. PBSetCatalogInfoAsync            (FSRefParam *            paramBlock)                            TWOWORDINLINE(0x7077, 0xA660);
  3514.  
  3515.  
  3516. /*
  3517.       OpenIterator
  3518.       Creates an FSIterator to iterate over a directory or subtree.  The
  3519.       iterator can then be passed to GetCatalogInfoBulk or CatalogSearch.
  3520.       ->    ioCompletion    A pointer to a completion routine
  3521.       <-    ioResult        The result code of the function
  3522.       <-    iterator        The returned FSIterator
  3523.       ->    iteratorFlags    Controls whether the iterator iterates over subtrees
  3524.                           or just the immediate children of the container.
  3525.       ->    container        An FSRef for the directory to iterate (or root of
  3526.                           the subtree to iterate).
  3527. */
  3528. EXTERN_API( OSErr )
  3529. FSOpenIterator                    (const FSRef *            container,
  3530.                                  FSIteratorFlags         iteratorFlags,
  3531.                                  FSIterator *            iterator)                            THREEWORDINLINE(0x303C, 0x0624, 0xAA52);
  3532.  
  3533.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3534.                                                                                             #pragma parameter __D0 PBOpenIteratorSync(__A0)
  3535.                                                                                             #endif
  3536. EXTERN_API( OSErr )
  3537. PBOpenIteratorSync                (FSCatalogBulkParam *    paramBlock)                            TWOWORDINLINE(0x7078, 0xA260);
  3538.  
  3539.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3540.                                                                                             #pragma parameter PBOpenIteratorAsync(__A0)
  3541.                                                                                             #endif
  3542. EXTERN_API( void )
  3543. PBOpenIteratorAsync                (FSCatalogBulkParam *    paramBlock)                            TWOWORDINLINE(0x7078, 0xA660);
  3544.  
  3545.  
  3546. /*
  3547.       CloseIterator
  3548.       Invalidates and disposes an FSIterator.
  3549.       ->    ioCompletion    A pointer to a completion routine
  3550.       <-    ioResult        The result code of the function
  3551.       ->    iterator        The returned FSIterator
  3552. */
  3553. EXTERN_API( OSErr )
  3554. FSCloseIterator                    (FSIterator             iterator)                            THREEWORDINLINE(0x303C, 0x0225, 0xAA52);
  3555.  
  3556.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3557.                                                                                             #pragma parameter __D0 PBCloseIteratorSync(__A0)
  3558.                                                                                             #endif
  3559. EXTERN_API( OSErr )
  3560. PBCloseIteratorSync                (FSCatalogBulkParam *    paramBlock)                            TWOWORDINLINE(0x705B, 0xA260);
  3561.  
  3562.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3563.                                                                                             #pragma parameter PBCloseIteratorAsync(__A0)
  3564.                                                                                             #endif
  3565. EXTERN_API( void )
  3566. PBCloseIteratorAsync            (FSCatalogBulkParam *    paramBlock)                            TWOWORDINLINE(0x705B, 0xA660);
  3567.  
  3568.  
  3569. /*
  3570.       GetCatalogInfoBulk
  3571.       Iterates over catalog objects and returns information about them.
  3572.       For now, iterator must have been created with kFSIterateFlat option.
  3573.       ->    ioCompletion    A pointer to a completion routine
  3574.       <-    ioResult        The result code of the function
  3575.       ->    iterator        The iterator
  3576.       ->    maximumItems    The maximum number of items to return
  3577.       <-    actualItems        The actual number of items returned
  3578.       <-    containerChanged Set to true if the container's contents changed
  3579.       ->    whichInfo        The catalog information fields to return for each item
  3580.       <-    catalogInfo        An array of catalog information; one for each returned item
  3581.       <-    refs            An array of FSRefs; one for each returned item
  3582.       <-    specs            An array of FSSpecs; one for each returned item
  3583.       <-    names            An array of filenames; one for each returned item
  3584.       Note: The catalogInfo, refs, specs, names, and containerChanged are all optional outputs;
  3585.       if you don't want that particular output, set its pointer to NULL.
  3586. */
  3587. EXTERN_API( OSErr )
  3588. FSGetCatalogInfoBulk            (FSIterator             iterator,
  3589.                                  ItemCount                 maximumObjects,
  3590.                                  ItemCount *            actualObjects,
  3591.                                  Boolean *                containerChanged, /* can be NULL */
  3592.                                  FSCatalogInfoBitmap     whichInfo,
  3593.                                  FSCatalogInfo *        catalogInfos, /* can be NULL */
  3594.                                  FSRef *                refs, /* can be NULL */
  3595.                                  FSSpec *                specs, /* can be NULL */
  3596.                                  HFSUniStr255 *            names) /* can be NULL */            THREEWORDINLINE(0x303C, 0x1226, 0xAA52);
  3597.  
  3598.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3599.                                                                                             #pragma parameter __D0 PBGetCatalogInfoBulkSync(__A0)
  3600.                                                                                             #endif
  3601. EXTERN_API( OSErr )
  3602. PBGetCatalogInfoBulkSync        (FSCatalogBulkParam *    paramBlock)                            TWOWORDINLINE(0x705C, 0xA260);
  3603.  
  3604.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3605.                                                                                             #pragma parameter PBGetCatalogInfoBulkAsync(__A0)
  3606.                                                                                             #endif
  3607. EXTERN_API( void )
  3608. PBGetCatalogInfoBulkAsync        (FSCatalogBulkParam *    paramBlock)                            TWOWORDINLINE(0x705C, 0xA660);
  3609.  
  3610. /*
  3611.       CatalogSearch
  3612.       Iterates over catalog objects, searching for objects that match given
  3613.       search criteria.  Returns various information about matching objects.
  3614.       For now, iterator must have been created with kFSIterateSubtree option
  3615.       and the container must have been the root directory of a volume.
  3616.       ->    ioCompletion    A pointer to a completion routine
  3617.       <-    ioResult        The result code of the function
  3618.       ->    iterator        The iterator
  3619.       ->    maximumItems    The maximum number of items to return
  3620.       <-    actualItems        The actual number of items returned
  3621.       <-    containerChanged Set to true if the container's contents changed
  3622.       ->    whichInfo        The catalog information fields to return for each item
  3623.       <-    catalogInfo        An array of catalog information; one for each returned item
  3624.       <-    refs            An array of FSRefs; one for each returned item
  3625.       <-    specs            An array of FSSpecs; one for each returned item
  3626.       <-    names            An array of filenames; one for each returned item
  3627.       ->    searchParams    The criteria that controls the matching, including timeout, a bitmap
  3628.                           controlling the fields to compare, and the (Unicode) name to compare.
  3629.       Note: The catalogInfo, refs, specs, and names are all optional outputs; if you don't want
  3630.       that particular output, set its pointer to NULL.
  3631. */
  3632. EXTERN_API( OSErr )
  3633. FSCatalogSearch                    (FSIterator             iterator,
  3634.                                  const FSSearchParams *    searchCriteria,
  3635.                                  ItemCount                 maximumObjects,
  3636.                                  ItemCount *            actualObjects,
  3637.                                  Boolean *                containerChanged, /* can be NULL */
  3638.                                  FSCatalogInfoBitmap     whichInfo,
  3639.                                  FSCatalogInfo *        catalogInfos, /* can be NULL */
  3640.                                  FSRef *                refs, /* can be NULL */
  3641.                                  FSSpec *                specs, /* can be NULL */
  3642.                                  HFSUniStr255 *            names) /* can be NULL */            THREEWORDINLINE(0x303C, 0x1427, 0xAA52);
  3643.  
  3644.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3645.                                                                                             #pragma parameter __D0 PBCatalogSearchSync(__A0)
  3646.                                                                                             #endif
  3647. EXTERN_API( OSErr )
  3648. PBCatalogSearchSync                (FSCatalogBulkParam *    paramBlock)                            TWOWORDINLINE(0x705D, 0xA260);
  3649.  
  3650.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3651.                                                                                             #pragma parameter PBCatalogSearchAsync(__A0)
  3652.                                                                                             #endif
  3653. EXTERN_API( void )
  3654. PBCatalogSearchAsync            (FSCatalogBulkParam *    paramBlock)                            TWOWORDINLINE(0x705D, 0xA660);
  3655.  
  3656.  
  3657. /*
  3658.       CreateFork
  3659.       Create a named fork for a file or directory.
  3660.       ->    ioCompletion    A pointer to a completion routine
  3661.       <-    ioResult        The result code of the function
  3662.       ->    ref                The file or directory
  3663.       ->    forkNameLength    The length of the fork name (in Unicode characters)
  3664.       ->    forkName        The name of the fork to open (in Unicode)
  3665. */
  3666. EXTERN_API( OSErr )
  3667. FSCreateFork                    (const FSRef *            ref,
  3668.                                  UniCharCount             forkNameLength,
  3669.                                  const UniChar *        forkName) /* can be NULL */            THREEWORDINLINE(0x303C, 0x0636, 0xAA52);
  3670.  
  3671.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3672.                                                                                             #pragma parameter __D0 PBCreateForkSync(__A0)
  3673.                                                                                             #endif
  3674. EXTERN_API( OSErr )
  3675. PBCreateForkSync                (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x707D, 0xA260);
  3676.  
  3677.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3678.                                                                                             #pragma parameter PBCreateForkAsync(__A0)
  3679.                                                                                             #endif
  3680. EXTERN_API( void )
  3681. PBCreateForkAsync                (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x707D, 0xA660);
  3682.  
  3683.  
  3684. /*
  3685.       DeleteFork
  3686.       Delete a named fork of a file or directory.
  3687.       ->    ioCompletion    A pointer to a completion routine
  3688.       <-    ioResult        The result code of the function
  3689.       ->    ref                The file or directory
  3690.       ->    forkNameLength    The length of the fork name (in Unicode characters)
  3691.       ->    forkName        The name of the fork to open (in Unicode)
  3692. */
  3693. EXTERN_API( OSErr )
  3694. FSDeleteFork                    (const FSRef *            ref,
  3695.                                  UniCharCount             forkNameLength,
  3696.                                  const UniChar *        forkName) /* can be NULL */            THREEWORDINLINE(0x303C, 0x0637, 0xAA52);
  3697.  
  3698.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3699.                                                                                             #pragma parameter __D0 PBDeleteForkSync(__A0)
  3700.                                                                                             #endif
  3701. EXTERN_API( OSErr )
  3702. PBDeleteForkSync                (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x707E, 0xA260);
  3703.  
  3704.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3705.                                                                                             #pragma parameter PBDeleteForkAsync(__A0)
  3706.                                                                                             #endif
  3707. EXTERN_API( void )
  3708. PBDeleteForkAsync                (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x707E, 0xA660);
  3709.  
  3710.  
  3711. /*
  3712.       IterateForks
  3713.       Return the names and sizes of the forks of a file or directory.
  3714.       One fork is returned per call.
  3715.       ->    ioCompletion    A pointer to a completion routine.
  3716.       <-    ioResult        The result code of the function.
  3717.       ->    ref                The file or directory containing the forks.
  3718.       <-    positionOffset    The length of the fork, in bytes.
  3719.       <-    allocationAmount The space allocated to the fork (physical length).
  3720.       <-    outForkName        The name of the fork in Unicode.
  3721.       <>    forkIterator    Maintains state between calls for a given FSRef.
  3722.                           Before the first call, set the initialize field to zero.
  3723. */
  3724. EXTERN_API( OSErr )
  3725. FSIterateForks                    (const FSRef *            ref,
  3726.                                  CatPositionRec *        forkIterator,
  3727.                                  HFSUniStr255 *            forkName, /* can be NULL */
  3728.                                  SInt64 *                forkSize, /* can be NULL */
  3729.                                  UInt64 *                forkPhysicalSize) /* can be NULL */    THREEWORDINLINE(0x303C, 0x0A38, 0xAA52);
  3730.  
  3731.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3732.                                                                                             #pragma parameter __D0 PBIterateForksSync(__A0)
  3733.                                                                                             #endif
  3734. EXTERN_API( OSErr )
  3735. PBIterateForksSync                (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x707F, 0xA260);
  3736.  
  3737.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3738.                                                                                             #pragma parameter PBIterateForksAsync(__A0)
  3739.                                                                                             #endif
  3740. EXTERN_API( void )
  3741. PBIterateForksAsync                (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x707F, 0xA660);
  3742.  
  3743.  
  3744. /*
  3745.       OpenFork
  3746.       Open a fork for reading and/or writing.  Allows the opened fork
  3747.       to grow beyond 2GB in size.  All volumes should support data and
  3748.       resource forks.  Other named forks may be supported by some
  3749.       volumes.
  3750.       ->    ioCompletion    A pointer to a completion routine
  3751.       <-    ioResult        The result code of the function
  3752.       ->    ref                The file or directory containing the fork to open
  3753.       ->    forkNameLength    The length of the fork name (in Unicode characters)
  3754.       ->    forkName        The name of the fork to open (in Unicode)
  3755.       ->    permissions        The access (read and/or write) you want
  3756.       <-    forkRefNum        The reference number for accessing the open fork
  3757. */
  3758. EXTERN_API( OSErr )
  3759. FSOpenFork                        (const FSRef *            ref,
  3760.                                  UniCharCount             forkNameLength,
  3761.                                  const UniChar *        forkName, /* can be NULL */
  3762.                                  SInt8                     permissions,
  3763.                                  SInt16 *                forkRefNum)                            THREEWORDINLINE(0x303C, 0x0928, 0xAA52);
  3764.  
  3765.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3766.                                                                                             #pragma parameter __D0 PBOpenForkSync(__A0)
  3767.                                                                                             #endif
  3768. EXTERN_API( OSErr )
  3769. PBOpenForkSync                    (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x7079, 0xA260);
  3770.  
  3771.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3772.                                                                                             #pragma parameter PBOpenForkAsync(__A0)
  3773.                                                                                             #endif
  3774. EXTERN_API( void )
  3775. PBOpenForkAsync                    (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x7079, 0xA660);
  3776.  
  3777.  
  3778. /*
  3779.       ReadFork
  3780.       Read data from a fork opened via OpenFork.  The first byte to read is
  3781.       indicated by a combination of positionMode and positionOffset.
  3782.       ->    ioCompletion    A pointer to a completion routine
  3783.       <-    ioResult        The result code of the function
  3784.       ->    forkRefNum        The reference number of the fork to read from
  3785.       <-    buffer            Pointer to buffer where data will be returned
  3786.       ->    requestCount    The number of bytes to read
  3787.       <-    actualCount        The number of bytes actually read
  3788.       ->    positionMode    The base location for start of read
  3789.       ->    positionOffset    The offset from base location for start of read
  3790. */
  3791. EXTERN_API( OSErr )
  3792. FSReadFork                        (SInt16                 forkRefNum,
  3793.                                  UInt16                 positionMode,
  3794.                                  SInt64                 positionOffset,
  3795.                                  ByteCount                 requestCount,
  3796.                                  void *                    buffer,
  3797.                                  ByteCount *            actualCount) /* can be NULL */        THREEWORDINLINE(0x303C, 0x0A29, 0xAA52);
  3798.  
  3799.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3800.                                                                                             #pragma parameter __D0 PBReadForkSync(__A0)
  3801.                                                                                             #endif
  3802. EXTERN_API( OSErr )
  3803. PBReadForkSync                    (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x7051, 0xA2A8);
  3804.  
  3805.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3806.                                                                                             #pragma parameter PBReadForkAsync(__A0)
  3807.                                                                                             #endif
  3808. EXTERN_API( void )
  3809. PBReadForkAsync                    (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x7051, 0xA6A8);
  3810.  
  3811.  
  3812. /*
  3813.       WriteFork
  3814.       Write data to a fork opened via OpenFork.  The first byte to write is
  3815.       indicated by a combination of positionMode and positionOffset.
  3816.       ->    ioCompletion    A pointer to a completion routine
  3817.       <-    ioResult        The result code of the function
  3818.       ->    forkRefNum        The reference number of the fork to write to
  3819.       ->    buffer            Pointer to data to write
  3820.       ->    requestCount    The number of bytes to write
  3821.       <-    actualCount        The number of bytes actually written
  3822.       ->    positionMode    The base location for start of write
  3823.       ->    positionOffset    The offset from base location for start of write
  3824. */
  3825. EXTERN_API( OSErr )
  3826. FSWriteFork                        (SInt16                 forkRefNum,
  3827.                                  UInt16                 positionMode,
  3828.                                  SInt64                 positionOffset,
  3829.                                  ByteCount                 requestCount,
  3830.                                  void *                    buffer,
  3831.                                  ByteCount *            actualCount) /* can be NULL */        THREEWORDINLINE(0x303C, 0x0A2A, 0xAA52);
  3832.  
  3833.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3834.                                                                                             #pragma parameter __D0 PBWriteForkSync(__A0)
  3835.                                                                                             #endif
  3836. EXTERN_API( OSErr )
  3837. PBWriteForkSync                    (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x7052, 0xA2A8);
  3838.  
  3839.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3840.                                                                                             #pragma parameter PBWriteForkAsync(__A0)
  3841.                                                                                             #endif
  3842. EXTERN_API( void )
  3843. PBWriteForkAsync                (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x7052, 0xA6A8);
  3844.  
  3845.  
  3846. /*
  3847.       GetForkPosition
  3848.       Get the current (default) position of a fork that was
  3849.       opened via OpenFork.
  3850.       ->    ioCompletion    A pointer to a completion routine
  3851.       <-    ioResult        The result code of the function
  3852.       ->    forkRefNum        The reference number of the fork
  3853.       <-    positionOffset    The current position of the fork
  3854. */
  3855. EXTERN_API( OSErr )
  3856. FSGetForkPosition                (SInt16                 forkRefNum,
  3857.                                  SInt64 *                position)                            THREEWORDINLINE(0x303C, 0x032B, 0xAA52);
  3858.  
  3859.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3860.                                                                                             #pragma parameter __D0 PBGetForkPositionSync(__A0)
  3861.                                                                                             #endif
  3862. EXTERN_API( OSErr )
  3863. PBGetForkPositionSync            (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x7053, 0xA260);
  3864.  
  3865.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3866.                                                                                             #pragma parameter PBGetForkPositionAsync(__A0)
  3867.                                                                                             #endif
  3868. EXTERN_API( void )
  3869. PBGetForkPositionAsync            (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x7053, 0xA660);
  3870.  
  3871.  
  3872. /*
  3873.       SetForkPosition
  3874.       Set the current (default) position of a fork that was
  3875.       opened via OpenFork.
  3876.       ->    ioCompletion    A pointer to a completion routine
  3877.       <-    ioResult        The result code of the function
  3878.       ->    forkRefNum        The reference number of the fork
  3879.       ->    positionMode    The base location for the new position
  3880.       ->    positionOffset    The offset of the new position from the base
  3881. */
  3882. EXTERN_API( OSErr )
  3883. FSSetForkPosition                (SInt16                 forkRefNum,
  3884.                                  UInt16                 positionMode,
  3885.                                  SInt64                 positionOffset)                        THREEWORDINLINE(0x303C, 0x042C, 0xAA52);
  3886.  
  3887.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3888.                                                                                             #pragma parameter __D0 PBSetForkPositionSync(__A0)
  3889.                                                                                             #endif
  3890. EXTERN_API( OSErr )
  3891. PBSetForkPositionSync            (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x7054, 0xA260);
  3892.  
  3893.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3894.                                                                                             #pragma parameter PBSetForkPositionAsync(__A0)
  3895.                                                                                             #endif
  3896. EXTERN_API( void )
  3897. PBSetForkPositionAsync            (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x7054, 0xA660);
  3898.  
  3899.  
  3900. /*
  3901.       GetForkSize
  3902.       Get the current logical size (end-of-file) of an open fork.
  3903.       ->    ioCompletion    A pointer to a completion routine
  3904.       <-    ioResult        The result code of the function
  3905.       ->    forkRefNum        The reference number of the fork
  3906.       <-    positionOffset    The logical size of the fork, in bytes
  3907. */
  3908. EXTERN_API( OSErr )
  3909. FSGetForkSize                    (SInt16                 forkRefNum,
  3910.                                  SInt64 *                forkSize)                            THREEWORDINLINE(0x303C, 0x032D, 0xAA52);
  3911.  
  3912.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3913.                                                                                             #pragma parameter __D0 PBGetForkSizeSync(__A0)
  3914.                                                                                             #endif
  3915. EXTERN_API( OSErr )
  3916. PBGetForkSizeSync                (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x7055, 0xA260);
  3917.  
  3918.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3919.                                                                                             #pragma parameter PBGetForkSizeAsync(__A0)
  3920.                                                                                             #endif
  3921. EXTERN_API( void )
  3922. PBGetForkSizeAsync                (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x7055, 0xA660);
  3923.  
  3924.  
  3925. /*
  3926.       SetForkSize
  3927.       Set the logical size (end-of-file) of an open fork.  This
  3928.       may cause space to be allocated or deallocated.
  3929.       ->    ioCompletion    A pointer to a completion routine
  3930.       <-    ioResult        The result code of the function
  3931.       ->    forkRefNum        The reference number of the fork
  3932.       ->    positionMode    The base location for the new size
  3933.       ->    positionOffset    The offset of the new size from the base
  3934. */
  3935. EXTERN_API( OSErr )
  3936. FSSetForkSize                    (SInt16                 forkRefNum,
  3937.                                  UInt16                 positionMode,
  3938.                                  SInt64                 positionOffset)                        THREEWORDINLINE(0x303C, 0x042E, 0xAA52);
  3939.  
  3940.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3941.                                                                                             #pragma parameter __D0 PBSetForkSizeSync(__A0)
  3942.                                                                                             #endif
  3943. EXTERN_API( OSErr )
  3944. PBSetForkSizeSync                (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x7056, 0xA260);
  3945.  
  3946.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3947.                                                                                             #pragma parameter PBSetForkSizeAsync(__A0)
  3948.                                                                                             #endif
  3949. EXTERN_API( void )
  3950. PBSetForkSizeAsync                (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x7056, 0xA660);
  3951.  
  3952.  
  3953. /*
  3954.       AllocateFork
  3955.       Allocate space to an open fork.  Typically, the space to be
  3956.       allocated is beyond the current size of the fork, to reserve
  3957.       space so the file will be able to grow later.  Some volume
  3958.       formats are unable to allocate space beyond the logical size
  3959.       of the fork.
  3960.       ->    ioCompletion    A pointer to a completion routine
  3961.       <-    ioResult        The result code of the function
  3962.       ->    forkRefNum        The reference number of the fork
  3963.       ->    positionMode    The base location for start of allocation
  3964.       ->    positionOffset    The offset of the start of allocation
  3965.       ->    allocationFlags    Zero or more of the following flags:
  3966.           kFSAllocContiguousMask
  3967.                   Any newly allocated space must be one contiguous piece.
  3968.           kFSAllocAllOrNothingMask
  3969.                   All of the request space must be available, or the call
  3970.                   will fail.  (If not set, the call may succeed even though
  3971.                   some of the requested space wasn't allocated.)
  3972.           kFSAllocNoRoundUpMask
  3973.                   Do not allocate additional space.  (If not set, a volume
  3974.                   may allocate additional space in order to reduce fragmentation.)
  3975.       <>    allocationAmount    The number of bytes to allocate
  3976.                               On output, the number of bytes actually added
  3977. */
  3978. EXTERN_API( OSErr )
  3979. FSAllocateFork                    (SInt16                 forkRefNum,
  3980.                                  FSAllocationFlags         flags,
  3981.                                  UInt16                 positionMode,
  3982.                                  SInt64                 positionOffset,
  3983.                                  UInt64                 requestCount,
  3984.                                  UInt64 *                actualCount) /* can be NULL */        THREEWORDINLINE(0x303C, 0x092F, 0xAA52);
  3985.  
  3986.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3987.                                                                                             #pragma parameter __D0 PBAllocateForkSync(__A0)
  3988.                                                                                             #endif
  3989. EXTERN_API( OSErr )
  3990. PBAllocateForkSync                (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x7057, 0xA260);
  3991.  
  3992.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3993.                                                                                             #pragma parameter PBAllocateForkAsync(__A0)
  3994.                                                                                             #endif
  3995. EXTERN_API( void )
  3996. PBAllocateForkAsync                (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x7057, 0xA660);
  3997.  
  3998.  
  3999. /*
  4000.       FlushFork
  4001.       Flush a fork.  Any data written to this fork refnum is flushed to the device.
  4002.       The volume's control structures are also flushed to the device.
  4003.       ->    ioCompletion    A pointer to a completion routine
  4004.       <-    ioResult        The result code of the function
  4005.       ->    forkRefNum        The reference number of the fork to flush
  4006. */
  4007. EXTERN_API( OSErr )
  4008. FSFlushFork                        (SInt16                 forkRefNum)                            THREEWORDINLINE(0x303C, 0x0130, 0xAA52);
  4009.  
  4010.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  4011.                                                                                             #pragma parameter __D0 PBFlushForkSync(__A0)
  4012.                                                                                             #endif
  4013. EXTERN_API( OSErr )
  4014. PBFlushForkSync                    (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x7058, 0xA260);
  4015.  
  4016.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  4017.                                                                                             #pragma parameter PBFlushForkAsync(__A0)
  4018.                                                                                             #endif
  4019. EXTERN_API( void )
  4020. PBFlushForkAsync                (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x7058, 0xA660);
  4021.  
  4022.  
  4023. /*
  4024.       CloseFork
  4025.       Flush and close a fork.  Any data written to this fork refnum is flushed
  4026.       to the device.  The volume's control structures are also flushed to the device.
  4027.       ->    ioCompletion    A pointer to a completion routine
  4028.       <-    ioResult        The result code of the function
  4029.       ->    forkRefNum        The reference number of the fork to close
  4030. */
  4031. EXTERN_API( OSErr )
  4032. FSCloseFork                        (SInt16                 forkRefNum)                            THREEWORDINLINE(0x303C, 0x0131, 0xAA52);
  4033.  
  4034.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  4035.                                                                                             #pragma parameter __D0 PBCloseForkSync(__A0)
  4036.                                                                                             #endif
  4037. EXTERN_API( OSErr )
  4038. PBCloseForkSync                    (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x7059, 0xA260);
  4039.  
  4040.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  4041.                                                                                             #pragma parameter PBCloseForkAsync(__A0)
  4042.                                                                                             #endif
  4043. EXTERN_API( void )
  4044. PBCloseForkAsync                (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x7059, 0xA660);
  4045.  
  4046.  
  4047. /*
  4048.       GetForkCBInfo
  4049.       Return information about an open fork.
  4050.       ->    ioCompletion    A pointer to a completion routine
  4051.       <-    ioResult        The result code of the function
  4052.       <>    desiredRefNum    If non-zero on input, then get information for this refnum;
  4053.                           unchanged on output.  If zero on input, iterate over all open
  4054.                           forks (possibly limited to a single volume); on output, contains
  4055.                           the fork's refnum.
  4056.       ->    volumeRefNum    Used when desiredRefNum is zero on input.  Set to 0 to iterate over all
  4057.                           volumes, or set to a FSVolumeRefNum to limit iteration to that volume.
  4058.       <>    iterator        Used when desiredRefNum is zero on input.  Set to 0 before iterating.
  4059.                           Pass the iterator returned by the previous call to continue iterating.
  4060.       <-    actualRefNum    The refnum of the open fork.
  4061.       <-    ref                The FSRef for the file or directory that contains the fork.
  4062.       <-    forkInfo        Various information about the open fork.
  4063.       <-    outForkName        The name of the fork
  4064.       Note: the foundRefNum, ref, forkInfo, and fork name outputs are all optional; if you don't want
  4065.       a particular output, then set its pointer to NULL.  If forkName is NULL, then forkNameLength
  4066.       will be undefined.
  4067.       Note: Returning the forkInfo generally does not require a disk access.  Returning the
  4068.       ref or forkName may cause disk access for some volume formats.
  4069. */
  4070. EXTERN_API( OSErr )
  4071. FSGetForkCBInfo                    (SInt16                 desiredRefNum,
  4072.                                  FSVolumeRefNum         volume,
  4073.                                  SInt16 *                iterator, /* can be NULL */
  4074.                                  SInt16 *                actualRefNum, /* can be NULL */
  4075.                                  FSForkInfo *            forkInfo, /* can be NULL */
  4076.                                  FSRef *                ref, /* can be NULL */
  4077.                                  HFSUniStr255 *            outForkName) /* can be NULL */        THREEWORDINLINE(0x303C, 0x0C32, 0xAA52);
  4078.  
  4079.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  4080.                                                                                             #pragma parameter __D0 PBGetForkCBInfoSync(__A0)
  4081.                                                                                             #endif
  4082. EXTERN_API( OSErr )
  4083. PBGetForkCBInfoSync                (FSForkCBInfoParam *    paramBlock)                            TWOWORDINLINE(0x705A, 0xA260);
  4084.  
  4085.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  4086.                                                                                             #pragma parameter PBGetForkCBInfoAsync(__A0)
  4087.                                                                                             #endif
  4088. EXTERN_API( void )
  4089. PBGetForkCBInfoAsync            (FSForkCBInfoParam *    paramBlock)                            TWOWORDINLINE(0x705A, 0xA660);
  4090.  
  4091.  
  4092. /*
  4093.       GetVolumeInfo
  4094.       Returns various information about a given volume, or indexing over all volumes.
  4095.       ->    ioCompletion    A pointer to a completion routine
  4096.       <-    ioResult        The result code of the function
  4097.       <>    ioVRefNum        On input, the volume reference number or drive number whose
  4098.                           information is to be returned (if volumeIndex is 0); same
  4099.                           as "volume" input to FSGetVolumeInfo.
  4100.                           On output, the actual volume reference number; same as
  4101.                           "actualVolume" output of FSGetVolumeInfo.
  4102.       ->    volumeIndex        The index of the desired volume, or 0 to use ioVRefNum
  4103.       ->    whichInfo        Which volInfo info fields to get
  4104.       <-    volumeInfo        The returned values of Volume info fields; may be NULL
  4105.       <-    name            The Unicode name is returned here.  This pointer may be NULL.
  4106.       Note: All of the outputs are optional; if you don't want that particular output, just
  4107.       set it's pointer to NULL.
  4108. */
  4109. EXTERN_API( OSErr )
  4110. FSGetVolumeInfo                    (FSVolumeRefNum         volume,
  4111.                                  ItemCount                 volumeIndex,
  4112.                                  FSVolumeRefNum *        actualVolume, /* can be NULL */
  4113.                                  FSVolumeInfoBitmap     whichInfo,
  4114.                                  FSVolumeInfo *            info, /* can be NULL */
  4115.                                  HFSUniStr255 *            volumeName, /* can be NULL */
  4116.                                  FSRef *                rootDirectory) /* can be NULL */    THREEWORDINLINE(0x303C, 0x0D33, 0xAA52);
  4117.  
  4118.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  4119.                                                                                             #pragma parameter __D0 PBGetVolumeInfoSync(__A0)
  4120.                                                                                             #endif
  4121. EXTERN_API( OSErr )
  4122. PBGetVolumeInfoSync                (FSVolumeInfoParam *    paramBlock)                            TWOWORDINLINE(0x701D, 0xA260);
  4123.  
  4124.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  4125.                                                                                             #pragma parameter PBGetVolumeInfoAsync(__A0)
  4126.                                                                                             #endif
  4127. EXTERN_API( void )
  4128. PBGetVolumeInfoAsync            (FSVolumeInfoParam *    paramBlock)                            TWOWORDINLINE(0x701D, 0xA660);
  4129.  
  4130.  
  4131. /*
  4132.       SetVolumeInfo
  4133.       Set information about a given volume.
  4134.       ->    ioCompletion    A pointer to a completion routine
  4135.       <-    ioResult        The result code of the function
  4136.       ->    ioVRefNum        The volume whose information is to be changed
  4137.       ->    whichInfo        Which catalog info fields to set
  4138.       ->    volumeInfo        The new values of volume info fields
  4139.       Note: Only some of the volume info fields may be set.  The settable fields
  4140.       are given by the constant kFSVolInfoSettableInfo; no other bits may be set in
  4141.       whichInfo.
  4142. */
  4143. EXTERN_API( OSErr )
  4144. FSSetVolumeInfo                    (FSVolumeRefNum         volume,
  4145.                                  FSVolumeInfoBitmap     whichInfo,
  4146.                                  const FSVolumeInfo *    info)                                THREEWORDINLINE(0x303C, 0x0534, 0xAA52);
  4147.  
  4148.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  4149.                                                                                             #pragma parameter __D0 PBSetVolumeInfoSync(__A0)
  4150.                                                                                             #endif
  4151. EXTERN_API( OSErr )
  4152. PBSetVolumeInfoSync                (FSVolumeInfoParam *    paramBlock)                            TWOWORDINLINE(0x701E, 0xA260);
  4153.  
  4154.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  4155.                                                                                             #pragma parameter PBSetVolumeInfoAsync(__A0)
  4156.                                                                                             #endif
  4157. EXTERN_API( void )
  4158. PBSetVolumeInfoAsync            (FSVolumeInfoParam *    paramBlock)                            TWOWORDINLINE(0x701E, 0xA660);
  4159.  
  4160. /*
  4161.       FSGetDataForkName
  4162.       Returns the constant for the name of the data fork (the empty string)
  4163. */
  4164. EXTERN_API( OSErr )
  4165. FSGetDataForkName                (HFSUniStr255 *            dataForkName)                        THREEWORDINLINE(0x303C, 0x0218, 0xAA52);
  4166.  
  4167. /*
  4168.       FSGetResourceForkName
  4169.       Returns the constant for the name of the resource fork
  4170.       (currently "RESOURCE_FORK").
  4171. */
  4172. EXTERN_API( OSErr )
  4173. FSGetResourceForkName            (HFSUniStr255 *            resourceForkName)                    THREEWORDINLINE(0x303C, 0x0219, 0xAA52);
  4174.  
  4175.  
  4176.  
  4177.  
  4178. #if PRAGMA_STRUCT_ALIGN
  4179.     #pragma options align=reset
  4180. #elif PRAGMA_STRUCT_PACKPUSH
  4181.     #pragma pack(pop)
  4182. #elif PRAGMA_STRUCT_PACK
  4183.     #pragma pack()
  4184. #endif
  4185.  
  4186. #ifdef PRAGMA_IMPORT_OFF
  4187. #pragma import off
  4188. #elif PRAGMA_IMPORT
  4189. #pragma import reset
  4190. #endif
  4191.  
  4192. #ifdef __cplusplus
  4193. }
  4194. #endif
  4195.  
  4196. #endif /* __FILES__ */
  4197.  
  4198.