xref: /netbsd-src/external/bsd/ipf/dist/lib/findword.c (revision 13885a665959c62f13a82b3caedf986eaa17aa31)
1 /*	$NetBSD: findword.c,v 1.2 2012/07/22 14:27:36 darrenr Exp $	*/
2 
3 /*
4  * Copyright (C) 2012 by Darren Reed.
5  *
6  * See the IPFILTER.LICENCE file for details on licencing.
7  *
8  * Id: findword.c,v 1.1.1.2 2012/07/22 13:44:38 darrenr Exp $
9  */
10 
11 #include "ipf.h"
12 
13 
findword(words,name)14 wordtab_t *findword(words, name)
15 	wordtab_t *words;
16 	char *name;
17 {
18 	wordtab_t *w;
19 
20 	for (w = words; w->w_word != NULL; w++)
21 		if (!strcmp(name, w->w_word))
22 			break;
23 	if (w->w_word == NULL)
24 		return NULL;
25 
26 	return w;
27 }
28