geany  1.38
About: Geany is a text editor (using GTK2) with basic features of an integrated development environment (syntax highlighting, code folding, symbol name auto-completion, ...). F: office T: editor programming GTK+ IDE
  Fossies Dox: geany-1.38.tar.bz2  ("unofficial" and yet experimental doxygen-generated source code documentation)  

xtag.c File Reference
#include "general.h"
#include "ctags.h"
#include "debug.h"
#include "options.h"
#include "options_p.h"
#include "parse_p.h"
#include "routines.h"
#include "trashbox.h"
#include "writer_p.h"
#include "xtag.h"
#include "xtag_p.h"
#include <string.h>
#include <ctype.h>
Include dependency graph for xtag.c:

Go to the source code of this file.


struct  sXtagObject


typedef struct sXtagObject xtagObject
typedef bool(* xtagPredicate) (xtagObject *pobj, langType language, const void *user_data)


static bool isPseudoTagsEnabled (xtagDefinition *pdef)
static bool isPseudoTagsFixed (xtagDefinition *pdef)
static void enableFileKind (xtagDefinition *pdef, bool state)
static xtagObjectgetXtagObject (xtagType type)
xtagDefinitiongetXtagDefinition (xtagType type)
static xtagType getXtagTypeGeneric (xtagPredicate predicate, langType language, const void *user_data)
static bool xtagEqualByLetter (xtagObject *pobj, langType language, const void *user_data)
xtagType getXtagTypeForLetter (char letter)
static bool xtagEqualByNameAndLanguage (xtagObject *pobj, langType language, const void *user_data)
xtagType getXtagTypeForNameAndLanguage (const char *name, langType language)
struct colprintTablextagColprintTableNew (void)
static void xtagColprintAddLine (struct colprintTable *table, int xtype)
void xtagColprintAddCommonLines (struct colprintTable *table)
void xtagColprintAddLanguageLines (struct colprintTable *table, langType language)
static int xtagColprintCompareLines (struct colprintLine *a, struct colprintLine *b)
void xtagColprintTablePrint (struct colprintTable *table, bool withListHeader, bool machinable, FILE *fp)
bool isXtagEnabled (xtagType type)
bool isXtagFixed (xtagType type)
bool enableXtag (xtagType type, bool state)
bool isCommonXtag (xtagType type)
int getXtagOwner (xtagType type)
const char * getXtagName (xtagType type)
const char * getXtagDescription (xtagType type)
void initXtagObjects (void)
int countXtags (void)
static void updateSiblingXtag (xtagType type, const char *name)
int defineXtag (xtagDefinition *def, langType language)
xtagType nextSiblingXtag (xtagType type)


static xtagDefinition xtagDefinitions []
static unsigned int xtagObjectUsed
static unsigned int xtagObjectAllocated
static xtagObjectxtagObjects

Typedef Documentation

◆ xtagObject

typedef struct sXtagObject xtagObject

◆ xtagPredicate

typedef bool(* xtagPredicate) (xtagObject *pobj, langType language, const void *user_data)

Definition at line 99 of file xtag.c.

Function Documentation

◆ countXtags()

int countXtags ( void  )

◆ defineXtag()

◆ enableFileKind()

