hedgewars/adler32.pas
changeset 6927 ee000959d645
parent 6926 6e832f8f4d8e
child 8026 4a4f21070479
--- a/hedgewars/adler32.pas	Tue Apr 24 16:58:19 2012 -0400
+++ b/hedgewars/adler32.pas	Tue Apr 24 17:16:18 2012 -0400
@@ -66,7 +66,7 @@
 Also, the structure was removed to simplify C conversion
 *)
 
-procedure Adler32Update ( var adler     :longint; Msg     :pointer; Len     :longint );
+function Adler32Update ( var adler     :longint; Msg     :pointer; Len     :longint ) : longint;
 
 implementation
 
@@ -124,7 +124,7 @@
 end;
 *)
 
-procedure Adler32Update(var adler: longint; Msg: pointer; Len :longint);
+function Adler32Update(var adler: longint; Msg: pointer; Len :longint) : longint;
     {-update Adler32 with Msg data}
     const
         BASE = 65521; {max. prime < 65536 }
@@ -152,7 +152,7 @@
             s2 := s2 mod BASE;
             dec(len, n);
             end;
-        adler:= (s2 shl 16) or s1;
+        Adler32Update:= (s2 shl 16) or s1;
     end;
 
 end.