From 27d342516bfee3b7332bab887a8cbc91d031cce7 Mon Sep 17 00:00:00 2001 From: wl Date: Sat, 22 Jan 2005 06:13:07 +0000 Subject: * 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 . * src/devices/grops/grops.man: Add more info on DSC. --- ChangeLog | 9 +++++++++ src/devices/grops/grops.man | 16 +++++++++++++++- src/libs/libdriver/input.cpp | 10 ++++++---- 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 + + * 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 . + + * src/devices/grops/grops.man: Add more info on DSC. + 2005-01-17 Ruslan Ermilov * 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 @@ // /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) -- cgit v1.2.1