Remove more alpha problems.
authorGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Mon, 15 Mar 1993 18:38:49 +0000 (18:38 +0000)
committerGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Mon, 15 Mar 1993 18:38:49 +0000 (18:38 +0000)
v7/src/microcode/termcap.c

index 533d4f7a7e40f244a4dd2f776d7af41701559209..eb4fe143020c2370f4b322a15810442e333e2175 100644 (file)
@@ -133,6 +133,15 @@ int bufsize = 128;
 #endif
 
 #ifndef emacs
+
+#ifndef PTR
+# ifdef __STDC__
+#  define PTR void *
+# else
+#  define PTR char *
+# endif /* __STDC__ */
+#endif /* PTR */
+
 static
 memory_out ()
 {
@@ -144,19 +153,19 @@ static int
 xmalloc (size)
      int size;
 {
-  register tem = malloc (size);
-  if (!tem)
+  register PTR tem = malloc (size);
+  if (tem == ((PTR) NULL))
     memory_out ();
   return tem;
 }
 
 static int
 xrealloc (ptr, size)
-     int ptr;
+     PTR ptr;
      int size;
 {
-  register tem = realloc (ptr, size);
-  if (!tem)
+  register PTR tem = realloc (ptr, size);
+  if (tem == ((PTR) NULL))
     memory_out ();
   return tem;
 }