Back to index

glibc  2.9
Defines | Functions
tst-translit.c File Reference
#include <libintl.h>
#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

Go to the source code of this file.

Defines

#define TEST(in, exp)

Functions

int main (void)

Define Documentation

#define TEST (   in,
  exp 
)
Value:
s = gettext (in);                                                    \
  puts (s);                                                          \
  result |= strcmp (s, exp) != 0;

Function Documentation

int main ( void  )

Definition at line 29 of file tst-translit.c.

{
  int result = 0;
  const char *s;

  setenv ("LANGUAGE", "existing-locale", 1);
  unsetenv ("OUTPUT_CHARSET");
  setlocale (LC_ALL, "en_US.ANSI_X3.4-1968");
  textdomain ("translit");
  bindtextdomain ("translit", OBJPFX "domaindir");

#define TEST(in, exp) \
  s = gettext (in);                                                  \
  puts (s);                                                          \
  result |= strcmp (s, exp) != 0;

  TEST ("test", "<<(C) AEss>>");
  TEST ("test", "<<(C) AEss>>");
  TEST ("onemore", " 1/2 * 1/2 = 1/4 ");
  TEST ("onemore", " 1/2 * 1/2 = 1/4 ");
  TEST ("test", "<<(C) AEss>>");

  return result;
}

Here is the call graph for this function: