blob: 37beec64c17aadb06206adc7a4fb045fc1398f7d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
/* Test program, used by the plural-1 test. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <stdlib.h>
#include <stdio.h>
#include <locale.h>
/* Make sure we use the included libintl, not the system's one. */
#define textdomain textdomain__
#define bindtextdomain bindtextdomain__
#define ngettext ngettext__
#include <libgnuintl.h>
int main (argc, argv)
int argc;
char *argv[];
{
int n = atoi (argv[1]);
if (setlocale (LC_ALL, "") == NULL)
return 1;
textdomain ("cake");
bindtextdomain ("cake", ".");
printf (ngettext ("a piece of cake", "%d pieces of cake", n), n);
printf ("\n");
return 0;
}
|