[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
To use AutoOpts in your application:
myopts.h
)
and the option descriptor code (myopts.c
):
autogen -L $prefix/share/autogen myopts.def |
#include "myopts.h"
.
main( int argc, char** argv ) { { int arg_ct = optionProcess( &myprogOptions, argc, argv ); argc -= arg_ct; if ((argc < ARGC_MIN) || (argc > ARGC_MAX)) { fprintf( stderr, "%s ERROR: remaining args (%d) " "out of range\n", myprogOptions.pzProgName, argc ); USAGE( EXIT_FAILURE ); } argv += arg_ct; } if (HAVE_OPT(OPT_NAME)) respond_to_opt_name(); ... } |
myopts.o -L $prefix/lib -lopts |