Enlightenment CVS committal

Author  : gilbertt
Project : misc
Module  : giblib

Dir     : misc/giblib/giblib


Modified Files:
        Makefile.am gib_btree.c gib_debug.h gib_hash.c gib_imlib.c 
        gib_list.c gib_queue.c gib_stack.c gib_style.c gib_utils.c 
        gib_utils.h 


Log Message:

Tue Feb 25 13:03:01 GMT 2003  Tom Gilbert <[EMAIL PROTECTED]>

  * Fix up e* symbols, prevent clashing when building static.


===================================================================
RCS file: /cvsroot/enlightenment/misc/giblib/giblib/Makefile.am,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- Makefile.am 26 Jan 2002 15:41:03 -0000      1.12
+++ Makefile.am 25 Feb 2003 13:03:51 -0000      1.13
@@ -26,5 +26,5 @@
 
 libgiblib_la_LIBADD = @IMLIB_LIBS@
 libgiblib_la_DEPENDENCIES = giblib_config.h
-libgiblib_la_LDFLAGS = -version-info 1:4:0
+libgiblib_la_LDFLAGS = -version-info 1:5:0
 
===================================================================
RCS file: /cvsroot/enlightenment/misc/giblib/giblib/gib_btree.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- gib_btree.c 12 Nov 2000 10:04:21 -0000      1.2
+++ gib_btree.c 25 Feb 2003 13:03:51 -0000      1.3
@@ -28,7 +28,7 @@
 
 gib_btree *gib_btree_new(void *data, int sort_val)
 {
-       gib_btree *t = _emalloc(sizeof(gib_btree));
+       gib_btree *t = gib_emalloc(sizeof(gib_btree));
        t->data = data;
        t->val = sort_val;
        t->left = NULL;
@@ -40,7 +40,7 @@
 {
        if (tree->left) gib_btree_free(tree->left);
        if (tree->right) gib_btree_free(tree->right);
-       _efree(tree);
+       gib_efree(tree);
        return;
 }
 
@@ -48,21 +48,21 @@
 {
        if (tree->left) gib_btree_free_and_data(tree->left);
        if (tree->right) gib_btree_free_and_data(tree->right);
-       _efree(tree->data);
-       _efree(tree);
+       gib_efree(tree->data);
+       gib_efree(tree);
        return;
 }
 
 void       gib_btree_free_leaf(gib_btree *leaf)
 {
-       _efree(leaf);
+       gib_efree(leaf);
        return;
 }
 
 void       gib_btree_free_leaf_and_data(gib_btree *leaf)
 {
-       _efree(leaf->data);
-       _efree(leaf);
+       gib_efree(leaf->data);
+       gib_efree(leaf);
        return;
 }
 
===================================================================
RCS file: /cvsroot/enlightenment/misc/giblib/giblib/gib_debug.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- gib_debug.h 9 Nov 2000 12:39:15 -0000       1.1
+++ gib_debug.h 25 Feb 2003 13:03:51 -0000      1.2
@@ -30,15 +30,15 @@
 
 #ifdef WITH_DMALLOC
 #include <dmalloc.h>
-#define emalloc(a) malloc(a)
-#define efree(a) free(a)
-#define estrdup(a) strdup(a)
-#define erealloc(a,b) realloc(a,b)
+#define gib_emalloc(a) malloc(a)
+#define gib_efree(a) free(a)
+#define gib_estrdup(a) strdup(a)
+#define gib_erealloc(a,b) realloc(a,b)
 #else
-#define emalloc(a) _emalloc(a)
-#define efree(a) _efree(a)
-#define estrdup(a) _estrdup(a)
-#define erealloc(a,b) _erealloc(a,b)
+#define gib_emalloc(a) _gib_emalloc(a)
+#define gib_efree(a) _gib_efree(a)
+#define gib_estrdup(a) _gib_estrdup(a)
+#define gib_erealloc(a,b) _gib_erealloc(a,b)
 #endif
 
 #endif
===================================================================
RCS file: /cvsroot/enlightenment/misc/giblib/giblib/gib_hash.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- gib_hash.c  12 Nov 2000 10:04:21 -0000      1.3
+++ gib_hash.c  25 Feb 2003 13:03:51 -0000      1.4
@@ -25,11 +25,12 @@
 
 #include "gib_hash.h"
 #include "gib_utils.h"
+#include "gib_debug.h"
 
 gib_hash_node *gib_hash_node_new(char *key, void *data)
 {
-       gib_hash_node *node = _emalloc(sizeof(gib_hash_node));
-       node->key = _estrdup(key);
+       gib_hash_node *node = gib_emalloc(sizeof(gib_hash_node));
+       node->key = gib_estrdup(key);
        GIB_LIST(node)->data = data;
        GIB_LIST(node)->next = NULL;
        GIB_LIST(node)->prev = NULL;
@@ -39,21 +40,21 @@
 
 void           gib_hash_node_free(gib_hash_node *node)
 {
-       _efree(node->key);
-       _efree(node);
+       gib_efree(node->key);
+       gib_efree(node);
        return;
 }
 
 void           gib_hash_node_free_and_data(gib_hash_node *node)
 {
-       _efree(node->list.data);
+       gib_efree(node->list.data);
        gib_hash_node_free(node);
        return;
 }
 
 gib_hash *gib_hash_new()
 {
-       gib_hash *hash = _emalloc(sizeof(gib_hash));
+       gib_hash *hash = gib_emalloc(sizeof(gib_hash));
        hash->base = gib_hash_node_new("__gib_hash_new",NULL);
        return hash;
 }
@@ -61,14 +62,14 @@
 void      gib_hash_free(gib_hash *hash)
 {
        gib_list_free(GIB_LIST(hash->base));
-       _efree(hash);
+       gib_efree(hash);
        return;
 }
 
 void      gib_hash_free_and_data(gib_hash *hash)
 {
        gib_list_free_and_data(GIB_LIST(hash->base));
-       _efree(hash);
+       gib_efree(hash);
        return;
 }
 
===================================================================
RCS file: /cvsroot/enlightenment/misc/giblib/giblib/gib_imlib.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- gib_imlib.c 26 Jan 2002 15:41:03 -0000      1.8
+++ gib_imlib.c 25 Feb 2003 13:03:51 -0000      1.9
@@ -42,47 +42,47 @@
       switch (err)
       {
         case IMLIB_LOAD_ERROR_FILE_DOES_NOT_EXIST:
-           weprintf("%s - File does not exist", filename);
+           gib_weprintf("%s - File does not exist", filename);
            break;
         case IMLIB_LOAD_ERROR_FILE_IS_DIRECTORY:
-           weprintf("%s - Directory specified for image filename", filename);
+           gib_weprintf("%s - Directory specified for image filename", filename);
            break;
         case IMLIB_LOAD_ERROR_PERMISSION_DENIED_TO_READ:
-           weprintf("%s - No read access to directory", filename);
+           gib_weprintf("%s - No read access to directory", filename);
            break;
         case IMLIB_LOAD_ERROR_NO_LOADER_FOR_FILE_FORMAT:
-           weprintf("%s - No Imlib2 loader for that file format", filename);
+           gib_weprintf("%s - No Imlib2 loader for that file format", filename);
            break;
         case IMLIB_LOAD_ERROR_PATH_TOO_LONG:
-           weprintf("%s - Path specified is too long", filename);
+           gib_weprintf("%s - Path specified is too long", filename);
            break;
         case IMLIB_LOAD_ERROR_PATH_COMPONENT_NON_EXISTANT:
-           weprintf("%s - Path component does not exist", filename);
+           gib_weprintf("%s - Path component does not exist", filename);
            break;
         case IMLIB_LOAD_ERROR_PATH_COMPONENT_NOT_DIRECTORY:
-           weprintf("%s - Path component is not a directory", filename);
+           gib_weprintf("%s - Path component is not a directory", filename);
            break;
         case IMLIB_LOAD_ERROR_PATH_POINTS_OUTSIDE_ADDRESS_SPACE:
-           weprintf("%s - Path points outside address space", filename);
+           gib_weprintf("%s - Path points outside address space", filename);
            break;
         case IMLIB_LOAD_ERROR_TOO_MANY_SYMBOLIC_LINKS:
-           weprintf("%s - Too many levels of symbolic links", filename);
+           gib_weprintf("%s - Too many levels of symbolic links", filename);
            break;
         case IMLIB_LOAD_ERROR_OUT_OF_MEMORY:
-           eprintf("While loading %s - Out of memory", filename);
+           gib_eprintf("While loading %s - Out of memory", filename);
            break;
         case IMLIB_LOAD_ERROR_OUT_OF_FILE_DESCRIPTORS:
-           eprintf("While loading %s - Out of file descriptors", filename);
+           gib_eprintf("While loading %s - Out of file descriptors", filename);
            break;
         case IMLIB_LOAD_ERROR_PERMISSION_DENIED_TO_WRITE:
-           weprintf("%s - Cannot write to directory", filename);
+           gib_weprintf("%s - Cannot write to directory", filename);
            break;
         case IMLIB_LOAD_ERROR_OUT_OF_DISK_SPACE:
-           weprintf("%s - Cannot write - out of disk space", filename);
+           gib_weprintf("%s - Cannot write - out of disk space", filename);
            break;
         case IMLIB_LOAD_ERROR_UNKNOWN:
         default:
-           weprintf
+           gib_weprintf
               ("While loading %s - Unknown error. Attempting to continue",
                filename);
            break;
@@ -499,14 +499,14 @@
    if (tmp)
    {
      char *p, *pp;
-     p = estrdup(tmp + 1);
+     p = gib_estrdup(tmp + 1);
      pp = p;
      while(*pp) {
        *pp = tolower(*pp);
        pp++;
      }
      imlib_image_set_format(p);
-     efree(p);
+     gib_efree(p);
    }
    imlib_save_image(file);
 }
@@ -617,7 +617,7 @@
       }
       else
       {
-         weprintf("unable to parse color %s\n", col);
+         gib_weprintf("unable to parse color %s\n", col);
          return;
       }
    }
