X-Git-Url: http://git.tremily.us/?a=blobdiff_plain;f=gettext.h;h=7671d09d04bb87541b11209b5cdbddbb9e4e59b8;hb=3d7535e42496a5b24d8cb17da1a332759928bd35;hp=57ba8bb02e39d59752a5b2fbf016bc6fe49d27c1;hpb=ebcfa444c436c0a501d38ffd5bae670fe6ee01c5;p=git.git diff --git a/gettext.h b/gettext.h index 57ba8bb02..7671d09d0 100644 --- a/gettext.h +++ b/gettext.h @@ -30,10 +30,15 @@ #ifndef NO_GETTEXT extern void git_setup_gettext(void); +extern int gettext_width(const char *s); #else static inline void git_setup_gettext(void) { } +static inline int gettext_width(const char *s) +{ + return strlen(s); +} #endif #ifdef GETTEXT_POISON @@ -44,6 +49,8 @@ extern int use_gettext_poison(void); static inline FORMAT_PRESERVING(1) const char *_(const char *msgid) { + if (!*msgid) + return ""; return use_gettext_poison() ? "# GETTEXT POISON #" : gettext(msgid); }