From: uz Date: Fri, 13 Nov 2009 15:53:01 +0000 (+0000) Subject: Replaced TGI_ERR_NO_MEM by TGI_ERR_NO_RES X-Git-Tag: V2.13.1~62 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=097b094fddfbfadc7b0af0f1a2e571af126ab015;p=cc65 Replaced TGI_ERR_NO_MEM by TGI_ERR_NO_RES git-svn-id: svn://svn.cc65.org/cc65/trunk@4467 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/asminc/tgi-error.inc b/asminc/tgi-error.inc index 52bb57727..b375918a6 100644 --- a/asminc/tgi-error.inc +++ b/asminc/tgi-error.inc @@ -43,7 +43,7 @@ TGI_ERR_INV_ARG ; Invalid function argument TGI_ERR_INV_FUNC ; Function not supported TGI_ERR_INV_FONT ; Font file is invalid - TGI_ERR_NO_MEM ; Not enough memory + TGI_ERR_NO_RES ; Out of resources (memory, handles, ...) TGI_ERR_UNKNOWN ; Unknown error TGI_ERR_COUNT ; Special: Number of error messages diff --git a/include/tgi/tgi-error.h b/include/tgi/tgi-error.h index f1dd7c8ff..11c97e337 100644 --- a/include/tgi/tgi-error.h +++ b/include/tgi/tgi-error.h @@ -52,7 +52,7 @@ #define TGI_ERR_INV_ARG 5 /* Invalid function argument */ #define TGI_ERR_INV_FUNC 6 /* Function not supported */ #define TGI_ERR_INV_FONT 7 /* Font file is invalid */ -#define TGI_ERR_NO_MEM 8 /* Out of memory */ +#define TGI_ERR_NO_RES 8 /* Out of resources */ diff --git a/libsrc/atari/atari_tgi_common.inc b/libsrc/atari/atari_tgi_common.inc index a4c90aa93..879bda51c 100644 --- a/libsrc/atari/atari_tgi_common.inc +++ b/libsrc/atari/atari_tgi_common.inc @@ -157,8 +157,8 @@ search: tax sbc #$10 bcs search - ; No free IOCB - lda #TGI_ERR_NO_IOCB + ; Out of resources +nores: lda #TGI_ERR_NO_RES sta error rts @@ -169,15 +169,10 @@ found: ; Check if enough RAM is available lda RAMTOP sbc #>mem_needed cmp APPMHI + 1 - bcc nomem + bcc nores bne switch cpy APPMHI - bcs switch - - ; No memory -nomem: lda #TGI_ERR_NO_MEM - sta error - rts + bcc nores ; Switch into graphics mode switch: lda #OPEN diff --git a/libsrc/tgi/tgi_geterrormsg.s b/libsrc/tgi/tgi_geterrormsg.s index c31033cb0..b7cfd87c1 100644 --- a/libsrc/tgi/tgi_geterrormsg.s +++ b/libsrc/tgi/tgi_geterrormsg.s @@ -51,6 +51,6 @@ msg4: .asciiz "Mode not supported by driver" msg5: .asciiz "Invalid function argument" msg6: .asciiz "Function not supported" msg7: .asciiz "Invalid font file" -msg8: .asciiz "Out of memory" +msg8: .asciiz "Out of resources" msg9: .asciiz "Unknown error" diff --git a/libsrc/tgi/tgi_load_vectorfont.c b/libsrc/tgi/tgi_load_vectorfont.c index 280f9f47e..0d5af23c9 100644 --- a/libsrc/tgi/tgi_load_vectorfont.c +++ b/libsrc/tgi/tgi_load_vectorfont.c @@ -93,7 +93,7 @@ const tgi_vectorfont* __fastcall__ tgi_load_vectorfont (const char* name) Font = malloc (H.size); if (Font == 0) { /* Out of memory */ - tgi_error = TGI_ERR_NO_MEM; + tgi_error = TGI_ERR_NO_RES; goto LoadError; }