Permite definir outros dados do contribuinte.
[cascardo/declara.git] / contribuinte.c
1 /*
2  *  Copyright (C) 2015  Thadeu Lima de Souza Cascardo <cascardo@cascardo.eti.br>
3  *
4  *  This program is free software; you can redistribute it and/or modify
5  *  it under the terms of the GNU General Public License as published by
6  *  the Free Software Foundation; either version 3 of the License, or
7  *  (at your option) any later version.
8  *
9  *  This program is distributed in the hope that it will be useful,
10  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  *  GNU General Public License for more details.
13  *
14  *  You should have received a copy of the GNU General Public License along
15  *  with this program; if not, write to the Free Software Foundation, Inc.,
16  *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18
19 #include "cmd.h"
20 #include "declaracao.h"
21 #include "contribuinte.h"
22 #include "util.h"
23
24 #define SET_INT_CONTRIBUINTE(attr) \
25         SET_INT_(attr, attr, contribuinte.attr)
26
27 #define SET_STRING_CONTRIBUINTE(attr) \
28         SET_STRING_(attr, attr, contribuinte.attr)
29
30 SET_STRING_CONTRIBUINTE(uf);
31 SET_INT_CONTRIBUINTE(cd_municipio);
32 SET_STRING_CONTRIBUINTE(municipio);
33 SET_STRING_CONTRIBUINTE(cep);
34 SET_STRING_CONTRIBUINTE(bairro);
35 SET_STRING_CONTRIBUINTE(tipo_logradouro);
36 SET_STRING_CONTRIBUINTE(logradouro);
37 SET_STRING_CONTRIBUINTE(numero);
38 SET_STRING_CONTRIBUINTE(complemento);
39 SET_STRING_CONTRIBUINTE(titulo_eleitor);
40 SET_STRING_CONTRIBUINTE(dn);
41 SET_STRING_CONTRIBUINTE(ddd);
42 SET_STRING_CONTRIBUINTE(telefone);
43 SET_INT_CONTRIBUINTE(natureza_ocupacao);
44 SET_INT_CONTRIBUINTE(ocupacao_principal);
45
46 void contribuinte_dump(struct declaracao *dec)
47 {
48 }
49
50 int contribuinte_cmd_init(void)
51 {
52         cmd_add(&cmd_uf);
53         cmd_add(&cmd_cd_municipio);
54         cmd_add(&cmd_municipio);
55         cmd_add(&cmd_cep);
56         cmd_add(&cmd_bairro);
57         cmd_add(&cmd_tipo_logradouro);
58         cmd_add(&cmd_logradouro);
59         cmd_add(&cmd_numero);
60         cmd_add(&cmd_complemento);
61         cmd_add(&cmd_titulo_eleitor);
62         cmd_add(&cmd_dn);
63         cmd_add(&cmd_ddd);
64         cmd_add(&cmd_telefone);
65         cmd_add(&cmd_natureza_ocupacao);
66         cmd_add(&cmd_ocupacao_principal);
67         return 0;
68 }