]> git.sur5r.net Git - cc65/commitdiff
Replaced TGI_ERR_NO_MEM by TGI_ERR_NO_RES
authoruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Fri, 13 Nov 2009 15:53:01 +0000 (15:53 +0000)
committeruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Fri, 13 Nov 2009 15:53:01 +0000 (15:53 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@4467 b7a2c559-68d2-44c3-8de9-860c34a00d81

asminc/tgi-error.inc
include/tgi/tgi-error.h
libsrc/atari/atari_tgi_common.inc
libsrc/tgi/tgi_geterrormsg.s
libsrc/tgi/tgi_load_vectorfont.c

index 52bb57727081780705e589cfc54b885b47451abc..b375918a694847a8d8b87137c49c700b81304237 100644 (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
index f1dd7c8ffe4901bf93816f4a47bfba08cd68f79e..11c97e337d935984a4306a8893c90fb842cd6b7a 100644 (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 */
 
 
 
index a4c90aa93d346f2d327339ea8c2ceab43cd99877..879bda51c4cc8043405f2e5b05288b0e3257cdb4 100644 (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
index c31033cb091cd4f88e8472fe8773dbeb2a9a1811..b7cfd87c1e4da04a8636301218c11e944291929a 100644 (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"
 
index 280f9f47e2e3a16c2e66e72808011097b285fdea..0d5af23c95adb1dde5da81e0cb509eec78940bf4 100644 (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;
     }