1*40865Sbostic /*- 2*40865Sbostic * Copyright (c) 1979 The Regents of the University of California. 3*40865Sbostic * All rights reserved. 4*40865Sbostic * 5*40865Sbostic * %sccs.include.redist.c% 6*40865Sbostic */ 71659Smckusick 8*40865Sbostic #ifndef lint 9*40865Sbostic static char sccsid[] = "@(#)INCT.c 1.3 (Berkeley) 04/09/90"; 10*40865Sbostic #endif /* not lint */ 111659Smckusick 121659Smckusick #include "h00vars.h" 131659Smckusick 143008Smckusic bool 151659Smckusick INCT(element, paircnt, singcnt, data) 161659Smckusick 173008Smckusic register long element; /* element to find */ 183008Smckusic long paircnt; /* number of pairs to check */ 193008Smckusic long singcnt; /* number of singles to check */ 203008Smckusic long data; /* paircnt plus singcnt bounds */ 211659Smckusick { 223008Smckusic register long *dataptr = &data; 231659Smckusick register int cnt; 241659Smckusick 251659Smckusick for (cnt = 0; cnt < paircnt; cnt++) { 261659Smckusick if (element > *dataptr++) { 271659Smckusick dataptr++; 281659Smckusick continue; 291659Smckusick } 301659Smckusick if (element >= *dataptr++) { 311659Smckusick return TRUE; 321659Smckusick } 331659Smckusick } 341659Smckusick for (cnt = 0; cnt < singcnt; cnt++) { 351659Smckusick if (element == *dataptr++) { 361659Smckusick return TRUE; 371659Smckusick } 381659Smckusick } 391659Smckusick return FALSE; 401659Smckusick } 41