summaryrefslogtreecommitdiff
path: root/lib/lzss.cpp
diff options
context:
space:
mode:
authorpixel <pixel>2003-06-20 14:08:16 +0000
committerpixel <pixel>2003-06-20 14:08:16 +0000
commit30f218eb43414407ff8fad136ac1b14d419c29b5 (patch)
tree1e4c1dd71272f861daf90baced75fa604cdbf168 /lib/lzss.cpp
parent7fc9c6dfbef57331c8b5eae0943f3fe95f2e63e1 (diff)
Compiling again
Diffstat (limited to 'lib/lzss.cpp')
-rw-r--r--lib/lzss.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/lib/lzss.cpp b/lib/lzss.cpp
index f31b2f2..530c6d9 100644
--- a/lib/lzss.cpp
+++ b/lib/lzss.cpp
@@ -81,13 +81,13 @@ void lzss::compute_limits(void) {
lzss_maxptr += scheme.one_jump;
if (scheme.l_mask_1 & scheme.j_mask_1) {
- printm(M_ERROR, "Masks are overlapping for value 1\n");
- exit(-1);
+ printm(M_ERROR, "Masks are overlapping for value 1\n");
+ exit(-1);
}
if (scheme.l_mask_2 & scheme.j_mask_2) {
- printm(M_ERROR, "Masks are overlapping for value 2\n");
- exit(-1);
+ printm(M_ERROR, "Masks are overlapping for value 2\n");
+ exit(-1);
}
if (shift(scheme.l_mask_1, scheme.l_shft_1) & shift(scheme.l_mask_2, scheme.l_shft_2)) {
@@ -103,7 +103,7 @@ void lzss::compute_limits(void) {
printm(M_INFO, "Computed values: maxsize = %i, maxptr = 0x%06x\n", lzss_maxsize, lzss_maxptr);
}
-unsigned long lzss::lzss_decomp(Handle * f_source, Handle * f_cible, long true_length)
+unsigned int lzss::lzss_decomp(Handle * f_source, Handle * f_cible, int true_length)
{
unsigned char bitmap, fbitmap;
unsigned char valeur;
@@ -119,13 +119,13 @@ unsigned long lzss::lzss_decomp(Handle * f_source, Handle * f_cible, long true_l
int loop_length;
int whole_count;
int i, j;
- long length, reads;
+ int length, reads;
compute_limits();
f_source->read(&length, 4);
if (true_length >= 0) {
- length = true_length;
+ length = true_length;
}
whole_count = 0;
@@ -251,13 +251,13 @@ unsigned long lzss::lzss_decomp(Handle * f_source, Handle * f_cible, long true_l
return length;
}
-unsigned char lzss::lzss_rd(unsigned char * t, long p) {
+unsigned char lzss::lzss_rd(unsigned char * t, int p) {
return ((p < 0) ? 0 : (t[p]));
}
-long lzss::lzss_comp_strstr(unsigned char * needle, unsigned char * r, long * l, long sp) {
+int lzss::lzss_comp_strstr(unsigned char * needle, unsigned char * r, int * l, int sp) {
char redo[256];
- long length, i, p, ptr, maxlength;
+ int length, i, p, ptr, maxlength;
i = 1;
redo[0] = p = 0;
@@ -300,10 +300,10 @@ long lzss::lzss_comp_strstr(unsigned char * needle, unsigned char * r, long * l,
return ptr;
}
-unsigned char * lzss::lzss_memcomp(unsigned char * r, long * l, long * delta) {
+unsigned char * lzss::lzss_memcomp(unsigned char * r, int * l, int * delta) {
unsigned char bitmap, * comp;
- long ptr, needle, needle_length, comp_ptr, bitmap_ptr, val1, val2;
- long jump, farest, remaining;
+ int ptr, needle, needle_length, comp_ptr, bitmap_ptr, val1, val2;
+ int jump, farest, remaining;
int j;
comp = (unsigned char *) malloc(3 * *l);
@@ -425,8 +425,8 @@ unsigned char * lzss::lzss_memcomp(unsigned char * r, long * l, long * delta) {
return comp;
}
-void lzss::lzss_comp(Handle * f_source, Handle * f_cible, long * delta) {
- long length = f_source->GetSize(), l;
+void lzss::lzss_comp(Handle * f_source, Handle * f_cible, int * delta) {
+ int length = f_source->GetSize(), l;
unsigned char * r = (unsigned char *) malloc(length), * c;
f_source->read(r, length);