Bastian Maerkisch wrote:
> Timoth=E9e Lecomte wrote:
> =20
>> Timoth=E9e Lecomte wrote:
>> =20
>>> Daniel J Sebald wrote:
>>> =20
>>> =20
>>>> Dr. Johannes Zellner wrote:
>>>> =20
>>>> =20
>>>> =20
>>>>> in trm/post.trm there's a really ugly hardcoded path:
>>>>>
>>>>> #ifndef GNUPLOT_PS_DIR
>>>>> #define GNUPLOT_PS_DIR "/usr/local/share/gnuplot/4.1/PostScript"
>>>>> #endif
>>>>> =20
>>>>> =20
>>> (...)
>>>
>>> I don't have any opinion on what to do when GNUPLOT_PS_DIR is not=20
>>> defined (ie when not using ./configure), the best is to make sure tha=
t=20
>>> all custom makefile's do that properly (something else to do before 4=
.2=20
>>> I think).
>>> =20
>>> =20
>> In fact this would be wrong for Windows and probably other platforms=20
>> (OS/2 ?), where there are no standard filesystem directories. On these=
=20
>> platforms, hardcoding a path at compile time is completely wrong.
>>
>> Two alternatives for them :
>> - Encode the paths relatively to the binary. Windows has a function fo=
r=20
>> that : GetModuleFileName().
>> =20
>
> I think, to achieve the same functionality as on other platforms this
> would be the way to do it. Btw. shouldn't argv[0] contain the path
> to the executable in a bit more platform independent way?
>
> Bastian
> =20
As far as I can tell, argv[0] only contains the name of the executable,=20
not its path.
Timoth=E9e
|