mac-rom/Interfaces/AIncludes/Packages.a
Elliot Nunn 5b0f0cc134 Bring in CubeE sources
Resource forks are included only for .rsrc files. These are DeRezzed into their data fork. 'ckid' resources, from the Projector VCS, are not included.

The Tools directory, containing mostly junk, is also excluded.
2017-12-26 10:02:57 +08:00

728 lines
21 KiB
Plaintext

; Version: 3.05
; Created: Friday, October 20, 1989 at 9:32:54 PM
;
; File: Packages.a
;
; Assembler Interface to the Macintosh Libraries
; Copyright Apple Computer, Inc. 1984-1992
; All Rights Reserved
;
;--------------------------------------------------------------------
;
; Package Equates -- This file defines the high-level equates for the
; Standard File, Disk Initialization, International Utilities, and
; Binary-Decimal Conversion packages, and the List Manager. The equates
; for the Floating-PointArithmetic and Transcendental Functions packages
; can be found in SANEMacs.a.
;
; Change History (most recent first):
;
; <16> 10/16/92 PKE For new IM: Add itl1 extension offsets (were in Intl PACK code).
; Add timeCycle constants. Add trap macros for new names for old
; IUxxx routines.
; <15> 7/1/92 DCL This file is the replacement for PackMacs.a.
; <14> 2/12/92 MH Correct spelling of _DIUnLoad and diUnLoad to _DIUnload and
; diUnload. The selector reference in the macro did not match the
; selector equate, thus breaking case on assembly. The macro name
; now also matches the name used in the C and Pascal interfaces.
; <13> 8/14/91 JL Fixed the casing of the selector values so we can use this file
; with CASE ON.
; <12> 1/30/91 gbm sab, #38: Change the Ôalready including this fileÕ variable to
; all uppercase (for security reasons)
; <11> 1/2/91 PKE (bbm) Updated comments and rearranged a few constants to match
; latest Inside Mac summary.
; <10> 8/29/90 PKE Add iuWhiteSpaceList constant.
; <9> 8/24/90 PKE Add iuUnTokenTable constant.
; <8> 6/20/90 PKE Added some verXxx synonyms that are less ambiguous than the old
; names.
; <7> 5/11/90 PKE Added verArabic as synonym for verArabia.
; <6> 4/27/90 Greg
; <5> 4/27/90 Greg prevent redefinition warnings by avoiding multiple inclusions
; <4> 3/2/90 Official MPW version.
; <3> 2/17/90 ngk Split Standard file equates into StandardFile.a Removed 7.0
; conditionals, now that MPW 3.1 is final.
; <2> 1/17/90 PKE Added several new verXxx codes. Updated header to BBS format.
; <1> 12/17/89 CCH Adding for the first time into BBS.
;
; (BBS versions above, EASE versions below)
; <1.3> 9/22/89 PKE Add 7.0 selector and macro for IUGetItlTable; add constants for
; table selector. Delete iuSysLang constant (added in <1.2>).
; <1.2> 9/18/89 PKE Add constants for ScriptCode and LangCode.
; <1.1> 9/15/89 PKE Add 7.0 selectors and macros for IUClearCache,IUMagPString,
; IUMagIdPString, IUScriptOrder, IULangOrder, IUTextOrder. Add
; 6.0.x selectors and macros for IULDateString,IULTimeString.
; <1.0> 11/9/88 CCH Adding to EASE.
;
; (old EASE versions below)
; <1.2> 10/13/88 LDC <enter comment here>
; <¥1.1> 9/14/88 CCH Updated EASE with the current rev of this file.
;
;--------------------------------------------------------------------
IF &TYPE('__INCLUDINGPACKAGES__') = 'UNDEFINED' THEN
__INCLUDINGPACKAGES__ SET 1
listMgr EQU 0 ; List Manager
; 1 reserved for use by Apple Computer, Inc.
dskInit EQU 2 ; Disk Initialization
stdFile EQU 3 ; Standard File
flPoint EQU 4 ; Floating-Point Arithmetic
trFunc EQU 5 ; Transcendental Functions
intUtil EQU 6 ; International Utilities
bdConv EQU 7 ; Binary/Decimal Conversion
; Equates for DISK INITIALIZATION PACKAGE
; Routine selectors
diLoad EQU 2
diUnload EQU 4
diBadMount EQU 0
diFormat EQU 6
diVerify EQU 8
diZero EQU 10
; Result codes are defined in SysEqu.a
; Equates for INTERNATIONAL PACKAGE
; Routine selectors
iuGetIntl EQU 6
iuSetIntl EQU 8
iuDateString EQU 0
iuDatePString EQU 14
iuTimeString EQU 2
iuTimePString EQU 16
iuMetric EQU 4
iuMagString EQU 10
iuMagIDString EQU 12
iuLDateString EQU 20 ; <1.1>
iuLTimeString EQU 22 ; <1.1>
iuClearCache EQU 24 ; <1.1>
iuMagPString EQU 26 ; <1.1>
iuMagIDPString EQU 28 ; <1.1>
iuScriptOrder EQU 30 ; <1.1>
iuLangOrder EQU 32 ; <1.1>
iuTextOrder EQU 34 ; <1.1>
iuGetItlTable EQU 36 ; <1.3>
; Data structures for International Utilities
; International 0 record
decimalPt EQU 0 ; decimal point character <11>
thousSep EQU 1 ; thousands separator character <11>
listSep EQU 2 ; list separator character <11>
currSym EQU 3 ; currency symbol (3 bytes long) <11>
currFmt EQU 6 ; currency format flags
dateOrder EQU 7 ; order of short date elements: mdy, dmy, etc. <11>
shrtDateFmt EQU 8 ; format flags for each short date element <11>
dateSep EQU 9 ; date separator character <11>
timecycle EQU 10 ; specifies time cycle: 0..23, 1..12, or 0..11 <11>
timeFmt EQU 11 ; format flags for each time element <11>
mornStr EQU 12 ; trailing string for AM if 12-hour cycle <11>
eveStr EQU 16 ; trailing string for PM if 12-hour cycle <11>
timeSep EQU 20 ; time separator character <11>
timeSuff EQU 21 ; trailing string for AM if 24-hour cycle <11>
; (first 4 bytes); trailing string for PM
; if 24-hour cycle (second 4 bytes)
metricSys EQU 29 ; $FF if metric, 0 if inches etc. <11>
intl0Vers EQU 30 ; region code (hi byte) and version (lo byte) <11>
; International 1 record (added comments <11>)
days EQU 0 ; day names
months EQU 112 ; month names
suppressDay EQU 304 ; 255 for no day, or flags to suppress any element
lngDateFmt EQU 305 ; order of long date elements
dayLeading0 EQU 306 ; 255 for leading 0 in day number
abbrLen EQU 307 ; length for abbreviating names
st0 EQU 308 ; separator strings for long date format
st1 EQU 312
st2 EQU 316
st3 EQU 320
st4 EQU 324
intl1Vers EQU 328 ; region code (hi byte) and version (lo byte)
localRtn EQU 330 ; now a flag for optional extension
; Offsets for itl1 extension. <16>
itl1ExtFlag EQU $A89F ; signature for extended version if found at localRtn offset
itl1Version EQU 332 ; real version number
itl1Format EQU 334 ; format code
itl1Calendar EQU 336 ; calendar code
itl1XDayOffset EQU 338 ; offset to extra days list
itl1XDayLength EQU 342 ; length of extra days list
itl1XMonOffset EQU 346 ; offset to extra months list
itl1XMonLength EQU 350 ; length of extra months list
itl1AbDayOffset EQU 354 ; offset to abbrev days list
itl1AbDayLength EQU 358 ; length of abbrev days list
itl1AbMonOffset EQU 362 ; offset to abbrev months list
itl1AbMonLength EQU 366 ; length of abbrev months list
itl1XSepsOffset EQU 370 ; offset to extra separators list
itl1XSepsLength EQU 374 ; length of extra separators list
; Constants for manipulation of international resources
; Way to specify desired date format
shortDate EQU 0
longDate EQU 1
abbrevDate EQU 2
; Masks used for setting and testing currency format flags
currLeadingZ EQU 128 ; set if leading zero
currTrailingZ EQU 64 ; set if trailing zero
currNegSym EQU 32 ; set if minus sign for negative num, reset if parentheses}
currSymLead EQU 16 ; set if currency symbol leads, reset if trails}
; values for time cycle field
timeCycle24 EQU 0 ; time sequence 0:00 - 23:59 <16>
timeCycleZero EQU 1 ; time sequence 0:00-11:59, 0:00 - 11:59 <16>
timeCycle12 EQU 255 ; time sequence 12:00 - 11:59, 12:00 - 11:59 <16>
zeroCycle EQU 1 ; old name for timeCycleZero
; Constants specifying absolute value of short date form
mdy EQU 0 ; month,day,year
dmy EQU 1 ; day,month,year
ymd EQU 2 ; year,month,day
myd EQU 3 ; month, day, year
dym EQU 4 ; day, year, month
ydm EQU 5 ; year, day, month
longDay EQU 0 ; day of month
longWeek EQU 1 ; day of week
longMonth EQU 2 ; month of year
longYear EQU 3 ; year
supDay EQU 1 ; suppress day of month
supWeek EQU 2 ; suppress day of week
supMonth EQU 4 ; suppress month
supYear EQU 8 ; suppress year
; Masks used for date element format flags
century EQU 128 ; set if century, reset if no century
mntLdingZ EQU 64 ; set if leading 0 for month
dayLdingZ EQU 32 ; set if leading zero for day
; Masks used for time element format flags
hrLeadingZ EQU 128 ; set if leading zero for hours
minLeadingZ EQU 64 ; set if leading zero for minutes
secLeadingZ EQU 32 ; set if leading zero for seconds
; Region codes for localized versions
verUS EQU 0
verFrance EQU 1
verBritain EQU 2
verGermany EQU 3
verItaly EQU 4
verNetherlands EQU 5
verFrBelgiumLux EQU 6 ; French for Belgium & Luxembourg <8>
verSweden EQU 7
verSpain EQU 8
verDenmark EQU 9
verPortugal EQU 10
verFrCanada EQU 11
verNorway EQU 12
verIsrael EQU 13
verJapan EQU 14
verAustralia EQU 15
verArabic EQU 16 ; synonym for verArabia <7>
verFinland EQU 17
verFrSwiss EQU 18 ; French Swiss <11>
verGrSwiss EQU 19 ; German Swiss <11>
verGreece EQU 20
verIceland EQU 21
verMalta EQU 22
verCyprus EQU 23
verTurkey EQU 24
verYugoCroatian EQU 25 ; Croatian system for Yugoslavia <8>
verIndiaHindi EQU 33 ; Hindi system for India <8>
verPakistan EQU 34 ; <2>
verLithuania EQU 41 ; <2>
verPoland EQU 42 ; <2>
verHungary EQU 43 ; <2>
verEstonia EQU 44 ; <2>
verLatvia EQU 45 ; <2>
verLapland EQU 46 ; <2>
verFaeroeIsl EQU 47 ; <2>
verIran EQU 48 ; <2>
verRussia EQU 49 ; <2>
verIreland EQU 50 ; English-language version for Ireland <2><11>
verKorea EQU 51 ; <2>
verChina EQU 52 ; <2>
verTaiwan EQU 53 ; <2>
verThailand EQU 54 ; <2>
; Obsolete region code names, kept for backward compatibility (moved here <11>)
verBelgiumLux EQU 6 ; (use verFrBelgiumLux instead, less ambiguous) <8>
verArabia EQU 16
verYugoslavia EQU 25 ; (use verYugoCroatian instead, less ambiguous) <8>
verIndia EQU 33 ; (use verIndiaHindi instead, less ambiguous) <2><8>
; Special script code values for International Utilities <1.2>
iuSystemScript EQU -1 ; system script
iuCurrentScript EQU -2 ; current script (for font of grafPort)
; Special language code values for International Utilities <1.2>
iuSystemCurLang EQU -2 ; current (itlb) lang for system script
iuSystemDefLang EQU -3 ; default lang for system script
iuCurrentCurLang EQU -4 ; current (itlb) lang for current script
iuCurrentDefLang EQU -5 ; default lang for current script
iuScriptCurLang EQU -6 ; current (itlb) lang for specified script
iuScriptDefLang EQU -7 ; default lang for specified script
; Table selectors for GetItlTable (added comments <11>)
iuWordSelectTable EQU 0 ; get word select break table from 'itl2'
iuWordWrapTable EQU 1 ; get word wrap break table from 'itl2'
iuNumberPartsTable EQU 2 ; get default number parts table from 'itl4'
iuUnTokenTable EQU 3 ; get unToken table from 'itl4' <9>
iuWhiteSpaceList EQU 4 ; get white space list from 'itl4' <10>
; Equates for BINARY-DECIMAL CONVERSION PACKAGE
; Routine selectors
numToString EQU 0
stringToNum EQU 1
; List Manager Equates
rView EQU 0 ; Rect in which we are viewed
port EQU 8 ; Grafport that owns us
indent EQU 12 ; Indent line/fields in cell
cellSize EQU 16 ; Cell size
visible EQU 20 ; lines/fields visible bounds
vScroll EQU 28 ; vertical scroll bar (or NIL)
hScroll EQU 32 ; horizontal scroll bar (or NIL)
selFlags EQU 36 ; Multiple selections allowed
lActive EQU 37 ; active or inactive boolean
lReserved EQU 38 ; private flags used internally
listFlags EQU 39 ; autoscrolling flags, etc.
clikTime EQU 40 ; time of last click
clikLoc EQU 44 ; position of last click
mouseLoc EQU 48 ; current position of mouse
lClikLoop EQU 52 ; routine to call during ListClick
lastClick EQU 56 ; the last cell that was clicked in
refCon EQU 60 ; reference value
listDefHandle EQU 64 ; Handle to list defproc
userHandle EQU 68 ; general storage for user
dataBounds EQU 72 ; Bounds of lines/fields
cells EQU 80 ; Handle to data
maxIndex EQU 84 ; index of lastcell + 1
cellArray EQU 86 ; offsets to cells
sizeList EQU 86 ; size sans selections
; these are equates for accessing the SelFlags byte
; All flags are true if one
lOnlyOne EQU 7 ; 0 = multiple selections, 1 = one
lExtendDrag EQU 6 ; 1 = drag select without shift key
lNoDisjoint EQU 5 ; 1 = turn off selections on click
lNoExtend EQU 4 ; 1 = don't extend shift selections
lNoRect EQU 3 ; 1 = don't grow (shift,drag) selection as rect
lUseSense EQU 2 ; 1 = shift should use sense of start cell
lNoNilHilite EQU 1 ; 1 = don't hilite empty cells
; these are bit numbers within the listFlags byte
; All flags are true if one
lDoVAutoscroll EQU 1 ; 1 = allow vertical autoscrolling
lDoHAutoscroll EQU 0 ; 1 = allow horizontal autoscrolling
; these are the messages sent to a list defproc
lInitMsg EQU 0 ; tell drawing routines to init themselves
lDrawMsg EQU 1 ; draw (and de/select) the indicated data
lHiliteMsg EQU 2 ; invert hilite state of specified cell
lCloseMsg EQU 3 ; shut down, the list is being disposed
; For package invocation
; First arg is routine selector, second is the trap
MACRO
_PackCall
MOVE.W &SYSLIST[1],-(SP)
&SYSLIST[2]
ENDM
;QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ
; Disk Initialization
;QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ
MACRO
_DILoad
_PackCall #diLoad,_Pack2
ENDM
MACRO
_DIUnload
_PackCall #diUnload,_Pack2
ENDM
MACRO
_DIBadMount
_PackCall #diBadMount,_Pack2
ENDM
MACRO
_DIFormat
_PackCall #diFormat,_Pack2
ENDM
MACRO
_DIVerify
_PackCall #diVerify,_Pack2
ENDM
MACRO
_DIZero
_PackCall #diZero,_Pack2
ENDM
;QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ
; International Utilities
;QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ
MACRO
_IUGetIntl
_PackCall #iuGetIntl,_Pack6
ENDM
MACRO
_GetIntlResource ; <16>
_PackCall #iuGetIntl,_Pack6
ENDM
MACRO
_IUSetIntl
_PackCall #iuSetIntl,_Pack6
ENDM
MACRO
_IUDateString
_PackCall #iuDateString,_Pack6
ENDM
MACRO
_IUDatePString
_PackCall #iuDatePString,_Pack6
ENDM
MACRO
_DateString ; <16>
_PackCall #iuDatePString,_Pack6
ENDM
MACRO
_IUTimeString
_PackCall #iuTimeString,_Pack6
ENDM
MACRO
_IUTimePString
_PackCall #iuTimePString,_Pack6
ENDM
MACRO
_TimeString ; <16>
_PackCall #iuTimePString,_Pack6
ENDM
MACRO
_IUMetric
_PackCall #iuMetric,_Pack6
ENDM
MACRO
_IsMetric ; <16>
_PackCall #iuMetric,_Pack6
ENDM
MACRO
_IUMagString
_PackCall #iuMagString,_Pack6
ENDM
MACRO
_IUMagIDString
_PackCall #iuMagIDString,_Pack6
ENDM
MACRO
_IULDateString ; <1.1>
_PackCall #iuLDateString,_Pack6
ENDM
MACRO
_LongDateString ; <16>
_PackCall #iuLDateString,_Pack6
ENDM
MACRO
_IULTimeString ; <1.1>
_PackCall #iuLTimeString,_Pack6
ENDM
MACRO
_LongTimeString ; <16>
_PackCall #iuLTimeString,_Pack6
ENDM
MACRO
_IUClearCache ; <1.1>
_PackCall #iuClearCache,_Pack6
ENDM
MACRO
_ClearIntlResourceCache ; <16>
_PackCall #iuClearCache,_Pack6
ENDM
MACRO
_IUMagPString ; <1.1>
_PackCall #iuMagPString,_Pack6
ENDM
MACRO
_CompareText ; <16>
_PackCall #iuMagPString,_Pack6
ENDM
MACRO
_IUMagIDPString ; <1.1>
_PackCall #iuMagIDPString,_Pack6
ENDM
MACRO
_IdenticalText ; <16>
_PackCall #iuMagIDPString,_Pack6
ENDM
MACRO
_IUScriptOrder ; <1.1>
_PackCall #iuScriptOrder,_Pack6
ENDM
MACRO
_ScriptOrder ; <16>
_PackCall #iuScriptOrder,_Pack6
ENDM
MACRO
_IULangOrder ; <1.1>
_PackCall #iuLangOrder,_Pack6
ENDM
MACRO
_LanguageOrder ; <16>
_PackCall #iuLangOrder,_Pack6
ENDM
MACRO
_IUTextOrder ; <1.1>
_PackCall #iuTextOrder,_Pack6
ENDM
MACRO
_TextOrder ; <16>
_PackCall #iuTextOrder,_Pack6
ENDM
MACRO
_IUGetItlTable ; <1.3>
_PackCall #iuGetItlTable,_Pack6
ENDM
MACRO
_GetIntlResourceTable ; <16>
_PackCall #iuGetItlTable,_Pack6
ENDM
;QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ
; Binary-Decimal Conversion
;QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ
MACRO
_StringToNum
_PackCall #stringToNum,_Pack7
ENDM
MACRO
_NumToString
_PackCall #numToString,_Pack7
ENDM
;---------------------------------------------------------------------------
;
; These are the definitions for the List Manager calls
; implemented as Pack0.
;
;---------------------------------------------------------------------------
lActivate EQU 0
lAddColumn EQU 4
lAddRow EQU 8
lAddToCell EQU 12
lAutoScroll EQU 16
lCellSize EQU 20
lClick EQU 24
lClrCell EQU 28
lDelColumn EQU 32
lDelRow EQU 36
lDispose EQU 40
lDoDraw EQU 44
lDraw EQU 48
lFind EQU 52
lGetCell EQU 56
lGetSelect EQU 60
lLastClick EQU 64
lNew EQU 68
lNextCell EQU 72
lRect EQU 76
lScroll EQU 80
lSearch EQU 84
lSetCell EQU 88
lSetSelect EQU 92
lSize EQU 96
lUpdate EQU 100
MACRO
_LActivate
_PackCall #lActivate,_Pack0
ENDM
MACRO
_LAddColumn
_PackCall #lAddColumn,_Pack0
ENDM
MACRO
_LAddRow
_PackCall #lAddRow,_Pack0
ENDM
MACRO
_LAddToCell
_PackCall #lAddToCell,_Pack0
ENDM
MACRO
_LAutoScroll
_PackCall #lAutoScroll,_Pack0
ENDM
MACRO
_LCellSize
_PackCall #lCellSize,_Pack0
ENDM
MACRO
_LClick
_PackCall #lClick,_Pack0
ENDM
MACRO
_LClrCell
_PackCall #lClrCell,_Pack0
ENDM
MACRO
_LDelColumn
_PackCall #lDelColumn,_Pack0
ENDM
MACRO
_LDelRow
_PackCall #lDelRow,_Pack0
ENDM
MACRO
_LDispose
_PackCall #lDispose,_Pack0
ENDM
MACRO
_LDoDraw
_PackCall #lDoDraw,_Pack0
ENDM
MACRO
_LDraw
_PackCall #lDraw,_Pack0
ENDM
MACRO
_LFind
_PackCall #lFind,_Pack0
ENDM
MACRO
_LGetCell
_PackCall #lGetCell,_Pack0
ENDM
MACRO
_LGetSelect
_PackCall #lGetSelect,_Pack0
ENDM
MACRO
_LLastClick
_PackCall #lLastClick,_Pack0
ENDM
MACRO
_LNew
_PackCall #lNew,_Pack0
ENDM
MACRO
_LNextCell
_PackCall #lNextCell,_Pack0
ENDM
MACRO
_LRect
_PackCall #lRect,_Pack0
ENDM
MACRO
_LScroll
_PackCall #lScroll,_Pack0
ENDM
MACRO
_LSearch
_PackCall #lSearch,_Pack0
ENDM
MACRO
_LSetCell
_PackCall #lSetCell,_Pack0
ENDM
MACRO
_LSetSelect
_PackCall #lSetSelect,_Pack0
ENDM
MACRO
_LSize
_PackCall #lSize,_Pack0
ENDM
MACRO
_LUpdate
_PackCall #lUpdate,_Pack0
ENDM
ENDIF ; ...already included