FreeBSD/contrib/openpam/bin/pamtest/pamtest.c
/*
 * Handle an option that takes an int argument and can be used only once
 */
Handle an option that takes an int argument and can be used only once
Handle an option that takes an int argument and can be used only once
static void
opt_num_once(int opt, long *num, const char *arg)
{
	char *end;
	long l;
	l = strtol(arg, &end, 0);
	if (end == optarg || *end != '\0') {
		fprintf(stderr,
		    "The -%c option expects a numeric argument\n", opt);
		usage();
	}
	*num = l;
}
static void opt_num_once ( int opt , long * num , const char * arg ) { char * end ; long l ; l = strtol ( arg , & end , 0 ) ; if ( end == optarg || * end != ' \0 ' ) { fprintf ( stderr , " \n " , opt ) ; usage ( ) ; } * num = l ; }
Handle an option that takes an int argument and can be used only once
Handle an option that takes an int argument and can be used only once