OSDN Git Service

Add Fariborz to my last change.
[pf3gnuchains/gcc-fork.git] / libiberty / xmalloc.c
index 3fc23a9..c3fe1a8 100644 (file)
@@ -29,13 +29,13 @@ a program to contain @code{#define malloc xmalloc} in its source.
 
 @end deftypefn
 
-@deftypefn Replacement void* xrealloc (void*, size_t)
+@deftypefn Replacement void* xrealloc (void *@var{ptr}, size_t @var{size})
 Reallocate memory without fail.  This routine functions like @code{realloc},
 but will behave the same as @code{xmalloc} if memory cannot be found.
 
 @end deftypefn
 
-@deftypefn Replacement void* xcalloc (size_t, size_t)
+@deftypefn Replacement void* xcalloc (size_t @var{nelem}, size_t @var{elsize})
 
 Allocate memory without fail, and set it to zero.  This routine functions
 like @code{calloc}, but will behave the same as @code{xmalloc} if memory
@@ -68,7 +68,7 @@ function will be called to print an error message and terminate execution.
 
 #include <stdio.h>
 
-#ifdef __STDC__
+#ifdef ANSI_PROTOTYPES
 #include <stddef.h>
 #else
 #define size_t unsigned long
@@ -120,12 +120,12 @@ xmalloc_failed (size)
   else
     allocated = (char *) sbrk (0) - (char *) &environ;
   fprintf (stderr,
-          "\n%s%sCannot allocate %lu bytes after allocating %lu bytes\n",
+          "\n%s%sout of memory allocating %lu bytes after a total of %lu bytes\n",
           name, *name ? ": " : "",
           (unsigned long) size, (unsigned long) allocated);
 #else /* HAVE_SBRK */
   fprintf (stderr,
-          "\n%s%sCannot allocate %lu bytes\n",
+          "\n%s%sout of memory allocating %lu bytes\n",
           name, *name ? ": " : "",
           (unsigned long) size);
 #endif /* HAVE_SBRK */