projects
/
cascardo
/
declara.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Suporta CNPJ em bem.
[cascardo/declara.git]
/
lib
/
totais.c
diff --git
a/lib/totais.c
b/lib/totais.c
index
ca79125
..
b9f0aa1
100644
(file)
--- a/
lib/totais.c
+++ b/
lib/totais.c
@@
-21,6
+21,7
@@
#include <string.h>
#include <errno.h>
#include "pmhash.h"
#include <string.h>
#include <errno.h>
#include "pmhash.h"
+#include "util.h"
int totais_add(struct declaracao *dec, char *key, long long val)
{
int totais_add(struct declaracao *dec, char *key, long long val)
{
@@
-39,6
+40,10
@@
int totais_add(struct declaracao *dec, char *key, long long val)
goto out_hash;
*p = 0;
}
goto out_hash;
*p = 0;
}
+ if (dec->verbose && val) {
+ printf("Somando "FMT_R" a %s: "FMT_R" -> "FMT_R"\n",
+ R(val), key, R(*p), R(*p + val));
+ }
*p += val;
return 0;
out_hash:
*p += val;
return 0;
out_hash: