+Sat Mar 4 13:02:09 2000 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * utils.c (mcalloc), defs.h (mcalloc): Keep consistent with
+ "mmalloc.h" which means using PTRs.
+ (init_malloc, msavestring, mstrsave): Convert to PTR free ISO-C.
+
Sat Mar 4 11:49:21 2000 Andrew Cagney <cagney@b1.cygnus.com>
* defs.h (store_address, store_unsigned_integer, store_address):
extern int query (char *, ...) ATTR_FORMAT (printf, 1, 2);
#if !defined (USE_MMALLOC)
-extern PTR mcalloc (void *, size_t, size_t);
+/* NOTE: cagney/2000-03-04: The mmalloc functions need to use PTR
+ rather than void* so that they are consistent with
+ ../mmalloc/mmalloc.h. */
+extern PTR mcalloc (PTR, size_t, size_t);
extern PTR mmalloc (PTR, size_t);
extern PTR mrealloc (PTR, PTR, size_t);
extern void mfree (PTR, PTR);
#if !defined (USE_MMALLOC)
-void *
-mcalloc (void *md, size_t number, size_t size)
+PTR
+mcalloc (PTR md, size_t number, size_t size)
{
return calloc (number, size);
}
#if !defined (USE_MMALLOC) || defined (NO_MMCHECK)
void
-init_malloc (md)
- PTR md;
+init_malloc (void *md)
{
}
#endif
void
-init_malloc (md)
- PTR md;
+init_malloc (void *md)
{
if (!mmcheckf (md, malloc_botch, MMCHECK_FORCE))
{
}
char *
-msavestring (md, ptr, size)
- PTR md;
- const char *ptr;
- int size;
+msavestring (void *md, const char *ptr, int size)
{
register char *p = (char *) xmmalloc (md, size + 1);
memcpy (p, ptr, size);
}
char *
-mstrsave (md, ptr)
- PTR md;
- const char *ptr;
+mstrsave (void *md, const char *ptr)
{
return (msavestring (md, ptr, strlen (ptr)));
}