diff options
-rw-r--r-- | man/xbiff.man | 3 | ||||
-rw-r--r-- | xbiff.c | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/man/xbiff.man b/man/xbiff.man index 739b362..f98c308 100644 --- a/man/xbiff.man +++ b/man/xbiff.man @@ -77,6 +77,9 @@ is loudest). .B \-shape This option indicates that the mailbox window should be shaped if masks for the empty or full images are given. +.TP 8 +.B \-version +This option indicates that \fIxbiff\fP should print its version and exit. .PP The following standard X Toolkit command line arguments are commonly used with .I xbiff: @@ -80,7 +80,8 @@ static void Usage (void) " -bg color background color\n" " -fg color foreground color\n" " -rv reverse video\n" -" -shape shape the window\n"; +" -shape shape the window\n" +" -version print version info and exit\n"; fprintf (stderr, "usage: %s [-options ...]\n", ProgramName); fprintf (stderr, "%s\n", help_message); @@ -100,6 +101,10 @@ main (int argc, char **argv) toplevel = XtAppInitialize(&xtcontext, "XBiff", options, XtNumber (options), &argc, argv, NULL, NULL, 0); + if (argc == 2 && strcmp(argv[1], "-version") == 0) { + puts(PACKAGE_STRING); + exit(0); + } if (argc != 1) Usage (); /* |