| delorie.com/archives/browse.cgi | search |
| X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f |
| From: | Georg <dosusb AT googlemail DOT com> |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: argv[0] |
| Date: | Tue, 6 Dec 2011 04:17:21 -0800 (PST) |
| Organization: | http://groups.google.com |
| Lines: | 16 |
| Message-ID: | <21af264d-bd9d-40e8-ad61-e16e2836ad52@20g2000yqa.googlegroups.com> |
| References: | <16b04d29-8317-4c7f-929c-1a22a328fa32 AT p9g2000vbb 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> | |
| <6719f201-2317-420d-bb38-3be66c90140b AT q9g2000yqe DOT googlegroups DOT com> | |
| <5059ad16-7787-49ef-8fb3-d9c21919a65b AT d10g2000vbf DOT googlegroups DOT com> | |
| <20af6883-aa05-4549-b820-ca0f7c80708d AT ca1g2000vbb DOT googlegroups DOT com> | |
| <jbi5qv$vv5$1 AT speranza DOT aioe DOT org> <c305cbce-aed4-42db-ab16-d1ffd143177a AT p9g2000vbb DOT googlegroups DOT com> | |
| NNTP-Posting-Host: | 217.91.63.120 |
| Mime-Version: | 1.0 |
| X-Trace: | posting.google.com 1323173842 23169 127.0.0.1 (6 Dec 2011 12:17:22 GMT) |
| X-Complaints-To: | groups-abuse AT google DOT com |
| NNTP-Posting-Date: | Tue, 6 Dec 2011 12:17:22 +0000 (UTC) |
| Complaints-To: | groups-abuse AT google DOT com |
| Injection-Info: | 20g2000yqa.googlegroups.com; posting-host=217.91.63.120; posting-account=v5xbdQoAAAAOGc9Ccc-kLZyobvPlN3Qr |
| User-Agent: | G2/1.0 |
| X-Google-Web-Client: | true |
| X-Google-Header-Order: | HUALESNKRC |
| X-HTTP-UserAgent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20100101 Firefox/8.0,gzip(gfe) |
| Bytes: | 2284 |
| 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 pB6CU2s8010977 |
| Reply-To: | djgpp AT delorie DOT com |
The absolute path name in the environment is available in MS-DOS, FreeDOS and a XP DOS box, but probably not on all DOS clones. >ENV:187 Program:MCBTRACEÍ ÿŸ I called my program MCB - therefore I did not see this problem. DOS allows for 8 bytes in the MCB and if the program name is shorter it will add a NUL, not so if the program name is 8 bytes already. Therefore my code will print up to the next NUL after the program name. I see no drive letter in the path - why does it start with MARTIN? Are you running from a network drive? What is the output of argv[0] in this case? Georg
| webmaster | delorie software privacy |
| Copyright 2019 by DJ Delorie | Updated Jul 2019 |