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