XltCheckArgSize(3X)

NAME
XltCheckArgSize - Convienience macro for asserting that an ArgList is large enough.

SYNOPSIS
#include <Xlt/Xlt.h>

void XltCheckArgSize(a, n)
	Arg a[];
	Cardinal n;

DESCRIPTION
XltCheckArgSize simply asserts (using assert(3)) that a contains at least n elements. This macro will generally be used with arrays of Arg but it will work with any array (such as arrays of strings that you are about to pass to execvp(3) and execv(3)).

If you've ever debugged a stack corruption because you said "Arg a[3]" when you meant "Arg a[4]", you'll understand why you want to use this macro.

Note that the a parameter must be an array, a pointer will not work.

RETURN VALUE
None but it may cause abort(3) to be called.

SEE ALSO
XltGetValues(3X), XltSetValues(3X), assert(3).