Sync with 4.4lite2
This commit is contained in:
parent
3f2b3b5a18
commit
4d85334f0f
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: locate.bigram.c,v 1.3 1994/12/22 06:17:40 jtc Exp $ */
|
||||
/* $NetBSD: locate.bigram.c,v 1.4 1995/08/31 22:36:32 jtc Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1993
|
||||
@ -43,10 +43,11 @@ static char copyright[] =
|
||||
#endif /* not lint */
|
||||
|
||||
#ifndef lint
|
||||
<<<<<<< locate.bigram.c
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)locate.bigram.c 8.1 (Berkeley) 6/6/93";
|
||||
static char sccsid[] = "@(#)locate.bigram.c 8.2 (Berkeley) 4/28/95";
|
||||
#endif
|
||||
static char rcsid[] = "$NetBSD: locate.bigram.c,v 1.3 1994/12/22 06:17:40 jtc Exp $";
|
||||
static char rcsid[] = "$NetBSD: locate.bigram.c,v 1.4 1995/08/31 22:36:32 jtc Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
/*
|
||||
@ -71,12 +72,12 @@ main ( )
|
||||
|
||||
/* skip longest common prefix */
|
||||
for ( cp = path; *cp == *oldpath; cp++, oldpath++ )
|
||||
if ( *oldpath == NULL )
|
||||
if ( *oldpath == '\0' )
|
||||
break;
|
||||
/*
|
||||
* output post-residue bigrams only
|
||||
*/
|
||||
while ( *cp != NULL && *(cp + 1) != NULL ) {
|
||||
while ( *cp != '\0' && *(cp + 1) != '\0' ) {
|
||||
putchar ( *cp++ );
|
||||
putchar ( *cp++ );
|
||||
putchar ( '\n' );
|
||||
@ -86,4 +87,5 @@ main ( )
|
||||
else
|
||||
path = buf1, oldpath = buf2;
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: locate.code.c,v 1.4 1995/05/06 06:39:33 jtc Exp $ */
|
||||
/* $NetBSD: locate.code.c,v 1.5 1995/08/31 22:36:33 jtc Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1993
|
||||
@ -44,9 +44,9 @@ static char copyright[] =
|
||||
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)locate.code.c 8.1 (Berkeley) 6/6/93";
|
||||
static char sccsid[] = "@(#)locate.code.c 8.4 (Berkeley) 5/4/95";
|
||||
#endif
|
||||
static char rcsid[] = "$NetBSD: locate.code.c,v 1.4 1995/05/06 06:39:33 jtc Exp $";
|
||||
static char rcsid[] = "$NetBSD: locate.code.c,v 1.5 1995/08/31 22:36:33 jtc Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
/*
|
||||
@ -85,11 +85,14 @@ static char rcsid[] = "$NetBSD: locate.code.c,v 1.4 1995/05/06 06:39:33 jtc Exp
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "locate.h"
|
||||
|
||||
#define BGBUFSIZE (NBG * 2) /* size of bigram buffer */
|
||||
@ -141,7 +144,7 @@ main(argc, argv)
|
||||
*cp = '\0';
|
||||
|
||||
/* Squelch characters that would botch the decoding. */
|
||||
for (cp = path; *cp != NULL; cp++) {
|
||||
for (cp = path; *cp != '\0'; cp++) {
|
||||
*cp &= PARITY-1;
|
||||
if (*cp <= SWITCH)
|
||||
*cp = '?';
|
||||
@ -149,7 +152,7 @@ main(argc, argv)
|
||||
|
||||
/* Skip longest common prefix. */
|
||||
for (cp = path; *cp == *oldpath; cp++, oldpath++)
|
||||
if (*oldpath == NULL)
|
||||
if (*oldpath == '\0')
|
||||
break;
|
||||
count = cp - path;
|
||||
diffcount = count - oldcount + OFFSET;
|
||||
@ -162,8 +165,8 @@ main(argc, argv)
|
||||
if (putchar(diffcount) == EOF)
|
||||
err(1, "stdout");
|
||||
|
||||
while (*cp != NULL) {
|
||||
if (*(cp + 1) == NULL) {
|
||||
while (*cp != '\0') {
|
||||
if (*(cp + 1) == '\0') {
|
||||
if (putchar(*cp) == EOF)
|
||||
err(1, "stdout");
|
||||
break;
|
||||
@ -201,10 +204,10 @@ bgindex(bg) /* Return location of bg in bigrams or -1. */
|
||||
|
||||
bg0 = bg[0];
|
||||
bg1 = bg[1];
|
||||
for (p = bigrams; *p != NULL; p++)
|
||||
for (p = bigrams; *p != '\0'; p++)
|
||||
if (*p++ == bg0 && *p == bg1)
|
||||
break;
|
||||
return (*p == NULL ? -1 : --p - bigrams);
|
||||
return (*p == '\0' ? -1 : --p - bigrams);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/csh -f
|
||||
#
|
||||
# $NetBSD: updatedb.csh,v 1.6 1995/02/15 15:37:56 jtc Exp $
|
||||
# $NetBSD: updatedb.csh,v 1.7 1995/08/31 22:36:35 jtc Exp $
|
||||
#
|
||||
# Copyright (c) 1989, 1993
|
||||
# The Regents of the University of California. All rights reserved.
|
||||
@ -36,7 +36,7 @@
|
||||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
# SUCH DAMAGE.
|
||||
#
|
||||
# @(#)updatedb.csh 8.3 (Berkeley) 3/19/94
|
||||
# @(#)updatedb.csh 8.4 (Berkeley) 10/27/94
|
||||
#
|
||||
|
||||
set SRCHPATHS = "/" # directories to be put in the database
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: look.c,v 1.6 1994/12/23 01:11:01 jtc Exp $ */
|
||||
/* $NetBSD: look.c,v 1.7 1995/08/31 22:41:02 jtc Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1991, 1993
|
||||
@ -44,9 +44,9 @@ static char copyright[] =
|
||||
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)look.c 8.1 (Berkeley) 6/14/93";
|
||||
static char sccsid[] = "@(#)look.c 8.2 (Berkeley) 5/4/95";
|
||||
#endif
|
||||
static char rcsid[] = "$NetBSD: look.c,v 1.6 1994/12/23 01:11:01 jtc Exp $";
|
||||
static char rcsid[] = "$NetBSD: look.c,v 1.7 1995/08/31 22:41:02 jtc Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
/*
|
||||
@ -61,15 +61,16 @@ static char rcsid[] = "$NetBSD: look.c,v 1.6 1994/12/23 01:11:01 jtc Exp $";
|
||||
#include <sys/mman.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <limits.h>
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <unistd.h>
|
||||
#include <err.h>
|
||||
|
||||
#include "pathnames.h"
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: lorder.1,v 1.4 1994/12/23 01:13:59 jtc Exp $
|
||||
.\" $NetBSD: lorder.1,v 1.5 1995/08/31 22:42:44 jtc Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1990, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -31,9 +31,9 @@
|
||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" @(#)lorder.1 8.1 (Berkeley) 6/6/93
|
||||
.\" @(#)lorder.1 8.2 (Berkeley) 4/28/95
|
||||
.\"
|
||||
.Dd June 6, 1993
|
||||
.Dd April 28, 1995
|
||||
.Dt LORDER 1
|
||||
.Os
|
||||
.Sh NAME
|
||||
|
Loading…
Reference in New Issue
Block a user