summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorwl <wl>2011-01-22 14:35:48 +0000
committerwl <wl>2011-01-22 14:35:48 +0000
commit45ff59de6110f4d824716c4b8fff1978423e64c8 (patch)
treed7305f98c45dba27d97037c2908cefa03728e30f /src
parentd97da90fc8e4e9d66174c10afdeaffa8937ebb50 (diff)
downloadgroff-45ff59de6110f4d824716c4b8fff1978423e64c8.tar.gz
Integrate `chem' into `groff' (new option -j).
* src/roff/groff/groff.cpp (CHEM_INDEX): New constant. (main) ['j']: Add `chem'. (synopsis, help): Updated. * src/roff/troff/pipeline.h (MAX_COMMANDS): Increase to 14. * src/roff/groff/groff.man: Document new command line option. * NEWS: Updated.
Diffstat (limited to 'src')
-rw-r--r--src/roff/groff/groff.cpp17
-rw-r--r--src/roff/groff/groff.man14
-rw-r--r--src/roff/groff/pipeline.h4
3 files changed, 23 insertions, 12 deletions
diff --git a/src/roff/groff/groff.cpp b/src/roff/groff/groff.cpp
index 7921d1de..8493bd64 100644
--- a/src/roff/groff/groff.cpp
+++ b/src/roff/groff/groff.cpp
@@ -1,6 +1,5 @@
// -*- C++ -*-
-/* Copyright (C) 1989-2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
- 2008, 2009, 2010
+/* Copyright (C) 1989-2011
Free Software Foundation, Inc.
Written by James Clark (jjc@jclark.com)
@@ -55,7 +54,8 @@ const int PRECONV_INDEX = 0;
const int SOELIM_INDEX = PRECONV_INDEX + 1;
const int REFER_INDEX = SOELIM_INDEX + 1;
const int GRAP_INDEX = REFER_INDEX + 1;
-const int PIC_INDEX = GRAP_INDEX + 1;
+const int CHEM_INDEX = GRAP_INDEX + 1;
+const int PIC_INDEX = CHEM_INDEX + 1;
const int TBL_INDEX = PIC_INDEX + 1;
const int GRN_INDEX = TBL_INDEX + 1;
const int EQN_INDEX = GRN_INDEX + 1;
@@ -135,7 +135,7 @@ int main(int argc, char **argv)
};
while ((opt = getopt_long(
argc, argv,
- "abcCd:D:eEf:F:gGhiI:lkK:L:m:M:n:No:pP:r:RsStT:UvVw:W:XzZ",
+ "abcCd:D:eEf:F:gGhiI:jkK:lL:m:M:n:No:pP:r:RsStT:UvVw:W:XzZ",
long_options, NULL))
!= EOF) {
char buf[3];
@@ -170,6 +170,9 @@ int main(int argc, char **argv)
case 't':
commands[TBL_INDEX].set_name(command_prefix, "tbl");
break;
+ case 'j':
+ commands[CHEM_INDEX].set_name(command_prefix, "chem");
+ // fall through
case 'p':
commands[PIC_INDEX].set_name(command_prefix, "pic");
break;
@@ -206,7 +209,7 @@ int main(int argc, char **argv)
vflag = 1;
printf("GNU groff version %s\n", Version_string);
printf(
- "Copyright (C) 2009 Free Software Foundation, Inc.\n"
+ "Copyright (C) 2011 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"
@@ -259,7 +262,6 @@ int main(int argc, char **argv)
if (strcmp(optarg, "html") == 0)
// force soelim to aid the html preprocessor
commands[SOELIM_INDEX].set_name(command_prefix, "soelim");
-
if (strcmp(optarg, "Xps") == 0) {
warning("-TXps option is obsolete: use -X -Tps instead");
device = "ps";
@@ -745,7 +747,7 @@ char **possible_command::get_argv()
void synopsis(FILE *stream)
{
fprintf(stream,
-"usage: %s [-abceghiklpstvzCENRSUVXZ] [-Fdir] [-mname] [-Tdev] [-ffam]\n"
+"usage: %s [-abceghijklpstvzCENRSUVXZ] [-Fdir] [-mname] [-Tdev] [-ffam]\n"
" [-wname] [-Wname] [-Mdir] [-dcs] [-rcn] [-nnum] [-olist] [-Parg]\n"
" [-Darg] [-Karg] [-Larg] [-Idir] [files...]\n",
program_name);
@@ -762,6 +764,7 @@ void help()
"-e\tpreprocess with eqn\n"
"-g\tpreprocess with grn\n"
"-G\tpreprocess with grap\n"
+"-j\tpreprocess with chem\n"
"-s\tpreprocess with soelim\n"
"-R\tpreprocess with refer\n"
"-Tdev\tuse device dev\n"
diff --git a/src/roff/groff/groff.man b/src/roff/groff/groff.man
index 38ebbb0b..7cdabd15 100644
--- a/src/roff/groff/groff.man
+++ b/src/roff/groff/groff.man
@@ -1,7 +1,7 @@
.ig
groff.man
-Copyright (C) 1989, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+Copyright (C) 1989, 2002-2009, 2011
Free Software Foundation, Inc.
Rewritten in 2002 by Bernd Warken <bwarken@mayn.de>
@@ -44,7 +44,7 @@ groff \- front-end for the groff document formatting system
.\" --------------------------------------------------------------------
.
.SY groff
-.OP \-abcegiklpstzCEGNRSUVXZ
+.OP \-abcegikjklpstzCEGNRSUVXZ
.OP \-d cs
.OP \-D arg
.OP \-f fam
@@ -217,6 +217,14 @@ option.
.
.
.TP
+.B \-j
+Preprocess with
+.BR @g@chem .
+Implies
+.BR \-p .
+.
+.
+.TP
.B \-k
Preprocess with
.BR preconv .
@@ -1713,7 +1721,7 @@ This is the only grap version supported by
.SH AUTHORS
.\" --------------------------------------------------------------------
.
-Copyright \(co 1989, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+Copyright \(co 2011
Free Software Foundation, Inc.
.
.P
diff --git a/src/roff/groff/pipeline.h b/src/roff/groff/pipeline.h
index 20e775ac..2795b53d 100644
--- a/src/roff/groff/pipeline.h
+++ b/src/roff/groff/pipeline.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2002, 2005, 2009
+/* Copyright (C) 1989-1992, 2000, 2002, 2005, 2009, 2011
Free Software Foundation, Inc.
Written by James Clark (jjc@jclark.com)
@@ -24,7 +24,7 @@ extern "C" {
#endif
/* run_pipeline can handle at most this many commands */
-#define MAX_COMMANDS 13
+#define MAX_COMMANDS 14
/* Children exit with this status if execvp fails. */
#define EXEC_FAILED_EXIT_STATUS 0xff