ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2011/12/04/15:00:35

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: Rugxulo <rugxulo AT gmail DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: argv[0]
Date: Sun, 4 Dec 2011 11:46:35 -0800 (PST)
Organization: http://groups.google.com
Lines: 21
Message-ID: <6719f201-2317-420d-bb38-3be66c90140b@q9g2000yqe.googlegroups.com>
References: <16b04d29-8317-4c7f-929c-1a22a328fa32 AT p9g2000vbb DOT googlegroups DOT com>
<jaueod$2t8$1 AT speranza DOT aioe DOT org> <9bf257a7-a0f8-43ba-a65f-36c6027f68cb AT r28g2000yqj DOT googlegroups DOT com>
<jb1ejh$hm8$1 AT speranza DOT aioe DOT org> <cc43d375-8e59-425d-a32e-b4ca200ae5cc AT 4g2000yqu DOT googlegroups DOT com>
<jbeegg$qp2$1 AT speranza DOT aioe DOT org> <dca06357-dc1d-4ede-aa9e-510e15e499b5 AT z17g2000vbe DOT googlegroups DOT com>
<dca6ea34-7cf2-4abe-afc3-8a1122602ed9 AT y12g2000vba DOT googlegroups DOT com>
NNTP-Posting-Host: 65.13.115.246
Mime-Version: 1.0
X-Trace: posting.google.com 1323027995 18084 127.0.0.1 (4 Dec 2011 19:46:35 GMT)
X-Complaints-To: groups-abuse AT google DOT com
NNTP-Posting-Date: Sun, 4 Dec 2011 19:46:35 +0000 (UTC)
Complaints-To: groups-abuse AT google DOT com
Injection-Info: q9g2000yqe.googlegroups.com; posting-host=65.13.115.246; posting-account=p5rsXQoAAAB8KPnVlgg9E_vlm2dvVhfO
User-Agent: G2/1.0
X-Google-Web-Client: true
X-Google-Header-Order: HNKRAUELSC
X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.16
(KHTML, like Gecko) Chrome/10.0.630.0 Safari/534.16,gzip(gfe)
Bytes: 2618
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id pB4K026d007828
Reply-To: djgpp AT delorie DOT com

Hi,

On Dec 4, 11:26 am, Georg <dos DOT  DOT  DOT  AT googlemail DOT com> wrote:
>
> Rayer may have pointed out correctly that this is all too complicated
> and could be replaced by reading the value in argv[0]. But I observed
> that when I start my code with "redir" argv[0] will not return the
> full path. Plus DJ Delorie's post made me uncertain whether I should
> use argv[0].

Well, if it's non-portable and unreliable on *nix, you might get some
hate mail for breaking that. (Not that they don't always do it to us,
of course.) On those systems, I believe they make it a compile-time
constant or use env. var. to point to config directory (which is what
I assume you're trying to do).

Nobody mentioned that the DJGPP stub lets you fake something else,
e.g. "gunzip.exe" can be a very small 2 kb .EXE file that runs "gzip -
d" (as long as in same directory). That's one complication. Another is
probably the loading of the DJGPP.ENV file (mostly used by GCC itself
but also?? by user programs, I suppose).

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019