Xref: utzoo comp.sys.amiga:21689 comp.sys.amiga.tech:1465 Path: utzoo!utgpu!water!watmath!clyde!bellcore!rutgers!cmcl2!nrl-cmf!ames!pasteur!agate!labrea!decwrl!sun!quintus!pds From: pds@quintus.uucp (Peter Schachte) Newsgroups: comp.sys.amiga,comp.sys.amiga.tech Subject: Re: Astartup.obj and Lstartup.obj Keywords: Workbench window Message-ID: <270@quintus.UUCP> Date: 10 Aug 88 21:24:08 GMT References: <6562@bloom-beacon.MIT.EDU> <63284@sun.uucp> <118@antares.UUCP> <63562@sun.uucp> Sender: news@quintus.UUCP Reply-To: pds@quintus.UUCP (Peter Schachte) Organization: Quintus Computer Systems, Inc. Lines: 24 In article <63562@sun.uucp> cmcmanis@sun.UUCP (Chuck McManis) writes: >In article <118@antares.UUCP> jms@antares.UUCP (joe smith) writes: >> ...In particular, if a program did not execute a printf call, >>no window was openned. Would this be possible to do on the Amiga? > >In the startup module one puts some "illegal but >unique" value into the StdIn and StdOut file handles. Then one rewrites >the stdio library routines to check for this value before using the handles. >If they are this illegal value, then the routine calls the "build a window >and fix up these two handles" routine. On exit, if the handles have legal >values in them they are Closed(). Couldn't this also be handled by building a device, call it MAYBE:, that, when opened, does nothing, but when first written to, opens up a CON: window? And, of course, when MAYBE: was closed, the CON: window would be closed, if it existed. The startup code would be rewritten to open MAYBE: instead of CON: for a workbench startup. This has the advantage that the stdio stuff wouldn't have to be touched, and so I/O to files wouldn't be slowed down by checking the file handle for the special value. It also has the advantage of working for either C compiler, or even (gasp!) another language. -Peter Schachte pds@quintus.uucp ..!sun!quintus!pds