@@ -627,7 +627,7 @@
       ll = gib_string_split(col, ",");
       if (!ll)
       {
-         weprintf("unable to parse color %s\n", col);
+         gib_weprintf("unable to parse color %s\n", col);
          return;
       }
       len = gib_list_length(ll);
@@ -647,7 +647,7 @@
       }
       else
       {
-         weprintf("unable to parse color %s\n", col);
+         gib_weprintf("unable to parse color %s\n", col);
          return;
       }
    }
@@ -684,10 +684,10 @@
 
    if ((fn = imlib_load_font(name)))
       return fn;
-   weprintf("couldn't load font %s, attempting to fall back to fixed.", name);
+   gib_weprintf("couldn't load font %s, attempting to fall back to fixed.", name);
    if ((fn = imlib_load_font("fixed")))
       return fn;
-   weprintf("failed to even load fixed! Attempting to find any font.");
+   gib_weprintf("failed to even load fixed! Attempting to find any font.");
    return imlib_load_font("*");
 }
 
===================================================================
RCS file: /cvsroot/enlightenment/misc/giblib/giblib/gib_list.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- gib_list.c  17 Feb 2001 03:06:43 -0000      1.5
+++ gib_list.c  25 Feb 2003 13:03:51 -0000      1.6
@@ -33,7 +33,7 @@
 {
    gib_list *l;
 
-   l = (gib_list *) emalloc(sizeof(gib_list));
+   l = (gib_list *) gib_emalloc(sizeof(gib_list));
    l->data = NULL;
    l->next = NULL;
    l->prev = NULL;
@@ -52,7 +52,7 @@
    {
       ll = l;
       l = l->next;
-      efree(ll);
+      gib_efree(ll);
    }
 
    return;
@@ -70,8 +70,8 @@
    {
       ll = l;
       l = l->next;
-      efree(ll->data);
-      efree(ll);
+      gib_efree(ll->data);
+      gib_efree(ll);
    }
    return;
 }
