Path: utzoo!attcan!uunet!husc6!cs.utexas.edu!ut-sally!nather
From: nather@ut-sally.UUCP (Ed Nather)
Newsgroups: comp.sys.ibm.pc
Subject: Re: using "/" in pathnames
Summary: amplification ...
Message-ID: <11877@ut-sally.UUCP>
Date: 1 Jun 88 15:22:09 GMT
References: <1238@bingvaxu.cc.binghamton.edu> <460@mks.UUCP>
Organization: U. Texas CS Dept., Austin, Texas
Lines: 50

In article <460@mks.UUCP>, wheels@mks.UUCP (Gerry Wheeler) writes:
> 
> MKS includes such a program in the MKS Toolkit.  Changing the switch
> character to '-' (or anything other than '/') can have unexpected side
> effects, though.
> For example:
> 
> Note that the code in Microsoft's C Compiler's system() function
> exhibits this behaviour.  Since they wrote both the OS and the compiler,
> you'd think they'd write code that checked for this. 
> 

But they didn't.  However, Tony Movshon wrote a sane version of system() that
checks, and it solves the problem entirely.  He posted it a long time ago, so
it's probably in the net.sources.pc archives, wherever *they* are.  I can
re-post it (or mail it) if there is any interest.  I use it all the time.

> 2) As a side side effect, once users start using '/' in path names,
> they use them everywhere, including environment variables. This is
> to be expected. However, some programs, like Microsoft C, won't
> correctly read variables that contain '/'. They will only accept
> '\' in path names.

Actually, I've found that the MSC compiler-linker system will accept 
"/" in environment pathnames for everything except the path to "lib" -- 
apparently whoever wrote the linker didn't bother the check. (Also true 
of "tlink," Borland's linker.

> 3) As of version 3.2 (I think) of DOS, you may not use '/' in
> config.sys.  Prior to that, you could use either slash.  How much code
> did they have to add to ensure you used only one kind?
> 
In most programs it involves 2 assembly-language instructions to check. I
use 3.1 and can use "/" in config.sys; I was astounded to learn I couldn't
use it in 3.2.

> However, in general, if you are looking for a more Unix-like interface,
> this is probably the first thing you'll want to change. Most programs
> work fine. Just remember to keep yours eyes open for the oddballs.

Several programs have been posted that allow the DOS variable SWITCHAR to be
displayed or changed.  When all else fails you can use it.  I've managed to
live using "/" in pathnames for several years, but it has been, at best, an
uneasy truce.

-- 
Ed Nather
Astronomy Dept, U of Texas @ Austin
{allegra,ihnp4}!{noao,ut-sally}!utastro!nather
nather@astro.AS.UTEXAS.EDU