comp.lang.ada
 help / color / mirror / Atom feed
* How to find directory where the program is?
@ 2002-04-23 18:28 Preben Randhol
  2002-04-23 19:10 ` Florian Weimer
                   ` (6 more replies)
  0 siblings, 7 replies; 54+ messages in thread
From: Preben Randhol @ 2002-04-23 18:28 UTC (permalink / raw)


How can one in Ada95 find out from which directory the Ada program is
stored in.  I mean I need to find out if my program is stored in
/usr/bin/ or /usr/local/bin or some other directory. Does anybody know
how I can do this. Note that current directory is not equal to the
directory the program is stored in. I use GNAT so if GNAT has some
routines for this that I have missed, please tell me. I'll make it
portable later if needed.

Thanks for any hints in advance.

No it is not a homework (neither am I a student taking courses) it is
for my Glosa program (http://www.pvv.org/~randhol/Ada95/Glosa/).

Preben
-- 
"Jeg tror nordmenn har glemt hvordan de tilbreder fisk. De er mest
 opptatt av firkantet fisk."
  --  Kristian Kristiansen, yrkesfisker, aftenposten.no 19/04/02



^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: How to find directory where the program is?
  2002-04-23 18:28 Preben Randhol
@ 2002-04-23 19:10 ` Florian Weimer
  2002-04-23 19:37 ` Randy Brukardt
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 54+ messages in thread
From: Florian Weimer @ 2002-04-23 19:10 UTC (permalink / raw)


Preben Randhol <randhol+abuse@pvv.org> writes:

> How can one in Ada95 find out from which directory the Ada program is
> stored in.

The solution of the general problem is not possible in Ada 95.

With a few limitations and ignorierung some corner cases, you can use
POSIX.5 to query the first execve() argument (the program name) and
search the PATH environment variable if it is not an absolute path.



^ permalink raw reply	[flat|nested] 54+ messages in thread

* RE: How to find directory where the program is?
@ 2002-04-23 19:24 Beard, Frank [Contractor]
  0 siblings, 0 replies; 54+ messages in thread
From: Beard, Frank [Contractor] @ 2002-04-23 19:24 UTC (permalink / raw)


I pretty sure GNAT has an OS package that provides that functionality.

Or, if you have access to a POSIX binding, call Get_Working_Directory
in the POSIX.Process_Environment package.  You can use Pascal Obry's
binding for Windows, or get Florist for several unix flavors.  The
links can be found from www.adapower.com.

Frank

-----Original Message-----
From: Preben Randhol [mailto:randhol+abuse@pvv.org]
Sent: Tuesday, April 23, 2002 2:29 PM
To: comp.lang.ada@ada.eu.org
Subject: How to find directory where the program is?


How can one in Ada95 find out from which directory the Ada program is
stored in.  I mean I need to find out if my program is stored in
/usr/bin/ or /usr/local/bin or some other directory. Does anybody know
how I can do this. Note that current directory is not equal to the
directory the program is stored in. I use GNAT so if GNAT has some
routines for this that I have missed, please tell me. I'll make it
portable later if needed.

Thanks for any hints in advance.

No it is not a homework (neither am I a student taking courses) it is
for my Glosa program (http://www.pvv.org/~randhol/Ada95/Glosa/).

Preben
-- 
"Jeg tror nordmenn har glemt hvordan de tilbreder fisk. De er mest
 opptatt av firkantet fisk."
  --  Kristian Kristiansen, yrkesfisker, aftenposten.no 19/04/02
_______________________________________________
comp.lang.ada mailing list
comp.lang.ada@ada.eu.org
http://ada.eu.org/mailman/listinfo/comp.lang.ada



^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: How to find directory where the program is?
  2002-04-23 18:28 Preben Randhol
  2002-04-23 19:10 ` Florian Weimer
@ 2002-04-23 19:37 ` Randy Brukardt
  2002-04-23 20:53   ` Preben Randhol
  2002-04-23 21:04 ` Joachim Schr�er
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 54+ messages in thread
From: Randy Brukardt @ 2002-04-23 19:37 UTC (permalink / raw)


Preben Randhol wrote in message ...
>How can one in Ada95 find out from which directory the Ada program is
>stored in.  I mean I need to find out if my program is stored in
>/usr/bin/ or /usr/local/bin or some other directory. Does anybody know
>how I can do this. Note that current directory is not equal to the
>directory the program is stored in. I use GNAT so if GNAT has some
>routines for this that I have missed, please tell me. I'll make it
>portable later if needed.

If you want the location that the program is launched from, you want
Argv(0) (in C terms). Ada makes this available in
Ada.Command_Line.Command_Name. Since this is implementation-defined, it
may not include the path on all targets. It does on Windows.

The program:

with Ada.Text_IO, Ada.Command_Line;
procedure Temp is
begin
    Ada.Text_IO.Put_Line (Ada.Command_Line.Command_Name);
end Temp;

prints:

E:\TESTING\NT\CONSOLE\TEMP.EXE

on my Windows machine with Janus/Ada. (Since Janus/Ada just returns what
Windows gives it, I would be surprised if some other Ada compiler didn't
return the full path on Windows.)

                Randy.






^ permalink raw reply	[flat|nested] 54+ messages in thread

* RE: How to find directory where the program is?
@ 2002-04-23 19:56 Beard, Frank [Contractor]
  2002-04-23 22:41 ` Larry Kilgallen
  0 siblings, 1 reply; 54+ messages in thread
From: Beard, Frank [Contractor] @ 2002-04-23 19:56 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 1586 bytes --]

I didn't realize I misread your question until Randy's
response.  He's right.  Every platform I've run on (VAX,
several flavors of unix, and Windows) has returned the
path when I called Ada.Command_Line.Command_Name.  But,
I don't use the GNAT compiler, so I can't speak for it.

The attached program shows some ways I've used it.  Of
course, the problem is it isn't guaranteed.  It just
happens to be the way everyone seems to have implemented
it.

Frank



-----Original Message-----
From: Preben Randhol [mailto:randhol+abuse@pvv.org]
Sent: Tuesday, April 23, 2002 2:29 PM
To: comp.lang.ada@ada.eu.org
Subject: How to find directory where the program is?


How can one in Ada95 find out from which directory the Ada program is
stored in.  I mean I need to find out if my program is stored in
/usr/bin/ or /usr/local/bin or some other directory. Does anybody know
how I can do this. Note that current directory is not equal to the
directory the program is stored in. I use GNAT so if GNAT has some
routines for this that I have missed, please tell me. I'll make it
portable later if needed.

Thanks for any hints in advance.

No it is not a homework (neither am I a student taking courses) it is
for my Glosa program (http://www.pvv.org/~randhol/Ada95/Glosa/).

Preben
-- 
"Jeg tror nordmenn har glemt hvordan de tilbreder fisk. De er mest
 opptatt av firkantet fisk."
  --  Kristian Kristiansen, yrkesfisker, aftenposten.no 19/04/02
_______________________________________________
comp.lang.ada mailing list
comp.lang.ada@ada.eu.org
http://ada.eu.org/mailman/listinfo/comp.lang.ada


[-- Attachment #2: AdaCommandLineTest.ada --]
[-- Type: application/octet-stream, Size: 1619 bytes --]

with Ada.Command_Line;
with Ada.Text_Io;

procedure AdaCommandLineTest is
    
    char : character := ' ';
    
    function Get_Directory(the_String : string) return string is
    begin
        
        for I in reverse the_String'range loop
            if (the_String(I) = '\') or else (the_String(I) = '/') then
                return (the_String(the_String'first .. I));
            end if;
        end loop;
        
        return the_String;
        
    end Get_Directory;

    function Remove_Directory(the_String : string) return string is
    begin
        
        for I in reverse the_String'range loop
            if (the_String(I) = '\') or else (the_String(I) = '/') then
                return (the_String(I+1 .. the_String'last));
            end if;
        end loop;
        
        return the_String;
        
    end Remove_Directory;

begin
    
    Ada.Text_Io.Put_Line("Full Command_Name [" & Ada.Command_Line.Command_Name & "]");
    Ada.Text_Io.Put_Line("Directory         [" & Get_Directory(Ada.Command_Line.Command_Name) & "]");
    Ada.Text_Io.Put_Line("Command_Name      [" & Remove_Directory(Ada.Command_Line.Command_Name) & "]");
    Ada.Text_Io.Put_Line("Argument_Count    [" & natural'image(Ada.Command_Line.Argument_Count) & "]");
    Ada.Text_Io.New_Line(2);
    
    for I in 1 .. Ada.Command_Line.Argument_Count loop
        Ada.Text_Io.Put_Line("Argument (" & natural'image(I) & " ) - [" & Ada.Command_Line.Argument(I) & "]");
    end loop;
    
    Ada.Text_Io.New_Line(2);
    Ada.Text_Io.Put("Hit me ...");
    Ada.Text_Io.Get_Immediate(char);
    
end AdaCommandLineTest;


^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: How to find directory where the program is?
  2002-04-23 19:37 ` Randy Brukardt
@ 2002-04-23 20:53   ` Preben Randhol
  0 siblings, 0 replies; 54+ messages in thread
From: Preben Randhol @ 2002-04-23 20:53 UTC (permalink / raw)


On Tue, 23 Apr 2002 14:37:22 -0500, Randy Brukardt wrote:
> If you want the location that the program is launched from, you want
> Argv(0) (in C terms). Ada makes this available in
> Ada.Command_Line.Command_Name. Since this is implementation-defined, it
> may not include the path on all targets. It does on Windows.
> 
> The program:
> 
> with Ada.Text_IO, Ada.Command_Line;
> procedure Temp is
> begin
>     Ada.Text_IO.Put_Line (Ada.Command_Line.Command_Name);
> end Temp;
> 
> prints:
> 
> E:\TESTING\NT\CONSOLE\TEMP.EXE


Thanks. I see that if the program is in one of the directories in the
PATH on linux then one only get: temp
so it is in effect how you called it was also mention earlier, but this is
ok for me as I then can simply check in which directory the program is
and I have it. 

Thanks!

Preben



^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: How to find directory where the program is?
  2002-04-23 18:28 Preben Randhol
  2002-04-23 19:10 ` Florian Weimer
  2002-04-23 19:37 ` Randy Brukardt
@ 2002-04-23 21:04 ` Joachim Schr�er
  2002-04-24  8:35 ` Thierry Lelegard
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 54+ messages in thread
From: Joachim Schr�er @ 2002-04-23 21:04 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1087 bytes --]

I think Ada.Command_Line.Command_Name does the job. The function returns

the complete pathname of the current exe.

Best regards

    J. Schr�er

"Preben Randhol" <randhol+abuse@pvv.org> schrieb im Newsbeitrag
news:slrnacb9v4.5ud.randhol+abuse@kiuk0156.chembio.ntnu.no...
> How can one in Ada95 find out from which directory the Ada program is
> stored in.  I mean I need to find out if my program is stored in
> /usr/bin/ or /usr/local/bin or some other directory. Does anybody know
> how I can do this. Note that current directory is not equal to the
> directory the program is stored in. I use GNAT so if GNAT has some
> routines for this that I have missed, please tell me. I'll make it
> portable later if needed.
>
> Thanks for any hints in advance.
>
> No it is not a homework (neither am I a student taking courses) it is
> for my Glosa program (http://www.pvv.org/~randhol/Ada95/Glosa/).
>
> Preben
> --
> "Jeg tror nordmenn har glemt hvordan de tilbreder fisk. De er mest
>  opptatt av firkantet fisk."
>   --  Kristian Kristiansen, yrkesfisker, aftenposten.no 19/04/02





^ permalink raw reply	[flat|nested] 54+ messages in thread

* RE: How to find directory where the program is?
  2002-04-23 19:56 Beard, Frank [Contractor]
@ 2002-04-23 22:41 ` Larry Kilgallen
  0 siblings, 0 replies; 54+ messages in thread
From: Larry Kilgallen @ 2002-04-23 22:41 UTC (permalink / raw)


In article <mailman.1019591882.7577.comp.lang.ada@ada.eu.org>, "Beard, Frank [Contractor]" <beardf@spawar.navy.mil> writes:

> I didn't realize I misread your question until Randy's
> response.  He's right.  Every platform I've run on (VAX,
> several flavors of unix, and Windows) has returned the
> path when I called Ada.Command_Line.Command_Name.  But,
> I don't use the GNAT compiler, so I can't speak for it.

So what Ada95 compiler and what operating system do you use on VAX ?



^ permalink raw reply	[flat|nested] 54+ messages in thread

* RE: How to find directory where the program is?
@ 2002-04-23 23:28 Beard, Frank [Contractor]
  2002-04-24  0:49 ` Larry Kilgallen
  0 siblings, 1 reply; 54+ messages in thread
From: Beard, Frank [Contractor] @ 2002-04-23 23:28 UTC (permalink / raw)


Now that you mention it.  The last time I worked on VAX VMS
was around 1990.  So, the routine we used had to have been
from one of the packages supplied with the VAX Ada83 compiler.

-----Original Message-----
From: Kilgallen@SpamCop.net [mailto:Kilgallen@SpamCop.net]
Sent: Tuesday, April 23, 2002 6:42 PM
To: comp.lang.ada@ada.eu.org
Subject: RE: How to find directory where the program is?


In article <mailman.1019591882.7577.comp.lang.ada@ada.eu.org>, "Beard, Frank
[Contractor]" <beardf@spawar.navy.mil> writes:

> I didn't realize I misread your question until Randy's
> response.  He's right.  Every platform I've run on (VAX,
> several flavors of unix, and Windows) has returned the
> path when I called Ada.Command_Line.Command_Name.  But,
> I don't use the GNAT compiler, so I can't speak for it.

So what Ada95 compiler and what operating system do you use on VAX ?
_______________________________________________
comp.lang.ada mailing list
comp.lang.ada@ada.eu.org
http://ada.eu.org/mailman/listinfo/comp.lang.ada



^ permalink raw reply	[flat|nested] 54+ messages in thread

* RE: How to find directory where the program is?
  2002-04-23 23:28 Beard, Frank [Contractor]
@ 2002-04-24  0:49 ` Larry Kilgallen
  2002-04-24  2:31   ` achrist
  0 siblings, 1 reply; 54+ messages in thread
From: Larry Kilgallen @ 2002-04-24  0:49 UTC (permalink / raw)


In article <mailman.1019604603.11687.comp.lang.ada@ada.eu.org>, "Beard, Frank [Contractor]" <beardf@spawar.navy.mil> writes:
> Now that you mention it.  The last time I worked on VAX VMS
> was around 1990.  So, the routine we used had to have been
> from one of the packages supplied with the VAX Ada83 compiler.

Typically those packages provide the command that was issued.
On VMS that often has very little to do with where the program
is located.



^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: How to find directory where the program is?
  2002-04-24  0:49 ` Larry Kilgallen
@ 2002-04-24  2:31   ` achrist
  2002-04-24 10:29     ` Preben Randhol
  0 siblings, 1 reply; 54+ messages in thread
From: achrist @ 2002-04-24  2:31 UTC (permalink / raw)


> Ada.Command_Line.Command_Name. Since this is implementation-defined, 
> it may not include the path on all targets. It does on Windows.

I seem to recall that one version, maybe a new one, of Windows does not 
always return the full path to the current program when you ask for the 
command line.  Are you sure that this works under all versions of 
Windows (so far)?

On a related topic, will this work (eg using GNAT for Windows 3.14p) 
if the current program is somewhere on the network that doesn't have 
a drive letter mapped to it?  If so will the GNAT.Directory_Operations 
work correctly where no drive letter is assigned?


Al



^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: How to find directory where the program is?
  2002-04-23 18:28 Preben Randhol
                   ` (2 preceding siblings ...)
  2002-04-23 21:04 ` Joachim Schr�er
@ 2002-04-24  8:35 ` Thierry Lelegard
  2002-04-24  8:43 ` Jean-Pierre Rosen
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 54+ messages in thread
From: Thierry Lelegard @ 2002-04-24  8:35 UTC (permalink / raw)


Preben Randhol wrote :
> 
> How can one in Ada95 find out from which directory the Ada program is
> stored in.  I mean I need to find out if my program is stored in
> /usr/bin/ or /usr/local/bin or some other directory. Does anybody know
> how I can do this. Note that current directory is not equal to the
> directory the program is stored in. I use GNAT so if GNAT has some
> routines for this that I have missed, please tell me. I'll make it
> portable later if needed.

It entirely depends on the operating system. On UNIX, getting argv[0]
is not reliable since there are some flavors of exec (such as execve)
which allow the caller to set argv[0] to something different from the
program name (see a login shell: argv[0] is "-sh" while the program name
is "sh" without leading dash).

To get the full path name, we use system-dependent techniques,
usually using the /proc filesystem on UNIX. However, the usage
of the the /proc filesystem depends on the UNIX flavor.

It works fine on Solaris and Linux (enter "man proc"). On HP-UX,
there is no /proc file system and we use pstat_getproc. HOwever,
it returns the basename only.

On the other OS we use (OpenVMS and Windows, although Windows can hardly
be considered as an OS :-(), there are dedicated system calls to get
the full pathname of the program.

-Thierry
____________________________________________________________________________

Thierry Lelegard, "The Jazzing Troll", CANAL+ Technologies
____________________________________________________________________________



^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: How to find directory where the program is?
  2002-04-23 18:28 Preben Randhol
                   ` (3 preceding siblings ...)
  2002-04-24  8:35 ` Thierry Lelegard
@ 2002-04-24  8:43 ` Jean-Pierre Rosen
  2002-04-24 10:33   ` Preben Randhol
  2002-04-24 15:38 ` Hyman Rosen
  2002-04-24 17:44 ` Egil Harald Hoevik
  6 siblings, 1 reply; 54+ messages in thread
From: Jean-Pierre Rosen @ 2002-04-24  8:43 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 830 bytes --]


"Preben Randhol" <randhol+abuse@pvv.org> a �crit dans le message news: slrnacb9v4.5ud.randhol+abuse@kiuk0156.chembio.ntnu.no...
> How can one in Ada95 find out from which directory the Ada program is
> stored in.  I mean I need to find out if my program is stored in
> /usr/bin/ or /usr/local/bin or some other directory. Does anybody know
> how I can do this. Note that current directory is not equal to the
> directory the program is stored in. I use GNAT so if GNAT has some
> routines for this that I have missed, please tell me. I'll make it
> portable later if needed.
>
You can try package OS_Services from Adalog's components page (http://www.adalog.fr/compo2.htm)

--
---------------------------------------------------------
           J-P. Rosen (rosen@adalog.fr)
Visit Adalog's web site at http://www.adalog.fr





^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: How to find directory where the program is?
@ 2002-04-24  9:44 Grein, Christoph
  2002-04-25 10:35 ` Thierry Lelegard
  0 siblings, 1 reply; 54+ messages in thread
From: Grein, Christoph @ 2002-04-24  9:44 UTC (permalink / raw)


Observation for Ada.Command_Line.Command_Name:
   Win98: Always the full path and extension are returned.
   WinNT: Only the name as entered on the command line is returned.
Thus we have to look for a portable way.
RM A.15(16) leaves the string completely implementation defined.
RM A.8.2(22) requires the full name to be returned.
Thanks to Randy Brukardt for this hint (a long time ago, about Jan 2001).
It may however not be possible to open the executable file with Text_IO.

  function Full_Name return String is
    -- Retrieve the full name via RM A.8.2(22).
    Command: String renames Ada.Command_Line.Command_Name;
    use Ada.Text_IO;
    Executable: File_Type;
  begin
    if Extension (Command) = "" then
      Open (Executable, In_File, Command & ".exe");
    else
      Open (Executable, In_File, Command);
    end if;
    declare
      Full_Name: String renames Name (Executable);
    begin
      Close (Executable);
      return Full_Name;
    end;
  exception
    when Name_Error =>  -- file not found
      return "";        -- set error condition
  end Full_Name;



^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: How to find directory where the program is?
  2002-04-24  2:31   ` achrist
@ 2002-04-24 10:29     ` Preben Randhol
  2002-04-24 15:28       ` Darren New
  0 siblings, 1 reply; 54+ messages in thread
From: Preben Randhol @ 2002-04-24 10:29 UTC (permalink / raw)


On Tue, 23 Apr 2002 19:31:57 -0700, achrist@easystreet.com wrote:
>> Ada.Command_Line.Command_Name. Since this is implementation-defined, 
>> it may not include the path on all targets. It does on Windows.
> 
> I seem to recall that one version, maybe a new one, of Windows does not 
> always return the full path to the current program when you ask for the 
> command line.  Are you sure that this works under all versions of 
> Windows (so far)?
> 
> On a related topic, will this work (eg using GNAT for Windows 3.14p) 
> if the current program is somewhere on the network that doesn't have 
> a drive letter mapped to it?  If so will the GNAT.Directory_Operations 
> work correctly where no drive letter is assigned?

I don't know about windows. On windows I expect to put everything in one
directory and if I can find this then I have the help files, pixmaps
etc... However on linux you put the different files in designated
directories.

By the way on windows if you want to write a config file for the current
user, how do one find the "Home directory"? I mean on NT you usually
have write protection unless administrator so I would like to write and
read the configurations from a directory (Profile ?) where the user has
write access.

Preben



^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: How to find directory where the program is?
  2002-04-24  8:43 ` Jean-Pierre Rosen
@ 2002-04-24 10:33   ` Preben Randhol
  2002-04-24 11:43     ` Jean-Pierre Rosen
  0 siblings, 1 reply; 54+ messages in thread
From: Preben Randhol @ 2002-04-24 10:33 UTC (permalink / raw)


On Wed, 24 Apr 2002 10:43:53 +0200, Jean-Pierre Rosen wrote:
> 
> "Preben Randhol" <randhol+abuse@pvv.org> a �crit dans le message news: slrnacb9v4.5ud.randhol+abuse@kiuk0156.chembio.ntnu.no...
>> How can one in Ada95 find out from which directory the Ada program is
>> stored in.  I mean I need to find out if my program is stored in
>> /usr/bin/ or /usr/local/bin or some other directory. Does anybody know
>> how I can do this. Note that current directory is not equal to the
>> directory the program is stored in. I use GNAT so if GNAT has some
>> routines for this that I have missed, please tell me. I'll make it
>> portable later if needed.
>>

> You can try package OS_Services from Adalog's components page
> (http://www.adalog.fr/compo2.htm)

Yes, but I think I will have problems with copyright issues.

Preben



^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: How to find directory where the program is?
  2002-04-24 10:33   ` Preben Randhol
@ 2002-04-24 11:43     ` Jean-Pierre Rosen
  2002-04-24 14:44       ` Preben Randhol
  0 siblings, 1 reply; 54+ messages in thread
From: Jean-Pierre Rosen @ 2002-04-24 11:43 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 685 bytes --]


"Preben Randhol" <randhol+abuse@pvv.org> a �crit dans le message news: > > You can try package OS_Services from Adalog's components
page
> > (http://www.adalog.fr/compo2.htm)
>
> Yes, but I think I will have problems with copyright issues.
>
Please tell me which ones. There is absolutely no restriction about what you can do with this package.
The only thing that is required is:
- Not to remove the initial header in the files
- *IF* you make modifications, make sure to comment that this code does not originate from Adalog.

--
---------------------------------------------------------
           J-P. Rosen (rosen@adalog.fr)
Visit Adalog's web site at http://www.adalog.fr





^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: How to find directory where the program is?
  2002-04-24 11:43     ` Jean-Pierre Rosen
@ 2002-04-24 14:44       ` Preben Randhol
  0 siblings, 0 replies; 54+ messages in thread
From: Preben Randhol @ 2002-04-24 14:44 UTC (permalink / raw)


On Wed, 24 Apr 2002 13:43:15 +0200, Jean-Pierre Rosen wrote:

> Please tell me which ones. There is absolutely no restriction about
> what you can do with this package.  The only thing that is required
> is: - Not to remove the initial header in the files - *IF* you make
> modifications, make sure to comment that this code does not originate
> from Adalog.

Ok. I think I misunderstood the text a bit.

Preben



^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: How to find directory where the program is?
  2002-04-24 10:29     ` Preben Randhol
@ 2002-04-24 15:28       ` Darren New
  2002-04-24 17:43         ` Preben Randhol
  0 siblings, 1 reply; 54+ messages in thread
From: Darren New @ 2002-04-24 15:28 UTC (permalink / raw)


Preben Randhol wrote:
> By the way on windows if you want to write a config file for the current
> user, how do one find the "Home directory"? 

It's in the environment variables, on versions of Windows where people
get different profiles for different logins. Remember that there's more
than one version of Windows.

Alternately, use the registry. There's specifically a bit called
"current user".

Alternately, look at the logged in user and use that as a key to find
either a file in a specific directory or a record in a specific file.
This has the disadvantage that it doesn't support "roaming".

-- 
Darren New 
San Diego, CA, USA (PST). Cryptokeys on demand.
   The 90/10 rule of toothpaste: the last 10% of 
         the tube lasts as long as the first 90%.



^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: How to find directory where the program is?
  2002-04-23 18:28 Preben Randhol
                   ` (4 preceding siblings ...)
  2002-04-24  8:43 ` Jean-Pierre Rosen
@ 2002-04-24 15:38 ` Hyman Rosen
  2002-04-24 17:44   ` Preben Randhol
  2002-04-24 23:08   ` Nick Roberts
  2002-04-24 17:44 ` Egil Harald Hoevik
  6 siblings, 2 replies; 54+ messages in thread
From: Hyman Rosen @ 2002-04-24 15:38 UTC (permalink / raw)


Preben Randhol wrote:
> How can one in Ada95 find out from which directory the Ada program is
> stored in.  I mean I need to find out if my program is stored in
> /usr/bin/ or /usr/local/bin or some other directory.

There is no a priori reason for this to even be possible. Your Ada
program could be loaded in PROM on your toaster, and even in UNIX,
the same executable file could have many links to it in different
directories, with different names.




^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: How to find directory where the program is?
  2002-04-24 15:28       ` Darren New
@ 2002-04-24 17:43         ` Preben Randhol
  2002-04-24 18:33           ` Randy Brukardt
  0 siblings, 1 reply; 54+ messages in thread
From: Preben Randhol @ 2002-04-24 17:43 UTC (permalink / raw)


On Wed, 24 Apr 2002 15:28:34 GMT, Darren New wrote:
> Preben Randhol wrote:
>> By the way on windows if you want to write a config file for the current
>> user, how do one find the "Home directory"? 
> 
> It's in the environment variables, on versions of Windows where people

Ah good.

> get different profiles for different logins. Remember that there's more
> than one version of Windows.

Yes, but older version you can store these things in C:\Windows\

> Alternately, use the registry. There's specifically a bit called
> "current user".

oh nonon I don't want to poke in there. As somebody said there is one
cure to fix a broken registry : FORMAT C:

>    The 90/10 rule of toothpaste: the last 10% of 
>          the tube lasts as long as the first 90%.

That goes for most things I guess ;-)

Preben



^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: How to find directory where the program is?
  2002-04-23 18:28 Preben Randhol
                   ` (5 preceding siblings ...)
  2002-04-24 15:38 ` Hyman Rosen
@ 2002-04-24 17:44 ` Egil Harald Hoevik
  6 siblings, 0 replies; 54+ messages in thread
From: Egil Harald Hoevik @ 2002-04-24 17:44 UTC (permalink / raw)


Preben Randhol wrote:
> 
> How can one in Ada95 find out from which directory the Ada program is
> stored in.  I mean I need to find out if my program is stored in
> /usr/bin/ or /usr/local/bin or some other directory. Does anybody know
> how I can do this. Note that current directory is not equal to the
> directory the program is stored in. I use GNAT so if GNAT has some
> routines for this that I have missed, please tell me. I'll make it
> portable later if needed.
> 


You can always take a look at the functions

   function Locate_Exec_On_Path
     (Exec_Name : String)
      return      String_Access;

and

   function Locate_Regular_File
     (File_Name : String;
      Path      : String)
      return      String_Access;

in the package
   GNAT.OS_Lib




~egilhh
-- 
"What I seek is to serve, with my feeble capacity, 
truth and justice at the risk of pleasing no-one."
Albert Einstein.



^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: How to find directory where the program is?
  2002-04-24 15:38 ` Hyman Rosen
@ 2002-04-24 17:44   ` Preben Randhol
  2002-04-24 23:08   ` Nick Roberts
  1 sibling, 0 replies; 54+ messages in thread
From: Preben Randhol @ 2002-04-24 17:44 UTC (permalink / raw)


On Wed, 24 Apr 2002 11:38:02 -0400, Hyman Rosen wrote:
> Preben Randhol wrote:
>> How can one in Ada95 find out from which directory the Ada program is
>> stored in.  I mean I need to find out if my program is stored in
>> /usr/bin/ or /usr/local/bin or some other directory.
> 
> There is no a priori reason for this to even be possible. Your Ada
> program could be loaded in PROM on your toaster, and even in UNIX,
> the same executable file could have many links to it in different
> directories, with different names.
> 

I hope nobody puts my program in a toaster ;-), but I see what you mean.

