summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPixel <Pixel>2002-06-18 16:01:16 +0000
committerPixel <Pixel>2002-06-18 16:01:16 +0000
commite22f9ba56569a703812c2ac2eb88112872efc0a0 (patch)
tree27a2cd8aacc57655a3aea0f6690b37e09e16e910
parent0cc4a6ec508043c5dbf3edde9398df8e4034be8b (diff)
bleh
-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);
}