prettyness police
[unix-history] / usr / src / usr.bin / ctags / ctags.h
CommitLineData
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
28typedef 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
38extern char *curfile; /* current input file name */
39extern NODE *head; /* head of the sorted binary tree */
40extern FILE *inf; /* ioptr for current input file */
41extern FILE *outf; /* ioptr for current output file */
2b30892c 42extern long lineftell; /* ftell after getc( inf ) == '\n' */
d3acad8d
JSP
43extern int lineno; /* line number of current line */
44extern int dflag; /* -d: non-macro defines */
45extern int tflag; /* -t: create tags for typedefs */
46extern int vflag; /* -v: vgrind style index output */
47extern int wflag; /* -w: suppress warnings */
48extern int xflag; /* -x: cxref style output */
49extern bool _wht[], _etk[], _itk[], _btk[], _gd[];
50extern char lbuf[LINE_MAX];
51extern char *lbp;
52extern char searchar; /* ex search character */
53
54extern int cicmp __P((char *));
55extern void getline __P((void));
56extern void pfnote __P((char *, int));
57extern int skip_key __P((int));
58extern void put_entries __P((NODE *));
59extern void toss_yysec __P((void));
60extern void l_entries __P((void));
61extern void y_entries __P((void));
62extern int PF_funcs __P((void));
63extern void c_entries __P((void));
64extern void skip_comment __P((void));