home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AmigActive 6
/
AACD06.ISO
/
CDTools
/
IDer
/
Routines
/
DoFiles.s
< prev
next >
Wrap
Text File
|
1997-02-18
|
1KB
|
50 lines
DoFiles: Include Routines/GetCurrentName.s
Include Routines/GetFileData.s
;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
CheckLoop: Move.W #NOCONFIGENTRY,_ErrorCode
Move.L _ConfigCurPos(PC),A0
Lea ConfigLine,A1
Move.B #' ',(A1)+ ;we need space at the start to act as a identifier
.CheckCopy Move.B (A0)+,D0
Beq LaunchDone
Move.B D0,(A1)+
Cmp.B #10,D0 ;each class entry appears on one complete line
Bne.S .CheckCopy
Clr.B -1(A1) ;mark the end of the entry
Move.L A0,_ConfigCurPos
Clr.W _ErrorCode
;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Move.B ConfigLine+1,D0 ;check to see if the line has a comment
Cmp.B #';',D0 ;identifier #1
Beq.S CheckLoop ;skip if comment start found
Cmp.B #'#',D0 ;identifier #2
Beq.S CheckLoop ;skip if comment start found
Bsr ParseConfig ;work out what entries are provided, and where they are
Bsr ProcessFlags ;set the various control options
Tst.L _Class ;was it a valid line.
Beq.S CheckLoop
Tst.L _Action ;does it have something for use to do
Beq.S CheckLoop
;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Include Routines/ProcessSuffix.s
Include Routines/ProcessName.s
Include Routines/ProcessOffset.s
Include Routines/LaunchAction.s
LaunchDone: Tst.W _ErrorCode
Beq.S .NoErrors
Bsr ErrorHandler
Clr.W _ErrorCode
.NoErrors Bsr Cleanup
Subq.W #1,_LoopCount
Bgt DoFiles
LaunchFinished: Bsr Cleanup
Rts