/* argvindex - Find string s on NULL terminated argv style list argvlist */ #include "local.h" #include <string.h> int argvindex(argvlist, s, strfunc) char *argvlist[]; char *s; int (*strfunc)(); { int index; for(index = 0; argvlist[index] != NULL; index++ ) { if ( (strfunc)(argvlist[index], s, strlen(argvlist[index])) == 0) break; } return(index); }