[geany/geany] f23b56: entry: make makeTakEntry() implementation closer to uctags
Jiří Techet
git-noreply at xxxxx
Mon Dec 17 21:05:43 UTC 2018
Branch: refs/heads/master
Author: Jiří Techet <techet at gmail.com>
Committer: Jiří Techet <techet at gmail.com>
Date: Sun, 09 Oct 2016 13:22:42 UTC
Commit: f23b56b0272c4fd12f2607cce6c692be21951e8b
https://github.com/geany/geany/commit/f23b56b0272c4fd12f2607cce6c692be21951e8b
Log Message:
-----------
entry: make makeTakEntry() implementation closer to uctags
For now, comment-out code that we don't use and that doesn't work.
Modified Paths:
--------------
ctags/main/entry.c
ctags/main/entry.h
Modified: ctags/main/entry.c
67 lines changed, 56 insertions(+), 11 deletions(-)
===================================================================
@@ -436,27 +436,72 @@ static int replacementTruncate (const char *const name, const long size)
#endif
-
/*
* Tag entry management
*/
+static void writeTagEntry (const tagEntryInfo *const tag)
+{
+ int length = 0;
+
+/* if (tag->placeholder)
+ return;
+ if (! tag->kind->enabled)
+ return;
+ if (tag->extensionFields.roleIndex != ROLE_INDEX_DEFINITION
+ && ! isXtagEnabled (XTAG_REFERENCE_TAGS))
+ return;
+*/
+ DebugStatement ( debugEntry (tag); )
+/* Assert (writer); */
+/*
+ if (includeExtensionFlags ()
+ && isXtagEnabled (XTAG_QUALIFIED_TAGS)
+ && doesInputLanguageRequestAutomaticFQTag ())
+ buildFqTagCache (tag);
+*/
+ /* length = writer->writeEntry (TagFile.mio, tag, writerData); */
+ if (TagEntryFunction != NULL)
+ length = TagEntryFunction(tag, TagEntryUserData);
+
+ ++TagFile.numTags.added;
+ rememberMaxLengths (strlen (tag->name), (size_t) length);
+ DebugStatement ( mio_flush (TagFile.mio); )
+
+ /*abort_if_ferror (TagFile.mio);*/
+}
-extern void makeTagEntry (const tagEntryInfo *const tag)
+extern int makeTagEntry (const tagEntryInfo *const tag)
{
+ int r = CORK_NIL;
Assert (tag->name != NULL);
- if (tag->name [0] == '\0')
- error (WARNING, "ignoring null tag in %s", getInputFileName ());
- else
- {
- int length = 0;
- if (NULL != TagEntryFunction)
- length = TagEntryFunction(tag, TagEntryUserData);
+/*
+ if (getInputLanguageFileKind() != tag->kind)
+ {
+ if (! isInputLanguageKindEnabled (tag->kind->letter) &&
+ (tag->extensionFields.roleIndex == ROLE_INDEX_DEFINITION))
+ return CORK_NIL;
+ if ((tag->extensionFields.roleIndex != ROLE_INDEX_DEFINITION)
+ && (! tag->kind->roles[tag->extensionFields.roleIndex].enabled))
+ return CORK_NIL;
+ }
+*/
- ++TagFile.numTags.added;
- rememberMaxLengths (strlen (tag->name), (size_t) length);
+ if (tag->name [0] == '\0' && (!tag->placeholder))
+ {
+/* if (!doesInputLanguageAllowNullTag()) */
+ error (WARNING, "ignoring null tag in %s(line: %lu)",
+ getInputFileName (), tag->lineNumber);
+ goto out;
}
+
+/* if (TagFile.cork)
+ r = queueTagEntry (tag);
+ else*/
+ writeTagEntry (tag);
+out:
+ return r;
}
extern void initTagEntry (tagEntryInfo *const e, const char *const name, const kindOption *kind)
Modified: ctags/main/entry.h
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -113,7 +113,7 @@ extern void freeTagFileResources (void);
extern const char *tagFileName (void);
extern void openTagFile (void);
extern void closeTagFile (const bool resize);
-extern void makeTagEntry (const tagEntryInfo *const tag);
+extern int makeTagEntry (const tagEntryInfo *const tag);
extern void initTagEntry (tagEntryInfo *const e, const char *const name, const kindOption *kind);
extern unsigned long numTagsAdded(void);
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Commits
mailing list