Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!knuth!mjbtn!raider!elgamy!elg From: elg@elgamy.raidernet.com (Eric Lee Green) Newsgroups: comp.sys.amiga.programmer Subject: Re: Amiga Application Startup Code question Message-ID: <00677915228@elgamy.raidernet.com> Date: 26 Jun 91 04:47:08 GMT References: Organization: Eric's Amiga 2000 @ Home Lines: 23 From article , by eb15+@andrew.cmu.edu (Edward D. Berger): > I'm working on a tutorial to give my local usergroup members about writing > an 'Amiga-ized' application program. I will be using C as the language, and > have come across the following question. > > How do I 'runback' my program if the user starts from CLI with any arguments > other than "?", but echo the command template to the CLI if that is what > they obviously want. I have an example using SAS/C that if I link with cback.o > doesn't allow the command template to be given, but then leaves the cli window > 'stuck open' if I link with c.o instead. Look in the file "umain.c" in your SAS/C sources directory. It's opening the file "*" for stderr, i.e., opening the current console for output. So print your stuff to stderr, then, if you want to close the console, close stderr. At least, I think this may be what's whomping you. Most "C" startups seem to do things like this. -- Eric Lee Green (318) 984-1820 P.O. Box 92191 Lafayette, LA 70509 elg@elgamy.RAIDERNET.COM uunet!mjbtn!raider!elgamy!elg