mirror of
https://github.com/neovim/neovim.git
synced 2025-10-06 18:06:30 +00:00

message.c functions now take const char * as a format. Error message definitions can be made const.
29 lines
760 B
C
29 lines
760 B
C
#ifndef NVIM_GETTEXT_H
|
|
#define NVIM_GETTEXT_H
|
|
|
|
#ifdef HAVE_WORKING_LIBINTL
|
|
# include <libintl.h>
|
|
# define _(x) gettext(x)
|
|
// XXX do we actually need this?
|
|
# ifdef gettext_noop
|
|
# define N_(x) gettext_noop(x)
|
|
# else
|
|
# define N_(x) x
|
|
# endif
|
|
# define NGETTEXT(x, xs, n) ngettext(x, xs, (unsigned long)n)
|
|
// On a Mac, gettext's libintl.h defines "setlocale" to be replaced by
|
|
// "libintl_setlocal" which leads to wrong return values. #9789
|
|
# if defined(__APPLE__) && defined(setlocale)
|
|
# undef setlocale
|
|
# endif
|
|
#else
|
|
# define _(x) (x)
|
|
# define N_(x) x
|
|
# define NGETTEXT(x, xs, n) ((n) == 1 ? (x) : (xs))
|
|
# define bindtextdomain(x, y) // empty
|
|
# define bind_textdomain_codeset(x, y) // empty
|
|
# define textdomain(x) // empty
|
|
#endif
|
|
|
|
#endif // NVIM_GETTEXT_H
|