From 224c9930b9106d4c9b383f7f8b6625597f7bd26c Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Mon, 22 Jun 2009 10:52:58 +0200 Subject: PRINT and ERROR macros --- server/po/Makevars | 2 +- server/util/util.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'server') diff --git a/server/po/Makevars b/server/po/Makevars index 5dda69156..2b1d4ddc4 100644 --- a/server/po/Makevars +++ b/server/po/Makevars @@ -8,7 +8,7 @@ subdir = po top_builddir = .. # These options get passed to xgettext. -XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ +XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --keyword=ERROR --keyword=PRINT # This is the copyright holder that gets inserted into the header of the # $(DOMAIN).pot file. Set this to the copyright holder of the surrounding diff --git a/server/util/util.h b/server/util/util.h index 7acbfe613..77bafcee8 100644 --- a/server/util/util.h +++ b/server/util/util.h @@ -29,6 +29,9 @@ void debug_fn(const char *format, ...); } \ } while(0); +#define PRINT(fmt, ...) fprintf(stdout, gettext(fmt), ##__VA_ARGS__) +#define ERROR(fmt, ...) fprintf(stderr, gettext(fmt), ##__VA_ARGS__) + #ifndef discard_const #define discard_const(ptr) ((void *)((uintptr_t)(ptr))) #endif -- cgit