Re: Help needed understanding some code

2004-12-23 Thread Andreas Vox
Angus, Georg and Angus wrote: >> Surely, argv[0] is by definition either an absolute path or is relative >> to CWD. The shell expands everything else. No? > > I am not sure. Maybe there are some weird shells or OSes that behave > differently? Then points 1. and 2. make sense. Or the author of it

Re: Help needed understanding some code

2004-12-23 Thread Jean-Marc Lasgouttes
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: Angus> Indeed, that would make sense. However, this code is from Angus> os_unix.C. It makes no sense at all for a unix shell, does it? Go for the simpler version. JMarc

Re: Help needed understanding some code

2004-12-23 Thread Angus Leeming
Georg Baum wrote: > BTW, while you are at it: Could you change the code so that calling > lyx-qt, lyx-xforms etc. directly works? It is rather annoying that we > install these executables in prefix/bin but they must be called via a > symlink named 'lyx'. Then we could split the rpm package into lyx

Re: Help needed understanding some code

2004-12-23 Thread Georg Baum
Angus Leeming wrote: > Georg Baum wrote: >>> Surely, argv[0] is by definition either an absolute path or is relative >>> to CWD. The shell expands everything else. No? >> >> I am not sure. Maybe there are some weird shells or OSes that behave >> differently? Then points 1. and 2. make sense. Or t

Re: Help needed understanding some code

2004-12-23 Thread Angus Leeming
Georg Baum wrote: >> To be specific, I don't see why >> 1. ExpandPath is needed at all. >> 2. What the thing inside the if block is meant to be achieving. >> 3. What the idea behind removing "/.libs/" is all about. Surely, the LyX >> executable is to be found at build_dir/src/lyx if it's being run

Re: Help needed understanding some code

2004-12-22 Thread Georg Baum
Angus Leeming wrote: > To be specific, I don't see why > 1. ExpandPath is needed at all. > 2. What the thing inside the if block is meant to be achieving. > 3. What the idea behind removing "/.libs/" is all about. Surely, the LyX > executable is to be found at build_dir/src/lyx if it's being run i

Help needed understanding some code

2004-12-22 Thread Angus Leeming
I'm trying to understand why all this is needed to ascertain the full path to argv[0], passed to LyX from the command line. string arg0 = internal_path(argv[0]); // Expand "./" and "~/" string expanded_arg0 = ExpandPath(arg0); if (!os::is_absolute_path(expanded_arg0)) { //