1 $NetBSD: patch-an,v 1.1 2002/02/27 21:37:41 martin Exp $
3 --- getlopt.c.orig Tue Dec 8 10:41:11 1998
4 +++ getlopt.c Wed Feb 27 22:29:57 2002
7 if (!(opt->flags & 1)) { /* doesn't take argument */
9 - if (opt->flags & 2) /* var is *char */
10 + if (opt->flags & GLO_CHAR) /* var is *char */
11 *((char *) opt->var) = (char) opt->value;
13 + else if (opt->flags & GLO_LONG) /* var is *long */
14 *((long *) opt->var) = opt->value;
15 + else /* var is *int */
16 + *((int *) opt->var) = opt->value;
19 result = opt->value ? opt->value : opt->sname;