-
Notifications
You must be signed in to change notification settings - Fork 0
/
entry.h
103 lines (89 loc) · 2.96 KB
/
entry.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
/*
* $Id: entry.h 443 2006-05-30 04:37:13Z darren $
*
* Copyright (c) 1998-2002, Darren Hiebert
*
* This source code is released for free distribution under the terms of the
* GNU General Public License.
*
* External interface to entry.c
*/
#ifndef _ENTRY_H
#define _ENTRY_H
/*
* INCLUDE FILES
*/
#include "general.h" /* must always come first */
#include <stdio.h>
#include "vstring.h"
/*
* MACROS
*/
#define WHOLE_FILE -1L
/*
* DATA DECLARATIONS
*/
/* Maintains the state of the tag file.
*/
typedef struct eTagFile {
char *name;
char *directory;
FILE *fp;
struct sNumTags { unsigned long added, prev; } numTags;
struct sMax { size_t line, tag, file; } max;
struct sEtags {
char *name;
FILE *fp;
size_t byteCount;
} etags;
vString *vLine;
} tagFile;
typedef struct sTagFields {
unsigned int count; /* number of additional extension flags */
const char *const *label; /* list of labels for extension flags */
const char *const *value; /* list of values for extension flags */
} tagFields;
/* Information about the current tag candidate.
*/
typedef struct sTagEntryInfo {
boolean lineNumberEntry; /* pattern or line number entry */
unsigned long lineNumber; /* line number of tag */
fpos_t filePosition; /* file position of line containing tag */
const char* language; /* language of source file */
boolean isFileScope; /* is tag visibile only within source file? */
boolean isFileEntry; /* is this just an entry for a file name? */
boolean truncateLine; /* truncate tag line at end of tag name? */
const char *sourceFileName; /* name of source file */
const char *name; /* name of the tag */
const char *kindName; /* kind of tag */
char kind; /* single character representation of kind */
struct {
const char* access;
const char* fileScope;
const char* implementation;
const char* inheritance;
const char* scope [2]; /* value and key */
const char* signature;
/* type (union/struct/etc.) and name for a variable or typedef. */
const char* typeRef [2]; /* e.g., "struct" and struct name */
} extensionFields; /* list of extension fields*/
} tagEntryInfo;
/*
* GLOBAL VARIABLES
*/
extern tagFile TagFile;
/*
* FUNCTION PROTOTYPES
*/
extern void freeTagFileResources (void);
extern const char *tagFileName (void);
extern void copyBytes (FILE* const fromFp, FILE* const toFp, const long size);
extern void copyFile (const char *const from, const char *const to, const long size);
extern void openTagFile (void);
extern void closeTagFile (const boolean resize);
extern void beginEtagsFile (void);
extern void endEtagsFile (const char *const name);
extern void makeTagEntry (const tagEntryInfo *const tag);
extern void initTagEntry (tagEntryInfo *const e, const char *const name);
#endif /* _ENTRY_H */
/* vi:set tabstop=4 shiftwidth=4: */