Enlightenment CVS committal

Author  : mej
Project : eterm
Module  : libast

Dir     : eterm/libast/src


Modified Files:
        linked_list.c mem.c msgs.c obj.c objpair.c 


Log Message:
Wed Jul 21 18:16:43 2004                        Michael Jennings (mej)

Mmmm, beefy.
----------------------------------------------------------------------

===================================================================
RCS file: /cvsroot/enlightenment/eterm/libast/src/linked_list.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -3 -r1.24 -r1.25
--- linked_list.c       20 Jul 2004 22:32:08 -0000      1.24
+++ linked_list.c       21 Jul 2004 22:17:49 -0000      1.25
@@ -21,7 +21,7 @@
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 
-static const char cvs_ident[] = "$Id: linked_list.c,v 1.24 2004/07/20 22:32:08 mej 
Exp $";
+static const char cvs_ident[] = "$Id: linked_list.c,v 1.25 2004/07/21 22:17:49 mej 
Exp $";
 
 #ifdef HAVE_CONFIG_H
 # include <config.h>
@@ -264,15 +264,16 @@
     }
 
     memset(tmp, ' ', indent);
-    snprintf(tmp + indent, sizeof(tmp) - indent, "(spif_linked_list_item_t) %s (%9p 
-> %9p):  ",
-             name, self, self->next);
+    snprintf(SPIF_CAST_C(char *) tmp + indent, sizeof(tmp) - indent,
+             "(spif_linked_list_item_t) %s (%9p -> %9p):  ",
+             name, SPIF_CAST(ptr) self, SPIF_CAST(ptr) self->next);
     if (SPIF_STR_ISNULL(buff)) {
         buff = spif_str_new_from_ptr(tmp);
     } else {
         spif_str_append_from_ptr(buff, tmp);
     }
     if (SPIF_LINKED_LIST_ITEM_ISNULL(self->data)) {
-        spif_str_append_from_ptr(buff, SPIF_NULLSTR_TYPE(obj) "\n");
+        spif_str_append_from_ptr(buff, SPIF_CAST(charptr) SPIF_NULLSTR_TYPE(obj) 
"\n");
     } else {
         buff = SPIF_OBJ_SHOW(self->data, buff, 0);
     }
@@ -307,8 +308,8 @@
     return SPIF_OBJ_CLASSNAME(self);
 }
 
-SPIF_DEFINE_PROPERTY_FUNC(linked_list_item, obj, data);
-SPIF_DEFINE_PROPERTY_FUNC_NONOBJ(linked_list_item, linked_list_item, next);
+SPIF_DEFINE_PROPERTY_FUNC(linked_list_item, obj, data)
+SPIF_DEFINE_PROPERTY_FUNC_NONOBJ(linked_list_item, linked_list_item, next)
 
 
 static spif_linked_list_t
@@ -431,27 +432,29 @@
     }
 
     memset(tmp, ' ', indent);
-    snprintf(tmp + indent, sizeof(tmp) - indent, "(spif_linked_list_t) %s:  %10p 
{\n", name, self);
+    snprintf(SPIF_CAST_C(char *) tmp + indent, sizeof(tmp) - indent,
+             "(spif_linked_list_t) %s:  %10p {\n", name, SPIF_CAST(ptr) self);
     if (SPIF_STR_ISNULL(buff)) {
         buff = spif_str_new_from_ptr(tmp);
     } else {
         spif_str_append_from_ptr(buff, tmp);
     }
 
-    snprintf(tmp + indent, sizeof(tmp) - indent, "  len:  %lu\n", 
SPIF_CAST_C(unsigned long) self->len);
+    snprintf(SPIF_CAST_C(char *) tmp + indent, sizeof(tmp) - indent, "  len:  %lu\n",
+             SPIF_CAST_C(unsigned long) self->len);
     spif_str_append_from_ptr(buff, tmp);
 
     if (SPIF_LINKED_LIST_ITEM_ISNULL(self->head)) {
-        spif_str_append_from_ptr(buff, SPIF_NULLSTR_TYPE(obj) "\n");
+        spif_str_append_from_ptr(buff, SPIF_CAST(charptr) SPIF_NULLSTR_TYPE(obj) 
"\n");
     } else {
         for (current = self->head, i = 0; current; current = current->next, i++) {
-            sprintf(tmp, "item %d", i);
+            sprintf(SPIF_CAST_C(char *) tmp, "item %d", i);
             buff = spif_linked_list_item_show(current, tmp, buff, indent + 2);
         }
     }
 
     memset(tmp, ' ', indent);
-    snprintf(tmp + indent, sizeof(tmp) - indent, "}\n");
+    snprintf(SPIF_CAST_C(char *) tmp + indent, sizeof(tmp) - indent, "}\n");
     spif_str_append_from_ptr(buff, tmp);
     return buff;
 }
@@ -959,8 +962,8 @@
     return tmp;
 }
 
