Update of /cvsroot/cscope/cscope/src
In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv3149/src
Modified Files:
build.c
Log Message:
Fix samelist() to properly absorb newlines in input stream
Index: build.c
===================================================================
RCS file: /cvsroot/cscope/cscope/src/build.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** build.c 20 Aug 2006 15:00:33 -0000 1.12
--- build.c 10 Mar 2008 18:33:47 -0000 1.13
***************
*** 116,123 ****
char oldname[PATHLEN + 1]; /* name in old cross-reference */
int oldcount;
! int i;
/* see if the number of names is the same */
! if (fscanf(oldrefs, "%d", &oldcount) != 1 ||
oldcount != count) {
return(NO);
--- 116,123 ----
char oldname[PATHLEN + 1]; /* name in old cross-reference */
int oldcount;
! int i, matchcnt;
/* see if the number of names is the same */
! if (fscanf(oldrefs, "%d\n", &oldcount) != 1 ||
oldcount != count) {
return(NO);
***************
*** 125,129 ****
/* see if the name list is the same */
for (i = 0; i < count; ++i) {
! if (! fgets(oldname, sizeof(oldname), oldrefs)||
strnotequal(oldname, names[i])) {
return(NO);
--- 125,130 ----
/* see if the name list is the same */
for (i = 0; i < count; ++i) {
! matchcnt = fscanf(oldrefs,"%s\n",oldname);
! if ((! matchcnt) ||
strnotequal(oldname, names[i])) {
return(NO);
|