1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-09 06:29:38 +00:00

remove extra spaces

This commit is contained in:
mrdudz 2022-08-28 22:37:33 +02:00
parent 54aff47513
commit df4b6f9d14
31 changed files with 51 additions and 51 deletions

View File

@ -73,7 +73,7 @@ oserr: jsr ___mappederrno
iny
lda #$00
sta (ptr1),y
sta ___oserror ; Clear __oserror
sta ___oserror ; Clear __oserror
; Success, return buf
lda ptr1

View File

@ -10,7 +10,7 @@
_dio_query_sectsize:
; Clear error
stx ___oserror ; X = 0
stx ___oserror ; X = 0
; Return ProDOS 8 block size
txa ; X = 0

View File

@ -107,13 +107,13 @@ seek_common:
einval: lda #EINVAL
; Set __errno
errno: jsr ___directerrno ; leaves -1 in AX
errno: jsr ___directerrno ; leaves -1 in AX
stx sreg ; extend return value to 32 bits
stx sreg+1
rts
; Set ___oserror
oserr: jsr ___mappederrno ; leaves -1 in AX
oserr: jsr ___mappederrno ; leaves -1 in AX
stx sreg ; extend return value to 32 bits
stx sreg+1
rts

View File

@ -49,7 +49,7 @@ rwcommon:
rwepilog:
; Return success
sta ___oserror ; A = 0
sta ___oserror ; A = 0
lda mliparam + MLI::RW::TRANS_COUNT
ldx mliparam + MLI::RW::TRANS_COUNT+1
rts

View File

@ -18,7 +18,7 @@
jsr CIOV
bmi closerr
ok: ldx #0
stx ___oserror ; clear system specific error code
stx ___oserror ; clear system specific error code
txa
rts

View File

@ -49,7 +49,7 @@ _dio_open:
sta sectsizetab+sst_flag,x ; set flag that drive is "open"
lda #0
sta sectsizetab+sst_sectsize+1,x
sta ___oserror ; success
sta ___oserror ; success
tya
sta sectsizetab+sst_driveno,x
stx ptr2
@ -156,7 +156,7 @@ s128: lda #128
lda #0
ldy #sst_flag
sta (ptr2),y
sta ___oserror ; success
sta ___oserror ; success
tax
rts ; return no error

View File

@ -148,7 +148,7 @@ copycd: lda #ATEOL
pha ; remember error code
jsr close ; close the IOCB (required even if open failed)
pla ; put error code back into A
setmerr:jmp ___mappederrno ; update errno from OS specific error code in A
setmerr:jmp ___mappederrno ; update errno from OS specific error code in A
openok: lda #>buf
sta ICBAH,x ; set buffer address

View File

@ -45,7 +45,7 @@ parmok: jsr findfreeiocb
beq iocbok ; we found one
lda #<EMFILE ; "too many open files"
seterr: jsr ___mappederrno ; @@@ probably not correct to set errno here @@@
seterr: jsr ___mappederrno ; @@@ probably not correct to set errno here @@@
rts ; return -1
;invmode:ldx #>EINVAL

View File

@ -21,7 +21,7 @@
; seeking not supported, return -1 and ENOSYS errno value
no_supp:jsr incsp6
lda #<ENOSYS
jsr ___directerrno ; returns with $FFFF in AX
jsr ___directerrno ; returns with $FFFF in AX
sta sreg
sta sreg+1
rts
@ -94,7 +94,7 @@ xxerr: tya
pha
jsr incsp6
pla
jsr ___mappederrno ; returns with $FFFF in AX
jsr ___mappederrno ; returns with $FFFF in AX
sta sreg
sta sreg+1
rts

View File

@ -33,7 +33,7 @@ done: lda ICBLL,x ; buf len lo
lda ICBLH,x ; get buf len hi
tax ; to X
okdone: lda #0
sta ___oserror ; clear system dependend error code
sta ___oserror ; clear system dependend error code
pla ; get buf len lo
rts

View File

@ -21,7 +21,7 @@ write9:
lda ICBLH,x ; buf len high
tax
lda #0
sta ___oserror ; clear system dependend error code
sta ___oserror ; clear system dependend error code
pla
rts

View File

@ -54,12 +54,12 @@
ldx unittab,y
jsr closecmdchannel ; Close the disk command channel
pla ; Get the error code from the disk
jmp ___mappederrno ; Set __oserror and _errno, return 0/-1
jmp ___mappederrno ; Set __oserror and _errno, return 0/-1
; Error entry: The given file descriptor is not valid or not open
invalidfd:
lda #EBADF
jmp ___directerrno ; Set _errno, clear __oserror, return -1
jmp ___directerrno ; Set _errno, clear __oserror, return -1
.endproc

