[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

7.4.17 STACKCT_OPT( <NAME> ) - Stacked Arg Count

When the option handling attribute is specified as stack_arg, this macro may be used to determine how many of them actually got stacked.

Do not use this on options that have not been stacked or has not been specified (the stack_arg attribute must have been specified, and HAVE_OPT(<NAME>) must yield TRUE). Otherwise, you will likely seg fault.

 
if (HAVE_OPT( NAME )) {
    int     ct = STACKCT_OPT(  NAME );
    char**  pp = STACKLST_OPT( NAME );

    do  {
        char* p = *pp++;
        do-things-with-p;
    } while (--ct > 0);
}



This document was generated by Bruce Korb on May 5, 2003 using texi2html

Viewable With Any Browser   AutoGen Home