00001 // This program is free software; you can redistribute it and/or modify 00002 // it under the terms of the GNU General Public License as published by 00003 // the Free Software Foundation; either version 2 of the License, or 00004 // (at your option) any later version. 00005 // 00006 // This program is distributed in the hope that it will be useful, 00007 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00008 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00009 // GNU Library General Public License for more details. 00010 // 00011 // You should have received a copy of the GNU General Public License 00012 // along with this program; if not, write to the Free Software 00013 // Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301, USA 00014 00015 int isInSet(int val,int set[],int nelems){ 00016 int ix; 00017 for(ix=0;ix<nelems;ix++){ 00018 if ( val == set[ix] ) 00019 return 1; 00020 } 00021 return 0; 00022 }