$SYSCONFDIR/nanorc but not ~/.nanorc. (DLR)
- Change all references to /etc/nanorc in the documentation to
$SYSCONFDIR/nanorc. (DLR)
+ - Minor cosmetic tweaks to the ngettext() macro, and fix to
+ properly detect systems lacking ngettext() and correctly
+ compile on them; the previous fix didn't work. (DLR)
nano.c:
version()
- Remove obsolete reference to --enable-undo. (David Benbennick)
esac], [AC_MSG_RESULT(no)])
dnl Checks for functions
-AC_CHECK_FUNCS(ngettext snprintf vsnprintf)
-if test "x$ac_cv_func_ngettext" = "xno"
-then
- AC_DEFINE(NO_NGETTEXT, 1, [Defined if ngettext() is unavailable])
-fi
+AC_CHECK_FUNCS(snprintf vsnprintf)
if test "x$ac_cv_func_snprintf" = "xno" -o "xac_cv_func_vsnprintf" = "xno"
then
AM_PATH_GLIB(1.2.4,,
fi
dnl i18n stuff - pretty incomplete for now
-AM_GNU_GETTEXT([external])
+AM_GNU_GETTEXT([external], [need-ngettext])
AC_CONFIG_FILES([Makefile m4/Makefile po/Makefile.in nano.spec])
AC_OUTPUT
#ifndef NANO_SMALL
if (fileformat == 2)
- statusbar(ngettext("Read %d line (Converted from Mac format)",
+ statusbar(__("Read %d line (Converted from Mac format)",
"Read %d lines (Converted from Mac format)",
num_lines), num_lines);
else if (fileformat == 1)
- statusbar(ngettext("Read %d line (Converted from DOS format)",
+ statusbar(__("Read %d line (Converted from DOS format)",
"Read %d lines (Converted from DOS format)",
num_lines), num_lines);
else
#endif
- statusbar(ngettext("Read %d line", "Read %d lines", num_lines),
+ statusbar(__("Read %d line", "Read %d lines", num_lines),
num_lines);
totlines += num_lines;
/* Update originalfilestat to reference the file as it is now. */
stat(filename, &originalfilestat);
#endif
- statusbar(ngettext("Wrote %d line", "Wrote %d lines", lineswritten),
+ statusbar(__("Wrote %d line", "Wrote %d lines", lineswritten),
lineswritten);
UNSET(MODIFIED);
titlebar(NULL);
# include <libintl.h>
# endif
# define _(string) gettext(string)
-# ifdef NO_NGETTEXT
-# define ngettext(singular, plural, number) gettext(number == 1 ? singular : plural)
-# endif
+# define __(singular, plural, number) ngettext(singular, plural, number)
#else
# define _(string) (string)
-# define ngettext(singular, plural, number) number == 1 ? singular : plural
+# define __(singular, plural, number) (number == 1 ? singular : plural)
#endif
#include <sys/types.h>