From: Thadeu Lima de Souza Cascardo Date: Sat, 30 May 2015 16:00:57 +0000 (-0300) Subject: Remove comando dump. X-Git-Url: http://git.cascardo.eti.br/?p=cascardo%2Fdeclara.git;a=commitdiff_plain;h=a5348d58a740ea1f3c69985b7721641db6e5fc46 Remove comando dump. Com os comandos salva e resumo, o comando dump é desnecessário. --- diff --git a/base.c b/base.c index 0eec44c..094750c 100644 --- 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); diff --git a/contribuinte.c b/contribuinte.c index a7285fa..8438b36 100644 --- a/contribuinte.c +++ b/contribuinte.c @@ -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); diff --git a/contribuinte.h b/contribuinte.h index bf92886..e7ccefc 100644 --- a/contribuinte.h +++ b/contribuinte.h @@ -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); diff --git a/rendimento.c b/rendimento.c index 23ce5cf..f4ab9b2 100644 --- a/rendimento.c +++ b/rendimento.c @@ -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, diff --git a/rendimento.h b/rendimento.h index 68f8bc5..11fc0ab 100644 --- a/rendimento.h +++ b/rendimento.h @@ -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);