Article View: comp.sys.amiga.tech
Article #6358Re: Tags - How do they work.
From: Peter Cherna
Date: Mon, 05 Nov 1990 15:32
Date: Mon, 05 Nov 1990 15:32
38 lines
1870 bytes
1870 bytes
In article <dillon.6960@overload.Berkeley.CA.US> dillon@overload.Berkeley.CA.US (Matthew Dillon) writes:
>
> It turns out that it is extremely easy to implement stack-based tags,
> as someone on BIX pointed out to me. Under 2.0, the Amiga.Lib already
> has routines to do this for some commands.... for example,
>
> OpenWindowTags() -stack based tags method, tags are
> individual arguments to the routine
>
> OpenWindowTagList() -pointer to array of tags method, you
> pass a pointer to the tags array.
Stubs will eventually be added to amiga.lib for DOS and ASL varargs
functions, too.
> One can easily implement one's own routine to convert a stack based
> tags list into an array pointer tags list using VAR ARGS. For
> example, the implementation of SystemTags() would be:
Here's a simpler way, that doesn't use ANSI-varargs but is perfectly
valid given the Amiga stack conventions:
#include <utility/tagitem.h>
LONG SystemTags( UBYTE *command, Tag firsttag, ...)
{
return( System( command, &firsttag ) );
}
> -Matt
Peter
--
Peter Cherna, Software Engineer, Commodore-Amiga, Inc.
{uunet|rutgers}!cbmvax!peter peter@cbmvax.cbm.commodore.com
My opinions do not necessarily represent the opinions of my employer.
"She read him like a book: she liked to peek at his end."
Technical Details
Message-ID:
<15599@cbmvax.commodore.com>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!sun-barr!rutgers!cbmvax!peterReferences:
<53246.657345554@atronx.UUCP> <15486@cbmvax.commodore.com> <dillon.6960@overload.Berkeley.CA.US>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!sun-barr!rutgers!cbmvax!peter From: peter@cbmvax.commodore.com (Peter Cherna) Newsgroups: comp.sys.amiga.tech Subject: Re: Tags - How do they work. Message-ID: <15599@cbmvax.commodore.com> Date: 5 Nov 90 15:32:25 GMT References: <53246.657345554@atronx.UUCP> <15486@cbmvax.commodore.com> <dillon.6960@overload.Berkeley.CA.US> Reply-To: peter@cbmvax.commodore.com (Peter Cherna) Organization: Commodore, West Chester, PA Lines: 38