mac-rom/OS/HFS/Extensions/CatSrchPriv.a
Elliot Nunn 0ba83392d4 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-09-20 18:04:16 +08:00

115 lines
4.4 KiB
Plaintext

;
; File: CatSrchPriv.a
;
; Contains: Private equates for CatSearch
;
; Written by: Dave N. Feldman
;
; Copyright: © 1989-1991 by Apple Computer, Inc., all rights reserved.
;
; Change History (most recent first):
;
; <8> 9/13/91 JSM Cleanup header.
; <7> 2/25/91 dnf dho,#83584: Include the fsSBNegate bit in the search criteria
; that don't require ioSpec2 to be non-nil.
; <6> 10/30/90 dnf (with dba) Add timerFired bit to CSSR.flags
; <5> 8/28/90 dnf Rename ioSpecBits to ioSearchBits, turn debugging off
; <4> 6/2/90 dnf Add flag for type of current record
; <3> 2/26/90 dnf Add timerWasInstalled bit
; <2> 1/9/90 dnf Add inclNames bit to CSSR.flags
; <1.4> 8/26/89 dnf Add flags bit for buffer on stack
; <1.3> 7/31/89 dnf Cleaned up some comments
; <1.2> 7/6/89 dnf Changed param block to support read buffer.
; <1.1> 5/31/89 dnf Got rid of fsSBxxx equates. They've been moved to HFS70Equ.a
; <1.0> 5/30/89 dnf Integrate CatSearch, FileID's and Desktop Database Mgr into one
; ptch
;
;
; Debugging flag
;
CSDebug equ 0 ; set to 1 for debug labels
;
; These macros generate variable length symbol names for Macsbug. The first
; argument is the routine name, in quotes. 'Foo', for example. The second is an
; integer indicating the amount of constant data. This number is used by macsbug
; to figure out where the next routine starts.
;
macro
_CSDebug &routineName, &dataSize
if CSDebug then
dc.b $80 ; i.e variable length string, next byte has length
dc.b &len(&routineName)-2 ; length of string (-2 for the quotes around it)
dc.b &routineName ;
align 2
dc.w &dataSize ; size (bytes) of constant data
endif
endm
; same as above, but adds an rts for routines which don't end with one.
macro
_CSDebugRts &routineName, &dataSize
if CSDebug then
rts ; many DT routines don't end w/rts, so add one in.
dc.b $80 ; i.e variable length string, next byte has length
dc.b &len(&routineName)-2 ; length of string (-2 for the quotes around it)
dc.b &routineName ;
align 2
dc.w &dataSize ; size (bytes) of constant data
endif
endm
ioLockFlg equ 0 ; bit # of the locked bit in attributes
PBFilDist equ ioFlPyLen-filPyLen ; the distance between an offset for a value
; in a CInfoPBRec and that value on disk in
; a file record in the catalog.
maskPartialName equ 1<<fsSBPartialName ; ioSearchBits w/fsSBPartialName set
maskFullName equ 1<<fsSBFullName ; ioSearchBits w/fsSBFullName set
maskNegate equ 1<<fsSBNegate ; ioSearchBits w/fsSBNegate set <7>
maskNotSearchInfo2 equ ~(maskPartialName | maskFullName | maskNegate) ; <7>
; bits that don't require an ioSearchInfo2 record to be present
maskLengthBits equ ((1<<fsSBFlLgLen)|(1<<fsSBFlPyLen)|(1<<fsSBFlRLgLen)|(1<<fsSBFlRPyLen))
; ioSearchBits long w/1's in all of the length-oriented attribs
ioFileLocked equ 0 ; ioFlAttrib bit 0 is lock bit. (Where is this really defined?)
maskBadAttribs equ ~((1<<ioDirFlg) | (1<<ioFileLocked))
; ioFlAttrib byte w/1's in all of the illegal attributes
FlFndrInfoLen equ 16 ; # bytes in finder info
FlXFndrInfoLen equ 16 ; # bytes in Xfinder info
CSMinBufferSize equ 512 ; minimum number of bytes in a CatSearch buffer
; CatSearch state record
CSSR RECORD 0, Increment
csTimeTask ds.b tmQSize ; must be 1st in CSSR
PSRPtr ds.l 1 ; copy of pointer to PScan state record
copyTarg ds.b 32 ; space for UprString'ed copy of target cName
copyCur ds.b 32 ; space for UprString'ed copy of current cName
nextMBuf ds.l 1 ; pointer to next entry in MBuf
attribMask ds.b 1 ; copy of user's ioFlAttrib mask, so we can modify it
flags ds.b 1 ; stuff to keep track of (see below)
ALIGN 2
size equ *-CSSR
ENDR
; bit assignments for CSSR.flags
inclDirs equ 0 ; set if current search includes directories
inclFiles equ 1 ; set if current search includes files
inclNames equ 2 ; set if the current search uses any naming comparisons
bufferOnStack equ 3 ; set if the CatSearch buffer is on the stack <1.4>
timerWasInstalled equ 4 ; set if a timer task was installed with _InsTime
isFile equ 5 ; true in CheckCriteria if current record is a file
timerFired equ 6 ; set by the timer task
; Mbuf entry
MBR RECORD 0, Increment
ParId ds.l 1 ; Parent ID of the matched item
CName ds.b 32 ; Name (str31) of the matched item
size equ *-MBR
ENDR