summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2009-06-22 10:52:58 +0200
committerStephen Gallagher <sgallagh@redhat.com>2009-07-02 14:09:06 -0400
commit224c9930b9106d4c9b383f7f8b6625597f7bd26c (patch)
tree6b6248930eb01cb83a26a5c198d9bda35195cb4e /server
parentef1f27f3a3eaa43b4dbd24cab361b9fe43cdce44 (diff)
downloadsssd-224c9930b9106d4c9b383f7f8b6625597f7bd26c.tar.gz
sssd-224c9930b9106d4c9b383f7f8b6625597f7bd26c.tar.bz2
sssd-224c9930b9106d4c9b383f7f8b6625597f7bd26c.zip
PRINT and ERROR macros
Diffstat (limited to 'server')
-rw-r--r--server/po/Makevars2
-rw-r--r--server/util/util.h3
2 files changed, 4 insertions, 1 deletions
diff --git a/server/po/Makevars b/server/po/Makevars
index 5dda6915..2b1d4ddc 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 7acbfe61..77bafcee 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