From 95eac9ab97248005a44ff8aa689fae9249b98551 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 9 Jan 2014 16:30:15 -0500 Subject: move gettext logic into misc.h This lets us autogenerate config.h using autoheader rather than hand maintain it. --- attr/attr.c | 5 ++++- include/misc.h | 10 ++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/attr/attr.c b/attr/attr.c index c691d57..798fe84 100644 --- a/attr/attr.c +++ b/attr/attr.c @@ -16,6 +16,8 @@ * along with this program. If not, see . */ +#include "config.h" + #include #include #include @@ -28,7 +30,8 @@ #include #include -#include "config.h" + +#include "misc.h" #define SETOP 1 /* do a SET operation */ #define GETOP 2 /* do a GET operation */ diff --git a/include/misc.h b/include/misc.h index 0c5fdcc..ae2570a 100644 --- a/include/misc.h +++ b/include/misc.h @@ -21,3 +21,13 @@ extern const char *quote(const char *str, const char *quote_chars); extern char *unquote(char *str); extern char *next_line(FILE *file); + +#ifdef ENABLE_NLS +# include +# define _(x) gettext(x) +#else +# define _(x) (x) +# define textdomain(d) do { } while (0) +# define bindtextdomain(d,dir) do { } while (0) +#endif +#include -- cgit v1.2.1