mirror of
https://github.com/moparisthebest/pacman
synced 2025-01-10 05:18:16 -05:00
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:
parent
828f1f53ef
commit
7760f5fe60
@ -24,7 +24,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <libintl.h>
|
||||
|
||||
#include <alpm.h>
|
||||
#include <alpm_list.h>
|
||||
|
@ -23,9 +23,6 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#include <libintl.h>
|
||||
|
||||
#include <alpm.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);
|
||||
|
||||
|
@ -24,7 +24,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <libintl.h>
|
||||
|
||||
#include <alpm.h>
|
||||
#include <alpm_list.h>
|
||||
|
@ -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>
|
||||
|
@ -26,7 +26,6 @@
|
||||
#include <stdarg.h>
|
||||
#include <ctype.h>
|
||||
#include <time.h>
|
||||
#include <libintl.h>
|
||||
|
||||
#include <alpm.h>
|
||||
|
||||
|
@ -26,7 +26,6 @@
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#include <sys/stat.h>
|
||||
#include <libintl.h>
|
||||
|
||||
#include <alpm.h>
|
||||
#include <alpm_list.h>
|
||||
|
@ -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, "");
|
||||
|
@ -26,7 +26,6 @@
|
||||
#include <limits.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <libintl.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
|
||||
|
@ -24,7 +24,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <libintl.h>
|
||||
|
||||
#include <alpm.h>
|
||||
#include <alpm_list.h>
|
||||
|
@ -30,7 +30,6 @@
|
||||
#endif
|
||||
#include <unistd.h>
|
||||
#include <dirent.h>
|
||||
#include <libintl.h>
|
||||
#ifdef CYGWIN
|
||||
#include <limits.h> /* PATH_MAX */
|
||||
#endif
|
||||
|
@ -27,7 +27,6 @@
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <dirent.h>
|
||||
#include <libintl.h>
|
||||
#include <wchar.h>
|
||||
|
||||
#include <alpm.h>
|
||||
|
@ -37,7 +37,6 @@
|
||||
#include <ctype.h>
|
||||
#include <dirent.h>
|
||||
#include <unistd.h>
|
||||
#include <libintl.h>
|
||||
#ifdef CYGWIN
|
||||
#include <limits.h> /* PATH_MAX */
|
||||
#endif
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user