Oh, and I guess this is needed as well, although if many other places in the code do this, pas2c will need
authornemo
Tue, 24 Apr 2012 17:16:18 -0400
changeset 6927 ee000959d645
parent 6926 6e832f8f4d8e
child 6928 9562ace15141
Oh, and I guess this is needed as well, although if many other places in the code do this, pas2c will need to be a bit smarter and automatically wrap.
hedgewars/adler32.pas
hedgewars/uLand.pas
--- 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.
--- a/hedgewars/uLand.pas	Tue Apr 24 16:58:19 2012 -0400
+++ b/hedgewars/uLand.pas	Tue Apr 24 17:16:18 2012 -0400
@@ -728,7 +728,7 @@
 begin
     adler:= 1;
     for i:= 0 to LAND_HEIGHT-1 do
-        Adler32Update(adler, @Land[i,0], LAND_WIDTH);
+        adler:= Adler32Update(adler, @Land[i,0], LAND_WIDTH);
     s:= 'M' + IntToStr(adler) + cScriptName;
 
     chLandCheck(s);