Rewrite portable file reader code and incidentally clean up code for
[pspp-builds.git] / src / alloc.c
index 0dc815f71de75d8beb99abd8b29c13cffd8f6ffe..a0c2fbac5bbf4a79648cb2663f1bcddc99855228 100644 (file)
    02111-1307, USA. */
 
 #include <config.h>
-#include <assert.h>
+#include "alloc.h"
 #include <stdio.h>
 #include <stdlib.h>
+#include "error.h"
 #include "str.h"
-
-static void out_of_memory (void);
 \f
 /* Public functions. */
 
@@ -105,11 +104,9 @@ xstrdup (const char *s)
   memcpy (t, s, size);
   return t;
 }
-\f
-/* Private functions. */
 
 /* Report an out-of-memory condition and abort execution. */
-static void
+void
 out_of_memory (void)
 {
   fprintf (stderr, "virtual memory exhausted\n");