BOOTSTRAP (kutils) functions


LIBRARY ROUTINE

kva_start - sets the start of the variable argument list

LIBRARY CALL

void kva_start(
   kva_list vararg_list,
   last_param)

INPUT

OUTPUT

RETURN VALUE

none

DESCRIPTION

This routine sets the "vararg_list" pointer to the start of the variable argument list.

Example variable argument routine definition:

var_arg_routine(int p1, int p2, double pN, kva_alist) { short var; // the next parameter after pN // is expected to be short kva_list *vararg_list; // the variable argument list

kva_start(vararg_list, pN); // pN is the last parameter // before variable args begin : var = kva_arg(vararg_list, short); : kva_end(vararg_list); }

The execution stack when procedure var_arg_routine is executed; when kva_start is called, the "vararg_list" pointer is set to the address indicated below.

| byte0 int parameter p1 | : | byte4 int parameter p2 | : | byte8 double parameter pN | : args stack address ---->| byte16 short parameter A "vararg_list" | byte17 | byte18 int parameter B | byte19 | byte20 | byte21 | :

ADDITIONAL INFORMATION

none

EXAMPLES

none

SIDE EFFECTS

none

RESTRICTIONS

none

MODIFICATION

none

FILES

$BOOTSTRAP/include/kutils/kvarargs.h

SEE ALSO

kutils(3)

COPYRIGHT

Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.