BOOTSTRAP (kutils) functions


LIBRARY ROUTINE

kva_end - sets the end of the variable argument list

LIBRARY CALL

void kva_end(
   kva_list vararg_list)

INPUT

OUTPUT

RETURN VALUE

none

DESCRIPTION

This routine clears the "vararg_list" pointer and shuts down the variable argument access mechanism.

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_end is called, the "vararg_list" pointer is set to NULL

| byte0 int parameter p1 | : | byte4 int parameter p2 | : | byte8 double parameter pN | : | byte16 short parameter A | byte17 | byte18 int parameter B | byte19 | byte20 | byte21 | : | :

args stack address ----> NULL "vararg_list"

ADDITIONAL INFORMATION

none

EXAMPLES

none

SIDE EFFECTS

none

RESTRICTIONS

On some architectures, this routine is mapped to va_end(), which may or may not have any effect on the vararg_list pointer.

MODIFICATION

none

FILES

$BOOTSTRAP/include/kutils/kvarargs.h

SEE ALSO

kutils(3)

COPYRIGHT

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