diff options
author | Jim Meyering <jim@meyering.net> | 1999-03-04 05:08:01 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1999-03-04 05:08:01 +0000 |
commit | e35e21e280f2af6d131cb7247cd95feab55c87d3 (patch) | |
tree | f7108442ec1f81a43ef56c2fd6796235aa0a8927 /lib | |
parent | 8f443fb9c18f29d3c5e5ef60e9c08b5f01346b06 (diff) | |
download | coreutils-e35e21e280f2af6d131cb7247cd95feab55c87d3.tar.xz |
(_): Define it.
(parse_long_options): Accept new parameter, authors, and print it.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/long-options.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/long-options.c b/lib/long-options.c index a3827d595..fdc9ec095 100644 --- a/lib/long-options.c +++ b/lib/long-options.c @@ -26,6 +26,13 @@ #include "closeout.h" #include "long-options.h" +#if ENABLE_NLS +# include <libintl.h> +# define _(Text) gettext (Text) +#else +# define _(Text) Text +#endif + static struct option const long_options[] = { {"help", no_argument, 0, 'h'}, @@ -37,8 +44,12 @@ static struct option const long_options[] = Be careful not to gobble up `--'. */ void -parse_long_options (int argc, char **argv, const char *command_name, - const char *package, const char *version, +parse_long_options (int argc, + char **argv, + const char *command_name, + const char *package, + const char *version, + const char *authors, void (*usage_func)()) { int c; @@ -59,6 +70,7 @@ parse_long_options (int argc, char **argv, const char *command_name, case 'v': printf ("%s (%s) %s\n", command_name, package, version); + printf (_("Written by %s.\n"), authors); close_stdout (); /* FIXME: output failure exit status should be settable via an arg. */ exit (0); |