浏览代码

fix result type

git-svn-id: https://svn.inf.ethz.ch/svn/lecturers/a2/trunk@8467 8c9fc860-2736-0410-a75d-ab315db34111
eth.metacore 6 年之前
父节点
当前提交
5c5705c22e
共有 5 个文件被更改,包括 11 次插入11 次删除
  1. 2 2
      source/I386.DivXDecoder.Mod
  2. 2 2
      source/I386.MPEGUtilities.Mod
  3. 3 3
      source/MPEGVideoDecoder.Mod
  4. 2 2
      source/MediaPlayer.Mod
  5. 2 2
      source/WebHTTPTools.Mod

+ 2 - 2
source/I386.DivXDecoder.Mod

@@ -1841,7 +1841,7 @@ TYPE DivXDecoder* = OBJECT(Codecs.VideoDecoder)
 		PROCEDURE SeekFrame*(frame : LONGINT; goKeyFrame : BOOLEAN; VAR res : WORD);
 		VAR
 			seekType: LONGINT;
-			dummy: LONGINT;
+			dummy: WORD;
 		BEGIN
 			IF goKeyFrame THEN
 				seekType := Codecs.SeekKeyFrame;
@@ -1859,7 +1859,7 @@ TYPE DivXDecoder* = OBJECT(Codecs.VideoDecoder)
 		PROCEDURE SeekMillisecond*(millisecond: LONGINT; goKeyFrame : BOOLEAN; VAR res : WORD);
 		VAR
 			frame: LONGINT;
-			dummy: LONGINT;
+			dummy: WORD;
 			seekType: LONGINT;
 		BEGIN
 			(* 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*;
 		VAR
-			dummy, result: LONGINT;
+			dummy: LONGINT; result: WORD;
 
 		BEGIN
 			input.SetPosX(Codecs.SeekByte, 0, dummy, result);
@@ -641,7 +641,7 @@ TYPE
 
 		PROCEDURE SetPos*(pos: Streams.Position);
 		VAR
-			dummy, result: LONGINT;
+			dummy: LONGINT; result: WORD;
 
 		BEGIN
 			input.SetPosX(Codecs.SeekByte, pos, dummy, result);

+ 3 - 3
source/MPEGVideoDecoder.Mod

@@ -2151,7 +2151,7 @@ TYPE
 		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 *)
-		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
 			cur: POINTER TO StreamType;
 			length: LONGINT;
@@ -2219,7 +2219,7 @@ TYPE
 			END;
 		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
 			cur: POINTER TO StreamType;
 
@@ -2455,7 +2455,7 @@ TYPE
 		file: Files.File;
 		fileinputstream: Codec.FileInputStream;
 		vstream: Codec.DemuxStream;
-		result: LONGINT;
+		result: WORD;
 		i: LONGINT;
 
 		w, h, ms: LONGINT;

+ 2 - 2
source/MediaPlayer.Mod

@@ -696,7 +696,7 @@ TYPE
 
 		(* Set position *)
 		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}
 			IF pos < 0 THEN
 				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 *)
 		PROCEDURE ResumeIntern;
-		VAR audioPos, res : LONGINT;
+		VAR audioPos : LONGINT; res: WORD;
 		BEGIN
 			IF (current # NIL) THEN
 				IF current.hasVideo THEN

+ 2 - 2
source/WebHTTPTools.Mod

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