Preben



^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: How to find directory where the program is?
  2002-04-24 17:43         ` Preben Randhol
@ 2002-04-24 18:33           ` Randy Brukardt
  2002-04-24 21:00             ` Wes Groleau
  2002-04-25  2:37             ` Steve Doiel
  0 siblings, 2 replies; 54+ messages in thread
From: Randy Brukardt @ 2002-04-24 18:33 UTC (permalink / raw)


Preben Randhol wrote in message ...
>On Wed, 24 Apr 2002 15:28:34 GMT, Darren New wrote:

>> Alternately, use the registry. There's specifically a bit called
>> "current user".
>
>oh nonon I don't want to poke in there. As somebody said there is one
>cure to fix a broken registry : FORMAT C:

If you follow the rules, its highly unlikely that you'll break the
registry. You could only do so by overwriting an existing (important)
key, or by deleting some tree. But the rules (for this purpose) state
that you should only put your configuration data under Current
User/<company name>/<product name>/<item>. Claw has packages which do
that automatically, which makes it even harder to make a serious
mistake.

The advantage of letting the registry do this is that you get per-user
configuration essentially for free.

             Randy Brukardt.






^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: How to find directory where the program is?
  2002-04-24 18:33           ` Randy Brukardt
@ 2002-04-24 21:00             ` Wes Groleau
  2002-04-25 19:26               ` Randy Brukardt
  2002-04-25  2:37             ` Steve Doiel
  1 sibling, 1 reply; 54+ messages in thread
