diff options
author | Dan McGee <dan@archlinux.org> | 2007-04-25 23:24:23 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2007-04-26 20:34:41 +0200 |
commit | 97313ba31645796148c3f413d9ebde365df06dbe (patch) | |
tree | 95a937c665c4ecb57c21df645292c616451794ae /src/pacman/util.h | |
parent | da3286a80d10ea3896ae09e9e753dc4f19fa3bf6 (diff) | |
download | pacman-97313ba31645796148c3f413d9ebde365df06dbe.tar.gz pacman-97313ba31645796148c3f413d9ebde365df06dbe.tar.xz |
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 <dan@archlinux.org>
Diffstat (limited to 'src/pacman/util.h')
-rw-r--r-- | src/pacman/util.h | 19 |
1 files changed, 0 insertions, 19 deletions
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 <alpm_list.h> -#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 |