mirror of
https://github.com/cc65/cc65.git
synced 2025-01-25 11:30:06 +00:00
Don't pass mode argument to open() from _fopen().
It isn't necessary, since paravirt.c has a default if the mode isn't pushed onto the stack.
This commit is contained in:
parent
f72d355b18
commit
411a5a9483
@ -1,3 +0,0 @@
|
|||||||
; File mode constants, must match the values in the C headers
|
|
||||||
S_IREAD = $0100 ; octal 0400
|
|
||||||
S_IWRITE = $0080 ; octal 0200
|
|
@ -48,7 +48,7 @@
|
|||||||
** https://en.wikipedia.org/wiki/File_system_permissions#Numeric_notation
|
** https://en.wikipedia.org/wiki/File_system_permissions#Numeric_notation
|
||||||
** (S_IREAD and S_IWRITE are aliases for S_IRUSR and S_IWUSR)
|
** (S_IREAD and S_IWRITE are aliases for S_IRUSR and S_IWUSR)
|
||||||
**
|
**
|
||||||
** Must match the values in asminc/stat.inc and src/sim65/paravirt.c
|
** Must match the values in src/sim65/paravirt.c
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define S_IREAD 0400
|
#define S_IREAD 0400
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
.include "errno.inc"
|
.include "errno.inc"
|
||||||
.include "fcntl.inc"
|
.include "fcntl.inc"
|
||||||
.include "_file.inc"
|
.include "_file.inc"
|
||||||
.include "stat.inc"
|
|
||||||
|
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
@ -83,10 +82,7 @@ modeok: ldy #$00
|
|||||||
tya
|
tya
|
||||||
iny
|
iny
|
||||||
sta (sp),y
|
sta (sp),y
|
||||||
lda #<(S_IREAD|S_IWRITE)
|
ldy #4 ; Size of arguments in bytes
|
||||||
ldx #>(S_IREAD|S_IWRITE)
|
|
||||||
jsr pushax ; Push the "mode" argument onto the stack
|
|
||||||
ldy #6 ; Size of arguments in bytes
|
|
||||||
jsr _open ; Will cleanup the stack
|
jsr _open ; Will cleanup the stack
|
||||||
|
|
||||||
; Check the result of the open() call
|
; Check the result of the open() call
|
||||||
|
Loading…
x
Reference in New Issue
Block a user