parse [reg], lo(exp), and hi(exp)
[deliverable/binutils-gdb.git] / gas / xmalloc.c
index d5378d530d27bc0d50c280d0e3c12b4de2b22611..d2639a291668a04bfa163f06e4021f6a1888196f 100644 (file)
@@ -16,7 +16,7 @@
 
    You should have received a copy of the GNU General Public License
    along with GAS; see the file COPYING.  If not, write to
-   the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
+   the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 /*
   NAME
   malloc()
 
   */
-#include <stdio.h>
-
-#if __STDC__ == 1
-#include <stdlib.h>
-#else
-#ifdef USG
-#include <malloc.h>
-#else
-char *malloc ();
-#endif /* USG */
-#endif /* not __STDC__ */
+
+#include "as.h"
 
 #define error as_fatal
 
-char *
+PTR
 xmalloc (n)
-     long n;
+     unsigned long n;
 {
-  char *retval;
-  void error ();
+  PTR retval;
 
-  if ((retval = malloc ((unsigned) n)) == NULL)
-    {
-      error ("virtual memory exceeded");
-    }
+  retval = malloc (n);
+  if (retval == NULL)
+    error ("virtual memory exceeded");
   return (retval);
 }
 
+PTR
+xrealloc (ptr, n)
+     register PTR ptr;
+     unsigned long n;
+{
+  ptr = realloc (ptr, n);
+  if (ptr == 0)
+    error ("virtual memory exceeded");
+  return (ptr);
+}
 /* end of xmalloc.c */
This page took 0.024535 seconds and 4 git commands to generate.