Lines Matching defs:option
1 /* $NetBSD: option.c,v 1.29 2021/08/09 20:49:10 andvar Exp $ */
38 static char sccsid[] = "from: @(#)option.c 8.2 (Berkeley) 4/16/94";
40 __RCSID("$NetBSD: option.c,v 1.29 2021/08/09 20:49:10 andvar Exp $");
56 static OPTION *option(char *);
59 static OPTION const options[] = {
161 OPTION *p;
169 if ((p = option(opt)) == NULL)
170 errx(1, "%s: unknown option", opt);
181 static OPTION *
182 option(char *name)
184 OPTION tmp;
187 return ((OPTION *)bsearch(&tmp, options,
188 sizeof(options)/sizeof(OPTION), sizeof(OPTION), typecompare));
195 return (strcmp(((const OPTION *)a)->name, ((const OPTION *)b)->name));