[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
To use AutoOpts in your application where you do not have to worry about distribution issues, your issues are simple and few.
myopts.h
)
and the option descriptor code (myopts.c
):
autogen myopts.def |
#include "myopts.h"
.
#define ARGC_MIN some-lower-limit #define ARGC_MAX some-upper-limit 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(OPTN_NAME)) respond_to_optn_name(); ... } |
myopts.c -I$prefix/include -L $prefix/lib -lopts |
These values can be derived from the "autoopts-config" script:
myopts.c `autoopts-config cflags` `autoopts-config ldflags` |
This document was generated by Bruce Korb on September, 30 2006 using texi2html 1.76.