From: Wes Groleau @ 2002-04-24 21:00 UTC (permalink / raw)




> If you follow the rules, its highly unlikely that you'll break the
> registry. You could only do so by overwriting an existing (important)

I guess "true of false" depends on how you define "break"
AdaGIDE and Object Ada installers both insert things into
the registry. Unfortunately, some of the entries use the
same key(s), so they step on each other and whoever gets in
last has broken some of the features of the other.  A less
obvious side-effect is that the ininstalls don't catch everything.

-- 
Wes Groleau
http://freepages.rootsweb.com/~wgroleau



^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: How to find directory where the program is?
  2002-04-24 15:38 ` Hyman Rosen
  2002-04-24 17:44   ` Preben Randhol
@ 2002-04-24 23:08   ` Nick Roberts
  2002-04-25  7:28     ` Preben Randhol
  1 sibling, 1 reply; 54+ messages in thread
From: Nick Roberts @ 2002-04-24 23:08 UTC (permalink / raw)


On Wed, 24 Apr 2002 11:38:02 -0400, Hyman Rosen <hyrosen@mail.com> strongly
typed:

>Preben Randhol wrote:
>> How can one in Ada95 find out from which directory the Ada program is
>> stored in.  I mean I need to find out if my program is stored in
>> /usr/bin/ or /usr/local/bin or some other directory.
>
>There is no a priori reason for this to even be possible. Your Ada
>program could be loaded in PROM on your toaster, and even in UNIX,
>the same executable file could have many links to it in different
>directories, with different names.

