Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem with Ditroff and TranScript?

0 views
Skip to first unread message

laser-lovers@uw-beaver

unread,
Oct 29, 1985, 4:41:37 PM10/29/85
to
From: Richard Furuta <Fur...@WASHINGTON.arpa>

Editor's note:

A few days back a message was posted about a buffer flushing problem in
TranScript. Below are three messages proposing fixes to that problem. I
have not been able to determine if any of these are "blessed" by
Adobe.

--Rick
---------------

1) 18-Oct "Francie J Newbery" Re: Problem with Ditroff and TranScript?
2) 18-Oct Terry West Fix to Problem with Ditroff and TranScript?
3) 29-Oct jjh...@ngp.UTEXAS.ED Re: Problem with Ditroff and TranScript?

Message 1 -- ************************
Return-Path: <f...@Purdue.EDU>
Received: from mordred.Purdue.EDU by WASHINGTON.ARPA with TCP; Fri 18 Oct 85 12:07:19-PDT
Message-Id: <851018190...@mordred.Purdue.EDU>
Received: by mordred.Purdue.EDU; Fri, 18 Oct 85 14:03:45 EST
To: ned%UPenn-Grasp%upenn...@csnet-relay.arpa
Cc: laser-...@washington.arpa
Subject: Re: Problem with Ditroff and TranScript?
In-Reply-To: Your message of Thu, 17 Oct 85 13:23:13 edt.
<851018175...@arthur.Purdue.EDU>
Date: 18 Oct 85 14:03:39 EST (Fri)
From: "Francie J Newbery" <f...@Purdue.EDU>

Your analysis of the problem is exactly right and the fix is very simple.

In the function called devcntrl you need to alter the case for 't'
by adding a call to FlushShow(). Like this:

case 't': /* trailer */
FlushShow(); <-- add this line
t_trailer ();
break;

Francie Newbery (f...@Purdue.EDU)

Message 2 -- ************************
Return-Path: <@rand-unix.ARPA:terry%o...@rand-unix.ARPA>
Received: from rand-unix.ARPA by WASHINGTON.ARPA with TCP; Fri 18 Oct 85 12:44:17-PDT
Return-Path: <terry@owl>
Received: from owl.arpa (owl) by rand-unix.ARPA; Fri, 18 Oct 85 12:18:44 pdt
Received: by owl.arpa; Fri, 18 Oct 85 12:16:26 pdt
From: Terry West <terry%o...@rand-unix.ARPA>
Message-Id: <851018191...@owl.arpa>
To: ned%UPenn-Grasp%upenn...@csnet-relay.arpa
Cc: laser-...@washington.arpa
Subject: Fix to Problem with Ditroff and TranScript?
Date: 18 Oct 85 12:16:22 PDT (Fri)

We've just started using TranScript here, and we seem to have found an
annoying bug in psdit. The last word in the file isn't output! Has anyone
else seen this problem, or know of a fix? We can repeat it with the input
(to ditroff):

In the function t_trailer(), add the FlushShow() call:

private t_trailer()
{
FlushShow();
printf("\n%%%%Trailer\n");
printf("xt\n");
}

Terry West
<terry@rand-unix>

Message 3 -- ************************
Return-Path: <jjh...@ngp.UTEXAS.EDU>
Received: from ngp.UTEXAS.EDU by WASHINGTON.ARPA with TCP; Tue 29 Oct 85 09:20:10-PST
Date: Mon, 28 Oct 85 16:00:34 cst
From: jjh...@ngp.UTEXAS.EDU (J. Lee Johnson)
Posted-Date: Mon, 28 Oct 85 16:00:34 cst
Message-Id: <851028220...@ngp.UTEXAS.EDU>
Received: by ngp.UTEXAS.EDU (4.22/4.22)
id AA15526; Mon, 28 Oct 85 16:00:34 cst
Subject: Re: Problem with Ditroff and TranScript?
Newsgroups: fa.laser-lovers
To: LASER-...@WASHINGTON.ARPA
References: <45...@cca.UUCP>


In laser-lovers, ned%UPenn-Grasp%upenn...@CSNET-RELAY.arpa says:
>
> We've just started using TranScript here, and we seem to have found an
> annoying bug in psdit. The last word in the file isn't output! ...
> It seems like a buffer flushing problem, and we could probably fix it, but
> we're pretty surprised to have found it.

