projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replace PuTTY's 2-3-4 tree implementation with the shiny new counted
[u/mdw/putty]
/
sshzlib.c
diff --git
a/sshzlib.c
b/sshzlib.c
index
3da133f
..
66ab214
100644
(file)
--- a/
sshzlib.c
+++ b/
sshzlib.c
@@
-95,12
+95,12
@@
static void lz77_compress(struct LZ77Context *ctx,
#define INVALID -1 /* invalid hash _and_ invalid offset */
struct WindowEntry {
#define INVALID -1 /* invalid hash _and_ invalid offset */
struct WindowEntry {
-
int next, prev;
/* array indices within the window */
-
in
t hashval;
+
short next, prev;
/* array indices within the window */
+
shor
t hashval;
};
struct HashEntry {
};
struct HashEntry {
-
int first;
/* window index of first in chain */
+
short first;
/* window index of first in chain */
};
struct Match {
};
struct Match {
@@
-393,7
+393,8
@@
static const unsigned char mirrorbytes[256] = {
};
typedef struct {
};
typedef struct {
- int code, extrabits, min, max;
+ short code, extrabits;
+ int min, max;
} coderecord;
static const coderecord lencodes[] = {
} coderecord;
static const coderecord lencodes[] = {
@@
-760,7
+761,7
@@
struct zlib_tableentry;
struct zlib_tableentry {
unsigned char nbits;
struct zlib_tableentry {
unsigned char nbits;
-
in
t code;
+
shor
t code;
struct zlib_table *nexttable;
};
struct zlib_table *nexttable;
};