[comp.sys.amiga.tech] Lattice's _tinymain

ja26612@uxa.cso.uiuc.edu (Pogo Joe) (08/06/90)

Hi.  I was wondering if anyone out there has successfully used _tinymain to 
replace _main to avoid opening a window on the workbench screen for stdin/out.
I tried the DEFINE _main=_tinymain in my BLINK command line, but it says
that _main is defined twice.  I got the information from page G32 in the man.
	Thanks,
	Jeff

-------------------------------------------------------------------------------
Jeff Axelrod                 | "If you chose not to decide, you still have made
                             |  a choice" -Neil Peart, Rush   /// 
ja26612@uxa.cso.uiuc.edu     |                              \XX/ AMIGAUSER
-------------------------------------------------------------------------------
 Neil Peart on USENET:  "Gee, what a wonderful way to waste your time."
 on the Rush maillist:  "Get a life."

rosenber@ra.abo.fi (Robin Rosenberg INF) (08/06/90)

>Hi.  I was wondering if anyone out there has successfully used _tinymain to   
>replace _main to avoid opening a window on the workbench screen for stdin/out.
>I tried the DEFINE _main=_tinymain in my BLINK command line, but it says      
>that _main is defined twice.  I got the information from page G32 in the man. 

Simply name the main function _main instead of main. Then link normally.

_main(char *argline)
{
	/* whatever */
}

------------
Robin

uzun@pnet01.cts.com (Roger Uzun) (08/06/90)

Because it is :
DEFINE __main=__tinymain

You need 2 underscores.
-Roger

UUCP: {hplabs!hp-sdd ucsd nosc}!crash!pnet01!uzun
ARPA: crash!pnet01!uzun@nosc.mil
INET: uzun@pnet01.cts.com

fgd3@jc3b21.UUCP (Fabbian G. Dufoe) (08/07/90)

From article <1990Aug5.233606.13160@ux1.cso.uiuc.edu>, by ja26612@uxa.cso.uiuc.edu (Pogo Joe):
> Hi.  I was wondering if anyone out there has successfully used _tinymain to 
> replace _main to avoid opening a window on the workbench screen for stdin/out.
> I tried the DEFINE _main=_tinymain in my BLINK command line, but it says
> that _main is defined twice.  I got the information from page G32 in the man.

It's a subtle difference, but you need to use double underscores:

     DEFINE __main=__tinymain

No, it isn't documented that way.  There's a typo in the manual.  I had to 
write Lattice about it.  My manual doesn't say anything about it on page G32.  
In my manual the erroneous documentation is on page L264.  I have version 5.05.

Another way to achieve the same result is to recompile main with the
preprocessor symbol "TINY" defined.  The source is in umain.c in the source
directory of disk 4 of your original distribution.

--Fabbian Dufoe
  350 Ling-A-Mor Terrace South
  St. Petersburg, Florida  33705
  813-823-2350

UUCP: fgd3@jc3b21.UUCP
      ...uunet!pdn!jc3b21!fgd3

walker@unx.sas.com (Doug Walker) (08/10/90)

In article <980@jc3b21.UUCP> fgd3@jc3b21.UUCP (Fabbian G. Dufoe) writes:
>It's a subtle difference, but you need to use double underscores:
>
>     DEFINE __main=__tinymain
>
>No, it isn't documented that way.  There's a typo in the manual.  I had to 

It isn't a typo - exactly.  The manual was typeset in a font in which the
underscores run together.  Therefore, it was rather difficult to catch the
problem in the drafts...


  *****                                 NOTE NEW BBS NUMBER (AGAIN):
=*|_o_o|\\=====Doug Walker, Software Distiller====== BBS: (919)460-7430 =
 *|. o.| ||
  | o  |//     For all you do, this bug's for you!
  ====== 
usenet: ...mcnc!rti!sas!walker   plink: dwalker  bix: djwalker