diff options
author | wlemb <wlemb> | 2001-04-10 12:54:10 +0000 |
---|---|---|
committer | wlemb <wlemb> | 2001-04-10 12:54:10 +0000 |
commit | 3eba6c39c3d6e7fd573a1c3f74063a35f9861407 (patch) | |
tree | 2c32998fa8ed173ab84325e9d345f5ea49f86a2c /src/devices/grolbp | |
parent | 21ebecd3dc1722faa746a7f5e943a580beffb138 (diff) | |
download | groff-3eba6c39c3d6e7fd573a1c3f74063a35f9861407.tar.gz |
* NEWS: Updated.
* doc/groff.texinfo: Many fixes, additions, clarifications, etc.
* src/devices/grodvi/dvi.cc (main): Accept --help and --version.
(usage): Add stream argument. Don't exit.
* src/devices/grohtml/post-html.cc (main): Accept --help and --version.
Write --version output to stdout, not stderr.
(usage): Add stream argument. Don't exit.
* src/devices/grohtml-old/html.cc (main): Accept --help and --version.
(usage): Add stream argument. Don't exit.
* src/devices/grolbp/lbp.cc (long_options): Use symbolic getopt.h
constants.
(usage): Add stream argument. Don't exit.
(main): Write --help output to stdout, not stderr.
* src/devices/grolj4/lj4.cc (main): Accept --help and --version.
(usage): Add stream argument. Don't exit.
* src/devices/grops/ps.cc (main): Accept --help and --version.
(usage): Add stream argument. Don't exit.
* src/devices/grotty/tty.cc (main): Accept --help and --version.
(usage): Add stream argument. Don't exit.
* src/preproc/eqn/main.cc (usage): Add stream argument. Don't exit.
(main): Accept --help and --version.
* src/preproc/grn/main.cc (usage): Add stream argument. Don't exit.
(main): Accept --help and --version.
* src/preproc/html/pre-html.cc (usage): Add stream argument.
(scanArguments): Accept --help and --version.
* src/preproc/pic/main.cc (usage): Add stream argument. Don't exit.
(main): Accept --help and --version.
* src/preproc/refer/refer.cc (main): Accept --help and --version.
(usage): Add stream argument. Don't exit.
* src/preproc/soelim/soelim.cc (usage): Add stream argument. Don't
exit.
(main): Accept --help and --version.
* src/preproc/tbl/main.cc (usage): Add stream argument. Don't exit.
(main): Accept --help and --version.
* src/roff/groff/groff.cc (main): Accept --help and --version.
(synopsis): Add stream argument.
(help): Write --help output to stdout, not stderr.
(usage): Add stream argument. Don't exit.
* src/roff/grog/grog.pl: Accept --help and --version.
(help): New sub.
* src/roff/grog/grog.sh: Accept --help and --version.
* src/roff/nroff/nroff.sh: Accept --help and --version.
* src/roff/troff/input.cc (USAGE_EXIT_CODE): Remove macro.
(usage): Add stream argument. Don't exit.
(main): Accept --help and --version.
* src/utils/addftinfo/addftinfo.cc (main): Accept --help and --version.
(usage): New function with stream argument, doesn't exit.
* src/utils/hpftodit/hpftodit.cc (main): Accept --help and --version.
(usage): New function with stream argument, doesn't exit.
* src/utils/indxbib/indxbib.cc (main): Accept --help and --version.
(usage): Add stream argument. Don't exit.
* src/utils/lkbib/lkbib.cc (usage): Add stream argument. Don't exit.
(main): Accept --help and --version.
* src/utils/lookbib/lookbib.cc (usage): Add stream argument. Don't
exit.
(main): Accept --help and --version.
* src/utils/pfbtops/pfbtops.c (usage): Add stream argument. Don't exit.
(main): Accept --help and --version.
* src/utils/tfmtodit/tfmtodit.cc (main): Accept --help and --version.
(usage): Add stream argument. Don't exit.
Diffstat (limited to 'src/devices/grolbp')
-rw-r--r-- | src/devices/grolbp/lbp.cc | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/src/devices/grolbp/lbp.cc b/src/devices/grolbp/lbp.cc index edd49fd2..69196af4 100644 --- a/src/devices/grolbp/lbp.cc +++ b/src/devices/grolbp/lbp.cc @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1994, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1994, 2000, 2001 Free Software Foundation, Inc. Written by Francisco Andrés Verdú <pandres@dragonet.es> with many ideas taken from the other groff drivers. @@ -663,19 +663,19 @@ static void handle_unknown_desc_command(const char *command, const char *arg, }; static struct option long_options[] = { - {"orientation",1,NULL,'o'}, - {"version",0,NULL,'v'}, - {"copies",1,NULL,'c'}, - {"landscape",0,NULL,'l'}, - {"papersize",1,NULL,'p'}, - {"fontdir",1,NULL,'F'}, - {"help",0,NULL,'h'}, - {0, 0, 0, 0} + { "orientation", required_argument, NULL, 'o' }, + { "version", no_argument, NULL, 'v' }, + { "copies", required_argument, NULL, 'c' }, + { "landscape", no_argument, NULL, 'l' }, + { "papersize", required_argument, NULL, 'p' }, + { "fontdir", required_argument, NULL, 'F' }, + { "help", no_argument, NULL, 'h' }, + { NULL, 0, 0, 0 } }; -static void usage() +static void usage(FILE *stream) { - fprintf(stderr, + fprintf(stream, "usage: %s [-lvh] [-c n] [-p paper_size] [-F dir] [-o or] "\ " [files ...]\n"\ " -o --orientation=[portrait|landscape]\n"\ @@ -686,7 +686,6 @@ static void usage() " -F --fontdir=dir\n"\ " -h --help\n", program_name); - exit(1); }; // usage int main(int argc, char **argv) @@ -717,8 +716,8 @@ int main(int argc, char **argv) break; case 'v' : { extern const char *Version_string; - printf("GNU grolbp (groff) version %s\n",\ - Version_string); + printf("GNU grolbp (groff) version %s\n", + Version_string); exit(0); break; }; @@ -744,9 +743,12 @@ int main(int argc, char **argv) ncopies = unsigned(n); break; } - case 'h' : usage(); + case 'h' : usage(stdout); + exit(0); break; - + case '?' : usage(stderr); + exit(1); + break; }; // switch (c) }; // while (c > 0 ) |