2
0
Эх сурвалжийг харах

fix result type

git-svn-id: https://svn.inf.ethz.ch/svn/lecturers/a2/trunk@8467 8c9fc860-2736-0410-a75d-ab315db34111
eth.metacore 6 жил өмнө
parent
commit
5c5705c22e

+ 2 - 2
source/I386.DivXDecoder.Mod

@@ -1841,7 +1841,7 @@ TYPE DivXDecoder* = OBJECT(Codecs.VideoDecoder)
 		PROCEDURE SeekFrame*(frame : LONGINT; goKeyFrame : BOOLEAN; VAR res : WORD);
 		PROCEDURE SeekFrame*(frame : LONGINT; goKeyFrame : BOOLEAN; VAR res : WORD);
 		VAR
 		VAR
 			seekType: LONGINT;
 			seekType: LONGINT;
-			dummy: LONGINT;
+			dummy: WORD;
 		BEGIN
 		BEGIN
 			IF goKeyFrame THEN
 			IF goKeyFrame THEN
 				seekType := Codecs.SeekKeyFrame;
 				seekType := Codecs.SeekKeyFrame;
@@ -1859,7 +1859,7 @@ TYPE DivXDecoder* = OBJECT(Codecs.VideoDecoder)
 		PROCEDURE SeekMillisecond*(millisecond: LONGINT; goKeyFrame : BOOLEAN; VAR res : WORD);
 		PROCEDURE SeekMillisecond*(millisecond: LONGINT; goKeyFrame : BOOLEAN; VAR res : WORD);
 		VAR
 		VAR
 			frame: LONGINT;
 			frame: LONGINT;
-			dummy: LONGINT;
+			dummy: WORD;
 			seekType: LONGINT;
 			seekType: LONGINT;
 		BEGIN
 		BEGIN
 			(* Now, this is wrong: we cannot assume, that microsecsperframe is always 40000 *)
 			(* Now, this is wrong: we cannot assume, that microsecsperframe is always 40000 *)

+ 2 - 2
source/I386.MPEGUtilities.Mod

@@ -512,7 +512,7 @@ TYPE
 
 
 		PROCEDURE Reset*;
 		PROCEDURE Reset*;
 		VAR
 		VAR
-			dummy, result: LONGINT;
+			dummy: LONGINT; result: WORD;
 
 
 		BEGIN
 		BEGIN
 			input.SetPosX(Codecs.SeekByte, 0, dummy, result);
 			input.SetPosX(Codecs.SeekByte, 0, dummy, result);
@@ -641,7 +641,7 @@ TYPE
 
 
 		PROCEDURE SetPos*(pos: Streams.Position);
 		PROCEDURE SetPos*(pos: Streams.Position);
 		VAR
 		VAR
-			dummy, result: LONGINT;
+			dummy: LONGINT; result: WORD;
 
 
 		BEGIN
 		BEGIN
 			input.SetPosX(Codecs.SeekByte, pos, dummy, result);
 			input.SetPosX(Codecs.SeekByte, pos, dummy, result);

+ 3 - 3
source/MPEGVideoDecoder.Mod

@@ -2151,7 +2151,7 @@ TYPE
 		END GetStreamInfo;
 		END GetStreamInfo;
 
 
 		(* read data from streamNr, store it into buffer buf starting at offset ofs, store size bytes if possible, block if not read min bytes at least. Return number of read bytes in len and return code res *)
 		(* read data from streamNr, store it into buffer buf starting at offset ofs, store size bytes if possible, block if not read min bytes at least. Return number of read bytes in len and return code res *)
-		PROCEDURE GetData*(streamNr : LONGINT; VAR buf: ARRAY OF CHAR; ofs, size, min: LONGINT; VAR len, res: LONGINT);
+		PROCEDURE GetData*(streamNr : LONGINT; VAR buf: ARRAY OF CHAR; ofs, size, min: LONGINT; VAR len: LONGINT; VAR res: WORD);
 		VAR
 		VAR
 			cur: POINTER TO StreamType;
 			cur: POINTER TO StreamType;
 			length: LONGINT;
 			length: LONGINT;
