xref: /freebsd/sbin/ipf/libipf/findword.c (revision 963f5dc7a30624e95d72fb7f87b8892651164e46)
1 /*
2  * Copyright (C) 2012 by Darren Reed.
3  *
4  * See the IPFILTER.LICENCE file for details on licencing.
5  *
6  * $Id: findword.c,v 1.3.4.1 2012/07/22 08:04:24 darren_r Exp $
7  */
8 
9 #include "ipf.h"
10 
11 
12 wordtab_t *findword(words, name)
13 	wordtab_t *words;
14 	char *name;
15 {
16 	wordtab_t *w;
17 
18 	for (w = words; w->w_word != NULL; w++)
19 		if (!strcmp(name, w->w_word))
20 			break;
21 	if (w->w_word == NULL)
22 		return NULL;
23 
24 	return w;
25 }
26