Annotation of src/usr.bin/ctags/ctags.h, Revision 1.8
1.8 ! tobias 1: /* $OpenBSD: ctags.h,v 1.7 2012/03/04 04:05:15 fgsch Exp $ */
1.1 deraadt 2: /* $NetBSD: ctags.h,v 1.3 1995/03/26 20:14:07 glass Exp $ */
3:
4: /*
5: * Copyright (c) 1987, 1993, 1994
6: * The Regents of the University of California. All rights reserved.
7: *
8: * Redistribution and use in source and binary forms, with or without
9: * modification, are permitted provided that the following conditions
10: * are met:
11: * 1. Redistributions of source code must retain the above copyright
12: * notice, this list of conditions and the following disclaimer.
13: * 2. Redistributions in binary form must reproduce the above copyright
14: * notice, this list of conditions and the following disclaimer in the
15: * documentation and/or other materials provided with the distribution.
1.5 millert 16: * 3. Neither the name of the University nor the names of its contributors
1.1 deraadt 17: * may be used to endorse or promote products derived from this software
18: * without specific prior written permission.
19: *
20: * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21: * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23: * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24: * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25: * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26: * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27: * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28: * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29: * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30: * SUCH DAMAGE.
31: *
32: * @(#)ctags.h 8.3 (Berkeley) 4/2/94
33: */
34:
35: #define bool char
36:
37: #define YES 1
38: #define NO 0
39: #define EOS '\0'
40:
41: #define ENDLINE 50 /* max length of pattern */
42: #define MAXTOKEN 250 /* max size of single token */
43:
44: #define SETLINE {++lineno;lineftell = ftell(inf);}
45: #define GETC(op,exp) ((c = getc(inf)) op (int)exp)
46:
47: #define iswhite(arg) (_wht[(unsigned)arg]) /* T if char is white */
48: #define begtoken(arg) (_btk[(unsigned)arg]) /* T if char can start token */
49: #define intoken(arg) (_itk[(unsigned)arg]) /* T if char can be in token */
50:
51: typedef struct nd_st { /* sorting structure */
52: struct nd_st *left,
53: *right; /* left and right sons */
54: char *entry, /* function or type name */
55: *file, /* file name */
56: *pat; /* search pattern */
57: int lno; /* for -x option */
58: bool been_warned; /* set if noticed dup */
59: } NODE;
60:
61: extern char *curfile; /* current input file name */
62: extern NODE *head; /* head of the sorted binary tree */
63: extern FILE *inf; /* ioptr for current input file */
64: extern FILE *outf; /* ioptr for current output file */
65: extern long lineftell; /* ftell after getc( inf ) == '\n' */
66: extern int lineno; /* line number of current line */
67: extern int dflag; /* -d: non-macro defines */
68: extern int vflag; /* -v: vgrind style index output */
69: extern int wflag; /* -w: suppress warnings */
70: extern int xflag; /* -x: cxref style output */
1.8 ! tobias 71: extern bool _wht[], _itk[], _btk[];
1.1 deraadt 72: extern char lbuf[LINE_MAX];
73: extern char *lbp;
74: extern char searchar; /* ex search character */
75:
1.3 millert 76: extern int cicmp(char *);
1.7 fgsch 77: extern void get_line(void);
1.3 millert 78: extern void pfnote(char *, int);
79: extern int skip_key(int);
80: extern void put_entries(NODE *);
81: extern void toss_yysec(void);
82: extern void l_entries(void);
83: extern void y_entries(void);
84: extern int PF_funcs(void);
85: extern void c_entries(void);
1.4 pjanzen 86: extern void skip_comment(int);