]> diplodocus.org Git - nmh/blobdiff - h/mh.h
Added explicit dependency to build sbr/icalparse.h before running LEX.
[nmh] / h / mh.h
diff --git a/h/mh.h b/h/mh.h
index 77671f8d39bd896552f8fda8459410a6e1adbf59..22e3a0b5d3d2bc563875d2f23966bd49906275be 100644 (file)
--- a/h/mh.h
+++ b/h/mh.h
@@ -51,6 +51,15 @@ typedef unsigned char  boolean;  /* not int so we can pack in a structure */
 /* FENDNULL fends off NULL by giving an empty string instead. */
 #define FENDNULL(s) ((s) ? (s) : "")
 
+/* PLURALS gives a pointer to the string "s" when n isn't 1, and to the
+ * empty string "" when it is.  Suitable for obtaining the plural `s'
+ * used for English nouns.  It treats -1 as plural, as does GNU gettext.
+ * Having output vary for plurals is annoying for those writing parsers;
+ * better to phrase the output such that no test is needed, e.g.
+ * "messages found: 42". */
+extern const char plurals[];
+#define PLURALS(n) (plurals + ((n) == 1))
+
 /*
  * char array that keeps track of size in both bytes and characters
  * Usage note: