home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Essentials / MPW 411 / PInterfacesHelp < prev    next >
Encoding:
Text File  |  1991-04-08  |  2.7 MB  |  96,775 lines  |  [TEXT/MPS ]

Text Truncated. Only the first 1MB is shown below. Download the file for the complete contents.
  1. æKY CopyrightNotice
  2. æC  Copyright Apple Computer, Inc. 1985-1991, All rights reserved.
  3. 411 - PInterfaces Help - MPW 3.2 Final Release
  4. Friday, April 5, 1991 3:27:56 PM
  5.  
  6. æKY Help
  7. PInterfacesHelp
  8. æKL AboutPInterfacesHelp
  9. ADSP.p
  10. AIFF.p
  11. Aliases.p
  12. AppleEvents.p
  13. AppleTalk.p
  14. Balloons.p
  15. CommResources.p
  16. Connections.p
  17. ConnectionTools.p
  18. Controls.p
  19. CRMSerialDevices.p
  20. CTBUtilities.p
  21. CursorCtl.p
  22. DatabaseAccess.p
  23. Desk.p
  24. DeskBus.p
  25. Devices.p
  26. Dialogs.p
  27. DisAsmLookup.p
  28. DiskInit.p
  29. Disks.p
  30. Editions.p
  31. ENET.p
  32. EPPC.p
  33. ErrMgr.p
  34. Errors.p
  35. Events.p
  36. Files.p
  37. FileTransfers.p
  38. FileTransferTools.p
  39. Finder.p
  40. FixMath.p
  41. Folders.p
  42. Fonts.p
  43. GestaltEqu.p
  44. Globals.p
  45. Graf3D.p
  46. HyperXCmd.p
  47. Icons.p
  48. Language.p
  49. Lists.p
  50. Memory.p
  51. Menus.p
  52. MIDI.p
  53. Notification.p
  54. OSEvents.p
  55. OSUtils.p
  56. Packages.p
  57. Palettes.p
  58. Perf.p
  59. Picker.p
  60. PictUtil.p
  61. Power.p
  62. PPCToolBox.p
  63. Printing.p
  64. Processes.p
  65. QDOffscreen.p
  66. Quickdraw.p
  67. Resources.p
  68. Retrace.p
  69. ROMDefs.p
  70. SANE.p
  71. Scrap.p
  72. Script.p
  73. SCSI.p
  74. SegLoad.p
  75. Serial.p
  76. ShutDown.p
  77. Signal.p
  78. Slots.p
  79. Sound.p
  80. SoundInput.p
  81. StandardFile.p
  82. Start.p
  83. Strings.p
  84. SysEqu.p
  85. TextEdit.p
  86. Timer.p
  87. ToolUtils.p
  88. Traps.p
  89. Types.p
  90. Video.p
  91. Windows.p
  92.  
  93. æKY AboutPInterfacesHelp
  94. æC
  95.  
  96. __________________________________________________________________
  97. Version 1.0 Final  -- MPW 3.2 Final
  98.  
  99. Contains Nets & Comm Interfaces and bug fixes.
  100.  
  101.  
  102.  
  103. __________________________________________________________________
  104.  
  105. Version 1.0 Beta 6  -- ETO# 3
  106.  
  107. Contains updated InsideMacintosh Volume VI information.
  108.  
  109.  
  110. __________________________________________________________________
  111.  
  112. Version 1.0 Beta -- ETO# 2
  113.  
  114. This version contains the InsideMacintosh Volume VI information.
  115.  
  116.  
  117.  
  118.  
  119. æKY ADSP.p
  120. æKL 
  121. attnBufSize
  122. dspAttention
  123. dspCLDeny
  124. dspCLInit
  125. dspCLListen
  126. dspClose
  127. dspCLRemove
  128. dspInit
  129. dspNewCID
  130. dspOpen
  131. dspOptions
  132. DSPParamBlock
  133. DSPPBPtr
  134. dspRead
  135. dspRemove
  136. dspReset
  137. dspStatus
  138. dspWrite
  139. eAttention
  140. eClosed
  141. eFwdReset
  142. errAborted
  143. errAttention
  144. errDSPQueueSize
  145. errFwdReset
  146. errOpenDenied
  147. errOpening
  148. errRefNum
  149. errState
  150. eTearDown
  151. minDSPQueueSize
  152. ocAccept
  153. ocEstablish
  154. ocPassive
  155. ocRequest
  156. sClosed
  157. sClosing
  158. sListening
  159. sOpen
  160. sOpening
  161. sPassive
  162. TPCCB
  163. TRCCB
  164.  
  165. æKY errRefNum
  166. æFp ADSP.p
  167. æT CONST
  168. æD errRefNum = -1280; { bad connection refNum }
  169. æC 
  170.  
  171. æKY errAborted
  172. æFp ADSP.p
  173. æT CONST
  174. æD errAborted = -1279; { control call was aborted }
  175. æC 
  176.  
  177. æKY errState
  178. æFp ADSP.p
  179. æT CONST
  180. æD errState = -1278; { bad connection state for this operation }
  181. æC 
  182.  
  183. æKY errOpening
  184. æFp ADSP.p
  185. æT CONST
  186. æD errOpening = -1277; { open connection request failed }
  187. æC 
  188.  
  189. æKY errAttention
  190. æFp ADSP.p
  191. æT CONST
  192. æD errAttention = -1276; { attention message too long }
  193. æC 
  194.  
  195. æKY errFwdReset
  196. æFp ADSP.p
  197. æT CONST
  198. æD errFwdReset = -1275; { read terminated by forward reset }
  199. æC 
  200.  
  201. æKY errDSPQueueSize
  202. æFp ADSP.p
  203. æT CONST
  204. æD errDSPQueueSize = -1274; { DSP Read/Write Queue Too small }
  205. æC 
  206.  
  207. æKY errOpenDenied
  208. æFp ADSP.p
  209. æT CONST
  210. æD errOpenDenied = -1273; { open connection request was denied }
  211. æC 
  212.  
  213. æKY dspInit
  214. æFp ADSP.p
  215. æT CONST
  216. æD dspInit = 255; { create a new connection end }
  217. æC 
  218.  
  219. æKY dspRemove
  220. æFp ADSP.p
  221. æT CONST
  222. æD dspRemove = 254; { remove a connection end }
  223. æC 
  224.  
  225. æKY dspOpen
  226. æFp ADSP.p
  227. æT CONST
  228. æD dspOpen = 253; { open a connection }
  229. æC 
  230.  
  231. æKY dspClose
  232. æFp ADSP.p
  233. æT CONST
  234. æD dspClose = 252; { close a connection }
  235. æC 
  236.  
  237. æKY dspCLInit
  238. æFp ADSP.p
  239. æT CONST
  240. æD dspCLInit = 251; { create a connection listener }
  241. æC 
  242.  
  243. æKY dspCLRemove
  244. æFp ADSP.p
  245. æT CONST
  246. æD dspCLRemove = 250; { remove a connection listener }
  247. æC 
  248.  
  249. æKY dspCLListen
  250. æFp ADSP.p
  251. æT CONST
  252. æD dspCLListen = 249; { post a listener request }
  253. æC 
  254.  
  255. æKY dspCLDeny
  256. æFp ADSP.p
  257. æT CONST
  258. æD dspCLDeny = 248; { deny an open connection request }
  259. æC 
  260.  
  261. æKY dspStatus
  262. æFp ADSP.p
  263. æT CONST
  264. æD dspStatus = 247; { get status of connection end }
  265. æC 
  266.  
  267. æKY dspRead
  268. æFp ADSP.p
  269. æT CONST
  270. æD dspRead = 246; { read data from the connection }
  271. æC 
  272.  
  273. æKY dspWrite
  274. æFp ADSP.p
  275. æT CONST
  276. æD dspWrite = 245; { write data on the connection }
  277. æC 
  278.  
  279. æKY dspAttention
  280. æFp ADSP.p
  281. æT CONST
  282. æD dspAttention = 244; { send an attention message }
  283. æC 
  284.  
  285. æKY dspOptions
  286. æFp ADSP.p
  287. æT CONST
  288. æD dspOptions = 243; { set connection end options }
  289. æC 
  290.  
  291. æKY dspReset
  292. æFp ADSP.p
  293. æT CONST
  294. æD dspReset = 242; { forward reset the connection }
  295. æC 
  296.  
  297. æKY dspNewCID
  298. æFp ADSP.p
  299. æT CONST
  300. æD dspNewCID = 241; { generate a cid for a connection end }
  301. æC 
  302.  
  303. æKY ocRequest
  304. æFp ADSP.p
  305. æT CONST
  306. æD ocRequest = 1; { request a connection with remote }
  307. æC 
  308.  
  309. æKY ocPassive
  310. æFp ADSP.p
  311. æT CONST
  312. æD ocPassive = 2; { wait for a connection request from remote }
  313. æC 
  314.  
  315. æKY ocAccept
  316. æFp ADSP.p
  317. æT CONST
  318. æD ocAccept = 3; { accept request as delivered by listener }
  319. æC 
  320.  
  321. æKY ocEstablish
  322. æFp ADSP.p
  323. æT CONST
  324. æD ocEstablish = 4; { consider connection to be open }
  325. æC 
  326.  
  327. æKY sListening
  328. æFp ADSP.p
  329. æT CONST
  330. æD sListening = 1; { for connection listeners }
  331. æC 
  332.  
  333. æKY sPassive
  334. æFp ADSP.p
  335. æT CONST
  336. æD sPassive = 2; { waiting for a connection request from remote }
  337. æC 
  338.  
  339. æKY sOpening
  340. æFp ADSP.p
  341. æT CONST
  342. æD sOpening = 3; { requesting a connection with remote }
  343. æC 
  344.  
  345. æKY sOpen
  346. æFp ADSP.p
  347. æT CONST
  348. æD sOpen = 4; { connection is open }
  349. æC 
  350.  
  351. æKY sClosing
  352. æFp ADSP.p
  353. æT CONST
  354. æD sClosing = 5; { connection is being torn down }
  355. æC 
  356.  
  357. æKY sClosed
  358. æFp ADSP.p
  359. æT CONST
  360. æD sClosed = 6; { connection end state is closed }
  361. æC 
  362.  
  363. æKY eClosed
  364. æFp ADSP.p
  365. æT CONST
  366. æD eClosed = $80; { received connection closed advice }
  367. æC 
  368.  
  369. æKY eTearDown
  370. æFp ADSP.p
  371. æT CONST
  372. æD eTearDown = $40; { connection closed due to broken connection }
  373. æC 
  374.  
  375. æKY eAttention
  376. æFp ADSP.p
  377. æT CONST
  378. æD eAttention = $20; { received attention message }
  379. æC 
  380.  
  381. æKY eFwdReset
  382. æFp ADSP.p
  383. æT CONST
  384. æD eFwdReset = $10; { received forward reset advice }
  385. æC 
  386.  
  387. æKY attnBufSize
  388. æFp ADSP.p
  389. æT CONST
  390. æD attnBufSize = 570; { size of client attention buffer }
  391. æC 
  392.  
  393. æKY minDSPQueueSize
  394. æFp ADSP.p
  395. æT CONST
  396. æD minDSPQueueSize = 100; { Minimum size of receive or send Queue }
  397. æC 
  398.  
  399. æKY TRCCB
  400. TPCCB
  401. æFp ADSP.p
  402. æT RECORD
  403. æD TPCCB = ^TRCCB;
  404. TRCCB = PACKED RECORD
  405.     ccbLink: TPCCB; { link to next ccb }
  406.     refNum: INTEGER; { user reference number }
  407.     state: INTEGER; { state of the connection end }
  408.     userFlags: Byte; { flags for unsolicited connection events }
  409.     localSocket: Byte; { socket number of this connection end }
  410.     remoteAddress: AddrBlock; { internet address of remote end }
  411.     attnCode: INTEGER; { attention code received }
  412.     attnSize: INTEGER; { size of received attention data }
  413.     attnPtr: Ptr; { ptr to received attention data }
  414.     reserved: PACKED ARRAY [1..220] OF Byte; { adsp internal use }
  415.     END;
  416. æC 
  417.  
  418. æKY DSPParamBlock
  419. DSPPBPtr
  420. æFp ADSP.p
  421. æT RECORD
  422. æD DSPPBPtr = ^DSPParamBlock;
  423. DSPParamBlock = PACKED RECORD
  424.     qLink: QElemPtr;
  425.     qType: INTEGER;
  426.     ioTrap: INTEGER;
  427.     ioCmdAddr: Ptr;
  428.     ioCompletion: ProcPtr;
  429.     ioResult: OSErr;
  430.     ioNamePtr: StringPtr;
  431.     ioVRefNum: INTEGER;
  432.     ioCRefNum: INTEGER; { adsp driver refNum }
  433.     csCode: INTEGER; { adsp driver control code }
  434.     qStatus: LONGINT; { adsp internal use }
  435.     ccbRefNum: INTEGER; { refnum of ccb }
  436.     CASE INTEGER OF
  437.       dspInit,dspCLInit:
  438.         (ccbPtr: TPCCB; {pointer to connection control block}
  439.          userRoutine: ProcPtr; {client routine to call on event}
  440.          sendQSize: INTEGER; {size of send queue (0..64K bytes)}
  441.          sendQueue:  Ptr; {client passed send queue buffer}
  442.          recvQSize: INTEGER; {size of receive queue (0..64K bytes)}
  443.          recvQueue: Ptr; {client passed receive queue buffer}
  444.          attnPtr: Ptr; {client passed receive attention buffer}
  445.          localSocket: Byte; {local socket number}
  446.          filler1: Byte; {filler for proper byte alignment}
  447.           );
  448.           dspOpen,dspCLListen,dspCLDeny:
  449.             (localCID: INTEGER; {local connection id}
  450.              remoteCID: INTEGER; {remote connection id}
  451.              remoteAddress: AddrBlock; {address of remote end}
  452.              filterAddress: AddrBlock; {address filter}
  453.              sendSeq: LONGINT; {local send sequence number}
  454.              sendWindow: INTEGER; {send window size}
  455.              recvSeq: LONGINT; {receive sequence number}
  456.              attnSendSeq: LONGINT; {attention send sequence number}
  457.              attnRecvSeq: LONGINT; {attention receive sequence number}
  458.              ocMode: Byte; {open connection mode}
  459.              ocInterval: Byte; {open connection request retry interval}
  460.              ocMaximum: Byte; {open connection request retry maximum}
  461.              filler2: Byte; {filler for proper byte alignment}
  462.               );
  463.               dspClose,dspRemove:
  464.                 (abort: Byte; {abort connection immediately if non-zero}
  465.                  filler3: Byte; {filler for proper byte alignment}
  466.                   );
  467.                   dspStatus:
  468.                     (statusCCB: TPCCB; {pointer to ccb}
  469.                      sendQPending: INTEGER; {pending bytes in send queue}
  470.                      sendQFree: INTEGER; {available buffer space in send queue}
  471.                      recvQPending: INTEGER; {pending bytes in receive queue}
  472.                      recvQFree: INTEGER; {available buffer space in receive queue}
  473.                       );
  474.                       dspRead,dspWrite:
  475.                         (reqCount: INTEGER; {requested number of bytes}
  476.                          actCount: INTEGER; {actual number of bytes}
  477.                          dataPtr: Ptr; {pointer to data buffer}
  478.                          eom: Byte; {indicates logical end of message}
  479.                          flush: Byte; {send data now}
  480.                           );
  481.                           dspAttention:
  482.                             (attnCode: INTEGER; {client attention code}
  483.                              attnSize: INTEGER; {size of attention data}
  484.                              attnData: Ptr; {pointer to attention data}
  485.                              attnInterval: Byte; {retransmit timer in 10-tick intervals}
  486.                              filler4: Byte; {filler for proper byte alignment}
  487.                               );
  488.                               dspOptions:
  489.                                 (sendBlocking: INTEGER; {quantum for data packets}
  490.                                  sendTimer: Byte; {send timer in 10-tick intervals}
  491.                                  rtmtTimer: Byte; {retransmit timer in 10-tick intervals}
  492.                                  badSeqMax: Byte; {threshold for sending retransmit advice}
  493.                                  useCheckSum: Byte; {use ddp packet checksum}
  494.                                   );
  495.                                   dspNewCID:
  496.                                     (newCID: INTEGER; {new connection id returned}
  497.                                       );
  498.     END;
  499. æC 
  500.  
  501.  
  502. æKY AIFF.p
  503. æKL 
  504. ACE2to1Name
  505. ACE2Type
  506. ACE8to3Name
  507. ACE8Type
  508. AIFCID
  509. AIFCVersion1
  510. AIFFID
  511. AIFFLoop
  512. AnnotationID
  513. ApplicationSpecificChunk
  514. ApplicationSpecificChunkPtr
  515. ApplicationSpecificID
  516. AudioRecordingChunk
  517. AudioRecordingChunkPtr
  518. AudioRecordingID
  519. AuthorID
  520. ChunkHeader
  521. Comment
  522. CommentID
  523. CommentsChunk
  524. CommentsChunkPtr
  525. CommonChunk
  526. CommonChunkPtr
  527. CommonID
  528. ContainerChunk
  529. CopyrightID
  530. ExtCommonChunk
  531. ExtCommonChunkPtr
  532. FormatVersionChunk
  533. FormatVersionChunkPtr
  534. FormatVersionID
  535. FORMID
  536. ForwardBackwardLooping
  537. ForwardLooping
  538. ID
  539. InstrumentChunk
  540. InstrumentChunkPtr
  541. InstrumentID
  542. MACE3to1Name
  543. MACE3Type
  544. MACE6to1Name
  545. MACE6Type
  546. Marker
  547. MarkerChunk
  548. MarkerChunkPtr
  549. MarkerID
  550. MarkerIdType
  551. MIDIDataChunk
  552. MIDIDataChunkPtr
  553. MIDIDataID
  554. NameID
  555. NoLooping
  556. NoneName
  557. NoneType
  558. SoundDataChunk
  559. SoundDataChunkPtr
  560. SoundDataID
  561. TextChunk
  562. TextChunkPtr
  563.  
  564. æKY AIFFID
  565. æFp AIFF.p
  566. æT CONST
  567. æD AIFFID = 'AIFF';
  568. æC 
  569.  
  570. æKY AIFCID
  571. æFp AIFF.p
  572. æT CONST
  573. æD AIFCID = 'AIFC';
  574. æC 
  575.  
  576. æKY FormatVersionID
  577. æFp AIFF.p
  578. æT CONST
  579. æD FormatVersionID = 'FVER';
  580. æC 
  581.  
  582. æKY CommonID
  583. æFp AIFF.p
  584. æT CONST
  585. æD CommonID = 'COMM';
  586. æC 
  587.  
  588. æKY FORMID
  589. æFp AIFF.p
  590. æT CONST
  591. æD FORMID = 'FORM';
  592. æC 
  593.  
  594. æKY SoundDataID
  595. æFp AIFF.p
  596. æT CONST
  597. æD SoundDataID = 'SSND';
  598. æC 
  599.  
  600. æKY MarkerID
  601. æFp AIFF.p
  602. æT CONST
  603. æD MarkerID = 'MARK';
  604. æC 
  605.  
  606. æKY InstrumentID
  607. æFp AIFF.p
  608. æT CONST
  609. æD InstrumentID = 'INST';
  610. æC 
  611.  
  612. æKY MIDIDataID
  613. æFp AIFF.p
  614. æT CONST
  615. æD MIDIDataID = 'MIDI';
  616. æC 
  617.  
  618. æKY AudioRecordingID
  619. æFp AIFF.p
  620. æT CONST
  621. æD AudioRecordingID = 'AESD';
  622. æC 
  623.  
  624. æKY ApplicationSpecificID
  625. æFp AIFF.p
  626. æT CONST
  627. æD ApplicationSpecificID = 'APPL';
  628. æC 
  629.  
  630. æKY CommentID
  631. æFp AIFF.p
  632. æT CONST
  633. æD CommentID = 'COMT';
  634. æC 
  635.  
  636. æKY NameID
  637. æFp AIFF.p
  638. æT CONST
  639. æD NameID = 'NAME';
  640. æC 
  641.  
  642. æKY AuthorID
  643. æFp AIFF.p
  644. æT CONST
  645. æD AuthorID = 'AUTH';
  646. æC 
  647.  
  648. æKY CopyrightID
  649. æFp AIFF.p
  650. æT CONST
  651. æD CopyrightID = '(c)    ';
  652. æC 
  653.  
  654. æKY AnnotationID
  655. æFp AIFF.p
  656. æT CONST
  657. æD AnnotationID = 'ANNO';
  658. æC 
  659.  
  660. æKY NoLooping
  661. æFp AIFF.p
  662. æT CONST
  663. æD NoLooping = 0;
  664. æC 
  665.  
  666. æKY ForwardLooping
  667. æFp AIFF.p
  668. æT CONST
  669. æD ForwardLooping = 1;
  670. æC 
  671.  
  672. æKY ForwardBackwardLooping
  673. æFp AIFF.p
  674. æT CONST
  675. æD ForwardBackwardLooping = 2;
  676. æC 
  677.  
  678. æKY AIFCVersion1
  679. æFp AIFF.p
  680. æT CONST
  681. æD AIFCVersion1 = $A2805140;
  682. æC 
  683.  
  684. æKY NoneName
  685. æFp AIFF.p
  686. æT CONST
  687. æD NoneName = 'pnot compressed';
  688. æC 
  689.  
  690. æKY ACE2to1Name
  691. æFp AIFF.p
  692. æT CONST
  693. æD ACE2to1Name = 'ACE 2-to-1';
  694. æC 
  695.  
  696. æKY ACE8to3Name
  697. æFp AIFF.p
  698. æT CONST
  699. æD ACE8to3Name = 'ACE 8-to-3';
  700. æC 
  701.  
  702. æKY MACE3to1Name
  703. æFp AIFF.p
  704. æT CONST
  705. æD MACE3to1Name = 'MACE 3-to-1';
  706. æC 
  707.  
  708. æKY MACE6to1Name
  709. æFp AIFF.p
  710. æT CONST
  711. æD MACE6to1Name ='MACE 6-to-1';
  712. æC 
  713.  
  714. æKY NoneType
  715. æFp AIFF.p
  716. æT CONST
  717. æD NoneType = 'NONE';
  718. æC 
  719.  
  720. æKY ACE2Type
  721. æFp AIFF.p
  722. æT CONST
  723. æD ACE2Type = 'ACE2';
  724. æC 
  725.  
  726. æKY ACE8Type
  727. æFp AIFF.p
  728. æT CONST
  729. æD ACE8Type = 'ACE8';
  730. æC 
  731.  
  732. æKY MACE3Type
  733. æFp AIFF.p
  734. æT CONST
  735. æD MACE3Type = 'MAC3';
  736. æC 
  737.  
  738. æKY MACE6Type
  739. æFp AIFF.p
  740. æT CONST
  741. æD MACE6Type = 'MAC6';
  742. æC 
  743.  
  744. æKY ID
  745. æFp AIFF.p
  746. æT TYPE
  747. æD ID = LONGINT;
  748. æC 
  749.  
  750. æKY MarkerIdType
  751. æFp AIFF.p
  752. æT TYPE
  753. æD MarkerIdType = INTEGER;
  754. æC 
  755.  
  756. æKY ChunkHeader
  757. æFp AIFF.p
  758. æT RECORD
  759. æD ChunkHeader = RECORD
  760.     ckID: ID;
  761.     ckSize: LONGINT;
  762.     END;
  763. æC 
  764.  
  765. æKY ContainerChunk
  766. æFp AIFF.p
  767. æT RECORD
  768. æD ContainerChunk = RECORD
  769.     ckID: ID;
  770.     ckSize: LONGINT;
  771.     formType: ID;
  772.     END;
  773. æC 
  774.  
  775. æKY FormatVersionChunk
  776. FormatVersionChunkPtr
  777. æFp AIFF.p
  778. æT RECORD
  779. æD FormatVersionChunkPtr = ^FormatVersionChunk;
  780. FormatVersionChunk = RECORD
  781.     ckID: ID;
  782.     ckSize: LONGINT;
  783.     timestamp: LONGINT;
  784.     END;
  785. æC 
  786.  
  787. æKY CommonChunk
  788. CommonChunkPtr
  789. æFp AIFF.p
  790. æT RECORD
  791. æD CommonChunkPtr = ^CommonChunk;
  792. CommonChunk = RECORD
  793.     ckID: ID;
  794.     ckSize: LONGINT;
  795.     numChannels: INTEGER;
  796.     numSampleFrames: LONGINT;
  797.     sampleSize: INTEGER;
  798.     sampleRate: extended;
  799.     END;
  800. æC 
  801.  
  802. æKY ExtCommonChunk
  803. ExtCommonChunkPtr
  804. æFp AIFF.p
  805. æT RECORD
  806. æD ExtCommonChunkPtr = ^ExtCommonChunk;
  807. ExtCommonChunk = RECORD
  808.     ckID: ID;
  809.     ckSize: LONGINT;
  810.     numChannels: INTEGER;
  811.     numSampleFrames: LONGINT;
  812.     sampleSize: INTEGER;
  813.     sampleRate: extended;
  814.     compressionType: ID;
  815.     compressionName: PACKED ARRAY [0..0] OF Byte;
  816.     END;
  817. æC 
  818.  
  819. æKY SoundDataChunk
  820. SoundDataChunkPtr
  821. æFp AIFF.p
  822. æT RECORD
  823. æD SoundDataChunkPtr = ^SoundDataChunk;
  824. SoundDataChunk = RECORD
  825.     ckID: ID;
  826.     ckSize: LONGINT;
  827.     offset: LONGINT;
  828.     blockSize: LONGINT;
  829.     END;
  830. æC 
  831.  
  832. æKY Marker
  833. æFp AIFF.p
  834. æT RECORD
  835. æD Marker = RECORD
  836.     id: MarkerIdType;
  837.     position: LONGINT;
  838.     markerName: Str255;
  839.     END;
  840. æC 
  841.  
  842. æKY MarkerChunk
  843. MarkerChunkPtr
  844. æFp AIFF.p
  845. æT RECORD
  846. æD MarkerChunkPtr = ^MarkerChunk;
  847. MarkerChunk = RECORD
  848.     ckID: ID;
  849.     ckSize: LONGINT;
  850.     numMarkers: INTEGER;
  851.     Markers: ARRAY [0..0] OF Marker;
  852.     END;
  853. æC 
  854.  
  855. æKY AIFFLoop
  856. æFp AIFF.p
  857. æT RECORD
  858. æD AIFFLoop = RECORD
  859.     playMode: INTEGER;
  860.     beginLoop: MarkerIdType;
  861.     endLoop: MarkerIdType;
  862.     END;
  863. æC 
  864.  
  865. æKY InstrumentChunk
  866. InstrumentChunkPtr
  867. æFp AIFF.p
  868. æT RECORD
  869. æD InstrumentChunkPtr = ^InstrumentChunk;
  870. InstrumentChunk = RECORD
  871.     ckID: ID;
  872.     ckSize: LONGINT;
  873.     baseFrequency: Byte;
  874.     detune: Byte;
  875.     lowFrequency: Byte;
  876.     highFrequency: Byte;
  877.     lowVelocity: Byte;
  878.     highVelocity: Byte;
  879.     gain: INTEGER;
  880.     sustainLoop: AIFFLoop;
  881.     releaseLoop: AIFFLoop;
  882.     END;
  883. æC 
  884.  
  885. æKY MIDIDataChunk
  886. MIDIDataChunkPtr
  887. æFp AIFF.p
  888. æT RECORD
  889. æD MIDIDataChunkPtr = ^MIDIDataChunk;
  890. MIDIDataChunk = RECORD
  891.     ckID: ID;
  892.     ckSize: LONGINT;
  893.     MIDIdata: ARRAY [0..0] OF SignedByte;
  894.     END;
  895. æC 
  896.  
  897. æKY AudioRecordingChunk
  898. AudioRecordingChunkPtr
  899. æFp AIFF.p
  900. æT RECORD
  901. æD AudioRecordingChunkPtr = ^AudioRecordingChunk;
  902. AudioRecordingChunk = RECORD
  903.     ckID: ID;
  904.     ckSize: LONGINT;
  905.     AESChannelStatus: ARRAY [0..23] OF SignedByte;
  906.     END;
  907. æC 
  908.  
  909. æKY ApplicationSpecificChunk
  910. ApplicationSpecificChunkPtr
  911. æFp AIFF.p
  912. æT RECORD
  913. æD ApplicationSpecificChunkPtr = ^ApplicationSpecificChunk;
  914. ApplicationSpecificChunk = RECORD
  915.     ckID: ID;
  916.     ckSize: LONGINT;
  917.     applicationSignature: OSType;
  918.     data: ARRAY [0..0] OF Byte;
  919.     END;
  920. æC 
  921.  
  922. æKY Comment
  923. æFp AIFF.p
  924. æT RECORD
  925. æD Comment = RECORD
  926.     timeStamp: LONGINT;
  927.     marker: MarkerIdType;
  928.     count: INTEGER;
  929.     text: ARRAY [0..0] OF Byte;
  930.     END;
  931. æC 
  932.  
  933. æKY CommentsChunk
  934. CommentsChunkPtr
  935. æFp AIFF.p
  936. æT RECORD
  937. æD CommentsChunkPtr = ^CommentsChunk;
  938. CommentsChunk = RECORD
  939.     ckID: ID;
  940.     ckSize: LONGINT;
  941.     numComments: INTEGER;
  942.     comments: ARRAY [0..0] OF Comment;
  943.     END;
  944. æC 
  945.  
  946. æKY TextChunk
  947. TextChunkPtr
  948. æFp AIFF.p
  949. æT RECORD
  950. æD TextChunkPtr = ^TextChunk;
  951. TextChunk = RECORD
  952.     ckID: ID;
  953.     ckSize: LONGINT;
  954.     text: ARRAY [0..0] OF Byte;
  955.     END;
  956. æC 
  957.  
  958.  
  959. æKY Aliases.p
  960. æKL GetAliasInfo
  961. MatchAlias
  962. NewAlias
  963. NewAliasMinimal
  964. NewAliasMinimalFromFullPath
  965. ResolveAlias
  966. ResolveAliasFile
  967. UpdateAlias
  968.  
  969. AliasFilterProcPtr
  970. AliasHandle
  971. AliasInfoType
  972. AliasPtr
  973. AliasRecord
  974. asiAliasName
  975. asiParentName
  976. asiServerName
  977. asiVolumeName
  978. asiZoneName
  979. kARMMountVol
  980. kARMMultVols
  981. kARMNoUI
  982. kARMSearch
  983. kARMSearchMore
  984. kARMSearchRelFirst
  985. rAliasType
  986.  
  987. æKY rAliasType
  988. æFp Aliases.p
  989. æT CONST
  990. æD rAliasType = 'alis'; { Aliases are stored as resources of this type }
  991. æC 
  992.  
  993. æKY kARMMountVol
  994. æFp Aliases.p
  995. æT CONST
  996. æD kARMMountVol = $00000001; { mount the volume automatically }
  997. æC 
  998.  
  999. æKY kARMNoUI
  1000. æFp Aliases.p
  1001. æT CONST
  1002. æD kARMNoUI = $00000002; { no user interface allowed during resolution }
  1003. æC 
  1004.  
  1005. æKY kARMMultVols
  1006. æFp Aliases.p
  1007. æT CONST
  1008. æD kARMMultVols = $00000008; { search on multiple volumes }
  1009. æC 
  1010.  
  1011. æKY kARMSearch
  1012. æFp Aliases.p
  1013. æT CONST
  1014. æD kARMSearch = $00000100; { search quickly }
  1015. æC 
  1016.  
  1017. æKY kARMSearchMore
  1018. æFp Aliases.p
  1019. æT CONST
  1020. æD kARMSearchMore = $00000200; { search further }
  1021. æC 
  1022.  
  1023. æKY kARMSearchRelFirst
  1024. æFp Aliases.p
  1025. æT CONST
  1026. æD kARMSearchRelFirst = $00000400; { search target on a relative path first }
  1027. æC 
  1028.  
  1029. æKY asiZoneName
  1030. æFp Aliases.p
  1031. æT CONST
  1032. æD asiZoneName = -3; { get zone name }
  1033. æC 
  1034.  
  1035. æKY asiServerName
  1036. æFp Aliases.p
  1037. æT CONST
  1038. æD asiServerName = -2; { get server name }
  1039. æC 
  1040.  
  1041. æKY asiVolumeName
  1042. æFp Aliases.p
  1043. æT CONST
  1044. æD asiVolumeName = -1; { get volume name }
  1045. æC 
  1046.  
  1047. æKY asiAliasName
  1048. æFp Aliases.p
  1049. æT CONST
  1050. æD asiAliasName = 0; { get aliased file/folder/volume name }
  1051. æC 
  1052.  
  1053. æKY asiParentName
  1054. æFp Aliases.p
  1055. æT CONST
  1056. æD asiParentName = 1; { get parent folder name }
  1057. æC 
  1058.  
  1059. æKY AliasRecord
  1060. AliasPtr
  1061. AliasHandle
  1062. æFp Aliases.p
  1063. æT RECORD
  1064. æD AliasPtr = ^AliasRecord;
  1065. AliasHandle = ^AliasPtr;
  1066. AliasRecord = RECORD
  1067.     userType: OSType; { appl stored type like creator type }
  1068.     aliasSize: INTEGER; { alias record size in bytes, for appl usage }
  1069.     END;
  1070. æC 
  1071.  
  1072. æKY AliasInfoType
  1073. æFp Aliases.p
  1074. æT TYPE
  1075. æD AliasInfoType = INTEGER; { alias record information type }
  1076. æC 
  1077.  
  1078. æKY AliasFilterProcPtr
  1079. æFp Aliases.p
  1080. æT TYPE
  1081. æD AliasFilterProcPtr = ProcPtr;
  1082. æC 
  1083.  
  1084. æKY NewAlias
  1085. æFp Aliases.p
  1086. æT FUNCTION
  1087. æTN A823
  1088. æD FUNCTION NewAlias(fromFile: FSSpecPtr;
  1089.                   target: FSSpec;
  1090.                   VAR alias: AliasHandle): OSErr;
  1091.     INLINE $7002,$A823;
  1092. æDT myVariable := NewAlias(fromFile,target,alias);
  1093. æC 
  1094.  
  1095. æKY NewAliasMinimal
  1096. æFp Aliases.p
  1097. æT FUNCTION
  1098. æTN A823
  1099. æD FUNCTION NewAliasMinimal(target: FSSpec;
  1100.                          VAR alias: AliasHandle): OSErr;
  1101.     INLINE $7008,$A823;
  1102. æDT myVariable := NewAliasMinimal(target,alias);
  1103. æC 
  1104.  
  1105. æKY NewAliasMinimalFromFullPath
  1106. æFp Aliases.p
  1107. æT FUNCTION
  1108. æTN A823
  1109. æD FUNCTION NewAliasMinimalFromFullPath(fullPathLength: INTEGER;
  1110.                                      fullPath: Ptr;
  1111.                                      zoneName: Str32;
  1112.                                      serverName: Str31;
  1113.                                      VAR alias: AliasHandle): OSErr;
  1114.     INLINE $7009,$A823;
  1115. æDT myVariable := NewAliasMinimalFromFullPath(fullPathLength,fullPath,zoneName,serverName,alias);
  1116. æC 
  1117.  
  1118. æKY ResolveAlias
  1119. æFp Aliases.p
  1120. æT FUNCTION
  1121. æTN A823
  1122. æD FUNCTION ResolveAlias(fromFile: FSSpecPtr;
  1123.                       alias: AliasHandle;
  1124.                       VAR target: FSSpec;
  1125.                       VAR wasChanged: BOOLEAN): OSErr;
  1126.     INLINE $7003,$A823;
  1127. æDT myVariable := ResolveAlias(fromFile,alias,target,wasChanged);
  1128. æC 
  1129.  
  1130. æKY GetAliasInfo
  1131. æFp Aliases.p
  1132. æT FUNCTION
  1133. æTN A823
  1134. æD FUNCTION GetAliasInfo(alias: AliasHandle;
  1135.                       index: AliasInfoType;
  1136.                       VAR theString: Str63): OSErr;
  1137.     INLINE $7007,$A823;
  1138. æDT myVariable := GetAliasInfo(alias,index,theString);
  1139. æC 
  1140.  
  1141. æKY ResolveAliasFile
  1142. æFp Aliases.p
  1143. æT FUNCTION
  1144. æTN A823
  1145. æD FUNCTION ResolveAliasFile(VAR theSpec: FSSpec;
  1146.                           resolveAliasChains: BOOLEAN;
  1147.                           VAR targetIsFolder: BOOLEAN;
  1148.                           VAR wasAliased: BOOLEAN): OSErr;
  1149.     INLINE $700C,$A823;
  1150. æDT myVariable := ResolveAliasFile(theSpec,resolveAliasChains,targetIsFolder,wasAliased);
  1151. æC 
  1152.  
  1153. æKY MatchAlias
  1154. æFp Aliases.p
  1155. æT FUNCTION
  1156. æTN A823
  1157. æD FUNCTION MatchAlias(fromFile: FSSpecPtr;
  1158.                     rulesMask: LONGINT;
  1159.                     alias: AliasHandle;
  1160.                     VAR aliasCount: INTEGER;
  1161.                     aliasList: FSSpecArrayPtr;
  1162.                     VAR needsUpdate: BOOLEAN;
  1163.                     aliasFilter: AliasFilterProcPtr;
  1164.                     yourDataPtr: UNIV Ptr): OSErr;
  1165.     INLINE $7005,$A823;
  1166. æDT myVariable := MatchAlias(fromFile,rulesMask,alias,aliasCount,aliasList,needsUpdate,aliasFilter,yourDataPtr);
  1167. æC 
  1168.  
  1169. æKY UpdateAlias
  1170. æFp Aliases.p
  1171. æT FUNCTION
  1172. æTN A823
  1173. æD FUNCTION UpdateAlias(fromFile: FSSpecPtr;
  1174.                      target: FSSpec;
  1175.                      alias: AliasHandle;
  1176.                      VAR wasChanged: BOOLEAN): OSErr;
  1177.     INLINE $7006,$A823;
  1178. æDT myVariable := UpdateAlias(fromFile,target,alias,wasChanged);
  1179. æC 
  1180.  
  1181.  
  1182. æKY AppleEvents.p
  1183. æKL AECoerceDesc
  1184. AECoercePtr
  1185. AECountItems
  1186. AECreateAppleEvent
  1187. AECreateDesc
  1188. AECreateList
  1189. AEDeleteItem
  1190. AEDeleteKeyDesc
  1191. AEDeleteParam
  1192. AEDisposeDesc
  1193. AEDuplicateDesc
  1194. AEGetArray
  1195. AEGetAttributeDesc
  1196. AEGetAttributePtr
  1197. AEGetCoercionHandler
  1198. AEGetEventHandler
  1199. AEGetInteractionAllowed
  1200. AEGetKeyDesc
  1201. AEGetKeyPtr
  1202. AEGetNthDesc
  1203. AEGetNthPtr
  1204. AEGetParamDesc
  1205. AEGetParamPtr
  1206. AEGetSpecialHandler
  1207. AEGetTheCurrentEvent
  1208. AEInstallCoercionHandler
  1209. AEInstallEventHandler
  1210. AEInstallSpecialHandler
  1211. AEInteractWithUser
  1212. AEProcessAppleEvent
  1213. AEPutArray
  1214. AEPutAttributeDesc
  1215. AEPutAttributePtr
  1216. AEPutDesc
  1217. AEPutKeyDesc
  1218. AEPutKeyPtr
  1219. AEPutParamDesc
  1220. AEPutParamPtr
  1221. AEPutPtr
  1222. AERemoveCoercionHandler
  1223. AERemoveEventHandler
  1224. AERemoveSpecialHandler
  1225. AEResetTimer
  1226. AEResumeTheCurrentEvent
  1227. AESend
  1228. AESetInteractionAllowed
  1229. AESetTheCurrentEvent
  1230. AESizeOfAttribute
  1231. AESizeOfKeyDesc
  1232. AESizeOfNthItem
  1233. AESizeOfParam
  1234. AESuspendTheCurrentEvent
  1235.  
  1236. AEAddressDesc
  1237. AEArrayData
  1238. AEArrayDataPointer
  1239. AEArrayType
  1240. AEDesc
  1241. AEDescList
  1242. AEEventClass
  1243. AEEventID
  1244. AEEventSource
  1245. AEInteractAllowed
  1246. AEKeyDesc
  1247. AEKeyword
  1248. AERecord
  1249. AESendMode
  1250. AESendPriority
  1251. AppleEvent
  1252. DescType
  1253. errAEBadListItem
  1254. errAECoercionFail
  1255. errAECorruptData
  1256. errAEDescNotFound
  1257. errAEEventNotHandled
  1258. errAEHandlerNotFound
  1259. errAEIllegalIndex
  1260. errAENewerVersion
  1261. errAENotAEDesc
  1262. errAENotAppleEvent
  1263. errAENotASpecialFunction
  1264. errAENoUserInteraction
  1265. errAEParamMissed
  1266. errAEReplyNotArrived
  1267. errAEReplyNotValid
  1268. errAETimeout
  1269. errAEUnknownAddressType
  1270. errAEUnknownSendMode
  1271. errAEWaitCanceled
  1272. errAEWrongDataType
  1273. EventFilterProcPtr
  1274. EventHandlerProcPtr
  1275. IdleProcPtr
  1276. kAEAlwaysInteract
  1277. kAEAnswer
  1278. kAEApplicationDied
  1279. kAECanInteract
  1280. kAECanSwitchLayer
  1281. kAECreatorType
  1282. kAEDataArray
  1283. kAEDefaultTimeout
  1284. kAEDescArray
  1285. kAEDirectCall
  1286. kAEDontReconnect
  1287. kAEHandleArray
  1288. kAEHighPriority
  1289. kAEInteractWithAll
  1290. kAEInteractWithLocal
  1291. kAEInteractWithSelf
  1292. kAEKeyDescArray
  1293. kAELocalProcess
  1294. kAENeverInteract
  1295. kAENoDispatch
  1296. kAENoReply
  1297. kAENormalPriority
  1298. kAEOpenApplication
  1299. kAEOpenDocuments
  1300. kAEPackedArray
  1301. kAEPrintDocuments
  1302. kAEQueueReply
  1303. kAEQuitAll
  1304. kAEQuitApplication
  1305. kAERemoteProcess
  1306. kAERestart
  1307. kAESameProcess
  1308. kAEShutDown
  1309. kAEUnknownSource
  1310. kAEUseStandardDispatch
  1311. kAEWaitReply
  1312. kAEWantReceipt
  1313. kAnyTransactionID
  1314. kAutoGenerateReturnID
  1315. kCoreEventClass
  1316. keyAddressAttr
  1317. keyDirectObject
  1318. keyErrorNumber
  1319. keyErrorString
  1320. keyEventClassAttr
  1321. keyEventIDAttr
  1322. keyEventSourceAttr
  1323. keyInteractLevelAttr
  1324. keyMissedKeywordAttr
  1325. keyOptionalKeywordAttr
  1326. keyPreDispatch
  1327. keyProcessSerialNumber
  1328. keyReturnIDAttr
  1329. keySelectProc
  1330. keyTimeoutAttr
  1331. keyTransactionIDAttr
  1332. kNoTimeOut
  1333. typeAEList
  1334. typeAERecord
  1335. typeAlias
  1336. typeApplSignature
  1337. typeAppParameters
  1338. typeBoolean
  1339. typeChar
  1340. typeComp
  1341. typeEnumerated
  1342. typeExtended
  1343. typeFalse
  1344. typeFloat
  1345. typeFSS
  1346. typeInteger
  1347. typeKeyword
  1348. typeLongFloat
  1349. typeLongInteger
  1350. typeMagnitude
  1351. typeNull
  1352. typeProcessSerialNumber
  1353. typeProperty
  1354. typeSectionH
  1355. typeSessionID
  1356. typeShortFloat
  1357. typeShortInteger
  1358. typeSMFloat
  1359. typeSMInt
  1360. typeTargetID
  1361. typeTrue
  1362. typeType
  1363. typeWildCard
  1364.  
  1365. æKY typeBoolean
  1366. æFp AppleEvents.p
  1367. æT CONST
  1368. æD typeBoolean = 'bool';
  1369. æC 
  1370.  
  1371. æKY typeChar
  1372. æFp AppleEvents.p
  1373. æT CONST
  1374. æD typeChar = 'TEXT';
  1375. æC 
  1376.  
  1377. æKY typeSMInt
  1378. æFp AppleEvents.p
  1379. æT CONST
  1380. æD typeSMInt = 'shor';
  1381. æC 
  1382.  
  1383. æKY typeInteger
  1384. æFp AppleEvents.p
  1385. æT CONST
  1386. æD typeInteger = 'long';
  1387. æC 
  1388.  
  1389. æKY typeSMFloat
  1390. æFp AppleEvents.p
  1391. æT CONST
  1392. æD typeSMFloat = 'sing';
  1393. æC 
  1394.  
  1395. æKY typeFloat
  1396. æFp AppleEvents.p
  1397. æT CONST
  1398. æD typeFloat = 'doub';
  1399. æC 
  1400.  
  1401. æKY typeLongInteger
  1402. æFp AppleEvents.p
  1403. æT CONST
  1404. æD typeLongInteger = 'long';
  1405. æC 
  1406.  
  1407. æKY typeShortInteger
  1408. æFp AppleEvents.p
  1409. æT CONST
  1410. æD typeShortInteger = 'shor';
  1411. æC 
  1412.  
  1413. æKY typeLongFloat
  1414. æFp AppleEvents.p
  1415. æT CONST
  1416. æD typeLongFloat = 'doub';
  1417. æC 
  1418.  
  1419. æKY typeShortFloat
  1420. æFp AppleEvents.p
  1421. æT CONST
  1422. æD typeShortFloat = 'sing';
  1423. æC 
  1424.  
  1425. æKY typeExtended
  1426. æFp AppleEvents.p
  1427. æT CONST
  1428. æD typeExtended = 'exte';
  1429. æC 
  1430.  
  1431. æKY typeComp
  1432. æFp AppleEvents.p
  1433. æT CONST
  1434. æD typeComp = 'comp';
  1435. æC 
  1436.  
  1437. æKY typeMagnitude
  1438. æFp AppleEvents.p
  1439. æT CONST
  1440. æD typeMagnitude = 'magn';
  1441. æC 
  1442.  
  1443. æKY typeAEList
  1444. æFp AppleEvents.p
  1445. æT CONST
  1446. æD typeAEList = 'list';
  1447. æC 
  1448.  
  1449. æKY typeAERecord
  1450. æFp AppleEvents.p
  1451. æT CONST
  1452. æD typeAERecord = 'reco';
  1453. æC 
  1454.  
  1455. æKY typeTrue
  1456. æFp AppleEvents.p
  1457. æT CONST
  1458. æD typeTrue = 'true';
  1459. æC 
  1460.  
  1461. æKY typeFalse
  1462. æFp AppleEvents.p
  1463. æT CONST
  1464. æD typeFalse = 'fals';
  1465. æC 
  1466.  
  1467. æKY typeAlias
  1468. æFp AppleEvents.p
  1469. æT CONST
  1470. æD typeAlias = 'alis';
  1471. æC 
  1472.  
  1473. æKY typeEnumerated
  1474. æFp AppleEvents.p
  1475. æT CONST
  1476. æD typeEnumerated = 'enum';
  1477. æC 
  1478.  
  1479. æKY typeType
  1480. æFp AppleEvents.p
  1481. æT CONST
  1482. æD typeType = 'type';
  1483. æC 
  1484.  
  1485. æKY typeAppParameters
  1486. æFp AppleEvents.p
  1487. æT CONST
  1488. æD typeAppParameters = 'appa';
  1489. æC 
  1490.  
  1491. æKY typeProperty
  1492. æFp AppleEvents.p
  1493. æT CONST
  1494. æD typeProperty = 'prop';
  1495. æC 
  1496.  
  1497. æKY typeFSS
  1498. æFp AppleEvents.p
  1499. æT CONST
  1500. æD typeFSS = 'fss ';
  1501. æC 
  1502.  
  1503. æKY typeKeyword
  1504. æFp AppleEvents.p
  1505. æT CONST
  1506. æD typeKeyword = 'keyw';
  1507. æC 
  1508.  
  1509. æKY typeSectionH
  1510. æFp AppleEvents.p
  1511. æT CONST
  1512. æD typeSectionH = 'sect';
  1513. æC 
  1514.  
  1515. æKY typeWildCard
  1516. æFp AppleEvents.p
  1517. æT CONST
  1518. æD typeWildCard = '****';
  1519. æC 
  1520.  
  1521. æKY typeApplSignature
  1522. æFp AppleEvents.p
  1523. æT CONST
  1524. æD typeApplSignature = 'sign';
  1525. æC 
  1526.  
  1527. æKY typeSessionID
  1528. æFp AppleEvents.p
  1529. æT CONST
  1530. æD typeSessionID = 'ssid';
  1531. æC 
  1532.  
  1533. æKY typeTargetID
  1534. æFp AppleEvents.p
  1535. æT CONST
  1536. æD typeTargetID = 'targ';
  1537. æC 
  1538.  
  1539. æKY typeProcessSerialNumber
  1540. æFp AppleEvents.p
  1541. æT CONST
  1542. æD typeProcessSerialNumber = 'psn ';
  1543. æC 
  1544.  
  1545. æKY typeNull
  1546. æFp AppleEvents.p
  1547. æT CONST
  1548. æD typeNull = 'null'; {the type of null/nonexistent data}
  1549. æC 
  1550.  
  1551. æKY kCoreEventClass
  1552. æFp AppleEvents.p
  1553. æT CONST
  1554. æD kCoreEventClass = 'aevt';
  1555. æC 
  1556.  
  1557. æKY kAEOpenApplication
  1558. æFp AppleEvents.p
  1559. æT CONST
  1560. æD kAEOpenApplication = 'oapp';
  1561. æC 
  1562.  
  1563. æKY kAEOpenDocuments
  1564. æFp AppleEvents.p
  1565. æT CONST
  1566. æD kAEOpenDocuments = 'odoc';
  1567. æC 
  1568.  
  1569. æKY kAEPrintDocuments
  1570. æFp AppleEvents.p
  1571. æT CONST
  1572. æD kAEPrintDocuments = 'pdoc';
  1573. æC 
  1574.  
  1575. æKY kAEQuitApplication
  1576. æFp AppleEvents.p
  1577. æT CONST
  1578. æD kAEQuitApplication = 'quit';
  1579. æC 
  1580.  
  1581. æKY kAECreatorType
  1582. æFp AppleEvents.p
  1583. æT CONST
  1584. æD kAECreatorType = 'crea';
  1585. æC 
  1586.  
  1587. æKY kAEQuitAll
  1588. æFp AppleEvents.p
  1589. æT CONST
  1590. æD kAEQuitAll = 'quia';
  1591. æC 
  1592.  
  1593. æKY kAEShutDown
  1594. æFp AppleEvents.p
  1595. æT CONST
  1596. æD kAEShutDown = 'shut';
  1597. æC 
  1598.  
  1599. æKY kAERestart
  1600. æFp AppleEvents.p
  1601. æT CONST
  1602. æD kAERestart = 'rest';
  1603. æC 
  1604.  
  1605. æKY kAEApplicationDied
  1606. æFp AppleEvents.p
  1607. æT CONST
  1608. æD kAEApplicationDied = 'obit';
  1609. æC 
  1610.  
  1611. æKY keyProcessSerialNumber
  1612. æFp AppleEvents.p
  1613. æT CONST
  1614. æD keyProcessSerialNumber = 'psn ';
  1615. æC 
  1616.  
  1617. æKY keyErrorNumber
  1618. æFp AppleEvents.p
  1619. æT CONST
  1620. æD keyErrorNumber = 'errn';
  1621. æC 
  1622.  
  1623. æKY keyErrorString
  1624. æFp AppleEvents.p
  1625. æT CONST
  1626. æD keyErrorString = 'errs';
  1627. æC 
  1628.  
  1629. æKY kAEAnswer
  1630. æFp AppleEvents.p
  1631. æT CONST
  1632. æD kAEAnswer = 'ansr';
  1633. æC 
  1634.  
  1635. æKY keyDirectObject
  1636. æFp AppleEvents.p
  1637. æT CONST
  1638. æD keyDirectObject = '----';
  1639. æC 
  1640.  
  1641. æKY keyPreDispatch
  1642. æFp AppleEvents.p
  1643. æT CONST
  1644. æD keyPreDispatch = 'phac'; { PreHandler Accessor Call }
  1645. æC 
  1646.  
  1647. æKY keySelectProc
  1648. æFp AppleEvents.p
  1649. æT CONST
  1650. æD keySelectProc = 'selh'; { More selector Call }
  1651. æC 
  1652.  
  1653. æKY keyTransactionIDAttr
  1654. æFp AppleEvents.p
  1655. æT CONST
  1656. æD keyTransactionIDAttr = 'tran';
  1657. æC 
  1658.  
  1659. æKY keyReturnIDAttr
  1660. æFp AppleEvents.p
  1661. æT CONST
  1662. æD keyReturnIDAttr = 'rtid';
  1663. æC 
  1664.  
  1665. æKY keyEventClassAttr
  1666. æFp AppleEvents.p
  1667. æT CONST
  1668. æD keyEventClassAttr = 'evcl';
  1669. æC 
  1670.  
  1671. æKY keyEventIDAttr
  1672. æFp AppleEvents.p
  1673. æT CONST
  1674. æD keyEventIDAttr = 'evid';
  1675. æC 
  1676.  
  1677. æKY keyAddressAttr
  1678. æFp AppleEvents.p
  1679. æT CONST
  1680. æD keyAddressAttr = 'addr';
  1681. æC 
  1682.  
  1683. æKY keyOptionalKeywordAttr
  1684. æFp AppleEvents.p
  1685. æT CONST
  1686. æD keyOptionalKeywordAttr = 'optk';
  1687. æC 
  1688.  
  1689. æKY keyTimeoutAttr
  1690. æFp AppleEvents.p
  1691. æT CONST
  1692. æD keyTimeoutAttr = 'timo';
  1693. æC 
  1694.  
  1695. æKY keyInteractLevelAttr
  1696. æFp AppleEvents.p
  1697. æT CONST
  1698. æD keyInteractLevelAttr = 'inte'; {this attribute is read only will be set in AESend}
  1699. æC 
  1700.  
  1701. æKY keyEventSourceAttr
  1702. æFp AppleEvents.p
  1703. æT CONST
  1704. æD keyEventSourceAttr = 'esrc'; { this attribute is read only }
  1705. æC 
  1706.  
  1707. æKY keyMissedKeywordAttr
  1708. æFp AppleEvents.p
  1709. æT CONST
  1710. æD keyMissedKeywordAttr = 'miss'; { this attribute is read only }
  1711. æC 
  1712.  
  1713. æKY kAENoReply
  1714. æFp AppleEvents.p
  1715. æT CONST
  1716. æD kAENoReply = $00000001; { Sender doesn't want a reply to event }
  1717. æC 
  1718.  
  1719. æKY kAEQueueReply
  1720. æFp AppleEvents.p
  1721. æT CONST
  1722. æD kAEQueueReply = $00000002; { Sender wants a reply but won't wait }
  1723. æC 
  1724.  
  1725. æKY kAEWaitReply
  1726. æFp AppleEvents.p
  1727. æT CONST
  1728. æD kAEWaitReply = $00000003; { Sender wants a reply and will be waiting }
  1729. æC 
  1730.  
  1731. æKY kAENeverInteract
  1732. æFp AppleEvents.p
  1733. æT CONST
  1734. æD kAENeverInteract = $00000010; { Server should not interact with user }
  1735. æC 
  1736.  
  1737. æKY kAECanInteract
  1738. æFp AppleEvents.p
  1739. æT CONST
  1740. æD kAECanInteract = $00000020; { Server may try to interact with user }
  1741. æC 
  1742.  
  1743. æKY kAEAlwaysInteract
  1744. æFp AppleEvents.p
  1745. æT CONST
  1746. æD kAEAlwaysInteract = $00000030; { Server should always interact with user where appropriate }
  1747. æC 
  1748.  
  1749. æKY kAECanSwitchLayer
  1750. æFp AppleEvents.p
  1751. æT CONST
  1752. æD kAECanSwitchLayer = $00000040; { Interaction may switch layer }
  1753. æC 
  1754.  
  1755. æKY kAEDontReconnect
  1756. æFp AppleEvents.p
  1757. æT CONST
  1758. æD kAEDontReconnect = $00000080; { don't reconnect if there is a sessClosedErr from PPCToolbox }
  1759. æC 
  1760.  
  1761. æKY kAEWantReceipt
  1762. æFp AppleEvents.p
  1763. æT CONST
  1764. æD kAEWantReceipt = nReturnReceipt; { Send wants a receipt of message }
  1765. æC 
  1766.  
  1767. æKY kAENormalPriority
  1768. æFp AppleEvents.p
  1769. æT CONST
  1770. æD kAENormalPriority = $00000000; { Post message at the end of event queue }
  1771. æC 
  1772.  
  1773. æKY kAEHighPriority
  1774. æFp AppleEvents.p
  1775. æT CONST
  1776. æD kAEHighPriority = nAttnMsg; { Post message at the front of the event queue }
  1777. æC 
  1778.  
  1779. æKY kAnyTransactionID
  1780. æFp AppleEvents.p
  1781. æT CONST
  1782. æD kAnyTransactionID = 0; { no transaction is in use }
  1783. æC 
  1784.  
  1785. æKY kAutoGenerateReturnID
  1786. æFp AppleEvents.p
  1787. æT CONST
  1788. æD kAutoGenerateReturnID = -1; { AECreateAppleEvent will generate a session-unique ID }
  1789. æC 
  1790.  
  1791. æKY kAEDefaultTimeout
  1792. æFp AppleEvents.p
  1793. æT CONST
  1794. æD kAEDefaultTimeout = -1; { timeout value determined by AEM }
  1795. æC 
  1796.  
  1797. æKY kNoTimeOut
  1798. æFp AppleEvents.p
  1799. æT CONST
  1800. æD kNoTimeOut = -2; { wait until reply comes back, however long it takes }
  1801. æC 
  1802.  
  1803. æKY kAENoDispatch
  1804. æFp AppleEvents.p
  1805. æT CONST
  1806. æD kAENoDispatch = 0;
  1807. æC 
  1808.  
  1809. æKY kAEUseStandardDispatch
  1810. æFp AppleEvents.p
  1811. æT CONST
  1812. æD kAEUseStandardDispatch = -1;
  1813. æC 
  1814.  
  1815. æKY errAECoercionFail
  1816. æFp AppleEvents.p
  1817. æT CONST
  1818. æD errAECoercionFail = -1700;
  1819. æC 
  1820.  
  1821. æKY errAEDescNotFound
  1822. æFp AppleEvents.p
  1823. æT CONST
  1824. æD errAEDescNotFound = -1701;
  1825. æC 
  1826.  
  1827. æKY errAECorruptData
  1828. æFp AppleEvents.p
  1829. æT CONST
  1830. æD errAECorruptData = -1702;
  1831. æC 
  1832.  
  1833. æKY errAEWrongDataType
  1834. æFp AppleEvents.p
  1835. æT CONST
  1836. æD errAEWrongDataType = -1703;
  1837. æC 
  1838.  
  1839. æKY errAENotAEDesc
  1840. æFp AppleEvents.p
  1841. æT CONST
  1842. æD errAENotAEDesc = -1704;
  1843. æC 
  1844.  
  1845. æKY errAEBadListItem
  1846. æFp AppleEvents.p
  1847. æT CONST
  1848. æD errAEBadListItem = -1705; { Specified list item does not exist }
  1849. æC 
  1850.  
  1851. æKY errAENewerVersion
  1852. æFp AppleEvents.p
  1853. æT CONST
  1854. æD errAENewerVersion = -1706; { Need newer version of AppleEvent Manager }
  1855. æC 
  1856.  
  1857. æKY errAENotAppleEvent
  1858. æFp AppleEvents.p
  1859. æT CONST
  1860. æD errAENotAppleEvent = -1707; { The event is not in AppleEvent format }
  1861. æC 
  1862.  
  1863. æKY errAEEventNotHandled
  1864. æFp AppleEvents.p
  1865. æT CONST
  1866. æD errAEEventNotHandled = -1708; { The AppleEvent was not handled by any handler }
  1867. æC 
  1868.  
  1869. æKY errAEReplyNotValid
  1870. æFp AppleEvents.p
  1871. æT CONST
  1872. æD errAEReplyNotValid = -1709; { AEResetTimer was passed an invalid reply parameter }
  1873. æC 
  1874.  
  1875. æKY errAEUnknownSendMode
  1876. æFp AppleEvents.p
  1877. æT CONST
  1878. æD errAEUnknownSendMode = -1710; { Mode wasn't NoReply, WaitReply, or QueueReply;     or Interaction level is unknown }
  1879. æC 
  1880.  
  1881. æKY errAEWaitCanceled
  1882. æFp AppleEvents.p
  1883. æT CONST
  1884. æD errAEWaitCanceled = -1711; { In AESend, User cancelled out of wait loop for  reply or receipt }
  1885. æC 
  1886.  
  1887. æKY errAETimeout
  1888. æFp AppleEvents.p
  1889. æT CONST
  1890. æD errAETimeout = -1712; { AppleEvent timed out }
  1891. æC 
  1892.  
  1893. æKY errAENoUserInteraction
  1894. æFp AppleEvents.p
  1895. æT CONST
  1896. æD errAENoUserInteraction = -1713; { no user interaction allowed }
  1897. æC 
  1898.  
  1899. æKY errAENotASpecialFunction
  1900. æFp AppleEvents.p
  1901. æT CONST
  1902. æD errAENotASpecialFunction = -1714; { there is no special function with this keyword }
  1903. æC 
  1904.  
  1905. æKY errAEParamMissed
  1906. æFp AppleEvents.p
  1907. æT CONST
  1908. æD errAEParamMissed = -1715; { a required parameter was not accessed }
  1909. æC 
  1910.  
  1911. æKY errAEUnknownAddressType
  1912. æFp AppleEvents.p
  1913. æT CONST
  1914. æD errAEUnknownAddressType = -1716; { The target address type is not known }
  1915. æC 
  1916.  
  1917. æKY errAEHandlerNotFound
  1918. æFp AppleEvents.p
  1919. æT CONST
  1920. æD errAEHandlerNotFound = -1717; { No handler in the dispatch tables fits the parameters to
  1921.                                               AEGetEventHandler or AEGetCoercionHandler }
  1922. æC 
  1923.  
  1924. æKY errAEReplyNotArrived
  1925. æFp AppleEvents.p
  1926. æT CONST
  1927. æD errAEReplyNotArrived = -1718; { the contents of the reply you are accessing have not arrived yet }
  1928. æC 
  1929.  
  1930. æKY errAEIllegalIndex
  1931. æFp AppleEvents.p
  1932. æT CONST
  1933. æD errAEIllegalIndex = -1719; { Index is out of range in a put operation }
  1934. æC 
  1935.  
  1936. æKY AEKeyword
  1937. æFp AppleEvents.p
  1938. æT TYPE
  1939. æD AEKeyword             = PACKED ARRAY [1..4] OF CHAR;
  1940. æC 
  1941.  
  1942. æKY AEEventClass
  1943. æFp AppleEvents.p
  1944. æT TYPE
  1945. æD AEEventClass        = PACKED ARRAY [1..4] OF CHAR;
  1946. æC 
  1947.  
  1948. æKY AEEventID
  1949. æFp AppleEvents.p
  1950. æT TYPE
  1951. æD AEEventID             = PACKED ARRAY [1..4] OF CHAR;
  1952. æC 
  1953.  
  1954. æKY DescType
  1955. æFp AppleEvents.p
  1956. æT TYPE
  1957. æD DescType = ResType;
  1958. æC 
  1959.  
  1960. æKY AEDesc
  1961. æFp AppleEvents.p
  1962. æT RECORD
  1963. æD AEDesc = RECORD
  1964.     descriptorType: DescType;
  1965.     dataHandle: Handle;
  1966.     END;
  1967. æC 
  1968.  
  1969. æKY AEAddressDesc
  1970. æFp AppleEvents.p
  1971. æT TYPE
  1972. æD AEAddressDesc = AEDesc; { an AEDesc which contains addressing data }
  1973. æC 
  1974.  
  1975. æKY AEDescList
  1976. æFp AppleEvents.p
  1977. æT TYPE
  1978. æD AEDescList = AEDesc; { a list of AEDesc is a special kind of AEDesc }
  1979. æC 
  1980.  
  1981. æKY AERecord
  1982. æFp AppleEvents.p
  1983. æT TYPE
  1984. æD AERecord = AEDescList; { AERecord is a list of keyworded AEDesc }
  1985. æC 
  1986.  
  1987. æKY AppleEvent
  1988. æFp AppleEvents.p
  1989. æT TYPE
  1990. æD AppleEvent = AERecord; { an AERecord that contains an AppleEvent }
  1991. æC 
  1992.  
  1993. æKY AESendMode
  1994. æFp AppleEvents.p
  1995. æT TYPE
  1996. æD AESendMode = LONGINT; { Type of parameter to AESend }
  1997. æC 
  1998.  
  1999. æKY AESendPriority
  2000. æFp AppleEvents.p
  2001. æT TYPE
  2002. æD AESendPriority = INTEGER; { Type of priority param of AESend }
  2003. æC 
  2004.  
  2005. æKY AEInteractAllowed
  2006. kAEInteractWithSelf
  2007. kAEInteractWithLocal
  2008. kAEInteractWithAll
  2009.  
  2010. æFp AppleEvents.p
  2011. æT TYPE
  2012. æD AEInteractAllowed = (kAEInteractWithSelf,kAEInteractWithLocal,kAEInteractWithAll);
  2013. æC 
  2014.  
  2015. æKY AEEventSource
  2016. kAEUnknownSource
  2017. kAEDirectCall
  2018. kAESameProcess
  2019. kAELocalProcess
  2020. kAERemoteProcess
  2021. æFp AppleEvents.p
  2022. æT TYPE
  2023. æD AEEventSource = (kAEUnknownSource,kAEDirectCall,kAESameProcess,kAELocalProcess,
  2024.     kAERemoteProcess);
  2025. æC 
  2026.  
  2027. æKY AEKeyDesc
  2028. æFp AppleEvents.p
  2029. æT RECORD
  2030. æD AEKeyDesc = RECORD
  2031.     descKey: AEKeyword;
  2032.     descContent: AEDesc;
  2033.     END;
  2034. æC 
  2035.  
  2036. æKY AEArrayType
  2037. kAEDataArray
  2038. kAEPackedArray
  2039. kAEHandleArray
  2040. kAEDescArray
  2041. kAEKeyDescArray
  2042. æFp AppleEvents.p
  2043. æT TYPE
  2044. æD AEArrayType = (kAEDataArray,kAEPackedArray,kAEHandleArray,kAEDescArray,
  2045.     kAEKeyDescArray);
  2046. æC 
  2047.  
  2048. æKY AEArrayData
  2049. AEArrayDataPointer
  2050. æFp AppleEvents.p
  2051. æT RECORD
  2052. æD AEArrayData = RECORD
  2053.     case AEArrayType OF
  2054.         kAEDataArray:    
  2055.             (AEDataArray:         Array[0..0] OF Integer);
  2056.         kAEPackedArray:    
  2057.             (AEPackedArray:     Packed Array[0..0] OF Char);
  2058.         kAEHandleArray:    
  2059.             (AEHandleArray:     Array[0..0] OF Handle);
  2060.         kAEDescArray:    
  2061.             (AEDescArray:         Array[0..0] OF AEDesc);
  2062.         kAEKeyDescArray:    
  2063.             (AEKeyDescArray:     Array[0..0] OF AEKeyDesc);
  2064.     END;
  2065.     
  2066. AEArrayDataPointer = ^AEArrayData;
  2067. æC 
  2068.  
  2069. æKY EventHandlerProcPtr
  2070. æFp AppleEvents.p
  2071. æT TYPE
  2072. æD EventHandlerProcPtr = ProcPtr;
  2073. æC 
  2074.  
  2075. æKY IdleProcPtr
  2076. æFp AppleEvents.p
  2077. æT TYPE
  2078. æD IdleProcPtr = ProcPtr;
  2079. æC 
  2080.  
  2081. æKY EventFilterProcPtr
  2082. æFp AppleEvents.p
  2083. æT TYPE
  2084. æD EventFilterProcPtr = ProcPtr;
  2085. æC 
  2086.  
  2087. æKY AECreateDesc
  2088. æFp AppleEvents.p
  2089. æT FUNCTION
  2090. æD FUNCTION AECreateDesc(typeCode: DescType;
  2091.                       dataPtr: Ptr;
  2092.                       dataSize: Size;
  2093.                       VAR result: AEDesc): OSErr;
  2094.     INLINE $303C, $0825, $A816;
  2095. æDT myVariable := AECreateDesc(typeCode,dataPtr,dataSize,result);
  2096. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2097.  
  2098.     StringWidth returns the width of the given text string, which it
  2099. calculates by adding the CharWidths of all the characters in the string
  2100. (see above). This value will be added to the pen horizontal coordinate
  2101. if the specified string is drawn.
  2102.  
  2103.  
  2104. æKY AECoercePtr
  2105. æFp AppleEvents.p
  2106. æT FUNCTION
  2107. æD FUNCTION AECoercePtr(typeCode: DescType;
  2108.                      dataPtr: Ptr;
  2109.                      dataSize: Size;
  2110.                      toType: DescType;
  2111.                      VAR result: AEDesc): OSErr;
  2112.     INLINE $303C, $0A02, $A816;
  2113. æDT myVariable := AECoercePtr(typeCode,dataPtr,dataSize,toType,result);
  2114. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2115.  
  2116.     StringWidth returns the width of the given text string, which it
  2117. calculates by adding the CharWidths of all the characters in the string
  2118. (see above). This value will be added to the pen horizontal coordinate
  2119. if the specified string is drawn.
  2120.  
  2121.  
  2122. æKY AECoerceDesc
  2123. æFp AppleEvents.p
  2124. æT FUNCTION
  2125. æD FUNCTION AECoerceDesc(theAEDesc: AEDesc;
  2126.                       toType: DescType;
  2127.                       VAR result: AEDesc): OSErr;
  2128.     INLINE $303C, $0603, $A816;
  2129. æDT myVariable := AECoerceDesc(theAEDesc,toType,result);
  2130. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2131.  
  2132.     StringWidth returns the width of the given text string, which it
  2133. calculates by adding the CharWidths of all the characters in the string
  2134. (see above). This value will be added to the pen horizontal coordinate
  2135. if the specified string is drawn.
  2136.  
  2137.  
  2138. æKY AEDisposeDesc
  2139. æFp AppleEvents.p
  2140. æT FUNCTION
  2141. æD FUNCTION AEDisposeDesc(VAR theAEDesc: AEDesc): OSErr;
  2142.     INLINE $303C, $0204, $A816;
  2143. æDT myVariable := AEDisposeDesc(theAEDesc);
  2144. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2145.  
  2146.     StringWidth returns the width of the given text string, which it
  2147. calculates by adding the CharWidths of all the characters in the string
  2148. (see above). This value will be added to the pen horizontal coordinate
  2149. if the specified string is drawn.
  2150.  
  2151.  
  2152. æKY AEDuplicateDesc
  2153. æFp AppleEvents.p
  2154. æT FUNCTION
  2155. æD FUNCTION AEDuplicateDesc(theAEDesc: AEDesc;VAR result: AEDesc): OSErr;
  2156.     INLINE $303C, $0405, $A816;
  2157. æDT myVariable := AEDuplicateDesc(theAEDesc,result);
  2158. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2159.  
  2160.     StringWidth returns the width of the given text string, which it
  2161. calculates by adding the CharWidths of all the characters in the string
  2162. (see above). This value will be added to the pen horizontal coordinate
  2163. if the specified string is drawn.
  2164.  
  2165.  
  2166. æKY AECreateList
  2167. æFp AppleEvents.p
  2168. æT FUNCTION
  2169. æD FUNCTION AECreateList(factoringPtr: Ptr;
  2170.                       factoredSize: Size;
  2171.                       isRecord: BOOLEAN;
  2172.                       VAR resultList: AEDescList): OSErr;
  2173.     INLINE $303C, $0706, $A816;
  2174. æDT myVariable := AECreateList(factoringPtr,factoredSize,isRecord,resultList);
  2175. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2176.  
  2177.     StringWidth returns the width of the given text string, which it
  2178. calculates by adding the CharWidths of all the characters in the string
  2179. (see above). This value will be added to the pen horizontal coordinate
  2180. if the specified string is drawn.
  2181.  
  2182.  
  2183. æKY AECountItems
  2184. æFp AppleEvents.p
  2185. æT FUNCTION
  2186. æD FUNCTION AECountItems(theAEDescList: AEDescList;
  2187.                       VAR theCount: LONGINT): OSErr;
  2188.     INLINE $303C, $0407, $A816;
  2189. æDT myVariable := AECountItems(theAEDescList,theCount);
  2190. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2191.  
  2192.     StringWidth returns the width of the given text string, which it
  2193. calculates by adding the CharWidths of all the characters in the string
  2194. (see above). This value will be added to the pen horizontal coordinate
  2195. if the specified string is drawn.
  2196.  
  2197.  
  2198. æKY AEPutPtr
  2199. æFp AppleEvents.p
  2200. æT FUNCTION
  2201. æD FUNCTION AEPutPtr(theAEDescList: AEDescList;
  2202.                   index: LONGINT;
  2203.                   typeCode: DescType;
  2204.                   dataPtr: Ptr;
  2205.                   dataSize: Size): OSErr;
  2206.     INLINE $303C, $0A08, $A816;
  2207. æDT myVariable := AEPutPtr(theAEDescList,index,typeCode,dataPtr,dataSize);
  2208. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2209.  
  2210.     StringWidth returns the width of the given text string, which it
  2211. calculates by adding the CharWidths of all the characters in the string
  2212. (see above). This value will be added to the pen horizontal coordinate
  2213. if the specified string is drawn.
  2214.  
  2215.  
  2216. æKY AEPutDesc
  2217. æFp AppleEvents.p
  2218. æT FUNCTION
  2219. æD FUNCTION AEPutDesc(theAEDescList: AEDescList;
  2220.                    index: LONGINT;
  2221.                    theAEDesc: AEDesc): OSErr;
  2222.     INLINE $303C, $0609, $A816;
  2223. æDT myVariable := AEPutDesc(theAEDescList,index,theAEDesc);
  2224. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2225.  
  2226.     StringWidth returns the width of the given text string, which it
  2227. calculates by adding the CharWidths of all the characters in the string
  2228. (see above). This value will be added to the pen horizontal coordinate
  2229. if the specified string is drawn.
  2230.  
  2231.  
  2232. æKY AEGetNthPtr
  2233. æFp AppleEvents.p
  2234. æT FUNCTION
  2235. æD FUNCTION AEGetNthPtr(theAEDescList: AEDescList;
  2236.                      index: LONGINT;
  2237.                      desiredType: DescType;
  2238.                      VAR theAEKeyword: AEKeyword;
  2239.                      VAR typeCode: DescType;
  2240.                      dataPtr: Ptr;
  2241.                      maximumSize: Size;
  2242.                      VAR actualSize: Size): OSErr;
  2243.     INLINE $303C, $100A, $A816;
  2244. æDT myVariable := AEGetNthPtr(theAEDescList,index,desiredType,theAEKeyword,typeCode,dataPtr,maximumSize,actualSize);
  2245. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2246.  
  2247.     StringWidth returns the width of the given text string, which it
  2248. calculates by adding the CharWidths of all the characters in the string
  2249. (see above). This value will be added to the pen horizontal coordinate
  2250. if the specified string is drawn.
  2251.  
  2252.  
  2253. æKY AEGetNthDesc
  2254. æFp AppleEvents.p
  2255. æT FUNCTION
  2256. æD FUNCTION AEGetNthDesc(theAEDescList: AEDescList;
  2257.                       index: LONGINT;
  2258.                       desiredType: DescType;
  2259.                       VAR theAEKeyword: AEKeyword;
  2260.                       VAR result: AEDesc): OSErr;
  2261.     INLINE $303C, $0A0B, $A816;
  2262. æDT myVariable := AEGetNthDesc(theAEDescList,index,desiredType,theAEKeyword,result);
  2263. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2264.  
  2265.     StringWidth returns the width of the given text string, which it
  2266. calculates by adding the CharWidths of all the characters in the string
  2267. (see above). This value will be added to the pen horizontal coordinate
  2268. if the specified string is drawn.
  2269.  
  2270.  
  2271. æKY AESizeOfNthItem
  2272. æFp AppleEvents.p
  2273. æT FUNCTION
  2274. æD FUNCTION AESizeOfNthItem(theAEDescList: AEDescList;
  2275.                          index: LONGINT;
  2276.                          VAR typeCode: DescType;
  2277.                          VAR dataSize: Size): OSErr;
  2278.     INLINE $303C, $082A, $A816;
  2279. æDT myVariable := AESizeOfNthItem(theAEDescList,index,typeCode,dataSize);
  2280. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2281.  
  2282.     StringWidth returns the width of the given text string, which it
  2283. calculates by adding the CharWidths of all the characters in the string
  2284. (see above). This value will be added to the pen horizontal coordinate
  2285. if the specified string is drawn.
  2286.  
  2287.  
  2288. æKY AEGetArray
  2289. æFp AppleEvents.p
  2290. æT FUNCTION
  2291. æD FUNCTION AEGetArray(theAEDescList: AEDescList;
  2292.                     arrayType: AEArrayType;
  2293.                     arrayPtr: AEArrayDataPointer;
  2294.                     maximumSize: Size;
  2295.                     VAR itemType: DescType;
  2296.                     VAR itemSize: Size;
  2297.                     VAR itemCount: LONGINT): OSErr;
  2298.     INLINE $303C, $0D0C, $A816;
  2299. æDT myVariable := AEGetArray(theAEDescList,arrayType,arrayPtr,maximumSize,itemType,itemSize,itemCount);
  2300. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2301.  
  2302.     StringWidth returns the width of the given text string, which it
  2303. calculates by adding the CharWidths of all the characters in the string
  2304. (see above). This value will be added to the pen horizontal coordinate
  2305. if the specified string is drawn.
  2306.  
  2307.  
  2308. æKY AEPutArray
  2309. æFp AppleEvents.p
  2310. æT FUNCTION
  2311. æD FUNCTION AEPutArray(theAEDescList: AEDescList;
  2312.                     arrayType: AEArrayType;
  2313.                     arrayPtr: AEArrayDataPointer;
  2314.                     itemType: DescType;
  2315.                     itemSize: Size;
  2316.                     itemCount: LONGINT): OSErr;
  2317.     INLINE $303C, $0B0D, $A816;
  2318. æDT myVariable := AEPutArray(theAEDescList,arrayType,arrayPtr,itemType,itemSize,itemCount);
  2319. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2320.  
  2321.     StringWidth returns the width of the given text string, which it
  2322. calculates by adding the CharWidths of all the characters in the string
  2323. (see above). This value will be added to the pen horizontal coordinate
  2324. if the specified string is drawn.
  2325.  
  2326.  
  2327. æKY AEDeleteItem
  2328. æFp AppleEvents.p
  2329. æT FUNCTION
  2330. æD FUNCTION AEDeleteItem(theAEDescList: AEDescList;
  2331.                       index: LONGINT): OSErr;
  2332.     INLINE $303C, $040E, $A816;
  2333. æDT myVariable := AEDeleteItem(theAEDescList,index);
  2334. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2335.  
  2336.     StringWidth returns the width of the given text string, which it
  2337. calculates by adding the CharWidths of all the characters in the string
  2338. (see above). This value will be added to the pen horizontal coordinate
  2339. if the specified string is drawn.
  2340.  
  2341.  
  2342. æKY AEPutKeyPtr
  2343. æFp AppleEvents.p
  2344. æT FUNCTION
  2345. æD FUNCTION AEPutKeyPtr(theAERecord: AERecord;
  2346.                      theAEKeyword: AEKeyword;
  2347.                      typeCode: DescType;
  2348.                      dataPtr: Ptr;
  2349.                      dataSize: Size): OSErr;
  2350.     INLINE $303C, $0A0F, $A816;
  2351. æDT myVariable := AEPutKeyPtr(theAERecord,theAEKeyword,typeCode,dataPtr,dataSize);
  2352. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2353.  
  2354.     StringWidth returns the width of the given text string, which it
  2355. calculates by adding the CharWidths of all the characters in the string
  2356. (see above). This value will be added to the pen horizontal coordinate
  2357. if the specified string is drawn.
  2358.  
  2359.  
  2360. æKY AEPutKeyDesc
  2361. æFp AppleEvents.p
  2362. æT FUNCTION
  2363. æD FUNCTION AEPutKeyDesc(theAERecord: AERecord;
  2364.                       theAEKeyword: AEKeyword;
  2365.                       theAEDesc: AEDesc): OSErr;
  2366.     INLINE $303C, $0610, $A816;
  2367. æDT myVariable := AEPutKeyDesc(theAERecord,theAEKeyword,theAEDesc);
  2368. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2369.  
  2370.     StringWidth returns the width of the given text string, which it
  2371. calculates by adding the CharWidths of all the characters in the string
  2372. (see above). This value will be added to the pen horizontal coordinate
  2373. if the specified string is drawn.
  2374.  
  2375.  
  2376. æKY AEGetKeyPtr
  2377. æFp AppleEvents.p
  2378. æT FUNCTION
  2379. æD FUNCTION AEGetKeyPtr(theAERecord: AERecord;
  2380.                      theAEKeyword: AEKeyword;
  2381.                      desiredType: DescType;
  2382.                      VAR typeCode: DescType;
  2383.                      dataPtr: Ptr;
  2384.                      maximumSize: Size;
  2385.                      VAR actualSize: Size): OSErr;
  2386.     INLINE $303C, $0E11, $A816;
  2387. æDT myVariable := AEGetKeyPtr(theAERecord,theAEKeyword,desiredType,typeCode,dataPtr,maximumSize,actualSize);
  2388. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2389.  
  2390.     StringWidth returns the width of the given text string, which it
  2391. calculates by adding the CharWidths of all the characters in the string
  2392. (see above). This value will be added to the pen horizontal coordinate
  2393. if the specified string is drawn.
  2394.  
  2395.  
  2396. æKY AEGetKeyDesc
  2397. æFp AppleEvents.p
  2398. æT FUNCTION
  2399. æD FUNCTION AEGetKeyDesc(theAERecord: AERecord;
  2400.                       theAEKeyword: AEKeyword;
  2401.                       desiredType: DescType;
  2402.                       VAR result: AEDesc): OSErr;
  2403.     INLINE $303C, $0812, $A816;
  2404. æDT myVariable := AEGetKeyDesc(theAERecord,theAEKeyword,desiredType,result);
  2405. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2406.  
  2407.     StringWidth returns the width of the given text string, which it
  2408. calculates by adding the CharWidths of all the characters in the string
  2409. (see above). This value will be added to the pen horizontal coordinate
  2410. if the specified string is drawn.
  2411.  
  2412.  
  2413. æKY AESizeOfKeyDesc
  2414. æFp AppleEvents.p
  2415. æT FUNCTION
  2416. æD FUNCTION AESizeOfKeyDesc(theAERecord: AERecord;
  2417.                          theAEKeyword: AEKeyword;
  2418.                          VAR typeCode: DescType;
  2419.                          VAR dataSize: Size): OSErr;
  2420.     INLINE $303C, $0829, $A816;
  2421. æDT myVariable := AESizeOfKeyDesc(theAERecord,theAEKeyword,typeCode,dataSize);
  2422. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2423.  
  2424.     StringWidth returns the width of the given text string, which it
  2425. calculates by adding the CharWidths of all the characters in the string
  2426. (see above). This value will be added to the pen horizontal coordinate
  2427. if the specified string is drawn.
  2428.  
  2429.  
  2430. æKY AEDeleteKeyDesc
  2431. æFp AppleEvents.p
  2432. æT FUNCTION
  2433. æD FUNCTION AEDeleteKeyDesc(theAERecord: AERecord;
  2434.                          theAEKeyword: AEKeyword): OSErr;
  2435.     INLINE $303C, $0413, $A816;
  2436. æDT myVariable := AEDeleteKeyDesc(theAERecord,theAEKeyword);
  2437. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2438.  
  2439.     StringWidth returns the width of the given text string, which it
  2440. calculates by adding the CharWidths of all the characters in the string
  2441. (see above). This value will be added to the pen horizontal coordinate
  2442. if the specified string is drawn.
  2443.  
  2444.  
  2445. æKY AEPutParamPtr
  2446. æFp AppleEvents.p
  2447. æT FUNCTION
  2448. æD FUNCTION AEPutParamPtr(theAppleEvent: AppleEvent;
  2449.                        theAEKeyword: AEKeyword;
  2450.                        typeCode: DescType;
  2451.                        dataPtr: Ptr;
  2452.                        dataSize: Size): OSErr;
  2453.     INLINE $303C,$0A0F,$A816;
  2454. æDT myVariable := AEPutParamPtr(theAppleEvent,theAEKeyword,typeCode,dataPtr,dataSize);
  2455. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2456.  
  2457.     StringWidth returns the width of the given text string, which it
  2458. calculates by adding the CharWidths of all the characters in the string
  2459. (see above). This value will be added to the pen horizontal coordinate
  2460. if the specified string is drawn.
  2461.  
  2462.  
  2463. æKY AEPutParamDesc
  2464. æFp AppleEvents.p
  2465. æT FUNCTION
  2466. æD FUNCTION AEPutParamDesc(theAppleEvent: AppleEvent;
  2467.                         theAEKeyword: AEKeyword;
  2468.                         theAEDesc: AEDesc): OSErr;
  2469.     INLINE $303C,$0610,$A816;
  2470. æDT myVariable := AEPutParamDesc(theAppleEvent,theAEKeyword,theAEDesc);
  2471. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2472.  
  2473.     StringWidth returns the width of the given text string, which it
  2474. calculates by adding the CharWidths of all the characters in the string
  2475. (see above). This value will be added to the pen horizontal coordinate
  2476. if the specified string is drawn.
  2477.  
  2478.  
  2479. æKY AEGetParamPtr
  2480. æFp AppleEvents.p
  2481. æT FUNCTION
  2482. æD FUNCTION AEGetParamPtr(theAppleEvent: AppleEvent;
  2483.                        theAEKeyword: AEKeyword;
  2484.                        desiredType: DescType;
  2485.                        VAR typeCode: DescType;
  2486.                        dataPtr: Ptr;
  2487.                        maximumSize: Size;
  2488.                        VAR actualSize: Size): OSErr;
  2489.     INLINE $303C,$0E11,$A816;
  2490. æDT myVariable := AEGetParamPtr(theAppleEvent,theAEKeyword,desiredType,typeCode,dataPtr,maximumSize,actualSize);
  2491. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2492.  
  2493.     StringWidth returns the width of the given text string, which it
  2494. calculates by adding the CharWidths of all the characters in the string
  2495. (see above). This value will be added to the pen horizontal coordinate
  2496. if the specified string is drawn.
  2497.  
  2498.  
  2499. æKY AEGetParamDesc
  2500. æFp AppleEvents.p
  2501. æT FUNCTION
  2502. æD FUNCTION AEGetParamDesc(theAppleEvent: AppleEvent;
  2503.                         theAEKeyword: AEKeyword;
  2504.                         desiredType: DescType;
  2505.                         VAR result: AEDesc): OSErr;
  2506.     INLINE $303C,$0812,$A816;
  2507. æDT myVariable := AEGetParamDesc(theAppleEvent,theAEKeyword,desiredType,result);
  2508. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2509.  
  2510.     StringWidth returns the width of the given text string, which it
  2511. calculates by adding the CharWidths of all the characters in the string
  2512. (see above). This value will be added to the pen horizontal coordinate
  2513. if the specified string is drawn.
  2514.  
  2515.  
  2516. æKY AESizeOfParam
  2517. æFp AppleEvents.p
  2518. æT FUNCTION
  2519. æD FUNCTION AESizeOfParam(theAppleEvent: AppleEvent;
  2520.                        theAEKeyword: AEKeyword;
  2521.                        VAR typeCode: DescType;
  2522.                        VAR dataSize: Size): OSErr;
  2523.     INLINE $303C,$0829,$A816;
  2524. æDT myVariable := AESizeOfParam(theAppleEvent,theAEKeyword,typeCode,dataSize);
  2525. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2526.  
  2527.     StringWidth returns the width of the given text string, which it
  2528. calculates by adding the CharWidths of all the characters in the string
  2529. (see above). This value will be added to the pen horizontal coordinate
  2530. if the specified string is drawn.
  2531.  
  2532.  
  2533. æKY AEDeleteParam
  2534. æFp AppleEvents.p
  2535. æT FUNCTION
  2536. æD FUNCTION AEDeleteParam(theAppleEvent: AppleEvent;
  2537.                        theAEKeyword: AEKeyword): OSErr;
  2538.     INLINE $303C,$0413,$A816;
  2539. æDT myVariable := AEDeleteParam(theAppleEvent,theAEKeyword);
  2540. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2541.  
  2542.     StringWidth returns the width of the given text string, which it
  2543. calculates by adding the CharWidths of all the characters in the string
  2544. (see above). This value will be added to the pen horizontal coordinate
  2545. if the specified string is drawn.
  2546.  
  2547.  
  2548. æKY AEGetAttributePtr
  2549. æFp AppleEvents.p
  2550. æT FUNCTION
  2551. æD FUNCTION AEGetAttributePtr(theAppleEvent: AppleEvent;
  2552.                            theAEKeyword: AEKeyword;
  2553.                            desiredType: DescType;
  2554.                            VAR typeCode: DescType;
  2555.                            dataPtr: Ptr;
  2556.                            maximumSize: Size;
  2557.                            VAR actualSize: Size): OSErr;
  2558.     INLINE $303C,$0E15,$A816;
  2559. æDT myVariable := AEGetAttributePtr(theAppleEvent,theAEKeyword,desiredType,typeCode,dataPtr,maximumSize,actualSize);
  2560. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2561.  
  2562.     StringWidth returns the width of the given text string, which it
  2563. calculates by adding the CharWidths of all the characters in the string
  2564. (see above). This value will be added to the pen horizontal coordinate
  2565. if the specified string is drawn.
  2566.  
  2567.  
  2568. æKY AEGetAttributeDesc
  2569. æFp AppleEvents.p
  2570. æT FUNCTION
  2571. æD FUNCTION AEGetAttributeDesc(theAppleEvent: AppleEvent;
  2572.                             theAEKeyword: AEKeyword;
  2573.                             desiredType: DescType;
  2574.                             VAR result: AEDesc): OSErr;
  2575.     INLINE $303C,$0826,$A816;
  2576. æDT myVariable := AEGetAttributeDesc(theAppleEvent,theAEKeyword,desiredType,result);
  2577. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2578.  
  2579.     StringWidth returns the width of the given text string, which it
  2580. calculates by adding the CharWidths of all the characters in the string
  2581. (see above). This value will be added to the pen horizontal coordinate
  2582. if the specified string is drawn.
  2583.  
  2584.  
  2585. æKY AESizeOfAttribute
  2586. æFp AppleEvents.p
  2587. æT FUNCTION
  2588. æD FUNCTION AESizeOfAttribute(theAppleEvent: AppleEvent;
  2589.                            theAEKeyword: AEKeyword;
  2590.                            VAR typeCode: DescType;
  2591.                            VAR dataSize: Size): OSErr;
  2592.     INLINE $303C,$0828,$A816;
  2593. æDT myVariable := AESizeOfAttribute(theAppleEvent,theAEKeyword,typeCode,dataSize);
  2594. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2595.  
  2596.     StringWidth returns the width of the given text string, which it
  2597. calculates by adding the CharWidths of all the characters in the string
  2598. (see above). This value will be added to the pen horizontal coordinate
  2599. if the specified string is drawn.
  2600.  
  2601.  
  2602. æKY AEPutAttributePtr
  2603. æFp AppleEvents.p
  2604. æT FUNCTION
  2605. æD FUNCTION AEPutAttributePtr(theAppleEvent: AppleEvent;
  2606.                            theAEKeyword: AEKeyword;
  2607.                            typeCode: DescType;
  2608.                            dataPtr: Ptr;
  2609.                            dataSize: Size): OSErr;
  2610.     INLINE $303C,$0A16,$A816;
  2611. æDT myVariable := AEPutAttributePtr(theAppleEvent,theAEKeyword,typeCode,dataPtr,dataSize);
  2612. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2613.  
  2614.     StringWidth returns the width of the given text string, which it
  2615. calculates by adding the CharWidths of all the characters in the string
  2616. (see above). This value will be added to the pen horizontal coordinate
  2617. if the specified string is drawn.
  2618.  
  2619.  
  2620. æKY AEPutAttributeDesc
  2621. æFp AppleEvents.p
  2622. æT FUNCTION
  2623. æD FUNCTION AEPutAttributeDesc(theAppleEvent: AppleEvent;
  2624.                             theAEKeyword: AEKeyword;
  2625.                             theAEDesc: AEDesc): OSErr;
  2626.     INLINE $303C,$0627,$A816;
  2627. æDT myVariable := AEPutAttributeDesc(theAppleEvent,theAEKeyword,theAEDesc);
  2628. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2629.  
  2630.     StringWidth returns the width of the given text string, which it
  2631. calculates by adding the CharWidths of all the characters in the string
  2632. (see above). This value will be added to the pen horizontal coordinate
  2633. if the specified string is drawn.
  2634.  
  2635.  
  2636. æKY AECreateAppleEvent
  2637. æFp AppleEvents.p
  2638. æT FUNCTION
  2639. æD FUNCTION AECreateAppleEvent(theAEEventClass: AEEventClass;
  2640.                             theAEEventID: AEEventID;
  2641.                             target: AEAddressDesc;
  2642.                             returnID: INTEGER;
  2643.                             transactionID: LONGINT;
  2644.                             VAR result: AppleEvent): OSErr;
  2645.     INLINE $303C,$0B14,$A816;
  2646. æDT myVariable := AECreateAppleEvent(theAEEventClass,theAEEventID,target,returnID,transactionID,result);
  2647. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2648.  
  2649.     StringWidth returns the width of the given text string, which it
  2650. calculates by adding the CharWidths of all the characters in the string
  2651. (see above). This value will be added to the pen horizontal coordinate
  2652. if the specified string is drawn.
  2653.  
  2654.  
  2655. æKY AESend
  2656. æFp AppleEvents.p
  2657. æT FUNCTION
  2658. æD FUNCTION AESend(theAppleEvent: AppleEvent;
  2659.                 VAR reply: AppleEvent;
  2660.                 sendMode: AESendMode;
  2661.                 sendPriority: AESendPriority;
  2662.                 timeOutInTicks: LONGINT;
  2663.                 idleProc: IdleProcPtr;
  2664.                 filterProc: EventFilterProcPtr): OSErr;
  2665.     INLINE $303C,$0D17,$A816;
  2666. æDT myVariable := AESend(theAppleEvent,reply,sendMode,sendPriority,timeOutInTicks,idleProc,filterProc);
  2667. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2668.  
  2669.     StringWidth returns the width of the given text string, which it
  2670. calculates by adding the CharWidths of all the characters in the string
  2671. (see above). This value will be added to the pen horizontal coordinate
  2672. if the specified string is drawn.
  2673.  
  2674.  
  2675. æKY AEProcessAppleEvent
  2676. æFp AppleEvents.p
  2677. æT FUNCTION
  2678. æD FUNCTION AEProcessAppleEvent(theEventRecord: EventRecord): OSErr;
  2679.     INLINE $303C,$021B,$A816;
  2680. æDT myVariable := AEProcessAppleEvent(theEventRecord);
  2681. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2682.  
  2683.     StringWidth returns the width of the given text string, which it
  2684. calculates by adding the CharWidths of all the characters in the string
  2685. (see above). This value will be added to the pen horizontal coordinate
  2686. if the specified string is drawn.
  2687.  
  2688.  
  2689. æKY AEResetTimer
  2690. æFp AppleEvents.p
  2691. æT FUNCTION
  2692. æD FUNCTION AEResetTimer(reply: AppleEvent): OSErr;
  2693.     INLINE $303C,$0219,$A816;
  2694. æDT myVariable := AEResetTimer(reply);
  2695. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2696.  
  2697.     StringWidth returns the width of the given text string, which it
  2698. calculates by adding the CharWidths of all the characters in the string
  2699. (see above). This value will be added to the pen horizontal coordinate
  2700. if the specified string is drawn.
  2701.  
  2702.  
  2703. æKY AESuspendTheCurrentEvent
  2704. æFp AppleEvents.p
  2705. æT FUNCTION
  2706. æD FUNCTION AESuspendTheCurrentEvent(theAppleEvent: AppleEvent): OSErr;
  2707.     INLINE $303C,$022B,$A816;
  2708. æDT myVariable := AESuspendTheCurrentEvent(theAppleEvent);
  2709. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2710.  
  2711.     StringWidth returns the width of the given text string, which it
  2712. calculates by adding the CharWidths of all the characters in the string
  2713. (see above). This value will be added to the pen horizontal coordinate
  2714. if the specified string is drawn.
  2715.  
  2716.  
  2717. æKY AEResumeTheCurrentEvent
  2718. æFp AppleEvents.p
  2719. æT FUNCTION
  2720. æD FUNCTION AEResumeTheCurrentEvent(theAppleEvent: AppleEvent;
  2721.                                  reply: AppleEvent;
  2722.                                  dispatcher: EventHandlerProcPtr;
  2723.                                  handlerRefcon: LONGINT): OSErr;
  2724.     INLINE $303C,$0818,$A816;
  2725. æDT myVariable := AEResumeTheCurrentEvent(theAppleEvent,reply,dispatcher,handlerRefcon);
  2726. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2727.  
  2728.     StringWidth returns the width of the given text string, which it
  2729. calculates by adding the CharWidths of all the characters in the string
  2730. (see above). This value will be added to the pen horizontal coordinate
  2731. if the specified string is drawn.
  2732.  
  2733.  
  2734. æKY AEGetTheCurrentEvent
  2735. æFp AppleEvents.p
  2736. æT FUNCTION
  2737. æD FUNCTION AEGetTheCurrentEvent(VAR theAppleEvent: AppleEvent): OSErr;
  2738.     INLINE $303C,$021A,$A816;
  2739. æDT myVariable := AEGetTheCurrentEvent(theAppleEvent);
  2740. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2741.  
  2742.     StringWidth returns the width of the given text string, which it
  2743. calculates by adding the CharWidths of all the characters in the string
  2744. (see above). This value will be added to the pen horizontal coordinate
  2745. if the specified string is drawn.
  2746.  
  2747.  
  2748. æKY AESetTheCurrentEvent
  2749. æFp AppleEvents.p
  2750. æT FUNCTION
  2751. æD FUNCTION AESetTheCurrentEvent(theAppleEvent: AppleEvent): OSErr;
  2752.     INLINE $303C,$022C,$A816;
  2753. æDT myVariable := AESetTheCurrentEvent(theAppleEvent);
  2754. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2755.  
  2756.     StringWidth returns the width of the given text string, which it
  2757. calculates by adding the CharWidths of all the characters in the string
  2758. (see above). This value will be added to the pen horizontal coordinate
  2759. if the specified string is drawn.
  2760.  
  2761.  
  2762. æKY AEGetInteractionAllowed
  2763. æFp AppleEvents.p
  2764. æT FUNCTION
  2765. æD FUNCTION AEGetInteractionAllowed(VAR level: AEInteractAllowed): OSErr;
  2766.     INLINE $303C,$021D,$A816;
  2767. æDT myVariable := AEGetInteractionAllowed(level);
  2768. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2769.  
  2770.     StringWidth returns the width of the given text string, which it
  2771. calculates by adding the CharWidths of all the characters in the string
  2772. (see above). This value will be added to the pen horizontal coordinate
  2773. if the specified string is drawn.
  2774.  
  2775.  
  2776. æKY AESetInteractionAllowed
  2777. æFp AppleEvents.p
  2778. æT FUNCTION
  2779. æD FUNCTION AESetInteractionAllowed(level: AEInteractAllowed): OSErr;
  2780.     INLINE $303C,$011E,$A816;
  2781. æDT myVariable := AESetInteractionAllowed(level);
  2782. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2783.  
  2784.     StringWidth returns the width of the given text string, which it
  2785. calculates by adding the CharWidths of all the characters in the string
  2786. (see above). This value will be added to the pen horizontal coordinate
  2787. if the specified string is drawn.
  2788.  
  2789.  
  2790. æKY AEInteractWithUser
  2791. æFp AppleEvents.p
  2792. æT FUNCTION
  2793. æD FUNCTION AEInteractWithUser(timeOutInTicks: LONGINT;
  2794.                             nmReqPtr: NMRecPtr;
  2795.                             idleProc: IdleProcPtr): OSErr;
  2796.     INLINE $303C,$061C,$A816;
  2797. æDT myVariable := AEInteractWithUser(timeOutInTicks,nmReqPtr,idleProc);
  2798. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2799.  
  2800.     StringWidth returns the width of the given text string, which it
  2801. calculates by adding the CharWidths of all the characters in the string
  2802. (see above). This value will be added to the pen horizontal coordinate
  2803. if the specified string is drawn.
  2804.  
  2805.  
  2806. æKY AEInstallEventHandler
  2807. æFp AppleEvents.p
  2808. æT FUNCTION
  2809. æD FUNCTION AEInstallEventHandler(theAEEventClass: AEEventClass;
  2810.                                theAEEventID: AEEventID;
  2811.                                handler: EventHandlerProcPtr;
  2812.                                handlerRefcon: LONGINT;
  2813.                                isSysHandler: BOOLEAN): OSErr;
  2814.     INLINE $303C,$091F,$A816;
  2815. æDT myVariable := AEInstallEventHandler(theAEEventClass,theAEEventID,handler,handlerRefcon,isSysHandler);
  2816. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2817.  
  2818.     StringWidth returns the width of the given text string, which it
  2819. calculates by adding the CharWidths of all the characters in the string
  2820. (see above). This value will be added to the pen horizontal coordinate
  2821. if the specified string is drawn.
  2822.  
  2823.  
  2824. æKY AERemoveEventHandler
  2825. æFp AppleEvents.p
  2826. æT FUNCTION
  2827. æD FUNCTION AERemoveEventHandler(theAEEventClass: AEEventClass;
  2828.                               theAEEventID: AEEventID;
  2829.                               handler: EventHandlerProcPtr;
  2830.                               isSysHandler: BOOLEAN): OSErr;
  2831.     INLINE $303C,$0720,$A816;
  2832. æDT myVariable := AERemoveEventHandler(theAEEventClass,theAEEventID,handler,isSysHandler);
  2833. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2834.  
  2835.     StringWidth returns the width of the given text string, which it
  2836. calculates by adding the CharWidths of all the characters in the string
  2837. (see above). This value will be added to the pen horizontal coordinate
  2838. if the specified string is drawn.
  2839.  
  2840.  
  2841. æKY AEGetEventHandler
  2842. æFp AppleEvents.p
  2843. æT FUNCTION
  2844. æD FUNCTION AEGetEventHandler(theAEEventClass: AEEventClass;
  2845.                            theAEEventID: AEEventID;
  2846.                            VAR handler: EventHandlerProcPtr;
  2847.                            VAR handlerRefcon: LONGINT;
  2848.                            isSysHandler: BOOLEAN): OSErr;
  2849.     INLINE $303C,$0921,$A816;
  2850. æDT myVariable := AEGetEventHandler(theAEEventClass,theAEEventID,handler,handlerRefcon,isSysHandler);
  2851. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2852.  
  2853.     StringWidth returns the width of the given text string, which it
  2854. calculates by adding the CharWidths of all the characters in the string
  2855. (see above). This value will be added to the pen horizontal coordinate
  2856. if the specified string is drawn.
  2857.  
  2858.  
  2859. æKY AEInstallCoercionHandler
  2860. æFp AppleEvents.p
  2861. æT FUNCTION
  2862. æD FUNCTION AEInstallCoercionHandler(fromType: DescType;
  2863.                                   toType: DescType;
  2864.                                   handler: ProcPtr;
  2865.                                   handlerRefcon: LONGINT;
  2866.                                   fromTypeIsDesc: BOOLEAN;
  2867.                                   isSysHandler: BOOLEAN): OSErr;
  2868.     INLINE $303C, $0A22, $A816;
  2869. æDT myVariable := AEInstallCoercionHandler(fromType,toType,handler,handlerRefcon,fromTypeIsDesc,isSysHandler);
  2870. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2871.  
  2872.     StringWidth returns the width of the given text string, which it
  2873. calculates by adding the CharWidths of all the characters in the string
  2874. (see above). This value will be added to the pen horizontal coordinate
  2875. if the specified string is drawn.
  2876.  
  2877.  
  2878. æKY AERemoveCoercionHandler
  2879. æFp AppleEvents.p
  2880. æT FUNCTION
  2881. æD FUNCTION AERemoveCoercionHandler(fromType: DescType;
  2882.                                  toType: DescType;
  2883.                                  handler: ProcPtr;
  2884.                                  isSysHandler: BOOLEAN): OSErr;
  2885.     INLINE $303C, $0723, $A816;
  2886. æDT myVariable := AERemoveCoercionHandler(fromType,toType,handler,isSysHandler);
  2887. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2888.  
  2889.     StringWidth returns the width of the given text string, which it
  2890. calculates by adding the CharWidths of all the characters in the string
  2891. (see above). This value will be added to the pen horizontal coordinate
  2892. if the specified string is drawn.
  2893.  
  2894.  
  2895. æKY AEGetCoercionHandler
  2896. æFp AppleEvents.p
  2897. æT FUNCTION
  2898. æD FUNCTION AEGetCoercionHandler(fromType: DescType;
  2899.                               toType: DescType;
  2900.                               VAR handler: ProcPtr;
  2901.                               VAR handlerRefcon: LONGINT;
  2902.                               VAR fromTypeIsDesc: BOOLEAN;
  2903.                               isSysHandler: BOOLEAN): OSErr;
  2904.     INLINE $303C, $0B24, $A816;
  2905. æDT myVariable := AEGetCoercionHandler(fromType,toType,handler,handlerRefcon,fromTypeIsDesc,isSysHandler);
  2906. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2907.  
  2908.     StringWidth returns the width of the given text string, which it
  2909. calculates by adding the CharWidths of all the characters in the string
  2910. (see above). This value will be added to the pen horizontal coordinate
  2911. if the specified string is drawn.
  2912.  
  2913.  
  2914. æKY AEInstallSpecialHandler
  2915. æFp AppleEvents.p
  2916. æT FUNCTION
  2917. æD FUNCTION AEInstallSpecialHandler(functionClass: AEKeyword;
  2918.                                  handler: ProcPtr;
  2919.                                  isSysHandler: BOOLEAN): OSErr;
  2920.     INLINE $303C, $0500, $A816;
  2921. æDT myVariable := AEInstallSpecialHandler(functionClass,handler,isSysHandler);
  2922. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2923.  
  2924.     StringWidth returns the width of the given text string, which it
  2925. calculates by adding the CharWidths of all the characters in the string
  2926. (see above). This value will be added to the pen horizontal coordinate
  2927. if the specified string is drawn.
  2928.  
  2929.  
  2930. æKY AERemoveSpecialHandler
  2931. æFp AppleEvents.p
  2932. æT FUNCTION
  2933. æD FUNCTION AERemoveSpecialHandler(functionClass: AEKeyword;
  2934.                                 handler: ProcPtr;
  2935.                                 isSysHandler: BOOLEAN): OSErr;
  2936.     INLINE $303C, $0501, $A816;
  2937. æDT myVariable := AERemoveSpecialHandler(functionClass,handler,isSysHandler);
  2938. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2939.  
  2940.     StringWidth returns the width of the given text string, which it
  2941. calculates by adding the CharWidths of all the characters in the string
  2942. (see above). This value will be added to the pen horizontal coordinate
  2943. if the specified string is drawn.
  2944.  
  2945.  
  2946. æKY AEGetSpecialHandler
  2947. æFp AppleEvents.p
  2948. æT FUNCTION
  2949. æD FUNCTION AEGetSpecialHandler(functionClass: AEKeyword;
  2950.                              VAR handler: ProcPtr;
  2951.                              isSysHandler: BOOLEAN): OSErr;
  2952.     INLINE $303C, $052D, $A816;
  2953. æDT myVariable := AEGetSpecialHandler(functionClass,handler,isSysHandler);
  2954. æC FUNCTION StringWidth (s: Str255 ) : INTEGER;
  2955.  
  2956.     StringWidth returns the width of the given text string, which it
  2957. calculates by adding the CharWidths of all the characters in the string
  2958. (see above). This value will be added to the pen horizontal coordinate
  2959. if the specified string is drawn.
  2960.  
  2961.  
  2962.  
  2963. æKY AppleTalk.p
  2964. æKL AFPCommand
  2965. ASPAbortOS
  2966. ASPCloseAll
  2967. ASPCloseSession
  2968. ASPGetParms
  2969. ASPGetStatus
  2970. ASPOpenSession
  2971. ASPUserCommand
  2972. ASPUserWrite
  2973. ATEvent
  2974. ATPAddRsp
  2975. ATPCloseSocket
  2976. ATPGetRequest
  2977. ATPKillAllGetReq
  2978. ATPLoad
  2979. ATPOpenSocket
  2980. ATPreFlightEvent
  2981. ATPReqCancel
  2982. ATPRequest
  2983. ATPResponse
  2984. ATPRspCancel
  2985. ATPSndRequest
  2986. ATPSndRsp
  2987. ATPUnload
  2988. BuildBDS
  2989. BuildDDPwds
  2990. BuildLAPwds
  2991. DDPCloseSocket
  2992. DDPOpenSocket
  2993. DDPRdCancel
  2994. DDPRead
  2995. DDPWrite
  2996. GetBridgeAddress
  2997. GetLocalZones
  2998. GetMyZone
  2999. GetNodeAddress
  3000. GetZoneList
  3001. IsATPOpen
  3002. IsMPPOpen
  3003. LAPAddATQ
  3004. LAPCloseProtocol
  3005. LAPOpenProtocol
  3006. LAPRdCancel
  3007. LAPRead
  3008. LAPRmvATQ
  3009. LAPWrite
  3010. MPPClose
  3011. MPPOpen
  3012. NBPConfirm
  3013. NBPExtract
  3014. NBPLoad
  3015. NBPLookup
  3016. NBPRegister
  3017. NBPRemove
  3018. NBPSetEntity
  3019. NBPSetNTE
  3020. NBPUnload
  3021. OpenXPP
  3022. PAddResponse
  3023. PATalkClosePrep
  3024. PAttachPH
  3025. PCloseATPSkt
  3026. PCloseSkt
  3027. PConfirmName
  3028. PDetachPH
  3029. PGetAppleTalkInfo
  3030. PGetRequest
  3031. PKillGetReq
  3032. PKillNBP
  3033. PKillSendReq
  3034. PLookupName
  3035. PNSendRequest
  3036. POpenATPSkt
  3037. POpenSkt
  3038. PRegisterName
  3039. PRelRspCB
  3040. PRelTCB
  3041. PRemoveName
  3042. PSendRequest
  3043. PSendResponse
  3044. PSetSelfSend
  3045. PWriteDDP
  3046. PWriteLAP
  3047.  
  3048. ABByte
  3049. ABCallType
  3050. abortOS
  3051. ABProtoType
  3052. ABRecHandle
  3053. ABRecPtr
  3054. ABusRecord
  3055. AddrBlock
  3056. addResponse
  3057. afpAddAPPL
  3058. afpAddCmt
  3059. afpAddIcon
  3060. afpByteRangeLock
  3061. afpCall
  3062. AFPCommandBlock
  3063. afpContLogin
  3064. afpCopyFile
  3065. afpDelete
  3066. afpDirClose
  3067. afpDirCreate
  3068. afpDTClose
  3069. afpDTOpen
  3070. afpEnumerate
  3071. afpFileCreate
  3072. afpFlush
  3073. afpForkClose
  3074. afpForkFlush
  3075. afpGetAPPL
  3076. afpGetCmt
  3077. afpGetDirParms
  3078. afpGetFileParms
  3079. afpGetFlDrParms
  3080. afpGetForkParms
  3081. afpGetIcon
  3082. afpGetSInfo
  3083. afpGetSParms
  3084. afpGetVolParms
  3085. afpGtIcnInfo
  3086. afpLogin
  3087. afpLogout
  3088. afpMapID
  3089. afpMapName
  3090. afpMove
  3091. afpOpenDir
  3092. afpOpenFork
  3093. afpOpenVol
  3094. afpRead
  3095. afpRename
  3096. afpRmvAPPL
  3097. afpRmvCmt
  3098. afpSetDirParms
  3099. afpSetFileParms
  3100. afpSetFlDrParms
  3101. afpSetForkParms
  3102. afpSetVolParms
  3103. afpVolClose
  3104. afpWrite
  3105. ATalkClosePrep
  3106. atpEOMvalue
  3107. ATPParamBlock
  3108. ATPPBPtr
  3109. atpProto
  3110. atpRefNum
  3111. atpSendChkvalue
  3112. atpSize
  3113. atpSTSvalue
  3114. atpTIDValidvalue
  3115. atpUnitNum
  3116. atpXOvalue
  3117. ATQEntry
  3118. ATQEntryPtr
  3119. attachPH
  3120. ATTransCancelClose
  3121. ATTransClose
  3122. ATTransClosePrep
  3123. ATTransOpen
  3124. BDSElement
  3125. BDSPtr
  3126. BDSType
  3127. BitMapType
  3128. closeAll
  3129. closeATPSkt
  3130. closeSess
  3131. closeSkt
  3132. confirmName
  3133. ddpProto
  3134. ddpSize
  3135. detachPH
  3136. EntityName
  3137. EntityPtr
  3138. GetATalkInfo
  3139. getParms
  3140. getRequest
  3141. getStatus
  3142. killAllGetReq
  3143. killGetReq
  3144. killNBP
  3145. killSendReq
  3146. LAddAEQ
  3147. LAPAdrBlock
  3148. LAPMgrCall
  3149. LAPMgrPtr
  3150. lapProto
  3151. lapSize
  3152. lastResident
  3153. loadNBP
  3154. lookupName
  3155. lookupReply
  3156. LRmvAEQ
  3157. MPPParamBlock
  3158. MPPParmType
  3159. MPPPBPtr
  3160. mppRefNum
  3161. mppUnitNum
  3162. NamesTableEntry
  3163. nbpProto
  3164. nbpSize
  3165. nSendRequest
  3166. openATPSkt
  3167. openSess
  3168. openSkt
  3169. registerName
  3170. relRspCB
  3171. relTCB
  3172. removeName
  3173. RetransType
  3174. scbMemSize
  3175. sendRequest
  3176. sendResponse
  3177. SetMyZone
  3178. setSelfSend
  3179. tATPAddRsp
  3180. tATPGetRequest
  3181. tATPRequest
  3182. tATPResponse
  3183. tATPSdRsp
  3184. tATPSndRequest
  3185. tDDPRead
  3186. tDDPWrite
  3187. tLAPRead
  3188. tLAPWrite
  3189. tNBPConfirm
  3190. tNBPLookup
  3191. tNBPRegister
  3192. unloadNBP
  3193. userCommand
  3194. userWrite
  3195. WDSElement
  3196. writeDDP
  3197. writeLAP
  3198. xCall
  3199. XPPEndPrmType
  3200. xppFlagClr
  3201. xppFlagSet
  3202. xppLoadedBit
  3203. XPPParamBlock
  3204. XPPParmBlkPtr
  3205. XPPPrmBlkType
  3206. xppRefNum
  3207. XPPSubPrmType
  3208. xppUnitNum
  3209. zipGetLocalZones
  3210. zipGetMyZone
  3211. zipGetZoneList
  3212.  
  3213. æKY mppUnitNum
  3214. æFp AppleTalk.p
  3215. æT CONST
  3216. æD mppUnitNum = 9; {MPP unit number}
  3217. æC 
  3218.  
  3219. æKY atpUnitNum
  3220. æFp AppleTalk.p
  3221. æT CONST
  3222. æD atpUnitNum = 10; { ATP unit number }
  3223. æC 
  3224.  
  3225. æKY xppUnitNum
  3226. æFp AppleTalk.p
  3227. æT CONST
  3228. æD xppUnitNum = 40; { XPP unit number }
  3229. æC 
  3230.  
  3231. æKY mppRefNum
  3232. æFp AppleTalk.p
  3233. æT CONST
  3234. æD mppRefNum = -10; {MPP reference number }
  3235. æC 
  3236.  
  3237. æKY atpRefNum
  3238. æFp AppleTalk.p
  3239. æT CONST
  3240. æD atpRefNum = -11; { ATP reference number }
  3241. æC 
  3242.  
  3243. æKY xppRefNum
  3244. æFp AppleTalk.p
  3245. æT CONST
  3246. æD xppRefNum = -41; { XPP reference number }
  3247. æC 
  3248.  
  3249. æKY lookupReply
  3250. æFp AppleTalk.p
  3251. æT CONST
  3252. æD lookupReply = 242; { This command queued to ourself }
  3253. æC 
  3254.  
  3255. æKY writeLAP
  3256. æFp AppleTalk.p
  3257. æT CONST
  3258. æD writeLAP = 243; { Write out LAP packet }
  3259. æC 
  3260.  
  3261. æKY detachPH
  3262. æFp AppleTalk.p
  3263. æT CONST
  3264. æD detachPH = 244; { Detach LAP protocol handler }
  3265. æC 
  3266.  
  3267. æKY attachPH
  3268. æFp AppleTalk.p
  3269. æT CONST
  3270. æD attachPH = 245; { Attach LAP protocol handler }
  3271. æC 
  3272.  
  3273. æKY writeDDP
  3274. æFp AppleTalk.p
  3275. æT CONST
  3276. æD writeDDP = 246; { Write out DDP packet }
  3277. æC 
  3278.  
  3279. æKY closeSkt
  3280. æFp AppleTalk.p
  3281. æT CONST
  3282. æD closeSkt = 247; { Close DDP socket }
  3283. æC 
  3284.  
  3285. æKY openSkt
  3286. æFp AppleTalk.p
  3287. æT CONST
  3288. æD openSkt = 248; { Open DDP socket }
  3289. æC 
  3290.  
  3291. æKY loadNBP
  3292. æFp AppleTalk.p
  3293. æT CONST
  3294. æD loadNBP = 249; { Load NBP command-executing code }
  3295. æC 
  3296.  
  3297. æKY lastResident
  3298. æFp AppleTalk.p
  3299. æT CONST
  3300. æD lastResident = 249; { Last resident command }
  3301. æC 
  3302.  
  3303. æKY confirmName
  3304. æFp AppleTalk.p
  3305. æT CONST
  3306. æD confirmName = 250; { Confirm name }
  3307. æC 
  3308.  
  3309. æKY lookupName
  3310. æFp AppleTalk.p
  3311. æT CONST
  3312. æD lookupName = 251; { Look up name on internet }
  3313. æC 
  3314.  
  3315. æKY removeName
  3316. æFp AppleTalk.p
  3317. æT CONST
  3318. æD removeName = 252; { Remove name from Names Table }
  3319. æC 
  3320.  
  3321. æKY registerName
  3322. æFp AppleTalk.p
  3323. æT CONST
  3324. æD registerName = 253; { Register name in Names Table }
  3325. æC 
  3326.  
  3327. æKY killNBP
  3328. æFp AppleTalk.p
  3329. æT CONST
  3330. æD killNBP = 254; { Kill outstanding NBP request }
  3331. æC 
  3332.  
  3333. æKY unloadNBP
  3334. æFp AppleTalk.p
  3335. æT CONST
  3336. æD unloadNBP = 255; { Unload NBP command code }
  3337. æC 
  3338.  
  3339. æKY setSelfSend
  3340. æFp AppleTalk.p
  3341. æT CONST
  3342. æD setSelfSend = 256; { MPP: Set to allow writes to self }
  3343. æC 
  3344.  
  3345. æKY SetMyZone
  3346. æFp AppleTalk.p
  3347. æT CONST
  3348. æD SetMyZone = 257; { Set my zone name }
  3349. æC 
  3350.  
  3351. æKY GetATalkInfo
  3352. æFp AppleTalk.p
  3353. æT CONST
  3354. æD GetATalkInfo = 258; { get AppleTalk information }
  3355. æC 
  3356.  
  3357. æKY ATalkClosePrep
  3358. æFp AppleTalk.p
  3359. æT CONST
  3360. æD ATalkClosePrep = 259; { AppleTalk close query }
  3361. æC 
  3362.  
  3363. æKY nSendRequest
  3364. æFp AppleTalk.p
  3365. æT CONST
  3366. æD nSendRequest = 248; { NSendRequest code }
  3367. æC 
  3368.  
  3369. æKY relRspCB
  3370. æFp AppleTalk.p
  3371. æT CONST
  3372. æD relRspCB = 249; { Release RspCB }
  3373. æC 
  3374.  
  3375. æKY closeATPSkt
  3376. æFp AppleTalk.p
  3377. æT CONST
  3378. æD closeATPSkt = 250; { Close ATP socket }
  3379. æC 
  3380.  
  3381. æKY addResponse
  3382. æFp AppleTalk.p
  3383. æT CONST
  3384. æD addResponse = 251; { Add response code | Require open skt }
  3385. æC 
  3386.  
  3387. æKY sendResponse
  3388. æFp AppleTalk.p
  3389. æT CONST
  3390. æD sendResponse = 252; { Send response code }
  3391. æC 
  3392.  
  3393. æKY getRequest
  3394. æFp AppleTalk.p
  3395. æT CONST
  3396. æD getRequest = 253; { Get request code }
  3397. æC 
  3398.  
  3399. æKY openATPSkt
  3400. æFp AppleTalk.p
  3401. æT CONST
  3402. æD openATPSkt = 254; { Open ATP socket }
  3403. æC 
  3404.  
  3405. æKY sendRequest
  3406. æFp AppleTalk.p
  3407. æT CONST
  3408. æD sendRequest = 255; { Send request code }
  3409. æC 
  3410.  
  3411. æKY relTCB
  3412. æFp AppleTalk.p
  3413. æT CONST
  3414. æD relTCB = 256; { Release TCB }
  3415. æC 
  3416.  
  3417. æKY killGetReq
  3418. æFp AppleTalk.p
  3419. æT CONST
  3420. æD killGetReq = 257; { Kill GetRequest }
  3421. æC 
  3422.  
  3423. æKY killSendReq
  3424. æFp AppleTalk.p
  3425. æT CONST
  3426. æD killSendReq = 258; { Kill SendRequest }
  3427. æC 
  3428.  
  3429. æKY killAllGetReq
  3430. æFp AppleTalk.p
  3431. æT CONST
  3432. æD killAllGetReq = 259; { Kill all getRequests for a skt }
  3433. æC 
  3434.  
  3435. æKY openSess
  3436. æFp AppleTalk.p
  3437. æT CONST
  3438. æD openSess = 255; { Open session }
  3439. æC 
  3440.  
  3441. æKY closeSess
  3442. æFp AppleTalk.p
  3443. æT CONST
  3444. æD closeSess = 254; { Close session }
  3445. æC 
  3446.  
  3447. æKY userCommand
  3448. æFp AppleTalk.p
  3449. æT CONST
  3450. æD userCommand = 253; { User command }
  3451. æC 
  3452.  
  3453. æKY userWrite
  3454. æFp AppleTalk.p
  3455. æT CONST
  3456. æD userWrite = 252; { User write }
  3457. æC 
  3458.  
  3459. æKY getStatus
  3460. æFp AppleTalk.p
  3461. æT CONST
  3462. æD getStatus = 251; { Get status }
  3463. æC 
  3464.  
  3465. æKY afpCall
  3466. æFp AppleTalk.p
  3467. æT CONST
  3468. æD afpCall = 250; { AFP command (buffer has command code) }
  3469. æC 
  3470.  
  3471. æKY getParms
  3472. æFp AppleTalk.p
  3473. æT CONST
  3474. æD getParms = 249; { Get parameters }
  3475. æC 
  3476.  
  3477. æKY abortOS
  3478. æFp AppleTalk.p
  3479. æT CONST
  3480. æD abortOS = 248; { Abort open session request }
  3481. æC 
  3482.  
  3483. æKY closeAll
  3484. æFp AppleTalk.p
  3485. æT CONST
  3486. æD closeAll = 247; { Close all open sessions }
  3487. æC 
  3488.  
  3489. æKY xCall
  3490. æFp AppleTalk.p
  3491. æT CONST
  3492. æD xCall = 246; { .XPP extended calls }
  3493. æC 
  3494.  
  3495. æKY ATTransOpen
  3496. æFp AppleTalk.p
  3497. æT CONST
  3498. æD ATTransOpen = 0; {AppleTalk has opened}
  3499. æC 
  3500.  
  3501. æKY ATTransClose
  3502. æFp AppleTalk.p
  3503. æT CONST
  3504. æD ATTransClose = 2; {AppleTalk is about to close}
  3505. æC 
  3506.  
  3507. æKY ATTransClosePrep
  3508. æFp AppleTalk.p
  3509. æT CONST
  3510. æD ATTransClosePrep = 3; {Is it OK to close AppleTalk ?}
  3511. æC 
  3512.  
  3513. æKY ATTransCancelClose
  3514. æFp AppleTalk.p
  3515. æT CONST
  3516. æD ATTransCancelClose = 4; {Cancel the ClosePrep transition}
  3517. æC 
  3518.  
  3519. æKY afpByteRangeLock
  3520. æFp AppleTalk.p
  3521. æT CONST
  3522. æD afpByteRangeLock = 1; {AFPCall command codes}
  3523. æC 
  3524.  
  3525. æKY afpVolClose
  3526. æFp AppleTalk.p
  3527. æT CONST
  3528. æD afpVolClose = 2; {AFPCall command codes}
  3529. æC 
  3530.  
  3531. æKY afpDirClose
  3532. æFp AppleTalk.p
  3533. æT CONST
  3534. æD afpDirClose = 3; {AFPCall command codes}
  3535. æC 
  3536.  
  3537. æKY afpForkClose
  3538. æFp AppleTalk.p
  3539. æT CONST
  3540. æD afpForkClose = 4; {AFPCall command codes}
  3541. æC 
  3542.  
  3543. æKY afpCopyFile
  3544. æFp AppleTalk.p
  3545. æT CONST
  3546. æD afpCopyFile = 5; {AFPCall command codes}
  3547. æC 
  3548.  
  3549. æKY afpDirCreate
  3550. æFp AppleTalk.p
  3551. æT CONST
  3552. æD afpDirCreate = 6; {AFPCall command codes}
  3553. æC 
  3554.  
  3555. æKY afpFileCreate
  3556. æFp AppleTalk.p
  3557. æT CONST
  3558. æD afpFileCreate = 7; {AFPCall command codes}
  3559. æC 
  3560.  
  3561. æKY afpDelete
  3562. æFp AppleTalk.p
  3563. æT CONST
  3564. æD afpDelete = 8; {AFPCall command codes}
  3565. æC 
  3566.  
  3567. æKY afpEnumerate
  3568. æFp AppleTalk.p
  3569. æT CONST
  3570. æD afpEnumerate = 9; {AFPCall command codes}
  3571. æC 
  3572.  
  3573. æKY afpFlush
  3574. æFp AppleTalk.p
  3575. æT CONST
  3576. æD afpFlush = 10; {AFPCall command codes}
  3577. æC 
  3578.  
  3579. æKY afpForkFlush
  3580. æFp AppleTalk.p
  3581. æT CONST
  3582. æD afpForkFlush = 11; {AFPCall command codes}
  3583. æC 
  3584.  
  3585. æKY afpGetDirParms
  3586. æFp AppleTalk.p
  3587. æT CONST
  3588. æD afpGetDirParms = 12; {AFPCall command codes}
  3589. æC 
  3590.  
  3591. æKY afpGetFileParms
  3592. æFp AppleTalk.p
  3593. æT CONST
  3594. æD afpGetFileParms = 13; {AFPCall command codes}
  3595. æC 
  3596.  
  3597. æKY afpGetForkParms
  3598. æFp AppleTalk.p
  3599. æT CONST
  3600. æD afpGetForkParms = 14; {AFPCall command codes}
  3601. æC 
  3602.  
  3603. æKY afpGetSInfo
  3604. æFp AppleTalk.p
  3605. æT CONST
  3606. æD afpGetSInfo = 15; {AFPCall command codes}
  3607. æC 
  3608.  
  3609. æKY afpGetSParms
  3610. æFp AppleTalk.p
  3611. æT CONST
  3612. æD afpGetSParms = 16; {AFPCall command codes}
  3613. æC 
  3614.  
  3615. æKY afpGetVolParms
  3616. æFp AppleTalk.p
  3617. æT CONST
  3618. æD afpGetVolParms = 17; {AFPCall command codes}
  3619. æC 
  3620.  
  3621. æKY afpLogin
  3622. æFp AppleTalk.p
  3623. æT CONST
  3624. æD afpLogin = 18; {AFPCall command codes}
  3625. æC 
  3626.  
  3627. æKY afpContLogin
  3628. æFp AppleTalk.p
  3629. æT CONST
  3630. æD afpContLogin = 19; {AFPCall command codes}
  3631. æC 
  3632.  
  3633. æKY afpLogout
  3634. æFp AppleTalk.p
  3635. æT CONST
  3636. æD afpLogout = 20; {AFPCall command codes}
  3637. æC 
  3638.  
  3639. æKY afpMapID
  3640. æFp AppleTalk.p
  3641. æT CONST
  3642. æD afpMapID = 21; {AFPCall command codes}
  3643. æC 
  3644.  
  3645. æKY afpMapName
  3646. æFp AppleTalk.p
  3647. æT CONST
  3648. æD afpMapName = 22; {AFPCall command codes}
  3649. æC 
  3650.  
  3651. æKY afpMove
  3652. æFp AppleTalk.p
  3653. æT CONST
  3654. æD afpMove = 23; {AFPCall command codes}
  3655. æC 
  3656.  
  3657. æKY afpOpenVol
  3658. æFp AppleTalk.p
  3659. æT CONST
  3660. æD afpOpenVol = 24; {AFPCall command codes}
  3661. æC 
  3662.  
  3663. æKY afpOpenDir
  3664. æFp AppleTalk.p
  3665. æT CONST
  3666. æD afpOpenDir = 25; {AFPCall command codes}
  3667. æC 
  3668.  
  3669. æKY afpOpenFork
  3670. æFp AppleTalk.p
  3671. æT CONST
  3672. æD afpOpenFork = 26; {AFPCall command codes}
  3673. æC 
  3674.  
  3675. æKY afpRead
  3676. æFp AppleTalk.p
  3677. æT CONST
  3678. æD afpRead = 27; {AFPCall command codes}
  3679. æC 
  3680.  
  3681. æKY afpRename
  3682. æFp AppleTalk.p
  3683. æT CONST
  3684. æD afpRename = 28; {AFPCall command codes}
  3685. æC 
  3686.  
  3687. æKY afpSetDirParms
  3688. æFp AppleTalk.p
  3689. æT CONST
  3690. æD afpSetDirParms = 29; {AFPCall command codes}
  3691. æC 
  3692.  
  3693. æKY afpSetFileParms
  3694. æFp AppleTalk.p
  3695. æT CONST
  3696. æD afpSetFileParms = 30; {AFPCall command codes}
  3697. æC 
  3698.  
  3699. æKY afpSetForkParms
  3700. æFp AppleTalk.p
  3701. æT CONST
  3702. æD afpSetForkParms = 31; {AFPCall command codes}
  3703. æC 
  3704.  
  3705. æKY afpSetVolParms
  3706. æFp AppleTalk.p
  3707. æT CONST
  3708. æD afpSetVolParms = 32; {AFPCall command codes}
  3709. æC 
  3710.  
  3711. æKY afpWrite
  3712. æFp AppleTalk.p
  3713. æT CONST
  3714. æD afpWrite = 33; {AFPCall command codes}
  3715. æC 
  3716.  
  3717. æKY afpGetFlDrParms
  3718. æFp AppleTalk.p
  3719. æT CONST
  3720. æD afpGetFlDrParms = 34; {AFPCall command codes}
  3721. æC 
  3722.  
  3723. æKY afpSetFlDrParms
  3724. æFp AppleTalk.p
  3725. æT CONST
  3726. æD afpSetFlDrParms = 35; {AFPCall command codes}
  3727. æC 
  3728.  
  3729. æKY afpDTOpen
  3730. æFp AppleTalk.p
  3731. æT CONST
  3732. æD afpDTOpen = 48; {AFPCall command codes}
  3733. æC 
  3734.  
  3735. æKY afpDTClose
  3736. æFp AppleTalk.p
  3737. æT CONST
  3738. æD afpDTClose = 49; {AFPCall command codes}
  3739. æC 
  3740.  
  3741. æKY afpGetIcon
  3742. æFp AppleTalk.p
  3743. æT CONST
  3744. æD afpGetIcon = 51; {AFPCall command codes}
  3745. æC 
  3746.  
  3747. æKY afpGtIcnInfo
  3748. æFp AppleTalk.p
  3749. æT CONST
  3750. æD afpGtIcnInfo = 52; {AFPCall command codes}
  3751. æC 
  3752.  
  3753. æKY afpAddAPPL
  3754. æFp AppleTalk.p
  3755. æT CONST
  3756. æD afpAddAPPL = 53; {AFPCall command codes}
  3757. æC 
  3758.  
  3759. æKY afpRmvAPPL
  3760. æFp AppleTalk.p
  3761. æT CONST
  3762. æD afpRmvAPPL = 54; {AFPCall command codes}
  3763. æC 
  3764.  
  3765. æKY afpGetAPPL
  3766. æFp AppleTalk.p
  3767. æT CONST
  3768. æD afpGetAPPL = 55; {AFPCall command codes}
  3769. æC 
  3770.  
  3771. æKY afpAddCmt
  3772. æFp AppleTalk.p
  3773. æT CONST
  3774. æD afpAddCmt = 56; {AFPCall command codes}
  3775. æC 
  3776.  
  3777. æKY afpRmvCmt
  3778. æFp AppleTalk.p
  3779. æT CONST
  3780. æD afpRmvCmt = 57; {AFPCall command codes}
  3781. æC 
  3782.  
  3783. æKY afpGetCmt
  3784. æFp AppleTalk.p
  3785. æT CONST
  3786. æD afpGetCmt = 58; {AFPCall command codes}
  3787. æC 
  3788.  
  3789. æKY afpAddIcon
  3790. æFp AppleTalk.p
  3791. æT CONST
  3792. æD afpAddIcon = 192; {Special code for ASP Write commands}
  3793. æC 
  3794.  
  3795. æKY xppLoadedBit
  3796. æFp AppleTalk.p
  3797. æT CONST
  3798. æD xppLoadedBit = 5; { XPP bit in PortBUse }
  3799. æC 
  3800.  
  3801. æKY scbMemSize
  3802. æFp AppleTalk.p
  3803. æT CONST
  3804. æD scbMemSize = 192; {Size of memory for SCB }
  3805. æC 
  3806.  
  3807. æKY xppFlagClr
  3808. æFp AppleTalk.p
  3809. æT CONST
  3810. æD xppFlagClr = 0; {Cs for AFPCommandBlock }
  3811. æC 
  3812.  
  3813. æKY xppFlagSet
  3814. æFp AppleTalk.p
  3815. æT CONST
  3816. æD xppFlagSet = 128; {StartEndFlag & NewLineFlag fields. }
  3817. æC 
  3818.  
  3819. æKY lapSize
  3820. æFp AppleTalk.p
  3821. æT CONST
  3822. æD lapSize = 20;
  3823. æC 
  3824.  
  3825. æKY ddpSize
  3826. æFp AppleTalk.p
  3827. æT CONST
  3828. æD ddpSize = 26;
  3829. æC 
  3830.  
  3831. æKY nbpSize
  3832. æFp AppleTalk.p
  3833. æT CONST
  3834. æD nbpSize = 26;
  3835. æC 
  3836.  
  3837. æKY atpSize
  3838. æFp AppleTalk.p
  3839. æT CONST
  3840. æD atpSize = 56;
  3841. æC 
  3842.  
  3843. æKY atpXOvalue
  3844. æFp AppleTalk.p
  3845. æT CONST
  3846. æD atpXOvalue = 32; {ATP exactly-once bit }
  3847. æC 
  3848.  
  3849. æKY atpEOMvalue
  3850. æFp AppleTalk.p
  3851. æT CONST
  3852. æD atpEOMvalue = 16; {ATP End-Of-Message bit }
  3853. æC 
  3854.  
  3855. æKY atpSTSvalue
  3856. æFp AppleTalk.p
  3857. æT CONST
  3858. æD atpSTSvalue = 8; {ATP Send-Transmission-Status bit }
  3859. æC 
  3860.  
  3861. æKY atpTIDValidvalue
  3862. æFp AppleTalk.p
  3863. æT CONST
  3864. æD atpTIDValidvalue = 2; {ATP trans. ID valid bit }
  3865. æC 
  3866.  
  3867. æKY atpSendChkvalue
  3868. æFp AppleTalk.p
  3869. æT CONST
  3870. æD atpSendChkvalue = 1; {ATP send checksum bit }
  3871. æC 
  3872.  
  3873. æKY zipGetLocalZones
  3874. æFp AppleTalk.p
  3875. æT CONST
  3876. æD zipGetLocalZones = 5;
  3877. æC 
  3878.  
  3879. æKY zipGetZoneList
  3880. æFp AppleTalk.p
  3881. æT CONST
  3882. æD zipGetZoneList = 6;
  3883. æC 
  3884.  
  3885. æKY zipGetMyZone
  3886. æFp AppleTalk.p
  3887. æT CONST
  3888. æD zipGetMyZone = 7;
  3889. æC 
  3890.  
  3891. æKY LAPMgrPtr
  3892. æFp AppleTalk.p
  3893. æT CONST
  3894. æD LAPMgrPtr = $B18; {Entry point for LAP Manager}
  3895. æC 
  3896.  
  3897. æKY LAPMgrCall
  3898. æFp AppleTalk.p
  3899. æT CONST
  3900. æD LAPMgrCall = 2; {Offset to LAP routines}
  3901. æC 
  3902.  
  3903. æKY LAddAEQ
  3904. æFp AppleTalk.p
  3905. æT CONST
  3906. æD LAddAEQ = 23; {LAPAddATQ routine selector}
  3907. æC 
  3908.  
  3909. æKY LRmvAEQ
  3910. æFp AppleTalk.p
  3911. æT CONST
  3912. æD LRmvAEQ = 24; {LAPRmvATQ routine selector}
  3913. æC 
  3914.  
  3915. æKY ABCallType
  3916. tLAPRead
  3917. tLAPWrite
  3918. tDDPRead
  3919. tDDPWrite
  3920. tNBPLookup
  3921. tNBPConfirm
  3922. tNBPRegister
  3923. tATPSndRequest
  3924. tATPGetRequest
  3925. tATPSdRsp
  3926. tATPAddRsp
  3927. tATPRequest
  3928. tATPResponse
  3929. æFp AppleTalk.p
  3930. æT TYPE
  3931. æD ABCallType = (tLAPRead,tLAPWrite,tDDPRead,tDDPWrite,tNBPLookup,tNBPConfirm,
  3932.     tNBPRegister,tATPSndRequest,tATPGetRequest,tATPSdRsp,tATPAddRsp,tATPRequest,
  3933.     tATPResponse);
  3934. æC 
  3935.  
  3936. æKY ABProtoType
  3937. lapProto
  3938. ddpProto
  3939. nbpProto
  3940. atpProto
  3941.  
  3942. æFp AppleTalk.p
  3943. æT TYPE
  3944. æD ABProtoType = (lapProto,ddpProto,nbpProto,atpProto);
  3945. æC 
  3946.  
  3947. æKY ABByte
  3948. æFp AppleTalk.p
  3949. æT TYPE
  3950. æD ABByte=1..127;
  3951. æC 
  3952.  
  3953. æKY LAPAdrBlock
  3954. æFp AppleTalk.p
  3955. æT RECORD
  3956. æD LAPAdrBlock = PACKED RECORD
  3957.     dstNodeID: Byte;
  3958.     srcNodeID: Byte;
  3959.     lapProtType: ABByte;
  3960.     END;
  3961. æC 
  3962.  
  3963. æKY ATQEntry
  3964. ATQEntryPtr
  3965. æFp AppleTalk.p
  3966. æT RECORD
  3967. æD ATQEntryPtr = ^ATQEntry;
  3968. ATQEntry = RECORD
  3969.     qLink: ATQEntryPtr; {next queue entry}
  3970.     qType: INTEGER; {queue type}
  3971.     CallAddr: ProcPtr; {pointer to your routine}
  3972.     END;
  3973. æC 
  3974.  
  3975. æKY AddrBlock
  3976. æFp AppleTalk.p
  3977. æT RECORD
  3978. æD AddrBlock = PACKED RECORD
  3979.     aNet: INTEGER;
  3980.     aNode: Byte;
  3981.     aSocket: Byte;
  3982.     END;
  3983. æC 
  3984.  
  3985. æKY EntityName
  3986. EntityPtr
  3987. æFp AppleTalk.p
  3988. æT RECORD
  3989. æD EntityPtr = ^EntityName;
  3990. EntityName = RECORD
  3991.     objStr: Str32;
  3992.     typeStr: Str32;
  3993.     zoneStr: Str32;
  3994.     END;
  3995. æC 
  3996. { Real definition of EntityName is 3 PACKED strings of any length (32 is just an 
  3997. example). No offsets for Asm since each String address must be calculated by adding 
  3998. length byte to last string ptr. 
  3999. In Pascal, String(32) will be 34 bytes long since fields never start on an odd byte 
  4000. unless they are only a byte long. So this will generate correct looking interfaces for 
  4001. Pascal and C, but they will not be the same, which is OK since they are not used. }
  4002.  
  4003. æKY RetransType
  4004. æFp AppleTalk.p
  4005. æT RECORD
  4006. æD RetransType = PACKED RECORD
  4007.     retransInterval: Byte;
  4008.     retransCount: Byte;
  4009.     END;
  4010. æC 
  4011.  
  4012. æKY BDSElement
  4013. æFp AppleTalk.p
  4014. æT RECORD
  4015. æD BDSElement = RECORD
  4016.     buffSize: INTEGER;
  4017.     buffPtr: Ptr;
  4018.     dataSize: INTEGER;
  4019.     userBytes: LONGINT;
  4020.     END;
  4021. æC 
  4022.  
  4023. æKY BDSType
  4024. æFp AppleTalk.p
  4025. æT TYPE
  4026. æD BDSType = ARRAY [0..7] OF BDSElement;
  4027. æC 
  4028.  
  4029. æKY BDSPtr
  4030. æFp AppleTalk.p
  4031. æT TYPE
  4032. æD BDSPtr = ^BDSType;
  4033. æC 
  4034.  
  4035. æKY BitMapType
  4036. æFp AppleTalk.p
  4037. æT TYPE
  4038. æD BitMapType = PACKED ARRAY [0..7] OF BOOLEAN;
  4039. æC 
  4040.  
  4041. æKY ABusRecord
  4042. ABRecPtr
  4043. ABRecHandle
  4044. æFp AppleTalk.p
  4045. æT RECORD
  4046. æD ABRecPtr = ^ABusRecord;
  4047. ABRecHandle = ^ABRecPtr;
  4048. ABusRecord = RECORD
  4049.     abOpcode: ABCallType;
  4050.     abResult: INTEGER;
  4051.     abUserReference: LONGINT;
  4052.     CASE ABProtoType OF
  4053.       lapProto:
  4054.         (lapAddress: LAPAdrBlock;
  4055.         lapReqCount: INTEGER;
  4056.         lapActCount: INTEGER;
  4057.         lapDataPtr: Ptr);
  4058.       ddpProto:
  4059.         (ddpType: Byte;
  4060.         ddpSocket: Byte;
  4061.         ddpAddress: AddrBlock;
  4062.         ddpReqCount: INTEGER;
  4063.         ddpActCount: INTEGER;
  4064.         ddpDataPtr: Ptr;
  4065.         ddpNodeID: Byte);
  4066.       nbpProto:
  4067.         (nbpEntityPtr: EntityPtr;
  4068.         nbpBufPtr: Ptr;
  4069.         nbpBufSize: INTEGER;
  4070.         nbpDataField: INTEGER;
  4071.         nbpAddress: AddrBlock;
  4072.         nbpRetransmitInfo: RetransType);
  4073.       atpProto:
  4074.         (atpSocket: Byte;
  4075.         atpAddress: AddrBlock;
  4076.         atpReqCount: INTEGER;
  4077.         atpDataPtr: Ptr;
  4078.         atpRspBDSPtr: BDSPtr;
  4079.         atpBitmap: BitMapType;
  4080.         atpTransID: INTEGER;
  4081.         atpActCount: INTEGER;
  4082.         atpUserData: LONGINT;
  4083.         atpXO: BOOLEAN;
  4084.         atpEOM: BOOLEAN;
  4085.         atpTimeOut: Byte;
  4086.         atpRetries: Byte;
  4087.         atpNumBufs: Byte;
  4088.         atpNumRsp: Byte;
  4089.         atpBDSSize: Byte;
  4090.         atpRspUData: LONGINT;
  4091.         atpRspBuf: Ptr;
  4092.         atpRspSize: INTEGER);
  4093.     END;
  4094. æC 
  4095. _______________________________________________________________________________
  4096.  
  4097. »CALLING THE APPLETALK MANAGER FROM PASCAL
  4098. _______________________________________________________________________________
  4099.  
  4100. This section discusses how to use the AppleTalk Manager from Pascal. Equivalent
  4101. assembly-language information is given in the “Calling the AppleTalk Manager from
  4102. Assembly Language” section.
  4103.  
  4104. You can execute many AppleTalk Manager routines either synchronously (meaning that
  4105. the application can’t continue until the routine is completed) or asynchronously
  4106. (meaning that the application is free to perform other tasks while the routine is
  4107. being executed).
  4108.  
  4109. When an application calls an AppleTalk Manager routine asynchronously, an I/O request
  4110. is placed in the appropriate driver’s I/O queue, and control returns to the calling
  4111. program—possibly even before the actual I/O is completed. Requests are taken from the
  4112. queue one at a time, and processed; meanwhile, the calling program is free to work on
  4113. other things.
  4114.  
  4115. The routines that can be executed asynchronously contain a Boolean parameter called
  4116. async. If async is TRUE, the call is executed asynchronously; otherwise the call is
  4117. executed synchronously. Every time an asynchronous routine call is completed, the
  4118. AppleTalk Manager posts a network event. The message field of the event record will
  4119. contain a handle to the parameter block that was used to make that call.
  4120.  
  4121. Most AppleTalk Manager routines return an integer result code of type OSErr. Each
  4122. routine description lists all of the applicable result codes generated by the AppleTalk
  4123. Manager, along with a short description of what the result code means. Lengthier
  4124. explanations of all the result codes can be found in the summary at the end of the
  4125. chapter. Result codes from other parts of the Operating System may also be returned.
  4126. (See Appendix A for a list of all result codes.)
  4127.  
  4128. Many Pascal calls to the AppleTalk Manager require information passed in a parameter
  4129. block of type ABusRecord. The exact content of an ABusRecord depends on the protocol
  4130. being called:
  4131.  
  4132. TYPE  ABProtoType  =  (lapProto,ddpProto,nbpProto,atpProto);
  4133.       ABusRecord   =  RECORD
  4134.                         abOpcode:        ABCallType; {type of call}
  4135.                         abResult:        INTEGER;    {result code}
  4136.                         abUserReference: LONGINT;    {for your use}
  4137.                         CASE ABProtoType OF
  4138.                           lapProto:
  4139.                             . . .     {ALAP parameters}
  4140.                           ddpProto:
  4141.                             . . .     {DDP parameters}
  4142.                           nbpProto:
  4143.                             . . .     {NBP parameters}
  4144.                           atpProto:
  4145.                             . . .     {ATP parameters}
  4146.                         END;
  4147.                       END;
  4148.  
  4149.       ABRecPtr     = ^ABusRecord;
  4150.       ABRecHandle  = ^ABRecPtr;
  4151.  
  4152. The value of the abOpcode field is inserted by the AppleTalk Manager when the call is
  4153. made, and is always a member of the following set:
  4154.  
  4155. TYPE  ABCallType = (tLAPRead,tLAPWrite,tDDPRead,tDDPWrite,tNBPLookup,
  4156.                     tNBPConfirm,tNBPRegister,tATPSndRequest,
  4157.                     tATPGetRequest,tATPSdRsp,tATPAddRsp,tATPRequest,
  4158.                     tATPRespond);
  4159.  
  4160. The abUserReference field is available for use by the calling program in any way it
  4161. wants. This field isn’t used by the AppleTalk Manager routines or drivers.
  4162.  
  4163. The size of an ABusRecord data structure in bytes is given by one of the following
  4164. constants:
  4165.  
  4166. CONST  lapSize = 20;
  4167.        ddpSize = 26;
  4168.        nbpSize = 26;
  4169.        atpSize = 56;
  4170.  
  4171. Variables of type ABusRecord must be allocated in the heap with Memory Manager NewHandle
  4172. calls. For example:
  4173.  
  4174.   myABRecord := ABRecHandle(NewHandle(ddpSize))
  4175.  
  4176. Warning:  These Memory Manager calls can’t be made inside interrupts.
  4177.  
  4178. Routines that are executed asynchronously return control to the calling program with
  4179. the result code noErr as soon as the call is placed in the driver’s I/O queue. This
  4180. isn’t an indication of successful call completion; it simply indicates that the call
  4181. was successfully queued to the appropriate driver. To determine when the call is
  4182. actually completed, you can either check for a network event or poll the abResult
  4183. field of the call’s ABusRecord. The abResult field, set to 1 when the call is made,
  4184. receives the actual result code upon completion of the call.
  4185.  
  4186. Warning:  A data structure of type ABusRecord is often used by the AppleTalk
  4187.           Manager during an asynchronous call, and so is locked by the
  4188.           AppleTalk Manager. Don’t attempt to unlock or use such a variable.
  4189.  
  4190. Each routine description includes a list of the ABusRecord fields affected by the
  4191. routine. The arrow next to each field name indicates whether it’s an input, output,
  4192. or input/output parameter:
  4193.  
  4194. Arrow    Meaning
  4195.   -->    Parameter is passed to the routine
  4196.   <--    Parameter is returned by the routine
  4197.   <->    Parameter is passed to and returned by the routine
  4198.  
  4199. æKY AFPCommandBlock
  4200. æFp AppleTalk.p
  4201. æT RECORD
  4202. æD AFPCommandBlock = PACKED RECORD
  4203.     cmdByte: Byte;
  4204.     startEndFlag: Byte;
  4205.     forkRefNum: INTEGER;
  4206.     rwOffset: LONGINT;
  4207.     reqCount: LONGINT;
  4208.     newLineFlag: Byte;
  4209.     newLineChar: CHAR;
  4210.     END;
  4211. æC 
  4212.  
  4213. æKY WDSElement
  4214. æFp AppleTalk.p
  4215. æT RECORD
  4216. æD WDSElement = RECORD
  4217.     entryLength: INTEGER;
  4218.     entryPtr: Ptr;
  4219.     END;
  4220. æC 
  4221.  
  4222. æKY NamesTableEntry
  4223. æFp AppleTalk.p
  4224. æT RECORD
  4225. æD NamesTableEntry = RECORD
  4226.     qLink: QElemPtr;
  4227.     nteAddress: AddrBlock;
  4228.     nteData: PACKED ARRAY [1..100] OF CHAR;
  4229.     END;
  4230. æC 
  4231.  
  4232. æKY MPPParmType
  4233. æFp AppleTalk.p
  4234. æT RECORD
  4235. æD MPPParmType = (LAPWriteParm,AttachPHParm,DetachPHParm,OpenSktParm,CloseSktParm,
  4236.     WriteDDPParm,OpenATPSktParm,CloseATPSktParm,SendRequestParm,GetRequestParm,
  4237.     SendResponseParm,AddResponseParm,RelTCBParm,RelRspCBParm,RegisterNameParm,
  4238.     LookupNameParm,ConfirmNameParm,RemoveNameParm,SetSelfSendParm,NSendRequestParm,
  4239.     KillSendReqParm,KillGetReqParm,KillNBPParm,GetAppleTalkInfoParm,KillAllGetReqParm,
  4240.     ATalkClosePrepParm,CancelATalkClosePrepParm);
  4241. æC 
  4242.  
  4243. æKY MPPParamBlock
  4244. MPPPBPtr
  4245. æFp AppleTalk.p
  4246. æT RECORD
  4247. æD MPPPBPtr = ^MPPParamBlock;
  4248. MPPParamBlock = PACKED RECORD
  4249.     qLink: QElemPtr; {next queue entry}
  4250.     qType: INTEGER; {queue type}
  4251.     ioTrap: INTEGER; {routine trap}
  4252.     ioCmdAddr: Ptr; {routine address}
  4253.     ioCompletion: ProcPtr; {completion routine}
  4254.     ioResult: OSErr; {result code}
  4255.     ioNamePtr: StringPtr; {->filename}
  4256.     ioVRefNum: INTEGER; {volume reference or drive number}
  4257.     ioRefNum: INTEGER; {driver reference number}
  4258.     csCode: INTEGER; {call command code AUTOMATICALLY set}
  4259.     CASE MPPParmType OF
  4260.       LAPWriteParm:
  4261.         (filler0: INTEGER;
  4262.         wdsPointer: Ptr); {->Write Data Structure}
  4263.       AttachPHParm,DetachPHParm:
  4264.         (protType: Byte; {ALAP Protocol Type}
  4265.         filler1: Byte;
  4266.         handler: Ptr); {->protocol handler routine}
  4267.       OpenSktParm,CloseSktParm,WriteDDPParm:
  4268.         (socket: Byte; {socket number}
  4269.         checksumFlag: Byte; {checksum flag}
  4270.         listener: Ptr); {->socket listener routine}
  4271.       RegisterNameParm,LookupNameParm,ConfirmNameParm,RemoveNameParm:
  4272.         (interval: Byte; {retry interval}
  4273.         count: Byte; {retry count}
  4274.         entityPtr: Ptr; {->names table element or ->entity name}
  4275.         CASE MPPParmType OF
  4276.           RegisterNameParm:
  4277.             (verifyFlag: Byte; {set if verify needed}
  4278.             filler3: Byte);
  4279.           LookupNameParm:
  4280.             (retBuffPtr: Ptr; {->return buffer}
  4281.             retBuffSize: INTEGER; {return buffer size}
  4282.             maxToGet: INTEGER; {matches to get}
  4283.             numGotten: INTEGER); {matched gotten}
  4284.           ConfirmNameParm:
  4285.             (confirmAddr: AddrBlock; {->entity}
  4286.             newSocket: Byte; {socket number}
  4287.             filler4: Byte));
  4288.       SetSelfSendParm:
  4289.         (newSelfFlag: Byte; {self-send toggle flag}
  4290.         oldSelfFlag: Byte); {previous self-send state}
  4291.       KillNBPParm:
  4292.         (nKillQEl: Ptr); {ptr to Q element to cancel}
  4293.       GetAppleTalkInfoParm:
  4294.         (version: INTEGER; {requested info version}
  4295.         varsPtr: Ptr; {pointer to well known MPP vars}
  4296.         DCEPtr: Ptr; {pointer to MPP DCE}
  4297.         portID: INTEGER; {port number [0..7]}
  4298.         configuration: LONGINT; {32-bit configuration word}
  4299.         selfSend: INTEGER; {non zero if SelfSend enabled}
  4300.         netLo: INTEGER; {low value of network range}
  4301.         netHi: INTEGER; {high value of network range}
  4302.         ourAddr: LONGINT; {our 24-bit AppleTalk address}
  4303.         routerAddr: LONGINT; {24-bit address of (last) router}
  4304.         numOfPHs: INTEGER; {max. number of protocol handlers}
  4305.         numOfSkts: INTEGER; {max. number of static sockets}
  4306.         numNBPEs: INTEGER; {max. concurrent NBP requests}
  4307.         nTQueue: Ptr; {pointer to registered name queue}
  4308.         LAlength: INTEGER; {length in bytes of data link addr}
  4309.         linkAddr: Ptr; {data link address returned}
  4310.         zoneName: Ptr); {zone name returned}
  4311.       ATalkClosePrepParm:
  4312.         (appName: Ptr); {pointer to application name in buffer}
  4313.     END;
  4314. æC 
  4315.  
  4316. æKY ATPParamBlock
  4317. ATPPBPtr
  4318. æFp AppleTalk.p
  4319. æT RECORD
  4320. æD ATPPBPtr = ^ATPParamBlock;
  4321. ATPParamBlock = PACKED RECORD
  4322.     qLink: QElemPtr;                                    {next queue entry}
  4323.     qType: INTEGER;                                     {queue type}
  4324.     ioTrap: INTEGER;                                    {routine trap}
  4325.     ioCmdAddr: Ptr;                                     {routine address}
  4326.     ioCompletion: ProcPtr;                                {completion routine}
  4327.     ioResult: OSErr;                                    {result code}
  4328.     userData: LONGINT;                                    {ATP user bytes}
  4329.     reqTID: INTEGER;                                    {request transaction ID}
  4330.     ioRefNum: INTEGER;                                    {driver reference number}
  4331.     csCode: INTEGER;                                    {Call command code automatically set}
  4332.     atpSocket: Byte;                                    {currBitMap or socket number}
  4333.     CASE MPPParmType OF 
  4334.         SendRequestParm, SendResponseParm, GetRequestParm, AddResponseParm, KillSendReqParm:
  4335.         (atpFlags: Byte;                                     {control information}
  4336.         addrBlock: AddrBlock;                                {source/dest. socket address}
  4337.         reqLength: INTEGER;                                 {request/response length}
  4338.         reqPointer: Ptr;                                    {-> request/response data}
  4339.         bdsPointer: Ptr;                                    {-> response BDS}
  4340.         CASE MPPParmType OF
  4341.           SendRequestParm:
  4342.             (numOfBuffs: Byte;                                {number of responses expected}
  4343.             timeOutVal: Byte;                                {timeout interval}
  4344.             numOfResps: Byte;                                {number of responses actually received}
  4345.             retryCount: Byte;                                {number of retries}
  4346.             intBuff: INTEGER;                                {used internally for NSendRequest}
  4347.             TRelTime: Byte);                                {TRelease time for extended send request}
  4348.           SendResponseParm:
  4349.             (filler0: Byte;                                 {numOfBuffs}
  4350.             bdsSize: Byte;                                    {number of BDS elements}
  4351.             transID: INTEGER);                                {transaction ID}
  4352.           GetRequestParm:
  4353.             (bitMap: Byte;                                    {bit map}
  4354.             filler1: Byte);
  4355.           AddResponseParm:
  4356.             (rspNum: Byte;                                    {sequence number}
  4357.             filler2: Byte);
  4358.           KillSendReqParm:
  4359.             (aKillQEl: Ptr));                                {ptr to Q element to cancel}
  4360.     END;
  4361. æC 
  4362.  
  4363. æKY XPPPrmBlkType
  4364. æFp AppleTalk.p
  4365. æT RECORD
  4366. æD XPPPrmBlkType = (XPPPrmBlk,ASPSizeBlk,ASPAbortPrm,XCallParam);
  4367. æC 
  4368.  
  4369. æKY XPPSubPrmType
  4370. æFp AppleTalk.p
  4371. æT RECORD
  4372. æD XPPSubPrmType = (ASPOpenPrm,ASPSubPrm);
  4373. æC 
  4374.  
  4375. æKY XPPEndPrmType
  4376. æFp AppleTalk.p
  4377. æT RECORD
  4378. æD XPPEndPrmType = (AFPLoginPrm,ASPEndPrm);
  4379. æC 
  4380.  
  4381. æKY XPPParamBlock
  4382. XPPParmBlkPtr
  4383. æFp AppleTalk.p
  4384. æT RECORD
  4385. æD XPPParmBlkPtr = ^XPPParamBlock;
  4386. XPPParamBlock = PACKED RECORD
  4387.     qLink: QElemPtr; {next queue entry}
  4388.     qType: INTEGER; {queue type}
  4389.     ioTrap: INTEGER; {routine trap}
  4390.     ioCmdAddr: Ptr; {routine address}
  4391.     ioCompletion: ProcPtr; {completion routine}
  4392.     ioResult: OSErr; {result code}
  4393.     cmdResult: LONGINT; {command result (ATP user bytes)}
  4394.     ioVRefNum: INTEGER; {volume reference or drive number}
  4395.     ioRefNum: INTEGER; {driver reference number}
  4396.     csCode: INTEGER; {call command code}
  4397.     CASE XPPPrmBlkType OF
  4398.       ASPAbortPrm:
  4399.         (abortSCBPtr: Ptr); {SCB pointer for AbortOS}
  4400.       ASPSizeBlk:
  4401.         (aspMaxCmdSize: INTEGER; {for SPGetParms}
  4402.         aspQuantumSize: INTEGER; {for SPGetParms}
  4403.         numSesss: INTEGER); {for SPGetParms}
  4404.       XPPPrmBlk:
  4405.         (sessRefnum: INTEGER; {offset to session refnum}
  4406.         aspTimeout: Byte; {timeout for ATP}
  4407.         aspRetry: Byte; {retry count for ATP}
  4408.         CASE XPPSubPrmType OF
  4409.           ASPOpenPrm:
  4410.             (serverAddr: AddrBlock; {server address block}
  4411.             scbPointer: Ptr; {SCB pointer}
  4412.             attnRoutine: Ptr); {attention routine pointer}
  4413.           ASPSubPrm:
  4414.             (cbSize: INTEGER; {command block size}
  4415.             cbPtr: Ptr; {command block pointer}
  4416.             rbSize: INTEGER; {reply buffer size}
  4417.             rbPtr: Ptr; {reply buffer pointer}
  4418.             CASE XPPEndPrmType OF
  4419.               AFPLoginPrm:
  4420.                 (afpAddrBlock: AddrBlock; {address block in AFP login}
  4421.                 afpSCBPtr: Ptr; {SCB pointer in AFP login}
  4422.                 afpAttnRoutine: Ptr); {Attn routine pointer in AFP login}
  4423.               ASPEndPrm:
  4424.                 (wdSize: INTEGER; {write data size}
  4425.                 wdPtr: Ptr; {write data pointer}
  4426.                 ccbStart: ARRAY [0..295] OF Byte))); {afpWrite max size = 296, else 150}
  4427.       XCallParam:
  4428.         (xppSubCode: INTEGER;
  4429.         xppTimeout: Byte; {retry interval (seconds)}
  4430.         xppRetry: Byte; {retry count}
  4431.         filler1: INTEGER; {word space for rent.  see the super.}
  4432.         zipBuffPtr: Ptr; {pointer to buffer (must be 578 bytes)}
  4433.         zipNumZones: INTEGER; {no. of zone names in this response}
  4434.         zipLastFlag: Byte; {non-zero if no more zones}
  4435.         filler2: Byte; {filler}
  4436.         zipInfoField: PACKED ARRAY [1..70] OF Byte); {on initial call, set first word to zero}
  4437.     END;
  4438. æC 
  4439.  
  4440. æKY OpenXPP
  4441. æFp AppleTalk.p
  4442. æT FUNCTION
  4443. æD FUNCTION OpenXPP(VAR xppRefnum: INTEGER): OSErr;
  4444. æDT myVariable := OpenXPP(xppRefnum);
  4445. æRI æRI 
  4446. æC 
  4447. »Opening the .XPP Driver
  4448.  
  4449. To open the .XPP driver, issue a Device Manager Open call.  (Refer to the Device
  4450. Manager chapter.)  The name of the .XPP driver is '.XPP'.  The original Macintosh
  4451. ROMs require that .XPP be opened only once. With new ROMs, the .XPP unit number can
  4452. always be obtained through an Open call.  With old ROMs only, the .XPP unit number
  4453. must be hard coded to XPPUnitNum (40) since only one Open call can be issued to the
  4454. driver.
  4455.  
  4456. The .XPP driver cannot be opened unless AppleTalk is open.  The application must
  4457. ensure that the .MPP and .ATP drivers are opened, as described earlier in this chapter.
  4458.  
  4459. The xppLoaded bit (bit 5) in the PortBUse byte in low memory indicates whether or not
  4460. the .XPP driver is open.
  4461.  
  4462. »Example
  4463.  
  4464. The following is an example of the procedure an application might use to open the
  4465. .XPP driver.
  4466.  
  4467. ;    Routine: OpenXPP
  4468. ;
  4469. ;        Open the .XPP driver and return the driver refNum for it.
  4470. ;
  4471. ;        Exit:    D0 = error code (ccr's set)
  4472. ;                 D1 = XPP driver refNum (if no errors)
  4473. ;
  4474. ;        All other registers preserved
  4475. ;
  4476. xppUnitNum    EQU    40                 ;default XPP driver number
  4477. xppTfRNum     EQU    -(xppUnitNum+1)    ;default XPP driver refNum
  4478.  
  4479. OpenXPP
  4480.     MOVE.L    A0-A1/D2,-(SP)            ;save registers
  4481.     MOVE      ROM85,D0                  ;check ROM type byte
  4482.     BPL.S     @10                       ;branch if >=128K ROMs
  4483.     BTST      #xppLoadedBit,PortBUse    ;is the XPP driver open already?
  4484.     BEQ.S     @10                       ;if not open, then branch to Open code
  4485.     MOVE      #xppTfRNum,D1             ;else use this as driver refnum
  4486.     MOVEQ     #0,D0                     ;set noErr
  4487.     BRA.S     @90                       ;and exit
  4488. ;
  4489. ; XPP driver not open. Make an _Open call to it. If using a 128K
  4490. ; ROM machine and the driver is already open, we will make another
  4491. ; Open call to it just so we get the correct driver refNum.
  4492. ;
  4493. @10 SUB       #ioQElSize,SP             ;allocate temporary param block
  4494.     MOVE.L    SP,A0                     ;A0 -> param block
  4495.     LEA       XPPName, A1               ;A1 -> XPP (ASP/AFP) driver name
  4496.     MOVE.L    A1,ioFileName(A0)         ;driver name into param block
  4497.     CLR.B     ioPermssn(A0)             ;clear permissions byte
  4498.     _Open
  4499.     MOVE      ioRefNum(A0),D1           ;D1=driver refNum (invalid if error)
  4500.     ADD       #ioQElSize,SP             ;deallocate temp param block
  4501. @90 MOVE.L    (SP)+,A0-A1/D2            ;restore registers
  4502.     TST       D0                        ;error? (set ccr's)
  4503.     RTS
  4504.     
  4505. XPPName  DC.B  4                        ;length of string
  4506.          DC.B  '.XPP'                   ;driver name
  4507.  
  4508. From Pascal, XPP can be opened through the OpenXPP call, which returns the driver’s
  4509. reference number:
  4510.  
  4511. FUNCTION OpenXPP (VAR xppRefnum: INTEGER) : OSErr;
  4512.  
  4513. »Open Errors
  4514.  
  4515. Errors returned when calling the Device Manager Open routine if the function does not
  4516. execute properly include the following:
  4517.  
  4518.   •  errors returned by System
  4519.   •  portInUse is returned if the AppleTalk port is in use by a driver
  4520.      other than AppleTalk or if AppleTalk is not open.
  4521.  
  4522. »Closing the .XPP Driver
  4523.  
  4524. To close the .XPP driver, call the Device Manager Close routine.
  4525.  
  4526. Warning:  There is generally no reason to close the driver.  Use this
  4527.           call sparingly, if at all.  This call should generally be used
  4528.           only by system-level applications.
  4529.  
  4530. »Close Errors
  4531.  
  4532. Errors returned when calling the Device Manager Close routine if the function does
  4533. not execute properly include the following:
  4534.  
  4535.   •  errors returned by System
  4536.   •  closeErr (new ROMs only) is returned if you try to close the driver
  4537.      and there are sessions active through that driver.  When sessions are
  4538.      active, closeErr is returned and the driver remains open.
  4539.   •  on old ROMs the driver is closed whether or not sessions are active
  4540.      and no error is returned. Results are unpredictable if sessions are
  4541.      still active.
  4542.  
  4543. »Session Control Block
  4544.  
  4545. The session control block (SCB) is a nonrelocatable block of data passed by the
  4546. caller to XPP upon session opening. XPP reserves this block for use in maintaining an
  4547. open session.   The SCB size is defined by the constant scbMemSize.  The SCB is a
  4548. locked block, and as long as the session is open, the SCB cannot be modified in any
  4549. way by the application.  There is one SCB for each open session. This block can be
  4550. reused once a CloseSess call is issued and completed for that session or when the
  4551. session is indicated as closed.
  4552.     
  4553.  
  4554. æKY ASPOpenSession
  4555. æFp AppleTalk.p
  4556. æT FUNCTION
  4557. æD FUNCTION ASPOpenSession(thePBptr: XPPParmBlkPtr;async: BOOLEAN): OSErr;
  4558. æDT myVariable := ASPOpenSession(thePBptr,async);
  4559. æRI V-536
  4560. æC 
  4561. »AppleTalk Session Protocol Functions
  4562.  
  4563. This section contains descriptions of the .XPP driver functions that you can call. 
  4564. Each function description shows the required parameter block fields, their offsets
  4565. within the parameter block and a brief definition of the field.  Possible result
  4566. codes are also described.
  4567.  
  4568. »Note on Result Codes
  4569.  
  4570. An important distinction exists between the aspParamErr and aspSessClose  result
  4571. codes that may be returned by the .XPP driver.
  4572.  
  4573. When the driver returns aspParamErr to a call that takes as an input a session reference
  4574. number, the session reference number does not relate to a valid open session.  There
  4575. could be several reasons for this, such as the workstation or server end closed the
  4576. session or the server end of the session died.
  4577.  
  4578. The aspSessClosed result code indicates that even though the session reference number
  4579. relates to a valid session, that particular session is in the process of closing down
  4580. (although  the session is not yet closed).
  4581.  
  4582. FUNCTION ASPOpenSession (xParamBlock: XPPParmBlkPtr; async: BOOLEAN) : OSErr;
  4583.  
  4584. Parameter block
  4585.   -->    26    csCode       word       Always ASPOpenSess
  4586.   -->    28    sessRefnum   word       Session reference number
  4587.   -->    30    aspTimeout   byte       Retry interval in seconds
  4588.   -->    31    aspRetry     byte       Number of retries
  4589.   -->    32    serverAddr   long word  Server socket address
  4590.   -->    36    scbPointer   pointer    Pointer to session control block
  4591.   -->    40    attnRoutine  pointer    Pointer to attention routine
  4592.  
  4593. ASPOpenSession initiates (opens) a session between the workstation and a server.  The
  4594. required parameter block is shown above.  A brief definition of the fields follows.
  4595.  
  4596. SessRefnum is a unique number identifying the open session between the workstation
  4597. and the server.  The SessRefnum is returned when the function completes successfully
  4598. and is used in all calls to identify the session.
  4599.  
  4600. ASPTimeOut is the interval in seconds between retries of the open session request.
  4601.  
  4602. ASPRetry is the number of retries that will be attempted.
  4603.  
  4604. ServerAddr is the network identifier or address of the socket on which the server is
  4605. listening.
  4606.  
  4607. SCBPointer points to a nonrelocatable block of data for the session control block
  4608. (SCB) that the .XPP driver reserves for use in maintaining an open session.   The SCB
  4609. size is defined by the constant scbMemSize.  The SCB is a locked block and as long as
  4610. the session is open, the SCB cannot be modified in any way by the application.  There
  4611. is one SCB for each open session.  This block can be reused when a CloseSess call is
  4612. issued and completed for that session, or when the session is indicated as closed
  4613. through return of aspParamErr as the result of a call for that session.
  4614.  
  4615. AttnRoutine is a pointer to a routine that is invoked if an attention from the server
  4616. is received, or upon session closing.  If this pointer is equal to zero, no attention
  4617. routine will be invoked.
  4618.  
  4619. Result codes    aspNoMoreSess    Driver cannot support another session
  4620.                 aspParamErr      Server returned bad (positive) error code    
  4621.                 aspNoServers     No servers at that address, or the server
  4622.                                  did not respond to the request
  4623.                 reqAborted       OpenSess was aborted by an AbortOS
  4624.                 aspBadVersNum    Server cannot support the offered 
  4625.                                  version number
  4626.                 aspServerBusy    Server cannot open another session
  4627.  
  4628. Note: The number of sessions that the driver is capable of supporting
  4629.       depends on the machine that the driver is running on. 
  4630.  
  4631. æKY ASPCloseSession
  4632. æFp AppleTalk.p
  4633. æT FUNCTION
  4634. æD FUNCTION ASPCloseSession(thePBptr: XPPParmBlkPtr;async: BOOLEAN): OSErr;
  4635. æDT myVariable := ASPCloseSession(thePBptr,async);
  4636. æRI V-537
  4637. æC  
  4638. Parameter block
  4639.   -->    26    csCode      word  Always ASPCloseSession
  4640.   -->    28    sessRefnum  word  Session reference number
  4641.  
  4642. ASPCloseSession closes the session identified by the sessRefnum returned in the
  4643. ASPOpenSession call.  ASPCloseSession aborts any calls that are active on the session,
  4644. closes the session, and calls the attention routine, if any, with an attention code
  4645. of zero (zero is invalid as a real attention code).
  4646.  
  4647. Result codes    aspParamErr      Parameter error, indicates an invalid
  4648.                                  session reference number
  4649.                 aspSessClosed    Session already in process of closing
  4650.  
  4651. æKY ASPAbortOS
  4652. æFp AppleTalk.p
  4653. æT FUNCTION
  4654. æD FUNCTION ASPAbortOS(thePBptr: XPPParmBlkPtr;async: BOOLEAN): OSErr;
  4655. æDT myVariable := ASPAbortOS(thePBptr,async);
  4656. æRI V-537
  4657. æC  
  4658. Parameter block
  4659.   -->    26    csCode            word     Always ASPAbortOS
  4660.   -->    28    abortSCBPointer   pointer  Pointer to session control block
  4661.  
  4662. ASPAbortOS aborts a pending (not yet completed) ASPOpenSession call.  The aborted
  4663. ASPOpenSession call will return a reqAborted error.
  4664.  
  4665. AbortSCBPointer points to the original SCB used in the the pending ASPOpenSession
  4666. call.
  4667.  
  4668. Result codes    cbNotFound    SCB not found, no outstanding open session
  4669.                               to be aborted.
  4670.                               Pointer did not point to an open session SCB.
  4671.  
  4672. æKY ASPGetParms
  4673. æFp AppleTalk.p
  4674. æT FUNCTION
  4675. æD FUNCTION ASPGetParms(thePBptr: XPPParmBlkPtr;async: BOOLEAN): OSErr;
  4676. æDT myVariable := ASPGetParms(thePBptr,async);
  4677. æRI V-538
  4678. æC  
  4679. Parameter block
  4680.   -->    26    csCode          word  Always ASPGetParms
  4681.   -->    28    aspMaxCmdSize   word  Maximum size of command block
  4682.   -->    30    aspQuantumSize  word  Maximum data size
  4683.   -->    32    numSesss        word  Number of sessions
  4684.  
  4685. ASPGetParms returns three ASP parameters.  This call does not require an open session.
  4686.  
  4687. ASPMaxCmdSize is the maximum size of a command that can be sent to the server.
  4688.  
  4689. ASPQuantumSize is the maximum size of data that can be transferred to the server in a
  4690. Write request or from the server in a command reply.
  4691.  
  4692. NumSess is the number of concurrent sessions supported by the driver.
  4693.  
  4694. æKY ASPCloseAll
  4695. æFp AppleTalk.p
  4696. æT FUNCTION
  4697. æD FUNCTION ASPCloseAll(thePBptr: XPPParmBlkPtr;async: BOOLEAN): OSErr;
  4698. æDT myVariable := ASPCloseAll(thePBptr,async);
  4699. æRI V-538
  4700. æC  
  4701. Parameter block
  4702.   -->    26    csCode  word  Always ASPCloseAll
  4703.  
  4704. ASPCloseAll closes every session that the driver has active, aborting all active
  4705. requests and invoking the attention routines where provided.  This call should be
  4706. used carefully.  ASPCloseAll can be used as a system level resource for making sure
  4707. all sessions are closed prior to closing the driver.
  4708.  
  4709. æKY ASPUserWrite
  4710. æFp AppleTalk.p
  4711. æT FUNCTION
  4712. æD FUNCTION ASPUserWrite(thePBptr: XPPParmBlkPtr;async: BOOLEAN): OSErr;
  4713. æDT myVariable := ASPUserWrite(thePBptr,async);
  4714. æRI V-538
  4715. æC  
  4716. Parameter block
  4717.   -->    18    cmdResult   long word  ASP command result
  4718.   -->    26    csCode      word       Always UserWrite
  4719.   -->    28    sessRefnum  word       Session reference number
  4720.   -->    30    aspTimeout  byte       Retry interval in seconds
  4721.   -->    32    cbSize      word       Command block size
  4722.   -->    34    cbPtr       pointer    Command block pointer
  4723.   <->    38    rbSize      word       Reply buffer size and reply size
  4724.   -->    40    rbPtr       pointer    Reply buffer pointer
  4725.   <->    44    wdSize      word       Write data size
  4726.   -->    46    wdPtr       pointer    Write data pointer
  4727.   -->    50    ccbStart    record     Start of memory for CCB
  4728.  
  4729. ASPUserWrite transfers data on a session.  ASPUserWrite is one of the two main calls
  4730. that can be used to transfer data on an ASP session.  The other call that performs a
  4731. similar data transfer  is ASPUserCommand described below.  The ASPUserWrite command
  4732. returns data in two different places.  Four bytes of data are returned in the cmdResult
  4733. field and a variable size reply buffer is also returned.
  4734.  
  4735. CmdResult is four bytes of data returned by the server.
  4736.  
  4737. SessRefnum is the session reference number returned in the ASPOpenSession call.
  4738.  
  4739. ASPTimeOut is the interval in seconds between retries of the call.  Notice that there
  4740. is no aspRetry field (retries are infinite).  The command will be retried at the
  4741. prescribed interval until completion or the session is closed.
  4742.  
  4743. CBSize is the size in bytes of the command data that is to be written on the session.
  4744.  The size of the command block must not exceed the value of aspMaxCmdSize returned by
  4745. the ASPGetParms call. Note that this buffer is not the data to be written by the
  4746. command but only the data of the command itself.
  4747.  
  4748. CBPtr points to the command data.
  4749.  
  4750. RBSize is passed and indicates the size of the reply buffer in bytes expected by the
  4751. command.  RBSize is also returned and indicates the size of the reply that was actually
  4752. returned.
  4753.  
  4754. RBPtr points to the reply buffer.
  4755.  
  4756. WDSize is passed and indicates the size of the write data in bytes to be sent by the
  4757. command.  WDSize is also returned and indicates the size of the write data that was
  4758. actually written.
  4759.  
  4760. WDPointer points to the write data buffer.
  4761.  
  4762. CCBStart is the start of the memory to be used by the .XPP driver for the command
  4763. control block.  The size of this block is equal to a maximum of 296 bytes.  To determine
  4764. the exact requirement, refer to the CCB Sizes section of this document.
  4765.  
  4766. Result codes     aspParamErr       Invalid session number, session has
  4767.                                    been closed
  4768.                  aspSizeErr        Command block size is bigger than MaxCmdSize
  4769.                  aspSessClosed     Session is closing
  4770.                  aspBufTooSmall    Reply is bigger than response buffer;
  4771.                                    the buffer will be filled, data will
  4772.                                    be truncated
  4773.  
  4774. æKY ASPUserCommand
  4775. æFp AppleTalk.p
  4776. æT FUNCTION
  4777. æD FUNCTION ASPUserCommand(thePBptr: XPPParmBlkPtr;async: BOOLEAN): OSErr;
  4778. æDT myVariable := ASPUserCommand(thePBptr,async);
  4779. æRI V-539
  4780. æC  
  4781. Parameter block
  4782.   -->    18    cmdResult   long word  ASP command result
  4783.   -->    26    csCode      word       Always ASPUserCommand
  4784.   -->    28    sessRefnum  word       Session number
  4785.   -->    30    aspTimeout  byte       Retry interval in seconds
  4786.   -->    32    cbSize      word       Command block size
  4787.   -->    34    cbPtr       pointer    Command block pointer
  4788.   <->    38    rbSize      word       Reply buffer and reply size
  4789.   -->    40    rbPtr       pointer    Reply buffer pointer
  4790.   -->    50    ccbStart    record     Start of memory for CCB
  4791.  
  4792. ASPUserCommand is used to send a command to the server on a session.
  4793.  
  4794. SessRefnum is the session reference number returned in the ASPOpenSession call.
  4795.  
  4796. ASPTimeOut is the interval in seconds between retries of the call.  Notice that there
  4797. is no aspRetry field (retries are infinite).  The command will be retried at the
  4798. prescribed interval until completion or the session is closed.
  4799.  
  4800. CBSize is the size in bytes of the block of data that contains the command to be sent
  4801. to the server on the session.  The size of the command block must not exceed the
  4802. value of aspMaxCmdSize returned by the ASPGetParms call.
  4803.  
  4804. CBPointer points to the block of data containing the command that is to be sent to
  4805. the server on the session.
  4806.  
  4807. RBSize is passed and indicates the size of the reply buffer in bytes expected by the
  4808. command.  RBSize is also returned and indicates the size of the reply that was actually
  4809. returned.
  4810.  
  4811. RBPtr points to the reply buffer.
  4812.  
  4813. CCBStart is the start of the memory to be used by the .XPP driver for the command
  4814. control block.  The size of this block is equal to a maximum of 150 bytes.  To determine
  4815. the exact requirement refer to the CCB Sizes section of this document.
  4816.  
  4817. Result codes     aspParamErr       Invalid session number, session has
  4818.                                    been closed
  4819.                  aspSizeErr        Command block size is bigger than MaxCmdSize
  4820.                  aspSessClosed     Session is closing
  4821.                  aspBufTooSmall    Reply is bigger than response buffer;
  4822.                                    the buffer will be filled, data will
  4823.                                    be truncated
  4824.  
  4825. æKY ASPGetStatus
  4826. æFp AppleTalk.p
  4827. æT FUNCTION
  4828. æD FUNCTION ASPGetStatus(thePBptr: XPPParmBlkPtr;async: BOOLEAN): OSErr;
  4829. æDT myVariable := ASPGetStatus(thePBptr,async);
  4830. æRI V-540
  4831. æC  
  4832. Parameter block
  4833.   -->    26    csCode      word       Always ASPGetStatus
  4834.   -->    30    aspTimeout  byte       Retry interval in seconds
  4835.   -->    31    aspRetry    byte       Number of retries
  4836.   -->    32    serverAddr  long word  Server socket address
  4837.   <->    38    rbSize      word       Reply buffer and reply size
  4838.   -->    40    rbPtr       pointer    Reply buffer pointer
  4839.   -->    50    ccbStart    record     Start of memory for CCB
  4840.  
  4841. ASPGetStatus returns server status.  This call is also used as GetServerInfo at the
  4842. AFP level. This call is unique in that it transfers data over the network without
  4843. having a session open.  This call does not pass any data but requests that server
  4844. status be returned.
  4845.  
  4846. ASPTimeOut is the interval in seconds between retries of the call.
  4847.  
  4848. ASPRetry is the number of retries that will be attempted.
  4849.  
  4850. ServerAddr is the network identifier or address of the socket on which the server is
  4851. listening.
  4852.  
  4853. RBSize is passed and indicates the size of the reply buffer in bytes expected by the
  4854. command. RBSize is also returned and indicates the size of the reply that was actually
  4855. returned.
  4856.  
  4857. RBPtr points to the reply buffer.
  4858.  
  4859. CCBStart is the start of the memory to be used by the .XPP driver for the command
  4860. control block.  The size of this block is equal to a maximum of 150 bytes.  To determine
  4861. the exact requirement refer to the CCB Sizes section of this document.
  4862.  
  4863. Result codes    aspBufTooSmall    Reply is bigger than response buffer,
  4864.                                   or Replysize is bigger than ReplyBuffsize
  4865.                 aspNoServer       No response from server at address used
  4866.                                   in call
  4867.  
  4868. æKY AFPCommand
  4869. æFp AppleTalk.p
  4870. æT FUNCTION
  4871. æD FUNCTION AFPCommand(thePBptr: XPPParmBlkPtr;async: BOOLEAN): OSErr;
  4872. æDT myVariable := AFPCommand(thePBptr,async);
  4873. æRI V-542
  4874. æC 
  4875. »AFPCall Function
  4876.  
  4877. The AFPCall function can have one of the following command formats.
  4878.  
  4879.   •  General
  4880.   •  Login
  4881.   •  AFPWrite
  4882.   •  AFPRead
  4883.  
  4884. »General Command Format
  4885.  
  4886. FUNCTION AFPCommand (xParamBlock: XPPParmBlkPtr; async: BOOLEAN) : OSErr;
  4887.  
  4888. Parameter block
  4889.   -->    18    cmdResult   long word  AFP command result
  4890.   -->    26    csCode      word       Always AFPCall
  4891.   -->    28    sessRefnum  word       Session reference number
  4892.   -->    30    aspTimeout  byte       Retry interval in seconds
  4893.   -->    32    cbSize      word       Command buffer size
  4894.   -->    34    cbPtr       pointer    Command buffer
  4895.   <->    38    rbSize      word       Reply buffer size and reply size
  4896.   -->    40    rbPtr       pointer    Reply buffer pointer
  4897.   <->    44    wdSize      word       Write data size
  4898.   -->    46    wdPtr       pointer    Write data pointer
  4899.   -->    50    ccbStart    record     Start of memory for CCB
  4900.  
  4901. The general command format for the AFPCall function passes an AFP command to the
  4902. server.  This format is used for all AFP calls except AFPLogin, AFPRead, and AFPWrite.
  4903.   Note that from Pascal this call is referred to as AFPCommand.
  4904.  
  4905. CmdResult is four bytes of data returned from the server containing an indication of
  4906. the result of the AFP command.
  4907.  
  4908. SessRefnum is the session reference number returned in the AFPLogin call.
  4909.  
  4910. ASPTimeOut is the interval in seconds between retries of the call by the driver.
  4911.  
  4912. CBSize is the size in bytes of the block of data that contains the command to be sent
  4913. to the server on the session. The size of the command block must not exceed the value
  4914. of aspMaxCmdSize returned by the ASPGetParms call.
  4915.  
  4916. CBPtr points to start of the block of data (command block) containing the command
  4917. that is to be sent to the server on the session.  The first byte of the command block
  4918. must contain the AFP command byte.  Subsequent bytes in the command buffer contain
  4919. the  parameters associated with the command as defined in the AFP document.
  4920.  
  4921. RBSize is passed and indicates the size of the reply buffer in bytes expected by the
  4922. command. RBSize is also returned and indicates the size of the reply that was actually
  4923. returned.
  4924.  
  4925. RBPtr points to the reply buffer.
  4926.  
  4927. WDSize is the size of data to be written to the server (only used if the command is
  4928. one that is mapped to an ASPUserWrite).
  4929.  
  4930. WDPtr points to the write data buffer (only used if the command is one that is mapped
  4931. to an ASPUserWrite).
  4932.  
  4933. CCBStart is the start of the memory to be used by the .XPP driver for the command
  4934. control block.  The size of this block is equal to a maximum of 296 bytes.  To determine
  4935. the exact requirement refer to the CCB Sizes section of this document.
  4936.  
  4937. Result codes    aspParamErr       Invalid session number; session has
  4938.                                   been closed
  4939.                 aspSizeErr        Command block size is bigger than MaxCmdSize
  4940.                 aspSessClosed     Session is closing
  4941.                 aspBufTooSmall    Reply is bigger than response buffer or
  4942.                                   buffer will be filled, data will be truncated
  4943.                 afpParmError      AFP command block size is equal to zero.
  4944.                                   This error will also be returned if the
  4945.                                   command byte in the command block is equal
  4946.                                   to 0 or $FF (255) or GetSrvrStatus (15).
  4947.  
  4948. »Login Command Format
  4949.  
  4950. The AFP login command executes a series of AFP operations as defined in the AFP Draft
  4951. Proposal.  For further information, refer to the AFP document.
  4952.  
  4953. FUNCTION AFPCommand (xParamBlock: XPPParmBlkPtr; async: BOOLEAN): OSErr;
  4954.  
  4955. Parameter block
  4956.   -->    18    cmdResult       long word  AFP command result
  4957.   -->    26    csCode          word       Always AFPCall
  4958.   -->    28    sessRefnum      word       Session reference number
  4959.   -->    30    aspTimeout      byte       Retry interval in seconds
  4960.   -->    31    aspRetry        byte       Number of retries
  4961.   -->    32    cbSize          word       Command buffer size
  4962.   -->    34    cbPtr           pointer    Command buffer
  4963.   <->    38    rbSize          word       Reply buffer size and reply size
  4964.   -->    40    rbPtr           pointer    Reply buffer pointer
  4965.   -->    44    afpAddrBlock    long word  Server address block
  4966.   <->    48    afpSCBPtr       pointer    SCB pointer
  4967.   <->    52    afpAttnRoutine  pointer    Attention routine pointer
  4968.   -->    50    ccbStart        record     Start of command control block
  4969.  
  4970. CmdResult is four bytes of data returned from the server containing an indication of
  4971. the result of the AFP command.
  4972.  
  4973. SessRefnum is the session reference number (returned by the AFPLogin call).
  4974.  
  4975. ASPTimeOut is the interval in seconds between retries of the call.
  4976.  
  4977. ASPRetry is the number of retries that will be attempted.
  4978.  
  4979. CBSize is the size in bytes of the block data that contains the command to be sent to
  4980. the server on the session. The size of the command block must not exceed the value of
  4981. aspMaxCmdSize returned by the ASPGetParms call.
  4982.  
  4983. CBPtr points to the block of data (command block) containing the AFP login command
  4984. that is to be sent to the server on the session.  The first byte of the command block
  4985. must be the AFP login command byte.  Subsequent bytes in the command buffer contain
  4986. the parameters associated with the command.
  4987.  
  4988. RBSize is passed and indicates the size of the reply buffer in bytes expected by the
  4989. command.  RBSize is also returned and indicates the size of the reply that was actually
  4990. returned.
  4991.  
  4992. RBPtr points to the reply buffer.
  4993.  
  4994. AFPServerAddr is the network identifier or address of the socket on which the server
  4995. is listening.
  4996.  
  4997. AFPSCBPointer points to a locked block of data for the session control block
  4998. (SCB). The SCB size is defined by scbMemSize.  The SCB is a locked block, and as long
  4999. as the session is open, the SCB cannot be modified in any way by the application. 
  5000. There is one SCB for each open session.
  5001.  
  5002. AFPAttnRoutine is a pointer to a routine that is invoked if an attention from the
  5003. server is received.  When afpAttnRoutine is equal to zero, no attention routine will
  5004. be invoked.
  5005.  
  5006. CCBStart is the start of the memory to be used by the .XPP driver for the command
  5007. control block.  The size of this block is equal to a maximum of 150 bytes.  To determine
  5008. the exact requirement refer to the CCB Sizes section later in this chapter.
  5009.  
  5010. Note:  In the parameter block, the afpSCBPointer and the afpAttnRoutine
  5011.        fields overlap with the start of the CCB and are modified by the call.
  5012.  
  5013. Result codes    aspSizeErr        Command block size is bigger than MaxCmdSize
  5014.                 aspBufTooSmall    Reply is bigger than response buffer or
  5015.                                   buffer will be filled, data will be truncated
  5016.                 aspNoServer       Server not responding
  5017.                 aspServerBusy     Server cannot open another session
  5018.                 aspBadVersNum     Server cannot support the offered ASP
  5019.                                   version number
  5020.                 aspNoMoreSess     Driver cannot support another session.
  5021.  
  5022.  
  5023. »AFPWrite Command Format
  5024.  
  5025. The AFPWrite and AFPRead command formats allow the calling application to make AFP-level
  5026. calls that read or write a data block that is larger than a single ASP-level call is
  5027. capable of reading or writing.  The maximum number of bytes of data that can be read
  5028. or written at the ASP level is equal to quantumSize.
  5029.  
  5030. FUNCTION AFPCommand (xParamBlock: XPPParmBlkPtr; async: BOOLEAN) : OSErr;
  5031.  
  5032. Parameter block
  5033.   -->    18    cmdResult   long word  AFP command result
  5034.   -->    26    csCode      word       Always AFPCall
  5035.   -->    28    sessRefnum  word       Session number
  5036.   -->    30    aspTimeout  byte       Retry interval in seconds
  5037.   -->    32    cbSize      word       Command buffer size
  5038.   -->    34    cbPtr       pointer    Command buffer
  5039.   <->    38    rbSize      word       Reply buffer size and reply size
  5040.   -->    40    rbPtr       pointer    Reply buffer pointer
  5041.   -->    44    wdSize      word       (used internally)
  5042.   <->    46    wdPtr       pointer    Write data pointer  (updated)
  5043.   -->    50    ccbStart    record     Start of memory for CCB
  5044.  
  5045. CmdResult is four bytes of data returned from the server containing an indication of
  5046. the result of the AFP command.
  5047.  
  5048. SessRefnum is the session reference number returned in the AFPLogin call.
  5049.  
  5050. ASPTimeOut is the interval in seconds between retries of the call.
  5051.  
  5052. CBSize is the size in bytes of the block data that contains the command to be sent to
  5053. the server on the session.  The size of the command block must not exceed the value
  5054. of aspMaxCmdSize returned by the aspGetParms call.
  5055.  
  5056. CBPtr points to the block of data (see command block structure below) containing the
  5057. AFP write command that is to be sent to the server on the session.  The first byte of
  5058. the Command Block must contain the AFP write command byte.
  5059.  
  5060. RBSize is passed and indicates the size of the reply buffer in bytes expected by the
  5061. command.  RBSize is also returned and indicates the size of the reply that was actually
  5062. returned.
  5063.  
  5064. RBPtr points to the reply buffer.
  5065.  
  5066. WDSize is used internally.
  5067.  
  5068. Note:  This command does not pass the write data size in the queue element
  5069.        but in the command buffer.  XPP will look for the size in that buffer.
  5070.  
  5071. WDPtr is a pointer to the block of data to be written.  Note that this field will be
  5072. updated by XPP as it proceeds and will always point to that section of the data which
  5073. XPP is currently writing.
  5074.  
  5075. CCBStart is the start of the memory to be used by the XPP driver for the command
  5076. control block.  The size of this block is equal to a maximum of 296 bytes.  To determine
  5077. the exact requirement refer to the CCB Sizes section later in this chapter.
  5078.  
  5079. Command Block Structure:  The AFP write command passes several arguments to XPP in
  5080. the command buffer itself. The byte offsets are relative to the location pointed to
  5081. by cbPtr.
  5082.  
  5083.   -->    0    cmdByte       byte       AFP call command byte
  5084.   -->    1    startEndFlag  byte       Start/end Flag
  5085.   <->    4    rwOffset      long word  Offset within fork to write
  5086.   <->    8    reqCount      long word  Requested count
  5087.  
  5088. CmdByte is the AFP call command byte and must contain the AFP write command code.
  5089.  
  5090. StartEndFlag is a one-bit flag (the high bit of the byte) indicating whether the
  5091. rwOffset field is relative to the beginning or the end of the fork (all other bits
  5092. are zero).
  5093.  
  5094.   0 = relative to the beginning of the fork
  5095.   1 = relative to the end of the fork
  5096.  
  5097. RWOffset is the byte offset within the fork at which the write is to begin.
  5098.  
  5099. ReqCount indicates the size of the data to be written and is returned as the actual
  5100. size written.
  5101.  
  5102. The rwOffset and reqCount fields are modified by XPP as the write proceeds and will
  5103. always indicate the current value of these fields.
  5104.  
  5105. The Pascal structure of the AFP command buffer follows:
  5106.  
  5107. AFPCommandBlock = PACKED RECORD
  5108.                     cmdByte:       Byte;
  5109.                     startEndFlag:  Byte;
  5110.                     forkRefNum:    INTEGER;    {used by server}
  5111.                     rwOffset:      LONGINT;
  5112.                     reqCount:      LONGINT;
  5113.                     newLineFlag:   Byte;       {unused by write}
  5114.                     newLineChar:   CHAR;       {unused by write}
  5115.                   END;
  5116.  
  5117. Result codes    aspParamErr       Invalid session number
  5118.                 aspSizeErr        Command block size is bigger than MaxCmdSize
  5119.                 aspSessClosed     Session is closing
  5120.                 aspBufTooSmall    Reply is bigger than response buffer
  5121.  
  5122. »AFPRead Command Format
  5123.  
  5124. The AFPWrite and AFPRead command formats allow the calling application to make AFP-level
  5125. calls that read or write a data block that is larger than a single ASP-level call is
  5126. capable of reading or writing.  The maximum number of bytes of data that can be read
  5127. or written at the ASP level is equal to quantumSize.
  5128.  
  5129. FUNCTION AFPCommand (xParamBlock: XPPParmBlkPtr; async: BOOLEAN) : OSErr;
  5130.  
  5131. Parameter block
  5132.   -->    18    cmdResult   long word  ASP command result
  5133.   -->    26    csCode      word       Always AFPCall
  5134.   -->    28    sessRefnum  word       Session number
  5135.   -->    30    aspTimeout  byte       Retry interval in seconds
  5136.   -->    32    cbSize      word       Command buffer size
  5137.   -->    34    cbPtr       pointer    Command buffer
  5138.   -->    38    rbSize      word       Used internally
  5139.   <->    40    rbPtr       pointer    Reply buffer pointer (updated)
  5140.   -->    50    ccbStart    record     Start of memory for CCB
  5141.  
  5142. CmdResult is four bytes of data returned from the server containing an indication of
  5143. the result of the AFP command.
  5144.  
  5145. SessRefnum is the session reference number returned in the AFPLogin  call.
  5146.  
  5147. ASPTimeOut is the interval in seconds between retries of the call.
  5148.  
  5149. CBSize is the size in bytes of the block data that contains the command to be sent to
  5150. the server on the session.  The size of the command block must not exceed the value
  5151. of aspMaxCmdSize returned by the GetParms call.
  5152.  
  5153. CBPtr points to the block of data (command block) containing the AFP read command
  5154. that is to be sent to the server on the session.  The first byte of the command block
  5155. must contain the AFP read command byte.  The command block structure is shown below.
  5156.  
  5157. RBSize  is used internally.
  5158.  
  5159. Note:  This command does not pass the read size in the queue element but
  5160.        in the command buffer.  XPP will look for the size in that buffer.
  5161.  
  5162. RBPtr points to the reply buffer.  Note that this field will be updated by XPP as it
  5163. proceeds and will always point to that section of the buffer that XPP is currently
  5164. reading into.
  5165.  
  5166. CCBStart is the start of the memory to be used by the .XPP driver for the command
  5167. control block.  The size of this block is equal to a maximum of 150 bytes.  To determine
  5168. the exact requirement refer to The CCB Sizes section later in this chapter.
  5169.  
  5170. Command Block Structure:  The AFP read command passes several arguments to XPP in the
  5171. command buffer itself. The byte offsets are relative to the location pointed to by
  5172. cbPointer.
  5173.  
  5174.   -->    0    cmdByte      byte       AFP call command byte
  5175.   <->    4    rwOffset     long word  Offset within fork to read
  5176.   <->    8    reqCount     long word  Requested count
  5177.   -->    12   newLineFlag  byte       Newline Flag
  5178.   -->    13   newLineChar  byte       Newline Character
  5179.  
  5180. CmdByte is the AFP call command byte and must contain the AFP read command code.
  5181.  
  5182. RWOffset is the byte offset within the fork at which the read is to begin.
  5183.  
  5184. ReqCount  indicates the size of the read data buffer and is returned as the actual
  5185. size read.
  5186.  
  5187. The rwOffset and reqCount fields are modified by XPP as the read proceeds and will
  5188. always indicate the current value of these fields.
  5189.  
  5190. NewLineFlag is a one-bit flag (the high bit of the byte) indicating whether or not
  5191. the read is to terminate at a specified character (all other bits are zero).
  5192.  
  5193.   0 = no Newline Character is specified
  5194.   1 = a Newline Character is specified
  5195.  
  5196. NewLineChar is any character from $00 to $FF (inclusive) that, when encountered in
  5197. reading the fork, causes the read operation to terminate.
  5198.  
  5199. The Pascal structure of the AFPCommand follows:
  5200.  
  5201. AFPCommandBlock = PACKED RECORD
  5202.                     cmdByte:       Byte;
  5203.                     startEndFlag:  Byte;     {unused for read}
  5204.                     forkRefNum:    INTEGER;  {used by server}
  5205.                     rwOffset:      LONGINT;
  5206.                     reqCount:      LONGINT;
  5207.                     newLineFlag:   Byte;
  5208.                     newLineChar:   CHAR;
  5209.                   END;
  5210.  
  5211. Result codes    aspParamErr       Invalid session number
  5212.                 aspSizeErr        Command block size is bigger than MaxCmdSize
  5213.                 aspSessClosed     Session is closing
  5214.                 aspBufTooSmall    Reply is bigger than response buffer
  5215.  
  5216.         
  5217.  
  5218. æKY GetLocalZones
  5219. æFp AppleTalk.p
  5220. æT FUNCTION
  5221. æD FUNCTION GetLocalZones(thePBptr: XPPParmBlkPtr;async: BOOLEAN): OSErr;
  5222. æDT myVariable := GetLocalZones(thePBptr,async);
  5223. æRI V-542
  5224. æC 
  5225. »AFPCall Function
  5226.  
  5227. The AFPCall function can have one of the following command formats.
  5228.  
  5229.   •  General
  5230.   •  Login
  5231.   •  AFPWrite
  5232.   •  AFPRead
  5233.  
  5234. »General Command Format
  5235.  
  5236. FUNCTION AFPCommand (xParamBlock: XPPParmBlkPtr; async: BOOLEAN) : OSErr;
  5237.  
  5238. Parameter block
  5239.   -->    18    cmdResult   long word  AFP command result
  5240.   -->    26    csCode      word       Always AFPCall
  5241.   -->    28    sessRefnum  word       Session reference number
  5242.   -->    30    aspTimeout  byte       Retry interval in seconds
  5243.   -->    32    cbSize      word       Command buffer size
  5244.   -->    34    cbPtr       pointer    Command buffer
  5245.   <->    38    rbSize      word       Reply buffer size and reply size
  5246.   -->    40    rbPtr       pointer    Reply buffer pointer
  5247.   <->    44    wdSize      word       Write data size
  5248.   -->    46    wdPtr       pointer    Write data pointer
  5249.   -->    50    ccbStart    record     Start of memory for CCB
  5250.  
  5251. The general command format for the AFPCall function passes an AFP command to the
  5252. server.  This format is used for all AFP calls except AFPLogin, AFPRead, and AFPWrite.
  5253.   Note that from Pascal this call is referred to as AFPCommand.
  5254.  
  5255. CmdResult is four bytes of data returned from the server containing an indication of
  5256. the result of the AFP command.
  5257.  
  5258. SessRefnum is the session reference number returned in the AFPLogin call.
  5259.  
  5260. ASPTimeOut is the interval in seconds between retries of the call by the driver.
  5261.  
  5262. CBSize is the size in bytes of the block of data that contains the command to be sent
  5263. to the server on the session. The size of the command block must not exceed the value
  5264. of aspMaxCmdSize returned by the ASPGetParms call.
  5265.  
  5266. CBPtr points to start of the block of data (command block) containing the command
  5267. that is to be sent to the server on the session.  The first byte of the command block
  5268. must contain the AFP command byte.  Subsequent bytes in the command buffer contain
  5269. the  parameters associated with the command as defined in the AFP document.
  5270.  
  5271. RBSize is passed and indicates the size of the reply buffer in bytes expected by the
  5272. command. RBSize is also returned and indicates the size of the reply that was actually
  5273. returned.
  5274.  
  5275. RBPtr points to the reply buffer.
  5276.  
  5277. WDSize is the size of data to be written to the server (only used if the command is
  5278. one that is mapped to an ASPUserWrite).
  5279.  
  5280. WDPtr points to the write data buffer (only used if the command is one that is mapped
  5281. to an ASPUserWrite).
  5282.  
  5283. CCBStart is the start of the memory to be used by the .XPP driver for the command
  5284. control block.  The size of this block is equal to a maximum of 296 bytes.  To determine
  5285. the exact requirement refer to the CCB Sizes section of this document.
  5286.  
  5287. Result codes    aspParamErr       Invalid session number; session has
  5288.                                   been closed
  5289.                 aspSizeErr        Command block size is bigger than MaxCmdSize
  5290.                 aspSessClosed     Session is closing
  5291.                 aspBufTooSmall    Reply is bigger than response buffer or
  5292.                                   buffer will be filled, data will be truncated
  5293.                 afpParmError      AFP command block size is equal to zero.
  5294.                                   This error will also be returned if the
  5295.                                   command byte in the command block is equal
  5296.                                   to 0 or $FF (255) or GetSrvrStatus (15).
  5297.  
  5298. »Login Command Format
  5299.  
  5300. The AFP login command executes a series of AFP operations as defined in the AFP Draft
  5301. Proposal.  For further information, refer to the AFP document.
  5302.  
  5303. FUNCTION AFPCommand (xParamBlock: XPPParmBlkPtr; async: BOOLEAN): OSErr;
  5304.  
  5305. Parameter block
  5306.   -->    18    cmdResult       long word  AFP command result
  5307.   -->    26    csCode          word       Always AFPCall
  5308.   -->    28    sessRefnum      word       Session reference number
  5309.   -->    30    aspTimeout      byte       Retry interval in seconds
  5310.   -->    31    aspRetry        byte       Number of retries
  5311.   -->    32    cbSize          word       Command buffer size
  5312.   -->    34    cbPtr           pointer    Command buffer
  5313.   <->    38    rbSize          word       Reply buffer size and reply size
  5314.   -->    40    rbPtr           pointer    Reply buffer pointer
  5315.   -->    44    afpAddrBlock    long word  Server address block
  5316.   <->    48    afpSCBPtr       pointer    SCB pointer
  5317.   <->    52    afpAttnRoutine  pointer    Attention routine pointer
  5318.   -->    50    ccbStart        record     Start of command control block
  5319.  
  5320. CmdResult is four bytes of data returned from the server containing an indication of
  5321. the result of the AFP command.
  5322.  
  5323. SessRefnum is the session reference number (returned by the AFPLogin call).
  5324.  
  5325. ASPTimeOut is the interval in seconds between retries of the call.
  5326.  
  5327. ASPRetry is the number of retries that will be attempted.
  5328.  
  5329. CBSize is the size in bytes of the block data that contains the command to be sent to
  5330. the server on the session. The size of the command block must not exceed the value of
  5331. aspMaxCmdSize returned by the ASPGetParms call.
  5332.  
  5333. CBPtr points to the block of data (command block) containing the AFP login command
  5334. that is to be sent to the server on the session.  The first byte of the command block
  5335. must be the AFP login command byte.  Subsequent bytes in the command buffer contain
  5336. the parameters associated with the command.
  5337.  
  5338. RBSize is passed and indicates the size of the reply buffer in bytes expected by the
  5339. command.  RBSize is also returned and indicates the size of the reply that was actually
  5340. returned.
  5341.  
  5342. RBPtr points to the reply buffer.
  5343.  
  5344. AFPServerAddr is the network identifier or address of the socket on which the server
  5345. is listening.
  5346.  
  5347. AFPSCBPointer points to a locked block of data for the session control block
  5348. (SCB). The SCB size is defined by scbMemSize.  The SCB is a locked block, and as long
  5349. as the session is open, the SCB cannot be modified in any way by the application. 
  5350. There is one SCB for each open session.
  5351.  
  5352. AFPAttnRoutine is a pointer to a routine that is invoked if an attention from the
  5353. server is received.  When afpAttnRoutine is equal to zero, no attention routine will
  5354. be invoked.
  5355.  
  5356. CCBStart is the start of the memory to be used by the .XPP driver for the command
  5357. control block.  The size of this block is equal to a maximum of 150 bytes.  To determine
  5358. the exact requirement refer to the CCB Sizes section later in this chapter.
  5359.  
  5360. Note:  In the parameter block, the afpSCBPointer and the afpAttnRoutine
  5361.        fields overlap with the start of the CCB and are modified by the call.
  5362.  
  5363. Result codes    aspSizeErr        Command block size is bigger than MaxCmdSize
  5364.                 aspBufTooSmall    Reply is bigger than response buffer or
  5365.                                   buffer will be filled, data will be truncated
  5366.                 aspNoServer       Server not responding
  5367.                 aspServerBusy     Server cannot open another session
  5368.                 aspBadVersNum     Server cannot support the offered ASP
  5369.                                   version number
  5370.                 aspNoMoreSess     Driver cannot support another session.
  5371.  
  5372.  
  5373. »AFPWrite Command Format
  5374.  
  5375. The AFPWrite and AFPRead command formats allow the calling application to make AFP-level
  5376. calls that read or write a data block that is larger than a single ASP-level call is
  5377. capable of reading or writing.  The maximum number of bytes of data that can be read
  5378. or written at the ASP level is equal to quantumSize.
  5379.  
  5380. FUNCTION AFPCommand (xParamBlock: XPPParmBlkPtr; async: BOOLEAN) : OSErr;
  5381.  
  5382. Parameter block
  5383.   -->    18    cmdResult   long word  AFP command result
  5384.   -->    26    csCode      word       Always AFPCall
  5385.   -->    28    sessRefnum  word       Session number
  5386.   -->    30    aspTimeout  byte       Retry interval in seconds
  5387.   -->    32    cbSize      word       Command buffer size
  5388.   -->    34    cbPtr       pointer    Command buffer
  5389.   <->    38    rbSize      word       Reply buffer size and reply size
  5390.   -->    40    rbPtr       pointer    Reply buffer pointer
  5391.   -->    44    wdSize      word       (used internally)
  5392.   <->    46    wdPtr       pointer    Write data pointer  (updated)
  5393.   -->    50    ccbStart    record     Start of memory for CCB
  5394.  
  5395. CmdResult is four bytes of data returned from the server containing an indication of
  5396. the result of the AFP command.
  5397.  
  5398. SessRefnum is the session reference number returned in the AFPLogin call.
  5399.  
  5400. ASPTimeOut is the interval in seconds between retries of the call.
  5401.  
  5402. CBSize is the size in bytes of the block data that contains the command to be sent to
  5403. the server on the session.  The size of the command block must not exceed the value
  5404. of aspMaxCmdSize returned by the aspGetParms call.
  5405.  
  5406. CBPtr points to the block of data (see command block structure below) containing the
  5407. AFP write command that is to be sent to the server on the session.  The first byte of
  5408. the Command Block must contain the AFP write command byte.
  5409.  
  5410. RBSize is passed and indicates the size of the reply buffer in bytes expected by the
  5411. command.  RBSize is also returned and indicates the size of the reply that was actually
  5412. returned.
  5413.  
  5414. RBPtr points to the reply buffer.
  5415.  
  5416. WDSize is used internally.
  5417.  
  5418. Note:  This command does not pass the write data size in the queue element
  5419.        but in the command buffer.  XPP will look for the size in that buffer.
  5420.  
  5421. WDPtr is a pointer to the block of data to be written.  Note that this field will be
  5422. updated by XPP as it proceeds and will always point to that section of the data which
  5423. XPP is currently writing.
  5424.  
  5425. CCBStart is the start of the memory to be used by the XPP driver for the command
  5426. control block.  The size of this block is equal to a maximum of 296 bytes.  To determine
  5427. the exact requirement refer to the CCB Sizes section later in this chapter.
  5428.  
  5429. Command Block Structure:  The AFP write command passes several arguments to XPP in
  5430. the command buffer itself. The byte offsets are relative to the location pointed to
  5431. by cbPtr.
  5432.  
  5433.   -->    0    cmdByte       byte       AFP call command byte
  5434.   -->    1    startEndFlag  byte       Start/end Flag
  5435.   <->    4    rwOffset      long word  Offset within fork to write
  5436.   <->    8    reqCount      long word  Requested count
  5437.  
  5438. CmdByte is the AFP call command byte and must contain the AFP write command code.
  5439.  
  5440. StartEndFlag is a one-bit flag (the high bit of the byte) indicating whether the
  5441. rwOffset field is relative to the beginning or the end of the fork (all other bits
  5442. are zero).
  5443.  
  5444.   0 = relative to the beginning of the fork
  5445.   1 = relative to the end of the fork
  5446.  
  5447. RWOffset is the byte offset within the fork at which the write is to begin.
  5448.  
  5449. ReqCount indicates the size of the data to be written and is returned as the actual
  5450. size written.
  5451.  
  5452. The rwOffset and reqCount fields are modified by XPP as the write proceeds and will
  5453. always indicate the current value of these fields.
  5454.  
  5455. The Pascal structure of the AFP command buffer follows:
  5456.  
  5457. AFPCommandBlock = PACKED RECORD
  5458.                     cmdByte:       Byte;
  5459.                     startEndFlag:  Byte;
  5460.                     forkRefNum:    INTEGER;    {used by server}
  5461.                     rwOffset:      LONGINT;
  5462.                     reqCount:      LONGINT;
  5463.                     newLineFlag:   Byte;       {unused by write}
  5464.                     newLineChar:   CHAR;       {unused by write}
  5465.                   END;
  5466.  
  5467. Result codes    aspParamErr       Invalid session number
  5468.                 aspSizeErr        Command block size is bigger than MaxCmdSize
  5469.                 aspSessClosed     Session is closing
  5470.                 aspBufTooSmall    Reply is bigger than response buffer
  5471.  
  5472. »AFPRead Command Format
  5473.  
  5474. The AFPWrite and AFPRead command formats allow the calling application to make AFP-level
  5475. calls that read or write a data block that is larger than a single ASP-level call is
  5476. capable of reading or writing.  The maximum number of bytes of data that can be read
  5477. or written at the ASP level is equal to quantumSize.
  5478.  
  5479. FUNCTION AFPCommand (xParamBlock: XPPParmBlkPtr; async: BOOLEAN) : OSErr;
  5480.  
  5481. Parameter block
  5482.   -->    18    cmdResult   long word  ASP command result
  5483.   -->    26    csCode      word       Always AFPCall
  5484.   -->    28    sessRefnum  word       Session number
  5485.   -->    30    aspTimeout  byte       Retry interval in seconds
  5486.   -->    32    cbSize      word       Command buffer size
  5487.   -->    34    cbPtr       pointer    Command buffer
  5488.   -->    38    rbSize      word       Used internally
  5489.   <->    40    rbPtr       pointer    Reply buffer pointer (updated)
  5490.   -->    50    ccbStart    record     Start of memory for CCB
  5491.  
  5492. CmdResult is four bytes of data returned from the server containing an indication of
  5493. the result of the AFP command.
  5494.  
  5495. SessRefnum is the session reference number returned in the AFPLogin  call.
  5496.  
  5497. ASPTimeOut is the interval in seconds between retries of the call.
  5498.  
  5499. CBSize is the size in bytes of the block data that contains the command to be sent to
  5500. the server on the session.  The size of the command block must not exceed the value
  5501. of aspMaxCmdSize returned by the GetParms call.
  5502.  
  5503. CBPtr points to the block of data (command block) containing the AFP read command
  5504. that is to be sent to the server on the session.  The first byte of the command block
  5505. must contain the AFP read command byte.  The command block structure is shown below.
  5506.  
  5507. RBSize  is used internally.
  5508.  
  5509. Note:  This command does not pass the read size in the queue element but
  5510.        in the command buffer.  XPP will look for the size in that buffer.
  5511.  
  5512. RBPtr points to the reply buffer.  Note that this field will be updated by XPP as it
  5513. proceeds and will always point to that section of the buffer that XPP is currently
  5514. reading into.
  5515.  
  5516. CCBStart is the start of the memory to be used by the .XPP driver for the command
  5517. control block.  The size of this block is equal to a maximum of 150 bytes.  To determine
  5518. the exact requirement refer to The CCB Sizes section later in this chapter.
  5519.  
  5520. Command Block Structure:  The AFP read command passes several arguments to XPP in the
  5521. command buffer itself. The byte offsets are relative to the location pointed to by
  5522. cbPointer.
  5523.  
  5524.   -->    0    cmdByte      byte       AFP call command byte
  5525.   <->    4    rwOffset     long word  Offset within fork to read
  5526.   <->    8    reqCount     long word  Requested count
  5527.   -->    12   newLineFlag  byte       Newline Flag
  5528.   -->    13   newLineChar  byte       Newline Character
  5529.  
  5530. CmdByte is the AFP call command byte and must contain the AFP read command code.
  5531.  
  5532. RWOffset is the byte offset within the fork at which the read is to begin.
  5533.  
  5534. ReqCount  indicates the size of the read data buffer and is returned as the actual
  5535. size read.
  5536.  
  5537. The rwOffset and reqCount fields are modified by XPP as the read proceeds and will
  5538. always indicate the current value of these fields.
  5539.  
  5540. NewLineFlag is a one-bit flag (the high bit of the byte) indicating whether or not
  5541. the read is to terminate at a specified character (all other bits are zero).
  5542.  
  5543.   0 = no Newline Character is specified
  5544.   1 = a Newline Character is specified
  5545.  
  5546. NewLineChar is any character from $00 to $FF (inclusive) that, when encountered in
  5547. reading the fork, causes the read operation to terminate.
  5548.  
  5549. The Pascal structure of the AFPCommand follows:
  5550.  
  5551. AFPCommandBlock = PACKED RECORD
  5552.                     cmdByte:       Byte;
  5553.                     startEndFlag:  Byte;     {unused for read}
  5554.                     forkRefNum:    INTEGER;  {used by server}
  5555.                     rwOffset:      LONGINT;
  5556.                     reqCount:      LONGINT;
  5557.                     newLineFlag:   Byte;
  5558.                     newLineChar:   CHAR;
  5559.                   END;
  5560.  
  5561. Result codes    aspParamErr       Invalid session number
  5562.                 aspSizeErr        Command block size is bigger than MaxCmdSize
  5563.                 aspSessClosed     Session is closing
  5564.                 aspBufTooSmall    Reply is bigger than response buffer
  5565.  
  5566.         
  5567.  
  5568. æKY GetZoneList
  5569. æFp AppleTalk.p
  5570. æT FUNCTION
  5571. æD FUNCTION GetZoneList(thePBptr: XPPParmBlkPtr;async: BOOLEAN): OSErr;
  5572. æDT myVariable := GetZoneList(thePBptr,async);
  5573. æRI V-542
  5574. æC 
  5575. »AFPCall Function
  5576.  
  5577. The AFPCall function can have one of the following command formats.
  5578.  
  5579.   •  General
  5580.   •  Login
  5581.   •  AFPWrite
  5582.   •  AFPRead
  5583.  
  5584. »General Command Format
  5585.  
  5586. FUNCTION AFPCommand (xParamBlock: XPPParmBlkPtr; async: BOOLEAN) : OSErr;
  5587.  
  5588. Parameter block
  5589.   -->    18    cmdResult   long word  AFP command result
  5590.   -->    26    csCode      word       Always AFPCall
  5591.   -->    28    sessRefnum  word       Session reference number
  5592.   -->    30    aspTimeout  byte       Retry interval in seconds
  5593.   -->    32    cbSize      word       Command buffer size
  5594.   -->    34    cbPtr       pointer    Command buffer
  5595.   <->    38    rbSize      word       Reply buffer size and reply size
  5596.   -->    40    rbPtr       pointer    Reply buffer pointer
  5597.   <->    44    wdSize      word       Write data size
  5598.   -->    46    wdPtr       pointer    Write data pointer
  5599.   -->    50    ccbStart    record     Start of memory for CCB
  5600.  
  5601. The general command format for the AFPCall function passes an AFP command to the
  5602. server.  This format is used for all AFP calls except AFPLogin, AFPRead, and AFPWrite.
  5603.   Note that from Pascal this call is referred to as AFPCommand.
  5604.  
  5605. CmdResult is four bytes of data returned from the server containing an indication of
  5606. the result of the AFP command.
  5607.  
  5608. SessRefnum is the session reference number returned in the AFPLogin call.
  5609.  
  5610. ASPTimeOut is the interval in seconds between retries of the call by the driver.
  5611.  
  5612. CBSize is the size in bytes of the block of data that contains the command to be sent
  5613. to the server on the session. The size of the command block must not exceed the value
  5614. of aspMaxCmdSize returned by the ASPGetParms call.
  5615.  
  5616. CBPtr points to start of the block of data (command block) containing the command
  5617. that is to be sent to the server on the session.  The first byte of the command block
  5618. must contain the AFP command byte.  Subsequent bytes in the command buffer contain
  5619. the  parameters associated with the command as defined in the AFP document.
  5620.  
  5621. RBSize is passed and indicates the size of the reply buffer in bytes expected by the
  5622. command. RBSize is also returned and indicates the size of the reply that was actually
  5623. returned.
  5624.  
  5625. RBPtr points to the reply buffer.
  5626.  
  5627. WDSize is the size of data to be written to the server (only used if the command is
  5628. one that is mapped to an ASPUserWrite).
  5629.  
  5630. WDPtr points to the write data buffer (only used if the command is one that is mapped
  5631. to an ASPUserWrite).
  5632.  
  5633. CCBStart is the start of the memory to be used by the .XPP driver for the command
  5634. control block.  The size of this block is equal to a maximum of 296 bytes.  To determine
  5635. the exact requirement refer to the CCB Sizes section of this document.
  5636.  
  5637. Result codes    aspParamErr       Invalid session number; session has
  5638.                                   been closed
  5639.                 aspSizeErr        Command block size is bigger than MaxCmdSize
  5640.                 aspSessClosed     Session is closing
  5641.                 aspBufTooSmall    Reply is bigger than response buffer or
  5642.                                   buffer will be filled, data will be truncated
  5643.                 afpParmError      AFP command block size is equal to zero.
  5644.                                   This error will also be returned if the
  5645.                                   command byte in the command block is equal
  5646.                                   to 0 or $FF (255) or GetSrvrStatus (15).
  5647.  
  5648. »Login Command Format
  5649.  
  5650. The AFP login command executes a series of AFP operations as defined in the AFP Draft
  5651. Proposal.  For further information, refer to the AFP document.
  5652.  
  5653. FUNCTION AFPCommand (xParamBlock: XPPParmBlkPtr; async: BOOLEAN): OSErr;
  5654.  
  5655. Parameter block
  5656.   -->    18    cmdResult       long word  AFP command result
  5657.   -->    26    csCode          word       Always AFPCall
  5658.   -->    28    sessRefnum      word       Session reference number
  5659.   -->    30    aspTimeout      byte       Retry interval in seconds
  5660.   -->    31    aspRetry        byte       Number of retries
  5661.   -->    32    cbSize          word       Command buffer size
  5662.   -->    34    cbPtr           pointer    Command buffer
  5663.   <->    38    rbSize          word       Reply buffer size and reply size
  5664.   -->    40    rbPtr           pointer    Reply buffer pointer
  5665.   -->    44    afpAddrBlock    long word  Server address block
  5666.   <->    48    afpSCBPtr       pointer    SCB pointer
  5667.   <->    52    afpAttnRoutine  pointer    Attention routine pointer
  5668.   -->    50    ccbStart        record     Start of command control block
  5669.  
  5670. CmdResult is four bytes of data returned from the server containing an indication of
  5671. the result of the AFP command.
  5672.  
  5673. SessRefnum is the session reference number (returned by the AFPLogin call).
  5674.  
  5675. ASPTimeOut is the interval in seconds between retries of the call.
  5676.  
  5677. ASPRetry is the number of retries that will be attempted.
  5678.  
  5679. CBSize is the size in bytes of the block data that contains the command to be sent to
  5680. the server on the session. The size of the command block must not exceed the value of
  5681. aspMaxCmdSize returned by the ASPGetParms call.
  5682.  
  5683. CBPtr points to the block of data (command block) containing the AFP login command
  5684. that is to be sent to the server on the session.  The first byte of the command block
  5685. must be the AFP login command byte.  Subsequent bytes in the command buffer contain
  5686. the parameters associated with the command.
  5687.  
  5688. RBSize is passed and indicates the size of the reply buffer in bytes expected by the
  5689. command.  RBSize is also returned and indicates the size of the reply that was actually
  5690. returned.
  5691.  
  5692. RBPtr points to the reply buffer.
  5693.  
  5694. AFPServerAddr is the network identifier or address of the socket on which the server
  5695. is listening.
  5696.  
  5697. AFPSCBPointer points to a locked block of data for the session control block
  5698. (SCB). The SCB size is defined by scbMemSize.  The SCB is a locked block, and as long
  5699. as the session is open, the SCB cannot be modified in any way by the application. 
  5700. There is one SCB for each open session.
  5701.  
  5702. AFPAttnRoutine is a pointer to a routine that is invoked if an attention from the
  5703. server is received.  When afpAttnRoutine is equal to zero, no attention routine will
  5704. be invoked.
  5705.  
  5706. CCBStart is the start of the memory to be used by the .XPP driver for the command
  5707. control block.  The size of this block is equal to a maximum of 150 bytes.  To determine
  5708. the exact requirement refer to the CCB Sizes section later in this chapter.
  5709.  
  5710. Note:  In the parameter block, the afpSCBPointer and the afpAttnRoutine
  5711.        fields overlap with the start of the CCB and are modified by the call.
  5712.  
  5713. Result codes    aspSizeErr        Command block size is bigger than MaxCmdSize
  5714.                 aspBufTooSmall    Reply is bigger than response buffer or
  5715.                                   buffer will be filled, data will be truncated
  5716.                 aspNoServer       Server not responding
  5717.                 aspServerBusy     Server cannot open another session
  5718.                 aspBadVersNum     Server cannot support the offered ASP
  5719.                                   version number
  5720.                 aspNoMoreSess     Driver cannot support another session.
  5721.  
  5722.  
  5723. »AFPWrite Command Format
  5724.  
  5725. The AFPWrite and AFPRead command formats allow the calling application to make AFP-level
  5726. calls that read or write a data block that is larger than a single ASP-level call is
  5727. capable of reading or writing.  The maximum number of bytes of data that can be read
  5728. or written at the ASP level is equal to quantumSize.
  5729.  
  5730. FUNCTION AFPCommand (xParamBlock: XPPParmBlkPtr; async: BOOLEAN) : OSErr;
  5731.  
  5732. Parameter block
  5733.   -->    18    cmdResult   long word  AFP command result
  5734.   -->    26    csCode      word       Always AFPCall
  5735.   -->    28    sessRefnum  word       Session number
  5736.   -->    30    aspTimeout  byte       Retry interval in seconds
  5737.   -->    32    cbSize      word       Command buffer size
  5738.   -->    34    cbPtr       pointer    Command buffer
  5739.   <->    38    rbSize      word       Reply buffer size and reply size
  5740.   -->    40    rbPtr       pointer    Reply buffer pointer
  5741.   -->    44    wdSize      word       (used internally)
  5742.   <->    46    wdPtr       pointer    Write data pointer  (updated)
  5743.   -->    50    ccbStart    record     Start of memory for CCB
  5744.  
  5745. CmdResult is four bytes of data returned from the server containing an indication of
  5746. the result of the AFP command.
  5747.  
  5748. SessRefnum is the session reference number returned in the AFPLogin call.
  5749.  
  5750. ASPTimeOut is the interval in seconds between retries of the call.
  5751.  
  5752. CBSize is the size in bytes of the block data that contains the command to be sent to
  5753. the server on the session.  The size of the command block must not exceed the value
  5754. of aspMaxCmdSize returned by the aspGetParms call.
  5755.  
  5756. CBPtr points to the block of data (see command block structure below) containing the
  5757. AFP write command that is to be sent to the server on the session.  The first byte of
  5758. the Command Block must contain the AFP write command byte.
  5759.  
  5760. RBSize is passed and indicates the size of the reply buffer in bytes expected by the
  5761. command.  RBSize is also returned and indicates the size of the reply that was actually
  5762. returned.
  5763.  
  5764. RBPtr points to the reply buffer.
  5765.  
  5766. WDSize is used internally.
  5767.  
  5768. Note:  This command does not pass the write data size in the queue element
  5769.        but in the command buffer.  XPP will look for the size in that buffer.
  5770.  
  5771. WDPtr is a pointer to the block of data to be written.  Note that this field will be
  5772. updated by XPP as it proceeds and will always point to that section of the data which
  5773. XPP is currently writing.
  5774.  
  5775. CCBStart is the start of the memory to be used by the XPP driver for the command
  5776. control block.  The size of this block is equal to a maximum of 296 bytes.  To determine
  5777. the exact requirement refer to the CCB Sizes section later in this chapter.
  5778.  
  5779. Command Block Structure:  The AFP write command passes several arguments to XPP in
  5780. the command buffer itself. The byte offsets are relative to the location pointed to
  5781. by cbPtr.
  5782.  
  5783.   -->    0    cmdByte       byte       AFP call command byte
  5784.   -->    1    startEndFlag  byte       Start/end Flag
  5785.   <->    4    rwOffset      long word  Offset within fork to write
  5786.   <->    8    reqCount      long word  Requested count
  5787.  
  5788. CmdByte is the AFP call command byte and must contain the AFP write command code.
  5789.  
  5790. StartEndFlag is a one-bit flag (the high bit of the byte) indicating whether the
  5791. rwOffset field is relative to the beginning or the end of the fork (all other bits
  5792. are zero).
  5793.  
  5794.   0 = relative to the beginning of the fork
  5795.   1 = relative to the end of the fork
  5796.  
  5797. RWOffset is the byte offset within the fork at which the write is to begin.
  5798.  
  5799. ReqCount indicates the size of the data to be written and is returned as the actual
  5800. size written.
  5801.  
  5802. The rwOffset and reqCount fields are modified by XPP as the write proceeds and will
  5803. always indicate the current value of these fields.
  5804.  
  5805. The Pascal structure of the AFP command buffer follows:
  5806.  
  5807. AFPCommandBlock = PACKED RECORD
  5808.                     cmdByte:       Byte;
  5809.                     startEndFlag:  Byte;
  5810.                     forkRefNum:    INTEGER;    {used by server}
  5811.                     rwOffset:      LONGINT;
  5812.                     reqCount:      LONGINT;
  5813.                     newLineFlag:   Byte;       {unused by write}
  5814.                     newLineChar:   CHAR;       {unused by write}
  5815.                   END;
  5816.  
  5817. Result codes    aspParamErr       Invalid session number
  5818.                 aspSizeErr        Command block size is bigger than MaxCmdSize
  5819.                 aspSessClosed     Session is closing
  5820.                 aspBufTooSmall    Reply is bigger than response buffer
  5821.  
  5822. »AFPRead Command Format
  5823.  
  5824. The AFPWrite and AFPRead command formats allow the calling application to make AFP-level
  5825. calls that read or write a data block that is larger than a single ASP-level call is
  5826. capable of reading or writing.  The maximum number of bytes of data that can be read
  5827. or written at the ASP level is equal to quantumSize.
  5828.  
  5829. FUNCTION AFPCommand (xParamBlock: XPPParmBlkPtr; async: BOOLEAN) : OSErr;
  5830.  
  5831. Parameter block
  5832.   -->    18    cmdResult   long word  ASP command result
  5833.   -->    26    csCode      word       Always AFPCall
  5834.   -->    28    sessRefnum  word       Session number
  5835.   -->    30    aspTimeout  byte       Retry interval in seconds
  5836.   -->    32    cbSize      word       Command buffer size
  5837.   -->    34    cbPtr       pointer    Command buffer
  5838.   -->    38    rbSize      word       Used internally
  5839.   <->    40    rbPtr       pointer    Reply buffer pointer (updated)
  5840.   -->    50    ccbStart    record     Start of memory for CCB
  5841.  
  5842. CmdResult is four bytes of data returned from the server containing an indication of
  5843. the result of the AFP command.
  5844.  
  5845. SessRefnum is the session reference number returned in the AFPLogin  call.
  5846.  
  5847. ASPTimeOut is the interval in seconds between retries of the call.
  5848.  
  5849. CBSize is the size in bytes of the block data that contains the command to be sent to
  5850. the server on the session.  The size of the command block must not exceed the value
  5851. of aspMaxCmdSize returned by the GetParms call.
  5852.  
  5853. CBPtr points to the block of data (command block) containing the AFP read command
  5854. that is to be sent to the server on the session.  The first byte of the command block
  5855. must contain the AFP read command byte.  The command block structure is shown below.
  5856.  
  5857. RBSize  is used internally.
  5858.  
  5859. Note:  This command does not pass the read size in the queue element but
  5860.        in the command buffer.  XPP will look for the size in that buffer.
  5861.  
  5862. RBPtr points to the reply buffer.  Note that this field will be updated by XPP as it
  5863. proceeds and will always point to that section of the buffer that XPP is currently
  5864. reading into.
  5865.  
  5866. CCBStart is the start of the memory to be used by the .XPP driver for the command
  5867. control block.  The size of this block is equal to a maximum of 150 bytes.  To determine
  5868. the exact requirement refer to The CCB Sizes section later in this chapter.
  5869.  
  5870. Command Block Structure:  The AFP read command passes several arguments to XPP in the
  5871. command buffer itself. The byte offsets are relative to the location pointed to by
  5872. cbPointer.
  5873.  
  5874.   -->    0    cmdByte      byte       AFP call command byte
  5875.   <->    4    rwOffset     long word  Offset within fork to read
  5876.   <->    8    reqCount     long word  Requested count
  5877.   -->    12   newLineFlag  byte       Newline Flag
  5878.   -->    13   newLineChar  byte       Newline Character
  5879.  
  5880. CmdByte is the AFP call command byte and must contain the AFP read command code.
  5881.  
  5882. RWOffset is the byte offset within the fork at which the read is to begin.
  5883.  
  5884. ReqCount  indicates the size of the read data buffer and is returned as the actual
  5885. size read.
  5886.  
  5887. The rwOffset and reqCount fields are modified by XPP as the read proceeds and will
  5888. always indicate the current value of these fields.
  5889.  
  5890. NewLineFlag is a one-bit flag (the high bit of the byte) indicating whether or not
  5891. the read is to terminate at a specified character (all other bits are zero).
  5892.  
  5893.   0 = no Newline Character is specified
  5894.   1 = a Newline Character is specified
  5895.  
  5896. NewLineChar is any character from $00 to $FF (inclusive) that, when encountered in
  5897. reading the fork, causes the read operation to terminate.
  5898.  
  5899. The Pascal structure of the AFPCommand follows:
  5900.  
  5901. AFPCommandBlock = PACKED RECORD
  5902.                     cmdByte:       Byte;
  5903.                     startEndFlag:  Byte;     {unused for read}
  5904.                     forkRefNum:    INTEGER;  {used by server}
  5905.                     rwOffset:      LONGINT;
  5906.                     reqCount:      LONGINT;
  5907.                     newLineFlag:   Byte;
  5908.                     newLineChar:   CHAR;
  5909.                   END;
  5910.  
  5911. Result codes    aspParamErr       Invalid session number
  5912.                 aspSizeErr        Command block size is bigger than MaxCmdSize
  5913.                 aspSessClosed     Session is closing
  5914.                 aspBufTooSmall    Reply is bigger than response buffer
  5915.  
  5916.         
  5917.  
  5918. æKY GetMyZone
  5919. æFp AppleTalk.p
  5920. æT FUNCTION
  5921. æD FUNCTION GetMyZone(thePBptr: XPPParmBlkPtr;async: BOOLEAN): OSErr;
  5922. æDT myVariable := GetMyZone(thePBptr,async);
  5923. æRI V-542
  5924. æC 
  5925. »AFPCall Function
  5926.  
  5927. The AFPCall function can have one of the following command formats.
  5928.  
  5929.   •  General
  5930.   •  Login
  5931.   •  AFPWrite
  5932.   •  AFPRead
  5933.  
  5934. »General Command Format
  5935.  
  5936. FUNCTION AFPCommand (xParamBlock: XPPParmBlkPtr; async: BOOLEAN) : OSErr;
  5937.  
  5938. Parameter block
  5939.   -->    18    cmdResult   long word  AFP command result
  5940.   -->    26    csCode      word       Always AFPCall
  5941.   -->    28    sessRefnum  word       Session reference number
  5942.   -->    30    aspTimeout  byte       Retry interval in seconds
  5943.   -->    32    cbSize      word       Command buffer size
  5944.   -->    34    cbPtr       pointer    Command buffer
  5945.   <->    38    rbSize      word       Reply buffer size and reply size
  5946.   -->    40    rbPtr       pointer    Reply buffer pointer
  5947.   <->    44    wdSize      word       Write data size
  5948.   -->    46    wdPtr       pointer    Write data pointer
  5949.   -->    50    ccbStart    record     Start of memory for CCB
  5950.  
  5951. The general command format for the AFPCall function passes an AFP command to the
  5952. server.  This format is used for all AFP calls except AFPLogin, AFPRead, and AFPWrite.
  5953.   Note that from Pascal this call is referred to as AFPCommand.
  5954.  
  5955. CmdResult is four bytes of data returned from the server containing an indication of
  5956. the result of the AFP command.
  5957.  
  5958. SessRefnum is the session reference number returned in the AFPLogin call.
  5959.  
  5960. ASPTimeOut is the interval in seconds between retries of the call by the driver.
  5961.  
  5962. CBSize is the size in bytes of the block of data that contains the command to be sent
  5963. to the server on the session. The size of the command block must not exceed the value
  5964. of aspMaxCmdSize returned by the ASPGetParms call.
  5965.  
  5966. CBPtr points to start of the block of data (command block) containing the command
  5967. that is to be sent to the server on the session.  The first byte of the command block
  5968. must contain the AFP command byte.  Subsequent bytes in the command buffer contain
  5969. the  parameters associated with the command as defined in the AFP document.
  5970.  
  5971. RBSize is passed and indicates the size of the reply buffer in bytes expected by the
  5972. command. RBSize is also returned and indicates the size of the reply that was actually
  5973. returned.
  5974.  
  5975. RBPtr points to the reply buffer.
  5976.  
  5977. WDSize is the size of data to be written to the server (only used if the command is
  5978. one that is mapped to an ASPUserWrite).
  5979.  
  5980. WDPtr points to the write data buffer (only used if the command is one that is mapped
  5981. to an ASPUserWrite).
  5982.  
  5983. CCBStart is the start of the memory to be used by the .XPP driver for the command
  5984. control block.  The size of this block is equal to a maximum of 296 bytes.  To determine
  5985. the exact requirement refer to the CCB Sizes section of this document.
  5986.  
  5987. Result codes    aspParamErr       Invalid session number; session has
  5988.                                   been closed
  5989.                 aspSizeErr        Command block size is bigger than MaxCmdSize
  5990.                 aspSessClosed     Session is closing
  5991.                 aspBufTooSmall    Reply is bigger than response buffer or
  5992.                                   buffer will be filled, data will be truncated
  5993.                 afpParmError      AFP command block size is equal to zero.
  5994.                                   This error will also be returned if the
  5995.                                   command byte in the command block is equal
  5996.                                   to 0 or $FF (255) or GetSrvrStatus (15).
  5997.  
  5998. »Login Command Format
  5999.  
  6000. The AFP login command executes a series of AFP operations as defined in the AFP Draft
  6001. Proposal.  For further information, refer to the AFP document.
  6002.  
  6003. FUNCTION AFPCommand (xParamBlock: XPPParmBlkPtr; async: BOOLEAN): OSErr;
  6004.  
  6005. Parameter block
  6006.   -->    18    cmdResult       long word  AFP command result
  6007.   -->    26    csCode          word       Always AFPCall
  6008.   -->    28    sessRefnum      word       Session reference number
  6009.   -->    30    aspTimeout      byte       Retry interval in seconds
  6010.   -->    31    aspRetry        byte       Number of retries
  6011.   -->    32    cbSize          word       Command buffer size
  6012.   -->    34    cbPtr           pointer    Command buffer
  6013.   <->    38    rbSize          word       Reply buffer size and reply size
  6014.   -->    40    rbPtr           pointer    Reply buffer pointer
  6015.   -->    44    afpAddrBlock    long word  Server address block
  6016.   <->    48    afpSCBPtr       pointer    SCB pointer
  6017.   <->    52    afpAttnRoutine  pointer    Attention routine pointer
  6018.   -->    50    ccbStart        record     Start of command control block
  6019.  
  6020. CmdResult is four bytes of data returned from the server containing an indication of
  6021. the result of the AFP command.
  6022.  
  6023. SessRefnum is the session reference number (returned by the AFPLogin call).
  6024.  
  6025. ASPTimeOut is the interval in seconds between retries of the call.
  6026.  
  6027. ASPRetry is the number of retries that will be attempted.
  6028.  
  6029. CBSize is the size in bytes of the block data that contains the command to be sent to
  6030. the server on the session. The size of the command block must not exceed the value of
  6031. aspMaxCmdSize returned by the ASPGetParms call.
  6032.  
  6033. CBPtr points to the block of data (command block) containing the AFP login command
  6034. that is to be sent to the server on the session.  The first byte of the command block
  6035. must be the AFP login command byte.  Subsequent bytes in the command buffer contain
  6036. the parameters associated with the command.
  6037.  
  6038. RBSize is passed and indicates the size of the reply buffer in bytes expected by the
  6039. command.  RBSize is also returned and indicates the size of the reply that was actually
  6040. returned.
  6041.  
  6042. RBPtr points to the reply buffer.
  6043.  
  6044. AFPServerAddr is the network identifier or address of the socket on which the server
  6045. is listening.
  6046.  
  6047. AFPSCBPointer points to a locked block of data for the session control block
  6048. (SCB). The SCB size is defined by scbMemSize.  The SCB is a locked block, and as long
  6049. as the session is open, the SCB cannot be modified in any way by the application. 
  6050. There is one SCB for each open session.
  6051.  
  6052. AFPAttnRoutine is a pointer to a routine that is invoked if an attention from the
  6053. server is received.  When afpAttnRoutine is equal to zero, no attention routine will
  6054. be invoked.
  6055.  
  6056. CCBStart is the start of the memory to be used by the .XPP driver for the command
  6057. control block.  The size of this block is equal to a maximum of 150 bytes.  To determine
  6058. the exact requirement refer to the CCB Sizes section later in this chapter.
  6059.  
  6060. Note:  In the parameter block, the afpSCBPointer and the afpAttnRoutine
  6061.        fields overlap with the start of the CCB and are modified by the call.
  6062.  
  6063. Result codes    aspSizeErr        Command block size is bigger than MaxCmdSize
  6064.                 aspBufTooSmall    Reply is bigger than response buffer or
  6065.                                   buffer will be filled, data will be truncated
  6066.                 aspNoServer       Server not responding
  6067.                 aspServerBusy     Server cannot open another session
  6068.                 aspBadVersNum     Server cannot support the offered ASP
  6069.                                   version number
  6070.                 aspNoMoreSess     Driver cannot support another session.
  6071.  
  6072.  
  6073. »AFPWrite Command Format
  6074.  
  6075. The AFPWrite and AFPRead command formats allow the calling application to make AFP-level
  6076. calls that read or write a data block that is larger than a single ASP-level call is
  6077. capable of reading or writing.  The maximum number of bytes of data that can be read
  6078. or written at the ASP level is equal to quantumSize.
  6079.  
  6080. FUNCTION AFPCommand (xParamBlock: XPPParmBlkPtr; async: BOOLEAN) : OSErr;
  6081.  
  6082. Parameter block
  6083.   -->    18    cmdResult   long word  AFP command result
  6084.   -->    26    csCode      word       Always AFPCall
  6085.   -->    28    sessRefnum  word       Session number
  6086.   -->    30    aspTimeout  byte       Retry interval in seconds
  6087.   -->    32    cbSize      word       Command buffer size
  6088.   -->    34    cbPtr       pointer    Command buffer
  6089.   <->    38    rbSize      word       Reply buffer size and reply size
  6090.   -->    40    rbPtr       pointer    Reply buffer pointer
  6091.   -->    44    wdSize      word       (used internally)
  6092.   <->    46    wdPtr       pointer    Write data pointer  (updated)
  6093.   -->    50    ccbStart    record     Start of memory for CCB
  6094.  
  6095. CmdResult is four bytes of data returned from the server containing an indication of
  6096. the result of the AFP command.
  6097.  
  6098. SessRefnum is the session reference number returned in the AFPLogin call.
  6099.  
  6100. ASPTimeOut is the interval in seconds between retries of the call.
  6101.  
  6102. CBSize is the size in bytes of the block data that contains the command to be sent to
  6103. the server on the session.  The size of the command block must not exceed the value
  6104. of aspMaxCmdSize returned by the aspGetParms call.
  6105.  
  6106. CBPtr points to the block of data (see command block structure below) containing the
  6107. AFP write command that is to be sent to the server on the session.  The first byte of
  6108. the Command Block must contain the AFP write command byte.
  6109.  
  6110. RBSize is passed and indicates the size of the reply buffer in bytes expected by the
  6111. command.  RBSize is also returned and indicates the size of the reply that was actually
  6112. returned.
  6113.  
  6114. RBPtr points to the reply buffer.
  6115.  
  6116. WDSize is used internally.
  6117.  
  6118. Note:  This command does not pass the write data size in the queue element
  6119.        but in the command buffer.  XPP will look for the size in that buffer.
  6120.  
  6121. WDPtr is a pointer to the block of data to be written.  Note that this field will be
  6122. updated by XPP as it proceeds and will always point to that section of the data which
  6123. XPP is currently writing.
  6124.  
  6125. CCBStart is the start of the memory to be used by the XPP driver for the command
  6126. control block.  The size of this block is equal to a maximum of 296 bytes.  To determine
  6127. the exact requirement refer to the CCB Sizes section later in this chapter.
  6128.  
  6129. Command Block Structure:  The AFP write command passes several arguments to XPP in
  6130. the command buffer itself. The byte offsets are relative to the location pointed to
  6131. by cbPtr.
  6132.  
  6133.   -->    0    cmdByte       byte       AFP call command byte
  6134.   -->    1    startEndFlag  byte       Start/end Flag
  6135.   <->    4    rwOffset      long word  Offset within fork to write
  6136.   <->    8    reqCount      long word  Requested count
  6137.  
  6138. CmdByte is the AFP call command byte and must contain the AFP write command code.
  6139.  
  6140. StartEndFlag is a one-bit flag (the high bit of the byte) indicating whether the
  6141. rwOffset field is relative to the beginning or the end of the fork (all other bits
  6142. are zero).
  6143.  
  6144.   0 = relative to the beginning of the fork
  6145.   1 = relative to the end of the fork
  6146.  
  6147. RWOffset is the byte offset within the fork at which the write is to begin.
  6148.  
  6149. ReqCount indicates the size of the data to be written and is returned as the actual
  6150. size written.
  6151.  
  6152. The rwOffset and reqCount fields are modified by XPP as the write proceeds and will
  6153. always indicate the current value of these fields.
  6154.  
  6155. The Pascal structure of the AFP command buffer follows:
  6156.  
  6157. AFPCommandBlock = PACKED RECORD
  6158.                     cmdByte:       Byte;
  6159.                     startEndFlag:  Byte;
  6160.                     forkRefNum:    INTEGER;    {used by server}
  6161.                     rwOffset:      LONGINT;
  6162.                     reqCount:      LONGINT;
  6163.                     newLineFlag:   Byte;       {unused by write}
  6164.                     newLineChar:   CHAR;       {unused by write}
  6165.                   END;
  6166.  
  6167. Result codes    aspParamErr       Invalid session number
  6168.                 aspSizeErr        Command block size is bigger than MaxCmdSize
  6169.                 aspSessClosed     Session is closing
  6170.                 aspBufTooSmall    Reply is bigger than response buffer
  6171.  
  6172. »AFPRead Command Format
  6173.  
  6174. The AFPWrite and AFPRead command formats allow the calling application to make AFP-level
  6175. calls that read or write a data block that is larger than a single ASP-level call is
  6176. capable of reading or writing.  The maximum number of bytes of data that can be read
  6177. or written at the ASP level is equal to quantumSize.
  6178.  
  6179. FUNCTION AFPCommand (xParamBlock: XPPParmBlkPtr; async: BOOLEAN) : OSErr;
  6180.  
  6181. Parameter block
  6182.   -->    18    cmdResult   long word  ASP command result
  6183.   -->    26    csCode      word       Always AFPCall
  6184.   -->    28    sessRefnum  word       Session number
  6185.   -->    30    aspTimeout  byte       Retry interval in seconds
  6186.   -->    32    cbSize      word       Command buffer size
  6187.   -->    34    cbPtr       pointer    Command buffer
  6188.   -->    38    rbSize      word       Used internally
  6189.   <->    40    rbPtr       pointer    Reply buffer pointer (updated)
  6190.   -->    50    ccbStart    record     Start of memory for CCB
  6191.  
  6192. CmdResult is four bytes of data returned from the server containing an indication of
  6193. the result of the AFP command.
  6194.  
  6195. SessRefnum is the session reference number returned in the AFPLogin  call.
  6196.  
  6197. ASPTimeOut is the interval in seconds between retries of the call.
  6198.  
  6199. CBSize is the size in bytes of the block data that contains the command to be sent to
  6200. the server on the session.  The size of the command block must not exceed the value
  6201. of aspMaxCmdSize returned by the GetParms call.
  6202.  
  6203. CBPtr points to the block of data (command block) containing the AFP read command
  6204. that is to be sent to the server on the session.  The first byte of the command block
  6205. must contain the AFP read command byte.  The command block structure is shown below.
  6206.  
  6207. RBSize  is used internally.
  6208.  
  6209. Note:  This command does not pass the read size in the queue element but
  6210.        in the command buffer.  XPP will look for the size in that buffer.
  6211.  
  6212. RBPtr points to the reply buffer.  Note that this field will be updated by XPP as it
  6213. proceeds and will always point to that section of the buffer that XPP is currently
  6214. reading into.
  6215.  
  6216. CCBStart is the start of the memory to be used by the .XPP driver for the command
  6217. control block.  The size of this block is equal to a maximum of 150 bytes.  To determine
  6218. the exact requirement refer to The CCB Sizes section later in this chapter.
  6219.  
  6220. Command Block Structure:  The AFP read command passes several arguments to XPP in the
  6221. command buffer itself. The byte offsets are relative to the location pointed to by
  6222. cbPointer.
  6223.  
  6224.   -->    0    cmdByte      byte       AFP call command byte
  6225.   <->    4    rwOffset     long word  Offset within fork to read
  6226.   <->    8    reqCount     long word  Requested count
  6227.   -->    12   newLineFlag  byte       Newline Flag
  6228.   -->    13   newLineChar  byte       Newline Character
  6229.  
  6230. CmdByte is the AFP call command byte and must contain the AFP read command code.
  6231.  
  6232. RWOffset is the byte offset within the fork at which the read is to begin.
  6233.  
  6234. ReqCount  indicates the size of the read data buffer and is returned as the actual
  6235. size read.
  6236.  
  6237. The rwOffset and reqCount fields are modified by XPP as the read proceeds and will
  6238. always indicate the current value of these fields.
  6239.  
  6240. NewLineFlag is a one-bit flag (the high bit of the byte) indicating whether or not
  6241. the read is to terminate at a specified character (all other bits are zero).
  6242.  
  6243.   0 = no Newline Character is specified
  6244.   1 = a Newline Character is specified
  6245.  
  6246. NewLineChar is any character from $00 to $FF (inclusive) that, when encountered in
  6247. reading the fork, causes the read operation to terminate.
  6248.  
  6249. The Pascal structure of the AFPCommand follows:
  6250.  
  6251. AFPCommandBlock = PACKED RECORD
  6252.                     cmdByte:       Byte;
  6253.                     startEndFlag:  Byte;     {unused for read}
  6254.                     forkRefNum:    INTEGER;  {used by server}
  6255.                     rwOffset:      LONGINT;
  6256.                     reqCount:      LONGINT;
  6257.                     newLineFlag:   Byte;
  6258.                     newLineChar:   CHAR;
  6259.                   END;
  6260.  
  6261. Result codes    aspParamErr       Invalid session number
  6262.                 aspSizeErr        Command block size is bigger than MaxCmdSize
  6263.                 aspSessClosed     Session is closing
  6264.                 aspBufTooSmall    Reply is bigger than response buffer
  6265.  
  6266.         
  6267.  
  6268. æKY PAttachPH
  6269. æFp AppleTalk.p
  6270. æT FUNCTION
  6271. æD FUNCTION PAttachPH(thePBptr: MPPPBPtr;async: BOOLEAN): OSErr;
  6272. æDT myVariable := PAttachPH(thePBptr,async);
  6273. æRI II-308, V-513
  6274. æC AttachPH function
  6275.  
  6276. Parameter block
  6277.     ->  26  csCode        word     ;always attachPH
  6278.     ->  28  protType      byte     ;ALAP protocol type
  6279.     ->  30  handler       pointer  ;protocol handler
  6280.  
  6281. AttachPH adds the protocol handler pointed to by handler to the node's protocol 
  6282. table.  ProtType specifies what kind of frame the protocol handler can service.  
  6283.  
  6284. After AttachPH is called, the protocol handler is called for each incoming frame 
  6285. whose ALAP protocol type equals protType.
  6286.  
  6287. Result codes    
  6288.  
  6289.    noErr         No error
  6290.    lapProtErr    Error attaching protocol type
  6291.  
  6292. æKY PDetachPH
  6293. æFp AppleTalk.p
  6294. æT FUNCTION
  6295. æD FUNCTION PDetachPH(thePBptr: MPPPBPtr;async: BOOLEAN): OSErr;
  6296. æDT myVariable := PDetachPH(thePBptr,async);
  6297. æRI II-308, V-513
  6298. æC DetachPH function
  6299.  
  6300. Parameter block
  6301.     ->  26  csCode      word      ;always detachPH
  6302.     ->  28  protType    byte      ;ALAP protocol type
  6303.  
  6304. DetachPH removes from the node's protocol table the specified ALAP protocol type 
  6305. and corresponding protocol handler.
  6306.  
  6307. Result codes    
  6308.  
  6309.    noErr           No error
  6310.    lapProtErr      Error detaching protocol type
  6311.  
  6312. æKY PWriteLAP
  6313. æFp AppleTalk.p
  6314. æT FUNCTION
  6315. æD FUNCTION PWriteLAP(thePBptr: MPPPBPtr;async: BOOLEAN): OSErr;
  6316. æDT myVariable := PWriteLAP(thePBptr,async);
  6317. æRI II-307, V-513
  6318. æC WriteLAP function
  6319.  
  6320. Parameter block
  6321.  
  6322.     ->  26  csCode          word       ;always writeLAP
  6323.     ->  30  wdsPointer      pointer    ;write data structure
  6324.  
  6325. WriteLAP sends a frame to another node.  The frame data and destination of the 
  6326. frame are described by the write data structure pointed to by wdsPointer.  The 
  6327. first two data bytes of an ALAP frame sent to another computer using the 
  6328. AppleTalk Manager must indicate the length of the frame in bytes.  The ALAP 
  6329. protocol type byte must be in the range 1 to 127.
  6330.  
  6331. Result codes    
  6332.  
  6333.       noErr          No error
  6334.       excessCollsns  No CTS received after 32 RTS's
  6335.       ddpLengthErr   Packet length exceeds maximum
  6336.       lapProtErr     Invalid ALAP protocol type
  6337.  
  6338. æKY POpenSkt
  6339. æFp AppleTalk.p
  6340. æT FUNCTION
  6341. æD FUNCTION POpenSkt(thePBptr: MPPPBPtr;async: BOOLEAN): OSErr;
  6342. æDT myVariable := POpenSkt(thePBptr,async);
  6343. æRI II-311, V-513
  6344. æC OpenSkt function
  6345.  
  6346. Parameter block
  6347.  
  6348.     ->  26  csCode      word         ;always openSkt
  6349.     <-> 28  socket      byte         ;socket number
  6350.     ->  30  listener    pointer      ;socket listener
  6351.  
  6352. OpenSkt adds a socket and its socket listener to the socket table.  If the socket 
  6353. parameter is nonzero, it must be in the range 64 to 127, and it specifies the 
  6354. socket's number; if socket is 0, OpenSkt opens a socket with a socket number in the 
  6355. range 128 to 254, and returns it in the socket parameter.  Listener contains a 
  6356. pointer to the socket listener.
  6357.  
  6358. OpenSkt will return ddpSktErr if you pass the number of an already opened socket, 
  6359. if you pass a socket number greater than 127, or if the socket table is full (the 
  6360. socket table can hold a maximum of 12 sockets).
  6361.  
  6362. Result codes    
  6363.  
  6364.    noErr         No error
  6365.    ddpSktErr     Socket error
  6366.  
  6367. æKY PCloseSkt
  6368. æFp AppleTalk.p
  6369. æT FUNCTION
  6370. æD FUNCTION PCloseSkt(thePBptr: MPPPBPtr;async: BOOLEAN): OSErr;
  6371. æDT myVariable := PCloseSkt(thePBptr,async);
  6372. æRI II-312,V513
  6373. æC CloseSkt function
  6374.  
  6375. Parameter block
  6376.  
  6377.     ->  26  csCode  word    ;always closeSkt
  6378.     ->  28  socket  byte    ;socket number
  6379.  
  6380. CloseSkt removes the entry of the specified socket from the socket table.  If you 
  6381. pass a socket number of 0, or if you attempt to close a socket that isn't open, 
  6382. CloseSkt will return ddpSktErr.
  6383.  
  6384. Result codes    
  6385.  
  6386.    noErr      No error
  6387.    ddpSktErr  Socket error
  6388.  
  6389. æKY PWriteDDP
  6390. æFp AppleTalk.p
  6391. æT FUNCTION
  6392. æD FUNCTION PWriteDDP(thePBptr: MPPPBPtr;async: BOOLEAN): OSErr;
  6393. æDT myVariable := PWriteDDP(thePBptr,async);
  6394. æRI II-312,V-513
  6395. æC WriteDDP function
  6396.  
  6397. Parameter block
  6398.  
  6399.     ->  26  csCode            word        ;always writeDDP
  6400.     ->  28  socket            byte        ;socket number
  6401.     ->  29  checksumFlag      byte        ;checksum flag
  6402.     ->  30  wdsPointer        pointer     ;write data structure
  6403.  
  6404. WriteDDP sends a datagram to another socket.  WDSPointer points to a write data 
  6405. structure containing the datagram and the address of the destination socket.  If 
  6406. checksumFlag is TRUE, WriteDDP will compute the checksum for all datagrams 
  6407. requiring long headers.
  6408.  
  6409. Result codes    
  6410.  
  6411.       noErr          No error
  6412.       ddpLenErr      Datagram length too big
  6413.       ddpSktErr      Socket error
  6414.       noBridgeErr    No bridge found 
  6415.  
  6416. æKY PRegisterName
  6417. æFp AppleTalk.p
  6418. æT FUNCTION
  6419. æD FUNCTION PRegisterName(thePBptr: MPPPBPtr;async: BOOLEAN): OSErr;
  6420. æDT myVariable := PRegisterName(thePBptr,async);
  6421. æRI II-322,V-513
  6422. æC RegisterName function
  6423.  
  6424. Parameter block
  6425.  
  6426.     ->  26  csCode         word          ;always registerName
  6427.     ->  28  interval       byte          ;retry interval
  6428.     <-> 29  count          byte          ;retry count
  6429.     ->  30  ntQElPtr       pointer       ;names table element pointer 
  6430.     ->  34  verifyFlag     byte          ;set if verify needed 
  6431.  
  6432. RegisterName adds the name and address of an entity to the node's names table.  
  6433. NTQElPtr points to a names table entry containing the entity's name and internet 
  6434. address (in the form shown in Figure 13 above).  Meta-characters aren't allowed in 
  6435. the object and type fields of the entity name; the zone field, however, must contain 
  6436. the meta-character "*".  If verifyFlag is TRUE, RegisterName checks on the network 
  6437. to see if the name is already in use, and returns a result code of nbpDuplicate 
  6438. if so.  
  6439.  
  6440. Interval and count contain the retry interval in eight-tick units and the 
  6441. retry count.  
  6442. When a retry is made, the count field is modified.
  6443.  
  6444. Warning:  The names table entry passed to RegisterName remains the 
  6445.           property of NBP until removed from the names table.  Don't attempt to remove 
  6446.           or modify it.  If you've allocated memory using a NewHandle call, you must 
  6447.           lock it as long as the name is registered. 
  6448.  
  6449. Warning:  VerifyFlag should normally be set before calling RegisterName.
  6450.  
  6451. Result codes    
  6452.  
  6453.    noErr          No error
  6454.    nbpDuplicate   Duplicate name already exists
  6455.    nbpNISErr      Error opening names information socket 
  6456.  
  6457. æKY PLookupName
  6458. æFp AppleTalk.p
  6459. æT FUNCTION
  6460. æD FUNCTION PLookupName(thePBptr: MPPPBPtr;async: BOOLEAN): OSErr;
  6461. æDT myVariable := PLookupName(thePBptr,async);
  6462. æRI II-323,V-513
  6463. æC LookupName function
  6464.  
  6465. Parameter block
  6466.  
  6467.     ->   26 csCode        word      ;always lookupName
  6468.     ->   28 interval      byte      ;retry interval
  6469.     <->  29 count         byte      ;retry count
  6470.     ->   30 entityPtr     pointer   ;pointer to entity name
  6471.     ->   34 retBuffPtr    pointer   ;pointer to buffer
  6472.     ->   38 retBuffSize   word      ;buffer size in bytes
  6473.     ->   40 maxToGet      word      ;matches to get
  6474.     <->  42 numGotten     word      ;matches found 
  6475.  
  6476. LookupName returns the addresses of all entities with a specified name.  EntityPtr 
  6477. points to the entity's name (in the form shown in Figure 13 above).  Meta-
  6478. characters are allowed in the entity name.  RetBuffPtr and retBuffSize contain the 
  6479. location and size of an area of memory in which the tuples describing the entity 
  6480. names and their corresponding addresses should be returned.  MaxToGet indicates 
  6481. the maximum number of matching names to find addresses for; the actual number of 
  6482. addresses found is returned in numGotten.  Interval and count contain the retry 
  6483. interval and the retry count.  LookupName completes when either the number of 
  6484. matches is equal to or greater than maxToGet, or the retry count has been exceeded.  
  6485. The count field is decremented for each retransmission.
  6486.  
  6487. Note:  NumGotten is first set to 0 and then incremented with each match 
  6488.        found.  You can test the value in this field, and can start examining the 
  6489.        received addresses in the buffer while the lookup continues.
  6490.  
  6491. Result codes    
  6492.  
  6493.    noErr           No error
  6494.    nbpBuffOvr      Buffer overflow
  6495.  
  6496. æKY PConfirmName
  6497. æFp AppleTalk.p
  6498. æT FUNCTION
  6499. æD FUNCTION PConfirmName(thePBptr: MPPPBPtr;async: BOOLEAN): OSErr;
  6500. æDT myVariable := PConfirmName(thePBptr,async);
  6501. æRI II-323,V-513
  6502. æC ConfirmName function
  6503.  
  6504. Parameter block
  6505.  
  6506.     ->   26 csCode            word         ;always confirmName
  6507.     ->   28 interval          byte         ;retry interval
  6508.     <->  29  count            byte         ;retry count
  6509.     ->   30 entityPtr         pointer      ;pointer to entity name
  6510.     ->   34 confirmAddr       pointer      ;entity address
  6511.     <-   38 newSocket         byte         ;socket number
  6512.  
  6513. ConfirmName confirms that an entity known by name and address still exists (is 
  6514. still entered in the names directory).  EntityPtr points to the entity's name (in the 
  6515. form shown in Figure 13 above).  ConfirmAddr specifies the address to confirmed.  
  6516.  
  6517. No meta-characters are allowed in the entity name.  Interval and count contain the 
  6518. retry interval and the retry count.  The socket number of the entity is returned in 
  6519. newSocket.  ConfirmName is more efficient than LookupName in terms of network 
  6520. traffic.
  6521.  
  6522. Result codes    
  6523.  
  6524.    noErr           No error
  6525.    nbpConfDiff     Name confirmed for different socket
  6526.    nbpNoConfirm    Name not confirmed
  6527.  
  6528. æKY PRemoveName
  6529. æFp AppleTalk.p
  6530. æT FUNCTION
  6531. æD FUNCTION PRemoveName(thePBptr: MPPPBPtr;async: BOOLEAN): OSErr;
  6532. æDT myVariable := PRemoveName(thePBptr,async);
  6533. æRI II-324,V-513
  6534. æC RemoveName function
  6535.  
  6536. Parameter block
  6537.  
  6538.     ->  26  csCode       word        ;always removeName 
  6539.     ->  30  entityPtr    pointer     ;pointer to entity name 
  6540.  
  6541. RemoveName removes an entity name from the names table of the given entity's node.
  6542.  
  6543. Result codes    
  6544.  
  6545.    noErr            No error
  6546.    nbpNotFound      Name not found 
  6547.  
  6548. æKY PSetSelfSend
  6549. æFp AppleTalk.p
  6550. æT FUNCTION
  6551. æD FUNCTION PSetSelfSend(thePBptr: MPPPBPtr;async: BOOLEAN): OSErr;
  6552. æDT myVariable := PSetSelfSend(thePBptr,async);
  6553. æRI V-516
  6554. æC  
  6555. _______________________________________________________________________________
  6556.  
  6557. »SENDING PACKETS TO ONE’S OWN NODE
  6558. _______________________________________________________________________________
  6559.  
  6560. Upon opening, the ability to send a packet to one’s own node (intranode delivery) is
  6561. disabled.  This feature of the AppleTalk Manager can be manipulated through the
  6562. SetSelfSend function.  Once enabled, it is possible, at all levels, to send packets
  6563. to entities within one’s own node.  An example of where this might be desirable is an
  6564. application sending data to a print spooler that is actually running in the background
  6565. on the same node.
  6566.  
  6567. Enabling (or disabling) this feature affects the entire node and should be performed
  6568. with care.  For instance, a desk accessory may not expect to receive names from
  6569. within its own node as a response to an NBP look-up;  enabling this feature from an
  6570. application could break the desk accessory.  All future programs should be written
  6571. with this feature in mind.
  6572.  
  6573. FUNCTION PSetSelfSend (thePBptr: MPPPBPtr; async: BOOLEAN) : OSErr;
  6574.  
  6575. Parameter Block
  6576.   -->    26    csCode         word    Always PSetSelfSend
  6577.   -->    28    newSelfFlag    byte    New SelfSend flag
  6578.   <--    29    oldSelfFlag    byte    Old SelfSend flag
  6579.  
  6580. PSetSelfSend enables or disables the intranode delivery feature of the AppleTalk
  6581. Manager.  If newSelfFlag is nonzero, the feature will be enabled; otherwise it will
  6582. be disabled.  The previous value of the flag will be returned in oldSelfFlag.
  6583.  
  6584. Result Codes    noErr        No error
  6585.  
  6586. æKY PKillNBP
  6587. æFp AppleTalk.p
  6588. æT FUNCTION
  6589. æD FUNCTION PKillNBP(thePBptr: MPPPBPtr;async: BOOLEAN): OSErr;
  6590. æDT myVariable := PKillNBP(thePBptr,async);
  6591. æRI V-518
  6592. æC  
  6593. _______________________________________________________________________________
  6594.  
  6595. »NAME BINDING PROTOCOL CHANGES
  6596. _______________________________________________________________________________
  6597.  
  6598. Changes to the Name Binding Protocol include supporting multiple concurrent requests
  6599. and a means for aborting an active request.
  6600.  
  6601. »Multiple Concurrent NBP Requests
  6602.  
  6603. NBP now supports multiple concurrent active requests.  Specifically, a number of
  6604. LookupNames, RegisterNames and ConfirmNames can all be active concurrently.  The
  6605. maximum number of  concurrent requests is machine dependent; if it is exceeded the
  6606. error tooManyReqs will be returned.  Active requests can be aborted by the PKillNBP
  6607. call.
  6608.  
  6609. »KillNBP function
  6610.  
  6611. FUNCTION PKillNBP (thePBptr: ATPPBPtr; async: BOOLEAN) : OSErr;
  6612.  
  6613. •••Refer to Technical Note #199:•••
  6614.  
  6615. Parameter block
  6616.   -->    26    csCode    word     Always PKillNBP
  6617.   -->    28    aKillQEl  pointer  Pointer to queue element
  6618.  
  6619. PKillNBP is used to abort an outstanding LookupName, RegisterName or ConfirmName
  6620. request.  To abort one of these calls, place a pointer to the queue element of the
  6621. call to abort in a KillQEl and issue the PKillNBP call.  The call will be completed
  6622. with a ReqAborted error.
  6623.  
  6624. Result Codes    noErr          No error
  6625.                 cbNotFound     aKillQEl does not point to a valid
  6626.                                NBP queue element
  6627.  
  6628. æKY PGetAppleTalkInfo
  6629. æFp AppleTalk.p
  6630. æT FUNCTION
  6631. æD FUNCTION PGetAppleTalkInfo(thePBptr: MPPPBPtr;async: BOOLEAN): OSErr;
  6632. æDT myVariable := PGetAppleTalkInfo(thePBptr,async);
  6633. æRI V-518
  6634. æC  
  6635. _______________________________________________________________________________
  6636.  
  6637. »NAME BINDING PROTOCOL CHANGES
  6638. _______________________________________________________________________________
  6639.  
  6640. Changes to the Name Binding Protocol include supporting multiple concurrent requests
  6641. and a means for aborting an active request.
  6642.  
  6643. »Multiple Concurrent NBP Requests
  6644.  
  6645. NBP now supports multiple concurrent active requests.  Specifically, a number of
  6646. LookupNames, RegisterNames and ConfirmNames can all be active concurrently.  The
  6647. maximum number of  concurrent requests is machine dependent; if it is exceeded the
  6648. error tooManyReqs will be returned.  Active requests can be aborted by the PKillNBP
  6649. call.
  6650.  
  6651. »KillNBP function
  6652.  
  6653. FUNCTION PKillNBP (thePBptr: ATPPBPtr; async: BOOLEAN) : OSErr;
  6654.  
  6655. •••Refer to Technical Note #199:•••
  6656.  
  6657. Parameter block
  6658.   -->    26    csCode    word     Always PKillNBP
  6659.   -->    28    aKillQEl  pointer  Pointer to queue element
  6660.  
  6661. PKillNBP is used to abort an outstanding LookupName, RegisterName or ConfirmName
  6662. request.  To abort one of these calls, place a pointer to the queue element of the
  6663. call to abort in a KillQEl and issue the PKillNBP call.  The call will be completed
  6664. with a ReqAborted error.
  6665.  
  6666. Result Codes    noErr          No error
  6667.                 cbNotFound     aKillQEl does not point to a valid
  6668.                                NBP queue element
  6669.  
  6670. æKY PATalkClosePrep
  6671. æFp AppleTalk.p
  6672. æT FUNCTION
  6673. æD FUNCTION PATalkClosePrep(thePBptr: MPPPBPtr;async: BOOLEAN): OSErr;
  6674. æDT myVariable := PATalkClosePrep(thePBptr,async);
  6675. æRI V-518
  6676. æC  
  6677. _______________________________________________________________________________
  6678.  
  6679. »NAME BINDING PROTOCOL CHANGES
  6680. _______________________________________________________________________________
  6681.  
  6682. Changes to the Name Binding Protocol include supporting multiple concurrent requests
  6683. and a means for aborting an active request.
  6684.  
  6685. »Multiple Concurrent NBP Requests
  6686.  
  6687. NBP now supports multiple concurrent active requests.  Specifically, a number of
  6688. LookupNames, RegisterNames and ConfirmNames can all be active concurrently.  The
  6689. maximum number of  concurrent requests is machine dependent; if it is exceeded the
  6690. error tooManyReqs will be returned.  Active requests can be aborted by the PKillNBP
  6691. call.
  6692.  
  6693. »KillNBP function
  6694.  
  6695. FUNCTION PKillNBP (thePBptr: ATPPBPtr; async: BOOLEAN) : OSErr;
  6696.  
  6697. •••Refer to Technical Note #199:•••
  6698.  
  6699. Parameter block
  6700.   -->    26    csCode    word     Always PKillNBP
  6701.   -->    28    aKillQEl  pointer  Pointer to queue element
  6702.  
  6703. PKillNBP is used to abort an outstanding LookupName, RegisterName or ConfirmName
  6704. request.  To abort one of these calls, place a pointer to the queue element of the
  6705. call to abort in a KillQEl and issue the PKillNBP call.  The call will be completed
  6706. with a ReqAborted error.
  6707.  
  6708. Result Codes    noErr          No error
  6709.                 cbNotFound     aKillQEl does not point to a valid
  6710.                                NBP queue element
  6711.  
  6712. æKY POpenATPSkt
  6713. æFp AppleTalk.p
  6714. æT FUNCTION
  6715. æD FUNCTION POpenATPSkt(thePBptr: ATPPBPtr;async: BOOLEAN): OSErr;
  6716. æDT myVariable := POpenATPSkt(thePBptr,async);
  6717. æRI II-315,V-513
  6718. æC OpenATPSkt function
  6719.  
  6720. Parameter block
  6721.  
  6722.     ->  26 csCode        word         ;always openATPSkt
  6723.     <-> 28  atpSocket    byte         ;socket number
  6724.     ->  30  addrBlock    long word    ;socket request specification
  6725.  
  6726. OpenATPSkt opens a socket for the purpose of receiving requests.  ATPSocket 
  6727. contains the socket number of the socket to open.  If it's 0, a number is dynamically 
  6728. assigned and returned in atpSocket.  AddrBlock contains a specification of the 
  6729. socket addresses from which requests will be accepted.  A 0 in the network number, 
  6730. node ID, or socket number field of addrBlock means that requests will be accepted 
  6731. from every network, node, or socket, respectively.
  6732.  
  6733. Result codes    
  6734.  
  6735.    noErr             No error
  6736.    tooManySkts       Too many responding sockets
  6737.    noDataArea        Too many outstanding ATP calls
  6738.  
  6739. æKY PCloseATPSkt
  6740. æFp AppleTalk.p
  6741. æT FUNCTION
  6742. æD FUNCTION PCloseATPSkt(thePBPtr: ATPPBPtr;async: BOOLEAN): OSErr;
  6743. æDT myVariable := PCloseATPSkt(thePBPtr,async);
  6744. æRI II-316,V-513
  6745. æC CloseATPSkt function
  6746.  
  6747. Parameter block
  6748.     ->  26  csCode     word ;always closeATPSkt
  6749.     ->  28  atpSocket   byte    ;socket number
  6750.  
  6751. CloseATPSkt closes the socket whose number is specified by atpSocket, for the 
  6752. purpose of receiving requests.
  6753.  
  6754. Result codes    
  6755.    noErr      No error
  6756.  
  6757. æKY PSendRequest
  6758. æFp AppleTalk.p
  6759. æT FUNCTION
  6760. æD FUNCTION PSendRequest(thePBPtr: ATPPBPtr;async: BOOLEAN): OSErr;
  6761. æDT myVariable := PSendRequest(thePBPtr,async);
  6762. æRI II-316,V-513
  6763. æC SendRequest function
  6764.  
  6765. Parameter block
  6766.  
  6767.     ->   18 userData         long word      ;user bytes
  6768.     <-   22 reqTID           word           ;transaction ID used in request
  6769.     ->   26 csCode           word           ;always sendRequest
  6770.     <-   28 currBitMap       byte           ;bit map
  6771.     <->  29 atpFlags         byte           ;control information
  6772.     ->   30 addrBlock        long word      ;destination socket address
  6773.     ->   34 reqLength        word           ;request size in bytes
  6774.     ->   36 reqPointer       pointer        ;pointer to request data
  6775.     ->   40 bdsPointer       pointer        ;pointer to response BDS
  6776.     ->   44 numOfBuffs       byte           ;number of responses expected
  6777.     ->   45 timeOutVal       byte           ;timeout interval
  6778.     <-   46 numOfResps       byte           ;number of responses received
  6779.     <->  47 retryCount       byte           ;number of retries
  6780.  
  6781. SendRequest sends a request to another socket and waits for a response.  UserData 
  6782. contains the four user bytes.  AddrBlock indicates the socket to which the request 
  6783. should be sent.  ReqLength and reqPointer contain the size and location of the 
  6784. request to send.  BDSPointer points to a response BDS where the responses are to be 
  6785. returned; numOfBuffs indicates the number of responses requested.  The number of 
  6786. responses received is returned in numOfResps.  If a nonzero value is returned in 
  6787. numOfResps, you can examine currBitMap to determine which packets of the 
  6788. transaction were actually received and to detect pieces for higher-level recovery, 
  6789. if desired.
  6790.  
  6791. TimeOutVal indicates the number of seconds that SendRequest should wait for a 
  6792. response before resending the request.  RetryCount indicates the maximum number 
  6793. of retries SendRequest should attempt.  The end-of-message flag of atpFlags will 
  6794. be set if the EOM bit is set in the last packet received in a valid response
  6795. sequence.  
  6796. The exactly-once flag should be set if you want the request to be part of an 
  6797. exactly-once transaction.
  6798.  
  6799. To cancel a SendRequest call, you need the transaction ID; it's returned in reqTID.  
  6800. You can examine reqTID before the completion of the call, but its contents are valid 
  6801. only after the tidValid bit of atpFlags has been set.
  6802. SendRequest completes when either an entire response is received or the retry 
  6803. count is exceeded.
  6804.  
  6805. Note:  The value provided in retryCount will be modified during SendRequest 
  6806.        if any retries are made.  This field is used to monitor the number of retries; 
  6807.        for each retry, it's decremented by 1.
  6808.  
  6809. Result codes    
  6810.  
  6811.    noErr             No error
  6812.       reqFailed      Retry count exceeded
  6813.       tooManyReqs      Too many concurrent requests
  6814.       noDataArea        Too many outstanding ATP calls
  6815.       reqAborted        Request canceled by user
  6816.  
  6817. æKY PGetRequest
  6818. æFp AppleTalk.p
  6819. æT FUNCTION
  6820. æD FUNCTION PGetRequest(thePBPtr: ATPPBPtr;async: BOOLEAN): OSErr;
  6821. æDT myVariable := PGetRequest(thePBPtr,async);
  6822. æRI II-317,V-513
  6823. æC GetRequest function
  6824.  
  6825. Parameter block
  6826.  
  6827.     <-   18 userData       long word   ;user bytes
  6828.     ->   26 csCode         word        ;always getRequest
  6829.     ->   28 atpSocket      byte        ;socket number
  6830.     <-   29 atpFlags       byte        ;control information
  6831.     <-   30 addrBlock      long word   ;source of request
  6832.     <->  34 reqLength      word        ;request buffer size
  6833.     ->   36 reqPointer     pointer     ;pointer to request buffer
  6834.     <-   44 bitMap         byte        ;bit map
  6835.     <-   46 transID        word        ;transaction ID
  6836.  
  6837. GetRequest sets up the mechanism to receive a request sent by a SendRequest call.  
  6838. UserData returns the four user bytes from the request.  ATPSocket contains the 
  6839. socket number of the socket that should listen for a request.  The internet address 
  6840. of the socket from which the request was sent is returned in addrBlock.  ReqLength 
  6841. and reqPointer indicate the size (in bytes) and location of a buffer to store the 
  6842. incoming request.  The actual size of the request is returned in reqLength.  The 
  6843. transaction bit map and transaction ID will be returned in bitMap and transID.  The 
  6844. exactly-once flag in atpFlags will be set if the request is part of an exactly-once 
  6845. transaction.
  6846.  
  6847. GetRequest completes when a request is received.
  6848.  
  6849. Result codes    
  6850.  
  6851.    noErr      No error
  6852.    badATPSkt  Bad responding socket
  6853.  
  6854. æKY PSendResponse
  6855. æFp AppleTalk.p
  6856. æT FUNCTION
  6857. æD FUNCTION PSendResponse(thePBPtr: ATPPBPtr;async: BOOLEAN): OSErr;
  6858. æDT myVariable := PSendResponse(thePBPtr,async);
  6859. æRI II-317,V-513
  6860. æC SendResponse function
  6861.  
  6862. Parameter block
  6863.  
  6864.     <-  18  userData      long word     ;user bytes from TRel
  6865.     <-  22  reqTID        word          ;transaction ID used in request
  6866.     ->  26  csCode        word          ;always sendResponse
  6867.     ->  28  atpSocket     byte          ;socket number
  6868.     ->  29  atpFlags      byte          ;control information
  6869.     ->  30  addrBlock     long word     ;response destination
  6870.     ->  40  bdsPointer    pointer       ;pointer to response BDS 
  6871.     ->  44  numOfBuffs    byte          ;number of response packets being sent
  6872.     ->  45  bdsSize       byte          ;BDS size in elements
  6873.     ->  46  transID       word          ;transaction ID 
  6874.  
  6875. SendResponse sends a response to a socket.  If the response was part of an exactly-
  6876. once transaction, userData will contain the user bytes from the TRel packet.  
  6877. ATPSocket contains the socket number from which the response should be sent.  The 
  6878. end-of-message flag in atpFlags should be set if the response contains the final 
  6879. packet in a transaction composed of a group of packets and the number of responses 
  6880. is less than requested.  AddrBlock indicates the address of the socket to which the 
  6881. response should be sent.  BDSPointer points to a response BDS containing room for 
  6882. the maximum number of responses to be sent; bdsSize contains this maximum 
  6883. number.  NumOfBuffs contains the number of response packets to be sent in this 
  6884. call; you may wish to make AddResponse calls to complete the response.  TransID 
  6885. indicates the transaction ID of the associated request.
  6886.  
  6887. During exactly-once transactions, SendResponse doesn't complete until either a 
  6888. TRel packet is received from the socket that made the request, or the retry count is 
  6889. exceeded.
  6890.  
  6891. Result codes    
  6892.  
  6893.       noErr              No error
  6894.       badATPSkt          Bad responding socket
  6895.       noRelErr           No release received
  6896.       noDataArea         Too many outstanding ATP calls
  6897.       badBuffNum         Sequence number out of range
  6898.  
  6899. æKY PAddResponse
  6900. æFp AppleTalk.p
  6901. æT FUNCTION
  6902. æD FUNCTION PAddResponse(thePBPtr: ATPPBPtr;async: BOOLEAN): OSErr;
  6903. æDT myVariable := PAddResponse(thePBPtr,async);
  6904. æRI II-318,V-513
  6905. æC AddResponse function
  6906.  
  6907. Parameter block
  6908.  
  6909.     ->  18  userData        long word   ;user bytes
  6910.     ->  26  csCode          word        ;always addResponse
  6911.     ->  28  atpSocket       byte        ;socket number
  6912.     ->  29  atpFlags        byte        ;control information
  6913.     ->  30  addrBlock       long word   ;response destination
  6914.     ->  34  reqLength       word        ;response size
  6915.     ->  36  reqPointer      pointer     ;pointer to response
  6916.     ->  44  rspNum          byte        ;sequence number
  6917.     ->  46  transID         word        ;transaction ID
  6918.  
  6919. AddResponse sends an additional response packet to a socket that has already been 
  6920. sent the initial part of a response via SendResponse.  UserData contains the four 
  6921. user bytes.  ATPSocket contains the socket number from which the response should 
  6922. be sent.  The end-of-message flag in atpFlags should be set if this response packet 
  6923. is the final packet in a transaction composed of a group of packets and the number 
  6924. of responses is less than requested.  AddrBlock indicates the socket to which the 
  6925. response should be sent.  ReqLength and reqPointer contain the size (in bytes) and 
  6926. location of the response to send; rspNum indicates the sequence number of the 
  6927. response (in the range 0 to 7).  TransID must contain the transaction ID.
  6928.  
  6929. Warning:  If the transaction is part of an exactly-once transaction, the buffer 
  6930.           used in the AddResponse call must not be altered or released until the 
  6931.           corresponding SendResponse call has completed. 
  6932.  
  6933. Result codes    
  6934.  
  6935.       noErr           No error
  6936.       badATPSkt       Bad responding socket
  6937.       noSendResp      AddResponse issued before SendResponse
  6938.       badBuffNum      Sequence number out of range
  6939.       noDataArea      Too many outstanding ATP calls
  6940.  
  6941. æKY PRelTCB
  6942. æFp AppleTalk.p
  6943. æT FUNCTION
  6944. æD FUNCTION PRelTCB(thePBPtr: ATPPBPtr;async: BOOLEAN): OSErr;
  6945. æDT myVariable := PRelTCB(thePBPtr,async);
  6946. æRI II-319,V-513
  6947. æC RelTCB function
  6948.  
  6949. Parameter block
  6950.  
  6951.     ->  26  csCode        word          ;always relTCB
  6952.     ->  30  addrBlock     long word     ;destination of request
  6953.     ->  46  transID       word          ;transaction ID of request
  6954.  
  6955. RelTCB dequeues the specified SendRequest call and returns the result code 
  6956. reqAborted for the aborted call.  The transaction ID can be obtained from the reqTID 
  6957. field of the SendRequest queue entry; see the description of SendRequest for details.
  6958.  
  6959. Result codes    
  6960.  
  6961.    noErr            No error
  6962.    cbNotFound       ATP control block not found
  6963.    noDataArea       Too many outstanding ATP calls
  6964.  
  6965. æKY PRelRspCB
  6966. æFp AppleTalk.p
  6967. æT FUNCTION
  6968. æD FUNCTION PRelRspCB(thePBPtr: ATPPBPtr;async: BOOLEAN): OSErr;
  6969. æDT myVariable := PRelRspCB(thePBPtr,async);
  6970. æRI II-319,V-514
  6971. æC RelRspCB function
  6972.  
  6973. Parameter block
  6974.  
  6975.     ->  26  csCode        word        ;always relRspCB
  6976.     ->  28  atpSocket     byte        ;socket number that request was received on
  6977.     ->  30  addrBlock     long word   ;source of request
  6978.     ->  46  transID       word        ;transaction ID of request
  6979.  
  6980. In an exactly-once transaction, RelRspCB cancels the specified SendResponse, 
  6981. without waiting for the release timer to expire or a TRel packet to be received.  No 
  6982. error is returned for the SendResponse call.  Whan called to cancel a transaction 
  6983. that isn't using exactly-once service, RelRspCB returns cbNotFound.  The 
  6984. transaction ID can be obtained from the reqTID field of the SendResponse queue 
  6985. entry; see the description of SendResponse for details.
  6986.  
  6987. Result codes    
  6988.  
  6989.    noErr            No error
  6990.    cbNotFound       ATP control block not found
  6991.  
  6992. æKY PNSendRequest
  6993. æFp AppleTalk.p
  6994. æT FUNCTION
  6995. æD FUNCTION PNSendRequest(thePBPtr: ATPPBPtr;async: BOOLEAN): OSErr;
  6996. æDT myVariable := PNSendRequest(thePBPtr,async);
  6997. æRI V-516
  6998. æC  
  6999. »Sending an ATP Request Through a Specified Socket
  7000.  
  7001. ATP requests can now be sent through client-specified sockets.  ATP previously would
  7002. open a dynamic socket, send the request through it, and close the socket when the
  7003. request was completed.  The client can now choose to send a request through an already-opened
  7004. socket; this also allows more than one request to be sent per socket.   A new call,
  7005. PNSendRequest, has been added for this purpose.  The function of the old SendRequest
  7006. call itself remains unchanged.
  7007.  
  7008. FUNCTION PNSendRequest (thePBptr: ATPBPtr; async: BOOLEAN) : OSErr;
  7009.  
  7010. Parameter block
  7011.   -->    18    userData     longword  User bytes
  7012.   <--    22    reqTID       word      Transaction ID used in request
  7013.   -->    26    csCode       word      Always sendRequest
  7014.   <->    28    atpSocket    byte      Socket to send request on
  7015.                                        or current bitmap
  7016.   <->    29    atpFlags     byte      Control information
  7017.   -->    30    addrBlock    longword  Destination socket address
  7018.   -->    34    reqLength    word      Request size in bytes
  7019.   -->    36    reqPointer   pointer   Pointer to request data
  7020.   -->    40    bdsPointer   pointer   Pointer to response BDS
  7021.   -->    44    numOfBuffs   byte      Number of responses expected
  7022.   -->    45    timeOutVal   byte      Timeout interval
  7023.   <--    46    numOf Resps  byte      Number of responses received
  7024.   <->    47    retryCount   byte      Number of retries
  7025.   <--    48    intBuff      word      Used internally
  7026.  
  7027. The PNSendRequest call is functionally equivalent to the SendRequest call, however
  7028. PNSendRequest allows you to specify, in the atpSocket field, the socket through which
  7029. the request is to be sent.  This socket must have been previously opened through an
  7030. OpenATPSkt request (otherwise a badATPSkt error will be returned).  Note that PNSendRequest
  7031. requires two additional bytes of memory at the end of the parameter block, immediately
  7032. following the retryCount.  These bytes are for the internal use of the AppleTalk
  7033. Manager and should not be modified while the PNSendRequest call is active.
  7034.  
  7035. There is a machine-dependent limit as to the number of concurrent PNSendRequests that
  7036. can be active on a given socket.  If this limit is exceeded, the error tooManyReqs is
  7037. returned.
  7038.  
  7039. One additional difference between SendRequest and PNSendRequest is that a PNSendRequest
  7040. can only be aborted by a PKillSendReq call (see below), whereas a SendRequest can be
  7041. aborted by either a RelTCB or KillSendReq call.
  7042.  
  7043. Result Codes    noErr          No error
  7044.                 reqFailed      Retry count exceeded
  7045.                 tooManyReqs    Too many concurrent requests
  7046.                 noDataArea     Too many outstanding ATP calls
  7047.                 reqAborted     Request cancelled by user
  7048.  
  7049. æKY PKillSendReq
  7050. æFp AppleTalk.p
  7051. æT FUNCTION
  7052. æD FUNCTION PKillSendReq(thePBPtr: ATPPBPtr;async: BOOLEAN): OSErr;
  7053. æDT myVariable := PKillSendReq(thePBPtr,async);
  7054. æRI V-517
  7055. æC  
  7056. »Aborting ATP SendRequests
  7057.  
  7058. The  RelTCB call is still supported, but only for aborting SendRequests.  To abort
  7059. PNSendRequests, a new call, PKillSendReq, has been added.  This call will abort both
  7060. SendRequests and PNSendRequests.  PKillSendReq’s only argument is the queue element
  7061. pointer of the request to be aborted.  The queue element pointer is passed at the
  7062. offset of the PKillSendReq queue element specified by aKillQE1.
  7063.  
  7064. FUNCTION PKillSendReq (thePBptr: ATPPBPtr; async: BOOLEAN) : OSErr;
  7065.  
  7066. Parameter block
  7067.   -->    26    csCode    word     Always PKillSendReq
  7068.   -->    44    aKillQEl  pointer  Pointer to queue element
  7069.  
  7070. PKillSendReq is functionally equivalent to RelTCB, except that it takes different
  7071. arguments and will abort both SendRequests and PNSendRequests.  To abort one of these
  7072. calls, place a pointer to the queue element of the call to abort in aKillQEl and
  7073. issue the PKillSendReq call.
  7074.  
  7075. Result Codes    noErr          No error
  7076.                 cbNotFound     aKillQEl does not point to a SendReq
  7077.                                or NSendReq queue element
  7078.  
  7079. æKY PKillGetReq
  7080. æFp AppleTalk.p
  7081. æT FUNCTION
  7082. æD FUNCTION PKillGetReq(thePBPtr: ATPPBPtr;async: BOOLEAN): OSErr;
  7083. æDT myVariable := PKillGetReq(thePBPtr,async);
  7084. æRI V-518
  7085. æC  
  7086. »Aborting ATP GetRequests
  7087.  
  7088. ATP GetRequests can now be aborted through the PKillGetReq call.  This call looks and
  7089. works just like the PKillSendReq call, and is used to abort a specific GetRequest
  7090. call.  Previously it was necessary to close the socket  to abort all GetRequest calls
  7091. on the socket.
  7092.  
  7093. FUNCTION PKillGetReq (thePBptr: ATPPBPtr; async: BOOLEAN) : OSErr;
  7094.  
  7095. Parameter block
  7096.   -->    26    csCode    word     Always PKillGetReq
  7097.   -->    44    aKillQEl  pointer  Pointer to queue element
  7098.  
  7099. PKillGetReq will abort a specific outstanding GetRequest call (as opposed to closing
  7100. the socket, which aborts all outstanding GetRequests on that socket).  The call will
  7101. be completed with a reqAborted error.  To abort a GetRequest, place a pointer to the
  7102. queue element of the call to abort in aKillQEl and issue the PKillGetReq call.
  7103.  
  7104. Result Codes    noErr         No error
  7105.                 cbNotFound    aKillQEl does not point to a GetReq
  7106.                               queue element
  7107.  
  7108. æKY ATPKillAllGetReq
  7109. æFp AppleTalk.p
  7110. æT FUNCTION
  7111. æD FUNCTION ATPKillAllGetReq(thePBPtr: ATPPBPtr;async: BOOLEAN): OSErr;
  7112. æDT myVariable := ATPKillAllGetReq(thePBPtr,async);
  7113. æRI V-518
  7114. æC  
  7115. »Aborting ATP GetRequests
  7116.  
  7117. ATP GetRequests can now be aborted through the PKillGetReq call.  This call looks and
  7118. works just like the PKillSendReq call, and is used to abort a specific GetRequest
  7119. call.  Previously it was necessary to close the socket  to abort all GetRequest calls
  7120. on the socket.
  7121.  
  7122. FUNCTION PKillGetReq (thePBptr: ATPPBPtr; async: BOOLEAN) : OSErr;
  7123.  
  7124. Parameter block
  7125.   -->    26    csCode    word     Always PKillGetReq
  7126.   -->    44    aKillQEl  pointer  Pointer to queue element
  7127.  
  7128. PKillGetReq will abort a specific outstanding GetRequest call (as opposed to closing
  7129. the socket, which aborts all outstanding GetRequests on that socket).  The call will
  7130. be completed with a reqAborted error.  To abort a GetRequest, place a pointer to the
  7131. queue element of the call to abort in aKillQEl and issue the PKillGetReq call.
  7132.  
  7133. Result Codes    noErr         No error
  7134.                 cbNotFound    aKillQEl does not point to a GetReq
  7135.                               queue element
  7136.  
  7137. æKY BuildLAPwds
  7138. æFp AppleTalk.p
  7139. æT PROCEDURE
  7140. æD PROCEDURE BuildLAPwds(wdsPtr: Ptr;dataPtr: Ptr;destHost: INTEGER;prototype: INTEGER;
  7141.     frameLen: INTEGER);
  7142. æDT BuildLAPwds(wdsPtr,dataPtr,destHost,prototype,frameLen);
  7143. æRI V-514
  7144. æC 
  7145. This routine builds a single-frame write data structure LAP WDS for use with the
  7146. PWriteLAP call.  Given a buffer of length frameLen pointed to by dataPtr, it fills in
  7147. the WDS pointed to by wdsPtr and sets the destination node and protocol type as
  7148. indicated by destHost and protoType, respectively.  The WDS indicated must contain at
  7149. least two elements.
  7150.  
  7151. æKY BuildDDPwds
  7152. æFp AppleTalk.p
  7153. æT PROCEDURE
  7154. æD PROCEDURE BuildDDPwds(wdsPtr: Ptr;headerPtr: Ptr;dataPtr: Ptr;netAddr: AddrBlock;
  7155.     ddpType: INTEGER;dataLen: INTEGER);
  7156. æDT BuildDDPwds(wdsPtr,headerPtr,dataPtr,netAddr,ddpType,dataLen);
  7157. æRI V-514
  7158. æC 
  7159. This routine builds a single-frame write data structure  DDP WDS, for use with the
  7160. PWriteDDP call.  Given a header buffer of at least 17 bytes pointed to by headerPtr
  7161. and a data buffer of length dataLen pointed to by dataPtr, it fills in the WDS pointed
  7162. to by wdsPtr, and sets the destination address and protocol type as indicated by
  7163. destaddress and DDPtype, respectively.  The WDS indicated must contain at least 3
  7164. elements.
  7165.  
  7166. æKY NBPSetEntity
  7167. æFp AppleTalk.p
  7168. æT PROCEDURE
  7169. æD PROCEDURE NBPSetEntity(buffer: Ptr;nbpObject: Str32;nbpType: Str32;nbpZone: Str32);
  7170. æDT NBPSetEntity(buffer,nbpObject,nbpType,nbpZone);
  7171. æRI V-514
  7172. æC 
  7173. This routine builds an NBP entity structure, for use with the PLookupNBP and PConfirmName
  7174. calls.  Given a buffer of at least the size of the EntityName data structure (99
  7175. bytes) pointed to by buffer, this routine sets the indicated object, type, and zone
  7176. in that buffer.
  7177.  
  7178. æKY NBPSetNTE
  7179. æFp AppleTalk.p
  7180. æT PROCEDURE
  7181. æD PROCEDURE NBPSetNTE(ntePtr: Ptr;nbpObject: Str32;nbpType: Str32;nbpZone: Str32;
  7182.     socket: INTEGER);
  7183. æDT NBPSetNTE(ntePtr,nbpObject,nbpType,nbpZone,socket);
  7184. æRI V-515
  7185. æC 
  7186. This routine builds an NBP names table entry, for use with the PRegisterName call. 
  7187. Given a names table entry of at least the size of the EntityName data structure plus
  7188. nine bytes (108 bytes) pointed to by ntePtr, this routine sets the indicated object,
  7189. type, zone, and socket in that names table entry.
  7190.  
  7191. æKY GetBridgeAddress
  7192. æFp AppleTalk.p
  7193. æT FUNCTION
  7194. æD FUNCTION GetBridgeAddress: INTEGER;
  7195. æDT myVariable := GetBridgeAddress;
  7196. æRT 132
  7197. æRI V-515, N132-2
  7198. æC 
  7199. This routine returns the current address of a bridge in the low byte, or zero if
  7200. there is none.
  7201.  
  7202. æKY BuildBDS
  7203. æFp AppleTalk.p
  7204. æT FUNCTION
  7205. æD FUNCTION BuildBDS(buffPtr: Ptr;bdsPtr: Ptr;buffSize: INTEGER): INTEGER;
  7206. æDT myVariable := BuildBDS(buffPtr,bdsPtr,buffSize);
  7207. æRI V-515
  7208. æC 
  7209. This routine builds a BDS, for use with the ATP calls.  Given a data buffer of length
  7210. buffSize pointed to by buffPtr, it fills in the BDS pointed to by bdsPtr.  The buffer
  7211. will be broken up into pieces of maximum size (578 bytes).  The user bytes in the BDS
  7212. are not modified by this routine.  This routine is provided only as a convenience;
  7213. generally the caller will be able to build the BDS completely from Pascal without
  7214. it.
  7215.  
  7216. æKY MPPOpen
  7217. æFp AppleTalk.p
  7218. æT FUNCTION
  7219. æD FUNCTION MPPOpen: OSErr;
  7220. æDT myVariable := MPPOpen;
  7221. æMM
  7222. æRT 224
  7223. æRI II-275
  7224. æC 
  7225. MPPOpen first checks whether the .MPP driver has already been loaded; if it has,
  7226. MPPOpen does nothing and returns noErr. If MPP hasn’t been loaded, MPPOpen attempts
  7227. to load it into the system heap. If it succeeds, it then initializes the driver’s
  7228. variables and goes through the process of dynamically assigning a node ID to that
  7229. Macintosh. On a Macintosh 512K or XL, it also loads the .ATP driver and NBP code into
  7230. the system heap.
  7231.  
  7232. If serial port B isn’t configured for AppleTalk, or is already in use, the .MPP
  7233. driver isn’t loaded and an appropriate result code is returned.
  7234.  
  7235. Result codes    noErr        No error
  7236.                 portInUse    Port B is already in use
  7237.                 portNotCf    Port B not configured for AppleTalk
  7238.  
  7239. æKY MPPClose
  7240. æFp AppleTalk.p
  7241. æT FUNCTION
  7242. æD FUNCTION MPPClose: OSErr;
  7243. æDT myVariable := MPPClose;
  7244. æMM
  7245. æRI II-275
  7246. æC 
  7247. MPPClose removes the .MPP driver, and any data structures associated with it, from
  7248. memory. If the .ATP driver or NBP code were also installed, they’re removed as well.
  7249. MPPClose also returns the use of port B to the Serial Driver.
  7250.  
  7251. Warning:  Since other co-resident programs may be using AppleTalk, it’s
  7252.           strongly recommended that you never use this call. MPPClose will
  7253.           completely disable AppleTalk; the only way to restore AppleTalk
  7254.           is to call MPPOpen again.
  7255.  
  7256. æKY LAPOpenProtocol
  7257. æFp AppleTalk.p
  7258. æT FUNCTION
  7259. æD FUNCTION LAPOpenProtocol(theLAPType: ABByte;protoPtr: Ptr): OSErr;
  7260. æDT myVariable := LAPOpenProtocol(theLAPType,protoPtr);
  7261. æMM
  7262. æRI II-277
  7263. æC 
  7264.  
  7265. æKY LAPCloseProtocol
  7266. æFp AppleTalk.p
  7267. æT FUNCTION
  7268. æD FUNCTION LAPCloseProtocol(theLAPType: ABByte): OSErr;
  7269. æDT myVariable := LAPCloseProtocol(theLAPType);
  7270. æMM
  7271. æRI II-277
  7272. æC 
  7273. LAPCloseProtocol removes from the node’s protocol table the specified ALAP protocol
  7274. type, as well as its protocol handler.
  7275.  
  7276. Warning:  Don’t close ALAP protocol type values 1 or 2. If you close these
  7277.           protocol types, DDP will be disabled; once disabled, the only way
  7278.           to restore DDP is to restart the system, or to close and then
  7279.           reopen AppleTalk.
  7280.  
  7281. Result codes    noErr         No error
  7282.                 lapProtErr    Error detaching protocol type
  7283.  
  7284. æKY LAPWrite
  7285. æFp AppleTalk.p
  7286. æT FUNCTION
  7287. æD FUNCTION LAPWrite(abRecord: ABRecHandle;async: BOOLEAN): OSErr;
  7288. æDT myVariable := LAPWrite(abRecord,async);
  7289. æMM
  7290. æRI II-277
  7291. æC 
  7292. ABusRecord
  7293.   <--    abOpcode                {always tLAPWrite}
  7294.   <--    abResult                {result code}
  7295.   -->    abUserReference         {for your use}
  7296.   -->    lapAddress.dstNodeID    {destination node ID}
  7297.   -->    lapAddress.lapProtType  {ALAP protocol type}
  7298.   -->    lapReqCount             {length of frame data}
  7299.   -->    lapDataPtr              {pointer to frame data}
  7300.  
  7301. LAPWrite sends a frame to another node. LAPReqCount and lapDataPtr specify the length
  7302. and location of the data to send. The lapAddress.lapProtType field indicates the ALAP
  7303. protocol type of the frame and the lapAddress.dstNodeID indicates the node ID of the
  7304. node to which the frame should be sent.
  7305.  
  7306. Note:  The first two bytes of an ALAP frame’s data must contain the length
  7307.        in bytes of that data, including the length bytes themselves.
  7308.  
  7309. Result codes    noErr            No error
  7310.                 excessCollsns    Unable to contact destination node;
  7311.                                  packet not sent
  7312.                 ddpLenErr        ALAP data length too big
  7313.                 lapProtErr       Invalid ALAP protocol type
  7314.  
  7315. æKY LAPRead
  7316. æFp AppleTalk.p
  7317. æT FUNCTION
  7318. æD FUNCTION LAPRead(abRecord: ABRecHandle;async: BOOLEAN): OSErr;
  7319. æDT myVariable := LAPRead(abRecord,async);
  7320. æMM
  7321. æRI II-278
  7322. æC  
  7323. ABusRecord
  7324.   <--    abOpcode                {always tLAPRead}
  7325.   <--    abResult                {result code}
  7326.   -->    abUserReference         {for your use}
  7327.   <--    lapAddress.dstNodeID    {destination node ID}
  7328.   <--    lapAddress.srcNodeID    {source node ID}
  7329.   -->    lapAddress.lapProtType  {ALAP protocol type}
  7330.   -->    lapReqCount             {buffer size in bytes}
  7331.   <--    lapActCount             {number of frame data bytes actually received}
  7332.   -->    lapDataPtr              {pointer to buffer}
  7333.  
  7334. LAPRead receives a frame from another node. LAPReqCount and lapDataPtr specify the
  7335. size and location of the buffer that will receive the frame data. If the buffer isn’t
  7336. large enough to hold all of the incoming frame data, the extra bytes will be discarded
  7337. and buf2SmallErr will be returned. The number of bytes actually received is returned
  7338. in lapActCount. Only frames with ALAP protocol type equal to lapAddress.lapProtType
  7339. will be received. The node IDs of the frame’s source and destination nodes are returned
  7340. in lapAddress.srcNodeID and lapAddress.dstNodeID. You can determine whether the
  7341. packet was broadcast to you by examining the value of lapAddress.dstNodeID—if the
  7342. packet was broadcast it’s equal to 255, otherwise it’s equal to your node ID.
  7343.  
  7344. Note:  You should issue LAPRead calls only for ALAP protocol types that were
  7345.        opened (via LAPOpenProtocol) to use the default protocol handler.
  7346.  
  7347. Warning:  If you close a protocol type for which there are still LAPRead
  7348.           calls pending, the calls will be canceled but the memory occupied
  7349.           by their ABusRecords will not be released. For this reason, before
  7350.           closing a protocol type, call LAPRdCancel to cancel any pending
  7351.           LAPRead calls associated with that protocol type.
  7352.  
  7353. Result codes    noErr           No error
  7354.                 buf2SmallErr    Frame too large for buffer
  7355.                 readQErr        Invalid protocol type or protocol type not
  7356.                                 found in table
  7357.  
  7358. æKY LAPRdCancel
  7359. æFp AppleTalk.p
  7360. æT FUNCTION
  7361. æD FUNCTION LAPRdCancel(abRecord: ABRecHandle): OSErr;
  7362. æDT myVariable := LAPRdCancel(abRecord);
  7363. æMM
  7364. æRI II-279
  7365. æC 
  7366. Given the handle to the ABusRecord of a previously made LAPRead call, LAPRdCancel
  7367. dequeues the LAPRead call, provided that a packet satisfying the LAPRead has not
  7368. already arrived. LAPRdCancel returns noErr if the LAPRead call is successfully removed
  7369. from the queue. If LAPRdCancel returns recNotFnd, check the abResult field to verify
  7370. that the LAPRead has been completed and determine its outcome.
  7371.  
  7372. Result codes    noErr        No error
  7373.                 readQErr     Invalid protocol type or protocol type not
  7374.                              found in table
  7375.                 recNotFnd    ABRecord not found in queue
  7376.  
  7377. »Example
  7378.  
  7379. This example sends an ALAP packet synchronously and waits asynchronously for a response.
  7380. Assume that both nodes are using a known protocol type (in this case, 73) to receive
  7381. packets, and that the destination node has a node ID of 4.
  7382.  
  7383. VAR
  7384.   myABRecord: ABRecHandle;
  7385.   myBuffer: PACKED ARRAY [0..599] OF CHAR; {buffer for both send and receive}
  7386.   myLAPType: Byte;
  7387.   errCode, index, dataLen: INTEGER;
  7388.   someText: Str255;
  7389.   async: BOOLEAN;
  7390.  
  7391. BEGIN
  7392.   errCode := MPPOpen;
  7393.   IF errCode <> noErr THEN
  7394.     WRITELN('Error in opening AppleTalk')
  7395.     {Maybe serial port B isn't available for use by AppleTalk}
  7396.   ELSE
  7397.     BEGIN
  7398.     {Call Memory Manager to allocate ABusRecord}
  7399.     myABRecord := ABRecHandle(NewHandle(lapSize));
  7400.     myLAPType := 73;
  7401.    {Enter myLAPType into protocol handler table and install default handler to }
  7402.     { service frames of that ALAP type. No packets of that ALAP type will be }
  7403.     { received until we call LAPRead.}
  7404.     errCode := LAPOpenProtocol(myLAPType, NIL);
  7405.     IF errCode <> noErr THEN
  7406.       WRITELN('Error while opening the protocol type')
  7407.       {Have we opened too many protocol types? Remember that DDP uses two of }
  7408.       { them.}
  7409.     ELSE
  7410.       BEGIN
  7411.       {Prepare data to be sent}
  7412.       someText := 'This data will be in the ALAP data area';
  7413.       {The .MPP implementation requires that the first two bytes of the ALAP }
  7414.       { data field contain the length of the data, including the length bytes }
  7415.       { themselves.}
  7416.       dataLen := LENGTH(someText) + 2;
  7417.       buffer[0] := CHR(dataLen DIV 256); {high byte of data length}
  7418.       buffer[1] := CHR(dataLen MOD 256); {low byte of data length}
  7419.       FOR index := 1 TO dataLen - 2 DO {stuff buffer with packet data}
  7420.         buffer[index + 1] := someText[index];
  7421.       async := FALSE;
  7422.       WITH myABRecord^^ DO {fill parameters in the ABusRecord}
  7423.         BEGIN
  7424.         lapAddress.lapProtType := myLAPType;
  7425.         lapAddress.dstNodeID := 4;
  7426.         lapReqCount := dataLen;
  7427.         lapDataPtr := @buffer;
  7428.         END;
  7429.       {Send the frame}
  7430.       errCode := LAPWrite(myABRecord, async);
  7431.       {In the case of a sync call, errCode and the abResult field of }
  7432.       { the myABRecord will contain the same result code. We can also }
  7433.       { reuse myABRecord, since we know whether the call has completed.}
  7434.       IF errCode <> noErr THEN
  7435.         WRITELN('Error while writing out the packet')
  7436.         {Maybe the receiving node wasn't on-line}
  7437.       ELSE
  7438.         BEGIN
  7439.         {We have sent out the packet and are now waiting for a response. We }
  7440.         { issue an async LAPRead call so that we don't “hang” waiting for a }
  7441.         { response that may not come.}
  7442.         async := TRUE;
  7443.         WITH myABRecord^^ DO
  7444.           BEGIN
  7445.           lapAddress.lapProtType := myLAPType;
  7446.           {ALAP type we want to receive }
  7447.           lapReqCount := 600; {our buffer is maximum size}
  7448.           lapDataPtr := @buffer;
  7449.           END;
  7450.         errCode := LAPRead(myABRecord, async); {wait for a packet}
  7451.         IF errCode <> noErr THEN
  7452.           WRITELN('Error while trying to queue up a LAPRead')
  7453.           {Was the protocol handler installed correctly?}
  7454.         ELSE
  7455.           BEGIN
  7456.           {We can either sit here in a loop and poll the abResult }
  7457.           { field or just exit our code and use the event }
  7458.           { mechanism to flag us when the packet arrives.}
  7459.           CheckForMyEvent; {your procedure for checking for a network event}
  7460.           errCode := LAPCloseProtocol(myLAPType);
  7461.           IF errCode <> noErr THEN
  7462.             WRITELN('Error while closing the protocol type');
  7463.           END;
  7464.         END;
  7465.       END;
  7466.     END;
  7467. END.
  7468.  
  7469. æKY LAPAddATQ
  7470. æFp AppleTalk.p
  7471. æT FUNCTION
  7472. æD FUNCTION LAPAddATQ(theATQEntry: ATQEntryPtr): OSErr;
  7473. æDT myVariable := LAPAddATQ(theATQEntry);
  7474. æMM
  7475. æRI II-279
  7476. æC 
  7477. Given the handle to the ABusRecord of a previously made LAPRead call, LAPRdCancel
  7478. dequeues the LAPRead call, provided that a packet satisfying the LAPRead has not
  7479. already arrived. LAPRdCancel returns noErr if the LAPRead call is successfully removed
  7480. from the queue. If LAPRdCancel returns recNotFnd, check the abResult field to verify
  7481. that the LAPRead has been completed and determine its outcome.
  7482.  
  7483. Result codes    noErr        No error
  7484.                 readQErr     Invalid protocol type or protocol type not
  7485.                              found in table
  7486.                 recNotFnd    ABRecord not found in queue
  7487.  
  7488. »Example
  7489.  
  7490. This example sends an ALAP packet synchronously and waits asynchronously for a response.
  7491. Assume that both nodes are using a known protocol type (in this case, 73) to receive
  7492. packets, and that the destination node has a node ID of 4.
  7493.  
  7494. VAR
  7495.   myABRecord: ABRecHandle;
  7496.   myBuffer: PACKED ARRAY [0..599] OF CHAR; {buffer for both send and receive}
  7497.   myLAPType: Byte;
  7498.   errCode, index, dataLen: INTEGER;
  7499.   someText: Str255;
  7500.   async: BOOLEAN;
  7501.  
  7502. BEGIN
  7503.   errCode := MPPOpen;
  7504.   IF errCode <> noErr THEN
  7505.     WRITELN('Error in opening AppleTalk')
  7506.     {Maybe serial port B isn't available for use by AppleTalk}
  7507.   ELSE
  7508.     BEGIN
  7509.     {Call Memory Manager to allocate ABusRecord}
  7510.     myABRecord := ABRecHandle(NewHandle(lapSize));
  7511.     myLAPType := 73;
  7512.    {Enter myLAPType into protocol handler table and install default handler to }
  7513.     { service frames of that ALAP type. No packets of that ALAP type will be }
  7514.     { received until we call LAPRead.}
  7515.     errCode := LAPOpenProtocol(myLAPType, NIL);
  7516.     IF errCode <> noErr THEN
  7517.       WRITELN('Error while opening the protocol type')
  7518.       {Have we opened too many protocol types? Remember that DDP uses two of }
  7519.       { them.}
  7520.     ELSE
  7521.       BEGIN
  7522.       {Prepare data to be sent}
  7523.       someText := 'This data will be in the ALAP data area';
  7524.       {The .MPP implementation requires that the first two bytes of the ALAP }
  7525.       { data field contain the length of the data, including the length bytes }
  7526.       { themselves.}
  7527.       dataLen := LENGTH(someText) + 2;
  7528.       buffer[0] := CHR(dataLen DIV 256); {high byte of data length}
  7529.       buffer[1] := CHR(dataLen MOD 256); {low byte of data length}
  7530.       FOR index := 1 TO dataLen - 2 DO {stuff buffer with packet data}
  7531.         buffer[index + 1] := someText[index];
  7532.       async := FALSE;
  7533.       WITH myABRecord^^ DO {fill parameters in the ABusRecord}
  7534.         BEGIN
  7535.         lapAddress.lapProtType := myLAPType;
  7536.         lapAddress.dstNodeID := 4;
  7537.         lapReqCount := dataLen;
  7538.         lapDataPtr := @buffer;
  7539.         END;
  7540.       {Send the frame}
  7541.       errCode := LAPWrite(myABRecord, async);
  7542.       {In the case of a sync call, errCode and the abResult field of }
  7543.       { the myABRecord will contain the same result code. We can also }
  7544.       { reuse myABRecord, since we know whether the call has completed.}
  7545.       IF errCode <> noErr THEN
  7546.         WRITELN('Error while writing out the packet')
  7547.         {Maybe the receiving node wasn't on-line}
  7548.       ELSE
  7549.         BEGIN
  7550.         {We have sent out the packet and are now waiting for a response. We }
  7551.         { issue an async LAPRead call so that we don't “hang” waiting for a }
  7552.         { response that may not come.}
  7553.         async := TRUE;
  7554.         WITH myABRecord^^ DO
  7555.           BEGIN
  7556.           lapAddress.lapProtType := myLAPType;
  7557.           {ALAP type we want to receive }
  7558.           lapReqCount := 600; {our buffer is maximum size}
  7559.           lapDataPtr := @buffer;
  7560.           END;
  7561.         errCode := LAPRead(myABRecord, async); {wait for a packet}
  7562.         IF errCode <> noErr THEN
  7563.           WRITELN('Error while trying to queue up a LAPRead')
  7564.           {Was the protocol handler installed correctly?}
  7565.         ELSE
  7566.           BEGIN
  7567.           {We can either sit here in a loop and poll the abResult }
  7568.           { field or just exit our code and use the event }
  7569.           { mechanism to flag us when the packet arrives.}
  7570.           CheckForMyEvent; {your procedure for checking for a network event}
  7571.           errCode := LAPCloseProtocol(myLAPType);
  7572.           IF errCode <> noErr THEN
  7573.             WRITELN('Error while closing the protocol type');
  7574.           END;
  7575.         END;
  7576.       END;
  7577.     END;
  7578. END.
  7579.  
  7580. æKY LAPRmvATQ
  7581. æFp AppleTalk.p
  7582. æT FUNCTION
  7583. æD FUNCTION LAPRmvATQ(theATQEntry: ATQEntryPtr): OSErr;
  7584. æDT myVariable := LAPRmvATQ(theATQEntry);
  7585. æMM
  7586. æRI II-279
  7587. æC 
  7588. Given the handle to the ABusRecord of a previously made LAPRead call, LAPRdCancel
  7589. dequeues the LAPRead call, provided that a packet satisfying the LAPRead has not
  7590. already arrived. LAPRdCancel returns noErr if the LAPRead call is successfully removed
  7591. from the queue. If LAPRdCancel returns recNotFnd, check the abResult field to verify
  7592. that the LAPRead has been completed and determine its outcome.
  7593.  
  7594. Result codes    noErr        No error
  7595.                 readQErr     Invalid protocol type or protocol type not
  7596.                              found in table
  7597.                 recNotFnd    ABRecord not found in queue
  7598.  
  7599. »Example
  7600.  
  7601. This example sends an ALAP packet synchronously and waits asynchronously for a response.
  7602. Assume that both nodes are using a known protocol type (in this case, 73) to receive
  7603. packets, and that the destination node has a node ID of 4.
  7604.  
  7605. VAR
  7606.   myABRecord: ABRecHandle;
  7607.   myBuffer: PACKED ARRAY [0..599] OF CHAR; {buffer for both send and receive}
  7608.   myLAPType: Byte;
  7609.   errCode, index, dataLen: INTEGER;
  7610.   someText: Str255;
  7611.   async: BOOLEAN;
  7612.  
  7613. BEGIN
  7614.   errCode := MPPOpen;
  7615.   IF errCode <> noErr THEN
  7616.     WRITELN('Error in opening AppleTalk')
  7617.     {Maybe serial port B isn't available for use by AppleTalk}
  7618.   ELSE
  7619.     BEGIN
  7620.     {Call Memory Manager to allocate ABusRecord}
  7621.     myABRecord := ABRecHandle(NewHandle(lapSize));
  7622.     myLAPType := 73;
  7623.    {Enter myLAPType into protocol handler table and install default handler to }
  7624.     { service frames of that ALAP type. No packets of that ALAP type will be }
  7625.     { received until we call LAPRead.}
  7626.     errCode := LAPOpenProtocol(myLAPType, NIL);
  7627.     IF errCode <> noErr THEN
  7628.       WRITELN('Error while opening the protocol type')
  7629.       {Have we opened too many protocol types? Remember that DDP uses two of }
  7630.       { them.}
  7631.     ELSE
  7632.       BEGIN
  7633.       {Prepare data to be sent}
  7634.       someText := 'This data will be in the ALAP data area';
  7635.       {The .MPP implementation requires that the first two bytes of the ALAP }
  7636.       { data field contain the length of the data, including the length bytes }
  7637.       { themselves.}
  7638.       dataLen := LENGTH(someText) + 2;
  7639.       buffer[0] := CHR(dataLen DIV 256); {high byte of data length}
  7640.       buffer[1] := CHR(dataLen MOD 256); {low byte of data length}
  7641.       FOR index := 1 TO dataLen - 2 DO {stuff buffer with packet data}
  7642.         buffer[index + 1] := someText[index];
  7643.       async := FALSE;
  7644.       WITH myABRecord^^ DO {fill parameters in the ABusRecord}
  7645.         BEGIN
  7646.         lapAddress.lapProtType := myLAPType;
  7647.         lapAddress.dstNodeID := 4;
  7648.         lapReqCount := dataLen;
  7649.         lapDataPtr := @buffer;
  7650.         END;
  7651.       {Send the frame}
  7652.       errCode := LAPWrite(myABRecord, async);
  7653.       {In the case of a sync call, errCode and the abResult field of }
  7654.       { the myABRecord will contain the same result code. We can also }
  7655.       { reuse myABRecord, since we know whether the call has completed.}
  7656.       IF errCode <> noErr THEN
  7657.         WRITELN('Error while writing out the packet')
  7658.         {Maybe the receiving node wasn't on-line}
  7659.       ELSE
  7660.         BEGIN
  7661.         {We have sent out the packet and are now waiting for a response. We }
  7662.         { issue an async LAPRead call so that we don't “hang” waiting for a }
  7663.         { response that may not come.}
  7664.         async := TRUE;
  7665.         WITH myABRecord^^ DO
  7666.           BEGIN
  7667.           lapAddress.lapProtType := myLAPType;
  7668.           {ALAP type we want to receive }
  7669.           lapReqCount := 600; {our buffer is maximum size}
  7670.           lapDataPtr := @buffer;
  7671.           END;
  7672.         errCode := LAPRead(myABRecord, async); {wait for a packet}
  7673.         IF errCode <> noErr THEN
  7674.           WRITELN('Error while trying to queue up a LAPRead')
  7675.           {Was the protocol handler installed correctly?}
  7676.         ELSE
  7677.           BEGIN
  7678.           {We can either sit here in a loop and poll the abResult }
  7679.           { field or just exit our code and use the event }
  7680.           { mechanism to flag us when the packet arrives.}
  7681.           CheckForMyEvent; {your procedure for checking for a network event}
  7682.           errCode := LAPCloseProtocol(myLAPType);
  7683.           IF errCode <> noErr THEN
  7684.             WRITELN('Error while closing the protocol type');
  7685.           END;
  7686.         END;
  7687.       END;
  7688.     END;
  7689. END.
  7690.  
  7691. æKY DDPOpenSocket
  7692. æFp AppleTalk.p
  7693. æT FUNCTION
  7694. æD FUNCTION DDPOpenSocket(VAR theSocket: Byte;sktListener: Ptr): OSErr;
  7695. æDT myVariable := DDPOpenSocket(theSocket,sktListener);
  7696. æMM
  7697. æRI II-282
  7698. æC 
  7699. DDPOpenSocket adds a socket and its socket listener to the socket table. If theSocket
  7700. is nonzero, it must be in the range 64 to 127, and it specifies the socket’s number;
  7701. if theSocket is 0, DDPOpenSocket dynamically assigns a socket number in the range 128
  7702. to 254, and returns it in theSocket. SktListener contains a pointer to the socket
  7703. listener; if it’s NIL, the default listener will be used.
  7704.  
  7705. If you’re using the default socket listener, you must then call DDPRead to receive a
  7706. datagram (in order to specify buffer space for the default socket listener). If,
  7707. however, you’ve written your own socket listener and sktListener points to it, your
  7708. listener will provide buffers for receiving datagrams and you shouldn’t use DDPRead
  7709. calls.
  7710.  
  7711. DDPOpenSocket will return ddpSktErr if you pass the number of an already opened
  7712. socket, if you pass a socket number greater than 127, or if the socket table is
  7713. full.
  7714.  
  7715. Note:  The range of static socket numbers 1 through 63 is reserved by Apple
  7716.        for internal use. Socket numbers 64 through 127 are available for
  7717.        unrestricted experimental use.
  7718.  
  7719. Result codes    noErr        No error
  7720.                 ddpSktErr    Socket error
  7721.  
  7722. æKY DDPCloseSocket
  7723. æFp AppleTalk.p
  7724. æT FUNCTION
  7725. æD FUNCTION DDPCloseSocket(theSocket: Byte): OSErr;
  7726. æDT myVariable := DDPCloseSocket(theSocket);
  7727. æMM
  7728. æRI II-282
  7729. æC 
  7730.  
  7731. æKY DDPRead
  7732. æFp AppleTalk.p
  7733. æT FUNCTION
  7734. æD FUNCTION DDPRead(abRecord: ABRecHandle;retCksumErrs: BOOLEAN;async: BOOLEAN): OSErr;
  7735. æDT myVariable := DDPRead(abRecord,retCksumErrs,async);
  7736. æMM
  7737. æRI II-283
  7738. æC 
  7739. ABusRecord
  7740.   <--    abOpcode         {always tDDPRead}
  7741.   <--    abResult         {result code}
  7742.   -->    abUserReference  {for your use}
  7743.   <--    ddpType          {DDP protocol type}
  7744.   -->    ddpSocket        {listening socket number}
  7745.   <--    ddpAddress       {source socket address}
  7746.   -->    ddpReqCount      {buffer size in bytes}
  7747.   <--    ddpActCount      {number of bytes actually received}
  7748.   -->    ddpDataPtr       {pointer to buffer}
  7749.   <--    ddpNodeID        {original destination node ID}
  7750.  
  7751. DDPRead receives a datagram from another socket. The size and location of the buffer
  7752. that will receive the data are specified by ddpReqCount and ddpDataPtr. If the buffer
  7753. isn’t large enough to hold all of the incoming frame data, the extra bytes will be
  7754. discarded and buf2SmallErr will be returned. The number of bytes actually received is
  7755. returned in ddpActCount. DDPSocket specifies the socket to receive the datagram (the
  7756. “listening” socket). The node to which the packet was sent is returned in ddpNodeID;
  7757. if the packet was broadcast ddpNodeID will contain 255. The address of the socket
  7758. that sent the packet is returned in ddpAddress. If retCksumErrs is FALSE, DDPRead
  7759. will discard any packets received with an invalid checksum and inform the caller of
  7760. the error. If retCksumErrs is TRUE, DDPRead will deliver all packets, whether or not
  7761. the checksum is valid; it will also notify the caller when there’s a checksum error.
  7762.  
  7763. Note:  The sender of the datagram must be in a different node from the
  7764.        receiver. You should issue DDPRead calls only for receiving datagrams
  7765.        for sockets opened with the default socket listener; see the
  7766.        description of DDPOpenSocket.
  7767.  
  7768. Note:  If the buffer provided isn’t large enough to hold all of the incoming
  7769.        frame data (buf2SmallErr), the checksum can’t be calculated; in this
  7770.        case, DDPRead will deliver packets even if retCksumErrs is FALSE.
  7771.  
  7772. Result codes    noErr           No error
  7773.                 buf2SmallErr    Datagram too large for buffer
  7774.                 cksumErr        Checksum error
  7775.                 ddpLenErr       Datagram length too big
  7776.                 ddpSktErr       Socket error
  7777.                 readQErr        Invalid socket or socket not found in table
  7778.  
  7779. æKY DDPWrite
  7780. æFp AppleTalk.p
  7781. æT FUNCTION
  7782. æD FUNCTION DDPWrite(abRecord: ABRecHandle;doChecksum: BOOLEAN;async: BOOLEAN): OSErr;
  7783. æDT myVariable := DDPWrite(abRecord,doChecksum,async);
  7784. æMM
  7785. æRI II-283
  7786. æC  
  7787. ABusRecord
  7788.   <--    abOpcode         {always tDDPWrite}
  7789.   <--    abResult         {result code}
  7790.   -->    abUserReference  {for your use}
  7791.   -->    ddpType          {DDP protocol type}
  7792.   -->    ddpSocket        {source socket number}
  7793.   -->    ddpAddress       {destination socket address}
  7794.   -->    ddpReqCount      {length of datagram data}
  7795.   -->    ddpDataPtr       {pointer to buffer}
  7796.  
  7797. DDPWrite sends a datagram to another socket. DDPReqCount and ddpDataPtr specify the
  7798. length and location of the data to send. The ddpType field indicates the DDP protocol
  7799. type of the frame, and ddpAddress is the complete internet address of the socket to
  7800. which the datagram should be sent. DDPSocket specifies the socket from which the
  7801. datagram should be sent. Datagrams sent over the internet to a node on an AppleTalk
  7802. network different from the sending node’s network have an optional software checksum
  7803. to detect errors that might occur inside the intermediate bridges. If doChecksum is
  7804. TRUE, DDPWrite will compute this checksum; if it’s FALSE, this software checksum
  7805. feature is ignored.
  7806.  
  7807. Note:  The destination socket can’t be in the same node as the program
  7808.        making the DDPWrite call.
  7809.  
  7810. Result codes    noErr          No error
  7811.                 ddpLenErr      Datagram length too big
  7812.                 ddpSktErr      Source socket not open
  7813.                 noBridgeErr    No bridge found
  7814.  
  7815. æKY DDPRdCancel
  7816. æFp AppleTalk.p
  7817. æT FUNCTION
  7818. æD FUNCTION DDPRdCancel(abRecord: ABRecHandle): OSErr;
  7819. æDT myVariable := DDPRdCancel(abRecord);
  7820. æMM
  7821. æRI II-284
  7822. æC 
  7823. Given the handle to the ABusRecord of a previously made DDPRead call, DDPRdCancel
  7824. dequeues the DDPRead call, provided that a packet satisfying the DDPRead hasn’t
  7825. already arrived. DDPRdCancel returns noErr if the DDPRead call is successfully removed
  7826. from the queue. If DDPRdCancel returns recNotFnd, check the abResult field of abRecord
  7827. to verify that the DDPRead has been completed and determine its outcome.
  7828.  
  7829. Result codes    noErr        No error
  7830.                 readQErr     Invalid socket or socket not found in table
  7831.                 recNotFnd    ABRecord not found in queue
  7832.  
  7833. »Example
  7834.  
  7835. This example sends a DDP packet synchronously and waits asynchronously for a response.
  7836. Assume that both nodes are using a known socket number (in this case, 30) to receive
  7837. packets. Normally, you would want to use NBP to look up your destination’s socket
  7838. address.
  7839.  
  7840. VAR
  7841.   myABRecord: ABRecHandle;
  7842.   myBuffer: PACKED ARRAY [0..599] OF CHAR; {buffer for both send and receive}
  7843.   mySocket: Byte;
  7844.   errCode, index, dataLen: INTEGER;
  7845.   someText: Str255;
  7846.   async, retCksumErrs, doChecksum: BOOLEAN;
  7847.  
  7848. BEGIN
  7849.   errCode := MPPOpen;
  7850.   IF errCode <> noErr THEN
  7851.     WRITELN('Error in opening AppleTalk')
  7852.     {Maybe serial port B isn't available for use by AppleTalk}
  7853.   ELSE
  7854.     BEGIN
  7855.       {Call Memory Manager to allocate ABusRecord}
  7856.       myABRecord := ABRecHandle(NewHandle(ddpSize));
  7857.       mySocket := 30;
  7858.   {Add mySocket to socket table and install default socket listener to service }
  7859. { datagrams addressed to that socket. No packets addressed to mySocket will be }
  7860.       { received until we call DDPRead. }
  7861.       errCode := DDPOpenSocket(mySocket, NIL);
  7862.       IF errCode <> noErr THEN
  7863.         WRITELN('Error while opening the socket')
  7864.       {Have we opened too many socket listeners? Remember that DDP uses two of }
  7865.         { them.}
  7866.       ELSE
  7867.         BEGIN
  7868.           {Prepare data to be sent}
  7869.           someText := 'This is a sample datagram';
  7870.           dataLen := LENGTH(someText);
  7871.           FOR index := 0 TO dataLen - 1 DO {stuff buffer with packet data}
  7872.             myBuffer[index] := someText[index + 1];
  7873.           async := FALSE;
  7874.           WITH myABRecord^^ DO {fill the parameters in the ABusRecord}
  7875.             BEGIN
  7876.               ddpType := 5;
  7877.               ddpAddress.aNet := 0; {send on “our” network}
  7878.               ddpAddress.aNode := 34;
  7879.               ddpAddress.aSocket := mySocket;
  7880.               ddpReqCount := dataLen;
  7881.               ddpDataPtr := @myBuffer;
  7882.             END;
  7883.           doChecksum := FALSE;
  7884.     {If packet contains a DDP long header, compute checksum and insert it into }
  7885.           { the header.}
  7886.           errCode := DDPWrite(myABRecord, doChecksum, async); {send packet}
  7887.      {In the case of a sync call, errCode and the abResult field of myABRecord }
  7888.    { will contain the same result code. We can also reuse myABRecord, since we }
  7889.           { know whether the call has completed.}
  7890.           IF errCode <> noErr THEN
  7891.             WRITELN('Error while writing out the packet')
  7892.             {Maybe the receiving node wasn't on-line}
  7893.           ELSE
  7894.             BEGIN
  7895.            {We have sent out the packet and are now waiting for a response. We }
  7896.            { issue an async DDPRead call so that we don't “hang” waiting for a }
  7897.           { response that may not come. To cancel the async read call, we must }
  7898.               { close the socket associated with the call or call DDPRdCancel.}
  7899.               async := TRUE;
  7900.               retCksumErrs := TRUE; {return packets even if }
  7901.                                     { they have a checksum error}
  7902.               WITH myABRecord^^ DO
  7903.                 BEGIN
  7904.                   ddpSocket := mySocket;
  7905.                   ddpReqCount := 600; {our reception buffer is max size}
  7906.                   ddpDataPtr := @myBuffer;
  7907.                 END;
  7908.               {Wait for a packet asynchronously}
  7909.               errCode := DDPRead(myABRecord, retCksumErrs, async);
  7910.               IF errCode <> noErr THEN
  7911.                 WRITELN('Error while trying to queue up a DDPRead')
  7912.                 {Was the socket listener installed correctly?}
  7913.               ELSE
  7914.                 BEGIN
  7915.                   {We can either sit here in a loop and poll the }
  7916.                   { abResult field or just exit our code and use the }
  7917.                   { event mechanism to flag us when the packet arrives.}
  7918.                   CheckForMyEvent; {your procedure for checking for a }
  7919.                                    { network event}
  7920.                   {If there were no errors, a packet is inside the array }
  7921.                   { mybuffer, the length is in ddpActCount, and the }
  7922.                   { address of the sending socket is in ddpAddress. }
  7923.                   { Process the packet received here and report any errors.}
  7924.                   errCode := DDPCloseSocket(mySocket); {we're done with it}
  7925.                   IF errCode <> noErr THEN
  7926.                     WRITELN('Error while closing the socket');
  7927.                 END;
  7928.             END;
  7929.         END;
  7930.     END;
  7931. END.
  7932.  
  7933. æKY ATPLoad
  7934. æFp AppleTalk.p
  7935. æT FUNCTION
  7936. æD FUNCTION ATPLoad: OSErr;
  7937. æDT myVariable := ATPLoad;
  7938. æMM
  7939. æRT 20, 224
  7940. æRI II-290, N20-2
  7941. æC 
  7942. •••Refer to Technical Note #224:•••
  7943.  
  7944. ATPLoad first verifies that the .MPP driver is loaded and running. If it isn’t,
  7945. ATPLoad verifies that port B is configured for AppleTalk and isn’t in use, and then
  7946. loads MPP into the system heap.
  7947.  
  7948. ATPLoad then loads the .ATP driver, unless it’s already in memory. On a Macintosh
  7949. 128K, ATPLoad reads the .ATP driver from the system resource file into the application
  7950. heap; on a Macintosh 512K or XL, ATP is read into the system heap.
  7951.  
  7952. Note:  On a Macintosh 512K or XL, ATPLoad and MPPOpen perform essentially
  7953.        the same function.
  7954.  
  7955. Result codes    noErr        No error
  7956.                 portInUse    Port B is already in use
  7957.                 portNotCf    Port B not configured for AppleTalk
  7958.  
  7959. æKY ATPUnload
  7960. æFp AppleTalk.p
  7961. æT FUNCTION
  7962. æD FUNCTION ATPUnload: OSErr;
  7963. æDT myVariable := ATPUnload;
  7964. æRI II-290
  7965. æC 
  7966. ATPUnload makes the .ATP driver purgeable; the space isn’t actually released by the
  7967. Memory Manager until necessary.
  7968.  
  7969. Note:  This call applies only to a Macintosh 128K; on a Macintosh 512K
  7970.        or Macintosh XL, ATPUnload has no effect.
  7971.  
  7972. Result codes    noErr    No error
  7973.  
  7974. æKY ATPOpenSocket
  7975. æFp AppleTalk.p
  7976. æT FUNCTION
  7977. æD FUNCTION ATPOpenSocket(addrRcvd: AddrBlock;VAR atpSocket: Byte): OSErr;
  7978. æDT myVariable := ATPOpenSocket(addrRcvd,atpSocket);
  7979. æMM
  7980. æRI II-290
  7981. æC 
  7982. ATPOpenSocket opens a socket for the purpose of receiving requests. ATPSocket contains
  7983. the socket number of the socket to open; if it’s 0, a number is dynamically assigned
  7984. and returned in atpSocket. AddrRcvd contains a filter of the sockets from which
  7985. requests will be accepted. A 0 in the network number, node ID, or socket number field
  7986. of the addrRcvd record acts as a “wild card”; for instance, a 0 in the socket number
  7987. field means that requests will be accepted from all sockets in the node(s) specified
  7988. by the network and node fields.
  7989.  
  7990. Result codes    noErr          No error
  7991.                 tooManySkts    Socket table full
  7992.                 noDataArea     Too many outstanding ATP calls
  7993.  
  7994. Note:  If you’re only going to send requests and receive responses to
  7995.        these requests, you don’t need to open an ATP socket. When you
  7996.        make the ATPSndRequest or ATPRequest call, ATP automatically
  7997.        opens a dynamically assigned socket for that purpose.
  7998.  
  7999. æKY ATPCloseSocket
  8000. æFp AppleTalk.p
  8001. æT FUNCTION
  8002. æD FUNCTION ATPCloseSocket(atpSocket: Byte): OSErr;
  8003. æDT myVariable := ATPCloseSocket(atpSocket);
  8004. æMM
  8005. æRI II-291
  8006. æC 
  8007. ATPCloseSocket closes the responding socket whose number is specified by atpSocket.
  8008. It releases the data structures associated with all pending, asynchronous calls
  8009. involving that socket; these pending calls are completed immediately and return the
  8010. result code sktClosed.
  8011.  
  8012. Result codes    noErr         No error
  8013.                 noDataArea    Too many outstanding ATP calls
  8014.  
  8015. æKY ATPSndRequest
  8016. æFp AppleTalk.p
  8017. æT FUNCTION
  8018. æD FUNCTION ATPSndRequest(abRecord: ABRecHandle;async: BOOLEAN): OSErr;
  8019. æDT myVariable := ATPSndRequest(abRecord,async);
  8020. æMM
  8021. æRI II-291
  8022. æC 
  8023. ABusRecord
  8024.   <--    abOpcode         {always tATPSndRequest}
  8025.   <--    abResult         {result code}
  8026.   -->    abUserReference  {for your use}
  8027.   -->    atpAddress       {destination socket address}
  8028.   -->    atpReqCount      {request size in bytes}
  8029.   -->    atpDataPtr       {pointer to buffer}
  8030.   -->    atpRspBDSPtr     {pointer to response BDS}
  8031.   -->    atpUserData      {user bytes}
  8032.   -->    atpXO            {exactly-once flag}
  8033.   <--    atpEOM           {end-of-message flag}
  8034.   -->    atpTimeOut       {retry timeout interval in seconds}
  8035.   -->    atpRetries       {maximum number of retries}
  8036.   -->    atpNumBufs       {number of elements in response BDS}
  8037.   <--    atpNumRsp        {number of response packets actually received}
  8038.  
  8039. ATPSndRequest sends a request to another socket. ATPAddress is the internet address
  8040. of the socket to which the request should be sent. ATPDataPtr and atpReqCount specify
  8041. the location and size of a buffer that contains the request information to be sent.
  8042. ATPUserData contains the user bytes for the ATP header.
  8043.  
  8044. ATPSndRequest requires you to allocate a response BDS. ATPRspBDSPtr is a pointer to
  8045. the response BDS; atpNumBufs indicates the number of elements in the BDS (this is
  8046. also the maximum number of response datagrams that will be accepted). The number of
  8047. response datagrams actually received is returned in atpNumRsp; if a nonzero value is
  8048. returned, you can examine the response BDS to determine which packets of the transaction
  8049. were actually received. If the number returned is less than requested, one of the
  8050. following is true:
  8051.  
  8052.   •  Some of the packets have been lost and the retry count has been exceeded.
  8053.   •  ATPEOM is TRUE; this means that the response consisted of fewer packets
  8054.      than were expected, but that all packets sent were received (the last
  8055.      packet came with the atpEOM flag set).
  8056.  
  8057. ATPTimeOut indicates the length of time that ATPSndRequest should wait for a response
  8058. before retransmitting the request. ATPRetries indicates the maximum number of retries
  8059. ATPSndRequest should attempt. ATPXO should be TRUE if you want the request to be part
  8060. of an exactly-once transaction.
  8061.  
  8062. ATPSndRequest completes when either the transaction is completed or the retry count
  8063. is exceeded.
  8064.  
  8065. Result codes    noErr          No error
  8066.                 reqFailed      Retry count exceeded
  8067.                 tooManyReqs    Too many concurrent requests
  8068.                 noDataArea     Too many outstanding ATP calls
  8069.  
  8070. æKY ATPRequest
  8071. æFp AppleTalk.p
  8072. æT FUNCTION
  8073. æD FUNCTION ATPRequest(abRecord: ABRecHandle;async: BOOLEAN): OSErr;
  8074. æDT myVariable := ATPRequest(abRecord,async);
  8075. æMM
  8076. æRI II-292
  8077. æC 
  8078. ABusRecord
  8079.   <--    abOpcode         {always tATPRequest}
  8080.   <--    abResult         {result code}
  8081.   -->    abUserReference  {for your use}
  8082.   -->    atpAddress       {destination socket address}
  8083.   -->    atpReqCount      {request size in bytes}
  8084.   -->    atpDataPtr       {pointer to buffer}
  8085.   <--    atpActCount      {number of bytes actually received}
  8086.   -->    atpUserData      {user bytes}
  8087.   -->    atpXO            {exactly-once flag}
  8088.   <--    atpEOM           {end-of-message flag}
  8089.   -->    atpTimeOut       {retry timeout interval in seconds}
  8090.   -->    atpRetries       {maximum number of retries}
  8091.   <--    atpRspUData      {user bytes received in transaction response}
  8092.   -->    atpRspBuf        {pointer to response message buffer}
  8093.   -->    atpRspSize       {size of response message buffer}
  8094.  
  8095. ATPRequest is functionally analogous to ATPSndRequest. It sends a request to another
  8096. socket, but doesn’t require the caller to set up and use the BDS data structure to
  8097. describe the response buffers. ATPAddress indicates the socket to which the request
  8098. should be sent. ATPDataPtr and atpReqCount specify the location and size of a buffer
  8099. that contains the request information to be sent. ATPUserData contains the user bytes
  8100. to be sent in the request’s ATP header. ATPTimeOut indicates the length of time that
  8101. ATPRequest should wait for a response before retransmitting the request. ATPRetries
  8102. indicates the maximum number of retries ATPRequest should attempt.
  8103.  
  8104. To use this call, you must have an area of contiguous buffer space that’s large
  8105. enough to receive all expected datagrams. The various datagrams will be assembled in
  8106. this buffer and returned to you as a complete message upon completion of the transaction.
  8107. The location and size of this buffer are passed in atpRspBuf and atpRspSize. Upon
  8108. completion of the call, the size of the received response message is returned in
  8109. atpActCount. The user bytes received in the ATP header of the first response packet
  8110. are returned in atpRspUData. ATPXO should be TRUE if you want the request to be part
  8111. of an exactly-once transaction.
  8112.  
  8113. Although you don’t provide a BDS, ATPRequest in fact creates one and calls the
  8114. .ATP driver (as in an ATPSndRequest call). For this reason, the abRecord fields
  8115. atpRspBDSPtr and atpNumBufs are used by ATPRequest; you should not expect these
  8116. fields to remain unaltered during or after the function’s execution.
  8117.  
  8118. For ATPRequest to receive and correctly deliver the response as a single message, the
  8119. responding end must, upon receiving the request (with an ATPGetRequest call), generate
  8120. the complete response as a message in a single buffer and then call ATPResponse.
  8121.  
  8122. Note:  The responding end could also use ATPSndRsp and ATPAddRsp provided
  8123.        that each response packet (except the last one) contains exactly 578
  8124.        ATP data bytes; the last packet in the response can contain less than
  8125.        578 ATP data bytes. Also, if this method is used, only the ATP user
  8126.        bytes of the first response packet will be delivered to the requester;
  8127.        any information in the user bytes of the remaining response packets
  8128.        will not be delivered.
  8129.  
  8130. ATPRequest completes when either the transaction is completed or the retry count is
  8131. exceeded.
  8132.  
  8133. Result codes    noErr          No error
  8134.                 reqFailed      Retry count exceeded
  8135.                 tooManyReqs    Too many concurrent requests
  8136.                 sktClosed      Socket closed by a cancel call
  8137.                 noDataArea     Too many outstanding ATP calls
  8138.  
  8139. æKY ATPReqCancel
  8140. æFp AppleTalk.p
  8141. æT FUNCTION
  8142. æD FUNCTION ATPReqCancel(abRecord: ABRecHandle;async: BOOLEAN): OSErr;
  8143. æDT myVariable := ATPReqCancel(abRecord,async);
  8144. æMM
  8145. æRI II-293
  8146. æC 
  8147. Given the handle to the ABusRecord of a previously made ATPSndRequest or ATPRequest
  8148. call, ATPReqCancel dequeues the ATPSndRequest or ATPRequest call, provided that the
  8149. call hasn’t already completed. ATPReqCancel returns noErr if the ATPSndRequest or
  8150. ATPRequest call is successfully removed from the queue. If it returns cbNotFound,
  8151. check the abResult field of abRecord to verify that the ATPSndRequest or ATPRequest
  8152. call has completed and determine its outcome.
  8153.  
  8154. Result codes    noErr         No error
  8155.                 cbNotFound    ATP control block not found
  8156.  
  8157. æKY ATPGetRequest
  8158. æFp AppleTalk.p
  8159. æT FUNCTION
  8160. æD FUNCTION ATPGetRequest(abRecord: ABRecHandle;async: BOOLEAN): OSErr;
  8161. æDT myVariable := ATPGetRequest(abRecord,async);
  8162. æMM
  8163. æRT 20
  8164. æRI II-293, N20-2
  8165. æC  
  8166. ABusRecord
  8167.   <--    abOpcode         {always tATPGetRequest}
  8168.   <--    abResult         {result code}
  8169.   -->    abUserReference  {for your use}
  8170.   -->    atpSocket        {listening socket number}
  8171.   <--    atpAddress       {source socket address}
  8172.   -->    atpReqCount      {buffer size in bytes}
  8173.   -->    atpDataPtr       {pointer to buffer}
  8174.   <--    atpBitMap        {transaction bit map}
  8175.   <--    atpTransID       {transaction ID}
  8176.   <--    atpActCount      {number of bytes actually received}
  8177.   <--    atpUserData      {user bytes}
  8178.   <--    atpXO            {exactly-once flag}
  8179.  
  8180. ATPGetRequest sets up the mechanism to receive a request sent by either an ATPSndRequest
  8181. or an ATPRequest call. ATPSocket contains the socket number of the socket that should
  8182. listen for a request; this socket must already have been opened by calling ATPOpenSocket.
  8183. The address of the socket from which the request was sent is returned in atpAddress.
  8184. ATPDataPtr specifies a buffer to store the incoming request; atpReqCount indicates
  8185. the size of the buffer in bytes. The number of bytes actually received in the request
  8186. is returned in atpActCount. ATPUserData contains the user bytes from the ATP header.
  8187. The transaction bit map is returned in atpBitMap. The transaction ID is returned in
  8188. atpTransID. ATPXO will be TRUE if the request is part of an exactly-once transaction.
  8189.  
  8190. ATPGetRequest completes when a request is received. To cancel an asynchronous ATPGetRequest
  8191. call, you must call ATPCloseSocket, but this cancels all pending calls involving that
  8192. socket.
  8193.  
  8194. Result codes    noErr        No error
  8195.                 badATPSkt    Bad responding socket
  8196.                 sktClosed    Socket closed by a cancel call
  8197.  
  8198. æKY ATPSndRsp
  8199. æFp AppleTalk.p
  8200. æT FUNCTION
  8201. æD FUNCTION ATPSndRsp(abRecord: ABRecHandle;async: BOOLEAN): OSErr;
  8202. æDT myVariable := ATPSndRsp(abRecord,async);
  8203. æMM
  8204. æRI II-294
  8205. æC  
  8206. ABusRecord
  8207.   <--    abOpcode         {always tATPSdRsp}
  8208.   <--    abResult         {result code}
  8209.   -->    abUserReference  {for your use}
  8210.   -->    atpSocket        {responding socket number}
  8211.   -->    atpAddress       {destination socket address}
  8212.   -->    atpRspBDSPtr     {pointer to response BDS}
  8213.   -->    atpTransID       {transaction ID}
  8214.   -->    atpEOM           {end-of-message flag}
  8215.   -->    atpNumBufs       {number of response packets being sent}
  8216.   -->    atpBDSSize       {number of elements in response BDS}
  8217.  
  8218. ATPSndRsp sends a response to another socket. ATPSocket contains the socket number
  8219. from which the response should be sent and atpAddress contains the internet address
  8220. of the socket to which the response should be sent. ATPTransID must contain the
  8221. transaction ID. ATPEOM is TRUE if the response BDS contains the final packet in a
  8222. transaction composed of a group of packets and the number of packets in the response
  8223. is less than expected. ATPRspBDSPtr points to the buffer data structure containing
  8224. the responses to be sent. ATPBDSSize indicates the number of elements in the response
  8225. BDS, and must be in the range 1 to 8. ATPNumBufs indicates the number of response
  8226. packets being sent with this call, and must be in the range 0 to 8.
  8227.  
  8228. Note:  In some situations, you may want to send only part (or possibly none)
  8229.        of your response message back immediately. For instance, you might be
  8230.        requested to send back seven disk blocks, but have only enough internal
  8231.        memory to store one block. In this case, set atpBDSSize to 7 (total
  8232.        number of response packets), atpNumBufs to 0 (number of response
  8233.        packets currently being sent), and call ATPSndRsp. Then as you read
  8234.        in one block at a time, call ATPAddRsp until all seven response
  8235.        datagrams have been sent.
  8236.  
  8237. During exactly-once transactions, ATPSndRsp won’t complete until the release packet
  8238. is received or the release timer expires.
  8239.  
  8240. Result codes    noErr         No error
  8241.                 badATPSkt     Bad responding socket
  8242.                 noRelErr      No release received
  8243.                 sktClosed     Socket closed by a cancel call
  8244.                 noDataArea    Too many outstanding ATP calls
  8245.                 badBuffNum    Bad sequence number
  8246.  
  8247. æKY ATPAddRsp
  8248. æFp AppleTalk.p
  8249. æT FUNCTION
  8250. æD FUNCTION ATPAddRsp(abRecord: ABRecHandle): OSErr;
  8251. æDT myVariable := ATPAddRsp(abRecord);
  8252. æMM
  8253. æRI II-295
  8254. æC  
  8255. ABusRecord
  8256.   <--    abOpcode         {always tATPAddRsp}
  8257.   <--    abResult         {result code}
  8258.   -->    abUserReference  {for your use}
  8259.   -->    atpSocket        {responding socket number}
  8260.   -->    atpAddress       {destination socket address}
  8261.   -->    atpReqCount      {buffer size in bytes}
  8262.   -->    atpDataPtr       {pointer to buffer}
  8263.   -->    atpTransID       {transaction ID}
  8264.   -->    atpUserData      {user bytes}
  8265.   -->    atpEOM           {end-of-message flag}
  8266.   -->    atpNumRsp        {sequence number}
  8267.  
  8268. ATPAddRsp sends one additional response packet to a socket that has already been sent
  8269. the initial part of a response via ATPSndRsp. ATPSocket contains the socket number
  8270. from which the response should be sent and atpAddress contains the internet address
  8271. of the socket to which the response should be sent. ATPTransID must contain the
  8272. transaction ID. ATPDataPtr and atpReqCount specify the location and size of a buffer
  8273. that contains the information to send; atpNumRsp is the sequence number of the response.
  8274. ATPEOM is TRUE if this response datagram is the final packet in a transaction composed
  8275. of a group of packets. ATPUserData contains the user bytes to be sent in this response
  8276. datagram’s ATP header.
  8277.  
  8278. Note:  No BDS is needed with ATPAddRsp because all pertinent information
  8279.        is passed within the record.
  8280.  
  8281. Result codes    noErr         No error
  8282.                 badATPSkt     Bad responding socket
  8283.                 badBuffNum    Bad sequence number
  8284.                 noSendResp    ATPAddRsp issued before ATPSndRsp
  8285.                 noDataArea    Too many outstanding ATP calls
  8286.  
  8287. æKY ATPResponse
  8288. æFp AppleTalk.p
  8289. æT FUNCTION
  8290. æD FUNCTION ATPResponse(abRecord: ABRecHandle;async: BOOLEAN): OSErr;
  8291. æDT myVariable := ATPResponse(abRecord,async);
  8292. æMM
  8293. æRT 20
  8294. æRI II-296, N20-2
  8295. æC 
  8296. ABusRecord
  8297.   <--    abOpcode         {always tATPResponse}
  8298.   <--    abResult         {result code}
  8299.   -->    abUserReference  {for your use}
  8300.   -->    atpSocket        {responding socket number}
  8301.   -->    atpAddress       {destination socket address}
  8302.   -->    atpTransID       {transaction ID)
  8303.   -->    atpRspUData      {user bytes sent in transaction response}
  8304.   -->    atpRspBuf        {pointer to response message buffer}
  8305.   -->    atpRspSize       {size of response message buffer}
  8306.  
  8307. ATPResponse is functionally analogous to ATPSndRsp. It sends a response to another
  8308. socket, but doesn’t require the caller to provide a BDS. ATPAddress must contain the
  8309. complete network address of the socket to which the response should be sent (taken
  8310. from the data provided by an ATPGetRequest call). ATPTransID must contain the transaction
  8311. ID. ATPSocket indicates the socket from which the response should be sent (the socket
  8312. on which the corresponding ATPGetRequest was issued). ATPRspBuf points to the buffer
  8313. containing the response message; the size of this buffer must be passed in atpRspSize.
  8314. The four user bytes to be sent in the ATP header of the first response packet are
  8315. passed in atpRspUData. The last packet of the transaction response is sent with the
  8316. EOM flag set.
  8317.  
  8318. Although you don’t provide a BDS, ATPResponse in fact creates one and calls the .ATP
  8319. driver (as in an ATPSndRsp call). For this reason, the abRecord fields atpRspBDSPtr
  8320. and atpNumBufs are used by ATPResponse; you should not expect these fields to remain
  8321. unaltered during or after the function’s execution.
  8322.  
  8323. During exactly-once transactions ATPResponse won’t complete until the release packet
  8324. is received or the release timer expires.
  8325.  
  8326. Warning:  The maximum permissible size of the response message is 4624 bytes.
  8327.  
  8328. Result codes    noErr         No error
  8329.                 badATPSkt     Bad responding socket
  8330.                 noRelErr      No release received
  8331.                 atpLenErr     Response too big
  8332.                 sktClosed     Socket closed by a cancel call
  8333.                 noDataArea    Too many outstanding ATP calls
  8334.  
  8335. æKY ATPRspCancel
  8336. æFp AppleTalk.p
  8337. æT FUNCTION
  8338. æD FUNCTION ATPRspCancel(abRecord: ABRecHandle;async: BOOLEAN): OSErr;
  8339. æDT myVariable := ATPRspCancel(abRecord,async);
  8340. æMM
  8341. æRI II-296
  8342. æC 
  8343. Given the handle to the ABusRecord of a previously made ATPSndRsp or ATPResponse
  8344. call, ATPRspCancel dequeues the ATPSndRsp or ATPResponse call, provided that the call
  8345. hasn’t already completed. ATPRspCancel returns noErr if the ATPSndRsp or ATPResponse
  8346. call is successfully removed from the queue. If it returns cbNotFound, check the
  8347. abResult field of abRecord to verify that the ATPSndRsp or ATPResponse call has
  8348. completed and determine its outcome.
  8349.  
  8350. Result codes    noErr         No error
  8351.                 cbNotFound    ATP control block not found
  8352.  
  8353. »Example
  8354.  
  8355. This example shows the requesting side of an ATP transaction that asks for a 512-byte
  8356. disk block from the responding end. The block number of the file is a byte and is
  8357. contained in myBuffer[0].
  8358.  
  8359. VAR
  8360.   myABRecord: ABRecHandle;
  8361.   myBDSPtr: BDSPtr;
  8362.   myBuffer: PACKED ARRAY [0..511] OF CHAR;
  8363.   errCode: INTEGER;
  8364.   async: BOOLEAN;
  8365.  
  8366. BEGIN
  8367.   errCode := ATPLoad;
  8368.   IF errCode <> noErr THEN
  8369.     WRITELN('Error in opening AppleTalk')
  8370.     {Maybe serial port B isn't available for use by AppleTalk}
  8371.   ELSE
  8372.     BEGIN
  8373.       {Prepare the BDS; allocate space for a one-element BDS}
  8374.       myBDSPtr := BDSPtr(NewPtr(SIZEOF(BDSElement)));
  8375.       WITH myBDSPtr^[0] DO
  8376.         BEGIN
  8377.           buffSize := 512; {size of our buffer used in reception}
  8378.           buffPtr := @myBuffer; {pointer to the buffer}
  8379.         END;
  8380.       {Prepare the ABusRecord}
  8381.       myBuffer[0] := CHR(1); {requesting disk block number 1}
  8382.       myABRecord := ABRecHandle(NewHandle(atpSize));
  8383.       WITH myABRecord^^ DO
  8384.         BEGIN
  8385.           atpAddress.aNet := 0;
  8386.           atpAddress.aNode := 30; {we probably got this from an NBP call}
  8387.           atpAddress.aSocket := 15; {socket to send request to}
  8388.           atpReqCount := 1; {size of request data field (disk block #)}
  8389.           atpDataPtr := @myBuffer; {ptr to request to be sent}
  8390.           atpRspBDSPtr := @myBDSPtr;
  8391.           atpUserData := 0; {for your use}
  8392.           atpXO := FALSE; {at-least-once service}
  8393.           atpTimeOut := 5; {5-second timeout}
  8394.           atpRetries := 3; {3 retries; request will be sent 4 times max}
  8395.           atpNumBufs := 1; {we're only expecting 1 block to be returned}
  8396.         END;
  8397.       async := FALSE;
  8398.       {Send the request and wait for the response}
  8399.       errCode := ATPSndRequest(myABRecord, async);
  8400.       IF errCode <> noErr THEN
  8401.         WRITELN('An error occurred in the ATPSndRequest call')
  8402.       ELSE
  8403.         BEGIN
  8404.           {The disk block requested is now in myBuffer. We can verify }
  8405.           { that atpNumRsp contains 1, meaning one response received.}
  8406.         . . .
  8407.         END;
  8408.     END;
  8409. END.
  8410.  
  8411. æKY NBPRegister
  8412. æFp AppleTalk.p
  8413. æT FUNCTION
  8414. æD FUNCTION NBPRegister(abRecord: ABRecHandle;async: BOOLEAN): OSErr;
  8415. æDT myVariable := NBPRegister(abRecord,async);
  8416. æMM
  8417. æRT 20
  8418. æRI II-299, N20-2
  8419. æC 
  8420. ABusRecord
  8421.   <--    abOpcode            {always tNBPRegister}
  8422.   <--    abResult            {result code}
  8423.   -->    abUserReference     {for your use}
  8424.   -->    nbpEntityPtr        {pointer to entity name}
  8425.   -->    nbpBufPtr           {pointer to buffer}
  8426.   -->    nbpBufSize          {buffer size in bytes}
  8427.   -->    nbpAddress.aSocket  {socket address}
  8428.   -->    nbpRetransmitInfo   {retransmission information}
  8429.  
  8430. NBPRegister adds the name and address of an entity to the node’s names table. NBPEntityPtr
  8431. points to a variable of type EntityName containing the entity’s name. If the name is
  8432. already registered, NBPRegister returns the result code nbpDuplicate. NBPAddress
  8433. indicates the socket for which the name should be registered. NBPBufPtr and nbpBufSize
  8434. specify the location and size of a buffer for NBP to use internally.
  8435.  
  8436. While the variable of type EntityName is declared as three 32-byte strings, only the
  8437. actual characters of the name are placed in the buffer pointed to by nbpBufPtr. For
  8438. this reason, nbpBufSize needs only to be equal to the actual length of the name, plus
  8439. an additional 12 bytes for use by NBP.
  8440.  
  8441. Warning:  This buffer must not be altered or released until the name is
  8442.           removed from the names table via an NBPRemove call. If you
  8443.           allocate the buffer through a NewHandle call, you must lock
  8444.           it as long as the name is registered.
  8445.  
  8446. Warning:  The zone field of the entity name must be set to the
  8447.           meta-character “*”.
  8448.  
  8449. Result codes    noErr           No error
  8450.                 nbpDuplicate    Duplicate name already exists
  8451.  
  8452. æKY NBPLookup
  8453. æFp AppleTalk.p
  8454. æT FUNCTION
  8455. æD FUNCTION NBPLookup(abRecord: ABRecHandle;async: BOOLEAN): OSErr;
  8456. æDT myVariable := NBPLookup(abRecord,async);
  8457. æMM
  8458. æRT 9, 20
  8459. æRI II-300, N9-1, 2, N20-2 
  8460. æC 
  8461. ABusRecord
  8462.   <--    abOpcode           {always tNBPLookup}
  8463.   <--    abResult           {result code}
  8464.   -->    abUserReference    {for your use}
  8465.   -->    nbpEntityPtr       {pointer to entity name}
  8466.   -->    nbpBufPtr          {pointer to buffer}
  8467.   -->    nbpBufSize         {buffer size in bytes}
  8468.   <->    nbpDataField       {number of addresses received}
  8469.   -->    nbpRetransmitInfo  {retransmission information}
  8470.  
  8471. NBPLookup returns the addresses of all entities with a specified name. NBPEntityPtr
  8472. points to a variable of type EntityName containing the name of the entity whose
  8473. address should be returned. (Meta-characters are allowed in the entity name.) NBPBufPtr
  8474. and nbpBufSize contain the location and size of an area of memory in which the entity
  8475. names and their corresponding addresses should be returned. NBPDataField indicates
  8476. the maximum number of matching names to find addresses for; the actual number of
  8477. addresses found is returned in nbpDataField. NBPRetransmitInfo contains the retry
  8478. interval and the retry count.
  8479.  
  8480. When specifying nbpBufSize, for each NBP tuple expected, allow space for the actual
  8481. characters of the name, the address, and four bytes for use by NBP.
  8482.  
  8483. Result codes    noErr         No error
  8484.                 nbpBuffOvr    Buffer overflow
  8485.  
  8486. æKY NBPExtract
  8487. æFp AppleTalk.p
  8488. æT FUNCTION
  8489. æD FUNCTION NBPExtract(theBuffer: Ptr;numInBuf: INTEGER;whichOne: INTEGER;
  8490.     VAR abEntity: EntityName;VAR address: AddrBlock): OSErr;
  8491. æDT myVariable := NBPExtract(theBuffer,numInBuf,whichOne,abEntity,address);
  8492. æMM
  8493. æRI II-300,V-515
  8494. æC 
  8495. This routine is provided in the alternate interface, but can be used as provided for
  8496. extracting NBP entity names from a look-up response buffer.
  8497.  
  8498. NBPExtract returns one address from the list of addresses returned by NBPLookup.
  8499. TheBuffer and numInBuf indicate the location and number of tuples in the buffer.
  8500. WhichOne specifies which one of the tuples in the buffer should be returned in the
  8501. abEntity and address parameters.
  8502.  
  8503. Result codes    noErr         No error
  8504.                 extractErr    Can’t find tuple in buffer
  8505.  
  8506. æKY NBPConfirm
  8507. æFp AppleTalk.p
  8508. æT FUNCTION
  8509. æD FUNCTION NBPConfirm(abRecord: ABRecHandle;async: BOOLEAN): OSErr;
  8510. æDT myVariable := NBPConfirm(abRecord,async);
  8511. æMM
  8512. æRT 9
  8513. æRI II-301, N9-2
  8514. æC 
  8515. ABusRecord
  8516.   <--    abOpcode           {always tNBPConfirm}
  8517.   <--    abResult           {result code}
  8518.   -->    abUserReference    {for your use}
  8519.   -->    nbpEntityPtr       {pointer to entity name}
  8520.   <--    nbpDataField       {socket number}
  8521.   -->    nbpAddress         {socket address}
  8522.   -->    nbpRetransmitInfo  {retransmission information}
  8523.  
  8524. NBPConfirm confirms that an entity known by name and address still exists (is still
  8525. entered in the names directory). NBPEntityPtr points to a variable of type EntityName
  8526. that contains the name to confirm, and nbpAddress specifies the address to be confirmed.
  8527. (No meta-characters are allowed in the entity name.) NBPRetransmitInfo contains the
  8528. retry interval and the retry count. The socket number of the entity is returned in
  8529. nbpDataField. NBPConfirm is more efficient than NBPLookup in terms of network traffic.
  8530.  
  8531. Result codes    noErr           No error
  8532.                 nbpConfDiff     Name confirmed for different socket
  8533.                 nbpNoConfirm    Name not confirmed
  8534.  
  8535. æKY NBPRemove
  8536. æFp AppleTalk.p
  8537. æT FUNCTION
  8538. æD FUNCTION NBPRemove(abEntity: EntityPtr): OSErr;
  8539. æDT myVariable := NBPRemove(abEntity);
  8540. æMM
  8541. æRI II-301
  8542. æC 
  8543. NBPRemove removes an entity name from the names table of the given entity’s node.
  8544.  
  8545. Result codes    noErr          No error
  8546.                 nbpNotFound    Name not found
  8547.  
  8548. æKY NBPLoad
  8549. æFp AppleTalk.p
  8550. æT FUNCTION
  8551. æD FUNCTION NBPLoad: OSErr;
  8552. æDT myVariable := NBPLoad;
  8553. æMM
  8554. æRI II-301
  8555. æC 
  8556. On a Macintosh 128K, NBPLoad reads the NBP code from the system resource file into
  8557. the application heap. On a Macintosh 512K or XL, NBPLoad has no effect since the NBP
  8558. code should have already been loaded when the .MPP driver was opened. Normally you’ll
  8559. never need to call NBPLoad, because the AppleTalk Manager calls it when necessary.
  8560.  
  8561. Result codes    noErr    No error
  8562.  
  8563. æKY NBPUnload
  8564. æFp AppleTalk.p
  8565. æT FUNCTION
  8566. æD FUNCTION NBPUnload: OSErr;
  8567. æDT myVariable := NBPUnload;
  8568. æMM
  8569. æRI II-301
  8570. æC 
  8571. On a Macintosh 128K, NBPUnload makes the NBP code purgeable; the space isn’t actually
  8572. released by the Memory Manager until necessary. On a Macintosh 512K or Macintosh XL,
  8573. NBPUnload has no effect.
  8574.  
  8575. Result codes    noErr    No error
  8576.  
  8577. »Example
  8578.  
  8579. This example of NBP registers our node as a print spooler, searches for any print
  8580. spoolers registered on the network, and then extracts the information for the first
  8581. one found.
  8582.  
  8583. CONST
  8584.   mySocket = 20;
  8585.  
  8586. VAR
  8587.   myABRecord: ABRecHandle;
  8588.   myEntity: EntityName;
  8589.   entityAddr: AddrBlock;
  8590.   nbpNamePtr: Ptr;
  8591.   myBuffer: PACKED ARRAY [0..999] OF CHAR;
  8592.   errCode: INTEGER;
  8593.   async: BOOLEAN;
  8594.  
  8595. BEGIN
  8596.   errCode := MPPOpen;
  8597.   IF errCode <> noErr THEN
  8598.     WRITELN('Error in opening AppleTalk')
  8599.     {Maybe serial port B isn't available for use by AppleTalk}
  8600.   ELSE
  8601.     BEGIN
  8602.       {Call Memory Manager to allocate ABusRecord}
  8603.       myABRecord := ABRecHandle(NewHandle(nbpSize));
  8604.       {Set up our entity name to register}
  8605.       WITH myEntity DO
  8606.         BEGIN
  8607.           objStr := 'Gene Station'; {we are called 'Gene Station' }
  8608.           typeStr := 'PrintSpooler'; { and are of type 'PrintSpooler'}
  8609.           zoneStr := '*';
  8610.           {Allocate data space for the entity name (used by NBP)}
  8611.           nbpNamePtr := NewPtr(LENGTH(objStr) + LENGTH(typeStr) +
  8612.                                LENGTH(zoneStr) + 12);
  8613.         END;
  8614.       {Set up the ABusRecord for the NBPRegister call}
  8615.       WITH myABRecord^^ DO
  8616.         BEGIN
  8617.           nbpEntityPtr := @myEntity;
  8618.           nbpBufPtr := nbpNamePtr; {buffer used by NBP internally}
  8619.           nbpBufSize := nbpNameBufSize;
  8620.           nbpAddress.aSocket := mySocket; {socket to register us on}
  8621.           nbpRetransmitInfo.retransInterval := 8; {retransmit every 64 }
  8622.           nbpRetransmitInfo.retransCount := 3; { ticks and try 3 times}
  8623.         END;
  8624.       async := FALSE;
  8625.       errCode := NBPRegister(myABRecord, async);
  8626.       IF errCode <> noErr THEN
  8627.         WRITELN('Error occurred in the NBPRegister call')
  8628.         {Maybe the name is already registered somewhere else on the }
  8629.         { network.}
  8630.       ELSE
  8631.         BEGIN
  8632.           {Now that we've registered our name, find others of type }
  8633.           { 'PrintSpooler'.}
  8634.           WITH myEntity DO
  8635.             BEGIN
  8636.               objStr := '='; {any one of type }
  8637.               typeStr := 'PrintSpooler'; { “PrintSpooler” }
  8638.               zoneStr := '*'; { in our zone}
  8639.             END;
  8640.           WITH myABRecord^^ DO
  8641.             BEGIN
  8642.               nbpEntityPtr := @myEntity;
  8643.               nbpBufPtr := @myBuffer; {buffer to place responses in}
  8644.               nbpBufSize := SIZEOF(myBuffer);
  8645.              {The field nbpDataField, before the NBPLookup call, represents an }
  8646.               { approximate number of responses. After the call, nbpDataField }
  8647.               { contains the actual number of responses received.}
  8648.               nbpDataField := 100; {we want about 100 responses back}
  8649.             END;
  8650.           errCode := NBPLookup(myABRecord, async); {make sync call}
  8651.           IF errCode <> noErr THEN
  8652.             WRITELN('An error occurred in the NBPLookup')
  8653.             {Did the buffer overflow?}
  8654.           ELSE
  8655.             BEGIN
  8656.               {Get the first reply}
  8657.               errCode := NBPExtract(@mybuffer, myABRecord^^.nbpDataField, 1,
  8658.                                     myEntity, entityAddr);
  8659.            {The socket address and name of the entity are returned here. If we }
  8660.              { want all of them, we'll have to loop for each one in the buffer.}
  8661.               IF errCode <> noErr THEN WRITELN('Error in NBPExtract');
  8662.               {Maybe the one we wanted wasn't in the buffer}
  8663.             END;
  8664.         END;
  8665.     END;
  8666. END.
  8667.  
  8668. æKY GetNodeAddress
  8669. æFp AppleTalk.p
  8670. æT FUNCTION
  8671. æD FUNCTION GetNodeAddress(VAR myNode: INTEGER;VAR myNet: INTEGER): OSErr;
  8672. æDT myVariable := GetNodeAddress(myNode,myNet);
  8673. æRI II-303
  8674. æC 
  8675. GetNodeAddress returns the current node ID and network number of the caller. If the
  8676. .MPP driver isn’t installed, it returns noMPPErr. If myNet contains 0, this means
  8677. that a bridge hasn’t yet been found.
  8678.  
  8679. Result codes    noErr       No error
  8680.                 noMPPErr    MPP driver not installed
  8681.  
  8682. æKY IsMPPOpen
  8683. æFp AppleTalk.p
  8684. æT FUNCTION
  8685. æD FUNCTION IsMPPOpen: BOOLEAN;
  8686. æDT myVariable := IsMPPOpen;
  8687. æRI II-304
  8688. æC 
  8689. [Not in ROM]
  8690.  
  8691. IsMPPOpen returns TRUE if the .MPP driver is loaded and running.
  8692.  
  8693. æKY IsATPOpen
  8694. æFp AppleTalk.p
  8695. æT FUNCTION
  8696. æD FUNCTION IsATPOpen: BOOLEAN;
  8697. æDT myVariable := IsATPOpen;
  8698. æRI II-304
  8699. æC 
  8700. [Not in ROM]
  8701.  
  8702. IsATPOpen returns TRUE if the .ATP driver is loaded and running.
  8703.  
  8704. æKY ATEvent
  8705. æFp AppleTalk.p
  8706. æT PROCEDURE
  8707. æD PROCEDURE ATEvent(event: LONGINT;infoPtr: Ptr);
  8708. æDT ATEvent(event,infoPtr);
  8709. æRI II-304
  8710. æC 
  8711. [Not in ROM]
  8712.  
  8713. IsATPOpen returns TRUE if the .ATP driver is loaded and running.
  8714.  
  8715. æKY ATPreFlightEvent
  8716. æFp AppleTalk.p
  8717. æT FUNCTION
  8718. æD FUNCTION ATPreFlightEvent(event: LONGINT;cancel: LONGINT;infoPtr: Ptr): OSErr;
  8719. æDT myVariable := ATPreFlightEvent(event,cancel,infoPtr);
  8720. æRI II-304
  8721. æC 
  8722. [Not in ROM]
  8723.  
  8724. IsATPOpen returns TRUE if the .ATP driver is loaded and running.
  8725.  
  8726.  
  8727. æKY Balloons.p
  8728. æKL HMBalloonPict
  8729. HMBalloonRect
  8730. HMExtractHelpMsg
  8731. HMGetBalloons
  8732. HMGetBalloonWindow
  8733. HMGetDialogResID
  8734. HMGetFont
  8735. HMGetFontSize
  8736. HMGetHelpMenuHandle
  8737. HMGetIndHelpMsg
  8738. HMGetMenuResID
  8739. HMIsBalloon
  8740. HMRemoveBalloon
  8741. HMScanTemplateItems
  8742. HMSetBalloons
  8743. HMSetDialogResID
  8744. HMSetFont
  8745. HMSetFontSize
  8746. HMSetMenuResID
  8747. HMShowBalloon
  8748. HMShowMenuBalloon
  8749.  
  8750. helpItem
  8751. hmAbsoluteCoords
  8752. hmBalloonAborted
  8753. hmBalloonHelpVersion
  8754. hmCloseViewActive
  8755. hmDefaultOptions
  8756. hmHelpDisabled
  8757. hmHelpManagerNotInited
  8758. hmMatchInTitle
  8759. HMMessageRecord
  8760. HMMessageRecPtr
  8761. hmNoBalloonUp
  8762. hmOperationUnsupported
  8763. hmSameAsLastBalloon
  8764. hmSaveBitsNoWindow
  8765. hmSaveBitsWindow
  8766. hmSkippedBalloon
  8767. HMStringResType
  8768. hmUnknownHelpType
  8769. hmUseSubID
  8770. hmWrongVersion
  8771. kBalloonWDEFID
  8772. kHMAboutHelpItem
  8773. kHMCheckedItem
  8774. kHMCompareItem
  8775. kHMDialogResType
  8776. kHMDisabledItem
  8777. kHMEnabledItem
  8778. kHMFinderApplResType
  8779. kHMHelpID
  8780. kHMHelpMenuID
  8781. kHMMenuResType
  8782. khmmPict
  8783. khmmPictHandle
  8784. khmmString
  8785. khmmStringRes
  8786. khmmSTRRes
  8787. khmmTEHandle
  8788. khmmTERes
  8789. kHMNamedResourceItem
  8790. kHMOtherItem
  8791. kHMOverrideResType
  8792. kHMPictItem
  8793. kHMRectListResType
  8794. kHMRegularWindow
  8795. kHMSaveBitsNoWindow
  8796. kHMSaveBitsWindow
  8797. kHMShowBalloonsItem
  8798. kHMSkipItem
  8799. kHMStringItem
  8800. kHMStringResItem
  8801. kHMSTRResItem
  8802. kHMTEResItem
  8803. kHMTEStyleResType
  8804. kHMTETextResType
  8805. kHMTrackCntlItem
  8806. kHMWindListResType
  8807.  
  8808. æKY hmBalloonHelpVersion
  8809. æFp Balloons.p
  8810. æT CONST
  8811. æD hmBalloonHelpVersion = $0002; { The real version of the Help Manager }
  8812. æC 
  8813.  
  8814. æKY hmHelpDisabled
  8815. æFp Balloons.p
  8816. æT CONST
  8817. æD hmHelpDisabled = -850; { Show Balloons mode was off, call to routine ignored }
  8818. æC 
  8819.  
  8820. æKY hmBalloonAborted
  8821. æFp Balloons.p
  8822. æT CONST
  8823. æD hmBalloonAborted = -853; { Returned if mouse was moving or mouse wasn't in window port rect }
  8824. æC 
  8825.  
  8826. æKY hmSameAsLastBalloon
  8827. æFp Balloons.p
  8828. æT CONST
  8829. æD hmSameAsLastBalloon = -854; { Returned from HMShowMenuBalloon if menu & item is same as last time }
  8830. æC 
  8831.  
  8832. æKY hmHelpManagerNotInited
  8833. æFp Balloons.p
  8834. æT CONST
  8835. æD hmHelpManagerNotInited = -855; { Returned from HMGetHelpMenuHandle if help menu not setup }
  8836. æC 
  8837.  
  8838. æKY hmSkippedBalloon
  8839. æFp Balloons.p
  8840. æT CONST
  8841. æD hmSkippedBalloon = -857; { Returned from calls if helpmsg specified a skip balloon }
  8842. æC 
  8843.  
  8844. æKY hmWrongVersion
  8845. æFp Balloons.p
  8846. æT CONST
  8847. æD hmWrongVersion = -858; { Returned if help mgr resource was the wrong version }
  8848. æC 
  8849.  
  8850. æKY hmUnknownHelpType
  8851. æFp Balloons.p
  8852. æT CONST
  8853. æD hmUnknownHelpType = -859; { Returned if help msg record contained a bad type }
  8854. æC 
  8855.  
  8856. æKY hmOperationUnsupported
  8857. æFp Balloons.p
  8858. æT CONST
  8859. æD hmOperationUnsupported = -861; { Returned from HMShowBalloon call if bad method passed to routine }
  8860. æC 
  8861.  
  8862. æKY hmNoBalloonUp
  8863. æFp Balloons.p
  8864. æT CONST
  8865. æD hmNoBalloonUp = -862; { Returned from HMRemoveBalloon if no balloon was visible when call was made }
  8866. æC 
  8867.  
  8868. æKY hmCloseViewActive
  8869. æFp Balloons.p
  8870. æT CONST
  8871. æD hmCloseViewActive = -863; { Returned from HMRemoveBalloon if CloseView was active }
  8872. æC 
  8873.  
  8874. æKY kHMHelpMenuID
  8875. æFp Balloons.p
  8876. æT CONST
  8877. æD kHMHelpMenuID = -16490; { Resource ID and menu ID of help menu }
  8878. æC 
  8879.  
  8880. æKY kHMAboutHelpItem
  8881. æFp Balloons.p
  8882. æT CONST
  8883. æD kHMAboutHelpItem = 1; { help menu item number of About Balloon Help… }
  8884. æC 
  8885.  
  8886. æKY kHMShowBalloonsItem
  8887. æFp Balloons.p
  8888. æT CONST
  8889. æD kHMShowBalloonsItem = 3; { help menu item number of Show/Hide Balloons }
  8890. æC 
  8891.  
  8892. æKY kHMHelpID
  8893. æFp Balloons.p
  8894. æT CONST
  8895. æD kHMHelpID = -5696; { ID of various Help Mgr package resources (in Pack14 range) }
  8896. æC 
  8897.  
  8898. æKY kBalloonWDEFID
  8899. æFp Balloons.p
  8900. æT CONST
  8901. æD kBalloonWDEFID = 126; { Resource ID of the WDEF proc used in standard balloons }
  8902. æC 
  8903.  
  8904. æKY helpItem
  8905. æFp Balloons.p
  8906. æT CONST
  8907. æD helpItem = 1; { key value in DITL template that corresponds to the help item }
  8908. æC 
  8909.  
  8910. æKY hmDefaultOptions
  8911. æFp Balloons.p
  8912. æT CONST
  8913. æD hmDefaultOptions = 0; { default options for help manager resources }
  8914. æC 
  8915.  
  8916. æKY hmUseSubID
  8917. æFp Balloons.p
  8918. æT CONST
  8919. æD hmUseSubID = 1; { treat resID's in resources as subID's of driver base ID }
  8920. æC 
  8921.  
  8922. æKY hmAbsoluteCoords
  8923. æFp Balloons.p
  8924. æT CONST
  8925. æD hmAbsoluteCoords = 2; { ignore window port origin and treat rectangles as absolute coords }
  8926. æC 
  8927.  
  8928. æKY hmSaveBitsNoWindow
  8929. æFp Balloons.p
  8930. æT CONST
  8931. æD hmSaveBitsNoWindow = 4; { don't create a window, just blast bits on screen. No update event is generated }
  8932. æC 
  8933.  
  8934. æKY hmSaveBitsWindow
  8935. æFp Balloons.p
  8936. æT CONST
  8937. æD hmSaveBitsWindow = 8; { create a window, but restore bits behind window when window goes away }
  8938. æC 
  8939.  
  8940. æKY hmMatchInTitle
  8941. æFp Balloons.p
  8942. æT CONST
  8943. æD hmMatchInTitle = 16; { for hwin resources, match string anywhere in window title string }
  8944. æC 
  8945.  
  8946. æKY kHMStringItem
  8947. æFp Balloons.p
  8948. æT CONST
  8949. æD kHMStringItem = 1; { pstring used in resource }
  8950. æC 
  8951.  
  8952. æKY kHMPictItem
  8953. æFp Balloons.p
  8954. æT CONST
  8955. æD kHMPictItem = 2; { 'PICT' ResID used in resource }
  8956. æC 
  8957.  
  8958. æKY kHMStringResItem
  8959. æFp Balloons.p
  8960. æT CONST
  8961. æD kHMStringResItem = 3; { 'STR#' ResID & index used in resource }
  8962. æC 
  8963.  
  8964. æKY kHMTEResItem
  8965. æFp Balloons.p
  8966. æT CONST
  8967. æD kHMTEResItem = 6; { Styled Text Edit ResID used in resource ('TEXT' & 'styl') }
  8968. æC 
  8969.  
  8970. æKY kHMSTRResItem
  8971. æFp Balloons.p
  8972. æT CONST
  8973. æD kHMSTRResItem = 7; { 'STR ' ResID used in resource }
  8974. æC 
  8975.  
  8976. æKY kHMSkipItem
  8977. æFp Balloons.p
  8978. æT CONST
  8979. æD kHMSkipItem = 256; { don't display a balloon }
  8980. æC 
  8981.  
  8982. æKY kHMCompareItem
  8983. æFp Balloons.p
  8984. æT CONST
  8985. æD kHMCompareItem = 512; { Compare pstring in menu item w/ PString in resource item }
  8986. æC 
  8987.  
  8988. æKY kHMNamedResourceItem
  8989. æFp Balloons.p
  8990. æT CONST
  8991. æD kHMNamedResourceItem = 1024; { Use pstring in menu item to get 'STR#', 'PICT', or 'STR ' resource ('hmnu' only) }
  8992. æC 
  8993.  
  8994. æKY kHMTrackCntlItem
  8995. æFp Balloons.p
  8996. æT CONST
  8997. æD kHMTrackCntlItem = 2048; { Reserved }
  8998. æC 
  8999.  
  9000. æKY khmmString
  9001. æFp Balloons.p
  9002. æT CONST
  9003. æD khmmString = 1; { help message contains a PString }
  9004. æC 
  9005.  
  9006. æKY khmmPict
  9007. æFp Balloons.p
  9008. æT CONST
  9009. æD khmmPict = 2; { help message contains a resource ID to a 'PICT' resource }
  9010. æC 
  9011.  
  9012. æKY khmmStringRes
  9013. æFp Balloons.p
  9014. æT CONST
  9015. æD khmmStringRes = 3; { help message contains a res ID & index to a 'STR#' resource }
  9016. æC 
  9017.  
  9018. æKY khmmTEHandle
  9019. æFp Balloons.p
  9020. æT CONST
  9021. æD khmmTEHandle = 4; { help message contains a Text Edit handle }
  9022. æC 
  9023.  
  9024. æKY khmmPictHandle
  9025. æFp Balloons.p
  9026. æT CONST
  9027. æD khmmPictHandle = 5; { help message contains a Picture handle }
  9028. æC 
  9029.  
  9030. æKY khmmTERes
  9031. æFp Balloons.p
  9032. æT CONST
  9033. æD khmmTERes = 6; { help message contains a res ID to 'TEXT' & 'styl' resources }
  9034. æC 
  9035.  
  9036. æKY khmmSTRRes
  9037. æFp Balloons.p
  9038. æT CONST
  9039. æD khmmSTRRes = 7; { help message contains a res ID to a 'STR ' resource }
  9040. æC 
  9041.  
  9042. æKY kHMTETextResType
  9043. æFp Balloons.p
  9044. æT CONST
  9045. æD kHMTETextResType = 'TEXT'; { Resource Type of text data for styled TE record w/o style info }
  9046. æC 
  9047.  
  9048. æKY kHMTEStyleResType
  9049. æFp Balloons.p
  9050. æT CONST
  9051. æD kHMTEStyleResType = 'styl'; { Resource Type of style information for styled TE record }
  9052. æC 
  9053.  
  9054. æKY kHMEnabledItem
  9055. æFp Balloons.p
  9056. æT CONST
  9057. æD kHMEnabledItem = 0; { item is enabled, but not checked or control value = 0 }
  9058. æC 
  9059.  
  9060. æKY kHMDisabledItem
  9061. æFp Balloons.p
  9062. æT CONST
  9063. æD kHMDisabledItem = 1; { item is disabled, grayed in menus or disabled in dialogs }
  9064. æC 
  9065.  
  9066. æKY kHMCheckedItem
  9067. æFp Balloons.p
  9068. æT CONST
  9069. æD kHMCheckedItem = 2; { item is enabled, and checked or control value = 1 }
  9070. æC 
  9071.  
  9072. æKY kHMOtherItem
  9073. æFp Balloons.p
  9074. æT CONST
  9075. æD kHMOtherItem = 3; { item is enabled, and control value > 1 }
  9076. æC 
  9077.  
  9078. æKY kHMMenuResType
  9079. æFp Balloons.p
  9080. æT CONST
  9081. æD kHMMenuResType = 'hmnu'; { ResType of help resource for supporting menus }
  9082. æC 
  9083.  
  9084. æKY kHMDialogResType
  9085. æFp Balloons.p
  9086. æT CONST
  9087. æD kHMDialogResType = 'hdlg'; { ResType of help resource for supporting dialogs }
  9088. æC 
  9089.  
  9090. æKY kHMWindListResType
  9091. æFp Balloons.p
  9092. æT CONST
  9093. æD kHMWindListResType = 'hwin'; { ResType of help resource for supporting windows }
  9094. æC 
  9095.  
  9096. æKY kHMRectListResType
  9097. æFp Balloons.p
  9098. æT CONST
  9099. æD kHMRectListResType = 'hrct'; { ResType of help resource for rectangles in windows }
  9100. æC 
  9101.  
  9102. æKY kHMOverrideResType
  9103. æFp Balloons.p
  9104. æT CONST
  9105. æD kHMOverrideResType = 'hovr'; { ResType of help resource for overriding system balloons }
  9106. æC 
  9107.  
  9108. æKY kHMFinderApplResType
  9109. æFp Balloons.p
  9110. æT CONST
  9111. æD kHMFinderApplResType = 'hfdr'; { ResType of help resource for custom balloon in Finder }
  9112. æC 
  9113.  
  9114. æKY kHMRegularWindow
  9115. æFp Balloons.p
  9116. æT CONST
  9117. æD kHMRegularWindow = 0; { Create a regular window floating above all windows }
  9118. æC 
  9119.  
  9120. æKY kHMSaveBitsNoWindow
  9121. æFp Balloons.p
  9122. æT CONST
  9123. æD kHMSaveBitsNoWindow = 1; { Just save the bits and draw (for MDEF calls) }
  9124. æC 
  9125.  
  9126. æKY kHMSaveBitsWindow
  9127. æFp Balloons.p
  9128. æT CONST
  9129. æD kHMSaveBitsWindow = 2; { Regular window, save bits behind, AND generate update event }
  9130. æC 
  9131.  
  9132. æKY HMStringResType
  9133. æFp Balloons.p
  9134. æT RECORD
  9135. æD HMStringResType = RECORD
  9136.     hmmResID: INTEGER;
  9137.     hmmIndex: INTEGER;
  9138.     END;
  9139. æC 
  9140.  
  9141. æKY HMMessageRecord
  9142. HMMessageRecPtr
  9143. æFp Balloons.p
  9144. æT RECORD
  9145. æD HMMessageRecPtr    = ^HMMessageRecord;
  9146. HMMessageRecord    = RECORD
  9147.                 hmmHelpType            : INTEGER;
  9148.                 CASE INTEGER OF
  9149.                 khmmString:
  9150.                     (hmmString: STR255);
  9151.                 khmmPict:
  9152.                     (hmmPict: INTEGER);
  9153.                 khmmStringRes:
  9154.                     (hmmStringRes: HMStringResType);
  9155.                 khmmTEHandle:
  9156.                     (hmmTEHandle: TEHandle);
  9157.                 khmmPictHandle:
  9158.                     (hmmPictHandle: PicHandle);
  9159.                 khmmTERes:
  9160.                     (hmmTERes: INTEGER);
  9161.                 khmmSTRRes:
  9162.                     (hmmSTRRes: INTEGER);
  9163.                 END;
  9164. æC 
  9165.  
  9166. æKY HMGetHelpMenuHandle
  9167. æFp Balloons.p
  9168. æT FUNCTION
  9169. æD FUNCTION HMGetHelpMenuHandle(VAR mh: MenuHandle): OSErr;
  9170.     INLINE $303C,$0200,_Pack14;
  9171. æDT myVariable := HMGetHelpMenuHandle(mh);
  9172. æC 
  9173.  
  9174. æKY HMShowBalloon
  9175. æFp Balloons.p
  9176. æT FUNCTION
  9177. æD FUNCTION HMShowBalloon(aHelpMsg: HMMessageRecord;
  9178.                        tip: Point;
  9179.                        alternateRect: RectPtr;
  9180.                        tipProc: Ptr;
  9181.                        theProc: INTEGER;
  9182.                        variant: INTEGER;
  9183.                        method: INTEGER): OSErr;
  9184.     INLINE $303C,$0B01,_Pack14;
  9185. æDT myVariable := HMShowBalloon(aHelpMsg,tip,alternateRect,tipProc,theProc,variant,method);
  9186. æC 
  9187.  
  9188. æKY HMRemoveBalloon
  9189. æFp Balloons.p
  9190. æT FUNCTION
  9191. æD FUNCTION HMRemoveBalloon: OSErr;
  9192.     INLINE $303C,$0002,_Pack14;
  9193. æDT myVariable := HMRemoveBalloon;
  9194. æC 
  9195.  
  9196. æKY HMGetBalloons
  9197. æFp Balloons.p
  9198. æT FUNCTION
  9199. æD FUNCTION HMGetBalloons: BOOLEAN;
  9200.     INLINE $303C,$0003,_Pack14;
  9201. æDT myVariable := HMGetBalloons;
  9202. æC 
  9203.  
  9204. æKY HMSetBalloons
  9205. æFp Balloons.p
  9206. æT FUNCTION
  9207. æD FUNCTION HMSetBalloons(flag: BOOLEAN): OSErr;
  9208.     INLINE $303C,$0104,_Pack14;
  9209. æDT myVariable := HMSetBalloons(flag);
  9210. æC 
  9211.  
  9212. æKY HMShowMenuBalloon
  9213. æFp Balloons.p
  9214. æT FUNCTION
  9215. æD FUNCTION HMShowMenuBalloon(itemNum: INTEGER;
  9216.                            itemMenuID: INTEGER;
  9217.                            itemFlags: LONGINT;
  9218.                            itemReserved: LONGINT;
  9219.                            tip: Point;
  9220.                            alternateRect: RectPtr;
  9221.                            tipProc: Ptr;
  9222.                            theProc: INTEGER;
  9223.                            variant: INTEGER): OSErr;
  9224.     INLINE $303C,$0E05,_Pack14;
  9225. æDT myVariable := HMShowMenuBalloon(itemNum,itemMenuID,itemFlags,itemReserved,tip,alternateRect,tipProc,theProc,variant);
  9226. æC 
  9227.  
  9228. æKY HMGetIndHelpMsg
  9229. æFp Balloons.p
  9230. æT FUNCTION
  9231. æD FUNCTION HMGetIndHelpMsg(whichType: ResType;
  9232.                          whichResID: INTEGER;
  9233.                          whichMsg: INTEGER;
  9234.                          whichState: INTEGER;
  9235.                          VAR options: LONGINT;
  9236.                          VAR tip: Point;
  9237.                          VAR altRect: Rect;
  9238.                          VAR theProc: INTEGER;
  9239.                          VAR variant: INTEGER;
  9240.                          VAR aHelpMsg: HMMessageRecord;
  9241.                          VAR count: INTEGER): OSErr;
  9242.     INLINE $303C,$1306,_Pack14;
  9243. æDT myVariable := HMGetIndHelpMsg(whichType,whichResID,whichMsg,whichState,options,tip,altRect,theProc,variant,aHelpMsg,count);
  9244. æC 
  9245.  
  9246. æKY HMIsBalloon
  9247. æFp Balloons.p
  9248. æT FUNCTION
  9249. æD FUNCTION HMIsBalloon: BOOLEAN;
  9250.     INLINE $303C,$0007,_Pack14;
  9251. æDT myVariable := HMIsBalloon;
  9252. æC 
  9253.  
  9254. æKY HMSetFont
  9255. æFp Balloons.p
  9256. æT FUNCTION
  9257. æD FUNCTION HMSetFont(font: INTEGER): OSErr;
  9258.     INLINE $303C,$0108,_Pack14;
  9259. æDT myVariable := HMSetFont(font);
  9260. æC 
  9261.  
  9262. æKY HMSetFontSize
  9263. æFp Balloons.p
  9264. æT FUNCTION
  9265. æD FUNCTION HMSetFontSize(fontSize: INTEGER): OSErr;
  9266.     INLINE $303C,$0109,_Pack14;
  9267. æDT myVariable := HMSetFontSize(fontSize);
  9268. æC 
  9269.  
  9270. æKY HMGetFont
  9271. æFp Balloons.p
  9272. æT FUNCTION
  9273. æD FUNCTION HMGetFont(VAR font: INTEGER): OSErr;
  9274.     INLINE $303C,$020A,_Pack14;
  9275. æDT myVariable := HMGetFont(font);
  9276. æC 
  9277.  
  9278. æKY HMGetFontSize
  9279. æFp Balloons.p
  9280. æT FUNCTION
  9281. æD FUNCTION HMGetFontSize(VAR fontSize: INTEGER): OSErr;
  9282.     INLINE $303C,$020B,_Pack14;
  9283. æDT myVariable := HMGetFontSize(fontSize);
  9284. æC 
  9285.  
  9286. æKY HMSetDialogResID
  9287. æFp Balloons.p
  9288. æT FUNCTION
  9289. æD FUNCTION HMSetDialogResID(resID: INTEGER): OSErr;
  9290.     INLINE $303C,$010C,_Pack14;
  9291. æDT myVariable := HMSetDialogResID(resID);
  9292. æC 
  9293.  
  9294. æKY HMSetMenuResID
  9295. æFp Balloons.p
  9296. æT FUNCTION
  9297. æD FUNCTION HMSetMenuResID(menuID: INTEGER;
  9298.                         resID: INTEGER): OSErr;
  9299.     INLINE $303C,$020D,_Pack14;
  9300. æDT myVariable := HMSetMenuResID(menuID,resID);
  9301. æC 
  9302.  
  9303. æKY HMBalloonRect
  9304. æFp Balloons.p
  9305. æT FUNCTION
  9306. æD FUNCTION HMBalloonRect(aHelpMsg: HMMessageRecord;
  9307.                        VAR coolRect: Rect): OSErr;
  9308.     INLINE $303C,$040E,_Pack14;
  9309. æDT myVariable := HMBalloonRect(aHelpMsg,coolRect);
  9310. æC 
  9311.  
  9312. æKY HMBalloonPict
  9313. æFp Balloons.p
  9314. æT FUNCTION
  9315. æD FUNCTION HMBalloonPict(aHelpMsg: HMMessageRecord;
  9316.                        VAR coolPict: PicHandle): OSErr;
  9317.     INLINE $303C,$040F,_Pack14;
  9318. æDT myVariable := HMBalloonPict(aHelpMsg,coolPict);
  9319. æC 
  9320.  
  9321. æKY HMScanTemplateItems
  9322. æFp Balloons.p
  9323. æT FUNCTION
  9324. æD FUNCTION HMScanTemplateItems(whichID: INTEGER;
  9325.                              whichResFile: INTEGER;
  9326.                              whichType: ResType): OSErr;
  9327.     INLINE $303C,$0410,_Pack14;
  9328. æDT myVariable := HMScanTemplateItems(whichID,whichResFile,whichType);
  9329. æC 
  9330.  
  9331. æKY HMExtractHelpMsg
  9332. æFp Balloons.p
  9333. æT FUNCTION
  9334. æD FUNCTION HMExtractHelpMsg(whichType: ResType;whichResID: INTEGER;whichMsg: INTEGER;
  9335.     whichState: INTEGER;VAR aHelpMsg: HMMessageRecord): OSErr;
  9336.     INLINE $303C,$0711,_Pack14;
  9337. æDT myVariable := HMExtractHelpMsg(whichType,whichResID,whichMsg,whichState,aHelpMsg);
  9338. æC 
  9339.  
  9340. æKY HMGetDialogResID
  9341. æFp Balloons.p
  9342. æT FUNCTION
  9343. æD FUNCTION HMGetDialogResID(VAR resID: INTEGER): OSErr;
  9344.     INLINE $303C,$0213,_Pack14;
  9345. æDT myVariable := HMGetDialogResID(resID);
  9346. æC 
  9347.  
  9348. æKY HMGetMenuResID
  9349. æFp Balloons.p
  9350. æT FUNCTION
  9351. æD FUNCTION HMGetMenuResID(menuID: INTEGER;VAR resID: INTEGER): OSErr;
  9352.     INLINE $303C,$0314,_Pack14;
  9353. æDT myVariable := HMGetMenuResID(menuID,resID);
  9354. æC 
  9355.  
  9356. æKY HMGetBalloonWindow
  9357. æFp Balloons.p
  9358. æT FUNCTION
  9359. æD FUNCTION HMGetBalloonWindow(VAR window: WindowPtr): OSErr;
  9360.     INLINE $303C,$0215,_Pack14;
  9361. æDT myVariable := HMGetBalloonWindow(window);
  9362. æC 
  9363.  
  9364.  
  9365. æKY CommResources.p
  9366. æKL CRMFindCommunications
  9367. CRMGet1IndResource
  9368. CRMGet1NamedResource
  9369. CRMGet1Resource
  9370. CRMGetCRMVersion
  9371. CRMGetHeader
  9372. CRMGetIndex
  9373. CRMGetIndResource
  9374. CRMGetIndToolName
  9375. CRMGetNamedResource
  9376. CRMGetResource
  9377. CRMGetToolResource
  9378. CRMInstall
  9379. CRMLocalToRealID
  9380. CRMRealToLocalID
  9381. CRMReleaseResource
  9382. CRMReleaseToolResource
  9383. CRMRemove
  9384. CRMSearch
  9385. InitCRM
  9386.  
  9387. classCM
  9388. classFT
  9389. classTM
  9390. CRMErr
  9391. crmGenericError
  9392. crmNoErr
  9393. CRMRec
  9394. CRMRecPtr
  9395. crmRecVersion
  9396. crmType
  9397. curCRMVersion
  9398.  
  9399. æKY curCRMVersion
  9400. æFp CommResources.p
  9401. æT CONST
  9402. æD curCRMVersion = 2;
  9403. æC 
  9404.  
  9405. æKY classCM
  9406. æFp CommResources.p
  9407. æT CONST
  9408. æD classCM = 'cbnd';
  9409. æC 
  9410.  
  9411. æKY classFT
  9412. æFp CommResources.p
  9413. æT CONST
  9414. æD classFT = 'fbnd';
  9415. æC 
  9416.  
  9417. æKY classTM
  9418. æFp CommResources.p
  9419. æT CONST
  9420. æD classTM = 'tbnd';
  9421. æC 
  9422.  
  9423. æKY crmType
  9424. æFp CommResources.p
  9425. æT CONST
  9426. æD crmType = 9; { queue type    }
  9427. æC 
  9428.  
  9429. æKY crmRecVersion
  9430. æFp CommResources.p
  9431. æT CONST
  9432. æD crmRecVersion = 1; { version of queue structure }
  9433. æC 
  9434.  
  9435. æKY crmGenericError
  9436. æFp CommResources.p
  9437. æT CONST
  9438. æD crmGenericError = -1;
  9439. æC 
  9440.  
  9441. æKY crmNoErr
  9442. æFp CommResources.p
  9443. æT CONST
  9444. æD crmNoErr = 0;
  9445. æC 
  9446.  
  9447. æKY CRMErr
  9448. æFp CommResources.p
  9449. æT TYPE
  9450. æD CRMErr = OSErr;
  9451. æC 
  9452.  
  9453. æKY CRMRec
  9454. CRMRecPtr
  9455. æFp CommResources.p
  9456. æT RECORD
  9457. æD CRMRecPtr = ^CRMRec;
  9458. CRMRec = RECORD
  9459.     qLink: QElemPtr; {reserved}
  9460.     qType: INTEGER; {queue type -- ORD(crmType) = 9}
  9461.     crmVersion: INTEGER; {version of queue element data structure}
  9462.     crmPrivate: LONGINT; {reserved}
  9463.     crmReserved: INTEGER; {reserved}
  9464.     crmDeviceType: LONGINT; {type of device, assigned by DTS}
  9465.     crmDeviceID: LONGINT; {device ID; assigned when CRMInstall is called}
  9466.     crmAttributes: LONGINT; {pointer to attribute block}
  9467.     crmStatus: LONGINT; {status variable - device specific}
  9468.     crmRefCon: LONGINT; {for device private use}
  9469.     END;
  9470. æC 
  9471.  
  9472. æKY InitCRM
  9473. æFp CommResources.p
  9474. æT FUNCTION
  9475. æD FUNCTION InitCRM: CRMErr;
  9476. æDT myVariable := InitCRM;
  9477. æC 
  9478.  
  9479. æKY CRMGetHeader
  9480. æFp CommResources.p
  9481. æT FUNCTION
  9482. æD FUNCTION CRMGetHeader: QHdrPtr;
  9483. æDT myVariable := CRMGetHeader;
  9484. æC 
  9485.  
  9486. æKY CRMInstall
  9487. æFp CommResources.p
  9488. æT PROCEDURE
  9489. æD PROCEDURE CRMInstall(crmReqPtr: QElemPtr);
  9490. æDT CRMInstall(crmReqPtr);
  9491. æC 
  9492.  
  9493. æKY CRMRemove
  9494. æFp CommResources.p
  9495. æT FUNCTION
  9496. æD FUNCTION CRMRemove(crmReqPtr: QElemPtr): OSErr;
  9497. æDT myVariable := CRMRemove(crmReqPtr);
  9498. æC 
  9499.  
  9500. æKY CRMSearch
  9501. æFp CommResources.p
  9502. æT FUNCTION
  9503. æD FUNCTION CRMSearch(crmReqPtr: QElemPtr): QElemPtr;
  9504. æDT myVariable := CRMSearch(crmReqPtr);
  9505. æC 
  9506.  
  9507. æKY CRMGetCRMVersion
  9508. æFp CommResources.p
  9509. æT FUNCTION
  9510. æD FUNCTION CRMGetCRMVersion: INTEGER;
  9511. æDT myVariable := CRMGetCRMVersion;
  9512. æC 
  9513.  
  9514. æKY CRMGetResource
  9515. æFp CommResources.p
  9516. æT FUNCTION
  9517. æD FUNCTION CRMGetResource(theType: ResType;theID: INTEGER): Handle;
  9518. æDT myVariable := CRMGetResource(theType,theID);
  9519. æC 
  9520.  
  9521. æKY CRMGet1Resource
  9522. æFp CommResources.p
  9523. æT FUNCTION
  9524. æD FUNCTION CRMGet1Resource(theType: ResType;theID: INTEGER): Handle;
  9525. æDT myVariable := CRMGet1Resource(theType,theID);
  9526. æC 
  9527.  
  9528. æKY CRMGetIndResource
  9529. æFp CommResources.p
  9530. æT FUNCTION
  9531. æD FUNCTION CRMGetIndResource(theType: ResType;index: INTEGER): Handle;
  9532. æDT myVariable := CRMGetIndResource(theType,index);
  9533. æC 
  9534.  
  9535. æKY CRMGet1IndResource
  9536. æFp CommResources.p
  9537. æT FUNCTION
  9538. æD FUNCTION CRMGet1IndResource(theType: ResType;index: INTEGER): Handle;
  9539. æDT myVariable := CRMGet1IndResource(theType,index);
  9540. æC 
  9541.  
  9542. æKY CRMGetNamedResource
  9543. æFp CommResources.p
  9544. æT FUNCTION
  9545. æD FUNCTION CRMGetNamedResource(theType: ResType;name: Str255): Handle;
  9546. æDT myVariable := CRMGetNamedResource(theType,name);
  9547. æC 
  9548.  
  9549. æKY CRMGet1NamedResource
  9550. æFp CommResources.p
  9551. æT FUNCTION
  9552. æD FUNCTION CRMGet1NamedResource(theType: ResType;name: Str255): Handle;
  9553. æDT myVariable := CRMGet1NamedResource(theType,name);
  9554. æC 
  9555.  
  9556. æKY CRMReleaseResource
  9557. æFp CommResources.p
  9558. æT PROCEDURE
  9559. æD PROCEDURE CRMReleaseResource(theResource: Handle);
  9560. æDT CRMReleaseResource(theResource);
  9561. æC 
  9562.  
  9563. æKY CRMGetToolResource
  9564. æFp CommResources.p
  9565. æT FUNCTION
  9566. æD FUNCTION CRMGetToolResource(procID: INTEGER;theType: ResType;theID: INTEGER): Handle;
  9567. æDT myVariable := CRMGetToolResource(procID,theType,theID);
  9568. æC 
  9569.  
  9570. æKY CRMReleaseToolResource
  9571. æFp CommResources.p
  9572. æT PROCEDURE
  9573. æD PROCEDURE CRMReleaseToolResource(procID: INTEGER;theResource: Handle);
  9574. æDT CRMReleaseToolResource(procID,theResource);
  9575. æC 
  9576.  
  9577. æKY CRMGetIndex
  9578. æFp CommResources.p
  9579. æT FUNCTION
  9580. æD FUNCTION CRMGetIndex(theResource: Handle): LONGINT;
  9581. æDT myVariable := CRMGetIndex(theResource);
  9582. æC 
  9583.  
  9584. æKY CRMLocalToRealID
  9585. æFp CommResources.p
  9586. æT FUNCTION
  9587. æD FUNCTION CRMLocalToRealID(bundleType: ResType;toolID: INTEGER;theType: ResType;
  9588.     localID: INTEGER): INTEGER;
  9589. æDT myVariable := CRMLocalToRealID(bundleType,toolID,theType,localID);
  9590. æC 
  9591.  
  9592. æKY CRMRealToLocalID
  9593. æFp CommResources.p
  9594. æT FUNCTION
  9595. æD FUNCTION CRMRealToLocalID(bundleType: ResType;toolID: INTEGER;theType: ResType;
  9596.     realID: INTEGER): INTEGER;
  9597. æDT myVariable := CRMRealToLocalID(bundleType,toolID,theType,realID);
  9598. æC 
  9599.  
  9600. æKY CRMGetIndToolName
  9601. æFp CommResources.p
  9602. æT FUNCTION
  9603. æD FUNCTION CRMGetIndToolName(bundleType: ResType;index: INTEGER;VAR toolName: Str255): OSErr;
  9604. æDT myVariable := CRMGetIndToolName(bundleType,index,toolName);
  9605. æC 
  9606.  
  9607. æKY CRMFindCommunications
  9608. æFp CommResources.p
  9609. æT FUNCTION
  9610. æD FUNCTION CRMFindCommunications(VAR vRefNum: INTEGER;VAR dirID: LONGINT): OSErr;
  9611. æDT myVariable := CRMFindCommunications(vRefNum,dirID);
  9612. æC 
  9613.  
  9614.  
  9615. æKY Connections.p
  9616. æKL CMAbort
  9617. CMAccept
  9618. CMActivate
  9619. CMAddSearch
  9620. CMBreak
  9621. CMChoose
  9622. CMClearSearch
  9623. CMClose
  9624. CMDefault
  9625. CMDispose
  9626. CMEnglishToIntl
  9627. CMEvent
  9628. CMGetCMVersion
  9629. CMGetConfig
  9630. CMGetConnEnvirons
  9631. CMGetProcID
  9632. CMGetRefCon
  9633. CMGetToolName
  9634. CMGetUserData
  9635. CMGetVersion
  9636. CMIdle
  9637. CMIntlToEnglish
  9638. CMIOKill
  9639. CMListen
  9640. CMMenu
  9641. CMNew
  9642. CMOpen
  9643. CMRead
  9644. CMRemoveSearch
  9645. CMReset
  9646. CMResume
  9647. CMSetConfig
  9648. CMSetRefCon
  9649. CMSetupCleanup
  9650. CMSetupFilter
  9651. CMSetupItem
  9652. CMSetupPostflight
  9653. CMSetupPreflight
  9654. CMSetupSetup
  9655. CMSetUserData
  9656. CMStatus
  9657. CMValidate
  9658. CMWrite
  9659. InitCM
  9660.  
  9661. cmAttn
  9662. cmAttnClean
  9663. cmAttnIn
  9664. cmAttnNoTimeout
  9665. cmAttnOut
  9666. CMBuffers
  9667. CMBufferSizes
  9668. CMBufFields
  9669. CMChannel
  9670. cmCntl
  9671. cmCntlClean
  9672. cmCntlIn
  9673. cmCntlNoTimeout
  9674. cmCntlOut
  9675. cmData
  9676. cmDataClean
  9677. cmDataIn
  9678. cmDataNoTimeout
  9679. cmDataOut
  9680. CMErr
  9681. cmFailed
  9682. CMFlags
  9683. cmFlagsEOM
  9684. cmGenericError
  9685. cmNoErr
  9686. cmNoMenus
  9687. cmNoRequestPending
  9688. cmNotClosed
  9689. cmNoTools
  9690. cmNotOpen
  9691. cmNotSupported
  9692. cmQuiet
  9693. CMRecFlags
  9694. cmRejected
  9695. cmRsrvIn
  9696. cmRsrvOut
  9697. CMSearchFlags
  9698. cmSearchSevenBit
  9699. CMStatFlags
  9700. cmStatusARPend
  9701. cmStatusAttnAvail
  9702. cmStatusAWPend
  9703. cmStatusBreakPend
  9704. cmStatusClosing
  9705. cmStatusCntlAvail
  9706. cmStatusCRPend
  9707. cmStatusCWPend
  9708. cmStatusDataAvail
  9709. cmStatusDRPend
  9710. cmStatusDWPend
  9711. cmStatusIncomingCallPresent
  9712. cmStatusListenPend
  9713. cmStatusOpen
  9714. cmStatusOpening
  9715. cmStatusReserved0
  9716. cmTimeOut
  9717. cmUnknownError
  9718. cmUserCancel
  9719. ConnEnvironRec
  9720. ConnEnvironRecPtr
  9721. ConnHandle
  9722. ConnPtr
  9723. ConnRecord
  9724. curCMVersion
  9725. curConnEnvRecVers
  9726.  
  9727. æKY curCMVersion
  9728. æFp Connections.p
  9729. æT CONST
  9730. æD curCMVersion = 2;
  9731. æC 
  9732.  
  9733. æKY curConnEnvRecVers
  9734. æFp Connections.p
  9735. æT CONST
  9736. æD curConnEnvRecVers = 0;
  9737. æC 
  9738.  
  9739. æKY cmGenericError
  9740. æFp Connections.p
  9741. æT CONST
  9742. æD cmGenericError = -1;
  9743. æC 
  9744.  
  9745. æKY cmNoErr
  9746. æFp Connections.p
  9747. æT CONST
  9748. æD cmNoErr = 0;
  9749. æC 
  9750.  
  9751. æKY cmRejected
  9752. æFp Connections.p
  9753. æT CONST
  9754. æD cmRejected = 1;
  9755. æC 
  9756.  
  9757. æKY cmFailed
  9758. æFp Connections.p
  9759. æT CONST
  9760. æD cmFailed = 2;
  9761. æC 
  9762.  
  9763. æKY cmTimeOut
  9764. æFp Connections.p
  9765. æT CONST
  9766. æD cmTimeOut = 3;
  9767. æC 
  9768.  
  9769. æKY cmNotOpen
  9770. æFp Connections.p
  9771. æT CONST
  9772. æD cmNotOpen = 4;
  9773. æC 
  9774.  
  9775. æKY cmNotClosed
  9776. æFp Connections.p
  9777. æT CONST
  9778. æD cmNotClosed = 5;
  9779. æC 
  9780.  
  9781. æKY cmNoRequestPending
  9782. æFp Connections.p
  9783. æT CONST
  9784. æD cmNoRequestPending = 6;
  9785. æC 
  9786.  
  9787. æKY cmNotSupported
  9788. æFp Connections.p
  9789. æT CONST
  9790. æD cmNotSupported = 7;
  9791. æC 
  9792.  
  9793. æKY cmNoTools
  9794. æFp Connections.p
  9795. æT CONST
  9796. æD cmNoTools = 8;
  9797. æC 
  9798.  
  9799. æKY cmUserCancel
  9800. æFp Connections.p
  9801. æT CONST
  9802. æD cmUserCancel = 9;
  9803. æC 
  9804.  
  9805. æKY cmUnknownError
  9806. æFp Connections.p
  9807. æT CONST
  9808. æD cmUnknownError = 11;
  9809. æC 
  9810.  
  9811. æKY CMErr
  9812. æFp Connections.p
  9813. æT TYPE
  9814. æD CMErr = OSErr;
  9815. æC 
  9816.  
  9817. æKY cmData
  9818. æFp Connections.p
  9819. æT CONST
  9820. æD cmData = $00000001;
  9821. æC 
  9822.  
  9823. æKY cmCntl
  9824. æFp Connections.p
  9825. æT CONST
  9826. æD cmCntl = $00000002;
  9827. æC 
  9828.  
  9829. æKY cmAttn
  9830. æFp Connections.p
  9831. æT CONST
  9832. æD cmAttn = $00000004;
  9833. æC 
  9834.  
  9835. æKY cmDataNoTimeout
  9836. æFp Connections.p
  9837. æT CONST
  9838. æD cmDataNoTimeout = $00000010;
  9839. æC 
  9840.  
  9841. æKY cmCntlNoTimeout
  9842. æFp Connections.p
  9843. æT CONST
  9844. æD cmCntlNoTimeout = $00000020;
  9845. æC 
  9846.  
  9847. æKY cmAttnNoTimeout
  9848. æFp Connections.p
  9849. æT CONST
  9850. æD cmAttnNoTimeout = $00000040;
  9851. æC 
  9852.  
  9853. æKY cmDataClean
  9854. æFp Connections.p
  9855. æT CONST
  9856. æD cmDataClean = $00000100;
  9857. æC 
  9858.  
  9859. æKY cmCntlClean
  9860. æFp Connections.p
  9861. æT CONST
  9862. æD cmCntlClean = $00000200;
  9863. æC 
  9864.  
  9865. æKY cmAttnClean
  9866. æFp Connections.p
  9867. æT CONST
  9868. æD cmAttnClean = $00000400;
  9869. æC 
  9870.  
  9871. æKY cmNoMenus
  9872. æFp Connections.p
  9873. æT CONST
  9874. æD cmNoMenus = $00010000;
  9875. æC 
  9876.  
  9877. æKY cmQuiet
  9878. æFp Connections.p
  9879. æT CONST
  9880. æD cmQuiet = $00020000;
  9881. æC 
  9882.  
  9883. æKY CMRecFlags
  9884. æFp Connections.p
  9885. æT TYPE
  9886. æD CMRecFlags = LONGINT;
  9887. æC 
  9888.  
  9889. æKY CMChannel
  9890. æFp Connections.p
  9891. æT TYPE
  9892. æD CMChannel = INTEGER;
  9893. æC 
  9894.  
  9895. æKY cmStatusOpening
  9896. æFp Connections.p
  9897. æT CONST
  9898. æD cmStatusOpening = $00000001;
  9899. æC 
  9900.  
  9901. æKY cmStatusOpen
  9902. æFp Connections.p
  9903. æT CONST
  9904. æD cmStatusOpen = $00000002;
  9905. æC 
  9906.  
  9907. æKY cmStatusClosing
  9908. æFp Connections.p
  9909. æT CONST
  9910. æD cmStatusClosing = $00000004;
  9911. æC 
  9912.  
  9913. æKY cmStatusDataAvail
  9914. æFp Connections.p
  9915. æT CONST
  9916. æD cmStatusDataAvail = $00000008;
  9917. æC 
  9918.  
  9919. æKY cmStatusCntlAvail
  9920. æFp Connections.p
  9921. æT CONST
  9922. æD cmStatusCntlAvail = $00000010;
  9923. æC 
  9924.  
  9925. æKY cmStatusAttnAvail
  9926. æFp Connections.p
  9927. æT CONST
  9928. æD cmStatusAttnAvail = $00000020;
  9929. æC 
  9930.  
  9931. æKY cmStatusDRPend
  9932. æFp Connections.p
  9933. æT CONST
  9934. æD cmStatusDRPend = $00000040; {data read pending}
  9935. æC 
  9936.  
  9937. æKY cmStatusDWPend
  9938. æFp Connections.p
  9939. æT CONST
  9940. æD cmStatusDWPend = $00000080; {data write pending}
  9941. æC 
  9942.  
  9943. æKY cmStatusCRPend
  9944. æFp Connections.p
  9945. æT CONST
  9946. æD cmStatusCRPend = $00000100; {cntl read pending}
  9947. æC 
  9948.  
  9949. æKY cmStatusCWPend
  9950. æFp Connections.p
  9951. æT CONST
  9952. æD cmStatusCWPend = $00000200; {cntl write pending}
  9953. æC 
  9954.  
  9955. æKY cmStatusARPend
  9956. æFp Connections.p
  9957. æT CONST
  9958. æD cmStatusARPend = $00000400; {attn read pending}
  9959. æC 
  9960.  
  9961. æKY cmStatusAWPend
  9962. æFp Connections.p
  9963. æT CONST
  9964. æD cmStatusAWPend = $00000800; {attn write pending}
  9965. æC 
  9966.  
  9967. æKY cmStatusBreakPend
  9968. æFp Connections.p
  9969. æT CONST
  9970. æD cmStatusBreakPend = $00001000;
  9971. æC 
  9972.  
  9973. æKY cmStatusListenPend
  9974. æFp Connections.p
  9975. æT CONST
  9976. æD cmStatusListenPend = $00002000;
  9977. æC 
  9978.  
  9979. æKY cmStatusIncomingCallPresent
  9980. æFp Connections.p
  9981. æT CONST
  9982. æD cmStatusIncomingCallPresent = $00004000;
  9983. æC 
  9984.  
  9985. æKY cmStatusReserved0
  9986. æFp Connections.p
  9987. æT CONST
  9988. æD cmStatusReserved0 = $00008000;
  9989. æC 
  9990.  
  9991. æKY CMStatFlags
  9992. æFp Connections.p
  9993. æT TYPE
  9994. æD CMStatFlags = LONGINT;
  9995. æC 
  9996.  
  9997. æKY CMBufFields
  9998. cmDataIn
  9999. cmDataOut
  10000. cmCntlIn
  10001. cmCntlOut
  10002. cmAttnIn
  10003. cmAttnOut
  10004. cmRsrvIn
  10005. cmRsrvOut
  10006. æFp Connections.p
  10007. æT TYPE
  10008. æD CMBufFields = (cmDataIn,cmDataOut,cmCntlIn,cmCntlOut,cmAttnIn,cmAttnOut,
  10009.     cmRsrvIn,cmRsrvOut);
  10010. æC 
  10011.  
  10012. æKY CMBuffers
  10013. æFp Connections.p
  10014. æT TYPE
  10015. æD CMBuffers = ARRAY[CMBufFields] OF Ptr;
  10016. æC 
  10017.  
  10018. æKY CMBufferSizes
  10019. æFp Connections.p
  10020. æT TYPE
  10021. æD CMBufferSizes = ARRAY[CMBufFields] OF LONGINT;
  10022. æC 
  10023.  
  10024. æKY cmSearchSevenBit
  10025. æFp Connections.p
  10026. æT CONST
  10027. æD cmSearchSevenBit = $0001;
  10028. æC 
  10029.  
  10030. æKY CMSearchFlags
  10031. æFp Connections.p
  10032. æT TYPE
  10033. æD CMSearchFlags = INTEGER;
  10034. æC 
  10035.  
  10036. æKY cmFlagsEOM
  10037. æFp Connections.p
  10038. æT CONST
  10039. æD cmFlagsEOM = $0001;
  10040. æC 
  10041.  
  10042. æKY CMFlags
  10043. æFp Connections.p
  10044. æT TYPE
  10045. æD CMFlags = INTEGER;
  10046. æC 
  10047.  
  10048. æKY ConnEnvironRec
  10049. ConnEnvironRecPtr
  10050. æFp Connections.p
  10051. æT RECORD
  10052. æD ConnEnvironRecPtr = ^ConnEnvironRec;
  10053. ConnEnvironRec = RECORD
  10054.     version: INTEGER;
  10055.     baudRate: LONGINT;
  10056.     dataBits: INTEGER;
  10057.     channels: CMChannel;
  10058.     swFlowControl: BOOLEAN;
  10059.     hwFlowControl: BOOLEAN;
  10060.     flags: CMFlags;
  10061.     END;
  10062. æC 
  10063.  
  10064. æKY ConnRecord
  10065. ConnPtr
  10066. ConnHandle
  10067. æFp Connections.p
  10068. æT RECORD
  10069. æD ConnPtr = ^ConnRecord;
  10070. ConnHandle = ^ConnPtr;
  10071. ConnRecord = RECORD
  10072.     procID: INTEGER;
  10073.     flags: CMRecFlags;
  10074.     errCode: CMErr;
  10075.     refCon: LONGINT;
  10076.     userData: LONGINT;
  10077.     defProc: ProcPtr;
  10078.     config: Ptr;
  10079.     oldConfig: Ptr;
  10080.     asyncEOM: LONGINT;
  10081.     reserved1: LONGINT;
  10082.     reserved2: LONGINT;
  10083.     cmPrivate: Ptr;
  10084.     bufferArray: CMBuffers;
  10085.     bufSizes: CMBufferSizes;
  10086.     mluField: LONGINT;
  10087.     asyncCount: CMBufferSizes;
  10088.     END;
  10089. æC 
  10090.  
  10091. æKY InitCM
  10092. æFp Connections.p
  10093. æT FUNCTION
  10094. æD FUNCTION InitCM: CMErr;
  10095. æDT myVariable := InitCM;
  10096. æC 
  10097.  
  10098. æKY CMGetVersion
  10099. æFp Connections.p
  10100. æT FUNCTION
  10101. æD FUNCTION CMGetVersion(hConn: ConnHandle): Handle;
  10102. æDT myVariable := CMGetVersion(hConn);
  10103. æC 
  10104.  
  10105. æKY CMGetCMVersion
  10106. æFp Connections.p
  10107. æT FUNCTION
  10108. æD FUNCTION CMGetCMVersion: INTEGER;
  10109. æDT myVariable := CMGetCMVersion;
  10110. æC 
  10111.  
  10112. æKY CMNew
  10113. æFp Connections.p
  10114. æT FUNCTION
  10115. æD FUNCTION CMNew(procID: INTEGER;flags: CMRecFlags;desiredSizes: CMBufferSizes;
  10116.     refCon: LONGINT;userData: LONGINT): ConnHandle;
  10117. æDT myVariable := CMNew(procID,flags,desiredSizes,refCon,userData);
  10118. æC 
  10119.  
  10120. æKY CMDispose
  10121. æFp Connections.p
  10122. æT PROCEDURE
  10123. æD PROCEDURE CMDispose(hConn: ConnHandle);
  10124. æDT CMDispose(hConn);
  10125. æC 
  10126.  
  10127. æKY CMListen
  10128. æFp Connections.p
  10129. æT FUNCTION
  10130. æD FUNCTION CMListen(hConn: ConnHandle;async: BOOLEAN;completor: ProcPtr;timeout: LONGINT): CMErr;
  10131. æDT myVariable := CMListen(hConn,async,completor,timeout);
  10132. æC 
  10133.  
  10134. æKY CMAccept
  10135. æFp Connections.p
  10136. æT FUNCTION
  10137. æD FUNCTION CMAccept(hConn: ConnHandle;accept: BOOLEAN): CMErr;
  10138. æDT myVariable := CMAccept(hConn,accept);
  10139. æC 
  10140.  
  10141. æKY CMOpen
  10142. æFp Connections.p
  10143. æT FUNCTION
  10144. æD FUNCTION CMOpen(hConn: ConnHandle;async: BOOLEAN;completor: ProcPtr;timeout: LONGINT): CMErr;
  10145. æDT myVariable := CMOpen(hConn,async,completor,timeout);
  10146. æC 
  10147.  
  10148. æKY CMClose
  10149. æFp Connections.p
  10150. æT FUNCTION
  10151. æD FUNCTION CMClose(hConn: ConnHandle;async: BOOLEAN;completor: ProcPtr;timeout: LONGINT;
  10152.     now: BOOLEAN): CMErr;
  10153. æDT myVariable := CMClose(hConn,async,completor,timeout,now);
  10154. æC 
  10155.  
  10156. æKY CMAbort
  10157. æFp Connections.p
  10158. æT FUNCTION
  10159. æD FUNCTION CMAbort(hConn: ConnHandle): CMErr;
  10160. æDT myVariable := CMAbort(hConn);
  10161. æC 
  10162.  
  10163. æKY CMStatus
  10164. æFp Connections.p
  10165. æT FUNCTION
  10166. æD FUNCTION CMStatus(hConn: ConnHandle;VAR sizes: CMBufferSizes;VAR flags: CMStatFlags): CMErr;
  10167. æDT myVariable := CMStatus(hConn,sizes,flags);
  10168. æC 
  10169.  
  10170. æKY CMIdle
  10171. æFp Connections.p
  10172. æT PROCEDURE
  10173. æD PROCEDURE CMIdle(hConn: ConnHandle);
  10174. æDT CMIdle(hConn);
  10175. æC 
  10176.  
  10177. æKY CMReset
  10178. æFp Connections.p
  10179. æT PROCEDURE
  10180. æD PROCEDURE CMReset(hConn: ConnHandle);
  10181. æDT CMReset(hConn);
  10182. æC 
  10183.  
  10184. æKY CMBreak
  10185. æFp Connections.p
  10186. æT PROCEDURE
  10187. æD PROCEDURE CMBreak(hConn: ConnHandle;duration: LONGINT;async: BOOLEAN;completor: ProcPtr);
  10188. æDT CMBreak(hConn,duration,async,completor);
  10189. æC 
  10190.  
  10191. æKY CMRead
  10192. æFp Connections.p
  10193. æT FUNCTION
  10194. æD FUNCTION CMRead(hConn: ConnHandle;theBuffer: Ptr;VAR toRead: LONGINT;theChannel: CMChannel;
  10195.     async: BOOLEAN;completor: ProcPtr;timeout: LONGINT;VAR flags: CMFlags): CMErr;
  10196. æDT myVariable := CMRead(hConn,theBuffer,toRead,theChannel,async,completor,timeout,flags);
  10197. æC 
  10198.  
  10199. æKY CMWrite
  10200. æFp Connections.p
  10201. æT FUNCTION
  10202. æD FUNCTION CMWrite(hConn: ConnHandle;theBuffer: Ptr;VAR toWrite: LONGINT;
  10203.     theChannel: CMChannel;async: BOOLEAN;completor: ProcPtr;timeout: LONGINT;
  10204.     flags: CMFlags): CMErr;
  10205. æDT myVariable := CMWrite(hConn,theBuffer,toWrite,theChannel,async,completor,timeout,flags);
  10206. æC 
  10207.  
  10208. æKY CMIOKill
  10209. æFp Connections.p
  10210. æT FUNCTION
  10211. æD FUNCTION CMIOKill(hConn: ConnHandle;which: INTEGER): CMErr;
  10212. æDT myVariable := CMIOKill(hConn,which);
  10213. æC 
  10214.  
  10215. æKY CMActivate
  10216. æFp Connections.p
  10217. æT PROCEDURE
  10218. æD PROCEDURE CMActivate(hConn: ConnHandle;activate: BOOLEAN);
  10219. æDT CMActivate(hConn,activate);
  10220. æC 
  10221.  
  10222. æKY CMResume
  10223. æFp Connections.p
  10224. æT PROCEDURE
  10225. æD PROCEDURE CMResume(hConn: ConnHandle;resume: BOOLEAN);
  10226. æDT CMResume(hConn,resume);
  10227. æC 
  10228.  
  10229. æKY CMMenu
  10230. æFp Connections.p
  10231. æT FUNCTION
  10232. æD FUNCTION CMMenu(hConn: ConnHandle;menuID: INTEGER;item: INTEGER): BOOLEAN;
  10233. æDT myVariable := CMMenu(hConn,menuID,item);
  10234. æC 
  10235.  
  10236. æKY CMValidate
  10237. æFp Connections.p
  10238. æT FUNCTION
  10239. æD FUNCTION CMValidate(hConn: ConnHandle): BOOLEAN;
  10240. æDT myVariable := CMValidate(hConn);
  10241. æC 
  10242.  
  10243. æKY CMDefault
  10244. æFp Connections.p
  10245. æT PROCEDURE
  10246. æD PROCEDURE CMDefault(VAR theConfig: Ptr;procID: INTEGER;allocate: BOOLEAN);
  10247. æDT CMDefault(theConfig,procID,allocate);
  10248. æC 
  10249.  
  10250. æKY CMSetupPreflight
  10251. æFp Connections.p
  10252. æT FUNCTION
  10253. æD FUNCTION CMSetupPreflight(procID: INTEGER;VAR magicCookie: LONGINT): Handle;
  10254. æDT myVariable := CMSetupPreflight(procID,magicCookie);
  10255. æC 
  10256.  
  10257. æKY CMSetupFilter
  10258. æFp Connections.p
  10259. æT FUNCTION
  10260. æD FUNCTION CMSetupFilter(procID: INTEGER;theConfig: Ptr;count: INTEGER;theDialog: DialogPtr;
  10261.     VAR theEvent: EventRecord;VAR theItem: INTEGER;VAR magicCookie: LONGINT): BOOLEAN;
  10262. æDT myVariable := CMSetupFilter(procID,theConfig,count,theDialog,theEvent,theItem,magicCookie);
  10263. æC 
  10264.  
  10265. æKY CMSetupSetup
  10266. æFp Connections.p
  10267. æT PROCEDURE
  10268. æD PROCEDURE CMSetupSetup(procID: INTEGER;theConfig: Ptr;count: INTEGER;theDialog: DialogPtr;
  10269.     VAR magicCookie: LONGINT);
  10270. æDT CMSetupSetup(procID,theConfig,count,theDialog,magicCookie);
  10271. æC 
  10272.  
  10273. æKY CMSetupItem
  10274. æFp Connections.p
  10275. æT PROCEDURE
  10276. æD PROCEDURE CMSetupItem(procID: INTEGER;theConfig: Ptr;count: INTEGER;theDialog: DialogPtr;
  10277.     VAR theItem: INTEGER;VAR magicCookie: LONGINT);
  10278. æDT CMSetupItem(procID,theConfig,count,theDialog,theItem,magicCookie);
  10279. æC 
  10280.  
  10281. æKY CMSetupCleanup
  10282. æFp Connections.p
  10283. æT PROCEDURE
  10284. æD PROCEDURE CMSetupCleanup(procID: INTEGER;theConfig: Ptr;count: INTEGER;
  10285.     theDialog: DialogPtr;VAR magicCookie: LONGINT);
  10286. æDT CMSetupCleanup(procID,theConfig,count,theDialog,magicCookie);
  10287. æC 
  10288.  
  10289. æKY CMSetupPostflight
  10290. æFp Connections.p
  10291. æT PROCEDURE
  10292. æD PROCEDURE CMSetupPostflight(procID: INTEGER);
  10293. æDT CMSetupPostflight(procID);
  10294. æC 
  10295.  
  10296. æKY CMGetConfig
  10297. æFp Connections.p
  10298. æT FUNCTION
  10299. æD FUNCTION CMGetConfig(hConn: ConnHandle): Ptr;
  10300. æDT myVariable := CMGetConfig(hConn);
  10301. æC 
  10302.  
  10303. æKY CMSetConfig
  10304. æFp Connections.p
  10305. æT FUNCTION
  10306. æD FUNCTION CMSetConfig(hConn: ConnHandle;thePtr: Ptr): INTEGER;
  10307. æDT myVariable := CMSetConfig(hConn,thePtr);
  10308. æC 
  10309.  
  10310. æKY CMIntlToEnglish
  10311. æFp Connections.p
  10312. æT FUNCTION
  10313. æD FUNCTION CMIntlToEnglish(hConn: ConnHandle;inputPtr: Ptr;VAR outputPtr: Ptr;
  10314.     language: INTEGER): OSErr;
  10315. æDT myVariable := CMIntlToEnglish(hConn,inputPtr,outputPtr,language);
  10316. æC 
  10317.  
  10318. æKY CMEnglishToIntl
  10319. æFp Connections.p
  10320. æT FUNCTION
  10321. æD FUNCTION CMEnglishToIntl(hConn: ConnHandle;inputPtr: Ptr;VAR outputPtr: Ptr;
  10322.     language: INTEGER): OSErr;
  10323. æDT myVariable := CMEnglishToIntl(hConn,inputPtr,outputPtr,language);
  10324. æC 
  10325.  
  10326. æKY CMAddSearch
  10327. æFp Connections.p
  10328. æT FUNCTION
  10329. æD FUNCTION CMAddSearch(hConn: ConnHandle;theString: Str255;flags: CMSearchFlags;
  10330.     callBack: ProcPtr): LONGINT;
  10331. æDT myVariable := CMAddSearch(hConn,theString,flags,callBack);
  10332. æC 
  10333.  
  10334. æKY CMRemoveSearch
  10335. æFp Connections.p
  10336. æT PROCEDURE
  10337. æD PROCEDURE CMRemoveSearch(hConn: ConnHandle;refnum: LONGINT);
  10338. æDT CMRemoveSearch(hConn,refnum);
  10339. æC 
  10340.  
  10341. æKY CMClearSearch
  10342. æFp Connections.p
  10343. æT PROCEDURE
  10344. æD PROCEDURE CMClearSearch(hConn: ConnHandle);
  10345. æDT CMClearSearch(hConn);
  10346. æC 
  10347.  
  10348. æKY CMGetConnEnvirons
  10349. æFp Connections.p
  10350. æT FUNCTION
  10351. æD FUNCTION CMGetConnEnvirons(hConn: ConnHandle;VAR theEnvirons: ConnEnvironRec): CMErr;
  10352. æDT myVariable := CMGetConnEnvirons(hConn,theEnvirons);
  10353. æC 
  10354.  
  10355. æKY CMChoose
  10356. æFp Connections.p
  10357. æT FUNCTION
  10358. æD FUNCTION CMChoose(VAR hConn: ConnHandle;where: Point;idleProc: ProcPtr): INTEGER;
  10359. æDT myVariable := CMChoose(hConn,where,idleProc);
  10360. æC 
  10361.  
  10362. æKY CMEvent
  10363. æFp Connections.p
  10364. æT PROCEDURE
  10365. æD PROCEDURE CMEvent(hConn: ConnHandle;theEvent: EventRecord);
  10366. æDT CMEvent(hConn,theEvent);
  10367. æC 
  10368.  
  10369. æKY CMGetToolName
  10370. æFp Connections.p
  10371. æT PROCEDURE
  10372. æD PROCEDURE CMGetToolName(procID: INTEGER;VAR name: Str255);
  10373. æDT CMGetToolName(procID,name);
  10374. æC 
  10375.  
  10376. æKY CMGetProcID
  10377. æFp Connections.p
  10378. æT FUNCTION
  10379. æD FUNCTION CMGetProcID(name: Str255): INTEGER;
  10380. æDT myVariable := CMGetProcID(name);
  10381. æC 
  10382.  
  10383. æKY CMSetRefCon
  10384. æFp Connections.p
  10385. æT PROCEDURE
  10386. æD PROCEDURE CMSetRefCon(hConn: ConnHandle;refCon: LONGINT);
  10387. æDT CMSetRefCon(hConn,refCon);
  10388. æC 
  10389.  
  10390. æKY CMGetRefCon
  10391. æFp Connections.p
  10392. æT FUNCTION
  10393. æD FUNCTION CMGetRefCon(hConn: ConnHandle): LONGINT;
  10394. æDT myVariable := CMGetRefCon(hConn);
  10395. æC 
  10396.  
  10397. æKY CMGetUserData
  10398. æFp Connections.p
  10399. æT FUNCTION
  10400. æD FUNCTION CMGetUserData(hConn: ConnHandle): LONGINT;
  10401. æDT myVariable := CMGetUserData(hConn);
  10402. æC 
  10403.  
  10404. æKY CMSetUserData
  10405. æFp Connections.p
  10406. æT PROCEDURE
  10407. æD PROCEDURE CMSetUserData(hConn: ConnHandle;userData: LONGINT);
  10408. æDT CMSetUserData(hConn,userData);
  10409. æC 
  10410.  
  10411.  
  10412. æKY ConnectionTools.p
  10413. æKL 
  10414. cbndType
  10415. cdefType
  10416. clocType
  10417. cmAbortMsg
  10418. cmAcceptMsg
  10419. cmActivateMsg
  10420. cmBreakMsg
  10421. cmCloseMsg
  10422. CMCompletorPtr
  10423. CMCompletorRecord
  10424. CMDataBuffer
  10425. CMDataBufferPtr
  10426. cmDeactivateMsg
  10427. cmDefaultMsg
  10428. cmDisposeMsg
  10429. cmEnvironsMsg
  10430. cmEventMsg
  10431. cmIdleMsg
  10432. cmInitMsg
  10433. cmIOKillMsg
  10434. cmL2English
  10435. cmL2Intl
  10436. cmListenMsg
  10437. cmMenuMsg
  10438. cmMgetMsg
  10439. cmMsetMsg
  10440. cmOpenMsg
  10441. cmReadMsg
  10442. cmResetMsg
  10443. cmResumeMsg
  10444. cmScleanupMsg
  10445. CMSetupPtr
  10446. CMSetupStruct
  10447. cmSfilterMsg
  10448. cmSitemMsg
  10449. cmSpreflightMsg
  10450. cmSsetupMsg
  10451. cmStatusMsg
  10452. cmSuspendMsg
  10453. cmValidateMsg
  10454. cmWriteMsg
  10455. cscrType
  10456. csetType
  10457. cvalType
  10458. cverType
  10459.  
  10460. æKY cmInitMsg
  10461. æFp ConnectionTools.p
  10462. æT CONST
  10463. æD cmInitMsg = 0;
  10464. æC 
  10465.  
  10466. æKY cmDisposeMsg
  10467. æFp ConnectionTools.p
  10468. æT CONST
  10469. æD cmDisposeMsg = 1;
  10470. æC 
  10471.  
  10472. æKY cmSuspendMsg
  10473. æFp ConnectionTools.p
  10474. æT CONST
  10475. æD cmSuspendMsg = 2;
  10476. æC 
  10477.  
  10478. æKY cmResumeMsg
  10479. æFp ConnectionTools.p
  10480. æT CONST
  10481. æD cmResumeMsg = 3;
  10482. æC 
  10483.  
  10484. æKY cmMenuMsg
  10485. æFp ConnectionTools.p
  10486. æT CONST
  10487. æD cmMenuMsg = 4;
  10488. æC 
  10489.  
  10490. æKY cmEventMsg
  10491. æFp ConnectionTools.p
  10492. æT CONST
  10493. æD cmEventMsg = 5;
  10494. æC 
  10495.  
  10496. æKY cmActivateMsg
  10497. æFp ConnectionTools.p
  10498. æT CONST
  10499. æD cmActivateMsg = 6;
  10500. æC 
  10501.  
  10502. æKY cmDeactivateMsg
  10503. æFp ConnectionTools.p
  10504. æT CONST
  10505. æD cmDeactivateMsg = 7;
  10506. æC 
  10507.  
  10508. æKY cmIdleMsg
  10509. æFp ConnectionTools.p
  10510. æT CONST
  10511. æD cmIdleMsg = 50;
  10512. æC 
  10513.  
  10514. æKY cmResetMsg
  10515. æFp ConnectionTools.p
  10516. æT CONST
  10517. æD cmResetMsg = 51;
  10518. æC 
  10519.  
  10520. æKY cmAbortMsg
  10521. æFp ConnectionTools.p
  10522. æT CONST
  10523. æD cmAbortMsg = 52;
  10524. æC 
  10525.  
  10526. æKY cmReadMsg
  10527. æFp ConnectionTools.p
  10528. æT CONST
  10529. æD cmReadMsg = 100;
  10530. æC 
  10531.  
  10532. æKY cmWriteMsg
  10533. æFp ConnectionTools.p
  10534. æT CONST
  10535. æD cmWriteMsg = 101;
  10536. æC 
  10537.  
  10538. æKY cmStatusMsg
  10539. æFp ConnectionTools.p
  10540. æT CONST
  10541. æD cmStatusMsg = 102;
  10542. æC 
  10543.  
  10544. æKY cmListenMsg
  10545. æFp ConnectionTools.p
  10546. æT CONST
  10547. æD cmListenMsg = 103;
  10548. æC 
  10549.  
  10550. æKY cmAcceptMsg
  10551. æFp ConnectionTools.p
  10552. æT CONST
  10553. æD cmAcceptMsg = 104;
  10554. æC 
  10555.  
  10556. æKY cmCloseMsg
  10557. æFp ConnectionTools.p
  10558. æT CONST
  10559. æD cmCloseMsg = 105;
  10560. æC 
  10561.  
  10562. æKY cmOpenMsg
  10563. æFp ConnectionTools.p
  10564. æT CONST
  10565. æD cmOpenMsg = 106;
  10566. æC 
  10567.  
  10568. æKY cmBreakMsg
  10569. æFp ConnectionTools.p
  10570. æT CONST
  10571. æD cmBreakMsg = 107;
  10572. æC 
  10573.  
  10574. æKY cmIOKillMsg
  10575. æFp ConnectionTools.p
  10576. æT CONST
  10577. æD cmIOKillMsg = 108;
  10578. æC 
  10579.  
  10580. æKY cmEnvironsMsg
  10581. æFp ConnectionTools.p
  10582. æT CONST
  10583. æD cmEnvironsMsg = 109;
  10584. æC 
  10585.  
  10586. æKY cmValidateMsg
  10587. æFp ConnectionTools.p
  10588. æT CONST
  10589. æD cmValidateMsg = 0;
  10590. æC 
  10591.  
  10592. æKY cmDefaultMsg
  10593. æFp ConnectionTools.p
  10594. æT CONST
  10595. æD cmDefaultMsg = 1;
  10596. æC 
  10597.  
  10598. æKY cmSpreflightMsg
  10599. æFp ConnectionTools.p
  10600. æT CONST
  10601. æD cmSpreflightMsg = 0;
  10602. æC 
  10603.  
  10604. æKY cmSsetupMsg
  10605. æFp ConnectionTools.p
  10606. æT CONST
  10607. æD cmSsetupMsg = 1;
  10608. æC 
  10609.  
  10610. æKY cmSitemMsg
  10611. æFp ConnectionTools.p
  10612. æT CONST
  10613. æD cmSitemMsg = 2;
  10614. æC 
  10615.  
  10616. æKY cmSfilterMsg
  10617. æFp ConnectionTools.p
  10618. æT CONST
  10619. æD cmSfilterMsg = 3;
  10620. æC 
  10621.  
  10622. æKY cmScleanupMsg
  10623. æFp ConnectionTools.p
  10624. æT CONST
  10625. æD cmScleanupMsg = 4;
  10626. æC 
  10627.  
  10628. æKY cmMgetMsg
  10629. æFp ConnectionTools.p
  10630. æT CONST
  10631. æD cmMgetMsg = 0;
  10632. æC 
  10633.  
  10634. æKY cmMsetMsg
  10635. æFp ConnectionTools.p
  10636. æT CONST
  10637. æD cmMsetMsg = 1;
  10638. æC 
  10639.  
  10640. æKY cmL2English
  10641. æFp ConnectionTools.p
  10642. æT CONST
  10643. æD cmL2English = 0;
  10644. æC 
  10645.  
  10646. æKY cmL2Intl
  10647. æFp ConnectionTools.p
  10648. æT CONST
  10649. æD cmL2Intl = 1;
  10650. æC 
  10651.  
  10652. æKY cdefType
  10653. æFp ConnectionTools.p
  10654. æT CONST
  10655. æD cdefType = 'cdef'; { main connection definition procedure    }
  10656. æC 
  10657.  
  10658. æKY cvalType
  10659. æFp ConnectionTools.p
  10660. æT CONST
  10661. æD cvalType = 'cval'; { validation definition procedure    }
  10662. æC 
  10663.  
  10664. æKY csetType
  10665. æFp ConnectionTools.p
  10666. æT CONST
  10667. æD csetType = 'cset'; { connection setup definition procedure    }
  10668. æC 
  10669.  
  10670. æKY clocType
  10671. æFp ConnectionTools.p
  10672. æT CONST
  10673. æD clocType = 'cloc'; { connection configuration localization defProc    }
  10674. æC 
  10675.  
  10676. æKY cscrType
  10677. æFp ConnectionTools.p
  10678. æT CONST
  10679. æD cscrType = 'cscr'; { connection scripting defProc interfaces    }
  10680. æC 
  10681.  
  10682. æKY cbndType
  10683. æFp ConnectionTools.p
  10684. æT CONST
  10685. æD cbndType = 'cbnd'; { bundle type for connection    }
  10686. æC 
  10687.  
  10688. æKY cverType
  10689. æFp ConnectionTools.p
  10690. æT CONST
  10691. æD cverType = 'vers';
  10692. æC 
  10693.  
  10694. æKY CMDataBuffer
  10695. CMDataBufferPtr
  10696. æFp ConnectionTools.p
  10697. æT RECORD
  10698. æD CMDataBufferPtr = ^CMDataBuffer;
  10699. CMDataBuffer = RECORD
  10700.     thePtr: Ptr;
  10701.     count: LONGINT;
  10702.     channel: CMChannel;
  10703.     flags: CMFlags;
  10704.     END;
  10705. æC 
  10706.  
  10707. æKY CMCompletorRecord
  10708. CMCompletorPtr
  10709. æFp ConnectionTools.p
  10710. æT RECORD
  10711. æD CMCompletorPtr = ^CMCompletorRecord;
  10712. CMCompletorRecord = RECORD
  10713.     async: BOOLEAN;
  10714.     completionRoutine: ProcPtr;
  10715.     END;
  10716. æC 
  10717.  
  10718. æKY CMSetupStruct
  10719. CMSetupPtr
  10720. æFp ConnectionTools.p
  10721. æT RECORD
  10722. æD CMSetupPtr = ^CMSetupStruct;
  10723. CMSetupStruct = RECORD
  10724.     theDialog: DialogPtr;
  10725.     count: INTEGER;
  10726.     theConfig: Ptr;
  10727.     procID: INTEGER; { procID of the tool    }
  10728.     END;
  10729. æC 
  10730.  
  10731.  
  10732. æKY Controls.p
  10733. æKL DisposeControl
  10734. DragControl
  10735. Draw1Control
  10736. DrawControls
  10737. FindControl
  10738. GetAuxCtl
  10739. GetCRefCon
  10740. GetCTitle
  10741. GetCtlAction
  10742. GetCtlMax
  10743. GetCtlMin
  10744. GetCtlValue
  10745. GetCVariant
  10746. GetNewControl
  10747. HideControl
  10748. HiliteControl
  10749. KillControls
  10750. MoveControl
  10751. NewControl
  10752. SetCRefCon
  10753. SetCTitle
  10754. SetCtlAction
  10755. SetCtlColor
  10756. SetCtlMax
  10757. SetCtlMin
  10758. SetCtlValue
  10759. ShowControl
  10760. SizeControl
  10761. TestControl
  10762. TrackControl
  10763. UpdateControls
  10764. UpdtControl
  10765.  
  10766. autoTrack
  10767. AuxCtlHandle
  10768. AuxCtlPtr
  10769. AuxCtlRec
  10770. calcCntlRgn
  10771. calcCRgns
  10772. calcThumbRgn
  10773. cBodyColor
  10774. CCTabHandle
  10775. CCTabPtr
  10776. cFrameColor
  10777. checkBoxProc
  10778. ControlHandle
  10779. ControlPtr
  10780. ControlRecord
  10781. cTextColor
  10782. cThumbColor
  10783. CtlCTab
  10784. dispCntl
  10785. dragCntl
  10786. drawCntl
  10787. hAxisOnly
  10788. inButton
  10789. inCheckBox
  10790. inDownButton
  10791. initCntl
  10792. inPageDown
  10793. inPageUp
  10794. inThumb
  10795. inUpButton
  10796. noConstraint
  10797. popupFixedWidth
  10798. popupMenuCDEFproc
  10799. popupMenuProc
  10800. popupTitleBold
  10801. popupTitleCenterJust
  10802. popupTitleCondense
  10803. popupTitleExtend
  10804. popupTitleItalic
  10805. popupTitleLeftJust
  10806. popupTitleNoStyle
  10807. popupTitleOutline
  10808. popupTitleRightJust
  10809. popupTitleShadow
  10810. popupTitleUnderline
  10811. popupUseAddResMenu
  10812. popupUseWFont
  10813. posCntl
  10814. pushButProc
  10815. radioButProc
  10816. scrollBarProc
  10817. testCntl
  10818. thumbCntl
  10819. useWFont
  10820. vAxisOnly
  10821.  
  10822. æKY pushButProc
  10823. æFp Controls.p
  10824. æT CONST
  10825. æD pushButProc = 0;
  10826. æC 
  10827.  
  10828. æKY checkBoxProc
  10829. æFp Controls.p
  10830. æT CONST
  10831. æD checkBoxProc = 1;
  10832. æC 
  10833.  
  10834. æKY radioButProc
  10835. æFp Controls.p
  10836. æT CONST
  10837. æD radioButProc = 2;
  10838. æC 
  10839.  
  10840. æKY useWFont
  10841. æFp Controls.p
  10842. æT CONST
  10843. æD useWFont = 8;
  10844. æC 
  10845.  
  10846. æKY scrollBarProc
  10847. æFp Controls.p
  10848. æT CONST
  10849. æD scrollBarProc = 16;
  10850. æC 
  10851.  
  10852. æKY inButton
  10853. æFp Controls.p
  10854. æT CONST
  10855. æD inButton = 10;
  10856. æC 
  10857.  
  10858. æKY inCheckBox
  10859. æFp Controls.p
  10860. æT CONST
  10861. æD inCheckBox = 11;
  10862. æC 
  10863.  
  10864. æKY inUpButton
  10865. æFp Controls.p
  10866. æT CONST
  10867. æD inUpButton = 20;
  10868. æC 
  10869.  
  10870. æKY inDownButton
  10871. æFp Controls.p
  10872. æT CONST
  10873. æD inDownButton = 21;
  10874. æC 
  10875.  
  10876. æKY inPageUp
  10877. æFp Controls.p
  10878. æT CONST
  10879. æD inPageUp = 22;
  10880. æC 
  10881.  
  10882. æKY inPageDown
  10883. æFp Controls.p
  10884. æT CONST
  10885. æD inPageDown = 23;
  10886. æC 
  10887.  
  10888. æKY inThumb
  10889. æFp Controls.p
  10890. æT CONST
  10891. æD inThumb = 129;
  10892. æC 
  10893.  
  10894. æKY popupMenuProc
  10895. æFp Controls.p
  10896. æT CONST
  10897. æD popupMenuProc = 1008; { 63 * 16 }
  10898. æC 
  10899.  
  10900. æKY popupFixedWidth
  10901. æFp Controls.p
  10902. æT CONST
  10903. æD popupFixedWidth = $0001; { popup menu CDEF variation codes }
  10904. æC 
  10905.  
  10906. æKY popupUseAddResMenu
  10907. æFp Controls.p
  10908. æT CONST
  10909. æD popupUseAddResMenu = $0004;
  10910. æC 
  10911.  
  10912. æKY popupUseWFont
  10913. æFp Controls.p
  10914. æT CONST
  10915. æD popupUseWFont = $0008;
  10916. æC 
  10917.  
  10918. æKY popupTitleBold
  10919. æFp Controls.p
  10920. æT CONST
  10921. æD popupTitleBold = $00000100; {    Popup Title characteristics }
  10922. æC 
  10923.  
  10924. æKY popupTitleItalic
  10925. æFp Controls.p
  10926. æT CONST
  10927. æD popupTitleItalic = $00000200;
  10928. æC 
  10929.  
  10930. æKY popupTitleUnderline
  10931. æFp Controls.p
  10932. æT CONST
  10933. æD popupTitleUnderline = $00000400;
  10934. æC 
  10935.  
  10936. æKY popupTitleOutline
  10937. æFp Controls.p
  10938. æT CONST
  10939. æD popupTitleOutline = $00000800;
  10940. æC 
  10941.  
  10942. æKY popupTitleShadow
  10943. æFp Controls.p
  10944. æT CONST
  10945. æD popupTitleShadow = $00001000;
  10946. æC 
  10947.  
  10948. æKY popupTitleCondense
  10949. æFp Controls.p
  10950. æT CONST
  10951. æD popupTitleCondense = $00002000;
  10952. æC 
  10953.  
  10954. æKY popupTitleExtend
  10955. æFp Controls.p
  10956. æT CONST
  10957. æD popupTitleExtend = $00004000;
  10958. æC 
  10959.  
  10960. æKY popupTitleNoStyle
  10961. æFp Controls.p
  10962. æT CONST
  10963. æD popupTitleNoStyle = $00008000;
  10964. æC 
  10965.  
  10966. æKY popupTitleLeftJust
  10967. æFp Controls.p
  10968. æT CONST
  10969. æD popupTitleLeftJust = $00000000;
  10970. æC 
  10971.  
  10972. æKY popupTitleCenterJust
  10973. æFp Controls.p
  10974. æT CONST
  10975. æD popupTitleCenterJust = $00000001;
  10976. æC 
  10977.  
  10978. æKY popupTitleRightJust
  10979. æFp Controls.p
  10980. æT CONST
  10981. æD popupTitleRightJust = $000000FF;
  10982. æC 
  10983.  
  10984. æKY noConstraint
  10985. æFp Controls.p
  10986. æT CONST
  10987. æD noConstraint = 0;
  10988. æC 
  10989.  
  10990. æKY hAxisOnly
  10991. æFp Controls.p
  10992. æT CONST
  10993. æD hAxisOnly = 1;
  10994. æC 
  10995.  
  10996. æKY vAxisOnly
  10997. æFp Controls.p
  10998. æT CONST
  10999. æD vAxisOnly = 2;
  11000. æC 
  11001.  
  11002. æKY drawCntl
  11003. æFp Controls.p
  11004. æT CONST
  11005. æD drawCntl = 0;
  11006. æC 
  11007.  
  11008. æKY testCntl
  11009. æFp Controls.p
  11010. æT CONST
  11011. æD testCntl = 1;
  11012. æC 
  11013.  
  11014. æKY calcCRgns
  11015. æFp Controls.p
  11016. æT CONST
  11017. æD calcCRgns = 2;
  11018. æC 
  11019.  
  11020. æKY initCntl
  11021. æFp Controls.p
  11022. æT CONST
  11023. æD initCntl = 3;
  11024. æC 
  11025.  
  11026. æKY dispCntl
  11027. æFp Controls.p
  11028. æT CONST
  11029. æD dispCntl = 4;
  11030. æC 
  11031.  
  11032. æKY posCntl
  11033. æFp Controls.p
  11034. æT CONST
  11035. æD posCntl = 5;
  11036. æC 
  11037.  
  11038. æKY thumbCntl
  11039. æFp Controls.p
  11040. æT CONST
  11041. æD thumbCntl = 6;
  11042. æC 
  11043.  
  11044. æKY dragCntl
  11045. æFp Controls.p
  11046. æT CONST
  11047. æD dragCntl = 7;
  11048. æC 
  11049.  
  11050. æKY autoTrack
  11051. æFp Controls.p
  11052. æT CONST
  11053. æD autoTrack = 8;
  11054. æC 
  11055.  
  11056. æKY calcCntlRgn
  11057. æFp Controls.p
  11058. æT CONST
  11059. æD calcCntlRgn = 10;
  11060. æC 
  11061.  
  11062. æKY calcThumbRgn
  11063. æFp Controls.p
  11064. æT CONST
  11065. æD calcThumbRgn = 11;
  11066. æC 
  11067.  
  11068. æKY cFrameColor
  11069. æFp Controls.p
  11070. æT CONST
  11071. æD cFrameColor = 0;
  11072. æC 
  11073.  
  11074. æKY cBodyColor
  11075. æFp Controls.p
  11076. æT CONST
  11077. æD cBodyColor = 1;
  11078. æC 
  11079.  
  11080. æKY cTextColor
  11081. æFp Controls.p
  11082. æT CONST
  11083. æD cTextColor = 2;
  11084. æC 
  11085.  
  11086. æKY cThumbColor
  11087. æFp Controls.p
  11088. æT CONST
  11089. æD cThumbColor = 3;
  11090. æC 
  11091.  
  11092. æKY popupMenuCDEFproc
  11093. æFp Controls.p
  11094. æT CONST
  11095. æD popupMenuCDEFproc = popupMenuProc; { synonym for compatibility }
  11096. æC 
  11097.  
  11098. æKY ControlRecord
  11099. ControlPtr
  11100. ControlHandle
  11101. æFp Controls.p
  11102. æT RECORD
  11103. æD ControlPtr = ^ControlRecord;
  11104. ControlHandle = ^ControlPtr;
  11105. ControlRecord = PACKED RECORD
  11106.     nextControl: ControlHandle;
  11107.     contrlOwner: WindowPtr;
  11108.     contrlRect: Rect;
  11109.     contrlVis: Byte;
  11110.     contrlHilite: Byte;
  11111.     contrlValue: INTEGER;
  11112.     contrlMin: INTEGER;
  11113.     contrlMax: INTEGER;
  11114.     contrlDefProc: Handle;
  11115.     contrlData: Handle;
  11116.     contrlAction: ProcPtr;
  11117.     contrlRfCon: LONGINT;
  11118.     contrlTitle: Str255;
  11119.     END;
  11120. æC 
  11121. Every control is represented internally by a control record containing all pertinent
  11122. information about that control. The control record contains the following:
  11123.  
  11124.   •  A pointer to the window the control belongs to.
  11125.   •  A handle to the next control in the window’s control list.
  11126.   •  A handle to the control definition function.
  11127.   •  The control’s title, if any.
  11128.   •  A rectangle that completely encloses the control, which determines
  11129.      the control’s size and location within its window. The entire control,
  11130.      including the title of a check box or radio button, is drawn inside
  11131.      this rectangle.
  11132.   •  An indication of whether the control is currently active and how it’s
  11133.      to be highlighted.
  11134.   •  The current setting of the control (if this type of control retains a
  11135.      setting) and the minimum and maximum values the setting can assume. For
  11136.      check boxes and radio buttons, a setting of 0 means the control is off
  11137.      and 1 means it’s on.
  11138.  
  11139. The control record also contains an indication of whether the control is currently
  11140. visible or invisible. These terms refer only to whether the control is drawn in its
  11141. window, not to whether you can see it on the screen. A control may be “visible” and
  11142. still not appear on the screen, because it’s obscured by overlapping windows or other
  11143. objects.
  11144.  
  11145. There’s a field in the control record for a pointer to the control’s default action
  11146. procedure. An action procedure defines some action to be performed repeatedly for as
  11147. long as the user holds down the mouse button inside the control. The default action
  11148. procedure may be used by the Control Manager function TrackControl if you call it
  11149. without passing a pointer to an action procedure; this is discussed in detail in the
  11150. description of TrackControl in the “Control Manager Routines” section.
  11151.  
  11152. Finally, the control record includes a 32-bit reference value field, which is reserved
  11153. for use by your application. You specify an initial reference value when you create a
  11154. control, and can then read or change the reference value whenever you wish.
  11155.  
  11156. The data type for a control record is called ControlRecord. A control record is
  11157. referred to by a handle:
  11158.  
  11159. TYPE  ControlPtr     = ^ControlRecord;
  11160.       ControlHandle  = ^ControlPtr;
  11161.  
  11162. The Control Manager functions for creating a control return a handle to a newly
  11163. allocated control record; thereafter, your program should normally refer to the
  11164. control by this handle. Most of the Control Manager routines expect a control handle
  11165. as their first parameter.
  11166.  
  11167. You can store into and access most of a control record’s fields with Control Manager
  11168. routines, so normally you don’t have to know the exact field names. However, if you
  11169. want more information about the exact structure of a control record—if you’re defining
  11170. your own control types, for instance—it’s given below.
  11171.  
  11172. _______________________________________________________________________________
  11173.  
  11174. »The ControlRecord Data Type
  11175.  
  11176. The ControlRecord data type is defined as follows:
  11177.  
  11178. TYPE ControlRecord =
  11179.       PACKED RECORD
  11180.         nextControl:    ControlHandle;  {next control}
  11181.         contrlOwner:    WindowPtr;      {control's window}
  11182.         contrlRect:     Rect;           {enclosing rectangle}
  11183.         contrlVis:      Byte;           {255 if visible}
  11184.         contrlHilite:   Byte;           {highlight state}
  11185.         contrlValue:    INTEGER;        {control's current setting}
  11186.         contrlMin:      INTEGER;        {control's minimum setting}
  11187.         contrlMax:      INTEGER;        {control's maximum setting}
  11188.         contrlDefProc:  Handle;         {control definition function}
  11189.         contrlData:     Handle;         {data used by contrlDefProc}
  11190.         contrlAction:   ProcPtr;        {default action procedure}
  11191.         contrlRfCon:    LONGINT;        {control's reference value}
  11192.         contrlTitle:    Str255          {control's title}
  11193.       END;
  11194.  
  11195. NextControl is a handle to the next control associated with this control’s window.
  11196. All the controls belonging to a given window are kept in a linked list, beginning in
  11197. the controlList field of the window record and chained together through the nextControl
  11198. fields of the individual control records. The end of the list is marked by a NIL
  11199. value; as new controls are created, they’re added to the beginning of the list.
  11200.  
  11201. ContrlOwner is a pointer to the window that this control belongs to.
  11202.  
  11203. ContrlRect is the rectangle that completely encloses the control, in the local coordinates
  11204. of the control’s window.
  11205.  
  11206. When contrlVis is 0, the control is currently invisible; when it’s 255, the control
  11207. is visible.
  11208.  
  11209. ContrlHilite specifies whether and how the control is to be highlighted, indicating
  11210. whether it’s active or inactive. The HiliteControl procedure lets you set this field;
  11211. see the description of HiliteControl for more information about the meaning of the
  11212. field’s value.
  11213.  
  11214. ContrlValue is the control’s current setting. For check boxes and radio buttons, 0
  11215. means the control is off and 1 means it’s on. For dials, the fields contrlMin and
  11216. contrlMax define the range of possible settings; contrlValue may take on any value
  11217. within that range. Other (custom) control types can use these three fields as they
  11218. see fit.
  11219.  
  11220. ContrlDefProc is a handle to the control definition function for this type of control.
  11221. When you create a control, you identify its type with a control definition ID, which
  11222. is converted into a handle to the control definition function and stored in the
  11223. contrlDefProc field. Thereafter, the Control Manager uses this handle to access the
  11224. definition function; you should never need to refer to this field directly.
  11225.  
  11226. Note:  When not running in 32-bit mode, the high-order byte of the
  11227.        contrlDefProc field contains some additional information that
  11228.        the Control Manager gets from the control definition ID; for
  11229.        details, see the section “Defining Your Own Controls”.
  11230.  
  11231. ContrlData is reserved for use by the control definition function, typically to hold
  11232. additional information specific to a particular control type. For example, the standard
  11233. definition function for scroll bars uses this field for a handle to the region containing
  11234. the scroll bar’s thumb. If no more than four bytes of additional information are
  11235. needed, the definition function can store the information directly in the contrlData
  11236. field rather than use a handle.
  11237.  
  11238. ContrlAction is a pointer to the control’s default action procedure, if any. The
  11239. Control Manager function TrackControl may call this procedure to respond to the
  11240. user’s dragging the mouse inside the control.
  11241.  
  11242. ContrlRfCon is the control’s reference value field, which the application may store
  11243. into and access for any purpose.
  11244.  
  11245. ContrlTitle is the control’s title, if any.
  11246.  
  11247. æKY CtlCTab
  11248. CCTabPtr
  11249. CCTabHandle
  11250. æFp Controls.p
  11251. æT RECORD
  11252. æD CCTabPtr = ^CtlCTab;
  11253. CCTabHandle = ^CCTabPtr;
  11254. CtlCTab = RECORD
  11255.     ccSeed: LONGINT; {reserved}
  11256.     ccRider: INTEGER; {see what you have done - reserved}
  11257.     ctSize: INTEGER; {usually 3 for controls}
  11258.     ctTable: ARRAY [0..3] OF ColorSpec;
  11259.     END;
  11260. æC 
  11261. The contents and meaning of a control’s color table are determined by its control
  11262. definition function (see “The Control Color Table Resource” section). The CTabHandle
  11263. parameter used in the Color Control Manager routines provides a handle to the control
  11264. color table. The components of a control color table are defined as follows:
  11265.  
  11266. TYPE
  11267.   CCTabHandle = ^CCTabPtr;
  11268.   CCTabPtr    = ^CtlCTab;
  11269.   CtlCTab     = RECORD
  11270.                   ccSeed:      LONGINT;    {not used for controls}
  11271.                   ccRider:     INTEGER;    {not used for controls}
  11272.                   ctSize:      INTEGER;    {number of entries in table –1}
  11273.                   ctTable:     cSpecArray  {array of ColorSpec records}
  11274.                 END;
  11275.  
  11276. Field descriptions
  11277.  
  11278. ccSeed        The ccSeed field is unused in control color tables.
  11279.  
  11280. ccRider       The ccRider field is unused in control color tables.
  11281.  
  11282. ctSize        The ctSize field defines the number of elements in the table,
  11283.               minus one. For controls drawn with the standard definition
  11284.               procedure, this field is always 3.
  11285.  
  11286. ctTable       The ctTable field holds an array of colorSpec records. Each
  11287.               colorSpec is made up of a partIdentifier field and a partRGB
  11288.               field. The partIdentifier field holds an integer which
  11289.               associates an RGBColor to a particular part of the control.
  11290.               The definition procedures attempt to find the appropriate part
  11291.               identifier when preparing to draw a part. If that part
  11292.               identifier is not found, the first color in the table is
  11293.               used to draw the part. The part identifiers can appear in any
  11294.               order in the table. The partRGB field specifies a standard RGB
  11295.               color record, indicating what absolute color will be used to
  11296.               draw the control part found in the partIdentifier field.
  11297.  
  11298. A standard control color table is shown in Figure 6.
  11299.  
  11300. •••Refer to Figure 6.•••
  11301.  
  11302. Figure 6–Control Color Table
  11303.  
  11304. The 'cctb' resource is an exact image of this control table data structure, and is
  11305. stored in the same format as 'clut' color table resources.
  11306.  
  11307. Standard buttons, check boxes, and radio buttons use a four-element color table with
  11308. part identifiers as shown below:
  11309.  
  11310.   cFrameColor (0)       Frame color
  11311.   cBodyColor (1)        Fill color for body of control
  11312.   cTextColor (2)        Text color
  11313.   cThumbColor (3)       Unused
  11314.  
  11315. When highlighted, plain buttons exchange their body and text colors (colors 1 and 2);
  11316. check boxes and radio buttons change their appearance without changing colors.  All
  11317. three types indicate deactivation by dimming their text with no change in colors.
  11318.  
  11319. Standard scroll bars use a four-element color table with part identifiers as shown
  11320. below:
  11321.  
  11322.   cFrameColor (0)       Frame color, foreground color for shaft and arrows
  11323.   cBodyColor (1         Background color for shaft and arrows
  11324.   cTextColor (2)        Unused
  11325.   cThumbColor (3)       Fill color for thumb
  11326.  
  11327. When highlighted, the arrows are filled with the foreground color (color 0) within
  11328. the arrow outline. A deactivated scroll bar shows no indicator, and displays its
  11329. shaft in solid background color (color 1), with no pattern.
  11330.  
  11331. The 'cctb' resource = 0 is read into the application heap when the application starts,
  11332. and serves as the default control color table. The last record in the auxiliary
  11333. control list points to the default 'cctb' resource. When drawing a control, the
  11334. standard control definition function searches the list for an auxiliary control
  11335. record whose acOwner points to the control being drawn.  If it finds such a record,
  11336. it uses the color table designated by that record; if it doesn’t find one before
  11337. reaching the default record at the end of the list, it uses the default color table
  11338. instead. All types of controls share the same default record. The default auxiliary
  11339. control record is recognized by NIL values in both its acNext and acOwner fields; the
  11340. application must not change these fields.
  11341.  
  11342. A nonstandard control definition function can use color tables of any desired size
  11343. and define their contents in any way it wishes, except that part indices 1 to 127 are
  11344. reserved for system definition.  Any such nonstandard function should take care to
  11345. bypass the defaulting mechanism just described, by allocating an explicit auxiliary
  11346. record for every control it creates.
  11347.  
  11348. æKY AuxCtlRec
  11349. AuxCtlPtr
  11350. AuxCtlHandle
  11351. æFp Controls.p
  11352. æT RECORD
  11353. æD AuxCtlPtr = ^AuxCtlRec;
  11354. AuxCtlHandle = ^AuxCtlPtr;
  11355. AuxCtlRec = RECORD
  11356.     acNext: AuxCtlHandle; {handle to next AuxCtlRec}
  11357.     acOwner: ControlHandle; {handle for aux record's control}
  11358.     acCTable: CCTabHandle; {color table for this control}
  11359.     acFlags: INTEGER; {misc flag byte}
  11360.     acReserved: LONGINT; {reserved for use by Apple}
  11361.     acRefCon: LONGINT; {for use by application}
  11362.     END;
  11363. æC 
  11364. The information needed for drawing controls in color is kept in a linked list of
  11365. auxiliary control records, beginning in the global variable AuxCtlHead.
  11366. (Notice that there is just one global list for all controls in all windows, not a
  11367. separate one for each window.) Each window record has a handle to the list of controls.
  11368. Figure 5 shows the auxiliary control list structure.
  11369.  
  11370. •••Refer to Figure 5.•••
  11371.  
  11372. Figure 5–Auxiliary Control List
  11373.  
  11374. Each auxiliary control record is a relocatable object residing in the application
  11375. heap. The most important information it holds is a handle to the control’s individual
  11376. color table (see the “Control Color Tables” section).  The rest of the record consists
  11377. of a link to the next record in the list, a field that identifies the control’s
  11378. owner, a 4-byte field reserved for future expansion, and a 4-byte reference constant
  11379. for use by the application:
  11380.  
  11381. TYPE
  11382.   AuxCtlHandle = ^AuxCtlPtr;
  11383.   AuxCtlPtr    = ^AuxCtlRec;
  11384.   AuxCtlRec    = RECORD
  11385.                    acNext:      AuxCtlHandle;   {handle to next record in list}
  11386.                    acOwner:     ControlHandle;  {handle to owning control}
  11387.                    acCTable:    CCTabHandle;    {handle to control's color }
  11388.                                                 { table}
  11389.                    acFlags:     INTEGER;        {miscellaneous flags; reserved}
  11390.                    acReserved:  LONGINT;        {reserved for future expansion}
  11391.                    acRefCon:    LONGINT         {reserved for application use}
  11392.                  END;
  11393.  
  11394. Field descriptions
  11395.  
  11396. acNext        The acNext field contains a handle to the next record in
  11397.               the auxiliary control list.
  11398.  
  11399. acOwner       The acOwner field contains the handle of the control to
  11400.               which this auxiliary record belongs. Used as an ID field.
  11401.  
  11402. acCTable      The acCTable contains the handle to the control’s color
  11403.               table (see “Control Color Tables” below).
  11404.  
  11405. acFlags       The acFlags field contains miscellaneous flags for use by
  11406.               the Control Manager; this field is reserved.
  11407.  
  11408. acReserved    The acReserved field is reserved for future expansion;
  11409.               this must be set to 0 for future compatibility.
  11410.  
  11411. acRefCon      The acRefCon field is a reference constant for use by
  11412.               the application.
  11413.  
  11414. Not every control needs an auxiliary control record.  When an application is started,
  11415. a resource containing a default color table is loaded from the system resource file;
  11416. this resource defines a standard set of control colors. Since there is no InitControls
  11417. routine, this happens when an application calls InitWindows.
  11418.  
  11419. Separate auxiliary control records are needed only for controls whose color usage
  11420. differs from the default.  Each such nonstandard control must have its own auxiliary
  11421. record, even if it uses the same colors as another control. This allows two or more
  11422. auxiliary records to share the same control color table. If the control color table
  11423. is a resource, it won’t be deleted by DisposeControl. When using an auxiliary record
  11424. that is not stored as a resource, the application should not deallocate the color
  11425. table if another control is still using it.
  11426.  
  11427. A control created from scratch will initially have no auxiliary control record.  If
  11428. it is to use nonstandard colors, it must be given an auxiliary record and a color
  11429. table with SetCtlColor (see the “Control Manager Routines” section).  Such a control
  11430. should normally be made invisible at creation and then displayed with ShowControl
  11431. after the colors are set.  For controls created from a 'CNTL' resource,  the color
  11432. table can be specified as a resource as well. See the section titled “The Control
  11433. Color Table Resource”.
  11434.  
  11435. A/UX systems:  When using 32-bit mode. every control has its own auxiliary
  11436.                record. If there is no specific set of control colors for
  11437.                this control, the acCTable will point to the default color table.
  11438.  
  11439. æKY NewControl
  11440. æFp Controls.p
  11441. æT FUNCTION
  11442. æTN A954
  11443. æD FUNCTION NewControl(theWindow: WindowPtr;boundsRect: Rect;title: Str255;
  11444.     visible: BOOLEAN;value: INTEGER;min: INTEGER;max: INTEGER;procID: INTEGER;
  11445.     refCon: LONGINT): ControlHandle;
  11446.     INLINE $A954;
  11447. æDT myVariable := NewControl(theWindow,boundsRect,title,visible,value,min,max,procID,refCon);
  11448. æMM
  11449. æRI I-319, P-112, 114, 177
  11450. æC  
  11451. NewControl creates a control, adds it to the beginning of theWindow’s control list,
  11452. and returns a handle to the new control. The values passed as parameters are stored
  11453. in the corresponding fields of the control record, as described below. The field that
  11454. determines highlighting is set to 0 (no highlighting) and the pointer to the default
  11455. action procedure is set to NIL (none).
  11456.  
  11457. Note:  The control definition function may do additional initialization,
  11458.        including changing any of the fields of the control record. The only
  11459.        standard control for which additional initialization is done is the
  11460.        scroll bar; its control definition function allocates space for a
  11461.        region to hold the thumb and stores the region handle in the
  11462.        contrlData field of the control record.
  11463.  
  11464. TheWindow is the window the new control will belong to. All coordinates pertaining to
  11465. the control will be interpreted in this window’s local coordinate system.
  11466.  
  11467. BoundsRect, given in theWindow’s local coordinates, is the rectangle that encloses
  11468. the control and thus determines its size and location. Note the following about the
  11469. enclosing rectangle for the standard controls:
  11470.  
  11471.   •  Simple buttons are drawn to fit the rectangle exactly. (The control
  11472.      definition function calls the QuickDraw procedure FrameRoundRect.) To
  11473.      allow for the tallest characters in the system font, there should be
  11474.      at least a 20-point difference between the top and bottom coordinates
  11475.      of the rectangle.
  11476.   •  For check boxes and radio buttons, there should be at least a 16-point
  11477.      difference between the top and bottom coordinates.
  11478.   •  By convention, scroll bars are 16 pixels wide, so there should be a
  11479.      16-point difference between the left and right (or top and bottom)
  11480.      coordinates. (If there isn’t, the scroll bar will be scaled to fit
  11481.      the rectangle.) A standard scroll bar should be at least 48 pixels
  11482.      long, to allow room for the scroll arrows and thumb.
  11483.  
  11484. Title is the control’s title, if any (if none, you can just pass the empty string as
  11485. the title). Be sure the title will fit in the control’s enclosing rectangle; if it
  11486. won’t it will be truncated on the right for check boxes and radio buttons, or centered
  11487. and truncated on both ends for simple buttons.
  11488.  
  11489. Note:  Some non-Roman systems write text from right-to-left, in which
  11490.        case radio buttons and check boxes are drawn with their titles
  11491.        on the left of the control.  They are also truncated on the left.
  11492.        See the Script Manager chapter for more information.
  11493.  
  11494. If the visible parameter is TRUE, NewControl draws the control.
  11495.  
  11496. Note:  It does not use the standard window updating mechanism, but
  11497.        instead draws the control immediately in the window.
  11498.  
  11499. The min and max parameters define the control’s range of possible settings; the value
  11500. parameter gives the initial setting. For controls that don’t retain a setting, such
  11501. as buttons, the values you supply for these parameters will be stored in the control
  11502. record but will never be used. So it doesn’t matter what values you give for those
  11503. controls—0 for all three parameters will do. For controls that just retain an on-or-off
  11504. setting, such as check boxes or radio buttons, min should be 0 (meaning the control
  11505. is off) and max should be 1
  11506. (meaning it’s on). For dials, you can specify whatever values are appropriate for
  11507. min, max, and value.
  11508.  
  11509. ProcID is the control definition ID, which leads to the control definition function
  11510. for this type of control. (The function is read into memory if it
  11511. isn’t already in memory.) The control definition IDs for the standard control types
  11512. are listed above under “Controls and Resources”. Control definition IDs for custom
  11513. control types are discussed later under “Defining Your Own Controls”.
  11514.  
  11515. RefCon is the control’s reference value, set and used only by your application.
  11516.  
  11517. æKY SetCTitle
  11518. æFp Controls.p
  11519. æT PROCEDURE
  11520. æTN A95F
  11521. æD PROCEDURE SetCTitle(theControl: ControlHandle;title: Str255);
  11522.     INLINE $A95F;
  11523. æDT SetCTitle(theControl,title);
  11524. æMM
  11525. æRI I-321
  11526. æC  
  11527. SetCTitle sets theControl’s title to the given string and redraws the control.
  11528.  
  11529. æKY GetCTitle
  11530. æFp Controls.p
  11531. æT PROCEDURE
  11532. æTN A95E
  11533. æD PROCEDURE GetCTitle(theControl: ControlHandle;VAR title: Str255);
  11534.     INLINE $A95E;
  11535. æDT GetCTitle(theControl,title);
  11536. æRI I-321
  11537. æC 
  11538. GetCTitle returns theControl’s title as the value of the title parameter.
  11539.  
  11540. æKY GetNewControl
  11541. æFp Controls.p
  11542. æT FUNCTION
  11543. æTN A9BE
  11544. æD FUNCTION GetNewControl(controlID: INTEGER;owner: WindowPtr): ControlHandle;
  11545.     INLINE $A9BE;
  11546. æDT myVariable := GetNewControl(controlID,owner);
  11547. æMM
  11548. æRT 203
  11549. æRI I-321, P-112, 113, 114, 172
  11550. æC 
  11551. GetNewControl creates a control from a control template stored in a resource file,
  11552. adds it to the beginning of theWindow’s control list, and returns a handle to the new
  11553. control. ControlID is the resource ID of the template. GetNewControl works exactly
  11554. the same as NewControl (above), except that it gets the initial values for the new
  11555. control’s fields from the specified control template instead of accepting them as
  11556. parameters. If the control template can’t be read from the resource file, GetNewControl
  11557. returns NIL. It releases the memory occupied by the resource before returning.
  11558.  
  11559. The system default control colors are stored in the System file and ROMResources as
  11560. 'cctb' resource = 0. By including a 'cctb' resource = 0 in your application, it is
  11561. possible to change the default colors that will be used for all controls, unless a
  11562. specific 'cctb' exists for a control defined within the application.
  11563.  
  11564. When you use GetNewControl for the control resource 'CNTL', GetNewControl will attempt
  11565. to load a 'cctb' resource with the same ID as the 'CNTL' resource ID, if one is
  11566. present. It then executes the SetCtlColor call.
  11567.  
  11568. The following part identifiers for control elements should be present in the ColorSpec.value
  11569. field:
  11570.  
  11571.   cFrameColor (0)       Frame color
  11572.   cBodyColor (1)        Fill color for body of control
  11573.   cTextColor (2)        Text color
  11574.   cThumbColor (3)       Thumb color
  11575.  
  11576. These identifiers may be present in any order; for instance, the text or indicator
  11577. color values may be stored before the fill and frame colors in the ColorSpec record
  11578. structure. If a part identifier is not found, then the first color in the color table
  11579. will be used.
  11580.  
  11581. æKY DisposeControl
  11582. æFp Controls.p
  11583. æT PROCEDURE
  11584. æTN A955
  11585. æD PROCEDURE DisposeControl(theControl: ControlHandle);
  11586.     INLINE $A955;
  11587. æDT DisposeControl(theControl);
  11588. æMM
  11589. æRI I-321, P-168
  11590. æC 
  11591. Assembly-language note:  The macro you invoke to call DisposeControl from
  11592.                          assembly language is named _DisposControl.
  11593.  
  11594. DisposeControl removes theControl from the screen, deletes it from its window’s
  11595. control list, and releases the memory occupied by the control record and any data
  11596. structures associated with the control.
  11597.  
  11598. æKY KillControls
  11599. æFp Controls.p
  11600. æT PROCEDURE
  11601. æTN A956
  11602. æD PROCEDURE KillControls(theWindow: WindowPtr);
  11603.     INLINE $A956;
  11604. æDT KillControls(theWindow);
  11605. æMM
  11606. æRI I-321, P-113, 175
  11607. æC 
  11608. KillControls disposes of all controls associated with theWindow by calling DisposeControl
  11609. (above) for each.
  11610.  
  11611. Note:  Remember that the Window Manager procedures CloseWindow and
  11612.        DisposeWindow automatically dispose of all controls associated
  11613.        with the given window.
  11614.  
  11615. æKY HideControl
  11616. æFp Controls.p
  11617. æT PROCEDURE
  11618. æTN A958
  11619. æD PROCEDURE HideControl(theControl: ControlHandle);
  11620.     INLINE $A958;
  11621. æDT HideControl(theControl);
  11622. æMM
  11623. æRI I-322, P-113, 114, 174
  11624. æC 
  11625. HideControl makes theControl invisible. It fills the region the control occupies
  11626. within its window with the background pattern of the window’s grafPort. It also adds
  11627. the control’s enclosing rectangle to the window’s update region, so that anything
  11628. else that was previously obscured by the control will reappear on the screen. If the
  11629. control is already invisible, HideControl has no effect.
  11630.  
  11631. æKY ShowControl
  11632. æFp Controls.p
  11633. æT PROCEDURE
  11634. æTN A957
  11635. æD PROCEDURE ShowControl(theControl: ControlHandle);
  11636.     INLINE $A957;
  11637. æDT ShowControl(theControl);
  11638. æMM
  11639. æRT 197
  11640. æRI I-322, P-113, 114, 181
  11641. æC 
  11642. ShowControl makes theControl visible. The control is drawn in its window but may be
  11643. completely or partially obscured by overlapping windows or other objects. If the
  11644. control is already visible, ShowControl has no effect.
  11645.  
  11646. æKY DrawControls
  11647. æFp Controls.p
  11648. æT PROCEDURE
  11649. æTN A969
  11650. æD PROCEDURE DrawControls(theWindow: WindowPtr);
  11651.     INLINE $A969;
  11652. æDT DrawControls(theWindow);
  11653. æRT 203
  11654. æRI I-322, P-169
  11655. æC 
  11656. DrawControls draws all controls currently visible in theWindow. The controls are
  11657. drawn in reverse order of creation; thus in case of overlap the earliest-created
  11658. controls appear frontmost in the window.
  11659.  
  11660. Note:  Window Manager routines such as SelectWindow, ShowWindow, and
  11661.        BringToFront do not automatically call DrawControls to display
  11662.        the window’s controls. They just add the appropriate regions to
  11663.        the window’s update region, generating an update event. Your program
  11664.        should always call DrawControls explicitly upon receiving an update
  11665.        event for a window that contains controls.
  11666.  
  11667. æKY Draw1Control
  11668. æFp Controls.p
  11669. æT PROCEDURE
  11670. æTN A96D
  11671. æD PROCEDURE Draw1Control(theControl: ControlHandle);
  11672.     INLINE $A96D;
  11673. æDT Draw1Control(theControl);
  11674. æMM
  11675. æRI IV-53
  11676. æC 
  11677. [128K ROM]
  11678.  
  11679. Draw1Control draws the specified control if it’s visible within the window.
  11680.  
  11681. æKY HiliteControl
  11682. æFp Controls.p
  11683. æT PROCEDURE
  11684. æTN A95D
  11685. æD PROCEDURE HiliteControl(theControl: ControlHandle;hiliteState: INTEGER);
  11686.     INLINE $A95D;
  11687. æDT HiliteControl(theControl,hiliteState);
  11688. æMM
  11689. æRI I-322
  11690. æC 
  11691. HiliteControl changes the way theControl is highlighted. HiliteState has one of the
  11692. following values:
  11693.  
  11694.   •  The value 0 means no highlighting. (The control is active.)
  11695.   •  A value between 1 and 253 is interpreted as a part code designating
  11696.      the part of the (active) control to be highlighted.
  11697.   •  The value 255 means that the control is to be made inactive and
  11698.      highlighted accordingly.
  11699.  
  11700. Note:  The value 254 should not be used; this value is reserved for future use.
  11701.  
  11702. HiliteControl calls the control definition function to redraw the control with its
  11703. new highlighting.
  11704.  
  11705. æKY UpdtControl
  11706. æFp Controls.p
  11707. æT PROCEDURE
  11708. æTN A953
  11709. æD PROCEDURE UpdtControl(theWindow: WindowPtr;updateRgn: RgnHandle);
  11710.     INLINE $A953;
  11711. æDT UpdtControl(theWindow,updateRgn);
  11712. æMM
  11713. æRI IV-53
  11714. æC  
  11715. [128K ROM]
  11716.  
  11717. UpdtControl is a faster version of the DrawControls procedure. Instead of drawing all
  11718. of the controls in theWindow, UpdtControl draws only the controls that are in the
  11719. specified update region. UpdtControl is called in response to an update event, and is
  11720. usually bracketed by calls to the Window Manager procedures BeginUpdate and EndUpdate.
  11721. UpdateRgn should be set to the visRgn of theWindow’s port (for more details, see the
  11722. BeginUpdate procedure in the Window Manager chapter).
  11723.  
  11724. Note:  In general, controls are in a dialog box and are automatically
  11725.        drawn by the DrawDialog procedure.
  11726.  
  11727. æKY UpdateControls
  11728. æFp Controls.p
  11729. æT PROCEDURE
  11730. æTN A953
  11731. æD PROCEDURE UpdateControls(theWindow: WindowPtr;updateRgn: RgnHandle);
  11732.     INLINE $A953;
  11733. æDT UpdateControls(theWindow,updateRgn);
  11734. æMM
  11735. æRI IV-53
  11736. æC  
  11737. [128K ROM]
  11738.  
  11739. UpdtControl is a faster version of the DrawControls procedure. Instead of drawing all
  11740. of the controls in theWindow, UpdtControl draws only the controls that are in the
  11741. specified update region. UpdtControl is called in response to an update event, and is
  11742. usually bracketed by calls to the Window Manager procedures BeginUpdate and EndUpdate.
  11743. UpdateRgn should be set to the visRgn of theWindow’s port (for more details, see the
  11744. BeginUpdate procedure in the Window Manager chapter).
  11745.  
  11746. Note:  In general, controls are in a dialog box and are automatically
  11747.        drawn by the DrawDialog procedure.
  11748.  
  11749. æKY MoveControl
  11750. æFp Controls.p
  11751. æT PROCEDURE
  11752. æTN A959
  11753. æD PROCEDURE MoveControl(theControl: ControlHandle;h: INTEGER;v: INTEGER);
  11754.     INLINE $A959;
  11755. æDT MoveControl(theControl,h,v);
  11756. æMM
  11757. æRI I-325, P-113, 176
  11758. æC 
  11759. MoveControl moves theControl to a new location within its window. The top left corner
  11760. of the control’s enclosing rectangle is moved to the horizontal and vertical coordinates
  11761. h and v (given in the local coordinates of the control’s window); the bottom right
  11762. corner is adjusted accordingly, to keep the size of the rectangle the same as before.
  11763. If the control is currently visible, it’s hidden and then redrawn at its new location.
  11764.  
  11765. æKY SizeControl
  11766. æFp Controls.p
  11767. æT PROCEDURE
  11768. æTN A95C
  11769. æD PROCEDURE SizeControl(theControl: ControlHandle;w: INTEGER;h: INTEGER);
  11770.     INLINE $A95C;
  11771. æDT SizeControl(theControl,w,h);
  11772. æMM
  11773. æRI I-326, P-113, 181
  11774. æC 
  11775. SizeControl changes the size of theControl’s enclosing rectangle. The bottom right
  11776. corner of the rectangle is adjusted to set the rectangle’s width and height to the
  11777. number of pixels specified by w and h; the position of the top left corner is not
  11778. changed. If the control is currently visible, it’s hidden and then redrawn in its new
  11779. size.
  11780.  
  11781. æKY SetCtlValue
  11782. æFp Controls.p
  11783. æT PROCEDURE
  11784. æTN A963
  11785. æD PROCEDURE SetCtlValue(theControl: ControlHandle;theValue: INTEGER);
  11786.     INLINE $A963;
  11787. æDT SetCtlValue(theControl,theValue);
  11788. æMM
  11789. æRT 197
  11790. æRI I-326
  11791. æC 
  11792. SetCtlValue sets theControl’s current setting to theValue and redraws the control to
  11793. reflect the new setting. For check boxes and radio buttons, the value 1 fills the
  11794. control with the appropriate mark, and 0 clears it. For scroll bars, SetCtlValue
  11795. redraws the thumb where appropriate.
  11796.  
  11797. If the specified value is out of range, it’s forced to the nearest endpoint of the
  11798. current range (that is, if theValue is less than the minimum setting, SetCtlValue
  11799. sets the current setting to the minimum; if theValue is greater than the maximum
  11800. setting, it sets the current setting to the maximum).
  11801.  
  11802. æKY GetCtlValue
  11803. æFp Controls.p
  11804. æT FUNCTION
  11805. æTN A960
  11806. æD FUNCTION GetCtlValue(theControl: ControlHandle): INTEGER;
  11807.     INLINE $A960;
  11808. æDT myVariable := GetCtlValue(theControl);
  11809. æRI I-326, P-114, 171
  11810. æC 
  11811. GetCtlValue returns theControl’s current setting.
  11812.  
  11813. æKY SetCtlMin
  11814. æFp Controls.p
  11815. æT PROCEDURE
  11816. æTN A964
  11817. æD PROCEDURE SetCtlMin(theControl: ControlHandle;minValue: INTEGER);
  11818.     INLINE $A964;
  11819. æDT SetCtlMin(theControl,minValue);
  11820. æMM
  11821. æRI I-326
  11822. æC 
  11823. Assembly-language note:  The macro you invoke to call SetCtlMin from
  11824.                          assembly language is named _SetMinCtl.
  11825.  
  11826. SetCtlMin sets theControl’s minimum setting to minValue and redraws the control to
  11827. reflect the new range. If the control’s current setting is less than minValue, the
  11828. setting is changed to the new minimum.
  11829.  
  11830. æKY GetCtlMin
  11831. æFp Controls.p
  11832. æT FUNCTION
  11833. æTN A961
  11834. æD FUNCTION GetCtlMin(theControl: ControlHandle): INTEGER;
  11835.     INLINE $A961;
  11836. æDT myVariable := GetCtlMin(theControl);
  11837. æRI I-327
  11838. æC  
  11839. Assembly-language note:  The macro you invoke to call GetCtlMin from
  11840.                          assembly language is named _GetMinCtl.
  11841.  
  11842. GetCtlMin returns theControl’s minimum setting.
  11843.  
  11844. æKY SetCtlMax
  11845. æFp Controls.p
  11846. æT PROCEDURE
  11847. æTN A965
  11848. æD PROCEDURE SetCtlMax(theControl: ControlHandle;maxValue: INTEGER);
  11849.     INLINE $A965;
  11850. æDT SetCtlMax(theControl,maxValue);
  11851. æMM
  11852. æRI I-327
  11853. æC 
  11854. Assembly-language note:  The macro you invoke to call SetCtlMax from
  11855.                          assembly language is named _SetMaxCtl.
  11856.  
  11857. SetCtlMax sets theControl’s maximum setting to maxValue and redraws the control to
  11858. reflect the new range. If the control’s current setting is greater than maxValue, the
  11859. setting is changed to the new maximum.
  11860.  
  11861. Note:  If you set the maximum setting of a scroll bar equal to its minimum
  11862.        setting, the control definition function will make the scroll bar
  11863.        inactive.
  11864.  
  11865. æKY GetCtlMax
  11866. æFp Controls.p
  11867. æT FUNCTION
  11868. æTN A962
  11869. æD FUNCTION GetCtlMax(theControl: ControlHandle): INTEGER;
  11870.     INLINE $A962;
  11871. æDT myVariable := GetCtlMax(theControl);
  11872. æRI I-327
  11873. æC 
  11874. Assembly-language note:  The macro you invoke to call GetCtlMax from
  11875.                          assembly language is named _GetMaxCtl.
  11876.  
  11877. GetCtlMax returns theControl’s maximum setting.
  11878.  
  11879. æKY SetCRefCon
  11880. æFp Controls.p
  11881. æT PROCEDURE
  11882. æTN A95B
  11883. æD PROCEDURE SetCRefCon(theControl: ControlHandle;data: LONGINT);
  11884.     INLINE $A95B;
  11885. æDT SetCRefCon(theControl,data);
  11886. æRI I-327
  11887. æC 
  11888. SetCRefCon sets theControl’s reference value to the given data.
  11889.  
  11890. æKY GetCRefCon
  11891. æFp Controls.p
  11892. æT FUNCTION
  11893. æTN A95A
  11894. æD FUNCTION GetCRefCon(theControl: ControlHandle): LONGINT;
  11895.     INLINE $A95A;
  11896. æDT myVariable := GetCRefCon(theControl);
  11897. æRI I-327
  11898. æC 
  11899. GetCRefCon returns theControl’s current reference value.
  11900.  
  11901. æKY SetCtlAction
  11902. æFp Controls.p
  11903. æT PROCEDURE
  11904. æTN A96B
  11905. æD PROCEDURE SetCtlAction(theControl: ControlHandle;actionProc: ProcPtr);
  11906.     INLINE $A96B;
  11907. æDT SetCtlAction(theControl,actionProc);
  11908. æRI I-328
  11909. æC 
  11910. SetCtlAction sets theControl’s default action procedure to actionProc.
  11911.  
  11912. æKY GetCtlAction
  11913. æFp Controls.p
  11914. æT FUNCTION
  11915. æTN A96A
  11916. æD FUNCTION GetCtlAction(theControl: ControlHandle): ProcPtr;
  11917.     INLINE $A96A;
  11918. æDT myVariable := GetCtlAction(theControl);
  11919. æRI I-328, IV-53
  11920. æC  
  11921. GetCtlAction returns a pointer to theControl’s default action procedure, if any. (It
  11922. returns whatever is in that field of the control record.)
  11923.  
  11924. æKY DragControl
  11925. æFp Controls.p
  11926. æT PROCEDURE
  11927. æTN A967
  11928. æD PROCEDURE DragControl(theControl: ControlHandle;startPt: Point;limitRect: Rect;
  11929.     slopRect: Rect;axis: INTEGER);
  11930.     INLINE $A967;
  11931. æDT DragControl(theControl,startPt,limitRect,slopRect,axis);
  11932. æMM
  11933. æRI I-325
  11934. æC 
  11935. Called with the mouse button down inside theControl, DragControl pulls a dotted
  11936. outline of the control around the screen, following the movements of the mouse until
  11937. the button is released. When the mouse button is released, DragControl calls MoveControl
  11938. to move the control to the location to which it was dragged.
  11939.  
  11940. Note:  Before beginning to follow the mouse, DragControl calls the control
  11941.        definition function to allow it to do its own “custom dragging” if
  11942.        it chooses. If the definition function doesn’t choose to do any
  11943.        custom dragging, DragControl uses the default method of dragging
  11944.        described here.
  11945.  
  11946. The startPt, limitRect, slopRect, and axis parameters have the same meaning as for
  11947. the Window Manager function DragGrayRgn. These parameters are reviewed briefly below;
  11948. see the description of DragGrayRgn in the Window Manager chapter for more details.
  11949.  
  11950.   •  StartPt is assumed to be the point where the mouse button was originally
  11951.      pressed, in the local coordinates of the control’s window.
  11952.   •  LimitRect limits the travel of the control’s outline, and should normally
  11953.      coincide with or be contained within the window’s content region.
  11954.   •  SlopRect allows the user some “slop” in moving the mouse; it should
  11955.      completely enclose limitRect.
  11956.   •  The axis parameter allows you to constrain the control’s motion to
  11957.      only one axis. It has one of the following values:
  11958.  
  11959.        CONST  noConstraint = 0;    {no constraint}
  11960.               hAxisOnly    = 1;    {horizontal axis only}
  11961.               vAxisOnly    = 2;    {vertical axis only}
  11962.  
  11963. Assembly-language note:  Like TrackControl, DragControl invokes the
  11964.                          macro _DragTheRgn, so you can use the global
  11965.                          variables DragHook and DragPattern.
  11966.  
  11967. æKY TestControl
  11968. æFp Controls.p
  11969. æT FUNCTION
  11970. æTN A966
  11971. æD FUNCTION TestControl(theControl: ControlHandle;thePt: Point): INTEGER;
  11972.     INLINE $A966;
  11973. æDT myVariable := TestControl(theControl,thePt);
  11974. æMM
  11975. æRI I-325
  11976. æC  
  11977. If theControl is visible and active, TestControl tests which part of the control
  11978. contains thePoint (in the local coordinates of the control’s window); it returns the
  11979. corresponding part code, or 0 if the point is outside the control. If the control is
  11980. invisible or inactive, TestControl returns 0. TestControl is called by FindControl
  11981. and TrackControl; normally you won’t need to call it yourself.
  11982.  
  11983. æKY TrackControl
  11984. æFp Controls.p
  11985. æT FUNCTION
  11986. æTN A968
  11987. æD FUNCTION TrackControl(theControl: ControlHandle;thePoint: Point;actionProc: ProcPtr): INTEGER;
  11988.     INLINE $A968;
  11989. æDT myVariable := TrackControl(theControl,thePoint,actionProc);
  11990. æMM
  11991. æRI I-323, P-114, 184
  11992. æC 
  11993. When the mouse button is pressed in a visible, active control, the application should
  11994. call TrackControl with theControl equal to the control handle and startPt equal to
  11995. the point where the mouse button was pressed (in the local coordinates of the control’s
  11996. window). TrackControl follows the movements of the mouse and responds in whatever way
  11997. is appropriate until the mouse button is released; the exact response depends on the
  11998. type of control and the part of the control in which the mouse button was pressed. If
  11999. highlighting is appropriate, TrackControl does the highlighting, and undoes it before
  12000. returning. When the mouse button is released, TrackControl returns with the part code
  12001. if the mouse is in the same part of the control that it was originally in, or with 0
  12002. if not
  12003. (in which case the application should do nothing).
  12004.  
  12005. If the mouse button was pressed in an indicator, TrackControl drags a dotted outline
  12006. of it to follow the mouse. When the mouse button is released, TrackControl calls the
  12007. control definition function to reposition the control’s indicator. The control definition
  12008. function for scroll bars responds by redrawing the thumb, calculating the control’s
  12009. current setting based on the new relative position of the thumb, and storing the
  12010. current setting in the control record; for example, if the minimum and maximum settings
  12011. are 0 and 10, and the thumb is in the middle of the scroll bar, 5 is stored as the
  12012. current setting. The application must then scroll to the corresponding relative
  12013. position in the document.
  12014.  
  12015. TrackControl may take additional actions beyond highlighting the control or dragging
  12016. the indicator, depending on the value passed in the actionProc parameter, as described
  12017. below. The following tells you what to pass for the standard control types; for a
  12018. custom control, what you pass will depend on how the control is defined.
  12019.  
  12020.   •  If actionProc is NIL, TrackControl performs no additional actions. This
  12021.      is appropriate for simple buttons, check boxes, radio buttons, and the
  12022.      thumb of a scroll bar.
  12023.   •  ActionProc may be a pointer to an action procedure that defines some
  12024.      action to be performed repeatedly for as long as the user holds down
  12025.      the mouse button. (See below for details.)
  12026.   •  If actionProc is POINTER(–1), TrackControl looks in the control record
  12027.      for a pointer to the control’s default action procedure. If that field
  12028.      of the control record contains a procedure pointer, TrackControl uses
  12029.      the action procedure it points to; if the field contains POINTER (–1),
  12030.      TrackControl calls the control definition function to perform the
  12031.      necessary action. (If the field contains NIL, TrackControl does nothing.)
  12032.  
  12033. The action procedure in the control definition function is described in the section
  12034. “Defining Your Own Controls”. The following paragraphs describe only the action
  12035. procedure whose pointer is passed in the actionProc parameter or stored in the control
  12036. record.
  12037.  
  12038. If the mouse button was pressed in an indicator, the action procedure (if any) should
  12039. have no parameters. This procedure must allow for the fact that the mouse may not be
  12040. inside the original control part.
  12041.  
  12042. If the mouse button was pressed in a control part other than an indicator, the action
  12043. procedure should be of the form
  12044.  
  12045. PROCEDURE MyAction (theControl:  ControlHandle; partCode:  INTEGER);
  12046.  
  12047. In this case, TrackControl passes the control handle and the part code to the action
  12048. procedure. (It passes 0 in the partCode parameter if the mouse has moved outside the
  12049. original control part.) As an example of this type of action procedure, consider what
  12050. should happen when the mouse button is pressed in a scroll arrow or paging region in
  12051. a scroll bar. For these cases, your action procedure should examine the part code to
  12052. determine exactly where the mouse button was pressed, scroll up or down a line or
  12053. page as appropriate, and call SetCtlValue to change the control’s setting and redraw
  12054. the thumb.
  12055.  
  12056. Warning:  Since it has a different number of parameters depending on whether
  12057.           the mouse button was pressed in an indicator or elsewhere, the
  12058.           action procedure you pass to TrackControl (or whose pointer you
  12059.           store in the control record) can be set up for only one case or
  12060.           the other. If you store a pointer to a default action procedure
  12061.           in a control record, be sure it will be used only when appropriate
  12062.           for that type of action procedure. The only way to specify actions
  12063.           in response to all mouse-down events in a control, regardless of
  12064.           whether they’re in an indicator, is via the control definition
  12065.           function.
  12066.  
  12067. Assembly-language note:  If you store a pointer to a procedure in the global
  12068.                          variable DragHook, that procedure will be called
  12069.                          repeatedly (with no parameters) for as long as the
  12070.                          user holds down the mouse button. TrackControl
  12071.                          invokes the Window Manager macro _DragTheRgn,
  12072.                          which calls the DragHook procedure. _DragTheRgn
  12073.                          uses the pattern stored in the global variable
  12074.                          DragPattern for the dragged outline of the indicator.
  12075.  
  12076. æKY FindControl
  12077. æFp Controls.p
  12078. æT FUNCTION
  12079. æTN A96C
  12080. æD FUNCTION FindControl(thePoint: Point;theWindow: WindowPtr;VAR theControl: ControlHandle): INTEGER;
  12081.     INLINE $A96C;
  12082. æDT myVariable := FindControl(thePoint,theWindow,theControl);
  12083. æMM
  12084. æRI I-323, P-98, 114, 170
  12085. æC  
  12086. When the Window Manager function FindWindow reports that the mouse button was pressed
  12087. in the content region of a window, and the window contains controls, the application
  12088. should call FindControl with theWindow equal to the window pointer and thePoint equal
  12089. to the point where the mouse button was pressed (in the window’s local coordinates).
  12090. FindControl tells which of the window’s controls, if any, the mouse button was pressed
  12091. in:
  12092.  
  12093.   •  If it was pressed in a visible, active control, FindControl sets the
  12094.      whichControl parameter to the control handle and returns a part code
  12095.      identifying the part of the control that it was pressed in.
  12096.   •  If it was pressed in an invisible or inactive control, or not in any
  12097.      control, FindControl sets whichControl to NIL and returns 0 as its result.
  12098.  
  12099. Warning:  Notice that FindControl expects the mouse point in the window’s
  12100.           local coordinates, whereas FindWindow expects it in global
  12101.           coordinates. Always be sure to convert the point to local
  12102.           coordinates with the QuickDraw procedure GlobalToLocal before
  12103.           calling FindControl.
  12104.  
  12105. Note:  FindControl also returns NIL for whichControl and 0 as its result
  12106.        if the window is invisible or doesn’t contain the given point. In
  12107.        these cases, however, FindWindow wouldn’t have returned this window
  12108.        in the first place, so the situation should never arise.
  12109.  
  12110. æKY SetCtlColor
  12111. æFp Controls.p
  12112. æT PROCEDURE
  12113. æTN AA43
  12114. æD PROCEDURE SetCtlColor(theControl: ControlHandle;newColorTable: CCTabHandle);
  12115.     INLINE $AA43;
  12116. æDT SetCtlColor(theControl,newColorTable);
  12117. æMM
  12118. æRI V-222
  12119. æC 
  12120. [Macintosh II]
  12121.  
  12122. The SetCtlColor procedure sets or modifies a control’s color table.  If the control
  12123. currently has no auxiliary control record, a new one is created with the given color
  12124. table and added to the head of the auxiliary control list. If there is already an
  12125. auxiliary record for the control, its color table is replaced by the contents of
  12126. newColorTable.
  12127.  
  12128. If newColorTable has the same contents as the default color table, the
  12129. control’s existing auxiliary record and color table are removed from the auxiliary
  12130. control list and deallocated.  If theControl = NIL, the operation modifies the default
  12131. color table itself. If the control is visible, it will be redrawn by SetCtlColor
  12132. using the new color table.
  12133.  
  12134. æKY GetAuxCtl
  12135. æFp Controls.p
  12136. æT FUNCTION
  12137. æTN AA44
  12138. æD FUNCTION GetAuxCtl(theControl: ControlHandle;VAR acHndl: AuxCtlHandle): BOOLEAN;
  12139.     INLINE $AA44;
  12140. æDT myVariable := GetAuxCtl(theControl,acHndl);
  12141. æMM
  12142. æRI V-222
  12143. æC 
  12144. [Macintosh II]
  12145.  
  12146. The GetAuxCtl function returns a handle to a control’s AuxCtlRec:
  12147.  
  12148.   •  If the given control has its own color table, the function returns TRUE.
  12149.   •  If the control used the default color set, the function returns FALSE.
  12150.   •  If the control asked to receive the default color set (theControl = NIL),
  12151.      then the function returns TRUE.
  12152.  
  12153. æKY GetCVariant
  12154. æFp Controls.p
  12155. æT FUNCTION
  12156. æTN A809
  12157. æD FUNCTION GetCVariant(theControl: ControlHandle): INTEGER;
  12158.     INLINE $A809;
  12159. æDT myVariable := GetCVariant(theControl);
  12160. æRI V-222
  12161. æC 
  12162. [Macintosh Plus, Macintosh SE, and Macintosh II]
  12163.  
  12164. The GetVariant function returns the variant control value for the control described
  12165. by theControl. This value was formerly stored in the high four bits of the control
  12166. defproc handle; for future compatibility, use the GetCVariant routine to access this
  12167. value.
  12168.  
  12169.  
  12170. æKY CRMSerialDevices.p
  12171. æKL 
  12172. CRMIconHandle
  12173. CRMIconPtr
  12174. CRMIconRecord
  12175. crmSerialDevice
  12176. CRMSerialPtr
  12177. CRMSerialRecord
  12178. curCRMSerRecVers
  12179.  
  12180. æKY crmSerialDevice
  12181. æFp CRMSerialDevices.p
  12182. æT CONST
  12183. æD crmSerialDevice = 1;
  12184. æC 
  12185.  
  12186. æKY curCRMSerRecVers
  12187. æFp CRMSerialDevices.p
  12188. æT CONST
  12189. æD curCRMSerRecVers = 1;
  12190. æC 
  12191.  
  12192. æKY CRMIconRecord
  12193. CRMIconPtr
  12194. CRMIconHandle
  12195. æFp CRMSerialDevices.p
  12196. æT RECORD
  12197. æD CRMIconPtr = ^CRMIconRecord;
  12198. CRMIconHandle = ^CRMIconPtr;
  12199. CRMIconRecord = RECORD
  12200.     oldIcon: ARRAY [0..31] OF LONGINT; { ICN#    }
  12201.     oldMask: ARRAY [0..31] OF LONGINT;
  12202.     theSuite: Handle; { Handle to an IconSuite    }
  12203.     reserved: LONGINT;
  12204.     END;
  12205. æC 
  12206.  
  12207. æKY CRMSerialRecord
  12208. CRMSerialPtr
  12209. æFp CRMSerialDevices.p
  12210. æT RECORD
  12211. æD CRMSerialPtr = ^CRMSerialRecord;
  12212. CRMSerialRecord = RECORD
  12213.     version: INTEGER;
  12214.     inputDriverName: StringHandle;
  12215.     outputDriverName: StringHandle;
  12216.     name: StringHandle;
  12217.     deviceIcon: CRMIconHandle;
  12218.     ratedSpeed: LONGINT;
  12219.     maxSpeed: LONGINT;
  12220.     reserved: LONGINT;
  12221.     END;
  12222. æC 
  12223.  
  12224.  
  12225. æKY CTBUtilities.p
  12226. æKL AppendDITL
  12227. CountDITL
  12228. CTBGetCTBVersion
  12229. CustomNBP
  12230. InitCTBUtilities
  12231. NuLookup
  12232. NuPLookup
  12233. ShortenDITL
  12234. StandardNBP
  12235.  
  12236. appendDITLBottom
  12237. appendDITLRight
  12238. chooseAborted
  12239. chooseCancel
  12240. chooseDisaster
  12241. chooseFailed
  12242. chooseOKMajor
  12243. chooseOKMinor
  12244. CTBUErr
  12245. ctbuGenericError
  12246. ctbuNoErr
  12247. curCTBUVersion
  12248. DITLMethod
  12249. hookCancel
  12250. hookEject
  12251. hookItemList
  12252. hookItemRefresh
  12253. hookKeyBase
  12254. hookLine
  12255. hookNull
  12256. hookOK
  12257. hookOutline
  12258. hookPostflight
  12259. hookPreflight
  12260. hookReserved1
  12261. hookReserved2
  12262. hookReserved3
  12263. hookReserved4
  12264. hookTitle
  12265. hookVersion
  12266. hookZoneList
  12267. hookZoneRefresh
  12268. hookZoneTitle
  12269. nameDisable
  12270. NameFilterProcPtr
  12271. nameInclude
  12272. nameReject
  12273. NBPReply
  12274. nlCancel
  12275. nlEject
  12276. nlOk
  12277. NLType
  12278. NLTypeEntry
  12279. overlayDITL
  12280. zoneDisable
  12281. ZoneFilterProcPtr
  12282. zoneInclude
  12283. zoneReject
  12284.  
  12285. æKY curCTBUVersion
  12286. æFp CTBUtilities.p
  12287. æT CONST
  12288. æD curCTBUVersion = 2;
  12289. æC 
  12290.  
  12291. æKY ctbuGenericError
  12292. æFp CTBUtilities.p
  12293. æT CONST
  12294. æD ctbuGenericError = -1;
  12295. æC 
  12296.  
  12297. æKY ctbuNoErr
  12298. æFp CTBUtilities.p
  12299. æT CONST
  12300. æD ctbuNoErr = 0;
  12301. æC 
  12302.  
  12303. æKY overlayDITL
  12304. æFp CTBUtilities.p
  12305. æT CONST
  12306. æD overlayDITL = 0;
  12307. æC 
  12308.  
  12309. æKY appendDITLRight
  12310. æFp CTBUtilities.p
  12311. æT CONST
  12312. æD appendDITLRight = 1;
  12313. æC 
  12314.  
  12315. æKY appendDITLBottom
  12316. æFp CTBUtilities.p
  12317. æT CONST
  12318. æD appendDITLBottom = 2;
  12319. æC 
  12320.  
  12321. æKY chooseDisaster
  12322. æFp CTBUtilities.p
  12323. æT CONST
  12324. æD chooseDisaster = -2;
  12325. æC 
  12326.  
  12327. æKY chooseFailed
  12328. æFp CTBUtilities.p
  12329. æT CONST
  12330. æD chooseFailed = -1;
  12331. æC 
  12332.  
  12333. æKY chooseAborted
  12334. æFp CTBUtilities.p
  12335. æT CONST
  12336. æD chooseAborted = 0;
  12337. æC 
  12338.  
  12339. æKY chooseOKMinor
  12340. æFp CTBUtilities.p
  12341. æT CONST
  12342. æD chooseOKMinor = 1;
  12343. æC 
  12344.  
  12345. æKY chooseOKMajor
  12346. æFp CTBUtilities.p
  12347. æT CONST
  12348. æD chooseOKMajor = 2;
  12349. æC 
  12350.  
  12351. æKY chooseCancel
  12352. æFp CTBUtilities.p
  12353. æT CONST
  12354. æD chooseCancel = 3;
  12355. æC 
  12356.  
  12357. æKY nlOk
  12358. æFp CTBUtilities.p
  12359. æT CONST
  12360. æD nlOk = 0;
  12361. æC 
  12362.  
  12363. æKY nlCancel
  12364. æFp CTBUtilities.p
  12365. æT CONST
  12366. æD nlCancel = 1;
  12367. æC 
  12368.  
  12369. æKY nlEject
  12370. æFp CTBUtilities.p
  12371. æT CONST
  12372. æD nlEject = 2;
  12373. æC 
  12374.  
  12375. æKY nameInclude
  12376. æFp CTBUtilities.p
  12377. æT CONST
  12378. æD nameInclude = 1;
  12379. æC 
  12380.  
  12381. æKY nameDisable
  12382. æFp CTBUtilities.p
  12383. æT CONST
  12384. æD nameDisable = 2;
  12385. æC 
  12386.  
  12387. æKY nameReject
  12388. æFp CTBUtilities.p
  12389. æT CONST
  12390. æD nameReject = 3;
  12391. æC 
  12392.  
  12393. æKY zoneInclude
  12394. æFp CTBUtilities.p
  12395. æT CONST
  12396. æD zoneInclude = 1;
  12397. æC 
  12398.  
  12399. æKY zoneDisable
  12400. æFp CTBUtilities.p
  12401. æT CONST
  12402. æD zoneDisable = 2;
  12403. æC 
  12404.  
  12405. æKY zoneReject
  12406. æFp CTBUtilities.p
  12407. æT CONST
  12408. æD zoneReject = 3;
  12409. æC 
  12410.  
  12411. æKY hookOK
  12412. æFp CTBUtilities.p
  12413. æT CONST
  12414. æD hookOK = 1;
  12415. æC 
  12416.  
  12417. æKY hookCancel
  12418. æFp CTBUtilities.p
  12419. æT CONST
  12420. æD hookCancel = 2;
  12421. æC 
  12422.  
  12423. æKY hookOutline
  12424. æFp CTBUtilities.p
  12425. æT CONST
  12426. æD hookOutline = 3;
  12427. æC 
  12428.  
  12429. æKY hookTitle
  12430. æFp CTBUtilities.p
  12431. æT CONST
  12432. æD hookTitle = 4;
  12433. æC 
  12434.  
  12435. æKY hookItemList
  12436. æFp CTBUtilities.p
  12437. æT CONST
  12438. æD hookItemList = 5;
  12439. æC 
  12440.  
  12441. æKY hookZoneTitle
  12442. æFp CTBUtilities.p
  12443. æT CONST
  12444. æD hookZoneTitle = 6;
  12445. æC 
  12446.  
  12447. æKY hookZoneList
  12448. æFp CTBUtilities.p
  12449. æT CONST
  12450. æD hookZoneList = 7;
  12451. æC 
  12452.  
  12453. æKY hookLine
  12454. æFp CTBUtilities.p
  12455. æT CONST
  12456. æD hookLine = 8;
  12457. æC 
  12458.  
  12459. æKY hookVersion
  12460. æFp CTBUtilities.p
  12461. æT CONST
  12462. æD hookVersion = 9;
  12463. æC 
  12464.  
  12465. æKY hookReserved1
  12466. æFp CTBUtilities.p
  12467. æT CONST
  12468. æD hookReserved1 = 10;
  12469. æC 
  12470.  
  12471. æKY hookReserved2
  12472. æFp CTBUtilities.p
  12473. æT CONST
  12474. æD hookReserved2 = 11;
  12475. æC 
  12476.  
  12477. æKY hookReserved3
  12478. æFp CTBUtilities.p
  12479. æT CONST
  12480. æD hookReserved3 = 12;
  12481. æC 
  12482.  
  12483. æKY hookReserved4
  12484. æFp CTBUtilities.p
  12485. æT CONST
  12486. æD hookReserved4 = 13;
  12487. æC 
  12488.  
  12489. æKY hookNull
  12490. æFp CTBUtilities.p
  12491. æT CONST
  12492. æD hookNull = 100;
  12493. æC 
  12494.  
  12495. æKY hookItemRefresh
  12496. æFp CTBUtilities.p
  12497. æT CONST
  12498. æD hookItemRefresh = 101;
  12499. æC 
  12500.  
  12501. æKY hookZoneRefresh
  12502. æFp CTBUtilities.p
  12503. æT CONST
  12504. æD hookZoneRefresh = 102;
  12505. æC 
  12506.  
  12507. æKY hookEject
  12508. æFp CTBUtilities.p
  12509. æT CONST
  12510. æD hookEject = 103;
  12511. æC 
  12512.  
  12513. æKY hookPreflight
  12514. æFp CTBUtilities.p
  12515. æT CONST
  12516. æD hookPreflight = 104;
  12517. æC 
  12518.  
  12519. æKY hookPostflight
  12520. æFp CTBUtilities.p
  12521. æT CONST
  12522. æD hookPostflight = 105;
  12523. æC 
  12524.  
  12525. æKY hookKeyBase
  12526. æFp CTBUtilities.p
  12527. æT CONST
  12528. æD hookKeyBase = 1000;
  12529. æC 
  12530.  
  12531. æKY CTBUErr
  12532. æFp CTBUtilities.p
  12533. æT TYPE
  12534. æD CTBUErr = OSErr;
  12535. æC 
  12536.  
  12537. æKY DITLMethod
  12538. æFp CTBUtilities.p
  12539. æT TYPE
  12540. æD DITLMethod = INTEGER;
  12541. æC 
  12542.  
  12543. æKY NLTypeEntry
  12544. æFp CTBUtilities.p
  12545. æT RECORD
  12546. æD NLTypeEntry = RECORD
  12547.     hIcon: Handle;
  12548.     typeStr: Str32;
  12549.     END;
  12550. æC 
  12551.  
  12552. æKY NLType
  12553. æFp CTBUtilities.p
  12554. æT TYPE
  12555. æD NLType = ARRAY [0..3] OF NLTypeEntry;
  12556. æC 
  12557.  
  12558. æKY NBPReply
  12559. æFp CTBUtilities.p
  12560. æT RECORD
  12561. æD NBPReply = RECORD
  12562.     theEntity: EntityName;
  12563.     theAddr: AddrBlock;
  12564.     END;
  12565. æC 
  12566.  
  12567. æKY NameFilterProcPtr
  12568. æFp CTBUtilities.p
  12569. æT TYPE
  12570. æD NameFilterProcPtr = ProcPtr;
  12571. æC 
  12572.  
  12573. æKY ZoneFilterProcPtr
  12574. æFp CTBUtilities.p
  12575. æT TYPE
  12576. æD ZoneFilterProcPtr = ProcPtr;
  12577. æC 
  12578.  
  12579. æKY InitCTBUtilities
  12580. æFp CTBUtilities.p
  12581. æT FUNCTION
  12582. æD FUNCTION InitCTBUtilities: CTBUErr;
  12583. æDT myVariable := InitCTBUtilities;
  12584. æC 
  12585.  
  12586. æKY CTBGetCTBVersion
  12587. æFp CTBUtilities.p
  12588. æT FUNCTION
  12589. æD FUNCTION CTBGetCTBVersion: INTEGER;
  12590. æDT myVariable := CTBGetCTBVersion;
  12591. æC 
  12592.  
  12593. æKY AppendDITL
  12594. æFp CTBUtilities.p
  12595. æT PROCEDURE
  12596. æD PROCEDURE AppendDITL(theDialog: DialogPtr;theHandle: Handle;method: DITLMethod);
  12597. æDT AppendDITL(theDialog,theDITL,method);
  12598. æC 
  12599.  
  12600. æKY CountDITL
  12601. æFp CTBUtilities.p
  12602. æT FUNCTION
  12603. æD FUNCTION CountDITL(theDialog: DialogPtr): INTEGER;
  12604. æDT myVariable := CountDITL(theDialog);
  12605. æC 
  12606.  
  12607. æKY ShortenDITL
  12608. æFp CTBUtilities.p
  12609. æT PROCEDURE
  12610. æD PROCEDURE ShortenDITL(theDialog: DialogPtr;numberItems: INTEGER);
  12611. æDT ShortenDITL(theDialog,numberItems);
  12612. æC 
  12613.  
  12614. æKY NuLookup
  12615. æFp CTBUtilities.p
  12616. æT FUNCTION
  12617. æD FUNCTION NuLookup(where: Point;prompt: Str255;numTypes: INTEGER;typeList: NLType;
  12618.     nameFilter: NameFilterProcPtr;zoneFilter: ZoneFilterProcPtr;hookProc: DlgHookProcPtr;
  12619.     VAR theReply: NBPReply): INTEGER;
  12620. æDT myVariable := NuLookup(where,prompt,numTypes,typeList,nameFilter,zoneFilter,hookProc,theReply);
  12621. æC 
  12622.  
  12623. æKY NuPLookup
  12624. æFp CTBUtilities.p
  12625. æT FUNCTION
  12626. æD FUNCTION NuPLookup(where: Point;prompt: Str255;numTypes: INTEGER;typeList: NLType;
  12627.     nameFilter: NameFilterProcPtr;zoneFilter: ZoneFilterProcPtr;hookProc: DlgHookProcPtr;
  12628.     userData: LONGINT;dialogID: INTEGER;filterProc: ModalFilterProcPtr;VAR theReply: NBPReply): INTEGER;
  12629. æDT myVariable := NuPLookup(where,prompt,numTypes,typeList,nameFilter,zoneFilter,hookProc,userData,dialogID,filterProc,theReply);
  12630. æC 
  12631.  
  12632. æKY StandardNBP
  12633. æFp CTBUtilities.p
  12634. æT FUNCTION
  12635. æD FUNCTION StandardNBP(where: Point;prompt: Str255;numTypes: INTEGER;typeList: NLType;
  12636.     nameFilter: NameFilterProcPtr;zoneFilter: ZoneFilterProcPtr;hookProc: DlgHookProcPtr;
  12637.     VAR theReply: NBPReply): INTEGER;
  12638. æDT myVariable := StandardNBP(where,prompt,numTypes,typeList,nameFilter,zoneFilter,hookProc,theReply);
  12639. æC 
  12640.  
  12641. æKY CustomNBP
  12642. æFp CTBUtilities.p
  12643. æT FUNCTION
  12644. æD FUNCTION CustomNBP(where: Point;prompt: Str255;numTypes: INTEGER;typeList: NLType;
  12645.     nameFilter: NameFilterProcPtr;zoneFilter: ZoneFilterProcPtr;hookProc: DlgHookProcPtr;
  12646.     userData: LONGINT;dialogID: INTEGER;filterProc: ModalFilterProcPtr;VAR theReply: NBPReply): INTEGER;
  12647. æDT myVariable := CustomNBP(where,prompt,numTypes,typeList,nameFilter,zoneFilter,hookProc,userData,dialogID,filterProc,theReply);
  12648. æC 
  12649.  
  12650.  
  12651. æKY CursorCtl.p
  12652. æKL Hide_Cursor
  12653. InitCursorCtl
  12654. RotateCursor
  12655. Show_Cursor
  12656. SpinCursor
  12657.  
  12658. Acur
  12659. acurHandle
  12660. acurPtr
  12661. ARROW_CURSOR
  12662. CROSS_CURSOR
  12663. Cursors
  12664. HIDDEN_CURSOR
  12665. I_BEAM_CURSOR
  12666. PLUS_CURSOR
  12667. WATCH_CURSOR
  12668.  
  12669.  
  12670. æKY Acur
  12671. acurPtr
  12672. acurHandle
  12673. æFp CursorCtl.p
  12674. æT TYPE
  12675. æD acurPtr = ^Acur;
  12676. acurHandle = ^acurPtr;
  12677. Acur = RECORD
  12678.    n: INTEGER;         {Number of cursors ("frames of film")}
  12679.    index: INTEGER;     { Next frame to show <for internal use>}
  12680.    frame1: INTEGER;    {'CURS' resource id for frame #1}
  12681.    fill1: INTEGER;     {<for internal use>}
  12682.    frame2: INTEGER;    {'CURS' resource id for frame #2}
  12683.    fill2: INTEGER;     {<for internal use>}
  12684.    frameN: INTEGER;    {'CURS' resource id for frame #N}
  12685.    fillN: INTEGER;     {<for internal use>}
  12686.    END;
  12687.  
  12688. æKY Cursors
  12689. HIDDEN_CURSOR
  12690. I_BEAM_CURSOR
  12691. CROSS_CURSOR
  12692. PLUS_CURSOR
  12693. WATCH_CURSOR
  12694. ARROW_CURSOR
  12695. æFp CursorCtl.p
  12696. æD Cursors = (HIDDEN_CURSOR,I_BEAM_CURSOR,CROSS_CURSOR,PLUS_CURSOR,WATCH_CURSOR,
  12697. ARROW_CURSOR);
  12698.  
  12699. æKY Hide_Cursor
  12700. æFp CursorCtl.p
  12701. æT PROCEDURE
  12702. æD PROCEDURE Hide_Cursor;
  12703. æDT Hide_Cursor;
  12704. æC 
  12705. { Hide the cursor if it is showing.This is this unit's call to the Mac
  12706. HideCursor routine.Thus the Mac cursor level is decremented by one when this
  12707. routine is called.
  12708.  }
  12709.  
  12710. æKY InitCursorCtl
  12711. æFp CursorCtl.p
  12712. æT PROCEDURE
  12713. æD PROCEDURE InitCursorCtl(newCursors: UNIV acurHandle);
  12714. æDT InitCursorCtl(newCursors);
  12715. æC 
  12716. { Initialize the CursorCtl unit. This should be called once prior to calling
  12717. RotateCursor or SpinCursor. It need not be called if only Hide_Cursor or
  12718. Show_Cursor are used. If NewCursors is NULL, InitCursorCtl loads in the
  12719. 'acur' resource and the 'CURS' resources specified by the 'acur' resource
  12720. ids.  If any of the resources cannot be loaded, the cursor will not be
  12721. changed.
  12722.  
  12723. The 'acur' resource is assumed to either be in the currently running tool or
  12724. application, or the MPW Shell for a tool, or in the System file.  The 'acur'
  12725. resource id must be 0 for a tool or application, 1 for the Shell, and 2 for
  12726. the System file.
  12727.  
  12728. If NewCursors is not NULL, it is ASSUMED to be a handle to an 'acur' formatted
  12729. resource designated by the caller and it will be used instead of doing a
  12730. GetResource on 'acur'. Note, if RotateCursor or SpinCursor are called without
  12731. calling InitCursorCtl, then RotateCursor and SpinCursor will do the call for
  12732. the user the first time it is called.  However, the possible disadvantage of
  12733. using this technique is that the resource memory allocated may have
  12734. undesirable affect (fragmentation?) on the application. Using InitCursorCtl
  12735. has the advantage of causing the allocation at a specific time determined by
  12736. the user.
  12737.  
  12738. Caution: InitCursorCtl MODIFIES the 'acur' resource in memory.  Specifically,
  12739. it changes each FrameN/fillN integer pair to a handle to the corresponding
  12740. 'CURS' resource also in memory.  Thus if NewCursors is not NULL when
  12741. InitCursorCtl is called, the caller must guarantee NewCursors always points to
  12742. a "fresh" copy of an 'acur' resource.  This need only be of concern to a
  12743. caller who wants to repeatly use multiple 'acur' resources during execution of
  12744. their programs.
  12745.  }
  12746.  
  12747. æKY RotateCursor
  12748. æFp CursorCtl.p
  12749. æT PROCEDURE
  12750. æD PROCEDURE RotateCursor(counter: LONGINT);
  12751. æDT RotateCursor(counter);
  12752. æC 
  12753. { RotateCursor is called to rotate the "I am active" "beach ball" cursor, or to
  12754. animate whatever sequence of cursors set up by InitCursorCtl. The next cursor
  12755. ("frame") is used when Counter % 32 = 0 (Counter is some kind of incrementing
  12756. or decrementing index maintained by the caller). A positive counter sequences
  12757. forward through the cursors (e.g., it rotates the "beach ball" cursor
  12758. clockwise), and a negative cursor sequences through the cursors backwards
  12759. (e.g., it rotates the "beach ball" cursor counterclockwise).  Note,
  12760. RotateCursor just does a Mac SetCursor call for the proper cursor picture.
  12761.   It is assumed the cursor is visible from a prior Show_Cursor call.
  12762.  }
  12763.  
  12764. æKY Show_Cursor
  12765. æFp CursorCtl.p
  12766. æT PROCEDURE
  12767. æD PROCEDURE Show_Cursor(cursorKind: Cursors);
  12768. æDT Show_Cursor(cursorKind);
  12769. æC 
  12770. { Increment the cursor level, which may have been decremented by Hide_Cursor,
  12771. and display the specified cursor if the level becomes 0 (it is never
  12772. incremented beyond 0).The CursorKind is the kind of cursor to show.  It is
  12773. one of the values HIDDEN_CURSOR, I_BEAM_CURSOR, CROSS_CURSOR, PLUS_CURSOR,
  12774. WATCH_CURSOR, and ARROW_CURSOR. Except for HIDDEN_CURSOR, a Mac SetCursor is 
  12775. done for the specified cursor prior to doing a ShowCursor.  HIDDEN_CURSOR just
  12776. causes a ShowCursor call.  Note, ARROW_CURSOR will only work correctly if
  12777. there is already a grafPort set up pointed to by 0(A5).
  12778.  }
  12779.  
  12780. æKY SpinCursor
  12781. æFp CursorCtl.p
  12782. æT PROCEDURE
  12783. æD PROCEDURE SpinCursor(increment: INTEGER);
  12784. æDT SpinCursor(increment);
  12785. æC 
  12786. { SpinCursor is similar in function to RotateCursor, except that instead of
  12787. passing a counter, an Increment is passed an added to a counter maintained
  12788. here.  SpinCursor is provided for those users who do not happen to have a
  12789. convenient counter handy but still want to use the spinning "beach ball"
  12790. cursor, or any sequence of cursors set up by InitCursorCtl.  A positive 
  12791. increment sequences forward through the curos (rotating the "beach ball"
  12792. cursor clockwise), and a negative increment sequences backward through the
  12793. cursors (rotating the "beach ball" cursor counter-clockwise).  A zero value
  12794. for the increment resets the counter to zero.  Note, it is the increment, and
  12795. not the value of the counter that determines the sequencing direction of the
  12796. cursor (and hence the spin direction of the "beach ball" cursor).
  12797.  }
  12798.  
  12799.  
  12800. æKY DatabaseAccess.p
  12801. æKL DBBreak
  12802. DBDisposeQuery
  12803. DBEnd
  12804. DBExec
  12805. DBGetConnInfo
  12806. DBGetErr
  12807. DBGetItem
  12808. DBGetNewQuery
  12809. DBGetQueryResults
  12810. DBGetResultHandler
  12811. DBGetSessionNum
  12812. DBInit
  12813. DBInstallResultHandler
  12814. DBKill
  12815. DBRemoveResultHandler
  12816. DBResultsToText
  12817. DBSend
  12818. DBSendItem
  12819. DBStartQuery
  12820. DBState
  12821. DBUnGetItem
  12822. InitDBPack
  12823.  
  12824. ColInfoArray
  12825. ColInfoHandle
  12826. ColInfoPtr
  12827. ColTypesArray
  12828. ColTypesHandle
  12829. ColTypesPtr
  12830. DBAsyncParamBlockRec
  12831. DBAsyncParmBlkPtr
  12832. DBColInfoRecord
  12833. DBType
  12834. kDBAboutToInit
  12835. kDBExecComplete
  12836. kDBGetItemComplete
  12837. kDBGetQueryResultsComplete
  12838. kDBInitComplete
  12839. kDBLastColFlag
  12840. kDBNullFlag
  12841. kDBSendComplete
  12842. kDBStartQueryComplete
  12843. kDBUpdateWind
  12844. kDBWaitForever
  12845. QueryArray
  12846. QueryHandle
  12847. QueryListHandle
  12848. QueryListPtr
  12849. QueryPtr
  12850. QueryRecord
  12851. rcDBAsyncNotSupp
  12852. rcDBBadAsyncPB
  12853. rcDBBadDDEV
  12854. rcDBBadSessID
  12855. rcDBBadSessNum
  12856. rcDBBadType
  12857. rcDBBreak
  12858. rcDBError
  12859. rcDBExec
  12860. rcDBNoHandler
  12861. rcDBNull
  12862. rcDBPackNotInited
  12863. rcDBValue
  12864. rcDBWrongVersion
  12865. ResListArray
  12866. ResListElem
  12867. ResListHandle
  12868. ResListPtr
  12869. ResultsRecord
  12870. typeAnyType
  12871. typeColBreak
  12872. typeDate
  12873. typeDecimal
  12874. typeDiscard
  12875. typeLBin
  12876. typeLChar
  12877. typeMoney
  12878. typeNone
  12879. typeRowBreak
  12880. typeTime
  12881. typeTimeStamp
  12882. typeUnknown
  12883. typeVBin
  12884. typeVChar
  12885.  
  12886. æKY rcDBNull
  12887. æFp DatabaseAccess.p
  12888. æT CONST
  12889. æD rcDBNull = -800;
  12890. æC 
  12891.  
  12892. æKY rcDBValue
  12893. æFp DatabaseAccess.p
  12894. æT CONST
  12895. æD rcDBValue = -801;
  12896. æC 
  12897.  
  12898. æKY rcDBError
  12899. æFp DatabaseAccess.p
  12900. æT CONST
  12901. æD rcDBError = -802;
  12902. æC 
  12903.  
  12904. æKY rcDBBadType
  12905. æFp DatabaseAccess.p
  12906. æT CONST
  12907. æD rcDBBadType = -803;
  12908. æC 
  12909.  
  12910. æKY rcDBBreak
  12911. æFp DatabaseAccess.p
  12912. æT CONST
  12913. æD rcDBBreak = -804;
  12914. æC 
  12915.  
  12916. æKY rcDBExec
  12917. æFp DatabaseAccess.p
  12918. æT CONST
  12919. æD rcDBExec = -805;
  12920. æC 
  12921.  
  12922. æKY rcDBBadSessID
  12923. æFp DatabaseAccess.p
  12924. æT CONST
  12925. æD rcDBBadSessID = -806;
  12926. æC 
  12927.  
  12928. æKY rcDBBadSessNum
  12929. æFp DatabaseAccess.p
  12930. æT CONST
  12931. æD rcDBBadSessNum = -807; { bad session number for DBGetConnInfo }
  12932. æC 
  12933.  
  12934. æKY rcDBBadDDEV
  12935. æFp DatabaseAccess.p
  12936. æT CONST
  12937. æD rcDBBadDDEV = -808; { bad ddev specified on DBInit }
  12938. æC 
  12939.  
  12940. æKY rcDBAsyncNotSupp
  12941. æFp DatabaseAccess.p
  12942. æT CONST
  12943. æD rcDBAsyncNotSupp = -809; { ddev does not support async calls }
  12944. æC 
  12945.  
  12946. æKY rcDBBadAsyncPB
  12947. æFp DatabaseAccess.p
  12948. æT CONST
  12949. æD rcDBBadAsyncPB = -810; { tried to kill a bad pb }
  12950. æC 
  12951.  
  12952. æKY rcDBNoHandler
  12953. æFp DatabaseAccess.p
  12954. æT CONST
  12955. æD rcDBNoHandler = -811; { no app handler for specified data type }
  12956. æC 
  12957.  
  12958. æKY rcDBWrongVersion
  12959. æFp DatabaseAccess.p
  12960. æT CONST
  12961. æD rcDBWrongVersion = -812; { incompatible versions }
  12962. æC 
  12963.  
  12964. æKY rcDBPackNotInited
  12965. æFp DatabaseAccess.p
  12966. æT CONST
  12967. æD rcDBPackNotInited = -813; { attempt to call other routine before InitDBPack }
  12968. æC 
  12969.  
  12970. æKY kDBUpdateWind
  12971. æFp DatabaseAccess.p
  12972. æT CONST
  12973. æD kDBUpdateWind = 0;
  12974. æC 
  12975.  
  12976. æKY kDBAboutToInit
  12977. æFp DatabaseAccess.p
  12978. æT CONST
  12979. æD kDBAboutToInit = 1;
  12980. æC 
  12981.  
  12982. æKY kDBInitComplete
  12983. æFp DatabaseAccess.p
  12984. æT CONST
  12985. æD kDBInitComplete = 2;
  12986. æC 
  12987.  
  12988. æKY kDBSendComplete
  12989. æFp DatabaseAccess.p
  12990. æT CONST
  12991. æD kDBSendComplete = 3;
  12992. æC 
  12993.  
  12994. æKY kDBExecComplete
  12995. æFp DatabaseAccess.p
  12996. æT CONST
  12997. æD kDBExecComplete = 4;
  12998. æC 
  12999.  
  13000. æKY kDBStartQueryComplete
  13001. æFp DatabaseAccess.p
  13002. æT CONST
  13003. æD kDBStartQueryComplete = 5;
  13004. æC 
  13005.  
  13006. æKY kDBGetItemComplete
  13007. æFp DatabaseAccess.p
  13008. æT CONST
  13009. æD kDBGetItemComplete = 6;
  13010. æC 
  13011.  
  13012. æKY kDBGetQueryResultsComplete
  13013. æFp DatabaseAccess.p
  13014. æT CONST
  13015. æD kDBGetQueryResultsComplete = 7;
  13016. æC 
  13017.  
  13018. æKY typeNone
  13019. æFp DatabaseAccess.p
  13020. æT CONST
  13021. æD typeNone = 'none';
  13022. æC 
  13023.  
  13024. æKY typeDate
  13025. æFp DatabaseAccess.p
  13026. æT CONST
  13027. æD typeDate = 'date';
  13028. æC 
  13029.  
  13030. æKY typeTime
  13031. æFp DatabaseAccess.p
  13032. æT CONST
  13033. æD typeTime = 'time';
  13034. æC 
  13035.  
  13036. æKY typeTimeStamp
  13037. æFp DatabaseAccess.p
  13038. æT CONST
  13039. æD typeTimeStamp = 'tims';
  13040. æC 
  13041.  
  13042. æKY typeDecimal
  13043. æFp DatabaseAccess.p
  13044. æT CONST
  13045. æD typeDecimal = 'deci';
  13046. æC 
  13047.  
  13048. æKY typeMoney
  13049. æFp DatabaseAccess.p
  13050. æT CONST
  13051. æD typeMoney = 'mone';
  13052. æC 
  13053.  
  13054. æKY typeVChar
  13055. æFp DatabaseAccess.p
  13056. æT CONST
  13057. æD typeVChar = 'vcha';
  13058. æC 
  13059.  
  13060. æKY typeVBin
  13061. æFp DatabaseAccess.p
  13062. æT CONST
  13063. æD typeVBin = 'vbin';
  13064. æC 
  13065.  
  13066. æKY typeLChar
  13067. æFp DatabaseAccess.p
  13068. æT CONST
  13069. æD typeLChar = 'lcha';
  13070. æC 
  13071.  
  13072. æKY typeLBin
  13073. æFp DatabaseAccess.p
  13074. æT CONST
  13075. æD typeLBin = 'lbin';
  13076. æC 
  13077.  
  13078. æKY typeDiscard
  13079. æFp DatabaseAccess.p
  13080. æT CONST
  13081. æD typeDiscard = 'disc';
  13082. æC 
  13083.  
  13084. æKY typeUnknown
  13085. æFp DatabaseAccess.p
  13086. æT CONST
  13087. æD typeUnknown = 'unkn';
  13088. æC 
  13089.  
  13090. æKY typeColBreak
  13091. æFp DatabaseAccess.p
  13092. æT CONST
  13093. æD typeColBreak = 'colb';
  13094. æC 
  13095.  
  13096. æKY typeRowBreak
  13097. æFp DatabaseAccess.p
  13098. æT CONST
  13099. æD typeRowBreak = 'rowb';
  13100. æC 
  13101.  
  13102. æKY typeAnyType
  13103. æFp DatabaseAccess.p
  13104. æT CONST
  13105. æD typeAnyType = 0;
  13106. æC 
  13107.  
  13108. æKY kDBWaitForever
  13109. æFp DatabaseAccess.p
  13110. æT CONST
  13111. æD kDBWaitForever = -1;
  13112. æC 
  13113.  
  13114. æKY kDBLastColFlag
  13115. æFp DatabaseAccess.p
  13116. æT CONST
  13117. æD kDBLastColFlag = $0001;
  13118. æC 
  13119.  
  13120. æKY kDBNullFlag
  13121. æFp DatabaseAccess.p
  13122. æT CONST
  13123. æD kDBNullFlag = $0004;
  13124. æC 
  13125.  
  13126. æKY DBType
  13127. æFp DatabaseAccess.p
  13128. æT TYPE
  13129. æD DBType = OSType; 
  13130. æC 
  13131.  
  13132. æKY DBAsyncParamBlockRec
  13133. DBAsyncParmBlkPtr
  13134. æFp DatabaseAccess.p
  13135. æT RECORD
  13136. æD DBAsyncParmBlkPtr = ^DBAsyncParamBlockRec;
  13137. DBAsyncParamBlockRec = RECORD
  13138.     completionProc: ProcPtr; { pointer to completion routine }
  13139.     result: OSErr; { result of call }
  13140.     userRef: LONGINT; { for application's use }
  13141.     ddevRef: LONGINT; { for ddev's use }
  13142.     reserved: LONGINT; { for internal use }
  13143.     END;
  13144. æC 
  13145.  
  13146. æKY ResListElem
  13147. æFp DatabaseAccess.p
  13148. æT RECORD
  13149. æD ResListElem = RECORD
  13150.     theType: ResType; { resource type }
  13151.     id: INTEGER; { resource id }
  13152.     END;
  13153. æC 
  13154.  
  13155. æKY ResListArray
  13156. ResListPtr
  13157. ResListHandle
  13158. æFp DatabaseAccess.p
  13159. æT RECORD
  13160. æD ResListPtr = ^ResListArray;
  13161. ResListHandle = ^ResListPtr;
  13162.  
  13163. ResListArray = ARRAY [0..255] OF ResListElem;
  13164. æC 
  13165.  
  13166. æKY QueryArray
  13167. QueryListPtr
  13168. QueryListHandle
  13169. æFp DatabaseAccess.p
  13170. æT RECORD
  13171. æD QueryListPtr = ^QueryArray;
  13172. QueryListHandle = ^QueryListPtr;
  13173.  
  13174. QueryArray = ARRAY [0..255] OF Handle;
  13175. æC 
  13176.  
  13177. æKY QueryRecord
  13178. QueryPtr
  13179. QueryHandle
  13180. æFp DatabaseAccess.p
  13181. æT RECORD
  13182. æD QueryPtr = ^QueryRecord;
  13183. QueryHandle = ^QueryPtr;
  13184. QueryRecord = RECORD
  13185.     version: INTEGER; { version }
  13186.     id: INTEGER; { id of 'qrsc' this came from }
  13187.     queryProc: Handle; { handle to query def proc }
  13188.     ddevName: Str63; { ddev name }
  13189.     host: Str255; { host name }
  13190.     user: Str255; { user name }
  13191.     password: Str255; { password }
  13192.     connStr: Str255; { connection string }
  13193.     currQuery: INTEGER; { index of current query }
  13194.     numQueries: INTEGER; { number of queries in list }
  13195.     queryList: QueryListHandle; { handle to array of handles to text }
  13196.     numRes: INTEGER; { number of resources in list }
  13197.     resList: ResListHandle; { handle to array of resource list elements }
  13198.     dataHandle: Handle; { for use by query def proc }
  13199.     refCon: LONGINT; { for use by application }
  13200.     END;
  13201. æC 
  13202.  
  13203. æKY ColTypesArray
  13204. ColTypesPtr
  13205. ColTypesHandle
  13206. æFp DatabaseAccess.p
  13207. æT RECORD
  13208. æD ColTypesPtr = ^ColTypesArray;
  13209. ColTypesHandle = ^ColTypesPtr;
  13210.  
  13211. ColTypesArray = ARRAY [0..255] OF DBType;
  13212. æC 
  13213.  
  13214. æKY DBColInfoRecord
  13215. æFp DatabaseAccess.p
  13216. æT RECORD
  13217. æD DBColInfoRecord = RECORD
  13218.     len: INTEGER;
  13219.     places: INTEGER;
  13220.     flags: INTEGER;
  13221.     END;
  13222. æC 
  13223.  
  13224. æKY ColInfoArray
  13225. ColInfoPtr
  13226. ColInfoHandle
  13227. æFp DatabaseAccess.p
  13228. æT RECORD
  13229. æD ColInfoPtr = ^ColInfoArray;
  13230. ColInfoHandle = ^ColInfoPtr;
  13231.  
  13232. ColInfoArray = ARRAY [0..255] OF DBColInfoRecord;
  13233. æC 
  13234.  
  13235. æKY ResultsRecord
  13236. æFp DatabaseAccess.p
  13237. æT RECORD
  13238. æD ResultsRecord = RECORD
  13239.     numRows: INTEGER; { number of rows in result }
  13240.     numCols: INTEGER; { number of columns per row }
  13241.     colTypes: ColTypesHandle; { data type array }
  13242.     colData: Handle; { actual results }
  13243.     colInfo: ColInfoHandle; { DBColInfoRecord array }
  13244.     END;
  13245. æC 
  13246.  
  13247. æKY InitDBPack
  13248. æFp DatabaseAccess.p
  13249. æT FUNCTION
  13250. æTN A82F
  13251. æD FUNCTION InitDBPack: OSErr;
  13252.     INLINE $3F3C,$0004,$303C,$0100,$A82F;
  13253. æDT myVariable := InitDBPack;
  13254. æC 
  13255.  
  13256. æKY DBInit
  13257. æFp DatabaseAccess.p
  13258. æT FUNCTION
  13259. æTN A82F
  13260. æD FUNCTION DBInit(VAR sessID: LONGINT;ddevName: Str63;host: Str255;user: Str255;
  13261.     passwd: Str255;connStr: Str255;asyncPB: DBAsyncParmBlkPtr): OSErr;
  13262.     INLINE $303C,$0E02,$A82F;
  13263. æDT myVariable := DBInit(sessID,ddevName,host,user,passwd,connStr,asyncPB);
  13264. æC 
  13265.  
  13266. æKY DBEnd
  13267. æFp DatabaseAccess.p
  13268. æT FUNCTION
  13269. æTN A82F
  13270. æD FUNCTION DBEnd(sessID: LONGINT;asyncPB: DBAsyncParmBlkPtr): OSErr;
  13271.     INLINE $303C,$0403,$A82F;
  13272. æDT myVariable := DBEnd(sessID,asyncPB);
  13273. æC 
  13274.  
  13275. æKY DBGetConnInfo
  13276. æFp DatabaseAccess.p
  13277. æT FUNCTION
  13278. æTN A82F
  13279. æD FUNCTION DBGetConnInfo(sessID: LONGINT;sessNum: INTEGER;VAR returnedID: LONGINT;
  13280.     VAR version: LONGINT;VAR ddevName: Str63;VAR host: Str255;VAR user: Str255;
  13281.     VAR network: Str255;VAR connStr: Str255;VAR start: LONGINT;VAR state: OSErr;
  13282.     asyncPB: DBAsyncParmBlkPtr): OSErr;
  13283.     INLINE $303C,$1704,$A82F;
  13284. æDT myVariable := DBGetConnInfo(sessID,sessNum,returnedID,version,ddevName,host,user,network,connStr,start,state,asyncPB);
  13285. æC 
  13286.  
  13287. æKY DBGetSessionNum
  13288. æFp DatabaseAccess.p
  13289. æT FUNCTION
  13290. æTN A82F
  13291. æD FUNCTION DBGetSessionNum(sessID: LONGINT;VAR sessNum: INTEGER;asyncPB: DBAsyncParmBlkPtr): OSErr;
  13292.     INLINE $303C,$0605,$A82F;
  13293. æDT myVariable := DBGetSessionNum(sessID,sessNum,asyncPB);
  13294. æC 
  13295.  
  13296. æKY DBSend
  13297. æFp DatabaseAccess.p
  13298. æT FUNCTION
  13299. æTN A82F
  13300. æD FUNCTION DBSend(sessID: LONGINT;text: Ptr;len: INTEGER;asyncPB: DBAsyncParmBlkPtr): OSErr;
  13301.     INLINE $303C,$0706,$A82F;
  13302. æDT myVariable := DBSend(sessID,text,len,asyncPB);
  13303. æC 
  13304.  
  13305. æKY DBSendItem
  13306. æFp DatabaseAccess.p
  13307. æT FUNCTION
  13308. æTN A82F
  13309. æD FUNCTION DBSendItem(sessID: LONGINT;dataType: DBType;len: INTEGER;places: INTEGER;
  13310.     flags: INTEGER;buffer: Ptr;asyncPB: DBAsyncParmBlkPtr): OSErr;
  13311.     INLINE $303C,$0B07,$A82F;
  13312. æDT myVariable := DBSendItem(sessID,dataType,len,places,flags,buffer,asyncPB);
  13313. æC 
  13314.  
  13315. æKY DBExec
  13316. æFp DatabaseAccess.p
  13317. æT FUNCTION
  13318. æTN A82F
  13319. æD FUNCTION DBExec(sessID: LONGINT;asyncPB: DBAsyncParmBlkPtr): OSErr;
  13320.     INLINE $303C,$0408,$A82F;
  13321. æDT myVariable := DBExec(sessID,asyncPB);
  13322. æC 
  13323.  
  13324. æKY DBState
  13325. æFp DatabaseAccess.p
  13326. æT FUNCTION
  13327. æTN A82F
  13328. æD FUNCTION DBState(sessID: LONGINT;asyncPB: DBAsyncParmBlkPtr): OSErr;
  13329.     INLINE $303C,$0409,$A82F;
  13330. æDT myVariable := DBState(sessID,asyncPB);
  13331. æC 
  13332.  
  13333. æKY DBGetErr
  13334. æFp DatabaseAccess.p
  13335. æT FUNCTION
  13336. æTN A82F
  13337. æD FUNCTION DBGetErr(sessID: LONGINT;VAR err1: LONGINT;VAR err2: LONGINT;VAR item1: Str255;
  13338.     VAR item2: Str255;VAR errorMsg: Str255;asyncPB: DBAsyncParmBlkPtr): OSErr;
  13339.     INLINE $303C,$0E0A,$A82F;
  13340. æDT myVariable := DBGetErr(sessID,err1,err2,item1,item2,errorMsg,asyncPB);
  13341. æC 
  13342.  
  13343. æKY DBBreak
  13344. æFp DatabaseAccess.p
  13345. æT FUNCTION
  13346. æTN A82F
  13347. æD FUNCTION DBBreak(sessID: LONGINT;abort: BOOLEAN;asyncPB: DBAsyncParmBlkPtr): OSErr;
  13348.     INLINE $303C,$050B,$A82F;
  13349. æDT myVariable := DBBreak(sessID,abort,asyncPB);
  13350. æC 
  13351.  
  13352. æKY DBGetItem
  13353. æFp DatabaseAccess.p
  13354. æT FUNCTION
  13355. æTN A82F
  13356. æD FUNCTION DBGetItem(sessID: LONGINT;timeout: LONGINT;VAR dataType: DBType;
  13357.     VAR len: INTEGER;VAR places: INTEGER;VAR flags: INTEGER;buffer: Ptr;asyncPB: DBAsyncParmBlkPtr): OSErr;
  13358.     INLINE $303C,$100C,$A82F;
  13359. æDT myVariable := DBGetItem(sessID,timeout,dataType,len,places,flags,buffer,asyncPB);
  13360. æC 
  13361.  
  13362. æKY DBUnGetItem
  13363. æFp DatabaseAccess.p
  13364. æT FUNCTION
  13365. æTN A82F
  13366. æD FUNCTION DBUnGetItem(sessID: LONGINT;asyncPB: DBAsyncParmBlkPtr): OSErr;
  13367.     INLINE $303C,$040D,$A82F;
  13368. æDT myVariable := DBUnGetItem(sessID,asyncPB);
  13369. æC 
  13370.  
  13371. æKY DBKill
  13372. æFp DatabaseAccess.p
  13373. æT FUNCTION
  13374. æTN A82F
  13375. æD FUNCTION DBKill(asyncPB: DBAsyncParmBlkPtr): OSErr;
  13376.     INLINE $303C,$020E,$A82F;
  13377. æDT myVariable := DBKill(asyncPB);
  13378. æC 
  13379.  
  13380. æKY DBGetNewQuery
  13381. æFp DatabaseAccess.p
  13382. æT FUNCTION
  13383. æTN A82F
  13384. æD FUNCTION DBGetNewQuery(queryID: INTEGER;VAR query: QueryHandle): OSErr;
  13385.     INLINE $303C,$030F,$A82F;
  13386. æDT myVariable := DBGetNewQuery(queryID,query);
  13387. æC 
  13388.  
  13389. æKY DBDisposeQuery
  13390. æFp DatabaseAccess.p
  13391. æT FUNCTION
  13392. æTN A82F
  13393. æD FUNCTION DBDisposeQuery(query: QueryHandle): OSErr;
  13394.     INLINE $303C,$0210,$A82F;
  13395. æDT myVariable := DBDisposeQuery(query);
  13396. æC 
  13397.  
  13398. æKY DBStartQuery
  13399. æFp DatabaseAccess.p
  13400. æT FUNCTION
  13401. æTN A82F
  13402. æD FUNCTION DBStartQuery(VAR sessID: LONGINT;query: QueryHandle;statusProc: ProcPtr;
  13403.     asyncPB: DBAsyncParmBlkPtr): OSErr;
  13404.     INLINE $303C,$0811,$A82F;
  13405. æDT myVariable := DBStartQuery(sessID,query,statusProc,asyncPB);
  13406. æC 
  13407.  
  13408. æKY DBGetQueryResults
  13409. æFp DatabaseAccess.p
  13410. æT FUNCTION
  13411. æTN A82F
  13412. æD FUNCTION DBGetQueryResults(sessID: LONGINT;VAR results: ResultsRecord;timeout: LONGINT;
  13413.     statusProc: ProcPtr;asyncPB: DBAsyncParmBlkPtr): OSErr;
  13414.     INLINE $303C,$0A12,$A82F;
  13415. æDT myVariable := DBGetQueryResults(sessID,results,timeout,statusProc,asyncPB);
  13416. æC 
  13417.  
  13418. æKY DBResultsToText
  13419. æFp DatabaseAccess.p
  13420. æT FUNCTION
  13421. æTN A82F
  13422. æD FUNCTION DBResultsToText(results: ResultsRecord;VAR theText: Handle): OSErr;
  13423.     INLINE $303C,$0413,$A82F;
  13424. æDT myVariable := DBResultsToText(results,theText);
  13425. æC 
  13426.  
  13427. æKY DBInstallResultHandler
  13428. æFp DatabaseAccess.p
  13429. æT FUNCTION
  13430. æTN A82F
  13431. æD FUNCTION DBInstallResultHandler(dataType: DBType;theHandler: ProcPtr;isSysHandler: BOOLEAN): OSErr;
  13432.     INLINE $303C,$0514,$A82F;
  13433. æDT myVariable := DBInstallResultHandler(dataType,theHandler,isSysHandler);
  13434. æC 
  13435.  
  13436. æKY DBRemoveResultHandler
  13437. æFp DatabaseAccess.p
  13438. æT FUNCTION
  13439. æTN A82F
  13440. æD FUNCTION DBRemoveResultHandler(dataType: DBType): OSErr;
  13441.     INLINE $303C,$0215,$A82F;
  13442. æDT myVariable := DBRemoveResultHandler(dataType);
  13443. æC 
  13444.  
  13445. æKY DBGetResultHandler
  13446. æFp DatabaseAccess.p
  13447. æT FUNCTION
  13448. æTN A82F
  13449. æD FUNCTION DBGetResultHandler(dataType: DBType;VAR theHandler: ProcPtr;getSysHandler: BOOLEAN): OSErr;
  13450.     INLINE $303C,$0516,$A82F;
  13451. æDT myVariable := DBGetResultHandler(dataType,theHandler,getSysHandler);
  13452. æC 
  13453.  
  13454.  
  13455. æKY Desk.p
  13456. æKL CloseDeskAcc
  13457. OpenDeskAcc
  13458. SystemClick
  13459. SystemEdit
  13460. SystemEvent
  13461. SystemMenu
  13462. SystemTask
  13463.  
  13464. accClear
  13465. accCopy
  13466. accCursor
  13467. accCut
  13468. accEvent
  13469. accMenu
  13470. accPaste
  13471. accRun
  13472. accUndo
  13473. goodbye
  13474.  
  13475. æKY accEvent
  13476. æFp Desk.p
  13477. æT CONST
  13478. æD accEvent = 64;
  13479. æC 
  13480.  
  13481. æKY accRun
  13482. æFp Desk.p
  13483. æT CONST
  13484. æD accRun = 65;
  13485. æC 
  13486.  
  13487. æKY accCursor
  13488. æFp Desk.p
  13489. æT CONST
  13490. æD accCursor = 66;
  13491. æC 
  13492.  
  13493. æKY accMenu
  13494. æFp Desk.p
  13495. æT CONST
  13496. æD accMenu = 67;
  13497. æC 
  13498.  
  13499. æKY accUndo
  13500. æFp Desk.p
  13501. æT CONST
  13502. æD accUndo = 68;
  13503. æC 
  13504.  
  13505. æKY accCut
  13506. æFp Desk.p
  13507. æT CONST
  13508. æD accCut = 70;
  13509. æC 
  13510.  
  13511. æKY accCopy
  13512. æFp Desk.p
  13513. æT CONST
  13514. æD accCopy = 71;
  13515. æC 
  13516.  
  13517. æKY accPaste
  13518. æFp Desk.p
  13519. æT CONST
  13520. æD accPaste = 72;
  13521. æC 
  13522.  
  13523. æKY accClear
  13524. æFp Desk.p
  13525. æT CONST
  13526. æD accClear = 73;
  13527. æC 
  13528.  
  13529. æKY goodbye
  13530. æFp Desk.p
  13531. æT CONST
  13532. æD goodbye = -1; {goodbye message}
  13533. æC 
  13534.  
  13535. æKY OpenDeskAcc
  13536. æFp Desk.p
  13537. æT FUNCTION
  13538. æTN A9B6
  13539. æD FUNCTION OpenDeskAcc(deskAccName: Str255): INTEGER;
  13540.     INLINE $A9B6;
  13541. æDT myVariable := OpenDeskAcc(deskAccName);
  13542. æMM
  13543. æRI I-440
  13544. æC 
  13545. OpenDeskAcc opens the desk accessory having the given name and displays its window
  13546. (if any) as the active window. The name is the accessory’s resource name, which you
  13547. get from the Apple menu by calling the Menu Manager procedure GetItem. OpenDeskAcc
  13548. calls the Resource Manager to read the desk accessory from the resource file into the
  13549. application heap.
  13550.  
  13551. You should ignore the value returned by OpenDeskAcc. If the desk accessory is successfully
  13552. opened, the function result is its driver reference number. However, if the desk
  13553. accessory can’t be opened, the function result is undefined; the accessory will have
  13554. taken care of informing the user of the problem (such as memory full) and won’t
  13555. display itself.
  13556.  
  13557. Warning:  Early versions of some desk accessories may set the current
  13558.           grafPort to the accessory’s port upon return from OpenDeskAcc.
  13559.           To be safe, you should bracket your call to OpenDeskAcc with
  13560.           calls to the QuickDraw procedures GetPort and SetPort, to save
  13561.           and restore the current port.
  13562.  
  13563. Note:  Programmers concerned about the amount of available memory should
  13564.        be aware that an open desk accessory uses from 1K to 3K bytes of
  13565.        heap space in addition to the space needed for the accessory itself.
  13566.        The desk accessory is responsible for determining whether there is
  13567.        sufficient memory for it to run; this can be done by calling
  13568.        SizeResource followed by ResrvMem.
  13569.  
  13570. æKY CloseDeskAcc
  13571. æFp Desk.p
  13572. æT PROCEDURE
  13573. æTN A9B7
  13574. æD PROCEDURE CloseDeskAcc(refNum: INTEGER);
  13575.     INLINE $A9B7;
  13576. æDT CloseDeskAcc(refNum);
  13577. æRI I-440
  13578. æC 
  13579. When a system window is active and the user chooses Close from the File menu, call
  13580. CloseDeskAcc to close the desk accessory. RefNum is the driver reference number for
  13581. the desk accessory, which you get from the windowKind field of its window.
  13582.  
  13583. The Desk Manager automatically closes a desk accessory if the user clicks its close
  13584. box. Also, since the application heap is released when the application terminates,
  13585. every desk accessory goes away at that time.
  13586.  
  13587. æKY SystemClick
  13588. æFp Desk.p
  13589. æT PROCEDURE
  13590. æTN A9B3
  13591. æD PROCEDURE SystemClick(theEvent: EventRecord;theWindow: WindowPtr);
  13592.     INLINE $A9B3;
  13593. æDT SystemClick(theEvent,theWindow);
  13594. æMM
  13595. æRI I-441, P-35, 182
  13596. æC 
  13597. When a mouse-down event occurs and the Window Manager function FindWindow reports
  13598. that the mouse button was pressed in a system window, the application should call
  13599. SystemClick with the event record and the window pointer. If the given window belongs
  13600. to a desk accessory, SystemClick sees that the event gets handled properly.
  13601.  
  13602. SystemClick determines which part of the desk accessory’s window the mouse button was
  13603. pressed in, and responds accordingly (similar to the way your application responds to
  13604. mouse activities in its own windows).
  13605.  
  13606.   •  If the mouse button was pressed in the content region of the window
  13607.      and the window was active, SystemClick sends the mouse-down event to
  13608.      the desk accessory, which processes it as appropriate.
  13609.   •  If the mouse button was pressed in the content region and the window
  13610.      was inactive, SystemClick makes it the active window.
  13611.   •  If the mouse button was pressed in the drag region, SystemClick calls
  13612.      the Window Manager procedure DragWindow to pull an outline of the window
  13613.      across the screen and move the window to a new location. If the window
  13614.      was inactive, DragWindow also makes it the active window (unless the
  13615.      Command key was pressed along with the mouse button).
  13616.   •  If the mouse button was pressed in the go-away region, SystemClick calls
  13617.      the Window Manager function TrackGoAway to determine whether the mouse
  13618.      is still inside the go-away region when the click is completed:  If
  13619.      so, it tells the desk accessory to close itself; otherwise, it does
  13620.      nothing.
  13621.  
  13622. æKY SystemEdit
  13623. æFp Desk.p
  13624. æT FUNCTION
  13625. æTN A9C2
  13626. æD FUNCTION SystemEdit(editCmd: INTEGER): BOOLEAN;
  13627.     INLINE $A9C2;
  13628. æDT myVariable := SystemEdit(editCmd);
  13629. æMM
  13630. æRT 180, 215
  13631. æRI I-441
  13632. æC 
  13633. Assembly-language note:  The macro you invoke to call SystemEdit from
  13634.                          assembly language is named _SysEdit.
  13635.  
  13636. Call SystemEdit when there’s a mouse-down event in the menu bar and the user chooses
  13637. one of the five standard editing commands from the Edit menu. Pass one of the following
  13638. as the value of the editCmd parameter:
  13639.  
  13640.   editCmd    Editing command
  13641.  
  13642.     0            Undo
  13643.     2            Cut
  13644.     3            Copy
  13645.     4            Paste
  13646.     5            Clear
  13647.  
  13648. If your Edit menu contains these five commands in the standard arrangement (the order
  13649. listed above, with a dividing line between Undo and Cut), you can simply call
  13650.  
  13651.   SystemEdit(menuItem-1)
  13652.  
  13653. where menuItem is the menu item number.
  13654.  
  13655. If the active window doesn’t belong to a desk accessory, SystemEdit returns FALSE;
  13656. the application should then process the editing command as usual. If the active
  13657. window does belong to a desk accessory, SystemEdit asks that accessory to process the
  13658. command and returns TRUE; in this case, the application should ignore the command.
  13659.  
  13660. Note:  It’s up to the application to make sure desk accessories get
  13661.        their editing commands that are chosen from the Edit menu. In
  13662.        particular, make sure your application hasn’t disabled the Edit
  13663.        menu or any of the five standard commands when a desk accessory
  13664.        is activated.
  13665.  
  13666. æKY SystemTask
  13667. æFp Desk.p
  13668. æT PROCEDURE
  13669. æTN A9B4
  13670. æD PROCEDURE SystemTask;
  13671.     INLINE $A9B4;
  13672. æDT SystemTask;
  13673. æRT 85
  13674. æRI I-442, 444, II-189, N85-1
  13675. æC 
  13676. For each open desk accessory (or other device driver performing periodic actions),
  13677. SystemTask causes the accessory to perform the periodic action defined for it, if any
  13678. such action has been defined and if the proper time period has passed since the
  13679. action was last performed. For example, a clock accessory can be defined such that
  13680. the second hand is to move once every second; the periodic action for the accessory
  13681. will be to move the second hand to the next position, and SystemTask will alert the
  13682. accessory every second to perform that action.
  13683.  
  13684. You should call SystemTask as often as possible, usually once every time through your
  13685. main event loop. Call it more than once if your application does an unusually large
  13686. amount of processing each time through the loop.
  13687.  
  13688. Note:  SystemTask should be called at least every sixtieth of a second.
  13689.  
  13690. æKY SystemEvent
  13691. æFp Desk.p
  13692. æT FUNCTION
  13693. æTN A9B2
  13694. æD FUNCTION SystemEvent(theEvent: EventRecord): BOOLEAN;
  13695.     INLINE $A9B2;
  13696. æDT myVariable := SystemEvent(theEvent);
  13697. æRT 5,85
  13698. æRI I-442, N5-1, N85-1
  13699. æC  
  13700. SystemEvent is called only by the Toolbox Event Manager function GetNextEvent when it
  13701. receives an event, to determine whether the event should be handled by the application
  13702. or by the system. If the given event should be handled by the application, SystemEvent
  13703. returns FALSE; otherwise, it calls the appropriate system code to handle the event
  13704. and returns TRUE.
  13705.  
  13706. In the case of a null or mouse-down event, SystemEvent does nothing but return FALSE.
  13707. Notice that it responds this way to a mouse-down event even though the event may in
  13708. fact have occurred in a system window (and therefore may have to be handled by the
  13709. system). The reason for this is that the check for exactly where the event occurred
  13710. (via the Window Manager function FindWindow) is made later by the application and so
  13711. would be made twice if SystemEvent were also to do it. To avoid this duplication,
  13712. SystemEvent passes the event on to the application and lets it make the sole call to
  13713. FindWindow. Should FindWindow reveal that the mouse-down event did occur in a system
  13714. window, the application can then call SystemClick, as described above, to get the
  13715. system to handle it.
  13716.  
  13717. If the given event is a mouse-up or any keyboard event (including keyboard equivalents
  13718. of commands), SystemEvent checks whether the active window belongs to a desk accessory
  13719. and whether that accessory can handle this type of event. If so, it sends the event
  13720. to the desk accessory and returns TRUE; otherwise, it returns FALSE.
  13721.  
  13722. If SystemEvent is passed an activate or update event, it checks whether the window
  13723. the event occurred in is a system window belonging to a desk accessory and whether
  13724. that accessory can handle this type of event. If so, it sends the event to the desk
  13725. accessory and returns TRUE; otherwise, it returns FALSE.
  13726.  
  13727. Note:  It’s unlikely that a desk accessory would not be set up to handle
  13728.        keyboard, activate, and update events, or that it would handle
  13729.        mouse-up events.
  13730.  
  13731.        If the given event is a disk-inserted event, SystemEvent does some
  13732.        low-level processing (by calling the File Manager function MountVol)
  13733.        but passes the event on to the application by returning FALSE, in
  13734.        case the application wants to do further processing. Finally,
  13735.        SystemEvent returns FALSE for network, device driver, and
  13736.        application-defined events.
  13737.  
  13738. Assembly-language note:  Advanced programmers can make SystemEvent
  13739.                          always return FALSE by setting the global
  13740.                          variable SEvtEnb (a byte) to 0.
  13741.  
  13742. æKY SystemMenu
  13743. æFp Desk.p
  13744. æT PROCEDURE
  13745. æTN A9B5
  13746. æD PROCEDURE SystemMenu(menuResult: LONGINT);
  13747.     INLINE $A9B5;
  13748. æDT SystemMenu(menuResult);
  13749. æMM
  13750. æRI I-443
  13751. æC  
  13752. SystemMenu is called only by the Menu Manager functions MenuSelect and MenuKey, when
  13753. an item in a menu belonging to a desk accessory has been chosen. The menuResult
  13754. parameter has the same format as the value returned by MenuSelect and MenuKey:  the
  13755. menu ID in the high-order word and the menu item number in the low-order word. (The
  13756. menu ID will be negative.) SystemMenu directs the desk accessory to perform the
  13757. appropriate action for the given menu item.
  13758.  
  13759.  
  13760. æKY DeskBus.p
  13761. æKL ADBOp
  13762. ADBReInit
  13763. CountADBs
  13764. GetADBInfo
  13765. GetIndADB
  13766. SetADBInfo
  13767.  
  13768. ADBAddress
  13769. ADBDataBlock
  13770. ADBDBlkPtr
  13771. ADBOpBlock
  13772. ADBOpBPtr
  13773. ADBSetInfoBlock
  13774. ADBSInfoPtr
  13775.  
  13776. æKY ADBOpBlock
  13777. ADBOpBPtr
  13778. æFp DeskBus.p
  13779. æT RECORD
  13780. æD ADBOpBPtr = ^ADBOpBlock;
  13781. ADBOpBlock = RECORD
  13782.     dataBuffPtr: Ptr; {address of data buffer}
  13783.     opServiceRtPtr: Ptr; {service routine pointer}
  13784.     opDataAreaPtr: Ptr; {optional data area address}
  13785.     END;
  13786. æC 
  13787.  
  13788. æKY ADBDataBlock
  13789. ADBDBlkPtr
  13790. æFp DeskBus.p
  13791. æT RECORD
  13792. æD ADBDBlkPtr = ^ADBDataBlock;
  13793. ADBDataBlock = PACKED RECORD
  13794.     devType: SignedByte; {device type}
  13795.     origADBAddr: SignedByte; {original ADB Address}
  13796.     dbServiceRtPtr: Ptr; {service routine pointer}
  13797.     dbDataAreaAddr: Ptr; {data area address}
  13798.     END;
  13799. æC 
  13800.  
  13801. æKY ADBSetInfoBlock
  13802. ADBSInfoPtr
  13803. æFp DeskBus.p
  13804. æT RECORD
  13805. æD ADBSInfoPtr = ^ADBSetInfoBlock;
  13806. ADBSetInfoBlock = RECORD
  13807.     siServiceRtPtr: Ptr; {service routine pointer}
  13808.     siDataAreaAddr: Ptr; {data area address}
  13809.     END;
  13810. æC 
  13811.  
  13812. æKY ADBAddress
  13813. æFp DeskBus.p
  13814. æT RECORD
  13815. æD ADBAddress = SignedByte;
  13816. æC 
  13817.  
  13818. æKY ADBReInit
  13819. æFp DeskBus.p
  13820. æT PROCEDURE
  13821. æTN A07B
  13822. æD PROCEDURE ADBReInit;
  13823.     INLINE $A07B;
  13824. æDT ADBReInit;
  13825. æMM
  13826. æRT 143, 206 
  13827. æRI V-367, N143
  13828. æC 
  13829. Trap macro    _ADBReInit
  13830.  
  13831. ADBReInit reinitializes the entire Apple Desktop Bus. It clears the ADB device table
  13832. to zeros and places a SendReset command on the bus to reset all devices to their
  13833. original addresses. ADBReInit has no parameters.
  13834.  
  13835. Because it does not deallocate ADB resources on the system heap, ADBReInit should not
  13836. be used for routine bus initialization. Apple strongly recommends against adding
  13837. devices while the system is running; therefore, you should never call ADBReInit.
  13838.  
  13839. ADBReInit also calls a routine pointed to by the low memory global JADBProc
  13840. at the beginning and end of its execution.  You can insert your own
  13841. preprocessing/postprocessing routine by changing the value of JADBProc; ADBReInit
  13842. conditions it by setting D0 to 0 for preprocessing and to 1 for postprocessing.  Your
  13843. procedure must restore the value of D0 and branch to the original value of JADBProc
  13844. on exit.  JADBProc should be used to de-allocate memory used by the driver (see
  13845. MacDTS Sample Code “TbltDrvr” for an example), and then it should chain to the procedure
  13846. originally found in JADBProc.
  13847.  
  13848. The complete ADBReInit sequence is therefore the following:
  13849.  
  13850.   •  JSR to JADBProc with D0 set to 0
  13851.   •  reinitialize the Apple Desktop Bus
  13852.   •  clear the ADB device table
  13853.   •  JSR to JADBProc with D0 set to 1
  13854.  
  13855. æKY ADBOp
  13856. æFp DeskBus.p
  13857. æT FUNCTION
  13858. æD FUNCTION ADBOp(data: Ptr;compRout: ProcPtr;buffer: Ptr;commandNum: INTEGER): OSErr;
  13859. æDT myVariable := ADBOp(data,compRout,buffer,commandNum);
  13860. æRT 206
  13861. æRI V-368
  13862. æC 
  13863. Trap macro    _ADBOp
  13864.  
  13865. On entry:    A0:  pointer to parameter block
  13866.              D0:  commandNum (byte)
  13867.  
  13868. Parameter block
  13869.     -->    0    buffer      pointer
  13870.     -->    4    compRout    pointer
  13871.     -->    8    data        pointer
  13872.  
  13873. On exit:     D0:  result code (byte)
  13874.  
  13875. The completion routine pointed to by compRout will be passed the following parameters
  13876. on entry:
  13877.  
  13878.              D0:  commandNum (byte)
  13879.              A0:  pointer to buffer, data stored as a Pascal string (maximum
  13880.                   8 bytes data preceded by one length byte)
  13881.              A1:  pointer to completion routine (compRout)
  13882.              A2:  pointer to optional data area (data)
  13883.  
  13884. ADBOp transmits over the bus the command byte whose value is given by commandNum. The
  13885. structure of the command byte is given earlier in Figure 1. ADBOp executes only when
  13886. the ADB is otherwise idle; otherwise it is held in a command queue. It returns an
  13887. error if the command queue is full. The length of the data buffer pointed to by
  13888. buffer is contained in its first byte, like a Pascal string. The optional data area
  13889. pointed to by data is for local storage by the completion routine pointed to by
  13890. compRout. ADBop should be used sparingly; it is not intended for polling a device. 
  13891. The host automatically polls devices with data to deliver.
  13892.  
  13893. Result codes    noErr    No error
  13894.                 –1       Unsuccessful completion
  13895.  
  13896. æKY CountADBs
  13897. æFp DeskBus.p
  13898. æT FUNCTION
  13899. æTN A077
  13900. æD FUNCTION CountADBs: INTEGER;
  13901.     INLINE $A077,$3E80;
  13902. æDT myVariable := CountADBs;
  13903. æRT 206
  13904. æRI V-369
  13905. æC 
  13906. Trap macro    _CountADBs
  13907.  
  13908. On exit:    D0:  number of devices (byte)
  13909.  
  13910. CountADBs returns a value representing the number of devices connected to the ADB by
  13911. counting the number of entries in the device table. It has no arguments and returns
  13912. no error codes.
  13913.  
  13914. æKY GetIndADB
  13915. æFp DeskBus.p
  13916. æT FUNCTION
  13917. æTN A078
  13918. æD FUNCTION GetIndADB(VAR info: ADBDataBlock;devTableIndex: INTEGER): ADBAddress;
  13919. æDT myVariable := GetIndADB(info,devTableIndex,D0);
  13920. æRT 206
  13921. æRI V-369
  13922. æC 
  13923. Trap macro    _GetIndADB
  13924.  
  13925. On entry:    A0:  pointer to parameter block
  13926.              D0:  entry index number; range = 1..CountADBs (byte)
  13927.  
  13928. Parameter block
  13929.     <--    0    device type                byte    (handler ID)
  13930.     <--    1    original ADB address       byte
  13931.     <--    2    service routine address    pointer (compRout)
  13932.     <--    6    data area address          pointer (data)
  13933.  
  13934. On exit:     D0:  positive value:  current ADB address (byte)
  13935.                   negative value:  error code (byte)
  13936.  
  13937. GetIndADB returns information from the ADB device table entry whose index number is
  13938. given by devTableIndex. ADBDataBlock has this form:
  13939.  
  13940. TYPE  ADBDataBlock =
  13941.              PACKED RECORD
  13942.                devType:         SignedByte; {device type (handler ID)}
  13943.                origADBAddr:     SignedByte; {original ADB address}
  13944.                dbServiceRtPtr:  Ptr;        {service routine address (compRout)}
  13945.                dbDataAreaAddr:  Ptr         {data area address (data)}
  13946.              END;
  13947.  
  13948. GetIndADB returns the current ADB address of the device. If it is unable to complete
  13949. execution successfully, GetIndADB returns a negative value.
  13950.  
  13951. æKY GetADBInfo
  13952. æFp DeskBus.p
  13953. æT FUNCTION
  13954. æTN A079
  13955. æD FUNCTION GetADBInfo(VAR info: ADBDataBlock;adbAddr: ADBAddress): OSErr;
  13956. æDT myVariable := GetADBInfo(info,adbAddr,D0);
  13957. æRI V-370
  13958. æC 
  13959. Trap macro    _GetADBInfo
  13960.  
  13961. On entry:    A0:  pointer to parameter block
  13962.              D0:  ADB address of the device (byte)
  13963.  
  13964. Parameter block
  13965.     <--    0    device handler ID          byte
  13966.     <--    1    original ADB address       byte
  13967.     <--    2    service routine address    pointer (compRout)
  13968.     <--    6    data area address          pointer (data)
  13969.  
  13970. On exit:     D0:  result code (byte)
  13971.  
  13972. GetADBInfo returns information from the ADB device table entry of the device whose
  13973. ADB address is given by ABDAddr. The structure of ADBDataBlock is given above under
  13974. “GetIndADB”.
  13975.  
  13976. Result codes    noErr    No error
  13977.  
  13978. æKY SetADBInfo
  13979. æFp DeskBus.p
  13980. æT FUNCTION
  13981. æTN A07A
  13982. æD FUNCTION SetADBInfo(VAR info: ADBSetInfoBlock;adbAddr: ADBAddress): OSErr;
  13983. æDT myVariable := SetADBInfo(info,adbAddr,D0);
  13984. æRT 206
  13985. æRI V-370
  13986. æC 
  13987. Trap macro    _SetADBInfo
  13988.  
  13989. On entry:    A0:  pointer to parameter block
  13990.              D0:  ADB address of the device (byte)
  13991.  
  13992. Parameter block
  13993.     -->    0    service routine address    pointer (compRout)
  13994.     -->    4    data area address          pointer (data)
  13995.  
  13996. On exit:     D0:  result code (byte)
  13997.  
  13998. SetADBInfo sets the service routine address and the data area address in the ADB
  13999. device table entry for the device whose ADB address is given by ABDAddr. ADBSetInfoBlock
  14000. has this form:
  14001.  
  14002. TYPE  ADBSetInfoBlock =
  14003.                RECORD
  14004.                  siServiceRtPtr:  Ptr;  {service routine address (compRout)}
  14005.                  siDataAreaAddr:  Ptr   {data area address (data)}
  14006.                END;
  14007.  
  14008. Result codes    noErr    No error
  14009.  
  14010. Warning:  You should send a Flush command to the device after calling it
  14011.           with SetADBInfo, to prevent it sending old data to the new data
  14012.           area address.
  14013.  
  14014.  
  14015. æKY Devices.p
  14016. æKL CloseDriver
  14017. Control
  14018. GetDCtlEntry
  14019. KillIO
  14020. OpenDriver
  14021. PBControl
  14022. PBControlAsync
  14023. PBControlSync
  14024. PBKillIO
  14025. PBKillIOAsync
  14026. PBKillIOSync
  14027. PBStatus
  14028. PBStatusAsync
  14029. PBStatusSync
  14030. SetChooserAlert
  14031. Status
  14032.  
  14033. activateMsg
  14034. activDev
  14035. AuxDCE
  14036. AuxDCEHandle
  14037. AuxDCEPtr
  14038. buttonMsg
  14039. cancelMsg
  14040. cdevGenErr
  14041. cdevMemErr
  14042. cdevResErr
  14043. cdevUnset
  14044. chooserID
  14045. clearDev
  14046. closeDev
  14047. copyDev
  14048. cursorDev
  14049. cutDev
  14050. DCtlEntry
  14051. DCtlHandle
  14052. DCtlPtr
  14053. deactivateMsg
  14054. deactivDev
  14055. deselectMsg
  14056. fillListMsg
  14057. getSelMsg
  14058. hitDev
  14059. hitMsg
  14060. initDev
  14061. initMsg
  14062. keyEvtDev
  14063. keyEvtMsg
  14064. macDev
  14065. newSelMsg
  14066. normalMsg
  14067. nulDev
  14068. nulMsg
  14069. okMsg
  14070. pasteDev
  14071. selectMsg
  14072. startupMsg
  14073. superMsg
  14074. terminateMsg
  14075. undoDev
  14076. updateDev
  14077. updateMsg
  14078.  
  14079. æKY newSelMsg
  14080. æFp Devices.p
  14081. æT CONST
  14082. æD newSelMsg = 12;
  14083. æC 
  14084.  
  14085. æKY fillListMsg
  14086. æFp Devices.p
  14087. æT CONST
  14088. æD fillListMsg = 13;
  14089. æC 
  14090.  
  14091. æKY getSelMsg
  14092. æFp Devices.p
  14093. æT CONST
  14094. æD getSelMsg = 14;
  14095. æC 
  14096.  
  14097. æKY selectMsg
  14098. æFp Devices.p
  14099. æT CONST
  14100. æD selectMsg = 15;
  14101. æC 
  14102.  
  14103. æKY deselectMsg
  14104. æFp Devices.p
  14105. æT CONST
  14106. æD deselectMsg = 16;
  14107. æC 
  14108.  
  14109. æKY terminateMsg
  14110. æFp Devices.p
  14111. æT CONST
  14112. æD terminateMsg = 17;
  14113. æC 
  14114.  
  14115. æKY buttonMsg
  14116. æFp Devices.p
  14117. æT CONST
  14118. æD buttonMsg = 19;
  14119. æC 
  14120.  
  14121. æKY chooserID
  14122. æFp Devices.p
  14123. æT CONST
  14124. æD chooserID = 1;
  14125. æC 
  14126.  
  14127. æKY initDev
  14128. æFp Devices.p
  14129. æT CONST
  14130. æD initDev = 0; {Time for cdev to initialize itself}
  14131. æC »The initDev Message
  14132.  
  14133. InitDev is an initialization message sent to allow the cdev to allocate its private
  14134. storage (if any) and do any initial settings to buttons or controls.  This message is
  14135. sent when the user clicks on the cdev’s icon.
  14136.  
  14137. Note that the dialog, cdev list, and all of the items in the cdev’s 'DITL' except
  14138. user items will already have been drawn when the initDev message is sent.
  14139.  
  14140. If your cdev doesn’t need any storage it should return the value that was passed to
  14141. it in cdevValue.
  14142.  
  14143. æKY hitDev
  14144. æFp Devices.p
  14145. æT CONST
  14146. æD hitDev = 1; {Hit on one of my items}
  14147. æC »The hitDev Message
  14148.  
  14149. A hitDev message is sent when the user has clicked an enabled dialog item that belongs
  14150. to the cdev.  The dialog item number of the item hit is passed in the Item parameter.
  14151.  Remember that the Control Panel’s items precede yours, so
  14152. you’ll want (Item – numItems) to determine which of your items was hit.  If the
  14153. Control Panel itself has n items, the first of the cdev’s items will be n+1 in the
  14154. combined dialog item list.  A cdev should not depend on any hardcoded value for
  14155. numItems, since the number of items in Control Panel’s 'DITL' is likely to change in
  14156. the future.
  14157.  
  14158. Factoring in numItems need not mean an increase in your code size, or passing and
  14159. adding numItems everywhere, or foregoing the constants that most developers use to
  14160. identify specific items.  You can do it easily, and neatly, as follows:
  14161.  
  14162.   1.  Subtract numItems from Item right away, and refer to your dialog
  14163.       items with constants as usual throughout the cdev.
  14164.   2.  Write simple envelope routines to enclose Dialog Manager procedures
  14165.       that require item number arguments.  Add numItems only locally,
  14166.       within those routines and for the Dialog Manager calls only.
  14167.  
  14168. This is demonstrated in the sample cdev.
  14169.  
  14170. æKY closeDev
  14171. æFp Devices.p
  14172. æT CONST
  14173. æD closeDev = 2; {Close yourself}
  14174. æC »The closeDev Message
  14175.  
  14176. A closeDev message is sent to the cdev when either the Control Panel is closed or the
  14177. user selects another cdev.  When a cdev receives a closeDev message it should dispose
  14178. of any storage it has allocated, including the handle stored in cdevValue, if any.
  14179.  
  14180. æKY nulDev
  14181. æFp Devices.p
  14182. æT CONST
  14183. æD nulDev = 3; {Null event}
  14184. æC »The nulDev Message
  14185.  
  14186. A nulDev message is sent to the cdev on every Control Panel run event.  This allows
  14187. the cdev to perform tasks that need to be executed continuously
  14188. (insertion point blinking, for example).
  14189.  
  14190. A cdev cannot assume any particular timing of calls from applications.  Don’t use
  14191. nulDev to refresh settings; see activDev, above.
  14192.  
  14193. æKY updateDev
  14194. æFp Devices.p
  14195. æT CONST
  14196. æD updateDev = 4; {Update event}
  14197. æC »The updateDev Message
  14198.  
  14199. An updateDev message is sent to the cdev on every update event.  It allows the cdev
  14200. to perform any updating necessary aside from the standard dialog item updating provided
  14201. by the Dialog Manager.  For example, if the cdev resource contains a picture of the
  14202. sound control bar, it will probably be a user item, and the picture of the control
  14203. bar and the volume knob should be redrawn in response to update events.
  14204.  
  14205. Note that there is no mechanism for determining what to update, as the update region
  14206. has already been reset.  You must redraw all of your user items completely.
  14207.  
  14208. æKY activDev
  14209. æFp Devices.p
  14210. æT CONST
  14211. æD activDev = 5; {Activate event}
  14212. æC »The activDev Message
  14213.  
  14214. An activDev message is sent to the cdev on every activate event.  It allows the cdev
  14215. to reset any items that may have changed while the Control Panel was inactive.   It
  14216. also allows the cdev to send things such as “lists activate” messages.
  14217.  
  14218. æKY deactivDev
  14219. æFp Devices.p
  14220. æT CONST
  14221. æD deactivDev = 6; {Deactivate event}
  14222. æC »The deActivDev Message
  14223.  
  14224. A deActivDev message is sent to the cdev on every deactivate event.  It allows the
  14225. cdev to send deactivate messages to items such as lists.
  14226.  
  14227. æKY keyEvtDev
  14228. æFp Devices.p
  14229. æT CONST
  14230. æD keyEvtDev = 7; {Key down/auto key}
  14231. æC »The keyEvtDev Message
  14232.  
  14233. A keyEvtDev message is sent to the cdev on every keyDown event and autoKey event.  It
  14234. allows the cdev to process key events.  On return to the Control Panel, the key event
  14235. will be processed by a call to dialogSelect in the Dialog Manager.  A cdev that does
  14236. not want the Toolbox Event Manager to do any further processing should change the
  14237. what field of the EventRecord to nullEvent before returning to the Control Panel.
  14238.  
  14239. æKY macDev
  14240. æFp Devices.p
  14241. æT CONST
  14242. æD macDev = 8; {Decide whether or not to show up}
  14243. æC »The macDev Message
  14244.  
  14245. If the 'mach' resource has a 0 in Softmask and a –1 ($FFFF) in Hardmask, the first
  14246. message a cdev will get is a macDev message.  This is an opportunity for the cdev to
  14247. determine whether it can run, and whether it should appear in the Control Panel’s
  14248. cdev list.  The cdev can do its own check to see which machine it is being run on,
  14249. what hardware is connected, and what is in the slots (if it has slots).  The cdev
  14250. must then return a function result of 1 or 0.  If  a 0 is returned, the Control Panel
  14251. will not display the cdev in the icon list.  (Note that the Control Panel does not
  14252. interpret this 0 or 1 as an error message as described under “Cdev Error Checking”.)
  14253.  
  14254. The macDev call happens only once, and only when Softmask and Hardmask are 0 and
  14255. FFFF.  It is always the first call made to the cdev.
  14256.  
  14257. æKY undoDev
  14258. æFp Devices.p
  14259. æT CONST
  14260. æD undoDev = 9;
  14261. æC 
  14262.  
  14263. æKY cutDev
  14264. æFp Devices.p
  14265. æT CONST
  14266. æD cutDev = 10;
  14267. æC 
  14268.  
  14269. æKY copyDev
  14270. æFp Devices.p
  14271. æT CONST
  14272. æD copyDev = 11;
  14273. æC 
  14274.  
  14275. æKY pasteDev
  14276. æFp Devices.p
  14277. æT CONST
  14278. æD pasteDev = 12;
  14279. æC 
  14280.  
  14281. æKY clearDev
  14282. æFp Devices.p
  14283. æT CONST
  14284. æD clearDev = 13;
  14285. æC 
  14286.  
  14287. æKY cursorDev
  14288. æFp Devices.p
  14289. æT CONST
  14290. æD cursorDev = 14;
  14291. æC 
  14292.  
  14293. æKY cdevGenErr
  14294. æFp Devices.p
  14295. æT CONST
  14296. æD cdevGenErr = -1; {General error; gray cdev w/o alert}
  14297. æC 
  14298.  
  14299. æKY cdevMemErr
  14300. æFp Devices.p
  14301. æT CONST
  14302. æD cdevMemErr = 0; {Memory shortfall; alert user please}
  14303. æC 
  14304.  
  14305. æKY cdevResErr
  14306. æFp Devices.p
  14307. æT CONST
  14308. æD cdevResErr = 1; {Couldn't get a needed resource; alert}
  14309. æC 
  14310.  
  14311. æKY cdevUnset
  14312. æFp Devices.p
  14313. æT CONST
  14314. æD cdevUnset = 3; { cdevValue is initialized to this}
  14315. æC 
  14316. »CDEV ERROR CHECKING
  14317. _______________________________________________________________________________
  14318.  
  14319. Because a desk accessory may be called into many strange and wonderful situations,
  14320. careful attention must be paid to error checking.  The two most common error conditions
  14321. are missing resources and lack of memory.  Some error reporting and recovery facilities
  14322. have been provided in the Control Panel to help with errors encountered in a cdev.
  14323.  
  14324. Because the Control Panel has no direct information about the cdev, the cdev’s code
  14325. must be able to detect and recover from error conditions on its own.  If the recovery
  14326. cannot be effected the cdev must dispose of any memory it has allocated, and exit
  14327. back to the Control Panel with an error code.
  14328.  
  14329. Following a shutdown, the Control Panel can help report the error condition to the
  14330. user and prevent accidental reentry into the cdev that might result from such things
  14331. as an update event.  A cdev can request three different error reporting mechanisms
  14332. from the Control Panel:
  14333.  
  14334.   •  If a memory error has occured, then, after the cdev has safely shut
  14335.      itself down, it may request the Control Panel to issue an out-of-memory
  14336.      error message and gray out (paint over with the background pattern) the
  14337.      cdev area of the Control Panel window.  It will remain grayed until
  14338.      another cdev is selected.  The Control Panel window itself is not
  14339.      closed since other cdevs may still be able to function in the environment.
  14340.   •  If a resource error is detected, the cdev may request that a
  14341.      can’t-find-needed-resource error message be issued.
  14342.   •  The cdev may display its own error message and then call on the
  14343.      Control Panel to gray its area.
  14344.  
  14345. The Control Panel uses the cdevValue parameter to send status information to the
  14346. cdev, and a proper cdev uses its function value to send information back to the
  14347. Control Panel.  In the absence of errors, the same value passes back and forth: the
  14348. Control Panel puts the last function value it received into cdevValue when it calls
  14349. the cdev; the cdev returns the value it finds there as the function value.  The cdev
  14350. may want to keep a handle to its own storage, in which case passing it as the function
  14351. value ensures its availability, since the Control Panel will pass it back in cdevValue
  14352. at the next call.
  14353.  
  14354. Four constants have been defined for this cdev/Control Panel communication:
  14355.  
  14356. CONST
  14357.   cdevUnset   =     3;    {initial value passed in cdevValue}
  14358.   cdevGenErr  =    -1;    {generic cdev error}
  14359.   cdevMemErr  =     0;    {insufficient memory for cdev execution}
  14360.   cdevResErr  =     1;    {missing resource needed by cdev}
  14361.  
  14362. After the macDev call, the Control Panel sends cdevUnset in cdevValue, so that until
  14363. an error occurs or the cdev uses its function value as a handle, cdevUnset is passed
  14364. back and forth.  If the cdev encounters an error, it should dispose of all handles
  14365. and pointers it has set up, strip the stack back to the same position as a normal
  14366. exit, and return one of the three error codes as the function result.  The Control
  14367. Panel will respond as follows:
  14368.  
  14369.   Function           Message to                     Control Panel Action    
  14370.   Result             Control Panel   
  14371.  
  14372.   cdevGenErr         The cdev has encountered an    Gray out the cdev’s area,
  14373.                      error from which it cannot     send a 0 in cdevValue in
  14374.                      recover, but do not put up     succeeding cdev calls
  14375.                      an error dialog.
  14376.  
  14377.   cdevMemErr         The cdev has determined that   Gray out cdev’s area, put
  14378.                      there is not enough memory to  up error dialog, send a 0
  14379.                      execute; please put up a       in cdevValue in succeeding
  14380.                      memory error dialog.           cdev calls.
  14381.  
  14382.   cdevResErr         The cdev can’t find a needed   Gray out cdev’s area, put
  14383.                      resource; please put up a      up error dialog, send a 0
  14384.                      resource error dialog.         in cdevValue in succeeding
  14385.                                                     cdev calls.
  14386.  
  14387.   all other values,  No error conditions.           Send the value back in
  14388.   either handles                                    cdevValue.
  14389.   or cdevUnset
  14390.  
  14391. The cdev code should check cdevValue at entry.  A 0 means that the Control Panel has
  14392. responded to a cdev error message by shutting down the cdev and displaying an error
  14393. dialog if one was requested.  The cdev should immediately exit.
  14394.  
  14395. Once the Control Panel has responded to an error message from a cdev it will no
  14396. longer respond to any return values until another cdev is launched.
  14397.  
  14398. æKY initMsg
  14399. æFp Devices.p
  14400. æT CONST
  14401. æD initMsg = 1; {initialization}
  14402. æC 
  14403. »CDEV ERROR CHECKING
  14404. _______________________________________________________________________________
  14405.  
  14406. Because a desk accessory may be called into many strange and wonderful situations,
  14407. careful attention must be paid to error checking.  The two most common error conditions
  14408. are missing resources and lack of memory.  Some error reporting and recovery facilities
  14409. have been provided in the Control Panel to help with errors encountered in a cdev.
  14410.  
  14411. Because the Control Panel has no direct information about the cdev, the cdev’s code
  14412. must be able to detect and recover from error conditions on its own.  If the recovery
  14413. cannot be effected the cdev must dispose of any memory it has allocated, and exit
  14414. back to the Control Panel with an error code.
  14415.  
  14416. Following a shutdown, the Control Panel can help report the error condition to the
  14417. user and prevent accidental reentry into the cdev that might result from such things
  14418. as an update event.  A cdev can request three different error reporting mechanisms
  14419. from the Control Panel:
  14420.  
  14421.   •  If a memory error has occured, then, after the cdev has safely shut
  14422.      itself down, it may request the Control Panel to issue an out-of-memory
  14423.      error message and gray out (paint over with the background pattern) the
  14424.      cdev area of the Control Panel window.  It will remain grayed until
  14425.      another cdev is selected.  The Control Panel window itself is not
  14426.      closed since other cdevs may still be able to function in the environment.
  14427.   •  If a resource error is detected, the cdev may request that a
  14428.      can’t-find-needed-resource error message be issued.
  14429.   •  The cdev may display its own error message and then call on the
  14430.      Control Panel to gray its area.
  14431.  
  14432. The Control Panel uses the cdevValue parameter to send status information to the
  14433. cdev, and a proper cdev uses its function value to send information back to the
  14434. Control Panel.  In the absence of errors, the same value passes back and forth: the
  14435. Control Panel puts the last function value it received into cdevValue when it calls
  14436. the cdev; the cdev returns the value it finds there as the function value.  The cdev
  14437. may want to keep a handle to its own storage, in which case passing it as the function
  14438. value ensures its availability, since the Control Panel will pass it back in cdevValue
  14439. at the next call.
  14440.  
  14441. Four constants have been defined for this cdev/Control Panel communication:
  14442.  
  14443. CONST
  14444.   cdevUnset   =     3;    {initial value passed in cdevValue}
  14445.   cdevGenErr  =    -1;    {generic cdev error}
  14446.   cdevMemErr  =     0;    {insufficient memory for cdev execution}
  14447.   cdevResErr  =     1;    {missing resource needed by cdev}
  14448.  
  14449. After the macDev call, the Control Panel sends cdevUnset in cdevValue, so that until
  14450. an error occurs or the cdev uses its function value as a handle, cdevUnset is passed
  14451. back and forth.  If the cdev encounters an error, it should dispose of all handles
  14452. and pointers it has set up, strip the stack back to the same position as a normal
  14453. exit, and return one of the three error codes as the function result.  The Control
  14454. Panel will respond as follows:
  14455.  
  14456.   Function           Message to                     Control Panel Action    
  14457.   Result             Control Panel   
  14458.  
  14459.   cdevGenErr         The cdev has encountered an    Gray out the cdev’s area,
  14460.                      error from which it cannot     send a 0 in cdevValue in
  14461.                      recover, but do not put up     succeeding cdev calls
  14462.                      an error dialog.
  14463.  
  14464.   cdevMemErr         The cdev has determined that   Gray out cdev’s area, put
  14465.                      there is not enough memory to  up error dialog, send a 0
  14466.                      execute; please put up a       in cdevValue in succeeding
  14467.                      memory error dialog.           cdev calls.
  14468.  
  14469.   cdevResErr         The cdev can’t find a needed   Gray out cdev’s area, put
  14470.                      resource; please put up a      up error dialog, send a 0
  14471.                      resource error dialog.         in cdevValue in succeeding
  14472.                                                     cdev calls.
  14473.  
  14474.   all other values,  No error conditions.           Send the value back in
  14475.   either handles                                    cdevValue.
  14476.   or cdevUnset
  14477.  
  14478. The cdev code should check cdevValue at entry.  A 0 means that the Control Panel has
  14479. responded to a cdev error message by shutting down the cdev and displaying an error
  14480. dialog if one was requested.  The cdev should immediately exit.
  14481.  
  14482. Once the Control Panel has responded to an error message from a cdev it will no
  14483. longer respond to any return values until another cdev is launched.
  14484.  
  14485. æKY okMsg
  14486. æFp Devices.p
  14487. æT CONST
  14488. æD okMsg = 2; {user clicked OK button}
  14489. æC 
  14490. »CDEV ERROR CHECKING
  14491. _______________________________________________________________________________
  14492.  
  14493. Because a desk accessory may be called into many strange and wonderful situations,
  14494. careful attention must be paid to error checking.  The two most common error conditions
  14495. are missing resources and lack of memory.  Some error reporting and recovery facilities
  14496. have been provided in the Control Panel to help with errors encountered in a cdev.
  14497.  
  14498. Because the Control Panel has no direct information about the cdev, the cdev’s code
  14499. must be able to detect and recover from error conditions on its own.  If the recovery
  14500. cannot be effected the cdev must dispose of any memory it has allocated, and exit
  14501. back to the Control Panel with an error code.
  14502.  
  14503. Following a shutdown, the Control Panel can help report the error condition to the
  14504. user and prevent accidental reentry into the cdev that might result from such things
  14505. as an update event.  A cdev can request three different error reporting mechanisms
  14506. from the Control Panel:
  14507.  
  14508.   •  If a memory error has occured, then, after the cdev has safely shut
  14509.      itself down, it may request the Control Panel to issue an out-of-memory
  14510.      error message and gray out (paint over with the background pattern) the
  14511.      cdev area of the Control Panel window.  It will remain grayed until
  14512.      another cdev is selected.  The Control Panel window itself is not
  14513.      closed since other cdevs may still be able to function in the environment.
  14514.   •  If a resource error is detected, the cdev may request that a
  14515.      can’t-find-needed-resource error message be issued.
  14516.   •  The cdev may display its own error message and then call on the
  14517.      Control Panel to gray its area.
  14518.  
  14519. The Control Panel uses the cdevValue parameter to send status information to the
  14520. cdev, and a proper cdev uses its function value to send information back to the
  14521. Control Panel.  In the absence of errors, the same value passes back and forth: the
  14522. Control Panel puts the last function value it received into cdevValue when it calls
  14523. the cdev; the cdev returns the value it finds there as the function value.  The cdev
  14524. may want to keep a handle to its own storage, in which case passing it as the function
  14525. value ensures its availability, since the Control Panel will pass it back in cdevValue
  14526. at the next call.
  14527.  
  14528. Four constants have been defined for this cdev/Control Panel communication:
  14529.  
  14530. CONST
  14531.   cdevUnset   =     3;    {initial value passed in cdevValue}
  14532.   cdevGenErr  =    -1;    {generic cdev error}
  14533.   cdevMemErr  =     0;    {insufficient memory for cdev execution}
  14534.   cdevResErr  =     1;    {missing resource needed by cdev}
  14535.  
  14536. After the macDev call, the Control Panel sends cdevUnset in cdevValue, so that until
  14537. an error occurs or the cdev uses its function value as a handle, cdevUnset is passed
  14538. back and forth.  If the cdev encounters an error, it should dispose of all handles
  14539. and pointers it has set up, strip the stack back to the same position as a normal
  14540. exit, and return one of the three error codes as the function result.  The Control
  14541. Panel will respond as follows:
  14542.  
  14543.   Function           Message to                     Control Panel Action    
  14544.   Result             Control Panel   
  14545.  
  14546.   cdevGenErr         The cdev has encountered an    Gray out the cdev’s area,
  14547.                      error from which it cannot     send a 0 in cdevValue in
  14548.                      recover, but do not put up     succeeding cdev calls
  14549.                      an error dialog.
  14550.  
  14551.   cdevMemErr         The cdev has determined that   Gray out cdev’s area, put
  14552.                      there is not enough memory to  up error dialog, send a 0
  14553.                      execute; please put up a       in cdevValue in succeeding
  14554.                      memory error dialog.           cdev calls.
  14555.  
  14556.   cdevResErr         The cdev can’t find a needed   Gray out cdev’s area, put
  14557.                      resource; please put up a      up error dialog, send a 0
  14558.                      resource error dialog.         in cdevValue in succeeding
  14559.                                                     cdev calls.
  14560.  
  14561.   all other values,  No error conditions.           Send the value back in
  14562.   either handles                                    cdevValue.
  14563.   or cdevUnset
  14564.  
  14565. The cdev code should check cdevValue at entry.  A 0 means that the Control Panel has
  14566. responded to a cdev error message by shutting down the cdev and displaying an error
  14567. dialog if one was requested.  The cdev should immediately exit.
  14568.  
  14569. Once the Control Panel has responded to an error message from a cdev it will no
  14570. longer respond to any return values until another cdev is launched.
  14571.  
  14572. æKY cancelMsg
  14573. æFp Devices.p
  14574. æT CONST
  14575. æD cancelMsg = 3; {user clicked Cancel button}
  14576. æC 
  14577. »CDEV ERROR CHECKING
  14578. _______________________________________________________________________________
  14579.  
  14580. Because a desk accessory may be called into many strange and wonderful situations,
  14581. careful attention must be paid to error checking.  The two most common error conditions
  14582. are missing resources and lack of memory.  Some error reporting and recovery facilities
  14583. have been provided in the Control Panel to help with errors encountered in a cdev.
  14584.  
  14585. Because the Control Panel has no direct information about the cdev, the cdev’s code
  14586. must be able to detect and recover from error conditions on its own.  If the recovery
  14587. cannot be effected the cdev must dispose of any memory it has allocated, and exit
  14588. back to the Control Panel with an error code.
  14589.  
  14590. Following a shutdown, the Control Panel can help report the error condition to the
  14591. user and prevent accidental reentry into the cdev that might result from such things
  14592. as an update event.  A cdev can request three different error reporting mechanisms
  14593. from the Control Panel:
  14594.  
  14595.   •  If a memory error has occured, then, after the cdev has safely shut
  14596.      itself down, it may request the Control Panel to issue an out-of-memory
  14597.      error message and gray out (paint over with the background pattern) the
  14598.      cdev area of the Control Panel window.  It will remain grayed until
  14599.      another cdev is selected.  The Control Panel window itself is not
  14600.      closed since other cdevs may still be able to function in the environment.
  14601.   •  If a resource error is detected, the cdev may request that a
  14602.      can’t-find-needed-resource error message be issued.
  14603.   •  The cdev may display its own error message and then call on the
  14604.      Control Panel to gray its area.
  14605.  
  14606. The Control Panel uses the cdevValue parameter to send status information to the
  14607. cdev, and a proper cdev uses its function value to send information back to the
  14608. Control Panel.  In the absence of errors, the same value passes back and forth: the
  14609. Control Panel puts the last function value it received into cdevValue when it calls
  14610. the cdev; the cdev returns the value it finds there as the function value.  The cdev
  14611. may want to keep a handle to its own storage, in which case passing it as the function
  14612. value ensures its availability, since the Control Panel will pass it back in cdevValue
  14613. at the next call.
  14614.  
  14615. Four constants have been defined for this cdev/Control Panel communication:
  14616.  
  14617. CONST
  14618.   cdevUnset   =     3;    {initial value passed in cdevValue}
  14619.   cdevGenErr  =    -1;    {generic cdev error}
  14620.   cdevMemErr  =     0;    {insufficient memory for cdev execution}
  14621.   cdevResErr  =     1;    {missing resource needed by cdev}
  14622.  
  14623. After the macDev call, the Control Panel sends cdevUnset in cdevValue, so that until
  14624. an error occurs or the cdev uses its function value as a handle, cdevUnset is passed
  14625. back and forth.  If the cdev encounters an error, it should dispose of all handles
  14626. and pointers it has set up, strip the stack back to the same position as a normal
  14627. exit, and return one of the three error codes as the function result.  The Control
  14628. Panel will respond as follows:
  14629.  
  14630.   Function           Message to                     Control Panel Action    
  14631.   Result             Control Panel   
  14632.  
  14633.   cdevGenErr         The cdev has encountered an    Gray out the cdev’s area,
  14634.                      error from which it cannot     send a 0 in cdevValue in
  14635.                      recover, but do not put up     succeeding cdev calls
  14636.                      an error dialog.
  14637.  
  14638.   cdevMemErr         The cdev has determined that   Gray out cdev’s area, put
  14639.                      there is not enough memory to  up error dialog, send a 0
  14640.                      execute; please put up a       in cdevValue in succeeding
  14641.                      memory error dialog.           cdev calls.
  14642.  
  14643.   cdevResErr         The cdev can’t find a needed   Gray out cdev’s area, put
  14644.                      resource; please put up a      up error dialog, send a 0
  14645.                      resource error dialog.         in cdevValue in succeeding
  14646.                                                     cdev calls.
  14647.  
  14648.   all other values,  No error conditions.           Send the value back in
  14649.   either handles                                    cdevValue.
  14650.   or cdevUnset
  14651.  
  14652. The cdev code should check cdevValue at entry.  A 0 means that the Control Panel has
  14653. responded to a cdev error message by shutting down the cdev and displaying an error
  14654. dialog if one was requested.  The cdev should immediately exit.
  14655.  
  14656. Once the Control Panel has responded to an error message from a cdev it will no
  14657. longer respond to any return values until another cdev is launched.
  14658.  
  14659. æKY hitMsg
  14660. æFp Devices.p
  14661. æT CONST
  14662. æD hitMsg = 4; {user clicked control in Options dialog}
  14663. æC 
  14664. »CDEV ERROR CHECKING
  14665. _______________________________________________________________________________
  14666.  
  14667. Because a desk accessory may be called into many strange and wonderful situations,
  14668. careful attention must be paid to error checking.  The two most common error conditions
  14669. are missing resources and lack of memory.  Some error reporting and recovery facilities
  14670. have been provided in the Control Panel to help with errors encountered in a cdev.
  14671.  
  14672. Because the Control Panel has no direct information about the cdev, the cdev’s code
  14673. must be able to detect and recover from error conditions on its own.  If the recovery
  14674. cannot be effected the cdev must dispose of any memory it has allocated, and exit
  14675. back to the Control Panel with an error code.
  14676.  
  14677. Following a shutdown, the Control Panel can help report the error condition to the
  14678. user and prevent accidental reentry into the cdev that might result from such things
  14679. as an update event.  A cdev can request three different error reporting mechanisms
  14680. from the Control Panel:
  14681.  
  14682.   •  If a memory error has occured, then, after the cdev has safely shut
  14683.      itself down, it may request the Control Panel to issue an out-of-memory
  14684.      error message and gray out (paint over with the background pattern) the
  14685.      cdev area of the Control Panel window.  It will remain grayed until
  14686.      another cdev is selected.  The Control Panel window itself is not
  14687.      closed since other cdevs may still be able to function in the environment.
  14688.   •  If a resource error is detected, the cdev may request that a
  14689.      can’t-find-needed-resource error message be issued.
  14690.   •  The cdev may display its own error message and then call on the
  14691.      Control Panel to gray its area.
  14692.  
  14693. The Control Panel uses the cdevValue parameter to send status information to the
  14694. cdev, and a proper cdev uses its function value to send information back to the
  14695. Control Panel.  In the absence of errors, the same value passes back and forth: the
  14696. Control Panel puts the last function value it received into cdevValue when it calls
  14697. the cdev; the cdev returns the value it finds there as the function value.  The cdev
  14698. may want to keep a handle to its own storage, in which case passing it as the function
  14699. value ensures its availability, since the Control Panel will pass it back in cdevValue
  14700. at the next call.
  14701.  
  14702. Four constants have been defined for this cdev/Control Panel communication:
  14703.  
  14704. CONST
  14705.   cdevUnset   =     3;    {initial value passed in cdevValue}
  14706.   cdevGenErr  =    -1;    {generic cdev error}
  14707.   cdevMemErr  =     0;    {insufficient memory for cdev execution}
  14708.   cdevResErr  =     1;    {missing resource needed by cdev}
  14709.  
  14710. After the macDev call, the Control Panel sends cdevUnset in cdevValue, so that until
  14711. an error occurs or the cdev uses its function value as a handle, cdevUnset is passed
  14712. back and forth.  If the cdev encounters an error, it should dispose of all handles
  14713. and pointers it has set up, strip the stack back to the same position as a normal
  14714. exit, and return one of the three error codes as the function result.  The Control
  14715. Panel will respond as follows:
  14716.  
  14717.   Function           Message to                     Control Panel Action    
  14718.   Result             Control Panel   
  14719.  
  14720.   cdevGenErr         The cdev has encountered an    Gray out the cdev’s area,
  14721.                      error from which it cannot     send a 0 in cdevValue in
  14722.                      recover, but do not put up     succeeding cdev calls
  14723.                      an error dialog.
  14724.  
  14725.   cdevMemErr         The cdev has determined that   Gray out cdev’s area, put
  14726.                      there is not enough memory to  up error dialog, send a 0
  14727.                      execute; please put up a       in cdevValue in succeeding
  14728.                      memory error dialog.           cdev calls.
  14729.  
  14730.   cdevResErr         The cdev can’t find a needed   Gray out cdev’s area, put
  14731.                      resource; please put up a      up error dialog, send a 0
  14732.                      resource error dialog.         in cdevValue in succeeding
  14733.                                                     cdev calls.
  14734.  
  14735.   all other values,  No error conditions.           Send the value back in
  14736.   either handles                                    cdevValue.
  14737.   or cdevUnset
  14738.  
  14739. The cdev code should check cdevValue at entry.  A 0 means that the Control Panel has
  14740. responded to a cdev error message by shutting down the cdev and displaying an error
  14741. dialog if one was requested.  The cdev should immediately exit.
  14742.  
  14743. Once the Control Panel has responded to an error message from a cdev it will no
  14744. longer respond to any return values until another cdev is launched.
  14745.  
  14746. æKY nulMsg
  14747. æFp Devices.p
  14748. æT CONST
  14749. æD nulMsg = 5; {periodic event}
  14750. æC 
  14751. »CDEV ERROR CHECKING
  14752. _______________________________________________________________________________
  14753.  
  14754. Because a desk accessory may be called into many strange and wonderful situations,
  14755. careful attention must be paid to error checking.  The two most common error conditions
  14756. are missing resources and lack of memory.  Some error reporting and recovery facilities
  14757. have been provided in the Control Panel to help with errors encountered in a cdev.
  14758.  
  14759. Because the Control Panel has no direct information about the cdev, the cdev’s code
  14760. must be able to detect and recover from error conditions on its own.  If the recovery
  14761. cannot be effected the cdev must dispose of any memory it has allocated, and exit
  14762. back to the Control Panel with an error code.
  14763.  
  14764. Following a shutdown, the Control Panel can help report the error condition to the
  14765. user and prevent accidental reentry into the cdev that might result from such things
  14766. as an update event.  A cdev can request three different error reporting mechanisms
  14767. from the Control Panel:
  14768.  
  14769.   •  If a memory error has occured, then, after the cdev has safely shut
  14770.      itself down, it may request the Control Panel to issue an out-of-memory
  14771.      error message and gray out (paint over with the background pattern) the
  14772.      cdev area of the Control Panel window.  It will remain grayed until
  14773.      another cdev is selected.  The Control Panel window itself is not
  14774.      closed since other cdevs may still be able to function in the environment.
  14775.   •  If a resource error is detected, the cdev may request that a
  14776.      can’t-find-needed-resource error message be issued.
  14777.   •  The cdev may display its own error message and then call on the
  14778.      Control Panel to gray its area.
  14779.  
  14780. The Control Panel uses the cdevValue parameter to send status information to the
  14781. cdev, and a proper cdev uses its function value to send information back to the
  14782. Control Panel.  In the absence of errors, the same value passes back and forth: the
  14783. Control Panel puts the last function value it received into cdevValue when it calls
  14784. the cdev; the cdev returns the value it finds there as the function value.  The cdev
  14785. may want to keep a handle to its own storage, in which case passing it as the function
  14786. value ensures its availability, since the Control Panel will pass it back in cdevValue
  14787. at the next call.
  14788.  
  14789. Four constants have been defined for this cdev/Control Panel communication:
  14790.  
  14791. CONST
  14792.   cdevUnset   =     3;    {initial value passed in cdevValue}
  14793.   cdevGenErr  =    -1;    {generic cdev error}
  14794.   cdevMemErr  =     0;    {insufficient memory for cdev execution}
  14795.   cdevResErr  =     1;    {missing resource needed by cdev}
  14796.  
  14797. After the macDev call, the Control Panel sends cdevUnset in cdevValue, so that until
  14798. an error occurs or the cdev uses its function value as a handle, cdevUnset is passed
  14799. back and forth.  If the cdev encounters an error, it should dispose of all handles
  14800. and pointers it has set up, strip the stack back to the same position as a normal
  14801. exit, and return one of the three error codes as the function result.  The Control
  14802. Panel will respond as follows:
  14803.  
  14804.   Function           Message to                     Control Panel Action    
  14805.   Result             Control Panel   
  14806.  
  14807.   cdevGenErr         The cdev has encountered an    Gray out the cdev’s area,
  14808.                      error from which it cannot     send a 0 in cdevValue in
  14809.                      recover, but do not put up     succeeding cdev calls
  14810.                      an error dialog.
  14811.  
  14812.   cdevMemErr         The cdev has determined that   Gray out cdev’s area, put
  14813.                      there is not enough memory to  up error dialog, send a 0
  14814.                      execute; please put up a       in cdevValue in succeeding
  14815.                      memory error dialog.           cdev calls.
  14816.  
  14817.   cdevResErr         The cdev can’t find a needed   Gray out cdev’s area, put
  14818.                      resource; please put up a      up error dialog, send a 0
  14819.                      resource error dialog.         in cdevValue in succeeding
  14820.                                                     cdev calls.
  14821.  
  14822.   all other values,  No error conditions.           Send the value back in
  14823.   either handles                                    cdevValue.
  14824.   or cdevUnset
  14825.  
  14826. The cdev code should check cdevValue at entry.  A 0 means that the Control Panel has
  14827. responded to a cdev error message by shutting down the cdev and displaying an error
  14828. dialog if one was requested.  The cdev should immediately exit.
  14829.  
  14830. Once the Control Panel has responded to an error message from a cdev it will no
  14831. longer respond to any return values until another cdev is launched.
  14832.  
  14833. æKY updateMsg
  14834. æFp Devices.p
  14835. æT CONST
  14836. æD updateMsg = 6; {update event}
  14837. æC 
  14838. »CDEV ERROR CHECKING
  14839. _______________________________________________________________________________
  14840.  
  14841. Because a desk accessory may be called into many strange and wonderful situations,
  14842. careful attention must be paid to error checking.  The two most common error conditions
  14843. are missing resources and lack of memory.  Some error reporting and recovery facilities
  14844. have been provided in the Control Panel to help with errors encountered in a cdev.
  14845.  
  14846. Because the Control Panel has no direct information about the cdev, the cdev’s code
  14847. must be able to detect and recover from error conditions on its own.  If the recovery
  14848. cannot be effected the cdev must dispose of any memory it has allocated, and exit
  14849. back to the Control Panel with an error code.
  14850.  
  14851. Following a shutdown, the Control Panel can help report the error condition to the
  14852. user and prevent accidental reentry into the cdev that might result from such things
  14853. as an update event.  A cdev can request three different error reporting mechanisms
  14854. from the Control Panel:
  14855.  
  14856.   •  If a memory error has occured, then, after the cdev has safely shut
  14857.      itself down, it may request the Control Panel to issue an out-of-memory
  14858.      error message and gray out (paint over with the background pattern) the
  14859.      cdev area of the Control Panel window.  It will remain grayed until
  14860.      another cdev is selected.  The Control Panel window itself is not
  14861.      closed since other cdevs may still be able to function in the environment.
  14862.   •  If a resource error is detected, the cdev may request that a
  14863.      can’t-find-needed-resource error message be issued.
  14864.   •  The cdev may display its own error message and then call on the
  14865.      Control Panel to gray its area.
  14866.  
  14867. The Control Panel uses the cdevValue parameter to send status information to the
  14868. cdev, and a proper cdev uses its function value to send information back to the
  14869. Control Panel.  In the absence of errors, the same value passes back and forth: the
  14870. Control Panel puts the last function value it received into cdevValue when it calls
  14871. the cdev; the cdev returns the value it finds there as the function value.  The cdev
  14872. may want to keep a handle to its own storage, in which case passing it as the function
  14873. value ensures its availability, since the Control Panel will pass it back in cdevValue
  14874. at the next call.
  14875.  
  14876. Four constants have been defined for this cdev/Control Panel communication:
  14877.  
  14878. CONST
  14879.   cdevUnset   =     3;    {initial value passed in cdevValue}
  14880.   cdevGenErr  =    -1;    {generic cdev error}
  14881.   cdevMemErr  =     0;    {insufficient memory for cdev execution}
  14882.   cdevResErr  =     1;    {missing resource needed by cdev}
  14883.  
  14884. After the macDev call, the Control Panel sends cdevUnset in cdevValue, so that until
  14885. an error occurs or the cdev uses its function value as a handle, cdevUnset is passed
  14886. back and forth.  If the cdev encounters an error, it should dispose of all handles
  14887. and pointers it has set up, strip the stack back to the same position as a normal
  14888. exit, and return one of the three error codes as the function result.  The Control
  14889. Panel will respond as follows:
  14890.  
  14891.   Function           Message to                     Control Panel Action    
  14892.   Result             Control Panel   
  14893.  
  14894.   cdevGenErr         The cdev has encountered an    Gray out the cdev’s area,
  14895.                      error from which it cannot     send a 0 in cdevValue in
  14896.                      recover, but do not put up     succeeding cdev calls
  14897.                      an error dialog.
  14898.  
  14899.   cdevMemErr         The cdev has determined that   Gray out cdev’s area, put
  14900.                      there is not enough memory to  up error dialog, send a 0
  14901.                      execute; please put up a       in cdevValue in succeeding
  14902.                      memory error dialog.           cdev calls.
  14903.  
  14904.   cdevResErr         The cdev can’t find a needed   Gray out cdev’s area, put
  14905.                      resource; please put up a      up error dialog, send a 0
  14906.                      resource error dialog.         in cdevValue in succeeding
  14907.                                                     cdev calls.
  14908.  
  14909.   all other values,  No error conditions.           Send the value back in
  14910.   either handles                                    cdevValue.
  14911.   or cdevUnset
  14912.  
  14913. The cdev code should check cdevValue at entry.  A 0 means that the Control Panel has
  14914. responded to a cdev error message by shutting down the cdev and displaying an error
  14915. dialog if one was requested.  The cdev should immediately exit.
  14916.  
  14917. Once the Control Panel has responded to an error message from a cdev it will no
  14918. longer respond to any return values until another cdev is launched.
  14919.  
  14920. æKY activateMsg
  14921. æFp Devices.p
  14922. æT CONST
  14923. æD activateMsg = 7; {not used}
  14924. æC 
  14925. »CDEV ERROR CHECKING
  14926. _______________________________________________________________________________
  14927.  
  14928. Because a desk accessory may be called into many strange and wonderful situations,
  14929. careful attention must be paid to error checking.  The two most common error conditions
  14930. are missing resources and lack of memory.  Some error reporting and recovery facilities
  14931. have been provided in the Control Panel to help with errors encountered in a cdev.
  14932.  
  14933. Because the Control Panel has no direct information about the cdev, the cdev’s code
  14934. must be able to detect and recover from error conditions on its own.  If the recovery
  14935. cannot be effected the cdev must dispose of any memory it has allocated, and exit
  14936. back to the Control Panel with an error code.
  14937.  
  14938. Following a shutdown, the Control Panel can help report the error condition to the
  14939. user and prevent accidental reentry into the cdev that might result from such things
  14940. as an update event.  A cdev can request three different error reporting mechanisms
  14941. from the Control Panel:
  14942.  
  14943.   •  If a memory error has occured, then, after the cdev has safely shut
  14944.      itself down, it may request the Control Panel to issue an out-of-memory
  14945.      error message and gray out (paint over with the background pattern) the
  14946.      cdev area of the Control Panel window.  It will remain grayed until
  14947.      another cdev is selected.  The Control Panel window itself is not
  14948.      closed since other cdevs may still be able to function in the environment.
  14949.   •  If a resource error is detected, the cdev may request that a
  14950.      can’t-find-needed-resource error message be issued.
  14951.   •  The cdev may display its own error message and then call on the
  14952.      Control Panel to gray its area.
  14953.  
  14954. The Control Panel uses the cdevValue parameter to send status information to the
  14955. cdev, and a proper cdev uses its function value to send information back to the
  14956. Control Panel.  In the absence of errors, the same value passes back and forth: the
  14957. Control Panel puts the last function value it received into cdevValue when it calls
  14958. the cdev; the cdev returns the value it finds there as the function value.  The cdev
  14959. may want to keep a handle to its own storage, in which case passing it as the function
  14960. value ensures its availability, since the Control Panel will pass it back in cdevValue
  14961. at the next call.
  14962.  
  14963. Four constants have been defined for this cdev/Control Panel communication:
  14964.  
  14965. CONST
  14966.   cdevUnset   =     3;    {initial value passed in cdevValue}
  14967.   cdevGenErr  =    -1;    {generic cdev error}
  14968.   cdevMemErr  =     0;    {insufficient memory for cdev execution}
  14969.   cdevResErr  =     1;    {missing resource needed by cdev}
  14970.  
  14971. After the macDev call, the Control Panel sends cdevUnset in cdevValue, so that until
  14972. an error occurs or the cdev uses its function value as a handle, cdevUnset is passed
  14973. back and forth.  If the cdev encounters an error, it should dispose of all handles
  14974. and pointers it has set up, strip the stack back to the same position as a normal
  14975. exit, and return one of the three error codes as the function result.  The Control
  14976. Panel will respond as follows:
  14977.  
  14978.   Function           Message to                     Control Panel Action    
  14979.   Result             Control Panel   
  14980.  
  14981.   cdevGenErr         The cdev has encountered an    Gray out the cdev’s area,
  14982.                      error from which it cannot     send a 0 in cdevValue in
  14983.                      recover, but do not put up     succeeding cdev calls
  14984.                      an error dialog.
  14985.  
  14986.   cdevMemErr         The cdev has determined that   Gray out cdev’s area, put
  14987.                      there is not enough memory to  up error dialog, send a 0
  14988.                      execute; please put up a       in cdevValue in succeeding
  14989.                      memory error dialog.           cdev calls.
  14990.  
  14991.   cdevResErr         The cdev can’t find a needed   Gray out cdev’s area, put
  14992.                      resource; please put up a      up error dialog, send a 0
  14993.                      resource error dialog.         in cdevValue in succeeding
  14994.                                                     cdev calls.
  14995.  
  14996.   all other values,  No error conditions.           Send the value back in
  14997.   either handles                                    cdevValue.
  14998.   or cdevUnset
  14999.  
  15000. The cdev code should check cdevValue at entry.  A 0 means that the Control Panel has
  15001. responded to a cdev error message by shutting down the cdev and displaying an error
  15002. dialog if one was requested.  The cdev should immediately exit.
  15003.  
  15004. Once the Control Panel has responded to an error message from a cdev it will no
  15005. longer respond to any return values until another cdev is launched.
  15006.  
  15007. æKY deactivateMsg
  15008. æFp Devices.p
  15009. æT CONST
  15010. æD deactivateMsg = 8; {not used}
  15011. æC 
  15012. »CDEV ERROR CHECKING
  15013. _______________________________________________________________________________
  15014.  
  15015. Because a desk accessory may be called into many strange and wonderful situations,
  15016. careful attention must be paid to error checking.  The two most common error conditions
  15017. are missing resources and lack of memory.  Some error reporting and recovery facilities
  15018. have been provided in the Control Panel to help with errors encountered in a cdev.
  15019.  
  15020. Because the Control Panel has no direct information about the cdev, the cdev’s code
  15021. must be able to detect and recover from error conditions on its own.  If the recovery
  15022. cannot be effected the cdev must dispose of any memory it has allocated, and exit
  15023. back to the Control Panel with an error code.
  15024.  
  15025. Following a shutdown, the Control Panel can help report the error condition to the
  15026. user and prevent accidental reentry into the cdev that might result from such things
  15027. as an update event.  A cdev can request three different error reporting mechanisms
  15028. from the Control Panel:
  15029.  
  15030.   •  If a memory error has occured, then, after the cdev has safely shut
  15031.      itself down, it may request the Control Panel to issue an out-of-memory
  15032.      error message and gray out (paint over with the background pattern) the
  15033.      cdev area of the Control Panel window.  It will remain grayed until
  15034.      another cdev is selected.  The Control Panel window itself is not
  15035.      closed since other cdevs may still be able to function in the environment.
  15036.   •  If a resource error is detected, the cdev may request that a
  15037.      can’t-find-needed-resource error message be issued.
  15038.   •  The cdev may display its own error message and then call on the
  15039.      Control Panel to gray its area.
  15040.  
  15041. The Control Panel uses the cdevValue parameter to send status information to the
  15042. cdev, and a proper cdev uses its function value to send information back to the
  15043. Control Panel.  In the absence of errors, the same value passes back and forth: the
  15044. Control Panel puts the last function value it received into cdevValue when it calls
  15045. the cdev; the cdev returns the value it finds there as the function value.  The cdev
  15046. may want to keep a handle to its own storage, in which case passing it as the function
  15047. value ensures its availability, since the Control Panel will pass it back in cdevValue
  15048. at the next call.
  15049.  
  15050. Four constants have been defined for this cdev/Control Panel communication:
  15051.  
  15052. CONST
  15053.   cdevUnset   =     3;    {initial value passed in cdevValue}
  15054.   cdevGenErr  =    -1;    {generic cdev error}
  15055.   cdevMemErr  =     0;    {insufficient memory for cdev execution}
  15056.   cdevResErr  =     1;    {missing resource needed by cdev}
  15057.  
  15058. After the macDev call, the Control Panel sends cdevUnset in cdevValue, so that until
  15059. an error occurs or the cdev uses its function value as a handle, cdevUnset is passed
  15060. back and forth.  If the cdev encounters an error, it should dispose of all handles
  15061. and pointers it has set up, strip the stack back to the same position as a normal
  15062. exit, and return one of the three error codes as the function result.  The Control
  15063. Panel will respond as follows:
  15064.  
  15065.   Function           Message to                     Control Panel Action    
  15066.   Result             Control Panel   
  15067.  
  15068.   cdevGenErr         The cdev has encountered an    Gray out the cdev’s area,
  15069.                      error from which it cannot     send a 0 in cdevValue in
  15070.                      recover, but do not put up     succeeding cdev calls
  15071.                      an error dialog.
  15072.  
  15073.   cdevMemErr         The cdev has determined that   Gray out cdev’s area, put
  15074.                      there is not enough memory to  up error dialog, send a 0
  15075.                      execute; please put up a       in cdevValue in succeeding
  15076.                      memory error dialog.           cdev calls.
  15077.  
  15078.   cdevResErr         The cdev can’t find a needed   Gray out cdev’s area, put
  15079.                      resource; please put up a      up error dialog, send a 0
  15080.                      resource error dialog.         in cdevValue in succeeding
  15081.                                                     cdev calls.
  15082.  
  15083.   all other values,  No error conditions.           Send the value back in
  15084.   either handles                                    cdevValue.
  15085.   or cdevUnset
  15086.  
  15087. The cdev code should check cdevValue at entry.  A 0 means that the Control Panel has
  15088. responded to a cdev error message by shutting down the cdev and displaying an error
  15089. dialog if one was requested.  The cdev should immediately exit.
  15090.  
  15091. Once the Control Panel has responded to an error message from a cdev it will no
  15092. longer respond to any return values until another cdev is launched.
  15093.  
  15094. æKY keyEvtMsg
  15095. æFp Devices.p
  15096. æT CONST
  15097. æD keyEvtMsg = 9; {keyboard event}
  15098. æC 
  15099. »CDEV ERROR CHECKING
  15100. _______________________________________________________________________________
  15101.  
  15102. Because a desk accessory may be called into many strange and wonderful situations,
  15103. careful attention must be paid to error checking.  The two most common error conditions
  15104. are missing resources and lack of memory.  Some error reporting and recovery facilities
  15105. have been provided in the Control Panel to help with errors encountered in a cdev.
  15106.  
  15107. Because the Control Panel has no direct information about the cdev, the cdev’s code
  15108. must be able to detect and recover from error conditions on its own.  If the recovery
  15109. cannot be effected the cdev must dispose of any memory it has allocated, and exit
  15110. back to the Control Panel with an error code.
  15111.  
  15112. Following a shutdown, the Control Panel can help report the error condition to the
  15113. user and prevent accidental reentry into the cdev that might result from such things
  15114. as an update event.  A cdev can request three different error reporting mechanisms
  15115. from the Control Panel:
  15116.  
  15117.   •  If a memory error has occured, then, after the cdev has safely shut
  15118.      itself down, it may request the Control Panel to issue an out-of-memory
  15119.      error message and gray out (paint over with the background pattern) the
  15120.      cdev area of the Control Panel window.  It will remain grayed until
  15121.      another cdev is selected.  The Control Panel window itself is not
  15122.      closed since other cdevs may still be able to function in the environment.
  15123.   •  If a resource error is detected, the cdev may request that a
  15124.      can’t-find-needed-resource error message be issued.
  15125.   •  The cdev may display its own error message and then call on the
  15126.      Control Panel to gray its area.
  15127.  
  15128. The Control Panel uses the cdevValue parameter to send status information to the
  15129. cdev, and a proper cdev uses its function value to send information back to the
  15130. Control Panel.  In the absence of errors, the same value passes back and forth: the
  15131. Control Panel puts the last function value it received into cdevValue when it calls
  15132. the cdev; the cdev returns the value it finds there as the function value.  The cdev
  15133. may want to keep a handle to its own storage, in which case passing it as the function
  15134. value ensures its availability, since the Control Panel will pass it back in cdevValue
  15135. at the next call.
  15136.  
  15137. Four constants have been defined for this cdev/Control Panel communication:
  15138.  
  15139. CONST
  15140.   cdevUnset   =     3;    {initial value passed in cdevValue}
  15141.   cdevGenErr  =    -1;    {generic cdev error}
  15142.   cdevMemErr  =     0;    {insufficient memory for cdev execution}
  15143.   cdevResErr  =     1;    {missing resource needed by cdev}
  15144.  
  15145. After the macDev call, the Control Panel sends cdevUnset in cdevValue, so that until
  15146. an error occurs or the cdev uses its function value as a handle, cdevUnset is passed
  15147. back and forth.  If the cdev encounters an error, it should dispose of all handles
  15148. and pointers it has set up, strip the stack back to the same position as a normal
  15149. exit, and return one of the three error codes as the function result.  The Control
  15150. Panel will respond as follows:
  15151.  
  15152.   Function           Message to                     Control Panel Action    
  15153.   Result             Control Panel   
  15154.  
  15155.   cdevGenErr         The cdev has encountered an    Gray out the cdev’s area,
  15156.                      error from which it cannot     send a 0 in cdevValue in
  15157.                      recover, but do not put up     succeeding cdev calls
  15158.                      an error dialog.
  15159.  
  15160.   cdevMemErr         The cdev has determined that   Gray out cdev’s area, put
  15161.                      there is not enough memory to  up error dialog, send a 0
  15162.                      execute; please put up a       in cdevValue in succeeding
  15163.                      memory error dialog.           cdev calls.
  15164.  
  15165.   cdevResErr         The cdev can’t find a needed   Gray out cdev’s area, put
  15166.                      resource; please put up a      up error dialog, send a 0
  15167.                      resource error dialog.         in cdevValue in succeeding
  15168.                                                     cdev calls.
  15169.  
  15170.   all other values,  No error conditions.           Send the value back in
  15171.   either handles                                    cdevValue.
  15172.   or cdevUnset
  15173.  
  15174. The cdev code should check cdevValue at entry.  A 0 means that the Control Panel has
  15175. responded to a cdev error message by shutting down the cdev and displaying an error
  15176. dialog if one was requested.  The cdev should immediately exit.
  15177.  
  15178. Once the Control Panel has responded to an error message from a cdev it will no
  15179. longer respond to any return values until another cdev is launched.
  15180.  
  15181. æKY superMsg
  15182. æFp Devices.p
  15183. æT CONST
  15184. æD superMsg = 10; {show superuser controls}
  15185. æC 
  15186. »CDEV ERROR CHECKING
  15187. _______________________________________________________________________________
  15188.  
  15189. Because a desk accessory may be called into many strange and wonderful situations,
  15190. careful attention must be paid to error checking.  The two most common error conditions
  15191. are missing resources and lack of memory.  Some error reporting and recovery facilities
  15192. have been provided in the Control Panel to help with errors encountered in a cdev.
  15193.  
  15194. Because the Control Panel has no direct information about the cdev, the cdev’s code
  15195. must be able to detect and recover from error conditions on its own.  If the recovery
  15196. cannot be effected the cdev must dispose of any memory it has allocated, and exit
  15197. back to the Control Panel with an error code.
  15198.  
  15199. Following a shutdown, the Control Panel can help report the error condition to the
  15200. user and prevent accidental reentry into the cdev that might result from such things
  15201. as an update event.  A cdev can request three different error reporting mechanisms
  15202. from the Control Panel:
  15203.  
  15204.   •  If a memory error has occured, then, after the cdev has safely shut
  15205.      itself down, it may request the Control Panel to issue an out-of-memory
  15206.      error message and gray out (paint over with the background pattern) the
  15207.      cdev area of the Control Panel window.  It will remain grayed until
  15208.      another cdev is selected.  The Control Panel window itself is not
  15209.      closed since other cdevs may still be able to function in the environment.
  15210.   •  If a resource error is detected, the cdev may request that a
  15211.      can’t-find-needed-resource error message be issued.
  15212.   •  The cdev may display its own error message and then call on the
  15213.      Control Panel to gray its area.
  15214.  
  15215. The Control Panel uses the cdevValue parameter to send status information to the
  15216. cdev, and a proper cdev uses its function value to send information back to the
  15217. Control Panel.  In the absence of errors, the same value passes back and forth: the
  15218. Control Panel puts the last function value it received into cdevValue when it calls
  15219. the cdev; the cdev returns the value it finds there as the function value.  The cdev
  15220. may want to keep a handle to its own storage, in which case passing it as the function
  15221. value ensures its availability, since the Control Panel will pass it back in cdevValue
  15222. at the next call.
  15223.  
  15224. Four constants have been defined for this cdev/Control Panel communication:
  15225.  
  15226. CONST
  15227.   cdevUnset   =     3;    {initial value passed in cdevValue}
  15228.   cdevGenErr  =    -1;    {generic cdev error}
  15229.   cdevMemErr  =     0;    {insufficient memory for cdev execution}
  15230.   cdevResErr  =     1;    {missing resource needed by cdev}
  15231.  
  15232. After the macDev call, the Control Panel sends cdevUnset in cdevValue, so that until
  15233. an error occurs or the cdev uses its function value as a handle, cdevUnset is passed
  15234. back and forth.  If the cdev encounters an error, it should dispose of all handles
  15235. and pointers it has set up, strip the stack back to the same position as a normal
  15236. exit, and return one of the three error codes as the function result.  The Control
  15237. Panel will respond as follows:
  15238.  
  15239.   Function           Message to                     Control Panel Action    
  15240.   Result             Control Panel   
  15241.  
  15242.   cdevGenErr         The cdev has encountered an    Gray out the cdev’s area,
  15243.                      error from which it cannot     send a 0 in cdevValue in
  15244.                      recover, but do not put up     succeeding cdev calls
  15245.                      an error dialog.
  15246.  
  15247.   cdevMemErr         The cdev has determined that   Gray out cdev’s area, put
  15248.                      there is not enough memory to  up error dialog, send a 0
  15249.                      execute; please put up a       in cdevValue in succeeding
  15250.                      memory error dialog.           cdev calls.
  15251.  
  15252.   cdevResErr         The cdev can’t find a needed   Gray out cdev’s area, put
  15253.                      resource; please put up a      up error dialog, send a 0
  15254.                      resource error dialog.         in cdevValue in succeeding
  15255.                                                     cdev calls.
  15256.  
  15257.   all other values,  No error conditions.           Send the value back in
  15258.   either handles                                    cdevValue.
  15259.   or cdevUnset
  15260.  
  15261. The cdev code should check cdevValue at entry.  A 0 means that the Control Panel has
  15262. responded to a cdev error message by shutting down the cdev and displaying an error
  15263. dialog if one was requested.  The cdev should immediately exit.
  15264.  
  15265. Once the Control Panel has responded to an error message from a cdev it will no
  15266. longer respond to any return values until another cdev is launched.
  15267.  
  15268. æKY normalMsg
  15269. æFp Devices.p
  15270. æT CONST
  15271. æD normalMsg = 11; {show only normal controls}
  15272. æC 
  15273. »CDEV ERROR CHECKING
  15274. _______________________________________________________________________________
  15275.  
  15276. Because a desk accessory may be called into many strange and wonderful situations,
  15277. careful attention must be paid to error checking.  The two most common error conditions
  15278. are missing resources and lack of memory.  Some error reporting and recovery facilities
  15279. have been provided in the Control Panel to help with errors encountered in a cdev.
  15280.  
  15281. Because the Control Panel has no direct information about the cdev, the cdev’s code
  15282. must be able to detect and recover from error conditions on its own.  If the recovery
  15283. cannot be effected the cdev must dispose of any memory it has allocated, and exit
  15284. back to the Control Panel with an error code.
  15285.  
  15286. Following a shutdown, the Control Panel can help report the error condition to the
  15287. user and prevent accidental reentry into the cdev that might result from such things
  15288. as an update event.  A cdev can request three different error reporting mechanisms
  15289. from the Control Panel:
  15290.  
  15291.   •  If a memory error has occured, then, after the cdev has safely shut
  15292.      itself down, it may request the Control Panel to issue an out-of-memory
  15293.      error message and gray out (paint over with the background pattern) the
  15294.      cdev area of the Control Panel window.  It will remain grayed until
  15295.      another cdev is selected.  The Control Panel window itself is not
  15296.      closed since other cdevs may still be able to function in the environment.
  15297.   •  If a resource error is detected, the cdev may request that a
  15298.      can’t-find-needed-resource error message be issued.
  15299.   •  The cdev may display its own error message and then call on the
  15300.      Control Panel to gray its area.
  15301.  
  15302. The Control Panel uses the cdevValue parameter to send status information to the
  15303. cdev, and a proper cdev uses its function value to send information back to the
  15304. Control Panel.  In the absence of errors, the same value passes back and forth: the
  15305. Control Panel puts the last function value it received into cdevValue when it calls
  15306. the cdev; the cdev returns the value it finds there as the function value.  The cdev
  15307. may want to keep a handle to its own storage, in which case passing it as the function
  15308. value ensures its availability, since the Control Panel will pass it back in cdevValue
  15309. at the next call.
  15310.  
  15311. Four constants have been defined for this cdev/Control Panel communication:
  15312.  
  15313. CONST
  15314.   cdevUnset   =     3;    {initial value passed in cdevValue}
  15315.   cdevGenErr  =    -1;    {generic cdev error}
  15316.   cdevMemErr  =     0;    {insufficient memory for cdev execution}
  15317.   cdevResErr  =     1;    {missing resource needed by cdev}
  15318.  
  15319. After the macDev call, the Control Panel sends cdevUnset in cdevValue, so that until
  15320. an error occurs or the cdev uses its function value as a handle, cdevUnset is passed
  15321. back and forth.  If the cdev encounters an error, it should dispose of all handles
  15322. and pointers it has set up, strip the stack back to the same position as a normal
  15323. exit, and return one of the three error codes as the function result.  The Control
  15324. Panel will respond as follows:
  15325.  
  15326.   Function           Message to                     Control Panel Action    
  15327.   Result             Control Panel   
  15328.  
  15329.   cdevGenErr         The cdev has encountered an    Gray out the cdev’s area,
  15330.                      error from which it cannot     send a 0 in cdevValue in
  15331.                      recover, but do not put up     succeeding cdev calls
  15332.                      an error dialog.
  15333.  
  15334.   cdevMemErr         The cdev has determined that   Gray out cdev’s area, put
  15335.                      there is not enough memory to  up error dialog, send a 0
  15336.                      execute; please put up a       in cdevValue in succeeding
  15337.                      memory error dialog.           cdev calls.
  15338.  
  15339.   cdevResErr         The cdev can’t find a needed   Gray out cdev’s area, put
  15340.                      resource; please put up a      up error dialog, send a 0
  15341.                      resource error dialog.         in cdevValue in succeeding
  15342.                                                     cdev calls.
  15343.  
  15344.   all other values,  No error conditions.           Send the value back in
  15345.   either handles                                    cdevValue.
  15346.   or cdevUnset
  15347.  
  15348. The cdev code should check cdevValue at entry.  A 0 means that the Control Panel has
  15349. responded to a cdev error message by shutting down the cdev and displaying an error
  15350. dialog if one was requested.  The cdev should immediately exit.
  15351.  
  15352. Once the Control Panel has responded to an error message from a cdev it will no
  15353. longer respond to any return values until another cdev is launched.
  15354.  
  15355. æKY startupMsg
  15356. æFp Devices.p
  15357. æT CONST
  15358. æD startupMsg = 12; {code has been loaded}
  15359. æC 
  15360. »CDEV ERROR CHECKING
  15361. _______________________________________________________________________________
  15362.  
  15363. Because a desk accessory may be called into many strange and wonderful situations,
  15364. careful attention must be paid to error checking.  The two most common error conditions
  15365. are missing resources and lack of memory.  Some error reporting and recovery facilities
  15366. have been provided in the Control Panel to help with errors encountered in a cdev.
  15367.  
  15368. Because the Control Panel has no direct information about the cdev, the cdev’s code
  15369. must be able to detect and recover from error conditions on its own.  If the recovery
  15370. cannot be effected the cdev must dispose of any memory it has allocated, and exit
  15371. back to the Control Panel with an error code.
  15372.  
  15373. Following a shutdown, the Control Panel can help report the error condition to the
  15374. user and prevent accidental reentry into the cdev that might result from such things
  15375. as an update event.  A cdev can request three different error reporting mechanisms
  15376. from the Control Panel:
  15377.  
  15378.   •  If a memory error has occured, then, after the cdev has safely shut
  15379.      itself down, it may request the Control Panel to issue an out-of-memory
  15380.      error message and gray out (paint over with the background pattern) the
  15381.      cdev area of the Control Panel window.  It will remain grayed until
  15382.      another cdev is selected.  The Control Panel window itself is not
  15383.      closed since other cdevs may still be able to function in the environment.
  15384.   •  If a resource error is detected, the cdev may request that a
  15385.      can’t-find-needed-resource error message be issued.
  15386.   •  The cdev may display its own error message and then call on the
  15387.      Control Panel to gray its area.
  15388.  
  15389. The Control Panel uses the cdevValue parameter to send status information to the
  15390. cdev, and a proper cdev uses its function value to send information back to the
  15391. Control Panel.  In the absence of errors, the same value passes back and forth: the
  15392. Control Panel puts the last function value it received into cdevValue when it calls
  15393. the cdev; the cdev returns the value it finds there as the function value.  The cdev
  15394. may want to keep a handle to its own storage, in which case passing it as the function
  15395. value ensures its availability, since the Control Panel will pass it back in cdevValue
  15396. at the next call.
  15397.  
  15398. Four constants have been defined for this cdev/Control Panel communication:
  15399.  
  15400. CONST
  15401.   cdevUnset   =     3;    {initial value passed in cdevValue}
  15402.   cdevGenErr  =    -1;    {generic cdev error}
  15403.   cdevMemErr  =     0;    {insufficient memory for cdev execution}
  15404.   cdevResErr  =     1;    {missing resource needed by cdev}
  15405.  
  15406. After the macDev call, the Control Panel sends cdevUnset in cdevValue, so that until
  15407. an error occurs or the cdev uses its function value as a handle, cdevUnset is passed
  15408. back and forth.  If the cdev encounters an error, it should dispose of all handles
  15409. and pointers it has set up, strip the stack back to the same position as a normal
  15410. exit, and return one of the three error codes as the function result.  The Control
  15411. Panel will respond as follows:
  15412.  
  15413.   Function           Message to                     Control Panel Action    
  15414.   Result             Control Panel   
  15415.  
  15416.   cdevGenErr         The cdev has encountered an    Gray out the cdev’s area,
  15417.                      error from which it cannot     send a 0 in cdevValue in
  15418.                      recover, but do not put up     succeeding cdev calls
  15419.                      an error dialog.
  15420.  
  15421.   cdevMemErr         The cdev has determined that   Gray out cdev’s area, put
  15422.                      there is not enough memory to  up error dialog, send a 0
  15423.                      execute; please put up a       in cdevValue in succeeding
  15424.                      memory error dialog.           cdev calls.
  15425.  
  15426.   cdevResErr         The cdev can’t find a needed   Gray out cdev’s area, put
  15427.                      resource; please put up a      up error dialog, send a 0
  15428.                      resource error dialog.         in cdevValue in succeeding
  15429.                                                     cdev calls.
  15430.  
  15431.   all other values,  No error conditions.           Send the value back in
  15432.   either handles                                    cdevValue.
  15433.   or cdevUnset
  15434.  
  15435. The cdev code should check cdevValue at entry.  A 0 means that the Control Panel has
  15436. responded to a cdev error message by shutting down the cdev and displaying an error
  15437. dialog if one was requested.  The cdev should immediately exit.
  15438.  
  15439. Once the Control Panel has responded to an error message from a cdev it will no
  15440. longer respond to any return values until another cdev is launched.
  15441.  
  15442. æKY DCtlEntry
  15443. DCtlPtr
  15444. DCtlHandle
  15445. æFp Devices.p
  15446. æT RECORD
  15447. æD DCtlPtr = ^DCtlEntry;
  15448. DCtlHandle = ^DCtlPtr;
  15449. DCtlEntry = RECORD
  15450.     dCtlDriver: Ptr;
  15451.     dCtlFlags: INTEGER;
  15452.     dCtlQHdr: QHdr;
  15453.     dCtlPosition: LONGINT;
  15454.     dCtlStorage: Handle;
  15455.     dCtlRefNum: INTEGER;
  15456.     dCtlCurTicks: LONGINT;
  15457.     dCtlWindow: WindowPtr;
  15458.     dCtlDelay: INTEGER;
  15459.     dCtlEMask: INTEGER;
  15460.     dCtlMenu: INTEGER;
  15461.     END;
  15462. æC 
  15463. »Device Control Entry
  15464.  
  15465. The first time a driver is opened, information about it is read into a structure in
  15466. memory called a device control entry. A device control entry contains the header of
  15467. the driver’s I/O queue, the location of the driver’s routines, and other information.
  15468. A device control entry is a 40-byte relocatable block located in the system heap.
  15469. It’s locked while the driver is open, and unlocked while the driver is closed.
  15470.  
  15471. Most of the data in the device control entry is stored and accessed only by the
  15472. Device Manager, but in some cases the driver itself must store into it. The structure
  15473. of a device control entry is shown below; note that the first four words of the
  15474. driver are copied into the dCtlFlags, dCtlDelay, dCtlEMask, and dCtlMenu fields.
  15475.  
  15476. TYPE  DCtlEntry = RECORD
  15477.                     dCtlDriver:    Ptr;        {pointer to ROM driver or }
  15478.                                                { handle to RAM driver}
  15479.                     dCtlFlags:     INTEGER;    {flags}
  15480.                     dCtlQHdr:      QHdr;       {driver I/O queue header}
  15481.                     dCtlPosition:  LONGINT;    {byte position used by Read }
  15482.                                                { and Write calls}
  15483.                     dCtlStorage:   Handle;     {handle to RAM driver's }
  15484.                                                { private storage}
  15485.                     dCtlRefNum:    INTEGER;    {driver reference number}
  15486.                     dCtlCurTicks:  LONGINT;    {used internally}
  15487.                     dCtlWindow:    WindowPtr;  {pointer to driver's window}
  15488.                     dCtlDelay:     INTEGER;    {number of ticks between }
  15489.                                                { periodic actions}
  15490.                     dCtlEMask:     INTEGER;    {desk accessory event mask}
  15491.                     dCtlMenu:      INTEGER     {menu ID of menu associated
  15492.                                                { with driver}
  15493.                   END;
  15494.  
  15495.       DCtlPtr    = ^DCtlEntry;
  15496.       DCtlHandle = ^DCtlPtr;
  15497.  
  15498. The low-order byte of the dCtlFlags word contains the following flags:
  15499.  
  15500. Bit number    Meaning
  15501.  
  15502.     5         Set if driver is open
  15503.     6         Set if driver is RAM-based
  15504.     7         Set if driver is currently executing
  15505.  
  15506. Assembly-language note:  These flags can be accessed with the global
  15507.                          constants dOpened, dRAMBased, and drvrActive.
  15508.  
  15509. The high-order byte of the dCtlFlags word contains flags copied from the drvrFlags
  15510. word of the driver, as described above.
  15511.  
  15512. DCtlQHdr contains the header of the driver’s I/O queue (described below). DCtlPosition
  15513. is used only by drivers of block devices, and indicates the current source or destination
  15514. position of a Read or Write call. The position is given as a number of bytes beyond
  15515. the physical beginning of the medium used by the device. For example, if one logical
  15516. block of data has just been read from a 3 1/2-inch disk via the Disk Driver, dCtlPosition
  15517. will be 512.
  15518.  
  15519. ROM drivers generally use locations in low memory for their local storage. RAM drivers
  15520. may reserve memory within their code space, or allocate a relocatable block and keep
  15521. a handle to it in dCtlStorage (if the block resides in the application heap, its
  15522. handle will be set to NIL when the heap is reinitialized).
  15523.  
  15524. You can get a handle to a driver’s device control entry by calling the Device Manager
  15525. function GetDCtlEntry.
  15526.  
  15527. æKY AuxDCE
  15528. AuxDCEPtr
  15529. AuxDCEHandle
  15530. æFp Devices.p
  15531. æT RECORD
  15532. æD AuxDCEPtr = ^AuxDCE;
  15533. AuxDCEHandle = ^AuxDCEPtr;
  15534. AuxDCE = PACKED RECORD
  15535.     dCtlDriver: Ptr;
  15536.     dCtlFlags: INTEGER;
  15537.     dCtlQHdr: QHdr;
  15538.     dCtlPosition: LONGINT;
  15539.     dCtlStorage: Handle;
  15540.     dCtlRefNum: INTEGER;
  15541.     dCtlCurTicks: LONGINT;
  15542.     dCtlWindow: GrafPtr;
  15543.     dCtlDelay: INTEGER;
  15544.     dCtlEMask: INTEGER;
  15545.     dCtlMenu: INTEGER;
  15546.     dCtlSlot: Byte;
  15547.     dCtlSlotId: Byte;
  15548.     dCtlDevBase: LONGINT;
  15549.     dCtlOwner: Ptr;
  15550.     dCtlExtDev: Byte;
  15551.     fillByte: Byte;
  15552.     END;
  15553. æC 
  15554.  
  15555. æKY GetDCtlEntry
  15556. æFp Devices.p
  15557. æT FUNCTION
  15558. æD FUNCTION GetDCtlEntry(refNum: INTEGER): DCtlHandle;
  15559. æDT myVariable := GetDCtlEntry(refNum);
  15560. æMM
  15561. æRT 71
  15562. æRI II-190
  15563. æC 
  15564. [Not in ROM]
  15565.  
  15566. GetDCtlEntry returns a handle to the device control entry of the device driver having
  15567. the reference number refNum.
  15568.  
  15569. Assembly-language note:  You can get a handle to a driver’s device control
  15570.                          entry from the unit table, as described below.
  15571.  
  15572. æKY SetChooserAlert
  15573. æFp Devices.p
  15574. æT FUNCTION
  15575. æD FUNCTION SetChooserAlert(f: BOOLEAN): BOOLEAN;
  15576. æDT myVariable := SetChooserAlert(f);
  15577. æRI V-431
  15578. æC f f is true, the Chooser will put up the page setup alert; if f is false
  15579. it won’t.  SetChooserAlert returns the original alert state.  The 
  15580. application should restore the original alert state when it exits.
  15581. _____________________________________________________________________________________
  15582. Assembly-language note:  If the psAlert bit of the low-memory global
  15583. HiliteMode is 0 then no page setup alert will be generated. 
  15584. Applications that set or clear this bit must be sure not to affect
  15585. any other bits in the byte and to restore the bit as they leave.
  15586.      
  15587. HiliteMode  equ  $938
  15588. psAlert     equ  6
  15589. bclr        #psAlert,HiliteMode
  15590. bset        #psAlert,HiliteMode
  15591. _____________________________________________________________________________________
  15592.  
  15593. æKY OpenDriver
  15594. æFp Devices.p
  15595. æT FUNCTION
  15596. æD FUNCTION OpenDriver(name: Str255;VAR drvrRefNum: INTEGER): OSErr;
  15597. æDT myVariable := OpenDriver(name,drvrRefNum);
  15598. æMM
  15599. æRI II-178, N14-2
  15600. æC 
  15601. [Not in ROM]
  15602.  
  15603. OpenDriver opens the device driver specified by name and returns its reference number
  15604. in refNum.
  15605.  
  15606. Result codes    noErr           No error
  15607.                 badUnitErr      Bad reference number
  15608.                 dInstErr        Couldn’t find driver in resource file
  15609.                 openErr         Driver can’t perform the requested
  15610.                                 reading or writing
  15611.                 unitEmptyErr    Bad reference number
  15612.  
  15613. æKY CloseDriver
  15614. æFp Devices.p
  15615. æT FUNCTION
  15616. æD FUNCTION CloseDriver(refNum: INTEGER): OSErr;
  15617. æDT myVariable := CloseDriver(refNum);
  15618. æRI II-178
  15619. æC 
  15620. [Not in ROM]
  15621.  
  15622. CloseDriver closes the device driver having the reference number refNum. Any pending
  15623. I/O is completed, and the memory used by the driver is released.
  15624.  
  15625. Warning:  Before using this command to close a particular driver, refer
  15626.           to the chapter describing the driver for the consequences of
  15627.           closing it.
  15628.  
  15629. Result codes    noErr           No error
  15630.                 badUnitErr      Bad reference number
  15631.                 dRemoveErr      Attempt to remove an open driver
  15632.                 unitEmptyErr    Bad reference number
  15633.  
  15634. æKY Control
  15635. æFp Devices.p
  15636. æT FUNCTION
  15637. æD FUNCTION Control(refNum: INTEGER;csCode: INTEGER;csParamPtr: Ptr): OSErr;
  15638. æDT myVariable := Control(refNum,csCode,csParamPtr);
  15639. æMM
  15640. æRI II-186
  15641. æC 
  15642. [Not in ROM]
  15643.  
  15644. Control sends control information to the device driver having the reference number
  15645. refNum. The type of information sent is specified by csCode, and the information
  15646. itself is pointed to by csParamPtr. The values passed in csCode and pointed to by
  15647. csParamPtr depend on the driver being called.
  15648.  
  15649. Result codes    noErr           No error
  15650.                 badUnitErr      Bad reference number
  15651.                 notOpenErr      Driver isn’t open
  15652.                 unitEmptyErr    Bad reference number
  15653.                 controlErr      Driver can’t respond to this Control call
  15654.  
  15655. æKY Status
  15656. æFp Devices.p
  15657. æT FUNCTION
  15658. æD FUNCTION Status(refNum: INTEGER;csCode: INTEGER;csParamPtr: Ptr): OSErr;
  15659. æDT myVariable := Status(refNum,csCode,csParamPtr);
  15660. æMM
  15661. æRI II-186
  15662. æC 
  15663. [Not in ROM]
  15664.  
  15665. Status returns status information about the device driver having the reference number
  15666. refNum. The type of information returned is specified by csCode, and the information
  15667. itself is pointed to by csParamPtr. The values passed in csCode and pointed to by
  15668. csParamPtr depend on the driver being called.
  15669.  
  15670. Result codes    noErr           No error
  15671.                 badUnitErr      Bad reference number
  15672.                 notOpenErr      Driver isn’t open
  15673.                 unitEmptyErr    Bad reference number
  15674.                 statusErr       Driver can’t respond to this Status call
  15675.  
  15676. æKY KillIO
  15677. æFp Devices.p
  15678. æT FUNCTION
  15679. æD FUNCTION KillIO(refNum: INTEGER): OSErr;
  15680. æDT myVariable := KillIO(refNum);
  15681. æRI II-179 
  15682. æC 
  15683. [Not in ROM]
  15684.  
  15685. KillIO terminates all current and pending I/O with the device driver having the
  15686. reference number refNum.
  15687.  
  15688. Result codes    noErr           No error
  15689.                 badUnitErr      Bad reference number
  15690.                 unitEmptyErr    Bad reference number
  15691.  
  15692. æKY PBControl
  15693. æFp Devices.p
  15694. æT FUNCTION
  15695. æD FUNCTION PBControl(paramBlock: ParmBlkPtr;async: BOOLEAN): OSErr;
  15696. æDT myVariable := PBControl(paramBlock,async);
  15697. æMM
  15698. æRI II-186
  15699. æC 
  15700. Trap macro    _Control
  15701.  
  15702. Parameter block
  15703.   -->    12    ioCompletion  pointer
  15704.   <--    16    ioResult      word
  15705.   -->    22    ioVRefNum     word
  15706.   -->    24    ioRefNum      word
  15707.   -->    26    csCode        word
  15708.   -->    28    csParam       record
  15709.  
  15710. PBControl sends control information to the device driver having the reference number
  15711. ioRefNum; the drive number, if any, is specified by ioVRefNum. The type of information
  15712. sent is specified by csCode, and the information itself begins at csParam. The values
  15713. passed in csCode and csParam depend on the driver being called.
  15714.  
  15715. Result codes    noErr           No error
  15716.                 badUnitErr      Bad reference number
  15717.                 notOpenErr      Driver isn’t open
  15718.                 unitEmptyErr    Bad reference number
  15719.                 controlErr      Driver can’t respond to this Control call
  15720.  
  15721. æKY PBControlSync
  15722. æFp Devices.p
  15723. æT FUNCTION
  15724. æTN A004
  15725. æD FUNCTION PBControlSync(paramBlock: ParmBlkPtr): OSErr;
  15726.     INLINE $205F,$A004,$3E80;
  15727. æDT myVariable := PBControlSync(paramBlock,A0);
  15728. æMM
  15729. æRI II-186
  15730. æC 
  15731. Trap macro    _Control
  15732.  
  15733. Parameter block
  15734.   -->    12    ioCompletion  pointer
  15735.   <--    16    ioResult      word
  15736.   -->    22    ioVRefNum     word
  15737.   -->    24    ioRefNum      word
  15738.   -->    26    csCode        word
  15739.   -->    28    csParam       record
  15740.  
  15741. PBControl sends control information to the device driver having the reference number
  15742. ioRefNum; the drive number, if any, is specified by ioVRefNum. The type of information
  15743. sent is specified by csCode, and the information itself begins at csParam. The values
  15744. passed in csCode and csParam depend on the driver being called.
  15745.  
  15746. Result codes    noErr           No error
  15747.                 badUnitErr      Bad reference number
  15748.                 notOpenErr      Driver isn’t open
  15749.                 unitEmptyErr    Bad reference number
  15750.                 controlErr      Driver can’t respond to this Control call
  15751.  
  15752. æKY PBControlAsync
  15753. æFp Devices.p
  15754. æT FUNCTION
  15755. æTN A404
  15756. æD FUNCTION PBControlAsync(paramBlock: ParmBlkPtr): OSErr;
  15757.     INLINE $205F,$A404,$3E80;
  15758. æDT myVariable := PBControlAsync(paramBlock,A0);
  15759. æMM
  15760. æRI II-186
  15761. æC 
  15762. Trap macro    _Control
  15763.  
  15764. Parameter block
  15765.   -->    12    ioCompletion  pointer
  15766.   <--    16    ioResult      word
  15767.   -->    22    ioVRefNum     word
  15768.   -->    24    ioRefNum      word
  15769.   -->    26    csCode        word
  15770.   -->    28    csParam       record
  15771.  
  15772. PBControl sends control information to the device driver having the reference number
  15773. ioRefNum; the drive number, if any, is specified by ioVRefNum. The type of information
  15774. sent is specified by csCode, and the information itself begins at csParam. The values
  15775. passed in csCode and csParam depend on the driver being called.
  15776.  
  15777. Result codes    noErr           No error
  15778.                 badUnitErr      Bad reference number
  15779.                 notOpenErr      Driver isn’t open
  15780.                 unitEmptyErr    Bad reference number
  15781.                 controlErr      Driver can’t respond to this Control call
  15782.  
  15783. æKY PBStatus
  15784. æFp Devices.p
  15785. æT FUNCTION
  15786. æD FUNCTION PBStatus(paramBlock: ParmBlkPtr;async: BOOLEAN): OSErr;
  15787. æDT myVariable := PBStatus(paramBlock,async);
  15788. æMM
  15789. æRI II-186
  15790. æC 
  15791. Trap macro    _Status
  15792.  
  15793. Parameter block
  15794.   -->    12    ioCompletion  pointer
  15795.   <--    16    ioResult      word
  15796.   -->    22    ioVRefNum     word
  15797.   -->    24    ioRefNum      word
  15798.   -->    26    csCode        word
  15799.   <--    28    csParam       record
  15800.  
  15801. PBStatus returns status information about the device driver having the reference
  15802. number ioRefNum; the drive number, if any, is specified by ioVRefNum. The type of
  15803. information returned is specified by csCode, and the information itself begins at
  15804. csParam. The values passed in csCode and csParam depend on the driver being called.
  15805.  
  15806. Result codes    noErr           No error
  15807.                 badUnitErr      Bad reference number
  15808.                 notOpenErr      Driver isn’t open
  15809.                 unitEmptyErr    Bad reference number
  15810.                 statusErr       Driver can’t respond to this Status call
  15811.  
  15812. æKY PBStatusSync
  15813. æFp Devices.p
  15814. æT FUNCTION
  15815. æTN A005
  15816. æD FUNCTION PBStatusSync(paramBlock: ParmBlkPtr): OSErr;
  15817.     INLINE $205F,$A005,$3E80;
  15818. æDT myVariable := PBStatusSync(paramBlock,A0);
  15819. æMM
  15820. æRI II-186
  15821. æC 
  15822. Trap macro    _Status
  15823.  
  15824. Parameter block
  15825.   -->    12    ioCompletion  pointer
  15826.   <--    16    ioResult      word
  15827.   -->    22    ioVRefNum     word
  15828.   -->    24    ioRefNum      word
  15829.   -->    26    csCode        word
  15830.   <--    28    csParam       record
  15831.  
  15832. PBStatus returns status information about the device driver having the reference
  15833. number ioRefNum; the drive number, if any, is specified by ioVRefNum. The type of
  15834. information returned is specified by csCode, and the information itself begins at
  15835. csParam. The values passed in csCode and csParam depend on the driver being called.
  15836.  
  15837. Result codes    noErr           No error
  15838.                 badUnitErr      Bad reference number
  15839.                 notOpenErr      Driver isn’t open
  15840.                 unitEmptyErr    Bad reference number
  15841.                 statusErr       Driver can’t respond to this Status call
  15842.  
  15843. æKY PBStatusAsync
  15844. æFp Devices.p
  15845. æT FUNCTION
  15846. æTN A405
  15847. æD FUNCTION PBStatusAsync(paramBlock: ParmBlkPtr): OSErr;
  15848.     INLINE $205F,$A405,$3E80;
  15849. æDT myVariable := PBStatusAsync(paramBlock,A0);
  15850. æMM
  15851. æRI II-186
  15852. æC 
  15853. Trap macro    _Status
  15854.  
  15855. Parameter block
  15856.   -->    12    ioCompletion  pointer
  15857.   <--    16    ioResult      word
  15858.   -->    22    ioVRefNum     word
  15859.   -->    24    ioRefNum      word
  15860.   -->    26    csCode        word
  15861.   <--    28    csParam       record
  15862.  
  15863. PBStatus returns status information about the device driver having the reference
  15864. number ioRefNum; the drive number, if any, is specified by ioVRefNum. The type of
  15865. information returned is specified by csCode, and the information itself begins at
  15866. csParam. The values passed in csCode and csParam depend on the driver being called.
  15867.  
  15868. Result codes    noErr           No error
  15869.                 badUnitErr      Bad reference number
  15870.                 notOpenErr      Driver isn’t open
  15871.                 unitEmptyErr    Bad reference number
  15872.                 statusErr       Driver can’t respond to this Status call
  15873.  
  15874. æKY PBKillIO
  15875. æFp Devices.p
  15876. æT FUNCTION
  15877. æD FUNCTION PBKillIO(paramBlock: ParmBlkPtr;async: BOOLEAN): OSErr;
  15878. æDT myVariable := PBKillIO(paramBlock,async);
  15879. æRI II-187
  15880. æC 
  15881. Trap macro    _KillIO
  15882.  
  15883. Parameter block
  15884.   -->    12    ioCompletion  pointer
  15885.   <--    16    ioResult      word
  15886.   -->    24    ioRefNum      word
  15887.  
  15888. PBKillIO stops any current I/O request being processed, and removes all pending I/O
  15889. requests from the I/O queue of the device driver having the reference number ioRefNum.
  15890. The completion routine of each pending I/O request is called, with the ioResult field
  15891. of each request equal to the result code abortErr.
  15892.  
  15893. Result codes    noErr           No error
  15894.                 badUnitErr      Bad reference number
  15895.                 unitEmptyErr    Bad reference number
  15896.  
  15897. æKY PBKillIOSync
  15898. æFp Devices.p
  15899. æT FUNCTION
  15900. æTN A006
  15901. æD FUNCTION PBKillIOSync(paramBlock: ParmBlkPtr): OSErr;
  15902.     INLINE $205F,$A006,$3E80;
  15903. æDT myVariable := PBKillIOSync(paramBlock,A0);
  15904. æRI II-187
  15905. æC 
  15906. Trap macro    _KillIO
  15907.  
  15908. Parameter block
  15909.   -->    12    ioCompletion  pointer
  15910.   <--    16    ioResult      word
  15911.   -->    24    ioRefNum      word
  15912.  
  15913. PBKillIO stops any current I/O request being processed, and removes all pending I/O
  15914. requests from the I/O queue of the device driver having the reference number ioRefNum.
  15915. The completion routine of each pending I/O request is called, with the ioResult field
  15916. of each request equal to the result code abortErr.
  15917.  
  15918. Result codes    noErr           No error
  15919.                 badUnitErr      Bad reference number
  15920.                 unitEmptyErr    Bad reference number
  15921.  
  15922. æKY PBKillIOAsync
  15923. æFp Devices.p
  15924. æT FUNCTION
  15925. æTN A406
  15926. æD FUNCTION PBKillIOAsync(paramBlock: ParmBlkPtr): OSErr;
  15927.     INLINE $205F,$A406,$3E80;
  15928. æDT myVariable := PBKillIOAsync(paramBlock,A0);
  15929. æRI II-187
  15930. æC 
  15931. Trap macro    _KillIO
  15932.  
  15933. Parameter block
  15934.   -->    12    ioCompletion  pointer
  15935.   <--    16    ioResult      word
  15936.   -->    24    ioRefNum      word
  15937.  
  15938. PBKillIO stops any current I/O request being processed, and removes all pending I/O
  15939. requests from the I/O queue of the device driver having the reference number ioRefNum.
  15940. The completion routine of each pending I/O request is called, with the ioResult field
  15941. of each request equal to the result code abortErr.
  15942.  
  15943. Result codes    noErr           No error
  15944.                 badUnitErr      Bad reference number
  15945.                 unitEmptyErr    Bad reference number
  15946.  
  15947.  
  15948. æKY Dialogs.p
  15949. æKL Alert
  15950. CautionAlert
  15951. CloseDialog
  15952. CouldAlert
  15953. CouldDialog
  15954. DialogSelect
  15955. DisposDialog
  15956. DisposeDialog
  15957. DlgCopy
  15958. DlgCut
  15959. DlgDelete
  15960. DlgPaste
  15961. DrawDialog
  15962. ErrorSound
  15963. FindDItem
  15964. FreeAlert
  15965. FreeDialog
  15966. GetAlrtStage
  15967. GetDItem
  15968. GetIText
  15969. GetNewDialog
  15970. HideDItem
  15971. InitDialogs
  15972. IsDialogEvent
  15973. ModalDialog
  15974. NewCDialog
  15975. NewDialog
  15976. NoteAlert
  15977. ParamText
  15978. ResetAlrtStage
  15979. SelIText
  15980. SetDAFont
  15981. SetDItem
  15982. SetIText
  15983. ShowDItem
  15984. StopAlert
  15985. UpdateDialog
  15986. UpdtDialog
  15987.  
  15988. AlertTemplate
  15989. AlertTHndl
  15990. AlertTPtr
  15991. btnCtrl
  15992. cancel
  15993. cautionIcon
  15994. chkCtrl
  15995. ctrlItem
  15996. DialogPeek
  15997. DialogPtr
  15998. DialogRecord
  15999. DialogTemplate
  16000. DialogTHndl
  16001. DialogTPtr
  16002. editText
  16003. iconItem
  16004. itemDisable
  16005. ModalFilterProcPtr
  16006. noteIcon
  16007. ok
  16008. picItem
  16009. radCtrl
  16010. resCtrl
  16011. ResumeProcPtr
  16012. SoundProcPtr
  16013. StageList
  16014. statText
  16015. stopIcon
  16016. userItem
  16017.  
  16018. æKY ctrlItem
  16019. æFp Dialogs.p
  16020. æT CONST
  16021. æD ctrlItem = 4;
  16022. æC 
  16023.  
  16024. æKY btnCtrl
  16025. æFp Dialogs.p
  16026. æT CONST
  16027. æD btnCtrl = 0;
  16028. æC 
  16029.  
  16030. æKY chkCtrl
  16031. æFp Dialogs.p
  16032. æT CONST
  16033. æD chkCtrl = 1;
  16034. æC 
  16035.  
  16036. æKY radCtrl
  16037. æFp Dialogs.p
  16038. æT CONST
  16039. æD radCtrl = 2;
  16040. æC 
  16041.  
  16042. æKY resCtrl
  16043. æFp Dialogs.p
  16044. æT CONST
  16045. æD resCtrl = 3;
  16046. æC 
  16047.  
  16048. æKY statText
  16049. æFp Dialogs.p
  16050. æT CONST
  16051. æD statText = 8;
  16052. æC 
  16053.  
  16054. æKY editText
  16055. æFp Dialogs.p
  16056. æT CONST
  16057. æD editText = 16;
  16058. æC 
  16059.  
  16060. æKY iconItem
  16061. æFp Dialogs.p
  16062. æT CONST
  16063. æD iconItem = 32;
  16064. æC 
  16065.  
  16066. æKY picItem
  16067. æFp Dialogs.p
  16068. æT CONST
  16069. æD picItem = 64;
  16070. æC 
  16071.  
  16072. æKY userItem
  16073. æFp Dialogs.p
  16074. æT CONST
  16075. æD userItem = 0;
  16076. æC 
  16077.  
  16078. æKY itemDisable
  16079. æFp Dialogs.p
  16080. æT CONST
  16081. æD itemDisable = 128;
  16082. æC 
  16083.  
  16084. æKY ok
  16085. æFp Dialogs.p
  16086. æT CONST
  16087. æD ok = 1;
  16088. æC 
  16089.  
  16090. æKY cancel
  16091. æFp Dialogs.p
  16092. æT CONST
  16093. æD cancel = 2;
  16094. æC 
  16095.  
  16096. æKY stopIcon
  16097. æFp Dialogs.p
  16098. æT CONST
  16099. æD stopIcon = 0;
  16100. æC 
  16101.  
  16102. æKY noteIcon
  16103. æFp Dialogs.p
  16104. æT CONST
  16105. æD noteIcon = 1;
  16106. æC 
  16107.  
  16108. æKY cautionIcon
  16109. æFp Dialogs.p
  16110. æT CONST
  16111. æD cautionIcon = 2;
  16112. æC 
  16113.  
  16114. æKY ResumeProcPtr
  16115. æFp Dialogs.p
  16116. æT TYPE
  16117. æD ResumeProcPtr = ProcPtr; { PROCEDURE Resume; } 
  16118. æC 
  16119.  
  16120. æKY SoundProcPtr
  16121. æFp Dialogs.p
  16122. æT TYPE
  16123. æD SoundProcPtr = ProcPtr; { PROCEDURE DoSound; } 
  16124. æC 
  16125.  
  16126. æKY ModalFilterProcPtr
  16127. æFp Dialogs.p
  16128. æT TYPE
  16129. æD ModalFilterProcPtr = ProcPtr; { FUNCTION Filter(theDialog: DialogPtr; VAR theEvent: EventRecord; VAR itemHit: INTEGER): BOOLEAN; }
  16130. æC 
  16131.  
  16132. æKY DialogRecord
  16133. DialogPeek
  16134. æFp Dialogs.p
  16135. æT RECORD
  16136. æD DialogPeek = ^DialogRecord;
  16137. DialogRecord = RECORD
  16138.     window: WindowRecord;
  16139.     items: Handle;
  16140.     textH: TEHandle;
  16141.     editField: INTEGER;
  16142.     editOpen: INTEGER;
  16143.     aDefItem: INTEGER;
  16144.     END;
  16145. æC 
  16146. »The DialogRecord Data Type
  16147.  
  16148. For those who want to know more about the data structure of a dialog record, the
  16149. exact structure is given here.
  16150.  
  16151. TYPE  DialogRecord = RECORD
  16152.                        window:     WindowRecord;  {dialog window}
  16153.                        items:      Handle;        {item list}
  16154.                        textH:      TEHandle;      {current editText item}
  16155.                        editField:  INTEGER;       {editText item number minus 1}
  16156.                        editOpen:   INTEGER;       {used internally}
  16157.                        aDefItem:   INTEGER        {default button item number}
  16158.                      END;
  16159.  
  16160. The window field contains the window record for the dialog window. The items field
  16161. contains a handle to the item list used for the dialog. (Remember that after reading
  16162. an item list from a resource file, the Dialog Manager makes a copy of it and uses
  16163. that copy.)
  16164.  
  16165. Note:  To get or change information about an item in a dialog, you pass the
  16166.        dialog pointer and the item number to a Dialog Manager procedure.
  16167.        You’ll never access information directly through the handle to the
  16168.        item list.
  16169.  
  16170. The Dialog Manager uses the next three fields when there are one or more editText
  16171. items in the dialog. If there’s more than one such item, these fields apply to the
  16172. one that currently is selected or displays the insertion point. The textH field
  16173. contains the handle to the edit record used by TextEdit. EditField is 1 less than the
  16174. item number of the current editText item, or –1 if there’s no editText item in the
  16175. dialog. The editOpen field is used internally by the Dialog Manager.
  16176.  
  16177. Note:  Actually, a single edit record is shared by all editText items; any
  16178.        changes you make to it will apply to all such items. See the TextEdit
  16179.        chapter for details about what kinds of changes you can make.
  16180.  
  16181. The aDefItem field is used for modal dialogs and alerts, which are treated internally
  16182. as special modal dialogs. It contains the item number of the default button. The
  16183. default button for a modal dialog is the first item in the item list, so this field
  16184. contains 1 for modal dialogs. The default button for an alert is specified in the
  16185. alert template; see the following section for more information.
  16186.  
  16187. æKY DialogPtr
  16188. æFp Dialogs.p
  16189. æT RECORD
  16190. æD DialogPtr = WindowPtr;
  16191. æC 
  16192. »Dialog Pointers
  16193.  
  16194. There are two types of dialog pointer, DialogPtr and DialogPeek, analogous to the
  16195. window pointer types WindowPtr and WindowPeek. Most programmers will only need to use
  16196. DialogPtr.
  16197.  
  16198. The Dialog Manager defines the following type of dialog pointer:
  16199.  
  16200. TYPE  DialogPtr = WindowPtr;
  16201.  
  16202. It can do this because the first field of a dialog record contains the window record
  16203. for the dialog window. This type of pointer can be used to access fields of the
  16204. window record or can be passed to Window Manager routines that expect window pointers
  16205. as parameters. Since the WindowPtr data type is itself defined as GrafPtr, this type
  16206. of dialog pointer can also be used to access fields of the dialog window’s grafPort
  16207. or passed to QuickDraw routines that expect pointers to grafPorts as parameters.
  16208.  
  16209. For programmers who want to access dialog record fields beyond the window record, the
  16210. Dialog Manager also defines the following type of dialog pointer:
  16211.  
  16212. TYPE  DialogPeek = ^DialogRecord;
  16213.  
  16214. Assembly-language note:  From assembly language, of course, there’s no
  16215.                          type checking on pointers, and the two types
  16216.                          of pointer are equal.
  16217.  
  16218. _______________________________________________________________________________
  16219.  
  16220. »The DialogRecord Data Type
  16221.  
  16222. For those who want to know more about the data structure of a dialog record, the
  16223. exact structure is given here.
  16224.  
  16225. TYPE  DialogRecord = RECORD
  16226.                        window:     WindowRecord;  {dialog window}
  16227.                        items:      Handle;        {item list}
  16228.                        textH:      TEHandle;      {current editText item}
  16229.                        editField:  INTEGER;       {editText item number minus 1}
  16230.                        editOpen:   INTEGER;       {used internally}
  16231.                        aDefItem:   INTEGER        {default button item number}
  16232.                      END;
  16233.  
  16234. The window field contains the window record for the dialog window. The items field
  16235. contains a handle to the item list used for the dialog. (Remember that after reading
  16236. an item list from a resource file, the Dialog Manager makes a copy of it and uses
  16237. that copy.)
  16238.  
  16239. Note:  To get or change information about an item in a dialog, you pass the
  16240.        dialog pointer and the item number to a Dialog Manager procedure.
  16241.        You’ll never access information directly through the handle to the
  16242.        item list.
  16243.  
  16244. The Dialog Manager uses the next three fields when there are one or more editText
  16245. items in the dialog. If there’s more than one such item, these fields apply to the
  16246. one that currently is selected or displays the insertion point. The textH field
  16247. contains the handle to the edit record used by TextEdit. EditField is 1 less than the
  16248. item number of the current editText item, or –1 if there’s no editText item in the
  16249. dialog. The editOpen field is used internally by the Dialog Manager.
  16250.  
  16251. Note:  Actually, a single edit record is shared by all editText items; any
  16252.        changes you make to it will apply to all such items. See the TextEdit
  16253.        chapter for details about what kinds of changes you can make.
  16254.  
  16255. The aDefItem field is used for modal dialogs and alerts, which are treated internally
  16256. as special modal dialogs. It contains the item number of the default button. The
  16257. default button for a modal dialog is the first item in the item list, so this field
  16258. contains 1 for modal dialogs. The default button for an alert is specified in the
  16259. alert template; see the following section for more information.
  16260.  
  16261. _______________________________________________________________________________
  16262.  
  16263. »THE DRAWING ENVIRONMENT:  GRAFPORT
  16264. _______________________________________________________________________________
  16265.  
  16266. A grafPort is a complete drawing environment that defines where and how graphic
  16267. operations will take place. You can have many grafPorts open at once, and each one
  16268. will have its own coordinate system, drawing pattern, background pattern, pen size
  16269. and location, character font and style, and bit map in which drawing takes place. You
  16270. can instantly switch from one port to another. GrafPorts are the structures upon
  16271. which a program builds windows, which are fundamental to the Macintosh “overlapping
  16272. windows” user interface. Besides being used for windows on the screen, grafPorts are
  16273. used for printing and for off-screen drawing.
  16274.  
  16275. A grafPort is defined as follows:
  16276.  
  16277. TYPE  GrafPtr   =  ^GrafPort;
  16278.       GrafPort  =  RECORD
  16279.                      device:      INTEGER;    {device-specific information}
  16280.                      portBits:    BitMap;     {grafPort's bit map}
  16281.                      portRect:    Rect;       {grafPort's rectangle}
  16282.                      visRgn:      RgnHandle;  {visible region}
  16283.                      clipRgn:     RgnHandle;  {clipping region}
  16284.                      bkPat:       Pattern;    {background pattern}
  16285.                      fillPat:     Pattern;    {fill pattern}
  16286.                      pnLoc:       Point;      {pen location}
  16287.                      pnSize:      Point;      {pen size}
  16288.                      pnMode:      INTEGER;    {pen's transfer mode}
  16289.                      pnPat:       Pattern;    {pen pattern}
  16290.                      pnVis:       INTEGER;    {pen visibility}
  16291.                      txFont:      INTEGER;    {font number for text}
  16292.                      txFace:      Style;      {text's character style}
  16293.                      txMode:      INTEGER;    {text's transfer mode}
  16294.                      txSize:      INTEGER;    {font size for text}
  16295.                      spExtra:     Fixed;      {extra space}
  16296.                      fgColor:     LONGINT;    {foreground color}
  16297.                      bkColor:     LONGINT;    {background color}
  16298.                      colrBit:     INTEGER;    {color bit}
  16299.                      patStretch:  INTEGER;    {used internally}
  16300.                      picSave:     Handle;     {picture being saved}
  16301.                      rgnSave:     Handle;     {region being saved}
  16302.                      polySave:    Handle;     {polygon being saved}
  16303.                      grafProcs:   QDProcsPtr  {low-level drawing routines}
  16304.                    END;
  16305.  
  16306. Note that picSave is a Handle used internally by QuickDraw while it is saving a
  16307. picture, and rgnSave and polySave are used by QuickDraw as flags; they are set to “1”
  16308. when the corresponding action is taking place.
  16309.  
  16310. All QuickDraw operations refer to grafPorts via grafPtrs. (For historical reasons,
  16311. grafPort is one of the few objects in the Macintosh system software that’s referred
  16312. to by a pointer rather than a handle.)
  16313.  
  16314. Warning:  You can access all fields and subfields of a grafPort normally,
  16315.           but you should not store new values directly into them. QuickDraw
  16316.           has routines for altering all fields of a grafPort, and using
  16317.           these routines ensures that changing a grafPort produces no
  16318.           unusual side effects.
  16319.  
  16320. The device field of a grafPort contains device-specific information that’s used by
  16321. the Font Manager to achieve the best possible results when drawing text in the grafPort.
  16322. There may be physical differences in the same logical font for different output
  16323. devices, to ensure the highest-quality printing on the device being used. The default
  16324. value of the device field is 0, for best results on output to the screen. For more
  16325. information, see the Font Manager chapter.
  16326.  
  16327. The portBits field is the bit map that points to the bit image to be used by the
  16328. grafPort. The default bit map uses the entire screen as its bit image. The bit map
  16329. may be changed to indicate a different structure in memory:  All graphics routines
  16330. work in exactly the same way regardless of whether their effects are visible on the
  16331. screen. A program can, for example, prepare an image to be printed on a printer
  16332. without ever displaying the image on the screen, or develop a picture in an off-screen
  16333. bit map before transferring it to the screen. The portBits.bounds rectangle determines
  16334. the coordinate system of the grafPort; all other coordinates in the grafPort are
  16335. expressed in this system.
  16336.  
  16337. The portRect field is a rectangle that defines a subset of the bit map that will be
  16338. used for drawing:  All drawing done by the application occurs inside the portRect.
  16339. Its coordinates are in the coordinate system defined by the portBits.bounds rectangle.
  16340. The portRect usually falls within the portBits.bounds rectangle, but it’s not required
  16341. to do so. The portRect usually defines the “writable” interior area of a window,
  16342. document, or other object on the screen.
  16343.  
  16344. The visRgn field is manipulated by the Window Manager; you will normally never change
  16345. a grafPort’s visRgn. It indicates the region of the grafPort that’s actually visible
  16346. on the screen, that is, the part of the window that’s not covered by other windows.
  16347. For example, if you move one window in front of another, the Window Manager logically
  16348. removes the area of overlap from the visRgn of the window in back. When you draw into
  16349. the back window, whatever’s being drawn is clipped to the visRgn so that it doesn’t
  16350. run over onto the front window. The default visRgn is set to the portRect.
  16351.  
  16352. The clipRgn is the grafPort’s clipping region, an arbitrary region that you can use
  16353. to limit drawing to any region within the portRect. If, for example, you want to draw
  16354. a half circle on the screen, you can set the clipRgn to half the square that would
  16355. enclose the whole circle, and then draw the whole circle. Only the half within the
  16356. clipRgn will actually be drawn in the grafPort. The default clipRgn is set arbitrarily
  16357. large, you have full control over its setting; as a matter of recommended programming
  16358. practice, it is advisable to make the default clipRgn rectangle smaller.
  16359.  
  16360. Figure 10 illustrates a typical bit map (as defined by portBits), portRect, visRgn,
  16361. and clipRgn.
  16362.  
  16363. •••Refer to Figure 10.•••
  16364.  
  16365. Figure 10–GrafPort Regions
  16366.  
  16367. The bkPat and fillPat fields of a grafPort contain patterns used by certain QuickDraw
  16368. routines. BkPat is the “background” pattern that’s used when an area is erased or
  16369. when bits are scrolled out of it. When asked to fill an area with a specified pattern,
  16370. QuickDraw stores the given pattern in the fillPat field and then calls a low-level
  16371. drawing routine that gets the pattern from that field. The various graphic operations
  16372. are discussed in detail later in the descriptions of individual QuickDraw routines.
  16373.  
  16374. Of the next ten fields, the first five determine characteristics of the graphics pen
  16375. and the last five determine characteristics of any text that may be drawn; these are
  16376. described in separate sections below.
  16377.  
  16378. The fgColor, bkColor, and colrBit fields contain values related to drawing in color.
  16379. FgColor is the grafPort’s foreground color and bkColor is its background color.
  16380. ColrBit tells the color imaging software which plane of the color picture to draw
  16381. into. For more information, see “Drawing in Color” in the section “General Discussion
  16382. of Drawing”.
  16383.  
  16384. The patStretch field is used during output to a printer to expand patterns if necessary.
  16385. The application should not change its value.
  16386.  
  16387. The picSave, rgnSave, and polySave fields reflect the state of picture, region, and
  16388. polygon definition, respectively. The application shouldn’t be concerned about exactly
  16389. what information the handle, if any, leads to; you may, however, save the current
  16390. value of rgnSave, set the field to NIL to disable the region definition, and later
  16391. restore it to the saved value to resume the region definition. The picSave and polySave
  16392. fields work similarly for pictures and polygons.
  16393.  
  16394. Finally, the grafProcs field may point to a special data structure that the application
  16395. stores into if it wants to customize QuickDraw drawing routines or use QuickDraw in
  16396. other advanced, highly specialized ways (see “Customizing QuickDraw Operations”). If
  16397. grafProcs is NIL, QuickDraw responds in the standard ways described in this chapter.
  16398.  
  16399. _______________________________________________________________________________
  16400.  
  16401. »Pen Characteristics
  16402.  
  16403. The pnLoc, pnSize, pnMode, pnPat, and pnVis fields of a grafPort deal with the graphics
  16404. “pen”. Each grafPort has one and only one such pen, which is used for drawing lines,
  16405. shapes, and text. The pen has four characteristics:  a location, a size (height and
  16406. width), a drawing mode, and a drawing pattern (see Figure
  16407. 11).
  16408.  
  16409. •••Refer to Figure 11.•••
  16410.  
  16411. Figure 11–A Graphics Pen
  16412.  
  16413. The pnLoc field specifies the point where QuickDraw will begin drawing the next line,
  16414. shape, or character. It can be anywhere on the coordinate plane:  There are no restrictions
  16415. on the movement or placement of the pen. Remember that the pen location is a point in
  16416. the grafPort’s coordinate system, not a pixel in a bit image. The top left corner of
  16417. the pen is at the pen location; the pen hangs below and to the right of this point.
  16418.  
  16419. The pen is rectangular in shape, and its width and height are specified by pnSize.
  16420. The default size is a 1-by-1-bit square; the width and height can range from (0,0) to
  16421. (30000,30000). If either the pen width or the pen height is less than 1, the pen will
  16422. not draw.
  16423.  
  16424. The pnMode and pnPat fields of a grafPort determine how the bits under the pen are
  16425. affected when lines or shapes are drawn. The pnPat is a pattern that’s used like the
  16426. “ink” in the pen. This pattern, like all other patterns drawn in the grafPort, is
  16427. always aligned with the port’s coordinate system:  The top left corner of the pattern
  16428. is aligned with the top left corner of the portRect, so that adjacent areas of the
  16429. same pattern will blend into a continuous, coordinated pattern.
  16430.  
  16431. The pnMode field determines how the pen pattern is to affect what’s already in the
  16432. bit image when lines or shapes are drawn. When the pen draws, QuickDraw first determines
  16433. what bits in the bit image will be affected and finds their corresponding bits in the
  16434. pattern. It then does a bit-by-bit comparison based on the pen mode, which specifies
  16435. one of eight Boolean operations to perform. The resulting bit is stored into its
  16436. proper place in the bit image. The pen modes are described under “Transfer Modes” in
  16437. the section “General Discussion of Drawing”.
  16438.  
  16439. The pnVis field determines the pen’s visibility, that is, whether it draws on the
  16440. screen. For more information, see the descriptions of HidePen and ShowPen under “Pen
  16441. and Line-Drawing Routines” in the “QuickDraw Routines” section.
  16442.  
  16443. _______________________________________________________________________________
  16444.  
  16445. »Text Characteristics
  16446.  
  16447. The txFont, txFace, txMode, txSize, and spExtra fields of a grafPort determine how
  16448. text will be drawn—the font, style, and size of characters and how they will be
  16449. placed in the bit image. QuickDraw can draw characters as quickly and easily as it
  16450. draws lines and shapes, and in many prepared fonts. Font means the complete set of
  16451. characters of one typeface. The characters may be drawn in any size and character
  16452. style (that is, with stylistic variations such as bold, italic, and underline).
  16453. Figure 12 shows two characters drawn by QuickDraw and some terms associated with
  16454. drawing text.
  16455.  
  16456. •••Refer to Figure 12.•••
  16457.  
  16458. Figure 12–QuickDraw Characters
  16459.  
  16460. Text is drawn with the base line positioned at the pen location.
  16461.  
  16462. The txFont field is a font number that identifies the character font to be used in
  16463. the grafPort. The font number 0 represents the system font. For more information
  16464. about the system font, the other font numbers recognized by the Font Manager, and the
  16465. construction, layout, and loading of fonts, see the Font Manager chapter.
  16466.  
  16467. A character font is defined as a collection of images that make up the individual
  16468. characters of the font. The characters can be of unequal widths, and they’re not
  16469. restricted to their “cells”:  The lower curl of a lowercase j, for example, can
  16470. stretch back under the previous character (typographers call this kerning). A font
  16471. can consist of up to 255 distinct characters, yet not all characters need to be
  16472. defined in a single font. In addition, each font contains a missing symbol to be
  16473. drawn in case of a request to draw a character that’s missing from the font.
  16474.  
  16475. The txFace field controls the character style of the text with values from the set
  16476. defined by the Style data type:
  16477.  
  16478. TYPE  StyleItem  = (bold,italic,underline,outline,shadow,condense,extend);
  16479.       Style      = SET OF StyleItem;
  16480.  
  16481. Assembly-language note:  In assembly language, this set is stored as a word
  16482.                          whose low-order byte contains bits representing the
  16483.                          style. The bit numbers are specified by the following
  16484.                          global constants:
  16485.  
  16486.                            boldBit       .EQU    0
  16487.                            italicBit     .EQU    1
  16488.                            ulineBit      .EQU    2
  16489.                            outlineBit    .EQU    3
  16490.                            shadowBit     .EQU    5
  16491.                            extendBit     .EQU    6
  16492.  
  16493.                          If all bits are 0, it represents the plain character
  16494.                          style.
  16495.  
  16496. You can apply stylistic variations either alone or in combination; Figure 13 illustrates
  16497. some as applied to the Geneva font. Most combinations usually look good only for
  16498. large font sizes.
  16499.  
  16500. •••Refer to Figure 13.•••
  16501.  
  16502. Figure 13–Stylistic Variations
  16503.  
  16504. If you specify bold, each character is repeatedly drawn one bit to the right an
  16505. appropriate number of times for extra thickness.
  16506.  
  16507. Italic adds an italic slant to the characters. Character bits above the base line are
  16508. skewed right; bits below the base line are skewed left.
  16509.  
  16510. Underline draws a line below the base line of the characters. If part of a character
  16511. descends below the base line (as “y” in Figure 13), the underline
  16512. isn’t drawn through the pixel on either side of the descending part.
  16513.  
  16514. Outline makes a hollow, outlined character rather than a solid one. Shadow also makes
  16515. an outlined character, but the outline is thickened below and to the right of the
  16516. character to achieve the effect of a shadow. If you specify bold along with outline
  16517. or shadow, the hollow part of the character is widened.
  16518.  
  16519. Condense and extend affect the horizontal distance between all characters, including
  16520. spaces. Condense decreases the distance between characters and extend increases it,
  16521. by an amount that the Font Manager determines is appropriate.
  16522.  
  16523. The txMode field controls the way characters are placed in the bit image. It functions
  16524. much like a pnMode:  When a character is drawn, QuickDraw determines which bits in
  16525. the bit image will be affected, does a bit-by-bit comparison based on the mode, and
  16526. stores the resulting bits into the bit image. These modes are described under “Transfer
  16527. Modes” in the section “General Discussion of Drawing”. Only three of them—srcOr,
  16528. srcXor, and srcBic—should be used for drawing text.
  16529.  
  16530. Note:  If you use scrCopy, some extra blank space will be appended at the
  16531.        end of the text.
  16532.  
  16533. The txSize field specifies the font size in points (where “point” is a typographical
  16534. term meaning approximately 1/72 inch). Any size from 1 to 127 points may be specified.
  16535. If the Font Manager doesn’t have the font in a specified size, it will scale a size
  16536. it does have as necessary to produce the size desired. A value of 0 in this field
  16537. represents the system font size (12 points).
  16538.  
  16539. Finally, the spExtra field is useful when a line of characters is to be drawn justified
  16540. such that it’s aligned with both a left and a right margin (sometimes called “full
  16541. justification”). SpExtra contains a fixed-point number equal to the average number of
  16542. pixels by which each space character should be widened to fill out the line. The
  16543. Fixed data type is described in the Macintosh Memory Management:  An Introduction
  16544. chapter.
  16545.  
  16546. _______________________________________________________________________________
  16547.  
  16548. »COORDINATES IN GRAFPORTS
  16549. _______________________________________________________________________________
  16550.  
  16551. Each grafPort has its own local coordinate system. All fields in the grafPort are
  16552. expressed in these coordinates, and all calculations and actions performed in QuickDraw
  16553. use the local coordinate system of the currently selected port.
  16554.  
  16555. Two things are important to remember:
  16556.  
  16557.   •  Each grafPort maps a portion of the coordinate plane into a similarly-
  16558.      sized portion of a bit image.
  16559.   •  The portBits.bounds rectangle defines the local coordinates for a grafPort.
  16560.  
  16561. The top left corner of portBits.bounds is always aligned around the first bit in the
  16562. bit image; the coordinates of that corner “anchor” a point on the grid to that bit in
  16563. the bit image. This forms a common reference point for multiple grafPorts that use
  16564. the same bit image (such as the screen); given a portBits.bounds rectangle for each
  16565. port, you know that their top left corners coincide.
  16566.  
  16567. The relationship between the portBits.bounds and portRect rectangles is very important:
  16568.  The portBits.bounds rectangle establishes a coordinate system for the port, and the
  16569. portRect rectangle indicates the section of the coordinate plane (and thus the bit
  16570. image) that will be used for drawing. The portRect usually falls inside the portBits.bounds
  16571. rectangle, but it’s not required to do so.
  16572.  
  16573. When a new grafPort is created, its bit map is set to point to the entire screen, and
  16574. both the portBits.bounds and the portRect are set to rectangles enclosing the screen.
  16575. The point (0,0) corresponds to the screen’s top left corner.
  16576.  
  16577. You can redefine the local coordinates of the top left corner of the grafPort’s
  16578. portRect, using the SetOrigin procedure. This offsets the coordinates of the grafPort’s
  16579. portBits.bounds rectangle, recalculating the coordinates of all points in the grafPort
  16580. to be relative to the new corner coordinates. For example, consider these procedure
  16581. calls:
  16582.  
  16583.   SetPort(gamePort);
  16584.   SetOrigin(90,80)
  16585.  
  16586. The call to SetPort sets the current grafPort to gamePort; the call to SetOrigin
  16587. changes the local coordinates of the top left corner of that port’s portRect to
  16588. (90,80) (see Figure 14).
  16589.  
  16590. •••Refer to Figure 14.•••
  16591.  
  16592. Figure 14–Changing Local Coordinates
  16593.  
  16594. This offsets the coordinates of the following elements:
  16595.  
  16596.   gamePort^.portBits.bounds
  16597.   gamePort^.portRect
  16598.   gamePort^.visRgn
  16599.  
  16600. These three elements are always kept “in sync”.
  16601.  
  16602. Notice that when the local coordinates of a grafPort are offset, the grafPort’s
  16603. clipRgn and pen location are not offset. A good way to think of it is that the port’s
  16604. structure “sticks” to the screen, while the document in the grafPort
  16605. (along with the pen and clipRgn) “sticks” to the coordinate system. For example, in
  16606. Figure 14, before SetOrigin, the visRgn and clipRgn are the same as the portRect.
  16607. After the SetOrigin call, the locations of portBits.bounds, portRect, and visRgn do
  16608. not change on the screen; their coordinates are simply offset. As always, the top
  16609. left corner of portBits.bounds remains “anchored” around the first bit in the bit
  16610. image (the first pixel on the screen); the image on the screen doesn’t move as a
  16611. result of SetOrigin. However, the pen location and clipRgn do move on the screen; the
  16612. top left corner of the clipRgn is still
  16613. (100,100), but this location has moved down and to the right, and the pen has similarly
  16614. moved.
  16615.  
  16616. If you’re moving, comparing, or otherwise dealing with mathematical items in different
  16617. grafPorts (for example, finding the intersection of two regions in two different
  16618. grafPorts), you must adjust to a common coordinate system before you perform the
  16619. operation. A QuickDraw procedure, LocalToGlobal, lets you convert a point’s local
  16620. coordinates to a global coordinate system where the top left corner of the bit image
  16621. is (0,0); by converting the various local coordinates to global coordinates, you can
  16622. compare and mix them with confidence. For more information, see the description of
  16623. LocaltoGlobal under “Calculations with Points” in the “QuickDraw Routines” section.
  16624.  
  16625. æKY DialogTemplate
  16626. DialogTPtr
  16627. DialogTHndl
  16628. æFp Dialogs.p
  16629. æT RECORD
  16630. æD DialogTPtr = ^DialogTemplate;
  16631. DialogTHndl = ^DialogTPtr;
  16632. DialogTemplate = RECORD
  16633.     boundsRect: Rect;
  16634.     procID: INTEGER;
  16635.     visible: BOOLEAN;
  16636.     filler1: BOOLEAN;
  16637.     goAwayFlag: BOOLEAN;
  16638.     filler2: BOOLEAN;
  16639.     refCon: LONGINT;
  16640.     itemsID: INTEGER;
  16641.     title: Str255;
  16642.     END;
  16643. æC 
  16644. »Dialog Templates in Memory
  16645.  
  16646. The data structure of a dialog template is as follows:
  16647.  
  16648. TYPE DialogTemplate = RECORD
  16649.                         boundsRect:  Rect;     {becomes window's portRect}
  16650.                         procID:      INTEGER;  {window definiton ID}
  16651.                         visible:     BOOLEAN;  {TRUE if visible}
  16652.                         filler1:     BOOLEAN;  {not used}
  16653.                         goAwayFlag:  BOOLEAN;  {TRUE if has go-away region}
  16654.                         filler2:     BOOLEAN;  {not used}
  16655.                         refCon:      LONGINT;  {window's reference value}
  16656.                         itemsID:     INTEGER;  {resource ID of item list}
  16657.                         title:       Str255    {window's title}
  16658.                       END;
  16659.  
  16660. The filler1 and filler2 fields are there because for historical reasons the goAwayFlag
  16661. and refCon fields have to begin on a word boundary. The itemsID field contains the
  16662. resource ID of the dialog’s item list. The other fields are the same as the parameters
  16663. of the same name in the NewDialog function; they provide information about the dialog
  16664. window.
  16665.  
  16666. You access the dialog template by converting the handle returned by the Resource
  16667. Manager to a template handle:
  16668.  
  16669. TYPE  DialogTHndl  = ^DialogTPtr;
  16670.       DialogTPtr   = ^DialogTemplate;
  16671.  
  16672. æKY StageList
  16673. æFp Dialogs.p
  16674. æT RECORD
  16675. æD StageList = PACKED RECORD
  16676.     boldItm4: 0..1; {default button item number - 1}
  16677.     boxDrwn4: BOOLEAN; {true if alert box to be drawn}
  16678.     sound4: 0..3; {sound number}
  16679.     boldItm3: 0..1;
  16680.     boxDrwn3: BOOLEAN;
  16681.     sound3: 0..3;
  16682.     boldItm2: 0..1;
  16683.     boxDrwn2: BOOLEAN;
  16684.     sound2: 0..3;
  16685.     boldItm1: 0..1;
  16686.     boxDrwn1: BOOLEAN;
  16687.     sound1: 0..3;
  16688.     END;
  16689. æC 
  16690. »Alert Templates in Memory
  16691.  
  16692. The data structure of an alert template is as follows:
  16693.  
  16694. TYPE AlertTemplate = RECORD
  16695.                        boundsRect:  Rect;      {becomes window's portRect}
  16696.                        itemsID:     INTEGER;   {resource ID of item list}
  16697.                        stages:      StageList  {alert stage information}
  16698.                      END;
  16699.  
  16700. BoundsRect is the rectangle that becomes the portRect of the window's grafPort. The
  16701. itemsID field contains the resource ID of the item list for the alert.
  16702.  
  16703. The information in the stages field determines exactly what should happen at each
  16704. stage of the alert. It's packed into a word that has the following structure:
  16705.  
  16706. TYPE StageList = PACKED RECORD
  16707.                    boldItm4:  0..1;     {default button item number minus 1}
  16708.                    boxDrwn4:  BOOLEAN;  {TRUE if alert box to be drawn}
  16709.                    sound4:    0..3      {sound number}
  16710.                    boldItm3:  0..1; 
  16711.                    boxDrwn3:  BOOLEAN; 
  16712.                    sound3:    0..3 
  16713.                    boldItm2:  0..1; 
  16714.                    boxDrwn2:  BOOLEAN; 
  16715.                    sound2:    0..3 
  16716.                    boldItm1:  0..1; 
  16717.                    boxDrwn1:  BOOLEAN; 
  16718.                    sound1:    0..3 
  16719.                  END;
  16720.  
  16721. Notice that the information is stored in reverse order—for the fourth stage first,
  16722. and for the first stage last.
  16723.  
  16724. The boldItm field indicates which button should be the default button (and therefore
  16725. boldly outlined in the alert box). If the first two items in the alert’s item list
  16726. are the OK button and the Cancel button, respectively, 0 will refer to the OK button
  16727. and 1 to the Cancel button. The reason for this is that the value of boldItm plus 1
  16728. is interpreted as an item number, and normally items 1 and 2 are the OK and Cancel
  16729. buttons, respectively. Whatever the item having the corresponding item number happens
  16730. to be, a bold rounded-corner rectangle will be drawn outside its display rectangle.
  16731.  
  16732. Note:  When deciding where to place items in an alert box, be sure to allow
  16733.        room for any bold outlines that may be drawn.
  16734.  
  16735. The boxDrwn field is TRUE if the alert box is to be drawn.
  16736.  
  16737. The sound field specifies which sound should be emitted at this stage of the alert,
  16738. with a number from 0 to 3 that’s passed to the current sound procedure. You can call
  16739. ErrorSound to specify your own sound procedure; if you don’t, the standard sound
  16740. procedure will be used (as described earlier in the “Alerts” section).
  16741.  
  16742. You access the alert template by converting the handle returned by the Resource
  16743. Manager to a template handle:
  16744.  
  16745. TYPE  AlertTHndl = ^AlertTPtr;
  16746.       AlertTPtr  = ^AlertTemplate;
  16747.  
  16748. Assembly-language note:  Rather than offsets into the fields of the StageList
  16749.                          data structure, there are masks for accessing the
  16750.                          information stored for an alert stage in a stages
  16751.                          word; they’re listed in the summary at the end of
  16752.                          this chapter.
  16753.  
  16754. æKY AlertTemplate
  16755. AlertTPtr
  16756. AlertTHndl
  16757. æFp Dialogs.p
  16758. æT RECORD
  16759. æD AlertTPtr = ^AlertTemplate;
  16760. AlertTHndl = ^AlertTPtr;
  16761. AlertTemplate = RECORD
  16762.     boundsRect: Rect;
  16763.     itemsID: INTEGER;
  16764.     stages: StageList;
  16765.     END;
  16766. æC 
  16767. »Alert Templates in Memory
  16768.  
  16769. The data structure of an alert template is as follows:
  16770.  
  16771. TYPE AlertTemplate = RECORD
  16772.                        boundsRect:  Rect;      {becomes window's portRect}
  16773.                        itemsID:     INTEGER;   {resource ID of item list}
  16774.                        stages:      StageList  {alert stage information}
  16775.                      END;
  16776.  
  16777. BoundsRect is the rectangle that becomes the portRect of the window's grafPort. The
  16778. itemsID field contains the resource ID of the item list for the alert.
  16779.  
  16780. The information in the stages field determines exactly what should happen at each
  16781. stage of the alert. It's packed into a word that has the following structure:
  16782.  
  16783. TYPE StageList = PACKED RECORD
  16784.                    boldItm4:  0..1;     {default button item number minus 1}
  16785.                    boxDrwn4:  BOOLEAN;  {TRUE if alert box to be drawn}
  16786.                    sound4:    0..3      {sound number}
  16787.                    boldItm3:  0..1; 
  16788.                    boxDrwn3:  BOOLEAN; 
  16789.                    sound3:    0..3 
  16790.                    boldItm2:  0..1; 
  16791.                    boxDrwn2:  BOOLEAN; 
  16792.                    sound2:    0..3 
  16793.                    boldItm1:  0..1; 
  16794.                    boxDrwn1:  BOOLEAN; 
  16795.                    sound1:    0..3 
  16796.                  END;
  16797.  
  16798. Notice that the information is stored in reverse order—for the fourth stage first,
  16799. and for the first stage last.
  16800.  
  16801. The boldItm field indicates which button should be the default button (and therefore
  16802. boldly outlined in the alert box). If the first two items in the alert’s item list
  16803. are the OK button and the Cancel button, respectively, 0 will refer to the OK button
  16804. and 1 to the Cancel button. The reason for this is that the value of boldItm plus 1
  16805. is interpreted as an item number, and normally items 1 and 2 are the OK and Cancel
  16806. buttons, respectively. Whatever the item having the corresponding item number happens
  16807. to be, a bold rounded-corner rectangle will be drawn outside its display rectangle.
  16808.  
  16809. Note:  When deciding where to place items in an alert box, be sure to allow
  16810.        room for any bold outlines that may be drawn.
  16811.  
  16812. The boxDrwn field is TRUE if the alert box is to be drawn.
  16813.  
  16814. The sound field specifies which sound should be emitted at this stage of the alert,
  16815. with a number from 0 to 3 that’s passed to the current sound procedure. You can call
  16816. ErrorSound to specify your own sound procedure; if you don’t, the standard sound
  16817. procedure will be used (as described earlier in the “Alerts” section).
  16818.  
  16819. You access the alert template by converting the handle returned by the Resource
  16820. Manager to a template handle:
  16821.  
  16822. TYPE  AlertTHndl = ^AlertTPtr;
  16823.       AlertTPtr  = ^AlertTemplate;
  16824.  
  16825. Assembly-language note:  Rather than offsets into the fields of the StageList
  16826.                          data structure, there are masks for accessing the
  16827.                          information stored for an alert stage in a stages
  16828.                          word; they’re listed in the summary at the end of
  16829.                          this chapter.
  16830.  
  16831. æKY InitDialogs
  16832. æFp Dialogs.p
  16833. æT PROCEDURE
  16834. æTN A97B
  16835. æD PROCEDURE InitDialogs(resumeProc: ResumeProcPtr);
  16836.     INLINE $A97B;
  16837. æDT InitDialogs(resumeProc);
  16838. æRI I-411, P-107, 112, 174
  16839. æC  
  16840. Call InitDialogs once before all other Dialog Manager routines, to initialize the
  16841. Dialog Manager. InitDialogs does the following initialization:
  16842.  
  16843.   •  It saves the pointer passed in resumeProc, if any, for access by the
  16844.      System Error Handler in case a fatal system error occurs. ResumeProc
  16845.      can be a pointer to a resume procedure, as described in the System
  16846.      Error Handler chapter, or NIL if no such procedure is desired.
  16847.  
  16848. Assembly-language note:  InitDialogs stores the address of the resume
  16849.                          procedure in a global variable named ResumeProc.
  16850.  
  16851.   •  It installs the standard sound procedure.
  16852.   •  It passes empty strings to ParamText.
  16853.  
  16854. æKY ErrorSound
  16855. æFp Dialogs.p
  16856. æT PROCEDURE
  16857. æTN A98C
  16858. æD PROCEDURE ErrorSound(soundProc: SoundProcPtr);
  16859.     INLINE $A98C;
  16860. æDT ErrorSound(soundProc);
  16861. æRI I-411
  16862. æC  
  16863. ErrorSound sets the sound procedure for alerts to the procedure pointed to by soundProc;
  16864. if you don’t call ErrorSound, the Dialog Manager uses the standard sound procedure.
  16865. (For details, see the “Alerts” section.) If you pass NIL for soundProc, there will be
  16866. no sound (or menu bar blinking) at all.
  16867.  
  16868. Assembly-language note:  The address of the sound procedure being used is
  16869.                          stored in the global variable DABeeper.
  16870.  
  16871. æKY NewDialog
  16872. æFp Dialogs.p
  16873. æT FUNCTION
  16874. æTN A97D
  16875. æD FUNCTION NewDialog(wStorage: Ptr;boundsRect: Rect;title: Str255;visible: BOOLEAN;
  16876.     procID: INTEGER;behind: WindowPtr;goAwayFlag: BOOLEAN;refCon: LONGINT;
  16877.     itmLstHndl: Handle): DialogPtr;
  16878.     INLINE $A97D;
  16879. æDT myVariable := NewDialog(wStorage,boundsRect,title,visible,procID,behind,goAwayFlag,refCon,itmLstHndl);
  16880. æMM
  16881. æRI I-412, P-107, 177
  16882. æC 
  16883. NewDialog creates a dialog as specified by its parameters and returns a pointer to
  16884. the new dialog. The first eight parameters (dStorage through refCon) are passed to
  16885. the Window Manager function NewWindow, which creates the dialog window; the meanings
  16886. of these parameters are summarized below. The items parameter is a handle to the
  16887. dialog’s item list. You can get the items handle by calling the Resource Manager to
  16888. read the item list from the resource file into memory.
  16889.  
  16890. Note:  Advanced programmers can create their own item lists in memory rather
  16891.        than have them read from a resource file. The exact format is given
  16892.        later under “Formats of Resources for Dialogs and Alerts”.
  16893.  
  16894. DStorage is analogous to the wStorage parameter of NewWindow; it’s a pointer to the
  16895. storage to use for the dialog record. If you pass NIL for dStorage, the dialog record
  16896. will be allocated in the heap (which, in the case of modeless dialogs, may cause the
  16897. heap to become fragmented).
  16898.  
  16899. BoundsRect, a rectangle given in global coordinates, determines the dialog window’s
  16900. size and location. It becomes the portRect of the window’s grafPort. Remember that
  16901. the top coordinate of this rectangle should be at least 25 points below the top of
  16902. the screen for a modal dialog, to allow for the menu bar and the border around the
  16903. portRect, and at least 40 points below the top of the screen for a modeless dialog,
  16904. to allow for the menu bar and the window’s title bar.
  16905.  
  16906. Title is the title of a modeless dialog box; pass the empty string for modal dialogs.
  16907.  
  16908. If the visible parameter is TRUE, the dialog window is drawn on the screen. If it’s
  16909. FALSE, the window is initially invisible and may later be shown with a call to the
  16910. Window Manager procedure ShowWindow.
  16911.  
  16912. Note:  NewDialog generates an update event for the entire window contents,
  16913.        so the items aren’t drawn immediately, with the exception of controls.
  16914.        The Dialog Manager calls the Control Manager to draw controls, and the
  16915.        Control Manager draws them immediately rather than via the standard
  16916.        update mechanism. Because of this, the Dialog Manager calls the Window
  16917.        Manager procedure ValidRect for the enclosing rectangle of each control,
  16918.        so the controls won’t be drawn twice. If you find that the other items
  16919.        aren’t being drawn soon enough after the controls, try making the
  16920.        window invisible initially and then calling ShowWindow to show it.
  16921.  
  16922. ProcID is the window definition ID, which leads to the window definition function for
  16923. this type of window. The window definition IDs for the standard types of dialog
  16924. window are dBoxProc for the modal type and documentProc for the modeless type.
  16925.  
  16926. The behind parameter specifies the window behind which the dialog window is to be
  16927. placed on the desktop. Pass POINTER(–1) to bring up the dialog window in front of all
  16928. other windows.
  16929.  
  16930. GoAwayFlag applies to modeless dialog boxes; if it’s TRUE, the dialog window has a
  16931. close box in its title bar when the window is active.
  16932.  
  16933. RefCon is the dialog window’s reference value, which the application may store into
  16934. and access for any purpose.
  16935.  
  16936. NewDialog sets the font of the dialog window’s grafPort to the system font or, if you
  16937. previously called SetDAFont, to the specified font. It also sets the window class in
  16938. the window record to dialogKind.
  16939.  
  16940. æKY GetNewDialog
  16941. æFp Dialogs.p
  16942. æT FUNCTION
  16943. æTN A97C
  16944. æD FUNCTION GetNewDialog(dialogID: INTEGER;dStorage: Ptr;behind: WindowPtr): DialogPtr;
  16945.     INLINE $A97C;
  16946. æDT myVariable := GetNewDialog(dialogID,dStorage,behind);
  16947. æMM
  16948. æRT 4,34
  16949. æRI I-413, V-284, N4-1,  P-107, 172
  16950. æC 
  16951. Like NewDialog (above), GetNewDialog creates a dialog as specified by its parameters
  16952. and returns a pointer to the new dialog. Instead of having the parameters boundsRect,
  16953. title, visible, procID, goAwayFlag, and refCon, GetNewDialog has a single dialogID
  16954. parameter, where dialogID is the resource ID of a dialog template that supplies the
  16955. same information as those parameters. The dialog template also contains the resource
  16956. ID of the dialog’s item list. After calling the Resource Manager to read the item
  16957. list into memory (if it’s not already in memory), GetNewDialog makes a copy of the
  16958. item list and uses that copy; thus you may have multiple independent dialogs whose
  16959. items have the same types, locations, and initial contents. The dStorage and behind
  16960. parameters of GetNewDialog have the same meaning as in NewDialog.
  16961.  
  16962. Warning:  If either the dialog template resource or the item list
  16963.           resource can’t be read, the function result is undefined.
  16964.  
  16965. Note:  GetNewDialog doesn’t release the memory occupied by the resources.
  16966.  
  16967. The GetNewDialog routine will attempt to load a 'dctb' resource and returns a pointer
  16968. to a color grafPort if the resource exists. If no 'dctb' resource is present, GetNewDialog
  16969. returns a pointer to an old grafPort.
  16970.  
  16971. The dialog color table is copied before it is passed to SetWinSize unless its ctSize
  16972. field is equal to –1, indicating that the default window colors are to be used instead.
  16973. The copy is made so that the color table resource can be purged without affecting the
  16974. dialog.
  16975.  
  16976. The color dialog item list resource is duplicated as well, so it can be purgeable.
  16977.  
  16978. æKY CloseDialog
  16979. æFp Dialogs.p
  16980. æT PROCEDURE
  16981. æTN A982
  16982. æD PROCEDURE CloseDialog(theDialog: DialogPtr);
  16983.     INLINE $A982;
  16984. æDT CloseDialog(theDialog);
  16985. æMM
  16986. æRI I-413, P-107, 167
  16987. æC 
  16988. CloseDialog removes theDialog’s window from the screen and deletes it from the window
  16989. list, just as when the Window Manager procedure CloseWindow is called. It releases
  16990. the memory occupied by the following:
  16991.  
  16992.   •  The data structures associated with the dialog window (such as the
  16993.      window’s structure, content, and update regions).
  16994.   •  All the items in the dialog (except for pictures and icons, which
  16995.      might be shared resources), and any data structures associated with
  16996.      them. For example, it would dispose of the region occupied by the
  16997.      thumb of a scroll bar, or a similar region for some other control
  16998.      in the dialog.
  16999.  
  17000. CloseDialog does not dispose of the dialog record or the item list. Figure 10 illustrates
  17001. the effect of CloseDialog (and DisposDialog, described below).
  17002.  
  17003. •••Refer to Figure 10.•••
  17004.  
  17005. Figure 10–CloseDialog and DisposDialog
  17006.  
  17007. Call CloseDialog when you’re done with a dialog if you supplied NewDialog or GetNewDialog
  17008. with a pointer to the dialog storage (in the dStorage parameter) when you created the
  17009. dialog.
  17010.  
  17011. Note:  Even if you didn’t supply a pointer to the dialog storage, you may
  17012.        want to call CloseDialog if you created the dialog with NewDialog.
  17013.        You would call CloseDialog if you wanted to keep the item list around
  17014.        (since, unlike GetNewDialog, NewDialog does not use a copy of the
  17015.        item list).
  17016.  
  17017. æKY DisposDialog
  17018. æFp Dialogs.p
  17019. æT PROCEDURE
  17020. æTN A983
  17021. æD PROCEDURE DisposDialog(theDialog: DialogPtr);
  17022.     INLINE $A983;
  17023. æDT DisposDialog(theDialog);
  17024. æRI I-415
  17025. æC 
  17026. DisposDialog calls CloseDialog (above) and then releases the memory occupied by the
  17027. dialog’s item list and dialog record. Call DisposDialog when you’re done with a
  17028. dialog if you let the dialog record be allocated in the heap when you created the
  17029. dialog (by passing NIL as the dStorage parameter to NewDialog or GetNewDialog).
  17030.  
  17031. æKY DisposeDialog
  17032. æFp Dialogs.p
  17033. æT PROCEDURE
  17034. æTN A983
  17035. æD PROCEDURE DisposeDialog(theDialog: DialogPtr);
  17036.     INLINE $A983;
  17037. æDT DisposeDialog(theDialog);
  17038. æRI I-415
  17039. æC 
  17040. DisposDialog calls CloseDialog (above) and then releases the memory occupied by the
  17041. dialog’s item list and dialog record. Call DisposDialog when you’re done with a
  17042. dialog if you let the dialog record be allocated in the heap when you created the
  17043. dialog (by passing NIL as the dStorage parameter to NewDialog or GetNewDialog).
  17044.  
  17045. æKY CouldDialog
  17046. æFp Dialogs.p
  17047. æT PROCEDURE
  17048. æTN A979
  17049. æD PROCEDURE CouldDialog(dialogID: INTEGER);
  17050.     INLINE $A979;
  17051. æDT CouldDialog(dialogID);
  17052. æMM
  17053. æRI I-415, V-284
  17054. æC 
  17055. CouldDialog makes the dialog template having the given resource ID unpurgeable
  17056. (reading it into memory if it’s not already there). It does the same for the dialog
  17057. window’s definition function, the dialog’s item list resource, and any items defined
  17058. as resources. This is useful if the dialog box may come up when the resource file
  17059. isn’t accessible, such as during a disk copy.
  17060.  
  17061. Warning:  CouldDialog assumes your dialogs use the system font; if you’ve
  17062.           changed the font with SetDAFont, calling CouldDialog doesn’t make
  17063.           the font unpurgeable.
  17064.  
  17065. The CouldDialog procedure makes the dialog color table template unpurgeable
  17066. (reading it into memory if it isn’t already there), if it exists. It does the same
  17067. for the dialog’s color item list, if it has one.
  17068.  
  17069. Warning:  CouldDialog doesn’t load or make 'FONT' or 'FOND' resources
  17070.           indicated in the color item list unpurgeable.
  17071.  
  17072. æKY FreeDialog
  17073. æFp Dialogs.p
  17074. æT PROCEDURE
  17075. æTN A97A
  17076. æD PROCEDURE FreeDialog(dialogID: INTEGER);
  17077.     INLINE $A97A;
  17078. æDT FreeDialog(dialogID);
  17079. æMM
  17080. æRI I-415, V-284
  17081. æC 
  17082. Given the resource ID of a dialog template previously specified in a call to CouldDialog,
  17083. FreeDialog undoes the effect of CouldDialog (by making the resources purgeable). It
  17084. should be called when there’s no longer a need to keep the resources in memory.
  17085.  
  17086. Given the resource ID of a dialog template previously specified in a call to CouldDialog,
  17087. the FreeDialog routine undoes the effect of CouldDialog, by restoring the original
  17088. purge state of the color table and color item list resources.
  17089.  
  17090. æKY ParamText
  17091. æFp Dialogs.p
  17092. æT PROCEDURE
  17093. æTN A98B
  17094. æD PROCEDURE ParamText(param0: Str255;param1: Str255;param2: Str255;param3: Str255);
  17095.     INLINE $A98B;
  17096. æDT ParamText(param0,param1,param2,param3);
  17097. æMM
  17098. æRI I-421
  17099. æC  
  17100. ParamText provides a means of substituting text in statText items:  param0 through
  17101. param3 will replace the special strings '^0' through '^3' in all statText items in
  17102. all subsequent dialog or alert boxes. Pass empty strings for parameters not used.
  17103.  
  17104. Assembly-language note:  Assembly-language programmers may pass NIL for
  17105.                          parameters not used or for strings that are not
  17106.                          to be changed.
  17107.  
  17108. For example, if the text is defined as 'Cannot open document ^0' and docName is a
  17109. string variable containing a document name that the user typed, you can call ParamText(docName,'
  17110. ',' ',' ')
  17111.  
  17112. Note:  All strings that may need to be translated to other languages should
  17113.        be stored in resource files.
  17114.  
  17115. Assembly-language note:  The Dialog Manager stores handles to the four
  17116.                          ParamText parameters in a global array named DAStrings.
  17117.  
  17118. æKY ModalDialog
  17119. æFp Dialogs.p
  17120. æT PROCEDURE
  17121. æTN A991
  17122. æD PROCEDURE ModalDialog(filterProc: ModalFilterProcPtr;VAR itemHit: INTEGER);
  17123.     INLINE $A991;
  17124. æDT ModalDialog(filterProc,itemHit);
  17125. æMM
  17126. æRT 34, 203
  17127. æRI I-415, N34-2, 3,   P-108, 176
  17128. æC  
  17129. Call ModalDialog after creating a modal dialog and bringing up its window in the
  17130. frontmost plane. ModalDialog repeatedly gets and handles events in the dialog’s
  17131. window; after handling an event involving an enabled dialog item, it returns with the
  17132. item number in itemHit. Normally you’ll then do whatever is appropriate as a response
  17133. to an event in that item.
  17134.  
  17135. ModalDialog gets each event by calling the Toolbox Event Manager function GetNextEvent.
  17136. If the event is a mouse-down event outside the content region of the dialog window,
  17137. ModalDialog emits sound number 1 (which should be a single beep) and gets the next
  17138. event; otherwise, it filters and handles the event as described below.
  17139.  
  17140. Note:  Once before getting each event, ModalDialog calls SystemTask, a
  17141.        Desk Manager procedure that must be called regularly so that desk
  17142.        accessories will work properly.
  17143.  
  17144. The filterProc parameter determines how events are filtered. If it’s NIL, the standard
  17145. filterProc function is executed; this causes ModalDialog to return 1 in itemHit if
  17146. the Return key or Enter key is pressed. If filterProc isn’t NIL, ModalDialog filters
  17147. events by executing the function it points to. Your filterProc function should have
  17148. three parameters and return a Boolean value. For example, this is how it would be
  17149. declared if it were named MyFilter:
  17150.  
  17151. FUNCTION MyFilter (theDialog:  DialogPtr; VAR theEvent:  EventRecord;
  17152.                    VAR itemHit:  INTEGER) :  BOOLEAN;
  17153.  
  17154. A function result of FALSE tells ModalDialog to go ahead and handle the event, which
  17155. either can be sent through unchanged or can be changed to simulate a different event.
  17156. A function result of TRUE tells ModalDialog to return immediately rather than handle
  17157. the event; in this case, the filterProc function sets itemHit to the item number that
  17158. ModalDialog should return.
  17159.  
  17160. Note:  If you want it to be consistent with the standard filterProc function,
  17161.        your function should at least check whether the Return key or Enter
  17162.        key was pressed and, if so, return 1 in itemHit and a function result
  17163.        of TRUE.
  17164.  
  17165. You can use the filterProc function, for example, to treat a typed character in a
  17166. special way (such as ignore it, or make it have the same effect as another character
  17167. or as clicking a button); in this case, the function would test for a key-down event
  17168. with that character. As another example, suppose the dialog box contains a userItem
  17169. whose procedure draws a clock with the current time displayed. The filterProc function
  17170. can call that procedure and return FALSE without altering the current event.
  17171.  
  17172. Note:  ModalDialog calls GetNextEvent with a mask that excludes disk-inserted
  17173.        events. To receive disk-inserted events, your filterProc function can
  17174.        call GetNextEvent (or EventAvail) with a mask that accepts only that
  17175.        type of event.
  17176.  
  17177. ModalDialog handles the events for which the filterProc function returns FALSE as
  17178. follows:
  17179.  
  17180.   •  In response to an activate or update event for the dialog window,
  17181.      ModalDialog activates or updates the window.
  17182.   •  If the mouse button is pressed in an editText item, ModalDialog
  17183.      responds to the mouse activity as appropriate (displaying an insertion
  17184.      point or selecting text). If a key-down event occurs and there’s an
  17185.      editText item, text entry and editing are handled in the standard way
  17186.      for such items (except that if the Command key is down, ModalDialog
  17187.      responds as though it’s not). In either case, ModalDialog returns if
  17188.      the editText item is enabled or does nothing if it’s disabled. If a
  17189.      key-down event occurs when there’s no editText item, ModalDialog does
  17190.      nothing.
  17191.   •  If the mouse button is pressed in a control, ModalDialog calls the
  17192.      Control Manager function TrackControl. If the mouse button is released
  17193.      inside the control and the control is enabled, ModalDialog returns;
  17194.      otherwise, it does nothing.
  17195.   •  If the mouse button is pressed in any other enabled item in the
  17196.      dialog box, ModalDialog returns. If the mouse button is pressed in
  17197.      any other disabled item or in no item, or if any other event occurs,
  17198.      ModalDialog does nothing.
  17199.  
  17200. æKY IsDialogEvent
  17201. æFp Dialogs.p
  17202. æT FUNCTION
  17203. æTN A97F
  17204. æD FUNCTION IsDialogEvent(theEvent: EventRecord): BOOLEAN;
  17205.     INLINE $A97F;
  17206. æDT myVariable := IsDialogEvent(theEvent);
  17207. æRI I-416, N5-1, P-108, 175
  17208. æC  
  17209. If your application includes any modeless dialogs, call IsDialogEvent after calling
  17210. the Toolbox Event Manager function GetNextEvent.
  17211.  
  17212. Warning:  If your modeless dialog contains any editText items, you must call
  17213.           IsDialogEvent (and then DialogSelect) even if GetNextEvent returns
  17214.           FALSE; otherwise your dialog won’t receive null events and the
  17215.           caret won’t blink.
  17216.  
  17217. Pass the current event in theEvent. IsDialogEvent determines whether theEvent needs
  17218. to be handled as part of a dialog. If theEvent is an activate or update event for a
  17219. dialog window, a mouse-down event in the content region of an active dialog window,
  17220. or any other type of event when a dialog window is active, IsDialogEvent returns
  17221. TRUE; otherwise, it returns FALSE.
  17222.  
  17223. When FALSE is returned, just handle the event yourself like any other event that’s
  17224. not dialog-related. When TRUE is returned, you’ll generally end up passing the event
  17225. to DialogSelect for it to handle (as described below), but first you should do some
  17226. additional checking:
  17227.  
  17228.   •  DialogSelect doesn’t handle keyboard equivalents of commands. Check
  17229.      whether the event is a key-down event with the Command key held down
  17230.      and, if so, carry out the command if it’s one that applies when a
  17231.      dialog window is active. (If the command doesn’t so apply, do nothing.)
  17232.   •  In special cases, you may want to bypass DialogSelect or do some
  17233.      preprocessing before calling it. If so, check for those events and
  17234.      respond accordingly. You would need to do this, for example, if the
  17235.      dialog is to respond to disk-inserted events.
  17236.  
  17237. For cases other than these, pass the event to DialogSelect for it to handle.
  17238.  
  17239. æKY DialogSelect
  17240. æFp Dialogs.p
  17241. æT FUNCTION
  17242. æTN A980
  17243. æD FUNCTION DialogSelect(theEvent: EventRecord;VAR theDialog: DialogPtr;VAR itemHit: INTEGER): BOOLEAN;
  17244.     INLINE $A980;
  17245. æDT myVariable := DialogSelect(theEvent,theDialog,itemHit);
  17246. æMM
  17247. æRT 34
  17248. æRI I-417, N34-3, P-108, 168
  17249. æC 
  17250. You’ll normally call DialogSelect when IsDialogEvent returns TRUE, passing in theEvent
  17251. an event that needs to be handled as part of a modeless dialog. DialogSelect handles
  17252. the event as described below. If the event involves an enabled dialog item, DialogSelect
  17253. returns a function result of TRUE with the dialog pointer in theDialog and the item
  17254. number in itemHit; otherwise, it returns FALSE with theDialog and itemHit undefined.
  17255. Normally when DialogSelect returns TRUE, you’ll do whatever is appropriate as a
  17256. response to the event, and when it returns FALSE you’ll do nothing.
  17257.  
  17258. If the event is an activate or update event for a dialog window, DialogSelect activates
  17259. or updates the window and returns FALSE.
  17260.  
  17261. If the event is a mouse-down event in an editText item, DialogSelect responds as
  17262. appropriate (displaying a caret at the insertion point or selecting text). If it’s a
  17263. key-down or auto-key event and there’s an editText item, text entry and editing are
  17264. handled in the standard way. In either case, DialogSelect returns TRUE if the editText
  17265. item is enabled or FALSE if it’s disabled. If a key-down or auto-key event is passed
  17266. when there’s no editText item, DialogSelect returns FALSE.
  17267.  
  17268. Note:  For a keyboard event, DialogSelect doesn’t check to see whether the
  17269.        Command key is held down; to handle keyboard equivalents of commands,
  17270.        you have to check for them before calling DialogSelect. Similarly, to
  17271.        treat a typed character in a special way (such as ignore it, or make
  17272.        it have the same effect as another character or as clicking a button),
  17273.        you need to check for a key-down event with that character before
  17274.        calling DialogSelect.
  17275.  
  17276. If the event is a mouse-down event in a control, DialogSelect calls the Control
  17277. Manager function TrackControl. If the mouse button is released inside the control and
  17278. the control is enabled, DialogSelect returns TRUE; otherwise, it returns FALSE.
  17279.  
  17280. If the event is a mouse-down event in any other enabled item, DialogSelect returns
  17281. TRUE. If it’s a mouse-down event in any other disabled item or in no item, or if it’s
  17282. any other event, DialogSelect returns FALSE.
  17283.  
  17284. Note:  If the event isn’t one that DialogSelect specifically checks for (if
  17285.        it’s a null event, for example), and there’s an editText item in the
  17286.        dialog, DialogSelect calls the TextEdit procedure TEIdle to make the
  17287.        caret blink.
  17288.  
  17289. æKY DrawDialog
  17290. æFp Dialogs.p
  17291. æT PROCEDURE
  17292. æTN A981
  17293. æD PROCEDURE DrawDialog(theDialog: DialogPtr);
  17294.     INLINE $A981;
  17295. æDT DrawDialog(theDialog);
  17296. æMM
  17297. æRI I-418
  17298. æC 
  17299. DrawDialog draws the contents of the given dialog box. Since DialogSelect and ModalDialog
  17300. handle dialog window updating, this procedure is useful only in unusual situations.
  17301. You would call it, for example, to display a dialog box that doesn’t require any
  17302. response but merely tells the user what’s going on during a time-consuming process.
  17303.  
  17304. æKY UpdtDialog
  17305. æFp Dialogs.p
  17306. æT PROCEDURE
  17307. æTN A978
  17308. æD PROCEDURE UpdtDialog(theDialog: DialogPtr;updateRgn: RgnHandle);
  17309.     INLINE $A978;
  17310. æDT UpdtDialog(theDialog,updateRgn);
  17311. æMM
  17312. æRI IV-60
  17313. æC  
  17314. UpdtDialog is a faster version of the DrawDialog procedure. Instead of drawing the
  17315. entire contents of the given dialog box, UpdtDialog draws only the items that are in
  17316. a specified update region. UpdtDialog is called in response to an update event, and
  17317. is usually bracketed by calls to the Window Manager procedures BeginUpdate and EndUpdate.
  17318. UpdateRgn should be set to the visRgn of theWindow’s port. (For more details, see the
  17319. BeginUpdate procedure in the Window Manager chapter.)
  17320.  
  17321. æKY UpdateDialog
  17322. æFp Dialogs.p
  17323. æT PROCEDURE
  17324. æTN A978
  17325. æD PROCEDURE UpdateDialog(theDialog: DialogPtr;updateRgn: RgnHandle);
  17326.     INLINE $A978;
  17327. æDT UpdateDialog(theDialog,updateRgn);
  17328. æMM
  17329. æRI IV-60
  17330. æC  
  17331. UpdtDialog is a faster version of the DrawDialog procedure. Instead of drawing the
  17332. entire contents of the given dialog box, UpdtDialog draws only the items that are in
  17333. a specified update region. UpdtDialog is called in response to an update event, and
  17334. is usually bracketed by calls to the Window Manager procedures BeginUpdate and EndUpdate.
  17335. UpdateRgn should be set to the visRgn of theWindow’s port. (For more details, see the
  17336. BeginUpdate procedure in the Window Manager chapter.)
  17337.  
  17338. æKY Alert
  17339. æFp Dialogs.p
  17340. æT FUNCTION
  17341. æTN A985
  17342. æD FUNCTION Alert(alertID: INTEGER;filterProc: ModalFilterProcPtr): INTEGER;
  17343.     INLINE $A985;
  17344. æDT myVariable := Alert(alertID,filterProc);
  17345. æMM
  17346. æRI I-418, V-284
  17347. æC 
  17348. This function invokes the alert defined by the alert template that has the given
  17349. resource ID. It calls the current sound procedure, if any, passing it the sound
  17350. number specified in the alert template for this stage of the alert. If no alert box
  17351. is to be drawn at this stage, Alert returns a function result of –1; otherwise, it
  17352. creates and displays the alert window for this alert and draws the alert box.
  17353.  
  17354. Warning:  If the alert template resource can’t be read, the function result
  17355.           is undefined.
  17356.  
  17357. Note:  Alert creates the alert window by calling NewDialog, and does the
  17358.        rest of its processing by calling ModalDialog.
  17359.  
  17360. Alert repeatedly gets and handles events in the alert window until an enabled item is
  17361. clicked, at which time it returns the item number. Normally you’ll then do whatever
  17362. is appropriate in response to a click of that item.
  17363.  
  17364. Alert gets each event by calling the Toolbox Event Manager function GetNextEvent. If
  17365. the event is a mouse-down event outside the content region of the alert window, Alert
  17366. emits sound number 1 (which should be a single beep) and gets the next event; otherwise,
  17367. it filters and handles the event as described below.
  17368.  
  17369. The filterProc parameter has the same meaning as in ModalDialog (see above). If it’s
  17370. NIL, the standard filterProc function is executed, which makes the Return key or the
  17371. Enter key have the same effect as clicking the default button. If you specify your
  17372. own filterProc function and want to retain this feature, you must include it in your
  17373. function. You can find out what the current default button is by looking at the
  17374. aDefItem field of the dialog record for the alert
  17375. (via the dialog pointer passed to the function).
  17376.  
  17377. Alert handles the events for which the filterProc function returns FALSE as follows:
  17378.  
  17379.   •  If the mouse button is pressed in a control, Alert calls the Control
  17380.      Manager procedure TrackControl. If the mouse button is released inside
  17381.      the control and the control is enabled, Alert returns; otherwise, it
  17382.      does nothing.
  17383.   •  If the mouse button is pressed in any other enabled item, Alert simply
  17384.      returns. If it’s pressed in any other disabled item or in no item, or
  17385.      if any other event occurs, Alert does nothing.
  17386.  
  17387. Before returning to the application with the item number, Alert removes the alert box
  17388. from the screen. (It disposes of the alert window and its associated data structures,
  17389. the item list, and the items.)
  17390.  
  17391. Note:  When an alert is removed, if it was overlapping the default button
  17392.        of a previous alert, that button’s bold outline won’t be redrawn.
  17393.  
  17394. Note:  The Alert function’s removal of the alert box would not be the
  17395.        desired result if the user clicked a check box or radio button;
  17396.        however, normally alerts contain only static text, icons, pictures,
  17397.        and buttons that are supposed to make the alert box go away. If your
  17398.        alert contains other items besides these, consider whether it might
  17399.        be more appropriate as a dialog.
  17400.  
  17401. The Alert function looks for a resource of type 'actb' with the same ID as the alert.
  17402. The alert color table is copied before it is passed to SetWinSize unless its ctSize
  17403. field is equal to –1, indicating that the default window colors are to be used instead.
  17404. The copy is made so that the color table resource can be purged without affecting the
  17405. alert.
  17406.  
  17407. The color dialog item list resource is duplicated as well, so it can be purgeable.
  17408.  
  17409. æKY StopAlert
  17410. æFp Dialogs.p
  17411. æT FUNCTION
  17412. æTN A986
  17413. æD FUNCTION StopAlert(alertID: INTEGER;filterProc: ModalFilterProcPtr): INTEGER;
  17414.     INLINE $A986;
  17415. æDT myVariable := StopAlert(alertID,filterProc);
  17416. æMM
  17417. æRI I-419, V-284, P-109, 182
  17418. æC  
  17419. StopAlert is the same as the Alert function (above) except that before drawing the
  17420. items of the alert in the alert box, it draws the Stop icon in the top left corner of
  17421. the box (within the rectangle (10,20)(42,52)). The Stop icon has the following resource
  17422. ID:
  17423.  
  17424. CONST stopIcon = 0;
  17425.  
  17426. If the application’s resource file doesn’t include an icon with that ID number, the
  17427. Dialog Manager uses the standard Stop icon in the system resource file (see Figure
  17428. 11).
  17429.  
  17430. The calls CautionAlert, StopAlert, and NoteAlert look for a resource of type
  17431. 'actb' with the same ID as the alert.
  17432.  
  17433. •••Refer to Figure 11.•••
  17434.  
  17435. Figure 11–Standard Alert Icons
  17436.  
  17437. æKY NoteAlert
  17438. æFp Dialogs.p
  17439. æT FUNCTION
  17440. æTN A987
  17441. æD FUNCTION NoteAlert(alertID: INTEGER;filterProc: ModalFilterProcPtr): INTEGER;
  17442.     INLINE $A987;
  17443. æDT myVariable := NoteAlert(alertID,filterProc);
  17444. æMM
  17445. æRI I-420
  17446. æC  
  17447. NoteAlert is like StopAlert except that it draws the Note icon, which has the following
  17448. resource ID:
  17449.  
  17450. CONST noteIcon = 1;
  17451.  
  17452. The calls CautionAlert, StopAlert, and NoteAlert look for a resource of type
  17453. 'actb' with the same ID as the alert.
  17454.  
  17455. æKY CautionAlert
  17456. æFp Dialogs.p
  17457. æT FUNCTION
  17458. æTN A988
  17459. æD FUNCTION CautionAlert(alertID: INTEGER;filterProc: ModalFilterProcPtr): INTEGER;
  17460.     INLINE $A988;
  17461. æDT myVariable := CautionAlert(alertID,filterProc);
  17462. æMM
  17463. æRI I-420
  17464. æC  
  17465. CautionAlert is like StopAlert except that it draws the Caution icon, which has the
  17466. following resource ID:
  17467.  
  17468. CONST cautionIcon = 2;
  17469.  
  17470. The calls CautionAlert, StopAlert, and NoteAlert look for a resource of type
  17471. 'actb' with the same ID as the alert.
  17472.  
  17473. æKY CouldAlert
  17474. æFp Dialogs.p
  17475. æT PROCEDURE
  17476. æTN A989
  17477. æD PROCEDURE CouldAlert(alertID: INTEGER);
  17478.     INLINE $A989;
  17479. æDT CouldAlert(alertID);
  17480. æMM
  17481. æRI I-420, V-285
  17482. æC 
  17483. CouldAlert makes the alert template having the given resource ID unpurgeable
  17484. (reading it into memory if it’s not already there). It does the same for the alert
  17485. window’s definition function, the alert’s item list resource, and any items defined
  17486. as resources. This is useful if the alert may occur when the resource file isn’t
  17487. accessible, such as during a disk copy.
  17488.  
  17489. Warning:  Like CouldDialog, CouldAlert assumes your alerts use the system
  17490.           font; if you’ve changed the font with SetDAFont, calling CouldAlert
  17491.           doesn’t make the font unpurgeable.
  17492.  
  17493. The CouldAlert routine makes the alert color table template unpurgeable
  17494. (reading it into memory if it isn’t already there), if it exists. It does the same
  17495. for the alert’s color item list, if it has one.
  17496.  
  17497. Warning:  Like CouldDialog, CouldAlert doesn’t load or make 'FONT' or
  17498.           'FOND' resources indicated in the color item list unpurgeable.
  17499.  
  17500. æKY FreeAlert
  17501. æFp Dialogs.p
  17502. æT PROCEDURE
  17503. æTN A98A
  17504. æD PROCEDURE FreeAlert(alertID: INTEGER);
  17505.     INLINE $A98A;
  17506. æDT FreeAlert(alertID);
  17507. æMM
  17508. æRI I-420, V-285
  17509. æC 
  17510. Given the resource ID of an alert template previously specified in a call to CouldAlert,
  17511. FreeAlert undoes the effect of CouldAlert (by making the resources purgeable). It
  17512. should be called when there’s no longer a need to keep the resources in memory.
  17513.  
  17514. Given the resource ID of an alert template previously specified in a call to CouldAlert,
  17515. the FreeAlert routine undoes the effect of CouldAlert, by restoring the original
  17516. purge state of the color table and color item list resources.
  17517.  
  17518. æKY GetDItem
  17519. æFp Dialogs.p
  17520. æT PROCEDURE
  17521. æTN A98D
  17522. æD PROCEDURE GetDItem(theDialog: DialogPtr;itemNo: INTEGER;VAR itemType: INTEGER;
  17523.     VAR item: Handle;VAR box: Rect);
  17524.     INLINE $A98D;
  17525. æDT GetDItem(theDialog,itemNo,itemType,item,box);
  17526. æMM
  17527. æRI I-421
  17528. æC  
  17529. GetDItem returns in its VAR parameters the following information about the item
  17530. numbered itemNo in the given dialog’s item list:  In the itemType parameter, the item
  17531. type; in the item parameter, a handle to the item (or, for item type userItem, the
  17532. procedure pointer); and in the box parameter, the display rectangle for the item.
  17533.  
  17534. Suppose, for example, that you want to change the title of a control in a dialog box.
  17535. You can get the item handle with GetDItem, coerce it to type ControlHandle, and call
  17536. the Control Manager procedure SetCTitle to change the title. Similarly, to move the
  17537. control or change its size, you would call MoveControl or SizeControl.
  17538.  
  17539. Note:  To access the text of a statText or editText item, you can pass the
  17540.        handle returned by GetDItem to GetIText or SetIText (see below).
  17541.  
  17542. æKY SetDItem
  17543. æFp Dialogs.p
  17544. æT PROCEDURE
  17545. æTN A98E
  17546. æD PROCEDURE SetDItem(theDialog: DialogPtr;itemNo: INTEGER;itemType: INTEGER;
  17547.     item: Handle;box: Rect);
  17548.     INLINE $A98E;
  17549. æDT SetDItem(theDialog,itemNo,itemType,item,box);
  17550. æMM
  17551. æRT 34
  17552. æRI I-421, N34-1
  17553. æC  
  17554. SetDItem sets the item numbered itemNo in the given dialog’s item list, as specified
  17555. by the parameters (without drawing the item). The itemType parameter is the item
  17556. type; the item parameter is a handle to the item (or, for item type userItem, the
  17557. procedure pointer); and the box parameter is the display rectangle for the item.
  17558.  
  17559. Consider, for example, how to install an item of type userItem in a dialog:  In the
  17560. item list in the resource file, define an item in which the type is set to userItem
  17561. and the display rectangle to (0,0)(0,0). Specify that the dialog window be invisible
  17562. (in either the dialog template or the NewDialog call). After creating the dialog,
  17563. coerce the item’s procedure pointer to type Handle; then call SetDItem, passing that
  17564. handle and the display rectangle for the item. Finally, call the Window Manager
  17565. procedure ShowWindow to display the dialog window.
  17566.  
  17567. Note:  Do not use SetDItem to change the text of a statText or editText item
  17568.        or to change or move a control. See the description of GetDItem above
  17569.        for more information.
  17570.  
  17571. æKY HideDItem
  17572. æFp Dialogs.p
  17573. æT PROCEDURE
  17574. æTN A827
  17575. æD PROCEDURE HideDItem(theDialog: DialogPtr;itemNo: INTEGER);
  17576.     INLINE $A827;
  17577. æDT HideDItem(theDialog,itemNo);
  17578. æMM
  17579. æRI IV-59
  17580. æC 
  17581. HideDItem hides the item numbered itemNo in the given dialog’s item list by giving
  17582. the item a display rectangle that’s off the screen. (Specifically, if the left coordinate
  17583. of the item’s display rectangle is less than 8192, ShowDItem adds 16384 to both the
  17584. left and right coordinates the rectangle.) If the item is already hidden (that is, if
  17585. the left coordinate is greater than 8192), HideDItem does nothing.
  17586.  
  17587. HideDItem calls the EraseRect procedure on the item’s enclosing rectangle and adds
  17588. the rectangle that contained the item (not necessarily the item’s display rectangle)
  17589. to the update region. If the specified item is an active editText item, the item is
  17590. first deactivated (by calling TEDeactivate).
  17591.  
  17592. Note:  If you have items that are close to each other, be aware that the
  17593.        Dialog Manager draws outside of the enclosing rectangle by 3 pixels
  17594.        for editText items and by 4 pixels for a default button.
  17595.  
  17596. An item that’s been hidden by HideDItem can be redisplayed by the ShowDItem procedure.
  17597.  
  17598. Note:  To create a hidden item in a dialog item list, simply add 16384 to
  17599.        the left and right coordinates of the display rectangle.
  17600.  
  17601. æKY ShowDItem
  17602. æFp Dialogs.p
  17603. æT PROCEDURE
  17604. æTN A828
  17605. æD PROCEDURE ShowDItem(theDialog: DialogPtr;itemNo: INTEGER);
  17606.     INLINE $A828;
  17607. æDT ShowDItem(theDialog,itemNo);
  17608. æMM
  17609. æRI IV-59
  17610. æC 
  17611. ShowDItem redisplays the item numbered itemNo, previously hidden by HideDItem, by
  17612. giving the item the display rectangle it had prior to the HideDItem call.
  17613. (Specifically, if the left coordinate of the item’s display rectangle is greater than
  17614. 8192, ShowDItem subtracts 16384 from both the left and right coordinates the rectangle.)
  17615. If the item is already visible (that is, if the left coordinate is less than 8192),
  17616. ShowDItem does nothing.
  17617.  
  17618. ShowDItem adds the rectangle that contained the item (not necessarily the
  17619. item’s display rectangle) to the update region so that it will be drawn. If the item
  17620. becomes the only editText item, ShowDItem activates it (by calling TEActivate).
  17621.  
  17622. æKY SelIText
  17623. æFp Dialogs.p
  17624. æT PROCEDURE
  17625. æTN A97E
  17626. æD PROCEDURE SelIText(theDialog: DialogPtr;itemNo: INTEGER;strtSel: INTEGER;
  17627.     endSel: INTEGER);
  17628.     INLINE $A97E;
  17629. æDT SelIText(theDialog,itemNo,strtSel,endSel);
  17630. æMM
  17631. æRI I-422, P-110
  17632. æC 
  17633. Given a pointer to a dialog and the item number of an editText item in the dialog
  17634. box, SelIText does the following:
  17635.  
  17636.   •  If the item contains text, SelIText sets the selection range to extend
  17637.      from character position strtSel up to but not including character
  17638.      position endSel. The selection range is inverted unless strtSel equals
  17639.      endSel, in which case a blinking vertical bar is displayed to indicate
  17640.      an insertion point at that position.
  17641.   •  If the item doesn’t contain text, SelIText simply displays the insertion
  17642.      point.
  17643.  
  17644. For example, if the user makes an unacceptable entry in the editText item, the application
  17645. can put up an alert box reporting the problem and then select the entire text of the
  17646. item so it can be replaced by a new entry. (Without this procedure, the user would
  17647. have to select the item before making the new entry.)
  17648.  
  17649. Note:  You can select the entire texxt by specifying 0 for strtSel and 32767
  17650.        for endSel. For details about selection range and character position,
  17651.        see the TextEdit chapter.
  17652.  
  17653. æKY GetIText
  17654. æFp Dialogs.p
  17655. æT PROCEDURE
  17656. æTN A990
  17657. æD PROCEDURE GetIText(item: Handle;VAR text: Str255);
  17658.     INLINE $A990;
  17659. æDT GetIText(item,text);
  17660. æRT 18
  17661. æRI I-422, N18-2
  17662. æC  
  17663. Given a handle to a statText or editText item in a dialog box, as returned by GetDItem,
  17664. GetIText returns the text of the item in the text parameter. (If the user typed more
  17665. than 255 characters in an editText item, GetIText returns only the first 255.)
  17666.  
  17667. æKY SetIText
  17668. æFp Dialogs.p
  17669. æT PROCEDURE
  17670. æTN A98F
  17671. æD PROCEDURE SetIText(item: Handle;text: Str255);
  17672.     INLINE $A98F;
  17673. æDT SetIText(item,text);
  17674. æMM
  17675. æRI I-422
  17676. æC 
  17677. Given a handle to a statText or editText item in a dialog box, as returned by GetDItem,
  17678. SetIText sets the text of the item to the specified text and draws the item. For
  17679. example, suppose the exact content of a dialog’s text item cannot be determined until
  17680. the application is running, but the display rectangle is defined in the resource
  17681. file:  Call GetDItem to get a handle to the item, and call SetIText with the desired
  17682. text.
  17683.  
  17684. æKY FindDItem
  17685. æFp Dialogs.p
  17686. æT FUNCTION
  17687. æTN A984
  17688. æD FUNCTION FindDItem(theDialog: DialogPtr;thePt: Point): INTEGER;
  17689.     INLINE $A984;
  17690. æDT myVariable := FindDItem(theDialog,thePt);
  17691. æMM
  17692. æRT 112
  17693. æRI IV-60, N112
  17694. æC 
  17695. FindDItem returns the item number of the item containing the point specified, in
  17696. local coordinates, by thePt. If the point doesn’t lie within the item’s rectangle,
  17697. FindDItem returns –1. If there are overlapping items, it returns the item number of
  17698. the first item in the list containing the point. FindDItem is useful for changing the
  17699. cursor when it’s over a particular item.
  17700.  
  17701. Note:  FindDItem will return the item number of disabled items as well.
  17702.  
  17703. æKY NewCDialog
  17704. æFp Dialogs.p
  17705. æT FUNCTION
  17706. æTN AA4B
  17707. æD FUNCTION NewCDialog(dStorage: Ptr;boundsRect: Rect;title: Str255;visible: BOOLEAN;
  17708.     procID: INTEGER;behind: WindowPtr;goAwayFlag: BOOLEAN;refCon: LONGINT;
  17709.     items: Handle): DialogPtr;
  17710.     INLINE $AA4B;
  17711. æDT myVariable := NewCDialog(dStorage,boundsRect,title,visible,procID,behind,goAwayFlag,refCon,items);
  17712. æMM
  17713. æRI V-283
  17714. æC 
  17715. A new Dialog Manager routine has been added to support color dialogs: NewCDialog. 
  17716. Its parameters are identical to NewDialog, except that a cGrafPort is allocated
  17717. through a NewCWindow call instead of a call to NewWindow.
  17718.  
  17719. NewCDialog creates a dialog box as specified by its parameters and returns a cDialogPtr
  17720. to the new dialog. The first eight parameters (dStorage through refCon) are passed to
  17721. the Window Manager function NewCWindow, which creates the dialog window. The items
  17722. parameter is a handle to the dialog’s item list. You can get the items handle by
  17723. calling the Resource Manager to read the item list from the resource file into memory.
  17724.  
  17725. After calling NewCDialog, you can use SetWinColor to add a color table to the dialog.
  17726. This creates an auxiliary window record (auxWinRec) for the dialog window. You can
  17727. access this record with the GetAuxWin routine. The dialogCItem handle within the
  17728. auxWinRec points to the dialog item color table.
  17729.  
  17730. If the dialog’s content color isn’t white, it’s a good idea to call NewCDialog with
  17731. the visible flag set to FALSE. After the color table and color item list are installed,
  17732. use ShowWindow to display the dialog if the dialog is the frontmost window. If the
  17733. dialog is not in front, use ShowHide to display the dialog.
  17734.  
  17735. æKY GetAlrtStage
  17736. æFp Dialogs.p
  17737. æT FUNCTION
  17738. æD FUNCTION GetAlrtStage: INTEGER;
  17739.     INLINE $3EB8,$0A9A;
  17740. æDT myVariable := GetAlrtStage;
  17741. æRI I-422
  17742. æC  
  17743. GetAlrtStage returns the stage of the last occurrence of an alert, as a number from 0
  17744. to 3.
  17745.  
  17746. Assembly-language note:  Assembly-language programmers can get this number
  17747.                          by accessing the global variable ACount. In addition,
  17748.                          the global variable ANumber contains the resource ID
  17749.                          of the alert template of the last alert that occurred.
  17750.  
  17751. æKY ResetAlrtStage
  17752. æFp Dialogs.p
  17753. æT PROCEDURE
  17754. æD PROCEDURE ResetAlrtStage;
  17755.     INLINE $4278,$0A9A;
  17756. æDT ResetAlrtStage;
  17757. æRI I-423
  17758. æC 
  17759. ResetAlrtStage resets the stage of the last occurrence of an alert so that the next
  17760. occurrence of that same alert will be treated as its first stage. This is useful, for
  17761. example, when you’ve used ParamText to change the text of an alert such that from the
  17762. user’s point of view it’s a different alert.
  17763.  
  17764. Assembly-language note:  Assembly-language programmers can set the global
  17765.                          variable ACount to –1 for the same effect.
  17766.  
  17767. æKY DlgCut
  17768. æFp Dialogs.p
  17769. æT PROCEDURE
  17770. æD PROCEDURE DlgCut(theDialog: DialogPtr);
  17771. æDT DlgCut(theDialog);
  17772. æRT 215
  17773. æRI I-418, P-110
  17774. æC 
  17775. [Not in ROM]
  17776. DlgCut checks whether theDialog has any editText items and, if so, applies the TextEdit
  17777. procedure TECut to the currently selected editText item. (If the dialog record’s
  17778. editField is 0 or greater, DlgCut passes the contents of the textH field to TECut.)
  17779. You can call DlgCut to handle the editing command Cut when a modeless dialog window
  17780. is active.
  17781.  
  17782. Assembly-language note:  Assembly-language programmers can just read the
  17783.                          dialog record’s fields and call TextEdit directly.
  17784.  
  17785. æKY DlgPaste
  17786. æFp Dialogs.p
  17787. æT PROCEDURE
  17788. æD PROCEDURE DlgPaste(theDialog: DialogPtr);
  17789. æDT DlgPaste(theDialog);
  17790. æMM
  17791. æRT 215
  17792. æRI I-418, P-110
  17793. æC  
  17794. [Not in ROM]
  17795.  
  17796. DlgPaste is the same as DlgCut (above) except that it calls TEPaste, for handling the
  17797. Paste command.
  17798.  
  17799. æKY DlgCopy
  17800. æFp Dialogs.p
  17801. æT PROCEDURE
  17802. æD PROCEDURE DlgCopy(theDialog: DialogPtr);
  17803. æDT DlgCopy(theDialog);
  17804. æMM
  17805. æRT 215
  17806. æRI I-418, P-110
  17807. æC 
  17808. [Not in ROM]
  17809. DlgCopy is the same as DlgCut (above) except that it calls TECopy, for handling the
  17810. Copy command.
  17811.  
  17812. æKY DlgDelete
  17813. æFp Dialogs.p
  17814. æT PROCEDURE
  17815. æD PROCEDURE DlgDelete(theDialog: DialogPtr);
  17816. æDT DlgDelete(theDialog);
  17817. æMM
  17818. æRT 215
  17819. æRI I-418, P-110
  17820. æC  
  17821. [Not in ROM]
  17822.  
  17823. DlgDelete is the same as DlgCut (above) except that it calls TEDelete, for handling
  17824. the Clear command.
  17825.  
  17826. æKY SetDAFont
  17827. æFp Dialogs.p
  17828. æT PROCEDURE
  17829. æD PROCEDURE SetDAFont(fontNum: INTEGER);
  17830.     INLINE $31DF,$0AFA;
  17831. æDT SetDAFont(fontNum);
  17832. æRI I-412
  17833. æC 
  17834. For subsequently created dialogs and alerts, SetDAFont causes the font of the dialog
  17835. or alert window’s grafPort to be set to the font having the specified font number. If
  17836. you don’t call this procedure, the system font is used. SetDAFont affects statText
  17837. and editText items but not titles of controls, which are always in the system font.
  17838.  
  17839. Assembly-language note:  Assembly-language programmers can simply set
  17840.                          the global variable DlgFont to the desired font number.
  17841.  
  17842.  
  17843. æKY DiskInit.p
  17844. æKL DIBadMount
  17845. DIFormat
  17846. DILoad
  17847. DIUnload
  17848. DIVerify
  17849. DIZero
  17850.  
  17851. HFSDefaults
  17852.  
  17853. æKY HFSDefaults
  17854. æFp DiskInit.p
  17855. æT RECORD
  17856. æD HFSDefaults = RECORD
  17857.     sigWord: PACKED ARRAY [0..1] OF Byte; { signature word}
  17858.     abSize: LONGINT; { allocation block size in bytes}
  17859.     clpSize: LONGINT; { clump size in bytes}
  17860.     nxFreeFN: LONGINT; { next free file number}
  17861.     btClpSize: LONGINT; { B-Tree clump size in bytes}
  17862.     rsrv1: INTEGER; { reserved}
  17863.     rsrv2: INTEGER; { reserved}
  17864.     rsrv3: INTEGER; { reserved}
  17865.     END;
  17866. æC 
  17867. »Formatting Hierarchical Volumes
  17868.  
  17869. The Disk Initialization Package must set certain volume characteristics when placing
  17870. a hierarchical file directory on a volume. Default values for these volume characteristics
  17871. are stored in the 128K ROM; this section is for advanced programmers who want to
  17872. substitute their own values. The record containing the default values, if defined in
  17873. Pascal, would look like this:
  17874.  
  17875. TYPE  HFSDefaults = PACKED RECORD
  17876.                       sigWord:    ARRAY[1..2] OF CHAR;    {signature word}
  17877.                       abSize:     LONGINT;    {allocation block size in bytes}
  17878.                       clpSize:    LONGINT;    {clump size in bytes}
  17879.                       nxFreeFN:   LONGINT;    {next free file number}
  17880.                       btClpSize:  LONGINT;    {B*-Tree clump size in bytes}
  17881.                       rsrv1:      INTEGER;    {reserved}
  17882.                       rsrv2:      INTEGER;    {reserved}
  17883.                       rsrv3:      INTEGER;    {reserved}
  17884.                     END;
  17885.  
  17886. The default values for these fields are as follows:
  17887.  
  17888.   Field    Default value
  17889.  
  17890.   sigWord     'BD'
  17891.   abSize       0
  17892.   clpSize      4 * abSize
  17893.   nxFreeFN    16
  17894.   btClpSize    0
  17895.  
  17896. To supply your own values for these fields, create a similar, nonrelocatable record
  17897. containing the desired values and place a pointer to it in the global variable FmtDefaults.
  17898. To restore the system defaults, simply clear FmtDefaults.
  17899.  
  17900. The sigWord must equal 'BD' (meaning “big disk”) for the volume to be recognized as a
  17901. hierarchical volume. If the specified allocation block size is 0, the allocation
  17902. block size is calculated according to the size of the volume:
  17903.  
  17904.   abSize = (1 + (volSize in blocks / 64K)) * 512 bytes
  17905.  
  17906. If the specified B*-tree clump size is 0, the clump size for both the catalog and
  17907. extent trees is calculated according to the size of the volume:
  17908.  
  17909.   btClpSize = (volSize in blocks)/128 * 512bytes
  17910.  
  17911. æKY DILoad
  17912. æFp DiskInit.p
  17913. æT PROCEDURE
  17914. æD PROCEDURE DILoad;
  17915. æDT DILoad;
  17916. æMM
  17917. æRI II-396
  17918. æC 
  17919. Assembly-language note:  The trap macro for the Disk Initialization Package
  17920.                          is _Pack2. The routine selectors are as follows:
  17921.  
  17922.                            diBadMount  .EQU    0
  17923.                            diLoad      .EQU    2
  17924.                            diUnload    .EQU    4
  17925.                            diFormat    .EQU    6
  17926.                            diVerify    .EQU    8
  17927.                            diZero      .EQU    10
  17928.  
  17929. DILoad reads the Disk Initialization Package, and its associated dialog and dialog
  17930. items, from the system resource file into memory and makes them unpurgeable.
  17931.  
  17932. Note:  DIFormat, DIVerify, and DIZero don’t need the dialog, so if you use
  17933.        only these routines you can call the Resource Manager function
  17934.        GetResource to read just the package resource into memory (and
  17935.        the Memory Manager procedure HNoPurge to make it unpurgeable).
  17936.  
  17937. æKY DIUnload
  17938. æFp DiskInit.p
  17939. æT PROCEDURE
  17940. æD PROCEDURE DIUnload;
  17941. æDT DIUnload;
  17942. æMM
  17943. æRI II-396
  17944. æC  
  17945. Assembly-language note:  The trap macro for the Disk Initialization Package
  17946.                          is _Pack2. The routine selectors are as follows:
  17947.  
  17948.                            diBadMount  .EQU    0
  17949.                            diLoad      .EQU    2
  17950.                            diUnload    .EQU    4
  17951.                            diFormat    .EQU    6
  17952.                            diVerify    .EQU    8
  17953.                            diZero      .EQU    10
  17954.  
  17955. DIUnload makes the Disk Initialization Package (and its associated dialog and dialog
  17956. items) purgeable.
  17957.  
  17958. æKY DIBadMount
  17959. æFp DiskInit.p
  17960. æT FUNCTION
  17961. æD FUNCTION DIBadMount(where: Point;evtMessage: LONGINT): INTEGER;
  17962. æDT myVariable := DIBadMount(where,evtMessage);
  17963. æRI DIBadMount function  II-396, N70-1, P-34, 168
  17964.  
  17965. æC 
  17966. Assembly-language note:  The trap macro for the Disk Initialization Package
  17967.                          is _Pack2. The routine selectors are as follows:
  17968.  
  17969.                            diBadMount  .EQU    0
  17970.                            diLoad      .EQU    2
  17971.                            diUnload    .EQU    4
  17972.                            diFormat    .EQU    6
  17973.                            diVerify    .EQU    8
  17974.                            diZero      .EQU    10
  17975.  
  17976. Call DIBadMount when a disk-inserted event occurs if the result code in the high-order
  17977. word of the associated event message indicates an error (that is, the result code is
  17978. other than noErr). Given the event message in evtMessage, DIBadMount evaluates the
  17979. result code and either ejects the disk or lets the user initialize and name it. The
  17980. low-order word of the event message contains the drive number. The where parameter
  17981. specifies the location (in global coordinates) of the top left corner of the dialog
  17982. box displayed by DIBadMount.
  17983.  
  17984. If the result code passed is extFSErr, memFullErr, nsDrvErr, paramErr, or volOnLinErr,
  17985. DIBadMount simply ejects the disk from the drive and returns the result code. If the
  17986. result code ioErr, badMDBErr, or noMacDskErr is passed, the error can be corrected by
  17987. initializing the disk; DIBadMount displays a dialog box that describes the problem
  17988. and asks whether the user wants to initialize the disk. For the result code ioErr,
  17989. the dialog box shown in Figure 1 is displayed. (This happens if the disk is brand
  17990. new.) For badMDBErr and noMacDskErr, DIBadMount displays a similar dialog box in
  17991. which the description of the problem is “This disk is damaged” and “This is not a
  17992. Macintosh disk”, respectively.
  17993.  
  17994. •••Refer to Figure 1.•••
  17995.  
  17996. Figure 1–Disk Initialization Dialog for IOErr
  17997.  
  17998. Note:  Before presenting the disk initialization dialog, DIBadMount checks
  17999.        whether the drive contains an already mounted volume; if so, it ejects
  18000.        the disk and returns 2 as its result. This will happen rarely and may
  18001.        reflect an error in your program (for example, you forgot to call
  18002.        DILoad and the user had to switch to the disk containing the system
  18003.        resource file).
  18004.  
  18005. If the user responds to the disk initialization dialog by clicking the Eject button,
  18006. DIBadMount ejects the disk and returns 1 as its result. If the Initialize button is
  18007. clicked, a box displaying the message “Initializing
  18008. disk...” appears, and DIBadMount attempts to initialize the disk. If initialization
  18009. fails, the disk is ejected and the user is informed as shown in Figure 2; after the
  18010. user clicks OK, DIBadMount returns a negative result code ranging from firstDskErr to
  18011. lastDskErr, indicating that a low-level disk error occurred.
  18012.  
  18013. •••Refer to Figure 2.•••
  18014.  
  18015. Figure 2–Initialization Failure Dialog
  18016.  
  18017. If the disk is successfully initialized, the dialog box in Figure 3 appears. After
  18018. the user names the disk and clicks OK, DIBadMount mounts the volume by calling the
  18019. File Manager function MountVol and returns MountVol’s result code
  18020. (noErr if no error occurs).
  18021.  
  18022. •••Refer to Figure 3.•••
  18023.  
  18024. Figure 3–Dialog for Naming a Disk
  18025.  
  18026. Result codes    noErr               No error
  18027.                 extFSErr            External file system
  18028.                 memFullErr          Not enough room in heap zone
  18029.                 nsDrvErr            No such drive
  18030.                 paramErr            Bad drive number
  18031.                 volOnLinErr         Volume already on-line
  18032.                 firstDskErr         Low-level disk error
  18033.                 through lastDskErr
  18034.  
  18035. Other results   1                   User clicked Eject
  18036.                 2                   Mounted volume in drive
  18037.  
  18038. æKY DIFormat
  18039. æFp DiskInit.p
  18040. æT FUNCTION
  18041. æD FUNCTION DIFormat(drvNum: INTEGER): OSErr;
  18042. æDT myVariable := DIFormat(drvNum);
  18043. æMM
  18044. æRI II-398
  18045. æC 
  18046. Assembly-language note:  The trap macro for the Disk Initialization Package
  18047.                          is _Pack2. The routine selectors are as follows:
  18048.  
  18049.                            diBadMount  .EQU    0
  18050.                            diLoad      .EQU    2
  18051.                            diUnload    .EQU    4
  18052.                            diFormat    .EQU    6
  18053.                            diVerify    .EQU    8
  18054.                            diZero      .EQU    10
  18055.  
  18056. DIFormat formats the disk in the drive specified by the given drive number and returns
  18057. a result code indicating whether the formatting was completed successfully or failed.
  18058. Formatting a disk consists of writing special information onto it so that the Disk
  18059. Driver can read from and write to the disk.
  18060.  
  18061. Result codes    noErr               No error
  18062.                 firstDskErr         Low-level disk error
  18063.                 through lastDskErr
  18064.  
  18065. æKY DIVerify
  18066. æFp DiskInit.p
  18067. æT FUNCTION
  18068. æD FUNCTION DIVerify(drvNum: INTEGER): OSErr;
  18069. æDT myVariable := DIVerify(drvNum);
  18070. æMM
  18071. æRI II-398
  18072. æC 
  18073. Assembly-language note:  The trap macro for the Disk Initialization Package
  18074.                          is _Pack2. The routine selectors are as follows:
  18075.  
  18076.                            diBadMount  .EQU    0
  18077.                            diLoad      .EQU    2
  18078.                            diUnload    .EQU    4
  18079.                            diFormat    .EQU    6
  18080.                            diVerify    .EQU    8
  18081.                            diZero      .EQU    10
  18082.  
  18083. DIVerify verifies the format of the disk in the drive specified by the given drive
  18084. number; it reads each bit from the disk and returns a result code indicating whether
  18085. all bits were read successfully or not. DIVerify doesn’t affect the contents of the
  18086. disk itself.
  18087.  
  18088. Result codes    noErr               No error
  18089.                 firstDskErr         Low-level disk error
  18090.                 through lastDskErr
  18091.  
  18092. æKY DIZero
  18093. æFp DiskInit.p
  18094. æT FUNCTION
  18095. æD FUNCTION DIZero(drvNum: INTEGER;volName: Str255): OSErr;
  18096. æDT myVariable := DIZero(drvNum,volName);
  18097. æMM
  18098. æRT 70
  18099. æRI II-399, N70-2
  18100. æC 
  18101. Assembly-language note:  The trap macro for the Disk Initialization Package
  18102.                          is _Pack2. The routine selectors are as follows:
  18103.  
  18104.                            diBadMount  .EQU    0
  18105.                            diLoad      .EQU    2
  18106.                            diUnload    .EQU    4
  18107.                            diFormat    .EQU    6
  18108.                            diVerify    .EQU    8
  18109.                            diZero      .EQU    10
  18110.  
  18111. On the unmounted volume in the drive specified by the given drive number, DIZero
  18112. writes the volume information, a block map, and a file directory as for a volume with
  18113. no files; the volName parameter specifies the volume name to be included in the
  18114. volume information. This is the last step in initialization
  18115. (after formatting and verifying) and makes any files that are already on the volume
  18116. permanently inaccessible. If the operation fails, DIZero returns a result code indicating
  18117. that a low-level disk error occurred; otherwise, it mounts the volume by calling the
  18118. File Manager function MountVol and returns MountVol’s result code (noErr if no error
  18119. occurs).
  18120.  
  18121. Result codes    noErr              No error
  18122.                 badMDBErr          Bad master directory block
  18123.                 extFSErr           External file system
  18124.                 ioErr              I/O error
  18125.                 memFullErr         Not enough room in heap zone
  18126.                 noMacDskErr        Not a Macintosh disk
  18127.                 nsDrvErr           No such drive
  18128.                 paramErr           Bad drive number
  18129.                 volOnLinErr        Volume already on-line
  18130.                 firstDskErr        Low-level disk error
  18131.                 through lastDskErr
  18132.  
  18133.  
  18134. æKY Disks.p
  18135. æKL DiskEject
  18136. DriveStatus
  18137. SetTagBuffer
  18138.  
  18139. DriveKind
  18140. DrvSts
  18141. hard20
  18142. sony
  18143.  
  18144. æKY DriveKind
  18145. sony
  18146. hard20
  18147. æFp Disks.p
  18148. æT TYPE
  18149. æD DriveKind = (sony,hard20);
  18150. æC 
  18151.  
  18152. æKY DrvSts
  18153. æFp Disks.p
  18154. æT RECORD
  18155. æD DrvSts = RECORD
  18156.     track: INTEGER; {current track}
  18157.     writeProt: SignedByte; {bit 7 = 1 if volume is locked}
  18158.     diskInPlace: SignedByte; {disk in drive}
  18159.     installed: SignedByte; {drive installed}
  18160.     sides: SignedByte; {-1 for 2-sided, 0 for 1-sided}
  18161.     driveQLink: QElemPtr; {next queue entry}
  18162.     driveQVers: INTEGER; {1 for HD20}
  18163.     dQDrive: INTEGER; {drive number}
  18164.     dQRefNum: INTEGER; {driver reference number}
  18165.     dQFSID: INTEGER; {file system ID}
  18166.     CASE DriveKind OF
  18167.       sony:
  18168.         (twoSideFmt: SignedByte; {after 1st rd/wrt: 0=1 side, -1=2 side}
  18169.         needsFlush: SignedByte; {-1 for MacPlus drive}
  18170.         diskErrs: INTEGER); {soft error count}
  18171.       hard20:
  18172.         (driveSize: INTEGER; {drive block size low word}
  18173.         driveS1: INTEGER; {drive block size high word}
  18174.         driveType: INTEGER; {1 for HD20}
  18175.         driveManf: INTEGER; {1 for Apple Computer, Inc.}
  18176.         driveChar: SignedByte; {230 ($E6) for HD20}
  18177.         driveMisc: SignedByte); {0 -- reserved}
  18178.     END;
  18179. æC 
  18180.  
  18181. æKY DiskEject
  18182. æFp Disks.p
  18183. æT FUNCTION
  18184. æD FUNCTION DiskEject(drvNum: INTEGER): OSErr;
  18185. æDT myVariable := DiskEject(drvNum);
  18186. æMM
  18187. æRI II-214
  18188. æC 
  18189. [Not in ROM]
  18190.  
  18191. Assembly-language note:  DiskEject is equivalent to a Control call with
  18192.                          csCode equal to the global constant ejectCode.
  18193.  
  18194. DiskEject ejects the disk from the internal drive if drvNum is 1, or from the external
  18195. drive if drvNum is 2.
  18196.  
  18197. Result codes    noErr       No error
  18198.                 nsDrvErr    No such drive
  18199.  
  18200. æKY SetTagBuffer
  18201. æFp Disks.p
  18202. æT FUNCTION
  18203. æD FUNCTION SetTagBuffer(buffPtr: Ptr): OSErr;
  18204. æDT myVariable := SetTagBuffer(buffPtr);
  18205. æMM
  18206. æRI II-214
  18207. æC 
  18208. [Not in ROM]
  18209.  
  18210. Assembly-language note:  SetTagBuffer is equivalent to a Control call with
  18211.                          csCode equal to the global constant tgBuffCode.
  18212.  
  18213. An application can change the information used in the file tags buffer by calling
  18214. SetTagBuffer. The buffPtr parameter points to a buffer that contains the information
  18215. to be used. If buffPtr is NIL, the information in the file tags buffer isn’t changed.
  18216.  
  18217. If buffPtr isn’t NIL, every time the Disk Driver reads a sector from the disk, it
  18218. stores the file tags in the file tags buffer and in the buffer pointed to by buffPtr.
  18219. Every time the Disk Driver writes a sector onto the disk, it reads 12 bytes from the
  18220. buffer pointed to by buffPtr, places them in the file tags buffer, and then writes
  18221. them onto the disk.
  18222.  
  18223. The contents of the buffer pointed to by buffPtr are overwritten at the end of every
  18224. read request (which can be composed of a number of sectors) instead of at the end of
  18225. every sector. Each read request places 12 bytes in the buffer for each sector, always
  18226. beginning at the start of the buffer. This way an application can examine the file
  18227. tags for a number of sequentially read sectors. If a read request is composed of a
  18228. number of sectors, the Disk Driver places 12 bytes in the buffer for each sector. For
  18229. example, for a read request of five sectors, the Disk Driver will place 60 bytes in
  18230. the buffer.
  18231.  
  18232. Result codes    noErr    No error
  18233.  
  18234. æKY DriveStatus
  18235. æFp Disks.p
  18236. æT FUNCTION
  18237. æD FUNCTION DriveStatus(drvNum: INTEGER;VAR status: DrvSts): OSErr;
  18238. æDT myVariable := DriveStatus(drvNum,status);
  18239. æMM
  18240. æRI II-215
  18241. æC 
  18242. [Not in ROM]
  18243.  
  18244. Assembly-language note:  DriveStatus is equivalent to a Status call with
  18245.                          csCode equal to the global constant drvStsCode;
  18246.                          status is returned in csParam through csParam+21.
  18247.  
  18248. DriveStatus returns information about the internal drive if drvNum is 1, or about the
  18249. external drive if drvNum is 2. The information is returned in a record of type DrvSts:
  18250.  
  18251. TYPE  DrvSts = RECORD
  18252.                  track:        INTEGER;     {current track}
  18253.                  writeProt:    SignedByte;  {bit 7=1 if volume is locked}
  18254.                  diskInPlace:  SignedByte;  {disk in place}
  18255.                  installed:    SignedByte;  {drive installed}
  18256.                  sides:        SignedByte;  {bit 7=0 if single-side drive}
  18257.                  qLink:        QElemPtr;    {next queue entry}
  18258.                  qType:        INTEGER;     {reserved for future use}
  18259.                  dQDrive:      INTEGER;     {drive number}
  18260.                  dQRefNum:     INTEGER;     {driver reference number}
  18261.                  dQFSID:       INTEGER;     {file-system identifier}
  18262.                  twoSideFmt:   SignedByte;  {-1 if two-sided disk}
  18263.                  needsFlush:   SignedByte;  {reserved for future use}
  18264.                  diskErrs:     INTEGER      {error count}
  18265.                END;
  18266.  
  18267. The diskInPlace field is 0 if there’s no disk in the drive, 1 or 2 if there is a disk
  18268. in the drive, or –4 to –1 if the disk was ejected in the last 1.5 seconds. The installed
  18269. field is 1 if the drive is connected to the Macintosh, 0 if the drive might be connected
  18270. to the Macintosh, and –1 if the drive isn’t installed. The value of twoSideFmt is
  18271. valid only when diskInPlace=2. The value of diskErrs is incremented every time an
  18272. error occurs internally within the Disk Driver.
  18273.  
  18274. Result codes    noErr       No error
  18275.                 nsDrvErr    No such drive
  18276.  
  18277.  
  18278. æKY Editions.p
  18279. æKL AssociateSection
  18280. CallEditionOpenerProc
  18281. CallFormatIOProc
  18282. CloseEdition
  18283. CreateEditionContainerFile
  18284. DeleteEditionContainerFile
  18285. EditionHasFormat
  18286. GetEditionFormatMark
  18287. GetEditionInfo
  18288. GetEditionOpenerProc
  18289. GetLastEditionContainerUsed
  18290. GetStandardFormats
  18291. GoToPublisherSection
  18292. InitEditionPack
  18293. IsRegisteredSection
  18294. NewPublisherDialog
  18295. NewPublisherExpDialog
  18296. NewSection
  18297. NewSubscriberDialog
  18298. NewSubscriberExpDialog
  18299. OpenEdition
  18300. OpenNewEdition
  18301. ReadEdition
  18302. RegisterSection
  18303. SectionOptionsDialog
  18304. SectionOptionsExpDialog
  18305. SetEditionFormatMark
  18306. SetEditionOpenerProc
  18307. UnRegisterSection
  18308. WriteEdition
  18309.  
  18310. EditionContainerSpec
  18311. EditionContainerSpecPtr
  18312. EditionInfoRecord
  18313. EditionOpenerParamBlock
  18314. EditionOpenerProcPtr
  18315. EditionOpenerVerb
  18316. EditionRefNum
  18317. emCancelSectionDialogRefCon
  18318. emGoToPubErrDialogRefCon
  18319. emHookAutoUpdateMode
  18320. emHookCancelSection
  18321. emHookGetEditionNow
  18322. emHookGoToPublisher
  18323. emHookManualUpdateMode
  18324. emHookRedrawPreview
  18325. emHookSendEditionNow
  18326. emOptionsDialogRefCon
  18327. eoCanSubscribe
  18328. eoClose
  18329. eoCloseNew
  18330. eoOpen
  18331. eoOpenNew
  18332. ExpDlgHookProcPtr
  18333. ExpModalFilterProcPtr
  18334. FormatIOParamBlock
  18335. FormatIOProcPtr
  18336. FormatIOVerb
  18337. FormatType
  18338. ioHasFormat
  18339. ioNewFormat
  18340. ioReadFormat
  18341. ioWriteFormat
  18342. kFormatLengthUnknown
  18343. kFormatListFormat
  18344. kPartNumberUnknown
  18345. kPartsNotUsed
  18346. kPICTEditionFileType
  18347. kPICTformatMask
  18348. kPreviewFormat
  18349. kPreviewHeight
  18350. kPreviewWidth
  18351. kPublisherDocAliasFormat
  18352. ksndEditionFileType
  18353. ksndFormatMask
  18354. kTEXTEditionFileType
  18355. kTEXTformatMask
  18356. kUnknownEditionFileType
  18357. NewPublisherReply
  18358. NewSubscriberReply
  18359. pumManual
  18360. pumOnSave
  18361. rSectionType
  18362. sectionCancelMsgID
  18363. sectionEventMsgClass
  18364. SectionHandle
  18365. SectionOptionsReply
  18366. SectionPtr
  18367. sectionReadMsgID
  18368. SectionRecord
  18369. sectionScrollMsgID
  18370. SectionType
  18371. sectionWriteMsgID
  18372. stPublisher
  18373. stSubscriber
  18374. sumAutomatic
  18375. sumManual
  18376. TimeStamp
  18377. UpdateMode
  18378.  
  18379. æKY rSectionType
  18380. æFp Editions.p
  18381. æT CONST
  18382. æD rSectionType = 'sect'; { ResType of saved SectionRecords }
  18383. æC 
  18384.  
  18385. æKY stSubscriber
  18386. æFp Editions.p
  18387. æT CONST
  18388. æD stSubscriber = $01;
  18389. æC 
  18390.  
  18391. æKY stPublisher
  18392. æFp Editions.p
  18393. æT CONST
  18394. æD stPublisher = $0A;
  18395. æC 
  18396.  
  18397. æKY sumAutomatic
  18398. æFp Editions.p
  18399. æT CONST
  18400. æD sumAutomatic = 0; { subscriber update mode - Automatically     }
  18401. æC 
  18402.  
  18403. æKY sumManual
  18404. æFp Editions.p
  18405. æT CONST
  18406. æD sumManual = 1; { subscriber update mode - Manually }
  18407. æC 
  18408.  
  18409. æKY pumOnSave
  18410. æFp Editions.p
  18411. æT CONST
  18412. æD pumOnSave = 0; { publisher update mode - OnSave            }
  18413. æC 
  18414.  
  18415. æKY pumManual
  18416. æFp Editions.p
  18417. æT CONST
  18418. æD pumManual = 1; { publisher update mode - Manually }
  18419. æC 
  18420.  
  18421. æKY kPartsNotUsed
  18422. æFp Editions.p
  18423. æT CONST
  18424. æD kPartsNotUsed = 0;
  18425. æC 
  18426.  
  18427. æKY kPartNumberUnknown
  18428. æFp Editions.p
  18429. æT CONST
  18430. æD kPartNumberUnknown = -1; { misc }
  18431. æC 
  18432.  
  18433. æKY kPreviewWidth
  18434. æFp Editions.p
  18435. æT CONST
  18436. æD kPreviewWidth = 120;
  18437. æC 
  18438.  
  18439. æKY kPreviewHeight
  18440. æFp Editions.p
  18441. æT CONST
  18442. æD kPreviewHeight = 120;
  18443. æC 
  18444.  
  18445. æKY kPublisherDocAliasFormat
  18446. æFp Editions.p
  18447. æT CONST
  18448. æD kPublisherDocAliasFormat = 'alis';
  18449. æC 
  18450.  
  18451. æKY kPreviewFormat
  18452. æFp Editions.p
  18453. æT CONST
  18454. æD kPreviewFormat = 'prvw';
  18455. æC 
  18456.  
  18457. æKY kFormatListFormat
  18458. æFp Editions.p
  18459. æT CONST
  18460. æD kFormatListFormat = 'fmts';
  18461. æC 
  18462.  
  18463. æKY kPICTformatMask
  18464. æFp Editions.p
  18465. æT CONST
  18466. æD kPICTformatMask = 1;
  18467. æC 
  18468.  
  18469. æKY kTEXTformatMask
  18470. æFp Editions.p
  18471. æT CONST
  18472. æD kTEXTformatMask = 2;
  18473. æC 
  18474.  
  18475. æKY ksndFormatMask
  18476. æFp Editions.p
  18477. æT CONST
  18478. æD ksndFormatMask = 4;
  18479. æC 
  18480.  
  18481. æKY kPICTEditionFileType
  18482. æFp Editions.p
  18483. æT CONST
  18484. æD kPICTEditionFileType = 'edtp';
  18485. æC 
  18486.  
  18487. æKY kTEXTEditionFileType
  18488. æFp Editions.p
  18489. æT CONST
  18490. æD kTEXTEditionFileType = 'edtt';
  18491. æC 
  18492.  
  18493. æKY ksndEditionFileType
  18494. æFp Editions.p
  18495. æT CONST
  18496. æD ksndEditionFileType = 'edts';
  18497. æC 
  18498.  
  18499. æKY kUnknownEditionFileType
  18500. æFp Editions.p
  18501. æT CONST
  18502. æD kUnknownEditionFileType = 'edtu';
  18503. æC 
  18504.  
  18505. æKY emHookRedrawPreview
  18506. æFp Editions.p
  18507. æT CONST
  18508. æD emHookRedrawPreview = 150;
  18509. æC 
  18510.  
  18511. æKY emHookCancelSection
  18512. æFp Editions.p
  18513. æT CONST
  18514. æD emHookCancelSection = 160;
  18515. æC 
  18516.  
  18517. æKY emHookGoToPublisher
  18518. æFp Editions.p
  18519. æT CONST
  18520. æD emHookGoToPublisher = 161;
  18521. æC 
  18522.  
  18523. æKY emHookGetEditionNow
  18524. æFp Editions.p
  18525. æT CONST
  18526. æD emHookGetEditionNow = 162;
  18527. æC 
  18528.  
  18529. æKY emHookSendEditionNow
  18530. æFp Editions.p
  18531. æT CONST
  18532. æD emHookSendEditionNow = 162;
  18533. æC 
  18534.  
  18535. æKY emHookManualUpdateMode
  18536. æFp Editions.p
  18537. æT CONST
  18538. æD emHookManualUpdateMode = 163;
  18539. æC 
  18540.  
  18541. æKY emHookAutoUpdateMode
  18542. æFp Editions.p
  18543. æT CONST
  18544. æD emHookAutoUpdateMode = 164;
  18545. æC 
  18546.  
  18547. æKY emOptionsDialogRefCon
  18548. æFp Editions.p
  18549. æT CONST
  18550. æD emOptionsDialogRefCon = 'optn';
  18551. æC 
  18552.  
  18553. æKY emCancelSectionDialogRefCon
  18554. æFp Editions.p
  18555. æT CONST
  18556. æD emCancelSectionDialogRefCon = 'cncl';
  18557. æC 
  18558.  
  18559. æKY emGoToPubErrDialogRefCon
  18560. æFp Editions.p
  18561. æT CONST
  18562. æD emGoToPubErrDialogRefCon = 'gerr';
  18563. æC 
  18564.  
  18565. æKY kFormatLengthUnknown
  18566. æFp Editions.p
  18567. æT CONST
  18568. æD kFormatLengthUnknown = -1;
  18569. æC 
  18570.  
  18571. æKY SectionType
  18572. æFp Editions.p
  18573. æT TYPE
  18574. æD SectionType = SignedByte; { one byte, stSubscriber or stPublisher }
  18575. æC 
  18576.  
  18577. æKY TimeStamp
  18578. æFp Editions.p
  18579. æT TYPE
  18580. æD TimeStamp = LONGINT; { seconds since 1904 }
  18581. æC 
  18582.  
  18583. æKY FormatType
  18584. æFp Editions.p
  18585. æT TYPE
  18586. æD FormatType = PACKED ARRAY [1..4] OF CHAR;{ similar to ResType as used by scrap mgr }
  18587. æC 
  18588.  
  18589. æKY EditionRefNum
  18590. æFp Editions.p
  18591. æT TYPE
  18592. æD EditionRefNum = Handle; { used in Edition I/O }
  18593. æC 
  18594.  
  18595. æKY UpdateMode
  18596. æFp Editions.p
  18597. æT TYPE
  18598. æD UpdateMode = INTEGER; { sumAutomatic, pumSuspend, etc }
  18599. æC 
  18600.  
  18601. æKY SectionRecord
  18602. SectionPtr
  18603. SectionHandle
  18604. æFp Editions.p
  18605. æT RECORD
  18606. æD SectionPtr = ^SectionRecord;
  18607. SectionHandle = ^SectionPtr;
  18608. SectionRecord = RECORD
  18609.     version: SignedByte; { always 0x01 in system 7.0 }
  18610.     kind: SectionType; { stSubscriber or stPublisher }
  18611.     mode: UpdateMode; { auto or manual }
  18612.     mdDate: TimeStamp; { last change in document }
  18613.     sectionID: LONGINT; { app. specific, unique per document }
  18614.     refCon: LONGINT; { application specific }
  18615.     alias: AliasHandle; { handle to Alias Record }
  18616.     subPart: LONGINT; { which part of container file }
  18617.     nextSection: SectionHandle; { for linked list of app's Sections }
  18618.     controlBlock: Handle; { used internally }
  18619.     refNum: EditionRefNum; { used internally }
  18620.     END;
  18621. æC 
  18622.  
  18623. æKY EditionContainerSpec
  18624. EditionContainerSpecPtr
  18625. æFp Editions.p
  18626. æT RECORD
  18627. æD EditionContainerSpecPtr = ^EditionContainerSpec;
  18628. EditionContainerSpec = RECORD
  18629.     theFile: FSSpec;
  18630.     theFileScript: ScriptCode;
  18631.     thePart: LONGINT;
  18632.     thePartName: Str31;
  18633.     thePartScript: ScriptCode;
  18634.     END;
  18635. æC 
  18636.  
  18637. æKY EditionInfoRecord
  18638. æFp Editions.p
  18639. æT RECORD
  18640. æD EditionInfoRecord = RECORD
  18641.     crDate: TimeStamp; { date EditionContainer was created }
  18642.     mdDate: TimeStamp; { date of last change }
  18643.     fdCreator: OSType; { file creator }
  18644.     fdType: OSType; { file type }
  18645.     container: EditionContainerSpec; { the Edition }
  18646.     END;
  18647. æC 
  18648.  
  18649. æKY NewPublisherReply
  18650. æFp Editions.p
  18651. æT RECORD
  18652. æD NewPublisherReply = RECORD
  18653.     canceled: BOOLEAN; { O }
  18654.     replacing : BOOLEAN;
  18655.     usePart: BOOLEAN; { I }
  18656.     preview: Handle; { I }
  18657.     previewFormat: FormatType; { I }
  18658.     container: EditionContainerSpec; { I/O }
  18659.     END;
  18660. æC 
  18661.  
  18662. æKY NewSubscriberReply
  18663. æFp Editions.p
  18664. æT RECORD
  18665. æD NewSubscriberReply = RECORD
  18666.     canceled: BOOLEAN; { O }
  18667.     formatsMask: SignedByte;
  18668.     container: EditionContainerSpec; {I/O}
  18669.     END;
  18670. æC 
  18671.  
  18672. æKY SectionOptionsReply
  18673. æFp Editions.p
  18674. æT RECORD
  18675. æD SectionOptionsReply = RECORD
  18676.     canceled: BOOLEAN; { O }
  18677.     changed: BOOLEAN; { O }
  18678.     sectionH: SectionHandle; { I }
  18679.     action: ResType; { O }
  18680.     END;
  18681. æC 
  18682.  
  18683. æKY ExpModalFilterProcPtr
  18684. æFp Editions.p
  18685. æT TYPE
  18686. æD ExpModalFilterProcPtr = ProcPtr; { FUNCTION Filter(theDialog: DialogPtr; VAR theEvent: EventRecord; itemOffset: INTEGER; VAR itemHit: INTEGER; yourDataPtr: Ptr): BOOLEAN; }
  18687. æC 
  18688.  
  18689. æKY ExpDlgHookProcPtr
  18690. æFp Editions.p
  18691. æT TYPE
  18692. æD ExpDlgHookProcPtr = ProcPtr; { FUNCTION Hook(itemOffset, item: INTEGER; theDialog: DialogPtr; yourDataPtr: Ptr): INTEGER; }
  18693. æC 
  18694.  
  18695. æKY FormatIOVerb
  18696. ioHasFormat
  18697. ioReadFormat
  18698. ioNewFormat
  18699. ioWriteFormat
  18700. æFp Editions.p
  18701. æT TYPE
  18702. æD FormatIOVerb = (ioHasFormat,ioReadFormat,ioNewFormat,ioWriteFormat);
  18703. æC 
  18704.  
  18705. æKY FormatIOParamBlock
  18706. æFp Editions.p
  18707. æT RECORD
  18708. æD FormatIOParamBlock = RECORD
  18709.     ioRefNum: LONGINT;
  18710.     format: FormatType;
  18711.     formatIndex: LONGINT;
  18712.     offset: LONGINT;
  18713.     buffPtr: Ptr;
  18714.     buffLen: LONGINT;
  18715.     END;
  18716. æC 
  18717.  
  18718. æKY FormatIOProcPtr
  18719. æFp Editions.p
  18720. æT TYPE
  18721. æD FormatIOProcPtr = ProcPtr; { FUNCTION IO(selector: FormatIOVerb; VAR PB: FormatIOParamBlock): OSErr; }
  18722. æC 
  18723.  
  18724. æKY EditionOpenerVerb
  18725. eoOpen
  18726. eoClose
  18727. eoOpenNew
  18728. eoCloseNew
  18729. eoCanSubscribe
  18730.  
  18731. æFp Editions.p
  18732. æT TYPE
  18733. æD EditionOpenerVerb = (eoOpen,eoClose,eoOpenNew,eoCloseNew,eoCanSubscribe);
  18734. æC 
  18735.  
  18736. æKY EditionOpenerParamBlock
  18737. æFp Editions.p
  18738. æT RECORD
  18739. æD EditionOpenerParamBlock = RECORD
  18740.     info: EditionInfoRecord;
  18741.     sectionH: SectionHandle;
  18742.     document: FSSpecPtr;
  18743.     fdCreator: OSType;
  18744.     ioRefNum: LONGINT;
  18745.     ioProc: FormatIOProcPtr;
  18746.     success: BOOLEAN;
  18747.     formatsMask: SignedByte;
  18748.     END;
  18749. æC 
  18750.  
  18751. æKY EditionOpenerProcPtr
  18752. æFp Editions.p
  18753. æT TYPE
  18754. æD EditionOpenerProcPtr = ProcPtr; { FUNCTION Opener(selector: EditionOpenerVerb; VAR PB: EditionOpenerParamBlock): OSErr; }
  18755. æC 
  18756.  
  18757. æKY sectionEventMsgClass
  18758. æFp Editions.p
  18759. æT CONST
  18760. æD sectionEventMsgClass = 'sect';
  18761. æC 
  18762.  
  18763. æKY sectionReadMsgID
  18764. æFp Editions.p
  18765. æT CONST
  18766. æD sectionReadMsgID = 'read';
  18767. æC 
  18768.  
  18769. æKY sectionWriteMsgID
  18770. æFp Editions.p
  18771. æT CONST
  18772. æD sectionWriteMsgID = 'writ';
  18773. æC 
  18774.  
  18775. æKY sectionScrollMsgID
  18776. æFp Editions.p
  18777. æT CONST
  18778. æD sectionScrollMsgID = 'scrl';
  18779. æC 
  18780.  
  18781. æKY sectionCancelMsgID
  18782. æFp Editions.p
  18783. æT CONST
  18784. æD sectionCancelMsgID = 'cncl';
  18785. æC 
  18786.  
  18787. æKY InitEditionPack
  18788. æFp Editions.p
  18789. æT FUNCTION
  18790. æTN A82D
  18791. æD FUNCTION InitEditionPack: OSErr;
  18792.     INLINE $3F3C,$0011,$303C,$0100,$A82D;
  18793. æDT myVariable := InitEditionPack;
  18794. æC 
  18795.  
  18796. æKY NewSection
  18797. æFp Editions.p
  18798. æT FUNCTION
  18799. æTN A82D
  18800. æD FUNCTION NewSection(container: EditionContainerSpec;
  18801.                     sectionDocument: FSSpecPtr;
  18802.                     kind: SectionType;
  18803.                     sectionID: LONGINT;
  18804.                     initalMode: UpdateMode;
  18805.                     VAR sectionH: SectionHandle): OSErr;
  18806.     INLINE $303C,$0A02,$A82D;
  18807. æDT myVariable := NewSection(container,sectionDocument,kind,sectionID,initalMode,sectionH);
  18808. æC 
  18809.  
  18810. æKY RegisterSection
  18811. æFp Editions.p
  18812. æT FUNCTION
  18813. æTN A82D
  18814. æD FUNCTION RegisterSection(sectionDocument: FSSpec;
  18815.                          sectionH: SectionHandle;
  18816.                          VAR aliasWasUpdated: BOOLEAN): OSErr;
  18817.     INLINE $303C,$0604,$A82D;
  18818. æDT myVariable := RegisterSection(sectionDocument,sectionH,aliasWasUpdated);
  18819. æC 
  18820.  
  18821. æKY UnRegisterSection
  18822. æFp Editions.p
  18823. æT FUNCTION
  18824. æTN A82D
  18825. æD FUNCTION UnRegisterSection(sectionH: SectionHandle): OSErr;
  18826.     INLINE $303C,$0206,$A82D;
  18827. æDT myVariable := UnRegisterSection(sectionH);
  18828. æC 
  18829.  
  18830. æKY IsRegisteredSection
  18831. æFp Editions.p
  18832. æT FUNCTION
  18833. æTN A82D
  18834. æD FUNCTION IsRegisteredSection(sectionH: SectionHandle): OSErr;
  18835.     INLINE $303C,$0208,$A82D;
  18836. æDT myVariable := IsRegisteredSection(sectionH);
  18837. æC 
  18838.  
  18839. æKY AssociateSection
  18840. æFp Editions.p
  18841. æT FUNCTION
  18842. æTN A82D
  18843. æD FUNCTION AssociateSection(sectionH: SectionHandle;
  18844.                           newSectionDocument: FSSpecPtr): OSErr;
  18845.     INLINE $303C,$040C,$A82D;
  18846. æDT myVariable := AssociateSection(sectionH,newSectionDocument);
  18847. æC 
  18848.  
  18849. æKY CreateEditionContainerFile
  18850. æFp Editions.p
  18851. æT FUNCTION
  18852. æTN A82D
  18853. æD FUNCTION CreateEditionContainerFile(editionFile: FSSpec;
  18854.                                     fdCreator: OSType;
  18855.                                     editionFileNameScript: ScriptCode): OSErr;
  18856.     INLINE $303C,$050E,$A82D;
  18857. æDT myVariable := CreateEditionContainerFile(editionFile,fdCreator,editionFileNameScript);
  18858. æC 
  18859.  
  18860. æKY DeleteEditionContainerFile
  18861. æFp Editions.p
  18862. æT FUNCTION
  18863. æTN A82D
  18864. æD FUNCTION DeleteEditionContainerFile(editionFile: FSSpec): OSErr;
  18865.     INLINE $303C,$0210,$A82D;
  18866. æDT myVariable := DeleteEditionContainerFile(editionFile);
  18867. æC 
  18868.  
  18869. æKY OpenEdition
  18870. æFp Editions.p
  18871. æT FUNCTION
  18872. æTN A82D
  18873. æD FUNCTION OpenEdition(subscriberSectionH: SectionHandle;
  18874.                      VAR refNum: EditionRefNum): OSErr;
  18875.     INLINE $303C,$0412,$A82D;
  18876. æDT myVariable := OpenEdition(subscriberSectionH,refNum);
  18877. æC 
  18878.  
  18879. æKY OpenNewEdition
  18880. æFp Editions.p
  18881. æT FUNCTION
  18882. æTN A82D
  18883. æD FUNCTION OpenNewEdition(publisherSectionH: SectionHandle;
  18884.                         fdCreator: OSType;
  18885.                         publisherSectionDocument: FSSpecPtr;
  18886.                         VAR refNum: EditionRefNum): OSErr;
  18887.     INLINE $303C,$0814,$A82D;
  18888. æDT myVariable := OpenNewEdition(publisherSectionH,fdCreator,publisherSectionDocument,refNum);
  18889. æC 
  18890.  
  18891. æKY CloseEdition
  18892. æFp Editions.p
  18893. æT FUNCTION
  18894. æTN A82D
  18895. æD FUNCTION CloseEdition(whichEdition: EditionRefNum;
  18896.                       successful: BOOLEAN): OSErr;
  18897.     INLINE $303C,$0316,$A82D;
  18898. æDT myVariable := CloseEdition(whichEdition,successful);
  18899. æC 
  18900.  
  18901. æKY EditionHasFormat
  18902. æFp Editions.p
  18903. æT FUNCTION
  18904. æTN A82D
  18905. æD FUNCTION EditionHasFormat(whichEdition: EditionRefNum;
  18906.                           whichFormat: FormatType;
  18907.                           VAR formatSize: Size): OSErr;
  18908.     INLINE $303C,$0618,$A82D;
  18909. æDT myVariable := EditionHasFormat(whichEdition,whichFormat,formatSize);
  18910. æC 
  18911.  
  18912. æKY ReadEdition
  18913. æFp Editions.p
  18914. æT FUNCTION
  18915. æTN A82D
  18916. æD FUNCTION ReadEdition(whichEdition: EditionRefNum;
  18917.                      whichFormat: FormatType;
  18918.                      buffPtr: UNIV Ptr;
  18919.                      VAR buffLen: Size): OSErr;
  18920.     INLINE $303C,$081A,$A82D;
  18921. æDT myVariable := ReadEdition(whichEdition,whichFormat,buffPtr,buffLen);
  18922. æC 
  18923.  
  18924. æKY WriteEdition
  18925. æFp Editions.p
  18926. æT FUNCTION
  18927. æTN A82D
  18928. æD FUNCTION WriteEdition(whichEdition: EditionRefNum;
  18929.                       whichFormat: FormatType;
  18930.                       buffPtr: UNIV Ptr;
  18931.                       buffLen: Size): OSErr;
  18932.     INLINE $303C,$081C,$A82D;
  18933. æDT myVariable := WriteEdition(whichEdition,whichFormat,buffPtr,buffLen);
  18934. æC 
  18935.  
  18936. æKY GetEditionFormatMark
  18937. æFp Editions.p
  18938. æT FUNCTION
  18939. æTN A82D
  18940. æD FUNCTION GetEditionFormatMark(whichEdition: EditionRefNum;
  18941.                               whichFormat: FormatType;
  18942.                               VAR currentMark: LONGINT): OSErr;
  18943.     INLINE $303C,$061E,$A82D;
  18944. æDT myVariable := GetEditionFormatMark(whichEdition,whichFormat,currentMark);
  18945. æC 
  18946.  
  18947. æKY SetEditionFormatMark
  18948. æFp Editions.p
  18949. æT FUNCTION
  18950. æTN A82D
  18951. æD FUNCTION SetEditionFormatMark(whichEdition: EditionRefNum;
  18952.                               whichFormat: FormatType;
  18953.                               setMarkTo: LONGINT): OSErr;
  18954.     INLINE $303C,$0620,$A82D;
  18955. æDT myVariable := SetEditionFormatMark(whichEdition,whichFormat,setMarkTo);
  18956. æC 
  18957.  
  18958. æKY GetEditionInfo
  18959. æFp Editions.p
  18960. æT FUNCTION
  18961. æTN A82D
  18962. æD FUNCTION GetEditionInfo(sectionH: SectionHandle;
  18963.                         VAR editionInfo: EditionInfoRecord): OSErr;
  18964.     INLINE $303C,$0422,$A82D;
  18965. æDT myVariable := GetEditionInfo(sectionH,editionInfo);
  18966. æC 
  18967.  
  18968. æKY GoToPublisherSection
  18969. æFp Editions.p
  18970. æT FUNCTION
  18971. æTN A82D
  18972. æD FUNCTION GoToPublisherSection(container: EditionContainerSpec): OSErr;
  18973.     INLINE $303C,$0224,$A82D;
  18974. æDT myVariable := GoToPublisherSection(container);
  18975. æC 
  18976.  
  18977. æKY GetLastEditionContainerUsed
  18978. æFp Editions.p
  18979. æT FUNCTION
  18980. æTN A82D
  18981. æD FUNCTION GetLastEditionContainerUsed(VAR container: EditionContainerSpec): OSErr;
  18982.     INLINE $303C,$0226,$A82D;
  18983. æDT myVariable := GetLastEditionContainerUsed(container);
  18984. æC 
  18985.  
  18986. æKY GetStandardFormats
  18987. æFp Editions.p
  18988. æT FUNCTION
  18989. æTN A82D
  18990. æD FUNCTION GetStandardFormats(container: EditionContainerSpec;
  18991.                             VAR previewFormat: FormatType;
  18992.                             preview: Handle;
  18993.                             publisherAlias: Handle;
  18994.                             formats: Handle): OSErr;
  18995.     INLINE $303C,$0A28,$A82D;
  18996. æDT myVariable := GetStandardFormats(container,previewFormat,preview,publisherAlias,formats);
  18997. æC 
  18998.  
  18999. æKY GetEditionOpenerProc
  19000. æFp Editions.p
  19001. æT FUNCTION
  19002. æTN A82D
  19003. æD FUNCTION GetEditionOpenerProc(VAR opener: EditionOpenerProcPtr): OSErr;
  19004.     INLINE $303C,$022A,$A82D;
  19005. æDT myVariable := GetEditionOpenerProc(opener);
  19006. æC 
  19007.  
  19008. æKY SetEditionOpenerProc
  19009. æFp Editions.p
  19010. æT FUNCTION
  19011. æTN A82D
  19012. æD FUNCTION SetEditionOpenerProc(opener: EditionOpenerProcPtr): OSErr;
  19013.     INLINE $303C,$022C,$A82D;
  19014. æDT myVariable := SetEditionOpenerProc(opener);
  19015. æC 
  19016.  
  19017. æKY CallEditionOpenerProc
  19018. æFp Editions.p
  19019. æT FUNCTION
  19020. æTN A82D
  19021. æD FUNCTION CallEditionOpenerProc(selector: EditionOpenerVerb;
  19022.                                VAR PB: EditionOpenerParamBlock;
  19023.                                routine: EditionOpenerProcPtr): OSErr;
  19024.     INLINE $303C,$052E,$A82D;
  19025. æDT myVariable := CallEditionOpenerProc(selector,PB,routine);
  19026. æC 
  19027.  
  19028. æKY CallFormatIOProc
  19029. æFp Editions.p
  19030. æT FUNCTION
  19031. æTN A82D
  19032. æD FUNCTION CallFormatIOProc(selector: FormatIOVerb;
  19033.                           VAR PB: FormatIOParamBlock;
  19034.                           routine: FormatIOProcPtr): OSErr;
  19035.     INLINE $303C,$0530,$A82D;
  19036. æDT myVariable := CallFormatIOProc(selector,PB,routine);
  19037. æC 
  19038.  
  19039. æKY NewSubscriberDialog
  19040. æFp Editions.p
  19041. æT FUNCTION
  19042. æTN A82D
  19043. æD FUNCTION NewSubscriberDialog(VAR reply: NewSubscriberReply): OSErr;
  19044.     INLINE $303C,$0232,$A82D;
  19045. æDT myVariable := NewSubscriberDialog(reply);
  19046. æC 
  19047.  
  19048. æKY NewSubscriberExpDialog
  19049. æFp Editions.p
  19050. æT FUNCTION
  19051. æTN A82D
  19052. æD FUNCTION NewSubscriberExpDialog(VAR reply: NewSubscriberReply;
  19053.                                 where: Point;
  19054.                                 expansionDITLresID: INTEGER;
  19055.                                 dlgHook: ExpDlgHookProcPtr;
  19056.                                 filterProc: ExpModalFilterProcPtr;
  19057.                                 yourDataPtr:UNIV Ptr): OSErr;
  19058.     INLINE $303C,$0B34,$A82D;
  19059. æDT myVariable := NewSubscriberExpDialog(reply,where,expansionDITLresID,dlgHook,filterProc,yourDataPtr);
  19060. æC 
  19061.  
  19062. æKY NewPublisherDialog
  19063. æFp Editions.p
  19064. æT FUNCTION
  19065. æTN A82D
  19066. æD FUNCTION NewPublisherDialog(VAR reply: NewPublisherReply): OSErr;
  19067.     INLINE $303C,$0236,$A82D;
  19068. æDT myVariable := NewPublisherDialog(reply);
  19069. æC 
  19070.  
  19071. æKY NewPublisherExpDialog
  19072. æFp Editions.p
  19073. æT FUNCTION
  19074. æTN A82D
  19075. æD FUNCTION NewPublisherExpDialog(VAR reply: NewPublisherReply;
  19076.                                where: Point;
  19077.                                expansionDITLresID: INTEGER;
  19078.                                dlgHook: ExpDlgHookProcPtr;
  19079.                                filterProc: ExpModalFilterProcPtr;
  19080.                                yourDataPtr: UNIV Ptr): OSErr;
  19081.     INLINE $303C,$0B38,$A82D;
  19082. æDT myVariable := NewPublisherExpDialog(reply,where,expansionDITLresID,dlgHook,filterProc,yourDataPtr);
  19083. æC 
  19084.  
  19085. æKY SectionOptionsDialog
  19086. æFp Editions.p
  19087. æT FUNCTION
  19088. æTN A82D
  19089. æD FUNCTION SectionOptionsDialog(VAR reply: SectionOptionsReply): OSErr;
  19090.     INLINE $303C,$023A,$A82D;
  19091. æDT myVariable := SectionOptionsDialog(reply);
  19092. æC 
  19093.  
  19094. æKY SectionOptionsExpDialog
  19095. æFp Editions.p
  19096. æT FUNCTION
  19097. æTN A82D
  19098. æD FUNCTION SectionOptionsExpDialog(VAR reply: SectionOptionsReply;
  19099.                                  where: Point;
  19100.                                  expansionDITLresID: INTEGER;
  19101.                                  dlgHook: ExpDlgHookProcPtr;
  19102.                                  filterProc: ExpModalFilterProcPtr;
  19103.                                  yourDataPtr: UNIV Ptr): OSErr;
  19104.     INLINE $303C,$0B3C,$A82D;
  19105. æDT myVariable := SectionOptionsExpDialog(reply,where,expansionDITLresID,dlgHook,filterProc,yourDataPtr);
  19106. æC 
  19107.  
  19108.  
  19109. æKY ENET.p
  19110. æKL EAddMulti
  19111. EAttachPH
  19112. EDelMulti
  19113. EDetachPH
  19114. EGetInfo
  19115. ERdCancel
  19116. ERead
  19117. ESetGeneral
  19118. EWrite
  19119.  
  19120. EAddrRType
  19121. eLenErr
  19122. eMultiErr
  19123. ENetAddMulti
  19124. ENetAttachPH
  19125. ENetDelMulti
  19126. ENetDetachPH
  19127. ENetGetInfo
  19128. ENetRdCancel
  19129. ENetRead
  19130. ENetSetGeneral
  19131. ENetWrite
  19132. EParamBlkPtr
  19133. EParamBlock
  19134.  
  19135. æKY ENetSetGeneral
  19136. æFp ENET.p
  19137. æT CONST
  19138. æD ENetSetGeneral = 253; {Set "general" mode}
  19139. æC 
  19140.  
  19141. æKY ENetGetInfo
  19142. æFp ENET.p
  19143. æT CONST
  19144. æD ENetGetInfo = 252; {Get info}
  19145. æC 
  19146.  
  19147. æKY ENetRdCancel
  19148. æFp ENET.p
  19149. æT CONST
  19150. æD ENetRdCancel = 251; {Cancel read}
  19151. æC 
  19152.  
  19153. æKY ENetRead
  19154. æFp ENET.p
  19155. æT CONST
  19156. æD ENetRead = 250; {Read}
  19157. æC 
  19158.  
  19159. æKY ENetWrite
  19160. æFp ENET.p
  19161. æT CONST
  19162. æD ENetWrite = 249; {Write}
  19163. æC 
  19164.  
  19165. æKY ENetDetachPH
  19166. æFp ENET.p
  19167. æT CONST
  19168. æD ENetDetachPH = 248; {Detach protocol handler}
  19169. æC 
  19170.  
  19171. æKY ENetAttachPH
  19172. æFp ENET.p
  19173. æT CONST
  19174. æD ENetAttachPH = 247; {Attach protocol handler}
  19175. æC 
  19176.  
  19177. æKY ENetAddMulti
  19178. æFp ENET.p
  19179. æT CONST
  19180. æD ENetAddMulti = 246; {Add a multicast address}
  19181. æC 
  19182.  
  19183. æKY ENetDelMulti
  19184. æFp ENET.p
  19185. æT CONST
  19186. æD ENetDelMulti = 245; {Delete a multicast address}
  19187. æC 
  19188.  
  19189. æKY eLenErr
  19190. æFp ENET.p
  19191. æT CONST
  19192. æD eLenErr = -92; {Length error ddpLenErr}
  19193. æC 
  19194.  
  19195. æKY eMultiErr
  19196. æFp ENET.p
  19197. æT CONST
  19198. æD eMultiErr = -91; {Multicast address error ddpSktErr}
  19199. æC 
  19200.  
  19201. æKY EAddrRType
  19202. æFp ENET.p
  19203. æT CONST
  19204. æD EAddrRType = 'eadr'; {Alternate address resource type}
  19205. æC 
  19206.  
  19207. æKY EParamBlock
  19208. EParamBlkPtr
  19209. æFp ENET.p
  19210. æT RECORD
  19211. æD EParamBlkPtr = ^EParamBlock;
  19212. EParamBlock = PACKED RECORD
  19213.     qLink: QElemPtr;                                    {next queue entry}
  19214.     qType: INTEGER;                                     {queue type}
  19215.     ioTrap: INTEGER;                                    {routine trap}
  19216.     ioCmdAddr: Ptr;                                     {routine address}
  19217.     ioCompletion: ProcPtr;                                {completion routine}
  19218.     ioResult: OSErr;                                    {result code}
  19219.     ioNamePtr: StringPtr;                                {->filename}
  19220.     ioVRefNum: INTEGER;                                 {volume reference or drive number}
  19221.     ioRefNum: INTEGER;                                    {driver reference number}
  19222.     csCode: INTEGER;                                    {call command code AUTOMATICALLY set}
  19223.     CASE INTEGER OF
  19224.       ENetWrite,ENetAttachPH,ENetDetachPH,ENetRead,ENetRdCancel,ENetGetInfo,ENetSetGeneral:
  19225.         (eProtType: INTEGER;                            {Ethernet protocol type}
  19226.         ePointer: Ptr;
  19227.         eBuffSize: INTEGER;                                {buffer size}
  19228.         eDataSize: INTEGER);                             {number of bytes read}
  19229.       ENetAddMulti,ENetDelMulti:
  19230.         (eMultiAddr: ARRAY [0..5] of char);                {Multicast Address}
  19231.     END;
  19232. æC 
  19233.  
  19234. æKY EWrite
  19235. æFp ENET.p
  19236. æT FUNCTION
  19237. æD FUNCTION EWrite(thePBptr: EParamBlkPtr;async: BOOLEAN): OSErr;
  19238. æDT myVariable := EWrite(thePBptr,async);
  19239. æC 
  19240.  
  19241. æKY EAttachPH
  19242. æFp ENET.p
  19243. æT FUNCTION
  19244. æD FUNCTION EAttachPH(thePBptr: EParamBlkPtr;async: BOOLEAN): OSErr;
  19245. æDT myVariable := EAttachPH(thePBptr,async);
  19246. æC 
  19247.  
  19248. æKY EDetachPH
  19249. æFp ENET.p
  19250. æT FUNCTION
  19251. æD FUNCTION EDetachPH(thePBptr: EParamBlkPtr;async: BOOLEAN): OSErr;
  19252. æDT myVariable := EDetachPH(thePBptr,async);
  19253. æC 
  19254.  
  19255. æKY ERead
  19256. æFp ENET.p
  19257. æT FUNCTION
  19258. æD FUNCTION ERead(thePBptr: EParamBlkPtr;async: BOOLEAN): OSErr;
  19259. æDT myVariable := ERead(thePBptr,async);
  19260. æC 
  19261.  
  19262. æKY ERdCancel
  19263. æFp ENET.p
  19264. æT FUNCTION
  19265. æD FUNCTION ERdCancel(thePBptr: EParamBlkPtr;async: BOOLEAN): OSErr;
  19266. æDT myVariable := ERdCancel(thePBptr,async);
  19267. æC 
  19268.  
  19269. æKY EGetInfo
  19270. æFp ENET.p
  19271. æT FUNCTION
  19272. æD FUNCTION EGetInfo(thePBptr: EParamBlkPtr;async: BOOLEAN): OSErr;
  19273. æDT myVariable := EGetInfo(thePBptr,async);
  19274. æC 
  19275.  
  19276. æKY ESetGeneral
  19277. æFp ENET.p
  19278. æT FUNCTION
  19279. æD FUNCTION ESetGeneral(thePBptr: EParamBlkPtr;async: BOOLEAN): OSErr;
  19280. æDT myVariable := ESetGeneral(thePBptr,async);
  19281. æC 
  19282.  
  19283. æKY EAddMulti
  19284. æFp ENET.p
  19285. æT FUNCTION
  19286. æD FUNCTION EAddMulti(thePBptr: EParamBlkPtr;async: BOOLEAN): OSErr;
  19287. æDT myVariable := EAddMulti(thePBptr,async);
  19288. æC 
  19289.  
  19290. æKY EDelMulti
  19291. æFp ENET.p
  19292. æT FUNCTION
  19293. æD FUNCTION EDelMulti(thePBptr: EParamBlkPtr;async: BOOLEAN): OSErr;
  19294. æDT myVariable := EDelMulti(thePBptr,async);
  19295. æC 
  19296.  
  19297.  
  19298. æKY EPPC.p
  19299. æKL AcceptHighLevelEvent
  19300. GetPortNameFromProcessSerialNumber
  19301. GetProcessSerialNumberFromPortName
  19302. GetSpecificHighLevelEvent
  19303. PostHighLevelEvent
  19304.  
  19305. bufferIsSmall
  19306. connectionInvalid
  19307. GetSpecificFilterProcPtr
  19308. HighLevelEventMsg
  19309. HighLevelEventMsgClass
  19310. HighLevelEventMsgHdl
  19311. HighLevelEventMsgPtr
  19312. kHighLevelEvent
  19313. msgWasFullyAccepted
  19314. msgWasNotAccepted
  19315. msgWasPartiallyAccepted
  19316. nAttnMsg
  19317. noOutstandingHLE
  19318. noUserInteractionAllowed
  19319. nReturnReceipt
  19320. priorityMask
  19321. receiverIDisPSN
  19322. receiverIDisSessionID
  19323. receiverIDisSignature
  19324. receiverIDisTargetID
  19325. receiverIDMask
  19326. rtrnReceiptMsgID
  19327. SenderID
  19328. SenderIDPtr
  19329. systemOptionsMask
  19330. TargetID
  19331. TargetIDHdl
  19332. TargetIDPtr
  19333.  
  19334. æKY kHighLevelEvent
  19335. æFp EPPC.p
  19336. æT CONST
  19337. æD kHighLevelEvent = 23;
  19338. æC 
  19339.  
  19340. æKY receiverIDMask
  19341. æFp EPPC.p
  19342. æT CONST
  19343. æD receiverIDMask = $0000F000;
  19344. æC 
  19345.  
  19346. æKY receiverIDisPSN
  19347. æFp EPPC.p
  19348. æT CONST
  19349. æD receiverIDisPSN = $00008000;
  19350. æC 
  19351.  
  19352. æKY receiverIDisSignature
  19353. æFp EPPC.p
  19354. æT CONST
  19355. æD receiverIDisSignature = $00007000;
  19356. æC 
  19357.  
  19358. æKY receiverIDisSessionID
  19359. æFp EPPC.p
  19360. æT CONST
  19361. æD receiverIDisSessionID = $00006000;
  19362. æC 
  19363.  
  19364. æKY receiverIDisTargetID
  19365. æFp EPPC.p
  19366. æT CONST
  19367. æD receiverIDisTargetID = $00005000;
  19368. æC 
  19369.  
  19370. æKY systemOptionsMask
  19371. æFp EPPC.p
  19372. æT CONST
  19373. æD systemOptionsMask = $00000F00;
  19374. æC 
  19375.  
  19376. æKY nReturnReceipt
  19377. æFp EPPC.p
  19378. æT CONST
  19379. æD nReturnReceipt = $00000200;
  19380. æC 
  19381.  
  19382. æKY priorityMask
  19383. æFp EPPC.p
  19384. æT CONST
  19385. æD priorityMask = $000000FF;
  19386. æC 
  19387.  
  19388. æKY nAttnMsg
  19389. æFp EPPC.p
  19390. æT CONST
  19391. æD nAttnMsg = $00000001;
  19392. æC 
  19393.  
  19394. æKY bufferIsSmall
  19395. æFp EPPC.p
  19396. æT CONST
  19397. æD bufferIsSmall = -607;
  19398. æC 
  19399.  
  19400. æKY noOutstandingHLE
  19401. æFp EPPC.p
  19402. æT CONST
  19403. æD noOutstandingHLE = -608;
  19404. æC 
  19405.  
  19406. æKY connectionInvalid
  19407. æFp EPPC.p
  19408. æT CONST
  19409. æD connectionInvalid = -609;
  19410. æC 
  19411.  
  19412. æKY noUserInteractionAllowed
  19413. æFp EPPC.p
  19414. æT CONST
  19415. æD noUserInteractionAllowed = -610; { no user interaction allowed }
  19416. æC 
  19417.  
  19418. æKY HighLevelEventMsgClass
  19419. æFp EPPC.p
  19420. æT CONST
  19421. æD HighLevelEventMsgClass = 'jaym';
  19422. æC 
  19423.  
  19424. æKY rtrnReceiptMsgID
  19425. æFp EPPC.p
  19426. æT CONST
  19427. æD rtrnReceiptMsgID = 'rtrn';
  19428. æC 
  19429.  
  19430. æKY msgWasPartiallyAccepted
  19431. æFp EPPC.p
  19432. æT CONST
  19433. æD msgWasPartiallyAccepted = 2;
  19434. æC 
  19435.  
  19436. æKY msgWasFullyAccepted
  19437. æFp EPPC.p
  19438. æT CONST
  19439. æD msgWasFullyAccepted = 1;
  19440. æC 
  19441.  
  19442. æKY msgWasNotAccepted
  19443. æFp EPPC.p
  19444. æT CONST
  19445. æD msgWasNotAccepted = 0;
  19446. æC 
  19447.  
  19448. æKY TargetID
  19449. TargetIDPtr
  19450. TargetIDHdl
  19451. æFp EPPC.p
  19452. æT RECORD
  19453. æD TargetIDPtr = ^TargetID;
  19454. TargetIDHdl = ^TargetIDPtr;
  19455. TargetID = RECORD
  19456.     sessionID: LONGINT;
  19457.     name: PPCPortRec;
  19458.     location: LocationNameRec;
  19459.     recvrName: PPCPortRec;
  19460.     END;
  19461. æC 
  19462.  
  19463. æKY SenderID
  19464. æFp EPPC.p
  19465. æT TYPE
  19466. æD SenderID = TargetID;
  19467. æC 
  19468.  
  19469. æKY SenderIDPtr
  19470. æFp EPPC.p
  19471. æT TYPE
  19472. æD SenderIDPtr = ^SenderID;
  19473. æC 
  19474.  
  19475. æKY HighLevelEventMsg
  19476. HighLevelEventMsgPtr
  19477. HighLevelEventMsgHdl
  19478. æFp EPPC.p
  19479. æT RECORD
  19480. æD HighLevelEventMsgPtr = ^HighLevelEventMsg;
  19481. HighLevelEventMsgHdl = ^HighLevelEventMsgPtr;
  19482. HighLevelEventMsg = RECORD
  19483.     HighLevelEventMsgHeaderLength: INTEGER;
  19484.     version: INTEGER;
  19485.     reserved1: LONGINT;
  19486.     theMsgEvent: EventRecord;
  19487.     userRefcon: LONGINT;
  19488.     postingOptions: LONGINT;
  19489.     msgLength: LONGINT;
  19490.     END;
  19491. æC 
  19492.  
  19493. æKY PostHighLevelEvent
  19494. æFp EPPC.p
  19495. æT FUNCTION
  19496. æTN A88F
  19497. æD FUNCTION PostHighLevelEvent(theEvent: EventRecord;
  19498.                             receiverID: Ptr;
  19499.                             msgRefcon: LONGINT;
  19500.                             msgBuff: Ptr;
  19501.                             msgLen: LONGINT;
  19502.                             postingOptions: LONGINT): OSErr;
  19503.     INLINE $3F3C,$0034,$A88F;
  19504. æDT myVariable := PostHighLevelEvent(theEvent,receiverID,msgRefcon,msgBuff,msgLen,postingOptions);
  19505. æC 
  19506.  
  19507. æKY AcceptHighLevelEvent
  19508. æFp EPPC.p
  19509. æT FUNCTION
  19510. æTN A88F
  19511. æD FUNCTION AcceptHighLevelEvent(VAR sender: TargetID;
  19512.                               VAR msgRefcon: LONGINT;
  19513.                               msgBuff: Ptr;
  19514.                               VAR msgLen: LONGINT): OSErr;
  19515.     INLINE $3F3C,$0033,$A88F;
  19516. æDT myVariable := AcceptHighLevelEvent(sender,msgRefcon,msgBuff,msgLen);
  19517. æC 
  19518.  
  19519. æKY GetProcessSerialNumberFromPortName
  19520. æFp EPPC.p
  19521. æT FUNCTION
  19522. æTN A88F
  19523. æD FUNCTION GetProcessSerialNumberFromPortName(portName: PPCPortRec;VAR PSN: ProcessSerialNumber): OSErr;
  19524.     INLINE $3F3C,$0035,$A88F;
  19525. æDT myVariable := GetProcessSerialNumberFromPortName(portName,PSN);
  19526. æC 
  19527.  
  19528. æKY GetPortNameFromProcessSerialNumber
  19529. æFp EPPC.p
  19530. æT FUNCTION
  19531. æTN A88F
  19532. æD FUNCTION GetPortNameFromProcessSerialNumber(VAR portName: PPCPortRec;PSN: ProcessSerialNumber): OSErr;
  19533.     INLINE $3F3C,$0046,$A88F;
  19534. æDT myVariable := GetPortNameFromProcessSerialNumber(portName,PSN);
  19535. æC 
  19536.  
  19537. æKY GetSpecificFilterProcPtr
  19538. æFp EPPC.p
  19539. æT TYPE
  19540. æD GetSpecificFilterProcPtr = ProcPtr;    { FUNCTION MyFilter(yourDataPtr: Ptr;                }
  19541.                                     {                    msgBuff: HighLevelEventMsgPtr;    }
  19542.                                     {                    sender: TargetID): Boolean;        }
  19543. æC 
  19544.  
  19545. æKY GetSpecificHighLevelEvent
  19546. æFp EPPC.p
  19547. æT FUNCTION
  19548. æTN A88F
  19549. æD FUNCTION GetSpecificHighLevelEvent(aFilter: GetSpecificFilterProcPtr;yourDataPtr: UNIV Ptr;
  19550.     VAR err: OSErr): BOOLEAN;
  19551.     INLINE $3F3C,$0045,$A88F;
  19552. æDT myVariable := GetSpecificHighLevelEvent(aFilter,yourDataPtr,err);
  19553. æC 
  19554.  
  19555.  
  19556. æKY Errors.p
  19557. æKL SysError
  19558.  
  19559. abortErr
  19560. addRefFailed
  19561. addResFailed
  19562. afpAccessDenied
  19563. afpAuthContinue
  19564. afpBadIDErr
  19565. afpBadUAM
  19566. afpBadVersNum
  19567. afpBitmapErr
  19568. afpCallNotSupported
  19569. afpCantMove
  19570. afpCantRename
  19571. afpCatalogChanged
  19572. afpContainsSharedErr
  19573. afpDenyConflict
  19574. afpDiffVolErr
  19575. afpDirNotEmpty
  19576. afpDirNotFound
  19577. afpDiskFull
  19578. afpEofError
  19579. afpFileBusy
  19580. afpFlatVol
  19581. afpIconTypeError
  19582. afpIDExists
  19583. afpIDNotFound
  19584. afpInsideSharedErr
  19585. afpInsideTrashErr
  19586. afpItemNotFound
  19587. afpLockErr
  19588. afpMiscErr
  19589. afpNoMoreLocks
  19590. afpNoServer
  19591. afpObjectExists
  19592. afpObjectLocked
  19593. afpObjectNotFound
  19594. afpObjectTypeErr
  19595. afpParmErr
  19596. afpPwdExpiredErr
  19597. afpPwdSameErr
  19598. afpPwdTooShortErr
  19599. afpRangeNotLocked
  19600. afpRangeOverlap
  19601. afpSameObjectErr
  19602. afpServerGoingDown
  19603. afpSessClosed
  19604. afpTooManyFilesOpen
  19605. afpUserNotAuth
  19606. afpVolLocked
  19607. appIsDaemon
  19608. appMemFullErr
  19609. appModeErr
  19610. aspBadVersNum
  19611. aspBufTooSmall
  19612. aspNoAck
  19613. aspNoMoreSess
  19614. aspNoServers
  19615. aspParamErr
  19616. aspServerBusy
  19617. aspSessClosed
  19618. aspSizeErr
  19619. aspTooMany
  19620. atpBadRsp
  19621. atpLenErr
  19622. authFailErr
  19623. badATPSkt
  19624. badBtSlpErr
  19625. badBuffNum
  19626. badChannel
  19627. badCksmErr
  19628. badDBtSlp
  19629. badDCksum
  19630. badEditionFileErr
  19631. badExtResource
  19632. badFidErr
  19633. badFileFormat
  19634. badFormat
  19635. badLocNameErr
  19636. badMDBErr
  19637. badMovErr
  19638. badPortNameErr
  19639. badReqErr
  19640. badSectionErr
  19641. badServiceMethodErr
  19642. badSubPartErr
  19643. badUnitErr
  19644. bdNamErr
  19645. breakRecd
  19646. buf2SmallErr
  19647. buffersTooSmall
  19648. cannotDeferErr
  19649. cannotMakeContiguousErr
  19650. CantDecompress
  19651. cantLoadPickMethodErr
  19652. cantStepErr
  19653. catChangedErr
  19654. cbNotFound
  19655. CDEFNFnd
  19656. cDevErr
  19657. channelBusy
  19658. channelNotBusy
  19659. ckSumErr
  19660. clkRdErr
  19661. clkWrErr
  19662. closErr
  19663. cMatchErr
  19664. cNoMemErr
  19665. colorsRequestedErr
  19666. containerAlreadyOpenWrn
  19667. containerNotFoundWrn
  19668. controlErr
  19669. corErr
  19670. cProtectErr
  19671. cRangeErr
  19672. cResErr
  19673. cTempMemErr
  19674. dataVerErr
  19675. dceExtErr
  19676. ddpLenErr
  19677. ddpSktErr
  19678. desktopDamagedErr
  19679. destPortErr
  19680. diffVolErr
  19681. dInstErr
  19682. dirFulErr
  19683. dirNFErr
  19684. dRemovErr
  19685. ds32BitMode
  19686. dsAddressErr
  19687. dsBadLaunch
  19688. dsBadPatch
  19689. dsBadPatchHeader
  19690. dsBadSANEOpcode
  19691. dsBadSlotInt
  19692. dsBadStartupDisk
  19693. dsBufPtrTooLow
  19694. dsBusError
  19695. dsCDEFNotFound
  19696. dsChkErr
  19697. dsCoreErr
  19698. dsDisassemblerInstalled
  19699. dsExtensionsDisabled
  19700. dsFinderErr
  19701. dsForcedQuit
  19702. dsFPErr
  19703. dsFSErr
  19704. dsGreeting
  19705. dsHD20Installed
  19706. dsHMenuFindErr
  19707. dsIllInstErr
  19708. dsIOCoreErr
  19709. dsIrqErr
  19710. dskFulErr
  19711. dsLineAErr
  19712. dsLineFErr
  19713. dsLoadErr
  19714. dsMacsBugInstalled
  19715. dsMBarNFnd
  19716. dsMDEFNotFound
  19717. dsMemFullErr
  19718. dsMiscErr
  19719. dsNeedToWriteBootBlocks
  19720. dsNoFPU
  19721. dsNoPackErr
  19722. dsNoPatch
  19723. dsNoPk1
  19724. dsNoPk2
  19725. dsNoPk3
  19726. dsNoPk4
  19727. dsNoPk5
  19728. dsNoPk6
  19729. dsNoPk7
  19730. dsNotEnoughRAMToBoot
  19731. dsNotThe1
  19732. dsOldSystem
  19733. dsOvflowErr
  19734. dsParityErr
  19735. dsPrivErr
  19736. dsReinsert
  19737. dsShutDownOrRestart
  19738. dsStknHeap
  19739. dsSwitchOffOrRestart
  19740. dsSysErr
  19741. dsSystemFileErr
  19742. dsTraceErr
  19743. dsWDEFNotFound
  19744. dsZeroDivErr
  19745. dupFNErr
  19746. editionMgrInitErr
  19747. envBadVers
  19748. envNotPresent
  19749. envVersTooBig
  19750. eofErr
  19751. evtNotEnb
  19752. excessCollsns
  19753. extFSErr
  19754. extractErr
  19755. exUserBreak
  19756. fBsyErr
  19757. fidExists
  19758. fidNotFound
  19759. firstDskErr
  19760. fLckdErr
  19761. fmt1Err
  19762. fmt2Err
  19763. fnfErr
  19764. fnOpnErr
  19765. fontDecError
  19766. fontNotDeclared
  19767. fontNotOutlineErr
  19768. fontSubErr
  19769. framingErr
  19770. fsRnErr
  19771. gcrOnMFMErr
  19772. gfpErr
  19773. guestNotAllowedErr
  19774. hardwareConfigErr
  19775. hMenuFindErr
  19776. hwOverrunErr
  19777. hwParamErr
  19778. iIOAbortErr
  19779. initIWMErr
  19780. interruptsMaskedErr
  19781. ioErr
  19782. lapProtErr
  19783. lastDskErr
  19784. localOnlyErr
  19785. mapReadErr
  19786. mBarNFnd
  19787. memAdrErr
  19788. memAZErr
  19789. memBCErr
  19790. memFragErr
  19791. memFullErr
  19792. memLockedErr
  19793. memPCErr
  19794. memPurErr
  19795. memROZErr
  19796. memROZError
  19797. memROZWarn
  19798. memSCErr
  19799. memWZErr
  19800. menuPrgErr
  19801. mFulErr
  19802. multiplePublisherWrn
  19803. nameTypeErr
  19804. nbpBuffOvr
  19805. nbpConfDiff
  19806. nbpDuplicate
  19807. nbpNISErr
  19808. nbpNoConfirm
  19809. nbpNotFound
  19810. negZcbFreeErr
  19811. networkErr
  19812. nilHandleErr
  19813. nmTypErr
  19814. noAdrMkErr
  19815. noBridgeErr
  19816. noDataArea
  19817. noDefaultUserErr
  19818. noDriveErr
  19819. noDtaMkErr
  19820. noGlobalsErr
  19821. noHardware
  19822. noHardwareErr
  19823. noInformErr
  19824. noMacDskErr
  19825. noMachineNameErr
  19826. noMemForPictPlaybackErr
  19827. noMoreRealTime
  19828. noMPPErr
  19829. noNybErr
  19830. noPortErr
  19831. noRelErr
  19832. noResponseErr
  19833. noScrapErr
  19834. noSendResp
  19835. noSessionErr
  19836. notAFileErr
  19837. notEnoughBufferSpace
  19838. notEnoughHardware
  19839. notEnoughHardwareErr
  19840. notEnoughMemoryErr
  19841. notHeldErr
  19842. notInitErr
  19843. notLockedErr
  19844. notLoggedInErr
  19845. noToolboxNameErr
  19846. notOpenErr
  19847. notRegisteredSectionErr
  19848. notThePublisherWrn
  19849. noTypeErr
  19850. noUserNameErr
  19851. noUserRecErr
  19852. noUserRefErr
  19853. nsDrvErr
  19854. nsStackErr
  19855. nsvErr
  19856. offLinErr
  19857. openErr
  19858. opWrErr
  19859. paramErr
  19860. parityErr
  19861. permErr
  19862. pictInfoIDErr
  19863. pictInfoVerbErr
  19864. pictInfoVersionErr
  19865. pictureDataErr
  19866. pixMapTooDeepErr
  19867. pmBusyErr
  19868. pmRecvEndErr
  19869. pmRecvStartErr
  19870. pmReplyTOErr
  19871. pmSendEndErr
  19872. pmSendStartErr
  19873. portClosedErr
  19874. portInUse
  19875. portNameExistsErr
  19876. portNotCf
  19877. posErr
  19878. prInitErr
  19879. procNotFound
  19880. protocolErr
  19881. prWrErr
  19882. qErr
  19883. queueFull
  19884. rcvrErr
  19885. readErr
  19886. readQErr
  19887. recNotFnd
  19888. reqAborted
  19889. reqFailed
  19890. resAttrErr
  19891. resFNotFound
  19892. resNotFound
  19893. resProblem
  19894. rfNumErr
  19895. rgnTooBigErr
  19896. rgnTooBigError
  19897. rmvRefFailed
  19898. rmvResFailed
  19899. sameFileErr
  19900. sdmInitErr
  19901. sdmJTInitErr
  19902. sdmPRAMInitErr
  19903. sdmPriInitErr
  19904. sdmSRTInitErr
  19905. sectNFErr
  19906. seekErr
  19907. selectorErr
  19908. seNoDB
  19909. sessClosedErr
  19910. sessTableErr
  19911. shutDownAlert
  19912. siBadDeviceName
  19913. siBadRefNum
  19914. siBadSoundInDevice
  19915. siDeviceBusyErr
  19916. siHardDriveTooSlow
  19917. siInitSDTblErr
  19918. siInitSPTblErr
  19919. siInitVBLQsErr
  19920. siInputDeviceErr
  19921. siInvalidCompression
  19922. siInvalidSampleRate
  19923. siInvalidSampleSize
  19924. siNoBufferSpecified
  19925. siNoSoundInHardware
  19926. siUnknownInfoType
  19927. siUnknownQuality
  19928. sktClosedErr
  19929. slotNumErr
  19930. SlpTypeErr
  19931. smBadBoardId
  19932. smBadRefId
  19933. smBadsList
  19934. smBadsPtrErr
  19935. smBLFieldBad
  19936. smBlkMoveErr
  19937. smBusErrTO
  19938. smByteLanesErr
  19939. smCkStatusErr
  19940. smCodeRevErr
  19941. smCPUErr
  19942. smCRCFail
  19943. smDisabledSlot
  19944. smDisDrvrNamErr
  19945. smDisposePErr
  19946. smEmptySlot
  19947. smFHBlkDispErr
  19948. smFHBlockRdErr
  19949. smFormatErr
  19950. smGetDrvrNamErr
  19951. smGetPRErr
  19952. smInitStatVErr
  19953. smInitTblVErr
  19954. smNewPErr
  19955. smNilsBlockErr
  19956. smNoBoardId
  19957. smNoBoardSRsrc
  19958. smNoDir
  19959. smNoGoodOpens
  19960. smNoJmpTbl
  19961. smNoMoresRsrcs
  19962. smNosInfoArray
  19963. smOffsetErr
  19964. smPRAMInitErr
  19965. smPriInitErr
  19966. smRecNotFnd
  19967. smReservedErr
  19968. smResrvErr
  19969. smRevisionErr
  19970. smSDMInitErr
  19971. smSelOOBErr
  19972. smsGetDrvrErr
  19973. smSlotOOBErr
  19974. smsPointerNil
  19975. smSRTInitErr
  19976. smSRTOvrFlErr
  19977. smUnExBusErr
  19978. spdAdjErr
  19979. statusErr
  19980. strUserBreak
  19981. svDisabled
  19982. svTempDisable
  19983. swOverrunErr
  19984. teScrapSizeErr
  19985. tk0BadErr
  19986. tmfoErr
  19987. tmwdoErr
  19988. tooManyReqs
  19989. tooManySkts
  19990. twoSideErr
  19991. unimpErr
  19992. unitEmptyErr
  19993. unitTblFullErr
  19994. updPixMemErr
  19995. userBreak
  19996. userCanceledErr
  19997. userRejectErr
  19998. verErr
  19999. vLckdErr
  20000. volGoneErr
  20001. volOffLinErr
  20002. volOnLinErr
  20003. vTypErr
  20004. WDEFNFnd
  20005. wPrErr
  20006. wrgVolTypErr
  20007. writErr
  20008. wrPermErr
  20009. wrUnderrun
  20010.  
  20011. æKY paramErr
  20012. æFp Errors.p
  20013. æT CONST
  20014. æD paramErr = -50; {error in user parameter list}
  20015. æC 
  20016.  
  20017. æKY noHardwareErr
  20018. æFp Errors.p
  20019. æT CONST
  20020. æD noHardwareErr = -200; {Sound Manager Error Returns}
  20021. æC 
  20022.  
  20023. æKY notEnoughHardwareErr
  20024. æFp Errors.p
  20025. æT CONST
  20026. æD notEnoughHardwareErr = -201; {Sound Manager Error Returns}
  20027. æC 
  20028.  
  20029. æKY userCanceledErr
  20030. æFp Errors.p
  20031. æT CONST
  20032. æD userCanceledErr = -128;
  20033. æC 
  20034.  
  20035. æKY qErr
  20036. æFp Errors.p
  20037. æT CONST
  20038. æD qErr = -1; {queue element not found during deletion}
  20039. æC 
  20040.  
  20041. æKY vTypErr
  20042. æFp Errors.p
  20043. æT CONST
  20044. æD vTypErr = -2; {invalid queue element}
  20045. æC 
  20046.  
  20047. æKY corErr
  20048. æFp Errors.p
  20049. æT CONST
  20050. æD corErr = -3; {core routine number out of range}
  20051. æC 
  20052.  
  20053. æKY unimpErr
  20054. æFp Errors.p
  20055. æT CONST
  20056. æD unimpErr = -4; {unimplemented core routine}
  20057. æC 
  20058.  
  20059. æKY SlpTypeErr
  20060. æFp Errors.p
  20061. æT CONST
  20062. æD SlpTypeErr = -5; {invalid queue element}
  20063. æC 
  20064.  
  20065. æKY seNoDB
  20066. æFp Errors.p
  20067. æT CONST
  20068. æD seNoDB = -8; {no debugger installed to handle debugger command}
  20069. æC 
  20070.  
  20071. æKY controlErr
  20072. æFp Errors.p
  20073. æT CONST
  20074. æD controlErr = -17; {I/O System Errors}
  20075. æC 
  20076.  
  20077. æKY statusErr
  20078. æFp Errors.p
  20079. æT CONST
  20080. æD statusErr = -18; {I/O System Errors}
  20081. æC 
  20082.  
  20083. æKY readErr
  20084. æFp Errors.p
  20085. æT CONST
  20086. æD readErr = -19; {I/O System Errors}
  20087. æC 
  20088.  
  20089. æKY writErr
  20090. æFp Errors.p
  20091. æT CONST
  20092. æD writErr = -20; {I/O System Errors}
  20093. æC 
  20094.  
  20095. æKY badUnitErr
  20096. æFp Errors.p
  20097. æT CONST
  20098. æD badUnitErr = -21; {I/O System Errors}
  20099. æC 
  20100.  
  20101. æKY unitEmptyErr
  20102. æFp Errors.p
  20103. æT CONST
  20104. æD unitEmptyErr = -22; {I/O System Errors}
  20105. æC 
  20106.  
  20107. æKY openErr
  20108. æFp Errors.p
  20109. æT CONST
  20110. æD openErr = -23; {I/O System Errors}
  20111. æC 
  20112.  
  20113. æKY closErr
  20114. æFp Errors.p
  20115. æT CONST
  20116. æD closErr = -24; {I/O System Errors}
  20117. æC 
  20118.  
  20119. æKY dRemovErr
  20120. æFp Errors.p
  20121. æT CONST
  20122. æD dRemovErr = -25; {tried to remove an open driver}
  20123. æC 
  20124.  
  20125. æKY dInstErr
  20126. æFp Errors.p
  20127. æT CONST
  20128. æD dInstErr = -26; {DrvrInstall couldn't find driver in resources }
  20129. æC 
  20130.  
  20131. æKY abortErr
  20132. æFp Errors.p
  20133. æT CONST
  20134. æD abortErr = -27; {IO call aborted by KillIO}
  20135. æC 
  20136.  
  20137. æKY iIOAbortErr
  20138. æFp Errors.p
  20139. æT CONST
  20140. æD iIOAbortErr = -27; {IO abort error (Printing Manager)}
  20141. æC 
  20142.  
  20143. æKY notOpenErr
  20144. æFp Errors.p
  20145. æT CONST
  20146. æD notOpenErr = -28; {Couldn't rd/wr/ctl/sts cause driver not opened}
  20147. æC 
  20148.  
  20149. æKY unitTblFullErr
  20150. æFp Errors.p
  20151. æT CONST
  20152. æD unitTblFullErr = -29; {unit table has no more entries}
  20153. æC 
  20154.  
  20155. æKY dceExtErr
  20156. æFp Errors.p
  20157. æT CONST
  20158. æD dceExtErr = -30; {dce extension error}
  20159. æC 
  20160.  
  20161. æKY slotNumErr
  20162. æFp Errors.p
  20163. æT CONST
  20164. æD slotNumErr = -360; {invalid slot # error}
  20165. æC 
  20166.  
  20167. æKY gcrOnMFMErr
  20168. æFp Errors.p
  20169. æT CONST
  20170. æD gcrOnMFMErr = -400; {gcr format on high density media error}
  20171. æC 
  20172.  
  20173. æKY dirFulErr
  20174. æFp Errors.p
  20175. æT CONST
  20176. æD dirFulErr = -33; {Directory full}
  20177. æC 
  20178.  
  20179. æKY dskFulErr
  20180. æFp Errors.p
  20181. æT CONST
  20182. æD dskFulErr = -34; {disk full}
  20183. æC 
  20184.  
  20185. æKY nsvErr
  20186. æFp Errors.p
  20187. æT CONST
  20188. æD nsvErr = -35; {no such volume}
  20189. æC 
  20190.  
  20191. æKY ioErr
  20192. æFp Errors.p
  20193. æT CONST
  20194. æD ioErr = -36; {I/O error (bummers)}
  20195. æC 
  20196.  
  20197. æKY bdNamErr
  20198. æFp Errors.p
  20199. æT CONST
  20200. æD bdNamErr = -37; {there may be no bad names in the final system!}
  20201. æC 
  20202.  
  20203. æKY fnOpnErr
  20204. æFp Errors.p
  20205. æT CONST
  20206. æD fnOpnErr = -38; {File not open}
  20207. æC 
  20208.  
  20209. æKY eofErr
  20210. æFp Errors.p
  20211. æT CONST
  20212. æD eofErr = -39; {End of file}
  20213. æC 
  20214.  
  20215. æKY posErr
  20216. æFp Errors.p
  20217. æT CONST
  20218. æD posErr = -40; {tried to position to before start of file (r/w)}
  20219. æC 
  20220.  
  20221. æKY mFulErr
  20222. æFp Errors.p
  20223. æT CONST
  20224. æD mFulErr = -41; {memory full (open) or file won't fit (load)}
  20225. æC 
  20226.  
  20227. æKY tmfoErr
  20228. æFp Errors.p
  20229. æT CONST
  20230. æD tmfoErr = -42; {too many files open}
  20231. æC 
  20232.  
  20233. æKY fnfErr
  20234. æFp Errors.p
  20235. æT CONST
  20236. æD fnfErr = -43; {File not found}
  20237. æC 
  20238.  
  20239. æKY wPrErr
  20240. æFp Errors.p
  20241. æT CONST
  20242. æD wPrErr = -44; {diskette is write protected.}
  20243. æC 
  20244.  
  20245. æKY fLckdErr
  20246. æFp Errors.p
  20247. æT CONST
  20248. æD fLckdErr = -45; {file is locked}
  20249. æC 
  20250.  
  20251. æKY vLckdErr
  20252. æFp Errors.p
  20253. æT CONST
  20254. æD vLckdErr = -46; {volume is locked}
  20255. æC 
  20256.  
  20257. æKY fBsyErr
  20258. æFp Errors.p
  20259. æT CONST
  20260. æD fBsyErr = -47; {File is busy (delete)}
  20261. æC 
  20262.  
  20263. æKY dupFNErr
  20264. æFp Errors.p
  20265. æT CONST
  20266. æD dupFNErr = -48; {duplicate filename (rename)}
  20267. æC 
  20268.  
  20269. æKY opWrErr
  20270. æFp Errors.p
  20271. æT CONST
  20272. æD opWrErr = -49; {file already open with with write permission}
  20273. æC 
  20274.  
  20275. æKY rfNumErr
  20276. æFp Errors.p
  20277. æT CONST
  20278. æD rfNumErr = -51; {refnum error}
  20279. æC 
  20280.  
  20281. æKY gfpErr
  20282. æFp Errors.p
  20283. æT CONST
  20284. æD gfpErr = -52; {get file position error}
  20285. æC 
  20286.  
  20287. æKY volOffLinErr
  20288. æFp Errors.p
  20289. æT CONST
  20290. æD volOffLinErr = -53; {volume not on line error (was Ejected)}
  20291. æC 
  20292.  
  20293. æKY permErr
  20294. æFp Errors.p
  20295. æT CONST
  20296. æD permErr = -54; {permissions error (on file open)}
  20297. æC 
  20298.  
  20299. æKY volOnLinErr
  20300. æFp Errors.p
  20301. æT CONST
  20302. æD volOnLinErr = -55; {drive volume already on-line at MountVol}
  20303. æC 
  20304.  
  20305. æKY nsDrvErr
  20306. æFp Errors.p
  20307. æT CONST
  20308. æD nsDrvErr = -56; {no such drive (tried to mount a bad drive num)}
  20309. æC 
  20310.  
  20311. æKY noMacDskErr
  20312. æFp Errors.p
  20313. æT CONST
  20314. æD noMacDskErr = -57; {not a mac diskette (sig bytes are wrong)}
  20315. æC 
  20316.  
  20317. æKY extFSErr
  20318. æFp Errors.p
  20319. æT CONST
  20320. æD extFSErr = -58; {volume in question belongs to an external fs}
  20321. æC 
  20322.  
  20323. æKY fsRnErr
  20324. æFp Errors.p
  20325. æT CONST
  20326. æD fsRnErr = -59; {file system internal error:during rename the old entry was deleted but could not be restored.}
  20327. æC 
  20328.  
  20329. æKY badMDBErr
  20330. æFp Errors.p
  20331. æT CONST
  20332. æD badMDBErr = -60; {bad master directory block}
  20333. æC 
  20334.  
  20335. æKY wrPermErr
  20336. æFp Errors.p
  20337. æT CONST
  20338. æD wrPermErr = -61; {write permissions error}
  20339. æC 
  20340.  
  20341. æKY dirNFErr
  20342. æFp Errors.p
  20343. æT CONST
  20344. æD dirNFErr = -120; {Directory not found}
  20345. æC 
  20346.  
  20347. æKY tmwdoErr
  20348. æFp Errors.p
  20349. æT CONST
  20350. æD tmwdoErr = -121; {No free WDCB available}
  20351. æC 
  20352.  
  20353. æKY badMovErr
  20354. æFp Errors.p
  20355. æT CONST
  20356. æD badMovErr = -122; {Move into offspring error}
  20357. æC 
  20358.  
  20359. æKY wrgVolTypErr
  20360. æFp Errors.p
  20361. æT CONST
  20362. æD wrgVolTypErr = -123; {Wrong volume type error [operation not supported for MFS]}
  20363. æC 
  20364.  
  20365. æKY volGoneErr
  20366. æFp Errors.p
  20367. æT CONST
  20368. æD volGoneErr = -124; {Server volume has been disconnected.}
  20369. æC 
  20370.  
  20371. æKY fidNotFound
  20372. æFp Errors.p
  20373. æT CONST
  20374. æD fidNotFound = -1300; {no file thread exists.}
  20375. æC 
  20376.  
  20377. æKY fidExists
  20378. æFp Errors.p
  20379. æT CONST
  20380. æD fidExists = -1301; {file id already exists}
  20381. æC 
  20382.  
  20383. æKY notAFileErr
  20384. æFp Errors.p
  20385. æT CONST
  20386. æD notAFileErr = -1302; {directory specified}
  20387. æC 
  20388.  
  20389. æKY diffVolErr
  20390. æFp Errors.p
  20391. æT CONST
  20392. æD diffVolErr = -1303; {files on different volumes}
  20393. æC 
  20394.  
  20395. æKY catChangedErr
  20396. æFp Errors.p
  20397. æT CONST
  20398. æD catChangedErr = -1304; {the catalog has been modified}
  20399. æC 
  20400.  
  20401. æKY desktopDamagedErr
  20402. æFp Errors.p
  20403. æT CONST
  20404. æD desktopDamagedErr = -1305; {desktop database files are corrupted}
  20405. æC 
  20406.  
  20407. æKY sameFileErr
  20408. æFp Errors.p
  20409. æT CONST
  20410. æD sameFileErr = -1306; {can't exchange a file with itself}
  20411. æC 
  20412.  
  20413. æKY badFidErr
  20414. æFp Errors.p
  20415. æT CONST
  20416. æD badFidErr = -1307; {file id is dangling or doesn't match with the file number}
  20417. æC 
  20418.  
  20419. æKY envNotPresent
  20420. æFp Errors.p
  20421. æT CONST
  20422. æD envNotPresent = -5500; {returned by glue.}
  20423. æC 
  20424.  
  20425. æKY envBadVers
  20426. æFp Errors.p
  20427. æT CONST
  20428. æD envBadVers = -5501; {Version non-positive}
  20429. æC 
  20430.  
  20431. æKY envVersTooBig
  20432. æFp Errors.p
  20433. æT CONST
  20434. æD envVersTooBig = -5502; {Version bigger than call can handle}
  20435. æC 
  20436.  
  20437. æKY fontDecError
  20438. æFp Errors.p
  20439. æT CONST
  20440. æD fontDecError = -64; {error during font declaration}
  20441. æC 
  20442.  
  20443. æKY fontNotDeclared
  20444. æFp Errors.p
  20445. æT CONST
  20446. æD fontNotDeclared = -65; {font not declared}
  20447. æC 
  20448.  
  20449. æKY fontSubErr
  20450. æFp Errors.p
  20451. æT CONST
  20452. æD fontSubErr = -66; {font substitution occured}
  20453. æC 
  20454.  
  20455. æKY fontNotOutlineErr
  20456. æFp Errors.p
  20457. æT CONST
  20458. æD fontNotOutlineErr = -32615; {bitmap font passed to routine that does outlines only}
  20459. æC 
  20460.  
  20461. æKY firstDskErr
  20462. æFp Errors.p
  20463. æT CONST
  20464. æD firstDskErr = -84; {I/O System Errors}
  20465. æC 
  20466.  
  20467. æKY lastDskErr
  20468. æFp Errors.p
  20469. æT CONST
  20470. æD lastDskErr = -64; {I/O System Errors}
  20471. æC 
  20472.  
  20473. æKY noDriveErr
  20474. æFp Errors.p
  20475. æT CONST
  20476. æD noDriveErr = -64; {drive not installed}
  20477. æC 
  20478.  
  20479. æKY offLinErr
  20480. æFp Errors.p
  20481. æT CONST
  20482. æD offLinErr = -65; {r/w requested for an off-line drive}
  20483. æC 
  20484.  
  20485. æKY noNybErr
  20486. æFp Errors.p
  20487. æT CONST
  20488. æD noNybErr = -66; {couldn't find 5 nybbles in 200 tries}
  20489. æC 
  20490.  
  20491. æKY noAdrMkErr
  20492. æFp Errors.p
  20493. æT CONST
  20494. æD noAdrMkErr = -67; {couldn't find valid addr mark}
  20495. æC 
  20496.  
  20497. æKY dataVerErr
  20498. æFp Errors.p
  20499. æT CONST
  20500. æD dataVerErr = -68; {read verify compare failed}
  20501. æC 
  20502.  
  20503. æKY badCksmErr
  20504. æFp Errors.p
  20505. æT CONST
  20506. æD badCksmErr = -69; {addr mark checksum didn't check}
  20507. æC 
  20508.  
  20509. æKY badBtSlpErr
  20510. æFp Errors.p
  20511. æT CONST
  20512. æD badBtSlpErr = -70; {bad addr mark bit slip nibbles}
  20513. æC 
  20514.  
  20515. æKY noDtaMkErr
  20516. æFp Errors.p
  20517. æT CONST
  20518. æD noDtaMkErr = -71; {couldn't find a data mark header}
  20519. æC 
  20520.  
  20521. æKY badDCksum
  20522. æFp Errors.p
  20523. æT CONST
  20524. æD badDCksum = -72; {bad data mark checksum}
  20525. æC 
  20526.  
  20527. æKY badDBtSlp
  20528. æFp Errors.p
  20529. æT CONST
  20530. æD badDBtSlp = -73; {bad data mark bit slip nibbles}
  20531. æC 
  20532.  
  20533. æKY wrUnderrun
  20534. æFp Errors.p
  20535. æT CONST
  20536. æD wrUnderrun = -74; {write underrun occurred}
  20537. æC 
  20538.  
  20539. æKY cantStepErr
  20540. æFp Errors.p
  20541. æT CONST
  20542. æD cantStepErr = -75; {step handshake failed}
  20543. æC 
  20544.  
  20545. æKY tk0BadErr
  20546. æFp Errors.p
  20547. æT CONST
  20548. æD tk0BadErr = -76; {track 0 detect doesn't change}
  20549. æC 
  20550.  
  20551. æKY initIWMErr
  20552. æFp Errors.p
  20553. æT CONST
  20554. æD initIWMErr = -77; {unable to initialize IWM}
  20555. æC 
  20556.  
  20557. æKY twoSideErr
  20558. æFp Errors.p
  20559. æT CONST
  20560. æD twoSideErr = -78; {tried to read 2nd side on a 1-sided drive}
  20561. æC 
  20562.  
  20563. æKY spdAdjErr
  20564. æFp Errors.p
  20565. æT CONST
  20566. æD spdAdjErr = -79; {unable to correctly adjust disk speed}
  20567. æC 
  20568.  
  20569. æKY seekErr
  20570. æFp Errors.p
  20571. æT CONST
  20572. æD seekErr = -80; {track number wrong on address mark}
  20573. æC 
  20574.  
  20575. æKY sectNFErr
  20576. æFp Errors.p
  20577. æT CONST
  20578. æD sectNFErr = -81; {sector number never found on a track}
  20579. æC 
  20580.  
  20581. æKY fmt1Err
  20582. æFp Errors.p
  20583. æT CONST
  20584. æD fmt1Err = -82; {can't find sector 0 after track format}
  20585. æC 
  20586.  
  20587. æKY fmt2Err
  20588. æFp Errors.p
  20589. æT CONST
  20590. æD fmt2Err = -83; {can't get enough sync}
  20591. æC 
  20592.  
  20593. æKY verErr
  20594. æFp Errors.p
  20595. æT CONST
  20596. æD verErr = -84; {track failed to verify}
  20597. æC 
  20598.  
  20599. æKY clkRdErr
  20600. æFp Errors.p
  20601. æT CONST
  20602. æD clkRdErr = -85; {unable to read same clock value twice}
  20603. æC 
  20604.  
  20605. æKY clkWrErr
  20606. æFp Errors.p
  20607. æT CONST
  20608. æD clkWrErr = -86; {time written did not verify}
  20609. æC 
  20610.  
  20611. æKY prWrErr
  20612. æFp Errors.p
  20613. æT CONST
  20614. æD prWrErr = -87; {parameter ram written didn't read-verify}
  20615. æC 
  20616.  
  20617. æKY prInitErr
  20618. æFp Errors.p
  20619. æT CONST
  20620. æD prInitErr = -88; {InitUtil found the parameter ram uninitialized}
  20621. æC 
  20622.  
  20623. æKY rcvrErr
  20624. æFp Errors.p
  20625. æT CONST
  20626. æD rcvrErr = -89; {SCC receiver error (framing; parity; OR)}
  20627. æC 
  20628.  
  20629. æKY breakRecd
  20630. æFp Errors.p
  20631. æT CONST
  20632. æD breakRecd = -90; {Break received (SCC)}
  20633. æC 
  20634.  
  20635. æKY pmBusyErr
  20636. æFp Errors.p
  20637. æT CONST
  20638. æD pmBusyErr = -13000; {Power Mgr never ready to start handshake}
  20639. æC 
  20640.  
  20641. æKY pmReplyTOErr
  20642. æFp Errors.p
  20643. æT CONST
  20644. æD pmReplyTOErr = -13001; {Timed out waiting for reply}
  20645. æC 
  20646.  
  20647. æKY pmSendStartErr
  20648. æFp Errors.p
  20649. æT CONST
  20650. æD pmSendStartErr = -13002; {during send, pmgr did not start hs}
  20651. æC 
  20652.  
  20653. æKY pmSendEndErr
  20654. æFp Errors.p
  20655. æT CONST
  20656. æD pmSendEndErr = -13003; {during send, pmgr did not finish hs}
  20657. æC 
  20658.  
  20659. æKY pmRecvStartErr
  20660. æFp Errors.p
  20661. æT CONST
  20662. æD pmRecvStartErr = -13004; {during receive, pmgr did not start hs}
  20663. æC 
  20664.  
  20665. æKY pmRecvEndErr
  20666. æFp Errors.p
  20667. æT CONST
  20668. æD pmRecvEndErr = -13005; {during receive, pmgr did not finish hs configured for this connection}
  20669. æC 
  20670.  
  20671. æKY noScrapErr
  20672. æFp Errors.p
  20673. æT CONST
  20674. æD noScrapErr = -100; {No scrap exists error}
  20675. æC 
  20676.  
  20677. æKY noTypeErr
  20678. æFp Errors.p
  20679. æT CONST
  20680. æD noTypeErr = -102; {No object of that type in scrap}
  20681. æC 
  20682.  
  20683. æKY memROZWarn
  20684. æFp Errors.p
  20685. æT CONST
  20686. æD memROZWarn = -99; {soft error in ROZ}
  20687. æC 
  20688.  
  20689. æKY memROZError
  20690. æFp Errors.p
  20691. æT CONST
  20692. æD memROZError = -99; {hard error in ROZ}
  20693. æC 
  20694.  
  20695. æKY memROZErr
  20696. æFp Errors.p
  20697. æT CONST
  20698. æD memROZErr = -99; {hard error in ROZ}
  20699. æC 
  20700.  
  20701. æKY memFullErr
  20702. æFp Errors.p
  20703. æT CONST
  20704. æD memFullErr = -108; {Not enough room in heap zone}
  20705. æC 
  20706.  
  20707. æKY nilHandleErr
  20708. æFp Errors.p
  20709. æT CONST
  20710. æD nilHandleErr = -109; {Master Pointer was NIL in HandleZone or other}
  20711. æC 
  20712.  
  20713. æKY memWZErr
  20714. æFp Errors.p
  20715. æT CONST
  20716. æD memWZErr = -111; {WhichZone failed (applied to free block)}
  20717. æC 
  20718.  
  20719. æKY memPurErr
  20720. æFp Errors.p
  20721. æT CONST
  20722. æD memPurErr = -112; {trying to purge a locked or non-purgeable block}
  20723. æC 
  20724.  
  20725. æKY memAdrErr
  20726. æFp Errors.p
  20727. æT CONST
  20728. æD memAdrErr = -110; {address was odd; or out of range}
  20729. æC 
  20730.  
  20731. æKY memAZErr
  20732. æFp Errors.p
  20733. æT CONST
  20734. æD memAZErr = -113; {Address in zone check failed}
  20735. æC 
  20736.  
  20737. æKY memPCErr
  20738. æFp Errors.p
  20739. æT CONST
  20740. æD memPCErr = -114; {Pointer Check failed}
  20741. æC 
  20742.  
  20743. æKY memBCErr
  20744. æFp Errors.p
  20745. æT CONST
  20746. æD memBCErr = -115; {Block Check failed}
  20747. æC 
  20748.  
  20749. æKY memSCErr
  20750. æFp Errors.p
  20751. æT CONST
  20752. æD memSCErr = -116; {Size Check failed}
  20753. æC 
  20754.  
  20755. æKY memLockedErr
  20756. æFp Errors.p
  20757. æT CONST
  20758. æD memLockedErr = -117; {trying to move a locked block (MoveHHi)}
  20759. æC 
  20760.  
  20761. æKY resNotFound
  20762. æFp Errors.p
  20763. æT CONST
  20764. æD resNotFound = -192; {Resource not found}
  20765. æC 
  20766.  
  20767. æKY resFNotFound
  20768. æFp Errors.p
  20769. æT CONST
  20770. æD resFNotFound = -193; {Resource file not found}
  20771. æC 
  20772.  
  20773. æKY addResFailed
  20774. æFp Errors.p
  20775. æT CONST
  20776. æD addResFailed = -194; {AddResource failed}
  20777. æC 
  20778.  
  20779. æKY addRefFailed
  20780. æFp Errors.p
  20781. æT CONST
  20782. æD addRefFailed = -195; {AddReference failed}
  20783. æC 
  20784.  
  20785. æKY rmvResFailed
  20786. æFp Errors.p
  20787. æT CONST
  20788. æD rmvResFailed = -196; {RmveResource failed}
  20789. æC 
  20790.  
  20791. æKY rmvRefFailed
  20792. æFp Errors.p
  20793. æT CONST
  20794. æD rmvRefFailed = -197; {RmveReference failed}
  20795. æC 
  20796.  
  20797. æKY resAttrErr
  20798. æFp Errors.p
  20799. æT CONST
  20800. æD resAttrErr = -198; {attribute inconsistent with operation}
  20801. æC 
  20802.  
  20803. æKY mapReadErr
  20804. æFp Errors.p
  20805. æT CONST
  20806. æD mapReadErr = -199; {map inconsistent with operation}
  20807. æC 
  20808.  
  20809. æKY CantDecompress
  20810. æFp Errors.p
  20811. æT CONST
  20812. æD CantDecompress = -186; {resource bent ("the bends") - can't decompress a compressed resource}
  20813. æC 
  20814.  
  20815. æKY badExtResource
  20816. æFp Errors.p
  20817. æT CONST
  20818. æD badExtResource = -185; {extended resource has a bad format.}
  20819. æC 
  20820.  
  20821. æKY evtNotEnb
  20822. æFp Errors.p
  20823. æT CONST
  20824. æD evtNotEnb = 1; {event not enabled at PostEvent}
  20825. æC 
  20826.  
  20827. æKY noMemForPictPlaybackErr
  20828. æFp Errors.p
  20829. æT CONST
  20830. æD noMemForPictPlaybackErr = -145;
  20831. æC 
  20832.  
  20833. æKY rgnTooBigError
  20834. æFp Errors.p
  20835. æT CONST
  20836. æD rgnTooBigError = -147;
  20837. æC 
  20838.  
  20839. æKY pixMapTooDeepErr
  20840. æFp Errors.p
  20841. æT CONST
  20842. æD pixMapTooDeepErr = -148;
  20843. æC 
  20844.  
  20845. æKY nsStackErr
  20846. æFp Errors.p
  20847. æT CONST
  20848. æD nsStackErr = -149;
  20849. æC 
  20850.  
  20851. æKY cMatchErr
  20852. æFp Errors.p
  20853. æT CONST
  20854. æD cMatchErr = -150; {Color2Index failed to find an index}
  20855. æC 
  20856.  
  20857. æKY cTempMemErr
  20858. æFp Errors.p
  20859. æT CONST
  20860. æD cTempMemErr = -151; {failed to allocate memory for temporary structures}
  20861. æC 
  20862.  
  20863. æKY cNoMemErr
  20864. æFp Errors.p
  20865. æT CONST
  20866. æD cNoMemErr = -152; {failed to allocate memory for structure}
  20867. æC 
  20868.  
  20869. æKY cRangeErr
  20870. æFp Errors.p
  20871. æT CONST
  20872. æD cRangeErr = -153; {range error on colorTable request}
  20873. æC 
  20874.  
  20875. æKY cProtectErr
  20876. æFp Errors.p
  20877. æT CONST
  20878. æD cProtectErr = -154; {colorTable entry protection violation}
  20879. æC 
  20880.  
  20881. æKY cDevErr
  20882. æFp Errors.p
  20883. æT CONST
  20884. æD cDevErr = -155; {invalid type of graphics device}
  20885. æC 
  20886.  
  20887. æKY cResErr
  20888. æFp Errors.p
  20889. æT CONST
  20890. æD cResErr = -156; {invalid resolution for MakeITable}
  20891. æC 
  20892.  
  20893. æKY rgnTooBigErr
  20894. æFp Errors.p
  20895. æT CONST
  20896. æD rgnTooBigErr = -500;
  20897. æC 
  20898.  
  20899. æKY updPixMemErr
  20900. æFp Errors.p
  20901. æT CONST
  20902. æD updPixMemErr = -125; {insufficient memory to update a pixmap}
  20903. æC 
  20904.  
  20905. æKY pictInfoVersionErr
  20906. æFp Errors.p
  20907. æT CONST
  20908. æD pictInfoVersionErr = -11000; { wrong version of the PictInfo structure }
  20909. æC 
  20910.  
  20911. æKY pictInfoIDErr
  20912. æFp Errors.p
  20913. æT CONST
  20914. æD pictInfoIDErr = -11001; { the internal consistancy check for the PictInfoID is wrong }
  20915. æC 
  20916.  
  20917. æKY pictInfoVerbErr
  20918. æFp Errors.p
  20919. æT CONST
  20920. æD pictInfoVerbErr = -11002; { the passed verb was invalid }
  20921. æC 
  20922.  
  20923. æKY cantLoadPickMethodErr
  20924. æFp Errors.p
  20925. æT CONST
  20926. æD cantLoadPickMethodErr = -11003; { unable to load the custom pick proc }
  20927. æC 
  20928.  
  20929. æKY colorsRequestedErr
  20930. æFp Errors.p
  20931. æT CONST
  20932. æD colorsRequestedErr = -11004; { the number of colors requested was illegal }
  20933. æC 
  20934.  
  20935. æKY pictureDataErr
  20936. æFp Errors.p
  20937. æT CONST
  20938. æD pictureDataErr = -11005; { the picture data was invalid }
  20939. æC 
  20940.  
  20941. æKY noHardware
  20942. æFp Errors.p
  20943. æT CONST
  20944. æD noHardware = noHardwareErr; {*** obsolete spelling}
  20945. æC 
  20946.  
  20947. æKY notEnoughHardware
  20948. æFp Errors.p
  20949. æT CONST
  20950. æD notEnoughHardware = notEnoughHardwareErr; {*** obsolete spelling}
  20951. æC 
  20952.  
  20953. æKY queueFull
  20954. æFp Errors.p
  20955. æT CONST
  20956. æD queueFull = -203; {Sound Manager Error Returns}
  20957. æC 
  20958.  
  20959. æKY resProblem
  20960. æFp Errors.p
  20961. æT CONST
  20962. æD resProblem = -204; {Sound Manager Error Returns}
  20963. æC 
  20964.  
  20965. æKY badChannel
  20966. æFp Errors.p
  20967. æT CONST
  20968. æD badChannel = -205; {Sound Manager Error Returns}
  20969. æC 
  20970.  
  20971. æKY badFormat
  20972. æFp Errors.p
  20973. æT CONST
  20974. æD badFormat = -206; {Sound Manager Error Returns}
  20975. æC 
  20976.  
  20977. æKY notEnoughBufferSpace
  20978. æFp Errors.p
  20979. æT CONST
  20980. æD notEnoughBufferSpace = -207; { could not allocate enough memory }
  20981. æC 
  20982.  
  20983. æKY badFileFormat
  20984. æFp Errors.p
  20985. æT CONST
  20986. æD badFileFormat = -208; { was not type AIFF or was of bad format,corrupt }
  20987. æC 
  20988.  
  20989. æKY channelBusy
  20990. æFp Errors.p
  20991. æT CONST
  20992. æD channelBusy = -209; { the Channel is being used for a PFD already }
  20993. æC 
  20994.  
  20995. æKY buffersTooSmall
  20996. æFp Errors.p
  20997. æT CONST
  20998. æD buffersTooSmall = -210; { can not operate in the memory allowed }
  20999. æC 
  21000.  
  21001. æKY channelNotBusy
  21002. æFp Errors.p
  21003. æT CONST
  21004. æD channelNotBusy = -211;
  21005. æC 
  21006.  
  21007. æKY noMoreRealTime
  21008. æFp Errors.p
  21009. æT CONST
  21010. æD noMoreRealTime = -212; { not enough CPU cycles left to add another task }
  21011. æC 
  21012.  
  21013. æKY siNoSoundInHardware
  21014. æFp Errors.p
  21015. æT CONST
  21016. æD siNoSoundInHardware = -220; {no Sound Input hardware}
  21017. æC 
  21018.  
  21019. æKY siBadSoundInDevice
  21020. æFp Errors.p
  21021. æT CONST
  21022. æD siBadSoundInDevice = -221; {invalid index passed to SoundInGetIndexedDevice}
  21023. æC 
  21024.  
  21025. æKY siNoBufferSpecified
  21026. æFp Errors.p
  21027. æT CONST
  21028. æD siNoBufferSpecified = -222; {returned by synchronous SPBRecord if nil buffer passed}
  21029. æC 
  21030.  
  21031. æKY siInvalidCompression
  21032. æFp Errors.p
  21033. æT CONST
  21034. æD siInvalidCompression = -223; {invalid compression type}
  21035. æC 
  21036.  
  21037. æKY siHardDriveTooSlow
  21038. æFp Errors.p
  21039. æT CONST
  21040. æD siHardDriveTooSlow = -224; {hard drive too slow to record to disk}
  21041. æC 
  21042.  
  21043. æKY siInvalidSampleRate
  21044. æFp Errors.p
  21045. æT CONST
  21046. æD siInvalidSampleRate = -225; {invalid sample rate}
  21047. æC 
  21048.  
  21049. æKY siInvalidSampleSize
  21050. æFp Errors.p
  21051. æT CONST
  21052. æD siInvalidSampleSize = -226; {invalid sample size}
  21053. æC 
  21054.  
  21055. æKY siDeviceBusyErr
  21056. æFp Errors.p
  21057. æT CONST
  21058. æD siDeviceBusyErr = -227; {input device already in use}
  21059. æC 
  21060.  
  21061. æKY siBadDeviceName
  21062. æFp Errors.p
  21063. æT CONST
  21064. æD siBadDeviceName = -228; {input device could not be opened}
  21065. æC 
  21066.  
  21067. æKY siBadRefNum
  21068. æFp Errors.p
  21069. æT CONST
  21070. æD siBadRefNum = -229; {invalid input device reference number}
  21071. æC 
  21072.  
  21073. æKY siInputDeviceErr
  21074. æFp Errors.p
  21075. æT CONST
  21076. æD siInputDeviceErr = -230; {input device hardware failure}
  21077. æC 
  21078.  
  21079. æKY siUnknownInfoType
  21080. æFp Errors.p
  21081. æT CONST
  21082. æD siUnknownInfoType = -231; {invalid info type selector (returned by driver)}
  21083. æC 
  21084.  
  21085. æKY siUnknownQuality
  21086. æFp Errors.p
  21087. æT CONST
  21088. æD siUnknownQuality = -232; {invalid quality selector (returned by driver)}
  21089. æC 
  21090.  
  21091. æKY nmTypErr
  21092. æFp Errors.p
  21093. æT CONST
  21094. æD nmTypErr = -299; {wrong queue type}
  21095. æC 
  21096.  
  21097. æKY siInitSDTblErr
  21098. æFp Errors.p
  21099. æT CONST
  21100. æD siInitSDTblErr = 1; {slot int dispatch table could not be initialized.}
  21101. æC 
  21102.  
  21103. æKY siInitVBLQsErr
  21104. æFp Errors.p
  21105. æT CONST
  21106. æD siInitVBLQsErr = 2; {VBLqueues for all slots could not be initialized.}
  21107. æC 
  21108.  
  21109. æKY siInitSPTblErr
  21110. æFp Errors.p
  21111. æT CONST
  21112. æD siInitSPTblErr = 3; {slot priority table could not be initialized.}
  21113. æC 
  21114.  
  21115. æKY sdmJTInitErr
  21116. æFp Errors.p
  21117. æT CONST
  21118. æD sdmJTInitErr = 10; {SDM Jump Table could not be initialized.}
  21119. æC 
  21120.  
  21121. æKY sdmInitErr
  21122. æFp Errors.p
  21123. æT CONST
  21124. æD sdmInitErr = 11; {SDM could not be initialized.}
  21125. æC 
  21126.  
  21127. æKY sdmSRTInitErr
  21128. æFp Errors.p
  21129. æT CONST
  21130. æD sdmSRTInitErr = 12; {Slot Resource Table could not be initialized.}
  21131. æC 
  21132.  
  21133. æKY sdmPRAMInitErr
  21134. æFp Errors.p
  21135. æT CONST
  21136. æD sdmPRAMInitErr = 13; {Slot PRAM could not be initialized.}
  21137. æC 
  21138.  
  21139. æKY sdmPriInitErr
  21140. æFp Errors.p
  21141. æT CONST
  21142. æD sdmPriInitErr = 14; {Cards could not be initialized.}
  21143. æC 
  21144.  
  21145. æKY smSDMInitErr
  21146. æFp Errors.p
  21147. æT CONST
  21148. æD smSDMInitErr = -290; {Error; SDM could not be initialized.}
  21149. æC 
  21150.  
  21151. æKY smSRTInitErr
  21152. æFp Errors.p
  21153. æT CONST
  21154. æD smSRTInitErr = -291; {Error; Slot Resource Table could not be initialized.}
  21155. æC 
  21156.  
  21157. æKY smPRAMInitErr
  21158. æFp Errors.p
  21159. æT CONST
  21160. æD smPRAMInitErr = -292; {Error; Slot Resource Table could not be initialized.}
  21161. æC 
  21162.  
  21163. æKY smPriInitErr
  21164. æFp Errors.p
  21165. æT CONST
  21166. æD smPriInitErr = -293; {Error; Cards could not be initialized.}
  21167. æC 
  21168.  
  21169. æKY smEmptySlot
  21170. æFp Errors.p
  21171. æT CONST
  21172. æD smEmptySlot = -300; {No card in slot}
  21173. æC 
  21174.  
  21175. æKY smCRCFail
  21176. æFp Errors.p
  21177. æT CONST
  21178. æD smCRCFail = -301; {CRC check failed for declaration data}
  21179. æC 
  21180.  
  21181. æKY smFormatErr
  21182. æFp Errors.p
  21183. æT CONST
  21184. æD smFormatErr = -302; {FHeader Format is not Apple's}
  21185. æC 
  21186.  
  21187. æKY smRevisionErr
  21188. æFp Errors.p
  21189. æT CONST
  21190. æD smRevisionErr = -303; {Wrong revison level}
  21191. æC 
  21192.  
  21193. æKY smNoDir
  21194. æFp Errors.p
  21195. æT CONST
  21196. æD smNoDir = -304; {Directory offset is Nil }
  21197. æC 
  21198.  
  21199. æKY smDisabledSlot
  21200. æFp Errors.p
  21201. æT CONST
  21202. æD smDisabledSlot = -305; {This slot is disabled (-305 use to be smLWTstBad)}
  21203. æC 
  21204.  
  21205. æKY smNosInfoArray
  21206. æFp Errors.p
  21207. æT CONST
  21208. æD smNosInfoArray = -306; {No sInfoArray. Memory Mgr error.}
  21209. æC 
  21210.  
  21211. æKY smResrvErr
  21212. æFp Errors.p
  21213. æT CONST
  21214. æD smResrvErr = -307; {Fatal reserved error. Resreved field <> 0.}
  21215. æC 
  21216.  
  21217. æKY smUnExBusErr
  21218. æFp Errors.p
  21219. æT CONST
  21220. æD smUnExBusErr = -308; {Unexpected BusError}
  21221. æC 
  21222.  
  21223. æKY smBLFieldBad
  21224. æFp Errors.p
  21225. æT CONST
  21226. æD smBLFieldBad = -309; {ByteLanes field was bad.}
  21227. æC 
  21228.  
  21229. æKY smFHBlockRdErr
  21230. æFp Errors.p
  21231. æT CONST
  21232. æD smFHBlockRdErr = -310; {Error occured during _sGetFHeader.}
  21233. æC 
  21234.  
  21235. æKY smFHBlkDispErr
  21236. æFp Errors.p
  21237. æT CONST
  21238. æD smFHBlkDispErr = -311; {Error occured during _sDisposePtr (Dispose of FHeader block).}
  21239. æC 
  21240.  
  21241. æKY smDisposePErr
  21242. æFp Errors.p
  21243. æT CONST
  21244. æD smDisposePErr = -312; {_DisposePointer error}
  21245. æC 
  21246.  
  21247. æKY smNoBoardSRsrc
  21248. æFp Errors.p
  21249. æT CONST
  21250. æD smNoBoardSRsrc = -313; {No Board sResource.}
  21251. æC 
  21252.  
  21253. æKY smGetPRErr
  21254. æFp Errors.p
  21255. æT CONST
  21256. æD smGetPRErr = -314; {Error occured during _sGetPRAMRec (See SIMStatus).}
  21257. æC 
  21258.  
  21259. æKY smNoBoardId
  21260. æFp Errors.p
  21261. æT CONST
  21262. æD smNoBoardId = -315; {No Board Id.}
  21263. æC 
  21264.  
  21265. æKY smInitStatVErr
  21266. æFp Errors.p
  21267. æT CONST
  21268. æD smInitStatVErr = -316; {The InitStatusV field was negative after primary or secondary init.}
  21269. æC 
  21270.  
  21271. æKY smInitTblVErr
  21272. æFp Errors.p
  21273. æT CONST
  21274. æD smInitTblVErr = -317; {An error occured while trying to initialize the Slot Resource Table.}
  21275. æC 
  21276.  
  21277. æKY smNoJmpTbl
  21278. æFp Errors.p
  21279. æT CONST
  21280. æD smNoJmpTbl = -318; {SDM jump table could not be created.}
  21281. æC 
  21282.  
  21283. æKY smBadBoardId
  21284. æFp Errors.p
  21285. æT CONST
  21286. æD smBadBoardId = -319; {BoardId was wrong; re-init the PRAM record.}
  21287. æC 
  21288.  
  21289. æKY smBusErrTO
  21290. æFp Errors.p
  21291. æT CONST
  21292. æD smBusErrTO = -320; {BusError time out.}
  21293. æC 
  21294.  
  21295. æKY svTempDisable
  21296. æFp Errors.p
  21297. æT CONST
  21298. æD svTempDisable = -32768; {Temporarily disable card but run primary init.}
  21299. æC 
  21300.  
  21301. æKY svDisabled
  21302. æFp Errors.p
  21303. æT CONST
  21304. æD svDisabled = -32640; {Reserve range -32640 to -32768 for Apple temp disables.}
  21305. æC 
  21306.  
  21307. æKY smBadRefId
  21308. æFp Errors.p
  21309. æT CONST
  21310. æD smBadRefId = -330; {Reference Id not found in List}
  21311. æC 
  21312.  
  21313. æKY smBadsList
  21314. æFp Errors.p
  21315. æT CONST
  21316. æD smBadsList = -331; {Bad sList: Id1 < Id2 < Id3 ...format is not followed.}
  21317. æC 
  21318.  
  21319. æKY smReservedErr
  21320. æFp Errors.p
  21321. æT CONST
  21322. æD smReservedErr = -332; {Reserved field not zero}
  21323. æC 
  21324.  
  21325. æKY smCodeRevErr
  21326. æFp Errors.p
  21327. æT CONST
  21328. æD smCodeRevErr = -333; {Code revision is wrong}
  21329. æC 
  21330.  
  21331. æKY smCPUErr
  21332. æFp Errors.p
  21333. æT CONST
  21334. æD smCPUErr = -334; {Code revision is wrong}
  21335. æC 
  21336.  
  21337. æKY smsPointerNil
  21338. æFp Errors.p
  21339. æT CONST
  21340. æD smsPointerNil = -335; {LPointer is nil From sOffsetData. If this error occurs; check sInfo rec for more information.}
  21341. æC 
  21342.  
  21343. æKY smNilsBlockErr
  21344. æFp Errors.p
  21345. æT CONST
  21346. æD smNilsBlockErr = -336; {Nil sBlock error (Dont allocate and try to use a nil sBlock)}
  21347. æC 
  21348.  
  21349. æKY smSlotOOBErr
  21350. æFp Errors.p
  21351. æT CONST
  21352. æD smSlotOOBErr = -337; {Slot out of bounds error}
  21353. æC 
  21354.  
  21355. æKY smSelOOBErr
  21356. æFp Errors.p
  21357. æT CONST
  21358. æD smSelOOBErr = -338; {Selector out of bounds error}
  21359. æC 
  21360.  
  21361. æKY smNewPErr
  21362. æFp Errors.p
  21363. æT CONST
  21364. æD smNewPErr = -339; {_NewPtr error}
  21365. æC 
  21366.  
  21367. æKY smBlkMoveErr
  21368. æFp Errors.p
  21369. æT CONST
  21370. æD smBlkMoveErr = -340; {_BlockMove error}
  21371. æC 
  21372.  
  21373. æKY smCkStatusErr
  21374. æFp Errors.p
  21375. æT CONST
  21376. æD smCkStatusErr = -341; {Status of slot = fail.}
  21377. æC 
  21378.  
  21379. æKY smGetDrvrNamErr
  21380. æFp Errors.p
  21381. æT CONST
  21382. æD smGetDrvrNamErr = -342; {Error occured during _sGetDrvrName.}
  21383. æC 
  21384.  
  21385. æKY smDisDrvrNamErr
  21386. æFp Errors.p
  21387. æT CONST
  21388. æD smDisDrvrNamErr = -343; {Error occured during _sDisDrvrName.}
  21389. æC 
  21390.  
  21391. æKY smNoMoresRsrcs
  21392. æFp Errors.p
  21393. æT CONST
  21394. æD smNoMoresRsrcs = -344; {No more sResources}
  21395. æC 
  21396.  
  21397. æKY smsGetDrvrErr
  21398. æFp Errors.p
  21399. æT CONST
  21400. æD smsGetDrvrErr = -345; {Error occurred during _sGetDriver.}
  21401. æC 
  21402.  
  21403. æKY smBadsPtrErr
  21404. æFp Errors.p
  21405. æT CONST
  21406. æD smBadsPtrErr = -346; {Bad pointer was passed to sCalcsPointer}
  21407. æC 
  21408.  
  21409. æKY smByteLanesErr
  21410. æFp Errors.p
  21411. æT CONST
  21412. æD smByteLanesErr = -347; {NumByteLanes was determined to be zero.}
  21413. æC 
  21414.  
  21415. æKY smOffsetErr
  21416. æFp Errors.p
  21417. æT CONST
  21418. æD smOffsetErr = -348; {Offset was too big (temporary error}
  21419. æC 
  21420.  
  21421. æKY smNoGoodOpens
  21422. æFp Errors.p
  21423. æT CONST
  21424. æD smNoGoodOpens = -349; {No opens were successfull in the loop.}
  21425. æC 
  21426.  
  21427. æKY smSRTOvrFlErr
  21428. æFp Errors.p
  21429. æT CONST
  21430. æD smSRTOvrFlErr = -350; {SRT over flow.}
  21431. æC 
  21432.  
  21433. æKY smRecNotFnd
  21434. æFp Errors.p
  21435. æT CONST
  21436. æD smRecNotFnd = -351; {Record not found in the SRT.}
  21437. æC 
  21438.  
  21439. æKY editionMgrInitErr
  21440. æFp Errors.p
  21441. æT CONST
  21442. æD editionMgrInitErr = -450; {edition manager not inited by this app}
  21443. æC 
  21444.  
  21445. æKY badSectionErr
  21446. æFp Errors.p
  21447. æT CONST
  21448. æD badSectionErr = -451; {not a valid SectionRecord}
  21449. æC 
  21450.  
  21451. æKY notRegisteredSectionErr
  21452. æFp Errors.p
  21453. æT CONST
  21454. æD notRegisteredSectionErr = -452; {not a registered SectionRecord}
  21455. æC 
  21456.  
  21457. æKY badEditionFileErr
  21458. æFp Errors.p
  21459. æT CONST
  21460. æD badEditionFileErr = -453; {edition file is corrupt}
  21461. æC 
  21462.  
  21463. æKY badSubPartErr
  21464. æFp Errors.p
  21465. æT CONST
  21466. æD badSubPartErr = -454; {can not use sub parts in this release}
  21467. æC 
  21468.  
  21469. æKY multiplePublisherWrn
  21470. æFp Errors.p
  21471. æT CONST
  21472. æD multiplePublisherWrn = -460; {A Publisher is already registered for that container}
  21473. æC 
  21474.  
  21475. æKY containerNotFoundWrn
  21476. æFp Errors.p
  21477. æT CONST
  21478. æD containerNotFoundWrn = -461; {could not find editionContainer at this time}
  21479. æC 
  21480.  
  21481. æKY containerAlreadyOpenWrn
  21482. æFp Errors.p
  21483. æT CONST
  21484. æD containerAlreadyOpenWrn = -462; {container already opened by this section}
  21485. æC 
  21486.  
  21487. æKY notThePublisherWrn
  21488. æFp Errors.p
  21489. æT CONST
  21490. æD notThePublisherWrn = -463; {not the first registered publisher for that container}
  21491. æC 
  21492.  
  21493. æKY teScrapSizeErr
  21494. æFp Errors.p
  21495. æT CONST
  21496. æD teScrapSizeErr = -501; {scrap item too big for text edit record}
  21497. æC 
  21498.  
  21499. æKY hwParamErr
  21500. æFp Errors.p
  21501. æT CONST
  21502. æD hwParamErr = -502; {bad selector for _HWPriv}
  21503. æC 
  21504.  
  21505. æKY procNotFound
  21506. æFp Errors.p
  21507. æT CONST
  21508. æD procNotFound = -600; { no eligible process with specified descriptor }
  21509. æC 
  21510.  
  21511. æKY memFragErr
  21512. æFp Errors.p
  21513. æT CONST
  21514. æD memFragErr = -601; { not enough room to launch app w/special requirements }
  21515. æC 
  21516.  
  21517. æKY appModeErr
  21518. æFp Errors.p
  21519. æT CONST
  21520. æD appModeErr = -602; { memory mode is 32-bit, but app not 32-bit clean }
  21521. æC 
  21522.  
  21523. æKY protocolErr
  21524. æFp Errors.p
  21525. æT CONST
  21526. æD protocolErr = -603; { app made module calls in improper order }
  21527. æC 
  21528.  
  21529. æKY hardwareConfigErr
  21530. æFp Errors.p
  21531. æT CONST
  21532. æD hardwareConfigErr = -604; { hardware configuration not correct for call }
  21533. æC 
  21534.  
  21535. æKY appMemFullErr
  21536. æFp Errors.p
  21537. æT CONST
  21538. æD appMemFullErr = -605; { application SIZE not big enough for launch }
  21539. æC 
  21540.  
  21541. æKY appIsDaemon
  21542. æFp Errors.p
  21543. æT CONST
  21544. æD appIsDaemon = -606; { app is BG-only, and launch flags disallow this }
  21545. æC 
  21546.  
  21547. æKY notEnoughMemoryErr
  21548. æFp Errors.p
  21549. æT CONST
  21550. æD notEnoughMemoryErr = -620; {insufficient physical memory}
  21551. æC 
  21552.  
  21553. æKY notHeldErr
  21554. æFp Errors.p
  21555. æT CONST
  21556. æD notHeldErr = -621; {specified range of memory is not held}
  21557. æC 
  21558.  
  21559. æKY cannotMakeContiguousErr
  21560. æFp Errors.p
  21561. æT CONST
  21562. æD cannotMakeContiguousErr = -622; {cannot make specified range contiguous}
  21563. æC 
  21564.  
  21565. æKY notLockedErr
  21566. æFp Errors.p
  21567. æT CONST
  21568. æD notLockedErr = -623; {specified range of memory is not locked}
  21569. æC 
  21570.  
  21571. æKY interruptsMaskedErr
  21572. æFp Errors.p
  21573. æT CONST
  21574. æD interruptsMaskedErr = -624; {don’t call with interrupts masked}
  21575. æC 
  21576.  
  21577. æKY cannotDeferErr
  21578. æFp Errors.p
  21579. æT CONST
  21580. æD cannotDeferErr = -625; {unable to defer additional functions}
  21581. æC 
  21582.  
  21583. æKY ddpSktErr
  21584. æFp Errors.p
  21585. æT CONST
  21586. æD ddpSktErr = -91; {error in soket number}
  21587. æC 
  21588.  
  21589. æKY ddpLenErr
  21590. æFp Errors.p
  21591. æT CONST
  21592. æD ddpLenErr = -92; {data length too big}
  21593. æC 
  21594.  
  21595. æKY noBridgeErr
  21596. æFp Errors.p
  21597. æT CONST
  21598. æD noBridgeErr = -93; {no network bridge for non-local send}
  21599. æC 
  21600.  
  21601. æKY lapProtErr
  21602. æFp Errors.p
  21603. æT CONST
  21604. æD lapProtErr = -94; {error in attaching/detaching protocol}
  21605. æC 
  21606.  
  21607. æKY excessCollsns
  21608. æFp Errors.p
  21609. æT CONST
  21610. æD excessCollsns = -95; {excessive collisions on write}
  21611. æC 
  21612.  
  21613. æKY portInUse
  21614. æFp Errors.p
  21615. æT CONST
  21616. æD portInUse = -97; {driver Open error code (port is in use)}
  21617. æC 
  21618.  
  21619. æKY portNotCf
  21620. æFp Errors.p
  21621. æT CONST
  21622. æD portNotCf = -98; {driver Open error code (parameter RAM not configured for this connection)}
  21623. æC 
  21624.  
  21625. æKY nbpBuffOvr
  21626. æFp Errors.p
  21627. æT CONST
  21628. æD nbpBuffOvr = -1024; {Buffer overflow in LookupName}
  21629. æC 
  21630.  
  21631. æKY nbpNoConfirm
  21632. æFp Errors.p
  21633. æT CONST
  21634. æD nbpNoConfirm = -1025;
  21635. æC 
  21636.  
  21637. æKY nbpConfDiff
  21638. æFp Errors.p
  21639. æT CONST
  21640. æD nbpConfDiff = -1026; {Name confirmed at different socket}
  21641. æC 
  21642.  
  21643. æKY nbpDuplicate
  21644. æFp Errors.p
  21645. æT CONST
  21646. æD nbpDuplicate = -1027; {Duplicate name exists already}
  21647. æC 
  21648.  
  21649. æKY nbpNotFound
  21650. æFp Errors.p
  21651. æT CONST
  21652. æD nbpNotFound = -1028; {Name not found on remove}
  21653. æC 
  21654.  
  21655. æKY nbpNISErr
  21656. æFp Errors.p
  21657. æT CONST
  21658. æD nbpNISErr = -1029; {Error trying to open the NIS}
  21659. æC 
  21660.  
  21661. æKY aspBadVersNum
  21662. æFp Errors.p
  21663. æT CONST
  21664. æD aspBadVersNum = -1066; {Server cannot support this ASP version}
  21665. æC 
  21666.  
  21667. æKY aspBufTooSmall
  21668. æFp Errors.p
  21669. æT CONST
  21670. æD aspBufTooSmall = -1067; {Buffer too small}
  21671. æC 
  21672.  
  21673. æKY aspNoMoreSess
  21674. æFp Errors.p
  21675. æT CONST
  21676. æD aspNoMoreSess = -1068; {No more sessions on server}
  21677. æC 
  21678.  
  21679. æKY aspNoServers
  21680. æFp Errors.p
  21681. æT CONST
  21682. æD aspNoServers = -1069; {No servers at that address}
  21683. æC 
  21684.  
  21685. æKY aspParamErr
  21686. æFp Errors.p
  21687. æT CONST
  21688. æD aspParamErr = -1070; {Parameter error}
  21689. æC 
  21690.  
  21691. æKY aspServerBusy
  21692. æFp Errors.p
  21693. æT CONST
  21694. æD aspServerBusy = -1071; {Server cannot open another session}
  21695. æC 
  21696.  
  21697. æKY aspSessClosed
  21698. æFp Errors.p
  21699. æT CONST
  21700. æD aspSessClosed = -1072; {Session closed}
  21701. æC 
  21702.  
  21703. æKY aspSizeErr
  21704. æFp Errors.p
  21705. æT CONST
  21706. æD aspSizeErr = -1073; {Command block too big}
  21707. æC 
  21708.  
  21709. æKY aspTooMany
  21710. æFp Errors.p
  21711. æT CONST
  21712. æD aspTooMany = -1074; {Too many clients (server error)}
  21713. æC 
  21714.  
  21715. æKY aspNoAck
  21716. æFp Errors.p
  21717. æT CONST
  21718. æD aspNoAck = -1075; {No ack on attention request (server err)}
  21719. æC 
  21720.  
  21721. æKY reqFailed
  21722. æFp Errors.p
  21723. æT CONST
  21724. æD reqFailed = -1096;
  21725. æC 
  21726.  
  21727. æKY tooManyReqs
  21728. æFp Errors.p
  21729. æT CONST
  21730. æD tooManyReqs = -1097;
  21731. æC 
  21732.  
  21733. æKY tooManySkts
  21734. æFp Errors.p
  21735. æT CONST
  21736. æD tooManySkts = -1098;
  21737. æC 
  21738.  
  21739. æKY badATPSkt
  21740. æFp Errors.p
  21741. æT CONST
  21742. æD badATPSkt = -1099;
  21743. æC 
  21744.  
  21745. æKY badBuffNum
  21746. æFp Errors.p
  21747. æT CONST
  21748. æD badBuffNum = -1100;
  21749. æC 
  21750.  
  21751. æKY noRelErr
  21752. æFp Errors.p
  21753. æT CONST
  21754. æD noRelErr = -1101;
  21755. æC 
  21756.  
  21757. æKY cbNotFound
  21758. æFp Errors.p
  21759. æT CONST
  21760. æD cbNotFound = -1102;
  21761. æC 
  21762.  
  21763. æKY noSendResp
  21764. æFp Errors.p
  21765. æT CONST
  21766. æD noSendResp = -1103;
  21767. æC 
  21768.  
  21769. æKY noDataArea
  21770. æFp Errors.p
  21771. æT CONST
  21772. æD noDataArea = -1104;
  21773. æC 
  21774.  
  21775. æKY reqAborted
  21776. æFp Errors.p
  21777. æT CONST
  21778. æD reqAborted = -1105;
  21779. æC 
  21780.  
  21781. æKY buf2SmallErr
  21782. æFp Errors.p
  21783. æT CONST
  21784. æD buf2SmallErr = -3101;
  21785. æC 
  21786.  
  21787. æKY noMPPErr
  21788. æFp Errors.p
  21789. æT CONST
  21790. æD noMPPErr = -3102;
  21791. æC 
  21792.  
  21793. æKY ckSumErr
  21794. æFp Errors.p
  21795. æT CONST
  21796. æD ckSumErr = -3103;
  21797. æC 
  21798.  
  21799. æKY extractErr
  21800. æFp Errors.p
  21801. æT CONST
  21802. æD extractErr = -3104;
  21803. æC 
  21804.  
  21805. æKY readQErr
  21806. æFp Errors.p
  21807. æT CONST
  21808. æD readQErr = -3105;
  21809. æC 
  21810.  
  21811. æKY atpLenErr
  21812. æFp Errors.p
  21813. æT CONST
  21814. æD atpLenErr = -3106;
  21815. æC 
  21816.  
  21817. æKY atpBadRsp
  21818. æFp Errors.p
  21819. æT CONST
  21820. æD atpBadRsp = -3107;
  21821. æC 
  21822.  
  21823. æKY recNotFnd
  21824. æFp Errors.p
  21825. æT CONST
  21826. æD recNotFnd = -3108;
  21827. æC 
  21828.  
  21829. æKY sktClosedErr
  21830. æFp Errors.p
  21831. æT CONST
  21832. æD sktClosedErr = -3109;
  21833. æC 
  21834.  
  21835. æKY afpAccessDenied
  21836. æFp Errors.p
  21837. æT CONST
  21838. æD afpAccessDenied = -5000;
  21839. æC 
  21840.  
  21841. æKY afpAuthContinue
  21842. æFp Errors.p
  21843. æT CONST
  21844. æD afpAuthContinue = -5001;
  21845. æC 
  21846.  
  21847. æKY afpBadUAM
  21848. æFp Errors.p
  21849. æT CONST
  21850. æD afpBadUAM = -5002;
  21851. æC 
  21852.  
  21853. æKY afpBadVersNum
  21854. æFp Errors.p
  21855. æT CONST
  21856. æD afpBadVersNum = -5003;
  21857. æC 
  21858.  
  21859. æKY afpBitmapErr
  21860. æFp Errors.p
  21861. æT CONST
  21862. æD afpBitmapErr = -5004;
  21863. æC 
  21864.  
  21865. æKY afpCantMove
  21866. æFp Errors.p
  21867. æT CONST
  21868. æD afpCantMove = -5005;
  21869. æC 
  21870.  
  21871. æKY afpDenyConflict
  21872. æFp Errors.p
  21873. æT CONST
  21874. æD afpDenyConflict = -5006;
  21875. æC 
  21876.  
  21877. æKY afpDirNotEmpty
  21878. æFp Errors.p
  21879. æT CONST
  21880. æD afpDirNotEmpty = -5007;
  21881. æC 
  21882.  
  21883. æKY afpDiskFull
  21884. æFp Errors.p
  21885. æT CONST
  21886. æD afpDiskFull = -5008;
  21887. æC 
  21888.  
  21889. æKY afpEofError
  21890. æFp Errors.p
  21891. æT CONST
  21892. æD afpEofError = -5009;
  21893. æC 
  21894.  
  21895. æKY afpFileBusy
  21896. æFp Errors.p
  21897. æT CONST
  21898. æD afpFileBusy = -5010;
  21899. æC 
  21900.  
  21901. æKY afpFlatVol
  21902. æFp Errors.p
  21903. æT CONST
  21904. æD afpFlatVol = -5011;
  21905. æC 
  21906.  
  21907. æKY afpItemNotFound
  21908. æFp Errors.p
  21909. æT CONST
  21910. æD afpItemNotFound = -5012;
  21911. æC 
  21912.  
  21913. æKY afpLockErr
  21914. æFp Errors.p
  21915. æT CONST
  21916. æD afpLockErr = -5013;
  21917. æC 
  21918.  
  21919. æKY afpMiscErr
  21920. æFp Errors.p
  21921. æT CONST
  21922. æD afpMiscErr = -5014;
  21923. æC 
  21924.  
  21925. æKY afpNoMoreLocks
  21926. æFp Errors.p
  21927. æT CONST
  21928. æD afpNoMoreLocks = -5015;
  21929. æC 
  21930.  
  21931. æKY afpNoServer
  21932. æFp Errors.p
  21933. æT CONST
  21934. æD afpNoServer = -5016;
  21935. æC 
  21936.  
  21937. æKY afpObjectExists
  21938. æFp Errors.p
  21939. æT CONST
  21940. æD afpObjectExists = -5017;
  21941. æC 
  21942.  
  21943. æKY afpObjectNotFound
  21944. æFp Errors.p
  21945. æT CONST
  21946. æD afpObjectNotFound = -5018;
  21947. æC 
  21948.  
  21949. æKY afpParmErr
  21950. æFp Errors.p
  21951. æT CONST
  21952. æD afpParmErr = -5019;
  21953. æC 
  21954.  
  21955. æKY afpRangeNotLocked
  21956. æFp Errors.p
  21957. æT CONST
  21958. æD afpRangeNotLocked = -5020;
  21959. æC 
  21960.  
  21961. æKY afpRangeOverlap
  21962. æFp Errors.p
  21963. æT CONST
  21964. æD afpRangeOverlap = -5021;
  21965. æC 
  21966.  
  21967. æKY afpSessClosed
  21968. æFp Errors.p
  21969. æT CONST
  21970. æD afpSessClosed = -5022;
  21971. æC 
  21972.  
  21973. æKY afpUserNotAuth
  21974. æFp Errors.p
  21975. æT CONST
  21976. æD afpUserNotAuth = -5023;
  21977. æC 
  21978.  
  21979. æKY afpCallNotSupported
  21980. æFp Errors.p
  21981. æT CONST
  21982. æD afpCallNotSupported = -5024;
  21983. æC 
  21984.  
  21985. æKY afpObjectTypeErr
  21986. æFp Errors.p
  21987. æT CONST
  21988. æD afpObjectTypeErr = -5025;
  21989. æC 
  21990.  
  21991. æKY afpTooManyFilesOpen
  21992. æFp Errors.p
  21993. æT CONST
  21994. æD afpTooManyFilesOpen = -5026;
  21995. æC 
  21996.  
  21997. æKY afpServerGoingDown
  21998. æFp Errors.p
  21999. æT CONST
  22000. æD afpServerGoingDown = -5027;
  22001. æC 
  22002.  
  22003. æKY afpCantRename
  22004. æFp Errors.p
  22005. æT CONST
  22006. æD afpCantRename = -5028;
  22007. æC 
  22008.  
  22009. æKY afpDirNotFound
  22010. æFp Errors.p
  22011. æT CONST
  22012. æD afpDirNotFound = -5029;
  22013. æC 
  22014.  
  22015. æKY afpIconTypeError
  22016. æFp Errors.p
  22017. æT CONST
  22018. æD afpIconTypeError = -5030;
  22019. æC 
  22020.  
  22021. æKY afpVolLocked
  22022. æFp Errors.p
  22023. æT CONST
  22024. æD afpVolLocked = -5031; {Volume is Read-Only}
  22025. æC 
  22026.  
  22027. æKY afpObjectLocked
  22028. æFp Errors.p
  22029. æT CONST
  22030. æD afpObjectLocked = -5032; {Object is M/R/D/W inhibited}
  22031. æC 
  22032.  
  22033. æKY afpContainsSharedErr
  22034. æFp Errors.p
  22035. æT CONST
  22036. æD afpContainsSharedErr = -5033; {$FFFFEC57   the folder being shared contains a shared folder }
  22037. æC 
  22038.  
  22039. æKY afpIDNotFound
  22040. æFp Errors.p
  22041. æT CONST
  22042. æD afpIDNotFound = -5034; {$FFFFEC56}
  22043. æC 
  22044.  
  22045. æKY afpIDExists
  22046. æFp Errors.p
  22047. æT CONST
  22048. æD afpIDExists = -5035; {$FFFFEC55}
  22049. æC 
  22050.  
  22051. æKY afpDiffVolErr
  22052. æFp Errors.p
  22053. æT CONST
  22054. æD afpDiffVolErr = -5036; {$FFFFEC54}
  22055. æC 
  22056.  
  22057. æKY afpCatalogChanged
  22058. æFp Errors.p
  22059. æT CONST
  22060. æD afpCatalogChanged = -5037; {$FFFFEC53}
  22061. æC 
  22062.  
  22063. æKY afpSameObjectErr
  22064. æFp Errors.p
  22065. æT CONST
  22066. æD afpSameObjectErr = -5038; {$FFFFEC52}
  22067. æC 
  22068.  
  22069. æKY afpBadIDErr
  22070. æFp Errors.p
  22071. æT CONST
  22072. æD afpBadIDErr = -5039; {$FFFFEC51}
  22073. æC 
  22074.  
  22075. æKY afpPwdSameErr
  22076. æFp Errors.p
  22077. æT CONST
  22078. æD afpPwdSameErr = -5040; {$FFFFEC50  someone tried to change their password to the same password on a mantadory password change }
  22079. æC 
  22080.  
  22081. æKY afpPwdTooShortErr
  22082. æFp Errors.p
  22083. æT CONST
  22084. æD afpPwdTooShortErr = -5041; {$FFFFEC4F  the password being set is too short: there is a minimum length that must be met or exceeded }
  22085. æC 
  22086.  
  22087. æKY afpPwdExpiredErr
  22088. æFp Errors.p
  22089. æT CONST
  22090. æD afpPwdExpiredErr = -5042; {$FFFFEC4E  the password being used is too old: this requires the user to change the password before log-in can continue }
  22091. æC 
  22092.  
  22093. æKY afpInsideSharedErr
  22094. æFp Errors.p
  22095. æT CONST
  22096. æD afpInsideSharedErr = -5043; {$FFFFEC4D  the folder being shared is inside a shared folder OR the folder contains a shared folder and is being moved into a shared folder OR the folder contains a shared folder and is being moved into the descendent of a shared folder. }
  22097. æC 
  22098.  
  22099. æKY afpInsideTrashErr
  22100. æFp Errors.p
  22101. æT CONST
  22102. æD afpInsideTrashErr = -5044; {$FFFFEC4C  the folder being shared is inside the trash folder OR the shared folder is being moved into the trash folder OR the folder is being moved to the trash and it contains a shared folder }
  22103. æC 
  22104.  
  22105. æKY notInitErr
  22106. æFp Errors.p
  22107. æT CONST
  22108. æD notInitErr = -900; { PPCToolBox not initialized }
  22109. æC 
  22110.  
  22111. æKY nameTypeErr
  22112. æFp Errors.p
  22113. æT CONST
  22114. æD nameTypeErr = -902; { Invalid or inappropriate locationKindSelector in locationName }
  22115. æC 
  22116.  
  22117. æKY noPortErr
  22118. æFp Errors.p
  22119. æT CONST
  22120. æD noPortErr = -903; { Unable to open port or bad portRefNum }
  22121. æC 
  22122.  
  22123. æKY noGlobalsErr
  22124. æFp Errors.p
  22125. æT CONST
  22126. æD noGlobalsErr = -904; { The system is hosed, better re-boot }
  22127. æC 
  22128.  
  22129. æKY localOnlyErr
  22130. æFp Errors.p
  22131. æT CONST
  22132. æD localOnlyErr = -905; { Network activity is currently disabled }
  22133. æC 
  22134.  
  22135. æKY destPortErr
  22136. æFp Errors.p
  22137. æT CONST
  22138. æD destPortErr = -906; { Port does not exist at destination }
  22139. æC 
  22140.  
  22141. æKY sessTableErr
  22142. æFp Errors.p
  22143. æT CONST
  22144. æD sessTableErr = -907; { Out of session tables, try again later }
  22145. æC 
  22146.  
  22147. æKY noSessionErr
  22148. æFp Errors.p
  22149. æT CONST
  22150. æD noSessionErr = -908; { Invalid session reference number }
  22151. æC 
  22152.  
  22153. æKY badReqErr
  22154. æFp Errors.p
  22155. æT CONST
  22156. æD badReqErr = -909; { bad parameter or invalid state for operation }
  22157. æC 
  22158.  
  22159. æKY portNameExistsErr
  22160. æFp Errors.p
  22161. æT CONST
  22162. æD portNameExistsErr = -910; { port is already open (perhaps in another app) }
  22163. æC 
  22164.  
  22165. æKY noUserNameErr
  22166. æFp Errors.p
  22167. æT CONST
  22168. æD noUserNameErr = -911; { user name unknown on destination machine }
  22169. æC 
  22170.  
  22171. æKY userRejectErr
  22172. æFp Errors.p
  22173. æT CONST
  22174. æD userRejectErr = -912; { Destination rejected the session request }
  22175. æC 
  22176.  
  22177. æKY noMachineNameErr
  22178. æFp Errors.p
  22179. æT CONST
  22180. æD noMachineNameErr = -913; { user hasn't named his Macintosh in the Network Setup Control Panel }
  22181. æC 
  22182.  
  22183. æKY noToolboxNameErr
  22184. æFp Errors.p
  22185. æT CONST
  22186. æD noToolboxNameErr = -914; { A system resource is missing, not too likely }
  22187. æC 
  22188.  
  22189. æKY noResponseErr
  22190. æFp Errors.p
  22191. æT CONST
  22192. æD noResponseErr = -915; { unable to contact destination }
  22193. æC 
  22194.  
  22195. æKY portClosedErr
  22196. æFp Errors.p
  22197. æT CONST
  22198. æD portClosedErr = -916; { port was closed }
  22199. æC 
  22200.  
  22201. æKY sessClosedErr
  22202. æFp Errors.p
  22203. æT CONST
  22204. æD sessClosedErr = -917; { session was closed }
  22205. æC 
  22206.  
  22207. æKY badPortNameErr
  22208. æFp Errors.p
  22209. æT CONST
  22210. æD badPortNameErr = -919; { PPCPortRec malformed }
  22211. æC 
  22212.  
  22213. æKY noDefaultUserErr
  22214. æFp Errors.p
  22215. æT CONST
  22216. æD noDefaultUserErr = -922; { user hasn't typed in owners name in Network Setup Control Pannel }
  22217. æC 
  22218.  
  22219. æKY notLoggedInErr
  22220. æFp Errors.p
  22221. æT CONST
  22222. æD notLoggedInErr = -923; { The default userRefNum does not yet exist }
  22223. æC 
  22224.  
  22225. æKY noUserRefErr
  22226. æFp Errors.p
  22227. æT CONST
  22228. æD noUserRefErr = -924; { unable to create a new userRefNum }
  22229. æC 
  22230.  
  22231. æKY networkErr
  22232. æFp Errors.p
  22233. æT CONST
  22234. æD networkErr = -925; { An error has occured in the network, not too likely }
  22235. æC 
  22236.  
  22237. æKY noInformErr
  22238. æFp Errors.p
  22239. æT CONST
  22240. æD noInformErr = -926; { PPCStart failed because destination did not have inform pending }
  22241. æC 
  22242.  
  22243. æKY authFailErr
  22244. æFp Errors.p
  22245. æT CONST
  22246. æD authFailErr = -927; { unable to authenticate user at destination }
  22247. æC 
  22248.  
  22249. æKY noUserRecErr
  22250. æFp Errors.p
  22251. æT CONST
  22252. æD noUserRecErr = -928; { Invalid user reference number }
  22253. æC 
  22254.  
  22255. æKY badServiceMethodErr
  22256. æFp Errors.p
  22257. æT CONST
  22258. æD badServiceMethodErr = -930; { illegal service type, or not supported }
  22259. æC 
  22260.  
  22261. æKY badLocNameErr
  22262. æFp Errors.p
  22263. æT CONST
  22264. æD badLocNameErr = -931; { location name malformed }
  22265. æC 
  22266.  
  22267. æKY guestNotAllowedErr
  22268. æFp Errors.p
  22269. æT CONST
  22270. æD guestNotAllowedErr = -932; { destination port requires authentication }
  22271. æC 
  22272.  
  22273. æKY swOverrunErr
  22274. æFp Errors.p
  22275. æT CONST
  22276. æD swOverrunErr = 1; {serial driver error masks}
  22277. æC 
  22278.  
  22279. æKY parityErr
  22280. æFp Errors.p
  22281. æT CONST
  22282. æD parityErr = 16; {serial driver error masks}
  22283. æC 
  22284.  
  22285. æKY hwOverrunErr
  22286. æFp Errors.p
  22287. æT CONST
  22288. æD hwOverrunErr = 32; {serial driver error masks}
  22289. æC 
  22290.  
  22291. æKY framingErr
  22292. æFp Errors.p
  22293. æT CONST
  22294. æD framingErr = 64; {serial driver error masks}
  22295. æC 
  22296.  
  22297. æKY dsBusError
  22298. æFp Errors.p
  22299. æT CONST
  22300. æD dsBusError = 1; {bus error }
  22301. æC 
  22302.  
  22303. æKY dsAddressErr
  22304. æFp Errors.p
  22305. æT CONST
  22306. æD dsAddressErr = 2; {address error}
  22307. æC 
  22308.  
  22309. æKY dsIllInstErr
  22310. æFp Errors.p
  22311. æT CONST
  22312. æD dsIllInstErr = 3; {illegal instruction error}
  22313. æC 
  22314.  
  22315. æKY dsZeroDivErr
  22316. æFp Errors.p
  22317. æT CONST
  22318. æD dsZeroDivErr = 4; {zero divide error}
  22319. æC 
  22320.  
  22321. æKY dsChkErr
  22322. æFp Errors.p
  22323. æT CONST
  22324. æD dsChkErr = 5; {check trap error}
  22325. æC 
  22326.  
  22327. æKY dsOvflowErr
  22328. æFp Errors.p
  22329. æT CONST
  22330. æD dsOvflowErr = 6; {overflow trap error}
  22331. æC 
  22332.  
  22333. æKY dsPrivErr
  22334. æFp Errors.p
  22335. æT CONST
  22336. æD dsPrivErr = 7; {privilege violation error}
  22337. æC 
  22338.  
  22339. æKY dsTraceErr
  22340. æFp Errors.p
  22341. æT CONST
  22342. æD dsTraceErr = 8; {trace mode error}
  22343. æC 
  22344.  
  22345. æKY dsLineAErr
  22346. æFp Errors.p
  22347. æT CONST
  22348. æD dsLineAErr = 9; {line 1010 trap error}
  22349. æC 
  22350.  
  22351. æKY dsLineFErr
  22352. æFp Errors.p
  22353. æT CONST
  22354. æD dsLineFErr = 10; {line 1111 trap error}
  22355. æC 
  22356.  
  22357. æKY dsMiscErr
  22358. æFp Errors.p
  22359. æT CONST
  22360. æD dsMiscErr = 11; {miscellaneous hardware exception error}
  22361. æC 
  22362.  
  22363. æKY dsCoreErr
  22364. æFp Errors.p
  22365. æT CONST
  22366. æD dsCoreErr = 12; {unimplemented core routine error}
  22367. æC 
  22368.  
  22369. æKY dsIrqErr
  22370. æFp Errors.p
  22371. æT CONST
  22372. æD dsIrqErr = 13; {uninstalled interrupt error}
  22373. æC 
  22374.  
  22375. æKY dsIOCoreErr
  22376. æFp Errors.p
  22377. æT CONST
  22378. æD dsIOCoreErr = 14; {IO Core Error}
  22379. æC 
  22380.  
  22381. æKY dsLoadErr
  22382. æFp Errors.p
  22383. æT CONST
  22384. æD dsLoadErr = 15; {Segment Loader Error}
  22385. æC 
  22386.  
  22387. æKY dsFPErr
  22388. æFp Errors.p
  22389. æT CONST
  22390. æD dsFPErr = 16; {Floating point error}
  22391. æC 
  22392.  
  22393. æKY dsNoPackErr
  22394. æFp Errors.p
  22395. æT CONST
  22396. æD dsNoPackErr = 17; {package 0 not present}
  22397. æC 
  22398.  
  22399. æKY dsNoPk1
  22400. æFp Errors.p
  22401. æT CONST
  22402. æD dsNoPk1 = 18; {package 1 not present}
  22403. æC 
  22404.  
  22405. æKY dsNoPk2
  22406. æFp Errors.p
  22407. æT CONST
  22408. æD dsNoPk2 = 19; {package 2 not present}
  22409. æC 
  22410.  
  22411. æKY dsNoPk3
  22412. æFp Errors.p
  22413. æT CONST
  22414. æD dsNoPk3 = 20; {package 3 not present}
  22415. æC 
  22416.  
  22417. æKY dsNoPk4
  22418. æFp Errors.p
  22419. æT CONST
  22420. æD dsNoPk4 = 21; {package 4 not present}
  22421. æC 
  22422.  
  22423. æKY dsNoPk5
  22424. æFp Errors.p
  22425. æT CONST
  22426. æD dsNoPk5 = 22; {package 5 not present}
  22427. æC 
  22428.  
  22429. æKY dsNoPk6
  22430. æFp Errors.p
  22431. æT CONST
  22432. æD dsNoPk6 = 23; {package 6 not present}
  22433. æC 
  22434.  
  22435. æKY dsNoPk7
  22436. æFp Errors.p
  22437. æT CONST
  22438. æD dsNoPk7 = 24; {package 7 not present}
  22439. æC 
  22440.  
  22441. æKY dsMemFullErr
  22442. æFp Errors.p
  22443. æT CONST
  22444. æD dsMemFullErr = 25; {out of memory!}
  22445. æC 
  22446.  
  22447. æKY dsBadLaunch
  22448. æFp Errors.p
  22449. æT CONST
  22450. æD dsBadLaunch = 26; {can't launch file}
  22451. æC 
  22452.  
  22453. æKY dsFSErr
  22454. æFp Errors.p
  22455. æT CONST
  22456. æD dsFSErr = 27; {file system map has been trashed}
  22457. æC 
  22458.  
  22459. æKY dsStknHeap
  22460. æFp Errors.p
  22461. æT CONST
  22462. æD dsStknHeap = 28; {stack has moved into application heap}
  22463. æC 
  22464.  
  22465. æKY negZcbFreeErr
  22466. æFp Errors.p
  22467. æT CONST
  22468. æD negZcbFreeErr = 33; {ZcbFree has gone negative}
  22469. æC 
  22470.  
  22471. æKY dsFinderErr
  22472. æFp Errors.p
  22473. æT CONST
  22474. æD dsFinderErr = 41; {can't load the Finder error}
  22475. æC 
  22476.  
  22477. æKY dsBadSlotInt
  22478. æFp Errors.p
  22479. æT CONST
  22480. æD dsBadSlotInt = 51; {unserviceable slot interrupt}
  22481. æC 
  22482.  
  22483. æKY dsBadSANEOpcode
  22484. æFp Errors.p
  22485. æT CONST
  22486. æD dsBadSANEOpcode = 81; {bad opcode given to SANE Pack4}
  22487. æC 
  22488.  
  22489. æKY dsBadPatchHeader
  22490. æFp Errors.p
  22491. æT CONST
  22492. æD dsBadPatchHeader = 83; {SetTrapAddress saw the “come-from” header}
  22493. æC 
  22494.  
  22495. æKY menuPrgErr
  22496. æFp Errors.p
  22497. æT CONST
  22498. æD menuPrgErr = 84; {happens when a menu is purged}
  22499. æC 
  22500.  
  22501. æKY dsMBarNFnd
  22502. æFp Errors.p
  22503. æT CONST
  22504. æD dsMBarNFnd = 85; {Menu Manager Errors}
  22505. æC 
  22506.  
  22507. æKY dsHMenuFindErr
  22508. æFp Errors.p
  22509. æT CONST
  22510. æD dsHMenuFindErr = 86; {Menu Manager Errors}
  22511. æC 
  22512.  
  22513. æKY dsWDEFNotFound
  22514. æFp Errors.p
  22515. æT CONST
  22516. æD dsWDEFNotFound = 87; {could not load WDEF}
  22517. æC 
  22518.  
  22519. æKY dsCDEFNotFound
  22520. æFp Errors.p
  22521. æT CONST
  22522. æD dsCDEFNotFound = 88; {could not load CDEF}
  22523. æC 
  22524.  
  22525. æKY dsMDEFNotFound
  22526. æFp Errors.p
  22527. æT CONST
  22528. æD dsMDEFNotFound = 89; {could not load MDEF}
  22529. æC 
  22530.  
  22531. æKY dsNoFPU
  22532. æFp Errors.p
  22533. æT CONST
  22534. æD dsNoFPU = 90; {an FPU instruction was executed and the machine doesn’t have one}
  22535. æC 
  22536.  
  22537. æKY dsNoPatch
  22538. æFp Errors.p
  22539. æT CONST
  22540. æD dsNoPatch = 98; {Can't patch for particular Model Mac}
  22541. æC 
  22542.  
  22543. æKY dsBadPatch
  22544. æFp Errors.p
  22545. æT CONST
  22546. æD dsBadPatch = 99; {Can't load patch resource}
  22547. æC 
  22548.  
  22549. æKY dsParityErr
  22550. æFp Errors.p
  22551. æT CONST
  22552. æD dsParityErr = 101; {memory parity error}
  22553. æC 
  22554.  
  22555. æKY dsOldSystem
  22556. æFp Errors.p
  22557. æT CONST
  22558. æD dsOldSystem = 102; {System is too old for this ROM}
  22559. æC 
  22560.  
  22561. æKY ds32BitMode
  22562. æFp Errors.p
  22563. æT CONST
  22564. æD ds32BitMode = 103; {booting in 32-bit on a 24-bit sys}
  22565. æC 
  22566.  
  22567. æKY dsNeedToWriteBootBlocks
  22568. æFp Errors.p
  22569. æT CONST
  22570. æD dsNeedToWriteBootBlocks = 104; {need to write new boot blocks}
  22571. æC 
  22572.  
  22573. æKY dsNotEnoughRAMToBoot
  22574. æFp Errors.p
  22575. æT CONST
  22576. æD dsNotEnoughRAMToBoot = 105; {must have at least 1.5MB of RAM to boot 7.0}
  22577. æC 
  22578.  
  22579. æKY dsBufPtrTooLow
  22580. æFp Errors.p
  22581. æT CONST
  22582. æD dsBufPtrTooLow = 106; {bufPtr moved too far during boot}
  22583. æC 
  22584.  
  22585. æKY dsReinsert
  22586. æFp Errors.p
  22587. æT CONST
  22588. æD dsReinsert = 30; {request user to reinsert off-line volume}
  22589. æC 
  22590.  
  22591. æKY shutDownAlert
  22592. æFp Errors.p
  22593. æT CONST
  22594. æD shutDownAlert = 42; {handled like a shutdown error}
  22595. æC 
  22596.  
  22597. æKY dsShutDownOrRestart
  22598. æFp Errors.p
  22599. æT CONST
  22600. æD dsShutDownOrRestart = 20000; {user choice between ShutDown and Restart}
  22601. æC 
  22602.  
  22603. æKY dsSwitchOffOrRestart
  22604. æFp Errors.p
  22605. æT CONST
  22606. æD dsSwitchOffOrRestart = 20001; {user choice between switching off and Restart}
  22607. æC 
  22608.  
  22609. æKY dsForcedQuit
  22610. æFp Errors.p
  22611. æT CONST
  22612. æD dsForcedQuit = 20002; {allow the user to ExitToShell, return if Cancel}
  22613. æC 
  22614.  
  22615. æKY dsMacsBugInstalled
  22616. æFp Errors.p
  22617. æT CONST
  22618. æD dsMacsBugInstalled = -10; {say “MacsBug Installed”}
  22619. æC 
  22620.  
  22621. æKY dsDisassemblerInstalled
  22622. æFp Errors.p
  22623. æT CONST
  22624. æD dsDisassemblerInstalled = -11; {say “Disassembler Installed”}
  22625. æC 
  22626.  
  22627. æKY dsExtensionsDisabled
  22628. æFp Errors.p
  22629. æT CONST
  22630. æD dsExtensionsDisabled = -13; {say “Extensions Disabled”}
  22631. æC 
  22632.  
  22633. æKY dsGreeting
  22634. æFp Errors.p
  22635. æT CONST
  22636. æD dsGreeting = 40; {welcome to Macintosh greeting}
  22637. æC 
  22638.  
  22639. æKY dsSysErr
  22640. æFp Errors.p
  22641. æT CONST
  22642. æD dsSysErr = 32767; {general system error}
  22643. æC 
  22644.  
  22645. æKY WDEFNFnd
  22646. æFp Errors.p
  22647. æT CONST
  22648. æD WDEFNFnd = dsWDEFNotFound;
  22649. æC 
  22650.  
  22651. æKY CDEFNFnd
  22652. æFp Errors.p
  22653. æT CONST
  22654. æD CDEFNFnd = dsCDEFNotFound;
  22655. æC 
  22656.  
  22657. æKY dsNotThe1
  22658. æFp Errors.p
  22659. æT CONST
  22660. æD dsNotThe1 = 31; {not the disk I wanted}
  22661. æC 
  22662.  
  22663. æKY dsBadStartupDisk
  22664. æFp Errors.p
  22665. æT CONST
  22666. æD dsBadStartupDisk = 42; {unable to mount boot volume (sad Mac only)}
  22667. æC 
  22668.  
  22669. æKY dsSystemFileErr
  22670. æFp Errors.p
  22671. æT CONST
  22672. æD dsSystemFileErr = 43; {can’t find System file to open (sad Mac only)}
  22673. æC 
  22674.  
  22675. æKY dsHD20Installed
  22676. æFp Errors.p
  22677. æT CONST
  22678. æD dsHD20Installed = -12; {say “HD20 Startup”}
  22679. æC 
  22680.  
  22681. æKY mBarNFnd
  22682. æFp Errors.p
  22683. æT CONST
  22684. æD mBarNFnd = -126; {system error code for MBDF not found}
  22685. æC 
  22686.  
  22687. æKY hMenuFindErr
  22688. æFp Errors.p
  22689. æT CONST
  22690. æD hMenuFindErr = -127; {could not find HMenu's parent in MenuKey}
  22691. æC 
  22692.  
  22693. æKY userBreak
  22694. æFp Errors.p
  22695. æT CONST
  22696. æD userBreak = -490; {user debugger break}
  22697. æC 
  22698.  
  22699. æKY strUserBreak
  22700. æFp Errors.p
  22701. æT CONST
  22702. æD strUserBreak = -491; {user debugger break; display string on stack}
  22703. æC 
  22704.  
  22705. æKY exUserBreak
  22706. æFp Errors.p
  22707. æT CONST
  22708. æD exUserBreak = -492; {user debugger break; execute debugger commands on stack}
  22709. æC 
  22710.  
  22711. æKY selectorErr
  22712. æFp Errors.p
  22713. æT CONST
  22714. æD selectorErr = paramErr; {bad selector, for selector-based traps}
  22715. æC 
  22716.  
  22717. æKY SysError
  22718. æFp Errors.p
  22719. æT PROCEDURE
  22720. æD PROCEDURE SysError(errorCode: INTEGER);
  22721.     INLINE $301F,$A9C9;
  22722. æDT SysError(errorCode);
  22723. æMM
  22724. æRI II-362, V-572
  22725. æC _____________________________________________________________________________________
  22726.  
  22727. Trap macro  _SysError
  22728. On entry    D0:  errorCode (word)
  22729. On exit     All registers changed
  22730. _____________________________________________________________________________________
  22731. SysError generates a system error with the ID specified by the errorCode 
  22732. parameter.
  22733.  
  22734. It takes the following precise steps:
  22735. 1.  It saves all registers and the stack pointer.
  22736. 2.  It stores the system error ID in a global variable (named DSErrCode).
  22737. 3.  It checks to see whether there's a system error alert table in memory (by 
  22738.     testing whether the global variable DSAlertTab is 0); if there isn't, it draws 
  22739.     the "sad Macintosh" icon.
  22740. 4.  It allocates memory for QuickDraw globals on the stack, initializes 
  22741.     QuickDraw, and initializes a grafPort in which the alert box will be drawn.
  22742. 5.  It checks the system error ID.  If the system error ID is negative, the alert 
  22743.     box isn't redrawn (this is used for system startup alerts, which can display a 
  22744.     sequence of consecutive messages in the same box).  If the system error ID 
  22745.     doesn't correspond to an entry in the system error alert table, the default 
  22746.     alert definition at the start of the table will be used, displaying the message 
  22747.     "Sorry, a system error occurred".
  22748. 6.  It draws an alert box (in the rectangle specified by the global variable 
  22749.     DSAlertRect).
  22750. 7.  If the text definition IDs in the alert definition for this alert aren't 0, it 
  22751.     draws both strings.
  22752. 8.  If the icon definition ID in the alert definition isn't 0, it draws the icon.
  22753. 9.  If the procedure definition ID in the alert definition isn't 0, it invokes the 
  22754.     procedure with the specified ID.
  22755. 10. If the button definition ID in the alert definition is 0, it returns control to 
  22756.     the procedure that called it (this is used during the disk-switch alert to return
  22757.     control to the File Manager after the "Please insert the disk:" message has been 
  22758.     displayed).
  22759. 11. If there's a resume procedure, it increments the button definition ID by 1.
  22760. 12. It draws the buttons.
  22761. 13. It hit-tests the buttons and calls the corresponding procedure code when a 
  22762.     button is pressed.  If there's no procedure code, it returns to the procedure 
  22763.     that called it.
  22764.  
  22765. User Alerts
  22766. _____________
  22767. ID  Explanation
  22768. 1   Bus error:  Invalid memory reference; happens only on a Macintosh XL 
  22769. 2   Address error:  Word or long-word reference made to an odd address
  22770. 3   Illegal instruction:  The MC68000 received an instruction it didn't recognize.
  22771. 4   Zero divide:  Signed Divide (DIVS) or Unsigned Divide (DIVU) instruction 
  22772.                   with a divisor of 0 was executed.
  22773. 5   Check exception:  Check Register Against Bounds (CHK) instruction was executed 
  22774.                       and failed.  Pascal "value out of range" errors are usually 
  22775.                       reported in this way.
  22776. 6   TrapV exception:  Trap On Overflow (TRAPV) instruction was executed and failed.
  22777. 7   Privilege violation:  Macintosh always runs in supervisor mode; perhaps an 
  22778.                           erroneous Return From Execution (RTE) instruction was 
  22779.                           executed.
  22780. 8   Trace exception:  The trace bit in the status register is set.
  22781. 9   Line 1010 exception:  The 1010 trap dispatcher has failed.
  22782. 10  Line 1111 exception:  Unimplemented instruction
  22783. 11  Miscellaneous exception:  All other MC68000 exceptions
  22784. 12  Unimplemented core routine:  An unimplemented trap number was encountered.
  22785. 13  Spurious interrupt:  The interrupt vector table entry for a particular level 
  22786.                          of interrupt is NIL; usually occurs with level 4, 5, 6, or 7 
  22787.                          interrupts.
  22788. 14  I/O system error:  The File Manager is attempting to dequeue an entry from 
  22789.                        an I/O request queue that has a bad queue type field; perhaps 
  22790.                        the queue entry is unlocked.  Or, the dCtlQHead field was NIL 
  22791.                        during a Fetch or Stash call.  Or, a needed device control 
  22792.                        entry has been purged.
  22793. 15  Segment Loader error:  A GetResource call to read a segment into memory failed.
  22794. 16  Floating point error:  The halt bit in the floating-point environment word was 
  22795.                            set.
  22796. 17-24 Can't load package:  A GetResource call to read a package into memory failed.
  22797. 25  Can't allocate requested memory block in the heap
  22798. 26  Segment Loader error:  A GetResource call to read 'CODE' resource 0 into 
  22799.                            memory failed; usually indicates a nonexecutable file.
  22800. 27  File map destroyed:  A logical block number was found that's greater than 
  22801.                          the number of the last logical block on the volume or less 
  22802.                          than the logical block number of the first allocation block 
  22803.                          on the volume.
  22804. 28  Stack overflow error:  The stack has expanded into the heap.
  22805. 30  "Please insert the disk:" File Manager alert
  22806. 41  The file named "Finder" can't be found on the disk.
  22807. 100 Can't mount system startup volume.  The system couldn't read the system resource 
  22808.                                         file into memory.
  22809. 32767 "Sorry, a system error occurred":  Default alert message 
  22810.  
  22811.  
  22812. æKY Events.p
  22813. æKL Button
  22814. EventAvail
  22815. GetCaretTime
  22816. GetDblTime
  22817. GetKeys
  22818. GetMouse
  22819. GetNextEvent
  22820. StillDown
  22821. TickCount
  22822. WaitMouseUp
  22823. WaitNextEvent
  22824.  
  22825. activateEvt
  22826. activeFlag
  22827. activMask
  22828. adbAddrMask
  22829. alphaLock
  22830. app1Evt
  22831. app1Mask
  22832. app2Evt
  22833. app2Mask
  22834. app3Evt
  22835. app3Mask
  22836. app4Evt
  22837. app4Mask
  22838. autoKey
  22839. autoKeyMask
  22840. btnState
  22841. charCodeMask
  22842. cmdKey
  22843. controlKey
  22844. convertClipboardFlag
  22845. diskEvt
  22846. diskMask
  22847. driverEvt
  22848. driverMask
  22849. EventRecord
  22850. everyEvent
  22851. highLevelEventMask
  22852. keyCodeMask
  22853. keyDown
  22854. keyDownMask
  22855. KeyMap
  22856. keyUp
  22857. keyUpMask
  22858. mDownMask
  22859. mouseDown
  22860. mouseMovedMessage
  22861. mouseUp
  22862. mUpMask
  22863. networkEvt
  22864. networkMask
  22865. nullEvent
  22866. optionKey
  22867. osEvt
  22868. osEvtMessageMask
  22869. osMask
  22870. resumeFlag
  22871. shiftKey
  22872. suspendResumeMessage
  22873. updateEvt
  22874. updateMask
  22875.  
  22876. æKY nullEvent
  22877. æFp Events.p
  22878. æT CONST
  22879. æD nullEvent = 0;
  22880. æC 
  22881. »Event Code
  22882.  
  22883. The what field of an event record contains an event code identifying the type of the
  22884. event. The event codes are available as predefined constants:
  22885.  
  22886. CONST  nullEvent   =  0;    {null}
  22887.        mouseDown   =  1;    {mouse-down}
  22888.        mouseUp     =  2;    {mouse-up}
  22889.        keyDown     =  3;    {key-down}
  22890.        keyUp       =  4;    {key-up}
  22891.        autoKey     =  5;    {auto-key}
  22892.        updateEvt   =  6;    {update}
  22893.        diskEvt     =  7;    {disk-inserted}
  22894.        activateEvt =  8;    {activate}
  22895.        networkEvt  = 10;    {network}
  22896.        driverEvt   = 11;    {device driver}
  22897.        app1Evt     = 12;    {application-defined}
  22898.        app2Evt     = 13;    {application-defined}
  22899.        app3Evt     = 14;    {application-defined}
  22900.        app4Evt     = 15;    {application-defined}
  22901.  
  22902. æKY mouseDown
  22903. æFp Events.p
  22904. æT CONST
  22905. æD mouseDown = 1;
  22906. æC 
  22907.  
  22908. æKY mouseUp
  22909. æFp Events.p
  22910. æT CONST
  22911. æD mouseUp = 2;
  22912. æC 
  22913.  
  22914. æKY keyDown
  22915. æFp Events.p
  22916. æT CONST
  22917. æD keyDown = 3;
  22918. æC 
  22919.  
  22920. æKY keyUp
  22921. æFp Events.p
  22922. æT CONST
  22923. æD keyUp = 4;
  22924. æC 
  22925.  
  22926. æKY autoKey
  22927. æFp Events.p
  22928. æT CONST
  22929. æD autoKey = 5;
  22930. æC 
  22931.  
  22932. æKY updateEvt
  22933. æFp Events.p
  22934. æT CONST
  22935. æD updateEvt = 6;
  22936. æC 
  22937.  
  22938. æKY diskEvt
  22939. æFp Events.p
  22940. æT CONST
  22941. æD diskEvt = 7;
  22942. æC 
  22943.  
  22944. æKY activateEvt
  22945. æFp Events.p
  22946. æT CONST
  22947. æD activateEvt = 8;
  22948. æC 
  22949.  
  22950. æKY osEvt
  22951. æFp Events.p
  22952. æT CONST
  22953. æD osEvt = 15;
  22954. æC 
  22955.  
  22956. æKY mDownMask
  22957. æFp Events.p
  22958. æT CONST
  22959. æD mDownMask = 2;
  22960. æC 
  22961. _______________________________________________________________________________
  22962.  
  22963. »EVENT MASKS
  22964. _______________________________________________________________________________
  22965.  
  22966. Some of the Event Manager routines can be restricted to operate on a specific event
  22967. type or group of types; in other words, the specified event types are enabled while
  22968. all others are disabled. For instance, instead of just requesting the next available
  22969. event, you can specifically ask for the next keyboard event.
  22970.  
  22971. You specify which event types a particular Event Manager call applies to by supplying
  22972. an event mask as a parameter. This is an integer in which there’s one bit position
  22973. for each event type, as shown in Figure 8. The bit position representing a given type
  22974. corresponds to the event code for that type—for example, update events (event code 6)
  22975. are specified by bit 6 of the mask. A 1 in bit 6 means that this Event Manager call
  22976. applies to update events; a 0 means that it doesn’t.
  22977.  
  22978. •••Refer to Figure 8.•••
  22979.  
  22980. Figure 8–Event Mask
  22981.  
  22982. Masks for each individual event type are available as predefined constants:
  22983.  
  22984. CONST  mDownMask   = 2;       {mouse-down}
  22985.        mUpMask     = 4;       {mouse-up}
  22986.        keyDownMask = 8;       {key-down}
  22987.        keyUpMask   = 16;      {key-up}
  22988.        autoKeyMask = 32;      {auto-key}
  22989.        updateMask  = 64;      {update}
  22990.        diskMask    = 128;     {disk-inserted}
  22991.        activMask   = 256;     {activate}
  22992.        networkMask = 1024;    {network}
  22993.        driverMask  = 2048;    {device driver}
  22994.        app1Mask    = 4096;    {application-defined}
  22995.        app2Mask    = 8192;    {application-defined}
  22996.        app3Mask    = 16384;   {application-defined}
  22997.        app4Mask    = -32768;  {application-defined}
  22998.  
  22999. Note:  Null events can’t be disabled; a null event will always be reported
  23000.        when none of the enabled types of events are available.
  23001.  
  23002. The following predefined mask designates all event types:
  23003.  
  23004. CONST    everyEvent    = -1;    {all event types}
  23005.  
  23006. You can form any mask you need by adding or subtracting these mask constants. For
  23007. example, to specify every keyboard event, use
  23008.  
  23009.   keyDownMask + keyUpMask + autoKeyMask
  23010.  
  23011. For every event except an update, use
  23012.  
  23013.   everyEvent - updateMask
  23014.  
  23015. Note:  It’s recommended that you always use the event mask everyEvent unless
  23016.        there’s a specific reason not to.
  23017.  
  23018. There’s also a global system event mask that controls which event types get posted
  23019. into the event queue. Only event types corresponding to bits set in the system event
  23020. mask are posted; all others are ignored. When the system starts up, the system event
  23021. mask is set to post all except key-up event—that is, it’s initialized to
  23022.  
  23023.   everyEvent - keyUpMask
  23024.  
  23025. Note:  Key-up events are meaningless for most applications. Your application
  23026.        will usually want to ignore them; if not, it can set the system event
  23027.        mask with the Operating System Event Manager procedure SetEventMask.
  23028.  
  23029. æKY mUpMask
  23030. æFp Events.p
  23031. æT CONST
  23032. æD mUpMask = 4;
  23033. æC 
  23034.  
  23035. æKY keyDownMask
  23036. æFp Events.p
  23037. æT CONST
  23038. æD keyDownMask = 8;
  23039. æC 
  23040.  
  23041. æKY keyUpMask
  23042. æFp Events.p
  23043. æT CONST
  23044. æD keyUpMask = 16;
  23045. æC 
  23046.  
  23047. æKY autoKeyMask
  23048. æFp Events.p
  23049. æT CONST
  23050. æD autoKeyMask = 32;
  23051. æC 
  23052.  
  23053. æKY updateMask
  23054. æFp Events.p
  23055. æT CONST
  23056. æD updateMask = 64;
  23057. æC 
  23058.  
  23059. æKY diskMask
  23060. æFp Events.p
  23061. æT CONST
  23062. æD diskMask = 128;
  23063. æC 
  23064.  
  23065. æKY activMask
  23066. æFp Events.p
  23067. æT CONST
  23068. æD activMask = 256;
  23069. æC 
  23070.  
  23071. æKY highLevelEventMask
  23072. æFp Events.p
  23073. æT CONST
  23074. æD highLevelEventMask = 1024;
  23075. æC 
  23076.  
  23077. æKY osMask
  23078. æFp Events.p
  23079. æT CONST
  23080. æD osMask = -32768;
  23081. æC 
  23082.  
  23083. æKY everyEvent
  23084. æFp Events.p
  23085. æT CONST
  23086. æD everyEvent = -1;
  23087. æC 
  23088.  
  23089. æKY charCodeMask
  23090. æFp Events.p
  23091. æT CONST
  23092. æD charCodeMask = $000000FF;
  23093. æC 
  23094.  
  23095. æKY keyCodeMask
  23096. æFp Events.p
  23097. æT CONST
  23098. æD keyCodeMask = $0000FF00;
  23099. æC 
  23100.  
  23101. æKY adbAddrMask
  23102. æFp Events.p
  23103. æT CONST
  23104. æD adbAddrMask = $00FF0000;
  23105. æC 
  23106.  
  23107. æKY osEvtMessageMask
  23108. æFp Events.p
  23109. æT CONST
  23110. æD osEvtMessageMask = $FF000000;
  23111. æC 
  23112.  
  23113. æKY mouseMovedMessage
  23114. æFp Events.p
  23115. æT CONST
  23116. æD mouseMovedMessage = $FA;
  23117. æC 
  23118.  
  23119. æKY suspendResumeMessage
  23120. æFp Events.p
  23121. æT CONST
  23122. æD suspendResumeMessage = $01;
  23123. æC 
  23124.  
  23125. æKY resumeFlag
  23126. æFp Events.p
  23127. æT CONST
  23128. æD resumeFlag = 1; { bit 0 of message indicates resume vs suspend }
  23129. æC 
  23130.  
  23131. æKY convertClipboardFlag
  23132. æFp Events.p
  23133. æT CONST
  23134. æD convertClipboardFlag = 2; { bit 1 in resume message indicates clipboard change }
  23135. æC 
  23136.  
  23137. æKY activeFlag
  23138. æFp Events.p
  23139. æT CONST
  23140. æD activeFlag = 1; {bit 0 of modifiers for activate event}
  23141. æC 
  23142. »Modifier Flags
  23143.  
  23144. As mentioned above, the modifiers field of an event record contains further information
  23145. about activate events and the state of the modifier keys and mouse button at the time
  23146. the event was posted (see Figure 7). You might look at this field to find out, for
  23147. instance, whether the Command key was down when a mouse-down event was posted (which
  23148. in many applications affects the way objects are selected) or when a key-down event
  23149. was posted (which could mean the user is choosing a menu item by typing its keyboard
  23150. equivalent).
  23151.  
  23152. •••Refer to Figure 7.•••
  23153.  
  23154. Figure 7–Modifier Flags
  23155.  
  23156. The following predefined constants are useful as masks for reading the flags in the
  23157. modifiers field:
  23158.  
  23159. CONST  activeFlag = 1;     {set if window being activated}
  23160.        btnState   = 128;   {set if mouse button up}
  23161.        cmdKey     = 256;   {set if Command key down}
  23162.        shiftKey   = 512;   {set if Shift key down}
  23163.        alphaLock  = 1024;  {set if Caps Lock key down}
  23164.        optionKey  = 2048;  {set if Option key down}
  23165.        controlKey = 4096;  {set if Control key down}
  23166.  
  23167. The activeFlag bit gives further information about activate events; it’s set if the
  23168. window pointed to by the event message is being activated, or 0 if the window is
  23169. being deactivated. The remaining bits indicate the state of the mouse button and
  23170. modifier keys. Notice that the btnState bit is set if the mouse button is up, whereas
  23171. the bits for the four modifier keys are set if their corresponding keys are down.
  23172.  
  23173. æKY btnState
  23174. æFp Events.p
  23175. æT CONST
  23176. æD btnState = 128; {Bit 7 of low byte is mouse button state}
  23177. æC 
  23178.  
  23179. æKY cmdKey
  23180. æFp Events.p
  23181. æT CONST
  23182. æD cmdKey = 256; {Bit 0}
  23183. æC 
  23184.  
  23185. æKY shiftKey
  23186. æFp Events.p
  23187. æT CONST
  23188. æD shiftKey = 512; {Bit 1}
  23189. æC 
  23190.  
  23191. æKY alphaLock
  23192. æFp Events.p
  23193. æT CONST
  23194. æD alphaLock = 1024; {Bit 2 }
  23195. æC 
  23196.  
  23197. æKY optionKey
  23198. æFp Events.p
  23199. æT CONST
  23200. æD optionKey = 2048; {Bit 3 of high byte}
  23201. æC 
  23202.  
  23203. æKY controlKey
  23204. æFp Events.p
  23205. æT CONST
  23206. æD controlKey = 4096;
  23207. æC 
  23208.  
  23209. æKY networkEvt
  23210. æFp Events.p
  23211. æT CONST
  23212. æD networkEvt = 10;
  23213. æC 
  23214.  
  23215. æKY driverEvt
  23216. æFp Events.p
  23217. æT CONST
  23218. æD driverEvt = 11;
  23219. æC 
  23220.  
  23221. æKY app1Evt
  23222. æFp Events.p
  23223. æT CONST
  23224. æD app1Evt = 12;
  23225. æC 
  23226.  
  23227. æKY app2Evt
  23228. æFp Events.p
  23229. æT CONST
  23230. æD app2Evt = 13;
  23231. æC 
  23232.  
  23233. æKY app3Evt
  23234. æFp Events.p
  23235. æT CONST
  23236. æD app3Evt = 14;
  23237. æC 
  23238.  
  23239. æKY app4Evt
  23240. æFp Events.p
  23241. æT CONST
  23242. æD app4Evt = 15;
  23243. æC 
  23244.  
  23245. æKY networkMask
  23246. æFp Events.p
  23247. æT CONST
  23248. æD networkMask = 1024;
  23249. æC 
  23250.  
  23251. æKY driverMask
  23252. æFp Events.p
  23253. æT CONST
  23254. æD driverMask = 2048;
  23255. æC 
  23256.  
  23257. æKY app1Mask
  23258. æFp Events.p
  23259. æT CONST
  23260. æD app1Mask = 4096;
  23261. æC 
  23262.  
  23263. æKY app2Mask
  23264. æFp Events.p
  23265. æT CONST
  23266. æD app2Mask = 8192;
  23267. æC 
  23268.  
  23269. æKY app3Mask
  23270. æFp Events.p
  23271. æT CONST
  23272. æD app3Mask = 16384;
  23273. æC 
  23274.  
  23275. æKY app4Mask
  23276. æFp Events.p
  23277. æT CONST
  23278. æD app4Mask = -32768;
  23279. æC 
  23280.  
  23281. æKY EventRecord
  23282. æFp Events.p
  23283. æT RECORD
  23284. æD EventRecord = RECORD
  23285.     what: INTEGER;
  23286.     message: LONGINT;
  23287.     when: LONGINT;
  23288.     where: Point;
  23289.     modifiers: INTEGER;
  23290.     END;
  23291. æC 
  23292. _______________________________________________________________________________
  23293.  
  23294. »EVENT RECORDS
  23295. _______________________________________________________________________________
  23296.  
  23297. Every event is represented internally by an event record containing all pertinent
  23298. information about that event. The event record includes the following information:
  23299.  
  23300.   •  the type of event
  23301.   •  the time the event was posted (in ticks since system startup)
  23302.   •  the location of the mouse at the time the event was posted (in global
  23303.      coordinates)
  23304.   •  the state of the mouse button and modifier keys at the time the event
  23305.      was posted
  23306.   •  any additional information required for a particular type of event, such
  23307.      as which key the user pressed or which window is being activated
  23308.  
  23309. Every event has an event record containing this information—even null events.
  23310.  
  23311. Event records are defined as follows:
  23312.  
  23313. TYPE  EventRecord = RECORD
  23314.                       what:       INTEGER;  {event code}
  23315.                       message:    LONGINT;  {event message}
  23316.                       when:       LONGINT;  {ticks since startup}
  23317.                       where:      Point;    {mouse location}
  23318.                       modifiers:  INTEGER   {modifier flags}
  23319.                     END;
  23320.  
  23321. The when field contains the number of ticks since the system last started up, and the
  23322. where field gives the location of the mouse, in global coordinates, at the time the
  23323. event was posted. The other three fields are described below.
  23324.  
  23325. _______________________________________________________________________________
  23326.  
  23327. »Event Code
  23328.  
  23329. The what field of an event record contains an event code identifying the type of the
  23330. event. The event codes are available as predefined constants:
  23331.  
  23332. CONST  nullEvent   =  0;    {null}
  23333.        mouseDown   =  1;    {mouse-down}
  23334.        mouseUp     =  2;    {mouse-up}
  23335.        keyDown     =  3;    {key-down}
  23336.        keyUp       =  4;    {key-up}
  23337.        autoKey     =  5;    {auto-key}
  23338.        updateEvt   =  6;    {update}
  23339.        diskEvt     =  7;    {disk-inserted}
  23340.        activateEvt =  8;    {activate}
  23341.        networkEvt  = 10;    {network}
  23342.        driverEvt   = 11;    {device driver}
  23343.        app1Evt     = 12;    {application-defined}
  23344.        app2Evt     = 13;    {application-defined}
  23345.        app3Evt     = 14;    {application-defined}
  23346.        app4Evt     = 15;    {application-defined}
  23347.  
  23348. _______________________________________________________________________________
  23349.  
  23350. »Event Message
  23351.  
  23352. The message field of an event record contains the event message, which conveys additional
  23353. important information about the event. The nature of this information depends on the
  23354. event type, as summarized in the following table and described below.
  23355.  
  23356.   Event type             Event message
  23357.  
  23358.   Keyboard               Character code, key code, and ADB address field
  23359.   Activate, update       Pointer to window
  23360.   Disk-inserted          Drive number in low-order word, File Manager
  23361.                          result code in high-order word
  23362.   Mouse-down,            Undefined
  23363.   mouse-up, null
  23364.   Network                Handle to parameter block
  23365.   Device driver          See chapter describing driver
  23366.   Application-defined    Whatever you wish
  23367.  
  23368. For keyboard events, the low-order byte of the low-order word of the event message
  23369. contains the ASCII character code generated by the key or combination of keys that
  23370. was pressed or released; usually this is all you’ll need.  However, as described in
  23371. the Apple Desktop Bus chapter, the Macintosh II and SE can be connected to multiple
  23372. keyboards.  To identify the origin of keyboard events, the keyboard event message
  23373. contains a new ADB address field.  It now has the structure shown in Figure 2.
  23374.  
  23375. Warning:  The high byte of the event message for keyboard events is reserved
  23376.           for future use, and is not presently guaranteed to be zero.
  23377.  
  23378. The event message for non-keyboard events remains the same as described above.
  23379.  
  23380. •••Refer to Figure 2.•••
  23381.  
  23382. Figure 2–Event Message for Keyboard Events
  23383.  
  23384. The key code in the event message for a keyboard event represents the character key
  23385. that was pressed or released; this value is always the same for any given character
  23386. key, regardless of the modifier keys pressed along with it. Key codes are useful in
  23387. special cases—in a music generator, for example—where you want to treat the keyboard
  23388. as a set of keys unrelated to characters. Figure 3 gives the key codes for all the
  23389. keys on the keyboard and keypad. (Key codes are shown for modifier keys here because
  23390. they’re meaningful in other contexts, as explained later.) Both the U.S. and international
  23391. keyboards are shown; in some cases the codes are quite different (for example, space
  23392. and Enter are reversed).
  23393.  
  23394. Three keyboards are now available as standard equipment with Macintosh computers sold
  23395. in the U.S.  They are
  23396.  
  23397.   •  The Macintosh Plus Keyboard, which includes cursor control keys and an
  23398.      integral keypad.  Its layout and key coding is shown in Figure 4.
  23399.   •  The Macintosh II Keyboard, also shipped with the Macintosh SE, which
  23400.      adds Esc (Escape) and Control keys and is connected to the Apple Desktop
  23401.      Bus.  Its layout and key coding is shown in Figure 5.
  23402.   •  The Apple Extended Keyboard,  which the user may connect to the Apple
  23403.      Desktop Bus of any Macintosh II or Macintosh SE computer.  Its layout
  23404.      and key coding is shown in Figure 6.
  23405.  
  23406. These figures show the virtual key codes for each key; they are the key codes that
  23407. actually appear in keyboard events.  In the case of the Macintosh II and Apple Extended
  23408. Keyboards, however, the hardware produces raw key codes, which may be different.  Raw
  23409. key codes are translated to virtual key codes by the
  23410. 'KMAP' resource in the System Folder.  By modifying the 'KMAP' resource you can
  23411. change the key codes for any keys.  Similarly, you can change the ASCII codes corresponding
  23412. to specific key codes by modifying the 'KCHR' resource in the System Folder.  The
  23413. 'KMAP' and 'KCHR' resources are described in the Resource Manager chapter.
  23414.  
  23415. With both the Macintosh II and the Apple Extended keyboards, the standard 'KMAP'
  23416. resource supplied in the system folder reassigns the following raw key codes to
  23417. different virtual key codes:
  23418.  
  23419.   Key           Raw key code    Virtual key code
  23420.  
  23421.   Control           36                3B
  23422.   Left cursor       3B                7B
  23423.   Right cursor      3C                7C
  23424.   Down cursor       3D                7D
  23425.   Up cursor         3E                7E
  23426.  
  23427. The standard 'KMAP' resource leaves all other raw key codes and virtual key codes the
  23428. same.
  23429.  
  23430. With the Apple Extended Keyboard, the virtual key codes for three more keys may be
  23431. easily reassigned, as described above under “Reassigning Right Key Codes”.
  23432.  
  23433. The following predefined constants are available to help you access the character
  23434. code and key code:
  23435.  
  23436. CONST  charCodeMask = $000000FF;    {character code}
  23437.        keyCodeMask  = $0000FF00;    {key code}
  23438.  
  23439. •••Refer to Figure 3.•••
  23440.  
  23441. Figure 3–Key Codes
  23442.  
  23443. •••Refer to Figure 4.•••
  23444.  
  23445. Figure 4–Macintosh Plus Keyboard
  23446.  
  23447. •••Refer to Figure 5.•••
  23448.  
  23449. Figure 5–Macintosh II Keyboard
  23450.  
  23451. •••Refer to Figure 6.•••
  23452.  
  23453. Figure 6–Apple Extended Keyboard
  23454.  
  23455. Note:  You can use the Toolbox Utility function BitAnd with these constants;
  23456.        for instance, to access the character code, use
  23457.  
  23458.          charCode := BitAnd(my Event.message,charCodeMask)
  23459. _______________________________________________________________________________
  23460.  
  23461. THE TOOLBOX EVENT MANAGER                                           
  23462. _______________________________________________________________________________
  23463.  
  23464. For activate and update events, the event message is a pointer to the window affected.
  23465. (If the event is an activate event, additional important information about the event
  23466. can be found in the modifiers field of the event record, as described below.)
  23467.  
  23468. For disk-inserted events, the low-order word of the event message contains the drive
  23469. number of the disk drive into which the disk was inserted:  1 for the Macintosh’s
  23470. built-in drive, and 2 for the external drive, if any. Numbers greater than 2 denote
  23471. additional disk drives connected to the Macintosh. By the time your application
  23472. receives a disk-inserted event, the system will already have attempted to mount the
  23473. volume on the disk by calling the File Manager function MountVol; the high-order word
  23474. of the event message will contain the result code returned by MountVol.
  23475.  
  23476. For mouse-down, mouse-up, and null events, the event message is undefined and should
  23477. be ignored. The event message for a network event contains a handle to a parameter
  23478. block, as described in the AppleTalk Manager chapter. For device driver events, the
  23479. contents of the event message depend on the situation under which the event was
  23480. generated; the chapters describing those situations will give the details. Finally,
  23481. you can use the event message however you wish for application-defined event types.
  23482.  
  23483. _______________________________________________________________________________
  23484.  
  23485. »Modifier Flags
  23486.  
  23487. As mentioned above, the modifiers field of an event record contains further information
  23488. about activate events and the state of the modifier keys and mouse button at the time
  23489. the event was posted (see Figure 7). You might look at this field to find out, for
  23490. instance, whether the Command key was down when a mouse-down event was posted (which
  23491. in many applications affects the way objects are selected) or when a key-down event
  23492. was posted (which could mean the user is choosing a menu item by typing its keyboard
  23493. equivalent).
  23494.  
  23495. •••Refer to Figure 7.•••
  23496.  
  23497. Figure 7–Modifier Flags
  23498.  
  23499. The following predefined constants are useful as masks for reading the flags in the
  23500. modifiers field:
  23501.  
  23502. CONST  activeFlag = 1;     {set if window being activated}
  23503.        btnState   = 128;   {set if mouse button up}
  23504.        cmdKey     = 256;   {set if Command key down}
  23505.        shiftKey   = 512;   {set if Shift key down}
  23506.        alphaLock  = 1024;  {set if Caps Lock key down}
  23507.        optionKey  = 2048;  {set if Option key down}
  23508.        controlKey = 4096;  {set if Control key down}
  23509.  
  23510. The activeFlag bit gives further information about activate events; it’s set if the
  23511. window pointed to by the event message is being activated, or 0 if the window is
  23512. being deactivated. The remaining bits indicate the state of the mouse button and
  23513. modifier keys. Notice that the btnState bit is set if the mouse button is up, whereas
  23514. the bits for the four modifier keys are set if their corresponding keys are down.
  23515.  
  23516. æKY KeyMap
  23517. æFp Events.p
  23518. æT TYPE
  23519. æD KeyMap = PACKED ARRAY [0..127] OF BOOLEAN;
  23520. æC 
  23521.  
  23522. æKY GetNextEvent
  23523. æFp Events.p
  23524. æT FUNCTION
  23525. æTN A970
  23526. æD FUNCTION GetNextEvent(eventMask: INTEGER;VAR theEvent: EventRecord): BOOLEAN;
  23527.     INLINE $A970;
  23528. æDT myVariable := GetNextEvent(eventMask,theEvent);
  23529. æMM
  23530. æRT 3, 5, 85, 194, 205 
  23531. æRI I-257, N3-1, N5-1, N85, P-30, 32, 34, 39, 40, 97, 108, 173
  23532. æC 
  23533. GetNextEvent returns the next available event of a specified type or types and, if
  23534. the event is in the event queue, removes it from the queue. The event is returned in
  23535. the parameter theEvent. The eventMask parameter specifies which event types are of
  23536. interest. GetNextEvent returns the next available event of any type designated by the
  23537. mask, subject to the priority rules discussed above under “Priority of Events”. If no
  23538. event of any of the designated types is available, GetNextEvent returns a null event.
  23539.  
  23540. Note:  Events in the queue that aren’t designated in the mask are kept in
  23541.        the queue; if you want to remove them, you can do so by calling the
  23542.        Operating System Event Manager procedure FlushEvents.
  23543.  
  23544. Before reporting an event to your application, GetNextEvent first calls the Desk
  23545. Manager function SystemEvent to see whether the system wants to intercept and respond
  23546. to the event. If so, or if the event being reported is a null event, GetNextEvent
  23547. returns a function result of FALSE; a function result of TRUE means that your application
  23548. should handle the event itself. The Desk Manager intercepts the following events:
  23549.  
  23550.   •  activate and update events directed to a desk accessory
  23551.   •  mouse-up and keyboard events, if the currently active window belongs to
  23552.      a desk accessory
  23553.  
  23554. Note:  In each case, the event is intercepted by the Desk Manager only if
  23555.        the desk accessory can handle that type of event; however, as a rule
  23556.        all desk accessories should be set up to handle activate, update, and
  23557.        keyboard events and should not handle mouse-up events.
  23558.  
  23559. The Desk Manager also intercepts disk-inserted events:  It attempts to mount the
  23560. volume on the disk by calling the File Manager function MountVol. GetNextEvent will
  23561. always return TRUE in this case, though, so that your application can take any further
  23562. appropriate action after examining the result code returned by MountVol in the event
  23563. message. (See the Desk Manager and File Manager chapters.) GetNextEvent returns TRUE
  23564. for all other non-null events
  23565. (including all mouse-down events, regardless of which window is active), leaving them
  23566. for your application to handle.
  23567.  
  23568. GetNextEvent also makes the following processing happen, invisible to your program:
  23569.  
  23570.   •  If the “alarm” is set and the current time is the alarm time, the alarm
  23571.      goes off (a beep followed by blinking the apple symbol in the menu bar).
  23572.      The user can set the alarm with the Alarm Clock desk accessory.
  23573.   •  If the user holds down the Command and Shift keys while pressing a
  23574.      numeric key that has a special effect, that effect occurs. The standard
  23575.      such keys are 1 and 2 for ejecting the disk in the internal or external
  23576.      drive, and 3 and 4 for writing a snapshot of the screen to a MacPaint
  23577.      document or to the printer.
  23578.  
  23579. Note:  Advanced programmers can implement their own code to be executed in
  23580.        response to Command-Shift-number combinations (except for Command-
  23581.        Shift-1 and 2, which can’t be changed). The code corresponding to a
  23582.        particular number must be a routine having no parameters, stored in
  23583.        a resource whose type is 'FKEY' and whose ID is the number. The
  23584.        system resource file contains code for the numbers 3 and 4.
  23585.  
  23586. Assembly-language note:  You can disable GetNextEvent’s processing of Command-
  23587.                          Shift-number combinations by setting the global
  23588.                          variable ScrDmpEnb (a byte) to 0.
  23589.  
  23590. æKY WaitNextEvent
  23591. æFp Events.p
  23592. æT FUNCTION
  23593. æTN A860
  23594. æD FUNCTION WaitNextEvent(eventMask: INTEGER;VAR theEvent: EventRecord;sleep: LONGINT;
  23595.     mouseRgn: RgnHandle): BOOLEAN;
  23596.     INLINE $A860;
  23597. æDT myVariable := WaitNextEvent(eventMask,theEvent,sleep,mouseRgn);
  23598. æRT 158, 177, 180, 194, 205
  23599. æRI N158-1
  23600. æC 
  23601.  
  23602. æKY EventAvail
  23603. æFp Events.p
  23604. æT FUNCTION
  23605. æTN A971
  23606. æD FUNCTION EventAvail(eventMask: INTEGER;VAR theEvent: EventRecord): BOOLEAN;
  23607.     INLINE $A971;
  23608. æDT myVariable := EventAvail(eventMask,theEvent);
  23609. æMM
  23610. æRT 194
  23611. æRI I-259
  23612. æC 
  23613. EventAvail works exactly the same as GetNextEvent except that if the event is in the
  23614. event queue, it’s left there.
  23615.  
  23616. Note:  An event returned by EventAvail will not be accessible later if in
  23617.        the meantime the queue becomes full and the event is discarded from
  23618.        it; since the events discarded are always the oldest ones in the queue,
  23619.        however, this will happen only in an unusually busy environment.
  23620.  
  23621. æKY GetMouse
  23622. æFp Events.p
  23623. æT PROCEDURE
  23624. æTN A972
  23625. æD PROCEDURE GetMouse(VAR mouseLoc: Point);
  23626.     INLINE $A972;
  23627. æDT GetMouse(mouseLoc);
  23628. æMM
  23629. æRI I-259
  23630. æC  
  23631. GetMouse returns the current mouse location in the mouseLoc parameter. The location
  23632. is given in the local coordinate system of the current grafPort (which might be, for
  23633. example, the currently active window). Notice that this differs from the mouse location
  23634. stored in the where field of an event record; that location is always in global
  23635. coordinates.
  23636.  
  23637. æKY Button
  23638. æFp Events.p
  23639. æT FUNCTION
  23640. æTN A974
  23641. æD FUNCTION Button: BOOLEAN;
  23642.     INLINE $A974;
  23643. æDT myVariable := Button;
  23644. æMM
  23645. æRI I-259
  23646. æC 
  23647. The Button function returns TRUE if the mouse button is currently down, and FALSE if
  23648. it isn’t.
  23649.  
  23650. æKY StillDown
  23651. æFp Events.p
  23652. æT FUNCTION
  23653. æTN A973
  23654. æD FUNCTION StillDown: BOOLEAN;
  23655.     INLINE $A973;
  23656. æDT myVariable := StillDown;
  23657. æMM
  23658. æRT 194
  23659. æRI I-259
  23660. æC 
  23661. Usually called after a mouse-down event, StillDown tests whether the mouse button is
  23662. still down. It returns TRUE if the button is currently down and there are no more
  23663. mouse events pending in the event queue. This is a true test of whether the button is
  23664. still down from the original press—unlike Button (above), which returns TRUE whenever
  23665. the button is currently down, even if it has been released and pressed again since
  23666. the original mouse-down event.
  23667.  
  23668. æKY WaitMouseUp
  23669. æFp Events.p
  23670. æT FUNCTION
  23671. æTN A977
  23672. æD FUNCTION WaitMouseUp: BOOLEAN;
  23673.     INLINE $A977;
  23674. æDT myVariable := WaitMouseUp;
  23675. æMM
  23676. æRT 194
  23677. æRI I-259
  23678. æC 
  23679. WaitMouseUp works exactly the same as StillDown (above), except that if the button is
  23680. not still down from the original press, WaitMouseUp removes the preceding mouse-up
  23681. event before returning FALSE. If, for instance, your application attaches some special
  23682. significance both to mouse double-clicks and to mouse-up events, this function would
  23683. allow your application to recognize a double-click without being confused by the
  23684. intervening mouse-up.
  23685.  
  23686. æKY GetKeys
  23687. æFp Events.p
  23688. æT PROCEDURE
  23689. æTN A976
  23690. æD PROCEDURE GetKeys(VAR theKeys: KeyMap);
  23691.     INLINE $A976;
  23692. æDT GetKeys(theKeys);
  23693. æMM
  23694. æRI I-259
  23695. æC 
  23696. GetKeys reads the current state of the keyboard (and keypad, if any) and returns it
  23697. in the form of a keyMap:
  23698.  
  23699. TYPE KeyMap = PACKED ARRAY[0..127] OF BOOLEAN;
  23700.  
  23701. Each key on the keyboard or keypad corresponds to an element in the keyMap. The index
  23702. into the keyMap for a particular key is the same as the key code for that key. (The
  23703. key codes are shown in Figure 3 above.) The keyMap element is TRUE if the corresponding
  23704. key is down and FALSE if it isn’t. The maximum number of keys that can be down simultaneously
  23705. is two character keys plus any combination of the four modifier keys.
  23706.  
  23707. æKY TickCount
  23708. æFp Events.p
  23709. æT FUNCTION
  23710. æTN A975
  23711. æD FUNCTION TickCount: LONGINT;
  23712.     INLINE $A975;
  23713. æDT myVariable := TickCount;
  23714. æMM
  23715. æRI I-260
  23716. æC 
  23717. TickCount returns the current number of ticks (sixtieths of a second) since the
  23718. system last started up.
  23719.  
  23720. Warning:  Don’t rely on the tick count being exact; it will usually be
  23721.           accurate to within one tick, but may be off by more than that. The
  23722.           tick count is incremented during the vertical retrace interrupt,
  23723.           but it’s possible for this interrupt to be disabled. Furthermore,
  23724.           don’t rely on the tick count being incremented to a certain value,
  23725.           such as testing whether it has become equal to its old value plus 1;
  23726.           check instead for “greater than or equal to” (since an interrupt
  23727.           task may keep control for more than one tick).
  23728.  
  23729. Assembly-language note:  The value returned by this function is also contained
  23730.                          in the global variable Ticks.
  23731.  
  23732. æKY GetDblTime
  23733. æFp Events.p
  23734. æT FUNCTION
  23735. æD FUNCTION GetDblTime: LONGINT;
  23736.     INLINE $2EB8,$02F0;
  23737. æDT myVariable := GetDblTime;
  23738. æRI I-260
  23739. æC 
  23740. [Not in ROM]
  23741.  
  23742. GetDblTime returns the suggested maximum difference (in ticks) that should exist
  23743. between the times of a mouse-up event and a mouse-down event for those two mouse
  23744. clicks to be considered a double-click. The user can adjust this value by means of
  23745. the Control Panel desk accessory.
  23746.  
  23747. Assembly-language note:  This value is available to assembly-language
  23748.                          programmers in the global variable DoubleTime.
  23749.  
  23750. æKY GetCaretTime
  23751. æFp Events.p
  23752. æT FUNCTION
  23753. æD FUNCTION GetCaretTime: LONGINT;
  23754.     INLINE $2EB8,$02F4;
  23755. æDT myVariable := GetCaretTime;
  23756. æRI I-260
  23757. æC 
  23758. [Not in ROM]
  23759.  
  23760. GetCaretTime returns the time (in ticks) between blinks of the “caret” (usually a
  23761. vertical bar) marking the insertion point in editable text. If you aren’t using
  23762. TextEdit, you’ll need to cause the caret to blink yourself; on every pass through
  23763. your program’s main event loop, you should check this value against the elapsed time
  23764. since the last blink of the caret. The user can adjust this value by means of the
  23765. Control Panel desk accessory.
  23766.  
  23767. Assembly-language note:  This value is available to assembly-language
  23768.                          programmers in the global variable CaretTime.
  23769.  
  23770.  
  23771. æKY Files.p
  23772. æKL AddDrive
  23773. Allocate
  23774. AllocContig
  23775. CatMove
  23776. CloseWD
  23777. Create
  23778. DirCreate
  23779. Eject
  23780. FInitQueue
  23781. FlushVol
  23782. FSClose
  23783. FSDelete
  23784. FSMakeFSSpec
  23785. FSOpen
  23786. FSpCatMove
  23787. FSpCreate
  23788. FSpDelete
  23789. FSpDirCreate
  23790. FSpExchangeFiles
  23791. FSpGetFInfo
  23792. FSpOpenDF
  23793. FSpOpenRF
  23794. FSpRename
  23795. FSpRstFLock
  23796. FSpSetFInfo
  23797. FSpSetFLock
  23798. FSRead
  23799. FSWrite
  23800. GetDrvQHdr
  23801. GetEOF
  23802. GetFInfo
  23803. GetFPos
  23804. GetFSQHdr
  23805. GetVCBQHdr
  23806. GetVInfo
  23807. GetVol
  23808. GetVRefNum
  23809. GetWDInfo
  23810. HCreate
  23811. HDelete
  23812. HGetFInfo
  23813. HGetVol
  23814. HOpen
  23815. HOpenDF
  23816. HOpenRF
  23817. HRename
  23818. HRstFLock
  23819. HSetFInfo
  23820. HSetFLock
  23821. HSetVol
  23822. OpenDF
  23823. OpenRF
  23824. OpenWD
  23825. PBAllocate
  23826. PBAllocateAsync
  23827. PBAllocateSync
  23828. PBAllocContig
  23829. PBAllocContigAsync
  23830. PBAllocContigSync
  23831. PBCatMove
  23832. PBCatMoveAsync
  23833. PBCatMoveSync
  23834. PBCatSearch
  23835. PBCatSearchAsync
  23836. PBCatSearchSync
  23837. PBClose
  23838. PBCloseAsync
  23839. PBCloseSync
  23840. PBCloseWD
  23841. PBCloseWDAsync
  23842. PBCloseWDSync
  23843. PBCreate
  23844. PBCreateAsync
  23845. PBCreateFileIDRef
  23846. PBCreateFileIDRefAsync
  23847. PBCreateFileIDRefSync
  23848. PBCreateSync
  23849. PBDelete
  23850. PBDeleteAsync
  23851. PBDeleteFileIDRef
  23852. PBDeleteFileIDRefAsync
  23853. PBDeleteFileIDRefSync
  23854. PBDeleteSync
  23855. PBDirCreate
  23856. PBDirCreateAsync
  23857. PBDirCreateSync
  23858. PBDTAddAPPL
  23859. PBDTAddAPPLAsync
  23860. PBDTAddAPPLSync
  23861. PBDTAddIcon
  23862. PBDTAddIconAsync
  23863. PBDTAddIconSync
  23864. PBDTCloseDown
  23865. PBDTDelete
  23866. PBDTDeleteAsync
  23867. PBDTDeleteSync
  23868. PBDTFlush
  23869. PBDTFlushAsync
  23870. PBDTFlushSync
  23871. PBDTGetAPPL
  23872. PBDTGetAPPLAsync
  23873. PBDTGetAPPLSync
  23874. PBDTGetComment
  23875. PBDTGetCommentAsync
  23876. PBDTGetCommentSync
  23877. PBDTGetIcon
  23878. PBDTGetIconAsync
  23879. PBDTGetIconInfo
  23880. PBDTGetIconInfoAsync
  23881. PBDTGetIconInfoSync
  23882. PBDTGetIconSync
  23883. PBDTGetInfo
  23884. PBDTGetInfoAsync
  23885. PBDTGetInfoSync
  23886. PBDTGetPath
  23887. PBDTOpenInform
  23888. PBDTRemoveAPPL
  23889. PBDTRemoveAPPLAsync
  23890. PBDTRemoveAPPLSync
  23891. PBDTRemoveComment
  23892. PBDTRemoveCommentAsync
  23893. PBDTRemoveCommentSync
  23894. PBDTReset
  23895. PBDTResetAsync
  23896. PBDTResetSync
  23897. PBDTSetComment
  23898. PBDTSetCommentAsync
  23899. PBDTSetCommentSync
  23900. PBEject
  23901. PBExchangeFiles
  23902. PBExchangeFilesAsync
  23903. PBExchangeFilesSync
  23904. PBFlushFile
  23905. PBFlushFileAsync
  23906. PBFlushFileSync
  23907. PBFlushVol
  23908. PBFlushVolAsync
  23909. PBFlushVolSync
  23910. PBGetCatInfo
  23911. PBGetCatInfoAsync
  23912. PBGetCatInfoSync
  23913. PBGetEOF
  23914. PBGetEOFAsync
  23915. PBGetEOFSync
  23916. PBGetFCBInfo
  23917. PBGetFCBInfoAsync
  23918. PBGetFCBInfoSync
  23919. PBGetFInfo
  23920. PBGetFInfoAsync
  23921. PBGetFInfoSync
  23922. PBGetForeignPrivs
  23923. PBGetForeignPrivsAsync
  23924. PBGetForeignPrivsSync
  23925. PBGetFPos
  23926. PBGetFPosAsync
  23927. PBGetFPosSync
  23928. PBGetVInfo
  23929. PBGetVInfoAsync
  23930. PBGetVInfoSync
  23931. PBGetVol
  23932. PBGetVolAsync
  23933. PBGetVolMountInfo
  23934. PBGetVolMountInfoSize
  23935. PBGetVolSync
  23936. PBGetWDInfo
  23937. PBGetWDInfoAsync
  23938. PBGetWDInfoSync
  23939. PBHCopyFile
  23940. PBHCopyFileAsync
  23941. PBHCopyFileSync
  23942. PBHCreate
  23943. PBHCreateAsync
  23944. PBHCreateSync
  23945. PBHDelete
  23946. PBHDeleteAsync
  23947. PBHDeleteSync
  23948. PBHGetDirAccess
  23949. PBHGetDirAccessAsync
  23950. PBHGetDirAccessSync
  23951. PBHGetFInfo
  23952. PBHGetFInfoAsync
  23953. PBHGetFInfoSync
  23954. PBHGetLogInInfo
  23955. PBHGetLogInInfoAsync
  23956. PBHGetLogInInfoSync
  23957. PBHGetVInfo
  23958. PBHGetVInfoAsync
  23959. PBHGetVInfoSync
  23960. PBHGetVol
  23961. PBHGetVolAsync
  23962. PBHGetVolParms
  23963. PBHGetVolParmsAsync
  23964. PBHGetVolParmsSync
  23965. PBHGetVolSync
  23966. PBHMapID
  23967. PBHMapIDAsync
  23968. PBHMapIDSync
  23969. PBHMapName
  23970. PBHMapNameAsync
  23971. PBHMapNameSync
  23972. PBHMoveRename
  23973. PBHMoveRenameAsync
  23974. PBHMoveRenameSync
  23975. PBHOpen
  23976. PBHOpenAsync
  23977. PBHOpenDeny
  23978. PBHOpenDenyAsync
  23979. PBHOpenDenySync
  23980. PBHOpenDF
  23981. PBHOpenDFAsync
  23982. PBHOpenDFSync
  23983. PBHOpenRF
  23984. PBHOpenRFAsync
  23985. PBHOpenRFDeny
  23986. PBHOpenRFDenyAsync
  23987. PBHOpenRFDenySync
  23988. PBHOpenRFSync
  23989. PBHOpenSync
  23990. PBHRename
  23991. PBHRenameAsync
  23992. PBHRenameSync
  23993. PBHRstFLock
  23994. PBHRstFLockAsync
  23995. PBHRstFLockSync
  23996. PBHSetDirAccess
  23997. PBHSetDirAccessAsync
  23998. PBHSetDirAccessSync
  23999. PBHSetFInfo
  24000. PBHSetFInfoAsync
  24001. PBHSetFInfoSync
  24002. PBHSetFLock
  24003. PBHSetFLockAsync
  24004. PBHSetFLockSync
  24005. PBHSetVol
  24006. PBHSetVolAsync
  24007. PBHSetVolSync
  24008. PBLockRange
  24009. PBLockRangeAsync
  24010. PBLockRangeSync
  24011. PBMakeFSSpec
  24012. PBMakeFSSpecAsync
  24013. PBMakeFSSpecSync
  24014. PBMountVol
  24015. PBOffLine
  24016. PBOpen
  24017. PBOpenAsync
  24018. PBOpenDF
  24019. PBOpenDFAsync
  24020. PBOpenDFSync
  24021. PBOpenRF
  24022. PBOpenRFAsync
  24023. PBOpenRFSync
  24024. PBOpenSync
  24025. PBOpenWD
  24026. PBOpenWDAsync
  24027. PBOpenWDSync
  24028. PBRead
  24029. PBReadAsync
  24030. PBReadSync
  24031. PBRename
  24032. PBRenameAsync
  24033. PBRenameSync
  24034. PBResolveFileIDRef
  24035. PBResolveFileIDRefAsync
  24036. PBResolveFileIDRefSync
  24037. PBRstFLock
  24038. PBRstFLockAsync
  24039. PBRstFLockSync
  24040. PBSetCatInfo
  24041. PBSetCatInfoAsync
  24042. PBSetCatInfoSync
  24043. PBSetEOF
  24044. PBSetEOFAsync
  24045. PBSetEOFSync
  24046. PBSetFInfo
  24047. PBSetFInfoAsync
  24048. PBSetFInfoSync
  24049. PBSetFLock
  24050. PBSetFLockAsync
  24051. PBSetFLockSync
  24052. PBSetForeignPrivs
  24053. PBSetForeignPrivsAsync
  24054. PBSetForeignPrivsSync
  24055. PBSetFPos
  24056. PBSetFPosAsync
  24057. PBSetFPosSync
  24058. PBSetFVers
  24059. PBSetFVersAsync
  24060. PBSetFVersSync
  24061. PBSetVInfo
  24062. PBSetVInfoAsync
  24063. PBSetVInfoSync
  24064. PBSetVol
  24065. PBSetVolAsync
  24066. PBSetVolSync
  24067. PBUnlockRange
  24068. PBUnlockRangeAsync
  24069. PBUnlockRangeSync
  24070. PBUnmountVol
  24071. PBVolumeMount
  24072. PBWrite
  24073. PBWriteAsync
  24074. PBWriteSync
  24075. Rename
  24076. RstFLock
  24077. SetEOF
  24078. SetFInfo
  24079. SetFLock
  24080. SetFPos
  24081. SetVol
  24082. UnmountVol
  24083.  
  24084. AFPVolMountInfo
  24085. AFPVolMountInfoPtr
  24086. alphaStage
  24087. AppleShareMediaType
  24088. bAccessCntl
  24089. betaStage
  24090. bHasBlankAccessPrivileges
  24091. bHasBTreeMgr
  24092. bHasCatSearch
  24093. bHasCopyFile
  24094. bHasDesktopMgr
  24095. bHasExtFSVol
  24096. bHasFileIDs
  24097. bHasFolderLock
  24098. bHasMoveRename
  24099. bHasOpenDeny
  24100. bHasPersonalAccessPrivileges
  24101. bHasShortName
  24102. bHasUserGroupList
  24103. bLimitFCBs
  24104. bLocalWList
  24105. bNoBootBlks
  24106. bNoDeskItems
  24107. bNoLclSync
  24108. bNoMiniFndr
  24109. bNoSwitchTo
  24110. bNoSysDir
  24111. bNoVNEdit
  24112. bTrshOffLine
  24113. CatPositionRec
  24114. CInfoPBPtr
  24115. CInfoPBRec
  24116. CInfoType
  24117. CMovePBPtr
  24118. CMovePBRec
  24119. developStage
  24120. DInfo
  24121. dirInfo
  24122. DTPBPtr
  24123. DTPBRec
  24124. DXInfo
  24125. FCBPBPtr
  24126. FCBPBRec
  24127. fDesktop
  24128. fDisk
  24129. fHasBundle
  24130. finalStage
  24131. fInvisible
  24132. fOnDesk
  24133. fsAtMark
  24134. fsCurPerm
  24135. fsFromLEOF
  24136. fsFromMark
  24137. fsFromStart
  24138. fsRdPerm
  24139. fsRdWrPerm
  24140. fsRdWrShPerm
  24141. fsRtDirID
  24142. fsRtParID
  24143. fsSBDrBkDat
  24144. fsSBDrCrDat
  24145. fsSBDrFndrInfo
  24146. fsSBDrMdDat
  24147. fsSBDrNmFls
  24148. fsSBDrParID
  24149. fsSBDrUsrWds
  24150. fsSBFlAttrib
  24151. fsSBFlBkDat
  24152. fsSBFlCrDat
  24153. fsSBFlFndrInfo
  24154. fsSBFlLgLen
  24155. fsSBFlMdDat
  24156. fsSBFlParID
  24157. fsSBFlPyLen
  24158. fsSBFlRLgLen
  24159. fsSBFlRPyLen
  24160. fsSBFlXFndrInfo
  24161. fsSBFullName
  24162. fsSBNegate
  24163. fsSBPartialName
  24164. FSSpec
  24165. FSSpecArray
  24166. FSSpecArrayHandle
  24167. FSSpecArrayPtr
  24168. FSSpecHandle
  24169. FSSpecPtr
  24170. fsUnixPriv
  24171. fsWrPerm
  24172. fTrash
  24173. FXInfo
  24174. GetVolParmsInfoBuffer
  24175. hFileInfo
  24176. HParamBlockRec
  24177. HParmBlkPtr
  24178. ioDirFlg
  24179. ioDirMask
  24180. kEncryptPassword
  24181. kLarge4BitIcon
  24182. kLarge4BitIconSize
  24183. kLarge8BitIcon
  24184. kLarge8BitIconSize
  24185. kLargeIcon
  24186. kLargeIconSize
  24187. kNoUserAuthentication
  24188. kPassword
  24189. kSmall4BitIcon
  24190. kSmall4BitIconSize
  24191. kSmall8BitIcon
  24192. kSmall8BitIconSize
  24193. kSmallIcon
  24194. kSmallIconSize
  24195. kTwoWayEncryptPassword
  24196. NumVersion
  24197. rdVerify
  24198. VersRec
  24199. VersRecHndl
  24200. VersRecPtr
  24201. VolMountInfoHeader
  24202. VolMountInfoPtr
  24203. VolumeType
  24204. WDPBPtr
  24205. WDPBRec
  24206.  
  24207. æKY fsAtMark
  24208. æFp Files.p
  24209. æT CONST
  24210. æD fsAtMark = 0;
  24211. æC If you specify fsAtMark, ioPosOffset is ignored and the operation begins wherever the
  24212. mark is currently positioned. If you choose to set the mark
  24213. (relative to either the beginning of the file, the logical end-of-file, or the current
  24214. mark), ioPosOffset must specify the byte offset from the chosen point
  24215. (either positive or negative) where the operation should begin.
  24216.  
  24217. Note:  Advanced programmers:  Bit 7 of ioPosMode is the newline flag; it’s
  24218.        set if read operations should terminate at a newline character. The
  24219.        ASCII code of the newline character is specified in the high-order
  24220.        byte of ioPosMode. If the newline flag is set, the data will be read
  24221.        one byte at a time until the newline character is encountered,
  24222.        ioReqCount bytes have been read, or the end-of-file is reached. If
  24223.        the newline flag is clear, the data will be read one byte at a time
  24224.        until ioReqCount bytes have been read or the end-of-file is reached.
  24225.  
  24226. æKY fOnDesk
  24227. æFp Files.p
  24228. æT CONST
  24229. æD fOnDesk = 1;
  24230. æC 
  24231.  
  24232. æKY fsCurPerm
  24233. æFp Files.p
  24234. æT CONST
  24235. æD fsCurPerm = 0;
  24236. æC 
  24237. This request is compared with the open permission of the file. If the open permission
  24238. doesn’t allow I/O as requested, a result code indicating the error is returned.
  24239.  
  24240. Warning:  To ensure data integrity be sure to lock the portion of the
  24241.           file you’ll be using if you specify shared write permission.
  24242.  
  24243. æKY fHasBundle
  24244. æFp Files.p
  24245. æT CONST
  24246. æD fHasBundle = 8192;
  24247. æC 
  24248.  
  24249. æKY fsRdPerm
  24250. æFp Files.p
  24251. æT CONST
  24252. æD fsRdPerm = 1;
  24253. æC 
  24254.  
  24255. æKY fInvisible
  24256. æFp Files.p
  24257. æT CONST
  24258. æD fInvisible = 16384;
  24259. æC 
  24260.  
  24261. æKY fTrash
  24262. æFp Files.p
  24263. æT CONST
  24264. æD fTrash = -3;
  24265. æC 
  24266.  
  24267. æKY fsWrPerm
  24268. æFp Files.p
  24269. æT CONST
  24270. æD fsWrPerm = 2;
  24271. æC 
  24272.  
  24273. æKY fDesktop
  24274. æFp Files.p
  24275. æT CONST
  24276. æD fDesktop = -2;
  24277. æC 
  24278.  
  24279. æKY fsRdWrPerm
  24280. æFp Files.p
  24281. æT CONST
  24282. æD fsRdWrPerm = 3;
  24283. æC 
  24284.  
  24285. æKY fDisk
  24286. æFp Files.p
  24287. æT CONST
  24288. æD fDisk = 0;
  24289. æC 
  24290.  
  24291. æKY fsRdWrShPerm
  24292. æFp Files.p
  24293. æT CONST
  24294. æD fsRdWrShPerm = 4;
  24295. æC 
  24296.  
  24297. æKY fsFromStart
  24298. æFp Files.p
  24299. æT CONST
  24300. æD fsFromStart = 1;
  24301. æC 
  24302.  
  24303. æKY fsFromLEOF
  24304. æFp Files.p
  24305. æT CONST
  24306. æD fsFromLEOF = 2;
  24307. æC 
  24308.  
  24309. æKY fsFromMark
  24310. æFp Files.p
  24311. æT CONST
  24312. æD fsFromMark = 3;
  24313. æC 
  24314.  
  24315. æKY rdVerify
  24316. æFp Files.p
  24317. æT CONST
  24318. æD rdVerify = 64;
  24319. æC 
  24320. To have the File Manager verify that all data written to a volume exactly matches the
  24321. data in memory, make a Read call right after the Write call. The parameters for a
  24322. read-verify operation are the same as for a standard Read call, except that the
  24323. following constant must be added to the positioning mode:
  24324.  
  24325. CONST  rdVerify = 64;    {read-verify mode}
  24326.  
  24327. The result code ioErr is returned if any of the data doesn’t match.
  24328.  
  24329. æKY ioDirFlg
  24330. æFp Files.p
  24331. æT CONST
  24332. æD ioDirFlg = 3; {see IM IV-125}
  24333. æC 
  24334.  
  24335. æKY ioDirMask
  24336. æFp Files.p
  24337. æT CONST
  24338. æD ioDirMask = $10;
  24339. æC 
  24340.  
  24341. æKY fsRtParID
  24342. æFp Files.p
  24343. æT CONST
  24344. æD fsRtParID = 1;
  24345. æC 
  24346.  
  24347. æKY fsRtDirID
  24348. æFp Files.p
  24349. æT CONST
  24350. æD fsRtDirID = 2;
  24351. æC 
  24352.  
  24353. æKY fsSBPartialName
  24354. æFp Files.p
  24355. æT CONST
  24356. æD fsSBPartialName = 1;
  24357. æC 
  24358.  
  24359. æKY fsSBFullName
  24360. æFp Files.p
  24361. æT CONST
  24362. æD fsSBFullName = 2;
  24363. æC 
  24364.  
  24365. æKY fsSBFlAttrib
  24366. æFp Files.p
  24367. æT CONST
  24368. æD fsSBFlAttrib = 4;
  24369. æC 
  24370.  
  24371. æKY fsSBFlFndrInfo
  24372. æFp Files.p
  24373. æT CONST
  24374. æD fsSBFlFndrInfo = 8;
  24375. æC 
  24376.  
  24377. æKY fsSBFlLgLen
  24378. æFp Files.p
  24379. æT CONST
  24380. æD fsSBFlLgLen = 32;
  24381. æC 
  24382.  
  24383. æKY fsSBFlPyLen
  24384. æFp Files.p
  24385. æT CONST
  24386. æD fsSBFlPyLen = 64;
  24387. æC 
  24388.  
  24389. æKY fsSBFlRLgLen
  24390. æFp Files.p
  24391. æT CONST
  24392. æD fsSBFlRLgLen = 128;
  24393. æC 
  24394.  
  24395. æKY fsSBFlRPyLen
  24396. æFp Files.p
  24397. æT CONST
  24398. æD fsSBFlRPyLen = 256;
  24399. æC 
  24400.  
  24401. æKY fsSBFlCrDat
  24402. æFp Files.p
  24403. æT CONST
  24404. æD fsSBFlCrDat = 512;
  24405. æC 
  24406.  
  24407. æKY fsSBFlMdDat
  24408. æFp Files.p
  24409. æT CONST
  24410. æD fsSBFlMdDat = 1024;
  24411. æC 
  24412.  
  24413. æKY fsSBFlBkDat
  24414. æFp Files.p
  24415. æT CONST
  24416. æD fsSBFlBkDat = 2048;
  24417. æC 
  24418.  
  24419. æKY fsSBFlXFndrInfo
  24420. æFp Files.p
  24421. æT CONST
  24422. æD fsSBFlXFndrInfo = 4096;
  24423. æC 
  24424.  
  24425. æKY fsSBFlParID
  24426. æFp Files.p
  24427. æT CONST
  24428. æD fsSBFlParID = 8192;
  24429. æC 
  24430.  
  24431. æKY fsSBNegate
  24432. æFp Files.p
  24433. æT CONST
  24434. æD fsSBNegate = 16384;
  24435. æC 
  24436.  
  24437. æKY fsSBDrUsrWds
  24438. æFp Files.p
  24439. æT CONST
  24440. æD fsSBDrUsrWds = 8;
  24441. æC 
  24442.  
  24443. æKY fsSBDrNmFls
  24444. æFp Files.p
  24445. æT CONST
  24446. æD fsSBDrNmFls = 16;
  24447. æC 
  24448.  
  24449. æKY fsSBDrCrDat
  24450. æFp Files.p
  24451. æT CONST
  24452. æD fsSBDrCrDat = 512;
  24453. æC 
  24454.  
  24455. æKY fsSBDrMdDat
  24456. æFp Files.p
  24457. æT CONST
  24458. æD fsSBDrMdDat = 1024;
  24459. æC 
  24460.  
  24461. æKY fsSBDrBkDat
  24462. æFp Files.p
  24463. æT CONST
  24464. æD fsSBDrBkDat = 2048;
  24465. æC 
  24466.  
  24467. æKY fsSBDrFndrInfo
  24468. æFp Files.p
  24469. æT CONST
  24470. æD fsSBDrFndrInfo = 4096;
  24471. æC 
  24472.  
  24473. æKY fsSBDrParID
  24474. æFp Files.p
  24475. æT CONST
  24476. æD fsSBDrParID = 8192;
  24477. æC 
  24478.  
  24479. æKY bLimitFCBs
  24480. æFp Files.p
  24481. æT CONST
  24482. æD bLimitFCBs = 31;
  24483. æC 
  24484.  
  24485. æKY bLocalWList
  24486. æFp Files.p
  24487. æT CONST
  24488. æD bLocalWList = 30;
  24489. æC 
  24490.  
  24491. æKY bNoMiniFndr
  24492. æFp Files.p
  24493. æT CONST
  24494. æD bNoMiniFndr = 29;
  24495. æC 
  24496.  
  24497. æKY bNoVNEdit
  24498. æFp Files.p
  24499. æT CONST
  24500. æD bNoVNEdit = 28;
  24501. æC 
  24502.  
  24503. æKY bNoLclSync
  24504. æFp Files.p
  24505. æT CONST
  24506. æD bNoLclSync = 27;
  24507. æC 
  24508.  
  24509. æKY bTrshOffLine
  24510. æFp Files.p
  24511. æT CONST
  24512. æD bTrshOffLine = 26;
  24513. æC 
  24514.  
  24515. æKY bNoSwitchTo
  24516. æFp Files.p
  24517. æT CONST
  24518. æD bNoSwitchTo = 25;
  24519. æC 
  24520.  
  24521. æKY bNoDeskItems
  24522. æFp Files.p
  24523. æT CONST
  24524. æD bNoDeskItems = 20;
  24525. æC 
  24526.  
  24527. æKY bNoBootBlks
  24528. æFp Files.p
  24529. æT CONST
  24530. æD bNoBootBlks = 19;
  24531. æC 
  24532.  
  24533. æKY bAccessCntl
  24534. æFp Files.p
  24535. æT CONST
  24536. æD bAccessCntl = 18;
  24537. æC 
  24538.  
  24539. æKY bNoSysDir
  24540. æFp Files.p
  24541. æT CONST
  24542. æD bNoSysDir = 17;
  24543. æC 
  24544.  
  24545. æKY bHasExtFSVol
  24546. æFp Files.p
  24547. æT CONST
  24548. æD bHasExtFSVol = 16;
  24549. æC 
  24550.  
  24551. æKY bHasOpenDeny
  24552. æFp Files.p
  24553. æT CONST
  24554. æD bHasOpenDeny = 15;
  24555. æC 
  24556.  
  24557. æKY bHasCopyFile
  24558. æFp Files.p
  24559. æT CONST
  24560. æD bHasCopyFile = 14;
  24561. æC 
  24562.  
  24563. æKY bHasMoveRename
  24564. æFp Files.p
  24565. æT CONST
  24566. æD bHasMoveRename = 13;
  24567. æC 
  24568.  
  24569. æKY bHasDesktopMgr
  24570. æFp Files.p
  24571. æT CONST
  24572. æD bHasDesktopMgr = 12;
  24573. æC 
  24574.  
  24575. æKY bHasShortName
  24576. æFp Files.p
  24577. æT CONST
  24578. æD bHasShortName = 11;
  24579. æC 
  24580.  
  24581. æKY bHasFolderLock
  24582. æFp Files.p
  24583. æT CONST
  24584. æD bHasFolderLock = 10;
  24585. æC 
  24586.  
  24587. æKY bHasPersonalAccessPrivileges
  24588. æFp Files.p
  24589. æT CONST
  24590. æD bHasPersonalAccessPrivileges = 9;
  24591. æC 
  24592.  
  24593. æKY bHasUserGroupList
  24594. æFp Files.p
  24595. æT CONST
  24596. æD bHasUserGroupList = 8;
  24597. æC 
  24598.  
  24599. æKY bHasCatSearch
  24600. æFp Files.p
  24601. æT CONST
  24602. æD bHasCatSearch = 7;
  24603. æC 
  24604.  
  24605. æKY bHasFileIDs
  24606. æFp Files.p
  24607. æT CONST
  24608. æD bHasFileIDs = 6;
  24609. æC 
  24610.  
  24611. æKY bHasBTreeMgr
  24612. æFp Files.p
  24613. æT CONST
  24614. æD bHasBTreeMgr = 5;
  24615. æC 
  24616.  
  24617. æKY bHasBlankAccessPrivileges
  24618. æFp Files.p
  24619. æT CONST
  24620. æD bHasBlankAccessPrivileges = 4;
  24621. æC 
  24622.  
  24623. æKY kLargeIcon
  24624. æFp Files.p
  24625. æT CONST
  24626. æD kLargeIcon = 1;
  24627. æC 
  24628.  
  24629. æKY kLarge4BitIcon
  24630. æFp Files.p
  24631. æT CONST
  24632. æD kLarge4BitIcon = 2;
  24633. æC 
  24634.  
  24635. æKY kLarge8BitIcon
  24636. æFp Files.p
  24637. æT CONST
  24638. æD kLarge8BitIcon = 3;
  24639. æC 
  24640.  
  24641. æKY kSmallIcon
  24642. æFp Files.p
  24643. æT CONST
  24644. æD kSmallIcon = 4;
  24645. æC 
  24646.  
  24647. æKY kSmall4BitIcon
  24648. æFp Files.p
  24649. æT CONST
  24650. æD kSmall4BitIcon = 5;
  24651. æC 
  24652.  
  24653. æKY kSmall8BitIcon
  24654. æFp Files.p
  24655. æT CONST
  24656. æD kSmall8BitIcon = 6;
  24657. æC 
  24658.  
  24659. æKY kLargeIconSize
  24660. æFp Files.p
  24661. æT CONST
  24662. æD kLargeIconSize = 256;
  24663. æC 
  24664.  
  24665. æKY kLarge4BitIconSize
  24666. æFp Files.p
  24667. æT CONST
  24668. æD kLarge4BitIconSize = 512;
  24669. æC 
  24670.  
  24671. æKY kLarge8BitIconSize
  24672. æFp Files.p
  24673. æT CONST
  24674. æD kLarge8BitIconSize = 1024;
  24675. æC 
  24676.  
  24677. æKY kSmallIconSize
  24678. æFp Files.p
  24679. æT CONST
  24680. æD kSmallIconSize = 64;
  24681. æC 
  24682.  
  24683. æKY kSmall4BitIconSize
  24684. æFp Files.p
  24685. æT CONST
  24686. æD kSmall4BitIconSize = 128;
  24687. æC 
  24688.  
  24689. æKY kSmall8BitIconSize
  24690. æFp Files.p
  24691. æT CONST
  24692. æD kSmall8BitIconSize = 256;
  24693. æC 
  24694.  
  24695. æKY fsUnixPriv
  24696. æFp Files.p
  24697. æT CONST
  24698. æD fsUnixPriv = 1;
  24699. æC 
  24700.  
  24701. æKY developStage
  24702. æFp Files.p
  24703. æT CONST
  24704. æD developStage = $20;
  24705. æC 
  24706.  
  24707. æKY alphaStage
  24708. æFp Files.p
  24709. æT CONST
  24710. æD alphaStage = $40;
  24711. æC 
  24712.  
  24713. æKY betaStage
  24714. æFp Files.p
  24715. æT CONST
  24716. æD betaStage = $60;
  24717. æC 
  24718.  
  24719. æKY finalStage
  24720. æFp Files.p
  24721. æT CONST
  24722. æD finalStage = $80;
  24723. æC 
  24724.  
  24725. æKY kNoUserAuthentication
  24726. æFp Files.p
  24727. æT CONST
  24728. æD kNoUserAuthentication = 1;
  24729. æC 
  24730.  
  24731. æKY kPassword
  24732. æFp Files.p
  24733. æT CONST
  24734. æD kPassword = 2;
  24735. æC 
  24736.  
  24737. æKY kEncryptPassword
  24738. æFp Files.p
  24739. æT CONST
  24740. æD kEncryptPassword = 3;
  24741. æC 
  24742.  
  24743. æKY kTwoWayEncryptPassword
  24744. æFp Files.p
  24745. æT CONST
  24746. æD kTwoWayEncryptPassword = 6;
  24747. æC 
  24748.  
  24749. æKY CInfoType
  24750. hFileInfo
  24751. dirInfo
  24752. æFp Files.p
  24753. æT TYPE
  24754. æD CInfoType = (hFileInfo,dirInfo);
  24755. æC 
  24756.  
  24757. æKY FXInfo
  24758. æFp Files.p
  24759. æT RECORD
  24760. æD FXInfo = RECORD
  24761.     fdIconID: INTEGER; { Icon ID}
  24762.     fdUnused: ARRAY [1..3] OF INTEGER; {unused but reserved 6 bytes}
  24763.     fdScript: SignedByte; { Script flag and number }
  24764.     fdXFlags: SignedByte;
  24765.     fdComment: INTEGER; { Comment ID}
  24766.     fdPutAway: LONGINT; { Home Dir ID}
  24767.     END;
  24768. æC 
  24769. On hierarchical volumes, in addition to the FInfo record, the following information
  24770. about files is maintained for the Finder:
  24771.  
  24772. æKY DInfo
  24773. æFp Files.p
  24774. æT RECORD
  24775. æD DInfo = RECORD
  24776.     frRect: Rect; {folder rect}
  24777.     frFlags: INTEGER; {Flags}
  24778.     frLocation: Point; {folder location}
  24779.     frView: INTEGER; {folder view}
  24780.     END;
  24781. æC 
  24782. On hierarchical volumes, the following information about directories is maintained
  24783. for the Finder:
  24784.  
  24785. DInfo = RECORD
  24786.           frRect:      Rect;       {folder's rectangle}
  24787.           frFlags:     INTEGER;    {flags}
  24788.           frLocation:  Point;      {folder's location}
  24789.           frView:      INTEGER;    {folder's view}
  24790.         END;
  24791.  
  24792. DXInfo = RECORD
  24793.            frScroll:     Point;      {scroll position}
  24794.            frOpenChain:  LONGINT;    {directory ID chain of open folders}
  24795.            frUnused:     INTEGER;    {reserved}
  24796.            frComment:    INTEGER;    {comment ID}
  24797.            frPutAway:    LONGINT;    {directory ID}
  24798.          END;
  24799.  
  24800. When a file (or folder) is moved to the desktop on a hierarchical volume, it’s actually
  24801. moved to the root level of the file directory. (This permits all the desktop icons to
  24802. be enumerated by one simple scan of the root.) The fOnDesk bit of fdFlags is set.
  24803. FDPutAway (or frPutAway for directories) contains the directory ID of the folder that
  24804. originally contained the file (or folder); this allows the file (or folder) to be
  24805. returned there from the desktop.
  24806.  
  24807. æKY DXInfo
  24808. æFp Files.p
  24809. æT RECORD
  24810. æD DXInfo = RECORD
  24811.     frScroll: Point; {scroll position}
  24812.     frOpenChain: LONGINT; {DirID chain of open folders}
  24813.     frScript: SignedByte; { Script flag and number }
  24814.     frXFlags: SignedByte;
  24815.     frComment: INTEGER; {comment}
  24816.     frPutAway: LONGINT; {DirID}
  24817.     END;
  24818. æC 
  24819.  
  24820. æKY GetVolParmsInfoBuffer
  24821. æFp Files.p
  24822. æT RECORD
  24823. æD GetVolParmsInfoBuffer = RECORD
  24824.     vMVersion: INTEGER; {version number}
  24825.     vMAttrib: LONGINT; {bit vector of attributes (see vMAttrib constants)}
  24826.     vMLocalHand: Handle; {handle to private data}
  24827.     vMServerAdr: LONGINT; {AppleTalk server address or zero}
  24828.     vMVolumeGrade: LONGINT; {approx. speed rating or zero if unrated}
  24829.     vMForeignPrivID: INTEGER; {foreign privilege model supported or zero if none}
  24830.     END;
  24831. æC 
  24832.  
  24833. æKY CInfoPBRec
  24834. CInfoPBPtr
  24835. æFp Files.p
  24836. æT RECORD
  24837. æD CInfoPBPtr = ^CInfoPBRec;
  24838. CInfoPBRec = RECORD
  24839.     qLink: QElemPtr;
  24840.     qType: INTEGER;
  24841.     ioTrap: INTEGER;
  24842.     ioCmdAddr: Ptr;
  24843.     ioCompletion: ProcPtr;
  24844.     ioResult: OSErr;
  24845.     ioNamePtr: StringPtr;
  24846.     ioVRefNum: INTEGER;
  24847.     ioFRefNum: INTEGER;
  24848.     ioFVersNum: SignedByte;
  24849.     filler1: SignedByte;
  24850.     ioFDirIndex: INTEGER;
  24851.     ioFlAttrib: SignedByte;
  24852.     filler2: SignedByte;
  24853.     CASE CInfoType OF
  24854.       hFileInfo:
  24855.         (ioFlFndrInfo: FInfo;
  24856.         ioDirID: LONGINT;
  24857.         ioFlStBlk: INTEGER;
  24858.         ioFlLgLen: LONGINT;
  24859.         ioFlPyLen: LONGINT;
  24860.         ioFlRStBlk: INTEGER;
  24861.         ioFlRLgLen: LONGINT;
  24862.         ioFlRPyLen: LONGINT;
  24863.         ioFlCrDat: LONGINT;
  24864.         ioFlMdDat: LONGINT;
  24865.         ioFlBkDat: LONGINT;
  24866.         ioFlXFndrInfo: FXInfo;
  24867.         ioFlParID: LONGINT;
  24868.         ioFlClpSiz: LONGINT);
  24869.       dirInfo:
  24870.         (ioDrUsrWds: DInfo;
  24871.         ioDrDirID: LONGINT;
  24872.         ioDrNmFls: INTEGER;
  24873.         filler3: ARRAY [1..9] OF INTEGER;
  24874.         ioDrCrDat: LONGINT;
  24875.         ioDrMdDat: LONGINT;
  24876.         ioDrBkDat: LONGINT;
  24877.         ioDrFndrInfo: DXInfo;
  24878.         ioDrParID: LONGINT);
  24879.     END;
  24880. æC 
  24881. »CInfoPBRec
  24882.  
  24883. The routines GetCatInfo and SetCatInfo are used for getting and setting information
  24884. about the files and directories within a directory. With files,
  24885. you’ll use the following 19 additional fields after the standard eight fields in the
  24886. parameter block record CInfoPBRec:
  24887.  
  24888.     ioFRefNum:      INTEGER;     {path reference number}
  24889.     ioFVersNum:     SignedByte;  {version number}
  24890.     filler1:        SignedByte;  {not used}
  24891.     ioFDirIndex:    INTEGER;     {index}
  24892.     ioFlAttrib:     SignedByte;  {file attributes}
  24893.     filler2:        SignedByte;  {not used}
  24894.   hFileInfo:
  24895.    (ioFlFndrInfo:   FInfo;       {information used by the Finder}
  24896.     ioDirID:        LONGINT;     {directory ID or file number}
  24897.     ioFlStBlk:      INTEGER;     {first allocation block of data fork}
  24898.     ioFlLgLen:      LONGINT;     {logical end-of-file of data fork}
  24899.     ioFlPyLen:      LONGINT;     {physical end-of-file of data fork}
  24900.     ioFlRStBlk:     INTEGER;     {first allocation block of resource fork}
  24901.     ioFlRLgLen:     LONGINT;     {logical end-of-file of resource fork}
  24902.     ioFlRPyLen:     LONGINT;     {physical end-of-file of resource fork}
  24903.     ioFlCrDat:      LONGINT;     {date and time of creation}
  24904.     ioFlMdDat:      LONGINT;     {date and time of last modification}
  24905.     ioFlBkDat:      LONGINT;     {date and time of last backup}
  24906.     ioFlXFndrInfo:  FXInfo;      {additional information used by the Finder}
  24907.     ioFlParID:      LONGINT;     {file's parent directory ID (integer)}
  24908.     ioFlClpSiz:     LONGINT);    {file's clump size}
  24909.  
  24910. •••Refer to Technical Note #69:•••
  24911.  
  24912. IOFDirIndex can be used with the function PBGetCatInfo to index through the files and
  24913. directories in a given directory. For each iteration of the function, you can determine
  24914. whether it’s a file or a directory by testing bit 4 (the fifth least significant bit)
  24915. of ioFlAttrib. You can test for a directory by using the Toolbox Utilities BitTst
  24916. function in the following manner (remember, the Toolbox Utilities routines reverse
  24917. the standard 68000 notation):
  24918.  
  24919.   BitTst(@myCInfoRec.ioFlAttrib,3)
  24920.  
  24921. IOFlAttrib contains the following attributes:
  24922.  
  24923.   Bit    Meaning
  24924.  
  24925.    0     Set if file is locked
  24926.    2     Set if resource fork is open
  24927.    3     Set if data fork is open
  24928.    4     Set if a directory
  24929.    7     Set if file (either fork) is open
  24930.  
  24931. When passed to a routine, ioDirID contains a directory ID; it can be used to refer to
  24932. a directory or, in conjuction with a partial pathname from that directory, to other
  24933. files and directories. If both a directory ID and a working directory reference
  24934. number are provided, the directory ID is used to identify the directory on the volume
  24935. indicated by the working directory reference number. In other words, a directory ID
  24936. specified by the caller will override the working directory referred to by the working
  24937. directory reference number. If you don’t want this to happen, you can set ioDirID to
  24938. 0. (If no directory is specified through a working directory reference number, the
  24939. root directory ID will be used.)
  24940.  
  24941. Warning:  With files, ioDirID returns the file number of the file; when
  24942.           indexing with GetCatInfo, you’ll need to reset this field for
  24943.           each iteration.
  24944.  
  24945. IOFlStBlk and ioFlRStBlk contain 0 if the file’s data or resource fork is empty,
  24946. respectively; they’re used only with flat volumes. The date and time in the ioFlCrDat,
  24947. ioFlMdDat, and ioFlBkDat fields are specified in seconds since midnight, January 1,
  24948. 1904.
  24949.  
  24950. IOFlParID contains the directory ID of the file’s parent. IOFlClpSiz is the clump
  24951. size to be used when writing the file; if it’s 0, the volume’s clump size is used
  24952. when the file is opened.
  24953.  
  24954. With directories, you’ll use the following 14 additional fields after the standard
  24955. eight fields in the parameter block record CInfoPBRec:
  24956.  
  24957.     ioFRefNum:     INTEGER;     {file reference number}
  24958.     ioFVersNum     SignedByte;  {version number}
  24959.     filler1:       SignedByte;  {not used}
  24960.     ioFDirIndex:   INTEGER;     {index}
  24961.     ioFlAttrib:    SignedByte;  {file attributes}
  24962.     filler2:       SignedByte;  {not used}
  24963.   dirInfo:
  24964.    (ioDrUsrWds:    DInfo;       {information used by the Finder}
  24965.     ioDrDirID:     LONGINT;     {directory ID}
  24966.     ioDrNmFls:     INTEGER;     {number of files in directory}
  24967.     filler3:       ARRAY[1..9] OF INTEGER; {not used}
  24968.     ioDrCrDat:     LONGINT;     {date and time of creation}
  24969.     ioDrMdDat:     LONGINT;     {date and time of last modification}
  24970.     ioDrBkDat:     LONGINT;     {date and time of last backup}
  24971.     ioDrFndrInfo:  DXInfo;      {additional information used by the Finder}
  24972.     ioDrParID:     LONGINT);    {directory's parent directory ID (integer)}
  24973.  
  24974. IOFDirIndex can be used with the function PBGetCatInfo to index through the files and
  24975. directories in a given directory. For each iteration of the function, you can determine
  24976. whether it’s a file or a directory by testing bit 4 of ioFlAttrib.
  24977.  
  24978. When passed to a routine, ioDrDirID contains a directory ID; it can be used to refer
  24979. to a directory or, in conjuction with a partial pathname from that directory, to
  24980. other files and directories. If both a directory ID and a working directory reference
  24981. number are provided, the directory ID is used to identify the directory on the volume
  24982. indicated by the working directory reference number. In other words, a directory ID
  24983. specified by the caller will override the working directory referred to by the working
  24984. directory reference number. If you don’t want this to happen, you can set ioDirID to
  24985. 0. (If no directory is specified through a working directory reference number, the
  24986. root directory ID will be used.)
  24987.  
  24988. With directories, ioDrDirID returns the directory ID of the directory.
  24989.  
  24990. IODrNmFls is the number of files and directories contained in this directory
  24991. (the valence of the directory).
  24992.  
  24993. The date and time in the ioDrCrDat, ioDrMdDat, and ioDrBkDat fields are specified in
  24994. seconds since midnight, January 1, 1904.
  24995.  
  24996. IODrParID contains the directory ID of the directory’s parent.
  24997.  
  24998. æKY CatPositionRec
  24999. æFp Files.p
  25000. æT RECORD
  25001. æD CatPositionRec = RECORD
  25002.     initialize: LONGINT;
  25003.     priv: ARRAY [1..6] OF INTEGER;
  25004.     END;
  25005. æC 
  25006.  
  25007. æKY FSSpec
  25008. FSSpecPtr
  25009. FSSpecHandle
  25010. æFp Files.p
  25011. æT RECORD
  25012. æD FSSpecPtr = ^FSSpec;
  25013. FSSpecHandle = ^FSSpecPtr;
  25014. FSSpec = RECORD
  25015.     vRefNum: INTEGER;
  25016.     parID: LONGINT;
  25017.     name: Str63;
  25018.     END;
  25019. æC 
  25020.  
  25021. æKY FSSpecArray
  25022. FSSpecArrayPtr
  25023. FSSpecArrayHandle
  25024. æFp Files.p
  25025. æT RECORD
  25026. æD FSSpecArrayPtr = ^FSSpecArray;
  25027. FSSpecArrayHandle = ^FSSpecArrayPtr;
  25028.  
  25029. FSSpecArray = ARRAY [0..0] of FSSpec;
  25030. æC 
  25031.  
  25032. æKY VolumeType
  25033. æFp Files.p
  25034. æT TYPE
  25035. æD VolumeType = OSType;
  25036. æC 
  25037.  
  25038. æKY AppleShareMediaType
  25039. æFp Files.p
  25040. æT CONST
  25041. æD AppleShareMediaType = 'afpm'; { the signature for AppleShare }
  25042. æC 
  25043.  
  25044. æKY VolMountInfoHeader
  25045. VolMountInfoPtr
  25046. æFp Files.p
  25047. æT RECORD
  25048. æD VolMountInfoPtr = ^VolMountInfoHeader;
  25049. VolMountInfoHeader = RECORD
  25050.     length: INTEGER; { length of location data (including self) }
  25051.     media: VolumeType; { type of media .  Variable length data follows }
  25052.     END;
  25053. æC 
  25054.  
  25055. æKY AFPVolMountInfo
  25056. AFPVolMountInfoPtr
  25057. æFp Files.p
  25058. æT RECORD
  25059. æD AFPVolMountInfoPtr = ^AFPVolMountInfo;
  25060. AFPVolMountInfo = RECORD
  25061.     length: INTEGER; { length of location data (including self) }
  25062.     media: VolumeType; { type of media }
  25063.     flags: INTEGER; { bits for no messages, no reconnect }
  25064.     nbpInterval: SignedByte; { NBP Interval parameter (IM2, p.322) }
  25065.     nbpCount: SignedByte; { NBP Interval parameter (IM2, p.322) }
  25066.     uamType: INTEGER; { User Authentication Method }
  25067.     zoneNameOffset: INTEGER; { short positive offset from start of struct to Zone Name }
  25068.     serverNameOffset: INTEGER; { offset to pascal Server Name string }
  25069.     volNameOffset: INTEGER; { offset to pascal Volume Name string }
  25070.     userNameOffset: INTEGER; { offset to pascal User Name string }
  25071.     userPasswordOffset: INTEGER; { offset to pascal User Password string }
  25072.     volPasswordOffset: INTEGER; { offset to pascal Volume Password string }
  25073.     AFPData: PACKED ARRAY [1..144] OF CHAR; {variable length data may follow}
  25074.     END;
  25075. æC 
  25076.  
  25077. æKY DTPBRec
  25078. DTPBPtr
  25079. æFp Files.p
  25080. æT RECORD
  25081. æD DTPBPtr = ^DTPBRec;
  25082. DTPBRec = RECORD
  25083.     qLink: QElemPtr;
  25084.     qType: INTEGER;
  25085.     ioTrap: INTEGER;
  25086.     ioCmdAddr: Ptr;
  25087.     ioCompletion: ProcPtr;
  25088.     ioResult: OSErr;
  25089.     ioNamePtr: StringPtr;
  25090.     ioVRefNum: INTEGER;
  25091.     ioDTRefNum: INTEGER;
  25092.     ioIndex: INTEGER;
  25093.     ioTagInfo: LONGINT;
  25094.     ioDTBuffer: Ptr;
  25095.     ioDTReqCount: LONGINT;
  25096.     ioDTActCount: LONGINT;
  25097.     filler1: SignedByte;
  25098.     ioIconType: SignedByte;
  25099.     filler2: INTEGER;
  25100.     ioDirID: LONGINT;
  25101.     ioFileCreator: OSType;
  25102.     ioFileType: OSType;
  25103.     ioFiller3: LONGINT;
  25104.     ioDTLgLen: LONGINT;
  25105.     ioDTPyLen: LONGINT;
  25106.     ioFiller4: ARRAY [1..14] OF INTEGER;
  25107.     ioAPPLParID: LONGINT;
  25108.     END;
  25109. æC 
  25110.  
  25111. æKY HParamBlockRec
  25112. HParmBlkPtr
  25113. æFp Files.p
  25114. æT RECORD
  25115. æD HParmBlkPtr = ^HParamBlockRec;
  25116. HParamBlockRec = RECORD
  25117.     qLink: QElemPtr;
  25118.     qType: INTEGER;
  25119.     ioTrap: INTEGER;
  25120.     ioCmdAddr: Ptr;
  25121.     ioCompletion: ProcPtr;
  25122.     ioResult: OSErr;
  25123.     ioNamePtr: StringPtr;
  25124.     ioVRefNum: INTEGER;
  25125.     CASE ParamBlkType OF
  25126.       IOParam:
  25127.         (ioRefNum: INTEGER;
  25128.         ioVersNum: SignedByte;
  25129.         ioPermssn: SignedByte;
  25130.         ioMisc: Ptr;
  25131.         ioBuffer: Ptr;
  25132.         ioReqCount: LONGINT; {size of buffer area}
  25133.         ioActCount: LONGINT; {length of vol parms data}
  25134.         ioPosMode: INTEGER;
  25135.         ioPosOffset: LONGINT);
  25136.       FileParam:
  25137.         (ioFRefNum: INTEGER;
  25138.         ioFVersNum: SignedByte;
  25139.         filler1: SignedByte;
  25140.         ioFDirIndex: INTEGER;
  25141.         ioFlAttrib: SignedByte;
  25142.         ioFlVersNum: SignedByte;
  25143.         ioFlFndrInfo: FInfo;
  25144.         ioDirID: LONGINT;
  25145.         ioFlStBlk: INTEGER;
  25146.         ioFlLgLen: LONGINT;
  25147.         ioFlPyLen: LONGINT;
  25148.         ioFlRStBlk: INTEGER;
  25149.         ioFlRLgLen: LONGINT;
  25150.         ioFlRPyLen: LONGINT;
  25151.         ioFlCrDat: LONGINT;
  25152.         ioFlMdDat: LONGINT);
  25153.       VolumeParam:
  25154.         (filler2: LONGINT;
  25155.         ioVolIndex: INTEGER;
  25156.         ioVCrDate: LONGINT;
  25157.         ioVLsMod: LONGINT;
  25158.         ioVAtrb: INTEGER;
  25159.         ioVNmFls: INTEGER;
  25160.         ioVBitMap: INTEGER;
  25161.         ioAllocPtr: INTEGER;
  25162.         ioVNmAlBlks: INTEGER;
  25163.         ioVAlBlkSiz: LONGINT;
  25164.         ioVClpSiz: LONGINT;
  25165.         ioAlBlSt: INTEGER;
  25166.         ioVNxtCNID: LONGINT;
  25167.         ioVFrBlk: INTEGER;
  25168.         ioVSigWord: INTEGER;
  25169.         ioVDrvInfo: INTEGER;
  25170.         ioVDRefNum: INTEGER;
  25171.         ioVFSID: INTEGER;
  25172.         ioVBkUp: LONGINT;
  25173.         ioVSeqNum: INTEGER;
  25174.         ioVWrCnt: LONGINT;
  25175.         ioVFilCnt: LONGINT;
  25176.         ioVDirCnt: LONGINT;
  25177.         ioVFndrInfo: ARRAY [1..8] OF LONGINT);
  25178.       AccessParam:
  25179.         (filler3: INTEGER;
  25180.         ioDenyModes: INTEGER; {access rights data}
  25181.         filler4: INTEGER;
  25182.         filler5: SignedByte;
  25183.         ioACUser: SignedByte; {access rights for directory only}
  25184.         filler6: LONGINT;
  25185.         ioACOwnerID: LONGINT; {owner ID}
  25186.         ioACGroupID: LONGINT; {group ID}
  25187.         ioACAccess: LONGINT); {access rights}
  25188.       ObjParam:
  25189.         (filler7: INTEGER;
  25190.         ioObjType: INTEGER; {function code}
  25191.         ioObjNamePtr: Ptr; {ptr to returned creator/group name}
  25192.         ioObjID: LONGINT); {creator/group ID}
  25193.       CopyParam:
  25194.         (ioDstVRefNum: INTEGER; {destination vol identifier}
  25195.         filler8: INTEGER;
  25196.         ioNewName: Ptr; {ptr to destination pathname}
  25197.         ioCopyName: Ptr; {ptr to optional name}
  25198.         ioNewDirID: LONGINT); {destination directory ID}
  25199.       WDParam:
  25200.         (filler9: INTEGER;
  25201.         ioWDIndex: INTEGER;
  25202.         ioWDProcID: LONGINT;
  25203.         ioWDVRefNum: INTEGER;
  25204.         filler10: INTEGER;
  25205.         filler11: LONGINT;
  25206.         filler12: LONGINT;
  25207.         filler13: LONGINT;
  25208.         ioWDDirID: LONGINT);
  25209.       FIDParam:
  25210.         (filler14: LONGINT;
  25211.         ioDestNamePtr: StringPtr;
  25212.         filler15: LONGINT;
  25213.         ioDestDirID: LONGINT;
  25214.         filler16: LONGINT;
  25215.         filler17: LONGINT;
  25216.         ioSrcDirID: LONGINT;
  25217.         filler18:        INTEGER;
  25218.         ioFileID:        LONGINT);
  25219.       CSParam:
  25220.         (ioMatchPtr: FSSpecArrayPtr;    {match array}
  25221.         ioReqMatchCount: LONGINT;        {maximum allowable matches}
  25222.         ioActMatchCount: LONGINT;        {actual match count}
  25223.         ioSearchBits: LONGINT;             {search criteria selector}
  25224.         ioSearchInfo1: CInfoPBPtr;        {search values and range lower bounds}
  25225.         ioSearchInfo2: CInfoPBPtr;        {search values and range upper bounds}
  25226.         ioSearchTime: LONGINT;            {length of time to run the search}
  25227.         ioCatPosition: CatPositionRec;     {current position in the catalog}
  25228.         ioOptBuffer: Ptr;                {optional performance enhancement buffer}
  25229.         ioOptBufSize: LONGINT);            {length of buffer pointed to by ioOptBuffer}
  25230.       ForeignPrivParam:
  25231.           (filler21: LONGINT;
  25232.         filler22: LONGINT;
  25233.         ioForeignPrivBuffer: Ptr;
  25234.         ioForeignPrivReqCount: LONGINT;
  25235.         ioForeignPrivActCount: LONGINT;
  25236.         filler23: LONGINT;
  25237.         ioForeignPrivDirID: LONGINT;
  25238.         ioForeignPrivInfo1: LONGINT;
  25239.         ioForeignPrivInfo2: LONGINT;
  25240.         ioForeignPrivInfo3: LONGINT;
  25241.         ioForeignPrivInfo4: LONGINT);
  25242.     END;
  25243. æC 
  25244. »FileParam Variant ( ParamBlockRec and HParamBlockRec)
  25245.  
  25246. The fileParam variants of ParamBlockRec and HParamBlockRec are identical, with one
  25247. exception:  The field ioDirID in HParamBlockRec is called ioFlNum in ParamBlockRec.
  25248. The fields of the fileParam variant of HParamBlockRec are as follows:  
  25249.  
  25250. •••Refer to Technical Note #204:•••
  25251.  
  25252.   fileParam:
  25253.    (ioFRefNum:     INTEGER;     {path reference number}
  25254.     ioFVersNum:    SignedByte;  {version number}
  25255.     filler1:       SignedByte;  {not used}
  25256.     ioFDirIndex:   INTEGER;     {index}
  25257.     ioFlAttrib:    SignedByte;  {file attributes}
  25258.     ioFlVersNum:   SignedByte;  {version number}
  25259.     ioFlFndrInfo:  FInfo;       {information used by the Finder}
  25260.     ioDirID:       LONGINT;     {directory ID or file number}
  25261.     ioFlStBlk:     INTEGER;     {first allocation block of data fork}
  25262.     ioFlLgLen:     LONGINT;     {logical end-of-file of data fork}
  25263.     ioFlPyLen:     LONGINT;     {physical end-of-file of data fork}
  25264.     ioFlRStBlk:    INTEGER;     {first allocation block of resource fork}
  25265.     ioFlRLgLen:    LONGINT;     {logical end-of-file of resource fork}
  25266.     ioFlRPyLen:    LONGINT;     {physical end-of-file of resource fork}
  25267.     ioFlCrDat:     LONGINT;     {date and time of creation}
  25268.     ioFlMdDat:     LONGINT);    {date and time of last modification}
  25269.  
  25270. IOFDirIndex can be used with the PBGetFInfo and PBHGetFInfo to index through the
  25271. files in a given directory.
  25272.  
  25273. Warning:  When used with GetFileInfo, ioFDirIndex will index only the files
  25274.           in a directory. To index both files and directories, you can use
  25275.           ioFDirIndex with PBGetCatInfo.
  25276.  
  25277. IOFlAttrib contains the following file attributes:
  25278.  
  25279.   Bit    Meaning
  25280.  
  25281.    0     Set if file is locked
  25282.    2     Set if resource fork is open
  25283.    3     Set if data fork is open
  25284.    4     Set if a directory
  25285.    7     Set if file (either fork) is open
  25286.  
  25287. When passed to a routine, ioDirID contains a directory ID; it can be used to refer to
  25288. a directory or, in conjuction with a partial pathname from that directory, to other
  25289. files and directories. If both a directory ID and a working directory reference
  25290. number are provided, the directory ID is used to identify the directory on the volume
  25291. indicated by the working directory reference number. In other words, a directory ID
  25292. specified by the caller will override the working directory referred to by the working
  25293. directory reference number. If you don’t want this to happen, you can set ioDirID to
  25294. 0. (If no directory is specified through a working directory reference number, the
  25295. root directory ID will be used.)
  25296.  
  25297. When returned from a routine, ioDirID contains the file number of a file; most programmers
  25298. needn’t be concerned with file numbers, but those interested can read the section
  25299. “Data Organization on Volumes”.
  25300.  
  25301. IOFlStBlk and ioFlRStBlk contain 0 if the file’s data or resource fork is empty,
  25302. respectively; they’re used only with flat volumes. The date and time in the ioFlCrDat
  25303. and ioFlMdDat fields are specified in seconds since midnight,
  25304. January 1, 1904.
  25305.  
  25306. »VolumeParam Variant (ParamBlockRec)
  25307.  
  25308. When you call GetVolInfo, you’ll use the volumeParam variant of ParamBlockRec:
  25309.  
  25310.   volumeParam:
  25311.    (filler2:      LONGINT;    {not used}
  25312.     ioVolIndex:   INTEGER;    {index}
  25313.     ioVCrDate:    LONGINT;    {date and time of initialization}
  25314.     ioVLsBkUp:    LONGINT;    {date and time of last modification}
  25315.     ioVAtrb:      INTEGER;    {volume attributes}
  25316.     ioVNmFls:     INTEGER;    {number of files in root directory}
  25317.     ioVDirSt:     INTEGER;    {first block of directory}
  25318.     ioVBlLn:      INTEGER;    {length of directory in blocks}
  25319.     ioVNmAlBlks:  INTEGER;    {number of allocation blocks}
  25320.     ioVAlBlkSiz:  LONGINT;    {size of allocation blocks}
  25321.     ioVClpSiz:    LONGINT;    {number of bytes to allocate}
  25322.     ioAlBlSt:     INTEGER;    {first block in volume block map}
  25323.     ioVNxtFNum:   LONGINT;    {next unused file number}
  25324.     ioVFrBlk:     INTEGER);   {number of unused allocation blocks}
  25325.  
  25326. IOVolIndex can be used to index through all the mounted volumes; using an index of 1
  25327. accesses the first volume mounted, and so on. (For more information on indexing, see
  25328. the section “Indexing” above.)
  25329.  
  25330. IOVLsBkUp contains the date and time the volume information was last modified
  25331. (this is not necessarily when it was flushed). (This field is not modified when
  25332. information is written to a file.)
  25333.  
  25334. Note:  The name ioVLsBkUp is actually a misnomer; this field has always
  25335.        contained the date and time of the last modification to the volume,
  25336.        not the last backup.
  25337.  
  25338. Most programmers needn’t be concerned with the remaining parameters, but interested
  25339. programmers can read the section “Data Organization on Volumes”.
  25340.  
  25341. »VolumeParam Variant (HParamBlockRec)
  25342.  
  25343. When you call HGetVInfo and SetVolInfo, you’ll use the volumeParam variant of HParamBlockRec.
  25344. This is a superset of the volumeParam variant of ParamBlockRec; the names and functions
  25345. of certain fields have been changed, and new fields have been added:
  25346.  
  25347.   volumeParam:
  25348.    (filler2:      LONGINT;    {not used}
  25349.     ioVolIndex:   INTEGER;    {index}
  25350.     ioVCrDate:    LONGINT;    {date and time of initialization}
  25351.     ioVLsMod:     LONGINT;    {date and time of last modification}
  25352.     ioVAtrb:      INTEGER;    {volume attributes}
  25353.     ioVNmFls:     INTEGER;    {number of files in root directory}
  25354.     ioVBitMap:    INTEGER;    {first block of volume bit map}
  25355.     ioAllocPtr:   INTEGER;    {block at which next new file starts}
  25356.     ioVNmAlBlks:  INTEGER;    {number of allocation blocks}
  25357.     ioVAlBlkSiz:  LONGINT;    {size of allocation blocks}
  25358.     ioVClpSiz:    LONGINT;    {number of bytes to allocate}
  25359.     ioAlBlSt:     INTEGER;    {first block in volume block map}
  25360.     ioVNxtCNID:   LONGINT;    {next unused file number}
  25361.     ioVFrBlk:     INTEGER;    {number of unused allocation blocks}
  25362.     ioVSigWord:   INTEGER;    {volume signature}
  25363.     ioVDrvInfo:   INTEGER;    {drive number}
  25364.     ioVDRefNum:   INTEGER;    {driver reference number}
  25365.     ioVFSID:      INTEGER;    {file system handling this volume}
  25366.     ioVBkUp:      LONGINT;    {date and time of last backup}
  25367.     ioVSeqNum:    INTEGER;    {used internally}
  25368.     ioVWrCnt      LONGINT;    {volume write count}
  25369.     ioVFilCnt:    LONGINT;    {number of files on volume}
  25370.     ioVDirCnt:    LONGINT;    {number of directories on volume}
  25371.     ioVFndrInfo:  ARRAY[1..8] OF LONGINT); {information used by the Finder}
  25372.  
  25373. IOVolIndex can be used to index through all the mounted volumes; using an index of 1
  25374. accesses the first volume mounted, and so on. (For more information on indexing, see
  25375. the section “Indexing” above.)
  25376.  
  25377. IOVLsMod contains the date and time the volume information was last modified
  25378. (this is not necessarily when it was flushed). (This field is not modified when
  25379. information is written to a file.)
  25380.  
  25381. Note:  IOVLsMod replaces the field ioVLsBkUp in ParamBlockRec. The name
  25382.        ioVLsBkUp was actually a misnomer; this field has always contained
  25383.        the date and time of the last modification, not the last backup.
  25384.        Another field, ioVBkUp, contains the date and time of the last backup.
  25385.  
  25386. IOVClpSiz can be used to set the volume clump size in bytes; it’s used for files that
  25387. don’t have a clump size defined as part of their file information in the catalog. To
  25388. promote file contiguity and avoid fragmentation, space is allocated to a file not in
  25389. allocation blocks but in clumps. A clump is a group of contiguous allocation blocks.
  25390. The clump size is always a multiple of the allocation block size; it’s the minimum
  25391. number of bytes to allocate each time the Allocate function is called or the end-of-file
  25392. is reached during the Write routine.
  25393.  
  25394. IOVSigWord contains a signature word identifying the type of volume; it’s $D2D7 for
  25395. flat directory volumes and $4244 for hierarchical directory volumes. The drive number
  25396. of the drive containing the volume is returned in ioDrvInfo. For on-line volumes,
  25397. ioVDRefNum returns the reference number of the I/O driver for the drive identified by
  25398. ioDrvInfo.
  25399.  
  25400. IOVFSID is the file-system identifier. It indicates which file system is servicing
  25401. the volume; it’s 0 for File Manager volumes and nonzero for volumes handled by an
  25402. external file system.
  25403.  
  25404. IOVBkUp specifies the date and time the volume was last backed up (it’s 0 if never
  25405. backed up).
  25406.  
  25407. IOVNmFls contains the number of files in the root directory. IOVFilCnt contains the
  25408. total number of files on the volume, while ioVDirCnt contains the total number of
  25409. directories (not including the root directory).
  25410.  
  25411. Most programmers needn’t be concerned with the other parameters, but interested
  25412. programmers can read the section “Data Organization on Volumes”.
  25413.  
  25414. HParamBlockRec, described above, has been extended to support a shared environment
  25415. with the addition of AccessParam, ObjParam, CopyParam, and
  25416. WDParam, as shown below.  (The complete HParamBlockRec data type is shown in the
  25417. summary.)
  25418.  
  25419.   AccessParam:
  25420.    (filler3:       INTEGER;
  25421.     ioDenyModes:   INTEGER;      {access rights data}
  25422.     filler4:       INTEGER;
  25423.     filler5:       Signed Byte;
  25424.     ioACUser:      Signed Byte;  {access rights for directory only}
  25425.     filler6:       LONGINT;
  25426.     ioACOwnerID:   LONGINT;      {owner ID}
  25427.     ioACGroupID:   LONGINT;      {group ID}
  25428.     ioACAccess:    LONGINT);     {access rights}
  25429.  
  25430.   ObjParam:
  25431.    (filler7:       INTEGER;
  25432.     ioObjType:     INTEGER;   {function code}
  25433.     ioObjNamePtr:  Ptr;       {ptr to returned creator/group name}
  25434.     ioObjID:       LONGINT;   {creator/group ID}
  25435.     ioReqCount:    LONGINT;   {size of buffer area}
  25436.     ioActCount:    LONGINT);  {length of vol parms data}
  25437.  
  25438.   CopyParam:
  25439.    (ioDstVRefNum:  INTEGER;   {destination vol identifier}
  25440.     filler8:       INTEGER;
  25441.     ioNewName:     Ptr;       {ptr to destination pathname}
  25442.     ioCopyName:    Ptr;       {ptr to optional name}
  25443.     ioNewDirID:    LONGINT);  {destination directory ID}
  25444.  
  25445.   WDParam:
  25446.    (filler9:       INTEGER;
  25447.     ioWDIndex:     INTEGER;
  25448.     ioWDProcID:    LONGINT;
  25449.     ioWDVRefNum:   INTEGER;
  25450.     filler10:      INTEGER;
  25451.     filler11:      LONGINT;
  25452.     filler12:      LONGINT;
  25453.     filler13:      LONGINT;
  25454.     ioWDDirID:     LONGINT);
  25455.  
  25456. æKY CMovePBRec
  25457. CMovePBPtr
  25458. æFp Files.p
  25459. æT RECORD
  25460. æD CMovePBPtr = ^CMovePBRec;
  25461. CMovePBRec = RECORD
  25462.     qLink: QElemPtr;
  25463.     qType: INTEGER;
  25464.     ioTrap: INTEGER;
  25465.     ioCmdAddr: Ptr;
  25466.     ioCompletion: ProcPtr;
  25467.     ioResult: OSErr;
  25468.     ioNamePtr: StringPtr;
  25469.     ioVRefNum: INTEGER;
  25470.     filler1: LONGINT;
  25471.     ioNewName: StringPtr;
  25472.     filler2: LONGINT;
  25473.     ioNewDirID: LONGINT;
  25474.     filler3: ARRAY [1..2] OF LONGINT;
  25475.     ioDirID: LONGINT;
  25476.     END;
  25477. æC 
  25478. »CMovePBRec
  25479.  
  25480. When you call CatMove to move files or directories into a different directory, you’ll
  25481. use the following six additional fields after the standard eight fields in the parameter
  25482. block record CMovePBRec:
  25483.  
  25484.   filler1:     LONGINT;    {not used}
  25485.   ioNewName:   StringPtr;  {name of new directory}
  25486.   filler2:     LONGINT;    {not used}
  25487.   ioNewDirID:  LONGINT;    {directory ID of new directory}
  25488.   filler3:     ARRAY[1..2] OF LONGINT; {not used}
  25489.   ioDirID:     LONGINT);   {directory ID of current directory}
  25490.  
  25491. IONewName and ioNewDirID specify the name and directory ID of the directory to which
  25492. the file or directory is to be moved. IODirID (used in conjuntion with the ioVRefNum
  25493. and ioNamePtr) specifies the current directory ID of the file or directory to be
  25494. moved.
  25495.  
  25496. æKY WDPBRec
  25497. WDPBPtr
  25498. æFp Files.p
  25499. æT RECORD
  25500. æD WDPBPtr = ^WDPBRec;
  25501. WDPBRec = RECORD
  25502.     qLink: QElemPtr;
  25503.     qType: INTEGER;
  25504.     ioTrap: INTEGER;
  25505.     ioCmdAddr: Ptr;
  25506.     ioCompletion: ProcPtr;
  25507.     ioResult: OSErr;
  25508.     ioNamePtr: StringPtr;
  25509.     ioVRefNum: INTEGER;
  25510.     filler1: INTEGER;
  25511.     ioWDIndex: INTEGER;
  25512.     ioWDProcID: LONGINT;
  25513.     ioWDVRefNum: INTEGER;
  25514.     filler2: ARRAY [1..7] OF INTEGER;
  25515.     ioWDDirID: LONGINT;
  25516.     END;
  25517. æC 
  25518. »WDPBRec
  25519.  
  25520. When you call the routines that open, close, and get information about working directories,
  25521. you’ll use the following six additional fields after the standard eight fields in the
  25522. parameter block record WDPBRec:
  25523.  
  25524.   filler1:      INTEGER;    {not used}
  25525.   ioWDIndex:    INTEGER;    {index}
  25526.   ioWDProcID:   LONGINT;    {working directory user identifier}
  25527.   ioWDVRefNum:  INTEGER;    {working directory's volume reference number}
  25528.   filler2:      ARRAY[1..7] OF INTEGER;  {not used}
  25529.   ioWDDirID:    LONGINT);   {working directory's directory ID}
  25530.  
  25531. IOWDIndex can be used with the function PBGetWDInfo to index through the current
  25532. working directories.
  25533.  
  25534. IOWDProcID is an identifier that’s used to distinguish between working directories
  25535. set up by different users; you should use the application’s signature (discussed in
  25536. the Finder Interface chapter) as the ioWDProcID.
  25537.  
  25538. æKY FCBPBRec
  25539. FCBPBPtr
  25540. æFp Files.p
  25541. æT RECORD
  25542. æD FCBPBPtr = ^FCBPBRec;
  25543. FCBPBRec = RECORD
  25544.     qLink: QElemPtr;
  25545.     qType: INTEGER;
  25546.     ioTrap: INTEGER;
  25547.     ioCmdAddr: Ptr;
  25548.     ioCompletion: ProcPtr;
  25549.     ioResult: OSErr;
  25550.     ioNamePtr: StringPtr;
  25551.     ioVRefNum: INTEGER;
  25552.     ioRefNum: INTEGER;
  25553.     filler: INTEGER;
  25554.     ioFCBIndx: INTEGER;
  25555.     filler1: INTEGER;
  25556.     ioFCBFlNm: LONGINT;
  25557.     ioFCBFlags: INTEGER;
  25558.     ioFCBStBlk: INTEGER;
  25559.     ioFCBEOF: LONGINT;
  25560.     ioFCBPLen: LONGINT;
  25561.     ioFCBCrPs: LONGINT;
  25562.     ioFCBVRefNum: INTEGER;
  25563.     ioFCBClpSiz: LONGINT;
  25564.     ioFCBParID: LONGINT;
  25565.     END;
  25566. æC 
  25567.  
  25568. æKY NumVersion
  25569. æFp Files.p
  25570. æT RECORD
  25571. æD NumVersion = PACKED RECORD
  25572.     CASE INTEGER OF
  25573.       0:
  25574.         (majorRev: SignedByte; {1st part of version number in BCD}
  25575.         minorRev: 0..9; {2nd part is 1 nibble in BCD}
  25576.         bugFixRev: 0..9; {3rd part is 1 nibble in BCD}
  25577.         stage: SignedByte; {stage code: dev, alpha, beta, final}
  25578.         nonRelRev: SignedByte); {revision level of non-released version}
  25579.       1:
  25580.         (version: LONGINT); {to use all 4 fields at one time}
  25581.     END;
  25582. æC 
  25583.  
  25584. æKY VersRec
  25585. VersRecPtr
  25586. VersRecHndl
  25587. æFp Files.p
  25588. æT RECORD
  25589. æD VersRecPtr = ^VersRec;
  25590. VersRecHndl = ^VersRecPtr;
  25591. VersRec = RECORD
  25592.     numericVersion: NumVersion; {encoded version number}
  25593.     countryCode: INTEGER; {country code from intl utilities}
  25594.     shortVersion: Str255; {version number string - worst case}
  25595.     reserved: Str255; {longMessage string packed after shortVersion}
  25596.     END;
  25597. æC 
  25598.  
  25599. æKY PBOpen
  25600. æFp Files.p
  25601. æT FUNCTION
  25602. æD FUNCTION PBOpen(paramBlock: ParmBlkPtr;async: BOOLEAN): OSErr;
  25603. æDT myVariable := PBOpen(paramBlock,async);
  25604. æRI II-108
  25605. æC 
  25606. Trap macro    _Open
  25607.  
  25608. Parameter block
  25609.   -->    12    ioCompletion  pointer
  25610.   <--    16    ioResult      word
  25611.   -->    18    ioNamePtr     pointer
  25612.   -->    22    ioVRefNum     word
  25613.   <--    24    ioRefNum      word
  25614.   -->    26    ioVersNum     byte
  25615.   -->    27    ioPermssn     byte
  25616.   -->    28    ioMisc        pointer
  25617.  
  25618. PBOpen creates an access path to the file having the name pointed to by ioNamePtr
  25619. (and on flat volumes, the version number ioVersNum) on the volume specified by ioVRefNum.
  25620. A path reference number is returned in ioRefNum.
  25621.  
  25622. IOMisc either points to a portion of memory (522 bytes) to be used as the access
  25623. path’s buffer, or is NIL if you want the volume buffer to be used instead.
  25624.  
  25625. Warning:  All access paths to a single file that’s opened multiple times
  25626.           should share the same buffer so that they will read and write
  25627.           the same data.
  25628.  
  25629. IOPermssn specifies the path’s read/write permission. A path can be opened for writing
  25630. even if it accesses a file on a locked volume, and an error won’t be returned until a
  25631. PBWrite, PBSetEOF, or PBAllocate call is made.
  25632.  
  25633. If you attempt to open a locked file for writing, PBOpen will return permErr as its
  25634. function result. If you request exclusive read/write permission but another access
  25635. path already has write permission (whether write only, exclusive
  25636. read/write, or shared read/write), PBOpen will return the reference number of the
  25637. existing access path in ioRefNum and opWrErr as its function result. Similarly, if
  25638. you request shared read/write permission but another access path already has exclusive
  25639. read/write permission, PBOpen will return the reference number of the access path in
  25640. ioRefNum and opWrErr as its function result.
  25641.  
  25642. Result codes    noErr     No error
  25643.                 bdNamErr  Bad file name
  25644.                 extFSErr  External file system
  25645.                 fnfErr    File not found
  25646.                 ioErr     I/O error
  25647.                 nsvErr    No such volume
  25648.                 opWrErr   File already open for writing
  25649.                 permErr   Attempt to open locked file for writing
  25650.                 tmfoErr   Too many files open
  25651.  
  25652. æKY PBOpenSync
  25653. æFp Files.p
  25654. æT FUNCTION
  25655. æTN A000
  25656. æD FUNCTION PBOpenSync(paramBlock: ParmBlkPtr): OSErr;
  25657.     INLINE $205F,$A000,$3E80;
  25658. æDT myVariable := PBOpenSync(paramBlock,A0);
  25659. æRI II-108
  25660. æC 
  25661. Trap macro    _Open
  25662.  
  25663. Parameter block
  25664.   -->    12    ioCompletion  pointer
  25665.   <--    16    ioResult      word
  25666.   -->    18    ioNamePtr     pointer
  25667.   -->    22    ioVRefNum     word
  25668.   <--    24    ioRefNum      word
  25669.   -->    26    ioVersNum     byte
  25670.   -->    27    ioPermssn     byte
  25671.   -->    28    ioMisc        pointer
  25672.  
  25673. PBOpen creates an access path to the file having the name pointed to by ioNamePtr
  25674. (and on flat volumes, the version number ioVersNum) on the volume specified by ioVRefNum.
  25675. A path reference number is returned in ioRefNum.
  25676.  
  25677. IOMisc either points to a portion of memory (522 bytes) to be used as the access
  25678. path’s buffer, or is NIL if you want the volume buffer to be used instead.
  25679.  
  25680. Warning:  All access paths to a single file that’s opened multiple times
  25681.           should share the same buffer so that they will read and write
  25682.           the same data.
  25683.  
  25684. IOPermssn specifies the path’s read/write permission. A path can be opened for writing
  25685. even if it accesses a file on a locked volume, and an error won’t be returned until a
  25686. PBWrite, PBSetEOF, or PBAllocate call is made.
  25687.  
  25688. If you attempt to open a locked file for writing, PBOpen will return permErr as its
  25689. function result. If you request exclusive read/write permission but another access
  25690. path already has write permission (whether write only, exclusive
  25691. read/write, or shared read/write), PBOpen will return the reference number of the
  25692. existing access path in ioRefNum and opWrErr as its function result. Similarly, if
  25693. you request shared read/write permission but another access path already has exclusive
  25694. read/write permission, PBOpen will return the reference number of the access path in
  25695. ioRefNum and opWrErr as its function result.
  25696.  
  25697. Result codes    noErr     No error
  25698.                 bdNamErr  Bad file name
  25699.                 extFSErr  External file system
  25700.                 fnfErr    File not found
  25701.                 ioErr     I/O error
  25702.                 nsvErr    No such volume
  25703.                 opWrErr   File already open for writing
  25704.                 permErr   Attempt to open locked file for writing
  25705.                 tmfoErr   Too many files open
  25706.  
  25707. æKY PBOpenAsync
  25708. æFp Files.p
  25709. æT FUNCTION
  25710. æTN A400
  25711. æD FUNCTION PBOpenAsync(paramBlock: ParmBlkPtr): OSErr;
  25712.     INLINE $205F,$A400,$3E80;
  25713. æDT myVariable := PBOpenAsync(paramBlock,A0);
  25714. æRI II-108
  25715. æC 
  25716. Trap macro    _Open
  25717.  
  25718. Parameter block
  25719.   -->    12    ioCompletion  pointer
  25720.   <--    16    ioResult      word
  25721.   -->    18    ioNamePtr     pointer
  25722.   -->    22    ioVRefNum     word
  25723.   <--    24    ioRefNum      word
  25724.   -->    26    ioVersNum     byte
  25725.   -->    27    ioPermssn     byte
  25726.   -->    28    ioMisc        pointer
  25727.  
  25728. PBOpen creates an access path to the file having the name pointed to by ioNamePtr
  25729. (and on flat volumes, the version number ioVersNum) on the volume specified by ioVRefNum.
  25730. A path reference number is returned in ioRefNum.
  25731.  
  25732. IOMisc either points to a portion of memory (522 bytes) to be used as the access
  25733. path’s buffer, or is NIL if you want the volume buffer to be used instead.
  25734.  
  25735. Warning:  All access paths to a single file that’s opened multiple times
  25736.           should share the same buffer so that they will read and write
  25737.           the same data.
  25738.  
  25739. IOPermssn specifies the path’s read/write permission. A path can be opened for writing
  25740. even if it accesses a file on a locked volume, and an error won’t be returned until a
  25741. PBWrite, PBSetEOF, or PBAllocate call is made.
  25742.  
  25743. If you attempt to open a locked file for writing, PBOpen will return permErr as its
  25744. function result. If you request exclusive read/write permission but another access
  25745. path already has write permission (whether write only, exclusive
  25746. read/write, or shared read/write), PBOpen will return the reference number of the
  25747. existing access path in ioRefNum and opWrErr as its function result. Similarly, if
  25748. you request shared read/write permission but another access path already has exclusive
  25749. read/write permission, PBOpen will return the reference number of the access path in
  25750. ioRefNum and opWrErr as its function result.
  25751.  
  25752. Result codes    noErr     No error
  25753.                 bdNamErr  Bad file name
  25754.                 extFSErr  External file system
  25755.                 fnfErr    File not found
  25756.                 ioErr     I/O error
  25757.                 nsvErr    No such volume
  25758.                 opWrErr   File already open for writing
  25759.                 permErr   Attempt to open locked file for writing
  25760.                 tmfoErr   Too many files open
  25761.  
  25762. æKY PBClose
  25763. æFp Files.p
  25764. æT FUNCTION
  25765. æD FUNCTION PBClose(paramBlock: ParmBlkPtr;async: BOOLEAN): OSErr;
  25766. æDT myVariable := PBClose(paramBlock,async);
  25767. æRI II-114
  25768. æC 
  25769. Trap macro     _Close
  25770.  
  25771. Parameter block
  25772.   -->    12    ioCompletion  pointer
  25773.   <--    16    ioResult      word
  25774.   -->    24    ioRefNum      word
  25775.  
  25776. PBClose writes the contents of the access path buffer specified by ioRefNum to the
  25777. volume and removes the access path.
  25778.  
  25779. Warning:  Some information stored on the volume won’t be correct
  25780.           until PBFlushVol is called.
  25781.  
  25782. Result codes    noErr     No error
  25783.                 extFSErr  External file system
  25784.                 fnfErr    File not found
  25785.                 fnOpnErr  File not open
  25786.                 ioErr     I/O error
  25787.                 nsvErr    No such volume
  25788.                 rfNumErr  Bad reference number
  25789.  
  25790. æKY PBCloseSync
  25791. æFp Files.p
  25792. æT FUNCTION
  25793. æTN A001
  25794. æD FUNCTION PBCloseSync(paramBlock: ParmBlkPtr): OSErr;
  25795.     INLINE $205F,$A001,$3E80;
  25796. æDT myVariable := PBCloseSync(paramBlock,A0);
  25797. æRI II-114
  25798. æC 
  25799. Trap macro     _Close
  25800.  
  25801. Parameter block
  25802.   -->    12    ioCompletion  pointer
  25803.   <--    16    ioResult      word
  25804.   -->    24    ioRefNum      word
  25805.  
  25806. PBClose writes the contents of the access path buffer specified by ioRefNum to the
  25807. volume and removes the access path.
  25808.  
  25809. Warning:  Some information stored on the volume won’t be correct
  25810.           until PBFlushVol is called.
  25811.  
  25812. Result codes    noErr     No error
  25813.                 extFSErr  External file system
  25814.                 fnfErr    File not found
  25815.                 fnOpnErr  File not open
  25816.                 ioErr     I/O error
  25817.                 nsvErr    No such volume
  25818.                 rfNumErr  Bad reference number
  25819.  
  25820. æKY PBCloseAsync
  25821. æFp Files.p
  25822. æT FUNCTION
  25823. æTN A401
  25824. æD FUNCTION PBCloseAsync(paramBlock: ParmBlkPtr): OSErr;
  25825.     INLINE $205F,$A401,$3E80;
  25826. æDT myVariable := PBCloseAsync(paramBlock,A0);
  25827. æRI II-114
  25828. æC 
  25829. Trap macro     _Close
  25830.  
  25831. Parameter block
  25832.   -->    12    ioCompletion  pointer
  25833.   <--    16    ioResult      word
  25834.   -->    24    ioRefNum      word
  25835.  
  25836. PBClose writes the contents of the access path buffer specified by ioRefNum to the
  25837. volume and removes the access path.
  25838.  
  25839. Warning:  Some information stored on the volume won’t be correct
  25840.           until PBFlushVol is called.
  25841.  
  25842. Result codes    noErr     No error
  25843.                 extFSErr  External file system
  25844.                 fnfErr    File not found
  25845.                 fnOpnErr  File not open
  25846.                 ioErr     I/O error
  25847.                 nsvErr    No such volume
  25848.                 rfNumErr  Bad reference number
  25849.  
  25850. æKY PBRead
  25851. æFp Files.p
  25852. æT FUNCTION
  25853. æD FUNCTION PBRead(paramBlock: ParmBlkPtr;async: BOOLEAN): OSErr;
  25854. æDT myVariable := PBRead(paramBlock,async);
  25855. æRT 187
  25856. æRI II-110
  25857. æC  
  25858. Trap macro    _Read
  25859.  
  25860. Parameter block
  25861.   -->    12    ioCompletion  pointer
  25862.   <--    16    ioResult      word
  25863.   -->    24    ioRefNum      word
  25864.   -->    32    ioBuffer      pointer
  25865.   -->    36    ioReqCount    long word
  25866.   <--    40    ioActCount    long word
  25867.   -->    44    ioPosMode     word
  25868.   <->    46    ioPosOffset   long word
  25869.  
  25870. PBRead attempts to read ioReqCount bytes from the open file whose access path is
  25871. specified by ioRefNum, and transfer them to the data buffer pointed to by ioBuffer.
  25872. The position of the mark is specified by ioPosMode and ioPosOffset. If you try to
  25873. read past the logical end-of-file, PBRead moves the mark to the end-of-file and
  25874. returns eofErr as its function result. After the read is completed, the mark is
  25875. returned in ioPosOffset and the number of bytes actually read is returned in ioActCount.
  25876.  
  25877. Result codes    noErr     No error
  25878.                 eofErr    End-of-file
  25879.                 extFSErr  External file system
  25880.                 fnOpnErr  File not open
  25881.                 ioErr     I/O error
  25882.                 paramErr  Negative ioReqCount
  25883.                 rfNumErr  Bad reference number
  25884.  
  25885. æKY PBReadSync
  25886. æFp Files.p
  25887. æT FUNCTION
  25888. æTN A002
  25889. æD FUNCTION PBReadSync(paramBlock: ParmBlkPtr): OSErr;
  25890.     INLINE $205F,$A002,$3E80;
  25891. æDT myVariable := PBReadSync(paramBlock,A0);
  25892. æRT 187
  25893. æRI II-110
  25894. æC  
  25895. Trap macro    _Read
  25896.  
  25897. Parameter block
  25898.   -->    12    ioCompletion  pointer
  25899.   <--    16    ioResult      word
  25900.   -->    24    ioRefNum      word
  25901.   -->    32    ioBuffer      pointer
  25902.   -->    36    ioReqCount    long word
  25903.   <--    40    ioActCount    long word
  25904.   -->    44    ioPosMode     word
  25905.   <->    46    ioPosOffset   long word
  25906.  
  25907. PBRead attempts to read ioReqCount bytes from the open file whose access path is
  25908. specified by ioRefNum, and transfer them to the data buffer pointed to by ioBuffer.
  25909. The position of the mark is specified by ioPosMode and ioPosOffset. If you try to
  25910. read past the logical end-of-file, PBRead moves the mark to the end-of-file and
  25911. returns eofErr as its function result. After the read is completed, the mark is
  25912. returned in ioPosOffset and the number of bytes actually read is returned in ioActCount.
  25913.  
  25914. Result codes    noErr     No error
  25915.                 eofErr    End-of-file
  25916.                 extFSErr  External file system
  25917.                 fnOpnErr  File not open
  25918.                 ioErr     I/O error
  25919.                 paramErr  Negative ioReqCount
  25920.                 rfNumErr  Bad reference number
  25921.  
  25922. æKY PBReadAsync
  25923. æFp Files.p
  25924. æT FUNCTION
  25925. æTN A402
  25926. æD FUNCTION PBReadAsync(paramBlock: ParmBlkPtr): OSErr;
  25927.     INLINE $205F,$A402,$3E80;
  25928. æDT myVariable := PBReadAsync(paramBlock,A0);
  25929. æRT 187
  25930. æRI II-110
  25931. æC  
  25932. Trap macro    _Read
  25933.  
  25934. Parameter block
  25935.   -->    12    ioCompletion  pointer
  25936.   <--    16    ioResult      word
  25937.   -->    24    ioRefNum      word
  25938.   -->    32    ioBuffer      pointer
  25939.   -->    36    ioReqCount    long word
  25940.   <--    40    ioActCount    long word
  25941.   -->    44    ioPosMode     word
  25942.   <->    46    ioPosOffset   long word
  25943.  
  25944. PBRead attempts to read ioReqCount bytes from the open file whose access path is
  25945. specified by ioRefNum, and transfer them to the data buffer pointed to by ioBuffer.
  25946. The position of the mark is specified by ioPosMode and ioPosOffset. If you try to
  25947. read past the logical end-of-file, PBRead moves the mark to the end-of-file and
  25948. returns eofErr as its function result. After the read is completed, the mark is
  25949. returned in ioPosOffset and the number of bytes actually read is returned in ioActCount.
  25950.  
  25951. Result codes    noErr     No error
  25952.                 eofErr    End-of-file
  25953.                 extFSErr  External file system
  25954.                 fnOpnErr  File not open
  25955.                 ioErr     I/O error
  25956.                 paramErr  Negative ioReqCount
  25957.                 rfNumErr  Bad reference number
  25958.  
  25959. æKY PBWrite
  25960. æFp Files.p
  25961. æT FUNCTION
  25962. æD FUNCTION PBWrite(paramBlock: ParmBlkPtr;async: BOOLEAN): OSErr;
  25963. æDT myVariable := PBWrite(paramBlock,async);
  25964. æRT 187
  25965. æRI II-110
  25966. æC 
  25967.  
  25968. •••Refer to Technical Note #187:•••
  25969.  
  25970. Trap macro    _Write
  25971.  
  25972. Parameter block
  25973.   -->    12    ioCompletion  pointer
  25974.   <--    16    ioResult      word
  25975.   -->    24    ioRefNum      word
  25976.   -->    32    ioBuffer      pointer
  25977.   -->    36    ioReqCount    long word
  25978.   <--    40    ioActCount    long word
  25979.   -->    44    ioPosMode     word
  25980.   <->    46    ioPosOffset   long word
  25981.  
  25982. PBWrite takes ioReqCount bytes from the buffer pointed to by ioBuffer and attempts to
  25983. write them to the open file whose access path is specified by ioRefNum. The position
  25984. of the mark is specified by ioPosMode and ioPosOffset. After the write is completed,
  25985. the mark is returned in ioPosOffset and the number of bytes actually written is
  25986. returned in ioActCount.
  25987.  
  25988. Result codes    noErr      No error
  25989.                 dskFulErr  Disk full
  25990.                 fLckdErr   File locked
  25991.                 fnOpnErr   File not open
  25992.                 ioErr      I/O error
  25993.                 paramErr   Negative ioReqCount
  25994.                 posErr     Attempt to position before start of file
  25995.                 rfNumErr   Bad reference number
  25996.                 vLckdErr   Software volume lock
  25997.                 wPrErr     Hardware volume lock
  25998.                 wrPermErr  Read/write permission doesn’t allow writing
  25999.  
  26000. æKY PBWriteSync
  26001. æFp Files.p
  26002. æT FUNCTION
  26003. æTN A003
  26004. æD FUNCTION PBWriteSync(paramBlock: ParmBlkPtr): OSErr;
  26005.     INLINE $205F,$A003,$3E80;
  26006. æDT myVariable := PBWriteSync(paramBlock,A0);
  26007. æRT 187
  26008. æRI II-110
  26009. æC 
  26010.  
  26011. •••Refer to Technical Note #187:•••
  26012.  
  26013. Trap macro    _Write
  26014.  
  26015. Parameter block
  26016.   -->    12    ioCompletion  pointer
  26017.   <--    16    ioResult      word
  26018.   -->    24    ioRefNum      word
  26019.   -->    32    ioBuffer      pointer
  26020.   -->    36    ioReqCount    long word
  26021.   <--    40    ioActCount    long word
  26022.   -->    44    ioPosMode     word
  26023.   <->    46    ioPosOffset   long word
  26024.  
  26025. PBWrite takes ioReqCount bytes from the buffer pointed to by ioBuffer and attempts to
  26026. write them to the open file whose access path is specified by ioRefNum. The position
  26027. of the mark is specified by ioPosMode and ioPosOffset. After the write is completed,
  26028. the mark is returned in ioPosOffset and the number of bytes actually written is
  26029. returned in ioActCount.
  26030.  
  26031. Result codes    noErr      No error
  26032.                 dskFulErr  Disk full
  26033.                 fLckdErr   File locked
  26034.                 fnOpnErr   File not open
  26035.                 ioErr      I/O error
  26036.                 paramErr   Negative ioReqCount
  26037.                 posErr     Attempt to position before start of file
  26038.                 rfNumErr   Bad reference number
  26039.                 vLckdErr   Software volume lock
  26040.                 wPrErr     Hardware volume lock
  26041.                 wrPermErr  Read/write permission doesn’t allow writing
  26042.  
  26043. æKY PBWriteAsync
  26044. æFp Files.p
  26045. æT FUNCTION
  26046. æTN A403
  26047. æD FUNCTION PBWriteAsync(paramBlock: ParmBlkPtr): OSErr;
  26048.     INLINE $205F,$A403,$3E80;
  26049. æDT myVariable := PBWriteAsync(paramBlock,A0);
  26050. æRT 187
  26051. æRI II-110
  26052. æC 
  26053.  
  26054. •••Refer to Technical Note #187:•••
  26055.  
  26056. Trap macro    _Write
  26057.  
  26058. Parameter block
  26059.   -->    12    ioCompletion  pointer
  26060.   <--    16    ioResult      word
  26061.   -->    24    ioRefNum      word
  26062.   -->    32    ioBuffer      pointer
  26063.   -->    36    ioReqCount    long word
  26064.   <--    40    ioActCount    long word
  26065.   -->    44    ioPosMode     word
  26066.   <->    46    ioPosOffset   long word
  26067.  
  26068. PBWrite takes ioReqCount bytes from the buffer pointed to by ioBuffer and attempts to
  26069. write them to the open file whose access path is specified by ioRefNum. The position
  26070. of the mark is specified by ioPosMode and ioPosOffset. After the write is completed,
  26071. the mark is returned in ioPosOffset and the number of bytes actually written is
  26072. returned in ioActCount.
  26073.  
  26074. Result codes    noErr      No error
  26075.                 dskFulErr  Disk full
  26076.                 fLckdErr   File locked
  26077.                 fnOpnErr   File not open
  26078.                 ioErr      I/O error
  26079.                 paramErr   Negative ioReqCount
  26080.                 posErr     Attempt to position before start of file
  26081.                 rfNumErr   Bad reference number
  26082.                 vLckdErr   Software volume lock
  26083.                 wPrErr     Hardware volume lock
  26084.                 wrPermErr  Read/write permission doesn’t allow writing
  26085.  
  26086. æKY PBGetVInfo
  26087. æFp Files.p
  26088. æT FUNCTION
  26089. æD FUNCTION PBGetVInfo(paramBlock: ParmBlkPtr;async: BOOLEAN): OSErr;
  26090. æDT myVariable := PBGetVInfo(paramBlock,async);
  26091. æRT 24, 44, 157
  26092. æRI II-104, IV-129, N24-1, N44-2, N157
  26093. æC 
  26094. Trap macro    _GetVolInfo
  26095.  
  26096. Parameter block
  26097.   -->    12    ioCompletion  pointer
  26098.   <--    16    ioResult      word
  26099.   <->    18    ioNamePtr     pointer
  26100.   <->    22    ioVRefNum     word
  26101.   -->    28    ioVolIndex    word
  26102.   <--    30    ioVCrDate     long word
  26103.   <--    34    ioVLsBkUp     long word
  26104.   <--    38    ioVAtrb       word
  26105.   <--    40    ioVNmFls      word
  26106.   <--    42    ioVDirSt      word
  26107.   <--    44    ioVBlLn       word
  26108.   <--    46    ioVNmAlBlks   word
  26109.   <--    48    ioVAlBlkSiz   long word
  26110.   <--    52    ioVClpSiz     long word
  26111.   <--    56    ioAlBlSt      word
  26112.   <--    58    ioVNxtFNum    long word
  26113.   <--    62    ioVFrBlk      word
  26114.  
  26115. PBGetVInfo returns information about the specified volume. If ioVolIndex is positive,
  26116. the File Manager attempts to use it to find the volume; for instance, if ioVolIndex
  26117. is 2, the File Manager will attempt to access the second mounted volume. If ioVolIndex
  26118. is negative, the File Manager uses ioNamePtr and ioVRefNum in the standard way (described
  26119. in the section “Specifying Volumes, Directories, and Files”) to determine which
  26120. volume. If ioVolIndex is 0, the File Manager attempts to access the volume by using
  26121. ioVRefNum only. The volume reference number is returned in ioVRefNum, and a pointer
  26122. to the volume name is returned in ioNamePtr (unless ioNamePtr is NIL).
  26123.  
  26124. If a working directory reference number is passed in ioVRefNum (or if the default
  26125. directory is a subdirectory), the number of files and directories in the specified
  26126. directory (the directory’s valence) will be returned in ioVNmFls. Also, the volume
  26127. reference number won’t be returned; ioVRefNum will still contain the working directory
  26128. reference number.
  26129.  
  26130. Warning:  IOVNmAlBlks and ioVFrBlks, which are actually unsigned integers,
  26131.           are clipped to 31744 ($7C00) regardless of the size of the volume.
  26132.  
  26133. Result codes    noErr       No error
  26134.                 nsvErr      No such volume
  26135.                 paramErr    No default volume
  26136.  
  26137. æKY PBGetVInfoSync
  26138. æFp Files.p
  26139. æT FUNCTION
  26140. æTN A007
  26141. æD FUNCTION PBGetVInfoSync(paramBlock: ParmBlkPtr): OSErr;
  26142.     INLINE $205F,$A007,$3E80;
  26143. æDT myVariable := PBGetVInfoSync(paramBlock,A0);
  26144. æRT 24, 44, 157
  26145. æRI II-104, IV-129, N24-1, N44-2, N157
  26146. æC 
  26147. Trap macro    _GetVolInfo
  26148.  
  26149. Parameter block
  26150.   -->    12    ioCompletion  pointer
  26151.   <--    16    ioResult      word
  26152.   <->    18    ioNamePtr     pointer
  26153.   <->    22    ioVRefNum     word
  26154.   -->    28    ioVolIndex    word
  26155.   <--    30    ioVCrDate     long word
  26156.   <--    34    ioVLsBkUp     long word
  26157.   <--    38    ioVAtrb       word
  26158.   <--    40    ioVNmFls      word
  26159.   <--    42    ioVDirSt      word
  26160.   <--    44    ioVBlLn       word
  26161.   <--    46    ioVNmAlBlks   word
  26162.   <--    48    ioVAlBlkSiz   long word
  26163.   <--    52    ioVClpSiz     long word
  26164.   <--    56    ioAlBlSt      word
  26165.   <--    58    ioVNxtFNum    long word
  26166.   <--    62    ioVFrBlk      word
  26167.  
  26168. PBGetVInfo returns information about the specified volume. If ioVolIndex is positive,
  26169. the File Manager attempts to use it to find the volume; for instance, if ioVolIndex
  26170. is 2, the File Manager will attempt to access the second mounted volume. If ioVolIndex
  26171. is negative, the File Manager uses ioNamePtr and ioVRefNum in the standard way (described
  26172. in the section “Specifying Volumes, Directories, and Files”) to determine which
  26173. volume. If ioVolIndex is 0, the File Manager attempts to access the volume by using
  26174. ioVRefNum only. The volume reference number is returned in ioVRefNum, and a pointer
  26175. to the volume name is returned in ioNamePtr (unless ioNamePtr is NIL).
  26176.  
  26177. If a working directory reference number is passed in ioVRefNum (or if the default
  26178. directory is a subdirectory), the number of files and directories in the specified
  26179. directory (the directory’s valence) will be returned in ioVNmFls. Also, the volume
  26180. reference number won’t be returned; ioVRefNum will still contain the working directory
  26181. reference number.
  26182.  
  26183. Warning:  IOVNmAlBlks and ioVFrBlks, which are actually unsigned integers,
  26184.           are clipped to 31744 ($7C00) regardless of the size of the volume.
  26185.  
  26186. Result codes    noErr       No error
  26187.                 nsvErr      No such volume
  26188.                 paramErr    No default volume
  26189.  
  26190. æKY PBGetVInfoAsync
  26191. æFp Files.p
  26192. æT FUNCTION
  26193. æTN A407
  26194. æD FUNCTION PBGetVInfoAsync(paramBlock: ParmBlkPtr): OSErr;
  26195.     INLINE $205F,$A407,$3E80;
  26196. æDT myVariable := PBGetVInfoAsync(paramBlock,A0);
  26197. æRT 24, 44, 157
  26198. æRI II-104, IV-129, N24-1, N44-2, N157
  26199. æC 
  26200. Trap macro    _GetVolInfo
  26201.  
  26202. Parameter block
  26203.   -->    12    ioCompletion  pointer
  26204.   <--    16    ioResult      word
  26205.   <->    18    ioNamePtr     pointer
  26206.   <->    22    ioVRefNum     word
  26207.   -->    28    ioVolIndex    word
  26208.   <--    30    ioVCrDate     long word
  26209.   <--    34    ioVLsBkUp     long word
  26210.   <--    38    ioVAtrb       word
  26211.   <--    40    ioVNmFls      word
  26212.   <--    42    ioVDirSt      word
  26213.   <--    44    ioVBlLn       word
  26214.   <--    46    ioVNmAlBlks   word
  26215.   <--    48    ioVAlBlkSiz   long word
  26216.   <--    52    ioVClpSiz     long word
  26217.   <--    56    ioAlBlSt      word
  26218.   <--    58    ioVNxtFNum    long word
  26219.   <--    62    ioVFrBlk      word
  26220.  
  26221. PBGetVInfo returns information about the specified volume. If ioVolIndex is positive,
  26222. the File Manager attempts to use it to find the volume; for instance, if ioVolIndex
  26223. is 2, the File Manager will attempt to access the second mounted volume. If ioVolIndex
  26224. is negative, the File Manager uses ioNamePtr and ioVRefNum in the standard way (described
  26225. in the section “Specifying Volumes, Directories, and Files”) to determine which
  26226. volume. If ioVolIndex is 0, the File Manager attempts to access the volume by using
  26227. ioVRefNum only. The volume reference number is returned in ioVRefNum, and a pointer
  26228. to the volume name is returned in ioNamePtr (unless ioNamePtr is NIL).
  26229.  
  26230. If a working directory reference number is passed in ioVRefNum (or if the default
  26231. directory is a subdirectory), the number of files and directories in the specified
  26232. directory (the directory’s valence) will be returned in ioVNmFls. Also, the volume
  26233. reference number won’t be returned; ioVRefNum will still contain the working directory
  26234. reference number.
  26235.  
  26236. Warning:  IOVNmAlBlks and ioVFrBlks, which are actually unsigned integers,
  26237.           are clipped to 31744 ($7C00) regardless of the size of the volume.
  26238.  
  26239. Result codes    noErr       No error
  26240.                 nsvErr      No such volume
  26241.                 paramErr    No default volume
  26242.  
  26243. æKY PBGetVol
  26244. æFp Files.p
  26245. æT FUNCTION
  26246. æD FUNCTION PBGetVol(paramBlock: ParmBlkPtr;async: BOOLEAN): OSErr;
  26247. æDT myVariable := PBGetVol(paramBlock,async);
  26248. æRI II-104, IV-131
  26249. æC 
  26250. Trap macro    _GetVol
  26251.  
  26252. Parameter block
  26253.   -->    12    ioCompletion  pointer
  26254.   <--    16    ioResult      word
  26255.   <--    18    ioNamePtr     pointer
  26256.   <--    22    ioVRefNum     word
  26257.  
  26258. PBGetVol returns a pointer to the name of the default volume in ioNamePtr
  26259. (unless ioNamePtr is NIL) and its volume reference number in ioVRefNum. If a default
  26260. directory was set with a previous PBSetVol call, a pointer to its name will be returned
  26261. in ioNamePtr and its working directory reference number in ioVRefNum.
  26262.  
  26263. Result codes    noErr     No error
  26264.                 nsvErr    No default volume
  26265.  
  26266. æKY PBGetVolSync
  26267. æFp Files.p
  26268. æT FUNCTION
  26269. æTN A014
  26270. æD FUNCTION PBGetVolSync(paramBlock: ParmBlkPtr): OSErr;
  26271.     INLINE $205F,$A014,$3E80;
  26272. æDT myVariable := PBGetVolSync(paramBlock,A0);
  26273. æRI II-104, IV-131
  26274. æC 
  26275. Trap macro    _GetVol
  26276.  
  26277. Parameter block
  26278.   -->    12    ioCompletion  pointer
  26279.   <--    16    ioResult      word
  26280.   <--    18    ioNamePtr     pointer
  26281.   <--    22    ioVRefNum     word
  26282.  
  26283. PBGetVol returns a pointer to the name of the default volume in ioNamePtr
  26284. (unless ioNamePtr is NIL) and its volume reference number in ioVRefNum. If a default
  26285. directory was set with a previous PBSetVol call, a pointer to its name will be returned
  26286. in ioNamePtr and its working directory reference number in ioVRefNum.
  26287.  
  26288. Result codes    noErr     No error
  26289.                 nsvErr    No default volume
  26290.  
  26291. æKY PBGetVolAsync
  26292. æFp Files.p
  26293. æT FUNCTION
  26294. æTN A414
  26295. æD FUNCTION PBGetVolAsync(paramBlock: ParmBlkPtr): OSErr;
  26296.     INLINE $205F,$A414,$3E80;
  26297. æDT myVariable := PBGetVolAsync(paramBlock,A0);
  26298. æRI II-104, IV-131
  26299. æC 
  26300. Trap macro    _GetVol
  26301.  
  26302. Parameter block
  26303.   -->    12    ioCompletion  pointer
  26304.   <--    16    ioResult      word
  26305.   <--    18    ioNamePtr     pointer
  26306.   <--    22    ioVRefNum     word
  26307.  
  26308. PBGetVol returns a pointer to the name of the default volume in ioNamePtr
  26309. (unless ioNamePtr is NIL) and its volume reference number in ioVRefNum. If a default
  26310. directory was set with a previous PBSetVol call, a pointer to its name will be returned
  26311. in ioNamePtr and its working directory reference number in ioVRefNum.
  26312.  
  26313. Result codes    noErr     No error
  26314.                 nsvErr    No default volume
  26315.  
  26316. æKY PBSetVol
  26317. æFp Files.p
  26318. æT FUNCTION
  26319. æD FUNCTION PBSetVol(paramBlock: ParmBlkPtr;async: BOOLEAN): OSErr;
  26320. æDT myVariable := PBSetVol(paramBlock,async);
  26321. æRI II-105,  IV-132
  26322. æC 
  26323. Trap macro    _SetVol
  26324.  
  26325. Parameter block
  26326.   -->    12    ioCompletion  pointer
  26327.   <--    16    ioResult      word
  26328.   -->    18    ioNamePtr     pointer
  26329.   -->    22    ioVRefNum     word
  26330.  
  26331. PBSetVol sets the default volume to the mounted volume specified by ioNamePtr or
  26332. ioVRefNum. On hierarchical volumes, PBSetVol also sets the root directory as the
  26333. default directory.
  26334.  
  26335. Result codes    noErr     No error
  26336.                 bdNamErr  Bad volume name
  26337.                 nsvErr    No such volume
  26338.                 paramErr  No default volume
  26339.  
  26340. æKY PBSetVolSync
  26341. æFp Files.p
  26342. æT FUNCTION
  26343. æTN A015
  26344. æD FUNCTION PBSetVolSync(paramBlock: ParmBlkPtr): OSErr;
  26345.     INLINE $205F,$A015,$3E80;
  26346. æDT myVariable := PBSetVolSync(paramBlock,A0);
  26347. æRI II-105,  IV-132
  26348. æC 
  26349. Trap macro    _SetVol
  26350.  
  26351. Parameter block
  26352.   -->    12    ioCompletion  pointer
  26353.   <--    16    ioResult      word
  26354.   -->    18    ioNamePtr     pointer
  26355.   -->    22    ioVRefNum     word
  26356.  
  26357. PBSetVol sets the default volume to the mounted volume specified by ioNamePtr or
  26358. ioVRefNum. On hierarchical volumes, PBSetVol also sets the root directory as the
  26359. default directory.
  26360.  
  26361. Result codes    noErr     No error
  26362.                 bdNamErr  Bad volume name
  26363.                 nsvErr    No such volume
  26364.                 paramErr  No default volume
  26365.  
  26366. æKY PBSetVolAsync
  26367. æFp Files.p
  26368. æT FUNCTION
  26369. æTN A415
  26370. æD FUNCTION PBSetVolAsync(paramBlock: ParmBlkPtr): OSErr;
  26371.     INLINE $205F,$A415,$3E80;
  26372. æDT myVariable := PBSetVolAsync(paramBlock,A0);
  26373. æRI II-105,  IV-132
  26374. æC 
  26375. Trap macro    _SetVol
  26376.  
  26377. Parameter block
  26378.   -->    12    ioCompletion  pointer
  26379.   <--    16    ioResult      word
  26380.   -->    18    ioNamePtr     pointer
  26381.   -->    22    ioVRefNum     word
  26382.  
  26383. PBSetVol sets the default volume to the mounted volume specified by ioNamePtr or
  26384. ioVRefNum. On hierarchical volumes, PBSetVol also sets the root directory as the
  26385. default directory.
  26386.  
  26387. Result codes    noErr     No error
  26388.                 bdNamErr  Bad volume name
  26389.                 nsvErr    No such volume
  26390.                 paramErr  No default volume
  26391.  
  26392. æKY PBFlushVol
  26393. æFp Files.p
  26394. æT FUNCTION
  26395. æD FUNCTION PBFlushVol(paramBlock: ParmBlkPtr;async: BOOLEAN): OSErr;
  26396. æDT myVariable := PBFlushVol(paramBlock,async);
  26397. æMM
  26398. æRI II-105, IV-133
  26399. æC 
  26400. Trap macro    _FlushVol
  26401.  
  26402. Parameter block
  26403.   -->    12    ioCompletion  pointer
  26404.   <--    16    ioResult      word
  26405.   -->    18    ioNamePtr     pointer
  26406.   -->    22    ioVRefNum     word
  26407.  
  26408. On the volume specified by ioNamePtr or ioVRefNum, PBFlushVol writes descriptive
  26409. information about the volume, the contents of the associated volume buffer, and all
  26410. access path buffers for the volume (if they’ve changed since the last time PBFlushVol
  26411. was called).
  26412.  
  26413. Note:  The date and time of the last modification to the volume are set
  26414.        when the modification is made, not when the volume is flushed.
  26415.  
  26416. Result codes    noErr     No error
  26417.                 bdNamErr  Bad volume name
  26418.                 extFSErr  External file system
  26419.                 ioErr     I/O error
  26420.                 nsDrvErr  No such drive
  26421.                 nsvErr    No such volume
  26422.                 paramErr  No default volume
  26423.  
  26424. æKY PBFlushVolSync
  26425. æFp Files.p
  26426. æT FUNCTION
  26427. æTN A013
  26428. æD FUNCTION PBFlushVolSync(paramBlock: ParmBlkPtr): OSErr;
  26429.     INLINE $205F,$A013,$3E80;
  26430. æDT myVariable := PBFlushVolSync(paramBlock,A0);
  26431. æMM
  26432. æRI II-105, IV-133
  26433. æC 
  26434. Trap macro    _FlushVol
  26435.  
  26436. Parameter block
  26437.   -->    12    ioCompletion  pointer
  26438.   <--    16    ioResult      word
  26439.   -->    18    ioNamePtr     pointer
  26440.   -->    22    ioVRefNum     word
  26441.  
  26442. On the volume specified by ioNamePtr or ioVRefNum, PBFlushVol writes descriptive
  26443. information about the volume, the contents of the associated volume buffer, and all
  26444. access path buffers for the volume (if they’ve changed since the last time PBFlushVol
  26445. was called).
  26446.  
  26447. Note:  The date and time of the last modification to the volume are set
  26448.        when the modification is made, not when the volume is flushed.
  26449.  
  26450. Result codes    noErr     No error
  26451.                 bdNamErr  Bad volume name
  26452.                 extFSErr  External file system
  26453.                 ioErr     I/O error
  26454.                 nsDrvErr  No such drive
  26455.                 nsvErr    No such volume
  26456.                 paramErr  No default volume
  26457.  
  26458. æKY PBFlushVolAsync
  26459. æFp Files.p
  26460. æT FUNCTION
  26461. æTN A413
  26462. æD FUNCTION PBFlushVolAsync(paramBlock: ParmBlkPtr): OSErr;
  26463.     INLINE $205F,$A413,$3E80;
  26464. æDT myVariable := PBFlushVolAsync(paramBlock,A0);
  26465. æMM
  26466. æRI II-105, IV-133
  26467. æC 
  26468. Trap macro    _FlushVol
  26469.  
  26470. Parameter block
  26471.   -->    12    ioCompletion  pointer
  26472.   <--    16    ioResult      word
  26473.   -->    18    ioNamePtr     pointer
  26474.   -->    22    ioVRefNum     word
  26475.  
  26476. On the volume specified by ioNamePtr or ioVRefNum, PBFlushVol writes descriptive
  26477. information about the volume, the contents of the associated volume buffer, and all
  26478. access path buffers for the volume (if they’ve changed since the last time PBFlushVol
  26479. was called).
  26480.  
  26481. Note:  The date and time of the last modification to the volume are set
  26482.        when the modification is made, not when the volume is flushed.
  26483.  
  26484. Result codes    noErr     No error
  26485.                 bdNamErr  Bad volume name
  26486.                 extFSErr  External file system
  26487.                 ioErr     I/O error
  26488.                 nsDrvErr  No such drive
  26489.                 nsvErr    No such volume
  26490.                 paramErr  No default volume
  26491.  
  26492. æKY PBCreate
  26493. æFp Files.p
  26494. æT FUNCTION
  26495. æD FUNCTION PBCreate(paramBlock: ParmBlkPtr;async: BOOLEAN): OSErr;
  26496. æDT myVariable := PBCreate(paramBlock,async);
  26497. æRI II-107, IV-145
  26498. æC 
  26499. Trap macro    _Create
  26500.  
  26501. Parameter block
  26502.   -->    12    ioCompletion  pointer
  26503.   <--    16    ioResult      word
  26504.   -->    18    ioNamePtr     pointer
  26505.   -->    22    ioVRefNum     word
  26506.   -->    26    ioFVersNum    byte
  26507.  
  26508. PBCreate creates a new file (both forks) having the name pointed to by ioNamePtr (and
  26509. on flat volumes, the version number ioVersNum) on the volume specified by ioVRefNum.
  26510. The new file is unlocked and empty. The date and time of its creation and last modification
  26511. are set to the current date and time. If the file created isn’t temporary (that is,
  26512. if it will exist after the application terminates), the application should call
  26513. PBSetFInfo (after PBCreate) to fill in the information needed by the Finder.
  26514.  
  26515. Assembly-language note:  If a desk accessory creates a file, it should
  26516.                          always create it in the directory containing the
  26517.                          system folder. The working directory reference
  26518.                          number for this directory is stored in the global
  26519.                          variable BootDrive; you can pass it in ioVRefNum.
  26520.  
  26521. Result codes    noErr      No error
  26522.                 bdNamErr   Bad file name
  26523.                 dupFNErr   Duplicate file name and version
  26524.                 dirFulErr  File directory full
  26525.                 extFSErr   External file system
  26526.                 ioErr      I/O error
  26527.                 nsvErr     No such volume
  26528.                 vLckdErr   Software volume lock
  26529.                 wPrErr     Hardware volume lock
  26530.  
  26531. æKY PBCreateSync
  26532. æFp Files.p
  26533. æT FUNCTION
  26534. æTN A008
  26535. æD FUNCTION PBCreateSync(paramBlock: ParmBlkPtr): OSErr;
  26536.     INLINE $205F,$A008,$3E80;
  26537. æDT myVariable := PBCreateSync(paramBlock,A0);
  26538. æRI II-107, IV-145
  26539. æC 
  26540. Trap macro    _Create
  26541.  
  26542. Parameter block
  26543.   -->    12    ioCompletion  pointer
  26544.   <--    16    ioResult      word
  26545.   -->    18    ioNamePtr     pointer
  26546.   -->    22    ioVRefNum     word
  26547.   -->    26    ioFVersNum    byte
  26548.  
  26549. PBCreate creates a new file (both forks) having the name pointed to by ioNamePtr (and
  26550. on flat volumes, the version number ioVersNum) on the volume specified by ioVRefNum.
  26551. The new file is unlocked and empty. The date and time of its creation and last modification
  26552. are set to the current date and time. If the file created isn’t temporary (that is,
  26553. if it will exist after the application terminates), the application should call
  26554. PBSetFInfo (after PBCreate) to fill in the information needed by the Finder.
  26555.  
  26556. Assembly-language note:  If a desk accessory creates a file, it should
  26557.                          always create it in the directory containing the
  26558.                          system folder. The working directory reference
  26559.                          number for this directory is stored in the global
  26560.                          variable BootDrive; you can pass it in ioVRefNum.
  26561.  
  26562. Result codes    noErr      No error
  26563.                 bdNamErr   Bad file name
  26564.                 dupFNErr   Duplicate file name and version
  26565.                 dirFulErr  File directory full
  26566.                 extFSErr   External file system
  26567.                 ioErr      I/O error
  26568.                 nsvErr     No such volume
  26569.                 vLckdErr   Software volume lock
  26570.                 wPrErr     Hardware volume lock
  26571.  
  26572. æKY PBCreateAsync
  26573. æFp Files.p
  26574. æT FUNCTION
  26575. æTN A408
  26576. æD FUNCTION PBCreateAsync(paramBlock: ParmBlkPtr): OSErr;
  26577.     INLINE $205F,$A408,$3E80;
  26578. æDT myVariable := PBCreateAsync(paramBlock,A0);
  26579. æRI II-107, IV-145
  26580. æC 
  26581. Trap macro    _Create
  26582.  
  26583. Parameter block
  26584.   -->    12    ioCompletion  pointer
  26585.   <--    16    ioResult      word
  26586.   -->    18    ioNamePtr     pointer
  26587.   -->    22    ioVRefNum     word
  26588.   -->    26    ioFVersNum    byte
  26589.  
  26590. PBCreate creates a new file (both forks) having the name pointed to by ioNamePtr (and
  26591. on flat volumes, the version number ioVersNum) on the volume specified by ioVRefNum.
  26592. The new file is unlocked and empty. The date and time of its creation and last modification
  26593. are set to the current date and time. If the file created isn’t temporary (that is,
  26594. if it will exist after the application terminates), the application should call
  26595. PBSetFInfo (after PBCreate) to fill in the information needed by the Finder.
  26596.  
  26597. Assembly-language note:  If a desk accessory creates a file, it should
  26598.                          always create it in the directory containing the
  26599.                          system folder. The working directory reference
  26600.                          number for this directory is stored in the global
  26601.                          variable BootDrive; you can pass it in ioVRefNum.
  26602.  
  26603. Result codes    noErr      No error
  26604.                 bdNamErr   Bad file name
  26605.                 dupFNErr   Duplicate file name and version
  26606.                 dirFulErr  File directory full
  26607.                 extFSErr   External file system
  26608.                 ioErr      I/O error
  26609.                 nsvErr     No such volume
  26610.                 vLckdErr   Software volume lock
  26611.                 wPrErr     Hardware volume lock
  26612.  
  26613. æKY PBDelete
  26614. æFp Files.p
  26615. æT FUNCTION
  26616. æD FUNCTION PBDelete(paramBlock: ParmBlkPtr;async: BOOLEAN): OSErr;
  26617. æDT myVariable := PBDelete(paramBlock,async);
  26618. æRI II-119, IV-147
  26619. æC 
  26620. Trap macro    _Delete
  26621.  
  26622. Parameter block
  26623.   -->    12    ioCompletion  pointer
  26624.   <--    16    ioResult      word
  26625.   -->    18    ioNamePtr     pointer
  26626.   -->    22    ioVRefNum     word
  26627.   -->    26    ioFVersNum    byte
  26628.  
  26629. PBDelete removes the closed file having the name pointed to by ioNamePtr (and on flat
  26630. volumes, the version number ioVersNum) from the volume pointed to by ioVRefNum.
  26631. PBHDelete can be used to delete an empty directory as well.
  26632.  
  26633. Note:  This function will delete both forks of the file.
  26634.  
  26635. Result codes    noErr     No error
  26636.                 bdNamErr  Bad file name
  26637.                 extFSErr  External file system
  26638.                 fBsyErr   File busy, directory not empty, or working
  26639.                           directory control block open
  26640.                 fLckdErr  File locked
  26641.                 fnfErr    File not found
  26642.                 nsvErr    No such volume
  26643.                 ioErr     I/O error
  26644.                 vLckdErr  Software volume lock
  26645.                 wPrErr    Hardware volume lock
  26646.  
  26647. æKY PBDeleteSync
  26648. æFp Files.p
  26649. æT FUNCTION
  26650. æTN A009
  26651. æD FUNCTION PBDeleteSync(paramBlock: ParmBlkPtr): OSErr;
  26652.     INLINE $205F,$A009,$3E80;
  26653. æDT myVariable := PBDeleteSync(paramBlock,A0);
  26654. æRI II-119, IV-147
  26655. æC 
  26656. Trap macro    _Delete
  26657.  
  26658. Parameter block
  26659.   -->    12    ioCompletion  pointer
  26660.   <--    16    ioResult      word
  26661.   -->    18    ioNamePtr     pointer
  26662.   -->    22    ioVRefNum     word
  26663.   -->    26    ioFVersNum    byte
  26664.  
  26665. PBDelete removes the closed file having the name pointed to by ioNamePtr (and on flat
  26666. volumes, the version number ioVersNum) from the volume pointed to by ioVRefNum.
  26667. PBHDelete can be used to delete an empty directory as well.
  26668.  
  26669. Note:  This function will delete both forks of the file.
  26670.  
  26671. Result codes    noErr     No error
  26672.                 bdNamErr  Bad file name
  26673.                 extFSErr  External file system
  26674.                 fBsyErr   File busy, directory not empty, or working
  26675.                           directory control block open
  26676.                 fLckdErr  File locked
  26677.                 fnfErr    File not found
  26678.                 nsvErr    No such volume
  26679.                 ioErr     I/O error
  26680.                 vLckdErr  Software volume lock
  26681.                 wPrErr    Hardware volume lock
  26682.  
  26683. æKY PBDeleteAsync
  26684. æFp Files.p
  26685. æT FUNCTION
  26686. æTN A409
  26687. æD FUNCTION PBDeleteAsync(paramBlock: ParmBlkPtr): OSErr;
  26688.     INLINE $205F,$A409,$3E80;
  26689. æDT myVariable := PBDeleteAsync(paramBlock,A0);
  26690. æRI II-119, IV-147
  26691. æC 
  26692. Trap macro    _Delete
  26693.  
  26694. Parameter block
  26695.   -->    12    ioCompletion  pointer
  26696.   <--    16    ioResult      word
  26697.   -->    18    ioNamePtr     pointer
  26698.   -->    22    ioVRefNum     word
  26699.   -->    26    ioFVersNum    byte
  26700.  
  26701. PBDelete removes the closed file having the name pointed to by ioNamePtr (and on flat
  26702. volumes, the version number ioVersNum) from the volume pointed to by ioVRefNum.
  26703. PBHDelete can be used to delete an empty directory as well.
  26704.  
  26705. Note:  This function will delete both forks of the file.
  26706.  
  26707. Result codes    noErr     No error
  26708.                 bdNamErr  Bad file name
  26709.                 extFSErr  External file system
  26710.                 fBsyErr   File busy, directory not empty, or working
  26711.                           directory control block open
  26712.                 fLckdErr  File locked
  26713.                 fnfErr    File not found
  26714.                 nsvErr    No such volume
  26715.                 ioErr     I/O error
  26716.                 vLckdErr  Software volume lock
  26717.                 wPrErr    Hardware volume lock
  26718.  
  26719. æKY PBOpenDF
  26720. æFp Files.p
  26721. æT FUNCTION
  26722. æD FUNCTION PBOpenDF(paramBlock: ParmBlkPtr;async: BOOLEAN): OSErr;
  26723. æDT myVariable := PBOpenDF(paramBlock,async);
  26724. æRI PBOpenWD function  IV-158, N77-1
  26725.  
  26726. æC FUNCTION PBOpenWD (paramBlock: WDPBPtr; async: BOOLEAN) : OSErr;
  26727.  
  26728. Trap macro  _OpenWD
  26729.  
  26730. Parameter block
  26731.     —>  12  ioCompletion    pointer
  26732.     <—  16  ioResult        word
  26733.     —>  18  ioNamePtr       pointer
  26734.     <–> 22  ioVRefNum       word
  26735.     —>  28  ioWDProcID      long word
  26736.     —>  48  ioWDDirID       long word
  26737.  
  26738.     PBOpenWD takes the directory specified by ioVRefNum, ioWDDirID, and
  26739. ioWDProcID and makes it a working directory. (You can also specify the
  26740. directory using a combination of partial pathname and directory ID.)  It
  26741. returns a working directory reference number in ioVRefNum that can be
  26742. used in subsequent calls.
  26743.  
  26744.     If a given directory has already been made a working directory using
  26745. the same ioWDProcID, no new working directory will be opened; instead,
  26746. the existing working directory reference number will be returned. If a
  26747. given directory was already made a working directory using a different
  26748. ioWDProcID, a new working directory reference number is returned.
  26749.  
  26750. Result codes    noErr       No error
  26751.                 tmwdoErr    Too many working directories open
  26752.  
  26753.  
  26754. æKY PBOpenDFSync
  26755. æFp Files.p
  26756. æT FUNCTION
  26757. æTN 701A,A060
  26758. æD FUNCTION PBOpenDFSync(paramBlock: ParmBlkPtr): OSErr;
  26759.     INLINE $205F,$701A,$A060,$3E80;
  26760. æDT myVariable := PBOpenDFSync(paramBlock,A0);
  26761. æRI PBOpenWD function  IV-158, N77-1
  26762.  
  26763. æC FUNCTION PBOpenWD (paramBlock: WDPBPtr; async: BOOLEAN) : OSErr;
  26764.  
  26765. Trap macro  _OpenWD
  26766.  
  26767. Parameter block
  26768.     —>  12  ioCompletion    pointer
  26769.     <—  16  ioResult        word
  26770.     —>  18  ioNamePtr       pointer
  26771.     <–> 22  ioVRefNum       word
  26772.     —>  28  ioWDProcID      long word
  26773.     —>  48  ioWDDirID       long word
  26774.  
  26775.     PBOpenWD takes the directory specified by ioVRefNum, ioWDDirID, and
  26776. ioWDProcID and makes it a working directory. (You can also specify the
  26777. directory using a combination of partial pathname and directory ID.)  It
  26778. returns a working directory reference number in ioVRefNum that can be
  26779. used in subsequent calls.
  26780.  
  26781.     If a given directory has already been made a working directory using
  26782. the same ioWDProcID, no new working directory will be opened; instead,
  26783. the existing working directory reference number will be returned. If a
  26784. given directory was already made a working directory using a different
  26785. ioWDProcID, a new working directory reference number is returned.
  26786.  
  26787. Result codes    noErr       No error
  26788.                 tmwdoErr    Too many working directories open
  26789.  
  26790.  
  26791. æKY PBOpenDFAsync
  26792. æFp Files.p
  26793. æT FUNCTION
  26794. æTN 701A,A460
  26795. æD FUNCTION PBOpenDFAsync(paramBlock: ParmBlkPtr): OSErr;
  26796.     INLINE $205F,$701A,$A460,$3E80;
  26797. æDT myVariable := PBOpenDFAsync(paramBlock,A0);
  26798. æRI PBOpenWD function  IV-158, N77-1
  26799.  
  26800. æC FUNCTION PBOpenWD (paramBlock: WDPBPtr; async: BOOLEAN) : OSErr;
  26801.  
  26802. Trap macro  _OpenWD
  26803.  
  26804. Parameter block
  26805.     —>  12  ioCompletion    pointer
  26806.     <—  16  ioResult        word
  26807.     —>  18  ioNamePtr       pointer
  26808.     <–> 22  ioVRefNum       word
  26809.     —>  28  ioWDProcID      long word
  26810.     —>  48  ioWDDirID       long word
  26811.  
  26812.     PBOpenWD takes the directory specified by ioVRefNum, ioWDDirID, and
  26813. ioWDProcID and makes it a working directory. (You can also specify the
  26814. directory using a combination of partial pathname and directory ID.)  It
  26815. returns a working directory reference number in ioVRefNum that can be
  26816. used in subsequent calls.
  26817.  
  26818.     If a given directory has already been made a working directory using
  26819. the same ioWDProcID, no new working directory will be opened; instead,
  26820. the existing working directory reference number will be returned. If a
  26821. given directory was already made a working directory using a different
  26822. ioWDProcID, a new working directory reference number is returned.
  26823.  
  26824. Result codes    noErr       No error
  26825.                 tmwdoErr    Too many working directories open
  26826.  
  26827.  
  26828. æKY PBOpenRF
  26829. æFp Files.p
  26830. æT FUNCTION
  26831. æD FUNCTION PBOpenRF(paramBlock: ParmBlkPtr;async: BOOLEAN): OSErr;
  26832. æDT myVariable := PBOpenRF(paramBlock,async);
  26833. æMM
  26834. æRT 74
  26835. æRI II-109, IV-137 
  26836. æC 
  26837. Trap macro    _OpenRF
  26838.  
  26839. Parameter block
  26840.   -->    12    ioCompletion  pointer
  26841.   <--    16    ioResult      word
  26842.   -->    18    ioNamePtr     pointer
  26843.   -->    22    ioVRefNum     word
  26844.   <--    24    ioRefNum      word
  26845.   -->    26    ioVersNum     byte
  26846.   -->    27    ioPermssn     byte
  26847.   -->    28    ioMisc        pointer
  26848.  
  26849. PBOpenRF is identical to PBOpen, except that it opens the file’s resource fork instead
  26850. of its data fork.
  26851.  
  26852. Note:  Normally you should access a file’s resource fork through the
  26853.        routines of the Resource Manager rather than the File Manager.
  26854.        PBOpenRF doesn’t read the resource map into memory; it’s really
  26855.        only useful for block-level operations such as copying files.
  26856.  
  26857. Result codes    noErr     No error
  26858.                 bdNamErr  Bad file name
  26859.                 extFSErr  External file system
  26860.                 fnfErr    File not found
  26861.                 ioErr     I/O error
  26862.                 nsvErr    No such volume
  26863.                 opWrErr   File already open for writing
  26864.                 permErr   Attempt to open locked file for writing
  26865.                 tmfoErr   Too many files open
  26866.  
  26867. æKY PBOpenRFSync
  26868. æFp Files.p
  26869. æT FUNCTION
  26870. æTN A00A
  26871. æD FUNCTION PBOpenRFSync(paramBlock: ParmBlkPtr): OSErr;
  26872.     INLINE $205F,$A00A,$3E80;
  26873. æDT myVariable := PBOpenRFSync(paramBlock,A0);
  26874. æMM
  26875. æRT 74
  26876. æRI II-109, IV-137 
  26877. æC 
  26878. Trap macro    _OpenRF
  26879.  
  26880. Parameter block
  26881.   -->    12    ioCompletion  pointer
  26882.   <--    16    ioResult      word
  26883.   -->    18    ioNamePtr     pointer
  26884.   -->    22    ioVRefNum     word
  26885.   <--    24    ioRefNum      word
  26886.   -->    26    ioVersNum     byte
  26887.   -->    27    ioPermssn     byte
  26888.   -->    28    ioMisc        pointer
  26889.  
  26890. PBOpenRF is identical to PBOpen, except that it opens the file’s resource fork instead
  26891. of its data fork.
  26892.  
  26893. Note:  Normally you should access a file’s resource fork through the
  26894.        routines of the Resource Manager rather than the File Manager.
  26895.        PBOpenRF doesn’t read the resource map into memory; it’s really
  26896.        only useful for block-level operations such as copying files.
  26897.  
  26898. Result codes    noErr     No error
  26899.                 bdNamErr  Bad file name
  26900.                 extFSErr  External file system
  26901.                 fnfErr    File not found
  26902.                 ioErr     I/O error
  26903.                 nsvErr    No such volume
  26904.                 opWrErr   File already open for writing
  26905.                 permErr   Attempt to open locked file for writing
  26906.                 tmfoErr   Too many files open
  26907.  
  26908. æKY PBOpenRFAsync
  26909. æFp Files.p
  26910. æT FUNCTION
  26911. æTN A40A
  26912. æD FUNCTION PBOpenRFAsync(paramBlock: ParmBlkPtr): OSErr;
  26913.     INLINE $205F,$A40A,$3E80;
  26914. æDT myVariable := PBOpenRFAsync(paramBlock,A0);
  26915. æMM
  26916. æRT 74
  26917. æRI II-109, IV-137 
  26918. æC 
  26919. Trap macro    _OpenRF
  26920.  
  26921. Parameter block
  26922.   -->    12    ioCompletion  pointer
  26923.   <--    16    ioResult      word
  26924.   -->    18    ioNamePtr     pointer
  26925.   -->    22    ioVRefNum     word
  26926.   <--    24    ioRefNum      word
  26927.   -->    26    ioVersNum     byte
  26928.   -->    27    ioPermssn     byte
  26929.   -->    28    ioMisc        pointer
  26930.  
  26931. PBOpenRF is identical to PBOpen, except that it opens the file’s resource fork instead
  26932. of its data fork.
  26933.  
  26934. Note:  Normally you should access a file’s resource fork through the
  26935.        routines of the Resource Manager rather than the File Manager.
  26936.        PBOpenRF doesn’t read the resource map into memory; it’s really
  26937.        only useful for block-level operations such as copying files.
  26938.  
  26939. Result codes    noErr     No error
  26940.                 bdNamErr  Bad file name
  26941.                 extFSErr  External file system
  26942.                 fnfErr    File not found
  26943.                 ioErr     I/O error
  26944.                 nsvErr    No such volume
  26945.                 opWrErr   File already open for writing
  26946.                 permErr   Attempt to open locked file for writing
  26947.                 tmfoErr   Too many files open
  26948.  
  26949. æKY PBRename
  26950. æFp Files.p
  26951. æT FUNCTION
  26952. æD FUNCTION PBRename(paramBlock: ParmBlkPtr;async: BOOLEAN): OSErr;
  26953. æDT myVariable := PBRename(paramBlock,async);
  26954. æRI II-118, IV-153
  26955. æC 
  26956. Trap macro    _Rename
  26957.  
  26958. Parameter block
  26959.   -->    12    ioCompletion  pointer
  26960.   <--    16    ioResult      word
  26961.   -->    18    ioNamePtr     pointer
  26962.   -->    22    ioVRefNum     word
  26963.   -->    26    ioVersNum     byte
  26964.   -->    28    ioMisc        pointer
  26965.  
  26966. Given a pointer to a file name in ioNamePtr (and on flat volumes, a version number in
  26967. ioVersNum), PBRename changes the name of the file to the name pointed to by ioMisc.
  26968. (If the name pointed to by ioNamePtr contains one or more colons, so must the name
  26969. pointed to by ioMisc.) Access paths currently in use aren’t affected. Given a pointer
  26970. to a volume name in ioNamePtr or a volume reference number in ioVRefNum, it changes
  26971. the name of the volume to the name pointed to by ioMisc. If a volume to be renamed is
  26972. specified by its volume reference number, ioNamePtr can be NIL.
  26973.  
  26974. Warning:  If a volume to be renamed is specified by its volume name, be
  26975.           sure that it ends with a colon, or Rename will consider it a
  26976.           file name.
  26977.  
  26978. Result codes    noErr      No error
  26979.                 bdNamErr   Bad file name
  26980.                 dirFulErr  File directory full
  26981.                 dupFNErr   Duplicate file name and version
  26982.                 extFSErr   External file system
  26983.                 fLckdErr   File locked
  26984.                 fnfErr     File not found
  26985.                 fsRnErr    Problem during rename
  26986.                 ioErr      I/O error
  26987.                 nsvErr     No such volume
  26988.                 paramErr   No default volume
  26989.                 vLckdErr   Software volume lock
  26990.                 wPrErr     Hardware volume lock
  26991.  
  26992. æKY PBRenameSync
  26993. æFp Files.p
  26994. æT FUNCTION
  26995. æTN A00B
  26996. æD FUNCTION PBRenameSync(paramBlock: ParmBlkPtr): OSErr;
  26997.     INLINE $205F,$A00B,$3E80;
  26998. æDT myVariable := PBRenameSync(paramBlock,A0);
  26999. æRI II-118, IV-153
  27000. æC 
  27001. Trap macro    _Rename
  27002.  
  27003. Parameter block
  27004.   -->    12    ioCompletion  pointer
  27005.   <--    16    ioResult      word
  27006.   -->    18    ioNamePtr     pointer
  27007.   -->    22    ioVRefNum     word
  27008.   -->    26    ioVersNum     byte
  27009.   -->    28    ioMisc        pointer
  27010.  
  27011. Given a pointer to a file name in ioNamePtr (and on flat volumes, a version number in
  27012. ioVersNum), PBRename changes the name of the file to the name pointed to by ioMisc.
  27013. (If the name pointed to by ioNamePtr contains one or more colons, so must the name
  27014. pointed to by ioMisc.) Access paths currently in use aren’t affected. Given a pointer
  27015. to a volume name in ioNamePtr or a volume reference number in ioVRefNum, it changes
  27016. the name of the volume to the name pointed to by ioMisc. If a volume to be renamed is
  27017. specified by its volume reference number, ioNamePtr can be NIL.
  27018.  
  27019. Warning:  If a volume to be renamed is specified by its volume name, be
  27020.           sure that it ends with a colon, or Rename will consider it a
  27021.           file name.
  27022.  
  27023. Result codes    noErr      No error
  27024.                 bdNamErr   Bad file name
  27025.                 dirFulErr  File directory full
  27026.                 dupFNErr   Duplicate file name and version
  27027.                 extFSErr   External file system
  27028.                 fLckdErr   File locked
  27029.                 fnfErr     File not found
  27030.                 fsRnErr    Problem during rename
  27031.                 ioErr      I/O error
  27032.                 nsvErr     No such volume
  27033.                 paramErr   No default volume
  27034.                 vLckdErr   Software volume lock
  27035.                 wPrErr     Hardware volume lock
  27036.  
  27037. æKY PBRenameAsync
  27038. æFp Files.p
  27039. æT FUNCTION
  27040. æTN A40B
  27041. æD FUNCTION PBRenameAsync(paramBlock: ParmBlkPtr): OSErr;
  27042.     INLINE $205F,$A40B,$3E80;
  27043. æDT myVariable := PBRenameAsync(paramBlock,A0);
  27044. æRI II-118, IV-153
  27045. æC 
  27046. Trap macro    _Rename
  27047.  
  27048. Parameter block
  27049.   -->    12    ioCompletion  pointer
  27050.   <--    16    ioResult      word
  27051.   -->    18    ioNamePtr     pointer
  27052.   -->    22    ioVRefNum     word
  27053.   -->    26    ioVersNum     byte
  27054.   -->    28    ioMisc        pointer
  27055.  
  27056. Given a pointer to a file name in ioNamePtr (and on flat volumes, a version number in
  27057. ioVersNum), PBRename changes the name of the file to the name pointed to by ioMisc.
  27058. (If the name pointed to by ioNamePtr contains one or more colons, so must the name
  27059. pointed to by ioMisc.) Access paths currently in use aren’t affected. Given a pointer
  27060. to a volume name in ioNamePtr or a volume reference number in ioVRefNum, it changes
  27061. the name of the volume to the name pointed to by ioMisc. If a volume to be renamed is
  27062. specified by its volume reference number, ioNamePtr can be NIL.
  27063.  
  27064. Warning:  If a volume to be renamed is specified by its volume name, be
  27065.           sure that it ends with a colon, or Rename will consider it a
  27066.           file name.
  27067.  
  27068. Result codes    noErr      No error
  27069.                 bdNamErr   Bad file name
  27070.                 dirFulErr  File directory full
  27071.                 dupFNErr   Duplicate file name and version
  27072.                 extFSErr   External file system
  27073.                 fLckdErr   File locked
  27074.                 fnfErr     File not found
  27075.                 fsRnErr    Problem during rename
  27076.                 ioErr      I/O error
  27077.                 nsvErr     No such volume
  27078.                 paramErr   No default volume
  27079.                 vLckdErr   Software volume lock
  27080.                 wPrErr     Hardware volume lock
  27081.  
  27082. æKY PBGetFInfo
  27083. æFp Files.p
  27084. æT FUNCTION
  27085. æD FUNCTION PBGetFInfo(paramBlock: ParmBlkPtr;async: BOOLEAN): OSErr;
  27086. æDT myVariable := PBGetFInfo(paramBlock,async);
  27087. æRT 24
  27088. æRI II-115, IV-148, N24-1, N68-1
  27089. æC 
  27090. Trap macro    _GetFileInfo
  27091.  
  27092. Parameter block
  27093.   -->    12    ioCompletion  pointer
  27094.   <--    16    ioResult      word
  27095.   <->    18    ioNamePtr     pointer
  27096.   -->    22    ioVRefNum     word
  27097.   <--    24    ioFRefNum     word
  27098.   -->    26    ioFVersNum    byte
  27099.   -->    28    ioFDirIndex   word
  27100.   <--    30    ioFlAttrib    byte
  27101.   <--    31    ioFlVersNum   byte
  27102.   <--    32    ioFlFndrInfo  16 bytes
  27103.   <--    48    ioFlNum       long word
  27104.   <--    52    ioFlStBlk     word
  27105.   <--    54    ioFlLgLen     long word
  27106.   <--    58    ioFlPyLen     long word
  27107.   <--    62    ioFlRStBlk    word
  27108.   <--    64    ioFlRLgLen    long word
  27109.   <--    68    ioFlRPyLen    long word
  27110.   <--    72    ioFlCrDat     long word
  27111.   <--    76    ioFlMdDat     long word
  27112.  
  27113. PBGetFInfo returns information about the specified file. If ioFDirIndex is positive,
  27114. the File Manager returns information about the file whose directory index is ioFDirIndex
  27115. on the volume specified by ioVRefNum. (See the section
  27116. “Data Organization on Volumes” if you’re interested in using this method.)
  27117.  
  27118. Note:  If a working directory reference number is specified in ioVRefNum,
  27119.        the File Manager returns information about the file whose directory
  27120.        index is ioFDirIndex in the specified directory.
  27121.  
  27122. If ioFDirIndex is negative or 0, the File Manager returns information about the file
  27123. having the name pointed to by ioNamePtr (and on flat volumes, the version number
  27124. ioFVersNum) on the volume specified by ioVRefNum. If the file is open, the reference
  27125. number of the first access path found is returned in ioFRefNum, and the name of the
  27126. file is returned in ioNamePtr (unless ioNamePtr is NIL).
  27127.  
  27128. Result codes    noErr     No error
  27129.                 bdNamErr  Bad file name
  27130.                 extFSErr  External file system
  27131.                 fnfErr    File not found
  27132.                 ioErr     I/O error
  27133.                 nsvErr    No such volume
  27134.                 paramErr  No default volume
  27135.  
  27136. æKY PBGetFInfoSync
  27137. æFp Files.p
  27138. æT FUNCTION
  27139. æTN A00C
  27140. æD FUNCTION PBGetFInfoSync(paramBlock: ParmBlkPtr): OSErr;
  27141.     INLINE $205F,$A00C,$3E80;
  27142. æDT myVariable := PBGetFInfoSync(paramBlock,A0);
  27143. æRT 24
  27144. æRI II-115, IV-148, N24-1, N68-1
  27145. æC 
  27146. Trap macro    _GetFileInfo
  27147.  
  27148. Parameter block
  27149.   -->    12    ioCompletion  pointer
  27150.   <--    16    ioResult      word
  27151.   <->    18    ioNamePtr     pointer
  27152.   -->    22    ioVRefNum     word
  27153.   <--    24    ioFRefNum     word
  27154.   -->    26    ioFVersNum    byte
  27155.   -->    28    ioFDirIndex   word
  27156.   <--    30    ioFlAttrib    byte
  27157.   <--    31    ioFlVersNum   byte
  27158.   <--    32    ioFlFndrInfo  16 bytes
  27159.   <--    48    ioFlNum       long word
  27160.   <--    52    ioFlStBlk     word
  27161.   <--    54    ioFlLgLen     long word
  27162.   <--    58    ioFlPyLen     long word
  27163.   <--    62    ioFlRStBlk    word
  27164.   <--    64    ioFlRLgLen    long word
  27165.   <--    68    ioFlRPyLen    long word
  27166.   <--    72    ioFlCrDat     long word
  27167.   <--    76    ioFlMdDat     long word
  27168.  
  27169. PBGetFInfo returns information about the specified file. If ioFDirIndex is positive,
  27170. the File Manager returns information about the file whose directory index is ioFDirIndex
  27171. on the volume specified by ioVRefNum. (See the section
  27172. “Data Organization on Volumes” if you’re interested in using this method.)
  27173.  
  27174. Note:  If a working directory reference number is specified in ioVRefNum,
  27175.        the File Manager returns information about the file whose directory
  27176.        index is ioFDirIndex in the specified directory.
  27177.  
  27178. If ioFDirIndex is negative or 0, the File Manager returns information about the file
  27179. having the name pointed to by ioNamePtr (and on flat volumes, the version number
  27180. ioFVersNum) on the volume specified by ioVRefNum. If the file is open, the reference
  27181. number of the first access path found is returned in ioFRefNum, and the name of the
  27182. file is returned in ioNamePtr (unless ioNamePtr is NIL).
  27183.  
  27184. Result codes    noErr     No error
  27185.                 bdNamErr  Bad file name
  27186.                 extFSErr  External file system
  27187.                 fnfErr    File not found
  27188.                 ioErr     I/O error
  27189.                 nsvErr    No such volume
  27190.                 paramErr  No default volume
  27191.  
  27192. æKY PBGetFInfoAsync
  27193. æFp Files.p
  27194. æT FUNCTION
  27195. æTN A40C
  27196. æD FUNCTION PBGetFInfoAsync(paramBlock: ParmBlkPtr): OSErr;
  27197.     INLINE $205F,$A40C,$3E80;
  27198. æDT myVariable := PBGetFInfoAsync(paramBlock,A0);
  27199. æRT 24
  27200. æRI II-115, IV-148, N24-1, N68-1
  27201. æC 
  27202. Trap macro    _GetFileInfo
  27203.  
  27204. Parameter block
  27205.   -->    12    ioCompletion  pointer
  27206.   <--    16    ioResult      word
  27207.   <->    18    ioNamePtr     pointer
  27208.   -->    22    ioVRefNum     word
  27209.   <--    24    ioFRefNum     word
  27210.   -->    26    ioFVersNum    byte
  27211.   -->    28    ioFDirIndex   word
  27212.   <--    30    ioFlAttrib    byte
  27213.   <--    31    ioFlVersNum   byte
  27214.   <--    32    ioFlFndrInfo  16 bytes
  27215.   <--    48    ioFlNum       long word
  27216.   <--    52    ioFlStBlk     word
  27217.   <--    54    ioFlLgLen     long word
  27218.   <--    58    ioFlPyLen     long word
  27219.   <--    62    ioFlRStBlk    word
  27220.   <--    64    ioFlRLgLen    long word
  27221.   <--    68    ioFlRPyLen    long word
  27222.   <--    72    ioFlCrDat     long word
  27223.   <--    76    ioFlMdDat     long word
  27224.  
  27225. PBGetFInfo returns information about the specified file. If ioFDirIndex is positive,
  27226. the File Manager returns information about the file whose directory index is ioFDirIndex
  27227. on the volume specified by ioVRefNum. (See the section
  27228. “Data Organization on Volumes” if you’re interested in using this method.)
  27229.  
  27230. Note:  If a working directory reference number is specified in ioVRefNum,
  27231.        the File Manager returns information about the file whose directory
  27232.        index is ioFDirIndex in the specified directory.
  27233.  
  27234. If ioFDirIndex is negative or 0, the File Manager returns information about the file
  27235. having the name pointed to by ioNamePtr (and on flat volumes, the version number
  27236. ioFVersNum) on the volume specified by ioVRefNum. If the file is open, the reference
  27237. number of the first access path found is returned in ioFRefNum, and the name of the
  27238. file is returned in ioNamePtr (unless ioNamePtr is NIL).
  27239.  
  27240. Result codes    noErr     No error
  27241.                 bdNamErr  Bad file name
  27242.                 extFSErr  External file system
  27243.                 fnfErr    File not found
  27244.                 ioErr     I/O error
  27245.                 nsvErr    No such volume
  27246.                 paramErr  No default volume
  27247.  
  27248. æKY PBSetFInfo
  27249. æFp Files.p
  27250. æT FUNCTION
  27251. æD FUNCTION PBSetFInfo(paramBlock: ParmBlkPtr;async: BOOLEAN): OSErr;
  27252. æDT myVariable := PBSetFInfo(paramBlock,async);
  27253. æRI II-116, IV-150
  27254. æC 
  27255. Trap macro    _SetFileInfo
  27256.  
  27257. Parameter block
  27258.   -->    12    ioCompletion  pointer
  27259.   <--    16    ioResult      word
  27260.   -->    18    ioNamePtr     pointer
  27261.   -->    22    ioVRefNum     word
  27262.   -->    26    ioFVersNum    byte
  27263.   -->    32    ioFlFndrInfo  16 bytes
  27264.   -->    72    ioFlCrDat     long word
  27265.   -->    76    ioFlMdDat     long word
  27266.  
  27267. PBSetFInfo sets information (including the date and time of creation and modification,
  27268. and information needed by the Finder) about the file having the name pointed to by
  27269. ioNamePtr (and on flat volumes, the version number ioFVersNum) on the volume specified
  27270. by ioVRefNum. You should call PBGetFInfo just before PBSetFInfo, so the current
  27271. information is present in the parameter block.
  27272.  
  27273. Result codes    noErr     No error
  27274.                 bdNamErr  Bad file name
  27275.                 extFSErr  External file system
  27276.                 fLckdErr  File locked
  27277.                 fnfErr    File not found
  27278.                 ioErr     I/O error
  27279.                 nsvErr    No such volume
  27280.                 vLckdErr  Software volume lock
  27281.                 wPrErr    Hardware volume lock
  27282.  
  27283. æKY PBSetFInfoSync
  27284. æFp Files.p
  27285. æT FUNCTION
  27286. æTN A00D
  27287. æD FUNCTION PBSetFInfoSync(paramBlock: ParmBlkPtr): OSErr;
  27288.     INLINE $205F,$A00D,$3E80;
  27289. æDT myVariable := PBSetFInfoSync(paramBlock,A0);
  27290. æRI II-116, IV-150
  27291. æC 
  27292. Trap macro    _SetFileInfo
  27293.  
  27294. Parameter block
  27295.   -->    12    ioCompletion  pointer
  27296.   <--    16    ioResult      word
  27297.   -->    18    ioNamePtr     pointer
  27298.   -->    22    ioVRefNum     word
  27299.   -->    26    ioFVersNum    byte
  27300.   -->    32    ioFlFndrInfo  16 bytes
  27301.   -->    72    ioFlCrDat     long word
  27302.   -->    76    ioFlMdDat     long word
  27303.  
  27304. PBSetFInfo sets information (including the date and time of creation and modification,
  27305. and information needed by the Finder) about the file having the name pointed to by
  27306. ioNamePtr (and on flat volumes, the version number ioFVersNum) on the volume specified
  27307. by ioVRefNum. You should call PBGetFInfo just before PBSetFInfo, so the current
  27308. information is present in the parameter block.
  27309.  
  27310. Result codes    noErr     No error
  27311.                 bdNamErr  Bad file name
  27312.                 extFSErr  External file system
  27313.                 fLckdErr  File locked
  27314.                 fnfErr    File not found
  27315.                 ioErr     I/O error
  27316.                 nsvErr    No such volume
  27317.                 vLckdErr  Software volume lock
  27318.                 wPrErr    Hardware volume lock
  27319.  
  27320. æKY PBSetFInfoAsync
  27321. æFp Files.p
  27322. æT FUNCTION
  27323. æTN A40D
  27324. æD FUNCTION PBSetFInfoAsync(paramBlock: ParmBlkPtr): OSErr;
  27325.     INLINE $205F,$A40D,$3E80;
  27326. æDT myVariable := PBSetFInfoAsync(paramBlock,A0);
  27327. æRI II-116, IV-150
  27328. æC 
  27329. Trap macro    _SetFileInfo
  27330.  
  27331. Parameter block
  27332.   -->    12    ioCompletion  pointer
  27333.   <--    16    ioResult      word
  27334.   -->    18    ioNamePtr     pointer
  27335.   -->    22    ioVRefNum     word
  27336.   -->    26    ioFVersNum    byte
  27337.   -->    32    ioFlFndrInfo  16 bytes
  27338.   -->    72    ioFlCrDat     long word
  27339.   -->    76    ioFlMdDat     long word
  27340.  
  27341. PBSetFInfo sets information (including the date and time of creation and modification,
  27342. and information needed by the Finder) about the file having the name pointed to by
  27343. ioNamePtr (and on flat volumes, the version number ioFVersNum) on the volume specified
  27344. by ioVRefNum. You should call PBGetFInfo just before PBSetFInfo, so the current
  27345. information is present in the parameter block.
  27346.  
  27347. Result codes    noErr     No error
  27348.                 bdNamErr  Bad file name
  27349.                 extFSErr  External file system
  27350.                 fLckdErr  File locked
  27351.                 fnfErr    File not found
  27352.                 ioErr     I/O error
  27353.                 nsvErr    No such volume
  27354.                 vLckdErr  Software volume lock
  27355.                 wPrErr    Hardware volume lock
  27356.  
  27357. æKY PBSetFLock
  27358. æFp Files.p
  27359. æT FUNCTION
  27360. æD FUNCTION PBSetFLock(paramBlock: ParmBlkPtr;async: BOOLEAN): OSErr;
  27361. æDT myVariable := PBSetFLock(paramBlock,async);
  27362. æRI II-116, IV-151
  27363. æC 
  27364. Trap macro    _SetFilLock
  27365.  
  27366. Parameter block
  27367.   -->    12    ioCompletion  pointer
  27368.   <--    16    ioResult      word
  27369.   -->    18    ioNamePtr     pointer
  27370.   -->    22    ioVRefNum     word
  27371.   -->    26    ioFVersNum    byte
  27372.  
  27373. PBSetFLock locks the file having the name pointed to by ioNamePtr (and on flat volumes,
  27374. the version number ioFVersNum) on the volume specified by ioVRefNum. Access paths
  27375. currently in use aren’t affected.
  27376.  
  27377. Result codes    noErr     No error
  27378.                 extFSErr  External file system
  27379.                 fnfErr    File not found
  27380.                 ioErr     I/O error
  27381.                 nsvErr    No such volume
  27382.                 vLckdErr  Software volume lock
  27383.                 wPrErr    Hardware volume lock
  27384.  
  27385. æKY PBSetFLockSync
  27386. æFp Files.p
  27387. æT FUNCTION
  27388. æTN A041
  27389. æD FUNCTION PBSetFLockSync(paramBlock: ParmBlkPtr): OSErr;
  27390.     INLINE $205F,$A041,$3E80;
  27391. æDT myVariable := PBSetFLockSync(paramBlock,A0);
  27392. æRI II-116, IV-151
  27393. æC 
  27394. Trap macro    _SetFilLock
  27395.  
  27396. Parameter block
  27397.   -->    12    ioCompletion  pointer
  27398.   <--    16    ioResult      word
  27399.   -->    18    ioNamePtr     pointer
  27400.   -->    22    ioVRefNum     word
  27401.   -->    26    ioFVersNum    byte
  27402.  
  27403. PBSetFLock locks the file having the name pointed to by ioNamePtr (and on flat volumes,
  27404. the version number ioFVersNum) on the volume specified by ioVRefNum. Access paths
  27405. currently in use aren’t affected.
  27406.  
  27407. Result codes    noErr     No error
  27408.                 extFSErr  External file system
  27409.                 fnfErr    File not found
  27410.                 ioErr     I/O error
  27411.                 nsvErr    No such volume
  27412.                 vLckdErr  Software volume lock
  27413.                 wPrErr    Hardware volume lock
  27414.  
  27415. æKY PBSetFLockAsync
  27416. æFp Files.p
  27417. æT FUNCTION
  27418. æTN A441
  27419. æD FUNCTION PBSetFLockAsync(paramBlock: ParmBlkPtr): OSErr;
  27420.     INLINE $205F,$A441,$3E80;
  27421. æDT myVariable := PBSetFLockAsync(paramBlock,A0);
  27422. æRI II-116, IV-151
  27423. æC 
  27424. Trap macro    _SetFilLock
  27425.  
  27426. Parameter block
  27427.   -->    12    ioCompletion  pointer
  27428.   <--    16    ioResult      word
  27429.   -->    18    ioNamePtr     pointer
  27430.   -->    22    ioVRefNum     word
  27431.   -->    26    ioFVersNum    byte
  27432.  
  27433. PBSetFLock locks the file having the name pointed to by ioNamePtr (and on flat volumes,
  27434. the version number ioFVersNum) on the volume specified by ioVRefNum. Access paths
  27435. currently in use aren’t affected.
  27436.  
  27437. Result codes    noErr     No error
  27438.                 extFSErr  External file system
  27439.                 fnfErr    File not found
  27440.                 ioErr     I/O error
  27441.                 nsvErr    No such volume
  27442.                 vLckdErr  Software volume lock
  27443.                 wPrErr    Hardware volume lock
  27444.  
  27445. æKY PBRstFLock
  27446. æFp Files.p
  27447. æT FUNCTION
  27448. æD FUNCTION PBRstFLock(paramBlock: ParmBlkPtr;async: BOOLEAN): OSErr;
  27449. æDT myVariable := PBRstFLock(paramBlock,async);
  27450. æRI II-117, IV-152
  27451. æC 
  27452. Trap macro    _RstFilLock
  27453.  
  27454. Parameter block
  27455.   -->    12    ioCompletion  pointer
  27456.   <--    16    ioResult      word
  27457.   -->    18    ioNamePtr     pointer
  27458.   -->    22    ioVRefNum     word
  27459.   -->    26    ioFVersNum    byte
  27460.  
  27461. PBRstFLock unlocks the file having the name pointed to by ioNamePtr (and on flat
  27462. volumes, the version number ioFVersNum) on the volume specified by ioVRefNum. Access
  27463. paths currently in use aren’t affected.
  27464.  
  27465. Result codes    noErr     No error
  27466.                 extFSErr  External file system
  27467.                 fnfErr    File not found
  27468.                 ioErr     I/O error
  27469.                 nsvErr    No such volume
  27470.                 vLckdErr  Software volume lock
  27471.                 wPrErr    Hardware volume lock
  27472.  
  27473. æKY PBRstFLockSync
  27474. æFp Files.p
  27475. æT FUNCTION
  27476. æTN A042
  27477. æD FUNCTION PBRstFLockSync(paramBlock: ParmBlkPtr): OSErr;
  27478.     INLINE $205F,$A042,$3E80;
  27479. æDT myVariable := PBRstFLockSync(paramBlock,A0);
  27480. æRI II-117, IV-152
  27481. æC 
  27482. Trap macro    _RstFilLock
  27483.  
  27484. Parameter block
  27485.   -->    12    ioCompletion  pointer
  27486.   <--    16    ioResult      word
  27487.   -->    18    ioNamePtr     pointer
  27488.   -->    22    ioVRefNum     word
  27489.   -->    26    ioFVersNum    byte
  27490.  
  27491. PBRstFLock unlocks the file having the name pointed to by ioNamePtr (and on flat
  27492. volumes, the version number ioFVersNum) on the volume specified by ioVRefNum. Access
  27493. paths currently in use aren’t affected.
  27494.  
  27495. Result codes    noErr     No error
  27496.                 extFSErr  External file system
  27497.                 fnfErr    File not found
  27498.                 ioErr     I/O error
  27499.                 nsvErr    No such volume
  27500.                 vLckdErr  Software volume lock
  27501.                 wPrErr    Hardware volume lock
  27502.  
  27503. æKY PBRstFLockAsync
  27504. æFp Files.p
  27505. æT FUNCTION
  27506. æTN A442
  27507. æD FUNCTION PBRstFLockAsync(paramBlock: ParmBlkPtr): OSErr;
  27508.     INLINE $205F,$A442,$3E80;
  27509. æDT myVariable := PBRstFLockAsync(paramBlock,A0);
  27510. æRI II-117, IV-152
  27511. æC 
  27512. Trap macro    _RstFilLock
  27513.  
  27514. Parameter block
  27515.   -->    12    ioCompletion  pointer
  27516.   <--    16    ioResult      word
  27517.   -->    18    ioNamePtr     pointer
  27518.   -->    22    ioVRefNum     word
  27519.   -->    26    ioFVersNum    byte
  27520.  
  27521. PBRstFLock unlocks the file having the name pointed to by ioNamePtr (and on flat
  27522. volumes, the version number ioFVersNum) on the volume specified by ioVRefNum. Access
  27523. paths currently in use aren’t affected.
  27524.  
  27525. Result codes    noErr     No error
  27526.                 extFSErr  External file system
  27527.                 fnfErr    File not found
  27528.                 ioErr     I/O error
  27529.                 nsvErr    No such volume
  27530.                 vLckdErr  Software volume lock
  27531.                 wPrErr    Hardware volume lock
  27532.  
  27533. æKY PBSetFVers
  27534. æFp Files.p
  27535. æT FUNCTION
  27536. æD FUNCTION PBSetFVers(paramBlock: ParmBlkPtr;async: BOOLEAN): OSErr;
  27537. æDT myVariable := PBSetFVers(paramBlock,async);
  27538. æRI II-117, IV-153
  27539. æC 
  27540. Trap macro    _SetFilType
  27541.  
  27542. Parameter block
  27543.   -->    12    ioCompletion  pointer
  27544.   <--    16    ioResult      word
  27545.   -->    18    ioNamePtr     pointer
  27546.   -->    22    ioVRefNum     word
  27547.   -->    26    ioVersNum     byte
  27548.   -->    28    ioMisc        byte
  27549.  
  27550. PBSetFVers has no effect on hierarchical volumes. On flat volumes, PBSetFVers changes
  27551. the version number of the file having the name pointed to by ioNamePtr and version
  27552. number ioVersNum, on the volume specified by ioVRefNum, to the version number stored
  27553. in the high-order byte of ioMisc. Access paths currently in use aren’t affected.
  27554.  
  27555. Result codes    noErr         No error
  27556.                 bdNamErr      Bad file name
  27557.                 dupFNErr      Duplicate file name and version
  27558.                 extFSErr      External file system
  27559.                 fLckdErr      File locked
  27560.                 fnfErr        File not found
  27561.                 nsvErr        No such volume
  27562.                 ioErr         I/O error
  27563.                 paramErr      No default volume
  27564.                 vLckdErr      Software volume lock
  27565.                 wPrErr        Hardware volume lock
  27566.                 wrgVolTypErr  Attempt to perform hierarchical operation
  27567.                               on a flat volume
  27568.     
  27569.  
  27570. æKY PBSetFVersSync
  27571. æFp Files.p
  27572. æT FUNCTION
  27573. æTN A043
  27574. æD FUNCTION PBSetFVersSync(paramBlock: ParmBlkPtr): OSErr;
  27575.     INLINE $205F,$A043,$3E80;
  27576. æDT myVariable := PBSetFVersSync(paramBlock,A0);
  27577. æRI II-117, IV-153
  27578. æC 
  27579. Trap macro    _SetFilType
  27580.  
  27581. Parameter block
  27582.   -->    12    ioCompletion  pointer
  27583.   <--    16    ioResult      word
  27584.   -->    18    ioNamePtr     pointer
  27585.   -->    22    ioVRefNum     word
  27586.   -->    26    ioVersNum     byte
  27587.   -->    28    ioMisc        byte
  27588.  
  27589. PBSetFVers has no effect on hierarchical volumes. On flat volumes, PBSetFVers changes
  27590. the version number of the file having the name pointed to by ioNamePtr and version
  27591. number ioVersNum, on the volume specified by ioVRefNum, to the version number stored
  27592. in the high-order byte of ioMisc. Access paths currently in use aren’t affected.
  27593.  
  27594. Result codes    noErr         No error
  27595.                 bdNamErr      Bad file name
  27596.                 dupFNErr      Duplicate file name and version
  27597.                 extFSErr      External file system
  27598.                 fLckdErr      File locked
  27599.                 fnfErr        File not found
  27600.                 nsvErr        No such volume
  27601.                 ioErr         I/O error
  27602.                 paramErr      No default volume
  27603.                 vLckdErr      Software volume lock
  27604.                 wPrErr        Hardware volume lock
  27605.                 wrgVolTypErr  Attempt to perform hierarchical operation
  27606.                               on a flat volume
  27607.     
  27608.  
  27609. æKY PBSetFVersAsync
  27610. æFp Files.p
  27611. æT FUNCTION
  27612. æTN A443
  27613. æD FUNCTION PBSetFVersAsync(paramBlock: ParmBlkPtr): OSErr;
  27614.     INLINE $205F,$A443,$3E80;
  27615. æDT myVariable := PBSetFVersAsync(paramBlock,A0);
  27616. æRI II-117, IV-153
  27617. æC 
  27618. Trap macro    _SetFilType
  27619.  
  27620. Parameter block
  27621.   -->    12    ioCompletion  pointer
  27622.   <--    16    ioResult      word
  27623.   -->    18    ioNamePtr     pointer
  27624.   -->    22    ioVRefNum     word
  27625.   -->    26    ioVersNum     byte
  27626.   -->    28    ioMisc        byte
  27627.  
  27628. PBSetFVers has no effect on hierarchical volumes. On flat volumes, PBSetFVers changes
  27629. the version number of the file having the name pointed to by ioNamePtr and version
  27630. number ioVersNum, on the volume specified by ioVRefNum, to the version number stored
  27631. in the high-order byte of ioMisc. Access paths currently in use aren’t affected.
  27632.  
  27633. Result codes    noErr         No error
  27634.                 bdNamErr      Bad file name
  27635.                 dupFNErr      Duplicate file name and version
  27636.                 extFSErr      External file system
  27637.                 fLckdErr      File locked
  27638.                 fnfErr        File not found
  27639.                 nsvErr        No such volume
  27640.                 ioErr         I/O error
  27641.                 paramErr      No default volume
  27642.                 vLckdErr      Software volume lock
  27643.                 wPrErr        Hardware volume lock
  27644.                 wrgVolTypErr  Attempt to perform hierarchical operation
  27645.                               on a flat volume
  27646.     
  27647.  
  27648. æKY PBAllocate
  27649. æFp Files.p
  27650. æT FUNCTION
  27651. æD FUNCTION PBAllocate(paramBlock: ParmBlkPtr;async: BOOLEAN): OSErr;
  27652. æDT myVariable := PBAllocate(paramBlock,async);
  27653. æRI II-113, IV-143
  27654. æC 
  27655. Trap macro    _Allocate
  27656.  
  27657. Parameter block
  27658.   -->    12    ioCompletion  pointer
  27659.   <--    16    ioResult      word
  27660.   -->    24    ioRefNum      word
  27661.   -->    36    ioReqCount    long word
  27662.   <--    40    ioActCount    long word
  27663.  
  27664. PBAllocate adds ioReqCount bytes to the open file whose access path is specified by
  27665. ioRefNum, and sets the physical end-of-file to one byte beyond the last block allocated.
  27666. The number of bytes actually allocated is rounded up to the nearest multiple of the
  27667. allocation block size, and returned in ioActCount. If there isn’t enough empty space
  27668. on the volume to satisfy the allocation request, PBAllocate allocates the rest of the
  27669. space on the volume and returns dskFulErr as its function result.
  27670.  
  27671. Note:  Even if the total number of requested bytes is unavailable,
  27672.        PBAllocate will allocate whatever space, contiguous or not, is
  27673.        available. To force the allocation of the entire requested space
  27674.        as a contiguous piece, call PBAllocContig instead.
  27675.  
  27676. Result codes    noErr      No error
  27677.                 dskFulErr  Disk full
  27678.                 fLckdErr   File locked
  27679.                 fnOpnErr   File not open
  27680.                 ioErr      I/O error
  27681.                 rfNumErr   Bad reference number
  27682.                 vLckdErr   Software volume lock
  27683.                 wPrErr     Hardware volume lock
  27684.                 wrPermErr  Read/write permission doesn’t allow writing
  27685.  
  27686. æKY PBAllocateSync
  27687. æFp Files.p
  27688. æT FUNCTION
  27689. æTN A010
  27690. æD FUNCTION PBAllocateSync(paramBlock: ParmBlkPtr): OSErr;
  27691.     INLINE $205F,$A010,$3E80;
  27692. æDT myVariable := PBAllocateSync(paramBlock,A0);
  27693. æRI II-113, IV-143
  27694. æC 
  27695. Trap macro    _Allocate
  27696.  
  27697. Parameter block
  27698.   -->    12    ioCompletion  pointer
  27699.   <--    16    ioResult      word
  27700.   -->    24    ioRefNum      word
  27701.   -->    36    ioReqCount    long word
  27702.   <--    40    ioActCount    long word
  27703.  
  27704. PBAllocate adds ioReqCount bytes to the open file whose access path is specified by
  27705. ioRefNum, and sets the physical end-of-file to one byte beyond the last block allocated.
  27706. The number of bytes actually allocated is rounded up to the nearest multiple of the
  27707. allocation block size, and returned in ioActCount. If there isn’t enough empty space
  27708. on the volume to satisfy the allocation request, PBAllocate allocates the rest of the
  27709. space on the volume and returns dskFulErr as its function result.
  27710.  
  27711. Note:  Even if the total number of requested bytes is unavailable,
  27712.        PBAllocate will allocate whatever space, contiguous or not, is
  27713.        available. To force the allocation of the entire requested space
  27714.        as a contiguous piece, call PBAllocContig instead.
  27715.  
  27716. Result codes    noErr      No error
  27717.                 dskFulErr  Disk full
  27718.                 fLckdErr   File locked
  27719.                 fnOpnErr   File not open
  27720.                 ioErr      I/O error
  27721.                 rfNumErr   Bad reference number
  27722.                 vLckdErr   Software volume lock
  27723.                 wPrErr     Hardware volume lock
  27724.                 wrPermErr  Read/write permission doesn’t allow writing
  27725.  
  27726. æKY PBAllocateAsync
  27727. æFp Files.p
  27728. æT FUNCTION
  27729. æTN A410
  27730. æD FUNCTION PBAllocateAsync(paramBlock: ParmBlkPtr): OSErr;
  27731.     INLINE $205F,$A410,$3E80;
  27732. æDT myVariable := PBAllocateAsync(paramBlock,A0);
  27733. æRI II-113, IV-143
  27734. æC 
  27735. Trap macro    _Allocate
  27736.  
  27737. Parameter block
  27738.   -->    12    ioCompletion  pointer
  27739.   <--    16    ioResult      word
  27740.   -->    24    ioRefNum      word
  27741.   -->    36    ioReqCount    long word
  27742.   <--    40    ioActCount    long word
  27743.  
  27744. PBAllocate adds ioReqCount bytes to the open file whose access path is specified by
  27745. ioRefNum, and sets the physical end-of-file to one byte beyond the last block allocated.
  27746. The number of bytes actually allocated is rounded up to the nearest multiple of the
  27747. allocation block size, and returned in ioActCount. If there isn’t enough empty space
  27748. on the volume to satisfy the allocation request, PBAllocate allocates the rest of the
  27749. space on the volume and returns dskFulErr as its function result.
  27750.  
  27751. Note:  Even if the total number of requested bytes is unavailable,
  27752.        PBAllocate will allocate whatever space, contiguous or not, is
  27753.        available. To force the allocation of the entire requested space
  27754.        as a contiguous piece, call PBAllocContig instead.
  27755.  
  27756. Result codes    noErr      No error
  27757.                 dskFulErr  Disk full
  27758.                 fLckdErr   File locked
  27759.                 fnOpnErr   File not open
  27760.                 ioErr      I/O error
  27761.                 rfNumErr   Bad reference number
  27762.                 vLckdErr   Software volume lock
  27763.                 wPrErr     Hardware volume lock
  27764.                 wrPermErr  Read/write permission doesn’t allow writing
  27765.  
  27766. æKY PBGetEOF
  27767. æFp Files.p
  27768. æT FUNCTION
  27769. æD FUNCTION PBGetEOF(paramBlock: ParmBlkPtr;async: BOOLEAN): OSErr;
  27770. æDT myVariable := PBGetEOF(paramBlock,async);
  27771. æRI II-112, IV-142
  27772. æC 
  27773. Trap macro    _GetEOF
  27774.  
  27775. Parameter block
  27776.   -->    12    ioCompletion  pointer
  27777.   <--    16    ioResult      word
  27778.   -->    24    ioRefNum      word
  27779.   <--    28    ioMisc        long word
  27780.  
  27781. PBGetEOF returns, in ioMisc, the logical end-of-file of the open file whose access
  27782. path is specified by ioRefNum.
  27783.  
  27784. Result codes    noErr     No error
  27785.                 extFSErr  External file system
  27786.                 fnOpnErr  File not open
  27787.                 ioErr     I/O error
  27788.                 rfNumErr  Bad reference number
  27789.  
  27790. æKY PBGetEOFSync
  27791. æFp Files.p
  27792. æT FUNCTION
  27793. æTN A011
  27794. æD FUNCTION PBGetEOFSync(paramBlock: ParmBlkPtr): OSErr;
  27795.     INLINE $205F,$A011,$3E80;
  27796. æDT myVariable := PBGetEOFSync(paramBlock,A0);
  27797. æRI II-112, IV-142
  27798. æC 
  27799. Trap macro    _GetEOF
  27800.  
  27801. Parameter block
  27802.   -->    12    ioCompletion  pointer
  27803.   <--    16    ioResult      word
  27804.   -->    24    ioRefNum      word
  27805.   <--    28    ioMisc        long word
  27806.  
  27807. PBGetEOF returns, in ioMisc, the logical end-of-file of the open file whose access
  27808. path is specified by ioRefNum.
  27809.  
  27810. Result codes    noErr     No error
  27811.                 extFSErr  External file system
  27812.                 fnOpnErr  File not open
  27813.                 ioErr     I/O error
  27814.                 rfNumErr  Bad reference number
  27815.  
  27816. æKY PBGetEOFAsync
  27817. æFp Files.p
  27818. æT FUNCTION
  27819. æTN A411
  27820. æD FUNCTION PBGetEOFAsync(paramBlock: ParmBlkPtr): OSErr;
  27821.     INLINE $205F,$A411,$3E80;
  27822. æDT myVariable := PBGetEOFAsync(paramBlock,A0);
  27823. æRI II-112, IV-142
  27824. æC 
  27825. Trap macro    _GetEOF
  27826.  
  27827. Parameter block
  27828.   -->    12    ioCompletion  pointer
  27829.   <--    16    ioResult      word
  27830.   -->    24    ioRefNum      word
  27831.   <--    28    ioMisc        long word
  27832.  
  27833. PBGetEOF returns, in ioMisc, the logical end-of-file of the open file whose access
  27834. path is specified by ioRefNum.
  27835.  
  27836. Result codes    noErr     No error
  27837.                 extFSErr  External file system
  27838.                 fnOpnErr  File not open
  27839.                 ioErr     I/O error
  27840.                 rfNumErr  Bad reference number
  27841.  
  27842. æKY PBSetEOF
  27843. æFp Files.p
  27844. æT FUNCTION
  27845. æD FUNCTION PBSetEOF(paramBlock: ParmBlkPtr;async: BOOLEAN): OSErr;
  27846. æDT myVariable := PBSetEOF(paramBlock,async);
  27847. æRI II-112, IV-142
  27848. æC 
  27849. Trap macro    _SetEOF
  27850.  
  27851. Parameter block
  27852.   -->    12    ioCompletion  pointer
  27853.   <--    16    ioResult      word
  27854.   -->    24    ioRefNum      word
  27855.   -->    28    ioMisc        long word
  27856.  
  27857. PBSetEOF sets the logical end-of-file of the open file, whose access path is specified
  27858. by ioRefNum, to ioMisc. If you attempt to set the logical end-of-file beyond the
  27859. physical end-of-file, another allocation block is added to the file; if there isn’t
  27860. enough space on the volume, no change is made, and PBSetEOF returns dskFulErr as its
  27861. function result. If ioMisc is 0, all space occupied by the file on the volume is
  27862. released.
  27863.  
  27864. Result codes    noErr      No error
  27865.                 dskFulErr  Disk full
  27866.                 extFSErr   External file system
  27867.                 fLckdErr   File locked
  27868.                 fnOpnErr   File not open
  27869.                 ioErr      I/O error
  27870.                 rfNumErr   Bad reference number
  27871.                 vLckdErr   Software volume lock
  27872.                 wPrErr     Hardware volume lock
  27873.                 wrPermErr  Read/write permission doesn’t allow writing
  27874.  
  27875. æKY PBSetEOFSync
  27876. æFp Files.p
  27877. æT FUNCTION
  27878. æTN A012
  27879. æD FUNCTION PBSetEOFSync(paramBlock: ParmBlkPtr): OSErr;
  27880.     INLINE $205F,$A012,$3E80;
  27881. æDT myVariable := PBSetEOFSync(paramBlock,A0);
  27882. æRI II-112, IV-142
  27883. æC 
  27884. Trap macro    _SetEOF
  27885.  
  27886. Parameter block
  27887.   -->    12    ioCompletion  pointer
  27888.   <--    16    ioResult      word
  27889.   -->    24    ioRefNum      word
  27890.   -->    28    ioMisc        long word
  27891.  
  27892. PBSetEOF sets the logical end-of-file of the open file, whose access path is specified
  27893. by ioRefNum, to ioMisc. If you attempt to set the logical end-of-file beyond the
  27894. physical end-of-file, another allocation block is added to the file; if there isn’t
  27895. enough space on the volume, no change is made, and PBSetEOF returns dskFulErr as its
  27896. function result. If ioMisc is 0, all space occupied by the file on the volume is
  27897. released.
  27898.  
  27899. Result codes    noErr      No error
  27900.                 dskFulErr  Disk full
  27901.                 extFSErr   External file system
  27902.                 fLckdErr   File locked
  27903.                 fnOpnErr   File not open
  27904.                 ioErr      I/O error
  27905.                 rfNumErr   Bad reference number
  27906.                 vLckdErr   Software volume lock
  27907.                 wPrErr     Hardware volume lock
  27908.                 wrPermErr  Read/write permission doesn’t allow writing
  27909.  
  27910. æKY PBSetEOFAsync
  27911. æFp Files.p
  27912. æT FUNCTION
  27913. æTN A412
  27914. æD FUNCTION PBSetEOFAsync(paramBlock: ParmBlkPtr): OSErr;
  27915.     INLINE $205F,$A412,$3E80;
  27916. æDT myVariable := PBSetEOFAsync(paramBlock,A0);
  27917. æRI II-112, IV-142
  27918. æC 
  27919. Trap macro    _SetEOF
  27920.  
  27921. Parameter block
  27922.   -->    12    ioCompletion  pointer
  27923.   <--    16    ioResult      word
  27924.   -->    24    ioRefNum      word
  27925.   -->    28    ioMisc        long word
  27926.  
  27927. PBSetEOF sets the logical end-of-file of the open file, whose access path is specified
  27928. by ioRefNum, to ioMisc. If you attempt to set the logical end-of-file beyond the
  27929. physical end-of-file, another allocation block is added to the file; if there isn’t
  27930. enough space on the volume, no change is made, and PBSetEOF returns dskFulErr as its
  27931. function result. If ioMisc is 0, all space occupied by the file on the volume is
  27932. released.
  27933.  
  27934. Result codes    noErr      No error
  27935.                 dskFulErr  Disk full
  27936.                 extFSErr   External file system
  27937.                 fLckdErr   File locked
  27938.                 fnOpnErr   File not open
  27939.                 ioErr      I/O error
  27940.                 rfNumErr   Bad reference number
  27941.                 vLckdErr   Software volume lock
  27942.                 wPrErr     Hardware volume lock
  27943.                 wrPermErr  Read/write permission doesn’t allow writing
  27944.  
  27945. æKY PBGetFPos
  27946. æFp Files.p
  27947. æT FUNCTION
  27948. æD FUNCTION PBGetFPos(paramBlock: ParmBlkPtr;async: BOOLEAN): OSErr;
  27949. æDT myVariable := PBGetFPos(paramBlock,async);
  27950. æRI II-111, IV-141
  27951. æC 
  27952. Trap macro    _GetFPos
  27953.  
  27954. Parameter block
  27955.   -->    12    ioCompletion  pointer
  27956.   <--    16    ioResult      word
  27957.   -->    24    ioRefNum      word
  27958.   <--    36    ioReqCount    long word
  27959.   <--    40    ioActCount    long word
  27960.   <--    44    ioPosMode     word
  27961.   <--    46    ioPosOffset   long word
  27962.  
  27963. PBGetFPos returns, in ioPosOffset, the mark of the open file whose access path is
  27964. specified by ioRefNum. It sets ioReqCount, ioActCount, and ioPosMode to 0.
  27965.  
  27966. Result codes    noErr     No error
  27967.                 extFSErr  External file system
  27968.                 fnOpnErr  File not open
  27969.                 gfpErr    Error during GetFPos
  27970.                 ioErr     I/O error
  27971.                 rfNumErr  Bad reference number
  27972.  
  27973. æKY PBGetFPosSync
  27974. æFp Files.p
  27975. æT FUNCTION
  27976. æTN A018
  27977. æD FUNCTION PBGetFPosSync(paramBlock: ParmBlkPtr): OSErr;
  27978.     INLINE $205F,$A018,$3E80;
  27979. æDT myVariable := PBGetFPosSync(paramBlock,A0);
  27980. æRI II-111, IV-141
  27981. æC 
  27982. Trap macro    _GetFPos
  27983.  
  27984. Parameter block
  27985.   -->    12    ioCompletion  pointer
  27986.   <--    16    ioResult      word
  27987.   -->    24    ioRefNum      word
  27988.   <--    36    ioReqCount    long word
  27989.   <--    40    ioActCount    long word
  27990.   <--    44    ioPosMode     word
  27991.   <--    46    ioPosOffset   long word
  27992.  
  27993. PBGetFPos returns, in ioPosOffset, the mark of the open file whose access path is
  27994. specified by ioRefNum. It sets ioReqCount, ioActCount, and ioPosMode to 0.
  27995.  
  27996. Result codes    noErr     No error
  27997.                 extFSErr  External file system
  27998.                 fnOpnErr  File not open
  27999.                 gfpErr    Error during GetFPos
  28000.                 ioErr     I/O error
  28001.                 rfNumErr  Bad reference number
  28002.  
  28003. æKY PBGetFPosAsync
  28004. æFp Files.p
  28005. æT FUNCTION
  28006. æTN A418
  28007. æD FUNCTION PBGetFPosAsync(paramBlock: ParmBlkPtr): OSErr;
  28008.     INLINE $205F,$A418,$3E80;
  28009. æDT myVariable := PBGetFPosAsync(paramBlock,A0);
  28010. æRI II-111, IV-141
  28011. æC 
  28012. Trap macro    _GetFPos
  28013.  
  28014. Parameter block
  28015.   -->    12    ioCompletion  pointer
  28016.   <--    16    ioResult      word
  28017.   -->    24    ioRefNum      word
  28018.   <--    36    ioReqCount    long word
  28019.   <--    40    ioActCount    long word
  28020.   <--    44    ioPosMode     word
  28021.   <--    46    ioPosOffset   long word
  28022.  
  28023. PBGetFPos returns, in ioPosOffset, the mark of the open file whose access path is
  28024. specified by ioRefNum. It sets ioReqCount, ioActCount, and ioPosMode to 0.
  28025.  
  28026. Result codes    noErr     No error
  28027.                 extFSErr  External file system
  28028.                 fnOpnErr  File not open
  28029.                 gfpErr    Error during GetFPos
  28030.                 ioErr     I/O error
  28031.                 rfNumErr  Bad reference number
  28032.  
  28033. æKY PBSetFPos
  28034. æFp Files.p
  28035. æT FUNCTION
  28036. æD FUNCTION PBSetFPos(paramBlock: ParmBlkPtr;async: BOOLEAN): OSErr;
  28037. æDT myVariable := PBSetFPos(paramBlock,async);
  28038. æRI II-111, IV-141
  28039. æC 
  28040. Trap macro    _SetFPos
  28041.  
  28042. Parameter block
  28043.   -->    12    ioCompletion  pointer
  28044.   <--    16    ioResult      word
  28045.   -->    24    ioRefNum      word
  28046.   -->    44    ioPosMode     word
  28047.   <->    46    ioPosOffset   long word
  28048.  
  28049. PBSetFPos sets the mark of the open file whose access path is specified by ioRefNum
  28050. to the position specified by ioPosMode and ioPosOffset. The position at which the
  28051. mark is actually set is returned in ioPosOffset. If you try to set the mark past the
  28052. logical end-of-file, PBSetFPos moves the mark to the end-of-file and returns eofErr
  28053. as its function result.
  28054.  
  28055. Result codes    noErr     No error
  28056.                 eofErr    End-of-file
  28057.                 extFSErr  External file system
  28058.                 fnOpnErr  File not open
  28059.                 ioErr     I/O error
  28060.                 posErr    Attempt to position before start of file
  28061.                 rfNumErr  Bad reference number
  28062.  
  28063. æKY PBSetFPosSync
  28064. æFp Files.p
  28065. æT FUNCTION
  28066. æTN A044
  28067. æD FUNCTION PBSetFPosSync(paramBlock: ParmBlkPtr): OSErr;
  28068.     INLINE $205F,$A044,$3E80;
  28069. æDT myVariable := PBSetFPosSync(paramBlock,A0);
  28070. æRI II-111, IV-141
  28071. æC 
  28072. Trap macro    _SetFPos
  28073.  
  28074. Parameter block
  28075.   -->    12    ioCompletion  pointer
  28076.   <--    16    ioResult      word
  28077.   -->    24    ioRefNum      word
  28078.   -->    44    ioPosMode     word
  28079.   <->    46    ioPosOffset   long word
  28080.  
  28081. PBSetFPos sets the mark of the open file whose access path is specified by ioRefNum
  28082. to the position specified by ioPosMode and ioPosOffset. The position at which the
  28083. mark is actually set is returned in ioPosOffset. If you try to set the mark past the
  28084. logical end-of-file, PBSetFPos moves the mark to the end-of-file and returns eofErr
  28085. as its function result.
  28086.  
  28087. Result codes    noErr     No error
  28088.                 eofErr    End-of-file
  28089.                 extFSErr  External file system
  28090.                 fnOpnErr  File not open
  28091.                 ioErr     I/O error
  28092.                 posErr    Attempt to position before start of file
  28093.                 rfNumErr  Bad reference number
  28094.  
  28095. æKY PBSetFPosAsync
  28096. æFp Files.p
  28097. æT FUNCTION
  28098. æTN A444
  28099. æD FUNCTION PBSetFPosAsync(paramBlock: ParmBlkPtr): OSErr;
  28100.     INLINE $205F,$A444,$3E80;
  28101. æDT myVariable := PBSetFPosAsync(paramBlock,A0);
  28102. æRI II-111, IV-141
  28103. æC 
  28104. Trap macro    _SetFPos
  28105.  
  28106. Parameter block
  28107.   -->    12    ioCompletion  pointer
  28108.   <--    16    ioResult      word
  28109.   -->    24    ioRefNum      word
  28110.   -->    44    ioPosMode     word
  28111.   <->    46    ioPosOffset   long word
  28112.  
  28113. PBSetFPos sets the mark of the open file whose access path is specified by ioRefNum
  28114. to the position specified by ioPosMode and ioPosOffset. The position at which the
  28115. mark is actually set is returned in ioPosOffset. If you try to set the mark past the
  28116. logical end-of-file, PBSetFPos moves the mark to the end-of-file and returns eofErr
  28117. as its function result.
  28118.  
  28119. Result codes    noErr     No error
  28120.                 eofErr    End-of-file
  28121.                 extFSErr  External file system
  28122.                 fnOpnErr  File not open
  28123.                 ioErr     I/O error
  28124.                 posErr    Attempt to position before start of file
  28125.                 rfNumErr  Bad reference number
  28126.  
  28127. æKY PBFlushFile
  28128. æFp Files.p
  28129. æT FUNCTION
  28130. æD FUNCTION PBFlushFile(paramBlock: ParmBlkPtr;async: BOOLEAN): OSErr;
  28131. æDT myVariable := PBFlushFile(paramBlock,async);
  28132. æRI II-114, IV-144
  28133. æC 
  28134. Trap macro    _FlushFile
  28135.  
  28136. Parameter block
  28137.   -->    12    ioCompletion  pointer
  28138.   <--    16    ioResult      word
  28139.   -->    24    ioRefNum      word
  28140.  
  28141. PBFlushFile writes the contents of the access path buffer indicated by ioRefNum to
  28142. the volume, and updates the file’s entry in the file directory (or in the file catalog,
  28143. in the case of hierarchical volumes).
  28144.  
  28145. Warning:  Some information stored on the volume won’t be correct
  28146.           until PBFlushVol is called.
  28147.  
  28148. Result codes    noErr      No error
  28149.                 extFSErr   External file system
  28150.                 fnfErr     File not found
  28151.                 fnOpnErr   File not open
  28152.                 ioErr      I/O error
  28153.                 nsvErr     No such volume
  28154.                 rfNumErr   Bad reference number
  28155.  
  28156. æKY PBFlushFileSync
  28157. æFp Files.p
  28158. æT FUNCTION
  28159. æTN A045
  28160. æD FUNCTION PBFlushFileSync(paramBlock: ParmBlkPtr): OSErr;
  28161.     INLINE $205F,$A045,$3E80;
  28162. æDT myVariable := PBFlushFileSync(paramBlock,A0);
  28163. æRI II-114, IV-144
  28164. æC 
  28165. Trap macro    _FlushFile
  28166.  
  28167. Parameter block
  28168.   -->    12    ioCompletion  pointer
  28169.   <--    16    ioResult      word
  28170.   -->    24    ioRefNum      word
  28171.  
  28172. PBFlushFile writes the contents of the access path buffer indicated by ioRefNum to
  28173. the volume, and updates the file’s entry in the file directory (or in the file catalog,
  28174. in the case of hierarchical volumes).
  28175.  
  28176. Warning:  Some information stored on the volume won’t be correct
  28177.           until PBFlushVol is called.
  28178.  
  28179. Result codes    noErr      No error
  28180.                 extFSErr   External file system
  28181.                 fnfErr     File not found
  28182.                 fnOpnErr   File not open
  28183.                 ioErr      I/O error
  28184.                 nsvErr     No such volume
  28185.                 rfNumErr   Bad reference number
  28186.  
  28187. æKY PBFlushFileAsync
  28188. æFp Files.p
  28189. æT FUNCTION
  28190. æTN A445
  28191. æD FUNCTION PBFlushFileAsync(paramBlock: ParmBlkPtr): OSErr;
  28192.     INLINE $205F,$A445,$3E80;
  28193. æDT myVariable := PBFlushFileAsync(paramBlock,A0);
  28194. æRI II-114, IV-144
  28195. æC 
  28196. Trap macro    _FlushFile
  28197.  
  28198. Parameter block
  28199.   -->    12    ioCompletion  pointer
  28200.   <--    16    ioResult      word
  28201.   -->    24    ioRefNum      word
  28202.  
  28203. PBFlushFile writes the contents of the access path buffer indicated by ioRefNum to
  28204. the volume, and updates the file’s entry in the file directory (or in the file catalog,
  28205. in the case of hierarchical volumes).
  28206.  
  28207. Warning:  Some information stored on the volume won’t be correct
  28208.           until PBFlushVol is called.
  28209.  
  28210. Result codes    noErr      No error
  28211.                 extFSErr   External file system
  28212.                 fnfErr     File not found
  28213.                 fnOpnErr   File not open
  28214.                 ioErr      I/O error
  28215.                 nsvErr     No such volume
  28216.                 rfNumErr   Bad reference number
  28217.  
  28218. æKY PBMountVol
  28219. æFp Files.p
  28220. æT FUNCTION
  28221. æTN A00F
  28222. æD FUNCTION PBMountVol(paramBlock: ParmBlkPtr): OSErr;
  28223. æDT myVariable := PBMountVol(paramBlock,A0);
  28224. æMM
  28225. æRT 134
  28226. æRI II-103, IV-128
  28227. æC 
  28228. »Accessing Volumes
  28229.  
  28230. To get the volume reference number of a volume, given the path reference number of a
  28231. file on that volume, both Pascal and assembly-language programmers can call the
  28232. high-level File Manager function GetVRefNum. Assembly-language programmers may prefer
  28233. calling the function GetFCBInfo (described below in the section “Data Structures in
  28234. Memory”).
  28235.  
  28236. FUNCTION PBMountVol (paramBlock:  ParmBlkPtr) :  OSErr;
  28237.  
  28238. Trap macro    _MountVol
  28239.  
  28240. Parameter block
  28241.   <--    16    ioResult   word
  28242.   <->    22    ioVRefNum  word
  28243.  
  28244. PBMountVol mounts the volume in the drive specified by ioVRefNum, and returns a
  28245. volume reference number in ioVRefNum. If there are no volumes already mounted, this
  28246. volume becomes the default volume. PBMountVol is always executed synchronously.
  28247.  
  28248. Note:  When mounting hierarchical volumes, PBMountVol opens two files
  28249.        needed for maintaining file directory and file mapping information.
  28250.        PBMountVol can fail if there are no access paths available for these
  28251.        two files; it will return tmfoErr as its function result.
  28252.  
  28253. Result codes    noErr        No error
  28254.                 badMDBErr    Bad master directory block
  28255.                 extFSErr     External file system
  28256.                 ioErr        I/O error
  28257.                 memFullErr   Not enough room in heap zone
  28258.                 noMacDskErr  Not a Macintosh disk
  28259.                 nsDrvErr     No such drive
  28260.                 paramErr     Bad drive number
  28261.                 tmfoErr      Too many files open
  28262.                 volOnLinErr  Volume already on-line
  28263.  
  28264. æKY PBUnmountVol
  28265. æFp Files.p
  28266. æT FUNCTION
  28267. æTN A00E
  28268. æD FUNCTION PBUnmountVol(paramBlock: ParmBlkPtr): OSErr;
  28269. æDT myVariable := PBUnmountVol(paramBlock,A0);
  28270. æRI II-106, IV-134
  28271. æC 
  28272. Trap macro    _UnmountVol
  28273.  
  28274. Parameter block
  28275.   <--    16    ioResult   word
  28276.   -->    18    ioNamePtr  pointer
  28277.   -->    22    ioVRefNum  word
  28278.  
  28279. PBUnmountVol unmounts the volume specified by ioNamePtr or ioVRefNum, by calling
  28280. PBFlushVol to flush the volume, closing all open files on the volume, and releasing
  28281. the memory used for the volume. PBUnmountVol is always executed synchronously.
  28282.  
  28283. Warning:  Don’t unmount the startup volume.
  28284.  
  28285. Note:  Unmounting a volume does not close working directories; to release
  28286.        the memory allocated to a working directory, call PBCloseWD.
  28287.  
  28288. Result codes    noErr     No error
  28289.                 bdNamErr  Bad volume name
  28290.                 extFSErr  External file system
  28291.                 ioErr     I/O error
  28292.                 nsDrvErr  No such drive
  28293.                 nsvErr    No such volume
  28294.                 paramErr  No default volume
  28295.  
  28296. æKY PBEject
  28297. æFp Files.p
  28298. æT FUNCTION
  28299. æTN A017
  28300. æD FUNCTION PBEject(paramBlock: ParmBlkPtr): OSErr;
  28301. æDT myVariable := PBEject(paramBlock,A0);
  28302. æMM
  28303. æRI II-107, IV-135
  28304. æC 
  28305. Trap macro    _Eject
  28306.  
  28307. Parameter block
  28308.   -->    12    ioCompletion  pointer
  28309.   <--    16    ioResult      word
  28310.   -->    18    ioNamePtr     pointer
  28311.   -->    22    ioVRefNum     word
  28312.  
  28313. PBEject flushes the volume specified by ioNamePtr or ioVRefNum, places it
  28314. off-line, and then ejects the volume.
  28315.  
  28316. Assembly-language note:  You may invoke the macro _Eject asynchronously;
  28317.                          the first part of the call is executed synchronously,
  28318.                          and the actual ejection is executed asynchronously.
  28319.  
  28320. Result codes    noErr     No error
  28321.                 bdNamErr  Bad volume name
  28322.                 extFSErr  External file system
  28323.                 ioErr     I/O error
  28324.                 nsDrvErr  No such drive
  28325.                 nsvErr    No such volume
  28326.                 paramErr  No default volume
  28327.  
  28328. æKY PBOffLine
  28329. æFp Files.p
  28330. æT FUNCTION
  28331. æTN A035
  28332. æD FUNCTION PBOffLine(paramBlock: ParmBlkPtr): OSErr;
  28333. æDT myVariable := PBOffLine(paramBlock,A0);
  28334. æMM
  28335. æRI II-106, IV-134
  28336. æC 
  28337. Trap macro    _OffLine
  28338.  
  28339. Parameter block
  28340.   -->    12    ioCompletion  pointer
  28341.   <--    16    ioResult      word
  28342.   -->    18    ioNamePtr     pointer
  28343.   -->    22    ioVRefNum     word
  28344.  
  28345. PBOffLine places off-line the volume specified by ioNamePtr or ioVRefNum, by calling
  28346. PBFlushVol to flush the volume and releasing all the memory used for the volume
  28347. except for the volume control block. PBOffLine is always executed synchronously.
  28348.  
  28349. Result codes    noErr     No error
  28350.                 bdNamErr  Bad volume name
  28351.                 extFSErr  External file system
  28352.                 ioErr     I/O error
  28353.                 nsDrvErr  No such drive
  28354.                 nsvErr    No such volume
  28355.                 paramErr  No default volume
  28356.  
  28357. æKY PBCatSearch
  28358. æFp Files.p
  28359. æT FUNCTION
  28360. æD FUNCTION PBCatSearch(paramBlock: HParmBlkPtr;async: BOOLEAN): OSErr;
  28361. æDT myVariable := PBCatSearch(paramBlock,async);
  28362. æMM
  28363. æRI PBOffLine function II-106, IV-134
  28364.  
  28365. æC FUNCTION PBOffLine (paramBlock: ParmBlkPtr) : OSErr;
  28366.  
  28367. Trap macro  _OffLine
  28368.  
  28369. Parameter block
  28370.     —>  12  ioCompletion    pointer
  28371.     <—  16  ioResult    word
  28372.     —>  18  ioNamePtr   pointer
  28373.     —>  22  ioVRefNum   word
  28374.  
  28375.     PBOffLine places off-line the volume specified by ioNamePtr or
  28376. ioVRefNum, by calling PBFlushVol to flush the volume and releasing all
  28377. the memory used for the volume except for the volume control block.
  28378. PBOffLine is always executed synchronously.
  28379.  
  28380. Result codes    noErr       No error
  28381.                 bdNamErr    Bad volume name
  28382.                 extFSErr    External file system
  28383.                 ioErr       I/O error
  28384.                 nsDrvErr    No such drive
  28385.                 nsvErr      No such volume
  28386.                 paramErr    No default volume
  28387.  
  28388.  
  28389. æKY PBCatSearchSync
  28390. æFp Files.p
  28391. æT FUNCTION
  28392. æTN 7018,A260
  28393. æD FUNCTION PBCatSearchSync(paramBlock: HParmBlkPtr): OSErr;
  28394.     INLINE $205F,$7018,$A260,$3E80;
  28395. æDT myVariable := PBCatSearchSync(paramBlock,A0);
  28396. æMM
  28397. æRI PBOffLine function II-106, IV-134
  28398.  
  28399. æC FUNCTION PBOffLine (paramBlock: ParmBlkPtr) : OSErr;
  28400.  
  28401. Trap macro  _OffLine
  28402.  
  28403. Parameter block
  28404.     —>  12  ioCompletion    pointer
  28405.     <—  16  ioResult    word
  28406.     —>  18  ioNamePtr   pointer
  28407.     —>  22  ioVRefNum   word
  28408.  
  28409.     PBOffLine places off-line the volume specified by ioNamePtr or
  28410. ioVRefNum, by calling PBFlushVol to flush the volume and releasing all
  28411. the memory used for the volume except for the volume control block.
  28412. PBOffLine is always executed synchronously.
  28413.  
  28414. Result codes    noErr       No error
  28415.                 bdNamErr    Bad volume name
  28416.                 extFSErr    External file system
  28417.                 ioErr       I/O error
  28418.                 nsDrvErr    No such drive
  28419.                 nsvErr      No such volume
  28420.                 paramErr    No default volume
  28421.  
  28422.  
  28423. æKY PBCatSearchAsync
  28424. æFp Files.p
  28425. æT FUNCTION
  28426. æTN 7018,A660
  28427. æD FUNCTION PBCatSearchAsync(paramBlock: HParmBlkPtr): OSErr;
  28428.     INLINE $205F,$7018,$A660,$3E80;
  28429. æDT myVariable := PBCatSearchAsync(paramBlock,A0);
  28430. æMM
  28431. æRI PBOffLine function II-106, IV-134
  28432.  
  28433. æC FUNCTION PBOffLine (paramBlock: ParmBlkPtr) : OSErr;
  28434.  
  28435. Trap macro  _OffLine
  28436.  
  28437. Parameter block
  28438.     —>  12  ioCompletion    pointer
  28439.     <—  16  ioResult    word
  28440.     —>  18  ioNamePtr   pointer
  28441.     —>  22  ioVRefNum   word
  28442.  
  28443.     PBOffLine places off-line the volume specified by ioNamePtr or
  28444. ioVRefNum, by calling PBFlushVol to flush the volume and releasing all
  28445. the memory used for the volume except for the volume control block.
  28446. PBOffLine is always executed synchronously.
  28447.  
  28448. Result codes    noErr       No error
  28449.                 bdNamErr    Bad volume name
  28450.                 extFSErr    External file system
  28451.                 ioErr       I/O error
  28452.                 nsDrvErr    No such drive
  28453.                 nsvErr      No such volume
  28454.                 paramErr    No default volume
  28455.  
  28456.  
  28457. æKY AddDrive
  28458. æFp Files.p
  28459. æT PROCEDURE
  28460. æD PROCEDURE AddDrive(drvrRefNum: INTEGER;drvNum: INTEGER;qEl: DrvQElPtr);
  28461. æDT AddDrive(drvrRefNum,drvNum,qEl);
  28462. æRT 36, 108 
  28463. æRI N36, N108-1
  28464. æC 
  28465.  
  28466. æKY FSOpen
  28467. æFp Files.p
  28468. æT FUNCTION
  28469. æD FUNCTION FSOpen(fileName: Str255;vRefNum: INTEGER;VAR refNum: INTEGER): OSErr;
  28470. æDT myVariable := FSOpen(fileName,vRefNum,refNum);
  28471. æRT 102
  28472. æRI II-91, IV-109, P-131, 171
  28473. æC  
  28474. [Not in ROM]
  28475.  
  28476. FSOpen creates an access path to the file having the name fileName on the volume
  28477. specified by vRefNum. A path reference number is returned in refNum. The access
  28478. path’s read/write permission is set to whatever the file’s open permission allows.
  28479.  
  28480. Note:  There’s no guarantee that any bytes have been written until
  28481.        FlushVol is called.
  28482.  
  28483. Result codes    noErr       No error
  28484.                 bdNamErr    Bad file name
  28485.                 extFSErr    External file system
  28486.                 fnfErr      File not found
  28487.                 ioErr       I/O error
  28488.                 nsvErr      No such volume
  28489.                 opWrErr     File already open for writing
  28490.                 tmfoErr     Too many files open
  28491.  
  28492. æKY OpenDF
  28493. æFp Files.p
  28494. æT FUNCTION
  28495. æD FUNCTION OpenDF(fileName: Str255;vRefNum: INTEGER;VAR refNum: INTEGER): OSErr;
  28496. æDT myVariable := OpenDF(fileName,vRefNum,refNum);
  28497. æRT 102
  28498. æRI II-91, IV-109, P-131, 171
  28499. æC  
  28500. [Not in ROM]
  28501.  
  28502. FSOpen creates an access path to the file having the name fileName on the volume
  28503. specified by vRefNum. A path reference number is returned in refNum. The access
  28504. path’s read/write permission is set to whatever the file’s open permission allows.
  28505.  
  28506. Note:  There’s no guarantee that any bytes have been written until
  28507.        FlushVol is called.
  28508.  
  28509. Result codes    noErr       No error
  28510.                 bdNamErr    Bad file name
  28511.                 extFSErr    External file system
  28512.                 fnfErr      File not found
  28513.                 ioErr       I/O error
  28514.                 nsvErr      No such volume
  28515.                 opWrErr     File already open for writing
  28516.                 tmfoErr     Too many files open
  28517.  
  28518. æKY FSClose
  28519. æFp Files.p
  28520. æT FUNCTION
  28521. æD FUNCTION FSClose(refNum: INTEGER): OSErr;
  28522. æDT myVariable := FSClose(refNum);
  28523. æRT 102
  28524. æRI II-94, IV-112, P-132, 133, 171
  28525. æC  
  28526. [Not in ROM]
  28527.  
  28528. FSClose removes the access path specified by refNum, writes the contents of the
  28529. volume buffer to the volume, and updates the file’s entry in the file directory.
  28530.  
  28531. Note:  There’s no guarantee that any bytes have been written until
  28532.        FlushVol is called.
  28533.  
  28534. Result codes    noErr       No error
  28535.                 extFSErr    External file system
  28536.                 fnfErr      File not found
  28537.                 fnOpnErr    File not open
  28538.                 ioErr       I/O error
  28539.                 nsvErr      No such volume
  28540.                 rfNumErr    Bad reference number
  28541.  
  28542. æKY FSRead
  28543. æFp Files.p
  28544. æT FUNCTION
  28545. æD FUNCTION FSRead(refNum: INTEGER;VAR count: LONGINT;buffPtr: Ptr): OSErr;
  28546. æDT myVariable := FSRead(refNum,count,buffPtr);
  28547. æRI IV-109, P-131, 171
  28548. æC  
  28549. [Not in ROM]
  28550.  
  28551. FSRead attempts to read the number of bytes specified by the count parameter from the
  28552. open file whose access path is specified by refNum, and transfer them to the data
  28553. buffer pointed to by buffPtr. The read operation begins at the current mark, so you
  28554. might want to precede this with a call to SetFPos. If you try to read past the logical
  28555. end-of-file, FSRead moves the mark to the end-of-file and returns eofErr as its
  28556. function result. After the read is completed, the number of bytes actually read is
  28557. returned in the count parameter.
  28558.  
  28559. Result codes    noErr       No error
  28560.                 eofErr      End-of-file
  28561.                 extFSErr    External file system
  28562.                 fnOpnErr    File not open
  28563.                 ioErr       I/O error
  28564.                 paramErr    Negative count
  28565.                 rfNumErr    Bad reference number
  28566.  
  28567. æKY FSWrite
  28568. æFp Files.p
  28569. æT FUNCTION
  28570. æD FUNCTION FSWrite(refNum: INTEGER;VAR count: LONGINT;buffPtr: Ptr): OSErr;
  28571. æDT myVariable := FSWrite(refNum,count,buffPtr);
  28572. æRI IV-110, P-132, 171
  28573. æC  
  28574. [Not in ROM]
  28575.  
  28576. FSWrite takes the number of bytes specified by the count parameter from the buffer
  28577. pointed to by buffPtr and attempts to write them to the open file whose access path
  28578. is specified by refNum. The write operation begins at the current mark, so you might
  28579. want to precede this with a call to SetFPos. After the write is completed, the number
  28580. of bytes actually written is returned in the count parameter.
  28581.  
  28582. Result codes    noErr        No error
  28583.                 dskFulErr    Disk full
  28584.                 fLckdErr     File locked
  28585.                 fnOpnErr     File not open
  28586.                 ioErr        I/O error
  28587.                 paramErr     Negative count
  28588.                 rfNumErr     Bad reference number
  28589.                 vLckdErr     Software volume lock
  28590.                 wPrErr       Hardware volume lock
  28591.                 wrPermErr    Read/write permission doesn’t allow writing
  28592.  
  28593. æKY GetVInfo
  28594. æFp Files.p
  28595. æT FUNCTION
  28596. æD FUNCTION GetVInfo(drvNum: INTEGER;volName: StringPtr;VAR vRefNum: INTEGER;
  28597.     VAR freeBytes: LONGINT): OSErr;
  28598. æDT myVariable := GetVInfo(drvNum,volName,vRefNum,freeBytes);
  28599. æRT 157
  28600. æRI II-89, IV-107, N157, low-level  II-104, IV-129
  28601. æC 
  28602. »Accessing Volumes
  28603.  
  28604. •••Refer to Technical Note #24:•••
  28605.  
  28606. FUNCTION GetVInfo (drvNum:  INTEGER; volName:  StringPtr; VAR vRefNum:  INTEGER;
  28607.                    VAR freeBytes:  LONGINT) :  OSErr; [Not in ROM]
  28608.  
  28609. •••Refer to Technical Note #157:•••
  28610.  
  28611. GetVInfo returns the name, reference number, and available space (in bytes), in
  28612. volName, vRefNum, and freeBytes, for the volume in the drive specified by drvNum.
  28613.  
  28614. Result codes    noErr       No error
  28615.                 nsvErr      No default volume
  28616.                 paramErr    Bad drive number
  28617.  
  28618. æKY GetFInfo
  28619. æFp Files.p
  28620. æT FUNCTION
  28621. æD FUNCTION GetFInfo(fileName: Str255;vRefNum: INTEGER;VAR fndrInfo: FInfo): OSErr;
  28622. æDT myVariable := GetFInfo(fileName,vRefNum,fndrInfo);
  28623. æRI II-95, IV-113
  28624. æC  
  28625. [Not in ROM]
  28626.  
  28627. For the file having the name fileName on the specified volume, GetFInfo returns
  28628. information used by the Finder in fndrInfo (see the section “Information Used by the
  28629. Finder”).
  28630.  
  28631. Result codes    noErr       No error
  28632.                 bdNamErr    Bad file name
  28633.                 extFSErr    External file system
  28634.                 fnfErr      File not found
  28635.                 ioErr       I/O error
  28636.                 nsvErr      No such volume
  28637.                 paramErr    No default volume
  28638.  
  28639. æKY GetVol
  28640. æFp Files.p
  28641. æT FUNCTION
  28642. æD FUNCTION GetVol(volName: StringPtr;VAR vRefNum: INTEGER): OSErr;
  28643. æDT myVariable := GetVol(volName,vRefNum);
  28644. æRT 77,140
  28645. æRI N77-2, N140 high-level  II-89, IV-107  low-level  II-104, IV-131
  28646. æC  
  28647. [Not in ROM]
  28648.  
  28649. GetVol returns the name of the default volume in volName and its volume reference
  28650. number in vRefNum.
  28651.  
  28652. Result codes    noErr     No error
  28653.                 nsvErr    No such volume
  28654.  
  28655. æKY SetVol
  28656. æFp Files.p
  28657. æT FUNCTION
  28658. æD FUNCTION SetVol(volName: StringPtr;vRefNum: INTEGER): OSErr;
  28659. æDT myVariable := SetVol(volName,vRefNum);
  28660. æRI II-89, IV-107  low-level II-105, IV-132
  28661. æC  
  28662. [Not in ROM]
  28663.  
  28664. SetVol sets the default volume to the mounted volume specified by volName or vRefNum.
  28665.  
  28666. Result codes    noErr       No error
  28667.                 bdNamErr    Bad volume name
  28668.                 nsvErr      No such volume
  28669.                 paramErr    No default volume
  28670.  
  28671. æKY UnmountVol
  28672. æFp Files.p
  28673. æT FUNCTION
  28674. æD FUNCTION UnmountVol(volName: StringPtr;vRefNum: INTEGER): OSErr;
  28675. æDT myVariable := UnmountVol(volName,vRefNum);
  28676. æRT 180
  28677. æRI II-90, IV-108  low-level II-106, IV-134
  28678. æC  
  28679. [Not in ROM]
  28680.  
  28681. UnmountVol unmounts the volume specified by volName or vRefNum, by calling FlushVol
  28682. to flush the volume buffer, closing all open files on the volume, and releasing the
  28683. memory used for the volume.
  28684.  
  28685. Warning:  Don’t unmount the startup volume.
  28686.  
  28687. Result codes    noErr        No error
  28688.                 bdNamErr     Bad volume name
  28689.                 extFSErr     External file system
  28690.                 ioErr        I/O error
  28691.                 nsDrvErr     No such drive
  28692.                 nsvErr       No such volume
  28693.                 paramErr     No default volume
  28694.  
  28695. æKY Eject
  28696. æFp Files.p
  28697. æT FUNCTION
  28698. æD FUNCTION Eject(volName: StringPtr;vRefNum: INTEGER): OSErr;
  28699. æDT myVariable := Eject(volName,vRefNum);
  28700. æMM
  28701. æRI II-90, IV-108 low-level  II-107, IV-135
  28702. æC  
  28703. [Not in ROM]
  28704.  
  28705. Eject flushes the volume specified by volName or vRefNum, places it off-line, and
  28706. then ejects the volume.
  28707.  
  28708. Result codes    noErr       No error
  28709.                 bdNamErr    Bad volume name
  28710.                 extFSErr    External file system
  28711.                 ioErr       I/O error
  28712.                 nsDrvErr    No such drive
  28713.                 nsvErr      No such volume
  28714.                 paramErr    No default volume
  28715. paramErr    No default volume
  28716.  
  28717. æKY FlushVol
  28718. æFp Files.p
  28719. æT FUNCTION
  28720. æD FUNCTION FlushVol(volName: StringPtr;vRefNum: INTEGER): OSErr;
  28721. æDT myVariable := FlushVol(volName,vRefNum);
  28722. æMM
  28723. æRI P-132, 133 high-level  II-89, IV-108 low-level  II-105, IV-133
  28724. æC  
  28725. [Not in ROM]
  28726.  
  28727. On the volume specified by volName or vRefNum, FlushVol writes the contents of the
  28728. associated volume buffer and descriptive information about the volume (if they’ve
  28729. changed since the last time FlushVol was called).
  28730.  
  28731. Result codes    noErr       No error
  28732.                 bdNamErr    Bad volume name
  28733.                 extFSErr    External file system
  28734.                 ioErr       I/O error
  28735.                 nsDrvErr    No such drive
  28736.                 nsvErr      No such volume
  28737.                 paramErr    No default volume
  28738.  
  28739. æKY Create
  28740. æFp Files.p
  28741. æT FUNCTION
  28742. æD FUNCTION Create(fileName: Str255;vRefNum: INTEGER;creator: OSType;fileType: OSType): OSErr;
  28743. æDT myVariable := Create(fileName,vRefNum,creator,fileType);
  28744. æRI II-90, IV-112 low-level II-107, IV-145
  28745. æC  
  28746. [Not in ROM]
  28747.  
  28748. Create creates a new file (both forks) with the specified name, file type, and creator
  28749. on the specified volume. (File type and creator are discussed in the Finder Interface
  28750. chapter.) The new file is unlocked and empty. The date and time of its creation and
  28751. last modification are set to the current date and time.
  28752.  
  28753. Result codes    noErr        No error
  28754.                 bdNamErr     Bad file name
  28755.                 dupFNErr     Duplicate file name and version
  28756.                 dirFulErr    File directory full
  28757.                 extFSErr     External file system
  28758.                 ioErr        I/O error
  28759.                 nsvErr       No such volume
  28760.                 vLckdErr     Software volume lock
  28761.                 wPrErr       Hardware volume lock
  28762.  
  28763. æKY FSDelete
  28764. æFp Files.p
  28765. æT FUNCTION
  28766. æD FUNCTION FSDelete(fileName: Str255;vRefNum: INTEGER): OSErr;
  28767. æDT myVariable := FSDelete(fileName,vRefNum);
  28768. æRI II-97, IV-113
  28769. æC 
  28770. [Not in ROM]
  28771.  
  28772. FSDelete removes the closed file having the name fileName from the specified volume.
  28773.  
  28774. Note:  This function will delete both forks of a file.
  28775.  
  28776. Result codes    noErr       No error
  28777.                 bdNamErr    Bad file name
  28778.                 extFSErr    External file system
  28779.                 fBsyErr     File busy
  28780.                 fLckdErr    File locked
  28781.                 fnfErr      File not found
  28782.                 ioErr       I/O error
  28783.                 nsvErr      No such volume
  28784.                 vLckdErr    Software volume lock
  28785.                 wPrErr      Hardware volume lock
  28786.  
  28787. æKY OpenRF
  28788. æFp Files.p
  28789. æT FUNCTION
  28790. æD FUNCTION OpenRF(fileName: Str255;vRefNum: INTEGER;VAR refNum: INTEGER): OSErr;
  28791. æDT myVariable := OpenRF(fileName,vRefNum,refNum);
  28792. æRT 74
  28793. æRI II-91, IV-109 low-level II-109, IV-137
  28794. æC  
  28795. [Not in ROM]
  28796.  
  28797. OpenRF is similar to FSOpen; the only difference is that OpenRF opens the resource
  28798. fork of the specified file rather than the data fork. A path reference number is
  28799. returned in refNum. The access path’s read/write permission is set to whatever the
  28800. file’s open permission allows.
  28801.  
  28802. Note:  Normally you should access a file’s resource fork through the
  28803.        routines of the Resource Manager rather than the File Manager.
  28804.        OpenRF doesn’t read the resource map into memory; it’s really
  28805.        only useful for block-level operations such as copying files.
  28806.  
  28807. Result codes    noErr       No error
  28808.                 bdNamErr    Bad file name
  28809.                 extFSErr    External file system
  28810.                 fnfErr      File not found
  28811.                 ioErr       I/O error
  28812.                 nsvErr      No such volume
  28813.                 opWrErr     File already open for writing
  28814.                 tmfoErr     Too many files open
  28815.  
  28816. æKY Rename
  28817. æFp Files.p
  28818. æT FUNCTION
  28819. æD FUNCTION Rename(oldName: Str255;vRefNum: INTEGER;newName: Str255): OSErr;
  28820. æDT myVariable := Rename(oldName,vRefNum,newName);
  28821. æRI II-96, IV-114  low-level II-118, IV-153
  28822. æC  
  28823. [Not in ROM]
  28824.  
  28825. Given a file name in oldName, Rename changes the name of the file to newName. Access
  28826. paths currently in use aren’t affected. Given a volume name in oldName or a volume
  28827. reference number in vRefNum, Rename changes the name of the specified volume to
  28828. newName.
  28829.  
  28830. Warning:  If you’re renaming a volume, be sure that both names end with a colon.
  28831.  
  28832. Result codes    noErr        No error
  28833.                 bdNamErr     Bad file name
  28834.                 dirFulErr    Directory full
  28835.                 dupFNErr     Duplicate file name
  28836.                 extFSErr     External file system
  28837.                 fLckdErr     File locked
  28838.                 fnfErr       File not found
  28839.                 fsRnErr      Problem during rename
  28840.                 ioErr        I/O error
  28841.                 nsvErr       No such volume
  28842.                 paramErr     No default volume
  28843.                 vLckdErr     Software volume lock
  28844.                 wPrErr       Hardware volume lock
  28845.  
  28846. æKY SetFInfo
  28847. æFp Files.p
  28848. æT FUNCTION
  28849. æD FUNCTION SetFInfo(fileName: Str255;vRefNum: INTEGER;fndrInfo: FInfo): OSErr;
  28850. æDT myVariable := SetFInfo(fileName,vRefNum,fndrInfo);
  28851. æRI II-95, IV-114
  28852. æC  
  28853. [Not in ROM]
  28854.  
  28855. For the file having the name fileName on the specified volume, SetFInfo sets information
  28856. used by the Finder to fndrInfo (see the section “Information Used by the Finder”).
  28857.  
  28858. Result codes    noErr        No error
  28859.                 extFSErr     External file system
  28860.                 fLckdErr     File locked
  28861.                 fnfErr       File not found
  28862.                 ioErr        I/O error
  28863.                 nsvErr       No such volume
  28864.                 vLckdErr     Software volume lock
  28865.                 wPrErr       Hardware volume lock
  28866.  
  28867. æKY SetFLock
  28868. æFp Files.p
  28869. æT FUNCTION
  28870. æD FUNCTION SetFLock(fileName: Str255;vRefNum: INTEGER): OSErr;
  28871. æDT myVariable := SetFLock(fileName,vRefNum);
  28872. æRI II-95, IV-114
  28873. æC  
  28874. [Not in ROM]
  28875.  
  28876. SetFLock locks the file having the name fileName on the specified volume. Access
  28877. paths currently in use aren’t affected.
  28878.  
  28879. Result codes    noErr       No error
  28880.                 extFSErr    External file system
  28881.                 fnfErr      File not found
  28882.                 ioErr       I/O error
  28883.                 nsvErr      No such volume
  28884.                 vLckdErr    Software volume lock
  28885.                 wPrErr      Hardware volume lock
  28886.  
  28887. æKY RstFLock
  28888. æFp Files.p
  28889. æT FUNCTION
  28890. æD FUNCTION RstFLock(fileName: Str255;vRefNum: INTEGER): OSErr;
  28891. æDT myVariable := RstFLock(fileName,vRefNum);
  28892. æRI II-96, IV-114
  28893. æC 
  28894. [Not in ROM]
  28895.  
  28896. RstFLock unlocks the file having the name fileName on the specified volume. Access
  28897. paths currently in use aren’t affected.
  28898.  
  28899. Result codes    noErr       No error
  28900.                 extFSErr    External file system
  28901.                 fnfErr      File not found
  28902.                 ioErr       I/O error
  28903.                 nsvErr      No such volume
  28904.                 vLckdErr    Software volume lock
  28905.                 wPrErr      Hardware volume lock
  28906.  
  28907. æKY Allocate
  28908. æFp Files.p
  28909. æT FUNCTION
  28910. æD FUNCTION Allocate(refNum: INTEGER;VAR count: LONGINT): OSErr;
  28911. æDT myVariable := Allocate(refNum,count);
  28912. æRI IV-143
  28913. æC  
  28914. [Not in ROM]
  28915.  
  28916. Allocate adds the number of bytes specified by the count parameter to the open file
  28917. whose access path is specified by refNum, and sets the physical end-of-file to one
  28918. byte beyond the last block allocated. The number of bytes actually allocated is
  28919. rounded up to the nearest multiple of the allocation block size, and returned in the
  28920. count parameter. If there isn’t enough empty space on the volume to satisfy the
  28921. allocation request, Allocate allocates the rest of the space on the volume and returns
  28922. dskFulErr as its function result.
  28923.  
  28924. Result codes    noErr        No error
  28925.                 dskFulErr    Disk full
  28926.                 fLckdErr     File locked
  28927.                 fnOpnErr     File not open
  28928.                 ioErr        I/O error
  28929.                 rfNumErr     Bad reference number
  28930.                 vLckdErr     Software volume lock
  28931.                 wPrErr       Hardware volume lock
  28932.                 wrPermErr    Read/write permission doesn’t allow writing
  28933.  
  28934. æKY GetEOF
  28935. æFp Files.p
  28936. æT FUNCTION
  28937. æD FUNCTION GetEOF(refNum: INTEGER;VAR logEOF: LONGINT): OSErr;
  28938. æDT myVariable := GetEOF(refNum,logEOF);
  28939. æRI P-132, 172  high-level  II-93, IV-111 low-level  II-112, IV-142
  28940. æC  
  28941. [Not in ROM]
  28942.  
  28943. GetEOF returns, in logEOF, the logical end-of-file of the open file whose access path
  28944. is specified by refNum.
  28945.  
  28946. Result codes    noErr       No error
  28947.                 extFSErr    External file system
  28948.                 fnOpnErr    File not open
  28949.                 ioErr       I/O error
  28950.                 rfNumErr    Bad reference number
  28951.  
  28952. æKY SetEOF
  28953. æFp Files.p
  28954. æT FUNCTION
  28955. æD FUNCTION SetEOF(refNum: INTEGER;logEOF: LONGINT): OSErr;
  28956. æDT myVariable := SetEOF(refNum,logEOF);
  28957. æRI P-132, 180 high-level II-93, IV-111  low-level II-112, IV-142
  28958. æC  
  28959. [Not in ROM]
  28960.  
  28961. SetEOF sets the logical end-of-file of the open file whose access path is specified
  28962. by refNum to the position specified by logEOF. If you attempt to set the logical
  28963. end-of-file beyond the physical end-of-file, the physical end-of-file is set to one
  28964. byte beyond the end of the next free allocation block; if there isn’t enough space on
  28965. the volume, no change is made, and SetEOF returns dskFulErr as its function result.
  28966. If logEOF is 0, all space occupied by the file on the volume is released.
  28967.  
  28968. Result codes    noErr        No error
  28969.                 dskFulErr    Disk full
  28970.                 extFSErr     External file system
  28971.                 fLckdErr     File locked
  28972.                 fnOpnErr     File not open
  28973.                 ioErr        I/O error
  28974.                 rfNumErr     Bad reference number
  28975.                 vLckdErr     Software volume lock
  28976.                 wPrErr       Hardware volume lock
  28977.                 wrPermErr    Read/write permission doesn’t allow writing
  28978.  
  28979. æKY GetFPos
  28980. æFp Files.p
  28981. æT FUNCTION
  28982. æD FUNCTION GetFPos(refNum: INTEGER;VAR filePos: LONGINT): OSErr;
  28983. æDT myVariable := GetFPos(refNum,filePos);
  28984. æRI II-92, IV-110  low-level  II-111, IV-141
  28985. æC  
  28986. [Not in ROM]
  28987.  
  28988. GetFPos returns, in filePos, the mark of the open file whose access path is specified
  28989. by refNum.
  28990.  
  28991. Result codes    noErr        No error
  28992.                 extFSErr     External file system
  28993.                 fnOpnErr     File not open
  28994.                 ioErr        I/O error
  28995.                 rfNumErr     Bad reference number
  28996.  
  28997. æKY SetFPos
  28998. æFp Files.p
  28999. æT FUNCTION
  29000. æD FUNCTION SetFPos(refNum: INTEGER;posMode: INTEGER;posOff: LONGINT): OSErr;
  29001. æDT myVariable := SetFPos(refNum,posMode,posOff);
  29002. æRI P-131, 132, 180  high-level II-93, IV-110 low-level II-111, IV-141
  29003. æC  
  29004. [Not in ROM]
  29005.  
  29006. SetFPos sets the mark of the open file whose access path is specified by refNum to
  29007. the position specified by posMode and posOff (except when posMode is equal to fsAtMark,
  29008. in which case posOff is ignored). PosMode indicates how to position the mark; it must
  29009. contain one of the following values:
  29010.  
  29011. CONST  fsAtMark     = 0;    {at current mark}
  29012.        fsFromStart  = 1;    {set mark relative to beginning of file}
  29013.        fsFromLEOF   = 2;    {set mark relative to logical end-of-file}
  29014.        fsFromMark   = 3;    {set mark relative to current mark}
  29015.  
  29016. If you specify fsAtMark, posOffset is ignored and the mark is left wherever
  29017. it’s currently positioned. If you choose to set the mark (relative to either the
  29018. beginning of the file, the logical end-of-file, or the current mark), posOffset
  29019. specifies the byte offset from the chosen point (either positive or negative) where
  29020. the mark should be set. If you try to set the mark past the logical end-of-file,
  29021. SetFPos moves the mark to the end-of-file and returns eofErr as its function result.
  29022.  
  29023. Result codes    noErr        No error
  29024.                 eofErr       End-of-file
  29025.                 extFSErr     External file system
  29026.                 fnOpnErr     File not open
  29027.                 ioErr        I/O error
  29028.                 posErr       Attempt to position before start of file
  29029.                 rfNumErr     Bad reference number
  29030.  
  29031. æKY GetVRefNum
  29032. æFp Files.p
  29033. æT FUNCTION
  29034. æD FUNCTION GetVRefNum(fileRefNum: INTEGER;VAR vRefNum: INTEGER): OSErr;
  29035. æDT myVariable := GetVRefNum(fileRefNum,vRefNum);
  29036. æRI II-89, IV-107
  29037. æC  
  29038. [Not in ROM]
  29039.  
  29040. Given a path reference number in pathRefNum, GetVRefNum returns the volume reference
  29041. number in vRefNum.
  29042.  
  29043. Result codes    noErr       No error
  29044.                 rfNumErr    Bad reference number
  29045.  
  29046. æKY PBOpenWD
  29047. æFp Files.p
  29048. æT FUNCTION
  29049. æD FUNCTION PBOpenWD(paramBlock: WDPBPtr;async: BOOLEAN): OSErr;
  29050. æDT myVariable := PBOpenWD(paramBlock,async);
  29051. æRT 77, 190
  29052. æRI IV-158, N77-1
  29053. æC 
  29054. Trap macro    _OpenWD
  29055.  
  29056. Parameter block
  29057.   -->    12    ioCompletion  pointer
  29058.   <--    16    ioResult      word
  29059.   -->    18    ioNamePtr     pointer
  29060.   <->    22    ioVRefNum     word
  29061.   -->    28    ioWDProcID    long word
  29062.   -->    48    ioWDDirID     long word
  29063.  
  29064. PBOpenWD takes the directory specified by ioVRefNum, ioWDDirID, and ioWDProcID and
  29065. makes it a working directory. (You can also specify the directory using a combination
  29066. of partial pathname and directory ID.) It returns a working directory reference
  29067. number in ioVRefNum that can be used in subsequent calls.
  29068.  
  29069. If a given directory has already been made a working directory using the same ioWDProcID,
  29070. no new working directory will be opened; instead, the existing working directory
  29071. reference number will be returned. If a given directory was already made a working
  29072. directory using a different ioWDProcID, a new working directory reference number is
  29073. returned.
  29074.  
  29075. Result codes    noErr       No error
  29076.                 tmwdoErr    Too many working directories open
  29077.  
  29078. æKY PBOpenWDSync
  29079. æFp Files.p
  29080. æT FUNCTION
  29081. æTN 7001,A260
  29082. æD FUNCTION PBOpenWDSync(paramBlock: WDPBPtr): OSErr;
  29083.     INLINE $205F,$7001,$A260,$3E80;
  29084. æDT myVariable := PBOpenWDSync(paramBlock,A0);
  29085. æRT 77, 190
  29086. æRI IV-158, N77-1
  29087. æC 
  29088. Trap macro    _OpenWD
  29089.  
  29090. Parameter block
  29091.   -->    12    ioCompletion  pointer
  29092.   <--    16    ioResult      word
  29093.   -->    18    ioNamePtr     pointer
  29094.   <->    22    ioVRefNum     word
  29095.   -->    28    ioWDProcID    long word
  29096.   -->    48    ioWDDirID     long word
  29097.  
  29098. PBOpenWD takes the directory specified by ioVRefNum, ioWDDirID, and ioWDProcID and
  29099. makes it a working directory. (You can also specify the directory using a combination
  29100. of partial pathname and directory ID.) It returns a working directory reference
  29101. number in ioVRefNum that can be used in subsequent calls.
  29102.  
  29103. If a given directory has already been made a working directory using the same ioWDProcID,
  29104. no new working directory will be opened; instead, the existing working directory
  29105. reference number will be returned. If a given directory was already made a working
  29106. directory using a different ioWDProcID, a new working directory reference number is
  29107. returned.
  29108.  
  29109. Result codes    noErr       No error
  29110.                 tmwdoErr    Too many working directories open
  29111.  
  29112. æKY PBOpenWDAsync
  29113. æFp Files.p
  29114. æT FUNCTION
  29115. æTN 7001,A660
  29116. æD FUNCTION PBOpenWDAsync(paramBlock: WDPBPtr): OSErr;
  29117.     INLINE $205F,$7001,$A660,$3E80;
  29118. æDT myVariable := PBOpenWDAsync(paramBlock,A0);
  29119. æRT 77, 190
  29120. æRI IV-158, N77-1
  29121. æC 
  29122. Trap macro    _OpenWD
  29123.  
  29124. Parameter block
  29125.   -->    12    ioCompletion  pointer
  29126.   <--    16    ioResult      word
  29127.   -->    18    ioNamePtr     pointer
  29128.   <->    22    ioVRefNum     word
  29129.   -->    28    ioWDProcID    long word
  29130.   -->    48    ioWDDirID     long word
  29131.  
  29132. PBOpenWD takes the directory specified by ioVRefNum, ioWDDirID, and ioWDProcID and
  29133. makes it a working directory. (You can also specify the directory using a combination
  29134. of partial pathname and directory ID.) It returns a working directory reference
  29135. number in ioVRefNum that can be used in subsequent calls.
  29136.  
  29137. If a given directory has already been made a working directory using the same ioWDProcID,
  29138. no new working directory will be opened; instead, the existing working directory
  29139. reference number will be returned. If a given directory was already made a working
  29140. directory using a different ioWDProcID, a new working directory reference number is
  29141. returned.
  29142.  
  29143. Result codes    noErr       No error
  29144.                 tmwdoErr    Too many working directories open
  29145.  
  29146. æKY PBCloseWD
  29147. æFp Files.p
  29148. æT FUNCTION
  29149. æD FUNCTION PBCloseWD(paramBlock: WDPBPtr;async: BOOLEAN): OSErr;
  29150. æDT myVariable := PBCloseWD(paramBlock,async);
  29151. æRI IV-158      
  29152. æC 
  29153. Trap macro    _CloseWD
  29154.  
  29155. Parameter block
  29156.   -->    12    ioCompletion  pointer
  29157.   <--    16    ioResult      word
  29158.   -->    22    ioVRefNum     word
  29159.  
  29160. PBCloseWD releases the working directory whose working directory reference number is
  29161. specified in ioVRefNum.
  29162.  
  29163. Note:  If a volume reference number is specified in ioVRefNum, PBCloseWD
  29164.        does nothing.
  29165.  
  29166. Result codes    noErr     No error
  29167.                 nsvErr    No such volume
  29168.  
  29169. æKY PBCloseWDSync
  29170. æFp Files.p
  29171. æT FUNCTION
  29172. æTN 7002,A260
  29173. æD FUNCTION PBCloseWDSync(paramBlock: WDPBPtr): OSErr;
  29174.     INLINE $205F,$7002,$A260,$3E80;
  29175. æDT myVariable := PBCloseWDSync(paramBlock,A0);
  29176. æRI IV-158      
  29177. æC 
  29178. Trap macro    _CloseWD
  29179.  
  29180. Parameter block
  29181.   -->    12    ioCompletion  pointer
  29182.   <--    16    ioResult      word
  29183.   -->    22    ioVRefNum     word
  29184.  
  29185. PBCloseWD releases the working directory whose working directory reference number is
  29186. specified in ioVRefNum.
  29187.  
  29188. Note:  If a volume reference number is specified in ioVRefNum, PBCloseWD
  29189.        does nothing.
  29190.  
  29191. Result codes    noErr     No error
  29192.                 nsvErr    No such volume
  29193.  
  29194. æKY PBCloseWDAsync
  29195. æFp Files.p
  29196. æT FUNCTION
  29197. æTN 7002,A660
  29198. æD FUNCTION PBCloseWDAsync(paramBlock: WDPBPtr): OSErr;
  29199.     INLINE $205F,$7002,$A660,$3E80;
  29200. æDT myVariable := PBCloseWDAsync(paramBlock,A0);
  29201. æRI IV-158      
  29202. æC 
  29203. Trap macro    _CloseWD
  29204.  
  29205. Parameter block
  29206.   -->    12    ioCompletion  pointer
  29207.   <--    16    ioResult      word
  29208.   -->    22    ioVRefNum     word
  29209.  
  29210. PBCloseWD releases the working directory whose working directory reference number is
  29211. specified in ioVRefNum.
  29212.  
  29213. Note:  If a volume reference number is specified in ioVRefNum, PBCloseWD
  29214.        does nothing.
  29215.  
  29216. Result codes    noErr     No error
  29217.                 nsvErr    No such volume
  29218.  
  29219. æKY PBHSetVol
  29220. æFp Files.p
  29221. æT FUNCTION
  29222. æD FUNCTION PBHSetVol(paramBlock: WDPBPtr;async: BOOLEAN): OSErr;
  29223. æDT myVariable := PBHSetVol(paramBlock,async);
  29224. æRT 140
  29225. æRI IV-133, N140
  29226. æC 
  29227. •••Refer to Technical Note #140:•••
  29228.  
  29229. Trap macro    _HSetVol
  29230.  
  29231. Parameter block
  29232.   -->    12    ioCompletion  pointer
  29233.   <--    16    ioResult      word
  29234.   -->    18    ioNamePtr     pointer
  29235.   -->    22    ioVRefNum     word
  29236.   -->    48    ioWDDirID     long word
  29237.  
  29238. PBHSetVol sets both the default volume and the default directory. The default directory
  29239. to be used can be specified by either a volume reference number or a working directory
  29240. reference number in ioVRefNum, a directory ID in ioWDDirID, or a pointer to a pathname
  29241. (possibly NIL) in ioNamePtr.
  29242.  
  29243. Note:  Both the default volume and the default directory are used in
  29244.        calls made with no volume name and a volume reference number of zero.
  29245.  
  29246. Result codes    noErr     No error
  29247.                 nsvErr    No default volume
  29248.  
  29249. æKY PBHSetVolSync
  29250. æFp Files.p
  29251. æT FUNCTION
  29252. æTN A215
  29253. æD FUNCTION PBHSetVolSync(paramBlock: WDPBPtr): OSErr;
  29254.     INLINE $205F,$A215,$3E80;
  29255. æDT myVariable := PBHSetVolSync(paramBlock,A0);
  29256. æRT 140
  29257. æRI IV-133, N140
  29258. æC 
  29259. •••Refer to Technical Note #140:•••
  29260.  
  29261. Trap macro    _HSetVol
  29262.  
  29263. Parameter block
  29264.   -->    12    ioCompletion  pointer
  29265.   <--    16    ioResult      word
  29266.   -->    18    ioNamePtr     pointer
  29267.   -->    22    ioVRefNum     word
  29268.   -->    48    ioWDDirID     long word
  29269.  
  29270. PBHSetVol sets both the default volume and the default directory. The default directory
  29271. to be used can be specified by either a volume reference number or a working directory
  29272. reference number in ioVRefNum, a directory ID in ioWDDirID, or a pointer to a pathname
  29273. (possibly NIL) in ioNamePtr.
  29274.  
  29275. Note:  Both the default volume and the default directory are used in
  29276.        calls made with no volume name and a volume reference number of zero.
  29277.  
  29278. Result codes    noErr     No error
  29279.                 nsvErr    No default volume
  29280.  
  29281. æKY PBHSetVolAsync
  29282. æFp Files.p
  29283. æT FUNCTION
  29284. æTN A615
  29285. æD FUNCTION PBHSetVolAsync(paramBlock: WDPBPtr): OSErr;
  29286.     INLINE $205F,$A615,$3E80;
  29287. æDT myVariable := PBHSetVolAsync(paramBlock,A0);
  29288. æRT 140
  29289. æRI IV-133, N140
  29290. æC 
  29291. •••Refer to Technical Note #140:•••
  29292.  
  29293. Trap macro    _HSetVol
  29294.  
  29295. Parameter block
  29296.   -->    12    ioCompletion  pointer
  29297.   <--    16    ioResult      word
  29298.   -->    18    ioNamePtr     pointer
  29299.   -->    22    ioVRefNum     word
  29300.   -->    48    ioWDDirID     long word
  29301.  
  29302. PBHSetVol sets both the default volume and the default directory. The default directory
  29303. to be used can be specified by either a volume reference number or a working directory
  29304. reference number in ioVRefNum, a directory ID in ioWDDirID, or a pointer to a pathname
  29305. (possibly NIL) in ioNamePtr.
  29306.  
  29307. Note:  Both the default volume and the default directory are used in
  29308.        calls made with no volume name and a volume reference number of zero.
  29309.  
  29310. Result codes    noErr     No error
  29311.                 nsvErr    No default volume
  29312.  
  29313. æKY PBHGetVol
  29314. æFp Files.p
  29315. æT FUNCTION
  29316. æD FUNCTION PBHGetVol(paramBlock: WDPBPtr;async: BOOLEAN): OSErr;
  29317. æDT myVariable := PBHGetVol(paramBlock,async);
  29318. æRI IV-132 
  29319. æC 
  29320. Trap macro    _HGetVol
  29321.  
  29322. Parameter block
  29323.   -->    12    ioCompletion  pointer
  29324.   <--    16    ioResult      word
  29325.   <--    18    ioNamePtr     pointer
  29326.   <--    22    ioVRefNum     word
  29327.   <--    28    ioWDProcID    long word
  29328.   <--    32    ioWDVRefNum   word
  29329.   <--    48    ioWDDirID     long word
  29330.  
  29331. PBHGetVol returns the default volume and directory last set by either a PBSetVol or a
  29332. PBHSetVol call. The reference number of the default volume is returned in ioVRefNum.
  29333.  
  29334. Warning:  IOVRefNum will return a working directory reference number
  29335.           (instead of the volume reference number) if, in the last call
  29336.           to PBSetVol or PBHSetVol, a working directory reference number
  29337.           was passed in this field.
  29338.  
  29339. The volume reference number of the volume on which the default directory exists is
  29340. returned in ioWDVRefNum. The directory ID of the default directory is returned in
  29341. ioWDDirID.
  29342.  
  29343. Result codes    noErr     No error
  29344.                 nsvErr    No default volume
  29345.  
  29346. æKY PBHGetVolSync
  29347. æFp Files.p
  29348. æT FUNCTION
  29349. æTN A214
  29350. æD FUNCTION PBHGetVolSync(paramBlock: WDPBPtr): OSErr;
  29351.     INLINE $205F,$A214,$3E80;
  29352. æDT myVariable := PBHGetVolSync(paramBlock,A0);
  29353. æRI IV-132 
  29354. æC 
  29355. Trap macro    _HGetVol
  29356.  
  29357. Parameter block
  29358.   -->    12    ioCompletion  pointer
  29359.   <--    16    ioResult      word
  29360.   <--    18    ioNamePtr     pointer
  29361.   <--    22    ioVRefNum     word
  29362.   <--    28    ioWDProcID    long word
  29363.   <--    32    ioWDVRefNum   word
  29364.   <--    48    ioWDDirID     long word
  29365.  
  29366. PBHGetVol returns the default volume and directory last set by either a PBSetVol or a
  29367. PBHSetVol call. The reference number of the default volume is returned in ioVRefNum.
  29368.  
  29369. Warning:  IOVRefNum will return a working directory reference number
  29370.           (instead of the volume reference number) if, in the last call
  29371.           to PBSetVol or PBHSetVol, a working directory reference number
  29372.           was passed in this field.
  29373.  
  29374. The volume reference number of the volume on which the default directory exists is
  29375. returned in ioWDVRefNum. The directory ID of the default directory is returned in
  29376. ioWDDirID.
  29377.  
  29378. Result codes    noErr     No error
  29379.                 nsvErr    No default volume
  29380.  
  29381. æKY PBHGetVolAsync
  29382. æFp Files.p
  29383. æT FUNCTION
  29384. æTN A614
  29385. æD FUNCTION PBHGetVolAsync(paramBlock: WDPBPtr): OSErr;
  29386.     INLINE $205F,$A614,$3E80;
  29387. æDT myVariable := PBHGetVolAsync(paramBlock,A0);
  29388. æRI IV-132 
  29389. æC 
  29390. Trap macro    _HGetVol
  29391.  
  29392. Parameter block
  29393.   -->    12    ioCompletion  pointer
  29394.   <--    16    ioResult      word
  29395.   <--    18    ioNamePtr     pointer
  29396.   <--    22    ioVRefNum     word
  29397.   <--    28    ioWDProcID    long word
  29398.   <--    32    ioWDVRefNum   word
  29399.   <--    48    ioWDDirID     long word
  29400.  
  29401. PBHGetVol returns the default volume and directory last set by either a PBSetVol or a
  29402. PBHSetVol call. The reference number of the default volume is returned in ioVRefNum.
  29403.  
  29404. Warning:  IOVRefNum will return a working directory reference number
  29405.           (instead of the volume reference number) if, in the last call
  29406.           to PBSetVol or PBHSetVol, a working directory reference number
  29407.           was passed in this field.
  29408.  
  29409. The volume reference number of the volume on which the default directory exists is
  29410. returned in ioWDVRefNum. The directory ID of the default directory is returned in
  29411. ioWDDirID.
  29412.  
  29413. Result codes    noErr     No error
  29414.                 nsvErr    No default volume
  29415.  
  29416. æKY PBCatMove
  29417. æFp Files.p
  29418. æT FUNCTION
  29419. æD FUNCTION PBCatMove(paramBlock: CMovePBPtr;async: BOOLEAN): OSErr;
  29420. æDT myVariable := PBCatMove(paramBlock,async);
  29421. æRI IV-157
  29422. æC 
  29423. •••Refer to Technical Note #226:•••
  29424.  
  29425. Trap macro    _CatMove
  29426.  
  29427. Parameter block
  29428.   -->    12    ioCompletion  pointer
  29429.   <--    16    ioResult      word
  29430.   -->    18    ioNamePtr     pointer
  29431.   -->    22    ioVRefNum     word
  29432.   -->    28    ioNewName     pointer
  29433.   -->    36    ioNewDirID    long word
  29434.   -->    48    ioDirID       long word
  29435.  
  29436. PBCatMove moves files or directories from one directory to another. The name of the
  29437. file or directory to be moved is pointed to by ioNamePtr; ioVRefNum contains either
  29438. the volume reference number or working directory reference number. A directory ID can
  29439. be specified in ioDirID. The name and directory ID of the directory to which the file
  29440. or directory is to be moved are specified by ioNewName and ioNewDirID.
  29441.  
  29442. PBCatMove is strictly a file catalog operation; it does not actually change the
  29443. location of the file or directory on the disk. PBCatMove cannot move a file or directory
  29444. to another volume (that is, ioVRefNum is used in specifying both the source and the
  29445. destination). It also cannot be used to rename files or directories; for that, use
  29446. PBHRename.
  29447.  
  29448. Result codes    noErr      No error
  29449.                 badMovErr  Attempt to move into offspring
  29450.                 bdNamErr   Bad file name or attempt to move into a file
  29451.                 dupFNErr   Duplicate file name and version
  29452.                 fnfErr     File not found
  29453.                 ioErr      I/O error
  29454.                 nsvErr     No such volume
  29455.                 paramErr   No default volume
  29456.                 vLckdErr   Software volume lock
  29457.                 wPrErr     Hardware volume lock
  29458.  
  29459. æKY PBCatMoveSync
  29460. æFp Files.p
  29461. æT FUNCTION
  29462. æTN 7005,A260
  29463. æD FUNCTION PBCatMoveSync(paramBlock: CMovePBPtr): OSErr;
  29464.     INLINE $205F,$7005,$A260,$3E80;
  29465. æDT myVariable := PBCatMoveSync(paramBlock,A0);
  29466. æRI IV-157
  29467. æC 
  29468. •••Refer to Technical Note #226:•••
  29469.  
  29470. Trap macro    _CatMove
  29471.  
  29472. Parameter block
  29473.   -->    12    ioCompletion  pointer
  29474.   <--    16    ioResult      word
  29475.   -->    18    ioNamePtr     pointer
  29476.   -->    22    ioVRefNum     word
  29477.   -->    28    ioNewName     pointer
  29478.   -->    36    ioNewDirID    long word
  29479.   -->    48    ioDirID       long word
  29480.  
  29481. PBCatMove moves files or directories from one directory to another. The name of the
  29482. file or directory to be moved is pointed to by ioNamePtr; ioVRefNum contains either
  29483. the volume reference number or working directory reference number. A directory ID can
  29484. be specified in ioDirID. The name and directory ID of the directory to which the file
  29485. or directory is to be moved are specified by ioNewName and ioNewDirID.
  29486.  
  29487. PBCatMove is strictly a file catalog operation; it does not actually change the
  29488. location of the file or directory on the disk. PBCatMove cannot move a file or directory
  29489. to another volume (that is, ioVRefNum is used in specifying both the source and the
  29490. destination). It also cannot be used to rename files or directories; for that, use
  29491. PBHRename.
  29492.  
  29493. Result codes    noErr      No error
  29494.                 badMovErr  Attempt to move into offspring
  29495.                 bdNamErr   Bad file name or attempt to move into a file
  29496.                 dupFNErr   Duplicate file name and version
  29497.                 fnfErr     File not found
  29498.                 ioErr      I/O error
  29499.                 nsvErr     No such volume
  29500.                 paramErr   No default volume
  29501.                 vLckdErr   Software volume lock
  29502.                 wPrErr     Hardware volume lock
  29503.  
  29504. æKY PBCatMoveAsync
  29505. æFp Files.p
  29506. æT FUNCTION
  29507. æTN 7005,A660
  29508. æD FUNCTION PBCatMoveAsync(paramBlock: CMovePBPtr): OSErr;
  29509.     INLINE $205F,$7005,$A660,$3E80;
  29510. æDT myVariable := PBCatMoveAsync(paramBlock,A0);
  29511. æRI IV-157
  29512. æC 
  29513. •••Refer to Technical Note #226:•••
  29514.  
  29515. Trap macro    _CatMove
  29516.  
  29517. Parameter block
  29518.   -->    12    ioCompletion  pointer
  29519.   <--    16    ioResult      word
  29520.   -->    18    ioNamePtr     pointer
  29521.   -->    22    ioVRefNum     word
  29522.   -->    28    ioNewName     pointer
  29523.   -->    36    ioNewDirID    long word
  29524.   -->    48    ioDirID       long word
  29525.  
  29526. PBCatMove moves files or directories from one directory to another. The name of the
  29527. file or directory to be moved is pointed to by ioNamePtr; ioVRefNum contains either
  29528. the volume reference number or working directory reference number. A directory ID can
  29529. be specified in ioDirID. The name and directory ID of the directory to which the file
  29530. or directory is to be moved are specified by ioNewName and ioNewDirID.
  29531.  
  29532. PBCatMove is strictly a file catalog operation; it does not actually change the
  29533. location of the file or directory on the disk. PBCatMove cannot move a file or directory
  29534. to another volume (that is, ioVRefNum is used in specifying both the source and the
  29535. destination). It also cannot be used to rename files or directories; for that, use
  29536. PBHRename.
  29537.  
  29538. Result codes    noErr      No error
  29539.                 badMovErr  Attempt to move into offspring
  29540.                 bdNamErr   Bad file name or attempt to move into a file
  29541.                 dupFNErr   Duplicate file name and version
  29542.                 fnfErr     File not found
  29543.                 ioErr      I/O error
  29544.                 nsvErr     No such volume
  29545.                 paramErr   No default volume
  29546.                 vLckdErr   Software volume lock
  29547.                 wPrErr     Hardware volume lock
  29548.  
  29549. æKY PBDirCreate
  29550. æFp Files.p
  29551. æT FUNCTION
  29552. æD FUNCTION PBDirCreate(paramBlock: HParmBlkPtr;async: BOOLEAN): OSErr;
  29553. æDT myVariable := PBDirCreate(paramBlock,async);
  29554. æRI IV-146
  29555. æC 
  29556. Trap macro    _DirCreate
  29557.  
  29558. Parameter block
  29559.   -->    12    ioCompletion  pointer
  29560.   <--    16    ioResult      word
  29561.   <->    18    ioNamePtr     pointer
  29562.   -->    22    ioVRefNum     word
  29563.   <->    48    ioDirID       long word
  29564.  
  29565. PBDirCreate is identical to PBHCreate except that it creates a new directory instead
  29566. of a file. You can specify the parent of the directory to be created in ioDirID; if
  29567. it’s 0, the new directory will be placed in the root directory. The directory ID of
  29568. the new directory is returned in ioDirID.
  29569.  
  29570. Warning:  PBDirCreate operates only with the hierarchical version of
  29571.           the File Manager; if used on a Macintosh equipped only with
  29572.           the 64K ROM version of the File Manager, it will generate a
  29573.           system error.
  29574.  
  29575. Result codes    noErr      No error
  29576.                 bdNamErr   Bad file name
  29577.                 dupFNErr   Duplicate file name and version
  29578.                 dirFulErr  File directory full
  29579.                 dirNFErr   Directory not found or incomplete pathname
  29580.                 extFSErr   External file system
  29581.                 ioErr      I/O error
  29582.                 nsvErr     No such volume
  29583.                 vLckdErr   Software volume lock
  29584.                 wPrErr     Hardware volume lock
  29585.     
  29586.  
  29587. æKY PBDirCreateSync
  29588. æFp Files.p
  29589. æT FUNCTION
  29590. æTN 7006,A260
  29591. æD FUNCTION PBDirCreateSync(paramBlock: HParmBlkPtr): OSErr;
  29592.     INLINE $205F,$7006,$A260,$3E80;
  29593. æDT myVariable := PBDirCreateSync(paramBlock,A0);
  29594. æRI IV-146
  29595. æC 
  29596. Trap macro    _DirCreate
  29597.  
  29598. Parameter block
  29599.   -->    12    ioCompletion  pointer
  29600.   <--    16    ioResult      word
  29601.   <->    18    ioNamePtr     pointer
  29602.   -->    22    ioVRefNum     word
  29603.   <->    48    ioDirID       long word
  29604.  
  29605. PBDirCreate is identical to PBHCreate except that it creates a new directory instead
  29606. of a file. You can specify the parent of the directory to be created in ioDirID; if
  29607. it’s 0, the new directory will be placed in the root directory. The directory ID of
  29608. the new directory is returned in ioDirID.
  29609.  
  29610. Warning:  PBDirCreate operates only with the hierarchical version of
  29611.           the File Manager; if used on a Macintosh equipped only with
  29612.           the 64K ROM version of the File Manager, it will generate a
  29613.           system error.
  29614.  
  29615. Result codes    noErr      No error
  29616.                 bdNamErr   Bad file name
  29617.                 dupFNErr   Duplicate file name and version
  29618.                 dirFulErr  File directory full
  29619.                 dirNFErr   Directory not found or incomplete pathname
  29620.                 extFSErr   External file system
  29621.                 ioErr      I/O error
  29622.                 nsvErr     No such volume
  29623.                 vLckdErr   Software volume lock
  29624.                 wPrErr     Hardware volume lock
  29625.     
  29626.  
  29627. æKY PBDirCreateAsync
  29628. æFp Files.p
  29629. æT FUNCTION
  29630. æTN 7006,A660
  29631. æD FUNCTION PBDirCreateAsync(paramBlock: HParmBlkPtr): OSErr;
  29632.     INLINE $205F,$7006,$A660,$3E80;
  29633. æDT myVariable := PBDirCreateAsync(paramBlock,A0);
  29634. æRI IV-146
  29635. æC 
  29636. Trap macro    _DirCreate
  29637.  
  29638. Parameter block
  29639.   -->    12    ioCompletion  pointer
  29640.   <--    16    ioResult      word
  29641.   <->    18    ioNamePtr     pointer
  29642.   -->    22    ioVRefNum     word
  29643.   <->    48    ioDirID       long word
  29644.  
  29645. PBDirCreate is identical to PBHCreate except that it creates a new directory instead
  29646. of a file. You can specify the parent of the directory to be created in ioDirID; if
  29647. it’s 0, the new directory will be placed in the root directory. The directory ID of
  29648. the new directory is returned in ioDirID.
  29649.  
  29650. Warning:  PBDirCreate operates only with the hierarchical version of
  29651.           the File Manager; if used on a Macintosh equipped only with
  29652.           the 64K ROM version of the File Manager, it will generate a
  29653.           system error.
  29654.  
  29655. Result codes    noErr      No error
  29656.                 bdNamErr   Bad file name
  29657.                 dupFNErr   Duplicate file name and version
  29658.                 dirFulErr  File directory full
  29659.                 dirNFErr   Directory not found or incomplete pathname
  29660.                 extFSErr   External file system
  29661.                 ioErr      I/O error
  29662.                 nsvErr     No such volume
  29663.                 vLckdErr   Software volume lock
  29664.                 wPrErr     Hardware volume lock
  29665.     
  29666.  
  29667. æKY PBGetWDInfo
  29668. æFp Files.p
  29669. æT FUNCTION
  29670. æD FUNCTION PBGetWDInfo(paramBlock: WDPBPtr;async: BOOLEAN): OSErr;
  29671. æDT myVariable := PBGetWDInfo(paramBlock,async);
  29672. æRT 77, 190
  29673. æRI IV-159, N77-5
  29674. æC 
  29675. Trap macro    _GetWDInfo
  29676.  
  29677. Parameter block
  29678.   -->    12    ioCompletion  pointer
  29679.   <--    16    ioResult      word
  29680.   <--    18    ioNamePtr     pointer
  29681.   <->    22    ioVRefNum     word
  29682.   -->    26    ioWDIndex     word
  29683.   <->    28    ioWDProcID    long word
  29684.   <->    32    ioWDVRefNum   word
  29685.   <--    48    ioWDDirID     long word
  29686.  
  29687. PBGetWDInfo returns information about the specified working directory. The working
  29688. directory can be specified either by its working directory reference number in ioVRefNum
  29689. (in which case ioWDIndex should be 0), or by its index number in ioWDIndex. In the
  29690. latter case, if ioVRefNum is nonzero, it’s interpreted as a volume specification
  29691. (volume reference number or drive number), and only working directories on that
  29692. volume are indexed.
  29693.  
  29694. IOWDVRefNum always returns the volume reference number. IOVRefNum returns a working
  29695. directory reference number when a working directory reference number is passed in
  29696. that field; otherwise, it returns a volume reference number. The volume name is
  29697. returned in ioNamePtr.
  29698.  
  29699. If IOWDProcID is nonzero, only working directories with that identifier are indexed;
  29700. otherwise all working directories are indexed.
  29701.  
  29702. Result codes    noErr     No error
  29703.                 nsvErr    No such volume
  29704.  
  29705. æKY PBGetWDInfoSync
  29706. æFp Files.p
  29707. æT FUNCTION
  29708. æTN 7007,A260
  29709. æD FUNCTION PBGetWDInfoSync(paramBlock: WDPBPtr): OSErr;
  29710.     INLINE $205F,$7007,$A260,$3E80;
  29711. æDT myVariable := PBGetWDInfoSync(paramBlock,A0);
  29712. æRT 77, 190
  29713. æRI IV-159, N77-5
  29714. æC 
  29715. Trap macro    _GetWDInfo
  29716.  
  29717. Parameter block
  29718.   -->    12    ioCompletion  pointer
  29719.   <--    16    ioResult      word
  29720.   <--    18    ioNamePtr     pointer
  29721.   <->    22    ioVRefNum     word
  29722.   -->    26    ioWDIndex     word
  29723.   <->    28    ioWDProcID    long word
  29724.   <->    32    ioWDVRefNum   word
  29725.   <--    48    ioWDDirID     long word
  29726.  
  29727. PBGetWDInfo returns information about the specified working directory. The working
  29728. directory can be specified either by its working directory reference number in ioVRefNum
  29729. (in which case ioWDIndex should be 0), or by its index number in ioWDIndex. In the
  29730. latter case, if ioVRefNum is nonzero, it’s interpreted as a volume specification
  29731. (volume reference number or drive number), and only working directories on that
  29732. volume are indexed.
  29733.  
  29734. IOWDVRefNum always returns the volume reference number. IOVRefNum returns a working
  29735. directory reference number when a working directory reference number is passed in
  29736. that field; otherwise, it returns a volume reference number. The volume name is
  29737. returned in ioNamePtr.
  29738.  
  29739. If IOWDProcID is nonzero, only working directories with that identifier are indexed;
  29740. otherwise all working directories are indexed.
  29741.  
  29742. Result codes    noErr     No error
  29743.                 nsvErr    No such volume
  29744.  
  29745. æKY PBGetWDInfoAsync
  29746. æFp Files.p
  29747. æT FUNCTION
  29748. æTN 7007,A660
  29749. æD FUNCTION PBGetWDInfoAsync(paramBlock: WDPBPtr): OSErr;
  29750.     INLINE $205F,$7007,$A660,$3E80;
  29751. æDT myVariable := PBGetWDInfoAsync(paramBlock,A0);
  29752. æRT 77, 190
  29753. æRI IV-159, N77-5
  29754. æC 
  29755. Trap macro    _GetWDInfo
  29756.  
  29757. Parameter block
  29758.   -->    12    ioCompletion  pointer
  29759.   <--    16    ioResult      word
  29760.   <--    18    ioNamePtr     pointer
  29761.   <->    22    ioVRefNum     word
  29762.   -->    26    ioWDIndex     word
  29763.   <->    28    ioWDProcID    long word
  29764.   <->    32    ioWDVRefNum   word
  29765.   <--    48    ioWDDirID     long word
  29766.  
  29767. PBGetWDInfo returns information about the specified working directory. The working
  29768. directory can be specified either by its working directory reference number in ioVRefNum
  29769. (in which case ioWDIndex should be 0), or by its index number in ioWDIndex. In the
  29770. latter case, if ioVRefNum is nonzero, it’s interpreted as a volume specification
  29771. (volume reference number or drive number), and only working directories on that
  29772. volume are indexed.
  29773.  
  29774. IOWDVRefNum always returns the volume reference number. IOVRefNum returns a working
  29775. directory reference number when a working directory reference number is passed in
  29776. that field; otherwise, it returns a volume reference number. The volume name is
  29777. returned in ioNamePtr.
  29778.  
  29779. If IOWDProcID is nonzero, only working directories with that identifier are indexed;
  29780. otherwise all working directories are indexed.
  29781.  
  29782. Result codes    noErr     No error
  29783.                 nsvErr    No such volume
  29784.  
  29785. æKY PBGetFCBInfo
  29786. æFp Files.p
  29787. æT FUNCTION
  29788. æD FUNCTION PBGetFCBInfo(paramBlock: FCBPBPtr;async: BOOLEAN): OSErr;
  29789. æDT myVariable := PBGetFCBInfo(paramBlock,async);
  29790. æRT 87
  29791. æRI IV-179, N87-1
  29792. æC  
  29793. Trap macro    _GetFCBInfo
  29794.  
  29795. Parameter block
  29796.   -->    12    ioCompletion  pointer
  29797.   <--    16    ioResult      word
  29798.   <--    18    ioNamePtr     pointer
  29799.   <->    22    ioVRefNum     word
  29800.   <->    24    ioRefNum      word
  29801.   -->    28    ioFCBIndx     long word
  29802.   <--    32    ioFCBFlNm     long word
  29803.   <--    36    ioFCBFlags    word
  29804.   <--    38    ioFCBStBlk    word
  29805.   <--    40    ioFCBEOF      long word
  29806.   <--    44    ioFCBPLen     long word
  29807.   <--    48    ioFCBCrPs     long word
  29808.   <--    52    ioFCBVRefNum  word
  29809.   <--    54    ioFCBClpSiz   long word
  29810.   <--    58    ioFCBParID    long word
  29811.  
  29812. PBGetFCBInfo returns information about the specified open file. If ioFCBIndx is
  29813. positive, the File Manager returns information about the file whose file number is
  29814. ioFCBIndx on the volume specified by ioVRefNum (which may contain a drive number,
  29815. volume reference number, or working directory reference number). If ioVRefNum is 0,
  29816. all open files are indexed; otherwise, only open files on the specified volume are
  29817. indexed.
  29818.  
  29819. If ioFCBIndx is 0, the File Manager returns information about the file whose access
  29820. path is specified by ioRefNum.
  29821.  
  29822. Assembly-language note:  The global variable FCBSPtr points to the
  29823.                          length word of the file-control-block buffer.
  29824.  
  29825. Each file control block contains 94 bytes of information about an access path; Figure
  29826. 28 shows its structure (using the assembly-language offsets).
  29827.  
  29828. •••Refer to Figure 28:•••
  29829.  
  29830. Figure 28–A File Control Block
  29831.  
  29832. 64K ROM note:  The structure of a file control block in the 64K ROM
  29833.                version of the File Manager is a subset of the above
  29834.                structure. The old file control block contained only
  29835.                the fields up to and including fcbFlPos.
  29836.  
  29837. FCBMdRByt (which corresponds to ioFCBFlags in the parameter block for PBGetFCBInfo)
  29838. contains flags that describe the status of the file, as follows:
  29839.  
  29840.   Bit    Meaning
  29841.   0     Set if data can be written to the file
  29842.   1     Set if the entry describes a resource fork
  29843.   7     Set if the file has been changed since it was last flushed
  29844.  
  29845. Warning:  The size and structure of a file control block may be
  29846.           different in future versions of Macintosh system software.
  29847.  
  29848. æKY PBGetFCBInfoSync
  29849. æFp Files.p
  29850. æT FUNCTION
  29851. æTN 7008,A260
  29852. æD FUNCTION PBGetFCBInfoSync(paramBlock: FCBPBPtr): OSErr;
  29853.     INLINE $205F,$7008,$A260,$3E80;
  29854. æDT myVariable := PBGetFCBInfoSync(paramBlock,A0);
  29855. æRT 87
  29856. æRI IV-179, N87-1
  29857. æC  
  29858. Trap macro    _GetFCBInfo
  29859.  
  29860. Parameter block
  29861.   -->    12    ioCompletion  pointer
  29862.   <--    16    ioResult      word
  29863.   <--    18    ioNamePtr     pointer
  29864.   <->    22    ioVRefNum     word
  29865.   <->    24    ioRefNum      word
  29866.   -->    28    ioFCBIndx     long word
  29867.   <--    32    ioFCBFlNm     long word
  29868.   <--    36    ioFCBFlags    word
  29869.   <--    38    ioFCBStBlk    word
  29870.   <--    40    ioFCBEOF      long word
  29871.   <--    44    ioFCBPLen     long word
  29872.   <--    48    ioFCBCrPs     long word
  29873.   <--    52    ioFCBVRefNum  word
  29874.   <--    54    ioFCBClpSiz   long word
  29875.   <--    58    ioFCBParID    long word
  29876.  
  29877. PBGetFCBInfo returns information about the specified open file. If ioFCBIndx is
  29878. positive, the File Manager returns information about the file whose file number is
  29879. ioFCBIndx on the volume specified by ioVRefNum (which may contain a drive number,
  29880. volume reference number, or working directory reference number). If ioVRefNum is 0,
  29881. all open files are indexed; otherwise, only open files on the specified volume are
  29882. indexed.
  29883.  
  29884. If ioFCBIndx is 0, the File Manager returns information about the file whose access
  29885. path is specified by ioRefNum.
  29886.  
  29887. Assembly-language note:  The global variable FCBSPtr points to the
  29888.                          length word of the file-control-block buffer.
  29889.  
  29890. Each file control block contains 94 bytes of information about an access path; Figure
  29891. 28 shows its structure (using the assembly-language offsets).
  29892.  
  29893. •••Refer to Figure 28:•••
  29894.  
  29895. Figure 28–A File Control Block
  29896.  
  29897. 64K ROM note:  The structure of a file control block in the 64K ROM
  29898.                version of the File Manager is a subset of the above
  29899.                structure. The old file control block contained only
  29900.                the fields up to and including fcbFlPos.
  29901.  
  29902. FCBMdRByt (which corresponds to ioFCBFlags in the parameter block for PBGetFCBInfo)
  29903. contains flags that describe the status of the file, as follows:
  29904.  
  29905.   Bit    Meaning
  29906.   0     Set if data can be written to the file
  29907.   1     Set if the entry describes a resource fork
  29908.   7     Set if the file has been changed since it was last flushed
  29909.  
  29910. Warning:  The size and structure of a file control block may be
  29911.           different in future versions of Macintosh system software.
  29912.  
  29913. æKY PBGetFCBInfoAsync
  29914. æFp Files.p
  29915. æT FUNCTION
  29916. æTN 7008,A660
  29917. æD FUNCTION PBGetFCBInfoAsync(paramBlock: FCBPBPtr): OSErr;
  29918.     INLINE $205F,$7008,$A660,$3E80;
  29919. æDT myVariable := PBGetFCBInfoAsync(paramBlock,A0);
  29920. æRT 87
  29921. æRI IV-179, N87-1
  29922. æC  
  29923. Trap macro    _GetFCBInfo
  29924.  
  29925. Parameter block
  29926.   -->    12    ioCompletion  pointer
  29927.   <--    16    ioResult      word
  29928.   <--    18    ioNamePtr     pointer
  29929.   <->    22    ioVRefNum     word
  29930.   <->    24    ioRefNum      word
  29931.   -->    28    ioFCBIndx     long word
  29932.   <--    32    ioFCBFlNm     long word
  29933.   <--    36    ioFCBFlags    word
  29934.   <--    38    ioFCBStBlk    word
  29935.   <--    40    ioFCBEOF      long word
  29936.   <--    44    ioFCBPLen     long word
  29937.   <--    48    ioFCBCrPs     long word
  29938.   <--    52    ioFCBVRefNum  word
  29939.   <--    54    ioFCBClpSiz   long word
  29940.   <--    58    ioFCBParID    long word
  29941.  
  29942. PBGetFCBInfo returns information about the specified open file. If ioFCBIndx is
  29943. positive, the File Manager returns information about the file whose file number is
  29944. ioFCBIndx on the volume specified by ioVRefNum (which may contain a drive number,
  29945. volume reference number, or working directory reference number). If ioVRefNum is 0,
  29946. all open files are indexed; otherwise, only open files on the specified volume are
  29947. indexed.
  29948.  
  29949. If ioFCBIndx is 0, the File Manager returns information about the file whose access
  29950. path is specified by ioRefNum.
  29951.  
  29952. Assembly-language note:  The global variable FCBSPtr points to the
  29953.                          length word of the file-control-block buffer.
  29954.  
  29955. Each file control block contains 94 bytes of information about an access path; Figure
  29956. 28 shows its structure (using the assembly-language offsets).
  29957.  
  29958. •••Refer to Figure 28:•••
  29959.  
  29960. Figure 28–A File Control Block
  29961.  
  29962. 64K ROM note:  The structure of a file control block in the 64K ROM
  29963.                version of the File Manager is a subset of the above
  29964.                structure. The old file control block contained only
  29965.                the fields up to and including fcbFlPos.
  29966.  
  29967. FCBMdRByt (which corresponds to ioFCBFlags in the parameter block for PBGetFCBInfo)
  29968. contains flags that describe the status of the file, as follows:
  29969.  
  29970.   Bit    Meaning
  29971.   0     Set if data can be written to the file
  29972.   1     Set if the entry describes a resource fork
  29973.   7     Set if the file has been changed since it was last flushed
  29974.  
  29975. Warning:  The size and structure of a file control block may be
  29976.           different in future versions of Macintosh system software.
  29977.  
  29978. æKY PBGetCatInfo
  29979. æFp Files.p
  29980. æT FUNCTION
  29981. æD FUNCTION PBGetCatInfo(paramBlock: CInfoPBPtr;async: BOOLEAN): OSErr;
  29982. æDT myVariable := PBGetCatInfo(paramBlock,async);
  29983. æRT 68,69
  29984. æRI IV-155,  V-391, N68-1, N69
  29985. æC 
  29986. •••Rrefer to Technical Note #69:•••
  29987.  
  29988. Trap macro    _GetCatInfo
  29989.  
  29990. Parameter block
  29991.   Files:                                   Directories:
  29992.   -->    12    ioCompletion   pointer      -->    12    ioCompletion  pointer
  29993.   <--    16    ioResult       word         <--    16    ioResult      word
  29994.   <->    18    ioNamePtr      pointer      <->    18    ioNamePtr     pointer
  29995.   -->    22    ioVRefNum      word         -->    22    ioVRefNum     word
  29996.   <--    24    ioFRefNum      word         <--    24    ioFRefNum     word
  29997.   -->    28    ioFDirIndex    word         -->    28    ioFDirIndex   word
  29998.   <--    30    ioFlAttrib     byte         <--    30    ioFlAttrib    byte
  29999.   <--    31    ioACUser       byte         access rights for directory only
  30000.   <--    32    ioFlFndrInfo   16 bytes     <--    32    ioDrUsrWds    16 bytes
  30001.   <->    48    ioDirID        long word    <->    48    ioDrDirID     long word
  30002.   <--    52    ioFlStBlk      word         <--    52    ioDrNmFls     word
  30003.   <--    54    ioFlLgLen      long word
  30004.   <--    58    ioFlPyLen      long word
  30005.   <--    62    ioFlRStBlk     word
  30006.   <--    64    ioFlRLgLen     long word
  30007.   <--    68    ioFlRPyLen     long word
  30008.   <--    72    ioFlCrDat      long word    <--    72    ioDrCrDat    long word
  30009.   <--    76    ioFlMdDat      long word    <--    76    ioDrMdDat    long word
  30010.   <--    80    ioFlBkDat      long word    <--    80    ioDrBkDat    long word
  30011.   <--    84    ioFlXFndrInfo  16 bytes     <--    84    ioDrFndrInfo 16 bytes
  30012.   <--    100   ioFlParID      long word    <--    100    ioDrParID   long word
  30013.   <--    104   ioFlClpSiz     long word
  30014.  
  30015. PBGetCatInfo gets information about the files and directories in a file catalog. To
  30016. determine whether the information is for a file or a directory, test bit 4 of ioFlAttrib,
  30017. as described in the section “CInfoPBRec”. The information that’s returned for files
  30018. is shown in the left column, and the corresponding information for directories is
  30019. shown in the right column.
  30020.  
  30021. If ioFDirIndex is positive, the File Manager returns information about the file or
  30022. directory whose directory index is ioFDirIndex in the directory specified by ioVRefNum
  30023. (this will be the root directory if a volume reference number is provided).
  30024.  
  30025. If ioFDirIndex is 0, the File Manager returns information about the file or directory
  30026. specified by ioNamePtr, in the directory specified by ioVRefNum
  30027. (again, this will be the root directory if a volume reference number is provided).
  30028.  
  30029. If ioFDirIndex is negative, the File Manager ignores ioNamePtr and returns information
  30030. about the directory specified by ioDirID.
  30031.  
  30032. With files, PBGetCatInfo is similar to PBHGetFileInfo but returns some additional
  30033. information. If the file is open, the reference number of the first access path found
  30034. is returned in ioFRefNum, and the name of the file is returned in ioNamePtr (unless
  30035. ioNamePtr is NIL).
  30036.  
  30037. For server volume directories, in addition to the normal return parameters the ioACUser
  30038. field returns the user’s access rights in the following format:
  30039.  
  30040.   Bit    7    if set, user is not the owner of the directory.
  30041.               if clear, user is the owner of the directory.
  30042.          6–3  Reserved; this is returned set to zero.
  30043.          2    If set, user does not have Make Changes privileges
  30044.               to the directory.
  30045.               If clear, user has Make Changes privileges to the directory.
  30046.          1    If set, user does not have See Files privileges to the directory.
  30047.               If clear, user has See Files privileges to the directory.
  30048.          0    If set, user does not have See Folders privileges
  30049.               to the directory.
  30050.               If clear, user has See Folders privileges to the directory.
  30051.  
  30052. For example, if ioACUser returns zero for a given server volume directory, you know
  30053. that the user is the owner of the directory and has complete privileges to it.
  30054.  
  30055. Result codes    noErr     No error
  30056.                 bdNamErr  Bad file name
  30057.                 dirNFErr  Directory not found or incomplete pathname
  30058.                 extFSErr  External file system
  30059.                 fnfErr    File not found
  30060.                 ioErr     I/O error
  30061.                 nsvErr    No such volume
  30062.                 paramErr  No default volume
  30063.  
  30064. æKY PBGetCatInfoSync
  30065. æFp Files.p
  30066. æT FUNCTION
  30067. æTN 7009,A260
  30068. æD FUNCTION PBGetCatInfoSync(paramBlock: CInfoPBPtr): OSErr;
  30069.     INLINE $205F,$7009,$A260,$3E80;
  30070. æDT myVariable := PBGetCatInfoSync(paramBlock,A0);
  30071. æRT 68,69
  30072. æRI IV-155,  V-391, N68-1, N69
  30073. æC 
  30074. •••Rrefer to Technical Note #69:•••
  30075.  
  30076. Trap macro    _GetCatInfo
  30077.  
  30078. Parameter block
  30079.   Files:                                   Directories:
  30080.   -->    12    ioCompletion   pointer      -->    12    ioCompletion  pointer
  30081.   <--    16    ioResult       word         <--    16    ioResult      word
  30082.   <->    18    ioNamePtr      pointer      <->    18    ioNamePtr     pointer
  30083.   -->    22    ioVRefNum      word         -->    22    ioVRefNum     word
  30084.   <--    24    ioFRefNum      word         <--    24    ioFRefNum     word
  30085.   -->    28    ioFDirIndex    word         -->    28    ioFDirIndex   word
  30086.   <--    30    ioFlAttrib     byte         <--    30    ioFlAttrib    byte
  30087.   <--    31    ioACUser       byte         access rights for directory only
  30088.   <--    32    ioFlFndrInfo   16 bytes     <--    32    ioDrUsrWds    16 bytes
  30089.   <->    48    ioDirID        long word    <->    48    ioDrDirID     long word
  30090.   <--    52    ioFlStBlk      word         <--    52    ioDrNmFls     word
  30091.   <--    54    ioFlLgLen      long word
  30092.   <--    58    ioFlPyLen      long word
  30093.   <--    62    ioFlRStBlk     word
  30094.   <--    64    ioFlRLgLen     long word
  30095.   <--    68    ioFlRPyLen     long word
  30096.   <--    72    ioFlCrDat      long word    <--    72    ioDrCrDat    long word
  30097.   <--    76    ioFlMdDat      long word    <--    76    ioDrMdDat    long word
  30098.   <--    80    ioFlBkDat      long word    <--    80    ioDrBkDat    long word
  30099.   <--    84    ioFlXFndrInfo  16 bytes     <--    84    ioDrFndrInfo 16 bytes
  30100.   <--    100   ioFlParID      long word    <--    100    ioDrParID   long word
  30101.   <--    104   ioFlClpSiz     long word
  30102.  
  30103. PBGetCatInfo gets information about the files and directories in a file catalog. To
  30104. determine whether the information is for a file or a directory, test bit 4 of ioFlAttrib,
  30105. as described in the section “CInfoPBRec”. The information that’s returned for files
  30106. is shown in the left column, and the corresponding information for directories is
  30107. shown in the right column.
  30108.  
  30109. If ioFDirIndex is positive, the File Manager returns information about the file or
  30110. directory whose directory index is ioFDirIndex in the directory specified by ioVRefNum
  30111. (this will be the root directory if a volume reference number is provided).
  30112.  
  30113. If ioFDirIndex is 0, the File Manager returns information about the file or directory
  30114. specified by ioNamePtr, in the directory specified by ioVRefNum
  30115. (again, this will be the root directory if a volume reference number is provided).
  30116.  
  30117. If ioFDirIndex is negative, the File Manager ignores ioNamePtr and returns information
  30118. about the directory specified by ioDirID.
  30119.  
  30120. With files, PBGetCatInfo is similar to PBHGetFileInfo but returns some additional
  30121. information. If the file is open, the reference number of the first access path found
  30122. is returned in ioFRefNum, and the name of the file is returned in ioNamePtr (unless
  30123. ioNamePtr is NIL).
  30124.  
  30125. For server volume directories, in addition to the normal return parameters the ioACUser
  30126. field returns the user’s access rights in the following format:
  30127.  
  30128.   Bit    7    if set, user is not the owner of the directory.
  30129.               if clear, user is the owner of the directory.
  30130.          6–3  Reserved; this is returned set to zero.
  30131.          2    If set, user does not have Make Changes privileges
  30132.               to the directory.
  30133.               If clear, user has Make Changes privileges to the directory.
  30134.          1    If set, user does not have See Files privileges to the directory.
  30135.               If clear, user has See Files privileges to the directory.
  30136.          0    If set, user does not have See Folders privileges
  30137.               to the directory.
  30138.               If clear, user has See Folders privileges to the directory.
  30139.  
  30140. For example, if ioACUser returns zero for a given server volume directory, you know
  30141. that the user is the owner of the directory and has complete privileges to it.
  30142.  
  30143. Result codes    noErr     No error
  30144.                 bdNamErr  Bad file name
  30145.                 dirNFErr  Directory not found or incomplete pathname
  30146.                 extFSErr  External file system
  30147.                 fnfErr    File not found
  30148.                 ioErr     I/O error
  30149.                 nsvErr    No such volume
  30150.                 paramErr  No default volume
  30151.  
  30152. æKY PBGetCatInfoAsync
  30153. æFp Files.p
  30154. æT FUNCTION
  30155. æTN 7009,A660
  30156. æD FUNCTION PBGetCatInfoAsync(paramBlock: CInfoPBPtr): OSErr;
  30157.     INLINE $205F,$7009,$A660,$3E80;
  30158. æDT myVariable := PBGetCatInfoAsync(paramBlock,A0);
  30159. æRT 68,69
  30160. æRI IV-155,  V-391, N68-1, N69
  30161. æC 
  30162. •••Rrefer to Technical Note #69:•••
  30163.  
  30164. Trap macro    _GetCatInfo
  30165.  
  30166. Parameter block
  30167.   Files:                                   Directories:
  30168.   -->    12    ioCompletion   pointer      -->    12    ioCompletion  pointer
  30169.   <--    16    ioResult       word         <--    16    ioResult      word
  30170.   <->    18    ioNamePtr      pointer      <->    18    ioNamePtr     pointer
  30171.   -->    22    ioVRefNum      word         -->    22    ioVRefNum     word
  30172.   <--    24    ioFRefNum      word         <--    24    ioFRefNum     word
  30173.   -->    28    ioFDirIndex    word         -->    28    ioFDirIndex   word
  30174.   <--    30    ioFlAttrib     byte         <--    30    ioFlAttrib    byte
  30175.   <--    31    ioACUser       byte         access rights for directory only
  30176.   <--    32    ioFlFndrInfo   16 bytes     <--    32    ioDrUsrWds    16 bytes
  30177.   <->    48    ioDirID        long word    <->    48    ioDrDirID     long word
  30178.   <--    52    ioFlStBlk      word         <--    52    ioDrNmFls     word
  30179.   <--    54    ioFlLgLen      long word
  30180.   <--    58    ioFlPyLen      long word
  30181.   <--    62    ioFlRStBlk     word
  30182.   <--    64    ioFlRLgLen     long word
  30183.   <--    68    ioFlRPyLen     long word
  30184.   <--    72    ioFlCrDat      long word    <--    72    ioDrCrDat    long word
  30185.   <--    76    ioFlMdDat      long word    <--    76    ioDrMdDat    long word
  30186.   <--    80    ioFlBkDat      long word    <--    80    ioDrBkDat    long word
  30187.   <--    84    ioFlXFndrInfo  16 bytes     <--    84    ioDrFndrInfo 16 bytes
  30188.   <--    100   ioFlParID      long word    <--    100    ioDrParID   long word
  30189.   <--    104   ioFlClpSiz     long word
  30190.  
  30191. PBGetCatInfo gets information about the files and directories in a file catalog. To
  30192. determine whether the information is for a file or a directory, test bit 4 of ioFlAttrib,
  30193. as described in the section “CInfoPBRec”. The information that’s returned for files
  30194. is shown in the left column, and the corresponding information for directories is
  30195. shown in the right column.
  30196.  
  30197. If ioFDirIndex is positive, the File Manager returns information about the file or
  30198. directory whose directory index is ioFDirIndex in the directory specified by ioVRefNum
  30199. (this will be the root directory if a volume reference number is provided).
  30200.  
  30201. If ioFDirIndex is 0, the File Manager returns information about the file or directory
  30202. specified by ioNamePtr, in the directory specified by ioVRefNum
  30203. (again, this will be the root directory if a volume reference number is provided).
  30204.  
  30205. If ioFDirIndex is negative, the File Manager ignores ioNamePtr and returns information
  30206. about the directory specified by ioDirID.
  30207.  
  30208. With files, PBGetCatInfo is similar to PBHGetFileInfo but returns some additional
  30209. information. If the file is open, the reference number of the first access path found
  30210. is returned in ioFRefNum, and the name of the file is returned in ioNamePtr (unless
  30211. ioNamePtr is NIL).
  30212.  
  30213. For server volume directories, in addition to the normal return parameters the ioACUser
  30214. field returns the user’s access rights in the following format:
  30215.  
  30216.   Bit    7    if set, user is not the owner of the directory.
  30217.               if clear, user is the owner of the directory.
  30218.          6–3  Reserved; this is returned set to zero.
  30219.          2    If set, user does not have Make Changes privileges
  30220.               to the directory.
  30221.               If clear, user has Make Changes privileges to the directory.
  30222.          1    If set, user does not have See Files privileges to the directory.
  30223.               If clear, user has See Files privileges to the directory.
  30224.          0    If set, user does not have See Folders privileges
  30225.               to the directory.
  30226.               If clear, user has See Folders privileges to the directory.
  30227.  
  30228. For example, if ioACUser returns zero for a given server volume directory, you know
  30229. that the user is the owner of the directory and has complete privileges to it.
  30230.  
  30231. Result codes    noErr     No error
  30232.                 bdNamErr  Bad file name
  30233.                 dirNFErr  Directory not found or incomplete pathname
  30234.                 extFSErr  External file system
  30235.                 fnfErr    File not found
  30236.                 ioErr     I/O error
  30237.                 nsvErr    No such volume
  30238.                 paramErr  No default volume
  30239.  
  30240. æKY PBSetCatInfo
  30241. æFp Files.p
  30242. æT FUNCTION
  30243. æD FUNCTION PBSetCatInfo(paramBlock: CInfoPBPtr;async: BOOLEAN): OSErr;
  30244. æDT myVariable := PBSetCatInfo(paramBlock,async);
  30245. æRI IV-156
  30246. æC 
  30247. Trap macro    _SetCatInfo
  30248.  
  30249. Parameter block
  30250.  
  30251.   Files:                                  Directories:
  30252.   -->    12    ioCompletion  pointer      -->    12    ioCompletion  pointer
  30253.   <--    16    ioResult      word         <--    16    ioResult      word
  30254.   <->    18    ioNamePtr     pointer      <->    18    ioNamePtr     pointer
  30255.   -->    22    ioVRefNum     word         -->    22    ioVRefNum     word
  30256.   -->    30    ioFlAttrib    byte         -->    30    ioFlAttrib    byte
  30257.   -->    32    ioFlFndrInfo  16 bytes     -->    32    ioDrUsrWds    16 bytes
  30258.   -->    48    ioDirID       long word    -->    48    ioDrDirID     long word
  30259.   -->    72    ioFlCrDat     long word    -->    72    ioDrCrDat     long word
  30260.   -->    76    ioFlMdDat     long word    -->    76    ioDrMdDat     long word
  30261.   -->    80    ioFlBkDat     long word    -->    80    ioDrBkDat     long word
  30262.   -->    84    ioFlXFndrInfo 16 bytes     -->    84    ioDrFndrInfo  16 bytes
  30263.   -->    104   ioFlClpSiz    long word
  30264.  
  30265. PBSetCatInfo sets information about the files and directories in a catalog. With
  30266. files, it’s similar to PBHSetFileInfo but lets you set some additional information.
  30267. The information that can be set for files is shown in the left column, and the corresponding
  30268. information for directories is shown in the right column.
  30269.  
  30270. Result codes    noErr     No error
  30271.                 bdNamErr  Bad file name
  30272.                 dirNFErr  Directory not found or incomplete pathname
  30273.                 extFSErr  External file system
  30274.                 fnfErr    File not found
  30275.                 ioErr     I/O error
  30276.                 nsvErr    No such volume
  30277.                 paramErr  No default volume
  30278.  
  30279. æKY PBSetCatInfoSync
  30280. æFp Files.p
  30281. æT FUNCTION
  30282. æTN 700A,A260
  30283. æD FUNCTION PBSetCatInfoSync(paramBlock: CInfoPBPtr): OSErr;
  30284.     INLINE $205F,$700A,$A260,$3E80;
  30285. æDT myVariable := PBSetCatInfoSync(paramBlock,A0);
  30286. æRI IV-156
  30287. æC 
  30288. Trap macro    _SetCatInfo
  30289.  
  30290. Parameter block
  30291.  
  30292.   Files:                                  Directories:
  30293.   -->    12    ioCompletion  pointer      -->    12    ioCompletion  pointer
  30294.   <--    16    ioResult      word         <--    16    ioResult      word
  30295.   <->    18    ioNamePtr     pointer      <->    18    ioNamePtr     pointer
  30296.   -->    22    ioVRefNum     word         -->    22    ioVRefNum     word
  30297.   -->    30    ioFlAttrib    byte         -->    30    ioFlAttrib    byte
  30298.   -->    32    ioFlFndrInfo  16 bytes     -->    32    ioDrUsrWds    16 bytes
  30299.   -->    48    ioDirID       long word    -->    48    ioDrDirID     long word
  30300.   -->    72    ioFlCrDat     long word    -->    72    ioDrCrDat     long word
  30301.   -->    76    ioFlMdDat     long word    -->    76    ioDrMdDat     long word
  30302.   -->    80    ioFlBkDat     long word    -->    80    ioDrBkDat     long word
  30303.   -->    84    ioFlXFndrInfo 16 bytes     -->    84    ioDrFndrInfo  16 bytes
  30304.   -->    104   ioFlClpSiz    long word
  30305.  
  30306. PBSetCatInfo sets information about the files and directories in a catalog. With
  30307. files, it’s similar to PBHSetFileInfo but lets you set some additional information.
  30308. The information that can be set for files is shown in the left column, and the corresponding
  30309. information for directories is shown in the right column.
  30310.  
  30311. Result codes    noErr     No error
  30312.                 bdNamErr  Bad file name
  30313.                 dirNFErr  Directory not found or incomplete pathname
  30314.                 extFSErr  External file system
  30315.                 fnfErr    File not found
  30316.                 ioErr     I/O error
  30317.                 nsvErr    No such volume
  30318.                 paramErr  No default volume
  30319.  
  30320. æKY PBSetCatInfoAsync
  30321. æFp Files.p
  30322. æT FUNCTION
  30323. æTN 700A,A660
  30324. æD FUNCTION PBSetCatInfoAsync(paramBlock: CInfoPBPtr): OSErr;
  30325.     INLINE $205F,$700A,$A660,$3E80;
  30326. æDT myVariable := PBSetCatInfoAsync(paramBlock,A0);
  30327. æRI IV-156
  30328. æC 
  30329. Trap macro    _SetCatInfo
  30330.  
  30331. Parameter block
  30332.  
  30333.   Files:                                  Directories:
  30334.   -->    12    ioCompletion  pointer      -->    12    ioCompletion  pointer
  30335.   <--    16    ioResult      word         <--    16    ioResult      word
  30336.   <->    18    ioNamePtr     pointer      <->    18    ioNamePtr     pointer
  30337.   -->    22    ioVRefNum     word         -->    22    ioVRefNum     word
  30338.   -->    30    ioFlAttrib    byte         -->    30    ioFlAttrib    byte
  30339.   -->    32    ioFlFndrInfo  16 bytes     -->    32    ioDrUsrWds    16 bytes
  30340.   -->    48    ioDirID       long word    -->    48    ioDrDirID     long word
  30341.   -->    72    ioFlCrDat     long word    -->    72    ioDrCrDat     long word
  30342.   -->    76    ioFlMdDat     long word    -->    76    ioDrMdDat     long word
  30343.   -->    80    ioFlBkDat     long word    -->    80    ioDrBkDat     long word
  30344.   -->    84    ioFlXFndrInfo 16 bytes     -->    84    ioDrFndrInfo  16 bytes
  30345.   -->    104   ioFlClpSiz    long word
  30346.  
  30347. PBSetCatInfo sets information about the files and directories in a catalog. With
  30348. files, it’s similar to PBHSetFileInfo but lets you set some additional information.
  30349. The information that can be set for files is shown in the left column, and the corresponding
  30350. information for directories is shown in the right column.
  30351.  
  30352. Result codes    noErr     No error
  30353.                 bdNamErr  Bad file name
  30354.                 dirNFErr  Directory not found or incomplete pathname
  30355.                 extFSErr  External file system
  30356.                 fnfErr    File not found
  30357.                 ioErr     I/O error
  30358.                 nsvErr    No such volume
  30359.                 paramErr  No default volume
  30360.  
  30361. æKY PBAllocContig
  30362. æFp Files.p
  30363. æT FUNCTION
  30364. æD FUNCTION PBAllocContig(paramBlock: ParmBlkPtr;async: BOOLEAN): OSErr;
  30365. æDT myVariable := PBAllocContig(paramBlock,async);
  30366. æRI IV-143
  30367. æC 
  30368. Trap macro    _AllocContig
  30369.  
  30370. Parameter block
  30371.   -->    12    ioCompletion  pointer
  30372.   <--    16    ioResult      word
  30373.   -->    24    ioRefNum      word
  30374.   -->    36    ioReqCount    long word
  30375.   <--    40    ioActCount    long word
  30376.  
  30377. PBAllocContig is identical to PBAllocate except that if there isn’t enough contiguous
  30378. empty space on the volume to satisfy the allocation request, PBAllocContig will do
  30379. nothing and will return dskFulErr as its function result. If you want to allocate
  30380. whatever space is available, even when the entire request cannot be filled as a
  30381. contiguous piece, call PBAllocate instead.
  30382.  
  30383. Result codes    noErr      No error
  30384.                 dskFulErr  Disk full
  30385.                 fLckdErr   File locked
  30386.                 fnOpnErr   File not open
  30387.                 ioErr      I/O error
  30388.                 rfNumErr   Bad reference number
  30389.                 vLckdErr   Software volume lock
  30390.                 wPrErr     Hardware volume lock
  30391.                 wrPermErr  Read/write permission doesn’t allow writing
  30392.  
  30393. æKY PBAllocContigSync
  30394. æFp Files.p
  30395. æT FUNCTION
  30396. æTN A210
  30397. æD FUNCTION PBAllocContigSync(paramBlock: ParmBlkPtr): OSErr;
  30398.     INLINE $205F,$A210,$3E80;
  30399. æDT myVariable := PBAllocContigSync(paramBlock,A0);
  30400. æRI IV-143
  30401. æC 
  30402. Trap macro    _AllocContig
  30403.  
  30404. Parameter block
  30405.   -->    12    ioCompletion  pointer
  30406.   <--    16    ioResult      word
  30407.   -->    24    ioRefNum      word
  30408.   -->    36    ioReqCount    long word
  30409.   <--    40    ioActCount    long word
  30410.  
  30411. PBAllocContig is identical to PBAllocate except that if there isn’t enough contiguous
  30412. empty space on the volume to satisfy the allocation request, PBAllocContig will do
  30413. nothing and will return dskFulErr as its function result. If you want to allocate
  30414. whatever space is available, even when the entire request cannot be filled as a
  30415. contiguous piece, call PBAllocate instead.
  30416.  
  30417. Result codes    noErr      No error
  30418.                 dskFulErr  Disk full
  30419.                 fLckdErr   File locked
  30420.                 fnOpnErr   File not open
  30421.                 ioErr      I/O error
  30422.                 rfNumErr   Bad reference number
  30423.                 vLckdErr   Software volume lock
  30424.                 wPrErr     Hardware volume lock
  30425.                 wrPermErr  Read/write permission doesn’t allow writing
  30426.  
  30427. æKY PBAllocContigAsync
  30428. æFp Files.p
  30429. æT FUNCTION
  30430. æTN A610
  30431. æD FUNCTION PBAllocContigAsync(paramBlock: ParmBlkPtr): OSErr;
  30432.     INLINE $205F,$A610,$3E80;
  30433. æDT myVariable := PBAllocContigAsync(paramBlock,A0);
  30434. æRI IV-143
  30435. æC 
  30436. Trap macro    _AllocContig
  30437.  
  30438. Parameter block
  30439.   -->    12    ioCompletion  pointer
  30440.   <--    16    ioResult      word
  30441.   -->    24    ioRefNum      word
  30442.   -->    36    ioReqCount    long word
  30443.   <--    40    ioActCount    long word
  30444.  
  30445. PBAllocContig is identical to PBAllocate except that if there isn’t enough contiguous
  30446. empty space on the volume to satisfy the allocation request, PBAllocContig will do
  30447. nothing and will return dskFulErr as its function result. If you want to allocate
  30448. whatever space is available, even when the entire request cannot be filled as a
  30449. contiguous piece, call PBAllocate instead.
  30450.  
  30451. Result codes    noErr      No error
  30452.                 dskFulErr  Disk full
  30453.                 fLckdErr   File locked
  30454.                 fnOpnErr   File not open
  30455.                 ioErr      I/O error
  30456.                 rfNumErr   Bad reference number
  30457.                 vLckdErr   Software volume lock
  30458.                 wPrErr     Hardware volume lock
  30459.                 wrPermErr  Read/write permission doesn’t allow writing
  30460.  
  30461. æKY PBLockRange
  30462. æFp Files.p
  30463. æT FUNCTION
  30464. æD FUNCTION PBLockRange(paramBlock: ParmBlkPtr;async: BOOLEAN): OSErr;
  30465. æDT myVariable := PBLockRange(paramBlock,async);
  30466. æRT 186
  30467. æRI IV-138
  30468. æC 
  30469. •••Refer to Technical Note #186:•••
  30470.  
  30471. Trap macro    _LockRng
  30472.  
  30473. Parameter block
  30474.   -->    12    ioCompletion  pointer
  30475.   <--    16    ioResult      word
  30476.   -->    24    ioRefNum      word
  30477.   -->    36    ioReqCount    long word
  30478.   -->    44    ioPosMode     word
  30479.   -->    46    ioPosOffset   long word
  30480.  
  30481. On a file opened with a shared read/write permission, PBLockRange is used in conjunction
  30482. with PBRead and PBWrite to lock a certain portion of the file. PBLockRange uses the
  30483. same parameters as both PBRead and PBWrite; by calling it immediately before PBRead,
  30484. you can use the information present in the parameter block for the PBRead call.
  30485.  
  30486. When you’re finished with the data (typically after a call to PBWrite), be sure to
  30487. call PBUnlockRange to free up that portion of the file for subsequent PBRead calls.
  30488.  
  30489. Warning:  PBLockRange operates only with the hierarchical version of the
  30490.           File Manager; if used on a Macintosh equipped only with the 64K
  30491.           ROM version of the File Manager, it will generate a system error.
  30492.  
  30493. Result codes    noErr     No error
  30494.                 eofErr    End-of-file
  30495.                 extFSErr  External file system
  30496.                 fnOpnErr  File not open
  30497.                 ioErr     I/O error
  30498.                 paramErr  Negative ioReqCount
  30499.                 rfNumErr  Bad reference number
  30500.  
  30501. æKY PBLockRangeSync
  30502. æFp Files.p
  30503. æT FUNCTION
  30504. æTN 7010,A260
  30505. æD FUNCTION PBLockRangeSync(paramBlock: ParmBlkPtr): OSErr;
  30506.     INLINE $205F,$7010,$A260,$3E80;
  30507. æDT myVariable := PBLockRangeSync(paramBlock,A0);
  30508. æRT 186
  30509. æRI IV-138
  30510. æC 
  30511. •••Refer to Technical Note #186:•••
  30512.  
  30513. Trap macro    _LockRng
  30514.  
  30515. Parameter block
  30516.   -->    12    ioCompletion  pointer
  30517.   <--    16    ioResult      word
  30518.   -->    24    ioRefNum      word
  30519.   -->    36    ioReqCount    long word
  30520.   -->    44    ioPosMode     word
  30521.   -->    46    ioPosOffset   long word
  30522.  
  30523. On a file opened with a shared read/write permission, PBLockRange is used in conjunction
  30524. with PBRead and PBWrite to lock a certain portion of the file. PBLockRange uses the
  30525. same parameters as both PBRead and PBWrite; by calling it immediately before PBRead,
  30526. you can use the information present in the parameter block for the PBRead call.
  30527.  
  30528. When you’re finished with the data (typically after a call to PBWrite), be sure to
  30529. call PBUnlockRange to free up that portion of the file for subsequent PBRead calls.
  30530.  
  30531. Warning:  PBLockRange operates only with the hierarchical version of the
  30532.           File Manager; if used on a Macintosh equipped only with the 64K
  30533.           ROM version of the File Manager, it will generate a system error.
  30534.  
  30535. Result codes    noErr     No error
  30536.                 eofErr    End-of-file
  30537.                 extFSErr  External file system
  30538.                 fnOpnErr  File not open
  30539.                 ioErr     I/O error
  30540.                 paramErr  Negative ioReqCount
  30541.                 rfNumErr  Bad reference number
  30542.  
  30543. æKY PBLockRangeAsync
  30544. æFp Files.p
  30545. æT FUNCTION
  30546. æTN 7010,A660
  30547. æD FUNCTION PBLockRangeAsync(paramBlock: ParmBlkPtr): OSErr;
  30548.     INLINE $205F,$7010,$A660,$3E80;
  30549. æDT myVariable := PBLockRangeAsync(paramBlock,A0);
  30550. æRT 186
  30551. æRI IV-138
  30552. æC 
  30553. •••Refer to Technical Note #186:•••
  30554.  
  30555. Trap macro    _LockRng
  30556.  
  30557. Parameter block
  30558.   -->    12    ioCompletion  pointer
  30559.   <--    16    ioResult      word
  30560.   -->    24    ioRefNum      word
  30561.   -->    36    ioReqCount    long word
  30562.   -->    44    ioPosMode     word
  30563.   -->    46    ioPosOffset   long word
  30564.  
  30565. On a file opened with a shared read/write permission, PBLockRange is used in conjunction
  30566. with PBRead and PBWrite to lock a certain portion of the file. PBLockRange uses the
  30567. same parameters as both PBRead and PBWrite; by calling it immediately before PBRead,
  30568. you can use the information present in the parameter block for the PBRead call.
  30569.  
  30570. When you’re finished with the data (typically after a call to PBWrite), be sure to
  30571. call PBUnlockRange to free up that portion of the file for subsequent PBRead calls.
  30572.  
  30573. Warning:  PBLockRange operates only with the hierarchical version of the
  30574.           File Manager; if used on a Macintosh equipped only with the 64K
  30575.           ROM version of the File Manager, it will generate a system error.
  30576.  
  30577. Result codes    noErr     No error
  30578.                 eofErr    End-of-file
  30579.                 extFSErr  External file system
  30580.                 fnOpnErr  File not open
  30581.                 ioErr     I/O error
  30582.                 paramErr  Negative ioReqCount
  30583.                 rfNumErr  Bad reference number
  30584.  
  30585. æKY PBUnlockRange
  30586. æFp Files.p
  30587. æT FUNCTION
  30588. æD FUNCTION PBUnlockRange(paramBlock: ParmBlkPtr;async: BOOLEAN): OSErr;
  30589. æDT myVariable := PBUnlockRange(paramBlock,async);
  30590. æRT 186
  30591. æRI IV-139
  30592. æC 
  30593. Trap macro    _UnlockRng
  30594.  
  30595. Parameter block
  30596.   -->    12    ioCompletion  pointer
  30597.   <--    16    ioResult      word
  30598.   -->    24    ioRefNum      word
  30599.   -->    36    ioReqCount    long word
  30600.   -->    44    ioPosMode     word
  30601.   -->    46    ioPosOffset   long word
  30602.  
  30603. PBUnlockRange is used in conjunction with PBRead and PBWrite to unlock a certain
  30604. portion of a file that you locked with PBLockRange.
  30605.  
  30606. Warning:  PBUnlockRange operates only with the hierarchical version of
  30607.           the File Manager; if used on a Macintosh equipped only with
  30608.           the 64K ROM version of the File Manager, it will generate a
  30609.           system error.
  30610.  
  30611. Result codes    noErr     No error
  30612.                 eofErr    End-of-file
  30613.                 extFSErr  External file system
  30614.                 fnOpnErr  File not open
  30615.                 ioErr     I/O error
  30616.                 paramErr  Negative ioReqCount
  30617.                 rfNumErr  Bad reference number
  30618.  
  30619. æKY PBUnlockRangeSync
  30620. æFp Files.p
  30621. æT FUNCTION
  30622. æTN 7011,A260
  30623. æD FUNCTION PBUnlockRangeSync(paramBlock: ParmBlkPtr): OSErr;
  30624.     INLINE $205F,$7011,$A260,$3E80;
  30625. æDT myVariable := PBUnlockRangeSync(paramBlock,A0);
  30626. æRT 186
  30627. æRI IV-139
  30628. æC 
  30629. Trap macro    _UnlockRng
  30630.  
  30631. Parameter block
  30632.   -->    12    ioCompletion  pointer
  30633.   <--    16    ioResult      word
  30634.   -->    24    ioRefNum      word
  30635.   -->    36    ioReqCount    long word
  30636.   -->    44    ioPosMode     word
  30637.   -->    46    ioPosOffset   long word
  30638.  
  30639. PBUnlockRange is used in conjunction with PBRead and PBWrite to unlock a certain
  30640. portion of a file that you locked with PBLockRange.
  30641.  
  30642. Warning:  PBUnlockRange operates only with the hierarchical version of
  30643.           the File Manager; if used on a Macintosh equipped only with
  30644.           the 64K ROM version of the File Manager, it will generate a
  30645.           system error.
  30646.  
  30647. Result codes    noErr     No error
  30648.                 eofErr    End-of-file
  30649.                 extFSErr  External file system
  30650.                 fnOpnErr  File not open
  30651.                 ioErr     I/O error
  30652.                 paramErr  Negative ioReqCount
  30653.                 rfNumErr  Bad reference number
  30654.  
  30655. æKY PBUnlockRangeAsync
  30656. æFp Files.p
  30657. æT FUNCTION
  30658. æTN 7011,A660
  30659. æD FUNCTION PBUnlockRangeAsync(paramBlock: ParmBlkPtr): OSErr;
  30660.     INLINE $205F,$7011,$A660,$3E80;
  30661. æDT myVariable := PBUnlockRangeAsync(paramBlock,A0);
  30662. æRT 186
  30663. æRI IV-139
  30664. æC 
  30665. Trap macro    _UnlockRng
  30666.  
  30667. Parameter block
  30668.   -->    12    ioCompletion  pointer
  30669.   <--    16    ioResult      word
  30670.   -->    24    ioRefNum      word
  30671.   -->    36    ioReqCount    long word
  30672.   -->    44    ioPosMode     word
  30673.   -->    46    ioPosOffset   long word
  30674.  
  30675. PBUnlockRange is used in conjunction with PBRead and PBWrite to unlock a certain
  30676. portion of a file that you locked with PBLockRange.
  30677.  
  30678. Warning:  PBUnlockRange operates only with the hierarchical version of
  30679.           the File Manager; if used on a Macintosh equipped only with
  30680.           the 64K ROM version of the File Manager, it will generate a
  30681.           system error.
  30682.  
  30683. Result codes    noErr     No error
  30684.                 eofErr    End-of-file
  30685.                 extFSErr  External file system
  30686.                 fnOpnErr  File not open
  30687.                 ioErr     I/O error
  30688.                 paramErr  Negative ioReqCount
  30689.                 rfNumErr  Bad reference number
  30690.  
  30691. æKY PBSetVInfo
  30692. æFp Files.p
  30693. æT FUNCTION
  30694. æD FUNCTION PBSetVInfo(paramBlock: HParmBlkPtr;async: BOOLEAN): OSErr;
  30695. æDT myVariable := PBSetVInfo(paramBlock,async);
  30696. æRT 204
  30697. æRI IV-131
  30698. æC 
  30699. •••Refer to Technical Note #204:•••
  30700.  
  30701. Trap macro    _SetVolInfo
  30702.  
  30703. Parameter block
  30704.   -->    12    ioCompletion  pointer
  30705.   <--    16    ioResult      word
  30706.   -->    18    ioNamePtr     pointer
  30707.   -->    22    ioVRefNum     word
  30708.   -->    30    ioVCrDate     long word
  30709.   -->    34    ioVLsMod      long word
  30710.   -->    38    ioVAtrb       word
  30711.   -->    52    ioVClpSiz     long word
  30712.   -->    72    ioVBkUp       long word
  30713.   -->    76    ioVSeqNum     word
  30714.   -->    90    ioVFndrInfo   32 bytes
  30715.  
  30716. PBSetVInfo lets you modify information about volumes. A pointer to a new name for the
  30717. volume can be specified in ioNamePtr. The date and time of the volume’s creation and
  30718. modification can be set with ioVCrDate and ioVLsMod respectively. Only bit 15 of
  30719. ioVAtrb can be changed; setting it locks the volume.
  30720.  
  30721. Note:  The volume cannot be specified by name; you must use either the
  30722.        volume reference number or the drive number.
  30723.  
  30724. Warning:  PBSetVInfo operates only with the hierarchical version of the
  30725.           File Manager; if used on a Macintosh equipped only with the
  30726.           64K ROM version of the File Manager, it will generate a system error.
  30727.  
  30728. Result codes    noErr       No error
  30729.                 nsvErr      No such volume
  30730.                 paramErr    No default volume
  30731.  
  30732. æKY PBSetVInfoSync
  30733. æFp Files.p
  30734. æT FUNCTION
  30735. æTN 700B,A260
  30736. æD FUNCTION PBSetVInfoSync(paramBlock: HParmBlkPtr): OSErr;
  30737.     INLINE $205F,$700B,$A260,$3E80;
  30738. æDT myVariable := PBSetVInfoSync(paramBlock,A0);
  30739. æRT 204
  30740. æRI IV-131
  30741. æC 
  30742. •••Refer to Technical Note #204:•••
  30743.  
  30744. Trap macro    _SetVolInfo
  30745.  
  30746. Parameter block
  30747.   -->    12    ioCompletion  pointer
  30748.   <--    16    ioResult      word
  30749.   -->    18    ioNamePtr     pointer
  30750.   -->    22    ioVRefNum     word
  30751.   -->    30    ioVCrDate     long word
  30752.   -->    34    ioVLsMod      long word
  30753.   -->    38    ioVAtrb       word
  30754.   -->    52    ioVClpSiz     long word
  30755.   -->    72    ioVBkUp       long word
  30756.   -->    76    ioVSeqNum     word
  30757.   -->    90    ioVFndrInfo   32 bytes
  30758.  
  30759. PBSetVInfo lets you modify information about volumes. A pointer to a new name for the
  30760. volume can be specified in ioNamePtr. The date and time of the volume’s creation and
  30761. modification can be set with ioVCrDate and ioVLsMod respectively. Only bit 15 of
  30762. ioVAtrb can be changed; setting it locks the volume.
  30763.  
  30764. Note:  The volume cannot be specified by name; you must use either the
  30765.        volume reference number or the drive number.
  30766.  
  30767. Warning:  PBSetVInfo operates only with the hierarchical version of the
  30768.           File Manager; if used on a Macintosh equipped only with the
  30769.           64K ROM version of the File Manager, it will generate a system error.
  30770.  
  30771. Result codes    noErr       No error
  30772.                 nsvErr      No such volume
  30773.                 paramErr    No default volume
  30774.  
  30775. æKY PBSetVInfoAsync
  30776. æFp Files.p
  30777. æT FUNCTION
  30778. æTN 700B,A660
  30779. æD FUNCTION PBSetVInfoAsync(paramBlock: HParmBlkPtr): OSErr;
  30780.     INLINE $205F,$700B,$A660,$3E80;
  30781. æDT myVariable := PBSetVInfoAsync(paramBlock,A0);
  30782. æRT 204
  30783. æRI IV-131
  30784. æC 
  30785. •••Refer to Technical Note #204:•••
  30786.  
  30787. Trap macro    _SetVolInfo
  30788.  
  30789. Parameter block
  30790.   -->    12    ioCompletion  pointer
  30791.   <--    16    ioResult      word
  30792.   -->    18    ioNamePtr     pointer
  30793.   -->    22    ioVRefNum     word
  30794.   -->    30    ioVCrDate     long word
  30795.   -->    34    ioVLsMod      long word
  30796.   -->    38    ioVAtrb       word
  30797.   -->    52    ioVClpSiz     long word
  30798.   -->    72    ioVBkUp       long word
  30799.   -->    76    ioVSeqNum     word
  30800.   -->    90    ioVFndrInfo   32 bytes
  30801.  
  30802. PBSetVInfo lets you modify information about volumes. A pointer to a new name for the
  30803. volume can be specified in ioNamePtr. The date and time of the volume’s creation and
  30804. modification can be set with ioVCrDate and ioVLsMod respectively. Only bit 15 of
  30805. ioVAtrb can be changed; setting it locks the volume.
  30806.  
  30807. Note:  The volume cannot be specified by name; you must use either the
  30808.        volume reference number or the drive number.
  30809.  
  30810. Warning:  PBSetVInfo operates only with the hierarchical version of the
  30811.           File Manager; if used on a Macintosh equipped only with the
  30812.           64K ROM version of the File Manager, it will generate a system error.
  30813.  
  30814. Result codes    noErr       No error
  30815.                 nsvErr      No such volume
  30816.                 paramErr    No default volume
  30817.  
  30818. æKY PBHGetVInfo
  30819. æFp Files.p
  30820. æT FUNCTION
  30821. æD FUNCTION PBHGetVInfo(paramBlock: HParmBlkPtr;async: BOOLEAN): OSErr;
  30822. æDT myVariable := PBHGetVInfo(paramBlock,async);
  30823. æRT 24, 66, 67, 77, 106, 157
  30824. æRI IV-130, N66-1, N67-1, N77-5  
  30825. æC 
  30826. Trap macro    _HGetVInfo
  30827.  
  30828. Parameter block
  30829.   -->    12    ioCompletion  pointer
  30830.   <--    16    ioResult      word
  30831.   <->    18    ioNamePtr     pointer
  30832.   <->    22    ioVRefNum     word
  30833.   -->    28    ioVolIndex    word
  30834.   <--    30    ioVCrDate     long word
  30835.   <--    34    ioVLsMod      long word
  30836.   <--    38    ioVAtrb       word
  30837.   <--    40    ioVNmFls      word
  30838.   <--    42    ioVBitMap     word
  30839.   <--    44    ioVAllocPtr   word
  30840.   <--    46    ioVNmAlBlks   word
  30841.   <--    48    ioVAlBlkSiz   long word
  30842.   <--    52    ioVClpSiz     long word
  30843.   <--    56    ioAlBlSt      word
  30844.   <--    58    ioVNxtFNum    long word
  30845.   <--    62    ioVFrBlk      word
  30846.   <--    64    ioVSigWord    word
  30847.   <--    66    ioVDrvInfo    word
  30848.   <--    68    ioVDRefNum    word
  30849.   <--    70    ioVFSID       word
  30850.   <--    72    ioVBkUp       long word
  30851.   <--    76    ioVSeqNum     word
  30852.   <--    78    ioVWrCnt      long word
  30853.   <--    82    ioVFilCnt     long word
  30854.   <--    86    ioVDirCnt     long word
  30855.   <--    90    ioVFndrInfo   32 bytes
  30856.  
  30857. PBHGetVInfo is similar in function to PBGetVInfo but returns a larger parameter
  30858. block. In addition, PBHGetVInfo always returns the volume reference number in ioVRefNum
  30859. (regardless of what was passed in). Also, ioVNmAlBlks and ioVFrBlks are not clipped
  30860. as they are by PBGetVInfo.
  30861.  
  30862. Result codes    noErr       No error
  30863.                 nsvErr      No such volume
  30864.                 paramErr    No default volume
  30865.  
  30866. æKY PBHGetVInfoSync
  30867. æFp Files.p
  30868. æT FUNCTION
  30869. æTN A207
  30870. æD FUNCTION PBHGetVInfoSync(paramBlock: HParmBlkPtr): OSErr;
  30871.     INLINE $205F,$A207,$3E80;
  30872. æDT myVariable := PBHGetVInfoSync(paramBlock,A0);
  30873. æRT 24, 66, 67, 77, 106, 157
  30874. æRI IV-130, N66-1, N67-1, N77-5  
  30875. æC 
  30876. Trap macro    _HGetVInfo
  30877.  
  30878. Parameter block
  30879.   -->    12    ioCompletion  pointer
  30880.   <--    16    ioResult      word
  30881.   <->    18    ioNamePtr     pointer
  30882.   <->    22    ioVRefNum     word
  30883.   -->    28    ioVolIndex    word
  30884.   <--    30    ioVCrDate     long word
  30885.   <--    34    ioVLsMod      long word
  30886.   <--    38    ioVAtrb       word
  30887.   <--    40    ioVNmFls      word
  30888.   <--    42    ioVBitMap     word
  30889.   <--    44    ioVAllocPtr   word
  30890.   <--    46    ioVNmAlBlks   word
  30891.   <--    48    ioVAlBlkSiz   long word
  30892.   <--    52    ioVClpSiz     long word
  30893.   <--    56    ioAlBlSt      word
  30894.   <--    58    ioVNxtFNum    long word
  30895.   <--    62    ioVFrBlk      word
  30896.   <--    64    ioVSigWord    word
  30897.   <--    66    ioVDrvInfo    word
  30898.   <--    68    ioVDRefNum    word
  30899.   <--    70    ioVFSID       word
  30900.   <--    72    ioVBkUp       long word
  30901.   <--    76    ioVSeqNum     word
  30902.   <--    78    ioVWrCnt      long word
  30903.   <--    82    ioVFilCnt     long word
  30904.   <--    86    ioVDirCnt     long word
  30905.   <--    90    ioVFndrInfo   32 bytes
  30906.  
  30907. PBHGetVInfo is similar in function to PBGetVInfo but returns a larger parameter
  30908. block. In addition, PBHGetVInfo always returns the volume reference number in ioVRefNum
  30909. (regardless of what was passed in). Also, ioVNmAlBlks and ioVFrBlks are not clipped
  30910. as they are by PBGetVInfo.
  30911.  
  30912. Result codes    noErr       No error
  30913.                 nsvErr      No such volume
  30914.                 paramErr    No default volume
  30915.  
  30916. æKY PBHGetVInfoAsync
  30917. æFp Files.p
  30918. æT FUNCTION
  30919. æTN A607
  30920. æD FUNCTION PBHGetVInfoAsync(paramBlock: HParmBlkPtr): OSErr;
  30921.     INLINE $205F,$A607,$3E80;
  30922. æDT myVariable := PBHGetVInfoAsync(paramBlock,A0);
  30923. æRT 24, 66, 67, 77, 106, 157
  30924. æRI IV-130, N66-1, N67-1, N77-5  
  30925. æC 
  30926. Trap macro    _HGetVInfo
  30927.  
  30928. Parameter block
  30929.   -->    12    ioCompletion  pointer
  30930.   <--    16    ioResult      word
  30931.   <->    18    ioNamePtr     pointer
  30932.   <->    22    ioVRefNum     word
  30933.   -->    28    ioVolIndex    word
  30934.   <--    30    ioVCrDate     long word
  30935.   <--    34    ioVLsMod      long word
  30936.   <--    38    ioVAtrb       word
  30937.   <--    40    ioVNmFls      word
  30938.   <--    42    ioVBitMap     word
  30939.   <--    44    ioVAllocPtr   word
  30940.   <--    46    ioVNmAlBlks   word
  30941.   <--    48    ioVAlBlkSiz   long word
  30942.   <--    52    ioVClpSiz     long word
  30943.   <--    56    ioAlBlSt      word
  30944.   <--    58    ioVNxtFNum    long word
  30945.   <--    62    ioVFrBlk      word
  30946.   <--    64    ioVSigWord    word
  30947.   <--    66    ioVDrvInfo    word
  30948.   <--    68    ioVDRefNum    word
  30949.   <--    70    ioVFSID       word
  30950.   <--    72    ioVBkUp       long word
  30951.   <--    76    ioVSeqNum     word
  30952.   <--    78    ioVWrCnt      long word
  30953.   <--    82    ioVFilCnt     long word
  30954.   <--    86    ioVDirCnt     long word
  30955.   <--    90    ioVFndrInfo   32 bytes
  30956.  
  30957. PBHGetVInfo is similar in function to PBGetVInfo but returns a larger parameter
  30958. block. In addition, PBHGetVInfo always returns the volume reference number in ioVRefNum
  30959. (regardless of what was passed in). Also, ioVNmAlBlks and ioVFrBlks are not clipped
  30960. as they are by PBGetVInfo.
  30961.  
  30962. Result codes    noErr       No error
  30963.                 nsvErr      No such volume
  30964.                 paramErr    No default volume
  30965.  
  30966. æKY PBHOpen
  30967. æFp Files.p
  30968. æT FUNCTION
  30969. æD FUNCTION PBHOpen(paramBlock: HParmBlkPtr;async: BOOLEAN): OSErr;
  30970. æDT myVariable := PBHOpen(paramBlock,async);
  30971. æRT 204
  30972. æRI IV-136 
  30973. æC 
  30974. Trap macro    _HOpen
  30975.  
  30976. Parameter block
  30977.   -->    12    ioCompletion  pointer
  30978.   <--    16    ioResult      word
  30979.   -->    18    ioNamePtr     pointer
  30980.   -->    22    ioVRefNum     word
  30981.   <--    24    ioRefNum      word
  30982.   -->    27    ioPermssn     byte
  30983.   -->    28    ioMisc        pointer
  30984.   -->    48    ioDirID       long word
  30985.  
  30986. PBHOpen is identical to PBOpen except that it accepts a directory ID in ioDirID.
  30987.  
  30988. Result codes    noErr     No error
  30989.                 bdNamErr  Bad file name
  30990.                 dirNFErr  Directory not found or incomplete pathname
  30991.                 extFSErr  External file system
  30992.                 fnfErr    File not found
  30993.                 ioErr     I/O error
  30994.                 nsvErr    No such volume
  30995.                 opWrErr   File already open for writing
  30996.                 permErr   Attempt to open locked file for writing
  30997.                 tmfoErr   Too many files open
  30998.  
  30999. æKY PBHOpenSync
  31000. æFp Files.p
  31001. æT FUNCTION
  31002. æTN A200
  31003. æD FUNCTION PBHOpenSync(paramBlock: HParmBlkPtr): OSErr;
  31004.     INLINE $205F,$A200,$3E80;
  31005. æDT myVariable := PBHOpenSync(paramBlock,A0);
  31006. æRT 204
  31007. æRI IV-136 
  31008. æC 
  31009. Trap macro    _HOpen
  31010.  
  31011. Parameter block
  31012.   -->    12    ioCompletion  pointer
  31013.   <--    16    ioResult      word
  31014.   -->    18    ioNamePtr     pointer
  31015.   -->    22    ioVRefNum     word
  31016.   <--    24    ioRefNum      word
  31017.   -->    27    ioPermssn     byte
  31018.   -->    28    ioMisc        pointer
  31019.   -->    48    ioDirID       long word
  31020.  
  31021. PBHOpen is identical to PBOpen except that it accepts a directory ID in ioDirID.
  31022.  
  31023. Result codes    noErr     No error
  31024.                 bdNamErr  Bad file name
  31025.                 dirNFErr  Directory not found or incomplete pathname
  31026.                 extFSErr  External file system
  31027.                 fnfErr    File not found
  31028.                 ioErr     I/O error
  31029.                 nsvErr    No such volume
  31030.                 opWrErr   File already open for writing
  31031.                 permErr   Attempt to open locked file for writing
  31032.                 tmfoErr   Too many files open
  31033.  
  31034. æKY PBHOpenAsync
  31035. æFp Files.p
  31036. æT FUNCTION
  31037. æTN A600
  31038. æD FUNCTION PBHOpenAsync(paramBlock: HParmBlkPtr): OSErr;
  31039.     INLINE $205F,$A600,$3E80;
  31040. æDT myVariable := PBHOpenAsync(paramBlock,A0);
  31041. æRT 204
  31042. æRI IV-136 
  31043. æC 
  31044. Trap macro    _HOpen
  31045.  
  31046. Parameter block
  31047.   -->    12    ioCompletion  pointer
  31048.   <--    16    ioResult      word
  31049.   -->    18    ioNamePtr     pointer
  31050.   -->    22    ioVRefNum     word
  31051.   <--    24    ioRefNum      word
  31052.   -->    27    ioPermssn     byte
  31053.   -->    28    ioMisc        pointer
  31054.   -->    48    ioDirID       long word
  31055.  
  31056. PBHOpen is identical to PBOpen except that it accepts a directory ID in ioDirID.
  31057.  
  31058. Result codes    noErr     No error
  31059.                 bdNamErr  Bad file name
  31060.                 dirNFErr  Directory not found or incomplete pathname
  31061.                 extFSErr  External file system
  31062.                 fnfErr    File not found
  31063.                 ioErr     I/O error
  31064.                 nsvErr    No such volume
  31065.                 opWrErr   File already open for writing
  31066.                 permErr   Attempt to open locked file for writing
  31067.                 tmfoErr   Too many files open
  31068.  
  31069. æKY PBHOpenRF
  31070. æFp Files.p
  31071. æT FUNCTION
  31072. æD FUNCTION PBHOpenRF(paramBlock: HParmBlkPtr;async: BOOLEAN): OSErr;
  31073. æDT myVariable := PBHOpenRF(paramBlock,async);
  31074. æRI IV-137
  31075. æC 
  31076. Trap macro    _HOpenRF
  31077.  
  31078. Parameter block
  31079.   -->    12    ioCompletion  pointer
  31080.   <--    16    ioResult      word
  31081.   -->    18    ioNamePtr     pointer
  31082.   -->    22    ioVRefNum     word
  31083.   <--    24    ioRefNum      word
  31084.   -->    27    ioPermssn     byte
  31085.   -->    28    ioMisc        pointer
  31086.   -->    48    ioDirID       long word
  31087.  
  31088. PBHOpenRF is identical to PBOpenRF except that it accepts a directory ID in ioDirID.
  31089.  
  31090. Result codes    noErr     No error
  31091.                 bdNamErr  Bad file name
  31092.                 dirNFErr  Directory not found or incomplete pathname
  31093.                 extFSErr  External file system
  31094.                 fnfErr    File not found
  31095.                 ioErr     I/O error
  31096.                 nsvErr    No such volume
  31097.                 opWrErr   File already open for writing
  31098.                 permErr   Attempt to open locked file for writing
  31099.                 tmfoErr   Too many files open
  31100.  
  31101. æKY PBHOpenRFSync
  31102. æFp Files.p
  31103. æT FUNCTION
  31104. æTN A20A
  31105. æD FUNCTION PBHOpenRFSync(paramBlock: HParmBlkPtr): OSErr;
  31106.     INLINE $205F,$A20A,$3E80;
  31107. æDT myVariable := PBHOpenRFSync(paramBlock,A0);
  31108. æRI IV-137
  31109. æC 
  31110. Trap macro    _HOpenRF
  31111.  
  31112. Parameter block
  31113.   -->    12    ioCompletion  pointer
  31114.   <--    16    ioResult      word
  31115.   -->    18    ioNamePtr     pointer
  31116.   -->    22    ioVRefNum     word
  31117.   <--    24    ioRefNum      word
  31118.   -->    27    ioPermssn     byte
  31119.   -->    28    ioMisc        pointer
  31120.   -->    48    ioDirID       long word
  31121.  
  31122. PBHOpenRF is identical to PBOpenRF except that it accepts a directory ID in ioDirID.
  31123.  
  31124. Result codes    noErr     No error
  31125.                 bdNamErr  Bad file name
  31126.                 dirNFErr  Directory not found or incomplete pathname
  31127.                 extFSErr  External file system
  31128.                 fnfErr    File not found
  31129.                 ioErr     I/O error
  31130.                 nsvErr    No such volume
  31131.                 opWrErr   File already open for writing
  31132.                 permErr   Attempt to open locked file for writing
  31133.                 tmfoErr   Too many files open
  31134.  
  31135. æKY PBHOpenRFAsync
  31136. æFp Files.p
  31137. æT FUNCTION
  31138. æTN A60A
  31139. æD FUNCTION PBHOpenRFAsync(paramBlock: HParmBlkPtr): OSErr;
  31140.     INLINE $205F,$A60A,$3E80;
  31141. æDT myVariable := PBHOpenRFAsync(paramBlock,A0);
  31142. æRI IV-137
  31143. æC 
  31144. Trap macro    _HOpenRF
  31145.  
  31146. Parameter block
  31147.   -->    12    ioCompletion  pointer
  31148.   <--    16    ioResult      word
  31149.   -->    18    ioNamePtr     pointer
  31150.   -->    22    ioVRefNum     word
  31151.   <--    24    ioRefNum      word
  31152.   -->    27    ioPermssn     byte
  31153.   -->    28    ioMisc        pointer
  31154.   -->    48    ioDirID       long word
  31155.  
  31156. PBHOpenRF is identical to PBOpenRF except that it accepts a directory ID in ioDirID.
  31157.  
  31158. Result codes    noErr     No error
  31159.                 bdNamErr  Bad file name
  31160.                 dirNFErr  Directory not found or incomplete pathname
  31161.                 extFSErr  External file system
  31162.                 fnfErr    File not found
  31163.                 ioErr     I/O error
  31164.                 nsvErr    No such volume
  31165.                 opWrErr   File already open for writing
  31166.                 permErr   Attempt to open locked file for writing
  31167.                 tmfoErr   Too many files open
  31168.  
  31169. æKY PBHOpenDF
  31170. æFp Files.p
  31171. æT FUNCTION
  31172. æD FUNCTION PBHOpenDF(paramBlock: HParmBlkPtr;async: BOOLEAN): OSErr;
  31173. æDT myVariable := PBHOpenDF(paramBlock,async);
  31174. æRI PBHOpenRF function IV-137
  31175.  
  31176. æC FUNCTION PBHOpenRF (paramBlock: HParmBlkPtr; async: BOOLEAN) : OSErr;
  31177.  
  31178. Trap macro  _HOpenRF
  31179.  
  31180. Parameter block
  31181.   —>  12  ioCompletion  pointer
  31182.   <—  16  ioResult  word
  31183.   —>  18  ioNamePtr  pointer
  31184.   —>  22  ioVRefNum  word
  31185.   <—  24  ioRefNum  word
  31186.   —>  27  ioPermssn  byte
  31187.   —>  28  ioMisc  pointer
  31188.   —>  48  ioDirID  long word
  31189.  
  31190. PBHOpenRF is identical to PBOpenRF except that it accepts a directory ID in 
  31191. ioDirID.
  31192.  
  31193. Result codes  noErr  No error
  31194.   bdNamErr  Bad file name
  31195.   dirNFErr  Directory not found or incomplete pathname
  31196.   extFSErr  External file system
  31197.   fnfErr  File not found
  31198.   ioErr   I/O error
  31199.   nsvErr  No such volume
  31200.   opWrErr  File already open for writing
  31201.   permErr  Attempt to open locked file for writing
  31202.   tmfoErr  Too many files open
  31203.  
  31204.  
  31205. æKY PBHOpenDFSync
  31206. æFp Files.p
  31207. æT FUNCTION
  31208. æTN 701A,A260
  31209. æD FUNCTION PBHOpenDFSync(paramBlock: HParmBlkPtr): OSErr;
  31210.     INLINE $205F,$701A,$A260,$3E80;
  31211. æDT myVariable := PBHOpenDFSync(paramBlock,A0);
  31212. æRI PBHOpenRF function IV-137
  31213.  
  31214. æC FUNCTION PBHOpenRF (paramBlock: HParmBlkPtr; async: BOOLEAN) : OSErr;
  31215.  
  31216. Trap macro  _HOpenRF
  31217.  
  31218. Parameter block
  31219.   —>  12  ioCompletion  pointer
  31220.   <—  16  ioResult  word
  31221.   —>  18  ioNamePtr  pointer
  31222.   —>  22  ioVRefNum  word
  31223.   <—  24  ioRefNum  word
  31224.   —>  27  ioPermssn  byte
  31225.   —>  28  ioMisc  pointer
  31226.   —>  48  ioDirID  long word
  31227.  
  31228. PBHOpenRF is identical to PBOpenRF except that it accepts a directory ID in 
  31229. ioDirID.
  31230.  
  31231. Result codes  noErr  No error
  31232.   bdNamErr  Bad file name
  31233.   dirNFErr  Directory not found or incomplete pathname
  31234.   extFSErr  External file system
  31235.   fnfErr  File not found
  31236.   ioErr   I/O error
  31237.   nsvErr  No such volume
  31238.   opWrErr  File already open for writing
  31239.   permErr  Attempt to open locked file for writing
  31240.   tmfoErr  Too many files open
  31241.  
  31242.  
  31243. æKY PBHOpenDFAsync
  31244. æFp Files.p
  31245. æT FUNCTION
  31246. æTN 701A,A660
  31247. æD FUNCTION PBHOpenDFAsync(paramBlock: HParmBlkPtr): OSErr;
  31248.     INLINE $205F,$701A,$A660,$3E80;
  31249. æDT myVariable := PBHOpenDFAsync(paramBlock,A0);
  31250. æRI PBHOpenRF function IV-137
  31251.  
  31252. æC FUNCTION PBHOpenRF (paramBlock: HParmBlkPtr; async: BOOLEAN) : OSErr;
  31253.  
  31254. Trap macro  _HOpenRF
  31255.  
  31256. Parameter block
  31257.   —>  12  ioCompletion  pointer
  31258.   <—  16  ioResult  word
  31259.   —>  18  ioNamePtr  pointer
  31260.   —>  22  ioVRefNum  word
  31261.   <—  24  ioRefNum  word
  31262.   —>  27  ioPermssn  byte
  31263.   —>  28  ioMisc  pointer
  31264.   —>  48  ioDirID  long word
  31265.  
  31266. PBHOpenRF is identical to PBOpenRF except that it accepts a directory ID in 
  31267. ioDirID.
  31268.  
  31269. Result codes  noErr  No error
  31270.   bdNamErr  Bad file name
  31271.   dirNFErr  Directory not found or incomplete pathname
  31272.   extFSErr  External file system
  31273.   fnfErr  File not found
  31274.   ioErr   I/O error
  31275.   nsvErr  No such volume
  31276.   opWrErr  File already open for writing
  31277.   permErr  Attempt to open locked file for writing
  31278.   tmfoErr  Too many files open
  31279.  
  31280.  
  31281. æKY PBHCreate
  31282. æFp Files.p
  31283. æT FUNCTION
  31284. æD FUNCTION PBHCreate(paramBlock: HParmBlkPtr;async: BOOLEAN): OSErr;
  31285. æDT myVariable := PBHCreate(paramBlock,async);
  31286. æRI IV-146 
  31287. æC 
  31288. Trap macro    _HCreate
  31289.  
  31290. Parameter block
  31291.   -->    12    ioCompletion  pointer
  31292.   <--    16    ioResult      word
  31293.   -->    18    ioNamePtr     pointer
  31294.   -->    22    ioVRefNum     word
  31295.   -->    48    ioDirID       long word
  31296.  
  31297. PBHCreate is identical to PBCreate except that it accepts a directory ID in ioDirID.
  31298.  
  31299. Note:  To create a directory instead of a file, call PBDirCreate.
  31300.  
  31301. Result codes    noErr      No error
  31302.                 bdNamErr   Bad file name
  31303.                 dupFNErr   Duplicate file name and version
  31304.                 dirFulErr  File directory full
  31305.                 dirNFErr   Directory not found or incomplete pathname
  31306.                 extFSErr   External file system
  31307.                 ioErr      I/O error
  31308.                 nsvErr     No such volume
  31309.                 vLckdErr   Software volume lock
  31310.                 wPrErr     Hardware volume lock
  31311.  
  31312. æKY PBHCreateSync
  31313. æFp Files.p
  31314. æT FUNCTION
  31315. æTN A208
  31316. æD FUNCTION PBHCreateSync(paramBlock: HParmBlkPtr): OSErr;
  31317.     INLINE $205F,$A208,$3E80;
  31318. æDT myVariable := PBHCreateSync(paramBlock,A0);
  31319. æRI IV-146 
  31320. æC 
  31321. Trap macro    _HCreate
  31322.  
  31323. Parameter block
  31324.   -->    12    ioCompletion  pointer
  31325.   <--    16    ioResult      word
  31326.   -->    18    ioNamePtr     pointer
  31327.   -->    22    ioVRefNum     word
  31328.   -->    48    ioDirID       long word
  31329.  
  31330. PBHCreate is identical to PBCreate except that it accepts a directory ID in ioDirID.
  31331.  
  31332. Note:  To create a directory instead of a file, call PBDirCreate.
  31333.  
  31334. Result codes    noErr      No error
  31335.                 bdNamErr   Bad file name
  31336.                 dupFNErr   Duplicate file name and version
  31337.                 dirFulErr  File directory full
  31338.                 dirNFErr   Directory not found or incomplete pathname
  31339.                 extFSErr   External file system
  31340.                 ioErr      I/O error
  31341.                 nsvErr     No such volume
  31342.                 vLckdErr   Software volume lock
  31343.                 wPrErr     Hardware volume lock
  31344.  
  31345. æKY PBHCreateAsync
  31346. æFp Files.p
  31347. æT FUNCTION
  31348. æTN A608
  31349. æD FUNCTION PBHCreateAsync(paramBlock: HParmBlkPtr): OSErr;
  31350.     INLINE $205F,$A608,$3E80;
  31351. æDT myVariable := PBHCreateAsync(paramBlock,A0);
  31352. æRI IV-146 
  31353. æC 
  31354. Trap macro    _HCreate
  31355.  
  31356. Parameter block
  31357.   -->    12    ioCompletion  pointer
  31358.   <--    16    ioResult      word
  31359.   -->    18    ioNamePtr     pointer
  31360.   -->    22    ioVRefNum     word
  31361.   -->    48    ioDirID       long word
  31362.  
  31363. PBHCreate is identical to PBCreate except that it accepts a directory ID in ioDirID.
  31364.  
  31365. Note:  To create a directory instead of a file, call PBDirCreate.
  31366.  
  31367. Result codes    noErr      No error
  31368.                 bdNamErr   Bad file name
  31369.                 dupFNErr   Duplicate file name and version
  31370.                 dirFulErr  File directory full
  31371.                 dirNFErr   Directory not found or incomplete pathname
  31372.                 extFSErr   External file system
  31373.                 ioErr      I/O error
  31374.                 nsvErr     No such volume
  31375.                 vLckdErr   Software volume lock
  31376.                 wPrErr     Hardware volume lock
  31377.  
  31378. æKY PBHDelete
  31379. æFp Files.p
  31380. æT FUNCTION
  31381. æD FUNCTION PBHDelete(paramBlock: HParmBlkPtr;async: BOOLEAN): OSErr;
  31382. æDT myVariable := PBHDelete(paramBlock,async);
  31383. æRI IV-147
  31384. æC 
  31385. Trap macro    _HDelete
  31386.  
  31387. Parameter block
  31388.   -->    12    ioCompletion  pointer
  31389.   <--    16    ioResult      word
  31390.   -->    18    ioNamePtr     pointer
  31391.   -->    22    ioVRefNum     word
  31392.   -->    48    ioDirID       long word
  31393.  
  31394. PBHDelete is identical to PBDelete except that it accepts a directory ID in ioDirID.
  31395. PBHDelete can be used to delete an empty directory as well.
  31396.  
  31397. Result codes    noErr     No error
  31398.                 bdNamErr  Bad file name
  31399.                 dirNFErr  Directory not found or incomplete pathname
  31400.                 extFSErr  External file system
  31401.                 fBsyErr   File busy, directory not empty, or working
  31402.                           directory control block open
  31403.                 fLckdErr  File locked
  31404.                 fnfErr    File not found
  31405.                 nsvErr    No such volume
  31406.                 ioErr     I/O error
  31407.                 vLckdErr  Software volume lock
  31408.                 wPrErr    Hardware volume lock
  31409.  
  31410. æKY PBHDeleteSync
  31411. æFp Files.p
  31412. æT FUNCTION
  31413. æTN A209
  31414. æD FUNCTION PBHDeleteSync(paramBlock: HParmBlkPtr): OSErr;
  31415.     INLINE $205F,$A209,$3E80;
  31416. æDT myVariable := PBHDeleteSync(paramBlock,A0);
  31417. æRI IV-147
  31418. æC 
  31419. Trap macro    _HDelete
  31420.  
  31421. Parameter block
  31422.   -->    12    ioCompletion  pointer
  31423.   <--    16    ioResult      word
  31424.   -->    18    ioNamePtr     pointer
  31425.   -->    22    ioVRefNum     word
  31426.   -->    48    ioDirID       long word
  31427.  
  31428. PBHDelete is identical to PBDelete except that it accepts a directory ID in ioDirID.
  31429. PBHDelete can be used to delete an empty directory as well.
  31430.  
  31431. Result codes    noErr     No error
  31432.                 bdNamErr  Bad file name
  31433.                 dirNFErr  Directory not found or incomplete pathname
  31434.                 extFSErr  External file system
  31435.                 fBsyErr   File busy, directory not empty, or working
  31436.                           directory control block open
  31437.                 fLckdErr  File locked
  31438.                 fnfErr    File not found
  31439.                 nsvErr    No such volume
  31440.                 ioErr     I/O error
  31441.                 vLckdErr  Software volume lock
  31442.                 wPrErr    Hardware volume lock
  31443.  
  31444. æKY PBHDeleteAsync
  31445. æFp Files.p
  31446. æT FUNCTION
  31447. æTN A609
  31448. æD FUNCTION PBHDeleteAsync(paramBlock: HParmBlkPtr): OSErr;
  31449.     INLINE $205F,$A609,$3E80;
  31450. æDT myVariable := PBHDeleteAsync(paramBlock,A0);
  31451. æRI IV-147
  31452. æC 
  31453. Trap macro    _HDelete
  31454.  
  31455. Parameter block
  31456.   -->    12    ioCompletion  pointer
  31457.   <--    16    ioResult      word
  31458.   -->    18    ioNamePtr     pointer
  31459.   -->    22    ioVRefNum     word
  31460.   -->    48    ioDirID       long word
  31461.  
  31462. PBHDelete is identical to PBDelete except that it accepts a directory ID in ioDirID.
  31463. PBHDelete can be used to delete an empty directory as well.
  31464.  
  31465. Result codes    noErr     No error
  31466.                 bdNamErr  Bad file name
  31467.                 dirNFErr  Directory not found or incomplete pathname
  31468.                 extFSErr  External file system
  31469.                 fBsyErr   File busy, directory not empty, or working
  31470.                           directory control block open
  31471.                 fLckdErr  File locked
  31472.                 fnfErr    File not found
  31473.                 nsvErr    No such volume
  31474.                 ioErr     I/O error
  31475.                 vLckdErr  Software volume lock
  31476.                 wPrErr    Hardware volume lock
  31477.  
  31478. æKY PBHRename
  31479. æFp Files.p
  31480. æT FUNCTION
  31481. æD FUNCTION PBHRename(paramBlock: HParmBlkPtr;async: BOOLEAN): OSErr;
  31482. æDT myVariable := PBHRename(paramBlock,async);
  31483. æRI IV-154 
  31484. æC 
  31485. Trap macro    _HRename
  31486.  
  31487. Parameter block
  31488.   -->    12    ioCompletion  pointer
  31489.   <--    16    ioResult      word
  31490.   -->    18    ioNamePtr     pointer
  31491.   -->    22    ioVRefNum     word
  31492.   -->    28    ioMisc        pointer
  31493.   -->    48    ioDirID       long word
  31494.  
  31495. PBHRename is identical to PBRename except that it accepts a directory ID in ioDirID
  31496. and can be used to rename directories as well as files and volumes. Given a pointer
  31497. to the name of a file or directory in ioNamePtr, PBHRename changes it to the name
  31498. pointed to by ioMisc. Given a pointer to a volume name in ioNamePtr or a volume
  31499. reference number in ioVRefNum, it changes the name of the volume to the name pointed
  31500. to by ioMisc.
  31501.  
  31502. Warning:  PBHRename cannot be used to change the directory a file is in.
  31503.  
  31504. Result codes    noErr      No error
  31505.                 bdNamErr   Bad file name
  31506.                 dirFulErr  File directory full
  31507.                 dirNFErr   Directory not found or incomplete pathname
  31508.                 dupFNErr   Duplicate file name and version
  31509.                 extFSErr   External file system
  31510.                 fLckdErr   File locked
  31511.                 fnfErr     File not found
  31512.                 fsRnErr    Problem during rename
  31513.                 ioErr      I/O error
  31514.                 nsvErr     No such volume
  31515.                 paramErr   No default volume
  31516.                 vLckdErr   Software volume lock
  31517.                 wPrErr     Hardware volume lock
  31518.  
  31519. æKY PBHRenameSync
  31520. æFp Files.p
  31521. æT FUNCTION
  31522. æTN A20B
  31523. æD FUNCTION PBHRenameSync(paramBlock: HParmBlkPtr): OSErr;
  31524.     INLINE $205F,$A20B,$3E80;
  31525. æDT myVariable := PBHRenameSync(paramBlock,A0);
  31526. æRI IV-154 
  31527. æC 
  31528. Trap macro    _HRename
  31529.  
  31530. Parameter block
  31531.   -->    12    ioCompletion  pointer
  31532.   <--    16    ioResult      word
  31533.   -->    18    ioNamePtr     pointer
  31534.   -->    22    ioVRefNum     word
  31535.   -->    28    ioMisc        pointer
  31536.   -->    48    ioDirID       long word
  31537.  
  31538. PBHRename is identical to PBRename except that it accepts a directory ID in ioDirID
  31539. and can be used to rename directories as well as files and volumes. Given a pointer
  31540. to the name of a file or directory in ioNamePtr, PBHRename changes it to the name
  31541. pointed to by ioMisc. Given a pointer to a volume name in ioNamePtr or a volume
  31542. reference number in ioVRefNum, it changes the name of the volume to the name pointed
  31543. to by ioMisc.
  31544.  
  31545. Warning:  PBHRename cannot be used to change the directory a file is in.
  31546.  
  31547. Result codes    noErr      No error
  31548.                 bdNamErr   Bad file name
  31549.                 dirFulErr  File directory full
  31550.                 dirNFErr   Directory not found or incomplete pathname
  31551.                 dupFNErr   Duplicate file name and version
  31552.                 extFSErr   External file system
  31553.                 fLckdErr   File locked
  31554.                 fnfErr     File not found
  31555.                 fsRnErr    Problem during rename
  31556.                 ioErr      I/O error
  31557.                 nsvErr     No such volume
  31558.                 paramErr   No default volume
  31559.                 vLckdErr   Software volume lock
  31560.                 wPrErr     Hardware volume lock
  31561.  
  31562. æKY PBHRenameAsync
  31563. æFp Files.p
  31564. æT FUNCTION
  31565. æTN A60B
  31566. æD FUNCTION PBHRenameAsync(paramBlock: HParmBlkPtr): OSErr;
  31567.     INLINE $205F,$A60B,$3E80;
  31568. æDT myVariable := PBHRenameAsync(paramBlock,A0);
  31569. æRI IV-154 
  31570. æC 
  31571. Trap macro    _HRename
  31572.  
  31573. Parameter block
  31574.   -->    12    ioCompletion  pointer
  31575.   <--    16    ioResult      word
  31576.   -->    18    ioNamePtr     pointer
  31577.   -->    22    ioVRefNum     word
  31578.   -->    28    ioMisc        pointer
  31579.   -->    48    ioDirID       long word
  31580.  
  31581. PBHRename is identical to PBRename except that it accepts a directory ID in ioDirID
  31582. and can be used to rename directories as well as files and volumes. Given a pointer
  31583. to the name of a file or directory in ioNamePtr, PBHRename changes it to the name
  31584. pointed to by ioMisc. Given a pointer to a volume name in ioNamePtr or a volume
  31585. reference number in ioVRefNum, it changes the name of the volume to the name pointed
  31586. to by ioMisc.
  31587.  
  31588. Warning:  PBHRename cannot be used to change the directory a file is in.
  31589.  
  31590. Result codes    noErr      No error
  31591.                 bdNamErr   Bad file name
  31592.                 dirFulErr  File directory full
  31593.                 dirNFErr   Directory not found or incomplete pathname
  31594.                 dupFNErr   Duplicate file name and version
  31595.                 extFSErr   External file system
  31596.                 fLckdErr   File locked
  31597.                 fnfErr     File not found
  31598.                 fsRnErr    Problem during rename
  31599.                 ioErr      I/O error
  31600.                 nsvErr     No such volume
  31601.                 paramErr   No default volume
  31602.                 vLckdErr   Software volume lock
  31603.                 wPrErr     Hardware volume lock
  31604.  
  31605. æKY PBHRstFLock
  31606. æFp Files.p
  31607. æT FUNCTION
  31608. æD FUNCTION PBHRstFLock(paramBlock: HParmBlkPtr;async: BOOLEAN): OSErr;
  31609. æDT myVariable := PBHRstFLock(paramBlock,async);
  31610. æRI IV-152 
  31611. æC 
  31612. Trap macro    _HRstFLock
  31613.  
  31614. Parameter block
  31615.   -->    12    ioCompletion  pointer
  31616.   <--    16    ioResult      word
  31617.   -->    18    ioNamePtr     pointer
  31618.   -->    22    ioVRefNum     word
  31619.   -->    48    ioDirID       long word
  31620.  
  31621. PBHRstFLock is identical to PBRstFLock except that it accepts a directory ID in
  31622. ioDirID.
  31623.  
  31624. Result codes    noErr     No error
  31625.                 dirNFErr  Directory not found or incomplete pathname
  31626.                 extFSErr  External file system
  31627.                 fnfErr    File not found
  31628.                 ioErr     I/O error
  31629.                 nsvErr    No such volume
  31630.                 vLckdErr  Software volume lock
  31631.                 wPrErr    Hardware volume lock
  31632.     
  31633.  
  31634. æKY PBHRstFLockSync
  31635. æFp Files.p
  31636. æT FUNCTION
  31637. æTN A242
  31638. æD FUNCTION PBHRstFLockSync(paramBlock: HParmBlkPtr): OSErr;
  31639.     INLINE $205F,$A242,$3E80;
  31640. æDT myVariable := PBHRstFLockSync(paramBlock,A0);
  31641. æRI IV-152 
  31642. æC 
  31643. Trap macro    _HRstFLock
  31644.  
  31645. Parameter block
  31646.   -->    12    ioCompletion  pointer
  31647.   <--    16    ioResult      word
  31648.   -->    18    ioNamePtr     pointer
  31649.   -->    22    ioVRefNum     word
  31650.   -->    48    ioDirID       long word
  31651.  
  31652. PBHRstFLock is identical to PBRstFLock except that it accepts a directory ID in
  31653. ioDirID.
  31654.  
  31655. Result codes    noErr     No error
  31656.                 dirNFErr  Directory not found or incomplete pathname
  31657.                 extFSErr  External file system
  31658.                 fnfErr    File not found
  31659.                 ioErr     I/O error
  31660.                 nsvErr    No such volume
  31661.                 vLckdErr  Software volume lock
  31662.                 wPrErr    Hardware volume lock
  31663.     
  31664.  
  31665. æKY PBHRstFLockAsync
  31666. æFp Files.p
  31667. æT FUNCTION
  31668. æTN A642
  31669. æD FUNCTION PBHRstFLockAsync(paramBlock: HParmBlkPtr): OSErr;
  31670.     INLINE $205F,$A642,$3E80;
  31671. æDT myVariable := PBHRstFLockAsync(paramBlock,A0);
  31672. æRI IV-152 
  31673. æC 
  31674. Trap macro    _HRstFLock
  31675.  
  31676. Parameter block
  31677.   -->    12    ioCompletion  pointer
  31678.   <--    16    ioResult      word
  31679.   -->    18    ioNamePtr     pointer
  31680.   -->    22    ioVRefNum     word
  31681.   -->    48    ioDirID       long word
  31682.  
  31683. PBHRstFLock is identical to PBRstFLock except that it accepts a directory ID in
  31684. ioDirID.
  31685.  
  31686. Result codes    noErr     No error
  31687.                 dirNFErr  Directory not found or incomplete pathname
  31688.                 extFSErr  External file system
  31689.                 fnfErr    File not found
  31690.                 ioErr     I/O error
  31691.                 nsvErr    No such volume
  31692.                 vLckdErr  Software volume lock
  31693.                 wPrErr    Hardware volume lock
  31694.     
  31695.  
  31696. æKY PBHSetFLock
  31697. æFp Files.p
  31698. æT FUNCTION
  31699. æD FUNCTION PBHSetFLock(paramBlock: HParmBlkPtr;async: BOOLEAN): OSErr;
  31700. æDT myVariable := PBHSetFLock(paramBlock,async);
  31701. æRI IV-151
  31702. æC 
  31703. Trap macro    _HSetFLock
  31704.  
  31705. Parameter block
  31706.   -->    12    ioCompletion  pointer
  31707.   <--    16    ioResult      word
  31708.   -->    18    ioNamePtr     pointer
  31709.   -->    22    ioVRefNum     word
  31710.   -->    48    ioDirID       long word
  31711.  
  31712. PBHSetFLock is identical to PBSetFLock except that it accepts a directory ID in
  31713. ioDirID.
  31714.  
  31715. Result codes    noErr     No error
  31716.                 dirNFErr  Directory not found or incomplete pathname
  31717.                 extFSErr  External file system
  31718.                 fnfErr    File not found
  31719.                 ioErr     I/O error
  31720.                 nsvErr    No such volume
  31721.                 vLckdErr  Software volume lock
  31722.                 wPrErr    Hardware volume lock
  31723.  
  31724. æKY PBHSetFLockSync
  31725. æFp Files.p
  31726. æT FUNCTION
  31727. æTN A241
  31728. æD FUNCTION PBHSetFLockSync(paramBlock: HParmBlkPtr): OSErr;
  31729.     INLINE $205F,$A241,$3E80;
  31730. æDT myVariable := PBHSetFLockSync(paramBlock,A0);
  31731. æRI IV-151
  31732. æC 
  31733. Trap macro    _HSetFLock
  31734.  
  31735. Parameter block
  31736.   -->    12    ioCompletion  pointer
  31737.   <--    16    ioResult      word
  31738.   -->    18    ioNamePtr     pointer
  31739.   -->    22    ioVRefNum     word
  31740.   -->    48    ioDirID       long word
  31741.  
  31742. PBHSetFLock is identical to PBSetFLock except that it accepts a directory ID in
  31743. ioDirID.
  31744.  
  31745. Result codes    noErr     No error
  31746.                 dirNFErr  Directory not found or incomplete pathname
  31747.                 extFSErr  External file system
  31748.                 fnfErr    File not found
  31749.                 ioErr     I/O error
  31750.                 nsvErr    No such volume
  31751.                 vLckdErr  Software volume lock
  31752.                 wPrErr    Hardware volume lock
  31753.  
  31754. æKY PBHSetFLockAsync
  31755. æFp Files.p
  31756. æT FUNCTION
  31757. æTN A641
  31758. æD FUNCTION PBHSetFLockAsync(paramBlock: HParmBlkPtr): OSErr;
  31759.     INLINE $205F,$A641,$3E80;
  31760. æDT myVariable := PBHSetFLockAsync(paramBlock,A0);
  31761. æRI IV-151
  31762. æC 
  31763. Trap macro    _HSetFLock
  31764.  
  31765. Parameter block
  31766.   -->    12    ioCompletion  pointer
  31767.   <--    16    ioResult      word
  31768.   -->    18    ioNamePtr     pointer
  31769.   -->    22    ioVRefNum     word
  31770.   -->    48    ioDirID       long word
  31771.  
  31772. PBHSetFLock is identical to PBSetFLock except that it accepts a directory ID in
  31773. ioDirID.
  31774.  
  31775. Result codes    noErr     No error
  31776.                 dirNFErr  Directory not found or incomplete pathname
  31777.                 extFSErr  External file system
  31778.                 fnfErr    File not found
  31779.                 ioErr     I/O error
  31780.                 nsvErr    No such volume
  31781.                 vLckdErr  Software volume lock
  31782.                 wPrErr    Hardware volume lock
  31783.  
  31784. æKY PBHGetFInfo
  31785. æFp Files.p
  31786. æT FUNCTION
  31787. æD FUNCTION PBHGetFInfo(paramBlock: HParmBlkPtr;async: BOOLEAN): OSErr;
  31788. æDT myVariable := PBHGetFInfo(paramBlock,async);
  31789. æRI IV-149 
  31790. æC 
  31791. Trap macro    _HGetFileInfo
  31792.  
  31793. Parameter block
  31794.   -->    12    ioCompletion  pointer
  31795.   <--    16    ioResult      word
  31796.   <->    18    ioNamePtr     pointer
  31797.   -->    22    ioVRefNum     word
  31798.   <--    24    ioFRefNum     word
  31799.   -->    28    ioFDirIndex   word
  31800.   <--    30    ioFlAttrib    byte
  31801.   <--    32    ioFlFndrInfo  16 bytes
  31802.   <->    48    ioDirID       long word
  31803.   <--    52    ioFlStBlk     word
  31804.   <--    54    ioFlLgLen     long word
  31805.   <--    58    ioFlPyLen     long word
  31806.   <--    62    ioFlRStBlk    word
  31807.   <--    64    ioFlRLgLen    long word
  31808.   <--    68    ioFlRPyLen    long word
  31809.   <--    72    ioFlCrDat     long word
  31810.   <--    76    ioFlMdDat     long word
  31811.  
  31812. PBHGetFInfo is identical to PBGetFInfo except that it accepts a directory ID in
  31813. ioDirID.
  31814.  
  31815. Result codes    noErr     No error
  31816.                 bdNamErr  Bad file name
  31817.                 dirNFErr  Directory not found or incomplete pathname
  31818.                 extFSErr  External file system
  31819.                 fnfErr    File not found
  31820.                 ioErr     I/O error
  31821.                 nsvErr    No such volume
  31822.                 paramErr  No default volume
  31823.  
  31824. æKY PBHGetFInfoSync
  31825. æFp Files.p
  31826. æT FUNCTION
  31827. æTN A20C
  31828. æD FUNCTION PBHGetFInfoSync(paramBlock: HParmBlkPtr): OSErr;
  31829.     INLINE $205F,$A20C,$3E80;
  31830. æDT myVariable := PBHGetFInfoSync(paramBlock,A0);
  31831. æRI IV-149 
  31832. æC 
  31833. Trap macro    _HGetFileInfo
  31834.  
  31835. Parameter block
  31836.   -->    12    ioCompletion  pointer
  31837.   <--    16    ioResult      word
  31838.   <->    18    ioNamePtr     pointer
  31839.   -->    22    ioVRefNum     word
  31840.   <--    24    ioFRefNum     word
  31841.   -->    28    ioFDirIndex   word
  31842.   <--    30    ioFlAttrib    byte
  31843.   <--    32    ioFlFndrInfo  16 bytes
  31844.   <->    48    ioDirID       long word
  31845.   <--    52    ioFlStBlk     word
  31846.   <--    54    ioFlLgLen     long word
  31847.   <--    58    ioFlPyLen     long word
  31848.   <--    62    ioFlRStBlk    word
  31849.   <--    64    ioFlRLgLen    long word
  31850.   <--    68    ioFlRPyLen    long word
  31851.   <--    72    ioFlCrDat     long word
  31852.   <--    76    ioFlMdDat     long word
  31853.  
  31854. PBHGetFInfo is identical to PBGetFInfo except that it accepts a directory ID in
  31855. ioDirID.
  31856.  
  31857. Result codes    noErr     No error
  31858.                 bdNamErr  Bad file name
  31859.                 dirNFErr  Directory not found or incomplete pathname
  31860.                 extFSErr  External file system
  31861.                 fnfErr    File not found
  31862.                 ioErr     I/O error
  31863.                 nsvErr    No such volume
  31864.                 paramErr  No default volume
  31865.  
  31866. æKY PBHGetFInfoAsync
  31867. æFp Files.p
  31868. æT FUNCTION
  31869. æTN A60C
  31870. æD FUNCTION PBHGetFInfoAsync(paramBlock: HParmBlkPtr): OSErr;
  31871.     INLINE $205F,$A60C,$3E80;
  31872. æDT myVariable := PBHGetFInfoAsync(paramBlock,A0);
  31873. æRI IV-149 
  31874. æC 
  31875. Trap macro    _HGetFileInfo
  31876.  
  31877. Parameter block
  31878.   -->    12    ioCompletion  pointer
  31879.   <--    16    ioResult      word
  31880.   <->    18    ioNamePtr     pointer
  31881.   -->    22    ioVRefNum     word
  31882.   <--    24    ioFRefNum     word
  31883.   -->    28    ioFDirIndex   word
  31884.   <--    30    ioFlAttrib    byte
  31885.   <--    32    ioFlFndrInfo  16 bytes
  31886.   <->    48    ioDirID       long word
  31887.   <--    52    ioFlStBlk     word
  31888.   <--    54    ioFlLgLen     long word
  31889.   <--    58    ioFlPyLen     long word
  31890.   <--    62    ioFlRStBlk    word
  31891.   <--    64    ioFlRLgLen    long word
  31892.   <--    68    ioFlRPyLen    long word
  31893.   <--    72    ioFlCrDat     long word
  31894.   <--    76    ioFlMdDat     long word
  31895.  
  31896. PBHGetFInfo is identical to PBGetFInfo except that it accepts a directory ID in
  31897. ioDirID.
  31898.  
  31899. Result codes    noErr     No error
  31900.                 bdNamErr  Bad file name
  31901.                 dirNFErr  Directory not found or incomplete pathname
  31902.                 extFSErr  External file system
  31903.                 fnfErr    File not found
  31904.                 ioErr     I/O error
  31905.                 nsvErr    No such volume
  31906.                 paramErr  No default volume
  31907.  
  31908. æKY PBHSetFInfo
  31909. æFp Files.p
  31910. æT FUNCTION
  31911. æD FUNCTION PBHSetFInfo(paramBlock: HParmBlkPtr;async: BOOLEAN): OSErr;
  31912. æDT myVariable := PBHSetFInfo(paramBlock,async);
  31913. æRI IV-150
  31914. æC 
  31915. Trap macro    _HSetFileInfo
  31916.  
  31917. Parameter block
  31918.   -->    12    ioCompletion  pointer
  31919.   <--    16    ioResult      word
  31920.   -->    18    ioNamePtr     pointer
  31921.   -->    22    ioVRefNum     word
  31922.   -->    32    ioFlFndrInfo  16 bytes
  31923.   -->    48    ioDirID       long word
  31924.   -->    72    ioFlCrDat     long word
  31925.   -->    76    ioFlMdDat     long word
  31926.  
  31927. PBHSetFInfo is identical to PBSetFInfo except that it accepts a directory ID in
  31928. ioDirID.
  31929.  
  31930. Result codes    noErr     No error
  31931.                 bdNamErr  Bad file name
  31932.                 dirNFErr  Directory not found or incomplete pathname
  31933.                 extFSErr  External file system
  31934.                 fLckdErr  File locked
  31935.                 fnfErr    File not found
  31936.                 ioErr     I/O error
  31937.                 nsvErr    No such volume
  31938.                 vLckdErr  Software volume lock
  31939.                 wPrErr    Hardware volume lock
  31940.  
  31941. æKY PBHSetFInfoSync
  31942. æFp Files.p
  31943. æT FUNCTION
  31944. æTN A20D
  31945. æD FUNCTION PBHSetFInfoSync(paramBlock: HParmBlkPtr): OSErr;
  31946.     INLINE $205F,$A20D,$3E80;
  31947. æDT myVariable := PBHSetFInfoSync(paramBlock,A0);
  31948. æRI IV-150
  31949. æC 
  31950. Trap macro    _HSetFileInfo
  31951.  
  31952. Parameter block
  31953.   -->    12    ioCompletion  pointer
  31954.   <--    16    ioResult      word
  31955.   -->    18    ioNamePtr     pointer
  31956.   -->    22    ioVRefNum     word
  31957.   -->    32    ioFlFndrInfo  16 bytes
  31958.   -->    48    ioDirID       long word
  31959.   -->    72    ioFlCrDat     long word
  31960.   -->    76    ioFlMdDat     long word
  31961.  
  31962. PBHSetFInfo is identical to PBSetFInfo except that it accepts a directory ID in
  31963. ioDirID.
  31964.  
  31965. Result codes    noErr     No error
  31966.                 bdNamErr  Bad file name
  31967.                 dirNFErr  Directory not found or incomplete pathname
  31968.                 extFSErr  External file system
  31969.                 fLckdErr  File locked
  31970.                 fnfErr    File not found
  31971.                 ioErr     I/O error
  31972.                 nsvErr    No such volume
  31973.                 vLckdErr  Software volume lock
  31974.                 wPrErr    Hardware volume lock
  31975.  
  31976. æKY PBHSetFInfoAsync
  31977. æFp Files.p
  31978. æT FUNCTION
  31979. æTN A60D
  31980. æD FUNCTION PBHSetFInfoAsync(paramBlock: HParmBlkPtr): OSErr;
  31981.     INLINE $205F,$A60D,$3E80;
  31982. æDT myVariable := PBHSetFInfoAsync(paramBlock,A0);
  31983. æRI IV-150
  31984. æC 
  31985. Trap macro    _HSetFileInfo
  31986.  
  31987. Parameter block
  31988.   -->    12    ioCompletion  pointer
  31989.   <--    16    ioResult      word
  31990.   -->    18    ioNamePtr     pointer
  31991.   -->    22    ioVRefNum     word
  31992.   -->    32    ioFlFndrInfo  16 bytes
  31993.   -->    48    ioDirID       long word
  31994.   -->    72    ioFlCrDat     long word
  31995.   -->    76    ioFlMdDat     long word
  31996.  
  31997. PBHSetFInfo is identical to PBSetFInfo except that it accepts a directory ID in
  31998. ioDirID.
  31999.  
  32000. Result codes    noErr     No error
  32001.                 bdNamErr  Bad file name
  32002.                 dirNFErr  Directory not found or incomplete pathname
  32003.                 extFSErr  External file system
  32004.                 fLckdErr  File locked
  32005.                 fnfErr    File not found
  32006.                 ioErr     I/O error
  32007.                 nsvErr    No such volume
  32008.                 vLckdErr  Software volume lock
  32009.                 wPrErr    Hardware volume lock
  32010.  
  32011. æKY PBMakeFSSpec
  32012. æFp Files.p
  32013. æT FUNCTION
  32014. æD FUNCTION PBMakeFSSpec(paramBlock: HParmBlkPtr;async: BOOLEAN): OSErr;
  32015. æDT myVariable := PBMakeFSSpec(paramBlock,async);
  32016. æC 
  32017.  
  32018. æKY PBMakeFSSpecSync
  32019. æFp Files.p
  32020. æT FUNCTION
  32021. æTN 701B,A260
  32022. æD FUNCTION PBMakeFSSpecSync(paramBlock: HParmBlkPtr): OSErr;
  32023.     INLINE $205F,$701B,$A260,$3E80;
  32024. æDT myVariable := PBMakeFSSpecSync(paramBlock,A0);
  32025. æC 
  32026.  
  32027. æKY PBMakeFSSpecAsync
  32028. æFp Files.p
  32029. æT FUNCTION
  32030. æTN 701B,A660
  32031. æD FUNCTION PBMakeFSSpecAsync(paramBlock: HParmBlkPtr): OSErr;
  32032.     INLINE $205F,$701B,$A660,$3E80;
  32033. æDT myVariable := PBMakeFSSpecAsync(paramBlock,A0);
  32034. æC 
  32035.  
  32036. æKY FInitQueue
  32037. æFp Files.p
  32038. æT PROCEDURE
  32039. æTN A016
  32040. æD PROCEDURE FInitQueue;
  32041.     INLINE $A016;
  32042. æDT FInitQueue;
  32043. æRI II-103, IV-128
  32044. æC 
  32045. Trap macro    _InitQueue
  32046.  
  32047. FInitQueue clears all queued File Manager calls except the current one.
  32048.  
  32049. æKY GetFSQHdr
  32050. æFp Files.p
  32051. æT FUNCTION
  32052. æD FUNCTION GetFSQHdr: QHdrPtr;
  32053.     INLINE $2EBC,$0000,$0360;
  32054. æDT myVariable := GetFSQHdr;
  32055. æRI II-125, IV-175
  32056. æC 
  32057. You can get a pointer to the header of the file I/O queue by calling the File Manager
  32058. function GetFSQHdr.
  32059.  
  32060. FUNCTION GetFSQHdr :  QHdrPtr; [Not in ROM]
  32061.  
  32062. GetFSQHdr returns a pointer to the header of the file I/O queue.
  32063.  
  32064. Assembly-language note:  The global variable FSQHdr contains the
  32065.                          header of the file I/O queue.
  32066.  
  32067. æKY GetDrvQHdr
  32068. æFp Files.p
  32069. æT FUNCTION
  32070. æD FUNCTION GetDrvQHdr: QHdrPtr;
  32071.     INLINE $2EBC,$0000,$0308;
  32072. æDT myVariable := GetDrvQHdr;
  32073. æRI II-128, IV-181
  32074. æC 
  32075. You can get a pointer to the header of the drive queue by calling the File Manager
  32076. function GetDrvQHdr.
  32077.  
  32078. FUNCTION GetDrvQHdr :  QHdrPtr; [Not in ROM]
  32079.  
  32080. GetDrvQHdr returns a pointer to the header of the drive queue.
  32081.  
  32082. Assembly-language note:  The global variable DrvQHdr contains the
  32083.                          header of the drive queue.
  32084.  
  32085. The drive queue can support any number of drives, limited only by memory space.
  32086.  
  32087. æKY GetVCBQHdr
  32088. æFp Files.p
  32089. æT FUNCTION
  32090. æD FUNCTION GetVCBQHdr: QHdrPtr;
  32091.     INLINE $2EBC,$0000,$0356;
  32092. æDT myVariable := GetVCBQHdr;
  32093. æRI II-126, IV-178
  32094. æC 
  32095. You can get a pointer to the header of the volume-control-block queue by calling the
  32096. File Manager function GetVCBQHdr.
  32097.  
  32098. FUNCTION GetVCBQHdr :  QHdrPtr; [Not in ROM]
  32099.  
  32100. GetVCBQHdr returns a pointer to the header of the volume-control-block queue.
  32101.  
  32102. Assembly-language note:  The global variable VCBQHdr contains the header
  32103.                          of the volume-control-block-queue. The default
  32104.                          volume’s volume control block is pointed to by
  32105.                          the global variable DefVCBPtr.
  32106.  
  32107. æKY HGetVol
  32108. æFp Files.p
  32109. æT FUNCTION
  32110. æD FUNCTION HGetVol(volName: StringPtr;VAR vRefNum: INTEGER;VAR dirID: LONGINT): OSErr;
  32111. æDT myVariable := HGetVol(volName,vRefNum,dirID);
  32112. æRI IV-132
  32113. æC 
  32114.  
  32115. æKY HSetVol
  32116. æFp Files.p
  32117. æT FUNCTION
  32118. æD FUNCTION HSetVol(volName: StringPtr;vRefNum: INTEGER;dirID: LONGINT): OSErr;
  32119. æDT myVariable := HSetVol(volName,vRefNum,dirID);
  32120. æRI IV-133
  32121. æC 
  32122.  
  32123. æKY HOpen
  32124. æFp Files.p
  32125. æT FUNCTION
  32126. æD FUNCTION HOpen(vRefNum: INTEGER;dirID: LONGINT;fileName: Str255;permission: SignedByte;
  32127.     VAR refNum: INTEGER): OSErr;
  32128. æDT myVariable := HOpen(vRefNum,dirID,fileName,permission,refNum);
  32129. æRI IV-136
  32130. æC 
  32131.  
  32132. æKY HOpenDF
  32133. æFp Files.p
  32134. æT FUNCTION
  32135. æD FUNCTION HOpenDF(vRefNum: INTEGER;dirID: LONGINT;fileName: Str255;permission: SignedByte;
  32136.     VAR refNum: INTEGER): OSErr;
  32137. æDT myVariable := HOpenDF(vRefNum,dirID,fileName,permission,refNum);
  32138. æRI IV-136
  32139. æC 
  32140.  
  32141. æKY HOpenRF
  32142. æFp Files.p
  32143. æT FUNCTION
  32144. æD FUNCTION HOpenRF(vRefNum: INTEGER;dirID: LONGINT;fileName: Str255;permission: SignedByte;
  32145.     VAR refNum: INTEGER): OSErr;
  32146. æDT myVariable := HOpenRF(vRefNum,dirID,fileName,permission,refNum);
  32147. æRI IV-137
  32148. æC 
  32149.  
  32150. æKY AllocContig
  32151. æFp Files.p
  32152. æT FUNCTION
  32153. æD FUNCTION AllocContig(refNum: INTEGER;VAR count: LONGINT): OSErr;
  32154. æDT myVariable := AllocContig(refNum,count);
  32155. æRT 218
  32156. æRI IV-143
  32157. æC 
  32158.  
  32159. æKY HCreate
  32160. æFp Files.p
  32161. æT FUNCTION
  32162. æD FUNCTION HCreate(vRefNum: INTEGER;dirID: LONGINT;fileName: Str255;creator: OSType;
  32163.     fileType: OSType): OSErr;
  32164. æDT myVariable := HCreate(vRefNum,dirID,fileName,creator,fileType);
  32165. æRT 218
  32166. æRI IV-146
  32167. æC 
  32168.  
  32169. æKY DirCreate
  32170. æFp Files.p
  32171. æT FUNCTION
  32172. æD FUNCTION DirCreate(vRefNum: INTEGER;parentDirID: LONGINT;directoryName: Str255;
  32173.     VAR createdDirID: LONGINT): OSErr;
  32174. æDT myVariable := DirCreate(vRefNum,parentDirID,directoryName,createdDirID);
  32175. æRT 218
  32176. æRI IV-146
  32177. æC 
  32178.  
  32179. æKY HDelete
  32180. æFp Files.p
  32181. æT FUNCTION
  32182. æD FUNCTION HDelete(vRefNum: INTEGER;dirID: LONGINT;fileName: Str255): OSErr;
  32183. æDT myVariable := HDelete(vRefNum,dirID,fileName);
  32184. æRI IV-147
  32185. æC 
  32186.  
  32187. æKY HGetFInfo
  32188. æFp Files.p
  32189. æT FUNCTION
  32190. æD FUNCTION HGetFInfo(vRefNum: INTEGER;dirID: LONGINT;fileName: Str255;VAR fndrInfo: FInfo): OSErr;
  32191. æDT myVariable := HGetFInfo(vRefNum,dirID,fileName,fndrInfo);
  32192. æRI IV-149
  32193. æC 
  32194.  
  32195. æKY HSetFInfo
  32196. æFp Files.p
  32197. æT FUNCTION
  32198. æD FUNCTION HSetFInfo(vRefNum: INTEGER;dirID: LONGINT;fileName: Str255;fndrInfo: FInfo): OSErr;
  32199. æDT myVariable := HSetFInfo(vRefNum,dirID,fileName,fndrInfo);
  32200. æRI IV-150
  32201. æC 
  32202.  
  32203. æKY HSetFLock
  32204. æFp Files.p
  32205. æT FUNCTION
  32206. æD FUNCTION HSetFLock(vRefNum: INTEGER;dirID: LONGINT;fileName: Str255): OSErr;
  32207. æDT myVariable := HSetFLock(vRefNum,dirID,fileName);
  32208. æRI IV-151
  32209. æC 
  32210.  
  32211. æKY HRstFLock
  32212. æFp Files.p
  32213. æT FUNCTION
  32214. æD FUNCTION HRstFLock(vRefNum: INTEGER;dirID: LONGINT;fileName: Str255): OSErr;
  32215. æDT myVariable := HRstFLock(vRefNum,dirID,fileName);
  32216. æRI IV-152
  32217. æC 
  32218.  
  32219. æKY HRename
  32220. æFp Files.p
  32221. æT FUNCTION
  32222. æD FUNCTION HRename(vRefNum: INTEGER;dirID: LONGINT;oldName: Str255;newName: Str255): OSErr;
  32223. æDT myVariable := HRename(vRefNum,dirID,oldName,newName);
  32224. æRI IV-154
  32225. æC 
  32226.  
  32227. æKY CatMove
  32228. æFp Files.p
  32229. æT FUNCTION
  32230. æD FUNCTION CatMove(vRefNum: INTEGER;dirID: LONGINT;oldName: Str255;newDirID: LONGINT;
  32231.     newName: Str255): OSErr;
  32232. æDT myVariable := CatMove(vRefNum,dirID,oldName,newDirID,newName);
  32233. æRT 218
  32234. æRI IV-157
  32235. æC 
  32236.  
  32237. æKY OpenWD
  32238. æFp Files.p
  32239. æT FUNCTION
  32240. æD FUNCTION OpenWD(vRefNum: INTEGER;dirID: LONGINT;procID: LONGINT;VAR wdRefNum: INTEGER): OSErr;
  32241. æDT myVariable := OpenWD(vRefNum,dirID,procID,wdRefNum);
  32242. æRT 218
  32243. æRI IV-158
  32244. æC 
  32245.  
  32246. æKY CloseWD
  32247. æFp Files.p
  32248. æT FUNCTION
  32249. æD FUNCTION CloseWD(wdRefNum: INTEGER): OSErr;
  32250. æDT myVariable := CloseWD(wdRefNum);
  32251. æRT 218
  32252. æRI IV-158
  32253. æC 
  32254.  
  32255. æKY GetWDInfo
  32256. æFp Files.p
  32257. æT FUNCTION
  32258. æD FUNCTION GetWDInfo(wdRefNum: INTEGER;VAR vRefNum: INTEGER;VAR dirID: LONGINT;
  32259.     VAR procID: LONGINT): OSErr;
  32260. æDT myVariable := GetWDInfo(wdRefNum,vRefNum,dirID,procID);
  32261. æRT 218
  32262. æRI IV-159
  32263. æC 
  32264.  
  32265. æKY PBHGetVolParms
  32266. æFp Files.p
  32267. æT FUNCTION
  32268. æD FUNCTION PBHGetVolParms(paramBlock: HParmBlkPtr;async: BOOLEAN): OSErr;
  32269. æDT myVariable := PBHGetVolParms(paramBlock,async);
  32270. æRI V-392
  32271. æC 
  32272. Trap macro    _GetVolParms
  32273.  
  32274. Parameter block
  32275.   -->    12    ioCompletion  long    optional completion routine ptr
  32276.   <--    16    ioResult      word    error result code
  32277.   -->    18    ioFileName    long    volume name specifier
  32278.   -->    22    ioVRefNum     word    volume refNum
  32279.   <--    32    ioBuffer      long    ptr to vol parms data
  32280.   -->    36    ioReqCount    long    size of buffer area
  32281.   <--    40    ioActCount    long    length of vol parms data
  32282.  
  32283. The PBHGetVolParms call is used to return volume level information.  ioVRefNum or
  32284. ioFileName contain the volume identifier information.  ioReqCount and ioBuffer contain
  32285. the size and location of the buffer in which to place the volume parameters.  The
  32286. actual size of the information is returned in ioActCount.
  32287.  
  32288. The format of the buffer is described below.  Version 01 of the buffer is shown below
  32289. along with offsets into the buffer and their equates:
  32290.  
  32291. offset    0    vMVersion    word    version number (currently 01)
  32292.           2    vMAttrib     long    attributes (detailed below)
  32293.           6    vMLocalHand  long    handle used to keep information
  32294.                                     necessary for shared volumes
  32295.          10    vMServerAdr  long    AppleTalk server address (zero if
  32296.                                     not supported)
  32297.  
  32298. On creation of the VCB (right after mounting), vMLocalHand will be a handle to a 2
  32299. byte block of memory.  The Finder uses this for its local window list storage, allocating
  32300. and deallocating memory as needed.  It is disposed of when the volume is unmounted.
  32301.  
  32302. For AppleTalk server volumes, vMServerAdr contains the AppleTalk internet address of
  32303. the server.  This can be used to tell which volumes are for which server.
  32304.  
  32305. vMAttrib contains attributes information (32 flag bits) about the volume.  These bits
  32306. and their equates are defined as follows:
  32307.  
  32308. bit    31  bLimitFCBs      If set, Finder limits the number of FCBs used
  32309.                            during copies to 8 (instead of 16).
  32310.        30  bLocalWList     If set, Finder uses the returned shared volume
  32311.                            handle for its local window list.
  32312.        29  bNoMiniFndr     If set, Mini Finder menu item is disabled.
  32313.        28  bNoVNEdit       If set, volume name cannot be edited.
  32314.        27  bNoLclSync      If set, volume’s modification date is not set by
  32315.                            any Finder action.
  32316.        26  bTrshOffLine    If set, anytime volume goes offline, it is zoomed
  32317.                            to the Trash and unmounted.
  32318.        25  bNoSwitchTo     If set, Finder will not switch launch to any
  32319.                            application on the volume.
  32320.        24–21               Reserved—server volumes should return these
  32321.                            bits set, all other disks should return these
  32322.                            bits cleared.
  32323.        20  bNoDeskItems    If set, no items may be placed on the Finder desktop.
  32324.        19  bNoBootBlks     If set, no boot blocks on this volume—not a startup
  32325.                            volume.  SetStartup menu item will be disabled;
  32326.                            bootblocks will not be copied during copy operations.
  32327.        18  bAccessCntl     If set, volume supports AppleTalk AFP access control
  32328.                            interfaces.  The calls GetLoginInfo, GetDirAccess,
  32329.                            SetDirAccess, MapID, and MapName are supported.
  32330.                            Special folder icons are used.  Access Privileges
  32331.                            menu item is enabled for disk and folder items. The
  32332.                            privileges field of GetCatInfo calls are assumed to
  32333.                            be valid.
  32334.        17  bNoSysDir       If set, volume doesn’t support a system directory;
  32335.                            no switch launch to this volume.
  32336.        16  bExtFSVol       If set, this volume is an external file system
  32337.                            volume.  Disk init package will not be called.
  32338.                            Erase Disk menu item is disabled.
  32339.        15  bHasOpenDeny    If set, supports _OpenDeny and _OpenRFDeny calls.
  32340.                            For copy operations, source files are opened with
  32341.                            enable read/deny write and destination files are
  32342.                            opened enable write/deny read and write.
  32343.        14  bHasCopyFile    If set, _CopyFile call supported.  _CopyFile is
  32344.                            used in copy and duplicate operations if both source
  32345.                            and destination volumes have same server address.
  32346.        13  bHasMoveRename  If set, _MoveRename call supported.
  32347.        12  bHasNewDesk     If set, all of the new desktop calls are supported
  32348.                            (for example, OpenDB, AddIcon, AddComment).
  32349.        11–0                Reserved—these bits should be returned cleared.
  32350.  
  32351. æKY PBHGetVolParmsSync
  32352. æFp Files.p
  32353. æT FUNCTION
  32354. æTN 7030,A260
  32355. æD FUNCTION PBHGetVolParmsSync(paramBlock: HParmBlkPtr): OSErr;
  32356.     INLINE $205F,$7030,$A260,$3E80;
  32357. æDT myVariable := PBHGetVolParmsSync(paramBlock,A0);
  32358. æRI V-392
  32359. æC 
  32360. Trap macro    _GetVolParms
  32361.  
  32362. Parameter block
  32363.   -->    12    ioCompletion  long    optional completion routine ptr
  32364.   <--    16    ioResult      word    error result code
  32365.   -->    18    ioFileName    long    volume name specifier
  32366.   -->    22    ioVRefNum     word    volume refNum
  32367.   <--    32    ioBuffer      long    ptr to vol parms data
  32368.   -->    36    ioReqCount    long    size of buffer area
  32369.   <--    40    ioActCount    long    length of vol parms data
  32370.  
  32371. The PBHGetVolParms call is used to return volume level information.  ioVRefNum or
  32372. ioFileName contain the volume identifier information.  ioReqCount and ioBuffer contain
  32373. the size and location of the buffer in which to place the volume parameters.  The
  32374. actual size of the information is returned in ioActCount.
  32375.  
  32376. The format of the buffer is described below.  Version 01 of the buffer is shown below
  32377. along with offsets into the buffer and their equates:
  32378.  
  32379. offset    0    vMVersion    word    version number (currently 01)
  32380.           2    vMAttrib     long    attributes (detailed below)
  32381.           6    vMLocalHand  long    handle used to keep information
  32382.                                     necessary for shared volumes
  32383.          10    vMServerAdr  long    AppleTalk server address (zero if
  32384.                                     not supported)
  32385.  
  32386. On creation of the VCB (right after mounting), vMLocalHand will be a handle to a 2
  32387. byte block of memory.  The Finder uses this for its local window list storage, allocating
  32388. and deallocating memory as needed.  It is disposed of when the volume is unmounted.
  32389.  
  32390. For AppleTalk server volumes, vMServerAdr contains the AppleTalk internet address of
  32391. the server.  This can be used to tell which volumes are for which server.
  32392.  
  32393. vMAttrib contains attributes information (32 flag bits) about the volume.  These bits
  32394. and their equates are defined as follows:
  32395.  
  32396. bit    31  bLimitFCBs      If set, Finder limits the number of FCBs used
  32397.                            during copies to 8 (instead of 16).
  32398.        30  bLocalWList     If set, Finder uses the returned shared volume
  32399.                            handle for its local window list.
  32400.        29  bNoMiniFndr     If set, Mini Finder menu item is disabled.
  32401.        28  bNoVNEdit       If set, volume name cannot be edited.
  32402.        27  bNoLclSync      If set, volume’s modification date is not set by
  32403.                            any Finder action.
  32404.        26  bTrshOffLine    If set, anytime volume goes offline, it is zoomed
  32405.                            to the Trash and unmounted.
  32406.        25  bNoSwitchTo     If set, Finder will not switch launch to any
  32407.                            application on the volume.
  32408.        24–21               Reserved—server volumes should return these
  32409.                            bits set, all other disks should return these
  32410.                            bits cleared.
  32411.        20  bNoDeskItems    If set, no items may be placed on the Finder desktop.
  32412.        19  bNoBootBlks     If set, no boot blocks on this volume—not a startup
  32413.                            volume.  SetStartup menu item will be disabled;
  32414.                            bootblocks will not be copied during copy operations.
  32415.        18  bAccessCntl     If set, volume supports AppleTalk AFP access control
  32416.                            interfaces.  The calls GetLoginInfo, GetDirAccess,
  32417.                            SetDirAccess, MapID, and MapName are supported.
  32418.                            Special folder icons are used.  Access Privileges
  32419.                            menu item is enabled for disk and folder items. The
  32420.                            privileges field of GetCatInfo calls are assumed to
  32421.                            be valid.
  32422.        17  bNoSysDir       If set, volume doesn’t support a system directory;
  32423.                            no switch launch to this volume.
  32424.        16  bExtFSVol       If set, this volume is an external file system
  32425.                            volume.  Disk init package will not be called.
  32426.                            Erase Disk menu item is disabled.
  32427.        15  bHasOpenDeny    If set, supports _OpenDeny and _OpenRFDeny calls.
  32428.                            For copy operations, source files are opened with
  32429.                            enable read/deny write and destination files are
  32430.                            opened enable write/deny read and write.
  32431.        14  bHasCopyFile    If set, _CopyFile call supported.  _CopyFile is
  32432.                            used in copy and duplicate operations if both source
  32433.                            and destination volumes have same server address.
  32434.        13  bHasMoveRename  If set, _MoveRename call supported.
  32435.        12  bHasNewDesk     If set, all of the new desktop calls are supported
  32436.                            (for example, OpenDB, AddIcon, AddComment).
  32437.        11–0                Reserved—these bits should be returned cleared.
  32438.  
  32439. æKY PBHGetVolParmsAsync
  32440. æFp Files.p
  32441. æT FUNCTION
  32442. æTN 7030,A660
  32443. æD FUNCTION PBHGetVolParmsAsync(paramBlock: HParmBlkPtr): OSErr;
  32444.     INLINE $205F,$7030,$A660,$3E80;
  32445. æDT myVariable := PBHGetVolParmsAsync(paramBlock,A0);
  32446. æRI V-392
  32447. æC 
  32448. Trap macro    _GetVolParms
  32449.  
  32450. Parameter block
  32451.   -->    12    ioCompletion  long    optional completion routine ptr
  32452.   <--    16    ioResult      word    error result code
  32453.   -->    18    ioFileName    long    volume name specifier
  32454.   -->    22    ioVRefNum     word    volume refNum
  32455.   <--    32    ioBuffer      long    ptr to vol parms data
  32456.   -->    36    ioReqCount    long    size of buffer area
  32457.   <--    40    ioActCount    long    length of vol parms data
  32458.  
  32459. The PBHGetVolParms call is used to return volume level information.  ioVRefNum or
  32460. ioFileName contain the volume identifier information.  ioReqCount and ioBuffer contain
  32461. the size and location of the buffer in which to place the volume parameters.  The
  32462. actual size of the information is returned in ioActCount.
  32463.  
  32464. The format of the buffer is described below.  Version 01 of the buffer is shown below
  32465. along with offsets into the buffer and their equates:
  32466.  
  32467. offset    0    vMVersion    word    version number (currently 01)
  32468.           2    vMAttrib     long    attributes (detailed below)
  32469.           6    vMLocalHand  long    handle used to keep information
  32470.                                     necessary for shared volumes
  32471.          10    vMServerAdr  long    AppleTalk server address (zero if
  32472.                                     not supported)
  32473.  
  32474. On creation of the VCB (right after mounting), vMLocalHand will be a handle to a 2
  32475. byte block of memory.  The Finder uses this for its local window list storage, allocating
  32476. and deallocating memory as needed.  It is disposed of when the volume is unmounted.
  32477.  
  32478. For AppleTalk server volumes, vMServerAdr contains the AppleTalk internet address of
  32479. the server.  This can be used to tell which volumes are for which server.
  32480.  
  32481. vMAttrib contains attributes information (32 flag bits) about the volume.  These bits
  32482. and their equates are defined as follows:
  32483.  
  32484. bit    31  bLimitFCBs      If set, Finder limits the number of FCBs used
  32485.                            during copies to 8 (instead of 16).
  32486.        30  bLocalWList     If set, Finder uses the returned shared volume
  32487.                            handle for its local window list.
  32488.        29  bNoMiniFndr     If set, Mini Finder menu item is disabled.
  32489.        28  bNoVNEdit       If set, volume name cannot be edited.
  32490.        27  bNoLclSync      If set, volume’s modification date is not set by
  32491.                            any Finder action.
  32492.        26  bTrshOffLine    If set, anytime volume goes offline, it is zoomed
  32493.                            to the Trash and unmounted.
  32494.        25  bNoSwitchTo     If set, Finder will not switch launch to any
  32495.                            application on the volume.
  32496.        24–21               Reserved—server volumes should return these
  32497.                            bits set, all other disks should return these
  32498.                            bits cleared.
  32499.        20  bNoDeskItems    If set, no items may be placed on the Finder desktop.
  32500.        19  bNoBootBlks     If set, no boot blocks on this volume—not a startup
  32501.                            volume.  SetStartup menu item will be disabled;
  32502.                            bootblocks will not be copied during copy operations.
  32503.        18  bAccessCntl     If set, volume supports AppleTalk AFP access control
  32504.                            interfaces.  The calls GetLoginInfo, GetDirAccess,
  32505.                            SetDirAccess, MapID, and MapName are supported.
  32506.                            Special folder icons are used.  Access Privileges
  32507.                            menu item is enabled for disk and folder items. The
  32508.                            privileges field of GetCatInfo calls are assumed to
  32509.                            be valid.
  32510.        17  bNoSysDir       If set, volume doesn’t support a system directory;
  32511.                            no switch launch to this volume.
  32512.        16  bExtFSVol       If set, this volume is an external file system
  32513.                            volume.  Disk init package will not be called.
  32514.                            Erase Disk menu item is disabled.
  32515.        15  bHasOpenDeny    If set, supports _OpenDeny and _OpenRFDeny calls.
  32516.                            For copy operations, source files are opened with
  32517.                            enable read/deny write and destination files are
  32518.                            opened enable write/deny read and write.
  32519.        14  bHasCopyFile    If set, _CopyFile call supported.  _CopyFile is
  32520.                            used in copy and duplicate operations if both source
  32521.                            and destination volumes have same server address.
  32522.        13  bHasMoveRename  If set, _MoveRename call supported.
  32523.        12  bHasNewDesk     If set, all of the new desktop calls are supported
  32524.                            (for example, OpenDB, AddIcon, AddComment).
  32525.        11–0                Reserved—these bits should be returned cleared.
  32526.  
  32527. æKY PBHGetLogInInfo
  32528. æFp Files.p
  32529. æT FUNCTION
  32530. æD FUNCTION PBHGetLogInInfo(paramBlock: HParmBlkPtr;async: BOOLEAN): OSErr;
  32531. æDT myVariable := PBHGetLogInInfo(paramBlock,async);
  32532. æRI V-393
  32533. æC 
  32534. Trap macro    _GetLogInInfo
  32535.  
  32536. Parameter block
  32537.   -->    12    ioCompletion  long    optional completion routine ptr
  32538.   <--    16    ioResult      word    error result code
  32539.   -->    22    ioVRefNum     word    volume refNum
  32540.   <--    26    ioObjType     word    log in method
  32541.   <--    28    ioObjNamePtr  long    ptr to log in name buffer
  32542.  
  32543. PBHGetLogInInfo returns the method used for log-in and the user name specified at
  32544. log-in time for the volume.  The log-in user name is returned as a Pascal string in
  32545. ioObjNamePtr.  The maximum size of the user name is 31 characters.  The log-in method
  32546. type is returned in ioObjType.
  32547.  
  32548. æKY PBHGetLogInInfoSync
  32549. æFp Files.p
  32550. æT FUNCTION
  32551. æTN 7031,A260
  32552. æD FUNCTION PBHGetLogInInfoSync(paramBlock: HParmBlkPtr): OSErr;
  32553.     INLINE $205F,$7031,$A260,$3E80;
  32554. æDT myVariable := PBHGetLogInInfoSync(paramBlock,A0);
  32555. æRI V-393
  32556. æC 
  32557. Trap macro    _GetLogInInfo
  32558.  
  32559. Parameter block
  32560.   -->    12    ioCompletion  long    optional completion routine ptr
  32561.   <--    16    ioResult      word    error result code
  32562.   -->    22    ioVRefNum     word    volume refNum
  32563.   <--    26    ioObjType     word    log in method
  32564.   <--    28    ioObjNamePtr  long    ptr to log in name buffer
  32565.  
  32566. PBHGetLogInInfo returns the method used for log-in and the user name specified at
  32567. log-in time for the volume.  The log-in user name is returned as a Pascal string in
  32568. ioObjNamePtr.  The maximum size of the user name is 31 characters.  The log-in method
  32569. type is returned in ioObjType.
  32570.  
  32571. æKY PBHGetLogInInfoAsync
  32572. æFp Files.p
  32573. æT FUNCTION
  32574. æTN 7031,A660
  32575. æD FUNCTION PBHGetLogInInfoAsync(paramBlock: HParmBlkPtr): OSErr;
  32576.     INLINE $205F,$7031,$A660,$3E80;
  32577. æDT myVariable := PBHGetLogInInfoAsync(paramBlock,A0);
  32578. æRI V-393
  32579. æC 
  32580. Trap macro    _GetLogInInfo
  32581.  
  32582. Parameter block
  32583.   -->    12    ioCompletion  long    optional completion routine ptr
  32584.   <--    16    ioResult      word    error result code
  32585.   -->    22    ioVRefNum     word    volume refNum
  32586.   <--    26    ioObjType     word    log in method
  32587.   <--    28    ioObjNamePtr  long    ptr to log in name buffer
  32588.  
  32589. PBHGetLogInInfo returns the method used for log-in and the user name specified at
  32590. log-in time for the volume.  The log-in user name is returned as a Pascal string in
  32591. ioObjNamePtr.  The maximum size of the user name is 31 characters.  The log-in method
  32592. type is returned in ioObjType.
  32593.  
  32594. æKY PBHGetDirAccess
  32595. æFp Files.p
  32596. æT FUNCTION
  32597. æD FUNCTION PBHGetDirAccess(paramBlock: HParmBlkPtr;async: BOOLEAN): OSErr;
  32598. æDT myVariable := PBHGetDirAccess(paramBlock,async);
  32599. æRI V-394
  32600. æC 
  32601. Trap macro    _GetDirAccess
  32602.  
  32603. Parameter block
  32604.   -->    12    ioCompletion  long    optional completion routine ptr
  32605.   <--    16    ioResult      word    error result code
  32606.   -->    18    ioFileName    long    directory name
  32607.   -->    22    ioVRefNum     word    volume refNum
  32608.   <--    36    ioACOwnerID   long    owner ID
  32609.   <--    40    ioACGroupID   long    group ID
  32610.   <--    44    ioACAccess    long    access rights
  32611.   -->    48    ioDirID       long    directory ID
  32612.  
  32613. PBHGetDirAccess returns access control information for the folder pointed to by the
  32614. ioDirID/ioFIleName pair.  ioACOwnerID will return the ID for the folder’s owner. 
  32615. ioACGroupID will return the ID for the folder’s primary group.  The access rights are
  32616. returned in ioACAccess.
  32617.  
  32618. A fnfErr is returned if the pathname does not point to a valid directory.  An AccessDenied
  32619. error is returned if the user does not have the correct access rights to examine this
  32620. directory.
  32621.  
  32622. æKY PBHGetDirAccessSync
  32623. æFp Files.p
  32624. æT FUNCTION
  32625. æTN 7032,A260
  32626. æD FUNCTION PBHGetDirAccessSync(paramBlock: HParmBlkPtr): OSErr;
  32627.     INLINE $205F,$7032,$A260,$3E80;
  32628. æDT myVariable := PBHGetDirAccessSync(paramBlock,A0);
  32629. æRI V-394
  32630. æC 
  32631. Trap macro    _GetDirAccess
  32632.  
  32633. Parameter block
  32634.   -->    12    ioCompletion  long    optional completion routine ptr
  32635.   <--    16    ioResult      word    error result code
  32636.   -->    18    ioFileName    long    directory name
  32637.   -->    22    ioVRefNum     word    volume refNum
  32638.   <--    36    ioACOwnerID   long    owner ID
  32639.   <--    40    ioACGroupID   long    group ID
  32640.   <--    44    ioACAccess    long    access rights
  32641.   -->    48    ioDirID       long    directory ID
  32642.  
  32643. PBHGetDirAccess returns access control information for the folder pointed to by the
  32644. ioDirID/ioFIleName pair.  ioACOwnerID will return the ID for the folder’s owner. 
  32645. ioACGroupID will return the ID for the folder’s primary group.  The access rights are
  32646. returned in ioACAccess.
  32647.  
  32648. A fnfErr is returned if the pathname does not point to a valid directory.  An AccessDenied
  32649. error is returned if the user does not have the correct access rights to examine this
  32650. directory.
  32651.  
  32652. æKY PBHGetDirAccessAsync
  32653. æFp Files.p
  32654. æT FUNCTION
  32655. æTN 7032,A660
  32656. æD FUNCTION PBHGetDirAccessAsync(paramBlock: HParmBlkPtr): OSErr;
  32657.     INLINE $205F,$7032,$A660,$3E80;
  32658. æDT myVariable := PBHGetDirAccessAsync(paramBlock,A0);
  32659. æRI V-394
  32660. æC 
  32661. Trap macro    _GetDirAccess
  32662.  
  32663. Parameter block
  32664.   -->    12    ioCompletion  long    optional completion routine ptr
  32665.   <--    16    ioResult      word    error result code
  32666.   -->    18    ioFileName    long    directory name
  32667.   -->    22    ioVRefNum     word    volume refNum
  32668.   <--    36    ioACOwnerID   long    owner ID
  32669.   <--    40    ioACGroupID   long    group ID
  32670.   <--    44    ioACAccess    long    access rights
  32671.   -->    48    ioDirID       long    directory ID
  32672.  
  32673. PBHGetDirAccess returns access control information for the folder pointed to by the
  32674. ioDirID/ioFIleName pair.  ioACOwnerID will return the ID for the folder’s owner. 
  32675. ioACGroupID will return the ID for the folder’s primary group.  The access rights are
  32676. returned in ioACAccess.
  32677.  
  32678. A fnfErr is returned if the pathname does not point to a valid directory.  An AccessDenied
  32679. error is returned if the user does not have the correct access rights to examine this
  32680. directory.
  32681.  
  32682. æKY PBHSetDirAccess
  32683. æFp Files.p
  32684. æT FUNCTION
  32685. æD FUNCTION PBHSetDirAccess(paramBlock: HParmBlkPtr;async: BOOLEAN): OSErr;
  32686. æDT myVariable := PBHSetDirAccess(paramBlock,async);
  32687. æRI V-394
  32688. æC 
  32689. Trap macro    _SetDirAccess
  32690.  
  32691. Parameter block
  32692.   -->    12    ioCompletion  long    optional completion routine ptr
  32693.   <--    16    ioResult      word    error result code
  32694.   -->    18    ioFileName    long    pathname identifier
  32695.   -->    22    ioVRefNum     word    volume refNum
  32696.   -->    36    ioACOwnerID   long    owner ID
  32697.   -->    40    ioACGroupID   long    group ID
  32698.   -->    44    ioACAccess    long    access rights
  32699.   -->    48    ioDirID       long    directory ID
  32700.  
  32701. PBHSetDirAccess allows you to change the access rights to a folder pointed to by the
  32702. ioFileName/ioDirID pair.  IOACOwnerID contains the new owner ID.  IOACGroupID contains
  32703. the group ID.  IOACAccess contains the folder’s access rights.  You cannot set the
  32704. owner bit or the user’s rights of the directory.  To change the owner or group, you
  32705. should set the ioACOwnerID or ioACGroupID field with the appropriate ID of the new
  32706. owner/group.  You must be the owner of the directory to change the owner or group
  32707. ID.
  32708.  
  32709. A fnfErr is returned if the pathname does not point to a valid directory.  An AccessDenied
  32710. error is returned if you do not have the correct access rights to modify the parameters
  32711. for this directory.  A paramErr is returned if you try to set the owner bit or user’s
  32712. rights bits.
  32713.  
  32714. æKY PBHSetDirAccessSync
  32715. æFp Files.p
  32716. æT FUNCTION
  32717. æTN 7033,A260
  32718. æD FUNCTION PBHSetDirAccessSync(paramBlock: HParmBlkPtr): OSErr;
  32719.     INLINE $205F,$7033,$A260,$3E80;
  32720. æDT myVariable := PBHSetDirAccessSync(paramBlock,A0);
  32721. æRI V-394
  32722. æC 
  32723. Trap macro    _SetDirAccess
  32724.  
  32725. Parameter block
  32726.   -->    12    ioCompletion  long    optional completion routine ptr
  32727.   <--    16    ioResult      word    error result code
  32728.   -->    18    ioFileName    long    pathname identifier
  32729.   -->    22    ioVRefNum     word    volume refNum
  32730.   -->    36    ioACOwnerID   long    owner ID
  32731.   -->    40    ioACGroupID   long    group ID
  32732.   -->    44    ioACAccess    long    access rights
  32733.   -->    48    ioDirID       long    directory ID
  32734.  
  32735. PBHSetDirAccess allows you to change the access rights to a folder pointed to by the
  32736. ioFileName/ioDirID pair.  IOACOwnerID contains the new owner ID.  IOACGroupID contains
  32737. the group ID.  IOACAccess contains the folder’s access rights.  You cannot set the
  32738. owner bit or the user’s rights of the directory.  To change the owner or group, you
  32739. should set the ioACOwnerID or ioACGroupID field with the appropriate ID of the new
  32740. owner/group.  You must be the owner of the directory to change the owner or group
  32741. ID.
  32742.  
  32743. A fnfErr is returned if the pathname does not point to a valid directory.  An AccessDenied
  32744. error is returned if you do not have the correct access rights to modify the parameters
  32745. for this directory.  A paramErr is returned if you try to set the owner bit or user’s
  32746. rights bits.
  32747.  
  32748. æKY PBHSetDirAccessAsync
  32749. æFp Files.p
  32750. æT FUNCTION
  32751. æTN 7033,A660
  32752. æD FUNCTION PBHSetDirAccessAsync(paramBlock: HParmBlkPtr): OSErr;
  32753.     INLINE $205F,$7033,$A660,$3E80;
  32754. æDT myVariable := PBHSetDirAccessAsync(paramBlock,A0);
  32755. æRI V-394
  32756. æC 
  32757. Trap macro    _SetDirAccess
  32758.  
  32759. Parameter block
  32760.   -->    12    ioCompletion  long    optional completion routine ptr
  32761.   <--    16    ioResult      word    error result code
  32762.   -->    18    ioFileName    long    pathname identifier
  32763.   -->    22    ioVRefNum     word    volume refNum
  32764.   -->    36    ioACOwnerID   long    owner ID
  32765.   -->    40    ioACGroupID   long    group ID
  32766.   -->    44    ioACAccess    long    access rights
  32767.   -->    48    ioDirID       long    directory ID
  32768.  
  32769. PBHSetDirAccess allows you to change the access rights to a folder pointed to by the
  32770. ioFileName/ioDirID pair.  IOACOwnerID contains the new owner ID.  IOACGroupID contains
  32771. the group ID.  IOACAccess contains the folder’s access rights.  You cannot set the
  32772. owner bit or the user’s rights of the directory.  To change the owner or group, you
  32773. should set the ioACOwnerID or ioACGroupID field with the appropriate ID of the new
  32774. owner/group.  You must be the owner of the directory to change the owner or group
  32775. ID.
  32776.  
  32777. A fnfErr is returned if the pathname does not point to a valid directory.  An AccessDenied
  32778. error is returned if you do not have the correct access rights to modify the parameters
  32779. for this directory.  A paramErr is returned if you try to set the owner bit or user’s
  32780. rights bits.
  32781.  
  32782. æKY PBHMapID
  32783. æFp Files.p
  32784. æT FUNCTION
  32785. æD FUNCTION PBHMapID(paramBlock: HParmBlkPtr;async: BOOLEAN): OSErr;
  32786. æDT myVariable := PBHMapID(paramBlock,async);
  32787. æRI V-395
  32788. æC 
  32789. Trap macro    _MapID
  32790.  
  32791. Parameter block
  32792.   -->    12    ioCompletion  long    optional completion routine ptr
  32793.   <--    16    ioResult      word    error result code
  32794.   -->    18    ioFileName    long    pathname identifier
  32795.   -->    22    ioVRefNum     word    volume refNum
  32796.   -->    26    ioObjType     word    function code
  32797.   <--    28    ioObjNamePtr  long    ptr to retrnd creator/group name
  32798.   -->    32    ioObjID       long    creator/group ID
  32799.  
  32800. PBHMapID returns the name of a user or group given its unique ID.  IOObjID contains
  32801. the ID to be mapped.  The value zero for ioObjID is special cased and will always
  32802. return a NIL name.  AppleShare uses this to signify <Any User>.  IOObjType is the
  32803. mapping function code; it’s 1 if you’re mapping an owner ID to owner name or 2 if
  32804. you’re mapping a group ID to a group name.  The name is returned as a Pascal string
  32805. in ioObjNamePtr.  The maximum size of the name is 31 characters.
  32806.  
  32807. A fnfErr is returned if an unrecognizable owner or group ID is passed.
  32808.  
  32809. æKY PBHMapIDSync
  32810. æFp Files.p
  32811. æT FUNCTION
  32812. æTN 7034,A260
  32813. æD FUNCTION PBHMapIDSync(paramBlock: HParmBlkPtr): OSErr;
  32814.     INLINE $205F,$7034,$A260,$3E80;
  32815. æDT myVariable := PBHMapIDSync(paramBlock,A0);
  32816. æRI V-395
  32817. æC 
  32818. Trap macro    _MapID
  32819.  
  32820. Parameter block
  32821.   -->    12    ioCompletion  long    optional completion routine ptr
  32822.   <--    16    ioResult      word    error result code
  32823.   -->    18    ioFileName    long    pathname identifier
  32824.   -->    22    ioVRefNum     word    volume refNum
  32825.   -->    26    ioObjType     word    function code
  32826.   <--    28    ioObjNamePtr  long    ptr to retrnd creator/group name
  32827.   -->    32    ioObjID       long    creator/group ID
  32828.  
  32829. PBHMapID returns the name of a user or group given its unique ID.  IOObjID contains
  32830. the ID to be mapped.  The value zero for ioObjID is special cased and will always
  32831. return a NIL name.  AppleShare uses this to signify <Any User>.  IOObjType is the
  32832. mapping function code; it’s 1 if you’re mapping an owner ID to owner name or 2 if
  32833. you’re mapping a group ID to a group name.  The name is returned as a Pascal string
  32834. in ioObjNamePtr.  The maximum size of the name is 31 characters.
  32835.  
  32836. A fnfErr is returned if an unrecognizable owner or group ID is passed.
  32837.  
  32838. æKY PBHMapIDAsync
  32839. æFp Files.p
  32840. æT FUNCTION
  32841. æTN 7034,A660
  32842. æD FUNCTION PBHMapIDAsync(paramBlock: HParmBlkPtr): OSErr;
  32843.     INLINE $205F,$7034,$A660,$3E80;
  32844. æDT myVariable := PBHMapIDAsync(paramBlock,A0);
  32845. æRI V-395
  32846. æC 
  32847. Trap macro    _MapID
  32848.  
  32849. Parameter block
  32850.   -->    12    ioCompletion  long    optional completion routine ptr
  32851.   <--    16    ioResult      word    error result code
  32852.   -->    18    ioFileName    long    pathname identifier
  32853.   -->    22    ioVRefNum     word    volume refNum
  32854.   -->    26    ioObjType     word    function code
  32855.   <--    28    ioObjNamePtr  long    ptr to retrnd creator/group name
  32856.   -->    32    ioObjID       long    creator/group ID
  32857.  
  32858. PBHMapID returns the name of a user or group given its unique ID.  IOObjID contains
  32859. the ID to be mapped.  The value zero for ioObjID is special cased and will always
  32860. return a NIL name.  AppleShare uses this to signify <Any User>.  IOObjType is the
  32861. mapping function code; it’s 1 if you’re mapping an owner ID to owner name or 2 if
  32862. you’re mapping a group ID to a group name.  The name is returned as a Pascal string
  32863. in ioObjNamePtr.  The maximum size of the name is 31 characters.
  32864.  
  32865. A fnfErr is returned if an unrecognizable owner or group ID is passed.
  32866.  
  32867. æKY PBHMapName
  32868. æFp Files.p
  32869. æT FUNCTION
  32870. æD FUNCTION PBHMapName(paramBlock: HParmBlkPtr;async: BOOLEAN): OSErr;
  32871. æDT myVariable := PBHMapName(paramBlock,async);
  32872. æRI V-395
  32873. æC 
  32874. Trap macro    _MapName
  32875.  
  32876. Parameter block
  32877.   -->    12    ioCompletion  long    optional completion routine ptr
  32878.   <--    16    ioResult      word    error result code
  32879.   -->    18    ioFileName    long    volume identifier (may be NIL)
  32880.   -->    22    ioVRefNum     word    volume refNum
  32881.   -->    28    ioObjNamePtr  long    owner or group name
  32882.   -->    26    ioObjType     word    function code
  32883.   <--    32    ioObjID       long    creator/group ID
  32884.  
  32885. PBHMapName returns the unique user ID or group ID given its name.  The name is passed
  32886. as a string in ioObjNamePtr.  If a NIL name is passed, the ID returned will always be
  32887. zero.  The maximum size of the name is 31 characters.  IOObjType is the mapping
  32888. function code; it’s 3 if you’re mapping an owner name to owner ID or 4 if you’re
  32889. mapping a group name to a group ID.  IOObjID will contain the mapped ID.
  32890.  
  32891. A fnfErr is returned if an unrecognizable owner or group name is passed.
  32892.  
  32893. æKY PBHMapNameSync
  32894. æFp Files.p
  32895. æT FUNCTION
  32896. æTN 7035,A260
  32897. æD FUNCTION PBHMapNameSync(paramBlock: HParmBlkPtr): OSErr;
  32898.     INLINE $205F,$7035,$A260,$3E80;
  32899. æDT myVariable := PBHMapNameSync(paramBlock,A0);
  32900. æRI V-395
  32901. æC 
  32902. Trap macro    _MapName
  32903.  
  32904. Parameter block
  32905.   -->    12    ioCompletion  long    optional completion routine ptr
  32906.   <--    16    ioResult      word    error result code
  32907.   -->    18    ioFileName    long    volume identifier (may be NIL)
  32908.   -->    22    ioVRefNum     word    volume refNum
  32909.   -->    28    ioObjNamePtr  long    owner or group name
  32910.   -->    26    ioObjType     word    function code
  32911.   <--    32    ioObjID       long    creator/group ID
  32912.  
  32913. PBHMapName returns the unique user ID or group ID given its name.  The name is passed
  32914. as a string in ioObjNamePtr.  If a NIL name is passed, the ID returned will always be
  32915. zero.  The maximum size of the name is 31 characters.  IOObjType is the mapping
  32916. function code; it’s 3 if you’re mapping an owner name to owner ID or 4 if you’re
  32917. mapping a group name to a group ID.  IOObjID will contain the mapped ID.
  32918.  
  32919. A fnfErr is returned if an unrecognizable owner or group name is passed.
  32920.  
  32921. æKY PBHMapNameAsync
  32922. æFp Files.p
  32923. æT FUNCTION
  32924. æTN 7035,A660
  32925. æD FUNCTION PBHMapNameAsync(paramBlock: HParmBlkPtr): OSErr;
  32926.     INLINE $205F,$7035,$A660,$3E80;
  32927. æDT myVariable := PBHMapNameAsync(paramBlock,A0);
  32928. æRI V-395
  32929. æC 
  32930. Trap macro    _MapName
  32931.  
  32932. Parameter block
  32933.   -->    12    ioCompletion  long    optional completion routine ptr
  32934.   <--    16    ioResult      word    error result code
  32935.   -->    18    ioFileName    long    volume identifier (may be NIL)
  32936.   -->    22    ioVRefNum     word    volume refNum
  32937.   -->    28    ioObjNamePtr  long    owner or group name
  32938.   -->    26    ioObjType     word    function code
  32939.   <--    32    ioObjID       long    creator/group ID
  32940.  
  32941. PBHMapName returns the unique user ID or group ID given its name.  The name is passed
  32942. as a string in ioObjNamePtr.  If a NIL name is passed, the ID returned will always be
  32943. zero.  The maximum size of the name is 31 characters.  IOObjType is the mapping
  32944. function code; it’s 3 if you’re mapping an owner name to owner ID or 4 if you’re
  32945. mapping a group name to a group ID.  IOObjID will contain the mapped ID.
  32946.  
  32947. A fnfErr is returned if an unrecognizable owner or group name is passed.
  32948.  
  32949. æKY PBHCopyFile
  32950. æFp Files.p
  32951. æT FUNCTION
  32952. æD FUNCTION PBHCopyFile(paramBlock: HParmBlkPtr;async: BOOLEAN): OSErr;
  32953. æDT myVariable := PBHCopyFile(paramBlock,async);
  32954. æRI V-396
  32955. æC 
  32956. Trap macro    _CopyFile
  32957.  
  32958. Parameter block
  32959.   -->    12    ioCompletion  long    optional completion routine ptr
  32960.   <--    16    ioResult      word    error result code
  32961.   -->    18    ioFileName    long    ptr to source pathname
  32962.   -->    22    ioVRefNum     word    source vol identifier
  32963.   -->    24    ioDstVRefNum  word    destination vol identifier
  32964.   -->    28    ioNewName     long    ptr to destination pathname
  32965.   -->    32    ioCopyName    long    ptr to optional name (may be NIL)
  32966.   -->    36    ioNewDirID    long    destination directory ID
  32967.   -->    48    ioDirID       long    source directory ID
  32968.  
  32969. PBHCopyFile duplicates a file on the volume and optionally renames it.  It is an
  32970. optional call for AppleShare file servers.  You should examine the returned flag
  32971. information in the PBHGetVolParms call to see if this volume supports CopyFile.
  32972.  
  32973. For AppleShare file servers, the source and destination pathnames must indicate the
  32974. same file server; however, it may point to a different volume for that file server. 
  32975. A useful way to tell if two file server volumes are on the same file server is to
  32976. make the GetVolParms call and compare the server addresses returned.  The server will
  32977. open source files with read/deny write enabled and destination files with write/deny
  32978. read and write enabled.
  32979.  
  32980. IOVRefNum contains a source volume identifier.  The source pathname is determined by
  32981. the ioFileName/ioDirID pair.  IODstVRefNum contains a destination volume identifier. 
  32982. AppleShare 1.0 required that it be an actual volume reference number; however, on
  32983. future versions it can be a WDRefNum.  The destination pathname is determined by the
  32984. ioNewName/ioNewDirID pair.  IOCopyName may contain an optional string used in renaming
  32985. the file.  If it is non-NIL then the file copy will be renamed to the specified name
  32986. in ioCopyName.
  32987.  
  32988. A fnfErr is returned if the source pathname does not point to an existing file or the
  32989. destination pathname does not point to an existing directory.  An AccessDenied error
  32990. is returned if the user does not have the right to read the source or write to the
  32991. destination.  A dupFnErr is returned if the destination already exists.  A DenyConflict
  32992. error is returned if either the source or destination file could not be opened under
  32993. the access modes described above.
  32994.  
  32995. æKY PBHCopyFileSync
  32996. æFp Files.p
  32997. æT FUNCTION
  32998. æTN 7036,A260
  32999. æD FUNCTION PBHCopyFileSync(paramBlock: HParmBlkPtr): OSErr;
  33000.     INLINE $205F,$7036,$A260,$3E80;
  33001. æDT myVariable := PBHCopyFileSync(paramBlock,A0);
  33002. æRI V-396
  33003. æC 
  33004. Trap macro    _CopyFile
  33005.  
  33006. Parameter block
  33007.   -->    12    ioCompletion  long    optional completion routine ptr
  33008.   <--    16    ioResult      word    error result code
  33009.   -->    18    ioFileName    long    ptr to source pathname
  33010.   -->    22    ioVRefNum     word    source vol identifier
  33011.   -->    24    ioDstVRefNum  word    destination vol identifier
  33012.   -->    28    ioNewName     long    ptr to destination pathname
  33013.   -->    32    ioCopyName    long    ptr to optional name (may be NIL)
  33014.   -->    36    ioNewDirID    long    destination directory ID
  33015.   -->    48    ioDirID       long    source directory ID
  33016.  
  33017. PBHCopyFile duplicates a file on the volume and optionally renames it.  It is an
  33018. optional call for AppleShare file servers.  You should examine the returned flag
  33019. information in the PBHGetVolParms call to see if this volume supports CopyFile.
  33020.  
  33021. For AppleShare file servers, the source and destination pathnames must indicate the
  33022. same file server; however, it may point to a different volume for that file server. 
  33023. A useful way to tell if two file server volumes are on the same file server is to
  33024. make the GetVolParms call and compare the server addresses returned.  The server will
  33025. open source files with read/deny write enabled and destination files with write/deny
  33026. read and write enabled.
  33027.  
  33028. IOVRefNum contains a source volume identifier.  The source pathname is determined by
  33029. the ioFileName/ioDirID pair.  IODstVRefNum contains a destination volume identifier. 
  33030. AppleShare 1.0 required that it be an actual volume reference number; however, on
  33031. future versions it can be a WDRefNum.  The destination pathname is determined by the
  33032. ioNewName/ioNewDirID pair.  IOCopyName may contain an optional string used in renaming
  33033. the file.  If it is non-NIL then the file copy will be renamed to the specified name
  33034. in ioCopyName.
  33035.  
  33036. A fnfErr is returned if the source pathname does not point to an existing file or the
  33037. destination pathname does not point to an existing directory.  An AccessDenied error
  33038. is returned if the user does not have the right to read the source or write to the
  33039. destination.  A dupFnErr is returned if the destination already exists.  A DenyConflict
  33040. error is returned if either the source or destination file could not be opened under
  33041. the access modes described above.
  33042.  
  33043. æKY PBHCopyFileAsync
  33044. æFp Files.p
  33045. æT FUNCTION
  33046. æTN 7036,A660
  33047. æD FUNCTION PBHCopyFileAsync(paramBlock: HParmBlkPtr): OSErr;
  33048.     INLINE $205F,$7036,$A660,$3E80;
  33049. æDT myVariable := PBHCopyFileAsync(paramBlock,A0);
  33050. æRI V-396
  33051. æC 
  33052. Trap macro    _CopyFile
  33053.  
  33054. Parameter block
  33055.   -->    12    ioCompletion  long    optional completion routine ptr
  33056.   <--    16    ioResult      word    error result code
  33057.   -->    18    ioFileName    long    ptr to source pathname
  33058.   -->    22    ioVRefNum     word    source vol identifier
  33059.   -->    24    ioDstVRefNum  word    destination vol identifier
  33060.   -->    28    ioNewName     long    ptr to destination pathname
  33061.   -->    32    ioCopyName    long    ptr to optional name (may be NIL)
  33062.   -->    36    ioNewDirID    long    destination directory ID
  33063.   -->    48    ioDirID       long    source directory ID
  33064.  
  33065. PBHCopyFile duplicates a file on the volume and optionally renames it.  It is an
  33066. optional call for AppleShare file servers.  You should examine the returned flag
  33067. information in the PBHGetVolParms call to see if this volume supports CopyFile.
  33068.  
  33069. For AppleShare file servers, the source and destination pathnames must indicate the
  33070. same file server; however, it may point to a different volume for that file server. 
  33071. A useful way to tell if two file server volumes are on the same file server is to
  33072. make the GetVolParms call and compare the server addresses returned.  The server will
  33073. open source files with read/deny write enabled and destination files with write/deny
  33074. read and write enabled.
  33075.  
  33076. IOVRefNum contains a source volume identifier.  The source pathname is determined by
  33077. the ioFileName/ioDirID pair.  IODstVRefNum contains a destination volume identifier. 
  33078. AppleShare 1.0 required that it be an actual volume reference number; however, on
  33079. future versions it can be a WDRefNum.  The destination pathname is determined by the
  33080. ioNewName/ioNewDirID pair.  IOCopyName may contain an optional string used in renaming
  33081. the file.  If it is non-NIL then the file copy will be renamed to the specified name
  33082. in ioCopyName.
  33083.  
  33084. A fnfErr is returned if the source pathname does not point to an existing file or the
  33085. destination pathname does not point to an existing directory.  An AccessDenied error
  33086. is returned if the user does not have the right to read the source or write to the
  33087. destination.  A dupFnErr is returned if the destination already exists.  A DenyConflict
  33088. error is returned if either the source or destination file could not be opened under
  33089. the access modes described above.
  33090.  
  33091. æKY PBHMoveRename
  33092. æFp Files.p
  33093. æT FUNCTION
  33094. æD FUNCTION PBHMoveRename(paramBlock: HParmBlkPtr;async: BOOLEAN): OSErr;
  33095. æDT myVariable := PBHMoveRename(paramBlock,async);
  33096. æRI V-397
  33097. æC 
  33098. Trap macro    _MoveRename
  33099.  
  33100. Parameter block
  33101.   -->    12    ioCompletion  long    optional completion routine ptr
  33102.   <--    16    ioResult      word    error result code
  33103.   -->    18    ioFileName    long    ptr to source pathname
  33104.   -->    22    ioVRefNum     word    source vol identifier
  33105.   -->    28    ioNewName     long    ptr to destination pathname
  33106.   -->    32    ioBuffer      long    ptr to optional name (may be NIL)
  33107.   -->    36    ioNewDirID    long    destination directory ID
  33108.   -->    48    ioDirID       long    source directory ID
  33109.  
  33110. PBHMoveRename allows you to move (not copy) an item and optionally to rename it.  The
  33111. source and destination pathnames must point to the same file server volume.
  33112.  
  33113. IOVRefNum contains a source volume identifier.  The source pathname is specified by
  33114. the ioFileName/ioDirID pair.  The destination pathname is specified by the ioNewName/ioNewDirID
  33115. pair.  IOBuffer may contain an optional string used in renaming the item.  If it is
  33116. non-NIL then the moved object will be renamed to the specified name in ioBuffer.
  33117.  
  33118. A fnfErr is returned if the source pathname does not point to an existing object.  An
  33119. AccessDenied error is returned if the user does not have the right to move the object.
  33120.  A dupFnErr is returned if the destination already exists.  A badMovErr is returned
  33121. if an attempt is made to move a directory into one of its descendent directories.
  33122.  
  33123. æKY PBHMoveRenameSync
  33124. æFp Files.p
  33125. æT FUNCTION
  33126. æTN 7037,A260
  33127. æD FUNCTION PBHMoveRenameSync(paramBlock: HParmBlkPtr): OSErr;
  33128.     INLINE $205F,$7037,$A260,$3E80;
  33129. æDT myVariable := PBHMoveRenameSync(paramBlock,A0);
  33130. æRI V-397
  33131. æC 
  33132. Trap macro    _MoveRename
  33133.  
  33134. Parameter block
  33135.   -->    12    ioCompletion  long    optional completion routine ptr
  33136.   <--    16    ioResult      word    error result code
  33137.   -->    18    ioFileName    long    ptr to source pathname
  33138.   -->    22    ioVRefNum     word    source vol identifier
  33139.   -->    28    ioNewName     long    ptr to destination pathname
  33140.   -->    32    ioBuffer      long    ptr to optional name (may be NIL)
  33141.   -->    36    ioNewDirID    long    destination directory ID
  33142.   -->    48    ioDirID       long    source directory ID
  33143.  
  33144. PBHMoveRename allows you to move (not copy) an item and optionally to rename it.  The
  33145. source and destination pathnames must point to the same file server volume.
  33146.  
  33147. IOVRefNum contains a source volume identifier.  The source pathname is specified by
  33148. the ioFileName/ioDirID pair.  The destination pathname is specified by the ioNewName/ioNewDirID
  33149. pair.  IOBuffer may contain an optional string used in renaming the item.  If it is
  33150. non-NIL then the moved object will be renamed to the specified name in ioBuffer.
  33151.  
  33152. A fnfErr is returned if the source pathname does not point to an existing object.  An
  33153. AccessDenied error is returned if the user does not have the right to move the object.
  33154.  A dupFnErr is returned if the destination already exists.  A badMovErr is returned
  33155. if an attempt is made to move a directory into one of its descendent directories.
  33156.  
  33157. æKY PBHMoveRenameAsync
  33158. æFp Files.p
  33159. æT FUNCTION
  33160. æTN 7037,A660
  33161. æD FUNCTION PBHMoveRenameAsync(paramBlock: HParmBlkPtr): OSErr;
  33162.     INLINE $205F,$7037,$A660,$3E80;
  33163. æDT myVariable := PBHMoveRenameAsync(paramBlock,A0);
  33164. æRI V-397
  33165. æC 
  33166. Trap macro    _MoveRename
  33167.  
  33168. Parameter block
  33169.   -->    12    ioCompletion  long    optional completion routine ptr
  33170.   <--    16    ioResult      word    error result code
  33171.   -->    18    ioFileName    long    ptr to source pathname
  33172.   -->    22    ioVRefNum     word    source vol identifier
  33173.   -->    28    ioNewName     long    ptr to destination pathname
  33174.   -->    32    ioBuffer      long    ptr to optional name (may be NIL)
  33175.   -->    36    ioNewDirID    long    destination directory ID
  33176.   -->    48    ioDirID       long    source directory ID
  33177.  
  33178. PBHMoveRename allows you to move (not copy) an item and optionally to rename it.  The
  33179. source and destination pathnames must point to the same file server volume.
  33180.  
  33181. IOVRefNum contains a source volume identifier.  The source pathname is specified by
  33182. the ioFileName/ioDirID pair.  The destination pathname is specified by the ioNewName/ioNewDirID
  33183. pair.  IOBuffer may contain an optional string used in renaming the item.  If it is
  33184. non-NIL then the moved object will be renamed to the specified name in ioBuffer.
  33185.  
  33186. A fnfErr is returned if the source pathname does not point to an existing object.  An
  33187. AccessDenied error is returned if the user does not have the right to move the object.
  33188.  A dupFnErr is returned if the destination already exists.  A badMovErr is returned
  33189. if an attempt is made to move a directory into one of its descendent directories.
  33190.  
  33191. æKY PBHOpenDeny
  33192. æFp Files.p
  33193. æT FUNCTION
  33194. æD FUNCTION PBHOpenDeny(paramBlock: HParmBlkPtr;async: BOOLEAN): OSErr;
  33195. æDT myVariable := PBHOpenDeny(paramBlock,async);
  33196. æRI V-398
  33197. æC 
  33198. Trap macro    _OpenDeny
  33199.  
  33200. Parameter block
  33201.   -->    12    ioCompletion  long    optional completion routine ptr
  33202.   <--    16    ioResult      word    error result code
  33203.   -->    18    ioFileName    long    ptr to pathname
  33204.   -->    22    ioVRefNum     word    vol identifier
  33205.   <--    24    ioRefNum      word    file refNum
  33206.   -->    26    ioDenyModes   word    access rights data
  33207.   -->    48    ioDirID       long    directory ID
  33208.  
  33209. PBHOpenDeny opens a file’s data fork under specific access rights.  It creates an
  33210. access path to the file having the name pointed to by ioFileName/ioDirID.  The path
  33211. reference number is returned in ioRefNum.
  33212.  
  33213. IODenyModes contains a word of access rights information.  The format for these
  33214. access rights is:
  33215.  
  33216.     bits    15–6    Reserved—should be cleared.
  33217.             5       If set, other writers are denied access.
  33218.             4       If set, other readers are denied access.
  33219.             3–2     Reserved—should be cleared.
  33220.             1       If set, write permission requested.
  33221.             0       If set, read permission requested.
  33222.  
  33223. A fnfErr is returned if the input specification does not point to an existing file. 
  33224. A permErr is returned if the file is already open and you cannot open it under the
  33225. deny modes that you have specified.  An opWrErr is returned if you have asked for
  33226. write permission and the file is already opened by you for write.  The already opened
  33227. path reference number is returned in ioRefNum.  An AccessDenied error is returned if
  33228. you do not have the right to access the file.
  33229.  
  33230. æKY PBHOpenDenySync
  33231. æFp Files.p
  33232. æT FUNCTION
  33233. æTN 7038,A260
  33234. æD FUNCTION PBHOpenDenySync(paramBlock: HParmBlkPtr): OSErr;
  33235.     INLINE $205F,$7038,$A260,$3E80;
  33236. æDT myVariable := PBHOpenDenySync(paramBlock,A0);
  33237. æRI V-398
  33238. æC 
  33239. Trap macro    _OpenDeny
  33240.  
  33241. Parameter block
  33242.   -->    12    ioCompletion  long    optional completion routine ptr
  33243.   <--    16    ioResult      word    error result code
  33244.   -->    18    ioFileName    long    ptr to pathname
  33245.   -->    22    ioVRefNum     word    vol identifier
  33246.   <--    24    ioRefNum      word    file refNum
  33247.   -->    26    ioDenyModes   word    access rights data
  33248.   -->    48    ioDirID       long    directory ID
  33249.  
  33250. PBHOpenDeny opens a file’s data fork under specific access rights.  It creates an
  33251. access path to the file having the name pointed to by ioFileName/ioDirID.  The path
  33252. reference number is returned in ioRefNum.
  33253.  
  33254. IODenyModes contains a word of access rights information.  The format for these
  33255. access rights is:
  33256.  
  33257.     bits    15–6    Reserved—should be cleared.
  33258.             5       If set, other writers are denied access.
  33259.             4       If set, other readers are denied access.
  33260.             3–2     Reserved—should be cleared.
  33261.             1       If set, write permission requested.
  33262.             0       If set, read permission requested.
  33263.  
  33264. A fnfErr is returned if the input specification does not point to an existing file. 
  33265. A permErr is returned if the file is already open and you cannot open it under the
  33266. deny modes that you have specified.  An opWrErr is returned if you have asked for
  33267. write permission and the file is already opened by you for write.  The already opened
  33268. path reference number is returned in ioRefNum.  An AccessDenied error is returned if
  33269. you do not have the right to access the file.
  33270.  
  33271. æKY PBHOpenDenyAsync
  33272. æFp Files.p
  33273. æT FUNCTION
  33274. æTN 7038,A660
  33275. æD FUNCTION PBHOpenDenyAsync(paramBlock: HParmBlkPtr): OSErr;
  33276.     INLINE $205F,$7038,$A660,$3E80;
  33277. æDT myVariable := PBHOpenDenyAsync(paramBlock,A0);
  33278. æRI V-398
  33279. æC 
  33280. Trap macro    _OpenDeny
  33281.  
  33282. Parameter block
  33283.   -->    12    ioCompletion  long    optional completion routine ptr
  33284.   <--    16    ioResult      word    error result code
  33285.   -->    18    ioFileName    long    ptr to pathname
  33286.   -->    22    ioVRefNum     word    vol identifier
  33287.   <--    24    ioRefNum      word    file refNum
  33288.   -->    26    ioDenyModes   word    access rights data
  33289.   -->    48    ioDirID       long    directory ID
  33290.  
  33291. PBHOpenDeny opens a file’s data fork under specific access rights.  It creates an
  33292. access path to the file having the name pointed to by ioFileName/ioDirID.  The path
  33293. reference number is returned in ioRefNum.
  33294.  
  33295. IODenyModes contains a word of access rights information.  The format for these
  33296. access rights is:
  33297.  
  33298.     bits    15–6    Reserved—should be cleared.
  33299.             5       If set, other writers are denied access.
  33300.             4       If set, other readers are denied access.
  33301.             3–2     Reserved—should be cleared.
  33302.             1       If set, write permission requested.
  33303.             0       If set, read permission requested.
  33304.  
  33305. A fnfErr is returned if the input specification does not point to an existing file. 
  33306. A permErr is returned if the file is already open and you cannot open it under the
  33307. deny modes that you have specified.  An opWrErr is returned if you have asked for
  33308. write permission and the file is already opened by you for write.  The already opened
  33309. path reference number is returned in ioRefNum.  An AccessDenied error is returned if
  33310. you do not have the right to access the file.
  33311.  
  33312. æKY PBHOpenRFDeny
  33313. æFp Files.p
  33314. æT FUNCTION
  33315. æD FUNCTION PBHOpenRFDeny(paramBlock: HParmBlkPtr;async: BOOLEAN): OSErr;
  33316. æDT myVariable := PBHOpenRFDeny(paramBlock,async);
  33317. æRI V-398
  33318. æC 
  33319. Trap macro    _OpenRFDeny
  33320.  
  33321. Parameter block
  33322.   -->    12    ioCompletion  long    optional completion routine ptr
  33323.   <--    16    ioResult      word    error result code
  33324.   -->    18    ioFileName    long    ptr to pathname
  33325.   -->    22    ioVRefNum     word    vol identifier
  33326.   <--    24    ioRefNum      word    file refNum
  33327.   -->    26    ioDenyModes   word    access rights data
  33328.   -->    48    ioDirID       long    directory ID
  33329.  
  33330. PBHOpenRFDeny opens a file’s resource fork under specific access rights.
  33331. It creates an access path to the file having the name pointed to by
  33332. ioFileName/ioDirID.  The path reference number is returned in ioRefNum.  The format
  33333. of the access rights data contained in ioDenyModes is described under the OpenDeny
  33334. call.
  33335.  
  33336. A fnfErr is returned if the input specification does not point to an existing file. 
  33337. A permErr is returned if the file is already open and you cannot open it under the
  33338. deny modes that you have specified.  An opWrErr is returned if you have asked for
  33339. write permission and the file is already opened by you for write.  The already-opened
  33340. path reference number is returned in ioRefNum.  An AccessDenied error is returned if
  33341. you do not have the right to access the file.
  33342.  
  33343. æKY PBHOpenRFDenySync
  33344. æFp Files.p
  33345. æT FUNCTION
  33346. æTN 7039,A260
  33347. æD FUNCTION PBHOpenRFDenySync(paramBlock: HParmBlkPtr): OSErr;
  33348.     INLINE $205F,$7039,$A260,$3E80;
  33349. æDT myVariable := PBHOpenRFDenySync(paramBlock,A0);
  33350. æRI V-398
  33351. æC 
  33352. Trap macro    _OpenRFDeny
  33353.  
  33354. Parameter block
  33355.   -->    12    ioCompletion  long    optional completion routine ptr
  33356.   <--    16    ioResult      word    error result code
  33357.   -->    18    ioFileName    long    ptr to pathname
  33358.   -->    22    ioVRefNum     word    vol identifier
  33359.   <--    24    ioRefNum      word    file refNum
  33360.   -->    26    ioDenyModes   word    access rights data
  33361.   -->    48    ioDirID       long    directory ID
  33362.  
  33363. PBHOpenRFDeny opens a file’s resource fork under specific access rights.
  33364. It creates an access path to the file having the name pointed to by
  33365. ioFileName/ioDirID.  The path reference number is returned in ioRefNum.  The format
  33366. of the access rights data contained in ioDenyModes is described under the OpenDeny
  33367. call.
  33368.  
  33369. A fnfErr is returned if the input specification does not point to an existing file. 
  33370. A permErr is returned if the file is already open and you cannot open it under the
  33371. deny modes that you have specified.  An opWrErr is returned if you have asked for
  33372. write permission and the file is already opened by you for write.  The already-opened
  33373. path reference number is returned in ioRefNum.  An AccessDenied error is returned if
  33374. you do not have the right to access the file.
  33375.  
  33376. æKY PBHOpenRFDenyAsync
  33377. æFp Files.p
  33378. æT FUNCTION
  33379. æTN 7039,A660
  33380. æD FUNCTION PBHOpenRFDenyAsync(paramBlock: HParmBlkPtr): OSErr;
  33381.     INLINE $205F,$7039,$A660,$3E80;
  33382. æDT myVariable := PBHOpenRFDenyAsync(paramBlock,A0);
  33383. æRI V-398
  33384. æC 
  33385. Trap macro    _OpenRFDeny
  33386.  
  33387. Parameter block
  33388.   -->    12    ioCompletion  long    optional completion routine ptr
  33389.   <--    16    ioResult      word    error result code
  33390.   -->    18    ioFileName    long    ptr to pathname
  33391.   -->    22    ioVRefNum     word    vol identifier
  33392.   <--    24    ioRefNum      word    file refNum
  33393.   -->    26    ioDenyModes   word    access rights data
  33394.   -->    48    ioDirID       long    directory ID
  33395.  
  33396. PBHOpenRFDeny opens a file’s resource fork under specific access rights.
  33397. It creates an access path to the file having the name pointed to by
  33398. ioFileName/ioDirID.  The path reference number is returned in ioRefNum.  The format
  33399. of the access rights data contained in ioDenyModes is described under the OpenDeny
  33400. call.
  33401.  
  33402. A fnfErr is returned if the input specification does not point to an existing file. 
  33403. A permErr is returned if the file is already open and you cannot open it under the
  33404. deny modes that you have specified.  An opWrErr is returned if you have asked for
  33405. write permission and the file is already opened by you for write.  The already-opened
  33406. path reference number is returned in ioRefNum.  An AccessDenied error is returned if
  33407. you do not have the right to access the file.
  33408.  
  33409. æKY PBExchangeFiles
  33410. æFp Files.p
  33411. æT FUNCTION
  33412. æD FUNCTION PBExchangeFiles(paramBlock: HParmBlkPtr;async: BOOLEAN): OSErr;
  33413. æDT myVariable := PBExchangeFiles(paramBlock,async);
  33414. æC 
  33415.  
  33416. æKY PBExchangeFilesSync
  33417. æFp Files.p
  33418. æT FUNCTION
  33419. æTN 7017,A260
  33420. æD FUNCTION PBExchangeFilesSync(paramBlock: HParmBlkPtr): OSErr;
  33421.     INLINE $205F,$7017,$A260,$3E80;
  33422. æDT myVariable := PBExchangeFilesSync(paramBlock,A0);
  33423. æC 
  33424.  
  33425. æKY PBExchangeFilesAsync
  33426. æFp Files.p
  33427. æT FUNCTION
  33428. æTN 7017,A660
  33429. æD FUNCTION PBExchangeFilesAsync(paramBlock: HParmBlkPtr): OSErr;
  33430.     INLINE $205F,$7017,$A660,$3E80;
  33431. æDT myVariable := PBExchangeFilesAsync(paramBlock,A0);
  33432. æC 
  33433.  
  33434. æKY PBCreateFileIDRef
  33435. æFp Files.p
  33436. æT FUNCTION
  33437. æD FUNCTION PBCreateFileIDRef(paramBlock: HParmBlkPtr;async: BOOLEAN): OSErr;
  33438. æDT myVariable := PBCreateFileIDRef(paramBlock,async);
  33439. æC 
  33440.  
  33441. æKY PBCreateFileIDRefSync
  33442. æFp Files.p
  33443. æT FUNCTION
  33444. æTN 7014,A260
  33445. æD FUNCTION PBCreateFileIDRefSync(paramBlock: HParmBlkPtr): OSErr;
  33446.     INLINE $205F,$7014,$A260,$3E80;
  33447. æDT myVariable := PBCreateFileIDRefSync(paramBlock,A0);
  33448. æC 
  33449.  
  33450. æKY PBCreateFileIDRefAsync
  33451. æFp Files.p
  33452. æT FUNCTION
  33453. æTN 7014,A660
  33454. æD FUNCTION PBCreateFileIDRefAsync(paramBlock: HParmBlkPtr): OSErr;
  33455.     INLINE $205F,$7014,$A660,$3E80;
  33456. æDT myVariable := PBCreateFileIDRefAsync(paramBlock,A0);
  33457. æC 
  33458.  
  33459. æKY PBResolveFileIDRef
  33460. æFp Files.p
  33461. æT FUNCTION
  33462. æD FUNCTION PBResolveFileIDRef(paramBlock: HParmBlkPtr;async: BOOLEAN): OSErr;
  33463. æDT myVariable := PBResolveFileIDRef(paramBlock,async);
  33464. æC 
  33465.  
  33466. æKY PBResolveFileIDRefSync
  33467. æFp Files.p
  33468. æT FUNCTION
  33469. æTN 7016,A260
  33470. æD FUNCTION PBResolveFileIDRefSync(paramBlock: HParmBlkPtr): OSErr;
  33471.     INLINE $205F,$7016,$A260,$3E80;
  33472. æDT myVariable := PBResolveFileIDRefSync(paramBlock,A0);
  33473. æC 
  33474.  
  33475. æKY PBResolveFileIDRefAsync
  33476. æFp Files.p
  33477. æT FUNCTION
  33478. æTN 7016,A660
  33479. æD FUNCTION PBResolveFileIDRefAsync(paramBlock: HParmBlkPtr): OSErr;
  33480.     INLINE $205F,$7016,$A660,$3E80;
  33481. æDT myVariable := PBResolveFileIDRefAsync(paramBlock,A0);
  33482. æC 
  33483.  
  33484. æKY PBDeleteFileIDRef
  33485. æFp Files.p
  33486. æT FUNCTION
  33487. æD FUNCTION PBDeleteFileIDRef(paramBlock: HParmBlkPtr;async: BOOLEAN): OSErr;
  33488. æDT myVariable := PBDeleteFileIDRef(paramBlock,async);
  33489. æC 
  33490.  
  33491. æKY PBDeleteFileIDRefSync
  33492. æFp Files.p
  33493. æT FUNCTION
  33494. æTN 7015,A260
  33495. æD FUNCTION PBDeleteFileIDRefSync(paramBlock: HParmBlkPtr): OSErr;
  33496.     INLINE $205F,$7015,$A260,$3E80;
  33497. æDT myVariable := PBDeleteFileIDRefSync(paramBlock,A0);
  33498. æC 
  33499.  
  33500. æKY PBDeleteFileIDRefAsync
  33501. æFp Files.p
  33502. æT FUNCTION
  33503. æTN 7015,A660
  33504. æD FUNCTION PBDeleteFileIDRefAsync(paramBlock: HParmBlkPtr): OSErr;
  33505.     INLINE $205F,$7015,$A660,$3E80;
  33506. æDT myVariable := PBDeleteFileIDRefAsync(paramBlock,A0);
  33507. æC 
  33508.  
  33509. æKY PBGetForeignPrivs
  33510. æFp Files.p
  33511. æT FUNCTION
  33512. æD FUNCTION PBGetForeignPrivs(paramBlock: HParmBlkPtr;async: BOOLEAN): OSErr;
  33513. æDT myVariable := PBGetForeignPrivs(paramBlock,async);
  33514. æC 
  33515.  
  33516. æKY PBGetForeignPrivsSync
  33517. æFp Files.p
  33518. æT FUNCTION
  33519. æTN 7060,A260
  33520. æD FUNCTION PBGetForeignPrivsSync(paramBlock: HParmBlkPtr): OSErr;
  33521.     INLINE $205F,$7060,$A260,$3E80;
  33522. æDT myVariable := PBGetForeignPrivsSync(paramBlock,A0);
  33523. æC 
  33524.  
  33525. æKY PBGetForeignPrivsAsync
  33526. æFp Files.p
  33527. æT FUNCTION
  33528. æTN 7060,A660
  33529. æD FUNCTION PBGetForeignPrivsAsync(paramBlock: HParmBlkPtr): OSErr;
  33530.     INLINE $205F,$7060,$A660,$3E80;
  33531. æDT myVariable := PBGetForeignPrivsAsync(paramBlock,A0);
  33532. æC 
  33533.  
  33534. æKY PBSetForeignPrivs
  33535. æFp Files.p
  33536. æT FUNCTION
  33537. æD FUNCTION PBSetForeignPrivs(paramBlock: HParmBlkPtr;async: BOOLEAN): OSErr;
  33538. æDT myVariable := PBSetForeignPrivs(paramBlock,async);
  33539. æC 
  33540.  
  33541. æKY PBSetForeignPrivsSync
  33542. æFp Files.p
  33543. æT FUNCTION
  33544. æTN 7061,A260
  33545. æD FUNCTION PBSetForeignPrivsSync(paramBlock: HParmBlkPtr): OSErr;
  33546.     INLINE $205F,$7061,$A260,$3E80;
  33547. æDT myVariable := PBSetForeignPrivsSync(paramBlock,A0);
  33548. æC 
  33549.  
  33550. æKY PBSetForeignPrivsAsync
  33551. æFp Files.p
  33552. æT FUNCTION
  33553. æTN 7061,A660
  33554. æD FUNCTION PBSetForeignPrivsAsync(paramBlock: HParmBlkPtr): OSErr;
  33555.     INLINE $205F,$7061,$A660,$3E80;
  33556. æDT myVariable := PBSetForeignPrivsAsync(paramBlock,A0);
  33557. æC 
  33558.  
  33559. æKY PBDTGetPath
  33560. æFp Files.p
  33561. æT FUNCTION
  33562. æTN 7020,A260
  33563. æD FUNCTION PBDTGetPath(paramBlock: DTPBPtr): OSErr;
  33564.     INLINE $205F,$7020,$A260,$3E80;
  33565. æDT myVariable := PBDTGetPath(paramBlock,A0);
  33566. æC 
  33567.  
  33568. æKY PBDTCloseDown
  33569. æFp Files.p
  33570. æT FUNCTION
  33571. æTN 7021,A260
  33572. æD FUNCTION PBDTCloseDown(paramBlock: DTPBPtr): OSErr;
  33573.     INLINE $205F,$7021,$A260,$3E80;
  33574. æDT myVariable := PBDTCloseDown(paramBlock,A0);
  33575. æC 
  33576.  
  33577. æKY PBDTAddIcon
  33578. æFp Files.p
  33579. æT FUNCTION
  33580. æD FUNCTION PBDTAddIcon(paramBlock: DTPBPtr;async: BOOLEAN): OSErr;
  33581. æDT myVariable := PBDTAddIcon(paramBlock,async);
  33582. æRI 
  33583.  
  33584. æC 
  33585.  
  33586. æKY PBDTAddIconSync
  33587. æFp Files.p
  33588. æT FUNCTION
  33589. æTN 7022,A260
  33590. æD FUNCTION PBDTAddIconSync(paramBlock: DTPBPtr): OSErr;
  33591.     INLINE $205F,$7022,$A260,$3E80;
  33592. æDT myVariable := PBDTAddIconSync(paramBlock,A0);
  33593. æRI 
  33594.  
  33595. æC 
  33596.  
  33597. æKY PBDTAddIconAsync
  33598. æFp Files.p
  33599. æT FUNCTION
  33600. æTN 7022,A660
  33601. æD FUNCTION PBDTAddIconAsync(paramBlock: DTPBPtr): OSErr;
  33602.     INLINE $205F,$7022,$A660,$3E80;
  33603. æDT myVariable := PBDTAddIconAsync(paramBlock,A0);
  33604. æRI 
  33605.  
  33606. æC 
  33607.  
  33608. æKY PBDTGetIcon
  33609. æFp Files.p
  33610. æT FUNCTION
  33611. æD FUNCTION PBDTGetIcon(paramBlock: DTPBPtr;async: BOOLEAN): OSErr;
  33612. æDT myVariable := PBDTGetIcon(paramBlock,async);
  33613. æRI 
  33614.  
  33615. æC 
  33616.  
  33617. æKY PBDTGetIconSync
  33618. æFp Files.p
  33619. æT FUNCTION
  33620. æTN 7023,A260
  33621. æD FUNCTION PBDTGetIconSync(paramBlock: DTPBPtr): OSErr;
  33622.     INLINE $205F,$7023,$A260,$3E80;
  33623. æDT myVariable := PBDTGetIconSync(paramBlock,A0);
  33624. æRI 
  33625.  
  33626. æC 
  33627.  
  33628. æKY PBDTGetIconAsync
  33629. æFp Files.p
  33630. æT FUNCTION
  33631. æTN 7023,A660
  33632. æD FUNCTION PBDTGetIconAsync(paramBlock: DTPBPtr): OSErr;
  33633.     INLINE $205F,$7023,$A660,$3E80;
  33634. æDT myVariable := PBDTGetIconAsync(paramBlock,A0);
  33635. æRI 
  33636.  
  33637. æC 
  33638.  
  33639. æKY PBDTGetIconInfo
  33640. æFp Files.p
  33641. æT FUNCTION
  33642. æD FUNCTION PBDTGetIconInfo(paramBlock: DTPBPtr;async: BOOLEAN): OSErr;
  33643. æDT myVariable := PBDTGetIconInfo(paramBlock,async);
  33644. æRI 
  33645.  
  33646. æC 
  33647.  
  33648. æKY PBDTGetIconInfoSync
  33649. æFp Files.p
  33650. æT FUNCTION
  33651. æTN 7024,A260
  33652. æD FUNCTION PBDTGetIconInfoSync(paramBlock: DTPBPtr): OSErr;
  33653.     INLINE $205F,$7024,$A260,$3E80;
  33654. æDT myVariable := PBDTGetIconInfoSync(paramBlock,A0);
  33655. æRI 
  33656.  
  33657. æC 
  33658.  
  33659. æKY PBDTGetIconInfoAsync
  33660. æFp Files.p
  33661. æT FUNCTION
  33662. æTN 7024,A660
  33663. æD FUNCTION PBDTGetIconInfoAsync(paramBlock: DTPBPtr): OSErr;
  33664.     INLINE $205F,$7024,$A660,$3E80;
  33665. æDT myVariable := PBDTGetIconInfoAsync(paramBlock,A0);
  33666. æRI 
  33667.  
  33668. æC 
  33669.  
  33670. æKY PBDTAddAPPL
  33671. æFp Files.p
  33672. æT FUNCTION
  33673. æD FUNCTION PBDTAddAPPL(paramBlock: DTPBPtr;async: BOOLEAN): OSErr;
  33674. æDT myVariable := PBDTAddAPPL(paramBlock,async);
  33675. æRI 
  33676.  
  33677. æC 
  33678.  
  33679. æKY PBDTAddAPPLSync
  33680. æFp Files.p
  33681. æT FUNCTION
  33682. æTN 7025,A260
  33683. æD FUNCTION PBDTAddAPPLSync(paramBlock: DTPBPtr): OSErr;
  33684.     INLINE $205F,$7025,$A260,$3E80;
  33685. æDT myVariable := PBDTAddAPPLSync(paramBlock,A0);
  33686. æRI 
  33687.  
  33688. æC 
  33689.  
  33690. æKY PBDTAddAPPLAsync
  33691. æFp Files.p
  33692. æT FUNCTION
  33693. æTN 7025,A660
  33694. æD FUNCTION PBDTAddAPPLAsync(paramBlock: DTPBPtr): OSErr;
  33695.     INLINE $205F,$7025,$A660,$3E80;
  33696. æDT myVariable := PBDTAddAPPLAsync(paramBlock,A0);
  33697. æRI 
  33698.  
  33699. æC 
  33700.  
  33701. æKY PBDTRemoveAPPL
  33702. æFp Files.p
  33703. æT FUNCTION
  33704. æD FUNCTION PBDTRemoveAPPL(paramBlock: DTPBPtr;async: BOOLEAN): OSErr;
  33705. æDT myVariable := PBDTRemoveAPPL(paramBlock,async);
  33706. æRI 
  33707.  
  33708. æC 
  33709.  
  33710. æKY PBDTRemoveAPPLSync
  33711. æFp Files.p
  33712. æT FUNCTION
  33713. æTN 7026,A260
  33714. æD FUNCTION PBDTRemoveAPPLSync(paramBlock: DTPBPtr): OSErr;
  33715.     INLINE $205F,$7026,$A260,$3E80;
  33716. æDT myVariable := PBDTRemoveAPPLSync(paramBlock,A0);
  33717. æRI 
  33718.  
  33719. æC 
  33720.  
  33721. æKY PBDTRemoveAPPLAsync
  33722. æFp Files.p
  33723. æT FUNCTION
  33724. æTN 7026,A660
  33725. æD FUNCTION PBDTRemoveAPPLAsync(paramBlock: DTPBPtr): OSErr;
  33726.     INLINE $205F,$7026,$A660,$3E80;
  33727. æDT myVariable := PBDTRemoveAPPLAsync(paramBlock,A0);
  33728. æRI 
  33729.  
  33730. æC 
  33731.  
  33732. æKY PBDTGetAPPL
  33733. æFp Files.p
  33734. æT FUNCTION
  33735. æD FUNCTION PBDTGetAPPL(paramBlock: DTPBPtr;async: BOOLEAN): OSErr;
  33736. æDT myVariable := PBDTGetAPPL(paramBlock,async);
  33737. æRI 
  33738.  
  33739. æC 
  33740.  
  33741. æKY PBDTGetAPPLSync
  33742. æFp Files.p
  33743. æT FUNCTION
  33744. æTN 7027,A260
  33745. æD FUNCTION PBDTGetAPPLSync(paramBlock: DTPBPtr): OSErr;
  33746.     INLINE $205F,$7027,$A260,$3E80;
  33747. æDT myVariable := PBDTGetAPPLSync(paramBlock,A0);
  33748. æRI 
  33749.  
  33750. æC 
  33751.  
  33752. æKY PBDTGetAPPLAsync
  33753. æFp Files.p
  33754. æT FUNCTION
  33755. æTN 7027,A660
  33756. æD FUNCTION PBDTGetAPPLAsync(paramBlock: DTPBPtr): OSErr;
  33757.     INLINE $205F,$7027,$A660,$3E80;
  33758. æDT myVariable := PBDTGetAPPLAsync(paramBlock,A0);
  33759. æRI 
  33760.  
  33761. æC 
  33762.  
  33763. æKY PBDTSetComment
  33764. æFp Files.p
  33765. æT FUNCTION
  33766. æD FUNCTION PBDTSetComment(paramBlock: DTPBPtr;async: BOOLEAN): OSErr;
  33767. æDT myVariable := PBDTSetComment(paramBlock,async);
  33768. æC 
  33769.  
  33770. æKY PBDTSetCommentSync
  33771. æFp Files.p
  33772. æT FUNCTION
  33773. æTN 7028,A260
  33774. æD FUNCTION PBDTSetCommentSync(paramBlock: DTPBPtr): OSErr;
  33775.     INLINE $205F,$7028,$A260,$3E80;
  33776. æDT myVariable := PBDTSetCommentSync(paramBlock,A0);
  33777. æC 
  33778.  
  33779. æKY PBDTSetCommentAsync
  33780. æFp Files.p
  33781. æT FUNCTION
  33782. æTN 7028,A660
  33783. æD FUNCTION PBDTSetCommentAsync(paramBlock: DTPBPtr): OSErr;
  33784.     INLINE $205F,$7028,$A660,$3E80;
  33785. æDT myVariable := PBDTSetCommentAsync(paramBlock,A0);
  33786. æC 
  33787.  
  33788. æKY PBDTRemoveComment
  33789. æFp Files.p
  33790. æT FUNCTION
  33791. æD FUNCTION PBDTRemoveComment(paramBlock: DTPBPtr;async: BOOLEAN): OSErr;
  33792. æDT myVariable := PBDTRemoveComment(paramBlock,async);
  33793. æRI 
  33794.  
  33795. æC 
  33796.  
  33797. æKY PBDTRemoveCommentSync
  33798. æFp Files.p
  33799. æT FUNCTION
  33800. æTN 7029,A260
  33801. æD FUNCTION PBDTRemoveCommentSync(paramBlock: DTPBPtr): OSErr;
  33802.     INLINE $205F,$7029,$A260,$3E80;
  33803. æDT myVariable := PBDTRemoveCommentSync(paramBlock,A0);
  33804. æRI 
  33805.  
  33806. æC 
  33807.  
  33808. æKY PBDTRemoveCommentAsync
  33809. æFp Files.p
  33810. æT FUNCTION
  33811. æTN 7029,A660
  33812. æD FUNCTION PBDTRemoveCommentAsync(paramBlock: DTPBPtr): OSErr;
  33813.     INLINE $205F,$7029,$A660,$3E80;
  33814. æDT myVariable := PBDTRemoveCommentAsync(paramBlock,A0);
  33815. æRI 
  33816.  
  33817. æC 
  33818.  
  33819. æKY PBDTGetComment
  33820. æFp Files.p
  33821. æT FUNCTION
  33822. æD FUNCTION PBDTGetComment(paramBlock: DTPBPtr;async: BOOLEAN): OSErr;
  33823. æDT myVariable := PBDTGetComment(paramBlock,async);
  33824. æRI 
  33825.  
  33826. æC 
  33827.  
  33828. æKY PBDTGetCommentSync
  33829. æFp Files.p
  33830. æT FUNCTION
  33831. æTN 702A,A260
  33832. æD FUNCTION PBDTGetCommentSync(paramBlock: DTPBPtr): OSErr;
  33833.     INLINE $205F,$702A,$A260,$3E80;
  33834. æDT myVariable := PBDTGetCommentSync(paramBlock,A0);
  33835. æRI 
  33836.  
  33837. æC 
  33838.  
  33839. æKY PBDTGetCommentAsync
  33840. æFp Files.p
  33841. æT FUNCTION
  33842. æTN 702A,A660
  33843. æD FUNCTION PBDTGetCommentAsync(paramBlock: DTPBPtr): OSErr;
  33844.     INLINE $205F,$702A,$A660,$3E80;
  33845. æDT myVariable := PBDTGetCommentAsync(paramBlock,A0);
  33846. æRI 
  33847.  
  33848. æC 
  33849.  
  33850. æKY PBDTFlush
  33851. æFp Files.p
  33852. æT FUNCTION
  33853. æD FUNCTION PBDTFlush(paramBlock: DTPBPtr;async: BOOLEAN): OSErr;
  33854. æDT myVariable := PBDTFlush(paramBlock,async);
  33855. æRI 
  33856.  
  33857. æC 
  33858.  
  33859. æKY PBDTFlushSync
  33860. æFp Files.p
  33861. æT FUNCTION
  33862. æTN 702B,A260
  33863. æD FUNCTION PBDTFlushSync(paramBlock: DTPBPtr): OSErr;
  33864.     INLINE $205F,$702B,$A260,$3E80;
  33865. æDT myVariable := PBDTFlushSync(paramBlock,A0);
  33866. æRI 
  33867.  
  33868. æC 
  33869.  
  33870. æKY PBDTFlushAsync
  33871. æFp Files.p
  33872. æT FUNCTION
  33873. æTN 702B,A660
  33874. æD FUNCTION PBDTFlushAsync(paramBlock: DTPBPtr): OSErr;
  33875.     INLINE $205F,$702B,$A660,$3E80;
  33876. æDT myVariable := PBDTFlushAsync(paramBlock,A0);
  33877. æRI 
  33878.  
  33879. æC 
  33880.  
  33881. æKY PBDTReset
  33882. æFp Files.p
  33883. æT FUNCTION
  33884. æD FUNCTION PBDTReset(paramBlock: DTPBPtr;async: BOOLEAN): OSErr;
  33885. æDT myVariable := PBDTReset(paramBlock,async);
  33886. æRI 
  33887.  
  33888. æC 
  33889.  
  33890. æKY PBDTResetSync
  33891. æFp Files.p
  33892. æT FUNCTION
  33893. æTN 702C,A260
  33894. æD FUNCTION PBDTResetSync(paramBlock: DTPBPtr): OSErr;
  33895.     INLINE $205F,$702C,$A260,$3E80;
  33896. æDT myVariable := PBDTResetSync(paramBlock,A0);
  33897. æRI 
  33898.  
  33899. æC 
  33900.  
  33901. æKY PBDTResetAsync
  33902. æFp Files.p
  33903. æT FUNCTION
  33904. æTN 702C,A660
  33905. æD FUNCTION PBDTResetAsync(paramBlock: DTPBPtr): OSErr;
  33906.     INLINE $205F,$702C,$A660,$3E80;
  33907. æDT myVariable := PBDTResetAsync(paramBlock,A0);
  33908. æRI 
  33909.  
  33910. æC 
  33911.  
  33912. æKY PBDTGetInfo
  33913. æFp Files.p
  33914. æT FUNCTION
  33915. æD FUNCTION PBDTGetInfo(paramBlock: DTPBPtr;async: BOOLEAN): OSErr;
  33916. æDT myVariable := PBDTGetInfo(paramBlock,async);
  33917. æRI 
  33918.  
  33919. æC 
  33920.  
  33921. æKY PBDTGetInfoSync
  33922. æFp Files.p
  33923. æT FUNCTION
  33924. æTN 702D,A260
  33925. æD FUNCTION PBDTGetInfoSync(paramBlock: DTPBPtr): OSErr;
  33926.     INLINE $205F,$702D,$A26