Make i18n support compile.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23738 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -40,20 +40,24 @@ RCSID("$Id$");
|
||||
#include <string.h>
|
||||
#include <com_right.h>
|
||||
|
||||
#ifdef HAVE_LIBINTL
|
||||
#include <libintl.h>
|
||||
#else
|
||||
#define dgettext(d,s) (s)
|
||||
#endif
|
||||
|
||||
const char *
|
||||
com_right(struct et_list *list, long code)
|
||||
{
|
||||
struct et_list *p;
|
||||
for (p = list; p; p = p->next) {
|
||||
if (code >= p->table->base && code < p->table->base + p->table->n_msgs) {
|
||||
char *p = p->table->msgs[code - p->table->base];
|
||||
const char *str = p->table->msgs[code - p->table->base];
|
||||
#ifdef HAVE_LIBINTL
|
||||
char domain[6 + 1 + 20];
|
||||
snprintf(domain, sizeof(domain), "com_err%d", p->table->base);
|
||||
return dgettext(domain, p);
|
||||
#else
|
||||
return p;
|
||||
#endif
|
||||
return dgettext(domain, str);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user