2005-11-22 12:26:26 +00:00
|
|
|
/*
|
|
|
|
*
|
|
|
|
* Copyright (c) 1998-2001, 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 */
|
|
|
|
|
2011-03-05 22:40:50 +00:00
|
|
|
#include <mio/mio.h>
|
2005-11-22 12:26:26 +00:00
|
|
|
|
|
|
|
#include "vstring.h"
|
|
|
|
|
|
|
|
/*
|
|
|
|
* MACROS
|
|
|
|
*/
|
|
|
|
#define WHOLE_FILE -1L
|
|
|
|
|
|
|
|
/*
|
|
|
|
* DATA DECLARATIONS
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* Maintains the state of the tag file.
|
|
|
|
*/
|
|
|
|
typedef struct eTagFile {
|
|
|
|
char *name;
|
|
|
|
char *directory;
|
2011-03-05 22:40:50 +00:00
|
|
|
MIO *mio;
|
2005-11-22 12:26:26 +00:00
|
|
|
struct sNumTags { unsigned long added, prev; } numTags;
|
|
|
|
struct sMax { size_t line, tag, file; } max;
|
|
|
|
struct sEtags {
|
|
|
|
char *name;
|
2011-03-05 22:40:50 +00:00
|
|
|
MIO *mio;
|
2005-11-22 12:26:26 +00:00
|
|
|
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 */
|
2011-03-05 22:40:50 +00:00
|
|
|
MIOPos filePosition; /* file position of line containing tag */
|
2008-11-07 14:37:17 +00:00
|
|
|
int bufferPosition; /* buffer position of line containing tag */
|
2005-11-22 12:26:26 +00:00
|
|
|
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 *arglist; /* Argument list for functions and macros with arguments */
|
|
|
|
const char *varType;
|
|
|
|
} extensionFields; /* list of extension fields*/
|
|
|
|
int type;
|
|
|
|
unsigned long seekPosition;
|
|
|
|
} tagEntryInfo;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* GLOBAL VARIABLES
|
|
|
|
*/
|
|
|
|
extern tagFile TagFile;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* FUNCTION PROTOTYPES
|
|
|
|
*/
|
|
|
|
extern void freeTagFileResources (void);
|
|
|
|
extern const char *tagFileName (void);
|
2011-03-05 22:40:50 +00:00
|
|
|
extern void copyBytes (MIO* const fromMio, MIO* const toMio, const long size);
|
2005-11-22 12:26:26 +00:00
|
|
|
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);
|
2010-04-18 21:42:38 +00:00
|
|
|
extern void setTagArglistByName (const char *tag_name, const char *arglist);
|
2005-11-22 12:26:26 +00:00
|
|
|
extern void initTagEntry (tagEntryInfo *const e, const char *const name);
|
|
|
|
|
|
|
|
#endif /* _ENTRY_H */
|
|
|
|
|
|
|
|
/* vi:set tabstop=8 shiftwidth=4: */
|