Branch: refs/heads/master Author: Jiří Techet techet@gmail.com Committer: Jiří Techet techet@gmail.com Date: Sat, 18 Oct 2014 19:40:10 UTC Commit: 74706374eb1afcf8e3db422365f722e33dd1715a https://github.com/geany/geany/commit/74706374eb1afcf8e3db422365f722e33dd171...
Log Message: ----------- Remove the unused inactive flag in TM
It is set only when read from a file but it never gets written to the file with the TRUE value.
Modified Paths: -------------- tagmanager/src/tm_source_file.c tagmanager/src/tm_source_file.h tagmanager/src/tm_tag.c tagmanager/src/tm_tag.h
Modified: tagmanager/src/tm_source_file.c 1 lines changed, 0 insertions(+), 1 deletions(-) =================================================================== @@ -127,7 +127,6 @@ gboolean tm_source_file_init(TMSourceFile *source_file, const char *file_name
source_file->tags_array = NULL;
- source_file->inactive = FALSE; if (NULL == LanguageTable) { initializeParsing();
Modified: tagmanager/src/tm_source_file.h 1 lines changed, 0 insertions(+), 1 deletions(-) =================================================================== @@ -39,7 +39,6 @@ extern "C" typedef struct { langType lang; /*!< Programming language used */ - gboolean inactive; /*!< Whether this file should be scanned for tags */ char *file_name; /*!< Full file name (inc. path) */ char *short_name; /*!< Just the name of the file (without the path) */ GPtrArray *tags_array; /*!< Tags obtained by parsing the object */
Modified: tagmanager/src/tm_tag.c 14 lines changed, 2 insertions(+), 12 deletions(-) =================================================================== @@ -95,7 +95,7 @@ enum TA_ACCESS, TA_IMPL, TA_LANG, - TA_INACTIVE, + TA_INACTIVE, /* Obsolete */ TA_POINTER };
@@ -221,7 +221,6 @@ gboolean tm_tag_init(TMTag *tag, TMSourceFile *file, const tagEntryInfo *tag_ent tag->name = g_strdup(file->file_name); tag->type = tm_tag_file_t; tag->atts.file.lang = file->lang; - tag->atts.file.inactive = FALSE; return TRUE; } } @@ -341,14 +340,7 @@ gboolean tm_tag_init_from_file(TMTag *tag, TMSourceFile *file, FILE *fp) else tag->atts.file.lang = atoi((gchar*)start + 1); break; - case TA_INACTIVE: - if (tm_tag_file_t != tag->type) - { - g_warning("Got inactive attribute for non-file tag %s", tag->name); - return FALSE; - } - else - tag->atts.file.inactive = (gboolean) atoi((gchar*)start + 1); + case TA_INACTIVE: /* Obsolete */ break; case TA_ACCESS: tag->atts.entry.access = *(start + 1); @@ -599,8 +591,6 @@ gboolean tm_tag_write(TMTag *tag, FILE *fp, guint attrs) fprintf(fp, "%c%ld", TA_TIME, tag->atts.file.timestamp); if (attrs & tm_tag_attr_lang_t) fprintf(fp, "%c%d", TA_LANG, tag->atts.file.lang); - if ((attrs & tm_tag_attr_inactive_t) && tag->atts.file.inactive) - fprintf(fp, "%c%d", TA_INACTIVE, tag->atts.file.inactive); } else {
Modified: tagmanager/src/tm_tag.h 3 lines changed, 1 insertions(+), 2 deletions(-) =================================================================== @@ -96,7 +96,7 @@ typedef enum tm_tag_attr_access_t = 2048, /*!< Access type (public/protected/private) */ tm_tag_attr_impl_t = 4096, /*!< Implementation (e.g. virtual) */ tm_tag_attr_lang_t = 8192, /*!< Language (File tag only) */ - tm_tag_attr_inactive_t = 16384, /*!< Inactive file (File tag only) */ + tm_tag_attr_inactive_t = 16384, /*!< Inactive file (File tag only, obsolete) */ tm_tag_attr_pointer_t = 32768, /*!< Pointer type */ tm_tag_attr_max_t = 65535 /*!< Maximum value */ } TMTagAttrType; @@ -145,7 +145,6 @@ typedef struct _TMTag { time_t timestamp; /*!< Time of parsing of the file */ langType lang; /*!< Programming language of the file */ - gboolean inactive; /*!< Whether this file is to be parsed */ } file; } atts; gint refcount; /*!< the reference count of the tag */
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).