mirror of
https://github.com/elliotnunn/sys7.1-doc-wip.git
synced 2024-12-12 04:29:09 +00:00
140 lines
3.8 KiB
Plaintext
140 lines
3.8 KiB
Plaintext
;
|
|
; File: Dictionary.a
|
|
;
|
|
; Contains: xxx put contents here xxx
|
|
;
|
|
; Written by: xxx put writers here xxx
|
|
;
|
|
; Copyright: © 1992 by Apple Computer, Inc., all rights reserved.
|
|
;
|
|
; Change History (most recent first):
|
|
;
|
|
; <2> 6/2/92 DCL Changed Include flag; removed equ
|
|
; <1> 6/1/92 hsK first checked in
|
|
;
|
|
;
|
|
|
|
IF &TYPE('__INCLUDINGDICTIONARY__') = 'UNDEFINED' THEN
|
|
__INCLUDINGDICTIONARY__ SET 1
|
|
|
|
IF &TYPE('__INCLUDINGTRAPS__') = 'UNDEFINED' THEN
|
|
INCLUDE 'Traps.a'
|
|
ENDIF
|
|
|
|
IF &TYPE('__INCLUDINGFSEQU__') = 'UNDEFINED' THEN
|
|
INCLUDE 'FSEqu.a'
|
|
ENDIF
|
|
|
|
; Dictionary data insertion modes.
|
|
|
|
kInsert EQU 0 ; Only insert the input entry if there is nothing in the dictionary that matches the key.
|
|
kReplace EQU 1 ; Only replace the entries which match the key with the input entry.
|
|
kInsertOrReplace EQU 2 ; Insert the entry if there is nothing in the dictionary which matches the key.
|
|
; If there is already matched entries, replace the existing matched entries with the input entry.
|
|
; Key attribute constants.
|
|
|
|
kIsCaseSensitive EQU $10 ; case sensitive = 16.
|
|
kIsNotDiacriticalSensitive EQU $20 ; diac not sensitive = 32.
|
|
|
|
; Registered attribute type constants.
|
|
|
|
kNoun EQU -1
|
|
kVerb EQU -2
|
|
kAdjective EQU -3
|
|
kAdverb EQU -4
|
|
|
|
; Dictionary information record type.
|
|
|
|
DictionaryInformation RECORD 0,INCREMENT
|
|
dictionaryFSSpec DS FSSpec ; FSSpec record
|
|
numberOfRecords DS.L 1 ; long integer
|
|
currentGarbageSize DS.L 1 ; long integer
|
|
script DS.W 1 ; ScriptCode
|
|
maximumKeyLength DS.W 1 ; short integer
|
|
keyAttributes DS.B 1 ; unsigned byte
|
|
padding DS.B 1 ; byte padding
|
|
size EQU *
|
|
ENDR
|
|
|
|
; Define the Dictionary Manager Dispatch trap opword
|
|
_DictionaryDispatch OPWORD $AA53
|
|
|
|
; Define the selector and the parameter size for each Dictionary Manager call.
|
|
selectInitializeDictionary EQU 0
|
|
paramWordsInitializeDictionary EQU 5
|
|
|
|
selectOpenDictionary EQU 1
|
|
paramWordsOpenDictionary EQU 5
|
|
|
|
selectCloseDictionary EQU 2
|
|
paramWordsCloseDictionary EQU 2
|
|
|
|
selectInsertRecordToDictionary EQU 3
|
|
paramWordsInsertRecordToDictionary EQU 7
|
|
|
|
selectDeleteRecordFromDictionary EQU 4
|
|
paramWordsDeleteRecordFromDictionary EQU 4
|
|
|
|
selectFindRecordInDictionary EQU 5
|
|
paramWordsFindRecordInDictionary EQU 8
|
|
|
|
selectFindRecordByIndexInDictionary EQU 6
|
|
paramWordsFindRecordByIndexInDictionary EQU 10
|
|
|
|
selectGetDictionaryInformation EQU 7
|
|
paramWordsGetDictionaryInformation EQU 4
|
|
|
|
selectCompactDictionary EQU 8
|
|
paramWordsCompactDictionary EQU 2
|
|
|
|
; Define the dispatch macros to get to the calls.
|
|
|
|
MACRO
|
|
_InitializeDictionary
|
|
DoDispatch _DictionaryDispatch, selectInitializeDictionary, paramWordsInitializeDictionary
|
|
ENDM
|
|
|
|
MACRO
|
|
_OpenDictionary
|
|
DoDispatch _DictionaryDispatch, selectOpenDictionary, paramWordsOpenDictionary
|
|
ENDM
|
|
|
|
MACRO
|
|
_CloseDictionary
|
|
DoDispatch _DictionaryDispatch, selectCloseDictionary, paramWordsCloseDictionary
|
|
ENDM
|
|
|
|
MACRO
|
|
_InsertRecordToDictionary
|
|
DoDispatch _DictionaryDispatch, selectInsertRecordToDictionary, paramWordsInsertRecordToDictionary
|
|
ENDM
|
|
|
|
MACRO
|
|
_DeleteRecordFromDictionary
|
|
DoDispatch _DictionaryDispatch, selectDeleteRecordFromDictionary, paramWordsDeleteRecordFromDictionary
|
|
ENDM
|
|
|
|
MACRO
|
|
_FindRecordInDictionary
|
|
DoDispatch _DictionaryDispatch, selectFindRecordInDictionary, paramWordsFindRecordInDictionary
|
|
ENDM
|
|
|
|
MACRO
|
|
_FindRecordByIndexInDictionary
|
|
DoDispatch _DictionaryDispatch, selectFindRecordByIndexInDictionary, paramWordsFindRecordByIndexInDictionary
|
|
ENDM
|
|
|
|
MACRO
|
|
_GetDictionaryInformation
|
|
DoDispatch _DictionaryDispatch, selectGetDictionaryInformation, paramWordsGetDictionaryInformation
|
|
ENDM
|
|
|
|
MACRO
|
|
_CompactDictionary
|
|
DoDispatch _DictionaryDispatch, selectCompactDictionary, paramWordsCompactDictionary
|
|
ENDM
|
|
|
|
|
|
|
|
ENDIF ; ...already included
|