summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2008-04-06 20:20:20 -0500
committerDan McGee <dan@archlinux.org>2008-04-06 20:20:20 -0500
commit4c872594da321aa406cfb306c32c94ce2929d59e (patch)
tree6fb5db8d8497d3a59955045b6a56e1a0ef30072d /lib
parente4a4cf7ce544707faa691c8ab1bf298549979b12 (diff)
downloadpacman-4c872594da321aa406cfb306c32c94ce2929d59e.tar.xz
Remove unnecessary header file, move one macro to util.c
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/libalpm/Makefile.am2
-rw-r--r--lib/libalpm/add.c1
-rw-r--r--lib/libalpm/alpm.c1
-rw-r--r--lib/libalpm/be_files.c1
-rw-r--r--lib/libalpm/cache.c1
-rw-r--r--lib/libalpm/conflict.c1
-rw-r--r--lib/libalpm/db.c1
-rw-r--r--lib/libalpm/delta.c1
-rw-r--r--lib/libalpm/deps.c1
-rw-r--r--lib/libalpm/dload.c1
-rw-r--r--lib/libalpm/error.c1
-rw-r--r--lib/libalpm/error.h28
-rw-r--r--lib/libalpm/group.c1
-rw-r--r--lib/libalpm/handle.c1
-rw-r--r--lib/libalpm/log.c1
-rw-r--r--lib/libalpm/package.c1
-rw-r--r--lib/libalpm/remove.c1
-rw-r--r--lib/libalpm/sync.c1
-rw-r--r--lib/libalpm/trans.c1
-rw-r--r--lib/libalpm/util.c1
-rw-r--r--lib/libalpm/util.h4
21 files changed, 5 insertions, 47 deletions
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 <download.h> /* 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 <jvinet@zeroflux.org>
- *
- * 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 <http://www.gnu.org/licenses/>.
- */
-#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);