summaryrefslogtreecommitdiffstats
path: root/games/hack/alloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'games/hack/alloc.c')
-rw-r--r--games/hack/alloc.c48
1 files changed, 0 insertions, 48 deletions
diff --git a/games/hack/alloc.c b/games/hack/alloc.c
deleted file mode 100644
index 13379f6..0000000
--- a/games/hack/alloc.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/* alloc.c - version 1.0.2 */
-/* $FreeBSD$ */
-
-#include <stdlib.h>
-
-#ifdef LINT
-
-/*
- a ridiculous definition, suppressing
- "possible pointer alignment problem" for (long *) malloc()
- "enlarg defined but never used"
- "ftell defined (in <stdio.h>) but never used"
- from lint
-*/
-#include <stdio.h>
-long *
-alloc(n) unsigned n; {
-long dummy = ftell(stderr);
- if(n) dummy = 0; /* make sure arg is used */
- return(&dummy);
-}
-
-#else
-
-long *
-alloc(lth)
-unsigned lth;
-{
- char *ptr;
-
- if(!(ptr = malloc(lth)))
- panic("Cannot get %d bytes", lth);
- return((long *) ptr);
-}
-
-long *
-enlarge(ptr,lth)
-char *ptr;
-unsigned lth;
-{
- char *nptr;
-
- if(!(nptr = realloc(ptr,lth)))
- panic("Cannot reallocate %d bytes", lth);
- return((long *) nptr);
-}
-
-#endif /* LINT */
OpenPOWER on IntegriCloud