Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.postscript > #1078 > unrolled thread

Ghostscript == line limit?

Started byDon Lancaster <don@tinaja.com>
First post2012-11-25 12:21 -0700
Last post2012-11-26 18:48 +0000
Articles 20 on this page of 24 — 7 participants

Back to article view | Back to comp.lang.postscript


Contents

  Ghostscript == line limit? Don Lancaster <don@tinaja.com> - 2012-11-25 12:21 -0700
    Re: Ghostscript == line limit? Chris <cjl@spamcop.net> - 2012-11-25 19:50 +0000
    Re: Ghostscript == line limit? Cecil Westerhof <Cecil@decebal.nl> - 2012-11-25 22:12 +0100
    Re: Ghostscript == line limit? "luser.droog" <luser.droog@gmail.com> - 2012-11-26 08:46 -0600
      Re: Ghostscript == line limit? Don Lancaster <don@tinaja.com> - 2012-11-26 08:25 -0700
        Re: Ghostscript == line limit? Chris <cjl@spamcop.net> - 2012-11-26 15:31 +0000
          Re: Ghostscript == line limit? Don Lancaster <don@tinaja.com> - 2012-11-26 09:32 -0700
    Re: Ghostscript == line limit? Helge Blischke <h.blischke@acm.org> - 2012-11-26 16:24 +0100
      Re: Ghostscript == line limit? Don Lancaster <don@tinaja.com> - 2012-11-26 08:28 -0700
      Re: Ghostscript == line limit? Don Lancaster <don@tinaja.com> - 2012-11-26 09:53 -0700
        Re: Ghostscript == line limit? Chris <cjl@spamcop.net> - 2012-11-26 18:21 +0000
          Re: Ghostscript == line limit? Don Lancaster <don@tinaja.com> - 2012-11-26 11:26 -0700
            Re: Ghostscript == line limit? Chris <cjl@spamcop.net> - 2012-11-26 18:34 +0000
              Re: Ghostscript == line limit? Don Lancaster <don@tinaja.com> - 2012-11-26 13:56 -0700
                Re: Ghostscript == line limit? Chris <cjl@spamcop.net> - 2012-11-26 21:10 +0000
                  Re: Ghostscript == line limit? Don Lancaster <don@tinaja.com> - 2012-11-26 17:23 -0700
                    Re: Ghostscript == line limit? bonomi@host122.r-bonomi.com (Robert Bonomi) - 2012-11-26 18:47 -0600
                      Re: Ghostscript == line limit? Don Lancaster <don@tinaja.com> - 2012-11-26 18:45 -0700
                        Re: Ghostscript == line limit? "luser.droog" <luser.droog@gmail.com> - 2012-11-27 23:54 -0600
                          Re: Ghostscript == line limit? luser- -droog <mijoryx@yahoo.com> - 2012-12-18 23:16 -0800
                    Re: Ghostscript == line limit? Chris <cjl@spamcop.net> - 2012-11-27 08:01 +0000
                      Re: Ghostscript == line limit? Chris <cjl@spamcop.net> - 2012-11-27 08:04 +0000
            Re: Ghostscript == line limit? Don Lancaster <don@tinaja.com> - 2012-11-26 11:38 -0700
              Re: Ghostscript == line limit? Chris <cjl@spamcop.net> - 2012-11-26 18:48 +0000

Page 1 of 2  [1] 2  Next page →


#1078 — Ghostscript == line limit?

FromDon Lancaster <don@tinaja.com>
Date2012-11-25 12:21 -0700
SubjectGhostscript == line limit?
Message-ID<ahf9duFdo7jU1@mid.individual.net>
If I run this program in GhostScript...


%!PS
0 1 1000 {==} for
% EOF

  ... only the last 83 lines or so get printed out  922 through 1000.

Why?



-- 
Many thanks,

Don Lancaster                          voice phone: (928)428-4073
Synergetics   3860 West First Street   Box 809 Thatcher, AZ 85552
rss: http://www.tinaja.com/whtnu.xml   email: don@tinaja.com

Please visit my GURU's LAIR web site at http://www.tinaja.com

[toc] | [next] | [standalone]


#1080

FromChris <cjl@spamcop.net>
Date2012-11-25 19:50 +0000
Message-ID<_Duss.984336$it2.343335@fx22.am4>
In reply to#1078
On Sun, 25 Nov 2012 12:21:30 -0700, Don Lancaster wrote:

> If I run this program in GhostScript...
> 
> 
> %!PS 0 1 1000 {==} for % EOF
> 
>   ... only the last 83 lines or so get printed out  922 through 1000.
> 
> Why?

Both the Ubuntu installed Ghostscript 9.06 and my built from git source 
version print lines 0->1000 as it should.

Chris

[toc] | [prev] | [next] | [standalone]


#1082

FromCecil Westerhof <Cecil@decebal.nl>
Date2012-11-25 22:12 +0100
Message-ID<87zk25l74d.fsf@Compaq.site.inet>
In reply to#1078
Op zondag 25 nov 2012 20:21 CET schreef Don Lancaster:

>
> If I run this program in GhostScript...
>
>
> %!PS
> 0 1 1000 {==} for
> % EOF
>
> ... only the last 83 lines or so get printed out  922 through 1000.
>
> Why?

On openSUSE 12.1 it works as expected.

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof

[toc] | [prev] | [next] | [standalone]


#1089

From"luser.droog" <luser.droog@gmail.com>
Date2012-11-26 08:46 -0600
Message-ID<k8vvcg$8dr$1@dont-email.me>
In reply to#1078
Don Lancaster wrote:

> 
> If I run this program in GhostScript...
> 
> 
> %!PS
> 0 1 1000 {==} for
> % EOF
> 
>   ... only the last 83 lines or so get printed out  922 through 1000.
> 
> Why?
> 
> 
> 

As others have suggested, it looks like a bug in the version of ghostscript
you have installed. '==' is not technically an operator, but a massively
complicated procedure. Braswell's Inside Postscript devotes two whole
chapters to the workings of == and =. But since it all boils down to calls
to 'print', my guess would be that the %stdout buffer is somehow getting
purged when it should be flushed. 

[toc] | [prev] | [next] | [standalone]


#1091

FromDon Lancaster <don@tinaja.com>
Date2012-11-26 08:25 -0700
Message-ID<ahhfvjFsrqpU1@mid.individual.net>
In reply to#1089
On 11/26/2012 7:46 AM, luser.droog wrote:
> Don Lancaster wrote:
>
>>
>> If I run this program in GhostScript...
>>
>>
>> %!PS
>> 0 1 1000 {==} for
>> % EOF
>>
>>    ... only the last 83 lines or so get printed out  922 through 1000.
>>
>> Why?
>>
>>
>>
>
> As others have suggested, it looks like a bug in the version of ghostscript
> you have installed. '==' is not technically an operator, but a massively
> complicated procedure. Braswell's Inside Postscript devotes two whole
> chapters to the workings of == and =. But since it all boils down to calls
> to 'print', my guess would be that the %stdout buffer is somehow getting
> purged when it should be flushed.
>


Thank you for your response.
But using {20 string cvs print} does the same thing.

I suspect this is a bizarre interaction with windows 8.

A possible but complex workaround might be to write needed into to a 
disk file.

-- 
Many thanks,

Don Lancaster                          voice phone: (928)428-4073
Synergetics   3860 West First Street   Box 809 Thatcher, AZ 85552
rss: http://www.tinaja.com/whtnu.xml   email: don@tinaja.com

Please visit my GURU's LAIR web site at http://www.tinaja.com

[toc] | [prev] | [next] | [standalone]


#1093

FromChris <cjl@spamcop.net>
Date2012-11-26 15:31 +0000
Message-ID<oXLss.633425$A%.497836@fx26.am4>
In reply to#1091
On Mon, 26 Nov 2012 08:25:34 -0700, Don Lancaster wrote:

> On 11/26/2012 7:46 AM, luser.droog wrote:
>> Don Lancaster wrote:
>>
>>
> 
> Thank you for your response.
> But using {20 string cvs print} does the same thing.
> 
> I suspect this is a bizarre interaction with windows 8.
> 
> A possible but complex workaround might be to write needed into to a
> disk file.

