Skip to content

Commit

Permalink
this is so horrible
Browse files Browse the repository at this point in the history
  • Loading branch information
avar committed Jun 6, 2011
1 parent c45fac5 commit f8b290b
Showing 1 changed file with 30 additions and 8 deletions.
38 changes: 30 additions & 8 deletions src/hello.c
Expand Up @@ -46,6 +46,7 @@ main (int argc, char *argv[])
{ {
int optc; int optc;
int lose = 0; int lose = 0;
int counter;
const char *greeting_msg = NULL; const char *greeting_msg = NULL;
greeting_type g = greet_gnu; greeting_type g = greet_gnu;


Expand Down Expand Up @@ -109,18 +110,39 @@ main (int argc, char *argv[])
printf (_("hello, world\n")); printf (_("hello, world\n"));


else if (g == greet_new) else if (g == greet_new)
/* TRANSLATORS: Use box drawing characters or other fancy stuff {
if your encoding (e.g., UTF-8) allows it. If done so add the if (greeting_msg)
following note, please: {
size_t length = strlen(greeting_msg);
[Note: For best viewing results use a UTF-8 locale, please.] printf ("+");
*/ for (counter = 0; counter <= (length + 1); counter++)
printf (_("\ {
printf ("-");
}
printf ("+\n");
printf ("| %s |\n", greeting_msg);
printf ("+");
for (counter = 0; counter <= (length + 1); counter++)
{
printf ("-");
}
printf ("+\n");
}
else
{
/* TRANSLATORS: Use box drawing characters or other fancy stuff
if your encoding (e.g., UTF-8) allows it. If done so add the
following note, please:
[Note: For best viewing results use a UTF-8 locale, please.]
*/
printf (_("\
+---------------+\n\ +---------------+\n\
| Hello, world! |\n\ | Hello, world! |\n\
+---------------+\n\ +---------------+\n\
")); "));

}
}
else if (g == greet_user) else if (g == greet_user)
puts (greeting_msg); puts (greeting_msg);


Expand Down

0 comments on commit f8b290b

Please sign in to comment.