[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Feature Request for the GNU hello program
From: |
Roland Illig |
Subject: |
Re: Feature Request for the GNU hello program |
Date: |
Tue, 9 Apr 2002 09:22:06 +0200 |
"Karl Eichwalder" <address@hidden> schrieb:
> "Roland Illig" <address@hidden> writes:
>
> > I was aware that Microsoft introduced advanced technology into Winword
that
> > all the GNU programs are missing at the moment.
>
> Sounds interesting.
>
> > It is described in KB article Q210565.
> > http://rolands.linux-site.net/cgi-bin/codesnippet.pl?cmd=details&id=53
>
> These days Elvis doesn't have the time to browse the web; please do him
> the favor to post a summary.
>
--snip--
diff -Nru hello-1.3.org/hello.c hello-1.3/hello.c
--- hello-1.3.org/hello.c Sun May 23 02:43:29 1993
+++ hello-1.3/hello.c Tue Apr 9 01:45:53 2002
@@ -69,6 +69,7 @@
struct option longopts[] =
{
+ { 0, 0, 0, 'u' },
{ "version", 0, 0, 'v' },
{ "help", 0, 0, 'h' },
#define lives
@@ -79,7 +80,7 @@
extern char version[];
-char usage[] = "Usage: %s [-htvm] [--help] [--traditional] [--version]
[--mail]\n";
+char usage[] = "Usage: %s [-htuvm] [--help] [--traditional] [--version]
[--mail]\n";
static char *progname;
@@ -89,12 +90,12 @@
char *argv[];
{
int optc;
- int h = 0, v = 0, t = 0, m = 0, lose = 0, z = 0;
+ int h = 0, v = 0, t = 0, m = 0, u = 0, lose = 0, z = 0;
progname = argv[0];
#define king
- while ((optc = getopt_long (argc, argv, "htvm", longopts, (int *) 0)) !=
EOF)
+ while ((optc = getopt_long (argc, argv, "htuvm", longopts, (int *) 0)) !=
EOF)
{
switch (optc)
{
@@ -110,6 +111,9 @@
case 't':
t = 1;
break;
+ case 'u':
+ u = 1;
+ break;
default:
lose = 1;
break;
@@ -131,6 +135,13 @@
fprintf (stderr, "%s\n", version);
if (! h)
exit (0);
+ }
+
+ if (u)
+ {
+ /* Microsoft Word emulator, see */
+ /* Microsoft KB article Q210565 for details. */
+ exit (0);
}
if (h)
diff -Nru hello-1.3.org/hello.texi hello-1.3/hello.texi
--- hello-1.3.org/hello.texi Sun May 23 03:27:15 1993
+++ hello-1.3/hello.texi Tue Apr 9 01:49:41 2002
@@ -129,6 +129,7 @@
Usage: hello [-htvm] [--help] [--traditional] [--version] [--mail]
-h, --help Print a summary of the options
-t, --traditional Use traditional greeting format
+ -u Microsoft Word Emulation mode
-v, --version Print the version number
-m, --mail Print your mail
@end example
@@ -165,6 +166,10 @@
@itemx -v
Print the version number of @code{hello} on the standard error output
and then exit.
+
address@hidden -u
+Does nothing but exiting immediately. Based on the work of Microsoft
+Corp. in Word. (see KB article Q210565 for details)
@item --traditional
@itemx -t
--snip--
Please ignore the possibly wrong line breaks.
Roland