Path: utzoo!utgpu!watmath!mks!alex From: alex@mks.UUCP (Alex White) Newsgroups: comp.sys.ibm.pc Subject: Re: Can't get DOS to see new SWITCHAR Summary: Its there, just not used Message-ID: <762@mks.UUCP> Date: 12 Apr 89 13:30:08 GMT References: <1738@leah.Albany.Edu> <2068@bingvaxu.cc.binghamton.edu> Distribution: na Organization: Mortice Kern Systems, Waterloo, Ont. Lines: 42 In article , nelson@sun.soe.clarkson.edu (Russ Nelson) writes: > In article <2068@bingvaxu.cc.binghamton.edu> sullivan@phyllis.math.binghamton.edu (fred sullivan) writes: > > I recall reading that switchar has disappeared in BS/2 and I suspect it > has in DOS 4.1. Remember that this is NOT an official MS interrupt. > > Again, I repeat my offer of a photocopied page, out of the Zenith Programmer's > Utility Package documenting switchar, to anyone who sends me a SASE. There > are two copyrights on the PUP -- Zenith's and Microsoft's. > > Switchar is official! The switchar system call is still there. Its a case of Microsoft gradually trying to eliminate it. In dos 2, switchar could be set in the config.sys file. In dos 3, that went away, but the system call was still there. In dos 4, the system call is still there, but all the system programs no longer make the system call but have the switchar hardwired as /. Remember, the system call is really only an advisory. Dos is storing one character internally, setswitchar() saves it, and getswitchar() tells you what it is. Dos itself couldn't care less. Its only application programs that want to parse command lines that care; they can, if they want, ask what the switch character is, and parse their lines appropriately. The MKS Toolkit routines, for example have dash (-) hardwired into them for command line parsing. Application programs at random know or don't know about the switch character. Dos 4 is a true botch, because the switch character was indeed, as this person pointed out, documented at one time. Thus, programs have been written to use it; if for example they called command.com with the /c option based on the system call, under Dos 4 they may no longer work. The only solution is not to use the switch character call, so that such programs always use /c. Then buy the Toolkit which doesn't care :-). As a side effect, if the switch character isn't a slash (/), then the command line doesn't parse slashes, so filenames can have slashes. The DOS kernel has since Dos 2, accepted either slash (/) or backslash (\) in file names. And this, Microsoft isn't about to change. Actually, I seem to recall seeing it documented in their C manuals, for how to use #include in a portable manner with Xenix. As in they actually tell you to do something like #include rather than #include