summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwl <wl>2005-01-22 06:13:07 +0000
committerwl <wl>2005-01-22 06:13:07 +0000
commit27d342516bfee3b7332bab887a8cbc91d031cce7 (patch)
tree168c70264ce41caa63d3e1d9f8117252687e630b
parent9ee338637e5940c1e3db0462137b6d7f0dedcadb (diff)
downloadgroff-27d342516bfee3b7332bab887a8cbc91d031cce7.tar.gz
* src/libs/libdriver/input.cpp (delete_current_env, do_file):
Reset pointers to zero after deallocation. This fixes a crash if a driver is called with multiple output files. Reported by Ken Chilton <ken@chiltonfamily.org>. * src/devices/grops/grops.man: Add more info on DSC.
-rw-r--r--ChangeLog9
-rw-r--r--src/devices/grops/grops.man16
-rw-r--r--src/libs/libdriver/input.cpp10
3 files changed, 30 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index d824c606..2bf0b450 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2005-01-21 Werner LEMBERG <wl@gnu.org>
+
+ * src/libs/libdriver/input.cpp (delete_current_env, do_file):
+ Reset pointers to zero after deallocation. This fixes a crash
+ if a driver is called with multiple output files. Reported by
+ Ken Chilton <ken@chiltonfamily.org>.
+
+ * src/devices/grops/grops.man: Add more info on DSC.
+
2005-01-17 Ruslan Ermilov <ru@FreeBSD.org>
* tmac/doc-common (Dd), tmac/doc-ditroff (gX, doc-setup-header):
diff --git a/src/devices/grops/grops.man b/src/devices/grops/grops.man
index 2d73487e..0ff2579d 100644
--- a/src/devices/grops/grops.man
+++ b/src/devices/grops/grops.man
@@ -1,5 +1,6 @@
.ig
-Copyright (C) 1989-2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+Copyright (C) 1989-2000, 2001, 2002, 2003, 2004, 2005
+ Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
@@ -116,6 +117,15 @@ using the
.B \-P
option.
.
+.PP
+Note that
+.B grops
+doesn't produce a valid document structure (conforming to the Document
+Structuring Convention) if called with multiple file arguments.
+.
+To print such concatenated output it is necessary to deactivate DSC
+handling in the printing program or previewer.
+.
.
.SH OPTIONS
.TP
@@ -1149,6 +1159,10 @@ Temporary file.
.BR groff_char (@MAN7EXT@),
.BR groff_tmac (@MAN5EXT@)
.
+.PP
+.URL "http://\:partners.adobe.com/\:public/\:developer/\:en/\:ps/\:5001.DSC_Spec.pdf" \
+ "PostScript Language Document Structuring Conventions Specification"
+.
.cp \n[grops_C]
.
.\" Local Variables:
diff --git a/src/libs/libdriver/input.cpp b/src/libs/libdriver/input.cpp
index 97f8ac62..206aab18 100644
--- a/src/libs/libdriver/input.cpp
+++ b/src/libs/libdriver/input.cpp
@@ -2,13 +2,13 @@
// <groff_src_dir>/src/libs/libdriver/input.cpp
-/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2003, 2004
+/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Written by James Clark (jjc@jclark.com)
Major rewrite 2001 by Bernd Warken (bwarken@mayn.de)
- Last update: 15 Dec 2004
+ Last update: 21 Jan 2005
This file is part of groff, the GNU roff text processing system.
@@ -608,6 +608,7 @@ void delete_current_env(void)
delete current_env->col;
delete current_env->fill;
delete current_env;
+ current_env = 0;
}
//////////////////////////////////////////////////////////////////////
@@ -1520,8 +1521,8 @@ parse_x_command(void)
char *str_arg = get_extended_arg(); // includes line skip
if (npages <= 0)
error("`x X' command invalid before first `p' command");
- else if (str_arg != NULL && (strncmp(str_arg, "devtag:",
- strlen("devtag:")) == 0))
+ else if (str_arg && (strncmp(str_arg, "devtag:",
+ strlen("devtag:")) == 0))
pr->devtag(str_arg, current_env);
else
pr->special(str_arg, current_env);
@@ -1826,6 +1827,7 @@ do_file(const char *filename)
if (npages > 0)
pr->end_page(current_env->vpos);
delete pr;
+ pr = 0;
fclose(current_file);
// If `stopped' is not `true' here then there wasn't any `x stop'.
if (!stopped)