fix errno related underscores in all libsrc/*.s files

This commit is contained in:
mrdudz
2022-08-28 21:52:53 +02:00
parent 5d390489a8
commit 2dabb65ee0
88 changed files with 213 additions and 213 deletions

View File

@@ -10,14 +10,14 @@
.macpack cpu
; ----------------------------------------------------------------------------
; int __fastcall__ _directerrno (unsigned char code);
; /* Set errno to a specific error code, clear _oserror, and return -1. Used
; int __fastcall__ __directerrno (unsigned char code);
; /* Set errno to a specific error code, clear __oserror, and return -1. Used
; ** by the library.
; */
__directerrno:
jsr __seterrno ; Set errno (returns with .A = 0)
sta __oserror ; Clear __oserror
___directerrno:
jsr ___seterrno ; Set errno (returns with .A = 0)
sta ___oserror ; Clear ___oserror
.if (.cpu .bitand CPU_ISET_65SC02)
dec a
.else

View File

@@ -69,7 +69,7 @@
invmode:
lda #EINVAL
jsr __seterrno ; Set __errno, returns zero in A
jsr ___seterrno ; Set __errno, returns zero in A
tax ; a/x = 0
jmp incsp4
@@ -91,7 +91,7 @@ modeok: ldy #$00
bne openok
cmp #$FF
bne openok
jmp return0 ; Failure, errno/_oserror already set
jmp return0 ; Failure, errno/__oserror already set
; Open call succeeded

View File

@@ -11,19 +11,19 @@
.macpack cpu
; ----------------------------------------------------------------------------
; int __fastcall__ _mappederrno (unsigned char code);
; /* Set _oserror to the given platform-specific error code. If it is a real
; int __fastcall__ __mappederrno (unsigned char code);
; /* Set __oserror to the given platform-specific error code. If it is a real
; ** error code (not zero), set errno to the corresponding system error code,
; ** and return -1. Otherwise, return zero.
; ** Used by the library.
; */
__mappederrno:
sta __oserror ; Store the error code
___mappederrno:
sta ___oserror ; Store the error code
tax ; Did we have an error?
bze ok ; Branch if no
jsr __osmaperrno ; Map OS error into errno code
jsr __seterrno ; Save in errno (returns with .A = 0)
jsr ___osmaperrno ; Map OS error into errno code
jsr ___seterrno ; Save in errno (returns with .A = 0)
.if (.cpu .bitand CPU_ISET_65SC02)
dec a
.else

View File

@@ -1,14 +1,14 @@
;
; Ullrich von Bassewitz, 16.05.2000
;
; extern unsigned char _oserror;
; extern unsigned char __oserror;
; /* Operating system specific errors from the low level functions */
.export __oserror
.export ___oserror
.bss
__oserror:
___oserror:
.res 1

View File

@@ -1,7 +1,7 @@
;
; Ullrich von Bassewitz, 2004-05-13
;
; __seterrno: Will set __errno to the value in A and return zero in A. Other
; ___seterrno: Will set __errno to the value in A and return zero in A. Other
; registers aren't changed. The function is C callable, but
; currently only called from asm code.
;
@@ -10,7 +10,7 @@
.code
.proc __seterrno
.proc ___seterrno
sta __errno
lda #0

View File

@@ -38,7 +38,7 @@
; Error, no space left
@Error: lda #ENOSPC ; No space left
jsr __seterrno
jsr ___seterrno
ldx #$FF ; Return -1
txa
rts

View File

@@ -7,7 +7,7 @@
.export _chdir
.import __syschdir
.import __mappederrno
.import ___mappederrno
;--------------------------------------------------------------------------
@@ -17,7 +17,7 @@
.proc _chdir
jsr __syschdir ; Call the machine specific function
jmp __mappederrno ; Store into _oserror, set errno, return 0/-1
jmp ___mappederrno ; Store into __oserror, set errno, return 0/-1
.endproc

View File

@@ -31,7 +31,7 @@
; File is not open
lda #EINVAL
jsr __seterrno
jsr ___seterrno
lda #$FF ; Return -1
tax
rts

View File

@@ -78,7 +78,7 @@ err: rts
; If the file is not valid, fileno must set errno and return -1
error: lda #<EBADF
jsr __seterrno
jsr ___seterrno
lda #$FF
tax
rts

