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 */
24 #define WHOLE_FILE -1L
30 /* Maintains the state of the tag file.
32 typedef struct eTagFile
{
36 struct sNumTags
{ unsigned long added
, prev
; } numTags
;
37 struct sMax
{ size_t line
, tag
, file
; } max
;
46 typedef struct sTagFields
{
47 unsigned int count
; /* number of additional extension flags */
48 const char *const *label
; /* list of labels for extension flags */
49 const char *const *value
; /* list of values for extension flags */
52 /* Information about the current tag candidate.
54 typedef struct sTagEntryInfo
{
55 boolean lineNumberEntry
;/* pattern or line number entry */
56 unsigned long lineNumber
; /* line number of tag */
57 MIOPos filePosition
; /* file position of line containing tag */
58 const char* language
; /* language of source file */
59 boolean isFileScope
; /* is tag visible only within source file? */
60 boolean isFileEntry
; /* is this just an entry for a file name? */
61 boolean truncateLine
; /* truncate tag line at end of tag name? */
62 const char *sourceFileName
; /* name of source file */
63 const char *name
; /* name of the tag */
64 const char *kindName
; /* kind of tag */
65 char kind
; /* single character representation of kind */
68 const char* fileScope
;
69 const char* implementation
;
70 const char* inheritance
;
71 const char* scope
[2]; /* value and key */
72 const char *signature
; /* Argument list for functions and macros with arguments */
74 } extensionFields
; /* list of extension fields*/
80 extern tagFile TagFile
;
85 extern void freeTagFileResources (void);
86 extern const char *tagFileName (void);
87 extern void copyBytes (MIO
* const fromMio
, MIO
* const toMio
, const long size
);
88 extern void copyFile (const char *const from
, const char *const to
, const long size
);
89 extern void openTagFile (void);
90 extern void closeTagFile (const boolean resize
);
91 extern void beginEtagsFile (void);
92 extern void endEtagsFile (const char *const name
);
93 extern void makeTagEntry (const tagEntryInfo
*const tag
);
94 extern void initTagEntry (tagEntryInfo
*const e
, const char *const name
);
98 /* vi:set tabstop=8 shiftwidth=4: */