mirror of
https://github.com/elliotnunn/sys7.1-doc-wip.git
synced 2024-10-31 19:05:04 +00:00
247 lines
7.6 KiB
Plaintext
247 lines
7.6 KiB
Plaintext
;
|
||
; File: BTreeEqu.a
|
||
;
|
||
; Contains: Private equates for the B*Tree manager.
|
||
;
|
||
; Written by: Kenny SC. Tung
|
||
;
|
||
; Copyright: © 1989-1992 by Apple Computer, Inc., all rights reserved.
|
||
;
|
||
; Change History (most recent first):
|
||
;
|
||
; <15> 10/7/92 gs Add btTooManyNodesErr (-430) for OCE folks to get around DIVU
|
||
; "bug".
|
||
; <14> 8/21/91 JSM Clean up header.
|
||
; <13> 1/30/91 gbm sab, #38: Change the ‘already including this file’ variable to
|
||
; all uppercase (for security reasons)
|
||
; <12> 1/4/91 KST With dnf: Took out the definition of 'kdDTString' and changed
|
||
; the type number to 'kdReserved'.
|
||
; <11> 8/3/90 KST Adding a new field ioBTWriteFlag in BTioParam structure.
|
||
; <10> 7/17/90 KST btRsrvedErr is no longer used.
|
||
; <9> 7/17/90 KST Adding 2 error codes.
|
||
; <8> 7/6/90 KST Changing maxKeyLen from 127 to 129 per AppleMail request.
|
||
; <6> 4/9/90 KST Making necessary changes to support user specified key
|
||
; comparison procedure.
|
||
; <5> 4/4/90 KST Adding new error codes.
|
||
; <4> 3/13/90 KST Adding a new error code -- "btVersionErr".
|
||
; <3> 2/23/90 KST Adding a new error code -- btNoKDErr.
|
||
; <2> 2/22/90 KST Moved B*tree error codes from SysErr.a into this file. Added a
|
||
; new field in BTioParam.
|
||
; <1> 2/21/90 HJR Moved from Interfaces:AIncludes to Internal:Asm.
|
||
; <4> 2/6/90 KST Adding a new call, btUpdateKD.
|
||
; <3> 1/22/90 KST Added new access control calls and rewrote btree macros.
|
||
; <2.1> 10/16/89 KST Added new _BTCleanUp trap and selector.
|
||
; <2.0> 10/3/89 KST Moved B*Tree assembly routine macros from Hfs70Equ.a to
|
||
; BTreeEqu.a. Changed ioKBufSize to ioKReqCount.
|
||
; <1.9> 9/18/89 KST Added a new type kdDTString to replace default for DTDB.
|
||
; <1.8> 8/16/89 KST BTHints are not exported to the public.
|
||
; <1.7> 8/7/89 KST Moved error codes to sysErr.a and Moved btQType to sysEqu.a
|
||
; <1.6> 7/6/89 KST Added BTFlush call.
|
||
; <1.5> 6/15/89 KST maxKeylen is used by DTMgr, so it can't be in BTreePrivate.a
|
||
; <1.4> 6/15/89 KST Separate private stuff from BTreeEqu.a
|
||
; <1.3> 6/14/89 KST Made changes for the new implementation of BTreeMgr.
|
||
; <1.2> 3/21/89 KST Changed BTError code, added support for Mac Plus.
|
||
; <1.1> 3/8/89 KST Added IMPORT for cmdAddr and fsqAddr.
|
||
; <1.0> 3/8/89 KST Adding to EASE for the first time.
|
||
;
|
||
|
||
IF &TYPE('__INCLUDINGBTREEEQU__') = 'UNDEFINED' THEN
|
||
__INCLUDINGBTREEEQU__ SET 1
|
||
|
||
_BTreeDispatch OPWORD $A08E
|
||
|
||
;; dispatch selector:
|
||
btInitN EQU 0
|
||
btOpenN EQU 1
|
||
btCloseN EQU 2
|
||
btInsertN EQU 3
|
||
btSetRecN EQU 4
|
||
btReplRecN EQU 5
|
||
btSearchN EQU 6
|
||
btGetRecN EQU 7
|
||
btDeleteN EQU 8
|
||
btGetInfoN EQU 9
|
||
btFlushN EQU 10 ; <07/06/89 KSCT>
|
||
btCleanUpN EQU 11 ; <10/05/89 KSCT>
|
||
btRsrvAccessN EQU 12 ; <12/01/89 KSCT>
|
||
btRelAccessN EQU 13 ; <12/01/89 KSCT>
|
||
btGetUIDN EQU 14 ; <12/14/89 KSCT>
|
||
btUpdateKDN EQU 15 ; <02/05/90 KSCT>
|
||
maxBTtrap EQU btUpdateKDN ; <02/05/90 KSCT>
|
||
|
||
;; key descriptors:
|
||
kdMaxLen EQU 24 ; only 24 bytes allowed for the KD record including length byte
|
||
|
||
kdSkip EQU 0 ; skip next N bytes
|
||
kdByte EQU 1 ; unsigned byte
|
||
kdSignedByte EQU 2 ; signed
|
||
kdString EQU 3 ; variable length string
|
||
kdWord EQU 4 ; unsigned word
|
||
kdSignedWord EQU 5 ; signed
|
||
kdLong EQU 6 ; unsigned long
|
||
kdSignedLong EQU 7 ; signed long
|
||
kdFLString EQU 8 ; fixed length string
|
||
kdReserved EQU 9 ; not used by anyone. <03Jan91 #12>
|
||
kdUseKCProc EQU 10 ; always uses key comparison procedure <28Mar90>
|
||
kdMaxnum EQU kdUseKCProc+1 ; 0 ~ 10 are OK, max+1 <28Mar90>
|
||
|
||
;kdDTString EQU 9 ; a special type for DeskTop Mgr. <9/18/89>
|
||
|
||
;; string attr; not a valid key type parser can recognize the error <3/17/89>
|
||
casesen EQU 16 ; case sensitive <3/17/89>
|
||
diacNsen EQU 32 ; diacritical non sensitive <3/17/89>
|
||
keyAttrmsk EQU $CF ; 1100 1111 mask <3/17/89>
|
||
|
||
;; BTioParam
|
||
ioBTWriteFlag EQU 26 ;(byte) used by BTFlush only, set to flush the cache
|
||
ioBTKeyPtr EQU 44 ;(long)
|
||
;; ioDirID EQU 48 ; must have this field
|
||
ioBTHint EQU 52 ;(4 longs)
|
||
ioBTPosMode EQU 68 ;(word)
|
||
ioKReqCount EQU 70 ;(word)
|
||
ioKActCount EQU 72 ;(word)
|
||
ioBTRsrvUID EQU 74 ;(long) <04Dec89>
|
||
ioBTDataSize EQU 78 ;(long) <19Feb90>
|
||
ioBTKCProc EQU 82 ;(long) <28Mar90>
|
||
BTioParamSize EQU ioBTKCProc+4 ; <28Mar90>
|
||
|
||
;; BTParam (used by BTInit, BTUpdateKD and BTGetInfo only)
|
||
ioBTNodeSize EQU 26 ;(word)
|
||
ioBTMaxKLen EQU 28 ;(word)
|
||
ioBTDepth EQU 30 ;(word)
|
||
ioBTRecNum EQU 32 ;(long)
|
||
ioBTNNodes EQU 36 ;(long)
|
||
ioBTFreeNode EQU 40 ;(long)
|
||
ioBTClumpSize EQU 44 ;(long)
|
||
;; ioDirID EQU 48 ; must have this field
|
||
ioBTKDPtr EQU 52 ;(long)
|
||
ioBTKDReqCount EQU 56 ;(word)
|
||
ioBTKDActCount EQU 58 ;(word)
|
||
BTParamSize equ ioBTKDActCount+2
|
||
|
||
maxKeyLen EQU 129 ; max key length (doesn't include key length byte)
|
||
|
||
|
||
; B*Tree functions:
|
||
MACRO
|
||
_BTInit &async1,&async2
|
||
MOVEQ #btInitN,D0
|
||
_BTreeDispatch &async1,&async2
|
||
ENDM
|
||
|
||
MACRO
|
||
_BTOpen &async1,&async2
|
||
MOVEQ #btOpenN,D0
|
||
_BTreeDispatch &async1,&async2
|
||
ENDM
|
||
|
||
MACRO
|
||
_BTClose &async1,&async2
|
||
MOVEQ #btCloseN,D0
|
||
_BTreeDispatch &async1,&async2
|
||
ENDM
|
||
|
||
MACRO
|
||
_BTInsRec &async1,&async2
|
||
MOVEQ #btInsertN,D0
|
||
_BTreeDispatch &async1,&async2
|
||
ENDM
|
||
|
||
MACRO
|
||
_BTSetRec &async1,&async2
|
||
MOVEQ #btSetRecN,D0
|
||
_BTreeDispatch &async1,&async2
|
||
ENDM
|
||
|
||
MACRO
|
||
_BTReplRec &async1,&async2
|
||
MOVEQ #btReplRecN,D0
|
||
_BTreeDispatch &async1,&async2
|
||
ENDM
|
||
|
||
MACRO
|
||
_BTSearch &async1,&async2
|
||
MOVEQ #btSearchN,D0
|
||
_BTreeDispatch &async1,&async2
|
||
ENDM
|
||
|
||
MACRO
|
||
_BTGetRec &async1,&async2
|
||
MOVEQ #btGetRecN,D0
|
||
_BTreeDispatch &async1,&async2
|
||
ENDM
|
||
|
||
MACRO
|
||
_BTDelRec &async1,&async2
|
||
MOVEQ #btDeleteN,D0
|
||
_BTreeDispatch &async1,&async2
|
||
ENDM
|
||
|
||
MACRO
|
||
_BTGetInfo &async1,&async2
|
||
MOVEQ #btGetInfoN,D0
|
||
_BTreeDispatch &async1,&async2
|
||
ENDM
|
||
|
||
MACRO
|
||
_BTFlush &async1,&async2
|
||
MOVEQ #btFlushN, D0
|
||
_BTreeDispatch &async1,&async2
|
||
ENDM
|
||
|
||
MACRO
|
||
_BTCleanUp &async1,&async2
|
||
MOVEQ #btCleanUpN, D0
|
||
_BTreeDispatch &async1,&async2
|
||
ENDM
|
||
|
||
MACRO
|
||
_BTRsrvAccess &async1,&async2
|
||
MOVEQ #btRsrvAccessN, D0
|
||
_BTreeDispatch &async1,&async2
|
||
ENDM
|
||
|
||
MACRO
|
||
_BTRelAccess &async1,&async2
|
||
MOVEQ #btRelAccessN, D0
|
||
_BTreeDispatch &async1,&async2
|
||
ENDM
|
||
|
||
MACRO ;; This call is not queued
|
||
_BTGetUid &async1,&async2
|
||
MOVEQ #btGetUidN, D0
|
||
_BTreeDispatch &async1,&async2
|
||
ENDM
|
||
|
||
MACRO
|
||
_btUpdateKD &async1,&async2
|
||
MOVEQ #btUpdateKDN, D0
|
||
_BTreeDispatch &async1,&async2
|
||
ENDM
|
||
|
||
|
||
; B*Tree Manager error codes -410 to -430
|
||
notBTree EQU -410
|
||
btBadNodeErr EQU -411
|
||
btSizeErr EQU -412 ; record too big
|
||
btNoSpaceErr EQU -413 ; not enough disk space
|
||
btDupRecErr EQU -414
|
||
btRecNotFnd EQU -415
|
||
btKeyLenErr EQU -416
|
||
btKeyAttrErr EQU -417
|
||
btKeyFdErr EQU -418 ; key field error
|
||
btPMInvalid EQU -419 ; invalid place marker
|
||
btKDLenErr EQU -420 ; KD too long or 0
|
||
btKDTypeErr EQU -421 ; unsupported KD type
|
||
|
||
btBadUIDErr EQU -422 ; Invalid UID
|
||
;btRsrvedErr EQU -423 ; the file has already been reserved
|
||
btNoKDErr EQU -424 ; no key descriptor in the header
|
||
btDepthErr EQU -425 ; tree depth > limit
|
||
btNoKCProcErr EQU -426 ; no Key Comp procedure error <28Mar90>
|
||
btVersionErr EQU -427 ; Btree version error (for future release)
|
||
btEofErr EQU -428 ; BTGetRec reading beyond EOF
|
||
btBofErr EQU -429 ; BTGetRec reading before BOF
|
||
btTooManyNodesErr EQU -430 ; Attempt to grow B*Tree beyond node limit <15>
|
||
|
||
ENDIF ; ...already included |