[BACK]Return to ctags.h CVS log [TXT][DIR] Up to [local] / src / usr.bin / ctags

Annotation of src/usr.bin/ctags/ctags.h, Revision 1.2

1.2     ! deraadt     1: /*     $OpenBSD: ctags.h,v 1.3 1995/03/26 20:14:07 glass 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.
                     16:  * 3. All advertising materials mentioning features or use of this software
                     17:  *    must display the following acknowledgement:
                     18:  *     This product includes software developed by the University of
                     19:  *     California, Berkeley and its contributors.
                     20:  * 4. Neither the name of the University nor the names of its contributors
                     21:  *    may be used to endorse or promote products derived from this software
                     22:  *    without specific prior written permission.
                     23:  *
                     24:  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
                     25:  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
                     26:  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
                     27:  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
                     28:  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
                     29:  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
                     30:  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
                     31:  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
                     32:  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
                     33:  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
                     34:  * SUCH DAMAGE.
                     35:  *
                     36:  *     @(#)ctags.h     8.3 (Berkeley) 4/2/94
                     37:  */
                     38:
                     39: #define        bool    char
                     40:
                     41: #define        YES             1
                     42: #define        NO              0
                     43: #define        EOS             '\0'
                     44:
                     45: #define        ENDLINE         50              /* max length of pattern */
                     46: #define        MAXTOKEN        250             /* max size of single token */
                     47:
                     48: #define        SETLINE         {++lineno;lineftell = ftell(inf);}
                     49: #define        GETC(op,exp)    ((c = getc(inf)) op (int)exp)
                     50:
                     51: #define        iswhite(arg)    (_wht[(unsigned)arg])   /* T if char is white */
                     52: #define        begtoken(arg)   (_btk[(unsigned)arg])   /* T if char can start token */
                     53: #define        intoken(arg)    (_itk[(unsigned)arg])   /* T if char can be in token */
                     54: #define        endtoken(arg)   (_etk[(unsigned)arg])   /* T if char ends tokens */
                     55: #define        isgood(arg)     (_gd[(unsigned)arg])    /* T if char can be after ')' */
                     56:
                     57: typedef struct nd_st {                 /* sorting structure */
                     58:        struct nd_st    *left,
                     59:                        *right;         /* left and right sons */
                     60:        char    *entry,                 /* function or type name */
                     61:                *file,                  /* file name */
                     62:                *pat;                   /* search pattern */
                     63:        int     lno;                    /* for -x option */
                     64:        bool    been_warned;            /* set if noticed dup */
                     65: } NODE;
                     66:
                     67: extern char    *curfile;               /* current input file name */
                     68: extern NODE    *head;                  /* head of the sorted binary tree */
                     69: extern FILE    *inf;                   /* ioptr for current input file */
                     70: extern FILE    *outf;                  /* ioptr for current output file */
                     71: extern long    lineftell;              /* ftell after getc( inf ) == '\n' */
                     72: extern int     lineno;                 /* line number of current line */
                     73: extern int     dflag;                  /* -d: non-macro defines */
                     74: extern int     tflag;                  /* -t: create tags for typedefs */
                     75: extern int     vflag;                  /* -v: vgrind style index output */
                     76: extern int     wflag;                  /* -w: suppress warnings */
                     77: extern int     xflag;                  /* -x: cxref style output */
                     78: extern bool    _wht[], _etk[], _itk[], _btk[], _gd[];
                     79: extern char    lbuf[LINE_MAX];
                     80: extern char    *lbp;
                     81: extern char    searchar;               /* ex search character */
                     82:
                     83: extern int     cicmp __P((char *));
                     84: extern void    getline __P((void));
                     85: extern void    pfnote __P((char *, int));
                     86: extern int     skip_key __P((int));
                     87: extern void    put_entries __P((NODE *));
                     88: extern void    toss_yysec __P((void));
                     89: extern void    l_entries __P((void));
                     90: extern void    y_entries __P((void));
                     91: extern int     PF_funcs __P((void));
                     92: extern void    c_entries __P((void));
                     93: extern void    skip_comment __P((void));