Path: utzoo!attcan!uunet!dasys1!tneff From: tneff@dasys1.UUCP (Tom Neff) Newsgroups: comp.sys.ibm.pc Subject: Re: MKS Toolkit Question Keywords: MKS with MSC Message-ID: <7673@dasys1.UUCP> Date: 14 Nov 88 23:18:46 GMT References: <4994@whuts.UUCP> <7501@dasys1.UUCP> <546@mks.UUCP> <6139@netnews.upenn.edu> Reply-To: tneff@dasys1.UUCP (Tom Neff) Organization: Independent Users Guild Lines: 27 In article <6139@netnews.upenn.edu> jes@eniac.seas.upenn.edu.UUCP (Joe Smith) writes: -In article <546@mks.UUCP> wheels@mks.UUCP (Gerry Wheeler) writes: ->Microsoft's own system() library function fails on this count. If you ->write a program in Microsoft C using the system() call, it calls ->command.com with the "/c" option without checking the current switch ->character. - -But there is a fix for this of course. - -Extract the system.obj from the library. -Use debug to patch the object file, change to /c to a -c -which command.com will accept (actually require under DOS 3.1) -and then replace the system() library function with the patched version. - -Then you have a functional system() with a -c. And ONLY with -c, which is just as bad as the original. What you want is to be able to run with either switch character. If you are developing your own code, you can write a front end for system() if you want, that saves the current switch character and temporarily sets it to '/' before falling thru to system(), then restores the prior value on return. -- Tom Neff UUCP: ...!cmcl2!phri!dasys1!tneff "None of your toys CIS: 76556,2536 MCI: TNEFF will function..." GEnie: TOMNEFF BIX: t.neff (no kidding)