+void contribuinte_salva(struct declaracao *dec, FILE *f)
+{
+#define SALVA_STRING(attr) \
+ if (dec->contribuinte.attr) \
+ fprintf(f, #attr " \"%s\"\n", dec->contribuinte.attr);
+#define SALVA_INT(attr) \
+ fprintf(f, #attr " %d\n", dec->contribuinte.attr);
+ SALVA_STRING(uf);
+ SALVA_INT(cd_municipio);
+ SALVA_STRING(municipio);
+ SALVA_STRING(cep);
+ SALVA_STRING(bairro);
+ SALVA_STRING(tipo_logradouro);
+ SALVA_STRING(logradouro);
+ SALVA_STRING(numero);
+ SALVA_STRING(complemento);
+ SALVA_STRING(titulo_eleitor);
+ SALVA_STRING(dn);
+ SALVA_STRING(ddd);
+ SALVA_STRING(telefone);
+ SALVA_INT(natureza_ocupacao);
+ SALVA_INT(ocupacao_principal);
+}
+