View File

@@ -36,7 +36,7 @@
; Failed to allocate a file stream
lda #EMFILE
jsr __seterrno ; Set __errno, will return 0 in A
jsr ___seterrno ; Set __errno, will return 0 in A
tax
rts ; Return zero

View File

@@ -59,7 +59,7 @@
; File not open or in error state
@L1: lda #EINVAL
jsr __seterrno ; Set __errno, return zero in A
jsr ___seterrno ; Set __errno, return zero in A
tax ; a/x = 0
jmp @L99 ; Bail out

View File

@@ -39,7 +39,7 @@
; File not open
@L1: lda #EBADF
jsr __seterrno ; Returns with A = 0
jsr ___seterrno ; Returns with A = 0
tax ; A = X = 0
jmp incsp6

View File

@@ -51,7 +51,7 @@ loop: dec ptr2
overflow:
lda #<ERANGE
jsr __seterrno ; Returns 0 in A
jsr ___seterrno ; Returns 0 in A
tax ; Return zero
rts

View File

@@ -7,7 +7,7 @@
.export _mkdir
.import __sysmkdir
.import __mappederrno
.import ___mappederrno
;--------------------------------------------------------------------------
@@ -15,6 +15,6 @@
.proc _mkdir
jsr __sysmkdir ; Call the machine specific function
jmp __mappederrno ; Store into _oserror, set errno, return 0/-1
jmp ___mappederrno ; Store into __oserror, set errno, return 0/-1
.endproc

View File

@@ -169,7 +169,7 @@ addentry:
; Error entries
nomem: lda #ENOMEM
error: jsr __seterrno
error: jsr ___seterrno
lda #$FF ; Return -1
tax
rts

View File

@@ -7,7 +7,7 @@
.export _remove
.import __sysremove
.import __mappederrno
.import ___mappederrno
;--------------------------------------------------------------------------
@@ -15,7 +15,7 @@
.proc _remove
jsr __sysremove ; Call the machine specific function
jmp __mappederrno ; Store into _oserror, set errno, return 0/-1
jmp ___mappederrno ; Store into __oserror, set errno, return 0/-1
.endproc

View File

@@ -7,7 +7,7 @@
.export _rename
.import __sysrename
.import __mappederrno
.import ___mappederrno
;--------------------------------------------------------------------------
@@ -15,7 +15,7 @@
.proc _rename
jsr __sysrename ; Call the machine specific function
jmp __mappederrno ; Store into _oserror, set errno, return 0/-1
jmp ___mappederrno ; Store into __oserror, set errno, return 0/-1
.endproc

View File

@@ -7,7 +7,7 @@
.export _rmdir
.import __sysrmdir
.import __mappederrno
.import ___mappederrno
;--------------------------------------------------------------------------
@@ -15,6 +15,6 @@
.proc _rmdir
jsr __sysrmdir ; Call the machine specific function
jmp __mappederrno ; Store into _oserror, set errno, return 0/-1
jmp ___mappederrno ; Store into __oserror, set errno, return 0/-1
.endproc

View File

@@ -61,7 +61,7 @@ ___sig_ign:
invalidsig:
lda #<EINVAL
jsr __seterrno ; Returns 0 in A
jsr ___seterrno ; Returns 0 in A
tax ; A/X = 0
___sig_dfl:
rts

View File

@@ -7,7 +7,7 @@
.export _uname
.import __sysuname
.import __mappederrno
.import ___mappederrno
;--------------------------------------------------------------------------
@@ -15,7 +15,7 @@
.proc _uname
jsr __sysuname ; Call the machine specific function
jmp __mappederrno ; Store into _oserror, set errno, return 0/-1
jmp ___mappederrno ; Store into __oserror, set errno, return 0/-1
.endproc

View File

@@ -62,7 +62,7 @@
; File is not open or the character is invalid
error: lda #EINVAL
jsr __seterrno
jsr ___seterrno
lda #$FF ; Return -1
tax
rts

View File

@@ -140,7 +140,7 @@ L0: ldy #EINVAL
pla ; Drop ap
pla
tya
jsr __directerrno ; Return -1
jsr ___directerrno ; Return -1
jmp incsp6 ; Drop parameters