summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dteutils.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/dteutils.cpp b/dteutils.cpp
index e740abf..7c5057d 100644
--- a/dteutils.cpp
+++ b/dteutils.cpp
@@ -151,6 +151,8 @@ long dte_counter;
long dte_text_size;
int dte_size;
long gain;
+long nb_dte = 0;
+long tnb_dte = 0;
void dte_reset(void) {
memset(dte_counters, 0, 0x40000);
@@ -171,15 +173,17 @@ void build_dte(void) {
continue;
}
p = t;
-// if (!dte_flags[t]) {
- if ((!dte_flags[t]) && (dte_flags[t2] != 3)) {
- dte_counters[t]++;
+ if (!dte_flags[t]) {
+// if ((!dte_flags[t]) && (dte_flags[t2] != 3)) {
+ if ((dte_counters[t]++) == 0) {
+ nb_dte++;
+ }
if (dte_counters[t] > dte_counter) {
dte_most = t;
dte_counter = dte_counters[t];
}
- } else if (dte_flags[t] == 3) {
- i++;
+// } else if (dte_flags[t] == 3) {
+// i++;
}
}
}
@@ -242,6 +246,8 @@ void dte_compress() {
for (i = 0; i < dte_size; i++) {
dte_reset();
build_dte();
+ if (!tnb_dte)
+ tnb_dte = nb_dte;
c1 = dte_most & 0xff;
c2 = dte_most >> 8;
c1 = things[c1][0];
@@ -375,6 +381,8 @@ int main(int argc, char ** argv) {
printm(M_INFO, "Entry %i ('%s') used at %i\n", i, things[i], dte_usage[i]);
}
+ printm(M_INFO, "Number of couples: %i\n", tnb_dte);
+
free(dte_text);
}