Actually, one thing that does occur to me is that Ghostscript (wrongly, 
IMHO) doesn't flush the i/o buffer as part of the "==" operation.

So, you could try doing:

%!PS
0 1 1000 {== flush} for
% EOF

And see if that helps.

Windows 8 is rather an unknown quantity at this stage, though
:-(

Chris

[toc] | [prev] | [next] | [standalone]


#1094

FromDon Lancaster <don@tinaja.com>
Date2012-11-26 09:32 -0700
Message-ID<ahhjtsFtp89U1@mid.individual.net>
In reply to#1093
On 11/26/2012 8:31 AM, Chris wrote:
> On Mon, 26 Nov 2012 08:25:34 -0700, Don Lancaster wrote:
>
>> On 11/26/2012 7:46 AM, luser.droog wrote:
>>> Don Lancaster wrote:
>>>
>>>
>>
>> Thank you for your response.
>> But using {20 string cvs print} does the same thing.
>>
>> I suspect this is a bizarre interaction with windows 8.
>>
>> A possible but complex workaround might be to write needed into to a
>> disk file.
>
> Actually, one thing that does occur to me is that Ghostscript (wrongly,
> IMHO) doesn't flush the i/o buffer as part of the "==" operation.
>
> So, you could try doing:
>
> %!PS
> 0 1 1000 {== flush} for
> % EOF
>
> And see if that helps.
>
> Windows 8 is rather an unknown quantity at this stage, though
> :-(
>
> Chris
>


Flush does not seem to help.

Again, problem seems independent of == as 20 string cvs print does the 
same.

Long time delays do not seem to make any difference. Execution time 
seems pretty much the same between Acrobat 9 and GhostScript.

-- 
Many thanks,

Don Lancaster                          voice phone: (928)428-4073
Synergetics   3860 West First Street   Box 809 Thatcher, AZ 85552
rss: http://www.tinaja.com/whtnu.xml   email: don@tinaja.com

Please visit my GURU's LAIR web site at http://www.tinaja.com

[toc] | [prev] | [next] | [standalone]


#1090

FromHelge Blischke <h.blischke@acm.org>
Date2012-11-26 16:24 +0100
Message-ID<ahhfsgFsqg3U1@mid.individual.net>
In reply to#1078
Don Lancaster wrote:

> 
> If I run this program in GhostScript...
> 
> 
> %!PS
> 0 1 1000 {==} for
> % EOF
> 
>   ... only the last 83 lines or so get printed out  922 through 1000.
> 
> Why?
> 
> 
> 

May it be that gs is simply too fast executing this loop so that you only 
see the last contents of your terminal window?

Helge

[toc] | [prev] | [next] | [standalone]


#1092

FromDon Lancaster <don@tinaja.com>
Date2012-11-26 08:28 -0700
Message-ID<ahhg54FsrqpU2@mid.individual.net>
In reply to#1090
On 11/26/2012 8:24 AM, Helge Blischke wrote:
> Don Lancaster wrote:
>
>>
>> If I run this program in GhostScript...
>>
>>
>> %!PS
>> 0 1 1000 {==} for
>> % EOF
>>
>>    ... only the last 83 lines or so get printed out  922 through 1000.
>>
>> Why?
>>
>>
>>
>
> May it be that gs is simply too fast executing this loop so that you only
> see the last contents of your terminal window?
>
> Helge
>


Other totally different code loop constructs seem to generate the same 
number of viewable lines.

-- 
Many thanks,

Don Lancaster                          voice phone: (928)428-4073
Synergetics   3860 West First Street   Box 809 Thatcher, AZ 85552
rss: http://www.tinaja.com/whtnu.xml   email: don@tinaja.com

Please visit my GURU's LAIR web site at http://www.tinaja.com

[toc] | [prev] | [next] | [standalone]


#1095

FromDon Lancaster <don@tinaja.com>
Date2012-11-26 09:53 -0700
Message-ID<ahhl4uFu2brU1@mid.individual.net>
In reply to#1090
On 11/26/2012 8:24 AM, Helge Blischke wrote:
> Don Lancaster wrote:
>
>>
>> If I run this program in GhostScript...
>>
>>
>> %!PS
>> 0 1 1000 {==} for
>> % EOF
>>
>>    ... only the last 83 lines or so get printed out  922 through 1000.
>>
>> Why?
>>
>>
>>
>
> May it be that gs is simply too fast executing this loop so that you only
> see the last contents of your terminal window?
>
> Helge
>


If I put a very long time delay in the loop, the program faithfully 
reports one line at a time, but the final display only shows the last 82 
results. The others scroll gone.

The key question is whether anyone else can duplicate this with 
GhostScript and Windows 8.

-- 
Many thanks,

Don Lancaster                          voice phone: (928)428-4073
Synergetics   3860 West First Street   Box 809 Thatcher, AZ 85552
rss: http://www.tinaja.com/whtnu.xml   email: don@tinaja.com

Please visit my GURU's LAIR web site at http://www.tinaja.com

[toc] | [prev] | [next] | [standalone]


#1096

FromChris <cjl@spamcop.net>
Date2012-11-26 18:21 +0000
Message-ID<SqOss.648501$A%.321761@fx26.am4>
In reply to#1095
On Mon, 26 Nov 2012 09:53:45 -0700, Don Lancaster wrote:

> On 11/26/2012 8:24 AM, Helge Blischke wrote:
> 
> If I put a very long time delay in the loop, the program faithfully
> reports one line at a time, but the final display only shows the last 82
> results. The others scroll gone.
> 
> The key question is whether anyone else can duplicate this with
> GhostScript and Windows 8.

I don't think there is any problem here, and certainly nothing specific 
to Windows 8.

It's simply that the size of the scroll buffer for the gswin32.exe/
gswin64.exe window is ~80 lines.

If backchannel data like this is important to you, you might consider 
running gswin32c.exe/gswin64c.exe in a command prompt window instead. 
Then you can set the scroll buffer to the size you want.

Chris

[toc] | [prev] | [next] | [standalone]


#1097

FromDon Lancaster <don@tinaja.com>
Date2012-11-26 11:26 -0700
Message-ID<ahhqidFrarU1@mid.individual.net>
In reply to#1096
On 11/26/2012 11:21 AM, Chris wrote:
> On Mon, 26 Nov 2012 09:53:45 -0700, Don Lancaster wrote:
>
>> On 11/26/2012 8:24 AM, Helge Blischke wrote:
>>
>> If I put a very long time delay in the loop, the program faithfully
>> reports one line at a time, but the final display only shows the last 82
>> results. The others scroll gone.
>>
>> The key question is whether anyone else can duplicate this with
>> GhostScript and Windows 8.
>
> I don't think there is any problem here, and certainly nothing specific
> to Windows 8.
>
> It's simply that the size of the scroll buffer for the gswin32.exe/
> gswin64.exe window is ~80 lines.
>
> If backchannel data like this is important to you, you might consider
> running gswin32c.exe/gswin64c.exe in a command prompt window instead.
> Then you can set the scroll buffer to the size you want.
>
> Chris
>

This sounds like the problem.

Is there a way to put a PostScript command INSIDE a program that alters 
the scroll buffer size on the fly?



-- 
Many thanks,

Don Lancaster                          voice phone: (928)428-4073
Synergetics   3860 West First Street   Box 809 Thatcher, AZ 85552
rss: http://www.tinaja.com/whtnu.xml   email: don@tinaja.com

Please visit my GURU's LAIR web site at http://www.tinaja.com

[toc] | [prev] | [next] | [standalone]


#1098

FromChris <cjl@spamcop.net>
Date2012-11-26 18:34 +0000
Message-ID<UCOss.381280$nB6.373709@fx21.am4>
In reply to#1097
On Mon, 26 Nov 2012 11:26:17 -0700, Don Lancaster wrote:
> This sounds like the problem.
> 
> Is there a way to put a PostScript command INSIDE a program that alters
> the scroll buffer size on the fly?

No, there is no such Postscript operator. We could add a custom operator, 
but it seems like a totally pointless complication: you are the first 
person I've ever heard of that wants to *read* loads of lines of 
backchannel output (as opposed to piping it to a file/filter etc, or 
ignoring it altogether!).

A more suitable approach, to my way of thinking, would be to add an 
environment variable which configures the size of the buffer.

But even that seems excessive when you have a solution: use the command 
line application.

Chris

[toc] | [prev] | [next] | [standalone]


#1102

FromDon Lancaster <don@tinaja.com>
Date2012-11-26 13:56 -0700
Message-ID<ahi3b4F2tvfU1@mid.individual.net>
In reply to#1098
On 11/26/2012 11:34 AM, Chris wrote:
> you are the first person I've ever heard of that wants to *read* loads of lines of
> backchannel output (as opposed to piping it to a file/filter etc, or
> ignoring it altogether!).
> Chris
>

Many hundreds of program examples and tutorials that use log files as 
their primary output can be found at http://www.tinaja.com/pssamp1.shtml

Because of adobe's apparent flushing of Acrodist-F, I was hoping these 
would all be moveable to GhostScript without hassles.

-- 
Many thanks,

Don Lancaster                          voice phone: (928)428-4073
Synergetics   3860 West First Street   Box 809 Thatcher, AZ 85552
rss: http://www.tinaja.com/whtnu.xml   email: don@tinaja.com

Please visit my GURU's LAIR web site at http://www.tinaja.com

[toc] | [prev] | [next] | [standalone]


#1104

FromChris <cjl@spamcop.net>
Date2012-11-26 21:10 +0000
Message-ID<jVQss.277224$g62.241064@fx06.am4>
In reply to#1102
On Mon, 26 Nov 2012 13:56:00 -0700, Don Lancaster wrote:

> On 11/26/2012 11:34 AM, Chris wrote:
> Many hundreds of program examples and tutorials that use log files as
> their primary output can be found at http://www.tinaja.com/pssamp1.shtml

Yes, and a "log file" is a file. Using a file I can understand, but 
neither the Distiller window, nor the Ghostscript one are really meant 
for much more than error/warning reporting.
 
> Because of adobe's apparent flushing of Acrodist-F, I was hoping these
> would all be moveable to GhostScript without hassles.

Is there a reason you cannot use the command line executable? As I said, 
using that, you can configure the command prompt window to have as many 
lines buffer as you need.

If you feel strongly about it, feel free to open an enhancement request 
at http://bugs.ghostscript.com/ and we'll look at it. The stronger a use 
case you can give, the more likely we'll take on the suggestion.

Chris

[toc] | [prev] | [next] | [standalone]


#1109

FromDon Lancaster <don@tinaja.com>
Date2012-11-26 17:23 -0700
Message-ID<ahifgpF5jvmU1@mid.individual.net>
In reply to#1104
On 11/26/2012 2:10 PM, Chris wrote:
> On Mon, 26 Nov 2012 13:56:00 -0700, Don Lancaster wrote:
>
>> On 11/26/2012 11:34 AM, Chris wrote:
>> Many hundreds of program examples and tutorials that use log files as
>> their primary output can be found at http://www.tinaja.com/pssamp1.shtml
>
> Yes, and a "log file" is a file. Using a file I can understand, but
> neither the Distiller window, nor the Ghostscript one are really meant
> for much more than error/warning reporting.
>
>> Because of adobe's apparent flushing of Acrodist-F, I was hoping these
>> would all be moveable to GhostScript without hassles.
>
> Is there a reason you cannot use the command line executable? As I said,
> using that, you can configure the command prompt window to have as many
> lines buffer as you need.
>
> If you feel strongly about it, feel free to open an enhancement request
> at http://bugs.ghostscript.com/ and we'll look at it. The stronger a use
> case you can give, the more likely we'll take on the suggestion.
>
> Chris
>


What is the format for extending the command prompt scrolling window?

-- 
Many thanks,

Don Lancaster                          voice phone: (928)428-4073
Synergetics   3860 West First Street   Box 809 Thatcher, AZ 85552
rss: http://www.tinaja.com/whtnu.xml   email: don@tinaja.com

Please visit my GURU's LAIR web site at http://www.tinaja.com

[toc] | [prev] | [next] | [standalone]


#1110

Frombonomi@host122.r-bonomi.com (Robert Bonomi)
Date2012-11-26 18:47 -0600
Message-ID<GImdnbdVVJggkCnNnZ2dnUVZ_vGdnZ2d@posted.nuvoxcommunications>
In reply to#1109
In article <ahifgpF5jvmU1@mid.individual.net>,
Don Lancaster  <don@tinaja.com> wrote:
>On 11/26/2012 2:10 PM, Chris wrote:
>> On Mon, 26 Nov 2012 13:56:00 -0700, Don Lancaster wrote:
>>
>>> On 11/26/2012 11:34 AM, Chris wrote:
>>> Many hundreds of program examples and tutorials that use log files as
>>> their primary output can be found at http://www.tinaja.com/pssamp1.shtml
>>
>> Yes, and a "log file" is a file. Using a file I can understand, but
>> neither the Distiller window, nor the Ghostscript one are really meant
>> for much more than error/warning reporting.
>>
>>> Because of adobe's apparent flushing of Acrodist-F, I was hoping these
>>> would all be moveable to GhostScript without hassles.
>>
>> Is there a reason you cannot use the command line executable? As I said,
>> using that, you can configure the command prompt window to have as many
>> lines buffer as you need.
>>
>> If you feel strongly about it, feel free to open an enhancement request
>> at http://bugs.ghostscript.com/ and we'll look at it. The stronger a use
>> case you can give, the more likely we'll take on the suggestion.
>>
>> Chris
>>
>
>
>What is the format for extending the command prompt scrolling window?

Point the mouse at the title bar for the window and right click.
Choose 'properties' from the pop-up menu.
Click on the layout tab.
Set 'Height' under "Screen Buffer Size" to whatever you want.
Click OK.
Choose where to apply the change.
Click OK.

You can change the visible 'Window Size' similarly.

[toc] | [prev] | [next] | [standalone]


#1111

FromDon Lancaster <don@tinaja.com>
Date2012-11-26 18:45 -0700
Message-ID<ahikajF6ib7U1@mid.individual.net>
In reply to#1110
On 11/26/2012 5:47 PM, Robert Bonomi wrote:
>
>>> Is there a reason you cannot use the command line executable?

Just that there are many PostScript routines in a long history freely 
available to everybody and that they would all have to be modified to 
advise to use command line executable.

Hundreds to thousands of files might be infolved.


-- 
Many thanks,

Don Lancaster                          voice phone: (928)428-4073
Synergetics   3860 West First Street   Box 809 Thatcher, AZ 85552
rss: http://www.tinaja.com/whtnu.xml   email: don@tinaja.com

Please visit my GURU's LAIR web site at http://www.tinaja.com

[toc] | [prev] | [next] | [standalone]


#1115

From"luser.droog" <luser.droog@gmail.com>
Date2012-11-27 23:54 -0600
Message-ID<k948u2$k2i$1@dont-email.me>
In reply to#1111
Don Lancaster wrote:

> On 11/26/2012 5:47 PM, Robert Bonomi wrote:
>>
>>>> Is there a reason you cannot use the command line executable?
> 
> Just that there are many PostScript routines in a long history freely
> available to everybody and that they would all have to be modified to
> advise to use command line executable.
> 
> Hundreds to thousands of files might be infolved.
> 
> 

What about using the cygwin version with xterm?

[toc] | [prev] | [next] | [standalone]


#1179

Fromluser- -droog <mijoryx@yahoo.com>
Date2012-12-18 23:16 -0800
Message-ID<c8d3ae5e-970a-47c8-b51c-f208aada4115@googlegroups.com>
In reply to#1115
Nevermind. I can't find where to set the scroll buffer in xterm. I suppose the console version is the best bet.

[toc] | [prev] | [next] | [standalone]


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | comp.lang.postscript


csiph-web