Removed (pretty inconsistently used) tab chars from source code base.

This commit is contained in:
Oliver Schmidt
2013-05-09 13:56:54 +02:00
parent 44fd1082ae
commit 85885001b1
1773 changed files with 62864 additions and 62868 deletions

View File

@@ -6,49 +6,49 @@
; void* __fastcall__ calloc (size_t count, size_t size);
;
.export _calloc
.import _malloc, __bzero
.import tosumulax, pushax
.export _calloc
.import _malloc, __bzero
.import tosumulax, pushax
; -------------------------------------------------------------------------
.proc _calloc
.proc _calloc
; We have the first argument in a/x and the second on the stack. Calling
; tosumulax will give the product of both in a/x.
jsr tosumulax
jsr tosumulax
; Save size for later
sta Size
stx Size+1
sta Size
stx Size+1
; malloc() is a fastcall function, so we do already have the argument in
; the right place
jsr _malloc
jsr _malloc
; Check for a NULL pointer
cpx #0
bne ClearBlock
cmp #0
bne ClearBlock
cpx #0
bne ClearBlock
cmp #0
bne ClearBlock
; We have a NULL pointer, bail out
rts
rts
; No NULL pointer, clear the block. _bzero will return a pointer to the
; block which is exactly what we want.
ClearBlock:
jsr pushax ; ptr
lda Size
ldx Size+1 ; Size
jmp __bzero
jsr pushax ; ptr
lda Size
ldx Size+1 ; Size
jmp __bzero
.endproc
@@ -57,7 +57,7 @@ ClearBlock:
.bss
Size: .res 2
Size: .res 2