=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/whatis/Attic/whatis.c,v retrieving revision 1.14 retrieving revision 1.15 diff -c -r1.14 -r1.15 *** src/usr.bin/whatis/Attic/whatis.c 2013/11/15 22:20:04 1.14 --- src/usr.bin/whatis/Attic/whatis.c 2013/11/26 19:25:39 1.15 *************** *** 1,4 **** ! /* $OpenBSD: whatis.c,v 1.14 2013/11/15 22:20:04 millert Exp $ */ /* * Copyright (c) 1987, 1993 --- 1,4 ---- ! /* $OpenBSD: whatis.c,v 1.15 2013/11/26 19:25:39 deraadt Exp $ */ /* * Copyright (c) 1987, 1993 *************** *** 170,182 **** return(0); for (len = strlen(str);;) { /* skip leading crud */ ! for (; *bp && !isalnum(*bp); ++bp) ; if (!*bp) break; /* check for word match first */ ! for (start = bp++; *bp == '_' || isalnum(*bp); ++bp) ; if (bp - start == len) { if (strncasecmp(start, str, len) == 0) --- 170,182 ---- return(0); for (len = strlen(str);;) { /* skip leading crud */ ! for (; *bp && !isalnum((unsigned char)*bp); ++bp) ; if (!*bp) break; /* check for word match first */ ! for (start = bp++; *bp == '_' || isalnum((unsigned char)*bp); ++bp) ; if (bp - start == len) { if (strncasecmp(start, str, len) == 0) *************** *** 184,190 **** } else if (*bp && *bp != ',') { /* check for full string match */ for (bp = start; ! *bp && *bp != ',' && *bp != '(' && !isspace(*bp); ++bp) ; if (bp - start == len && strncasecmp(start, str, len) == 0) return(1); --- 184,191 ---- } else if (*bp && *bp != ',') { /* check for full string match */ for (bp = start; ! *bp && *bp != ',' && *bp != '(' && ! !isspace((unsigned char)*bp); ++bp) ; if (bp - start == len && strncasecmp(start, str, len) == 0) return(1);