-SPIF_DEFINE_PROPERTY_FUNC_NONOBJ(linked_list, listidx, len);
-SPIF_DEFINE_PROPERTY_FUNC_NONOBJ(linked_list, linked_list_item, head);
+SPIF_DEFINE_PROPERTY_FUNC_NONOBJ(linked_list, listidx, len)
+SPIF_DEFINE_PROPERTY_FUNC_NONOBJ(linked_list, linked_list_item, head)
 
 
 static spif_linked_list_iterator_t
@@ -1021,17 +1024,19 @@
     }
 
     memset(tmp, ' ', indent);
-    snprintf(tmp + indent, sizeof(tmp) - indent, "(spif_linked_list_iterator_t) %s:  
%10p {\n", name, self);
+    snprintf(SPIF_CAST_C(char *) tmp + indent, sizeof(tmp) - indent,
+             "(spif_linked_list_iterator_t) %s:  %10p {\n",
+             name, SPIF_CAST(ptr) self);
     if (SPIF_STR_ISNULL(buff)) {
         buff = spif_str_new_from_ptr(tmp);
     } else {
         spif_str_append_from_ptr(buff, tmp);
     }
 
-    buff = spif_linked_list_show(self->subject, "subject", buff, indent + 2);
-    buff = spif_linked_list_item_show(self->current, "current", buff, indent + 2);
+    buff = spif_linked_list_show(self->subject, SPIF_CAST(charptr) "subject", buff, 
indent + 2);
+    buff = spif_linked_list_item_show(self->current, SPIF_CAST(charptr) "current", 
buff, indent + 2);
 
-    snprintf(tmp + indent, sizeof(tmp) - indent, "}\n");
+    snprintf(SPIF_CAST_C(char *) tmp + indent, sizeof(tmp) - indent, "}\n");
     spif_str_append_from_ptr(buff, tmp);
     return buff;
 }
@@ -1090,5 +1095,5 @@
     return tmp;
 }
 
-SPIF_DEFINE_PROPERTY_FUNC(linked_list_iterator, linked_list, subject);
-SPIF_DEFINE_PROPERTY_FUNC_NONOBJ(linked_list_iterator, linked_list_item, current);
+SPIF_DEFINE_PROPERTY_FUNC(linked_list_iterator, linked_list, subject)
+SPIF_DEFINE_PROPERTY_FUNC_NONOBJ(linked_list_iterator, linked_list_item, current)
===================================================================
RCS file: /cvsroot/enlightenment/eterm/libast/src/mem.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -3 -r1.22 -r1.23
--- mem.c       29 Jun 2004 21:26:18 -0000      1.22
+++ mem.c       21 Jul 2004 22:17:50 -0000      1.23
@@ -28,11 +28,11 @@
  * This file contains the memory management subsystem.
  *
  * @author Michael Jennings <[EMAIL PROTECTED]>
- * $Revision: 1.22 $
- * $Date: 2004/06/29 21:26:18 $
+ * $Revision: 1.23 $
+ * $Date: 2004/07/21 22:17:50 $
  */
 
-static const char cvs_ident[] = "$Id: mem.c,v 1.22 2004/06/29 21:26:18 mej Exp $";
+static const char cvs_ident[] = "$Id: mem.c,v 1.23 2004/07/21 22:17:50 mej Exp $";
 
 #ifdef HAVE_CONFIG_H
 # include <config.h>
@@ -40,10 +40,10 @@
 
 #include "libast_internal.h"
 
-static void memrec_add_var(memrec_t *, const char *, unsigned long, void *, size_t);
+static void memrec_add_var(memrec_t *, const spif_charptr_t, unsigned long, void *, 
size_t);
 static ptr_t *memrec_find_var(memrec_t *, const void *);
