Handle template expressions that may use the << or >> operators
[arduino-ctags.git] / entry.h
blob323c1c5799771b56e47a66ff14d4fe70d0373de7
1 /*
2 * $Id: entry.h 443 2006-05-30 04:37:13Z darren $
4 * Copyright (c) 1998-2002, Darren Hiebert
6 * This source code is released for free distribution under the terms of the
7 * GNU General Public License.
9 * External interface to entry.c
11 #ifndef _ENTRY_H
12 #define _ENTRY_H
15 * INCLUDE FILES
17 #include "general.h" /* must always come first */
19 #include <stdio.h>
21 #include "vstring.h"
24 * MACROS
26 #define WHOLE_FILE -1L
29 * DATA DECLARATIONS
32 /* Maintains the state of the tag file.
34 typedef struct eTagFile {
35 char *name;
36 char *directory;
37 FILE *fp;
38 struct sNumTags { unsigned long added, prev; } numTags;
39 struct sMax { size_t line, tag, file; } max;
40 struct sEtags {
41 char *name;
42 FILE *fp;
43 size_t byteCount;
44 } etags;
45 vString *vLine;
46 } tagFile;
48 typedef struct sTagFields {
49 unsigned int count; /* number of additional extension flags */
50 const char *const *label; /* list of labels for extension flags */
51 const char *const *value; /* list of values for extension flags */
52 } tagFields;
54 /* Information about the current tag candidate.
56 typedef struct sTagEntryInfo {
57 boolean lineNumberEntry; /* pattern or line number entry */
58 unsigned long lineNumber; /* line number of tag */
59 fpos_t filePosition; /* file position of line containing tag */
60 const char* language; /* language of source file */
61 boolean isFileScope; /* is tag visibile only within source file? */
62 boolean isFileEntry; /* is this just an entry for a file name? */
63 boolean truncateLine; /* truncate tag line at end of tag name? */
64 const char *sourceFileName; /* name of source file */
65 const char *name; /* name of the tag */
66 const char *kindName; /* kind of tag */
67 char kind; /* single character representation of kind */
68 struct {
69 const char* access;
70 const char* fileScope;
71 const char* implementation;
72 const char* inheritance;
73 const char* scope [2]; /* value and key */
74 const char* signature;
75 const char* returnType;
77 /* type (union/struct/etc.) and name for a variable or typedef. */
78 const char* typeRef [2]; /* e.g., "struct" and struct name */
80 } extensionFields; /* list of extension fields*/
81 } tagEntryInfo;
84 * GLOBAL VARIABLES
86 extern tagFile TagFile;
89 * FUNCTION PROTOTYPES
91 extern void freeTagFileResources (void);
92 extern const char *tagFileName (void);
93 extern void copyBytes (FILE* const fromFp, FILE* const toFp, const long size);
94 extern void copyFile (const char *const from, const char *const to, const long size);
95 extern void openTagFile (void);
96 extern void closeTagFile (const boolean resize);
97 extern void beginEtagsFile (void);
98 extern void endEtagsFile (const char *const name);
99 extern void makeTagEntry (const tagEntryInfo *const tag);
100 extern void initTagEntry (tagEntryInfo *const e, const char *const name);
102 #endif /* _ENTRY_H */
104 /* vi:set tabstop=4 shiftwidth=4: */