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
17 #include "general.h" /* must always come first */
26 #define WHOLE_FILE -1L
32 /* Maintains the state of the tag file.
34 typedef struct eTagFile
{
38 struct sNumTags
{ unsigned long added
, prev
; } numTags
;
39 struct sMax
{ size_t line
, tag
, file
; } max
;
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 */
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 */
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*/
86 extern tagFile TagFile
;
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: */