EDIT, LS & DU fixes

This commit is contained in:
burniouf 2023-11-25 09:33:04 +01:00
parent 2c549174d4
commit 6f0f9c0a3d
4 changed files with 45 additions and 26 deletions

Binary file not shown.

View File

@ -2,11 +2,9 @@ NEW
AUTO 3,1 AUTO 3,1
.LIST OFF .LIST OFF
*-------------------------------------- *--------------------------------------
FILE.New jsr FILE.Reset FILE.New >LDYA L.MSG.NEWFILE
>LDYA L.MSG.NEWFILE
FILE.RealPath >PUSHYA FILE.NewYA >PUSHYA
>PUSHWZ Allocate >PUSHWZ Allocate
>SYSCALL RealPath >SYSCALL RealPath
bcs .9 bcs .9
@ -14,9 +12,11 @@ FILE.RealPath >PUSHYA
txa txa
>STA.G hFileName >STA.G hFileName
jmp FILE.Reset
.9 rts .9 rts
*-------------------------------------- *--------------------------------------
FILE.Load jsr FILE.RealPath FILE.Load jsr FILE.NewYA
bcs .9 bcs .9
jsr FILE.Reset jsr FILE.Reset

View File

@ -175,6 +175,8 @@ CS.RUN >PUSHW L.MSG.TERMCAP
cmp #E.OOM cmp #E.OOM
beq CS.RUN.RTS beq CS.RUN.RTS
bra .3
.2 jsr FILE.New .2 jsr FILE.New
bcs CS.RUN.RTS bcs CS.RUN.RTS

View File

@ -142,25 +142,41 @@ X.InitSrcDirPtr1
lda (ZPPtr2),y lda (ZPPtr2),y
beq .8 we have '/' beq .8 we have '/'
jsr X.Init.StatBuf jsr X.Init.Stat
bcs .1 File/DIR does not exists, go extract pattern bcs .1 File/DIR does not exists, go extract pattern
.DO X.ENTER.SUBDIR=1 .DO X.ENTER.SUBDIR=1
>LDA.G STATBUF+S.STAT.MODE+1 >LDA.G STATBUF+S.STAT.MODE+1
and #$F0 and #$F0
cmp /S.STAT.MODE.DIR cmp /S.STAT.MODE.DIR
beq .8 TYPE=DIR, do not extract pattern bne .7 Not a dir....
jsr X.GetPtr2Len
dey
lda #'/'
cmp (ZPPtr2),y
beq .8
iny
sta (ZPPtr2),y
iny
lda #0
sta (ZPPtr2),y
bra .8 TYPE=DIR, do not extract pattern
.ELSE
bra .7
.FIN .FIN
bra .4
.1 cmp #MLI.E.INVPATH .1 cmp #MLI.E.INVPATH
beq .11 bne .98
sec jsr X.GetPtr2Len TYPE is not DIR, check if wc
rts
.11 jsr X.GetPtr2Len TYPE is not DIR, check if wc
dey dey
@ -168,22 +184,23 @@ X.InitSrcDirPtr1
.2 lda (ZPPtr2),y search backward for a / .2 lda (ZPPtr2),y search backward for a /
cmp #'/' cmp #'/'
beq .3 beq .6
cmp #'?' Test if some wildcard chars.... cmp #'?' Test if some wildcard chars....
beq .21 beq .3
cmp #'*' cmp #'*'
bne .22 bne .4
.21 inx inc wildcard count .3 inx inc wildcard count
.22 dey
.4 dey
bne .2 bne .2
.3 txa .6 txa
beq .98 no wc, file not found.... beq .97 no wc, file not found....
.4 jsr X.InitSplitBuf .7 jsr X.InitSplitBuf
bcs .99 bcs .99
>STA.G hInclude >STA.G hInclude
@ -202,8 +219,8 @@ X.InitSrcDirPtr1
rts rts
.98 lda #MLI.E.INVPATH .97 lda #MLI.E.INVPATH
sec .98 sec
.99 rts .99 rts
*-------------------------------------- *--------------------------------------
.DO X.RESET.SRC.DIR=1 .DO X.RESET.SRC.DIR=1
@ -239,7 +256,7 @@ X.InitDstDirPtr1
>STA.G hDstBasePath >STA.G hDstBasePath
jsr X.Init.StatBuf jsr X.Init.Stat
bcs .1 File/DIR does not exists, go extract DstFileName bcs .1 File/DIR does not exists, go extract DstFileName
>LDA.G STATBUF+S.STAT.MODE+1 >LDA.G STATBUF+S.STAT.MODE+1
@ -287,7 +304,7 @@ X.InitGetBuf >LDYAI 256
.99 rts .99 rts
*-------------------------------------- *--------------------------------------
X.Init.StatBuf >PUSHW ZPPtr2 X.Init.Stat >PUSHW ZPPtr2
>PUSHEA.G STATBUF >PUSHEA.G STATBUF
>SYSCALL Stat >SYSCALL Stat
rts rts