Version bump.
[geany-mirror.git] / tagmanager / entry.h
blob7a19f116ee411acdb9dc21ef712652a29d25a03e
1 /*
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
9 */
10 #ifndef _ENTRY_H
11 #define _ENTRY_H
14 * INCLUDE FILES
16 #include "general.h" /* must always come first */
18 #include <stdio.h>
20 #include "vstring.h"
23 * MACROS
25 #define WHOLE_FILE -1L
28 * DATA DECLARATIONS
31 /* Maintains the state of the tag file.
33 typedef struct eTagFile {
34 char *name;
35 char *directory;
36 FILE *fp;
37 struct sNumTags { unsigned long added, prev; } numTags;
38 struct sMax { size_t line, tag, file; } max;
39 struct sEtags {
40 char *name;
41 FILE *fp;
42 size_t byteCount;
43 } etags;
44 vString *vLine;
45 } tagFile;
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 */
51 } tagFields;
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 */
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 *arglist; /* Argument list for functions and macros with arguments */
75 const char *varType;
76 } extensionFields; /* list of extension fields*/
77 int type;
78 unsigned long seekPosition;
79 } tagEntryInfo;
82 * GLOBAL VARIABLES
84 extern tagFile TagFile;
87 * FUNCTION PROTOTYPES
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: */