Project

General

Profile

Bug #2944 » cscope-fast-bool.patch

Igor Pashev, 2012-06-28 08:04 PM

View differences:

usr/src/tools/cscope-fast/invlib.c Tue Jun 05 18:33:58 2012 +0200 → usr/src/tools/cscope-fast/invlib.c Thu Jun 28 23:59:44 2012 +0100
948 948
}
949 949

  
950 950
POSTING *
951
boolfile(INVCONTROL *invcntl, long *num, int bool)
951
boolfile(INVCONTROL *invcntl, long *num, int op)
952 952
{
953 953
	ENTRY	*entryptr;
954 954
	FILE	*file;
......
965 965
	ptr2 = ((unsigned long *)ptr) +
966 966
	    (entryptr->size + (sizeof (long) - 1)) / sizeof (long);
967 967
	*num = entryptr->post;
968
	switch (bool) {
968
	switch (op) {
969 969
	case OR:
970 970
	case NOT:
971 971
		if (*num == 0) {
......
975 975
	}
976 976
	/* make room for the new set */
977 977
	u = 0;
978
	switch (bool) {
978
	switch (op) {
979 979
	case AND:
980 980
	case NOT:
981 981
		newsetp = set1p = item;
......
1018 1018
	(void) fseek(file, (long)*ptr2, SEEK_SET);
1019 1019
	read_next_posting(invcntl, &posting);
1020 1020
	newsetc = 0;
1021
	switch (bool) {
1021
	switch (op) {
1022 1022
	case OR:
1023 1023
		/* while something in both sets */
1024 1024
		set1p = item;
usr/src/tools/cscope-fast/invlib.h Tue Jun 05 18:33:58 2012 +0200 → usr/src/tools/cscope-fast/invlib.h Thu Jun 28 23:59:44 2012 +0100
88 88
extern	int	nsrcoffset;	/* number of file name database offsets */
89 89

  
90 90
extern void	boolclear(void);
91
extern POSTING	*boolfile(INVCONTROL *invcntl, long *num, int bool);
91
extern POSTING	*boolfile(INVCONTROL *invcntl, long *num, int op);
92 92
extern void	invclose(INVCONTROL *invcntl);
93 93
extern long	invfind(INVCONTROL *invcntl, char *searchterm);
94 94
extern int	invforward(INVCONTROL *invcntl);
    (1-1/1)