mirror of
https://github.com/bobbimanners/Applecorn.git
synced 2025-02-09 06:31:16 +00:00
Fix newly-introduced wildcard bug.
This commit is contained in:
parent
f62b832228
commit
aa379249a6
BIN
applecorn.po
BIN
applecorn.po
Binary file not shown.
@ -711,7 +711,7 @@ INFO JSR PREPATH ; Preprocess pathname
|
||||
** it does not go well ;)
|
||||
|
||||
INFOREENTRY
|
||||
JSR WILDNEXT
|
||||
JSR WILDNEXT ; Start of new block
|
||||
BCS INFOEXIT ; No more matches
|
||||
INFOFIRST LDA WILDIDX
|
||||
CMP #$FF ; Is WILDNEXT about to read new blk?
|
||||
|
@ -56,6 +56,7 @@ WILDCARD STZ :LAST
|
||||
* Obtain subsequent wildcard matches
|
||||
* WILDCARD must have been called first
|
||||
* Returns with carry set if wildcard match fails, clear otherwise
|
||||
* Caller should check WILDIDX and call again if value is $FF
|
||||
WILDNEXT LDX MFTEMP ; Length of MFTEMP
|
||||
:L1 CPX #$00 ; Find final segment (previous match)
|
||||
BEQ :S1
|
||||
@ -73,10 +74,7 @@ WILDNEXT LDX MFTEMP ; Length of MFTEMP
|
||||
JSR TMPtoMF ; Copy back to MOSFILE
|
||||
CLC
|
||||
RTS
|
||||
:NOMATCH LDA WILDIDX ; See if there are more blocks
|
||||
CMP #$FF
|
||||
BEQ :S1 ; Yes, go again
|
||||
SEC
|
||||
:NOMATCH SEC
|
||||
RTS
|
||||
|
||||
* Copy a segment of the path into SEGBUF
|
||||
@ -163,7 +161,7 @@ WILDIDX DB $00 ; Dirent idx in current block
|
||||
|
||||
* Read directory block, apply wildcard match
|
||||
* Inputs: directory name in XY (Pascal string)
|
||||
* If there is a match, replaces SEGBUF with the first match and CLC
|
||||
* If there is a match, carry clear
|
||||
* If no match, or any other error, returns with carry set
|
||||
* Leaves the directory open to allow resumption of search.
|
||||
SRCHBLK LDA WILDIDX
|
||||
@ -192,6 +190,8 @@ SRCHBLK LDA WILDIDX
|
||||
|
||||
:CONT JSR SRCHBLK2 ; Handle one block
|
||||
BCS :MATCH
|
||||
SEC
|
||||
RTS
|
||||
:MATCH CLC
|
||||
RTS
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user