-static void memrec_rem_var(memrec_t *, const char *, const char *, unsigned long, 
const void *);
-static void memrec_chg_var(memrec_t *, const char *, const char *, unsigned long, 
const void *, void *, size_t);
+static void memrec_rem_var(memrec_t *, const spif_charptr_t, const spif_charptr_t, 
unsigned long, const void *);
+static void memrec_chg_var(memrec_t *, const spif_charptr_t, const spif_charptr_t, 
unsigned long, const void *, void *, size_t);
 static void memrec_dump_pointers(memrec_t *);
 static void memrec_dump_resources(memrec_t *);
 
@@ -142,7 +142,7 @@
  * @ingroup DOXGRP_MEM
  */
 static void
-memrec_add_var(memrec_t *memrec, const char *filename, unsigned long line, void *ptr, 
size_t size)
+memrec_add_var(memrec_t *memrec, const spif_charptr_t filename, unsigned long line, 
void *ptr, size_t size)
 {
     register ptr_t *p;
 
@@ -211,7 +211,7 @@
  * @ingroup DOXGRP_MEM
  */
 static void
-memrec_rem_var(memrec_t *memrec, const char *var, const char *filename, unsigned long 
line, const void *ptr)
+memrec_rem_var(memrec_t *memrec, const spif_charptr_t var, const spif_charptr_t 
filename, unsigned long line, const void *ptr)
 {
     register ptr_t *p;
 
@@ -252,7 +252,7 @@
  * @ingroup DOXGRP_MEM
  */
 static void
-memrec_chg_var(memrec_t *memrec, const char *var, const char *filename, unsigned long 
line, const void *oldp, void *newp, size_t size)
+memrec_chg_var(memrec_t *memrec, const spif_charptr_t var, const spif_charptr_t 
filename, unsigned long line, const void *oldp, void *newp, size_t size)
 {
     register ptr_t *p;
 
@@ -290,10 +290,10 @@
     register ptr_t *p;
     unsigned long i, j, k, l, total = 0;
     unsigned long len;
-    unsigned char buff[9];
+    spif_char_t buff[9];
 
     ASSERT(memrec != NULL);
-    fprintf(LIBAST_DEBUG_FD, "PTR:  %lu pointers stored.\n", memrec->cnt);
+    fprintf(LIBAST_DEBUG_FD, "PTR:  %lu pointers stored.\n", SPIF_CAST_C(unsigned 
long) memrec->cnt);
     fprintf(LIBAST_DEBUG_FD,
             "PTR:   Pointer |       Filename       |  Line  |  Address |  Size  | 
Offset  | 00 01 02 03 04 05 06 07 |  ASCII  \n");
     fprintf(LIBAST_DEBUG_FD,
@@ -304,12 +304,14 @@
 
     /* First, dump the contents of the memrec->ptrs[] array. */
     for (p = memrec->ptrs, j = 0; j < len; j += 8) {
-        fprintf(LIBAST_DEBUG_FD, "PTR:   %07lu | %20s | %6lu | %10p | %06lu | %07x | 
", (unsigned long) 0, "", (unsigned long) 0,
-                memrec->ptrs, (unsigned long) (sizeof(ptr_t) * memrec->cnt), 
(unsigned int) j);
+        fprintf(LIBAST_DEBUG_FD, "PTR:   %07lu | %20s | %6lu | %10p | %06lu | %07x | 
",
+                (unsigned long) 0, "", (unsigned long) 0,
+                SPIF_CAST(ptr) memrec->ptrs,
+                (unsigned long) (sizeof(ptr_t) * memrec->cnt), (unsigned int) j);
         /* l is the number of characters we're going to output */
         l = ((len - j < 8) ? (len - j) : (8));
         /* Copy l bytes (up to 8) from memrec->ptrs[] (p) to buffer */
-        memcpy(buff, ((char *) p) + j, l);
+        memcpy(buff, ((spif_charptr_t) p) + j, l);
         buff[l] = 0;
         for (k = 0; k < l; k++) {
             fprintf(LIBAST_DEBUG_FD, "%02x ", buff[k]);
@@ -319,7 +321,7 @@
             fprintf(LIBAST_DEBUG_FD, "   ");
         }
         /* Finally, print the printable ASCII string for those l bytes */
-        fprintf(LIBAST_DEBUG_FD, "| %-8s\n", spiftool_safe_str((char *) buff, l));
+        fprintf(LIBAST_DEBUG_FD, "| %-8s\n", spiftool_safe_str((spif_charptr_t) buff, 
l));
         /* Flush after every line in case we crash */
         fflush(LIBAST_DEBUG_FD);
     }
@@ -329,12 +331,13 @@
         /* Add this pointer's size to our total */
         total += p->size;
         for (j = 0; j < p->size; j += 8) {
-            fprintf(LIBAST_DEBUG_FD, "PTR:   %07lu | %20s | %6lu | %10p | %06lu | 
%07x | ", i + 1, NONULL(p->file), p->line, p->ptr,
-                    (unsigned long) p->size, (unsigned int) j);
+            fprintf(LIBAST_DEBUG_FD, "PTR:   %07lu | %20s | %6lu | %10p | %06lu | 
%07x | ",
+                    i + 1, NONULL(p->file), SPIF_CAST_C(unsigned long) p->line,
+                    p->ptr, SPIF_CAST_C(unsigned long) p->size, SPIF_CAST_C(unsigned) 
j);
             /* l is the number of characters we're going to output */
             l = ((p->size - j < 8) ? (p->size - j) : (8));
             /* Copy l bytes (up to 8) from p->ptr to buffer */
-            memcpy(buff, ((char *) p->ptr) + j, l);
+            memcpy(buff, ((spif_charptr_t) p->ptr) + j, l);
             buff[l] = 0;
             for (k = 0; k < l; k++) {
                 fprintf(LIBAST_DEBUG_FD, "%02x ", buff[k]);
@@ -344,7 +347,7 @@
                 fprintf(LIBAST_DEBUG_FD, "   ");
             }
             /* Finally, print the printable ASCII string for those l bytes */
-            fprintf(LIBAST_DEBUG_FD, "| %-8s\n", spiftool_safe_str((char *) buff, l));
+            fprintf(LIBAST_DEBUG_FD, "| %-8s\n", spiftool_safe_str(buff, l));
             /* Flush after every line in case we crash */
             fflush(LIBAST_DEBUG_FD);
         }
@@ -374,7 +377,8 @@
 
     ASSERT(memrec != NULL);
     len = memrec->cnt;
-    fprintf(LIBAST_DEBUG_FD, "RES:  %lu resources stored.\n", memrec->cnt);
+    fprintf(LIBAST_DEBUG_FD, "RES:  %lu resources stored.\n",
+            SPIF_CAST_C(unsigned long) memrec->cnt);
     fprintf(LIBAST_DEBUG_FD, "RES:   Index | Resource ID |       Filename       |  
Line  |  Size  \n");
     fprintf(LIBAST_DEBUG_FD, "RES:  
-------+-------------+----------------------+--------+--------\n");
     fflush(LIBAST_DEBUG_FD);
@@ -382,11 +386,13 @@
     for (p = memrec->ptrs, i = 0, total = 0; i < len; i++, p++) {
         total += p->size;
         fprintf(LIBAST_DEBUG_FD, "RES:   %5lu |  0x%08lx | %20s | %6lu | %6lu\n",
-                i, (unsigned long) p->ptr, NONULL(p->file), p->line, (unsigned long) 
p->size);
+                i, SPIF_CAST_C(unsigned long) p->ptr, NONULL(p->file),
+                SPIF_CAST_C(unsigned long) p->line,
+                SPIF_CAST_C(unsigned long) p->size);
         /* Flush after every line in case we crash */
         fflush(LIBAST_DEBUG_FD);
     }
-    fprintf(LIBAST_DEBUG_FD, "RES:  Total size: %lu bytes\n", total);
+    fprintf(LIBAST_DEBUG_FD, "RES:  Total size: %lu bytes\n", SPIF_CAST_C(unsigned 
long) total);
     fflush(LIBAST_DEBUG_FD);
 }
 
@@ -411,7 +417,7 @@
  * @ingroup DOXGRP_MEM
  */
 void *
-spifmem_malloc(const char *filename, unsigned long line, size_t size)
+spifmem_malloc(const spif_charptr_t filename, unsigned long line, size_t size)
 {
     void *temp;
 
@@ -427,7 +433,7 @@
     temp = (void *) malloc(size);
     ASSERT_RVAL(!SPIF_PTR_ISNULL(temp), SPIF_NULL_TYPE(ptr));
     if (DEBUG_LEVEL >= DEBUG_MEM) {
-        memrec_add_var(&malloc_rec, NONULL(filename), line, temp, size);
+        memrec_add_var(&malloc_rec, SPIF_CAST(charptr) NONULL(filename), line, temp, 
size);
     }
     return (temp);
 }
@@ -453,7 +459,7 @@
  * @ingroup DOXGRP_MEM
  */
 void *
-spifmem_realloc(const char *var, const char *filename, unsigned long line, void *ptr, 
size_t size)
+spifmem_realloc(const spif_charptr_t var, const spif_charptr_t filename, unsigned 
long line, void *ptr, size_t size)
 {
     void *temp;
 
@@ -474,7 +480,7 @@
         temp = (void *) realloc(ptr, size);
         ASSERT_RVAL(!SPIF_PTR_ISNULL(temp), SPIF_NULL_TYPE(ptr));
         if (DEBUG_LEVEL >= DEBUG_MEM) {
-            memrec_chg_var(&malloc_rec, var, NONULL(filename), line, ptr, temp, size);
+            memrec_chg_var(&malloc_rec, var, SPIF_CAST(charptr) NONULL(filename), 
line, ptr, temp, size);
         }
     }
     return (temp);
@@ -501,7 +507,7 @@
  * @ingroup DOXGRP_MEM
  */
 void *
-spifmem_calloc(const char *filename, unsigned long line, size_t count, size_t size)
+spifmem_calloc(const spif_charptr_t filename, unsigned long line, size_t count, 
size_t size)
 {
     void *temp;
 
@@ -516,7 +522,7 @@
     temp = (void *) calloc(count, size);
     ASSERT_RVAL(!SPIF_PTR_ISNULL(temp), SPIF_NULL_TYPE(ptr));
     if (DEBUG_LEVEL >= DEBUG_MEM) {
-        memrec_add_var(&malloc_rec, NONULL(filename), line, temp, size * count);
+        memrec_add_var(&malloc_rec, SPIF_CAST(charptr) NONULL(filename), line, temp, 
size * count);
     }
     return (temp);
 }
@@ -538,7 +544,7 @@
  * @ingroup DOXGRP_MEM
  */
 void
-spifmem_free(const char *var, const char *filename, unsigned long line, void *ptr)
+spifmem_free(const spif_charptr_t var, const spif_charptr_t filename, unsigned long 
line, void *ptr)
 {
 #if MALLOC_CALL_DEBUG
     ++free_count;
@@ -550,7 +556,7 @@
     D_MEM(("Variable %s (%10p) at %s:%lu\n", var, ptr, NONULL(filename), line));
     if (ptr) {
         if (DEBUG_LEVEL >= DEBUG_MEM) {
-            memrec_rem_var(&malloc_rec, var, NONULL(filename), line, ptr);
+            memrec_rem_var(&malloc_rec, var, SPIF_CAST(charptr) NONULL(filename), 
line, ptr);
         }
         free(ptr);
     } else {
@@ -575,20 +581,20 @@
  * @see @link DOXGRP_MEM Memory Management Subsystem @endlink, STRDUP()
  * @ingroup DOXGRP_MEM
  */
-char *
-spifmem_strdup(const char *var, const char *filename, unsigned long line, const char 
*str)
+spif_charptr_t 
+spifmem_strdup(const spif_charptr_t var, const spif_charptr_t filename, unsigned long 
line, const spif_charptr_t str)
 {
-    register char *newstr;
+    register spif_charptr_t newstr;
     register size_t len;
 
-    ASSERT_RVAL(!SPIF_PTR_ISNULL(str), SPIF_NULL_TYPE_C(char *));
+    ASSERT_RVAL(!SPIF_PTR_ISNULL(str), SPIF_NULL_TYPE_C(spif_charptr_t));
     USE_VAR(var);
     D_MEM(("Variable %s (%10p) at %s:%lu\n", var, str, NONULL(filename), line));
 
-    len = strlen(str) + 1;      /* Copy NUL byte also */
-    newstr = (char *) spifmem_malloc(NONULL(filename), line, len);
+    len = strlen(SPIF_CAST_C(char *) str) + 1;      /* Copy NUL byte also */
+    newstr = SPIF_CAST(charptr) spifmem_malloc(SPIF_CAST(charptr) NONULL(filename), 
line, len);
     ASSERT_RVAL(!SPIF_PTR_ISNULL(newstr), SPIF_NULL_TYPE(ptr));
-    strcpy(newstr, str);
+    strcpy(SPIF_CAST_C(char *) newstr, SPIF_CAST_C(char *) str);
     return (newstr);
 }
 
@@ -634,7 +640,7 @@
  * @ingroup DOXGRP_MEM
  */
 Pixmap
-spifmem_x_create_pixmap(const char *filename, unsigned long line, Display * d, 
Drawable win, unsigned int w, unsigned int h,
+spifmem_x_create_pixmap(const spif_charptr_t filename, unsigned long line, Display * 
d, Drawable win, unsigned int w, unsigned int h,
                        unsigned int depth)
 {
     Pixmap p;
@@ -644,7 +650,7 @@
     p = XCreatePixmap(d, win, w, h, depth);
     ASSERT_RVAL(p != None, None);
     if (DEBUG_LEVEL >= DEBUG_MEM) {
-        memrec_add_var(&pixmap_rec, NONULL(filename), line, (void *) p, w * h * 
(depth / 8));
+        memrec_add_var(&pixmap_rec, SPIF_CAST(charptr) NONULL(filename), line, (void 
*) p, w * h * (depth / 8));
     }
     return (p);
 }
@@ -667,12 +673,12 @@
  * @ingroup DOXGRP_MEM
  */
 void
-spifmem_x_free_pixmap(const char *var, const char *filename, unsigned long line, 
Display * d, Pixmap p)
+spifmem_x_free_pixmap(const spif_charptr_t var, const spif_charptr_t filename, 
unsigned long line, Display * d, Pixmap p)
 {
     D_MEM(("Freeing pixmap %s (0x%08x) at %s:%lu\n", var, p, NONULL(filename), line));
     if (p) {
         if (DEBUG_LEVEL >= DEBUG_MEM) {
-            memrec_rem_var(&pixmap_rec, var, NONULL(filename), line, (void *) p);
+            memrec_rem_var(&pixmap_rec, var, SPIF_CAST(charptr) NONULL(filename), 
line, (void *) p);
         }
         XFreePixmap(d, p);
     } else {
@@ -698,14 +704,14 @@
  * @ingroup DOXGRP_MEM
  */
 void
-spifmem_imlib_register_pixmap(const char *var, const char *filename, unsigned long 
line, Pixmap p)
+spifmem_imlib_register_pixmap(const spif_charptr_t var, const spif_charptr_t 
filename, unsigned long line, Pixmap p)
 {
     USE_VAR(var);
     D_MEM(("Registering pixmap %s (0x%08x) created by Imlib2 at %s:%lu\n", var, p, 
NONULL(filename), line));
     if (p) {
         if (DEBUG_LEVEL >= DEBUG_MEM) {
             if (!memrec_find_var(&pixmap_rec, (void *) p)) {
-                memrec_add_var(&pixmap_rec, NONULL(filename), line, (void *) p, 1);
+                memrec_add_var(&pixmap_rec, SPIF_CAST(charptr) NONULL(filename), 
line, (void *) p, 1);
             } else {
                 D_MEM(("Pixmap 0x%08x already registered.\n"));
             }
@@ -733,12 +739,12 @@
  * @ingroup DOXGRP_MEM
  */
 void
-spifmem_imlib_free_pixmap(const char *var, const char *filename, unsigned long line, 
Pixmap p)
+spifmem_imlib_free_pixmap(const spif_charptr_t var, const spif_charptr_t filename, 
unsigned long line, Pixmap p)
 {
     D_MEM(("Freeing pixmap %s (0x%08x) at %s:%lu using Imlib2\n", var, p, 
NONULL(filename), line));
     if (p) {
         if (DEBUG_LEVEL >= DEBUG_MEM) {
-            memrec_rem_var(&pixmap_rec, var, NONULL(filename), line, (void *) p);
+            memrec_rem_var(&pixmap_rec, var, SPIF_CAST(charptr) NONULL(filename), 
line, (void *) p);
         }
         imlib_free_pixmap_and_mask(p);
     } else {
@@ -788,7 +794,7 @@
  * @ingroup DOXGRP_MEM
  */
 GC
-spifmem_x_create_gc(const char *filename, unsigned long line, Display * d, Drawable 
win, unsigned long mask, XGCValues * gcv)
+spifmem_x_create_gc(const spif_charptr_t filename, unsigned long line, Display * d, 
Drawable win, unsigned long mask, XGCValues * gcv)
 {
     GC gc;
 
@@ -797,7 +803,7 @@
     gc = XCreateGC(d, win, mask, gcv);
     ASSERT_RVAL(gc != None, None);
     if (DEBUG_LEVEL >= DEBUG_MEM) {
-        memrec_add_var(&gc_rec, NONULL(filename), line, (void *) gc, 
sizeof(XGCValues));
+        memrec_add_var(&gc_rec, SPIF_CAST(charptr) NONULL(filename), line, (void *) 
gc, sizeof(XGCValues));
     }
     return (gc);
 }
@@ -820,12 +826,12 @@
  * @ingroup DOXGRP_MEM
  */
 void
-spifmem_x_free_gc(const char *var, const char *filename, unsigned long line, Display 
* d, GC gc)
+spifmem_x_free_gc(const spif_charptr_t var, const spif_charptr_t filename, unsigned 
long line, Display * d, GC gc)
 {
     D_MEM(("spifmem_x_free_gc() called for variable %s (0x%08x) at %s:%lu\n", var, 
gc, NONULL(filename), line));
     if (gc) {
         if (DEBUG_LEVEL >= DEBUG_MEM) {
-            memrec_rem_var(&gc_rec, var, NONULL(filename), line, (void *) gc);
+            memrec_rem_var(&gc_rec, var, SPIF_CAST(charptr) NONULL(filename), line, 
(void *) gc);
         }
         XFreeGC(d, gc);
     } else {
===================================================================
RCS file: /cvsroot/enlightenment/eterm/libast/src/msgs.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- msgs.c      3 Feb 2004 23:16:59 -0000       1.9
+++ msgs.c      21 Jul 2004 22:17:50 -0000      1.10
@@ -29,11 +29,11 @@
  * error messages to the end user.
  *
  * @author Michael Jennings <[EMAIL PROTECTED]>
- * $Revision: 1.9 $
- * $Date: 2004/02/03 23:16:59 $
+ * $Revision: 1.10 $
+ * $Date: 2004/07/21 22:17:50 $
  */
 
-static const char cvs_ident[] = "$Id: msgs.c,v 1.9 2004/02/03 23:16:59 mej Exp $";
+static const char cvs_ident[] = "$Id: msgs.c,v 1.10 2004/07/21 22:17:50 mej Exp $";
 
 #ifdef HAVE_CONFIG_H
 # include <config.h>
@@ -49,7 +49,7 @@
  * some built-in functions.  This variable must be set using the
  * libast_set_program_name() function.
  */
-char *libast_program_name = PACKAGE;
+spif_charptr_t libast_program_name = SPIF_CAST(charptr) PACKAGE;
 /**
  * Program version.
  *
@@ -58,7 +58,7 @@
  * number checking and some built-in functions.  This variable must be
  * set using the libast_set_program_version() function.
  */
-char *libast_program_version = VERSION;
+spif_charptr_t libast_program_version = SPIF_CAST(charptr) VERSION;
 
 /**
  * Sets the program name.
@@ -75,17 +75,17 @@
 libast_set_program_name(const char *progname)
 {
     if (libast_program_name) {
-        if (!strcmp(libast_program_name, progname)) {
+        if (!strcmp(SPIF_CAST_C(char *) libast_program_name, progname)) {
             return;
         }
-        if (strcmp(libast_program_name, PACKAGE)) {
+        if (strcmp(SPIF_CAST_C(char *) libast_program_name, PACKAGE)) {
             FREE(libast_program_name);
         }
     }
     if (progname) {
-        libast_program_name = STRDUP(progname);
+        libast_program_name = SPIF_CAST(charptr) STRDUP(progname);
     } else {
-        libast_program_name = PACKAGE;
+        libast_program_name = SPIF_CAST(charptr) PACKAGE;
     }
 }
 
@@ -104,17 +104,17 @@
 libast_set_program_version(const char *progversion)
 {
     if (libast_program_version) {
-        if (!strcmp(libast_program_version, progversion)) {
+        if (!strcmp(SPIF_CAST_C(char *) libast_program_version, progversion)) {
             return;
         }
-        if (strcmp(libast_program_version, VERSION)) {
+        if (strcmp(SPIF_CAST_C(char *) libast_program_version, VERSION)) {
             FREE(libast_program_version);
         }
     }
     if (progversion) {
-        libast_program_version = STRDUP(progversion);
+        libast_program_version = SPIF_CAST(charptr) STRDUP(progversion);
     } else {
-        libast_program_version = VERSION;
+        libast_program_version = SPIF_CAST(charptr) VERSION;
     }
 }
 
===================================================================
RCS file: /cvsroot/enlightenment/eterm/libast/src/obj.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -3 -r1.25 -r1.26
--- obj.c       20 Jul 2004 22:32:08 -0000      1.25
+++ obj.c       21 Jul 2004 22:17:50 -0000      1.26
@@ -28,11 +28,11 @@
  * This file contains the basic object class.
  *
  * @author Michael Jennings <[EMAIL PROTECTED]>
- * $Revision: 1.25 $
- * $Date: 2004/07/20 22:32:08 $
+ * $Revision: 1.26 $
+ * $Date: 2004/07/21 22:17:50 $
  */
 
-static const char cvs_ident[] = "$Id: obj.c,v 1.25 2004/07/20 22:32:08 mej Exp $";
+static const char cvs_ident[] = "$Id: obj.c,v 1.26 2004/07/21 22:17:50 mej Exp $";
 
 #ifdef HAVE_CONFIG_H
 # include <config.h>
@@ -249,7 +249,9 @@
     }
 
     memset(tmp, ' ', indent);
-    snprintf(tmp + indent, sizeof(tmp) - indent, "(spif_obj_t) %s:  %10p \"%s\"\n", 
name, self, SPIF_OBJ_CLASSNAME(self));
+    snprintf(SPIF_CAST_C(char *) tmp + indent, sizeof(tmp) - indent,
+             "(spif_obj_t) %s:  %10p \"%s\"\n",
+             name, SPIF_CAST(ptr) self, SPIF_OBJ_CLASSNAME(self));
     if (SPIF_STR_ISNULL(buff)) {
         buff = spif_str_new_from_ptr(tmp);
     } else {
@@ -388,7 +390,7 @@
 spif_obj_set_class(spif_obj_t self, spif_class_t cls)
 {
     ASSERT_RVAL(!SPIF_OBJ_ISNULL(self), FALSE);
-    SPIF_OBJ_CLASS(self) = cls;
+    SPIF_OBJ(self)->cls = cls;
     return TRUE;
 }
 
===================================================================
RCS file: /cvsroot/enlightenment/eterm/libast/src/objpair.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- objpair.c   20 Jul 2004 22:32:08 -0000      1.8
+++ objpair.c   21 Jul 2004 22:17:50 -0000      1.9
@@ -28,11 +28,11 @@
  * This file contains the objpair class.
  *
  * @author Michael Jennings <[EMAIL PROTECTED]>
- * $Revision: 1.8 $
- * $Date: 2004/07/20 22:32:08 $
+ * $Revision: 1.9 $
+ * $Date: 2004/07/21 22:17:50 $
  */
 
-static const char cvs_ident[] = "$Id: objpair.c,v 1.8 2004/07/20 22:32:08 mej Exp $";
+static const char cvs_ident[] = "$Id: objpair.c,v 1.9 2004/07/21 22:17:50 mej Exp $";
 
 #ifdef HAVE_CONFIG_H
 # include <config.h>
@@ -375,7 +375,9 @@
     }
 
     memset(tmp, ' ', indent);
-    snprintf(tmp + indent, sizeof(tmp) - indent, "(spif_objpair_t) %s:  %10p 
\"%s\"\n", name, self, SPIF_OBJ_CLASSNAME(self));
+    snprintf(SPIF_CAST_C(char *) tmp + indent, sizeof(tmp) - indent,
+             "(spif_objpair_t) %s:  %10p \"%s\"\n",
+             name, SPIF_CAST(ptr) self, SPIF_OBJ_CLASSNAME(self));
     if (SPIF_STR_ISNULL(buff)) {
         buff = spif_str_new_from_ptr(tmp);
     } else {
@@ -447,6 +449,6 @@
     return SPIF_OBJ_CLASSNAME(SPIF_OBJ(self));
 }
 
-SPIF_DEFINE_PROPERTY_FUNC(objpair, obj, key);
-SPIF_DEFINE_PROPERTY_FUNC(objpair, obj, value);
+SPIF_DEFINE_PROPERTY_FUNC(objpair, obj, key)
+SPIF_DEFINE_PROPERTY_FUNC(objpair, obj, value)
 /[EMAIL PROTECTED]/




-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to