static void enableFileKind ( xtagDefinition pdef,
bool  state 

Definition at line 52 of file xtag.c.

References sXtagDefinition::enabled, and enableDefaultFileKind().

◆ enableXtag()

◆ getXtagDefinition()

xtagDefinition * getXtagDefinition ( xtagType  type)

◆ getXtagDescription()

const char * getXtagDescription ( xtagType  type)

Definition at line 299 of file xtag.c.

References sXtagDefinition::description, getXtagDefinition(), and NULL.

Referenced by makeExtraDescriptionPseudoTag().

◆ getXtagName()

const char * getXtagName ( xtagType  type)

◆ getXtagObject()

static xtagObject * getXtagObject ( xtagType  type)

◆ getXtagOwner()

int getXtagOwner ( xtagType  type)

Definition at line 285 of file xtag.c.

References getXtagObject(), and sXtagObject::language.

Referenced by makeExtraDescriptionsPseudoTags(), and resetXtags().

◆ getXtagTypeForLetter()

xtagType getXtagTypeForLetter ( char  letter)

Definition at line 127 of file xtag.c.

References getXtagTypeGeneric(), LANG_IGNORE, and xtagEqualByLetter().

Referenced by processExtraTagsOption().

◆ getXtagTypeForNameAndLanguage()

xtagType getXtagTypeForNameAndLanguage ( const char *  name,
langType  language 

◆ getXtagTypeGeneric()

static xtagType getXtagTypeGeneric ( xtagPredicate  predicate,
langType  language,
const void *  user_data 

◆ initXtagObjects()

◆ isCommonXtag()

bool isCommonXtag ( xtagType  type)

Definition at line 280 of file xtag.c.

References XTAG_COUNT.

◆ isPseudoTagsEnabled()

static bool isPseudoTagsEnabled ( xtagDefinition pdef)

Definition at line 34 of file xtag.c.

References isDestinationStdout(), writerCanPrintPtag(), and writerPrintPtagByDefault().

◆ isPseudoTagsFixed()

static bool isPseudoTagsFixed ( xtagDefinition pdef)

Definition at line 44 of file xtag.c.

References writerCanPrintPtag().

◆ isXtagEnabled()

◆ isXtagFixed()

bool isXtagFixed ( xtagType  type)

Definition at line 247 of file xtag.c.

References Assert, getXtagDefinition(), and sXtagDefinition::isFixed.

Referenced by enableXtag(), and xtagColprintAddLine().

◆ nextSiblingXtag()

xtagType nextSiblingXtag ( xtagType  type)

Definition at line 383 of file xtag.c.

References sXtagObject::sibling, and xtagObjects.

Referenced by enableLanguageXtag().

◆ updateSiblingXtag()

static void updateSiblingXtag ( xtagType  type,
const char *  name 

Definition at line 332 of file xtag.c.

References Assert, sXtagObject::def, sXtagDefinition::name, name, sXtagObject::sibling, XTAG_UNKNOWN, and xtagObjects.

Referenced by defineXtag().

◆ xtagColprintAddCommonLines()

void xtagColprintAddCommonLines ( struct colprintTable table)

Definition at line 175 of file xtag.c.

References XTAG_COUNT, and xtagColprintAddLine().

Referenced by processListExtrasOption().

◆ xtagColprintAddLanguageLines()

void xtagColprintAddLanguageLines ( struct colprintTable table,
langType  language 

◆ xtagColprintAddLine()

◆ xtagColprintCompareLines()

static int xtagColprintCompareLines ( struct colprintLine *  a,
struct colprintLine *  b 

Definition at line 192 of file xtag.c.

References colprintLineGetColumn(), and RSV_NONE.

Referenced by xtagColprintTablePrint().

◆ xtagColprintTableNew()

struct colprintTable * xtagColprintTableNew ( void  )

Definition at line 148 of file xtag.c.

References colprintTableNew(), and NULL.

Referenced by processListExtrasOption().

◆ xtagColprintTablePrint()

void xtagColprintTablePrint ( struct colprintTable table,
bool  withListHeader,
bool  machinable,
FILE *  fp 

Definition at line 228 of file xtag.c.

References colprintTablePrint(), colprintTableSort(), and xtagColprintCompareLines().

Referenced by processListExtrasOption().

◆ xtagEqualByLetter()

static bool xtagEqualByLetter ( xtagObject pobj,
langType  language,
const void *  user_data 

Definition at line 121 of file xtag.c.

References sXtagObject::def, and sXtagDefinition::letter.

Referenced by getXtagTypeForLetter().

◆ xtagEqualByNameAndLanguage()

static bool xtagEqualByNameAndLanguage ( xtagObject pobj,
langType  language,
const void *  user_data 

Variable Documentation

◆ xtagDefinitions

xtagDefinition xtagDefinitions[]
Initial value:
= {
{ true, 'F', "fileScope",
"Include tags of file scope" },
{ false, 'f', "inputFile",
"Include an entry for the base file name of every input file",
{ false, 'p', "pseudo",
"Include pseudo tags",
{ false, 'q', "qualified",
"Include an extra class-qualified tag entry for each tag"},
{ false, 'r', "reference",
"Include reference tags"},
{ false, 'g', "guest",
"Include tags generated by guest parsers"},
{ true, 's', "subparser",
"Include tags generated by subparsers"},
{ true, '\0', "anonymous",
"Include tags for non-named objects like lambda"},
#define NULL
Definition: rbtree.h:150
static bool isPseudoTagsFixed(xtagDefinition *pdef)
Definition: xtag.c:44
static bool isPseudoTagsEnabled(xtagDefinition *pdef)
Definition: xtag.c:34
static void enableFileKind(xtagDefinition *pdef, bool state)
Definition: xtag.c:52

Definition at line 58 of file xtag.c.

Referenced by initXtagObjects().

◆ xtagObjectAllocated

unsigned int xtagObjectAllocated

Definition at line 83 of file xtag.c.

Referenced by defineXtag(), and initXtagObjects().

◆ xtagObjects

xtagObject* xtagObjects

◆ xtagObjectUsed

unsigned int xtagObjectUsed