=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/apropos/Attic/apropos.c,v retrieving revision 1.5 retrieving revision 1.7 diff -u -r1.5 -r1.7 --- src/usr.bin/apropos/Attic/apropos.c 1997/09/11 11:24:53 1.5 +++ src/usr.bin/apropos/Attic/apropos.c 2000/11/20 14:03:31 1.7 @@ -1,4 +1,4 @@ -/* $OpenBSD: apropos.c,v 1.5 1997/09/11 11:24:53 deraadt Exp $ */ +/* $OpenBSD: apropos.c,v 1.7 2000/11/20 14:03:31 deraadt Exp $ */ /* $NetBSD: apropos.c,v 1.5 1995/09/04 20:46:20 tls Exp $ */ /* @@ -44,7 +44,7 @@ #if 0 static char sccsid[] = "@(#)apropos.c 8.8 (Berkeley) 5/4/95"; #else -static char rcsid[] = "$OpenBSD: apropos.c,v 1.5 1997/09/11 11:24:53 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: apropos.c,v 1.7 2000/11/20 14:03:31 deraadt Exp $"; #endif #endif /* not lint */ @@ -64,6 +64,8 @@ static int *found, foundman; +#define MAXLINELEN 8192 /* max line handled */ + void apropos __P((char **, char *, int)); void lowstr __P((char *, char *)); int match __P((char *, char *)); @@ -140,15 +142,14 @@ int buildpath; { char *end, *name, **p; - char buf[LINE_MAX + 1], wbuf[LINE_MAX + 1]; + char buf[MAXLINELEN + 1], wbuf[MAXLINELEN + 1]; + char hold[MAXPATHLEN]; for (name = path; name; name = end) { /* through name list */ if ((end = strchr(name, ':'))) *end++ = '\0'; if (buildpath) { - char hold[MAXPATHLEN + 1]; - (void)snprintf(hold, sizeof(hold), "%s/%s", name, _PATH_WHATIS); name = hold; @@ -227,6 +228,6 @@ { (void)fprintf(stderr, - "usage: apropos [-C file] [-M path] [-m path] keyword ...\n"); + "usage: apropos [-C file] [-M path] [-m path] keyword [...]\n"); exit(1); }