home *** CD-ROM | disk | FTP | other *** search
- /*
- ** MacWT -- a 3d game engine for the Macintosh
- ** © 1995, Bill Hayden and Nikol Software
- ** Free for non-commercial use - address questions to the e-mail address below
- **
- ** Mail: afn28988@freenet.ufl.edu (Bill Hayden)
- ** MacWT FTP site: ftp.circa.ufl.edu/pub/software/ufmug/mirrors/LocalSW/Hayden/
- ** WWW Page: http://grove.ufl.edu:80/~nikolsw
- **
- ** All of the above addresses are due to changes sometime in 1996, so stay tuned
- **
- ** based on wt, by Chris Laurel
- **
- ** This program is distributed in the hope that it will be useful,
- ** but WITHOUT ANY WARRANTY; without even the implied warranty of
- ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-
- #include <stdlib.h>
- #include "wt.h"
- #include "error.h"
- #include "wtmem.h"
-
-
- /* malloc or die . . . */
- void *wtmalloc(size_t size)
- {
- void *New;
-
- if ((New = malloc(size)) == NULL)
- fatal_error("could not allocate %x bytes", size);
-
- return New;
- }
-
-
- /* realloc or die . . . */
- void *wtrealloc(void *v, size_t size)
- {
- void *New;
-
- if ((New = realloc(v, size)) == NULL)
- fatal_error("could not reallocate %x bytes", size);
-
- return New;
- }
-
-
- void wtfree(void *v)
- {
- if (v == NULL)
- fatal_error("wtfree(NULL)");
- else
- free(v);
- }
-