Xref: utzoo comp.sys.amiga:42360 comp.sys.amiga.tech:7797 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!shadooby!ginosko!cs.utexas.edu!uunet!munnari.oz.au!bruce!goanna!phi From: phi@goanna.oz (Philip Hingston) Newsgroups: comp.sys.amiga,comp.sys.amiga.tech Subject: Re: Lattice 5.02 Summary: Startup without window Keywords: Eric Message-ID: <2510@goanna.oz> Date: 24 Oct 89 23:37:22 GMT References: <217@masalla.fulcrum.bt.co.uk> Followup-To: comp.sys.amiga Organization: Comp Sci, RMIT, Melbourne, Australia Lines: 25 In article <217@masalla.fulcrum.bt.co.uk>, sie@fulcrum.bt.co.uk (Simon Raybould) writes: > When a tool compiled with Lattice C 5.02 is executed from workbench, > It automatically opens an output window. The program then opens a > window with gadgets, menus e.t.c. > If you don't need standard input/output, command line parsing etc, call your main program _main() rather than main(). This will override the provided _main() which does startup stuff (including opening the window) and then calls your main(). _main() takes a single argument, a pointer to a string containing the command line if started from CLI. (You can tell whether you were started from workbench by examining a structure which is set up for you --- forget the exact name and type, think it's WBenchMsg.) If you do need some of the startup stuff, then you can edit and recompile the source. Think the standard startup is called c.o, with source c.a. Lattice also provided other flavours of startup for load-and-stay-resident code etc. Have fun. phi -- Philip Hingston, Computer Science,ACSnet: phi@goanna.cs.rmit.oz R.M.I.T. ARPA: phi%goanna.cs.rmit.oz.au@uunet.uu.net GPO BOX 2476 V, CSNET: phi%goanna.cs.rmit.oz.au@australia Melbourne, 3001, AUSTRALIA UUCP: ...!uunet!goanna.cs.rmit.oz.au!phi