Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


Modified Files:
        E.h ipc.c memory.c 


Log Message:
Use unwrapped libc malloc/realloc/free by default.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v
retrieving revision 1.233
retrieving revision 1.234
diff -u -3 -r1.233 -r1.234
--- E.h 26 Mar 2004 21:21:44 -0000      1.233
+++ E.h 26 Mar 2004 21:42:03 -0000      1.234
@@ -35,6 +35,7 @@
 #if HAVE_SETENV
 #define USE_LIBC_SETENV  1     /* Use libc setenv  if present */
 #endif
+#define USE_LIBC_MALLOC  1     /* Use unwrapped libc malloc/realloc/free */
 #define DEBUG_EWMH  0
 
 #include <X11/Xlib.h>
@@ -2697,10 +2698,11 @@
 void                ZoomInit(void);
 void                Zoom(EWin * ewin);
 
-#if defined(USE_LIBC_MALLOC)
+#if USE_LIBC_MALLOC
 
-#define Emalloc malloc
-#define Efree free
+#define Efree       free
+#define Emalloc     malloc
+#define Erealloc    realloc
 
 #elif defined(__FILE__) && defined(__LINE__)
 
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ipc.c,v
retrieving revision 1.146
retrieving revision 1.147
diff -u -3 -r1.146 -r1.147
--- ipc.c       26 Mar 2004 21:21:46 -0000      1.146
+++ ipc.c       26 Mar 2004 21:42:03 -0000      1.147
@@ -4943,7 +4943,9 @@
 static void
 IPC_MemDebug(const char *params, Client * c)
 {
+#if !USE_LIBC_MALLOC
    EDisplayMemUse();
+#endif
 
    params = NULL;
    c = NULL;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/memory.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -3 -r1.35 -r1.36
--- memory.c    20 Mar 2004 15:28:04 -0000      1.35
+++ memory.c    26 Mar 2004 21:42:03 -0000      1.36
@@ -21,6 +21,9 @@
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 #include "E.h"
+#include <time.h>
+
+#if !USE_LIBC_MALLOC
 
 /* uncomment DBUG_MEM to get rudamentary pointer checking                    */
 /* uncomment MEM_OUT to get full debug output. to make this work you have to */
@@ -67,7 +70,7 @@
    PSTK(y, 20); PSTK(y, 21); PSTK(y, 22); PSTK(y, 23); PSTK(y, 24);\
    PSTK(y, 25); PSTK(y, 26); PSTK(y, 27); PSTK(y, 28); PSTK(y, 29);\
    PSTK(y, 30); PSTK(y, 31);\
-end: \
+end:; \
 }
 
 static struct _symtab
@@ -79,7 +82,7 @@
 
 static int          sym_count = 0;
 
-char               *
+static const char  *
 getsym(void *p)
 {
    int                 i;
@@ -113,7 +116,7 @@
             void               *p;
             char                buf[256];
 
-            while (fscanf(f, "%x %*s %250s\n", &p, buf) != EOF)
+            while (fscanf(f, "%p %*s %250s\n", &p, buf) != EOF)
               {
                  sym_count++;
                  sym = realloc(sym, sizeof(struct _symtab) * sym_count);
@@ -391,6 +394,8 @@
 }
 #endif
 
+#endif /* !USE_LIBC_MALLOC */
+
 #if !USE_LIBC_STRDUP
 char               *
 Estrdup(const char *s)




-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to