@@ -2219,7 +2219,7 @@ TYPE
 			END;
 			END;
 		END GetData;
 		END GetData;
 
 
-		PROCEDURE SkipData(streamNr : LONGINT; size: LONGINT; VAR len, res: LONGINT);
+		PROCEDURE SkipData(streamNr : LONGINT; size: LONGINT; VAR len: LONGINT; VAR res: WORD);
 		VAR
 		VAR
 			cur: POINTER TO StreamType;
 			cur: POINTER TO StreamType;
 
 
@@ -2455,7 +2455,7 @@ TYPE
 		file: Files.File;
 		file: Files.File;
 		fileinputstream: Codec.FileInputStream;
 		fileinputstream: Codec.FileInputStream;
 		vstream: Codec.DemuxStream;
 		vstream: Codec.DemuxStream;
-		result: LONGINT;
+		result: WORD;
 		i: LONGINT;
 		i: LONGINT;
 
 
 		w, h, ms: LONGINT;
 		w, h, ms: LONGINT;

+ 2 - 2
source/MediaPlayer.Mod

@@ -696,7 +696,7 @@ TYPE
 
 
 		(* Set position *)
 		(* Set position *)
 		PROCEDURE SetPos*(pos: LONGINT);
 		PROCEDURE SetPos*(pos: LONGINT);
-		VAR current : Context;  audioPos, res : LONGINT; img : WMGraphics.Image;
+		VAR current : Context;  audioPos : LONGINT; res : WORD; img : WMGraphics.Image;
 		BEGIN {EXCLUSIVE}
 		BEGIN {EXCLUSIVE}
 			IF pos < 0 THEN
 			IF pos < 0 THEN
 				IF Debug THEN KernelLog.String("MediaPlayer: Warning: Setpos to "); KernelLog.Int(pos, 0); KernelLog.String("!?!"); KernelLog.Ln; END;
 				IF Debug THEN KernelLog.String("MediaPlayer: Warning: Setpos to "); KernelLog.Int(pos, 0); KernelLog.String("!?!"); KernelLog.Ln; END;
@@ -1205,7 +1205,7 @@ TYPE
 
 
 		(* Resume playing the curent and next context that are paused *)
 		(* Resume playing the curent and next context that are paused *)
 		PROCEDURE ResumeIntern;
 		PROCEDURE ResumeIntern;
-		VAR audioPos, res : LONGINT;
+		VAR audioPos : LONGINT; res: WORD;
 		BEGIN
 		BEGIN
 			IF (current # NIL) THEN
 			IF (current # NIL) THEN
 				IF current.hasVideo THEN
 				IF current.hasVideo THEN

+ 2 - 2
source/WebHTTPTools.Mod

@@ -43,7 +43,7 @@ PROCEDURE Get*(context : Commands.Context);
 VAR h : WebHTTP.ResponseHeader;
 VAR h : WebHTTP.ResponseHeader;
 		rh : WebHTTP.RequestHeader;
 		rh : WebHTTP.RequestHeader;
 		in : Streams.Reader;
 		in : Streams.Reader;
-		res, i, cs : LONGINT;
+		res: WORD; i, cs : LONGINT;
 		ch : CHAR; token : ARRAY 16 OF CHAR;
 		ch : CHAR; token : ARRAY 16 OF CHAR;
 		name : ARRAY 32 OF CHAR;
 		name : ARRAY 32 OF CHAR;
 		url : ARRAY 256 OF CHAR;
 		url : ARRAY 256 OF CHAR;
@@ -113,7 +113,7 @@ VAR
 	h: WebHTTP.ResponseHeader;
 	h: WebHTTP.ResponseHeader;
 	con: TCP.Connection;
 	con: TCP.Connection;
 	in: Streams.Reader;
 	in: Streams.Reader;
-	res, i, cs: LONGINT;
+	res: WORD; i, cs: LONGINT;
 	ch : CHAR;
 	ch : CHAR;
 BEGIN
 BEGIN
 	IF ~context.arg.GetString(baseUrl) THEN
 	IF ~context.arg.GetString(baseUrl) THEN