diff options
author | Mike Frysinger <vapier@gentoo.org> | 2014-01-09 16:30:15 -0500 |
---|---|---|
committer | Andreas Gruenbacher <agruen@linbit.com> | 2014-01-09 23:15:09 +0100 |
commit | 95eac9ab97248005a44ff8aa689fae9249b98551 (patch) | |
tree | 416080786387ad340d399ecaddafd374f9d2dd72 | |
parent | 7e3f3a1e5a81b3e97cd434314e7669fd4f8445fa (diff) | |
download | attr-95eac9ab97248005a44ff8aa689fae9249b98551.tar.gz |
move gettext logic into misc.h
This lets us autogenerate config.h using autoheader rather than
hand maintain it.
-rw-r--r-- | attr/attr.c | 5 | ||||
-rw-r--r-- | include/misc.h | 10 |
2 files changed, 14 insertions, 1 deletions
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 <http://www.gnu.org/licenses/>. */ +#include "config.h" + #include <sys/types.h> #include <sys/param.h> #include <sys/stat.h> @@ -28,7 +30,8 @@ #include <locale.h> #include <attr/attributes.h> -#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 <libintl.h> +# define _(x) gettext(x) +#else +# define _(x) (x) +# define textdomain(d) do { } while (0) +# define bindtextdomain(d,dir) do { } while (0) +#endif +#include <locale.h> |