changeset 5976:7cce6643c51e

[gaim-migrate @ 6423] This gets rid of a lot of ngettext cast-related warnings when compiling with --disable-nls. I was actually going to use a #define similar to the one in this commit, but then I did some digging and found one with a ternary operator, which I hadn't thought of. It's pretty slick, methinks. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Mon, 30 Jun 2003 01:13:35 +0000
parents 80e5258226f3
children 2d34c02d2031
files src/internal.h
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/internal.h	Sun Jun 29 20:57:28 2003 +0000
+++ b/src/internal.h	Mon Jun 30 01:13:35 2003 +0000
@@ -38,7 +38,13 @@
 #else
 #  define N_(String) (String)
 #  define _(x) (x)
+#  define ngettext(Singular, Plural, Number) ((Number == 1) ? (Singular) : (Plural))
 #endif
+/*
+ * The Singular/Plural/Number ngettext define above was taken from 
+ * an email to the texinfo mailing list by Manuel Guerrero.  Thank 
+ * you Manuel, and thank you Alex's good friend Google.
+ */
 
 #ifdef HAVE_ENDIAN_H
 # include <endian.h>