www.delorie.com/archives/browse.cgi | search |
From: | Thomas Demmer <demmer AT LSTM DOT Ruhr-UNI-Bochum DOT De> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: Separators wrong in argv[0] ? |
Date: | Mon, 20 Apr 1998 14:51:06 +0200 |
Organization: | Lehrstuhl fuer Stroemungsmechanik |
Lines: | 37 |
Message-ID: | <353B44BA.325E82D9@LSTM.Ruhr-UNI-Bochum.De> |
References: | <353B0E64 DOT 2FDA4E81 AT hp DOT com> |
NNTP-Posting-Host: | bvb.lstm.ruhr-uni-bochum.de |
Mime-Version: | 1.0 |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Andrew McLean wrote: > > When I look at 'argv[0]', I expect to see the fully-qualified filename > of my executable. I do, but the separators are Unix-style > '/' instead of DOS-style '\'. > Is there a switch to correct this ? Hmm. I do not consider this being wrong. Most of the DOS innards give a damn about forward and backward slashes, the only brain dead program that really does is COMMAND.COM. The only thing that might get you in trouble are the first two slashes if it is started from a network and truename() returns a UNC: if(argv[0][0]=='/' && argv[0][1]=='/') argv[0][0]=argv[0][1]='\'; The only real bug here are the drive letters, but that's inside DOS ;-) -- Ciao Tom ************************************************************* * Thomas Demmer * * Lehrstuhl fuer Stroemungsmechanik * * Ruhr-Uni-Bochum * * Universitaetsstr. 150 * * D-44780 Bochum * * Tel: +49 234 700 6434 * * Fax: +49 234 709 4162 * * http://www.lstm.ruhr-uni-bochum.de/~demmer * *************************************************************
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |