Remove comando dump.
authorThadeu Lima de Souza Cascardo <cascardo@cascardo.eti.br>
Sat, 30 May 2015 16:00:57 +0000 (13:00 -0300)
committerThadeu Lima de Souza Cascardo <cascardo@cascardo.eti.br>
Sat, 30 May 2015 16:00:57 +0000 (13:00 -0300)
Com os comandos salva e resumo, o comando dump é desnecessário.

base.c
contribuinte.c
contribuinte.h
rendimento.c
rendimento.h

diff --git a/base.c b/base.c
index 0eec44c..094750c 100644 (file)
--- a/base.c
+++ b/base.c
@@ -29,19 +29,6 @@ SET_STRING(cpf);
 SET_STRING(nome);
 SET_STRING(recibo);
 
-static int run_dump(struct declaracao *dec, char **args, int argc)
-{
-       printf("ano: %d\n", dec->ano);
-       printf("cpf: %s\n", dec->cpf);
-       printf("nome: %s\n", dec->nome);
-       printf("recibo: %s\n", dec->recibo);
-       rendimento_dump(dec);
-       printf("pago: %lld.%02d\n", dec->pago / 100, dec->pago % 100);
-       printf("devido: %lld.%02d\n", dec->devido / 100, dec->devido % 100);
-       printf("restituicao: %lld.%02d\n", dec->restituicao / 100, dec->restituicao % 100);
-       return 0;
-}
-
 static int run_resumo(struct declaracao *dec, char **args, int argc)
 {
        printf("pago: %lld.%02d\n", dec->pago / 100, dec->pago % 100);
@@ -78,11 +65,6 @@ static int run_salva(struct declaracao *dec, char **args, int argc)
        return 0;
 }
 
-static struct cmd cmd_dump = {
-       .name = "dump",
-       .run = run_dump,
-};
-
 static struct cmd cmd_salva = {
        .name = "salva",
        .run = run_salva,
@@ -95,7 +77,6 @@ static struct cmd cmd_resumo = {
 
 int base_cmd_init(void)
 {
-       cmd_add(&cmd_dump);
        cmd_add(&cmd_salva);
        cmd_add(&cmd_resumo);
        cmd_add(&cmd_ano);
index a7285fa..8438b36 100644 (file)
@@ -67,10 +67,6 @@ void contribuinte_salva(struct declaracao *dec, FILE *f)
        SALVA_INT(ocupacao_principal);
 }
 
-void contribuinte_dump(struct declaracao *dec)
-{
-}
-
 int contribuinte_cmd_init(void)
 {
        cmd_add(&cmd_uf);
index bf92886..e7ccefc 100644 (file)
@@ -41,7 +41,6 @@ struct contribuinte {
        int ocupacao_principal;
 };
 
-void contribuinte_dump(struct declaracao *dec);
 void contribuinte_salva(struct declaracao *dec, FILE *f);
 
 int contribuinte_cmd_init(void);
index 23ce5cf..f4ab9b2 100644 (file)
@@ -89,16 +89,6 @@ void rendimento_salva(struct declaracao *dec, FILE *f)
                        j->decimoterceiro, j->imposto, j->saida);
 }
 
-void rendimento_dump(struct declaracao *dec)
-{
-       int i;
-       struct rendimento *j;
-       for (i = 0; j = list_get(dec->rendimento, i); i++)
-               printf("rendimento: %s %s %013lld %013lld %013lld %013lld %s\n",
-                       j->cnpj, j->nome, j->rendimento, j->previdencia,
-                       j->decimoterceiro, j->imposto, j->saida);
-}
-
 static struct cmd cmd_rendimento = {
        .name = "rendimento",
        .run = run_rendimento,
index 68f8bc5..11fc0ab 100644 (file)
@@ -32,7 +32,6 @@ struct rendimento {
        char *saida;
 };
 
-void rendimento_dump(struct declaracao *dec);
 void rendimento_salva(struct declaracao *dec, FILE *f);
 void rendimento_free(void *pointer);