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)
commitbe4f84612bbc4df88c52e7ae861146185008fb50
treee7770816b2f484f259a5923099ccfe6f308b45fb
parentdcf28e8ddf45318e242546a0c70bd27339d70812
Parse the header in a single function

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.
decfile.c