diff options
| author | joerg <joerg@NetBSD.org> | 2011-09-04 20:28:09 +0000 |
|---|---|---|
| committer | joerg <joerg@NetBSD.org> | 2011-09-04 20:28:09 +0000 |
| commit | 8a6719cf4003b02fd071364d33df446000f56f4a (patch) | |
| tree | cb16179eede84b580bae2dc017c3dc9a0e683e0a /usr.bin/locate | |
| parent | 7d747031d2354cfc27127a6dc0de0527842ce00a (diff) | |
ANSIfy + static + __dead
Diffstat (limited to 'usr.bin/locate')
| -rw-r--r-- | usr.bin/locate/code/locate.code.c | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/usr.bin/locate/code/locate.code.c b/usr.bin/locate/code/locate.code.c index 15761734372..0a4254c28aa 100644 --- a/usr.bin/locate/code/locate.code.c +++ b/usr.bin/locate/code/locate.code.c @@ -1,4 +1,4 @@ -/* $NetBSD: locate.code.c,v 1.10 2008/07/21 14:19:23 lukem Exp $ */ +/* $NetBSD: locate.code.c,v 1.11 2011/09/04 20:28:40 joerg Exp $ */ /* * Copyright (c) 1989, 1993 @@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993\ #if 0 static char sccsid[] = "@(#)locate.code.c 8.4 (Berkeley) 5/4/95"; #endif -__RCSID("$NetBSD: locate.code.c,v 1.10 2008/07/21 14:19:23 lukem Exp $"); +__RCSID("$NetBSD: locate.code.c,v 1.11 2011/09/04 20:28:40 joerg Exp $"); #endif /* not lint */ /* @@ -93,18 +93,15 @@ __RCSID("$NetBSD: locate.code.c,v 1.10 2008/07/21 14:19:23 lukem Exp $"); #define BGBUFSIZE (NBG * 2) /* size of bigram buffer */ -char buf1[MAXPATHLEN] = " "; -char buf2[MAXPATHLEN]; -char bigrams[BGBUFSIZE + 1] = { 0 }; +static char buf1[MAXPATHLEN] = " "; +static char buf2[MAXPATHLEN]; +static char bigrams[BGBUFSIZE + 1] = { 0 }; -int bgindex __P((char *)); -int main __P((int, char **)); -void usage __P((void)); +static int bgindex(char *); +__dead static void usage(void); int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { char *cp, *oldpath, *path; int ch, code, count, diffcount, oldcount; @@ -188,9 +185,8 @@ main(argc, argv) exit(0); } -int -bgindex(bg) /* Return location of bg in bigrams or -1. */ - char *bg; +static int +bgindex(char *bg) /* Return location of bg in bigrams or -1. */ { char bg0, bg1, *p; @@ -202,8 +198,8 @@ bgindex(bg) /* Return location of bg in bigrams or -1. */ return (*p == '\0' ? -1 : p - bigrams); } -void -usage() +static void +usage(void) { (void)fprintf(stderr, "usage: locate.code common_bigrams < list > squozen_list\n"); |
