On Tue, Jan 06, 2009 at 09:38:22AM -0800, Alan Irwin wrote:
> On 2009-01-06 15:42-0000 Andrew Ross wrote:
> 
> >
> > Example 14 has traditional been excluded from the non-interactive tests
> > since it outputs 2 files, and you can only specify one file on the
> > command line using the -o option. With a judicious redirection of stdin
> > it is possible to work round this. I've implemented this for all
> > languages so example 14 is now part of the standard ctest suite. As a
> > consequence I've found and corrected several differences between
> > implementations. This has brought 2 issues to light
> >
> > 1) In order to get this to work for devices which produce single pages
> > (e.g. png) I've had to modify the C version to call plgfam on stream 1
> > and then plsfam on stream 2 with the read parameters. This works fine,
> > except that the command line option -fflen which sets the number of
> > digits to use for the family page number has no API equivalent that I
> > can find. It is not part of plgfam / plsfam which it probably should be.
> > This means that the file names for the second stream are things like
> > x14ac1.ps rather than x14c01.ps. As a result of this I've not yet
> > propagated the plgfam / plsfam changes to other languages.
> 
> I agree the fflen information should be part of plgfam / plsfam.  But for
> now, couldn't you use plsetopt?

Good idea. I will add that. I don't really want to change the API so I
may have to add an extended version of the plsfam function, but that is
probably a post-release addition now.

> > 2) A wider question is if and how command line options should be passed
> > on to subsequent streams. It might be possible to call plparseopts with
> > the second stream to re-parse the command options, but this would
> > results in both streams having the same output name. This is going to
> > depend on the application on a case-by-case basis I suspect, but we
> > should at least supply the user with the relevant plgxxx / plsxxx
> > functions to check and set anything set on the command line.
> 
> Would it be straightforward to implement a -stream command-line option that
> means all subsequent options refer to the specified stream number? That
> would provide an elegant solution to the example 14 issue with, e.g.,
> 
> c/x14c -dev psc -o x14ac.psc -stream 1 -dev psc -o x14bc.psc

Or how about anything before the option could be applied to all streams,
options after a -stream command only apply to that stream, unless
another -stream option is encountered. Each stream can then call
plparseopts and only extract the commands meant for it. Default would be
the current behaviour. A stream can then decide whether or not it wants
to use command line options. The only down side of this is that the
(currently internal) stream numbers are exposed to the user.

Andrew

------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to