Furthermore, one has to ask the question "why?" (Why do you wish your
program to discover its own executable?) As Hyman points out, there may not
be one (there may zero or several), but even if there is one, your program
may not have (any) access permission to it. (Side Issue 1, see below.)
Actually, what kind of access would you require?

Side Issue 1. It may just be me, but I would suggest that (on a well
managed system ;-) the vast majority of Ada programs will not need to, and
should not, have any access to their own executables. (If you're wondering
why, think about how viruses propagate themselves.)

If your program is, say, a discombobulator, and supposing it needs to add
itself to a cron-list (or equivalent), in order to complete one of its
actions perhaps, I would suggest you: (a) try to find a program argument
named say "-phase2" and use the value of the argument following it; (b) if
that fails, get the value of the environment variable named say
"discombob2"; (c) if that fails, use whatever strategy you do to obtain the
program's configuration file, and search for a line there beginning with
"phase2=" and use the remainder of the line; (d) if that fails, obtain the
configuration file's directory D and use D & Ada.Command_Line.Command_Name;
(e) if that fails, use D & Default_Program_File_Name (which you have
defined, e.g. a function which returns "discombob" under UNIX systems and
"DISCOMB.EXE" under DOS/Windows). (Simple ;-) Your program installer should
generate a configuration file with e.g.
"phase1=C:\SUPASOFT\BOBULTNS\DISCOMB.EXE" and
"phase2=C:\SUPASOFT\BOBULTNS\DISCOMB.EXE" in it, so that your program is
spared the effort (and hit-and-miss qualities) of trying to find out the
incantation necessary to run itself, and so that users are given maximum
flexibility in managing their system.

