@b4n commented on this pull request.
@@ -436,7 +443,6 @@ static TMTag *new_tag_from_tags_file(TMSourceFile *file, FILE *fp, TMParserType
result = init_tag_from_file_alt(tag, file, fp); break; case TM_FILE_FORMAT_CTAGS: - result = init_tag_from_file_ctags(tag, file, fp, mode);
might be worth a `g_warn_if_reached()`
fclose(fp); /* the readtags library opens the file by itself */
+ read_ctags_file(tags_file, mode, file_tags);
Doesn't the `# format=ctags` confuse this parser? I didn't try this yet, but it feels like it should: * prevent pseudo tags (`!_…` ones) from being recognized as such * get parsed as a normal entry
doesn't this happen?
Agreed this header it not necessary (and actually with supporting detection with some pseudo-tags probably not advisable), but it should either work, or we shouldn't pretend it still does.
{
- gchar buf[BUFSIZ]; - gchar *p, *tab; + tagEntry entry; + tagFile *f = tagsOpen(tags_file, NULL); + const gchar *lang_kinds = tm_ctags_get_lang_kinds(lang); + GPtrArray *unknown_fields = g_ptr_array_new_full(10, NULL);
any reason not to use `GArray` instead? OK it's a tad awkward as well, but less so than `GPtrArray` for storing integers I'd say. I don't have to draw you a picture, but:
```c GArray *array = g_array_sized_new(FALSE, FALSE, sizeof(guint), 10); g_array_append_val(array, i); guint i2 = g_array_index(array, guint, idx); ```