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>


  11  * See the License for the specific language governing permissions
  12  * and limitations under the License.
  13  *
  14  * When distributing Covered Code, include this CDDL HEADER in each
  15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16  * If applicable, add the following below this CDDL HEADER, with the
  17  * fields enclosed by brackets "[]" replaced with your own identifying
  18  * information: Portions Copyright [yyyy] [name of copyright owner]
  19  *
  20  * CDDL HEADER END
  21  */
  22 /*      Copyright (c) 1988 AT&T     */
  23 /*        All Rights Reserved   */
  24 
  25 
  26 /*
  27  * Copyright 1999, 2003 Sun Microsystems, Inc.  All rights reserved.
  28  * Use is subject to license terms.
  29  */
  30 
  31 #pragma ident   "%Z%%M% %I%     %E% SMI"

  32 
  33 /* inverted index definitions */
  34 
  35 /* postings temporary file long number coding into characters */
  36 #define BASE            95      /* 127 - ' ' */
  37 #define PRECISION       5       /* maximum digits after converting a long */
  38 
  39 /* inverted index access parameters */
  40 #define INVAVAIL        0
  41 #define INVBUSY         1
  42 #define INVALONE        2
  43 
  44 /* boolean set operations */
  45 #define OR              3
  46 #define AND             4
  47 #define NOT             5
  48 #define REVERSENOT      6
  49 
  50 /* note that the entire first block is for parameters */
  51 typedef struct  {


  71 } INVCONTROL;
  72 
  73 typedef struct  {
  74         short   offset;         /* offset in this logical block */
  75         unsigned char size;     /* size of term */
  76         unsigned char space;    /* number of longs of growth space */
  77         long    post;           /* number of postings for this entry */
  78 } ENTRY;
  79 
  80 typedef struct {
  81         long    lineoffset;     /* source line database offset */
  82         long    fcnoffset;      /* function name database offset */
  83         long    fileindex : 24; /* source file name index */
  84         long    type : 8;       /* reference type (mark character) */
  85 } POSTING;
  86 
  87 extern  long    *srcoffset;     /* source file name database offsets */
  88 extern  int     nsrcoffset;     /* number of file name database offsets */
  89 
  90 extern void     boolclear(void);
  91 extern POSTING  *boolfile(INVCONTROL *invcntl, long *num, int bool);
  92 extern void     invclose(INVCONTROL *invcntl);
  93 extern long     invfind(INVCONTROL *invcntl, char *searchterm);
  94 extern int      invforward(INVCONTROL *invcntl);
  95 extern int      invopen(INVCONTROL *invcntl, char *invname, char *invpost,
  96                     int stat);
  97 extern int      invterm(INVCONTROL *invcntl, char *term);
  98 extern long     invmake(char *invname, char *invpost, FILE *infile);




  11  * See the License for the specific language governing permissions
  12  * and limitations under the License.
  13  *
  14  * When distributing Covered Code, include this CDDL HEADER in each
  15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16  * If applicable, add the following below this CDDL HEADER, with the
  17  * fields enclosed by brackets "[]" replaced with your own identifying
  18  * information: Portions Copyright [yyyy] [name of copyright owner]
  19  *
  20  * CDDL HEADER END
  21  */
  22 /*      Copyright (c) 1988 AT&T     */
  23 /*        All Rights Reserved   */
  24 
  25 
  26 /*
  27  * Copyright 1999, 2003 Sun Microsystems, Inc.  All rights reserved.
  28  * Use is subject to license terms.
  29  */
  30 
  31 #ifndef INVLIB_H
  32 #define INVLIB_H
  33 
  34 /* inverted index definitions */
  35 
  36 /* postings temporary file long number coding into characters */
  37 #define BASE            95      /* 127 - ' ' */
  38 #define PRECISION       5       /* maximum digits after converting a long */
  39 
  40 /* inverted index access parameters */
  41 #define INVAVAIL        0
  42 #define INVBUSY         1
  43 #define INVALONE        2
  44 
  45 /* boolean set operations */
  46 #define OR              3
  47 #define AND             4
  48 #define NOT             5
  49 #define REVERSENOT      6
  50 
  51 /* note that the entire first block is for parameters */
  52 typedef struct  {


  72 } INVCONTROL;
  73 
  74 typedef struct  {
  75         short   offset;         /* offset in this logical block */
  76         unsigned char size;     /* size of term */
  77         unsigned char space;    /* number of longs of growth space */
  78         long    post;           /* number of postings for this entry */
  79 } ENTRY;
  80 
  81 typedef struct {
  82         long    lineoffset;     /* source line database offset */
  83         long    fcnoffset;      /* function name database offset */
  84         long    fileindex : 24; /* source file name index */
  85         long    type : 8;       /* reference type (mark character) */
  86 } POSTING;
  87 
  88 extern  long    *srcoffset;     /* source file name database offsets */
  89 extern  int     nsrcoffset;     /* number of file name database offsets */
  90 
  91 extern void     boolclear(void);
  92 extern POSTING  *boolfile(INVCONTROL *invcntl, long *num, int op);
  93 extern void     invclose(INVCONTROL *invcntl);
  94 extern long     invfind(INVCONTROL *invcntl, char *searchterm);
  95 extern int      invforward(INVCONTROL *invcntl);
  96 extern int      invopen(INVCONTROL *invcntl, char *invname, char *invpost,
  97                     int stat);
  98 extern int      invterm(INVCONTROL *invcntl, char *term);
  99 extern long     invmake(char *invname, char *invpost, FILE *infile);
 100 
 101 #endif  /* INVLIB_H */