2008-04-16 Johannes Schmid <jhs@gnome.org>
[anjuta-git-plugin.git] / tagmanager / entry.h
blob0ba758fc3f17ba21e86dbc94f5eac17e5b84c365
1 /*
2 * $Id$
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;
76 /* type (union/struct/etc.) and name for a variable or typedef. */
77 const char* typeRef [2]; /* e.g., "struct" and struct name */
79 } extensionFields; /* list of extension fields*/
80 } tagEntryInfo;
83 * GLOBAL VARIABLES
85 extern tagFile TagFile;
88 * FUNCTION PROTOTYPES
90 extern void freeTagFileResources (void);
91 extern const char *tagFileName (void);
92 extern void copyBytes (FILE* const fromFp, FILE* const toFp, const long size);
93 extern void copyFile (const char *const from, const char *const to, const long size);
94 extern void openTagFile (void);
95 extern void closeTagFile (const boolean resize);
96 extern void beginEtagsFile (void);
97 extern void endEtagsFile (const char *const name);
98 extern void makeTagEntry (const tagEntryInfo *const tag);
99 extern void initTagEntry (tagEntryInfo *const e, const char *const name);
101 #endif /* _ENTRY_H */
103 /* vi:set tabstop=4 shiftwidth=4: */