On Tue, 31 Oct 2000 [EMAIL PROTECTED] wrote:
> >While I think there'll be a tendency to design a
> >camel here (one person just wants support for binary data, another
> >wants standard access to engine internals like the SC toolbox, while
> >a third wants to build a whole plug-in architecture), starting out
> >with some pie-in-the-sky ideas doesn't seem like a bad idea to me.
> >Let's hear 'em.
> Just to start, with binary data how about instead of passing arguments in
> a character array with the number of arguments it just passes a structure
> which would be defined as follows.
>
> struct externalparameter
> {
> unsigned char *string;
> externalparameter *next;
> int length;
> };
>
> Next if not null would point to the next argument.
> String would contain a null terminated or non null terminated string.
> Length would specify the size of the string.
The only other thing I thought of was to use a varargs-type parameter
list (i.e., pointer to an array with the number of elements passed as
a separate parameter) but instead of passing a null-terminated string,
you pass something like a pascal string except that the count would be
stored as a 4-byte integer instead of as single byte. Saves a few
mallocs (which is always good), but does require some casting (which
isn't).
> Data could be returned using the same structure.
So who'd be responsible for deleting these beasties?
Scott
> Tuviah
>
********************************************************
Scott Raney [EMAIL PROTECTED] http://www.metacard.com
MetaCard: You know, there's an easier way to do that...