Add input-focus support for System 7, where the Control Manager can't do
[u/mdw/putty] / sshcrc.c
index fb0db0c..702d7a0 100644 (file)
--- a/sshcrc.c
+++ b/sshcrc.c
@@ -69,6 +69,8 @@
 
 #include <stdlib.h>
 
+#include "ssh.h"
+
 /* ----------------------------------------------------------------------
  * Multi-function module. Can be compiled three ways.
  *
@@ -211,9 +213,8 @@ int main(void)
 }
 #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++;
@@ -222,3 +223,8 @@ unsigned long crc32(const void *buf, size_t len)
     }
     return crcword;
 }
+
+unsigned long crc32(const void *buf, size_t len)
+{
+    return crc32_update(0L, buf, len);
+}