/* hello.c -- print a greeting message and exit.
Copyright 1992, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2005,
- 2006, 2007, 2008, 2010, 2011 Free Software Foundation, Inc.
+ 2006, 2007, 2008, 2010, 2011, 2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
{
int optc;
int lose = 0;
- const char *greeting_msg = _("Hello, world!");
+ const char *greeting_msg;
wchar_t *mb_greeting;
size_t len;
greeting_type g = greet_traditional;
textdomain (PACKAGE);
#endif
+ /* Having initialized gettext, get the default message. */
+ greeting_msg = _("Hello, world!");
+
/* Even exiting has subtleties. On exit, if any writes failed, change
the exit status. The /dev/full device on GNU/Linux can be used for
testing; for instance, hello >/dev/full should exit unsuccessfully.