#if defined(_MSC_VER) || defined(__BORLANDC__)
#include <windows.h>
#endif

#include "gettext_config.h"

#include <glib/gprintf.h>

#include "gettextex2.h"

#ifdef LOCALEDIR
#undef LOCALEDIR
#define LOCALEDIR "./locale"
#endif

#ifdef __GNUC__
void __attribute__ ((constructor)) texparser_load (void)
#elif defined (_MSC_VER) || defined (__BORLANDC__)
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
#else
#error Unknown compiler
#endif
{
#ifdef LOCALEDIR
  bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); // remove if standard path used
#endif
  textdomain (GETTEXT_PACKAGE);
#if defined(_MSC_VER) || defined(__BORLANDC__)
  (void) hInstance;
  (void) dwReason;
  (void) lpReserved;
  return TRUE;
#endif
}

void
gettextex2 (void)
{
  g_printf (_("Hello World!"));
  g_printf ("\n");
  g_printf (_("Quit"));
}