Hope this post has some element of enlightening qualities. (Not really sure
if it does; that's how posts go sometimes :-)

-- 
Nick Roberts



^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: How to find directory where the program is?
  2002-04-24 18:33           ` Randy Brukardt
  2002-04-24 21:00             ` Wes Groleau
@ 2002-04-25  2:37             ` Steve Doiel
  2002-04-25  7:26               ` Preben Randhol
  1 sibling, 1 reply; 54+ messages in thread
From: Steve Doiel @ 2002-04-25  2:37 UTC (permalink / raw)


I do have a solution for getting the path and name of the current executable
but it rather involved and very specific to windows.  From the initial post
I thought you were looking for a solution that is not platform specific.
Isn't this the case?

SteveD






^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: How to find directory where the program is?
  2002-04-25  2:37             ` Steve Doiel
@ 2002-04-25  7:26               ` Preben Randhol
  0 siblings, 0 replies; 54+ messages in thread
From: Preben Randhol @ 2002-04-25  7:26 UTC (permalink / raw)


On Thu, 25 Apr 2002 02:37:38 GMT, Steve Doiel wrote:
> I do have a solution for getting the path and name of the current executable
> but it rather involved and very specific to windows.  From the initial post
> I thought you were looking for a solution that is not platform specific.
> Isn't this the case?

I think that I probably need to make one package/child package for
windows and one for unix as I don't see that a general solution is easy.

-- 
"Jeg tror nordmenn har glemt hvordan de tilbreder fisk. De er mest
 opptatt av firkantet fisk."
  --  Kristian Kristiansen, yrkesfisker, aftenposten.no 19/04/02



^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: How to find directory where the program is?
  2002-04-24 23:08   ` Nick Roberts
@ 2002-04-25  7:28     ` Preben Randhol
  2002-04-25 14:18       ` Marin David Condic
                         ` (2 more replies)
  0 siblings, 3 replies; 54+ messages in thread
From: Preben Randhol @ 2002-04-25  7:28 UTC (permalink / raw)


On Wed, 24 Apr 2002 23:08:28 GMT, Nick Roberts wrote:
> 
> Furthermore, one has to ask the question "why?" (Why do you wish your

Basicly so that the program can find out where it's other files are like
the help files and graphics etc...

Preben
-- 
"Jeg tror nordmenn har glemt hvordan de tilbreder fisk. De er mest
 opptatt av firkantet fisk."
  --  Kristian Kristiansen, yrkesfisker, aftenposten.no 19/04/02



^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: How to find directory where the program is?
  2002-04-24  9:44 Grein, Christoph
@ 2002-04-25 10:35 ` Thierry Lelegard
  2002-04-25 19:30   ` Philippe Waroquiers
  0 siblings, 1 reply; 54+ messages in thread
From: Thierry Lelegard @ 2002-04-25 10:35 UTC (permalink / raw)


"Grein, Christoph" wrote:
> 
> Observation for Ada.Command_Line.Command_Name:
>    Win98: Always the full path and extension are returned.
>    WinNT: Only the name as entered on the command line is returned.

Use the Win32 service GetModuleFileName (with a null hadle for hModule).
You will get a full path name of your executable file on all Win32 platforms.

See: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/dll_0ysl.asp

Not portable outside windows though...

-Thierry
____________________________________________________________________________

Thierry Lelegard, "The Jazzing Troll", CANAL+ Technologies
____________________________________________________________________________



^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: How to find directory where the program is?
  2002-04-25  7:28     ` Preben Randhol
@ 2002-04-25 14:18       ` Marin David Condic
  2002-04-26 16:24         ` Stephen Leake
  2002-04-25 17:10       ` Sergey Koshcheyev
  2002-04-26 12:18       ` Jacob Sparre Andersen
  2 siblings, 1 reply; 54+ messages in thread
From: Marin David Condic @ 2002-04-25 14:18 UTC (permalink / raw)


Sounds like something that would benefit from a logical name, environment
variable or other system dependent technique. I doubt there is any good way
of doing it that will work across all Ada implementations & platforms. You
might rely on a command line parameter and set up a shell script or batch
file to do the actual execution - the user gets a simple command to run the
program and you have an easily modified script file for specifying the
directory in which it is installed. It at least lets you code to a
system-independent scheme, with the dependencies left to the script file.

I wonder if it is possible to specify a portable interface for doing this
sort of thing that could be supported in some manner on most popular
operating systems? Would most OS's provide some version of a logical name
such that defining a "Translate_Logical_Name" operation would yield things
like files/directories?

MDC
--
Marin David Condic
Senior Software Engineer
Pace Micro Technology Americas    www.pacemicro.com
Enabling the digital revolution
e-Mail:    marin.condic@pacemicro.com


"Preben Randhol" <randhol+abuse@pvv.org> wrote in message
news:slrnacfc16.145.randhol+abuse@kiuk0156.chembio.ntnu.no...
>
> Basicly so that the program can find out where it's other files are like
> the help files and graphics etc...
>






^ permalink raw reply	[flat|nested] 54+ messages in thread

* RE: How to find directory where the program is?
@ 2002-04-25 16:43 Beard, Frank [Contractor]
  0 siblings, 0 replies; 54+ messages in thread
From: Beard, Frank [Contractor] @ 2002-04-25 16:43 UTC (permalink / raw)


"Grein, Christoph" wrote:
> 
> Observation for Ada.Command_Line.Command_Name:
>    Win98: Always the full path and extension are returned.
>    WinNT: Only the name as entered on the command line is returned.

I don't know what's different about your version of NT but I'm running
on NT 4.0 and it's returned the full path on every service pack from
3.0 to 6a.



^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: How to find directory where the program is?
  2002-04-25  7:28     ` Preben Randhol
  2002-04-25 14:18       ` Marin David Condic
@ 2002-04-25 17:10       ` Sergey Koshcheyev
  2002-04-25 21:11         ` Nick Roberts
  2002-04-26 17:13         ` Anders Gidenstam
  2002-04-26 12:18       ` Jacob Sparre Andersen
  2 siblings, 2 replies; 54+ messages in thread
From: Sergey Koshcheyev @ 2002-04-25 17:10 UTC (permalink / raw)


"Preben Randhol" <randhol+abuse@pvv.org> wrote in message
news:slrnacfc16.145.randhol+abuse@kiuk0156.chembio.ntnu.no...
> On Wed, 24 Apr 2002 23:08:28 GMT, Nick Roberts wrote:
> >
> > Furthermore, one has to ask the question "why?" (Why do you wish your
>
> Basicly so that the program can find out where it's other files are like
> the help files and graphics etc...

I believe most GPLed C/C++ programs for Unix have such paths hard-coded into
them, configured at build-time, using autoconf. You might consider that
approach too.

Sergey.

>
> Preben
> --
> "Jeg tror nordmenn har glemt hvordan de tilbreder fisk. De er mest
>  opptatt av firkantet fisk."
>   --  Kristian Kristiansen, yrkesfisker, aftenposten.no 19/04/02





^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: How to find directory where the program is?
  2002-04-24 21:00             ` Wes Groleau
@ 2002-04-25 19:26               ` Randy Brukardt
  0 siblings, 0 replies; 54+ messages in thread
From: Randy Brukardt @ 2002-04-25 19:26 UTC (permalink / raw)


Wes Groleau wrote in message <3CC71CFD.530F568D@despammed.com>...
>
>
>> If you follow the rules, its highly unlikely that you'll break the
>> registry. You could only do so by overwriting an existing (important)
>
>I guess "true of false" depends on how you define "break"
>AdaGIDE and Object Ada installers both insert things into
>the registry. Unfortunately, some of the entries use the
>same key(s), so they step on each other and whoever gets in
>last has broken some of the features of the other.  A less
>obvious side-effect is that the ininstalls don't catch everything.


This is an obvious case of not following the rules. When updating the
registry, if the key already exists (and it is not product-specific),
the installer is supposed to either not set the key, or query the user
if they want to change it. Obviously, one or both of the GNAT and OA
installers are violating this rule. Indeed, the latest GNAT install
clobbered the binding of the .ads and .adb extensions to OA. And I
didn't install AdaGIDE, so now they point to nothing at all. The Claw
and Janus/Ada installers prompt before overwriting anything that isn't
in the RRS key.

I believe that the problem only occurs when registering file extensions
and other system-level stuff. If one of the products is clobbering the
other's vendor specific keys, that would be an intentional attempt to
make the other product unusable (that couldn't happen by accident). But
I don't think that is happening here.

                                    Randy.






^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: How to find directory where the program is?
  2002-04-25 10:35 ` Thierry Lelegard
@ 2002-04-25 19:30   ` Philippe Waroquiers
  2002-04-25 22:57     ` Larry Kilgallen
  0 siblings, 1 reply; 54+ messages in thread
From: Philippe Waroquiers @ 2002-04-25 19:30 UTC (permalink / raw)


If you are using GNAT, in GNAT.OS_Lib, you find:
   function Locate_Exec_On_Path
     (Exec_Name : String)
      return      String_Access;
   --  Try to locate an executable whose name is given by Exec_Name in the
   --  directories listed in the environment Path. If the Exec_Name doesn't
   --  have the executable suffix, it will be appended before the search.
   --  Otherwise works like Locate_Regular_File below.
   --
   --  Note that this function allocates some memory for the returned value.
   --  This memory needs to be deallocated after use.

This could be used (you need to find the command name first) to find
the executable file
  
-- 
Philippe WAROQUIERS                  Eurocontrol - Central Flow Management Unit
philippe.waroquiers@eurocontrol.int  Rue de la fusee, 96
Tel: +32 2 729 97 35                 1130 Brussels
Fax: +32 2 729 90 22                 Belgium



^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: How to find directory where the program is?
  2002-04-25 17:10       ` Sergey Koshcheyev
@ 2002-04-25 21:11         ` Nick Roberts
  2002-04-25 23:28           ` Sergey Koshcheyev
  2002-04-26 16:22           ` Stephen Leake
  2002-04-26 17:13         ` Anders Gidenstam
  1 sibling, 2 replies; 54+ messages in thread
From: Nick Roberts @ 2002-04-25 21:11 UTC (permalink / raw)


On Thu, 25 Apr 2002 19:10:21 +0200, "Sergey Koshcheyev"
<serko84@hotmail.com> strongly typed:

>"Preben Randhol" <randhol+abuse@pvv.org> wrote in message
>news:slrnacfc16.145.randhol+abuse@kiuk0156.chembio.ntnu.no...
>> On Wed, 24 Apr 2002 23:08:28 GMT, Nick Roberts wrote:
>> >
>> > Furthermore, one has to ask the question "why?" (Why do you wish your
>>
>> Basicly so that the program can find out where it's other files are like
>> the help files and graphics etc...
>
>I believe most GPLed C/C++ programs for Unix have such paths hard-coded into
>them, configured at build-time, using autoconf. You might consider that
>approach too.

Surely that's the exact opposite of what should be recommended!

-- 
Nick Roberts



^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: How to find directory where the program is?
  2002-04-25 19:30   ` Philippe Waroquiers
@ 2002-04-25 22:57     ` Larry Kilgallen
  0 siblings, 0 replies; 54+ messages in thread
From: Larry Kilgallen @ 2002-04-25 22:57 UTC (permalink / raw)


In article <rcn0vrmv83.fsf@gull.sup.cfmu.eurocontrol.be>, Philippe Waroquiers <wao@gull.sup.cfmu.eurocontrol.be> writes:
> If you are using GNAT, in GNAT.OS_Lib, you find:
>    function Locate_Exec_On_Path
>      (Exec_Name : String)
>       return      String_Access;
>    --  Try to locate an executable whose name is given by Exec_Name in the
>    --  directories listed in the environment Path. If the Exec_Name doesn't
>    --  have the executable suffix, it will be appended before the search.
>    --  Otherwise works like Locate_Regular_File below.
>    --
>    --  Note that this function allocates some memory for the returned value.
>    --  This memory needs to be deallocated after use.
> 
> This could be used (you need to find the command name first) to find
> the executable file

On some of the operating systems on which GNAT runs.



^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: How to find directory where the program is?
  2002-04-25 21:11         ` Nick Roberts
@ 2002-04-25 23:28           ` Sergey Koshcheyev
  2002-04-26  5:57             ` Preben Randhol
  2002-04-26 16:22           ` Stephen Leake
  1 sibling, 1 reply; 54+ messages in thread
From: Sergey Koshcheyev @ 2002-04-25 23:28 UTC (permalink / raw)



"Nick Roberts" <nickroberts@ukf.net> wrote in message
news:3cc866f9.71682376@news.cis.dfn.de...
> On Thu, 25 Apr 2002 19:10:21 +0200, "Sergey Koshcheyev"
> <serko84@hotmail.com> strongly typed:
>
> >I believe most GPLed C/C++ programs for Unix have such paths hard-coded
into
> >them, configured at build-time, using autoconf. You might consider that
> >approach too.
>
> Surely that's the exact opposite of what should be recommended!

Well, everybody does it this way anyway (if I understood correctly). Also,
why mess with complicated, non-portable and non-reliable things like
determining the executable path? For example, if somebody creates a
(symbolic) link to your program from some directory, why require them to
also create links for the data?

Sergey.





^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: How to find directory where the program is?
  2002-04-25 23:28           ` Sergey Koshcheyev
@ 2002-04-26  5:57             ` Preben Randhol
  0 siblings, 0 replies; 54+ messages in thread
From: Preben Randhol @ 2002-04-26  5:57 UTC (permalink / raw)


On Fri, 26 Apr 2002 01:28:19 +0200, Sergey Koshcheyev wrote:

> Well, everybody does it this way anyway (if I understood correctly).
> Also, why mess with complicated, non-portable and non-reliable things
> like determining the executable path? For example, if somebody creates
> a (symbolic) link to your program from some directory, why require
> them to also create links for the data?

Actually I think that they have several paths hardcoded as I can see
from strace output that they search in several directories for a file.
But I'm a bit uncertain how you do this with autoconf/make. Anyway I
would like to look into these things a bit more before I resort to
hardcoding.

Preben
-- 
"Jeg tror nordmenn har glemt hvordan de tilbreder fisk. De er mest
 opptatt av firkantet fisk."
  --  Kristian Kristiansen, yrkesfisker, aftenposten.no 19/04/02



^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: How to find directory where the program is?
  2002-04-25  7:28     ` Preben Randhol
  2002-04-25 14:18       ` Marin David Condic
  2002-04-25 17:10       ` Sergey Koshcheyev
@ 2002-04-26 12:18       ` Jacob Sparre Andersen
  2002-04-26 12:23         ` Preben Randhol
  2002-04-26 13:09         ` Marin David Condic
  2 siblings, 2 replies; 54+ messages in thread
From: Jacob Sparre Andersen @ 2002-04-26 12:18 UTC (permalink / raw)


Preben Randhol wrote:

> On Wed, 24 Apr 2002 23:08:28 GMT, Nick Roberts wrote:
> > Furthermore, one has to ask the question "why?" (Why do you wish your
> 
> Basicly so that the program can find out where it's other files are like
> the help files and graphics etc...

Considering that many systemadministrators insist on keeping
executables, documentation and system-wide configurations in
separate locations, it is not neccessarily a good idea to
hard-code the relative or absolute locations of these files.

Jacob
-- 
Harddiske er bin�re enheder: Enten er de nye, eller ogs� er
de fyldt op.



^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: How to find directory where the program is?
  2002-04-26 12:18       ` Jacob Sparre Andersen
@ 2002-04-26 12:23         ` Preben Randhol
  2002-04-26 12:48           ` David C. Hoos
  2002-04-26 13:09         ` Marin David Condic
  1 sibling, 1 reply; 54+ messages in thread
From: Preben Randhol @ 2002-04-26 12:23 UTC (permalink / raw)


On Fri, 26 Apr 2002 14:18:38 +0200, Jacob Sparre Andersen wrote:
> Preben Randhol wrote:
> 
>> On Wed, 24 Apr 2002 23:08:28 GMT, Nick Roberts wrote:
>> > Furthermore, one has to ask the question "why?" (Why do you wish your
>> 
>> Basicly so that the program can find out where it's other files are like
>> the help files and graphics etc...
> 
> Considering that many systemadministrators insist on keeping
> executables, documentation and system-wide configurations in
> separate locations, it is not neccessarily a good idea to
> hard-code the relative or absolute locations of these files.

I know that, but if you install the program in /usr/bin then I expect
(on Linux) to find the graphics and help in /usr/share/programname/ if
you put it in /usr/local/bin then /usr/local/share/programname/ etc....

Preben



^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: How to find directory where the program is?
  2002-04-26 12:23         ` Preben Randhol
@ 2002-04-26 12:48           ` David C. Hoos
  2002-04-26 14:13             ` Preben Randhol
  0 siblings, 1 reply; 54+ messages in thread
From: David C. Hoos @ 2002-04-26 12:48 UTC (permalink / raw)


Hi Preben,

Perhaps you should consider putting a hidden file in the user's
home directory.

Many programs use this technique, not only for user preferences
but for the location of files.

By way of example, here are some hidden files in my home directory
on a Linux machine, showing that the practice is widespread.

.lessrc .acrorc .cvsrc .gtkrc .screenrc .kderc .bashrc .dmallocrc
.wmrc .tkdiffrc .tcshrc .emacs-places .emacs .emacs_case_exceptions
.history .emacs.desktop

----- Original Message -----
From: "Preben Randhol" <randhol+abuse@pvv.org>
Newsgroups: comp.lang.ada
To: <comp.lang.ada@ada.eu.org>
Sent: Friday, April 26, 2002 7:23 AM
Subject: Re: How to find directory where the program is?


> On Fri, 26 Apr 2002 14:18:38 +0200, Jacob Sparre Andersen wrote:
> > Preben Randhol wrote:
> >
> >> On Wed, 24 Apr 2002 23:08:28 GMT, Nick Roberts wrote:
> >> > Furthermore, one has to ask the question "why?" (Why do you wish your
> >>
> >> Basicly so that the program can find out where it's other files are
like
> >> the help files and graphics etc...
> >
> > Considering that many systemadministrators insist on keeping
> > executables, documentation and system-wide configurations in
> > separate locations, it is not neccessarily a good idea to
> > hard-code the relative or absolute locations of these files.
>
> I know that, but if you install the program in /usr/bin then I expect
> (on Linux) to find the graphics and help in /usr/share/programname/ if
> you put it in /usr/local/bin then /usr/local/share/programname/ etc....
>
> Preben
> _______________________________________________
> comp.lang.ada mailing list
> comp.lang.ada@ada.eu.org
> http://ada.eu.org/mailman/listinfo/comp.lang.ada
>




^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: How to find directory where the program is?
  2002-04-26 12:18       ` Jacob Sparre Andersen
  2002-04-26 12:23         ` Preben Randhol
@ 2002-04-26 13:09         ` Marin David Condic
  2002-04-27 14:39           ` Larry Kilgallen
  1 sibling, 1 reply; 54+ messages in thread
From: Marin David Condic @ 2002-04-26 13:09 UTC (permalink / raw)


Very true - but still you need *some* method for an executable to find
related files. Hard coding is a bad thing. Things like logical names or
environment variables are going to be system dependent. You could ask the
user to enter a path name somewhere in the program (command line parameter,
text field on the main screen, etc.) but how are you going to remember the
path name between executions without resorting to a registry entry,
environment variable, etc., all of which are going to be system dependent?

Most OS's have some means for keeping that kind of thing around somewhere,
just that it isn't going to be a "portable" answer. Its the sort of thing
that Ada has been very good at hiding in the past - maybe that's something
that needs to be in an OS Interface package?

MDC
--
Marin David Condic
Senior Software Engineer
Pace Micro Technology Americas    www.pacemicro.com
Enabling the digital revolution
e-Mail:    marin.condic@pacemicro.com


"Jacob Sparre Andersen" <sparre@nbi.dk> wrote in message
news:3CC9459E.7A49A4F7@nbi.dk...
>
> Considering that many systemadministrators insist on keeping
> executables, documentation and system-wide configurations in
> separate locations, it is not neccessarily a good idea to
> hard-code the relative or absolute locations of these files.
>






^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: How to find directory where the program is?
  2002-04-26 12:48           ` David C. Hoos
@ 2002-04-26 14:13             ` Preben Randhol
  2002-04-27  8:18               ` Eric G. Miller
  0 siblings, 1 reply; 54+ messages in thread
From: Preben Randhol @ 2002-04-26 14:13 UTC (permalink / raw)


In comp.lang.ada, you wrote:
> Hi Preben,
> 
> Perhaps you should consider putting a hidden file in the user's
> home directory.
> 
> Many programs use this technique, not only for user preferences
> but for the location of files.
> 
> By way of example, here are some hidden files in my home directory
> on a Linux machine, showing that the practice is widespread.

Actually I will put a hidden directory to store all the user settings.

Preben



^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: How to find directory where the program is?
  2002-04-25 21:11         ` Nick Roberts
  2002-04-25 23:28           ` Sergey Koshcheyev
@ 2002-04-26 16:22           ` Stephen Leake
  1 sibling, 0 replies; 54+ messages in thread
From: Stephen Leake @ 2002-04-26 16:22 UTC (permalink / raw)


nickroberts@ukf.net (Nick Roberts) writes:

> On Thu, 25 Apr 2002 19:10:21 +0200, "Sergey Koshcheyev"
> <serko84@hotmail.com> strongly typed:
> 
> >"Preben Randhol" <randhol+abuse@pvv.org> wrote in message
> >news:slrnacfc16.145.randhol+abuse@kiuk0156.chembio.ntnu.no...
> >> On Wed, 24 Apr 2002 23:08:28 GMT, Nick Roberts wrote:
> >> >
> >> > Furthermore, one has to ask the question "why?" (Why do you wish your
> >>
> >> Basicly so that the program can find out where it's other files are like
> >> the help files and graphics etc...
> >
> >I believe most GPLed C/C++ programs for Unix have such paths hard-coded into
> >them, configured at build-time, using autoconf. You might consider that
> >approach too.
> 
> Surely that's the exact opposite of what should be recommended!

It is the recommended approach, _if_ you are distributing source, not
binary. Which is what most "GPLed C/C++ programs for Unix" do.

If you are distributing binaries, a different approach is required.

-- 
-- Stephe



^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: How to find directory where the program is?
  2002-04-25 14:18       ` Marin David Condic
@ 2002-04-26 16:24         ` Stephen Leake
  2002-04-26 20:41           ` achrist
                             ` (2 more replies)
  0 siblings, 3 replies; 54+ messages in thread
From: Stephen Leake @ 2002-04-26 16:24 UTC (permalink / raw)


"Marin David Condic" <dont.bother.mcondic.auntie.spam@[acm.org> writes:

> I wonder if it is possible to specify a portable interface for doing this
> sort of thing that could be supported in some manner on most popular
> operating systems? Would most OS's provide some version of a logical name
> such that defining a "Translate_Logical_Name" operation would yield things
> like files/directories?

Most OS's have "environment variables". The hard part is getting the
installer to set the appropriate environment variable.

-- 
-- Stephe



^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: How to find directory where the program is?
  2002-04-25 17:10       ` Sergey Koshcheyev
  2002-04-25 21:11         ` Nick Roberts
@ 2002-04-26 17:13         ` Anders Gidenstam
  1 sibling, 0 replies; 54+ messages in thread
From: Anders Gidenstam @ 2002-04-26 17:13 UTC (permalink / raw)


In article <aa9d9h$2okg$1@ns.felk.cvut.cz>,
	"Sergey Koshcheyev" <serko84@hotmail.com> writes:
> "Preben Randhol" <randhol+abuse@pvv.org> wrote in message
> news:slrnacfc16.145.randhol+abuse@kiuk0156.chembio.ntnu.no...

>> Basicly so that the program can find out where it's other files are
>> like the help files and graphics etc...
> 
> I believe most GPLed C/C++ programs for Unix have such paths
> hard-coded into them, configured at build-time, using autoconf. You
> might consider that approach too.

Well, I think that this combined with the possibility of overriding
the compiled-in defaults with some environment variables sounds like a
good approach.
 
/Anders
-- 
--------------------------------------------
"A well-written program is its own heaven; 
 a poorly-written program is its own hell."
  - The Tao of Programming 



^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: How to find directory where the program is?
  2002-04-26 16:24         ` Stephen Leake
@ 2002-04-26 20:41           ` achrist
  2002-04-26 21:31           ` Larry Kilgallen
  2002-04-29 15:38           ` Marin David Condic
  2 siblings, 0 replies; 54+ messages in thread
From: achrist @ 2002-04-26 20:41 UTC (permalink / raw)


Stephen Leake wrote:
> 
> Most OS's have "environment variables". The hard part is getting the
> installer to set the appropriate environment variable.
> 

Problem if the installer runs on machine A and then user tries to
execute the program from machine 2. Much worse is the possibility 
that sometime during the lifetime of the installed program, the 
computer will be messed with by someone who removes the environment 
variable to clean up the environment or tidy up the startup script 
that sets the variables.  The environment is not a database; if a 
computer has lots of software installed and lots of environment 
settings, this is both an efficiency issue and a management problem.  

A user-friendly program will not simply crash if the required 
environment is missing.  My preferred approach is like the method 
of Hansel and Gretel in the deep woods -- drop lots of breadcrumbs.  
If you can't find your way based on the command line, look in the 
current  directory; if the current directory is no help, look in the 
environment (or the registry); if the environment doesn't help, look 
along the PATH;  if the path is no help, look in the program's 
directory.   

This gives some opportunity for confusion, but it also allows a 
hierarchical set of defaults and overrides of various options.  In
particular, it also llows running/testing of multiple versions of 
the same  program on the same machine with different settings that 
maybe don't interfere with each other.


Al



^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: How to find directory where the program is?
  2002-04-26 16:24         ` Stephen Leake
  2002-04-26 20:41           ` achrist
@ 2002-04-26 21:31           ` Larry Kilgallen
  2002-04-29 15:38           ` Marin David Condic
  2 siblings, 0 replies; 54+ messages in thread
From: Larry Kilgallen @ 2002-04-26 21:31 UTC (permalink / raw)


In article <u1yd22ztq.fsf@gsfc.nasa.gov>, Stephen Leake <stephen.a.leake.1@gsfc.nasa.gov> writes:
> "Marin David Condic" <dont.bother.mcondic.auntie.spam@[acm.org> writes:
> 
>> I wonder if it is possible to specify a portable interface for doing this
>> sort of thing that could be supported in some manner on most popular
>> operating systems? Would most OS's provide some version of a logical name
>> such that defining a "Translate_Logical_Name" operation would yield things
>> like files/directories?
> 
> Most OS's have "environment variables". The hard part is getting the
> installer to set the appropriate environment variable.

Which is why depending on the installer to do this is not in the spirit
of Ada.

If there is no way to get a definitive answer from the operating
system regarding what image is running, we should not pretend.



^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: How to find directory where the program is?
  2002-04-26 14:13             ` Preben Randhol
@ 2002-04-27  8:18               ` Eric G. Miller
  0 siblings, 0 replies; 54+ messages in thread
From: Eric G. Miller @ 2002-04-27  8:18 UTC (permalink / raw)


In <mailman.1019830444.11658.comp.lang.ada@ada.eu.org>, Preben Randhol wrote:

> In comp.lang.ada, you wrote:
>> Hi Preben,
>> 
>> Perhaps you should consider putting a hidden file in the user's
>> home directory.
>> 
>> Many programs use this technique, not only for user preferences
>> but for the location of files.
>> 
>> By way of example, here are some hidden files in my home directory
>> on a Linux machine, showing that the practice is widespread.
> 
> Actually I will put a hidden directory to store all the user settings.

The standard method on Linux would be system-wide settings in /etc/<pkg>.conf or
/etc/<pkg>/<one or more files>.  That'd be an appropriate place to put the paths
for everything else.  Another option is to ship a start-up script that sets
some environment variables for you and then executes the real image.  That's a
fairly common way to keep platform paths out of the code, while not generally
poluting the environment with extra variables except during program execution.
Scripts are usually easy for system admins to modify, if needed, and can easily
be generated from configure/make with a template.  For Win/DOS, you can use a
batch file for the same purposes.



^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: How to find directory where the program is?
  2002-04-26 13:09         ` Marin David Condic
@ 2002-04-27 14:39           ` Larry Kilgallen
  2002-04-27 21:12             ` Nick Roberts
  2002-04-29 15:52             ` Marin David Condic
  0 siblings, 2 replies; 54+ messages in thread
From: Larry Kilgallen @ 2002-04-27 14:39 UTC (permalink / raw)


In article <aabjie$pru$1@nh.pace.co.uk>, "Marin David Condic" <dont.bother.mcondic.auntie.spam@[acm.org> writes:

> Most OS's have some means for keeping that kind of thing around somewhere,
> just that it isn't going to be a "portable" answer. Its the sort of thing
> that Ada has been very good at hiding in the past - maybe that's something
> that needs to be in an OS Interface package?

But sometimes there will not be an answer, if you are expecting a
disk location.  On VMS the program you are running might be on
magnetic tape.



^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: How to find directory where the program is?
  2002-04-27 14:39           ` Larry Kilgallen
@ 2002-04-27 21:12             ` Nick Roberts
  2002-04-29 15:52             ` Marin David Condic
  1 sibling, 0 replies; 54+ messages in thread
From: Nick Roberts @ 2002-04-27 21:12 UTC (permalink / raw)


On 27 Apr 2002 09:39:03 -0500, Kilgallen@SpamCop.net (Larry Kilgallen)
strongly typed:

>In article <aabjie$pru$1@nh.pace.co.uk>, "Marin David Condic" <dont.bother.mcondic.auntie.spam@[acm.org> writes:
>
>> Most OS's have some means for keeping that kind of thing around somewhere,
>> just that it isn't going to be a "portable" answer. Its the sort of thing
>> that Ada has been very good at hiding in the past - maybe that's something
>> that needs to be in an OS Interface package?
>
>But sometimes there will not be an answer, if you are expecting a
>disk location.  On VMS the program you are running might be on
>magnetic tape.

I think we might consider that a bit of a pathological case, nowadays,
Larry!

Besides, I think Marin was suggesting a standard way to obtain
configuration data (not necessarily anything to do with where the
executable is located).

May I propose:

   with Ada.IO_Exceptions;
   package Ada.Program_Environment is

      type Mechanism is (...);
      -- implementation defined enumeration type

      Default_Mechanism: Mechanism := ...;
      -- may be initialised statically or dynamically

      function Get_Item (Name: in Wide_String;
                         Via:  in Mechanism := Default_Mechanism)
         return Wide_String;
      -- returns "" if item not found

      procedure Set_Item (Name, Value: in Wide_String;
                          Via:         in Mechanism := Default_Mechanism);
      -- may or may not delete if Value=""

      procedure Delete_Item (Name: in Wide_String;
                             Via:  in Mechanism := Default_Mechanism);
      -- deletes or (if cannot) sets to ""

      Name_Error:   exception renames Ada.IO_Exceptions.Name_Error;
      Use_Error:    exception renames Ada.IO_Exceptions.Use_Error;
      Device_Error: exception renames Ada.IO_Exceptions.Device_Error;

   end Ada.Program_Environment;

The different mechanisms for Windows (32-bit) might be:

   ( Environment_Variables,
     Windows_INI_File,
     Program_Home_INI_File,
     Registry_User,
     Registry_Local,
     Registry_System );

Just a thought.

PS: The syntax of names is intended to be left implementation-defined (just
like file names). However, it might be necessary to single out one
punctuation character that must be usable (as a delimiter) with impunity.
Perhaps '.' would be best for this. PPS: '=' is likely to be unusable.

-- 
Nick Roberts



^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: How to find directory where the program is?
  2002-04-26 16:24         ` Stephen Leake
  2002-04-26 20:41           ` achrist
  2002-04-26 21:31           ` Larry Kilgallen
@ 2002-04-29 15:38           ` Marin David Condic
  2 siblings, 0 replies; 54+ messages in thread
From: Marin David Condic @ 2002-04-29 15:38 UTC (permalink / raw)


"Stephen Leake" <stephen.a.leake.1@gsfc.nasa.gov> wrote in message
news:u1yd22ztq.fsf@gsfc.nasa.gov...
>
> Most OS's have "environment variables". The hard part is getting the
> installer to set the appropriate environment variable.
>
Since "most OS's" are Unix or Windows, I wouldn't really see it as a
practical problem. :-) But you wouldn't want to specify something that would
be impossible to support on Macintosh or some other TBD equipment that might
do things very differently. (Allowable syntax, for example - or some unusual
steps for getting the translation)

Setting the environment variables is always going to be system dependent and
a problem for the installation procedures to solve. No really good answers
there - it would just be nice to have an Ada means of getting at them once
they are set.

MDC
--
Marin David Condic
Senior Software Engineer
Pace Micro Technology Americas    www.pacemicro.com
Enabling the digital revolution
e-Mail:    marin.condic@pacemicro.com






^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: How to find directory where the program is?
  2002-04-27 14:39           ` Larry Kilgallen
  2002-04-27 21:12             ` Nick Roberts
@ 2002-04-29 15:52             ` Marin David Condic
  1 sibling, 0 replies; 54+ messages in thread
From: Marin David Condic @ 2002-04-29 15:52 UTC (permalink / raw)


As an ex-VMS user and VMS bigot, I understand and concur. :-) However, I
think I was talking about something a little more general than finding the
location of the executable image. My understanding was that the reason for
wanting the name of the image was to find a directory path that would allow
for then finding application (or possibly user) specific files, etc. Sort of
a "persistence of information between program executions" problem. That's
the sort of thing that was quite commonly dealt with by logical names (or
environment variables or registry entries, etc...) My thinking was that it
would be nice if Ada provided a standard mechanism for remembering this kind
of thing (directory locations for application or user specific files, etc.)
Could Ada create a package for its own sort of "registry" or "logical names"
such that it could reasonably be implemented on most operating systems? I'm
not sure there is a good, portable abstraction that might be implemented on
most systems...

Could Ada invent its own "registry" and somehow store it in the executable
image so it didn't have to rely on the OS? It would likely be a problem for
things like embedded computers, but might be one of those "If an
implementation can and wishes to support it, this is how it looks..."
annexes.

MDC
--
Marin David Condic
Senior Software Engineer
Pace Micro Technology Americas    www.pacemicro.com
Enabling the digital revolution
e-Mail:    marin.condic@pacemicro.com


"Larry Kilgallen" <Kilgallen@SpamCop.net> wrote in message
news:H8BdSXe6G$Zd@eisner.encompasserve.org...
>
> But sometimes there will not be an answer, if you are expecting a
> disk location.  On VMS the program you are running might be on
> magnetic tape.





^ permalink raw reply	[flat|nested] 54+ messages in thread

end of thread, other threads:[~2002-04-29 15:52 UTC | newest]

Thread overview: 54+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-25 16:43 How to find directory where the program is? Beard, Frank [Contractor]
  -- strict thread matches above, loose matches on Subject: below --
2002-04-24  9:44 Grein, Christoph
2002-04-25 10:35 ` Thierry Lelegard
2002-04-25 19:30   ` Philippe Waroquiers
2002-04-25 22:57     ` Larry Kilgallen
2002-04-23 23:28 Beard, Frank [Contractor]
2002-04-24  0:49 ` Larry Kilgallen
2002-04-24  2:31   ` achrist
2002-04-24 10:29     ` Preben Randhol
2002-04-24 15:28       ` Darren New
2002-04-24 17:43         ` Preben Randhol
2002-04-24 18:33           ` Randy Brukardt
2002-04-24 21:00             ` Wes Groleau
2002-04-25 19:26               ` Randy Brukardt
2002-04-25  2:37             ` Steve Doiel
2002-04-25  7:26               ` Preben Randhol
2002-04-23 19:56 Beard, Frank [Contractor]
2002-04-23 22:41 ` Larry Kilgallen
2002-04-23 19:24 Beard, Frank [Contractor]
2002-04-23 18:28 Preben Randhol
2002-04-23 19:10 ` Florian Weimer
2002-04-23 19:37 ` Randy Brukardt
2002-04-23 20:53   ` Preben Randhol
2002-04-23 21:04 ` Joachim Schr�er
2002-04-24  8:35 ` Thierry Lelegard
2002-04-24  8:43 ` Jean-Pierre Rosen
2002-04-24 10:33   ` Preben Randhol
2002-04-24 11:43     ` Jean-Pierre Rosen
2002-04-24 14:44       ` Preben Randhol
2002-04-24 15:38 ` Hyman Rosen
2002-04-24 17:44   ` Preben Randhol
2002-04-24 23:08   ` Nick Roberts
2002-04-25  7:28     ` Preben Randhol
2002-04-25 14:18       ` Marin David Condic
2002-04-26 16:24         ` Stephen Leake
2002-04-26 20:41           ` achrist
2002-04-26 21:31           ` Larry Kilgallen
2002-04-29 15:38           ` Marin David Condic
2002-04-25 17:10       ` Sergey Koshcheyev
2002-04-25 21:11         ` Nick Roberts
2002-04-25 23:28           ` Sergey Koshcheyev
2002-04-26  5:57             ` Preben Randhol
2002-04-26 16:22           ` Stephen Leake
2002-04-26 17:13         ` Anders Gidenstam
2002-04-26 12:18       ` Jacob Sparre Andersen
2002-04-26 12:23         ` Preben Randhol
2002-04-26 12:48           ` David C. Hoos
2002-04-26 14:13             ` Preben Randhol
2002-04-27  8:18               ` Eric G. Miller
2002-04-26 13:09         ` Marin David Condic
2002-04-27 14:39           ` Larry Kilgallen
2002-04-27 21:12             ` Nick Roberts
2002-04-29 15:52             ` Marin David Condic
2002-04-24 17:44 ` Egil Harald Hoevik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox