Clean up gettext on the libalpm side
Remove inclusion of libintl.h from all files, because we can do it once in util.c where the _() macro is defined. Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
63588aff19
commit
75efcbbff6
21 changed files with 6 additions and 25 deletions
|
@ -38,7 +38,6 @@
|
|||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#include <libintl.h>
|
||||
|
||||
/* libalpm */
|
||||
#include "add.h"
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
#include <syslog.h>
|
||||
#include <limits.h> /* PATH_MAX */
|
||||
#include <stdarg.h>
|
||||
#include <libintl.h>
|
||||
|
||||
/* libalpm */
|
||||
#include "alpm.h"
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
#endif
|
||||
#include <sys/stat.h>
|
||||
#include <dirent.h>
|
||||
#include <libintl.h>
|
||||
#include <locale.h>
|
||||
#ifdef CYGWIN
|
||||
#include <limits.h> /* PATH_MAX */
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <libintl.h>
|
||||
|
||||
/* libalpm */
|
||||
#include "cache.h"
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
#include <sys/syslimits.h>
|
||||
#endif
|
||||
#include <sys/stat.h>
|
||||
#include <libintl.h>
|
||||
|
||||
/* libalpm */
|
||||
#include "conflict.h"
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
#include <sys/stat.h>
|
||||
#endif
|
||||
#include <dirent.h>
|
||||
#include <libintl.h>
|
||||
#include <regex.h>
|
||||
#ifdef CYGWIN
|
||||
#include <limits.h> /* PATH_MAX */
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
#ifdef __sun__
|
||||
#include <strings.h>
|
||||
#endif
|
||||
#include <libintl.h>
|
||||
#include <math.h>
|
||||
|
||||
/* libalpm */
|
||||
|
|
|
@ -24,8 +24,6 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include <libintl.h>
|
||||
|
||||
/* libalpm */
|
||||
#include "error.h"
|
||||
#include "util.h"
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <libintl.h>
|
||||
|
||||
/* libalpm */
|
||||
#include "group.h"
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
#include <limits.h>
|
||||
#include <sys/types.h>
|
||||
#include <syslog.h>
|
||||
#include <libintl.h>
|
||||
#include <time.h>
|
||||
|
||||
/* libalpm */
|
||||
|
|
|
@ -24,7 +24,6 @@ documentation and/or software.
|
|||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <libintl.h>
|
||||
|
||||
/* libalpm */
|
||||
#include "alpm.h"
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#include <stdlib.h>
|
||||
#include <limits.h>
|
||||
#include <string.h>
|
||||
#include <libintl.h>
|
||||
#include <locale.h>
|
||||
#include <errno.h>
|
||||
#include <sys/types.h>
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
#endif
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <libintl.h>
|
||||
|
||||
/* libalpm */
|
||||
#include "remove.h"
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <libintl.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
#include <sys/types.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <libintl.h>
|
||||
|
||||
/* libalpm */
|
||||
#include "sha1.h"
|
||||
|
|
|
@ -33,7 +33,6 @@
|
|||
#include <limits.h> /* PATH_MAX */
|
||||
#endif
|
||||
#include <dirent.h>
|
||||
#include <libintl.h>
|
||||
|
||||
/* libalpm */
|
||||
#include "sync.h"
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <libintl.h>
|
||||
|
||||
/* libalpm */
|
||||
#include "trans.h"
|
||||
|
|
|
@ -45,7 +45,6 @@
|
|||
#if defined(__APPLE__) || defined(__OpenBSD__) || defined(__sun__)
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
#include <libintl.h>
|
||||
#ifdef CYGWIN
|
||||
#include <limits.h> /* PATH_MAX */
|
||||
#endif
|
||||
|
|
|
@ -26,13 +26,9 @@
|
|||
#define _ALPM_UTIL_H
|
||||
|
||||
#include <stdio.h>
|
||||
#if defined(__OpenBSD__)
|
||||
#include "/usr/local/include/archive.h"
|
||||
#include "/usr/local/include/archive_entry.h"
|
||||
#else
|
||||
#include <libintl.h> /* here so it doesn't need to be included elsewhere */
|
||||
#include <archive.h>
|
||||
#include <archive_entry.h>
|
||||
#endif
|
||||
|
||||
#define FREE(p) do { if (p) { free(p); p = NULL; } } while(0)
|
||||
|
||||
|
@ -45,6 +41,7 @@
|
|||
|
||||
#define ARCHIVE_EXTRACT_FLAGS ARCHIVE_EXTRACT_OWNER | ARCHIVE_EXTRACT_PERM | ARCHIVE_EXTRACT_TIME
|
||||
|
||||
/* define _() as shortcut for gettext() */
|
||||
#ifdef ENABLE_NLS
|
||||
#define _(str) dgettext ("libalpm", str)
|
||||
#else
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#include <libintl.h>
|
||||
|
||||
/* libalpm */
|
||||
#include "versioncmp.h"
|
||||
|
|
|
@ -31,7 +31,11 @@
|
|||
#define UPDATE_SPEED_SEC 0.2f
|
||||
|
||||
/* define _() as shortcut for gettext() */
|
||||
#ifdef ENABLE_NLS
|
||||
#define _(str) gettext(str)
|
||||
#else
|
||||
#define _(str) str
|
||||
#endif
|
||||
|
||||
int getcols();
|
||||
int makepath(char *path);
|
||||
|
|
Loading…
Add table
Reference in a new issue