#define getopt_long( a, b, c, d, e ) getopt( a, b, c )
static struct option m_option[]=
{
{"hello",1,NULL,'s'},
{"h78lo",1,NULL,'p'},
{"helo",2,NULL,'e'},
{"he12o",0,NULL,'g'},
{"hello",0,NULL,'x'},
{"hel5o",0,NULL,'c'},
{"hello",0,NULL,'b'},
{"hel23o",1,NULL,'q'},
{"hell6",1,NULL,'b'},
{NULL,0,NULL,0}
};
print_help()
{
/// none
}
int main(int argc,char *argv[])
{
int option;
option = getopt_long( argc, argv, "s:p:e:g:gcbqb",m_options, NULL );
if( argc - optind == 0 )
{
print_help();
return( 1 );
}
} |