Removed the code that checks for valid/invalid chars in a filename. Actually
most characters are valid, and even the remaining ones do something more or less useful. git-svn-id: svn://svn.cc65.org/cc65/trunk@4867 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -27,23 +27,9 @@ nameloop:
|
|||||||
lda (ptr1),y ; Get next char from filename
|
lda (ptr1),y ; Get next char from filename
|
||||||
beq namedone ; Jump if end of name reached
|
beq namedone ; Jump if end of name reached
|
||||||
|
|
||||||
; Check for valid chars in the file name. We allow letters, digits, plus some
|
|
||||||
; additional chars from a table.
|
|
||||||
|
|
||||||
ldx #fncharcount-1
|
|
||||||
namecheck:
|
|
||||||
cmp fnchars,x
|
|
||||||
beq nameok
|
|
||||||
dex
|
|
||||||
bpl namecheck
|
|
||||||
tax
|
|
||||||
lda __ctype,x
|
|
||||||
and #CT_ALNUM
|
|
||||||
beq invalidname
|
|
||||||
|
|
||||||
; Check the maximum length, store the character
|
; Check the maximum length, store the character
|
||||||
|
|
||||||
nameok: ldx tmp1
|
ldx tmp1
|
||||||
cpx #16 ; Maximum length reached?
|
cpx #16 ; Maximum length reached?
|
||||||
bcs invalidname
|
bcs invalidname
|
||||||
lda (ptr1),y ; Reload char
|
lda (ptr1),y ; Reload char
|
||||||
@@ -188,10 +174,3 @@ fnlen: .res 1
|
|||||||
fncmd: .byte 's' ; Use as scratch command
|
fncmd: .byte 's' ; Use as scratch command
|
||||||
fnbuf: .res 35 ; Either 0:0123456789012345,t,m
|
fnbuf: .res 35 ; Either 0:0123456789012345,t,m
|
||||||
; Or 0:0123456789012345=0123456789012345
|
; Or 0:0123456789012345=0123456789012345
|
||||||
.rodata
|
|
||||||
; Characters that are ok in filenames besides digits and letters
|
|
||||||
fnchars:.byte ".,-_+()"
|
|
||||||
fncharcount = *-fnchars
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user