Parse the header in a single function
authorGabriel F. T. Gomes <gabriel@gftg.com.br>
Sun, 13 Mar 2016 22:16:22 +0000 (19:16 -0300)
committerThadeu Lima de Souza Cascardo <cascardo@cascardo.eti.br>
Fri, 18 Mar 2016 10:27:36 +0000 (07:27 -0300)
The header of the declaration files is composed of several fields. Each year
this header changes, however most of the fields are the same throughout the
years supported by rnetclient. This patch refactors the code so that the
parsing of the headers fields is done in a single function.

Changes since v1:

* Merge decfile_parse_header and parse_header_common into the former.
* Undeleted some assertions:
- (p - buffer != RNET_HEADER_HEAD_COMMON)
- (p - tail != RNET_HEADER_TAIL_COMMON)
* Changed some comments regarding fields orlder than 2013.
* Assert exerc is a valid year and sooner.
* Moved last checks out of the else statement.


No differences found