# include <config.h>
#endif
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-#if HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
+#include <string.h>
+#include <stdlib.h>
#ifdef emacs
# include "lisp.h"
# define ADDRESS_FUNCTION(arg) &(arg)
# endif
-# ifndef POINTER_TYPE
-# ifdef __STDC__
-# define POINTER_TYPE void
-# else
-# define POINTER_TYPE char
-# endif
-# endif
-typedef POINTER_TYPE *pointer;
-
-# ifndef NULL
-# define NULL 0
-# endif
-
/* Define STACK_DIRECTION if you know the direction of stack
growth for your system; otherwise it will be automatically
deduced at run-time.
# define STACK_DIR stack_dir
static void
-find_stack_direction ()
+find_stack_direction (void)
{
static char *addr = NULL; /* Address of first `dummy', once known. */
auto char dummy; /* To get stack address. */
caller, but that method cannot be made to work for some
implementations of C, for example under Gould's UTX/32. */
-pointer
-alloca (size)
- size_t size;
+void *
+alloca (size_t size)
{
auto char probe; /* Probes stack depth: */
register char *depth = ADDRESS_FUNCTION (probe);
{
register header *np = hp->h.next;
- free ((pointer) hp); /* Collect garbage. */
+ free (hp); /* Collect garbage. */
hp = np; /* -> next header. */
}
{
/* Address of header. */
- register pointer new;
+ register void *new;
size_t combined_size = sizeof (header) + size;
if (combined_size < sizeof (header))
/* User storage begins just after header. */
- return (pointer) ((char *) new + sizeof (header));
+ return (void *) ((char *) new + sizeof (header));
}
}