summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pacman/add.c1
-rw-r--r--src/pacman/conf.c3
-rw-r--r--src/pacman/conf.h2
-rw-r--r--src/pacman/deptest.c1
-rw-r--r--src/pacman/downloadprog.c5
-rw-r--r--src/pacman/log.c1
-rw-r--r--src/pacman/package.c1
-rw-r--r--src/pacman/pacman.c5
-rw-r--r--src/pacman/query.c1
-rw-r--r--src/pacman/remove.c1
-rw-r--r--src/pacman/sync.c1
-rw-r--r--src/pacman/trans.c1
-rw-r--r--src/pacman/util.c1
-rw-r--r--src/pacman/util.h4
14 files changed, 7 insertions, 21 deletions
diff --git a/src/pacman/add.c b/src/pacman/add.c
index f169eb84..65d666e9 100644
--- a/src/pacman/add.c
+++ b/src/pacman/add.c
@@ -24,7 +24,6 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-#include <libintl.h>
#include <alpm.h>
#include <alpm_list.h>
diff --git a/src/pacman/conf.c b/src/pacman/conf.c
index 60b20515..8a438269 100644
--- a/src/pacman/conf.c
+++ b/src/pacman/conf.c
@@ -23,9 +23,6 @@
#include <stdlib.h>
#include <stdio.h>
-#include <string.h>
-#include <limits.h>
-#include <libintl.h>
#include <alpm.h>
diff --git a/src/pacman/conf.h b/src/pacman/conf.h
index 05ef0b4c..4fff0abb 100644
--- a/src/pacman/conf.h
+++ b/src/pacman/conf.h
@@ -56,8 +56,6 @@ typedef struct __config_t {
unsigned int ask;
} config_t;
-#define FREECONF(p) do { if(p) { config_free(p); p = NULL; } } while(0)
-
config_t *config_new(void);
int config_free(config_t *config);
diff --git a/src/pacman/deptest.c b/src/pacman/deptest.c
index bce5641d..2877ef3d 100644
--- a/src/pacman/deptest.c
+++ b/src/pacman/deptest.c
@@ -24,7 +24,6 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-#include <libintl.h>
#include <alpm.h>
#include <alpm_list.h>
diff --git a/src/pacman/downloadprog.c b/src/pacman/downloadprog.c
index 6ce8e2f5..fccdc322 100644
--- a/src/pacman/downloadprog.c
+++ b/src/pacman/downloadprog.c
@@ -21,15 +21,10 @@
#include "config.h"
-#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <time.h>
#include <sys/time.h>
-#include <libintl.h>
#include <math.h>
#include <alpm.h>
diff --git a/src/pacman/log.c b/src/pacman/log.c
index ca83df0b..e6298743 100644
--- a/src/pacman/log.c
+++ b/src/pacman/log.c
@@ -26,7 +26,6 @@
#include <stdarg.h>
#include <ctype.h>
#include <time.h>
-#include <libintl.h>
#include <alpm.h>
diff --git a/src/pacman/package.c b/src/pacman/package.c
index a09529a3..d9b63088 100644
--- a/src/pacman/package.c
+++ b/src/pacman/package.c
@@ -26,7 +26,6 @@
#include <string.h>
#include <limits.h>
#include <sys/stat.h>
-#include <libintl.h>
#include <alpm.h>
#include <alpm_list.h>
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index 5fd32ba7..6178b71a 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -233,7 +233,10 @@ static void cleanup(int signum)
/* free memory */
FREELIST(pm_targets);
- FREECONF(config);
+ if(config) {
+ config_free(config);
+ config = NULL;
+ }
/* This fixes up any missing newlines (neednl) */
MSG(NL, "");
diff --git a/src/pacman/query.c b/src/pacman/query.c
index 6997a7a7..02be63aa 100644
--- a/src/pacman/query.c
+++ b/src/pacman/query.c
@@ -26,7 +26,6 @@
#include <limits.h>
#include <string.h>
#include <sys/stat.h>
-#include <libintl.h>
#include <errno.h>
#include <unistd.h>
diff --git a/src/pacman/remove.c b/src/pacman/remove.c
index cf9b6293..e62c641d 100644
--- a/src/pacman/remove.c
+++ b/src/pacman/remove.c
@@ -24,7 +24,6 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-#include <libintl.h>
#include <alpm.h>
#include <alpm_list.h>
diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index 9c6250ce..fa781c10 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -30,7 +30,6 @@
#endif
#include <unistd.h>
#include <dirent.h>
-#include <libintl.h>
#ifdef CYGWIN
#include <limits.h> /* PATH_MAX */
#endif
diff --git a/src/pacman/trans.c b/src/pacman/trans.c
index 7f5c61c8..8efa6d07 100644
--- a/src/pacman/trans.c
+++ b/src/pacman/trans.c
@@ -27,7 +27,6 @@
#include <sys/stat.h>
#include <unistd.h>
#include <dirent.h>
-#include <libintl.h>
#include <wchar.h>
#include <alpm.h>
diff --git a/src/pacman/util.c b/src/pacman/util.c
index 9c79cf5f..1fb6ead9 100644
--- a/src/pacman/util.c
+++ b/src/pacman/util.c
@@ -37,7 +37,6 @@
#include <ctype.h>
#include <dirent.h>
#include <unistd.h>
-#include <libintl.h>
#ifdef CYGWIN
#include <limits.h> /* PATH_MAX */
#endif
diff --git a/src/pacman/util.h b/src/pacman/util.h
index 6eba38fe..f12ec6f1 100644
--- a/src/pacman/util.h
+++ b/src/pacman/util.h
@@ -23,7 +23,7 @@
#include <stdlib.h>
#include <string.h>
-#include <libintl.h>
+#include <libintl.h> /* here so it doesn't need to be included elsewhere */
#include <alpm_list.h>
@@ -49,7 +49,9 @@
/* update speed for the fill_progress based functions */
#define UPDATE_SPEED_SEC 0.2f
+/* define _() as shortcut for gettext() */
#define _(str) gettext(str)
+
int getcols();
int makepath(char *path);
int rmrf(char *path);