From 4c872594da321aa406cfb306c32c94ce2929d59e Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sun, 6 Apr 2008 20:20:20 -0500 Subject: Remove unnecessary header file, move one macro to util.c Signed-off-by: Dan McGee --- lib/libalpm/Makefile.am | 2 +- lib/libalpm/add.c | 1 - lib/libalpm/alpm.c | 1 - lib/libalpm/be_files.c | 1 - lib/libalpm/cache.c | 1 - lib/libalpm/conflict.c | 1 - lib/libalpm/db.c | 1 - lib/libalpm/delta.c | 1 - lib/libalpm/deps.c | 1 - lib/libalpm/dload.c | 1 - lib/libalpm/error.c | 1 - lib/libalpm/error.h | 28 ---------------------------- lib/libalpm/group.c | 1 - lib/libalpm/handle.c | 1 - lib/libalpm/log.c | 1 - lib/libalpm/package.c | 1 - lib/libalpm/remove.c | 1 - lib/libalpm/sync.c | 1 - lib/libalpm/trans.c | 1 - lib/libalpm/util.c | 1 - lib/libalpm/util.h | 4 ++++ 21 files changed, 5 insertions(+), 47 deletions(-) delete mode 100644 lib/libalpm/error.h diff --git a/lib/libalpm/Makefile.am b/lib/libalpm/Makefile.am index b1d38ad4..8c0f742d 100644 --- a/lib/libalpm/Makefile.am +++ b/lib/libalpm/Makefile.am @@ -28,7 +28,7 @@ libalpm_la_SOURCES = \ delta.h delta.c \ deps.h deps.c \ dload.h dload.c \ - error.h error.c \ + error.c \ graph.h \ group.h group.c \ handle.h handle.c \ diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c index 0bbec44c..05935a7b 100644 --- a/lib/libalpm/add.c +++ b/lib/libalpm/add.c @@ -37,7 +37,6 @@ #include "alpm_list.h" #include "trans.h" #include "util.h" -#include "error.h" #include "cache.h" #include "log.h" #include "backup.h" diff --git a/lib/libalpm/alpm.c b/lib/libalpm/alpm.c index fb19d076..ee29d534 100644 --- a/lib/libalpm/alpm.c +++ b/lib/libalpm/alpm.c @@ -25,7 +25,6 @@ /* libalpm */ #include "alpm.h" #include "alpm_list.h" -#include "error.h" #include "handle.h" #include "util.h" diff --git a/lib/libalpm/be_files.c b/lib/libalpm/be_files.c index d3ec89a4..7cc01c26 100644 --- a/lib/libalpm/be_files.c +++ b/lib/libalpm/be_files.c @@ -39,7 +39,6 @@ #include "log.h" #include "util.h" #include "alpm.h" -#include "error.h" #include "handle.h" #include "package.h" #include "delta.h" diff --git a/lib/libalpm/cache.c b/lib/libalpm/cache.c index 7fa24052..bfc4fd9e 100644 --- a/lib/libalpm/cache.c +++ b/lib/libalpm/cache.c @@ -31,7 +31,6 @@ #include "log.h" #include "alpm.h" #include "util.h" -#include "error.h" #include "package.h" #include "group.h" #include "db.h" diff --git a/lib/libalpm/conflict.c b/lib/libalpm/conflict.c index 19352d11..68665e78 100644 --- a/lib/libalpm/conflict.c +++ b/lib/libalpm/conflict.c @@ -36,7 +36,6 @@ #include "handle.h" #include "trans.h" #include "util.h" -#include "error.h" #include "log.h" #include "cache.h" #include "deps.h" diff --git a/lib/libalpm/db.c b/lib/libalpm/db.c index 68474157..9bdbc7a2 100644 --- a/lib/libalpm/db.c +++ b/lib/libalpm/db.c @@ -40,7 +40,6 @@ #include "alpm_list.h" #include "log.h" #include "util.h" -#include "error.h" #include "dload.h" #include "handle.h" #include "cache.h" diff --git a/lib/libalpm/delta.c b/lib/libalpm/delta.c index 9eb6e82f..e9870c8c 100644 --- a/lib/libalpm/delta.c +++ b/lib/libalpm/delta.c @@ -24,7 +24,6 @@ /* libalpm */ #include "delta.h" -#include "error.h" #include "util.h" #include "log.h" #include "alpm_list.h" diff --git a/lib/libalpm/deps.c b/lib/libalpm/deps.c index 1eebca3e..24b17933 100644 --- a/lib/libalpm/deps.c +++ b/lib/libalpm/deps.c @@ -30,7 +30,6 @@ #include "alpm_list.h" #include "util.h" #include "log.h" -#include "error.h" #include "graph.h" #include "package.h" #include "db.h" diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c index 2fcf6aa1..1b7b013f 100644 --- a/lib/libalpm/dload.c +++ b/lib/libalpm/dload.c @@ -32,7 +32,6 @@ #include "alpm.h" #include "log.h" #include "util.h" -#include "error.h" #include "handle.h" /* Build a 'struct url' from an url. */ diff --git a/lib/libalpm/error.c b/lib/libalpm/error.c index 7fa07b70..49eca544 100644 --- a/lib/libalpm/error.c +++ b/lib/libalpm/error.c @@ -22,7 +22,6 @@ #include /* downloadLastErrString */ /* libalpm */ -#include "error.h" #include "util.h" #include "alpm.h" diff --git a/lib/libalpm/error.h b/lib/libalpm/error.h deleted file mode 100644 index e417195f..00000000 --- a/lib/libalpm/error.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * error.h - * - * Copyright (c) 2002-2007 by Judd Vinet - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * 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. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#ifndef _ALPM_ERROR_H -#define _ALPM_ERROR_H - -#define RET_ERR(err, ret) do { pm_errno = (err); \ - _alpm_log(PM_LOG_DEBUG, "returning error %d from %s : %s\n", err, __func__, alpm_strerrorlast()); \ - return(ret); } while(0) - -#endif /* _ALPM_ERROR_H */ - -/* vim: set ts=2 sw=2 noet: */ diff --git a/lib/libalpm/group.c b/lib/libalpm/group.c index e9e7d008..1cc379c6 100644 --- a/lib/libalpm/group.c +++ b/lib/libalpm/group.c @@ -27,7 +27,6 @@ #include "group.h" #include "alpm_list.h" #include "util.h" -#include "error.h" #include "log.h" #include "alpm.h" diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c index e9df0aa7..247ef71d 100644 --- a/lib/libalpm/handle.c +++ b/lib/libalpm/handle.c @@ -36,7 +36,6 @@ #include "alpm_list.h" #include "util.h" #include "log.h" -#include "error.h" #include "trans.h" #include "alpm.h" diff --git a/lib/libalpm/log.c b/lib/libalpm/log.c index 4445f935..3ba5042c 100644 --- a/lib/libalpm/log.c +++ b/lib/libalpm/log.c @@ -30,7 +30,6 @@ #include "log.h" #include "handle.h" #include "util.h" -#include "error.h" #include "alpm.h" /** \addtogroup alpm_log Logging Functions diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c index b072f3f3..3277dd09 100644 --- a/lib/libalpm/package.c +++ b/lib/libalpm/package.c @@ -42,7 +42,6 @@ #include "alpm_list.h" #include "log.h" #include "util.h" -#include "error.h" #include "db.h" #include "cache.h" #include "delta.h" diff --git a/lib/libalpm/remove.c b/lib/libalpm/remove.c index 8d832942..3119bf85 100644 --- a/lib/libalpm/remove.c +++ b/lib/libalpm/remove.c @@ -37,7 +37,6 @@ #include "alpm_list.h" #include "trans.h" #include "util.h" -#include "error.h" #include "log.h" #include "backup.h" #include "package.h" diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c index 5b3087a3..decd52b5 100644 --- a/lib/libalpm/sync.c +++ b/lib/libalpm/sync.c @@ -34,7 +34,6 @@ #include "sync.h" #include "alpm_list.h" #include "log.h" -#include "error.h" #include "package.h" #include "db.h" #include "cache.h" diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c index 3edbbacb..eb53e952 100644 --- a/lib/libalpm/trans.c +++ b/lib/libalpm/trans.c @@ -35,7 +35,6 @@ /* libalpm */ #include "trans.h" #include "alpm_list.h" -#include "error.h" #include "package.h" #include "util.h" #include "log.h" diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c index 1e94190a..9d86331b 100644 --- a/lib/libalpm/util.c +++ b/lib/libalpm/util.c @@ -43,7 +43,6 @@ /* libalpm */ #include "util.h" #include "log.h" -#include "error.h" #include "package.h" #include "alpm.h" #include "alpm_list.h" diff --git a/lib/libalpm/util.h b/lib/libalpm/util.h index 0bf122cd..74b4f981 100644 --- a/lib/libalpm/util.h +++ b/lib/libalpm/util.h @@ -51,6 +51,10 @@ #define ASSERT(cond, action) do { if(!(cond)) { action; } } while(0) +#define RET_ERR(err, ret) do { pm_errno = (err); \ + _alpm_log(PM_LOG_DEBUG, "returning error %d from %s : %s\n", err, __func__, alpm_strerrorlast()); \ + return(ret); } while(0) + int _alpm_makepath(const char *path); int _alpm_makepath_mode(const char *path, mode_t mode); int _alpm_copyfile(const char *src, const char *dest); -- cgit v1.2.3-70-g09d2