Print this page
2944 cscope-fast/invlib.[ch] use reserved word as identifier
Reviewed by: Albert Lee <trisk@nexenta.com>
Reviewed by: Gary Mills <gary_mills@fastmail.fm>
Reviewed by: Joerg Schilling <Joerg.Schilling@fokus.fraunhofer.de>
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/tools/cscope-fast/invlib.h
+++ new/usr/src/tools/cscope-fast/invlib.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License, Version 1.0 only
6 6 * (the "License"). You may not use this file except in compliance
7 7 * with the License.
8 8 *
9 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 10 * or http://www.opensolaris.org/os/licensing.
11 11 * See the License for the specific language governing permissions
12 12 * and limitations under the License.
13 13 *
14 14 * When distributing Covered Code, include this CDDL HEADER in each
15 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 16 * If applicable, add the following below this CDDL HEADER, with the
17 17 * fields enclosed by brackets "[]" replaced with your own identifying
18 18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 19 *
20 20 * CDDL HEADER END
↓ open down ↓ |
20 lines elided |
↑ open up ↑ |
21 21 */
22 22 /* Copyright (c) 1988 AT&T */
23 23 /* All Rights Reserved */
24 24
25 25
26 26 /*
27 27 * Copyright 1999, 2003 Sun Microsystems, Inc. All rights reserved.
28 28 * Use is subject to license terms.
29 29 */
30 30
31 -#pragma ident "%Z%%M% %I% %E% SMI"
31 +#ifndef INVLIB_H
32 +#define INVLIB_H
32 33
33 34 /* inverted index definitions */
34 35
35 36 /* postings temporary file long number coding into characters */
36 37 #define BASE 95 /* 127 - ' ' */
37 38 #define PRECISION 5 /* maximum digits after converting a long */
38 39
39 40 /* inverted index access parameters */
40 41 #define INVAVAIL 0
41 42 #define INVBUSY 1
42 43 #define INVALONE 2
43 44
44 45 /* boolean set operations */
45 46 #define OR 3
46 47 #define AND 4
47 48 #define NOT 5
48 49 #define REVERSENOT 6
49 50
50 51 /* note that the entire first block is for parameters */
51 52 typedef struct {
52 53 long version; /* inverted index format version */
53 54 long filestat; /* file status word */
54 55 long sizeblk; /* size of logical block in bytes */
55 56 long startbyte; /* first byte of superfinger */
56 57 long supsize; /* size of superfinger in bytes */
57 58 long cntlsize; /* size of max cntl space (should be a */
58 59 /* multiple of BUFSIZ) */
59 60 long share; /* flag whether to use shared memory */
60 61 } PARAM;
61 62
62 63 typedef struct {
63 64 FILE *invfile; /* the inverted file ptr */
64 65 FILE *postfile; /* posting file ptr */
65 66 PARAM param; /* control parameters for the file */
66 67 char *iindex; /* ptr to space for superindex */
67 68 char *logblk; /* ptr to space for a logical block */
68 69 long numblk; /* number of block presently at *logblk */
69 70 long keypnt; /* number item in present block found */
70 71 int swap; /* file endian mistmatch? */
71 72 } INVCONTROL;
72 73
73 74 typedef struct {
74 75 short offset; /* offset in this logical block */
75 76 unsigned char size; /* size of term */
76 77 unsigned char space; /* number of longs of growth space */
77 78 long post; /* number of postings for this entry */
78 79 } ENTRY;
79 80
80 81 typedef struct {
↓ open down ↓ |
39 lines elided |
↑ open up ↑ |
81 82 long lineoffset; /* source line database offset */
82 83 long fcnoffset; /* function name database offset */
83 84 long fileindex : 24; /* source file name index */
84 85 long type : 8; /* reference type (mark character) */
85 86 } POSTING;
86 87
87 88 extern long *srcoffset; /* source file name database offsets */
88 89 extern int nsrcoffset; /* number of file name database offsets */
89 90
90 91 extern void boolclear(void);
91 -extern POSTING *boolfile(INVCONTROL *invcntl, long *num, int bool);
92 +extern POSTING *boolfile(INVCONTROL *invcntl, long *num, int op);
92 93 extern void invclose(INVCONTROL *invcntl);
93 94 extern long invfind(INVCONTROL *invcntl, char *searchterm);
94 95 extern int invforward(INVCONTROL *invcntl);
95 96 extern int invopen(INVCONTROL *invcntl, char *invname, char *invpost,
96 97 int stat);
97 98 extern int invterm(INVCONTROL *invcntl, char *term);
98 99 extern long invmake(char *invname, char *invpost, FILE *infile);
100 +
101 +#endif /* INVLIB_H */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX