3 * Copyright (c) 1998-2001, Darren Hiebert
5 * This source code is released for free distribution under the terms of the
6 * GNU General Public License.
8 * External interface to entry.c
16 #include "general.h" /* must always come first */
25 #define WHOLE_FILE -1L
31 /* Maintains the state of the tag file.
33 typedef struct eTagFile
{
37 struct sNumTags
{ unsigned long added
, prev
; } numTags
;
38 struct sMax
{ size_t line
, tag
, file
; } max
;
47 typedef struct sTagFields
{
48 unsigned int count
; /* number of additional extension flags */
49 const char *const *label
; /* list of labels for extension flags */
50 const char *const *value
; /* list of values for extension flags */
53 /* Information about the current tag candidate.
55 typedef struct sTagEntryInfo
{
56 boolean lineNumberEntry
;/* pattern or line number entry */
57 unsigned long lineNumber
; /* line number of tag */
58 fpos_t filePosition
; /* file position of line containing tag */
59 int bufferPosition
; /* buffer 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 */
70 const char* fileScope
;
71 const char* implementation
;
72 const char* inheritance
;
73 const char* scope
[2]; /* value and key */
74 const char *arglist
; /* Argument list for functions and macros with arguments */
76 } extensionFields
; /* list of extension fields*/
78 unsigned long seekPosition
;
84 extern tagFile TagFile
;
89 extern void freeTagFileResources (void);
90 extern const char *tagFileName (void);
91 extern void copyBytes (FILE* const fromFp
, FILE* const toFp
, const long size
);
92 extern void copyFile (const char *const from
, const char *const to
, const long size
);
93 extern void openTagFile (void);
94 extern void closeTagFile (const boolean resize
);
95 extern void beginEtagsFile (void);
96 extern void endEtagsFile (const char *const name
);
97 extern void makeTagEntry (const tagEntryInfo
*const tag
);
98 extern void setTagArglistByName (const char *tag_name
, const char *arglist
);
99 extern void initTagEntry (tagEntryInfo
*const e
, const char *const name
);
101 #endif /* _ENTRY_H */
103 /* vi:set tabstop=8 shiftwidth=4: */