25#define CTAGS_FILE "tags"
33 const char *
const fileName,
34 const char *
const pattern,
35 const char *
const parserName,
41static enum filenameSepOp overrideFilenameSeparator (
enum filenameSepOp currentSetting);
51 .printPtagByDefault =
true,
52 .preWriteEntry =
NULL,
53 .postWriteEntry =
NULL,
54 .rescanFailedEntry =
NULL,
58 .overrideFilenameSeparator = overrideFilenameSeparator,
81static enum filenameSepOp overrideFilenameSeparator (
enum filenameSepOp currentSetting)
83 if (currentSetting == FILENAME_SEP_UNSET)
84 return FILENAME_SEP_USE_SLASH;
85 return currentSetting;
92 .printPtagByDefault =
true,
95 .rescanFailedEntry =
NULL,
146 for (
unsigned int i = 0; f[i] >= 0; i++)
231 const char*
const kindKey = isKindKeyEnabled
234 const char*
const kindFmt = isKindKeyEnabled
237 const char*
const scopeKey = isScopeEnabled
240 const char*
const scopeFmt = isScopeEnabled
244 char sep [] = {
';',
'"',
'\0'};
247 const char *str =
NULL;;
249 const char kind_letter_str[2] = {kdef->
letter,
'\0'};
261 str = kind_letter_str;
266 length +=
mio_printf (mio, kindFmt, sep, kindKey, str);
288 length +=
mio_printf (mio, scopeFmt, sep, scopeKey, k, v);
365 const char *
const fileName,
366 const char *
const pattern,
367 const char *
const parserName,
372 const char *xsep = extras?
";\" ":
"";
373 const char *fsep = extras?
":":
"";
379#define OPT(X) ((X)?(X):"")
380 ?
mio_printf (mio,
"%s%s%s%s\t%s\t/%s/%s%s%s%s\n",
382 OPT(fileName),
OPT(pattern),
383 xsep, fieldx, fsep, xptag)
384 :
mio_printf (mio,
"%s%s\t%s\t/%s/%s%s%s%s\n",
386 OPT(fileName),
OPT(pattern),
387 xsep, fieldx, fsep, xptag);
410 error (
WARNING,
"though %c/%s field is enabled, neither %c nor %c field is not enabled",
415 error (
WARNING,
"enable the %c field to make the %c/%s field printable",
424 error (
WARNING,
"though %c/%s field is enabled, %c field is not enabled",
428 error (
WARNING,
"enable the %c field to make the %c/%s field printable",
const tagField * getParserFieldForIndex(const tagEntryInfo *tag, int index)
void error(const errorSelection selection, const char *const format,...)
unsigned char getFieldLetter(fieldType type)
bool doesFieldHaveTabOrNewlineChar(fieldType type, const tagEntryInfo *tag, int index)
const char * renderField(fieldType type, const tagEntryInfo *tag, int index)
bool doesFieldHaveRenderer(fieldType type, bool noEscaping)
bool isFieldEnabled(fieldType type)
bool doesFieldHaveValue(fieldType type, const tagEntryInfo *tag)
bool enableField(fieldType type, bool state, bool warnIfFixedField)
const char * renderFieldNoEscaping(fieldType type, const tagEntryInfo *tag, int index)
const char * getFieldName(fieldType type)
enum eFieldType fieldType
#define CTAGS_ATTR_UNUSED
int mio_printf(MIO *mio, const char *format,...)
mio_printf: @mio: A MIO object @format: A print format string ...: Arguments of the format
int mio_puts(MIO *mio, const char *s)
mio_puts: @mio: A MIO object @s: The string to write
#define includeExtensionFlags()
kindDefinition * getLanguageKind(const langType language, int kindIndex)
#define PSEUDO_TAG_SEPARATOR
#define PSEUDO_TAG_PREFIX
bool rejectionInThisInput
unsigned int lineNumberEntry
unsigned int usedParserFields
int(* writeEntry)(tagWriter *writer, MIO *mio, const tagEntryInfo *const tag, void *clientData)
static tagWriter * writer
const char * getXtagName(xtagType type)