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:
Dan McGee 2007-04-26 19:39:53 -04:00
parent 63588aff19
commit 75efcbbff6
21 changed files with 6 additions and 25 deletions

View file

@ -38,7 +38,6 @@
#include <fcntl.h>
#include <string.h>
#include <limits.h>
#include <libintl.h>
/* libalpm */
#include "add.h"

View file

@ -37,7 +37,6 @@
#include <syslog.h>
#include <limits.h> /* PATH_MAX */
#include <stdarg.h>
#include <libintl.h>
/* libalpm */
#include "alpm.h"

View file

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

View file

@ -27,7 +27,6 @@
#include <errno.h>
#include <string.h>
#include <sys/stat.h>
#include <libintl.h>
/* libalpm */
#include "cache.h"

View file

@ -34,7 +34,6 @@
#include <sys/syslimits.h>
#endif
#include <sys/stat.h>
#include <libintl.h>
/* libalpm */
#include "conflict.h"

View file

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

View file

@ -29,7 +29,6 @@
#ifdef __sun__
#include <strings.h>
#endif
#include <libintl.h>
#include <math.h>
/* libalpm */

View file

@ -24,8 +24,6 @@
#include "config.h"
#include <libintl.h>
/* libalpm */
#include "error.h"
#include "util.h"

View file

@ -24,7 +24,6 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <libintl.h>
/* libalpm */
#include "group.h"

View file

@ -29,7 +29,6 @@
#include <limits.h>
#include <sys/types.h>
#include <syslog.h>
#include <libintl.h>
#include <time.h>
/* libalpm */

View file

@ -24,7 +24,6 @@ documentation and/or software.
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <libintl.h>
/* libalpm */
#include "alpm.h"

View file

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

View file

@ -39,7 +39,6 @@
#endif
#include <unistd.h>
#include <errno.h>
#include <libintl.h>
/* libalpm */
#include "remove.h"

View file

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

View file

@ -27,7 +27,6 @@
#include <sys/types.h>
#include <stdlib.h>
#include <string.h>
#include <libintl.h>
/* libalpm */
#include "sha1.h"

View file

@ -33,7 +33,6 @@
#include <limits.h> /* PATH_MAX */
#endif
#include <dirent.h>
#include <libintl.h>
/* libalpm */
#include "sync.h"

View file

@ -27,7 +27,6 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <libintl.h>
/* libalpm */
#include "trans.h"

View file

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

View file

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

View file

@ -27,7 +27,6 @@
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include <libintl.h>
/* libalpm */
#include "versioncmp.h"

View file

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