FSM.h
上传用户:xjjlds
上传日期:2015-12-05
资源大小:22823k
文件大小:61k
源码类别:

多媒体编程

开发平台:

Visual C++

  1. /*
  2.      File:       FSM.h
  3.  
  4.      Contains:   HFS External File System Interfaces.
  5.  
  6.      Version:    Technology: Mac OS 9
  7.                  Release:    QuickTime 6.0.2
  8.  
  9.      Copyright:  (c) 1985-2001 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 __FSM__
  18. #define __FSM__
  19. #ifndef __FILES__
  20. #include "Files.h"
  21. #endif
  22. #ifndef __HFSVOLUMES__
  23. #include "HFSVolumes.h"
  24. #endif
  25. #ifndef __PROCESSES__
  26. #include "Processes.h"
  27. #endif
  28. #ifndef __MACERRORS__
  29. #include "MacErrors.h"
  30. #endif
  31. #if PRAGMA_ONCE
  32. #pragma once
  33. #endif
  34. #ifdef __cplusplus
  35. extern "C" {
  36. #endif
  37. #if PRAGMA_IMPORT
  38. #pragma import on
  39. #endif
  40. #if PRAGMA_STRUCT_ALIGN
  41.     #pragma options align=mac68k
  42. #elif PRAGMA_STRUCT_PACKPUSH
  43.     #pragma pack(push, 2)
  44. #elif PRAGMA_STRUCT_PACK
  45.     #pragma pack(2)
  46. #endif
  47. /* VolMount declarations are now in Files.* */
  48. /*
  49.  * Miscellaneous file system values not in Files.*
  50.  */
  51. enum {
  52.     fsUsrCNID                   = 16,                           /* First assignable directory or file number */
  53.                                                                 /*    File system trap word attribute bits */
  54.     kHFSBit                     = 9,                            /* HFS call: bit 9 */
  55.     kHFSMask                    = 0x0200,
  56.     kAsyncBit                   = 10,                           /* Asynchronous call: bit 10 */
  57.     kAsyncMask                  = 0x0400
  58. };
  59. /*
  60.  * HFSCIProc selectCode values
  61.  * Note: The trap attribute bits (the HFS bit and the asynchronous bit)
  62.  * may be set in these selectCode values.
  63.  */
  64. enum {
  65.     kFSMOpen                    = 0xA000,
  66.     kFSMClose                   = 0xA001,
  67.     kFSMRead                    = 0xA002,
  68.     kFSMWrite                   = 0xA003,
  69.     kFSMGetVolInfo              = 0xA007,
  70.     kFSMCreate                  = 0xA008,
  71.     kFSMDelete                  = 0xA009,
  72.     kFSMOpenRF                  = 0xA00A,
  73.     kFSMRename                  = 0xA00B,
  74.     kFSMGetFileInfo             = 0xA00C,
  75.     kFSMSetFileInfo             = 0xA00D,
  76.     kFSMUnmountVol              = 0xA00E,
  77.     kFSMMountVol                = 0xA00F,
  78.     kFSMAllocate                = 0xA010,
  79.     kFSMGetEOF                  = 0xA011,
  80.     kFSMSetEOF                  = 0xA012,
  81.     kFSMFlushVol                = 0xA013,
  82.     kFSMGetVol                  = 0xA014,
  83.     kFSMSetVol                  = 0xA015,
  84.     kFSMEject                   = 0xA017,
  85.     kFSMGetFPos                 = 0xA018,
  86.     kFSMOffline                 = 0xA035,
  87.     kFSMSetFilLock              = 0xA041,
  88.     kFSMRstFilLock              = 0xA042,
  89.     kFSMSetFilType              = 0xA043,
  90.     kFSMSetFPos                 = 0xA044,
  91.     kFSMFlushFile               = 0xA045,                       /*    The File System HFSDispatch selectCodes */
  92.     kFSMOpenWD                  = 0x0001,
  93.     kFSMCloseWD                 = 0x0002,
  94.     kFSMCatMove                 = 0x0005,
  95.     kFSMDirCreate               = 0x0006,
  96.     kFSMGetWDInfo               = 0x0007,
  97.     kFSMGetFCBInfo              = 0x0008,
  98.     kFSMGetCatInfo              = 0x0009,
  99.     kFSMSetCatInfo              = 0x000A,
  100.     kFSMSetVolInfo              = 0x000B,
  101.     kFSMLockRng                 = 0x0010,
  102.     kFSMUnlockRng               = 0x0011,
  103.     kFSMXGetVolInfo             = 0x0012,
  104.     kFSMCreateFileIDRef         = 0x0014,
  105.     kFSMDeleteFileIDRef         = 0x0015,
  106.     kFSMResolveFileIDRef        = 0x0016,
  107.     kFSMExchangeFiles           = 0x0017,
  108.     kFSMCatSearch               = 0x0018,
  109.     kFSMOpenDF                  = 0x001A,
  110.     kFSMMakeFSSpec              = 0x001B,                       /*    The Desktop Manager HFSDispatch selectCodes */
  111.     kFSMDTGetPath               = 0x0020,
  112.     kFSMDTCloseDown             = 0x0021,
  113.     kFSMDTAddIcon               = 0x0022,
  114.     kFSMDTGetIcon               = 0x0023,
  115.     kFSMDTGetIconInfo           = 0x0024,
  116.     kFSMDTAddAPPL               = 0x0025,
  117.     kFSMDTRemoveAPPL            = 0x0026,
  118.     kFSMDTGetAPPL               = 0x0027,
  119.     kFSMDTSetComment            = 0x0028,
  120.     kFSMDTRemoveComment         = 0x0029,
  121.     kFSMDTGetComment            = 0x002A,
  122.     kFSMDTFlush                 = 0x002B,
  123.     kFSMDTReset                 = 0x002C,
  124.     kFSMDTGetInfo               = 0x002D,
  125.     kFSMDTOpenInform            = 0x002E,
  126.     kFSMDTDelete                = 0x002F,                       /*    The AppleShare HFSDispatch selectCodes */
  127.     kFSMGetVolParms             = 0x0030,
  128.     kFSMGetLogInInfo            = 0x0031,
  129.     kFSMGetDirAccess            = 0x0032,
  130.     kFSMSetDirAccess            = 0x0033,
  131.     kFSMMapID                   = 0x0034,
  132.     kFSMMapName                 = 0x0035,
  133.     kFSMCopyFile                = 0x0036,
  134.     kFSMMoveRename              = 0x0037,
  135.     kFSMOpenDeny                = 0x0038,
  136.     kFSMOpenRFDeny              = 0x0039,
  137.     kFSMGetXCatInfo             = 0x003A,
  138.     kFSMGetVolMountInfoSize     = 0x003F,
  139.     kFSMGetVolMountInfo         = 0x0040,
  140.     kFSMVolumeMount             = 0x0041,
  141.     kFSMShare                   = 0x0042,
  142.     kFSMUnShare                 = 0x0043,
  143.     kFSMGetUGEntry              = 0x0044,
  144.     kFSMGetForeignPrivs         = 0x0060,
  145.     kFSMSetForeignPrivs         = 0x0061,                       /* The HFSPlus    API SelectCodes    */
  146.     kFSMGetVolumeInfo           = 0x001D,
  147.     kFSMSetVolumeInfo           = 0x001E,
  148.     kFSMReadFork                = 0x0051,
  149.     kFSMWriteFork               = 0x0052,
  150.     kFSMGetForkPosition         = 0x0053,
  151.     kFSMSetForkPosition         = 0x0054,
  152.     kFSMGetForkSize             = 0x0055,
  153.     kFSMSetForkSize             = 0x0056,
  154.     kFSMAllocateFork            = 0x0057,
  155.     kFSMFlushFork               = 0x0058,
  156.     kFSMCloseFork               = 0x0059,
  157.     kFSMGetForkCBInfo           = 0x005A,
  158.     kFSMCloseIterator           = 0x005B,
  159.     kFSMGetCatalogInfoBulk      = 0x005C,
  160.     kFSMCatalogSearch           = 0x005D,
  161.     kFSMMakeFSRef               = 0x006E,
  162.     kFSMCreateFileUnicode       = 0x0070,
  163.     kFSMCreateDirUnicode        = 0x0071,
  164.     kFSMDeleteObject            = 0x0072,
  165.     kFSMMoveObject              = 0x0073,
  166.     kFSMRenameUnicode           = 0x0074,
  167.     kFSMExchangeObjects         = 0x0075,
  168.     kFSMGetCatalogInfo          = 0x0076,
  169.     kFSMSetCatalogInfo          = 0x0077,
  170.     kFSMOpenIterator            = 0x0078,
  171.     kFSMOpenFork                = 0x0079,
  172.     kFSMMakeFSRefUnicode        = 0x007A,
  173.     kFSMCompareFSRefs           = 0x007C,
  174.     kFSMCreateFork              = 0x007D,
  175.     kFSMDeleteFork              = 0x007E,
  176.     kFSMIterateForks            = 0x007F
  177. };
  178. /*
  179.  * UTDetermineVol status values
  180.  */
  181. enum {
  182.     dtmvError                   = 0,                            /* param error */
  183.     dtmvFullPathame             = 1,                            /* determined by full pathname */
  184.     dtmvVRefNum                 = 2,                            /* determined by volume refNum */
  185.     dtmvWDRefNum                = 3,                            /* determined by working directory refNum */
  186.     dtmvDriveNum                = 4,                            /* determined by drive number */
  187.     dtmvDefault                 = 5                             /* determined by default volume */
  188. };
  189. /*
  190.  * UTGetBlock options
  191.  */
  192. enum {
  193.     gbDefault                   = 0,                            /* default value - read if not found */
  194.                                                                 /*    bits and masks */
  195.     gbReadBit                   = 0,                            /* read block from disk (forced read) */
  196.     gbReadMask                  = 0x0001,
  197.     gbExistBit                  = 1,                            /* get existing cache block */
  198.     gbExistMask                 = 0x0002,
  199.     gbNoReadBit                 = 2,                            /* don't read block from disk if not found in cache */
  200.     gbNoReadMask                = 0x0004,
  201.     gbReleaseBit                = 3,                            /* release block immediately after GetBlock */
  202.     gbReleaseMask               = 0x0008
  203. };
  204. /*
  205.  * UTReleaseBlock options
  206.  */
  207. enum {
  208.     rbDefault                   = 0,                            /* default value - just mark the buffer not in-use */
  209.                                                                 /*    bits and masks */
  210.     rbWriteBit                  = 0,                            /* force write buffer to disk */
  211.     rbWriteMask                 = 0x0001,
  212.     rbTrashBit                  = 1,                            /* trash buffer contents after release */
  213.     rbTrashMask                 = 0x0002,
  214.     rbDirtyBit                  = 2,                            /* mark buffer dirty */
  215.     rbDirtyMask                 = 0x0004,
  216.     rbFreeBit                   = 3,                            /* free the buffer (save in the hash) */
  217.     rbFreeMask                  = 0x000A                        /* rbFreeMask (rbFreeBit + rbTrashBit) works as rbTrash on < System 7.0 RamCache; on >= System 7.0, rbfreeMask overrides rbTrash */
  218. };
  219. /*
  220.  * UTFlushCache options
  221.  */
  222. enum {
  223.     fcDefault                   = 0,                            /* default value - pass this fcOption to just flush any dirty buffers */
  224.                                                                 /*    bits and masks */
  225.     fcTrashBit                  = 0,                            /* (don't pass this as fcOption, use only for testing bit) */
  226.     fcTrashMask                 = 0x0001,                       /* pass this fcOption value to flush and trash cache blocks */
  227.     fcFreeBit                   = 1,                            /* (don't pass this as fcOption, use only for testing bit) */
  228.     fcFreeMask                  = 0x0003                        /* pass this fcOption to flush and free cache blocks (Note: both fcTrash and fcFree bits are set) */
  229. };
  230. /*
  231.  * UTCacheReadIP and UTCacheWriteIP cacheOption bits and masks are the ioPosMode
  232.  * bits and masks in Files.x
  233.  */
  234. /*
  235.  * Cache routine internal error codes
  236.  */
  237. enum {
  238.     chNoBuf                     = 1,                            /* no free cache buffers (all in use) */
  239.     chInUse                     = 2,                            /* requested block in use */
  240.     chnotfound                  = 3,                            /* requested block not found */
  241.     chNotInUse                  = 4                             /* block being released was not in use */
  242. };
  243. /*
  244.  * FCBRec.fcbFlags bits
  245.  */
  246. enum {
  247.     fcbWriteBit                 = 0,                            /* Data can be written to this file */
  248.     fcbWriteMask                = 0x01,
  249.     fcbResourceBit              = 1,                            /* This file is a resource fork */
  250.     fcbResourceMask             = 0x02,
  251.     fcbWriteLockedBit           = 2,                            /* File has a locked byte range */
  252.     fcbWriteLockedMask          = 0x04,
  253.     fcbLargeFileBit             = 3,                            /* File may grow beyond 2GB; cache uses file blocks, not bytes */
  254.     fcbLargeFileMask            = 0x08,
  255.     fcbSharedWriteBit           = 4,                            /* File is open for shared write access */
  256.     fcbSharedWriteMask          = 0x10,
  257.     fcbFileLockedBit            = 5,                            /* File is locked (write-protected) */
  258.     fcbFileLockedMask           = 0x20,
  259.     fcbOwnClumpBit              = 6,                            /* File has clump size specified in FCB */
  260.     fcbOwnClumpMask             = 0x40,
  261.     fcbModifiedBit              = 7,                            /* File has changed since it was last flushed */
  262.     fcbModifiedMask             = 0x80
  263. };
  264. /*
  265.  *  ForkControlBlock.moreFlags bits
  266.  */
  267. enum {
  268.     fcbIteratorBit              = 0,                            /* FCB belongs to an FSIterator */
  269.     fcbIteratorMask             = 0x0001,
  270.     fcbUseForkIDBit             = 1,                            /* Use the FCB's forkID instead of fcbResourceBit */
  271.     fcbUseForkIDMask            = 0x0002
  272. };
  273. /*
  274.  *  HFS Component Interface constants
  275.  */
  276. /*
  277.  * compInterfMask bits specific to HFS component
  278.  */
  279. enum {
  280.     hfsCIDoesHFSBit             = 23,                           /* set if file system supports HFS calls */
  281.     hfsCIDoesHFSMask            = 0x00800000,
  282.     hfsCIDoesAppleShareBit      = 22,                           /* set if AppleShare calls supported */
  283.     hfsCIDoesAppleShareMask     = 0x00400000,
  284.     hfsCIDoesDeskTopBit         = 21,                           /* set if Desktop Database calls supported */
  285.     hfsCIDoesDeskTopMask        = 0x00200000,
  286.     hfsCIDoesDynamicLoadBit     = 20,                           /* set if dynamically loading code resource */
  287.     hfsCIDoesDynamicLoadMask    = 0x00100000,                   /*       supported */
  288.     hfsCIResourceLoadedBit      = 19,                           /* set if code resource already loaded */
  289.     hfsCIResourceLoadedMask     = 0x00080000,
  290.     hfsCIHasHLL2PProcBit        = 18,                           /* set if FFS' log2PhyProc */
  291.     hfsCIHasHLL2PProcMask       = 0x00040000,                   /* is written in a high level language. (i.e., uses Pascal calling convention) */
  292.     hfsCIWantsDTSupportBit      = 17,                           /* set if FFS wants the Mac OS's Desktop Manager code to handle */
  293.     hfsCIWantsDTSupportMask     = 0x00020000                    /* all Desktop Manager requests to its volumes. */
  294. };
  295. /*
  296.  *  Disk Initialization Component Interface constants
  297.  */
  298. /*
  299.  * compInterfMask bits specific to Disk Initialization component
  300.  */
  301. enum {
  302.     diCIHasExtFormatParamsBit   = 18,                           /* set if file system needs extended format */
  303.     diCIHasExtFormatParamsMask  = 0x00040000,                   /*       parameters */
  304.     diCIHasMultiVolTypesBit     = 17,                           /* set if file system supports more than one */
  305.     diCIHasMultiVolTypesMask    = 0x00020000,                   /*       volume type */
  306.     diCIDoesSparingBit          = 16,                           /* set if file system supports disk sparing */
  307.     diCIDoesSparingMask         = 0x00010000,
  308.     diCILiveBit                 = 0,                            /* set if file system is candidate for current */
  309.     diCILiveMask                = 0x00000001                    /*       formatting operation (set by PACK2) */
  310. };
  311. /*
  312.  * Disk Initialization Component Function selectors
  313.  */
  314. enum {
  315.     diCILoad                    = 1,                            /* Make initialization code memory resident */
  316.     diCIUnload                  = 2,                            /* Make initialization code purgeable */
  317.     diCIEvaluateSizeChoices     = 3,                            /* Evaluate size choices */
  318.     diCIExtendedZero            = 4,                            /* Write an empty volume directory */
  319.     diCIValidateVolName         = 5,                            /* Validate volume name */
  320.     diCIGetVolTypeInfo          = 6,                            /* get volume type info */
  321.     diCIGetFormatString         = 7,                            /* get dialog format string */
  322.     diCIGetExtFormatParams      = 8,                            /* get extended format parameters */
  323.     diCIGetDefectList           = 9                             /* return the defect list for the indicated disk - reserved for future use */
  324. };
  325. /*
  326.  * Constants used in the DICIEvaluateSizeRec and FormatListRec
  327.  */
  328. enum {
  329.     diCIFmtListMax              = 8,                            /* maximum number of format list entries in DICIEvaluateSizeRec.numSizeEntries */
  330.                                                                 /*    bits in FormatListRec.formatFlags: */
  331.     diCIFmtFlagsValidBit        = 7,                            /* set if sec, side, tracks valid */
  332.     diCIFmtFlagsValidMask       = 0x80,
  333.     diCIFmtFlagsCurrentBit      = 6,                            /* set if current disk has this fmt */
  334.     diCIFmtFlagsCurrentMask     = 0x40,                         /*    bits in FormatListRec.sizeListFlags: */
  335.     diCISizeListOKBit           = 15,                           /* set if this disk size usable */
  336.     diCISizeListOKMask          = 0x8000
  337. };
  338. /*
  339.  * DICIGetFormatStringRec.stringKind format strings
  340.  */
  341. enum {
  342.     diCIAlternateFormatStr      = 1,                            /* get alternate format  string (Balloon Help) */
  343.     diCISizePresentationStr     = 2                             /* get size presentation string (for dialog) */
  344. };
  345. /*
  346.  * Error codes returned by Disk Sparing
  347.  */
  348. enum {
  349.     diCIUserCancelErr           = 1,                            /* user cancelled the disk init */
  350.     diCICriticalSectorBadErr    = 20,                           /* critical sectors are bad (hopeless)    */
  351.     diCISparingFailedErr        = 21,                           /* disk cannot be spared */
  352.     diCITooManyBadSectorsErr    = 22,                           /* too many bad sectors */
  353.     diCIUnknownVolTypeErr       = 23,                           /* the volume type passed in diCIExtendedZero paramBlock is not supported */
  354.     diCIVolSizeMismatchErr      = 24,                           /* specified volume size doesn't match with formatted disk size */
  355.     diCIUnknownDICallErr        = 25,                           /* bogus DI function call selector */
  356.     diCINoSparingErr            = 26,                           /* disk is bad but the target FS doesn't do disk sparing */
  357.     diCINoExtendInfoErr         = 27,                           /* missing file system specific extra parameter in diCIExtendedZero call */
  358.     diCINoMessageTextErr        = 28                            /* missing message text in DIReformat call */
  359. };
  360. /*
  361.  *  File System Manager constants
  362.  */
  363. /*
  364.  * Miscellaneous constants used by FSM
  365.  */
  366. enum {
  367.     fsdVersion1                 = 1,                            /* current version of FSD record */
  368.     fsmIgnoreFSID               = 0xFFFE,                       /* this FSID should be ignored by the driver */
  369.     fsmGenericFSID              = 0xFFFF                        /* unknown foreign file system ID */
  370. };
  371. /*
  372.  * compInterfMask bits common to all FSM components
  373.  */
  374. enum {
  375.     fsmComponentEnableBit       = 31,                           /* set if FSM component interface is enabled */
  376.     fsmComponentEnableMask      = (long)0x80000000,
  377.     fsmComponentBusyBit         = 30,                           /* set if FSM component interface is busy */
  378.     fsmComponentBusyMask        = 0x40000000
  379. };
  380. /*
  381.  * Selectors for GetFSInfo
  382.  */
  383. enum {
  384.     fsmGetFSInfoByIndex         = -1,                           /* get fs info by index */
  385.     fsmGetFSInfoByFSID          = 0,                            /* get fs info by FSID */
  386.     fsmGetFSInfoByRefNum        = 1                             /* get fs info by file/vol refnum */
  387. };
  388. /*
  389.  * InformFSM messages
  390.  */
  391. enum {
  392.     fsmNopMessage               = 0,                            /* nop */
  393.     fsmDrvQElChangedMessage     = 1,                            /* DQE has changed */
  394.     fsmGetFSIconMessage         = 2                             /* Get FFS's disk icon */
  395. };
  396. /*
  397.  * Messages passed to the fileSystemCommProc
  398.  */
  399. enum {
  400.     ffsNopMessage               = 0,                            /* nop, should always return noErr */
  401.     ffsGetIconMessage           = 1,                            /* return disk icon and mask */
  402.     ffsIDDiskMessage            = 2,                            /* identify the about-to-be-mounted volume */
  403.     ffsLoadMessage              = 3,                            /* load in the FFS */
  404.     ffsUnloadMessage            = 4,                            /* unload the FFS */
  405.     ffsIDVolMountMessage        = 5,                            /* identify a VolMountInfo record */
  406.     ffsInformMessage            = 6,                            /* FFS defined message */
  407.     ffsGetIconInfoMessage       = 7
  408. };
  409. /*
  410.  *  HFS Utility routine records
  411.  */
  412. /*
  413.  * record used by UTGetPathComponentName
  414.  */
  415. struct ParsePathRec {
  416.     StringPtr                       namePtr;                    /* pathname to parse */
  417.     short                           startOffset;                /* where to start parsing */
  418.     short                           componentLength;            /* the length of the pathname component parsed */
  419.     SignedByte                      moreName;                   /* non-zero if there are more components after this one */
  420.     SignedByte                      foundDelimiter;             /* non-zero if parsing stopped because a colon (:) delimiter was found */
  421. };
  422. typedef struct ParsePathRec             ParsePathRec;
  423. typedef ParsePathRec *                  ParsePathRecPtr;
  424. struct WDCBRec {
  425.     VCBPtr                          wdVCBPtr;                   /* Pointer to VCB of this working directory */
  426.     long                            wdDirID;                    /* Directory ID number of this working directory */
  427.     long                            wdCatHint;                  /* Hint for finding this working directory */
  428.     long                            wdProcID;                   /* Process that created this working directory */
  429. };
  430. typedef struct WDCBRec                  WDCBRec;
  431. typedef WDCBRec *                       WDCBRecPtr;
  432. struct FCBRec {
  433.     unsigned long                   fcbFlNm;                    /* FCB file number. Non-zero marks FCB used */
  434.     SignedByte                      fcbFlags;                   /* FCB flags */
  435.     SignedByte                      fcbTypByt;                  /* File type byte */
  436.     unsigned short                  fcbSBlk;                    /* File start block (in alloc size blks) */
  437.     unsigned long                   fcbEOF;                     /* Logical length or EOF in bytes */
  438.     unsigned long                   fcbPLen;                    /* Physical file length in bytes */
  439.     unsigned long                   fcbCrPs;                    /* Current position within file */
  440.     VCBPtr                          fcbVPtr;                    /* Pointer to the corresponding VCB */
  441.     Ptr                             fcbBfAdr;                   /* File's buffer address */
  442.     unsigned short                  fcbFlPos;                   /* Directory block this file is in */
  443.                                                                 /* FCB Extensions for HFS */
  444.     unsigned long                   fcbClmpSize;                /* Number of bytes per clump */
  445.     Ptr                             fcbBTCBPtr;                 /* Pointer to B*-Tree control block for file */
  446.     HFSExtentRecord                 fcbExtRec;                  /* First 3 file extents */
  447.     OSType                          fcbFType;                   /* File's 4 Finder Type bytes */
  448.     unsigned long                   fcbCatPos;                  /* Catalog hint for use on Close */
  449.     unsigned long                   fcbDirID;                   /* Parent Directory ID */
  450.     Str31                           fcbCName;                   /* CName of open file */
  451. };
  452. typedef struct FCBRec                   FCBRec;
  453. typedef FCBRec *                        FCBRecPtr;
  454. struct ForkControlBlock {
  455.     unsigned long                   fcbFlNm;                    /* FCB file number. Non-zero marks FCB used */
  456.     SignedByte                      fcbFlags;                   /* FCB flags */
  457.     SignedByte                      fcbTypByt;                  /* File type byte */
  458.     unsigned short                  fcbSBlk;                    /* File start block (in alloc size blks) */
  459.     unsigned long                   fcbEOF;                     /* Logical length or EOF in bytes */
  460.     unsigned long                   fcbPLen;                    /* Physical file length in bytes */
  461.     unsigned long                   fcbCrPs;                    /* Current position within file */
  462.     VCBPtr                          fcbVPtr;                    /* Pointer to the corresponding VCB */
  463.     Ptr                             fcbBfAdr;                   /* File's buffer address */
  464.     unsigned short                  fcbFlPos;                   /* Directory block this file is in */
  465.                                                                 /* FCB Extensions for HFS */
  466.     unsigned long                   fcbClmpSize;                /* Number of bytes per clump */
  467.     Ptr                             fcbBTCBPtr;                 /* Pointer to B*-Tree control block for file */
  468.     HFSExtentRecord                 fcbExtRec;                  /* First 3 file extents */
  469.     OSType                          fcbFType;                   /* File's 4 Finder Type bytes */
  470.     unsigned long                   fcbCatPos;                  /* Catalog hint for use on Close */
  471.     unsigned long                   fcbDirID;                   /* Parent Directory ID */
  472.     Str31                           fcbCName;                   /* CName of open file */
  473.                                                                 /*    New fields start here*/
  474.     unsigned short                  moreFlags;                  /* more flags, align following fields*/
  475.                                                                 /*    Old ExtendedFCB fields*/
  476.     ProcessSerialNumber             processID;                  /* Process Mgr process that opened the file (used to clean up at process death).*/
  477.     HFSPlusExtentRecord             extents;                    /* extents for HFS+ volumes*/
  478.                                                                 /*    New fields for HFS Plus APIs*/
  479.     UInt64                          endOfFile;                  /* logical size of this fork*/
  480.     UInt64                          physicalEOF;                /* amount of space physically allocated to this fork*/
  481.     UInt64                          currentPosition;            /* default offset for next read/write*/
  482.     UInt32                          forkID;
  483.     Ptr                             searchListPtr;              /* reserved for File Manager's use*/
  484.     UInt8                           reserved1[8];               /* reserved*/
  485. };
  486. typedef struct ForkControlBlock         ForkControlBlock;
  487. typedef ForkControlBlock *              ForkControlBlockPtr;
  488. /*
  489.  *  IteratorControlBlock - a ForkControlBlock used by a FSIterator
  490.  */
  491. struct IteratorControlBlock {
  492.     unsigned long                   containerID;                /* directory ID of iterator's container*/
  493.     unsigned short                  flags;                      /* reserved*/
  494.     UInt8                           user1[14];                  /* 14 bytes iterator's use*/
  495.     VCBPtr                          vcbPtr;                     /* pointer to the iterator's VCB*/
  496.     unsigned long                   reserved2;                  /* reserved*/
  497.     UInt8                           user2[6];                   /* 6 bytes for iterator's use*/
  498.     unsigned long                   reserved3;                  /* reserved*/
  499.     UInt8                           user3[12];                  /* 12 bytes for iterator's use*/
  500.     OSType                          cbType;                     /* must be 'fold'*/
  501.     UInt8                           user4[40];                  /* 40 bytes for iterator's use*/
  502.     unsigned short                  moreFlags;                  /* must be fcbIteratorMask*/
  503.     ProcessSerialNumber             processID;                  /* Process Mgr process that opened the iterator (used to clean up at process death).*/
  504.     UInt8                           user5[92];                  /* 92 bytes for iterator's use*/
  505.     Ptr                             searchListPtr;              /* reserved for File Manager's use*/
  506.     UInt8                           reserved1[8];               /* reserved*/
  507. };
  508. typedef struct IteratorControlBlock     IteratorControlBlock;
  509. typedef IteratorControlBlock *          IteratorControlBlockPtr;
  510. /*
  511.  *  HFS Component Interface records
  512.  */
  513. typedef CALLBACK_API( OSErr , Lg2PhysProcPtr )(void *fsdGlobalPtr, VCBPtr volCtrlBlockPtr, FCBRecPtr fileCtrlBlockPtr, short fileRefNum, unsigned long filePosition, unsigned long reqCount, unsigned long *volOffset, unsigned long *contiguousBytes);
  514. typedef STACK_UPP_TYPE(Lg2PhysProcPtr)                          Lg2PhysUPP;
  515. #if OPAQUE_UPP_TYPES
  516. #if CALL_NOT_IN_CARBON
  517.     EXTERN_API(Lg2PhysUPP)
  518.     NewLg2PhysUPP                  (Lg2PhysProcPtr          userRoutine);
  519.     EXTERN_API(void)
  520.     DisposeLg2PhysUPP              (Lg2PhysUPP              userUPP);
  521.     EXTERN_API(OSErr)
  522.     InvokeLg2PhysUPP               (void *                  fsdGlobalPtr,
  523.                                     VCBPtr                  volCtrlBlockPtr,
  524.                                     FCBRecPtr               fileCtrlBlockPtr,
  525.                                     short                   fileRefNum,
  526.                                     unsigned long           filePosition,
  527.                                     unsigned long           reqCount,
  528.                                     unsigned long *         volOffset,
  529.                                     unsigned long *         contiguousBytes,
  530.                                     Lg2PhysUPP              userUPP);
  531. #endif  /* CALL_NOT_IN_CARBON */
  532. #else
  533.     enum { uppLg2PhysProcInfo = 0x003FEFE0 };                       /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 2_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  534.     #define NewLg2PhysUPP(userRoutine)                              (Lg2PhysUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppLg2PhysProcInfo, GetCurrentArchitecture())
  535.     #define DisposeLg2PhysUPP(userUPP)                              DisposeRoutineDescriptor(userUPP)
  536.     #define InvokeLg2PhysUPP(fsdGlobalPtr, volCtrlBlockPtr, fileCtrlBlockPtr, fileRefNum, filePosition, reqCount, volOffset, contiguousBytes, userUPP)  (OSErr)CALL_EIGHT_PARAMETER_UPP((userUPP), uppLg2PhysProcInfo, (fsdGlobalPtr), (volCtrlBlockPtr), (fileCtrlBlockPtr), (fileRefNum), (filePosition), (reqCount), (volOffset), (contiguousBytes))
  537. #endif
  538. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  539. #define NewLg2PhysProc(userRoutine)                             NewLg2PhysUPP(userRoutine)
  540. #define CallLg2PhysProc(userRoutine, fsdGlobalPtr, volCtrlBlockPtr, fileCtrlBlockPtr, fileRefNum, filePosition, reqCount, volOffset, contiguousBytes) InvokeLg2PhysUPP(fsdGlobalPtr, volCtrlBlockPtr, fileCtrlBlockPtr, fileRefNum, filePosition, reqCount, volOffset, contiguousBytes, userRoutine)
  541. typedef CALLBACK_API( OSErr , HFSCIProcPtr )(VCBPtr theVCB, short selectCode, void *paramBlock, void *fsdGlobalPtr, short fsid);
  542. typedef STACK_UPP_TYPE(HFSCIProcPtr)                            HFSCIUPP;
  543. #if OPAQUE_UPP_TYPES
  544. #if CALL_NOT_IN_CARBON
  545.     EXTERN_API(HFSCIUPP)
  546.     NewHFSCIUPP                    (HFSCIProcPtr            userRoutine);
  547.     EXTERN_API(void)
  548.     DisposeHFSCIUPP                (HFSCIUPP                userUPP);
  549.     EXTERN_API(OSErr)
  550.     InvokeHFSCIUPP                 (VCBPtr                  theVCB,
  551.                                     short                   selectCode,
  552.                                     void *                  paramBlock,
  553.                                     void *                  fsdGlobalPtr,
  554.                                     short                   fsid,
  555.                                     HFSCIUPP                userUPP);
  556. #endif  /* CALL_NOT_IN_CARBON */
  557. #else
  558.     enum { uppHFSCIProcInfo = 0x0000BEE0 };                         /* pascal 2_bytes Func(4_bytes, 2_bytes, 4_bytes, 4_bytes, 2_bytes) */
  559.     #define NewHFSCIUPP(userRoutine)                                (HFSCIUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppHFSCIProcInfo, GetCurrentArchitecture())
  560.     #define DisposeHFSCIUPP(userUPP)                                DisposeRoutineDescriptor(userUPP)
  561.     #define InvokeHFSCIUPP(theVCB, selectCode, paramBlock, fsdGlobalPtr, fsid, userUPP)  (OSErr)CALL_FIVE_PARAMETER_UPP((userUPP), uppHFSCIProcInfo, (theVCB), (selectCode), (paramBlock), (fsdGlobalPtr), (fsid))
  562. #endif
  563. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  564. #define NewHFSCIProc(userRoutine)                               NewHFSCIUPP(userRoutine)
  565. #define CallHFSCIProc(userRoutine, theVCB, selectCode, paramBlock, fsdGlobalPtr, fsid) InvokeHFSCIUPP(theVCB, selectCode, paramBlock, fsdGlobalPtr, fsid, userRoutine)
  566. struct HFSCIRec {
  567.     long                            compInterfMask;             /* component flags */
  568.     HFSCIUPP                        compInterfProc;             /* pointer to file system call processing code */
  569.     Lg2PhysUPP                      log2PhyProc;                /* pointer to Lg2PhysProc() code */
  570.     Ptr                             stackTop;                   /* file system stack top */
  571.     long                            stackSize;                  /* file system stack size */
  572.     Ptr                             stackPtr;                   /* current file system stack pointer */
  573.     long                            reserved3;                  /* --reserved, must be zero-- */
  574.     long                            idSector;                   /* Sector you need to ID a local volume. For networked volumes, this must be -1 */
  575.     long                            reserved2;                  /* --reserved, must be zero-- */
  576.     long                            reserved1;                  /* --reserved, must be zero-- */
  577. };
  578. typedef struct HFSCIRec                 HFSCIRec;
  579. typedef HFSCIRec *                      HFSCIRecPtr;
  580. /*
  581.  *  Disk Initialization Component Interface records
  582.  */
  583. typedef CALLBACK_API( OSErr , DICIProcPtr )(short whatFunction, void *paramBlock, void *fsdGlobalPtr);
  584. typedef STACK_UPP_TYPE(DICIProcPtr)                             DICIUPP;
  585. #if OPAQUE_UPP_TYPES
  586. #if CALL_NOT_IN_CARBON
  587.     EXTERN_API(DICIUPP)
  588.     NewDICIUPP                     (DICIProcPtr             userRoutine);
  589.     EXTERN_API(void)
  590.     DisposeDICIUPP                 (DICIUPP                 userUPP);
  591.     EXTERN_API(OSErr)
  592.     InvokeDICIUPP                  (short                   whatFunction,
  593.                                     void *                  paramBlock,
  594.                                     void *                  fsdGlobalPtr,
  595.                                     DICIUPP                 userUPP);
  596. #endif  /* CALL_NOT_IN_CARBON */
  597. #else
  598.     enum { uppDICIProcInfo = 0x00000FA0 };                          /* pascal 2_bytes Func(2_bytes, 4_bytes, 4_bytes) */
  599.     #define NewDICIUPP(userRoutine)                                 (DICIUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDICIProcInfo, GetCurrentArchitecture())
  600.     #define DisposeDICIUPP(userUPP)                                 DisposeRoutineDescriptor(userUPP)
  601.     #define InvokeDICIUPP(whatFunction, paramBlock, fsdGlobalPtr, userUPP)  (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppDICIProcInfo, (whatFunction), (paramBlock), (fsdGlobalPtr))
  602. #endif
  603. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  604. #define NewDICIProc(userRoutine)                                NewDICIUPP(userRoutine)
  605. #define CallDICIProc(userRoutine, whatFunction, paramBlock, fsdGlobalPtr) InvokeDICIUPP(whatFunction, paramBlock, fsdGlobalPtr, userRoutine)
  606. struct DICIRec {
  607.     long                            compInterfMask;             /* component flags */
  608.     DICIUPP                         compInterfProc;             /* pointer to call processing code */
  609.     short                           maxVolNameLength;           /* maximum length of your volume name */
  610.     unsigned short                  blockSize;                  /* your file system's block size */
  611.     long                            reserved3;                  /* --reserved, must be zero-- */
  612.     long                            reserved2;                  /* --reserved, must be zero-- */
  613.     long                            reserved1;                  /* --reserved, must be zero-- */
  614. };
  615. typedef struct DICIRec                  DICIRec;
  616. typedef DICIRec *                       DICIRecPtr;
  617. /*
  618.  * FormatListRec as returned by the .Sony disk driver's
  619.  * Return Format List status call (csCode = 6).
  620.  * If the status call to get this list for a drive is not
  621.  * implemented by the driver, then a list with one entry
  622.  * is contructed from the drive queue element for the drive.
  623.  */
  624. struct FormatListRec {
  625.     unsigned long                   volSize;                    /* disk capacity in SECTORs */
  626.     SignedByte                      formatFlags;                /* flags */
  627.     SignedByte                      sectorsPerTrack;            /* sectors per track side */
  628.     unsigned short                  tracks;                     /* number of tracks */
  629. };
  630. typedef struct FormatListRec            FormatListRec;
  631. typedef FormatListRec *                 FormatListRecPtr;
  632. /*
  633.  * SizeListRec built from FormatListRecs as described above.
  634.  */
  635. struct SizeListRec {
  636.     short                           sizeListFlags;              /* flags as set by external file system */
  637.     FormatListRec                   sizeEntry;                  /* disk driver format list record */
  638. };
  639. typedef struct SizeListRec              SizeListRec;
  640. typedef SizeListRec *                   SizeListRecPtr;
  641. /*
  642.  * paramBlock for the diCIEvaluateSize call
  643.  */
  644. struct DICIEvaluateSizeRec {
  645.     short                           defaultSizeIndex;           /* default size for this FS */
  646.     short                           numSizeEntries;             /* number of size entries */
  647.     short                           driveNumber;                /* drive number */
  648.     SizeListRecPtr                  sizeListPtr;                /* ptr to size entry table */
  649.     unsigned short                  sectorSize;                 /* bytes per sector */
  650. };
  651. typedef struct DICIEvaluateSizeRec      DICIEvaluateSizeRec;
  652. typedef DICIEvaluateSizeRec *           DICIEvaluateSizeRecPtr;
  653. /*
  654.  * paramBlock for the diCIExtendedZero call
  655.  */
  656. struct DICIExtendedZeroRec {
  657.     short                           driveNumber;                /* drive number */
  658.     StringPtr                       volNamePtr;                 /* ptr to volume name string */
  659.     short                           fsid;                       /* file system ID */
  660.     short                           volTypeSelector;            /* volume type selector, if supports more than 1 type */
  661.     unsigned short                  numDefectBlocks;            /* number of bad logical blocks */
  662.     unsigned short                  defectListSize;             /* size of the defect list buffer in bytes */
  663.     Ptr                             defectListPtr;              /* pointer to defect list buffer */
  664.     unsigned long                   volSize;                    /* size of volume in SECTORs */
  665.     unsigned short                  sectorSize;                 /* bytes per sector */
  666.     Ptr                             extendedInfoPtr;            /* ptr to extended info */
  667. };
  668. typedef struct DICIExtendedZeroRec      DICIExtendedZeroRec;
  669. typedef DICIExtendedZeroRec *           DICIExtendedZeroRecPtr;
  670. /*
  671.  * paramBlock for the diCIValidateVolName call
  672.  */
  673. struct DICIValidateVolNameRec {
  674.     char                            theChar;                    /* the character to validate */
  675.     Boolean                         hasMessageBuffer;           /* false if no message */
  676.     short                           charOffset;                 /* position of the current character (first char = 1) */
  677.     StringPtr                       messageBufferPtr;           /* pointer to message buffer or nil */
  678.     short                           charByteType;               /* theChar's byte type (smSingleByte, smFirstByte, or smLastByte) */
  679. };
  680. typedef struct DICIValidateVolNameRec   DICIValidateVolNameRec;
  681. typedef DICIValidateVolNameRec *        DICIValidateVolNameRecPtr;
  682. /*
  683.  * paramBlock for the diCIGetVolTypeInfo call
  684.  */
  685. struct DICIGetVolTypeInfoRec {
  686.     unsigned long                   volSize;                    /* size of volume in SECTORs */
  687.     unsigned short                  sectorSize;                 /* bytes per sector */
  688.     short                           numVolTypes;                /* number of volume types supported */
  689.     Str31                           volTypesBuffer[4];          /* 4 string buffers */
  690. };
  691. typedef struct DICIGetVolTypeInfoRec    DICIGetVolTypeInfoRec;
  692. typedef DICIGetVolTypeInfoRec *         DICIGetVolTypeInfoRecPtr;
  693. /*
  694.  * paramBlock for the diCIGetFormatString call
  695.  */
  696. struct DICIGetFormatStringRec {
  697.     unsigned long                   volSize;                    /* volume size in SECTORs */
  698.     unsigned short                  sectorSize;                 /* sector size */
  699.     short                           volTypeSelector;            /* volume type selector */
  700.     short                           stringKind;                 /* sub-function = type of string */
  701.     Str255                          stringBuffer;               /* string buffer */
  702. };
  703. typedef struct DICIGetFormatStringRec   DICIGetFormatStringRec;
  704. typedef DICIGetFormatStringRec *        DICIGetFormatStringRecPtr;
  705. /*
  706.  * paramBlock for the diCIGetExtendedFormatParams call
  707.  */
  708. struct DICIGetExtendedFormatRec {
  709.     short                           driveNumber;                /* drive number */
  710.     short                           volTypeSelector;            /* volume type selector or 0 */
  711.     unsigned long                   volSize;                    /* size of volume in SECTORs */
  712.     unsigned short                  sectorSize;                 /* bytes per sector */
  713.     FSSpecPtr                       fileSystemSpecPtr;          /* pointer to the foreign file system's FSSpec */
  714.     Ptr                             extendedInfoPtr;            /* pointer to extended parameter structure */
  715. };
  716. typedef struct DICIGetExtendedFormatRec DICIGetExtendedFormatRec;
  717. typedef DICIGetExtendedFormatRec *      DICIGetExtendedFormatRecPtr;
  718. /*
  719.  *  File System Manager records
  720.  */
  721. typedef CALLBACK_API( OSErr , FSDCommProcPtr )(short message, void *paramBlock, void *globalsPtr);
  722. typedef STACK_UPP_TYPE(FSDCommProcPtr)                          FSDCommUPP;
  723. #if OPAQUE_UPP_TYPES
  724. #if CALL_NOT_IN_CARBON
  725.     EXTERN_API(FSDCommUPP)
  726.     NewFSDCommUPP                  (FSDCommProcPtr          userRoutine);
  727.     EXTERN_API(void)
  728.     DisposeFSDCommUPP              (FSDCommUPP              userUPP);
  729.     EXTERN_API(OSErr)
  730.     InvokeFSDCommUPP               (short                   message,
  731.                                     void *                  paramBlock,
  732.                                     void *                  globalsPtr,
  733.                                     FSDCommUPP              userUPP);
  734. #endif  /* CALL_NOT_IN_CARBON */
  735. #else
  736.     enum { uppFSDCommProcInfo = 0x00000FA0 };                       /* pascal 2_bytes Func(2_bytes, 4_bytes, 4_bytes) */
  737.     #define NewFSDCommUPP(userRoutine)                              (FSDCommUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppFSDCommProcInfo, GetCurrentArchitecture())
  738.     #define DisposeFSDCommUPP(userUPP)                              DisposeRoutineDescriptor(userUPP)
  739.     #define InvokeFSDCommUPP(message, paramBlock, globalsPtr, userUPP)  (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppFSDCommProcInfo, (message), (paramBlock), (globalsPtr))
  740. #endif
  741. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  742. #define NewFSDCommProc(userRoutine)                             NewFSDCommUPP(userRoutine)
  743. #define CallFSDCommProc(userRoutine, message, paramBlock, globalsPtr) InvokeFSDCommUPP(message, paramBlock, globalsPtr, userRoutine)
  744. typedef struct FSDRec                   FSDRec;
  745. struct FSDRec {
  746.     struct FSDRec *                 fsdLink;                    /* ptr to next */
  747.     short                           fsdLength;                  /* length of this FSD in BYTES */
  748.     short                           fsdVersion;                 /* version number */
  749.     short                           fileSystemFSID;             /* file system id */
  750.     Str31                           fileSystemName;             /* file system name */
  751.     FSSpec                          fileSystemSpec;             /* foreign file system's FSSpec */
  752.     Ptr                             fileSystemGlobalsPtr;       /* ptr to file system globals */
  753.     FSDCommUPP                      fileSystemCommProc;         /* communication proc with the FFS */
  754.     long                            reserved3;                  /* --reserved, must be zero-- */
  755.     long                            reserved2;                  /* --reserved, must be zero-- */
  756.     long                            reserved1;                  /* --reserved, must be zero-- */
  757.     HFSCIRec                        fsdHFSCI;                   /* HFS component interface    */
  758.     DICIRec                         fsdDICI;                    /* Disk Initialization component interface */
  759. };
  760. typedef FSDRec *                        FSDRecPtr;
  761. struct FSMGetIconInfoRec {
  762.     long                            theIcon[32];                /* The ICN# structure */
  763.     long                            theMask[32];                /* The mask for the icon above */
  764.     Str255                          whereStr;
  765. };
  766. typedef struct FSMGetIconInfoRec        FSMGetIconInfoRec;
  767. typedef FSMGetIconInfoRec *             FSMGetIconInfoRecPtr;
  768. /*
  769.  * paramBlock for ffsGetIconMessage and fsmGetFSIconMessage
  770.  */
  771. struct FSMGetIconRec {
  772.     short                           refNum;                     /* target drive num or volume refnum */
  773.     FSMGetIconInfoRecPtr            iconBufferPtr;              /* pointer to icon buffer */
  774.     long                            requestSize;                /* requested size of the icon buffer */
  775.     long                            actualSize;                 /* actual size of the icon data returned */
  776.     SInt8                           iconType;                   /* kind of icon */
  777.     Boolean                         isEjectable;                /* true if the device is ejectable */
  778.     DrvQElPtr                       driveQElemPtr;              /* pointer to DQE */
  779.     FSSpecPtr                       fileSystemSpecPtr;          /* pointer to foreign file system's FSSpec */
  780.     long                            reserved1;                  /* --reserved, must be zero-- */
  781. };
  782. typedef struct FSMGetIconRec            FSMGetIconRec;
  783. typedef FSMGetIconRec *                 FSMGetIconRecPtr;
  784. #if CALL_NOT_IN_CARBON
  785. /*
  786.  *  HFS Utility routine prototypes
  787.  */
  788. #if CALL_NOT_IN_CARBON
  789. EXTERN_API( OSErr )
  790. UTAllocateFCB                   (short *                fileRefNum,
  791.                                  FCBRecPtr *            fileCtrlBlockPtr)                   TWOWORDINLINE(0x7000, 0xA824);
  792. EXTERN_API( OSErr )
  793. UTReleaseFCB                    (short                  fileRefNum)                         TWOWORDINLINE(0x7001, 0xA824);
  794. EXTERN_API( OSErr )
  795. UTLocateFCB                     (VCBPtr                 volCtrlBlockPtr,
  796.                                  unsigned long          fileNum,
  797.                                  StringPtr              namePtr,
  798.                                  short *                fileRefNum,
  799.                                  FCBRecPtr *            fileCtrlBlockPtr)                   TWOWORDINLINE(0x7002, 0xA824);
  800. EXTERN_API( OSErr )
  801. UTLocateNextFCB                 (VCBPtr                 volCtrlBlockPtr,
  802.                                  unsigned long          fileNum,
  803.                                  StringPtr              namePtr,
  804.                                  short *                fileRefNum,
  805.                                  FCBRecPtr *            fileCtrlBlockPtr)                   TWOWORDINLINE(0x7003, 0xA824);
  806. EXTERN_API( OSErr )
  807. UTIndexFCB                      (VCBPtr                 volCtrlBlockPtr,
  808.                                  short *                fileRefNum,
  809.                                  FCBRecPtr *            fileCtrlBlockPtr)                   TWOWORDINLINE(0x7004, 0xA824);
  810. EXTERN_API( OSErr )
  811. UTResolveFCB                    (short                  fileRefNum,
  812.                                  FCBRecPtr *            fileCtrlBlockPtr)                   TWOWORDINLINE(0x7005, 0xA824);
  813. EXTERN_API( OSErr )
  814. UTAllocateVCB                   (unsigned short *       sysVCBLength,
  815.                                  VCBPtr *               volCtrlBlockPtr,
  816.                                  unsigned short         addSize)                            TWOWORDINLINE(0x7006, 0xA824);
  817. EXTERN_API( OSErr )
  818. UTAddNewVCB                     (short                  driveNum,
  819.                                  short *                vRefNum,
  820.                                  VCBPtr                 volCtrlBlockPtr)                    TWOWORDINLINE(0x7007, 0xA824);
  821. EXTERN_API( OSErr )
  822. UTDisposeVCB                    (VCBPtr                 volCtrlBlockPtr)                    TWOWORDINLINE(0x7008, 0xA824);
  823. EXTERN_API( OSErr )
  824. UTLocateVCBByRefNum             (short                  refNum,
  825.                                  short *                vRefNum,
  826.                                  VCBPtr *               volCtrlBlockPtr)                    TWOWORDINLINE(0x7009, 0xA824);
  827. EXTERN_API( OSErr )
  828. UTLocateVCBByName               (StringPtr              namePtr,
  829.                                  short *                moreMatches,
  830.                                  short *                vRefNum,
  831.                                  VCBPtr *               volCtrlBlockPtr)                    TWOWORDINLINE(0x700A, 0xA824);
  832. EXTERN_API( OSErr )
  833. UTLocateNextVCB                 (StringPtr              namePtr,
  834.                                  short *                moreMatches,
  835.                                  short *                vRefNum,
  836.                                  VCBPtr *               volCtrlBlockPtr)                    TWOWORDINLINE(0x700B, 0xA824);
  837. EXTERN_API( OSErr )
  838. UTAllocateWDCB                  (WDPBPtr                paramBlock)                         TWOWORDINLINE(0x700C, 0xA824);
  839. EXTERN_API( OSErr )
  840. UTReleaseWDCB                   (short                  wdRefNum)                           TWOWORDINLINE(0x700D, 0xA824);
  841. EXTERN_API( OSErr )
  842. UTResolveWDCB                   (long                   procID,
  843.                                  short                  wdIndex,
  844.                                  short                  wdRefNum,
  845.                                  WDCBRecPtr *           wdCtrlBlockPtr)                     TWOWORDINLINE(0x700E, 0xA824);
  846. EXTERN_API( OSErr )
  847. UTFindDrive                     (short                  driveNum,
  848.                                  DrvQElPtr *            driveQElementPtr)                   TWOWORDINLINE(0x700F, 0xA824);
  849. EXTERN_API( OSErr )
  850. UTAdjustEOF                     (short                  fileRefNum)                         TWOWORDINLINE(0x7010, 0xA824);
  851. EXTERN_API( OSErr )
  852. UTSetDefaultVol                 (long                   nodeHint,
  853.                                  unsigned long          dirID,
  854.                                  short                  refNum)                             TWOWORDINLINE(0x7011, 0xA824);
  855. EXTERN_API( OSErr )
  856. UTGetDefaultVol                 (WDPBPtr                paramBlock)                         TWOWORDINLINE(0x7012, 0xA824);
  857. EXTERN_API( OSErr )
  858. UTEjectVol                      (VCBPtr                 volCtrlBlockPtr)                    TWOWORDINLINE(0x702B, 0xA824);
  859. EXTERN_API( OSErr )
  860. UTCheckWDRefNum                 (short                  wdRefNum)                           TWOWORDINLINE(0x7013, 0xA824);
  861. EXTERN_API( OSErr )
  862. UTCheckFileRefNum               (short                  fileRefNum)                         TWOWORDINLINE(0x7014, 0xA824);
  863. EXTERN_API( OSErr )
  864. UTCheckVolRefNum                (short                  vRefNum)                            TWOWORDINLINE(0x7015, 0xA824);
  865. EXTERN_API( OSErr )
  866. UTCheckPermission               (VCBPtr                 volCtrlBlockPtr,
  867.                                  short *                modByte,
  868.                                  unsigned long          fileNum,
  869.                                  ParmBlkPtr             paramBlock)                         TWOWORDINLINE(0x7016, 0xA824);
  870. EXTERN_API( OSErr )
  871. UTCheckVolOffline               (short                  vRefNum)                            TWOWORDINLINE(0x7017, 0xA824);
  872. EXTERN_API( OSErr )
  873. UTCheckVolModifiable            (short                  vRefNum)                            TWOWORDINLINE(0x7018, 0xA824);
  874. EXTERN_API( OSErr )
  875. UTCheckFileModifiable           (short                  fileRefNum)                         TWOWORDINLINE(0x7019, 0xA824);
  876. EXTERN_API( OSErr )
  877. UTCheckDirBusy                  (VCBPtr                 volCtrlBlockPtr,
  878.                                  unsigned long          dirID)                              TWOWORDINLINE(0x701A, 0xA824);
  879. EXTERN_API( OSErr )
  880. UTParsePathname                 (short *                volNamelength,
  881.                                  StringPtr              namePtr)                            TWOWORDINLINE(0x701B, 0xA824);
  882. EXTERN_API( OSErr )
  883. UTGetPathComponentName          (ParsePathRecPtr        parseRec)                           TWOWORDINLINE(0x701C, 0xA824);
  884. EXTERN_API( OSErr )
  885. UTDetermineVol                  (ParmBlkPtr             paramBlock,
  886.                                  short *                status,
  887.                                  short *                moreMatches,
  888.                                  short *                vRefNum,
  889.                                  VCBPtr *               volCtrlBlockPtr)                    TWOWORDINLINE(0x701D, 0xA824);
  890. EXTERN_API( OSErr )
  891. UTGetBlock                      (short                  refNum,
  892.                                  void *                 log2PhyProc,
  893.                                  unsigned long          blockNum,
  894.                                  short                  gbOption,
  895.                                  Ptr *                  buffer)                             TWOWORDINLINE(0x701F, 0xA824);
  896. EXTERN_API( OSErr )
  897. UTReleaseBlock                  (Ptr                    buffer,
  898.                                  short                  rbOption)                           TWOWORDINLINE(0x7020, 0xA824);
  899. EXTERN_API( OSErr )
  900. UTFlushCache                    (short                  refNum,
  901.                                  short                  fcOption)                           TWOWORDINLINE(0x7021, 0xA824);
  902. EXTERN_API( OSErr )
  903. UTMarkDirty                     (Ptr                    buffer)                             TWOWORDINLINE(0x7023, 0xA824);
  904. EXTERN_API( OSErr )
  905. UTTrashVolBlocks                (VCBPtr                 volCtrlBlockPtr)                    TWOWORDINLINE(0x7024, 0xA824);
  906. EXTERN_API( OSErr )
  907. UTTrashFileBlocks               (VCBPtr                 volCtrlBlockPtr,
  908.                                  unsigned long          fileNum)                            TWOWORDINLINE(0x7025, 0xA824);
  909. EXTERN_API( OSErr )
  910. UTTrashBlocks                   (unsigned long          beginPosition,
  911.                                  unsigned long          byteCount,
  912.                                  VCBPtr                 volCtrlBlockPtr,
  913.                                  short                  fileRefNum,
  914.                                  short                  tbOption)                           TWOWORDINLINE(0x7026, 0xA824);
  915. EXTERN_API( OSErr )
  916. UTCacheReadIP                   (void *                 log2PhyProc,
  917.                                  unsigned long          filePosition,
  918.                                  Ptr                    ioBuffer,
  919.                                  short                  fileRefNum,
  920.                                  unsigned long          reqCount,
  921.                                  unsigned long *        actCount,
  922.                                  short                  cacheOption)                        TWOWORDINLINE(0x7027, 0xA824);
  923. EXTERN_API( OSErr )
  924. UTCacheWriteIP                  (void *                 log2PhyProc,
  925.                                  unsigned long          filePosition,
  926.                                  Ptr                    ioBuffer,
  927.                                  short                  fileRefNum,
  928.                                  unsigned long          reqCount,
  929.                                  unsigned long *        actCount,
  930.                                  short                  cacheOption)                        TWOWORDINLINE(0x7028, 0xA824);
  931. EXTERN_API( OSErr )
  932. UTBlockInFQHashP                (short                  vRefNum,
  933.                                  unsigned long          diskBlock)                          TWOWORDINLINE(0x702C, 0xA824);
  934. EXTERN_API( OSErr )
  935. UTVolCacheReadIP                (VCBPtr                 volCtrlBlockPtr,
  936.                                  unsigned long          blockPosition,
  937.                                  Ptr                    ioBuffer,
  938.                                  unsigned long          reqCount,
  939.                                  unsigned long *        actCount,
  940.                                  short                  cacheOption)                        TWOWORDINLINE(0x7034, 0xA824);
  941. EXTERN_API( OSErr )
  942. UTVolCacheWriteIP               (VCBPtr                 volCtrlBlockPtr,
  943.                                  unsigned long          blockPosition,
  944.                                  Ptr                    ioBuffer,
  945.                                  unsigned long          reqCount,
  946.                                  unsigned long *        actCount,
  947.                                  short                  cacheOption)                        TWOWORDINLINE(0x7035, 0xA824);
  948. EXTERN_API( OSErr )
  949. UTResolveFileRefNum             (FCBRecPtr              fileCtrlBlockPtr,
  950.                                  short *                fileRefNum)                         TWOWORDINLINE(0x7036, 0xA824);
  951. EXTERN_API( OSErr )
  952. UTCheckFCB                      (FCBRecPtr              fileCtrlBlockPtr)                   TWOWORDINLINE(0x7037, 0xA824);
  953. EXTERN_API( OSErr )
  954. UTCheckForkPermissions          (VCBPtr                 volCtrlBlockPtr,
  955.                                  UInt32                 fileNum,
  956.                                  UInt32                 forkID,
  957.                                  Boolean                fileLocked,
  958.                                  SInt8                  permissions,
  959.                                  Boolean                useSearchList,
  960.                                  SInt8 *                fcbFlags,
  961.                                  SInt16 *               openForkRefNum)                     TWOWORDINLINE(0x7038, 0xA824);
  962. EXTERN_API( OSErr )
  963. UTAddFCBToSearchList            (FCBRecPtr              fileCtrlBlockPtr)                   TWOWORDINLINE(0x7039, 0xA824);
  964. EXTERN_API( OSErr )
  965. UTRemoveFCBFromSearchList       (FCBRecPtr              fileCtrlBlockPtr)                   TWOWORDINLINE(0x703A, 0xA824);
  966. EXTERN_API( OSErr )
  967. UTLocateFCBInSearchList         (VCBPtr                 volCtrlBlockPtr,
  968.                                  unsigned long          fileNum,
  969.                                  short *                fileRefNum,
  970.                                  FCBRecPtr *            fileCtrlBlockPtr)                   TWOWORDINLINE(0x703B, 0xA824);
  971. EXTERN_API( OSErr )
  972. UTGetForkControlBlockSize       (UInt32 *               fcbSize)                            TWOWORDINLINE(0x703C, 0xA824);
  973. /*
  974.  *  File System Manager call prototypes
  975.  */
  976.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  977.                                                                                             #pragma parameter __D0 InstallFS(__A0)
  978.                                                                                             #endif
  979. EXTERN_API( OSErr )
  980. InstallFS                       (FSDRecPtr              fsdPtr)                             TWOWORDINLINE(0x7000, 0xA0AC);
  981.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  982.                                                                                             #pragma parameter __D0 RemoveFS(__A0)
  983.                                                                                             #endif
  984. EXTERN_API( OSErr )
  985. RemoveFS                        (short                  fsid)                               TWOWORDINLINE(0x7001, 0xA0AC);
  986. EXTERN_API( OSErr )
  987. SetFSInfo                       (short                  fsid,
  988.                                  short                  bufSize,
  989.                                  FSDRecPtr              fsdPtr);
  990. EXTERN_API( OSErr )
  991. GetFSInfo                       (short                  selector,
  992.                                  short                  key,
  993.                                  short *                bufSize,
  994.                                  FSDRecPtr              fsdPtr);
  995. EXTERN_API( OSErr )
  996. InformFSM                       (short                  theMessage,
  997.                                  void *                 paramBlock);
  998. EXTERN_API( OSErr )
  999. InformFFS                       (short                  fsid,
  1000.                                  void *                 paramBlock);
  1001. #endif  /* CALL_NOT_IN_CARBON */
  1002. #endif  /* CALL_NOT_IN_CARBON */
  1003. #if PRAGMA_STRUCT_ALIGN
  1004.     #pragma options align=reset
  1005. #elif PRAGMA_STRUCT_PACKPUSH
  1006.     #pragma pack(pop)
  1007. #elif PRAGMA_STRUCT_PACK
  1008.     #pragma pack()
  1009. #endif
  1010. #ifdef PRAGMA_IMPORT_OFF
  1011. #pragma import off
  1012. #elif PRAGMA_IMPORT
  1013. #pragma import reset
  1014. #endif
  1015. #ifdef __cplusplus
  1016. }
  1017. #endif
  1018. #endif /* __FSM__ */