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.
This commit is contained in:
Jiří Techet 2014-10-15 13:49:10 +02:00
parent d686674eca
commit 74706374eb
4 changed files with 3 additions and 16 deletions

View File

@ -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();

View File

@ -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 */

View File

@ -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
{

View File

@ -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 */