From cbc800df6d3a6b7c96491cf253dc6d4c9421065c Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Mon, 22 Jun 2009 10:52:58 +0200 Subject: [PATCH 1/2] PRINT and ERROR macros --- server/po/Makevars | 2 +- server/util/util.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletions(-) diff --git a/server/po/Makevars b/server/po/Makevars index 5dda691..2b1d4dd 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 7acbfe6..77bafce 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 -- 1.6.2.5