=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/look/look.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- src/usr.bin/look/look.c 2003/06/03 02:56:10 1.9 +++ src/usr.bin/look/look.c 2003/06/10 22:20:47 1.10 @@ -1,4 +1,4 @@ -/* $OpenBSD: look.c,v 1.9 2003/06/03 02:56:10 millert Exp $ */ +/* $OpenBSD: look.c,v 1.10 2003/06/10 22:20:47 deraadt Exp $ */ /* $NetBSD: look.c,v 1.7 1995/08/31 22:41:02 jtc Exp $ */ /*- @@ -43,7 +43,7 @@ #if 0 static char sccsid[] = "@(#)look.c 8.2 (Berkeley) 5/4/95"; #endif -static char rcsid[] = "$OpenBSD: look.c,v 1.9 2003/06/03 02:56:10 millert Exp $"; +static char rcsid[] = "$OpenBSD: look.c,v 1.10 2003/06/10 22:20:47 deraadt Exp $"; #endif /* not lint */ /* @@ -95,9 +95,7 @@ void usage(void); int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { struct stat sb; int ch, fd, termchar; @@ -151,8 +149,7 @@ } int -look(string, front, back) - char *string, *front, *back; +look(char *string, char *front, char *back) { int ch; char *readp, *writep; @@ -219,8 +216,7 @@ while (p < back && *p++ != '\n'); char * -binary_search(string, front, back) - char *string, *front, *back; +binary_search(char *string, char *front, char *back) { char *p; @@ -254,8 +250,7 @@ * o front is before or at the first line to be printed. */ char * -linear_search(string, front, back) - char *string, *front, *back; +linear_search(char *string, char *front, char *back) { while (front < back) { switch (compare(string, front, back)) { @@ -277,8 +272,7 @@ * Print as many lines as match string, starting at front. */ void -print_from(string, front, back) - char *string, *front, *back; +print_from(char *string, char *front, char *back) { for (; front < back && compare(string, front, back) == EQUAL; ++front) { for (; front < back && *front != '\n'; ++front) @@ -303,8 +297,7 @@ * "back" terminated). */ int -compare(s1, s2, back) - char *s1, *s2, *back; +compare(char *s1, char *s2, char *back) { int ch; @@ -326,7 +319,7 @@ } void -usage() +usage(void) { (void)fprintf(stderr, "usage: look [-df] [-t char] string [file]\n"); exit(2);