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
.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
>SYSCALL RealPath
bcs .9
@ -14,9 +12,11 @@ FILE.RealPath >PUSHYA
txa
>STA.G hFileName
jmp FILE.Reset
.9 rts
*--------------------------------------
FILE.Load jsr FILE.RealPath
FILE.Load jsr FILE.NewYA
bcs .9
jsr FILE.Reset

View File

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

View File

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