Remove more unnecessary stuff

* Remove libintl.h from most files, as we only need to include it once in
  util.h where _() is defined.
* Remove other unnecessary header inclusions.
* Remove a macro that was only used once and replaced it with actual code.

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2007-04-25 03:15:32 -04:00
parent 828f1f53ef
commit 7760f5fe60
14 changed files with 7 additions and 21 deletions

View File

@ -24,7 +24,6 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <libintl.h>
#include <alpm.h>
#include <alpm_list.h>

View File

@ -23,9 +23,6 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <limits.h>
#include <libintl.h>
#include <alpm.h>

View File

@ -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);

View File

@ -24,7 +24,6 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <libintl.h>
#include <alpm.h>
#include <alpm_list.h>

View File

@ -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>

View File

@ -26,7 +26,6 @@
#include <stdarg.h>
#include <ctype.h>
#include <time.h>
#include <libintl.h>
#include <alpm.h>

View File

@ -26,7 +26,6 @@
#include <string.h>
#include <limits.h>
#include <sys/stat.h>
#include <libintl.h>
#include <alpm.h>
#include <alpm_list.h>

View File

@ -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, "");

View File

@ -26,7 +26,6 @@
#include <limits.h>
#include <string.h>
#include <sys/stat.h>
#include <libintl.h>
#include <errno.h>
#include <unistd.h>

View File

@ -24,7 +24,6 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <libintl.h>
#include <alpm.h>
#include <alpm_list.h>

View File

@ -30,7 +30,6 @@
#endif
#include <unistd.h>
#include <dirent.h>
#include <libintl.h>
#ifdef CYGWIN
#include <limits.h> /* PATH_MAX */
#endif

View File

@ -27,7 +27,6 @@
#include <sys/stat.h>
#include <unistd.h>
#include <dirent.h>
#include <libintl.h>
#include <wchar.h>
#include <alpm.h>

View File

@ -37,7 +37,6 @@
#include <ctype.h>
#include <dirent.h>
#include <unistd.h>
#include <libintl.h>
#ifdef CYGWIN
#include <limits.h> /* PATH_MAX */
#endif

View File

@ -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);