From 84f46c0a00fd1d6c17ccf9a2fa52a68107b16e3a Mon Sep 17 00:00:00 2001 From: "Guillermo J. Rozas" Date: Mon, 15 Mar 1993 18:38:49 +0000 Subject: [PATCH] Remove more alpha problems. --- v7/src/microcode/termcap.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/v7/src/microcode/termcap.c b/v7/src/microcode/termcap.c index 533d4f7a7..eb4fe1430 100644 --- a/v7/src/microcode/termcap.c +++ b/v7/src/microcode/termcap.c @@ -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; } -- 2.25.1