[comp.bugs.4bsd] ctags fails sometimes + FIX

rcodi@yabbie.rmit.oz (Ian Donaldson) (03/17/88)

Subject: ctags fails sometimes + FIX
Index:	/usr/src/ucb/ctags.c 4.3BSD

Description:
	ctags will produce a file:linenumber tags file instead of a
	pattern search tags file under certain circumstances.

Repeat-By:
	Run ctags on a large pascal program on certain machines.

	Also by inspection.  Run "lint -hbx" on ctags.c. Its obvious.
	3 arguments are passed to routine pfnote() everywhere except
	one place.

	This bug also existed in the 4.2bsd version, and is present
	on many machines (eg: Vaxen, Sun's)

Fix:
	Apply the following patch.

------------------
*** /usr/src/ucb/ctags.c.orig	Sat Jun  1 02:10:06 1985
--- /usr/src/ucb/ctags.c	Thu Mar 17 10:59:35 1988
***************
*** 856,862 ****
  	cp[0] = 0;
  	strcpy(nambuf, dbp);
  	cp[0] = c;
! 	pfnote(nambuf, lineno);
  	pfcnt++;
  }
  
--- 856,862 ----
  	cp[0] = 0;
  	strcpy(nambuf, dbp);
  	cp[0] = c;
! 	pfnote(nambuf, lineno, TRUE);
  	pfcnt++;
  }
------------------

Ian D