From 97313ba31645796148c3f413d9ebde365df06dbe Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Wed, 25 Apr 2007 17:24:23 -0400 Subject: More pacman side cleanup * Cleaned up more of the header #includes, and got rid of a lot of stuff that was due to trying to make it compile on BSD/Darwin/CYGWIN. We can add it later but lets keep it simple for now and do it in seperate files if possible later. * Removed a lot of #define MACROS. Some were not even used, and others were only used a few times. Signed-off-by: Dan McGee --- src/pacman/util.h | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'src/pacman/util.h') diff --git a/src/pacman/util.h b/src/pacman/util.h index f12ec6f1..85ce6ede 100644 --- a/src/pacman/util.h +++ b/src/pacman/util.h @@ -27,25 +27,6 @@ #include -#define MALLOC(p, b) do { \ - if((b) > 0) { \ - p = malloc(b); \ - if (!(p)) { \ - fprintf(stderr, "malloc failure: could not allocate %d bytes\n", (int)b); \ - exit(EXIT_FAILURE); \ - } \ - } else { \ - p = NULL; \ - } \ -} while(0) - -#define FREE(p) do { if (p) { free(p); (p) = NULL; }} while(0) - -#define STRNCPY(s1, s2, len) do { \ - strncpy(s1, s2, (len)-1); \ - s1[(len)-1] = 0; \ -} while(0) - /* update speed for the fill_progress based functions */ #define UPDATE_SPEED_SEC 0.2f -- cgit v1.2.3