Move code related to various tag file formats into tm_source_file.c
commit103d2c535862ae2682022dcfd714c2ffd983c42f
authorJiří Techet <techet@gmail.com>
Thu, 10 Mar 2016 20:37:56 +0000 (10 21:37 +0100)
committerJiří Techet <techet@gmail.com>
Mon, 21 Mar 2016 17:28:36 +0000 (21 18:28 +0100)
tree59b2f63e85e1e10d2026f0d8eee1ed4d515e11dc
parent4dcc829e724a9018f92a8ef5201c2c0f257eeaa7
Move code related to various tag file formats into tm_source_file.c

This patch moves code related to reading/writing various tag file formats
into form TMTag and TMWorkspace to TMSourceFile. The benefits of this
change are:

* only tm_source_file.c interfaces with ctags after this change
* tagEntryInfo is removed from headers, no redefinitions needed any more
* source code is more evenly distributed among tm_source_file.c,
  tm_tag.c and tm_workspace.c after the change (tm_tag.c got smaller)
* all tag reading/writing is at a single place

Despite its size, this patch mostly just moves code. Notable changes are:

* tm_tag_new() now creates just an empty tag. The tag is filled by various
  init_* functions inside tm_source_file.c
* there are new functions tm_source_file_read_tags_file() and
  tm_source_file_write_tags_file() - these hide tags file
  reading/writing details from tm_workspace.c
* tm_source_file_write() debugging function got removed -
  tm_source_file_write_tags_file() does a similar thing and there's no
  need to keep around two functions doing the same.
tagmanager/src/tm_source_file.c
tagmanager/src/tm_source_file.h
tagmanager/src/tm_tag.c
tagmanager/src/tm_tag.h
tagmanager/src/tm_workspace.c