diff options
author | wlemb <wlemb> | 2000-11-16 21:10:29 +0000 |
---|---|---|
committer | wlemb <wlemb> | 2000-11-16 21:10:29 +0000 |
commit | 65ece94caf644bcb3cf7d483002605c80ab64f63 (patch) | |
tree | 7273b29ff03bb37fd989a85415c2524378d4607c /src | |
parent | a097d2a35efc38236f237aa20824479c59b7dc84 (diff) | |
download | groff-65ece94caf644bcb3cf7d483002605c80ab64f63.tar.gz |
* src/devices/grodvi/dvi.cc (main),
src/devices/grohtml2/post-html.cc (main),
src/devices/grolbp/lbp.cc (main), src/devices/grolj4/lj4.cc
(main), src/devices/grops/ps.cc (main), src/devices/grotty/tty.cc
(main), src/preproc/eqn/main.cc (main), src/preproc/grn/main.cc
(main), src/preproc/html2/pre-html.cc (main),
src/preproc/pic/main.cc (main), src/preproc/refer/refer.cc (main),
src/preproc/soelim/soelim.cc (main), src/preproc/tbl/main.cc
(main), src/roff/groff/groff.cc (main), src/roff/troff/input.cc
(main), src/utils/hpftodit/hpftodit.cc (main),
src/utils/indxbib/indxbib.cc (main), src/utils/lkbib/lkbib.cc
(main), src/utils/lookbib/lookbib.cc (main),
src/utils/pfbtops/pfbtops.c (main), src/utils/tfmtodit/tfmtodit.cc
(main): Use stdout for -v.
* src/roff/groff/groff.cc (run_commands),
src/roff/groff/pipeline.c (run_pipeline): New parameter `no_pipe'
to make direct printing to stdout possible.
* src/roff/groff/pipeline.h: Updated.
* src/utils/afmtodit/afmtodit.pl: Add -v switch.
* src/utils/afmtodit/Makefile.sub (afmtodit): Use @VERSION@.
* src/utils/afmtodit/afmtodit.man: Updated.
* src/utils/addftinfo/addftinfo.cc (main): Add -v switch.
(version): New function.
(usage): Updated.
* src/utils/addftinfo/addftinfo.man: Updated.
* src/devices/*/*, src/preproc/*/*, src/roff/*/*, src/utils/*/*:
Fixing copyright dates.
* src/preproc/eqn/neqn.sh: Adding GROFF_BIN_PATH to path instead of
replacing it.
* src/devices/grolbp/lbp.cc (main): Use Version_string instead of
version_string.
* src/roff/nroff/Makefile.sub (nroff): Fix use of @VERSION@.
Diffstat (limited to 'src')
49 files changed, 161 insertions, 139 deletions
diff --git a/src/devices/grodvi/dvi.cc b/src/devices/grodvi/dvi.cc index 9620ed04..1a8ce8b5 100644 --- a/src/devices/grodvi/dvi.cc +++ b/src/devices/grodvi/dvi.cc @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -856,8 +856,7 @@ int main(int argc, char **argv) case 'v': { extern const char *Version_string; - fprintf(stderr, "grodvi version %s\n", Version_string); - fflush(stderr); + printf("GNU grodvi (groff) version %s\n", Version_string); exit(0); break; } diff --git a/src/devices/grohtml/ChangeLog b/src/devices/grohtml/ChangeLog index 9eea2785..4b574384 100755 --- a/src/devices/grohtml/ChangeLog +++ b/src/devices/grohtml/ChangeLog @@ -1,3 +1,9 @@ +2000-11-16 Werner LEMBERG <wl@gnu.org> + + * html.cc (main): Use stdout for -v. + + Fixing copyright dates. + 2000-11-15 Werner LEMBERG <wl@gnu.org> * html.cc (main): Make -v exit immediately to be compliant with diff --git a/src/devices/grohtml/html.cc b/src/devices/grohtml/html.cc index 729831fc..b7acb6b7 100755 --- a/src/devices/grohtml/html.cc +++ b/src/devices/grohtml/html.cc @@ -6544,8 +6544,7 @@ int main(int argc, char **argv) case 'v': { extern const char *Version_string; - fprintf(stderr, "grohtml version %s\n", Version_string); - fflush(stderr); + printf("GNU grohtml (groff) version %s\n", Version_string); exit(0); break; } diff --git a/src/devices/grohtml/html.h b/src/devices/grohtml/html.h index 37007751..d2c67530 100644 --- a/src/devices/grohtml/html.h +++ b/src/devices/grohtml/html.h @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 2000 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff --git a/src/devices/grohtml/ordered_list.h b/src/devices/grohtml/ordered_list.h index 5f0c7e1d..b86ad9f0 100755 --- a/src/devices/grohtml/ordered_list.h +++ b/src/devices/grohtml/ordered_list.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 1999 Free Software Foundation, Inc. + * Copyright (C) 1999, 2000 Free Software Foundation, Inc. * * Ordered list, a template module for simple ordered list manipulation. * diff --git a/src/devices/grohtml2/post-html.cc b/src/devices/grohtml2/post-html.cc index b8520b91..3ef4daa8 100755 --- a/src/devices/grohtml2/post-html.cc +++ b/src/devices/grohtml2/post-html.cc @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1999 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000 Free Software Foundation, Inc. * * Gaius Mulley (gaius@glam.ac.uk) wrote post-html.cc * but it owes a huge amount of ideas and raw code from @@ -62,8 +62,7 @@ int main(int argc, char **argv) case 'v': { extern const char *Version_string; - fprintf(stderr, "post-grohtml version %s\n", Version_string); - fflush(stderr); + printf("GNU post-grohtml (groff) version %s\n", Version_string); exit(0); break; } diff --git a/src/devices/grolbp/lbp.cc b/src/devices/grolbp/lbp.cc index 23de5161..edd49fd2 100644 --- a/src/devices/grolbp/lbp.cc +++ b/src/devices/grolbp/lbp.cc @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 2000 Free Software Foundation, Inc. Written by Francisco Andrés Verdú <pandres@dragonet.es> with many ideas taken from the other groff drivers. @@ -716,10 +716,9 @@ int main(int argc, char **argv) case 'l' : orientation = 1; break; case 'v' : { - extern const char *version_string; - fprintf(stderr, "grolbp version %s\n",\ - version_string); - fflush(stderr); + extern const char *Version_string; + printf("GNU grolbp (groff) version %s\n",\ + Version_string); exit(0); break; }; diff --git a/src/devices/grolbp/lbp.h b/src/devices/grolbp/lbp.h index 04e6cecb..6a11b198 100644 --- a/src/devices/grolbp/lbp.h +++ b/src/devices/grolbp/lbp.h @@ -1,6 +1,5 @@ - // -*- C -*- -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 2000 Free Software Foundation, Inc. Written by Francisco Andrés Verdú <pandres@dragonet.es> groff is free software; you can redistribute it and/or modify it under diff --git a/src/devices/grolj4/lj4.cc b/src/devices/grolj4/lj4.cc index 113be2f5..4bbb5f5a 100644 --- a/src/devices/grolj4/lj4.cc +++ b/src/devices/grolj4/lj4.cc @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 2000 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -640,8 +640,7 @@ int main(int argc, char **argv) case 'v': { extern const char *Version_string; - fprintf(stderr, "grolj4 version %s\n", Version_string); - fflush(stderr); + printf("GNU grolj4 (groff) version %s\n", Version_string); exit(0); break; } diff --git a/src/devices/grops/ps.cc b/src/devices/grops/ps.cc index a4f4e613..30cd7737 100644 --- a/src/devices/grops/ps.cc +++ b/src/devices/grops/ps.cc @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -1487,8 +1487,7 @@ int main(int argc, char **argv) case 'v': { extern const char *Version_string; - fprintf(stderr, "grops version %s\n", Version_string); - fflush(stderr); + printf("GNU grops (groff) version %s\n", Version_string); exit(0); break; } diff --git a/src/devices/grops/psrm.cc b/src/devices/grops/psrm.cc index 14250587..b816c6b2 100644 --- a/src/devices/grops/psrm.cc +++ b/src/devices/grops/psrm.cc @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff --git a/src/devices/grotty/tty.cc b/src/devices/grotty/tty.cc index 820339a0..66a020fc 100644 --- a/src/devices/grotty/tty.cc +++ b/src/devices/grotty/tty.cc @@ -412,8 +412,7 @@ int main(int argc, char **argv) case 'v': { extern const char *Version_string; - fprintf(stderr, "grotty version %s\n", Version_string); - fflush(stderr); + printf("GNU grotty (groff) version %s\n", Version_string); exit(0); break; } diff --git a/src/preproc/eqn/lex.cc b/src/preproc/eqn/lex.cc index 0a5a4e29..25faec2b 100644 --- a/src/preproc/eqn/lex.cc +++ b/src/preproc/eqn/lex.cc @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff --git a/src/preproc/eqn/main.cc b/src/preproc/eqn/main.cc index f80f3cba..9ad2bb27 100644 --- a/src/preproc/eqn/main.cc +++ b/src/preproc/eqn/main.cc @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -262,8 +262,7 @@ int main(int argc, char **argv) case 'v': { extern const char *Version_string; - fprintf(stderr, "GNU eqn version %s\n", Version_string); - fflush(stderr); + printf("GNU eqn (groff) version %s\n", Version_string); exit(0); break; } diff --git a/src/preproc/eqn/neqn.sh b/src/preproc/eqn/neqn.sh index ce4e5a29..8f6bc8be 100644 --- a/src/preproc/eqn/neqn.sh +++ b/src/preproc/eqn/neqn.sh @@ -3,7 +3,7 @@ # GNU eqn with groff -Tascii|-Tlatin1|-Tutf8|-Tcp1047 is supported. : ${GROFF_BIN_PATH=@BINDIR@} -export PATH=$GROFF_BIN_PATH +export PATH=$GROFF_BIN_PATH:$PATH exec @g@eqn -Tascii ${1+"$@"} # eof diff --git a/src/preproc/grn/main.cc b/src/preproc/grn/main.cc index 56c4e410..209d60c0 100644 --- a/src/preproc/grn/main.cc +++ b/src/preproc/grn/main.cc @@ -263,8 +263,8 @@ main(int argc, case 'v': { extern const char *Version_string; - fprintf(stderr, "GNU grn version %s\n", Version_string); - fflush(stderr); + printf("GNU grn (groff) version %s\n", Version_string); + fflush(stdout); exit(0); break; } diff --git a/src/preproc/html2/image.cc b/src/preproc/html2/image.cc index cba34820..e05ee3dc 100755 --- a/src/preproc/html2/image.cc +++ b/src/preproc/html2/image.cc @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 2000 Free Software Foundation, Inc. Written by Gaius Mulley (gaius@glam.ac.uk) but owes much of the code from James Clark (jjc@jclark.com). diff --git a/src/preproc/html2/pre-html.cc b/src/preproc/html2/pre-html.cc index 0435edb7..b282a8b7 100755 --- a/src/preproc/html2/pre-html.cc +++ b/src/preproc/html2/pre-html.cc @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 2000 Free Software Foundation, Inc. Written by Gaius Mulley (gaius@glam.ac.uk). This file is part of groff. @@ -724,8 +724,7 @@ int main(int argc, char **argv) if (argv[i][0] == '-') { if (argv[i][1] == 'v') { extern const char *Version_string; - fprintf(stderr, "GNU pre-grohtml version %s\n", Version_string); - fflush(stderr); + printf("GNU pre-grohtml (groff) version %s\n", Version_string); exit(0); } } else { diff --git a/src/preproc/html2/pre-html.h b/src/preproc/html2/pre-html.h index 739ab4cb..7f56600d 100755 --- a/src/preproc/html2/pre-html.h +++ b/src/preproc/html2/pre-html.h @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 2000 Free Software Foundation, Inc. Written by Gaius Mulley (gaius@glam.ac.uk). This file is part of groff. diff --git a/src/preproc/html2/pushbackbuffer.cc b/src/preproc/html2/pushbackbuffer.cc index 1e7ad8b9..edd31c97 100755 --- a/src/preproc/html2/pushbackbuffer.cc +++ b/src/preproc/html2/pushbackbuffer.cc @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 2000 Free Software Foundation, Inc. Written by Gaius Mulley (gaius@glam.ac.uk). This file is part of groff. diff --git a/src/preproc/html2/pushbackbuffer.h b/src/preproc/html2/pushbackbuffer.h index 569f4050..8c3ff9b7 100755 --- a/src/preproc/html2/pushbackbuffer.h +++ b/src/preproc/html2/pushbackbuffer.h @@ -1,5 +1,5 @@ // -*- C -*- -/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 2000 Free Software Foundation, Inc. Written by Gaius Mulley (gaius@glam.ac.uk). This file is part of groff. diff --git a/src/preproc/pic/lex.cc b/src/preproc/pic/lex.cc index 11ffcce4..5b6d439a 100644 --- a/src/preproc/pic/lex.cc +++ b/src/preproc/pic/lex.cc @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff --git a/src/preproc/pic/main.cc b/src/preproc/pic/main.cc index e9444831..95ec3c31 100644 --- a/src/preproc/pic/main.cc +++ b/src/preproc/pic/main.cc @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -564,8 +564,7 @@ int main(int argc, char **argv) case 'v': { extern const char *Version_string; - fprintf(stderr, "GNU pic version %s\n", Version_string); - fflush(stderr); + printf("GNU pic (groff) version %s\n", Version_string); exit(0); break; } diff --git a/src/preproc/pic/pic.h b/src/preproc/pic/pic.h index 72485a39..36c36d1b 100644 --- a/src/preproc/pic/pic.h +++ b/src/preproc/pic/pic.h @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff --git a/src/preproc/pic/pic.y b/src/preproc/pic/pic.y index 28b09555..38b960a6 100644 --- a/src/preproc/pic/pic.y +++ b/src/preproc/pic/pic.y @@ -1,4 +1,4 @@ -/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff --git a/src/preproc/pic/troff.cc b/src/preproc/pic/troff.cc index 53761b2f..2f0496bf 100644 --- a/src/preproc/pic/troff.cc +++ b/src/preproc/pic/troff.cc @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff --git a/src/preproc/refer/label.y b/src/preproc/refer/label.y index 2c7c9095..2648b985 100644 --- a/src/preproc/refer/label.y +++ b/src/preproc/refer/label.y @@ -1,5 +1,5 @@ /* -*- C++ -*- - Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. + Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff --git a/src/preproc/refer/refer.cc b/src/preproc/refer/refer.cc index c4aabe99..19ac01be 100644 --- a/src/preproc/refer/refer.cc +++ b/src/preproc/refer/refer.cc @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -337,8 +337,7 @@ int main(int argc, char **argv) case 'v': { extern const char *Version_string; - fprintf(stderr, "GNU refer version %s\n", Version_string); - fflush(stderr); + printf("GNU refer (groff) version %s\n", Version_string); exit(0); break; } diff --git a/src/preproc/soelim/soelim.cc b/src/preproc/soelim/soelim.cc index c1a03e0c..7fa05af3 100644 --- a/src/preproc/soelim/soelim.cc +++ b/src/preproc/soelim/soelim.cc @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -74,8 +74,7 @@ int main(int argc, char **argv) case 'v': { extern const char *Version_string; - fprintf(stderr, "GNU soelim version %s\n", Version_string); - fflush(stderr); + printf("GNU soelim (groff) version %s\n", Version_string); exit(0); break; } diff --git a/src/preproc/tbl/main.cc b/src/preproc/tbl/main.cc index 46fc4297..53ce7577 100644 --- a/src/preproc/tbl/main.cc +++ b/src/preproc/tbl/main.cc @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -1464,8 +1464,7 @@ int main(int argc, char **argv) case 'v': { extern const char *Version_string; - fprintf(stderr, "GNU tbl version %s\n", Version_string); - fflush(stderr); + printf("GNU tbl (groff) version %s\n", Version_string); exit(0); break; } diff --git a/src/roff/groff/groff.cc b/src/roff/groff/groff.cc index 17c03f95..0dd67b68 100644 --- a/src/roff/groff/groff.cc +++ b/src/roff/groff/groff.cc @@ -89,7 +89,7 @@ char *predriver = 0; possible_command commands[NCOMMANDS]; -int run_commands(); +int run_commands(int no_pipe); void print_commands(); void append_arg_to_string(const char *arg, string &str); void handle_unknown_desc_command(const char *command, const char *arg, @@ -106,6 +106,7 @@ int main(int argc, char **argv) setbuf(stderr, stderr_buf); assert(NCOMMANDS <= MAX_COMMANDS); string Pargs, Largs, Fargs; + int vflag = 0; int Vflag = 0; int zflag = 0; int iflag = 0; @@ -166,30 +167,30 @@ int main(int argc, char **argv) Vflag++; break; case 'v': - case 'C': + vflag = 1; { extern const char *Version_string; - fprintf(stderr, - "GNU groff version %s\n", Version_string); - fprintf(stderr, - "Copyright (C) 2000 Free Software Foundation, Inc.\n" - "GNU groff comes with ABSOLUTELY NO WARRANTY.\n" - "You may redistribute copies of groff and its subprograms\n" - "under the terms of the GNU General Public License.\n" - "For more information about these matters, see the file named COPYING.\n"); - fprintf(stderr, "\ncalled subprograms:\n\n"); - fflush(stderr); - commands[SOELIM_INDEX].append_arg(buf); - commands[REFER_INDEX].append_arg(buf); - commands[PIC_INDEX].append_arg(buf); - commands[GRAP_INDEX].append_arg(buf); - commands[TBL_INDEX].append_arg(buf); - commands[GRN_INDEX].append_arg(buf); - commands[EQN_INDEX].append_arg(buf); - commands[TROFF_INDEX].append_arg(buf); - commands[POST_INDEX].append_arg(buf); - break; + printf("GNU groff version %s\n", Version_string); + printf("Copyright (C) 2000 Free Software Foundation, Inc.\n" + "GNU groff comes with ABSOLUTELY NO WARRANTY.\n" + "You may redistribute copies of groff and its subprograms\n" + "under the terms of the GNU General Public License.\n" + "For more information about these matters, see the file named COPYING.\n"); + printf("\ncalled subprograms:\n\n"); + fflush(stdout); } + commands[POST_INDEX].append_arg(buf); + // fall through + case 'C': + commands[SOELIM_INDEX].append_arg(buf); + commands[REFER_INDEX].append_arg(buf); + commands[PIC_INDEX].append_arg(buf); + commands[GRAP_INDEX].append_arg(buf); + commands[TBL_INDEX].append_arg(buf); + commands[GRN_INDEX].append_arg(buf); + commands[EQN_INDEX].append_arg(buf); + commands[TROFF_INDEX].append_arg(buf); + break; case 'N': commands[EQN_INDEX].append_arg(buf); break; @@ -389,7 +390,7 @@ int main(int argc, char **argv) print_commands(); exit(0); } - return run_commands(); + return run_commands(vflag); } const char *xbasename(const char *s) @@ -467,14 +468,14 @@ void print_commands() // Run the commands. Return the code with which to exit. -int run_commands() +int run_commands(int no_pipe) { char **v[NCOMMANDS]; int j = 0; for (int i = 0; i < NCOMMANDS; i++) if (commands[i].get_name() != 0) v[j++] = commands[i].get_argv(); - return run_pipeline(j, v); + return run_pipeline(j, v, no_pipe); } possible_command::possible_command() diff --git a/src/roff/groff/pipeline.c b/src/roff/groff/pipeline.c index cf91bdd4..a4573ba7 100644 --- a/src/roff/groff/pipeline.c +++ b/src/roff/groff/pipeline.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -179,9 +179,10 @@ is_system_shell (const char *shell) /* MSDOS doesn't have `fork', so we need to simulate the pipe by running the programs in sequence with redirected standard streams. */ -int run_pipeline (ncommands, commands) +int run_pipeline (ncommands, commands, no_pipe) int ncommands; char ***commands; + int no_pipe; { int save_stdin = dup(0); int save_stdout = dup(1); @@ -210,7 +211,7 @@ int run_pipeline (ncommands, commands) if (close(f) < 0) sys_fatal("close stdin"); } - if (i < ncommands - 1) + if ((i < ncommands - 1) && !no_pipe) { /* redirect stdout to temp file */ f = open(tmpfiles[outfile], O_WRONLY|O_CREAT|O_TRUNC|O_BINARY, 0666); @@ -265,9 +266,10 @@ int run_pipeline (ncommands, commands) #else /* not __MSDOS__, not _WIN32 */ -int run_pipeline(ncommands, commands) +int run_pipeline(ncommands, commands, no_pipe) int ncommands; char ***commands; + int no_pipe; { int i; int last_input = 0; @@ -278,7 +280,7 @@ int run_pipeline(ncommands, commands) for (i = 0; i < ncommands; i++) { int pdes[2]; PID_T pid; - if (i != ncommands - 1) { + if ((i != ncommands - 1) && !no_pipe) { if (pipe(pdes) < 0) sys_fatal("pipe"); } @@ -295,7 +297,7 @@ int run_pipeline(ncommands, commands) if (close(last_input) < 0) sys_fatal("close"); } - if (i != ncommands - 1) { + if ((i != ncommands - 1) && !no_pipe) { if (close(1) < 0) sys_fatal("close"); if (dup(pdes[1]) < 0) @@ -316,7 +318,7 @@ int run_pipeline(ncommands, commands) if (close(last_input) < 0) sys_fatal("close"); } - if (i != ncommands - 1) { + if ((i != ncommands - 1) && !no_pipe) { if (close(pdes[1]) < 0) sys_fatal("close"); last_input = pdes[0]; diff --git a/src/roff/groff/pipeline.h b/src/roff/groff/pipeline.h index 72c4dace..abb4b0ca 100644 --- a/src/roff/groff/pipeline.h +++ b/src/roff/groff/pipeline.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -19,7 +19,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef __cplusplus extern "C" { - int run_pipeline(int, char ***); + int run_pipeline(int, char ***, int); } #endif diff --git a/src/roff/grog/grog.pl b/src/roff/grog/grog.pl index b9493e3e..da31514b 100644 --- a/src/roff/grog/grog.pl +++ b/src/roff/grog/grog.pl @@ -129,7 +129,7 @@ sub process { sub usage { local($exit_status) = $_; - print "GNU groff version @VERSION@\n"; + print "GNU grog (groff) version @VERSION@\n"; exit $exit_status; } diff --git a/src/roff/grog/grog.sh b/src/roff/grog/grog.sh index 181fce4a..01056df9 100644 --- a/src/roff/grog/grog.sh +++ b/src/roff/grog/grog.sh @@ -17,7 +17,7 @@ do -C) sp=; opts="$opts -C"; shift; break;; -v) - echo "GNU grog version @VERSION@" + echo "GNU grog (groff) version @VERSION@" exit 0;; -*) opts="$opts $arg"; shift;; diff --git a/src/roff/nroff/Makefile.sub b/src/roff/nroff/Makefile.sub index e3b43665..b9cb4823 100644 --- a/src/roff/nroff/Makefile.sub +++ b/src/roff/nroff/Makefile.sub @@ -6,9 +6,9 @@ all: nroff nroff: nroff.sh rm -f $@ - sed -e 's|@BINDIR@|$(bindir)|g' \ + sed -e "s|@BINDIR@|$(bindir)|g" \ -e $(SH_SCRIPT_SED_CMD) \ - -e 's|@VERSION@|$(version)$(revision)|' $(srcdir)/nroff.sh >$@ + -e "s|@VERSION@|$(version)$(revision)|" $(srcdir)/nroff.sh >$@ chmod +x $@ install_data: nroff diff --git a/src/roff/nroff/nroff.sh b/src/roff/nroff/nroff.sh index 723ae176..4f15e464 100644 --- a/src/roff/nroff/nroff.sh +++ b/src/roff/nroff/nroff.sh @@ -67,7 +67,7 @@ for i # since `less' and `more' can use the emboldening info. ;; -v) - echo "GNU nroff version @VERSION@" + echo "GNU nroff (groff) version @VERSION@" exit 0 ;; --) shift diff --git a/src/roff/troff/input.cc b/src/roff/troff/input.cc index 1ffd6cb5..7dd343ac 100644 --- a/src/roff/troff/input.cc +++ b/src/roff/troff/input.cc @@ -5868,8 +5868,7 @@ int main(int argc, char **argv) case 'v': { extern const char *Version_string; - fprintf(stderr, "GNU troff version %s\n", Version_string); - fflush(stderr); + printf("GNU troff (groff) version %s\n", Version_string); exit(0); break; } diff --git a/src/utils/addftinfo/addftinfo.cc b/src/utils/addftinfo/addftinfo.cc index 55b62427..73a05870 100644 --- a/src/utils/addftinfo/addftinfo.cc +++ b/src/utils/addftinfo/addftinfo.cc @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -32,6 +32,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "guess.h" static void usage(); +static void version(); static void convert_font(const font_params &, FILE *, FILE *); typedef int font_params::*param_t; @@ -65,6 +66,10 @@ static struct { int main(int argc, char **argv) { program_name = argv[0]; + for (int i = 1; i < argc; i++) { + if (!strcmp(argv[i], "-v")) + version(); + } if (argc < 4) usage(); int resolution; @@ -120,11 +125,19 @@ int main(int argc, char **argv) static void usage() { - fprintf(stderr, "usage: %s [-param value] ... resolution unitwidth font\n", + fprintf(stderr, "usage: %s [-v] [-param value] ... " + "resolution unitwidth font\n", program_name); exit(1); } +static void version() +{ + extern const char *Version_string; + printf("GNU addftinfo (groff) version %s\n", Version_string); + exit(0); +} + static int get_line(FILE *fp, string *p) { int c; diff --git a/src/utils/addftinfo/addftinfo.man b/src/utils/addftinfo/addftinfo.man index 6741c171..2064ca7f 100644 --- a/src/utils/addftinfo/addftinfo.man +++ b/src/utils/addftinfo/addftinfo.man @@ -1,5 +1,5 @@ .ig \"-*- nroff -*- -Copyright (C) 1989-1995 Free Software Foundation, Inc. +Copyright (C) 1989-2000 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -22,6 +22,9 @@ addftinfo \- add information to troff font files for use with groff .SH SYNOPSIS .B addftinfo [ +.B \-v +] +[ .BI \- param\ value\fR.\|.\|. ] .I res @@ -53,7 +56,10 @@ ends with .B I the font will be assumed to be italic. .SH OPTIONS -Each of the options changes one of the parameters that is used +.B \-v +prints the version number. +.LP +All other options changes one of the parameters that is used to derive the heights and depths. Like the existing quantities in the font file, each diff --git a/src/utils/afmtodit/Makefile.sub b/src/utils/afmtodit/Makefile.sub index 9fee2def..9176924f 100644 --- a/src/utils/afmtodit/Makefile.sub +++ b/src/utils/afmtodit/Makefile.sub @@ -5,10 +5,12 @@ all: afmtodit afmtodit: afmtodit.pl if test -n "$(PERLPATH)"; then \ - sed -e 's;/usr/bin/perl;$(PERLPATH);' \ + sed -e "s|/usr/bin/perl|$(PERLPATH)|" \ + -e "s|@VERSION@|$(version)$(revision)|" \ $(srcdir)/afmtodit.pl >afmtodit; \ else \ - cp $(srcdir)/afmtodit.pl afmtodit; \ + sed -e "s|@VERSION@|$(version)$(revision)|" \ + $(srcdir)/afmtodit.pl afmtodit; \ fi chmod +x afmtodit diff --git a/src/utils/afmtodit/afmtodit.man b/src/utils/afmtodit/afmtodit.man index e0631e09..03a6e5cb 100644 --- a/src/utils/afmtodit/afmtodit.man +++ b/src/utils/afmtodit/afmtodit.man @@ -36,7 +36,7 @@ afmtodit \- create font files for use with groff \-Tps .ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\\$2" "\ ]" .el .RB "[\ " "\\$1" "\ ]" .. -.OP \-ns +.OP \-nsv .OP \-d desc_file .OP \-e enc_file .OP \-i n @@ -126,6 +126,9 @@ is the desired value of the corresponding parameter in thousandths of an em. These parameters are normally needed only for italic (or oblique) fonts. .SH OPTIONS .TP +.B \-v +Print version. +.TP .B \-n Don't output a .B ligatures diff --git a/src/utils/afmtodit/afmtodit.pl b/src/utils/afmtodit/afmtodit.pl index a44ae7a2..661245aa 100644 --- a/src/utils/afmtodit/afmtodit.pl +++ b/src/utils/afmtodit/afmtodit.pl @@ -1,32 +1,37 @@ #! /usr/bin/perl -P- # -*- Perl -*- -#Copyright (C) 1989-2000 Free Software Foundation, Inc. -# Written by James Clark (jjc@jclark.com) +# Copyright (C) 1989-2000 Free Software Foundation, Inc. +# Written by James Clark (jjc@jclark.com) # -#This file is part of groff. +# This file is part of groff. # -#groff is free software; you can redistribute it and/or modify it under -#the terms of the GNU General Public License as published by the Free -#Software Foundation; either version 2, or (at your option) any later -#version. +# groff is free software; you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2, or (at your option) any later +# version. # -#groff is distributed in the hope that it will be useful, but WITHOUT ANY -#WARRANTY; without even the implied warranty of MERCHANTABILITY or -#FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -#for more details. +# groff is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. # -#You should have received a copy of the GNU General Public License along -#with groff; see the file COPYING. If not, write to the Free Software -#Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# You should have received a copy of the GNU General Public License along +# with groff; see the file COPYING. If not, write to the Free Software +# Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. $prog = $0; $prog =~ s@.*/@@; do 'getopts.pl'; -do Getopts('e:sd:i:a:n'); +do Getopts('ve:sd:i:a:n'); + +if (opt_v) { + print "GNU afmtodit (groff) version @VERSION@\n"; + exit 0; +} if ($#ARGV != 2) { - die "Usage: $prog [-ns] [-d DESC] [-e encoding] [-i n] [-a angle] afmfile mapfile font\n"; + die "Usage: $prog [-nsv] [-d DESC] [-e encoding] [-i n] [-a angle] afmfile mapfile font\n"; } $afm = $ARGV[0]; diff --git a/src/utils/hpftodit/hpftodit.cc b/src/utils/hpftodit/hpftodit.cc index 2e5978c1..f2a7afee 100644 --- a/src/utils/hpftodit/hpftodit.cc +++ b/src/utils/hpftodit/hpftodit.cc @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1994 Free Software Foundation, Inc. +/* Copyright (C) 1994, 2000 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -221,9 +221,8 @@ int main(int argc, char **argv) case 'v': { extern const char *Version_string; - fprintf(stderr, "hpftodit version %s\n", Version_string); - fflush(stderr); - break; + printf("GNU hpftodit (groff) version %s\n", Version_string); + exit(0); } break; case '?': diff --git a/src/utils/indxbib/indxbib.cc b/src/utils/indxbib/indxbib.cc index 3185fe2c..321a7c28 100644 --- a/src/utils/indxbib/indxbib.cc +++ b/src/utils/indxbib/indxbib.cc @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -174,8 +174,8 @@ int main(int argc, char **argv) case 'v': { extern const char *Version_string; - fprintf(stderr, "GNU indxbib version %s\n", Version_string); - fflush(stderr); + printf("GNU indxbib (groff) version %s\n", Version_string); + exit(0); break; } case '?': diff --git a/src/utils/lkbib/lkbib.cc b/src/utils/lkbib/lkbib.cc index cfd099a5..bc9bd535 100644 --- a/src/utils/lkbib/lkbib.cc +++ b/src/utils/lkbib/lkbib.cc @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -74,8 +74,8 @@ int main(int argc, char **argv) case 'v': { extern const char *Version_string; - fprintf(stderr, "GNU lkbib version %s\n", Version_string); - fflush(stderr); + printf("GNU lkbib (groff) version %s\n", Version_string); + exit(0); break; } case 'p': diff --git a/src/utils/lookbib/lookbib.cc b/src/utils/lookbib/lookbib.cc index 4240a47f..96192aee 100644 --- a/src/utils/lookbib/lookbib.cc +++ b/src/utils/lookbib/lookbib.cc @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -73,8 +73,8 @@ int main(int argc, char **argv) case 'v': { extern const char *Version_string; - fprintf(stderr, "GNU lookbib version %s\n", Version_string); - fflush(stderr); + printf("GNU lookbib (groff) version %s\n", Version_string); + exit(0); break; } case '?': diff --git a/src/utils/pfbtops/pfbtops.c b/src/utils/pfbtops/pfbtops.c index 9aaeeccf..bb2a85ab 100644 --- a/src/utils/pfbtops/pfbtops.c +++ b/src/utils/pfbtops/pfbtops.c @@ -38,8 +38,8 @@ int main(argc, argv) case 'v': { extern char *Version_string; - fprintf(stderr, "pfbtops groff version %s\n", Version_string); - fflush(stderr); + printf("GNU pfbtops (groff) version %s\n", Version_string); + exit(0); break; } case '?': diff --git a/src/utils/tfmtodit/tfmtodit.cc b/src/utils/tfmtodit/tfmtodit.cc index ab3ab38f..d8f2a5fe 100644 --- a/src/utils/tfmtodit/tfmtodit.cc +++ b/src/utils/tfmtodit/tfmtodit.cc @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -713,8 +713,8 @@ int main(int argc, char **argv) case 'v': { extern const char *Version_string; - fprintf(stderr, "tfmtodit version %s\n", Version_string); - fflush(stderr); + printf("GNU tfmtodit (groff) version %s\n", Version_string); + exit(0); break; } case '?': |