mirror of
https://github.com/bobbimanners/Applecorn.git
synced 2025-02-10 12:30:44 +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 ;)
|
** it does not go well ;)
|
||||||
|
|
||||||
INFOREENTRY
|
INFOREENTRY
|
||||||
JSR WILDNEXT
|
JSR WILDNEXT ; Start of new block
|
||||||
BCS INFOEXIT ; No more matches
|
BCS INFOEXIT ; No more matches
|
||||||
INFOFIRST LDA WILDIDX
|
INFOFIRST LDA WILDIDX
|
||||||
CMP #$FF ; Is WILDNEXT about to read new blk?
|
CMP #$FF ; Is WILDNEXT about to read new blk?
|
||||||
|
@ -56,6 +56,7 @@ WILDCARD STZ :LAST
|
|||||||
* Obtain subsequent wildcard matches
|
* Obtain subsequent wildcard matches
|
||||||
* WILDCARD must have been called first
|
* WILDCARD must have been called first
|
||||||
* Returns with carry set if wildcard match fails, clear otherwise
|
* 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
|
WILDNEXT LDX MFTEMP ; Length of MFTEMP
|
||||||
:L1 CPX #$00 ; Find final segment (previous match)
|
:L1 CPX #$00 ; Find final segment (previous match)
|
||||||
BEQ :S1
|
BEQ :S1
|
||||||
@ -73,10 +74,7 @@ WILDNEXT LDX MFTEMP ; Length of MFTEMP
|
|||||||
JSR TMPtoMF ; Copy back to MOSFILE
|
JSR TMPtoMF ; Copy back to MOSFILE
|
||||||
CLC
|
CLC
|
||||||
RTS
|
RTS
|
||||||
:NOMATCH LDA WILDIDX ; See if there are more blocks
|
:NOMATCH SEC
|
||||||
CMP #$FF
|
|
||||||
BEQ :S1 ; Yes, go again
|
|
||||||
SEC
|
|
||||||
RTS
|
RTS
|
||||||
|
|
||||||
* Copy a segment of the path into SEGBUF
|
* 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
|
* Read directory block, apply wildcard match
|
||||||
* Inputs: directory name in XY (Pascal string)
|
* 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
|
* If no match, or any other error, returns with carry set
|
||||||
* Leaves the directory open to allow resumption of search.
|
* Leaves the directory open to allow resumption of search.
|
||||||
SRCHBLK LDA WILDIDX
|
SRCHBLK LDA WILDIDX
|
||||||
@ -192,6 +190,8 @@ SRCHBLK LDA WILDIDX
|
|||||||
|
|
||||||
:CONT JSR SRCHBLK2 ; Handle one block
|
:CONT JSR SRCHBLK2 ; Handle one block
|
||||||
BCS :MATCH
|
BCS :MATCH
|
||||||
|
SEC
|
||||||
|
RTS
|
||||||
:MATCH CLC
|
:MATCH CLC
|
||||||
RTS
|
RTS
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user