1 /* alloc.c - version 1.0.2 */
2 /* $FreeBSD: src/games/hack/alloc.c,v 1.4 1999/11/16 02:57:01 billf Exp $ */
9 a ridiculous definition, suppressing
10 "possible pointer alignment problem" for (long *) malloc()
11 "enlarg defined but never used"
12 "ftell defined (in <stdio.h>) but never used"
17 alloc(n) unsigned n; {
18 long dummy = ftell(stderr);
19 if(n) dummy = 0; /* make sure arg is used */
31 if(!(ptr = malloc(lth)))
32 panic("Cannot get %d bytes", lth);
43 if(!(nptr = realloc(ptr,lth)))
44 panic("Cannot reallocate %d bytes", lth);
45 return((long *) nptr);