@@ -233,7 +233,7 @@
 {
    root = gib_list_unlink(root, l);
    root = gib_list_add_end(root, l->data);
-   efree(l);
+   gib_efree(l);
 
    return (root);
 }
@@ -349,7 +349,7 @@
    len = gib_list_length(list);
    if (len <= 1)
       return (list);
-   farray = (gib_list **) emalloc(sizeof(gib_list *) * len);
+   farray = (gib_list **) gib_emalloc(sizeof(gib_list *) * len);
    for (f = list, i = 0; f; f = f->next, i++)
    {
       farray[i] = f;
@@ -374,7 +374,7 @@
    }
    f->prev = farray[len - 2];
    f->next = NULL;
-   efree(farray);
+   gib_efree(farray);
    return (list);
 }
 
@@ -416,7 +416,7 @@
 gib_list_remove(gib_list * root, gib_list * l)
 {
    root = gib_list_unlink(root, l);
-   efree(l);
+   gib_efree(l);
    return (root);
 }
 
@@ -551,7 +551,7 @@
          char *new_string;
 
          len = s - string;
-         new_string = emalloc(sizeof(char) * (len + 1));
+         new_string = gib_emalloc(sizeof(char) * (len + 1));
 
          strncpy(new_string, string, len);
          new_string[len] = 0;
