runetype.c revision 2d08521bd15501c8370ba2153b9cca4f094979d0
0b5de56d26c0148ad33bb3a9201091502f24d910gjelinek * Copyright 2013 Garrett D'Amore <garrett@damore.org>
0b5de56d26c0148ad33bb3a9201091502f24d910gjelinek * Copyright 2010 Nexenta Systems, Inc. All rights reserved.
0b5de56d26c0148ad33bb3a9201091502f24d910gjelinek * Copyright (c) 1993
0b5de56d26c0148ad33bb3a9201091502f24d910gjelinek * The Regents of the University of California. All rights reserved.
0b5de56d26c0148ad33bb3a9201091502f24d910gjelinek * This code is derived from software contributed to Berkeley by
0b5de56d26c0148ad33bb3a9201091502f24d910gjelinek * Paul Borman at Krystal Technologies.
0b5de56d26c0148ad33bb3a9201091502f24d910gjelinek * Redistribution and use in source and binary forms, with or without
0b5de56d26c0148ad33bb3a9201091502f24d910gjelinek * modification, are permitted provided that the following conditions
0b5de56d26c0148ad33bb3a9201091502f24d910gjelinek * 1. Redistributions of source code must retain the above copyright
0b5de56d26c0148ad33bb3a9201091502f24d910gjelinek * notice, this list of conditions and the following disclaimer.
0b5de56d26c0148ad33bb3a9201091502f24d910gjelinek * 2. Redistributions in binary form must reproduce the above copyright
0b5de56d26c0148ad33bb3a9201091502f24d910gjelinek * notice, this list of conditions and the following disclaimer in the
0b5de56d26c0148ad33bb3a9201091502f24d910gjelinek * documentation and/or other materials provided with the distribution.
0b5de56d26c0148ad33bb3a9201091502f24d910gjelinek * 4. Neither the name of the University nor the names of its contributors
0b5de56d26c0148ad33bb3a9201091502f24d910gjelinek * may be used to endorse or promote products derived from this software
0b5de56d26c0148ad33bb3a9201091502f24d910gjelinek * without specific prior written permission.
0b5de56d26c0148ad33bb3a9201091502f24d910gjelinek * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
2b6c28b8b605a28e1a671f5d6b484cd697e51da6batschul * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
0b5de56d26c0148ad33bb3a9201091502f24d910gjelinek * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
0b5de56d26c0148ad33bb3a9201091502f24d910gjelinek * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
0b5de56d26c0148ad33bb3a9201091502f24d910gjelinek * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
0b5de56d26c0148ad33bb3a9201091502f24d910gjelinek * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
0b5de56d26c0148ad33bb3a9201091502f24d910gjelinek * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
0b5de56d26c0148ad33bb3a9201091502f24d910gjelinek * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
0b5de56d26c0148ad33bb3a9201091502f24d910gjelinek * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
0b5de56d26c0148ad33bb3a9201091502f24d910gjelinek * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
0b5de56d26c0148ad33bb3a9201091502f24d910gjelinek * SUCH DAMAGE.
0b5de56d26c0148ad33bb3a9201091502f24d910gjelinekunsigned int
0094b373ead542a342e4250eaf37854ccd3e50c0jv if (c < 0 || c == EOF)
0b5de56d26c0148ad33bb3a9201091502f24d910gjelinek return (0L);
0b5de56d26c0148ad33bb3a9201091502f24d910gjelinek /* Binary search -- see bsearch.c for explanation. */
0b5de56d26c0148ad33bb3a9201091502f24d910gjelinek return (0L);