He's correct, there is a buffer flushing problem in psdit. There are also
some integer divisions where psdit truncates rather than rounds. The
following is a diff file to correct these problems. Use "patch" to
apply it to psdit.c.
--
James Lee Johnson, U.T. Computation Center, Austin, Texas 78712
ARPA: jjh...@ut-ngp.UTEXAS.EDU
UUCP: ihnp4!ut-ngp!jjhnsn allegra!ut-ngp!jjhnsn gatech!ut-ngp!jjhnsn
seismo!ut-sally!jjhnsn harvard!ut-sally!jjhnsn
#
# This is a shell archive.
# Remove everything above and including the cut line.
# Then run the rest of the file through sh.
-----cut here-----cut here-----cut here-----cut here-----
#!/bin/sh
# shar: Shell Archiver
# Run the following text with /bin/sh to create:
# psdit.patch
# This archive created: Mon Oct 28 13:33:19 1985
echo shar: extracting psdit.patch '(2393 characters)'
sed 's/^XX//' << \SHAR_EOF > psdit.patch
XX*** psdit.c.dist Fri Jul 5 11:28:57 1985
XX--- psdit.c Mon Oct 28 12:35:24 1985
XX***************
XX*** 85,90
XX #define ErrorTolerance 100
XX #define PSWID 0x00000FFF
XX #define ISPSPROC 0x000FF000
XX
XX /* we maintain PS coords with 16 times the precision */
XX /* current PS state is: */
XX
XX--- 85,91 -----
XX #define ErrorTolerance 100
XX #define PSWID 0x00000FFF
XX #define ISPSPROC 0x000FF000
XX+ #define PSscale(x) ((x)+2250)/4500 /* equiv. to ( x*16 / 72000 ) +0.5 */
XX
XX /* we maintain PS coords with 16 times the precision */
XX /* current PS state is: */
XX***************
XX*** 816,821
XX
XX private t_trailer()
XX {
XX printf("\n%%%%Trailer\n");
XX printf("xt\n");
XX }
XX
XX--- 817,823 -----
XX
XX private t_trailer()
XX {
XX+ FlushShow();FlushFont();MoveTo();DoMove();
XX printf("\n%%%%Trailer\n");
XX printf("xt\n");
XX }
XX***************
XX*** 905,911
XX pswid = psinfo & PSWID;
XX if ((psinfo & ISPSPROC) && (psinfo != -1)) {
XX showspecial (s, code, pswid);
XX! PSx += (pswid * fontsize * 16 * dres) / (72 * 1000);
XX }
XX else {
XX showchar (code);
XX
XX--- 907,913 -----
XX pswid = psinfo & PSWID;
XX if ((psinfo & ISPSPROC) && (psinfo != -1)) {
XX showspecial (s, code, pswid);
XX! PSx += PSscale(pswid * fontsize * dres);
XX }
XX else {
XX showchar (code);
XX***************
XX*** 910,916
XX else {
XX showchar (code);
XX if (pswid > 0) {
XX! PSshowlen += (pswid * fontsize * 16 * dres) / (72 * 1000);
XX }
XX }
XX }
XX
XX--- 912,918 -----
XX else {
XX showchar (code);
XX if (pswid > 0) {
XX! PSshowlen += PSscale(pswid * fontsize * dres);
XX }
XX }
XX }
XX***************
XX*** 919,925
XX pswid = psinfo & PSWID;
XX if ((psinfo & ISPSPROC) && (psinfo != -1)) {
XX showspecial (s, code, pswid);
XX! PSx += (pswid * fontsize * 16 * dres) / (72 * 1000);
XX }
XX else {
XX showchar (code);
XX
XX--- 921,927 -----
XX pswid = psinfo & PSWID;
XX if ((psinfo & ISPSPROC) && (psinfo != -1)) {
XX showspecial (s, code, pswid);
XX! PSx += PSscale(pswid * fontsize * dres);
XX }
XX else {
XX showchar (code);
XX***************
XX*** 924,930
XX else {
XX showchar (code);
XX if (pswid > 0) {
XX! PSshowlen += (pswid * fontsize * 16 * dres) / (72 * 1000);
XX }
XX }
XX }
XX
XX--- 926,932 -----
XX else {
XX showchar (code);
XX if (pswid > 0) {
XX! PSshowlen += PSscale(pswid * fontsize * dres);
XX }
XX }
XX }
SHAR_EOF
if test 2393 -ne "`wc -c psdit.patch`"
then
echo shar: error transmitting psdit.patch '(should have been 2393 characters)'
fi
# End of shell archive
exit 0
-------

FUR...@washington.arpa

unread,
Oct 29, 1985, 5:09:36 PM10/29/85
to
From: Richard Furuta <Fur...@WASHINGTON.ARPA>
0 new messages