@@ -565,7 +565,7 @@
    if (*string)
    {
       n++;
-      string_list = gib_list_add_front(string_list, estrdup((char *)string));
+      string_list = gib_list_add_front(string_list, gib_estrdup((char *)string));
    }
 
    string_list = gib_list_reverse(string_list);
@@ -617,7 +617,7 @@
       }
    }
    else
-      string = estrdup("");
+      string = gib_estrdup("");
    va_end(args);
 
    return string;
===================================================================
RCS file: /cvsroot/enlightenment/misc/giblib/giblib/gib_queue.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- gib_queue.c 12 Nov 2000 11:03:00 -0000      1.2
+++ gib_queue.c 25 Feb 2003 13:03:51 -0000      1.3
@@ -29,7 +29,7 @@
 
 gib_queue *gib_queue_new()
 {
-       gib_queue *q = _emalloc(sizeof(gib_queue));
+       gib_queue *q = gib_emalloc(sizeof(gib_queue));
        q->base = NULL;
        return q;
 }
@@ -37,7 +37,7 @@
 void       gib_queue_free(gib_queue *queue)
 {
        gib_list_free(queue->base);
-       _efree(queue);
+       gib_efree(queue);
        return;
 }
 
@@ -55,7 +55,7 @@
        if (head) {
                data = head->data;
                queue->base = head->next;
-               _efree(head);
+               gib_efree(head);
                return data;
        }
        return NULL;
===================================================================
RCS file: /cvsroot/enlightenment/misc/giblib/giblib/gib_stack.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- gib_stack.c 12 Nov 2000 11:03:00 -0000      1.2
+++ gib_stack.c 25 Feb 2003 13:03:51 -0000      1.3
@@ -29,7 +29,7 @@
 
 gib_stack *gib_stack_new()
 {
-       gib_stack *q = _emalloc(sizeof(gib_stack));
+       gib_stack *q = gib_emalloc(sizeof(gib_stack));
        q->base = NULL;
        return q;
 }
@@ -37,7 +37,7 @@
 void       gib_stack_free(gib_stack *stack)
 {
        gib_list_free(stack->base);
-       _efree(stack);
+       gib_efree(stack);
        return;
 }
 
@@ -55,7 +55,7 @@
        if (head) {
                data = head->data;
                stack->base = head->next;
-               _efree(head);
+               gib_efree(head);
                return data;
        }
        return NULL;
===================================================================
RCS file: /cvsroot/enlightenment/misc/giblib/giblib/gib_style.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- gib_style.c 29 Oct 2001 23:31:28 -0000      1.2
+++ gib_style.c 25 Feb 2003 13:03:51 -0000      1.3
@@ -32,11 +32,11 @@
 {
    gib_style *s = NULL;
 
-   s = emalloc(sizeof(gib_style));
+   s = gib_emalloc(sizeof(gib_style));
 
    memset(s, 0, sizeof(gib_style));
    if (name)
-      s->name = estrdup(name);
+      s->name = gib_estrdup(name);
 
    return (s);
 }
@@ -47,7 +47,7 @@
    if (s)
    {
       if (s->name)
-         efree(s->name);
+         gib_efree(s->name);
       if (s->bits)
       {
          gib_list *l;
@@ -60,7 +60,7 @@
          }
          gib_list_free(s->bits);
       }
-      efree(s);
+      gib_efree(s);
    }
    return;
 }
