projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Support for non-ISO-8859-1 X keysyms. So in particular, pterm in a
[u/mdw/putty]
/
sshcrc.c
diff --git
a/sshcrc.c
b/sshcrc.c
index
fb0db0c
..
702d7a0
100644
(file)
--- a/
sshcrc.c
+++ b/
sshcrc.c
@@
-69,6
+69,8
@@
#include <stdlib.h>
#include <stdlib.h>
+#include "ssh.h"
+
/* ----------------------------------------------------------------------
* Multi-function module. Can be compiled three ways.
*
/* ----------------------------------------------------------------------
* Multi-function module. Can be compiled three ways.
*
@@
-211,9
+213,8
@@
int main(void)
}
#endif
}
#endif
-unsigned long crc32
(
const void *buf, size_t len)
+unsigned long crc32
_update(unsigned long crcword,
const void *buf, size_t len)
{
{
- unsigned long crcword = 0L;
const unsigned char *p = (const unsigned char *) buf;
while (len--) {
unsigned long newbyte = *p++;
const unsigned char *p = (const unsigned char *) buf;
while (len--) {
unsigned long newbyte = *p++;
@@
-222,3
+223,8
@@
unsigned long crc32(const void *buf, size_t len)
}
return crcword;
}
}
return crcword;
}
+
+unsigned long crc32(const void *buf, size_t len)
+{
+ return crc32_update(0L, buf, len);
+}