Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!bu-cs!dartvax!eleazar.dartmouth.edu!earleh From: earleh@eleazar.dartmouth.edu (Earle R. Horton) Newsgroups: comp.sys.mac.programmer Subject: Re: stdin and stdout in MPW C 3.0 Keywords: stdin, stdout, MPW 3.0 Message-ID: <16063@dartvax.Dartmouth.EDU> Date: 12 Oct 89 01:47:18 GMT References: <501@dftsrv.gsfc.nasa.gov> <16055@dartvax.Dartmouth.EDU> <502@dftsrv.gsfc.nasa.gov> Sender: news@dartvax.Dartmouth.EDU Reply-To: earleh@eleazar.dartmouth.edu (Earle R. Horton) Organization: Thayer School of Engineering Lines: 34 In article <502@dftsrv.gsfc.nasa.gov> seiler@chrpserv.gsfc.nasa.gov (Ed Seiler) writes: >Actually, it's not so much a desire to be rid of stdio that I'm concerned >about, but rather why the documentation doesn't mention, right in the >beginning of the section about the stdio routines where it belongs, something >such as "The C stdio routines are provided for the development of MPW tools. >Developers who wish to perform I/O to a console should use toolbox routines >(or get a hold of WriteInWindow)". It seems that the documentation assumes >the MPW C developer already knows such minutiae. You don't expect them to say that if you use this product to link a normal program (i.e. application) then printf() won't work, do you? Somebody might get the impression that MPW is rough around the edges or incomplete. :) Apple seems to have something against programs which use a command line interface, and perhaps they just cannot imagine why someone would want to write such a thing. >Is WriteInWindow a product available from APDA? Can the redirection of stdin >and stdout to a window be described briefly? WritelnWindow is part of MacApp, but it appears separately on "Phil and Dave's Excellent CD" along with a number of other goodies. It's in Pascal, and it comes with a warning that it is intended strictly for private debugging of non-shipping application code. No way are these folks going to help you to create a command-line interface, at least not on purpose. Looking at the Pascal code, I see that it would not be too hard to deduce from it how to write and install a C device handler to associate a window with stdin and stdout. Of course, if you did so the User Interface Thought Police would probably be all over you like stink on fecal matter. Earle R. Horton