@@ -70,7 +70,7 @@
 {
    gib_style_bit *sb;
 
-   sb = emalloc(sizeof(gib_style_bit));
+   sb = gib_emalloc(sizeof(gib_style_bit));
    memset(sb, 0, sizeof(gib_style_bit));
 
    sb->x_offset = x_offset;
@@ -87,7 +87,7 @@
 gib_style_bit_free(gib_style_bit * s)
 {
    if (s)
-      efree(s);
+      gib_efree(s);
    return;
 }
 
@@ -105,7 +105,7 @@
 void
 gib_dup_style_bit(void **dest, void *data)
 {
-   *dest = emalloc(sizeof(gib_style_bit));
+   *dest = gib_emalloc(sizeof(gib_style_bit));
    memcpy(*dest, data, sizeof(gib_style_bit));
 
    return;
@@ -166,7 +166,7 @@
             if (current[l] == '\n')
                current[l] = '\0';
             if (l > 6)
-               ret->name = estrdup(current + 6);
+               ret->name = gib_estrdup(current + 6);
             continue;
          }
          else
===================================================================
RCS file: /cvsroot/enlightenment/misc/giblib/giblib/gib_utils.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- gib_utils.c 17 Feb 2001 03:06:43 -0000      1.2
+++ gib_utils.c 25 Feb 2003 13:03:51 -0000      1.3
@@ -28,7 +28,7 @@
 
 /* eprintf: print error message and exit */
 void
-eprintf(char *fmt, ...)
+gib_eprintf(char *fmt, ...)
 {
    va_list args;
 
@@ -47,7 +47,7 @@
 
 /* weprintf: print warning message and continue */
 void
-weprintf(char *fmt, ...)
+gib_weprintf(char *fmt, ...)
 {
    va_list args;
 
@@ -65,51 +65,51 @@
 
 /* estrdup: duplicate a string, report if error */
 char *
-_estrdup(char *s)
+_gib_estrdup(char *s)
 {
    char *t;
    if(!s)
       return NULL;
    t = (char *) malloc(strlen(s) + 1);
    if (t == NULL)
-      eprintf("estrdup(\"%.20s\") failed:", s);
+      gib_eprintf("estrdup(\"%.20s\") failed:", s);
    strcpy(t, s);
    return t;
 }
 
 /* emalloc: malloc and report if error */
 void *
-_emalloc(size_t n)
+_gib_emalloc(size_t n)
 {
    void *p;
 
    p = malloc(n);
    if (p == NULL)
-      eprintf("malloc of %u bytes failed:", n);
+      gib_eprintf("malloc of %u bytes failed:", n);
    return p;
 }
 
 /* erealloc: realloc and report if error */
 void *
-_erealloc(void *ptr, size_t n)
+_gib_erealloc(void *ptr, size_t n)
 {
    void *p;
 
    p = realloc(ptr, n);
    if (p == NULL)
-      eprintf("realloc of %p by %u bytes failed:", ptr, n);
+      gib_eprintf("realloc of %p by %u bytes failed:", ptr, n);
    return p;
 }
 
 /* efree: just do the free for now */
 void
-_efree(void *p)
+_gib_efree(void *p)
 {
    free(p);
 }
 
 char *
-stroflen(char c, int l)
+gib_stroflen(char c, int l)
 {
    static char buf[1024];
    int i = 0;
===================================================================
RCS file: /cvsroot/enlightenment/misc/giblib/giblib/gib_utils.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- gib_utils.h 20 Dec 2000 19:49:56 -0000      1.2
+++ gib_utils.h 25 Feb 2003 13:03:51 -0000      1.3
@@ -39,13 +39,13 @@
 {
 #endif
 
-void eprintf(char *fmt, ...);
-void weprintf(char *fmt, ...);
-char *_estrdup(char *s);
-void *_emalloc(size_t n);
-void _efree(void *p);
-void *_erealloc(void *ptr, size_t n);
-char *stroflen(char c, int l);
+void gib_eprintf(char *fmt, ...);
+void gib_weprintf(char *fmt, ...);
+char *_gib_estrdup(char *s);
+void *_gib_emalloc(size_t n);
+void _gib_efree(void *p);
+void *_gib_erealloc(void *ptr, size_t n);
+char *gib_stroflen(char c, int l);
 
 #ifdef __cplusplus
 }




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to