|
From: Robbie M. <ro...@ac...> - 2011-07-01 10:18:14
|
Hello Thomas, hello all
I guess I was being a bit cryptic about my suggestion
regarding input that was either redirected from 'stdin'
or piped from another command. In this case,
GPVAL_LOAD_FILE should be assigned "-". Which suggests
that perhaps GPVAL_FILE would be a better name for this
variable, because 'stdin' is a type of file in the sense it
gets file descriptor 0.
Can I recommend this concept gets developed and added
to the mainline codebase. Hint!
thanks
Robbie
------------------------------------------------------------
To: gnu...@li...
Subject: Re: [Gnuplot-info] name of current script
Message-ID: <319...@ta...>
From: Thomas Sefzick <t.s...@fz...>
Date: Tue, 28 Jun 2011 01:42:11 -0700 (PDT)
------------------------------------------------------------
if there is no load file, then GPVAL_LOAD_FILE is
undefined, i.e. not existing, and this can be tested
using the 'exists()' function:
if (exists("GPVAL_LOAD_FILE")) print GPVAL_LOAD_FILE
Robbie Morrison wrote:
>
> Hello all, hi Thomas
>
> I can confirm the patch from Thomas Sefzick (see
> below) works for real files but not for 'stdin'. The
> patch allows the name of the current script to be
> recovered from within that script. I suggest the
> patch gets developed a little and transferred to the
> gnuplot mainline. Can someone therefore cross-post
> this message to the dev list please? TIA.
[snip]
---
Robbie Morrison
PhD student -- policy-oriented energy system simulation
Technical University of Berlin (TU-Berlin), Germany
University email (redirected) : mor...@ie...
Webmail (preferred) : ro...@ac...
[from Webmail client]
|