=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/rcs/diff.c,v retrieving revision 1.24 retrieving revision 1.25 diff -c -r1.24 -r1.25 *** src/usr.bin/rcs/diff.c 2007/07/03 00:56:23 1.24 --- src/usr.bin/rcs/diff.c 2007/09/11 15:47:17 1.25 *************** *** 1,4 **** ! /* $OpenBSD: diff.c,v 1.24 2007/07/03 00:56:23 ray Exp $ */ /* * Copyright (C) Caldera International Inc. 2001-2002. * All rights reserved. --- 1,4 ---- ! /* $OpenBSD: diff.c,v 1.25 2007/09/11 15:47:17 gilles Exp $ */ /* * Copyright (C) Caldera International Inc. 2001-2002. * All rights reserved. *************** *** 1155,1161 **** unsigned char buf[FUNCTION_CONTEXT_SIZE]; size_t nc; int last = lastline; - char *p; char *state = NULL; lastline = pos; --- 1155,1160 ---- *************** *** 1167,1175 **** nc = fread(buf, 1, nc, fp); if (nc > 0) { buf[nc] = '\0'; ! p = strchr((const char *)buf, '\n'); ! if (p != NULL) ! *p = '\0'; if (isalpha(buf[0]) || buf[0] == '_' || buf[0] == '$') { if (begins_with(buf, "private:")) { if (!state) --- 1166,1174 ---- nc = fread(buf, 1, nc, fp); if (nc > 0) { buf[nc] = '\0'; ! ! buf[strcspn(buf, "\n")] = '\0'; ! if (isalpha(buf[0]) || buf[0] == '_' || buf[0] == '$') { if (begins_with(buf, "private:")) { if (!state)