Commit | Line | Data |
---|---|---|
2b30892c | 1 | /* |
374464e3 KB |
2 | * Copyright (c) 1987, 1993 |
3 | * The Regents of the University of California. All rights reserved. | |
ffa8a268 | 4 | * |
a3bb5b82 | 5 | * %sccs.include.redist.c% |
ffa8a268 | 6 | * |
d3acad8d | 7 | * @(#)ctags.h 8.2 (Berkeley) %G% |
2b30892c KB |
8 | */ |
9 | ||
2b30892c KB |
10 | #define bool char |
11 | ||
12 | #define YES 1 | |
13 | #define NO 0 | |
14 | #define EOS '\0' | |
15 | ||
16 | #define ENDLINE 50 /* max length of pattern */ | |
17 | #define MAXTOKEN 250 /* max size of single token */ | |
18 | ||
19 | #define SETLINE {++lineno;lineftell = ftell(inf);} | |
20 | #define GETC(op,exp) ((c = getc(inf)) op (int)exp) | |
21 | ||
d3acad8d JSP |
22 | #define iswhite(arg) (_wht[(unsigned)arg]) /* T if char is white */ |
23 | #define begtoken(arg) (_btk[(unsigned)arg]) /* T if char can start token */ | |
24 | #define intoken(arg) (_itk[(unsigned)arg]) /* T if char can be in token */ | |
25 | #define endtoken(arg) (_etk[(unsigned)arg]) /* T if char ends tokens */ | |
26 | #define isgood(arg) (_gd[(unsigned)arg]) /* T if char can be after ')' */ | |
2b30892c KB |
27 | |
28 | typedef struct nd_st { /* sorting structure */ | |
29 | struct nd_st *left, | |
30 | *right; /* left and right sons */ | |
31 | char *entry, /* function or type name */ | |
32 | *file, /* file name */ | |
33 | *pat; /* search pattern */ | |
34 | int lno; /* for -x option */ | |
35 | bool been_warned; /* set if noticed dup */ | |
36 | } NODE; | |
37 | ||
d3acad8d JSP |
38 | extern char *curfile; /* current input file name */ |
39 | extern NODE *head; /* head of the sorted binary tree */ | |
40 | extern FILE *inf; /* ioptr for current input file */ | |
41 | extern FILE *outf; /* ioptr for current output file */ | |
2b30892c | 42 | extern long lineftell; /* ftell after getc( inf ) == '\n' */ |
d3acad8d JSP |
43 | extern int lineno; /* line number of current line */ |
44 | extern int dflag; /* -d: non-macro defines */ | |
45 | extern int tflag; /* -t: create tags for typedefs */ | |
46 | extern int vflag; /* -v: vgrind style index output */ | |
47 | extern int wflag; /* -w: suppress warnings */ | |
48 | extern int xflag; /* -x: cxref style output */ | |
49 | extern bool _wht[], _etk[], _itk[], _btk[], _gd[]; | |
50 | extern char lbuf[LINE_MAX]; | |
51 | extern char *lbp; | |
52 | extern char searchar; /* ex search character */ | |
53 | ||
54 | extern int cicmp __P((char *)); | |
55 | extern void getline __P((void)); | |
56 | extern void pfnote __P((char *, int)); | |
57 | extern int skip_key __P((int)); | |
58 | extern void put_entries __P((NODE *)); | |
59 | extern void toss_yysec __P((void)); | |
60 | extern void l_entries __P((void)); | |
61 | extern void y_entries __P((void)); | |
62 | extern int PF_funcs __P((void)); | |
63 | extern void c_entries __P((void)); | |
64 | extern void skip_comment __P((void)); |