home *** CD-ROM | disk | FTP | other *** search
Text File | 1988-05-14 | 38.8 KB | 1,580 lines |
- 11-May-88 21:23:16-MDT,41255;000000000000
- Return-Path: <u-lchoqu%sunset@cs.utah.edu>
- Received: from cs.utah.edu by SIMTEL20.ARPA with TCP; Wed, 11 May 88 21:22:14 MDT
- Received: by cs.utah.edu (5.54/utah-2.0-cs)
- id AA03329; Wed, 11 May 88 21:22:39 MDT
- Received: by sunset.utah.edu (5.54/utah-2.0-leaf)
- id AA29224; Wed, 11 May 88 21:22:33 MDT
- Date: Wed, 11 May 88 21:22:33 MDT
- From: u-lchoqu%sunset@cs.utah.edu (Lee Choquette)
- Message-Id: <8805120322.AA29224@sunset.utah.edu>
- To: rthum@simtel20.arpa
- Subject: DeskCheck.asm.shar
-
- #! /bin/sh
- #
- # This is a shell archive. Save this into a file, edit it
- # and delete all lines above this comment. Then give this
- # file to sh by executing the command "sh file". The files
- # will be extracted into the current directory owned by
- # you with default permissions.
- #
- # The files contained herein are:
- #
- # 22 DeskCheck.asm
- # 3 FCensus.asm
- # 7 DeskCheck.r
- # 5 Alerts
- #
- echo 'Extracting DeskCheck.asm'
- if test -f DeskCheck.asm; then echo 'shar: will not overwrite DeskCheck.asm'; else
- sed 's/^X//' << '________This_Is_The_END________' > DeskCheck.asm
- X
- XDebug equ 0 ; make non-zero for debugging
- X
- X String_Format 0 ; no string padding
- X
- X
- X; DeskCheck.asm: Find out whether everyone's bundle is legit.
- X; Ephraim Vishniac / P.O. Box 1357 / East Arlington, MA 02174
- X; This program is in the public domain.
- X
- X; Checks all resource files on a volume to ensure that their
- X; bundles are put together properly.
- X
- X;
- X
- X Include Traps.D
- X Include SysEquX.D
- X Include FSEqu.D
- X Include ToolEqu.D
- X Include SysErr.D
- X Include PackMacs.Txt
- X
- X; Our Macros
- X
- XMACRO DoAlert AlertNumber =
- X IF Debug
- X _Debugger
- X ENDIF
- X ; Alert (AlertNumber:INT, NIL:ProcPtr) : INT;
- X clr.w -(sp) ; space for result
- X move.w #{AlertNumber},-(sp) ; alert number
- X clr.l -(sp) ; NIL filter
- X _Alert
- X move.w (sp)+,d0 ; d0 = button hit
- X cmp.w #OKitem,d0 ; standard test
- X |
- X
- XMACRO DebugPoint =
- X IF Debug
- X _Debugger
- X ENDIF
- X |
- X
- XMACRO UseUs =
- X move.w OurMap(a5),CurMap ; make ours the current map
- X |
- X
- XMACRO UseThem =
- X move.w TheirMap(a5),CurMap ; make theirs the current map
- X |
- X
- XMACRO SetParamText =
- X move.l ParamZero(a5),-(sp) ; push our paramtext pointers
- X move.l ParamOne(a5),-(sp)
- X move.l ParamTwo(a5),-(sp)
- X move.l ParamThree(a5),-(sp)
- X _ParamText
- X |
- X
- Xmacro DNAME Name =
- X dc.b '{Name|0:8}'
- X .align 2
- X |
- X
- X
- X; Our alerts
- X
- XGreeting equ 128 ; say hello
- XFarewell equ 129 ; say goodbye
- XSetVolFailed equ 130 ; couldn't SetVol
- XOpenResFailed equ 131 ; couldn't OpenResFile
- XBundleBitClear equ 132 ; has bundles, but no bundle bit
- XNumberOfTypes equ 133 ; bundles has unusual number of types
- XNoSigResource equ 134 ; couldn't load signature resource
- XNovelType equ 135 ; neither ICN#, nor FREF
- XMissingBundle equ 136 ; bundle is too short
- XExcessBundle equ 137 ; bundle runs too long
- XFunnyIcon equ 138 ; ICN# isn't 256 bytes
- XSmallFREF equ 139 ; FREF is less than six bytes
- XBigFREF equ 140 ; FREF is more than 262 bytes
- XMissingResource equ 141 ; can't find some bundled resource
- XDoVolumeAlert equ 142 ; should we do this volume?
- XNoIcons equ 143 ; no ICN# list in bundle
- XNoFREFs equ 144 ; no FREF list in bundle
- XBadLocalID equ 145 ; local ID unresolved
- XOrphanType equ 146 ; no FREF with this file type
- XOrphanCreator equ 147 ; no BNDL with matching signature
- X
- X
- X; Our dialogs
- X
- XCurrentFile equ 150
- X
- X; Other miscellaneous equates
- X
- XOKitem equ 1 ; Item number for OK button
- XQuitItem equ 2 ; Item number for Quit button
- X
- X; Our globals
- X
- XOurMap ds.w 1 ; a word from our sponsor
- XTheirMap ds.w 1 ; equal time for the other guy
- XDialogPtr ds.l 1 ; current dialog
- XOtherBNDLs ds.w 1 ; 'background count' of BNDL resources
- XParamZero ds.l 1 ; our param zero text pointer
- XParamOne ds.l 1 ; our param one text pointer
- XParamTwo ds.l 1 ; our param two text pointer
- XParamThree ds.l 1 ; our param three text pointer
- XFileType ds.l 1 ; File Type of current file
- XFileCreator ds.l 1 ; File Creator of current file
- XTypeMatch ds.b 1 ; flag for file type matched
- XCreatorMatch ds.b 1 ; flag for file creator matched
- X
- X XDef FCensus
- X
- XDeskCheck
- X;------------------------------- Init Managers ----------------------------
- X
- X pea -4(A5) ; Quickdraw's global area
- X _InitGraf ; Init Quickdraw
- X _InitFonts ; Init Font Manager
- X move.l #$FFFF,D0 ; Flush all events
- X _FlushEvents
- X _InitWindows ; Init Window Manager
- X _InitMenus ; Init Menu Manager
- X _TEInit ; Init Text Edit
- X clr.l -(SP) ; No restart procedure
- X _InitDialogs ; Init Dialog Manager
- X _InitCursor ; Turn on arrow cursor
- X
- X;------------------------------- Init Globals -----------------------------
- X move.w CurMap,OurMap(a5) ; record our resource refnum
- X
- X ; we need to discount bundles in our file and the system
- X clr.w -(sp)
- X move.l #'BNDL',-(sp) ; How many bundles?
- X _CountResources
- X move.w (sp)+,OtherBNDLs(a5) ; save for later
- X
- X clr.l ParamZero(a5) ; clear our param text pointers
- X clr.l ParamOne(a5)
- X clr.l ParamTwo(a5)
- X clr.l ParamThree(a5)
- X
- X;-------------------------------Desk Check---------------------------------
- X; Just do a census of all files on all volumes, running them
- X; through our bundle checker.
- X
- X DoAlert Greeting ; say hello
- X bne SayByeBye ; if not OK, split
- X
- X DebugPoint
- X
- X jsr CheckAllVols ; else test all volumes
- X DoAlert FareWell ; say goodbye
- XSayByeBye
- X _ExitToShell
- X
- X
- X; CheckAllVols: Check each mounted volume
- X
- XCAVinfo equ -ioVQElSize ; a handy parm block
- XVolumeName equ CAVinfo-256 ; name of current volume
- XLastLocal set VolumeName
- X
- XCheckAllVols
- X link a6,#LastLocal
- X lea CAVinfo(a6),a0 ; a0 = parm block
- X clr.l ioCompletion(a0) ; no completion routine
- X lea VolumeName(a6),a1 ; storage for volume name
- X move.l a1,ioFileName(a0) ; set in parm block
- X clr.w ioVolIndex(a0) ; clear index
- X@0 lea CAVinfo(a6),a0 ; a0 = parm block
- X clr.l VolumeName(a6) ; no volname yet
- X add.w #1,ioVolIndex(a0) ; advance to next volume
- X _GetVolInfo
- X cmp.w #nsvErr,d0 ; out of volumes?
- X beq @1 ; exit if so
- X move.l ioFileName(a0),ParamZero(a5) ; set param text zero
- X SetParamText
- X DoAlert DoVolumeAlert ; should we do this one?
- X bne @0
- X lea CAVinfo(a6),a0 ; a0 = parm block
- X jsr CheckOneVol ; else check this volume
- X bra @0 ; and loop back
- X@1 clr.l ParamZero(a5)
- X unlk a6
- X rts
- X DName CHECKALLVOLS
- X
- X; CheckOneVol: Survey a single volume
- X; Entry: a0 = _GetVolInfo poop on the volume to check
- X
- XTheItemType set -2 ; Dialog item type
- XTheItem set TheItemType-4 ; Dialog item handle
- XTheBox set TheItem-8 ; Dialog item box
- XLastLocal set TheBox
- X
- XCheckOneVol
- X link a6,#LastLocal
- X move.w ioVRefNum(a0),-(sp) ; save volume reference number
- X move.l ioFileName(a0),-(sp) ; save volume name pointer
- X
- X clr.l -(sp) ; space for result
- X move.w #CurrentFile,-(sp) ; dialog number
- X clr.l -(sp) ; take what we get
- X move.l #-1,-(sp) ; put this window in front
- X _GetNewDialog ; Pop the question
- X move.l (sp),DialogPtr(a5) ; save the dialog pointer
- X _SetPort ; make ours the current port
- X move.l DialogPtr(a5),-(sp)
- X _DrawDialog ; force complete dialog drawing
- X
- X move.l DialogPtr(a5),-(sp)
- X move.w #4,-(sp) ; item number 4
- X pea TheItemType(a6) ; storage for item type
- X pea TheItem(a6) ; storage for item handle
- X pea TheBox(a6) ; storage for item box
- X _GetDItem
- X move.l (sp)+,a1 ; file name pointer
- X move.l TheItem(a6),-(sp) ; item handle
- X move.l a1,-(sp) ; point to file name
- X _SetIText ; set file name in dialog
- X
- X move.l #2,-(sp) ; root directory
- X pea CheckOneFile ; our file inspector
- X jsr FCensus ; scan everything
- X
- X move.l DialogPtr(a5),-(sp) ; push the dialog pointer
- X _DisposDialog ; and kill the dialog
- X
- X unlk a6
- X rts
- X DName CHECKONEVOL
- X
- X; CheckOneFile(ParamBlock:ParmBlkPtr; dirID:longint):boolean
- X; Do the actual tests on a given file.
- X; A6 offsets
- XOldA6 set 0
- XReturnAddr set OldA6+4
- XDirID set ReturnAddr+4 ; directory ID
- XFileInfo set DirID+4 ; param block from _GetFileInfo
- XReturnValue set FileInfo+4 ; return value (0 = continue)
- XArgsSz set ReturnValue-DirID
- X;
- XParmBlk set OldA6-ioHVQElSize ; local parm block
- XErrString set ParmBlk-32 ; Str31 for error codes
- XTheItemType set ErrString-2 ; Dialog item type
- XTheItem set TheItemType-4 ; Dialog item handle
- XTheBox set TheItem-8 ; Dialog item box
- XLastLocal set TheBox
- X
- XCheckOneFile
- X link a6,#LastLocal
- X clr.w ReturnValue(a6) ; always continue search
- X
- X move.l DialogPtr(a5),-(sp)
- X move.w #2,-(sp) ; item number 2
- X pea TheItemType(a6) ; storage for item type
- X pea TheItem(a6) ; storage for item handle
- X pea TheBox(a6) ; storage for item box
- X _GetDItem
- X move.l TheItem(a6),-(sp) ; item handle
- X move.l FileInfo(a6),a1 ; point to GetFileInfo stuff
- X move.l ioFileName(a1),-(sp) ; point to file name
- X _SetIText ; set file name in dialog
- X
- X ; is there a resource fork?
- X move.l FileInfo(a6),a1 ; point to _GetFileInfo stuff
- X tst.l ioFlRLgLen(a1) ; is there a resource fork?
- X beq @9 ; skip if not
- X
- X lea ParmBlk(a6),a0 ; point to parm block
- X clr.l ioCompletion(a0)
- X clr.l ioFileName(a0)
- X move.w ioVRefNum(a1),ioVRefNum(a0) ; volume from file info
- X move.l DirID(a6),ioWDDirID(a0) ; directory ID from file info
- X tst FSFCBLen ; HFS running?
- X bmi @0 ; branch if not
- X _HSetVol ; HFS, set volume and directory
- X bra @1
- X@0 _SetVol ; MFS, just set volume
- X@1 move.w ioResult(a0),d0 ; did it work?
- X beq @2 ; skip if vol ok
- X
- X ext.l d0
- X lea ErrString(a6),a0
- X move.l a0,ParamZero(a5) ; move to param text ptrs
- X _NumToString
- X SetParamText
- X DoAlert SetVolFailed
- X bra @9
- X
- X@2 move.l FileInfo(a6),a1 ; point to _GetFileInfo stuff
- X clr.w -(sp) ; for _OpenResFile result
- X move.l ioFileName(a1),-(sp) ; push given file name
- X move.b #0,ResLoad ; don't load resources
- X _OpenResFile ; give it a shot
- X move.b #-1,ResLoad ; do load resources
- X move.w (sp)+,d0 ; pop reference number
- X bpl @3 ; skip if reasonable number
- X
- X move.w ResErr,d0 ; get the error code
- X ext.l d0
- X lea ErrString(a6),a0
- X move.l a0,ParamZero(a5) ; move to param text ptrs
- X _NumToString
- X SetParamText
- X UseUs ; do we need this?
- X DoAlert OpenResFailed
- X bra @9
- X
- X ; While the other file is open, we have to bracket our
- X ; alerts and stuff with 'UseUs' - 'UseThem'
- X
- X@3 cmp.w SysMap,d0 ; did we just open the system?
- X beq @9 ; skip ahead if so
- X cmp.w OurMap(a5),d0 ; is it us?
- X beq @9 ; skip ahead if so
- X move.w d0,TheirMap(a5) ; refnum of file under test
- X
- X ; Here's where we actually examine the file contents...
- X
- X ; Does this bozo have a bundle?
- X clr.w -(sp)
- X move.l #'BNDL',-(sp) ; How many bundles?
- X _CountResources
- X move.w (sp)+,d3 ; well?
- X cmp.w OtherBNDLs(a5),d3 ; discount other bundles
- X beq @5 ; skip if no more, close it up
- X
- X move.l FileInfo(a6),a1 ; point to _GetFileInfo stuff
- X move.l ioFlUsrWds+fdType(a1),FileType(a5) ; save file type
- X move.l ioFlUsrWds+fdCreator(a1),FileCreator(a5) ; ditto creator
- X clr.b TypeMatch(a5) ; no matches yet
- X clr.b CreatorMatch(a5)
- X
- X move.w ioFlUsrWds+fdFlags(a1),d0 ; d0 = file flags
- X btst #fHasBundle,d0 ; test bundle bit
- X bne @4 ; skip if set, that makes sense
- X
- X move.w D3,D0
- X sub.w OtherBNDLs(a5),D0
- X ext.l d0
- X lea ErrString(a6),a0
- X move.l a0,ParamZero(a5) ; move to param text ptrs
- X _NumToString
- X SetParamText
- X UseUs
- X DoAlert BundleBitClear
- X UseThem
- X
- X@4 move.w D3,D0 ; retrieve number of bundles
- X jsr TestBundles ; else go test the bundles
- X tst.b TypeMatch(a5) ; found FREF with our Type?
- X bne @6 ; skip if so
- X
- X lea ErrString+1(a6),a0 ; fudge alignment of string
- X move.l a0,ParamZero(a5) ; it's param text zero
- X move.b #4,(a0)+ ; set string length
- X move.l FileType(a5),(a0) ; and string contents
- X SetParamText
- X UseUs
- X DoAlert OrphanType
- X UseThem
- X@6 tst.b CreatorMatch(a5) ; found BNDL with our Creator?
- X bne @5 ; skip if so
- X
- X lea ErrString+1(a6),a0 ; fudge alignment of string
- X move.l a0,ParamZero(a5) ; it's param text zero
- X move.b #4,(a0)+ ; set string length
- X move.l FileCreator(a5),(a0) ; and string contents
- X SetParamText
- X UseUs
- X DoAlert OrphanCreator
- X UseThem
- X
- X ; Here's where we close up the file
- X@5 move.w TheirMap(a5),-(sp) ; retrieve test file refnum
- X _CloseResFile ; and close it up
- X
- X move.w CurMap,d0 ; check the current map
- X cmp.w OurMap(a5),d0 ; is it us?
- X beq @9 ; skip if so, we're good
- X DebugPoint
- X
- X ; so much for this file. Restore default volume
- X@9 UseUs ; in case we opened the System...
- X clr.l ParamZero(a5) ; the string storage is gone
- X unlk a6
- X move.l (sp)+,a0 ; a0 = return address
- X lea ArgsSz(sp),sp ; pop arguments
- X jmp (a0) ; return
- X DName CHECKONEFILE
- X
- X; TestBundles: Test all the bundles of the current resource file
- X; d0 = number of BNDL available
- X; We only need to check ones native to the top map [TheirMap(a5)]
- X
- XOldA6 set 0
- XReturnAddr set OldA6+4
- X
- XResIndex set OldA6-2 ; current resource index
- XBNDLHandle set ResIndex-4 ; handle to current bundle
- XLastLocal set BNDLHandle
- X
- X
- XTestBundles
- X link a6,#LastLocal
- X move.w d0,ResIndex(a6) ; resources to check
- X
- X@0 clr.l -(sp)
- X move.l #'BNDL',-(sp) ; resource type
- X move.w ResIndex(a6),-(sp) ; resource index
- X _GetIndResource ; get the bundle
- X move.l (sp)+,BNDLHandle(a6) ; save handle
- X
- X ; is it one that we want?
- X clr.w -(sp)
- X move.l BNDLHandle(a6),-(sp) ; current bundle
- X _HomeResFile
- X move.w (sp)+,d0
- X cmp.w TheirMap(a5),d0 ; is it theirs?
- X bne @1 ; skip if not
- X
- X move.l BNDLHandle(a6),a0 ; get the bundle handle
- X _HNoPurge ; make it unpurgeable
- X move.l BNDLHandle(a6),a0 ; get the bundle handle
- X _HLock ; lock it down
- X
- X move.l BNDLHandle(a6),a0 ; get the bundle handle
- X jsr TestOneBundle ; and check it out
- X
- X@1 sub.w #1,ResIndex(a6) ; decrement resource index
- X bne @0 ; and try again
- X
- X unlk a6
- X rts
- X DName TESTBUNDLES
- X
- X; TestOneBundle: Examine one BNDL for validity, sanity, etc.
- X; a0 = handle to the bundle
- X
- XOldA6 set 0
- XReturnAddr set OldA6+4
- X
- XBNDLHandle set OldA6-4 ; handle to current bundle
- XBundleIDStr set BNDLHandle-32 ; Str31 for resource ID
- XBundleSize set BundleIDStr-4 ; size of bundle
- XBundleID set BundleSize-2 ; bundle's resource ID
- XBundleType set BundleID-4 ; bundle's resource type
- XBundleName set BundleType-256 ; bundle's resource name
- XOtherString set BundleName-32 ; for other stuff
- XICNlist set OtherString-4 ; pointer to ICN# list
- XFREFlist set ICNlist-4 ; pointer to FREF list
- XLastLocal set FREFlist
- X
- XTestOneBundle
- X link a6,#LastLocal
- X movem.l d2-d5/a2-a4,-(sp) ; save some registers
- X clr.l ICNlist(a6) ; clear list pointers
- X clr.l FREFlist(a6)
- X
- X move.l a0,BNDLHandle(a6) ; store bundle handle for later
- X move.l (a0),a4 ; a4 = bundle pointer
- X
- X move.l a0,-(sp) ; push handle
- X pea BundleID(a6) ; pointer to resource ID var
- X pea BundleType(a6) ; pointer to resource type var
- X pea BundleName(a6) ; pointer to resource name var
- X _GetResInfo
- X
- X lea BundleIDStr(a6),a0 ; string for bundle's res ID
- X move.l a0,ParamZero(a5) ; save for use in ParamText
- X move.w BundleID(a6),d0 ; get the resource ID
- X ext.l d0
- X _NumToString
- X SetParamText
- X
- X ; Examine the bundle for size-wise sanity
- X clr.l -(sp)
- X move.l BNDLHandle(a6),-(sp)
- X _SizeRsrc ; how big is it?
- X move.l (sp)+,D4 ; save for later
- X move.l D4,BundleSize(a6) ; might need original figure...
- X sub.w #8,D4 ; at least minimum length?
- X bmi @5 ; branch if not
- X move.l (a4),D0 ; D0 = signature type
- X move.w 4(a4),d1 ; D1 = signature ID
- X jsr TestSignature ; check it out!
- X
- X move.w 6(a4),d3 ; D3 = # types - 1
- X cmp.w #1,D3 ; usual number?
- X beq @0 ; skip if so
- X move.w d3,d0
- X add.w #1,d0 ; actual number of types
- X lea OtherString(a6),a0 ; other string
- X move.l a0,ParamOne(a5)
- X ext.l d0
- X _NumToString
- X SetParamText
- X UseUs
- X DoAlert NumberOfTypes
- X UseThem
- X@0 lea 8(a4),a4 ; a4 = header of first resource list
- X
- X@1 sub.w #6,D4 ; length of list header
- X bmi @5 ; skip out if too short
- X cmpi.l #'ICN#',(a4) ; icons?
- X bne @6 ; skip if not, try something else
- X move.l a4,ICNlist(a6) ; save ICN# list pointer
- X bra @2 ; and go check the list
- X@6 cmpi.l #'FREF',(a4) ; file references?
- X bne @7 ; skip if not, it's something weird
- X move.l a4,FREFlist(a6) ; save FREF list pointer
- X bra @2 ; and go check the list
- X@7 lea OtherString(a6),a0 ; point to other string
- X move.w #4,(a0)
- X move.l (a4),2(a0) ; fill in resource type
- X lea 1(a0),a0 ; use odd-aligned string
- X move.l a0,ParamOne(a5)
- X SetParamText
- X UseUs
- X DoAlert NovelType
- X UseThem
- X@2 move.w 4(a4),d2 ; resources - 1 of this type
- X lea 6(a4),a3 ; a3 = start of resource list
- X@3 sub.w #4,d4 ; size of list item
- X bmi @5 ; skip out if too short
- X move.l (a4),D0 ; resource type
- X move.w 2(a3),D1 ; resource ID
- X jsr TestOneResource ; test it!
- X lea 4(a3),a3 ; next item in list
- X dbra d2,@3 ; collect them all
- X move.l a3,a4 ; next list
- X dbra d3,@1 ; collect all of those, too
- X tst.w d4 ; All used up?
- X beq @4 ; skip if so, that's just right
- X ; The bundle runs on longer than expected
- X UseUs
- X DoAlert ExcessBundle
- X UseThem
- X@4 move.l ICNlist(a6),a0 ; pick up ICN# and FREF pointers
- X move.l FREFlist(a6),a1
- X jsr TestLocalIDs
- X
- X clr.l ParamZero(a5)
- X clr.l ParamOne(a5)
- X movem.l (sp)+,d2-d5/a2-a4 ; restore some registers
- X unlk a6
- X rts
- X DName TESTONEBUNDLE
- X
- X@5 UseUs
- X DoAlert MissingBundle
- X UseThem
- X bra @4
- X
- X
- X; TestSignature: Does the 'signature' resource exist?
- X; D0 = resource type
- X; D1.w = resource ID
- X
- XOldA6 set 0
- XReturnAddr set OldA6+4
- X
- XSigType set OldA6-4 ; type of signature resource
- XTypeStr set SigType-1 ; for type string
- XFillerOne set TypeStr-1 ; restore alignment
- XSigID set FillerOne-2 ; resource ID for signature
- XIDString set SigID-32 ; Str31 for resource ID
- X
- XLastLocal set IDString
- X
- XTestSignature
- X link a6,#LastLocal
- X move.l d0,SigType(a6) ; save signature's resource type
- X move.w d1,SigID(a6) ; save resource ID
- X cmp.l FileCreator(a5),d0 ; FREF matches creator?
- X seq d0
- X or.b d0,CreatorMatch(a5) ; set match flag if so
- X
- X clr.l -(sp)
- X move.l SigType(a6),-(sp) ; resource type
- X move.w SigID(a6),-(sp) ; resource ID
- X _GetResource ; Fetch!
- X move.l (sp)+,d0 ; pop the handle
- X beq @2 ; problem if NIL
- X tst.w ResErr ; something wrong?
- X bne @2 ; skip if so
- X clr.w -(sp) ; check home file of resource
- X move.l d0,-(sp)
- X _HomeResFile
- X move.w (sp)+,d0 ; pop res file reference
- X cmp.w TheirMap(a5),d0 ; right file?
- X beq @0 ; branch if so, it's good
- X
- X@2 move.b #4,TypeStr(a6) ; set resource type string
- X lea TypeStr(a6),a0
- X move.l a0,ParamOne(a5)
- X SetParamText
- X
- X move.w SigID(a6),d0 ; d0 = signature's res ID
- X ext.l d0
- X lea IDString(a6),a0
- X move.l a0,ParamTwo(a5)
- X _NumToString
- X SetParamText
- X
- X UseUs
- X DoAlert NoSigResource
- X UseThem
- X
- X@0 clr.l ParamOne(a5)
- X clr.l ParamTwo(a5)
- X unlk a6
- X rts
- X DName TESTSIGNATURE
- X
- X; TestOneResource: Do a sanity check on one resource.
- X; For all kinds, be sure it exists.
- X; For ICN# and FREF, do some other stuff
- X; D0 = resource type
- X; D1.W = resource ID
- X
- XOldA6 set 0
- XReturnAddr set OldA6+4
- X
- XResHandle set OldA6-4 ; handle to current resource
- XResType set ResHandle-4 ; resource type
- XResTypeStr set ResType-1 ; for using above as string
- XFillerOne set ResTypeStr-1 ; restore alignment
- XResID set FillerOne-2 ; resource ID
- XResIDStr set ResID-32 ; Str31 for resource ID
- XResSize set ResIDStr-4 ; size of resource
- XSizeString set ResSize-32 ; Str31 for resource size
- XLastLocal set SizeString
- X
- XTestOneResource
- X link a6,#LastLocal
- X movem.l d2-d5/a2-a4,-(sp) ; save some registers
- X
- X move.l d0,ResType(a6)
- X move.w d1,ResID(a6)
- X
- X move.b #4,ResTypeStr(a6) ; build type string
- X lea ResTypeStr(a6),a0
- X move.l a0,ParamOne(a5) ; set indirect pointer
- X
- X move.w ResID(a6),d0 ; resource ID
- X lea ResIDStr(a6),a0 ; ID string
- X move.l a0,ParamTwo(a5)
- X ext.l d0
- X _NumToString
- X SetParamText
- X
- X clr.l -(sp)
- X move.l ResType(a6),-(sp) ; resource type
- X move.w ResID(a6),-(sp) ; resource ID
- X _GetResource ; Fetch!
- X move.l (sp)+,ResHandle(a6) ; save the handle
- X tst.l ResHandle(a6) ; NIL handle?
- X beq @4 ; error if so, resource is missing
- X tst.w ResErr ; something wrong?
- X bne @4 ; skip if so
- X clr.w -(sp) ; else check home resource file
- X move.l ResHandle(a6),-(sp)
- X _HomeResFile
- X move.w (sp)+,d0 ; pop res file ref
- X cmp.w TheirMap(a5),d0 ; right file?
- X beq @0 ; branch if so, we'll take it
- X
- X@4 UseUs
- X DoAlert MissingResource
- X UseThem
- X bra @9
- X@0 clr.l -(sp)
- X move.l ResHandle(a6),-(sp)
- X _SizeRsrc ; How big is this sucker?
- X move.l (sp)+,ResSize(a6) ; save for later testing
- X
- X move.l ResSize(a6),d0 ; set up length string
- X lea SizeString(a6),a0
- X move.l a0,ParamThree(a5)
- X _NumToString
- X SetParamText
- X
- X move.l ResType(a6),d0 ; d0 = resource type
- X cmpi.l #'ICN#',d0 ; Icon list?
- X bne @2 ; skip if not
- X
- X move.l ResSize(a6),d0 ; check resource size
- X cmp.l #256,d0 ; must be 256 bytes
- X beq @9 ; exit if so, it's good
- X UseUs
- X DoAlert FunnyIcon
- X UseThem
- X bra @9
- X@2 cmpi.l #'FREF',d0 ; FREF?
- X bne @9 ; exit if not, we don't care
- X move.l ResSize(a6),d0 ; check resource size
- X cmpi.l #6,d0 ; reasonable size?
- X bcc @3 ; branch if minimum or more
- X UseUs
- X DoAlert SmallFREF ; the FREF is too small
- X UseThem
- X bra @9
- X@3 cmpi.l #263,d0 ; not too big?
- X bcs @9 ; branch if in bounds
- X UseUs
- X DoAlert BigFREF
- X UseThem
- X
- X@9 clr.l ParamOne(a5)
- X clr.l ParamTwo(a5)
- X clr.l ParamThree(a5)
- X movem.l (sp)+,d2-d5/a2-a4 ; restore some registers
- X unlk a6
- X rts
- X DName TESTONERESOURCE
- X
- X; TestLocalIDs: See if the local IDs referred to by the FREFs are
- X; resolved in the ICN# list.
- X; a0 = ptr to ICN# list from bundle
- X; a1 = ptr to FREF list from bundle
- X
- XFREFIDStr set -32 ; Str31 for FREF ID #
- XLocalIDStr set FREFIDStr-32 ; Str31 for local ID #
- XFREFHandle set LocalIDStr-4 ; handle of current FREF
- XLastLocal set FREFHandle
- X
- XTestLocalIDs
- X link a6,#LastLocal ; some local storage
- X movem.l a2-a4/d2-d4,-(sp) ; save some regs
- X
- X move.l a0,d0 ; is there an ICN# list?
- X bne @0 ; skip if so
- X UseUs
- X DoAlert NoIcons
- X UseThem
- X bra @9
- X@0 move.l a1,d0 ; is there an FREF list?
- X bne @1 ; skip if so
- X UseUs
- X DoAlert NoFREFs
- X UseThem
- X bra @9
- X@1 move.l a0,a4 ; a4 = ICN# list pointer
- X move.w 4(a1),d4 ; d4 = # FREFs - 1
- X lea 6(a1),a3 ; a3 = first FREF item
- X@2 clr.l -(sp)
- X move.l #'FREF',-(sp)
- X move.w 2(a3),-(sp)
- X _GetResource ; get the FREF
- X move.l (sp)+,d0 ; pop the handle
- X beq @5 ; skip if NIL handle
- X tst.w ResErr
- X bne @5 ; skip if resource error
- X move.l d0,FREFHandle(a6) ; save FREF handle
- X clr.w -(sp) ; check home res file
- X move.l d0,-(sp)
- X _HomeResFile
- X move.w (sp)+,d0 ; pop home res file
- X cmp.w TheirMap(a5),d0 ; from a good home?
- X bne @5 ; exit if not
- X
- X move.l FREFHandle(a6),a0 ; a0 = FREF handle
- X move.l (a0),a0 ; a0 = FREF pointer
- X
- X move.l (a0),d0 ; d0 = file type from FREF
- X cmp.l FileType(a5),d0 ; match our file type?
- X seq d0
- X or.b d0,TypeMatch(a5) ; set type match flag if so
- X
- X move.w 4(a0),d0 ; d0 = local ID from FREF
- X move.w 4(a4),d3 ; d3 = # ICN#s - 1
- X lea 6(a4),a2 ; a2 = first ICN# item
- X@3 cmp.w (a2),d0 ; local IDs match?
- X beq @5 ; skip if so, test next FREF
- X lea 4(a2),a2 ; else move to next ICN# item
- X dbra d3,@3 ; search through ICN# list
- X
- X ; If we fall out, we have an unsatisfied local ID in d0
- X
- X ext.l d0
- X lea LocalIDStr(a6),a0 ; string for local resource ID
- X move.l a0,ParamTwo(a5)
- X _NumToString
- X move.w 2(a3),d0 ; FREF resource ID
- X ext.l d0
- X lea FREFIDStr(a6),a0 ; string for FREF resource ID
- X move.l a0,ParamOne(a5)
- X _NumToString
- X SetParamText
- X UseUs
- X DoAlert BadLocalID
- X UseThem
- X clr.l ParamOne(a5)
- X clr.l ParamTwo(a5)
- X@5 lea 4(a3),a3 ; next FREF item in list
- X dbra d4,@2 ; test entire FREF list
- X@9 movem.l (sp)+,a2-a4/d2-d4 ; restore registers
- X unlk a6
- X rts
- X DName TESTLOCALIDS
- X
- ________This_Is_The_END________
- if test `wc -l < DeskCheck.asm` -ne 806; then
- echo 'shar: DeskCheck.asm was damaged during transit'
- echo ' (should have been 806 bytes)'
- fi
- fi ; : end of overwriting check
- echo 'Extracting FCensus.asm'
- if test -f FCensus.asm; then echo 'shar: will not overwrite FCensus.asm'; else
- sed 's/^X//' << '________This_Is_The_END________' > FCensus.asm
- X
- X; FCensus: HFS/MSF file census routine from Feb '86 MacTutor
- X; Provides info on each file on a volume, whether MFS or HFS.
- X
- X; Proc FCensus(vRefNum:integer; DirID:longint; Inspector:ProcPtr);
- X
- X; vRefNum: volume reference number (or drive number) of volume
- X
- X; dirID: ID of directory to start. Root dir = 2.
- X
- X; Inspector: user-supplied function
- X; MyInspector(ParamBlock:ParmBlkPtr; dirID:longint):boolean
- X; ParamBlock is a GetFileInfo block
- X; dirID is the ID of the file's directory
- X; If returned value = True, search ends.
- X; If returned value = False, search continues.
- X
- X Include Traps.D
- X Include SysEquX.D
- X Include FSEqu.D
- X Include SysErr.D
- X
- X .MACRO _TFSCORE
- X IF '%1' <> ''
- X LEA %1,A0
- X ENDIF
- X IF '%3' = ''
- X DC.W $A200+%2
- X ENDIF
- X IF '%3' = 'REGS'
- X DC.W $A300+%2
- X ENDIF
- X IF '%3' = 'ASYNC'
- X DC.W $A600+%2
- X ENDIF
- X IF '%3' = 'SYS'
- X DC.W $A600+%2
- X ENDIF
- X IF '%3' = 'IMMED'
- X DC.W $A200+%2
- X ENDIF
- X .ENDM
- X
- X
- X .MACRO _GetCatInfo
- X MOVEQ #9,D0
- X _TFSCore %1,96,%2
- X .ENDM
- X
- X
- X; A6 offsets
- XOldA6 set 0
- XReturnAddr set OldA6+4
- XInspec set ReturnAddr+4
- XDirID set Inspec+4
- XvRefNum set DirID+4
- XArgsSz set vRefNum+2-Inspec
- X;
- XParmBlk set OldA6-ioHVQElSize ; local parm block
- XNameStr set ParmBlk-256 ; Str255 buffer
- XIndex set NameStr-2 ; directory index
- X
- X XRef FCensus
- X
- XFCensus
- X Link a6,#Index
- X clr.l -(sp) ; sentinel for end of DirID list
- XNextDir
- X clr Index(a6) ; init index = 0
- XNextFile
- X lea ParmBlk(a6),a0 ; a0 = parm block pointer
- X clr.l ioCompletion(a0)
- X clr.l ioFileName(a0)
- X move vRefNum(a6),ioVRefNum(a0) ; set volume
- X move.l dirID(a6),ioDirID(a0) ; set directory ID
- X lea NameStr(a6),a1 ; a1 = name string buffer pointer
- X move.l a1,ioFileName(a0) ; set file name pointer
- X addq #1,Index(a6) ; advance index
- X move Index(a6),ioFDirIndex(a0) ; set index
- X tst FSFCBLen ; HFS running?
- X bmi.s @0 ; branch if not
- X _GetCatInfo
- X bra.s @1
- X@0 _GetFileInfo ; MFS, get partial story
- X@1 beq.s NodeKind ; no error, check things out
- X cmp #fnfErr,d0 ; end of directory?
- X bne.s FCExit ; no, unexpected problem
- X move.l (sp)+,dirID(a6) ; pop next directory off stack
- X bne.s NextDir ; branch if there is one
- X bra.s FCExit ; branch if there isn't one
- XNodeKind
- X btst #ioDirFlg,ioFlAttrib(a0) ; directory?
- X beq.s CallInspec ; a file, call Inspector
- X move.l ioDirID(a0),-(sp) ; directory, push on stack
- X bra.s NextFile ; look for next file
- XCallInspec
- X clr -(sp) ; for returned value
- X pea ParmBlk(a6) ; param block for inspector
- X move.l dirID(a6),-(sp) ; pass dirID
- X move.l Inspec(a6),a0 ; address of user function
- X jsr (a0) ; call inspector
- X tst.b (sp)+ ; time to quit?
- X beq.s NextFile ; no, keep going
- XFCExit
- X unlk a6
- X move.l (sp)+,a0 ; a0 = return address
- X lea ArgsSz(sp),sp ; pop arguments
- X jmp (a0) ; return
- X dc.b 'FCensus'
- X .align 2
- ________This_Is_The_END________
- if test `wc -l < FCensus.asm` -ne 110; then
- echo 'shar: FCensus.asm was damaged during transit'
- echo ' (should have been 110 bytes)'
- fi
- fi ; : end of overwriting check
- echo 'Extracting DeskCheck.r'
- if test -f DeskCheck.r; then echo 'shar: will not overwrite DeskCheck.r'; else
- sed 's/^X//' << '________This_Is_The_END________' > DeskCheck.r
- XDeskCheck.rsrc
- X\00\00\00\00\00\00\00\00
- X
- X* Decompiled 5/11/88 by Lee Choquette using Dismantle 0.4
- X
- X* -------------------- NewType:PICT
- XTYPE PICT=GNRL
- X
- X
- X,129 (32)
- X.H
- X0120005A 00450088 01621101 A00082A1 00960006 05000000 0200A100 9A000800
- X08000000 888000A0 00980100 0A000000 0002D002 40030003 0D00092B 4B693954
- X68697320 70726F67 72616D20 69732069 6E207468 65207075 626C6963 20646F6D
- X61696E2E 20205365 6E642064 69736B65 74746520 616E6420 A00099A1 009A0008
- XFFFC0000 00888000 A000982A 0C3B7365 6C662D61 64647265 73736564 2C207374
- X616D7065 6420656E 76656C6F 70652066 6F722063 6F6D706C 65746520 736F7572
- X63652063 6F64652E 0DA00099 A1009A00 08FFF000 00008880 00A00098 2A0C3745
- X2E4D2E56 6973686E 69616320 2F20502E 4F2E2042 6F782031 33353720 2F204561
- X73742041 726C696E 67746F6E 2C204D41 20303231 3734A000 99A00097 A00083FF
- X
- X
- X,128 (32)
- X.H
- X027B0032 004300AC 014A1101 A00082A1 00960006 05000000 0200A100 9A000800
- X2E000000 7D8000A0 00980100 0A000000 0002D002 40030003 0D00092B 49413544
- X65736B43 6865636B 20657861 6D696E65 73207468 65206669 6C657320 6F6E2061
- X6C6C206D 6F756E74 65642076 6F6C756D 65732C20 A00099A1 009A0008 00220000
- X007D8000 A000982A 0C386C6F 6F6B696E 6720666F 72206465 66656374 69766520
- X62756E64 6C65732E 20204261 64206275 6E646C65 7320636F 6E74616D 696E6174
- X6520A000 99A1009A 00080016 0000007D 8000A000 982A0C35 796F7572 20446573
- X6B746F70 2066696C 652C2063 61757369 6E672070 726F626C 656D7320 666F7220
- X74686520 46696E64 65722E20 20A00099 A1009A00 08000A00 00007D80 00A00098
- X2A0C3646 696E6465 7220352E 33206973 20666169 726C7920 676F6F64 20617420
- X72657369 7374696E 67207375 63682070 726F626C 656D732C 20A00099 A1009A00
- X08FFFE00 00007D80 00A00098 2A0C3762 75742065 61726C69 65722046 696E6465
- X72732C20 65737065 6369616C 6C792046 696E6465 7220342E 312C2061 72652065
- X6173696C 7920A000 99A1009A 0008FFF2 0000007D 8000A000 982A0C0A 636F6E66
- X75736564 2E0DA000 99A1009A 0008FFE6 0000007D 8000A000 982A0C01 0DA00099
- XA1009A00 08FFDA00 00007D80 00A00098 2A0C3344 65736B43 6865636B 206D616B
- X6573206E 6F206174 74656D70 7420746F 20726570 61697220 616E7920 70726F62
- X6C656D73 2E0DA000 99A1009A 0008FFCE 0000007D 8000A000 982A0C35 49742073
- X696D706C 79206164 76697365 7320796F 75206F66 20616E79 20737472 616E6765
- X20746869 6E677320 69742066 696E6473 2EA00099 A00097A0 0083FF
- X
- X
- X* -------------------- NewType:DLOG
- XTYPE DLOG=GNRL
- X
- X
- X,150
- Xx
- X32 80 90 432
- Xvisible GoAway
- X1
- X0
- X150
- X
- X
- X* -------------------- NewType:DITL
- XTYPE DITL=GNRL
- X
- X
- X,128
- X6
- X
- XButton
- X219 20 239 88
- XOK
- X
- XButton
- X219 228 239 296
- XQuit
- X
- XStaticText disabled
- X11 72 34 237
- XWelcome to DeskCheck!
- X
- XStaticText disabled
- X219 100 239 220
- XJanuary 29, 1987
- X
- XpicItem disabled
- X38 15 160 278
- X128
- X
- XpicItem disabled
- X159 13 205 298
- X129
- X
- X
- X
- X,130
- X2
- X
- XButton
- X144 88 164 148
- XOK
- X
- XStaticText disabled
- X48 41 113 213
- XSetVol Failed!\0D++
- X\0D++
- XError code = ^0.
- X
- X
- X
- X,129
- X2
- X
- XButton
- X144 83 164 159
- XBye-bye!
- X
- XStaticText disabled
- X56 88 80 151
- XAll done.
- X
- X
- X
- X,131
- X2
- X
- XButton
- X144 88 164 148
- XOK
- X
- XStaticText disabled
- X56 41 115 200
- XOpenResFile failed!\0D++
- X\0D++
- XError code = ^0.
- X
- X
- X
- X,150
- X4
- X
- XStaticText disabled
- X25 3 45 33
- XFile:
- X
- XStaticText disabled
- X25 35 45 347
- X
- X
- XStaticText disabled
- X4 3 24 58
- XVolume:
- X
- XStaticText disabled
- X4 57 24 345
- X
- X
- X
- X
- X,132
- X2
- X
- XButton
- X153 90 173 150
- XOK
- X
- XStaticText disabled
- X45 6 131 234
- XThis file has one or more BNDLs, but the bundle bit is not set.\0D++
- X\0D++
- XNumber of BNDL resources = ^0.
- X
- X
- X
- X,133
- X2
- X
- XButton
- X147 91 167 151
- XOK
- X
- XStaticText disabled
- X48 13 116 231
- XBNDL ^0 has ^1 resource types instead of the expected 2.
- X
- X
- X
- X,134
- X2
- X
- XButton
- X146 91 166 151
- XOK
- X
- XStaticText disabled
- X41 32 125 219
- XThe signature resource listed in BNDL ^0, ^1 ^2, is missing.
- X
- X
- X
- X,135
- X2
- X
- XButton
- X151 93 171 153
- XOK
- X
- XStaticText disabled
- X38 14 112 230
- XBNDL ^0 refers to resource type '^1'. The usual types are 'FREF' and 'ICN#'.
- X
- X
- X
- X,136
- X2
- X
- XButton
- X150 92 170 152
- XOK
- X
- XStaticText disabled
- X68 20 117 215
- XBNDL ^0 is too short!
- X
- X
- X
- X,137
- X2
- X
- XButton
- X147 91 167 151
- XOK
- X
- XStaticText disabled
- X65 29 107 212
- XBNDL ^0 is longer than expected.
- X
- X
- X
- X,138
- X2
- X
- XButton
- X144 91 164 151
- XOK
- X
- XStaticText disabled
- X64 20 97 232
- XICN# ^2 is ^3 bytes instead of the usual 256.
- X
- X
- X
- X,139
- X2
- X
- XButton
- X142 91 162 151
- XOK
- X
- XStaticText disabled
- X43 23 118 221
- XFREF ^2 is only ^3 bytes, which is less than the minimum FREF size of six.
- X
- X
- X
- X,140
- X2
- X
- XButton
- X147 91 167 151
- XOK
- X
- XStaticText disabled
- X45 12 119 228
- XFREF ^2 is ^3 bytes long, which exceeds the maximum FREF size of 262.
- X
- X
- X
- X,141
- X2
- X
- XButton
- X154 92 174 152
- XOK
- X
- XStaticText disabled
- X59 13 126 228
- XBNDL ^0 refers to resource ^1 ^2, which is missing.
- X
- X
- X
- X,142
- X3
- X
- XButton
- X150 25 170 85
- XDo it!
- X
- XButton
- X150 152 170 212
- XDon't!
- X
- XStaticText disabled
- X42 20 99 211
- XCheck contents of volume "^0"?
- X
- X
- X
- X,143
- X2
- X
- XButton
- X158 91 178 151
- XOK
- X
- XStaticText disabled
- X52 17 113 231
- XBNDL ^0 does not contain the usual list of ICN# resources.
- X
- X
- X
- X,144
- X2
- X
- XButton
- X154 91 174 151
- XOK
- X
- XStaticText disabled
- X62 12 122 229
- XBNDL ^0 does not contain the usual list of FREF resources.
- X
- X
- X
- X,145
- X2
- X
- XButton
- X166 91 186 151
- XOK
- X
- XStaticText disabled
- X23 5 154 236
- XBNDL ^0 refers to FREF ^1, whose icon local ID is ^2.\0D++
- X\0D++
- XThis local ID is unresolved. That is, it is not the local ID of any member of the ICN# resource list in the same bundle.
- X
- X
- X
- X,146
- X2
- X
- XButton
- X157 91 177 151
- XOK
- X
- XStaticText disabled
- X44 13 140 231
- XThis file's bundle doesn't assign an icon to this file.\0D++
- X\0D++
- XThere's no FREF with a file type that matches this file's type, which is '^0'.
- X
- X
- X
- X,147
- X2
- X
- XButton
- X162 93 182 153
- XOK
- X
- XStaticText disabled
- X43 11 142 232
- XThis file's bundle doesn't appear to be for this file.\0D++
- X\0D++
- XThe OwnerName in the bundle doesn't match the file's creator, which is '^0'.
- X
- X
- X
- X* -------------------- NewType:ALRT
- XTYPE ALRT=GNRL
- X
- X
- X,128
- X.H
- X00320064 012C019C 00804444
- X
- X
- X,130
- X.H
- X006E0086 01360176 00824444
- X
- X
- X,129
- X.H
- X0050008A 0118017A 00814444
- X
- X
- X,131
- X.H
- X0080008A 0148017A 00834444
- X
- X
- X,132
- X.H
- X00800086 01480176 00844444
- X
- X
- X,133
- X.H
- X0080008E 0148017E 00854444
- X
- X
- X,134
- X.H
- X0080008A 0148017A 00864444
- X
- X
- X,135
- X.H
- X00800088 01480178 00874444
- X
- X
- X,136
- X.H
- X00800084 01480174 00884444
- X
- X
- X,137
- X.H
- X0080007E 0148016E 00894444
- X
- X
- X,138
- X.H
- X00800086 01480176 008A4444
- X
- X
- X,139
- X.H
- X00800084 01480174 008B4444
- X
- X
- X,140
- X.H
- X00800086 01480176 008C4444
- X
- X
- X,141
- X.H
- X00800084 01480174 008D4444
- X
- X
- X,142
- X.H
- X0058008A 0120017A 008E4444
- X
- X
- X,143
- X.H
- X00800088 01480178 008F4444
- X
- X
- X,144
- X.H
- X00800082 01480172 00904444
- X
- X
- X,145
- X.H
- X00800084 01480174 00914444
- X
- X
- X,146
- X.H
- X007C008C 0144017C 00924444
- X
- X
- X,147
- X.H
- X007A0088 01420178 00934444
- X
- X
- ________This_Is_The_END________
- if test `wc -l < DeskCheck.r` -ne 480; then
- echo 'shar: DeskCheck.r was damaged during transit'
- echo ' (should have been 480 bytes)'
- fi
- fi ; : end of overwriting check
- echo 'Extracting Alerts'
- if test -f Alerts; then echo 'shar: will not overwrite Alerts'; else
- sed 's/^X//' << '________This_Is_The_END________' > Alerts
- X
- XThis draft written February 4, 1987.
- XE.Vishniac / P.O. Box 1357 / East Arlington, MA 02174
- X
- XFollowing are the alerts from DeskCheck, listed by ALRT number with a short
- Xexplanation of each one's significance. ^0, ^1, ^2, and ^3 indicate text which
- Xis supplied at run-time.
- X
- X
- X128: "Welcome to DeskCheck!"
- X
- XThis alert is normal.
- X
- X129: "All done."
- X
- XThis alert is normal.
- X
- X130: "SetVol Failed! Error code = ^0."
- X
- XDeskCheck was unable to move to some directory in the course of its search.
- XThis should never happen.
- X
- X131: "OpenResFile failed! Error code = ^0."
- X
- XDeskCheck attempts to check every file that has a resource fork. Some files
- Xhave bogus resource forks, which cause errors when an attempt is made to open
- Xthem as resource files. In extreme cases, the Mac may bomb in OpenResFile.
- X
- X132: "This file has one or more BNDLs, but the bundle bit is not set.
- X Number of BNDL resources = ^0."
- X
- XIn the case of the Desktop file, this is normal. For any other file, it
- Xwarns that the Finder won't take any notice of the file's bundle because
- Xthe bundle bit is off.
- X
- X133: "BNDL ^0 has ^1 resource types instead of the expected 2."
- X
- XBNDL resources normally have two lists of resources: one for ICN# resources
- Xand one for FREF resources. A different number of lists is unusual, but not
- Xnecessarily an error.
- X
- X134: "The signature resource listed in BNDL ^0, ^1 ^2, is missing."
- X
- XAn application's "signature" is the unique identifier which connects it with
- Xthe documents it creates or uses. The signature resource is a resource whose
- Xresource type is the same as the creator of files associated with the application.
- XThe signature is listed in the application's bundle.
- X
- X135: "BNDL ^0 refers to resource type '^1'. The usual types are 'FREF' and 'ICN#'."
- X
- XTypes other than ICN# and FREF in the bundle are unusual, but not necessarily
- Xan error.
- X
- X136: "BNDL ^0 is too short!"
- X
- XDeskCheck parses each bundle to be sure that the actual resource length is
- Xlong enough to contain the bundle's required fields and lists. A bundle
- Xresource that's too short is a severe error.
- X
- X137: "BNDL ^0 is longer than expected."
- X
- XDeskCheck parses each bundle to be sure that the actual resource length is
- Xno longer than required to contain the bundle's required fields and lists.
- XA bundle that's too long is unusual, but not necessarily a problem.
- X
- X138: "ICN# ^2 is ^3 bytes instead of the usual 256."
- X
- XICN# resources have a fixed format, with a length of exactly 256 bytes.
- XA different length is a minor error.
- X
- X139: "FREF ^2 is only ^3 bytes, which is less than the minimum FREF size of six."
- X
- XAn FREF consists of a required signature (four bytes) and ICN# local ID (two bytes),
- Xoptionally followed by a string (zero to 256 bytes). So, an FREF could reasonably
- Xbe any size from six to 256 bytes. An FREF of less than six bytes is a severe error.
- X
- X140: "FREF ^2 is ^3 bytes long, which exceeds the maximum FREF size of 262."
- X
- XAn FREF which runs past the maximum length of 262 bytes is unusual, but not
- Xnecessarily a problem.
- X
- X141: "BNDL ^0 refers to resource ^1 ^2, which is missing."
- X
- XDeskCheck verifies that all resources listed in the bundle are actually present
- Xin the same file. A missing resource is a severe error.
- X
- X142: "Check contents of volume "^0"?"
- X
- XThis inquiry is normal.
- X
- X143: "BNDL ^0 does not contain the usual list of ICN# resources."
- X
- XThis is not necessarily a problem, but means the bundle isn't much good.
- X
- X144: "BNDL ^0 does not contain the usual list of FREF resources."
- X
- XThis is not necessarily a problem, but means the bundle isn't much good.
- X
- X145: "BNDL ^0 refers to FREF ^1, whose icon local ID is ^2.
- X This local ID is unresolved. That is, it is not the local ID of any member
- X of the ICN# resource list in the same bundle."
- X
- XEach FREF associates a file type with an ICN# resource. The ICN# is identified
- Xby a local ID, which is mapped to the ICN#'s real ID through the ICN# list in
- Xthe bundle itself. An unresolved local ID is a severe error.
- X
- X146: "This file's bundle doesn't assign an icon to this file.
- X There's no FREF with a file type that matches this file's type, which is '^0'."
- X
- XIn the case of the Desktop file, this alert is normal. For any other file, it
- Xsuggests that the bundle isn't complete. This is not necessarily a problem, but
- Xmeans that the file will appear with a default icon on the desktop.
- X
- X147: "This file's bundle doesn't appear to be for this file.
- X The OwnerName in the bundle doesn't match the file's creator, which is '^0'."
- X
- XIn the case of the Desktop file, this alert is normal. For any other file, it
- Xwarns that the file's bundle doesn't match information about the file itself.
- ________This_Is_The_END________
- if test `wc -l < Alerts` -ne 118; then
- echo 'shar: Alerts was damaged during transit'
- echo ' (should have been 118 bytes)'
- fi
- fi ; : end of overwriting check
- exit 0
-