Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=fwsetup-ng.git;a=commitdiff;h=66438259b214c366f675e3b68c448f7ca5484001
commit 66438259b214c366f675e3b68c448f7ca5484001 Author: James Buren <[email protected]> Date: Thu Aug 9 11:41:12 2012 -0500 wee diff --git a/utility.c b/utility.c deleted file mode 100644 index c7ac12f..0000000 --- a/utility.c +++ /dev/null @@ -1,40 +0,0 @@ -#include "utility.h" - -extern void *alloc(size_t n) -{ - assert(n > 0); - - void *p = malloc(n); - - if(p == 0) - abort(); - - return p; -} - -extern void *alloc0(size_t n) -{ - assert(n > 0); - - void *p = malloc(n); - - if(p == 0) - abort(); - - memset(p,0,n); - - return p; -} - -extern void *redim(void *p,size_t n) -{ - assert(p != 0); - assert(n > 0); - - p = realloc(p,n); - - if(p == 0) - abort(); - - return p; -} diff --git a/utility.h b/utility.h deleted file mode 100644 index ff8efcd..0000000 --- a/utility.h +++ /dev/null @@ -1,11 +0,0 @@ -#include <stdlib.h> -#include <stdio.h> -#include <string.h> -#include <assert.h> - -#define talloc(T,N) ((T*)alloc(sizeof(T)*(N))) -#define talloc0(T,N) ((T*)alloc0(sizeof(T)*(N))) - -extern void *alloc(size_t); -extern void *alloc0(size_t); -extern void *redim(void *,size_t); _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
