Hi Frédéric,

> -----Original Message-----
> From: Frédéric [mailto:ufosp...@gmail.com]
> Sent: Thursday, October 12, 2017 10:10 AM
>
> Yes, I could do that (I am using C++). But does this interacts with the OS 
> then?
> If so, I do not like it. Imagine I have 2 independant programs that run on 
> the same
> system and I want each of them to point to a different directory. There will 
> be a
> conflict.
>
> This is why I would prefer to set the directory with a function so that it 
> write to an
> internal variable of the library.
>
> I can probably implement that and propose a patch if you tell me where it is 
> best to
> start.
>
There is no need to worry about such interference: the environment is private 
to the process and is inherited from whatever process started it.

Such a function would need to be called before any PLplot function, a possible 
set-up is (just a sketch):

void plinit_with_path( char *path ) {

               static char full_string[500];

               sprintf( full_string, "%s%s", "PLPLOT_LIB=", path );

               putenv( full_string );

               plinit();

}

Or put it in plparseopts(). Perhaps that is even better.

Mind you, any new API function will have to be made available in all supported 
languages.

Regards,

Arjen

DISCLAIMER: This message is intended exclusively for the addressee(s) and may 
contain confidential and privileged information. If you are not the intended 
recipient please notify the sender immediately and destroy this message. 
Unauthorized use, disclosure or copying of this message is strictly prohibited. 
The foundation 'Stichting Deltares', which has its seat at Delft, The 
Netherlands, Commercial Registration Number 41146461, is not liable in any way 
whatsoever for consequences and/or damages resulting from the improper, 
incomplete and untimely dispatch, receipt and/or content of this e-mail.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Plplot-general mailing list
Plplot-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-general

Reply via email to