Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site ewj01.UUCP
Path: utzoo!linus!philabs!cmcl2!harvard!bbnccv!ewj01!gst
From: gst@ewj01.UUCP (Gary S. Trujillo)
Newsgroups: net.micro.pc
Subject: Re: Pathnames in "C" compilers (Help!)
Message-ID: <193@ewj01.UUCP>
Date: Tue, 24-Sep-85 07:48:59 EDT
Article-I.D.: ewj01.193
Posted: Tue Sep 24 07:48:59 1985
Date-Received: Tue, 1-Oct-85 08:16:14 EDT
References: <450@philabs.UUCP> <103700016@ima.UUCP> <1332@teddy.UUCP>
Organization: East West Journal, Brookline, Mass.
Lines: 44

> >> I am unable to open files using a directory search with either the
> >> Mark Williams or Lattice "C" compilers. ...
> >
> >Try opening "c:\\usr\\text\\things.txt".  Remember, this is C and \t
> >turns into a tab character.
> 
> Alternatively, try opening "c:/usr/text/things.txt".  MSDOS itself understands
> '/' as a directory seperator just as well as '\\'.  Too bad microsoft opted to
> use '/' as the option introducer character for command line parsing.  On the
> other hand, Thank goodness microsoft left the back door open and allows me to
> change the option character to '-'.  At least in MSDOS 2.XX.

The following article, from the January 1985 issue of the Boston Computer
Society's "PC Report" appears relevant in this context:

	Several articles have pointed out that DOS 2.x provides the
	capability, not documented in the manual, to replace the
	default switch character "/" with a character of the users's
	own choosing.  For example, if you would prefer to enter
	commands that look like "DIR!W" instead of "DIR/W", you need
	only create or revise a CONFIG.SYS file that includes the
	line, "SWITCHAR=!", and then boot your computer with the
	CONFIG.SYS file on the disk in the default drive.  (It must
	be in the root directory if the disk includes
	subdirectories.)  Moreover, if you specify a hyphen as the
	switch character ("SWITCHAR=-"), DOS assumes you want your
	keyboard and monitor to feel like UNIX, and helpfully
	changes the path separator from "\" to "/".

	These features appeared very attractive to one writer until
	he discovered that BACKUPed files couldn't be RESTOREd.
	Goodbye backups.  No other problems reported.  Since you use
	undocumented features at your own risk, take care.  There
	may be a good reason a feature is undocumented.
	
From the comments cited above from <1332@teddy.UUCP>, it would appear that
the SWITCHAR variable need not be changed in order to be able to use "/"
as pathname component separators from a C program, but only to permit one
to use slashes in pathnames at MS-DOS command level.
-- 

	Gary S. Trujillo

	...!{harvard,seismo,ihnp4,talcott,wjh12,decvax}!bbnccv!ewj01!gst