locate.c (21673) | locate.c (21786) |
---|---|
1/* 2 * Copyright (c) 1995 Wolfram Schneider <wosch@FreeBSD.org>. Berlin. 3 * Copyright (c) 1989, 1993 4 * The Regents of the University of California. All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * James A. Woods. 8 * --- 20 unchanged lines hidden (view full) --- 29 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 35 * SUCH DAMAGE. 36 * | 1/* 2 * Copyright (c) 1995 Wolfram Schneider <wosch@FreeBSD.org>. Berlin. 3 * Copyright (c) 1989, 1993 4 * The Regents of the University of California. All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * James A. Woods. 8 * --- 20 unchanged lines hidden (view full) --- 29 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 35 * SUCH DAMAGE. 36 * |
37 * $FreeBSD: head/usr.bin/locate/locate/locate.c 21673 1997-01-14 07:20:47Z jkh $ | 37 * $FreeBSD: head/usr.bin/locate/locate/locate.c 21786 1997-01-16 21:58:40Z alex $ |
38 */ 39 40#ifndef lint 41static char copyright[] = 42"@(#) Copyright (c) 1995-1996 Wolfram Schneider, Berlin.\n\ 43@(#) Copyright (c) 1989, 1993\n\ 44 The Regents of the University of California. All rights reserved.\n"; 45#endif /* not lint */ --- 250 unchanged lines hidden (view full) --- 296#endif 297 if ((fd = open(path_fcodes, O_RDONLY)) == -1 || 298 fstat(fd, &sb) == -1) 299 err(1, "`%s'", path_fcodes); 300 len = sb.st_size; 301 302 if ((p = mmap((caddr_t)0, (size_t)len, 303 PROT_READ, MAP_SHARED, | 38 */ 39 40#ifndef lint 41static char copyright[] = 42"@(#) Copyright (c) 1995-1996 Wolfram Schneider, Berlin.\n\ 43@(#) Copyright (c) 1989, 1993\n\ 44 The Regents of the University of California. All rights reserved.\n"; 45#endif /* not lint */ --- 250 unchanged lines hidden (view full) --- 296#endif 297 if ((fd = open(path_fcodes, O_RDONLY)) == -1 || 298 fstat(fd, &sb) == -1) 299 err(1, "`%s'", path_fcodes); 300 len = sb.st_size; 301 302 if ((p = mmap((caddr_t)0, (size_t)len, 303 PROT_READ, MAP_SHARED, |
304 fd, (off_t)0)) == (caddr_t)-1) | 304 fd, (off_t)0)) == MAP_FAILED) |
305 err(1, "mmap ``%s''", path_fcodes); 306 307 /* foreach search string ... */ 308 while (*s != NULL) { 309#ifdef DEBUG 310 t0 = cputime(); 311#endif 312 if (f_icase) --- 59 unchanged lines hidden --- | 305 err(1, "mmap ``%s''", path_fcodes); 306 307 /* foreach search string ... */ 308 while (*s != NULL) { 309#ifdef DEBUG 310 t0 = cputime(); 311#endif 312 if (f_icase) --- 59 unchanged lines hidden --- |