View File

@ -52,7 +52,7 @@ fail: lda #0 ; Return NULL
okay: lda fnunit ; Set by diskinit
jsr devicestr ; Returns 0 in A
sta ___oserror ; Clear __oserror
sta ___oserror ; Clear __oserror
; Success, return buf

View File

@ -189,7 +189,7 @@ nofile: ; ... else use SA=0 (read)
txa ; Handle
ldx #0
stx ___oserror ; Clear __oserror
stx ___oserror ; Clear __oserror
rts
.endproc

View File

@ -66,7 +66,7 @@
jsr CHKIN
bcc @L3 ; Branch if ok
jmp ___mappederrno ; Store into ___oserror, map to errno, return -1
jmp ___mappederrno ; Store into ___oserror, map to errno, return -1
; Read the next byte
@ -141,7 +141,7 @@ devnotpresent:
invalidfd:
lda #EBADF
jmp ___directerrno ; Sets _errno, clears __oserror, returns -1
jmp ___directerrno ; Sets _errno, clears __oserror, returns -1
.endproc

View File

@ -55,7 +55,7 @@
jsr CKOUT
bcc @L2
@error: jmp ___mappederrno ; Store into ___oserror, map to errno, return -1
@error: jmp ___mappederrno ; Store into ___oserror, map to errno, return -1
; Output the next character from the buffer
@ -112,6 +112,6 @@ devnotpresent:
invalidfd:
lda #EBADF
jmp ___directerrno ; Sets _errno, clears __oserror, returns -1
jmp ___directerrno ; Sets _errno, clears __oserror, returns -1
.endproc

View File

@ -16,8 +16,8 @@
; */
___directerrno:
jsr ___seterrno ; Set errno (returns with .A = 0)
sta ___oserror ; Clear ___oserror
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

View File

@ -19,11 +19,11 @@
; */
___mappederrno:
sta ___oserror ; Store the error code
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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -14,11 +14,11 @@
.data
sigtable:
.word ___sig_dfl ; SIGABRT
.word ___sig_dfl ; SIGFPE
.word ___sig_dfl ; SIGILL
.word ___sig_dfl ; SIGINT
.word ___sig_dfl ; SIGSEGV
.word ___sig_dfl ; SIGTERM
.word ___sig_dfl ; SIGABRT
.word ___sig_dfl ; SIGFPE
.word ___sig_dfl ; SIGILL
.word ___sig_dfl ; SIGINT
.word ___sig_dfl ; SIGSEGV
.word ___sig_dfl ; SIGTERM

View File

@ -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

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

View File

@ -80,6 +80,6 @@ _dio_close:
lda #0
ldy #sst_flag
sta (ptr1),y
sta ___oserror ; success
sta ___oserror ; success
tax
rts ; return no error

View File

@ -75,14 +75,14 @@ _open:
.byte $2c ; skip
@alreadyopen:
lda #EMFILE ; too many opened files (there can be only one)
jmp ___directerrno ; set errno, clear oserror, return -1
jmp ___directerrno ; set errno, clear oserror, return -1
@oserror:
jmp ___mappederrno ; set platform error code, return -1
jmp ___mappederrno ; set platform error code, return -1
_close:
lda #0
sta ___oserror
jsr ___seterrno ; clear errors
jsr ___seterrno ; clear errors
lda #0 ; clear fd
sta filedesc
tax
@ -111,13 +111,13 @@ _read:
@filenotopen:
lda #EBADF
jmp ___directerrno ; Sets _errno, clears __oserror, returns -1
jmp ___directerrno ; Sets _errno, clears __oserror, returns -1
@fileok:
lda #0
sta ptr3
sta ptr3+1 ; put 0 into ptr3 (number of bytes read)
sta ___oserror ; clear error flags
sta ___oserror ; clear error flags
jsr ___seterrno
lda f_track ; restore stuff for ReadByte
@ -147,11 +147,11 @@ _read:
bne @L2
inc ptr3+1
@L2: lda ___oserror ; was there error ?
@L2: lda ___oserror ; was there error ?
beq @L3
cmp #BFR_OVERFLOW ; EOF?
beq @done ; yes, we're done
jmp ___mappederrno ; no, we're screwed
jmp ___mappederrno ; no, we're screwed
@L3: dec ptr1 ; decrement the count
bne @L0