Date: Mon, 20 Apr 1998 16:04:12 +0300 (IDT) From: Eli Zaretskii To: Andrew McLean cc: djgpp AT delorie DOT com Subject: Re: Separators wrong in argv[0] ? In-Reply-To: <353B0E64.2FDA4E81@hp.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Mon, 20 Apr 1998, 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 ? First, you need to decide whether this at all matters. Many people don't realize that DOS can handle file names with forward slashes as well as those with backslashes. So if you only need argv[0] to generate a file name which will then be used in some DOS call, you don't need to convert them at all. If you do need to have the DOS-style backslashified argv[0], set the _CRT0_FLAG_USE_DOS_SLASHES bit in the _crt0_startup_flags variable. This is described in detail in the libc docs, under _crt0_startup_flags.