1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-23 04:30:10 +00:00

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
This commit is contained in:
uz 2009-11-13 15:53:01 +00:00
parent e74ed31936
commit 097b094fdd
5 changed files with 8 additions and 13 deletions

View File

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

View File

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

View File

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

View File

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

View File

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