#include #include #include #include "minerals.h" #include "definitions.h" int do_search(int *argtypep , ... ) { static int index = 0; char *searchstring; char *field; va_list ap; int argtype; va_start(ap, argtypep); searchstring = va_arg(ap, char); while( (argtype = *argtypep++) != 0) { switch(argtype) { case MINERAL: field = va_arg(ap, char); while (strstr(field.Name[index],field) != 0) index++; return (index); } } }