Branch: refs/heads/master
Author: Jiří Techet <techet(a)gmail.com>
Committer: Jiří Techet <techet(a)gmail.com>
Date: Fri, 06 May 2016 15:34:26 UTC
Commit: 8c27ea1042e56cce7031545155a294cd4ff18cc8
https://github.com/geany/geany/commit/8c27ea1042e56cce7031545155a294cd4ff18…
Log Message:
-----------
Remove invalid part of a comment
Modified Paths:
--------------
tagmanager/src/tm_source_file.c
Modified: tagmanager/src/tm_source_file.c
3 lines changed, 1 insertions(+), 2 deletions(-)
===================================================================
@@ -166,8 +166,7 @@ static char get_tag_access(const char *access)
/*
Initializes a TMTag structure with information from a tagEntryInfo struct
used by the ctags parsers. Note that the TMTag structure must be malloc()ed
- before calling this function. This function is called by tm_tag_new() - you
- should not need to call this directly.
+ before calling this function.
@param tag The TMTag structure to initialize
@param file Pointer to a TMSourceFile struct (it is assigned to the file member)
@param tag_entry Tag information gathered by the ctags parser
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: Jiří Techet <techet(a)gmail.com>
Committer: Jiří Techet <techet(a)gmail.com>
Date: Fri, 06 May 2016 19:08:24 UTC
Commit: 9ae93e34a00bcc2e3f3a8c672443f5d5db177ce8
https://github.com/geany/geany/commit/9ae93e34a00bcc2e3f3a8c672443f5d5db177…
Log Message:
-----------
Check return value of write_tag()
If we were strict, we should check every single fprintf() int write_tag()
but it's highly improbable that some of the middle fprintf()s fail and
the last one doesn't so the current implementation of write_tag() is
probably sufficient.
Modified Paths:
--------------
tagmanager/src/tm_source_file.c
Modified: tagmanager/src/tm_source_file.c
8 lines changed, 6 insertions(+), 2 deletions(-)
===================================================================
@@ -576,6 +576,7 @@ gboolean tm_source_file_write_tags_file(const gchar *tags_file, GPtrArray *tags_
{
guint i;
FILE *fp;
+ gboolean ret = TRUE;
g_return_val_if_fail(tags_array && tags_file, FALSE);
@@ -588,13 +589,16 @@ gboolean tm_source_file_write_tags_file(const gchar *tags_file, GPtrArray *tags_
{
TMTag *tag = TM_TAG(tags_array->pdata[i]);
- write_tag(tag, fp, tm_tag_attr_type_t
+ ret = write_tag(tag, fp, tm_tag_attr_type_t
| tm_tag_attr_scope_t | tm_tag_attr_arglist_t | tm_tag_attr_vartype_t
| tm_tag_attr_pointer_t);
+
+ if (!ret)
+ break;
}
fclose(fp);
- return TRUE;
+ return ret;
}
/* add argument list of __init__() Python methods to the class tag */
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: Jiří Techet <techet(a)gmail.com>
Committer: Jiří Techet <techet(a)gmail.com>
Date: Fri, 06 May 2016 15:06:57 UTC
Commit: 9b188a20ef77410891231ff36fa950286be1cb8d
https://github.com/geany/geany/commit/9b188a20ef77410891231ff36fa950286be1c…
Log Message:
-----------
Use g_error() instead of g_warning() in parser type verification
Modified Paths:
--------------
tagmanager/src/tm_parser.c
Modified: tagmanager/src/tm_parser.c
21 lines changed, 6 insertions(+), 15 deletions(-)
===================================================================
@@ -592,10 +592,7 @@ void tm_parser_verify_type_mappings(void)
TMParserType lang;
if (TM_PARSER_COUNT > tm_ctags_get_lang_count())
- {
- g_warning("More parsers defined in Geany than in ctags");
- return;
- }
+ g_error("More parsers defined in Geany than in ctags");
for (lang = 0; lang < TM_PARSER_COUNT; lang++)
{
@@ -605,23 +602,17 @@ void tm_parser_verify_type_mappings(void)
guint i;
if (! map->entries || map->size < 1)
- {
- g_warning("No tag types in TM for %s, is the language listed in parser_map?",
+ g_error("No tag types in TM for %s, is the language listed in parser_map?",
tm_ctags_get_lang_name(lang));
- continue;
- }
/* TODO: check also regex parser mappings. At the moment there's no way
* to access regex parser definitions in ctags */
if (tm_ctags_is_using_regex_parser(lang))
continue;
if (map->size != strlen(kinds))
- {
- g_warning("Different number of tag types in TM (%d) and ctags (%d) for %s",
+ g_error("Different number of tag types in TM (%d) and ctags (%d) for %s",
map->size, (int)strlen(kinds), tm_ctags_get_lang_name(lang));
- continue;
- }
memset(presence_map, 0, sizeof(presence_map));
for (i = 0; i < map->size; i++)
@@ -642,10 +633,10 @@ void tm_parser_verify_type_mappings(void)
break;
}
if (!ctags_found)
- g_warning("Tag type '%c' found in TM but not in ctags for %s",
+ g_error("Tag type '%c' found in TM but not in ctags for %s",
map->entries[i].kind, tm_ctags_get_lang_name(lang));
if (!tm_found)
- g_warning("Tag type '%c' found in ctags but not in TM for %s",
+ g_error("Tag type '%c' found in ctags but not in TM for %s",
kinds[i], tm_ctags_get_lang_name(lang));
presence_map[(unsigned char) map->entries[i].kind]++;
@@ -654,7 +645,7 @@ void tm_parser_verify_type_mappings(void)
for (i = 0; i < sizeof(presence_map); i++)
{
if (presence_map[i] > 1)
- g_warning("Duplicate tag type '%c' found for %s",
+ g_error("Duplicate tag type '%c' found for %s",
(gchar)i, tm_ctags_get_lang_name(lang));
}
}
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).