Primarily gives it a shorthand, but also make gcc tolerate its use for format strings.tags/v1.5.90
"--output=${CMAKE_CURRENT_SOURCE_DIR}/tigervnc.pot" | "--output=${CMAKE_CURRENT_SOURCE_DIR}/tigervnc.pot" | ||||
--default-domain=tigervnc | --default-domain=tigervnc | ||||
--keyword=_ | --keyword=_ | ||||
--keyword=p_:1c,2 | |||||
--keyword=N_ | --keyword=N_ | ||||
"--copyright-holder=TigerVNC Team and many others \(see README.txt\)" | "--copyright-holder=TigerVNC Team and many others \(see README.txt\)" | ||||
--msgid-bugs-address=tigervnc-devel@googlegroups.com | --msgid-bugs-address=tigervnc-devel@googlegroups.com |
#include "gettext.h" | #include "gettext.h" | ||||
/* Need to tell gcc that pgettext() doesn't screw up format strings */ | |||||
#ifdef __GNUC__ | |||||
static const char * | |||||
pgettext_aux (const char *domain, | |||||
const char *msg_ctxt_id, const char *msgid, | |||||
int category) __attribute__ ((format_arg (3))); | |||||
#endif | |||||
#define _(String) gettext (String) | #define _(String) gettext (String) | ||||
#define p_(Context, String) pgettext (Context, String) | |||||
#define N_(String) gettext_noop (String) | #define N_(String) gettext_noop (String) | ||||
#endif /* _I18N_H */ | #endif /* _I18N_H */ |