浏览代码

use TSize instead of LONGINT for position/counter variables

git-svn-id: https://svn.inf.ethz.ch/svn/lecturers/a2/trunk@7998 8c9fc860-2736-0410-a75d-ab315db34111
eth.morozova 7 年之前
父节点
当前提交
37ae5dd76b
共有 1 个文件被更改,包括 5 次插入5 次删除
  1. 5 5
      source/Files64.Mod

+ 5 - 5
source/Files64.Mod

@@ -87,7 +87,7 @@ TYPE
 		file : File;
 		file : File;
 		r: Rider;
 		r: Rider;
 
 
-		PROCEDURE Receive(VAR buf: ARRAY OF CHAR; ofs, size, min: LONGINT; VAR len, res: LONGINT);
+		PROCEDURE Receive(VAR buf: ARRAY OF CHAR; ofs, size, min: TSize; VAR len: TSize; VAR res: LONGINT);
 		BEGIN
 		BEGIN
 			file.ReadBytes(r, buf, ofs, size);
 			file.ReadBytes(r, buf, ofs, size);
 			len := size - r.res;
 			len := size - r.res;
@@ -125,7 +125,7 @@ TYPE
 		file : File;
 		file : File;
 		r: Rider;
 		r: Rider;
 
 
-		PROCEDURE Send(CONST buf: ARRAY OF CHAR; ofs, len: LONGINT; propagate: BOOLEAN; VAR res: LONGINT);
+		PROCEDURE Send(CONST buf: ARRAY OF CHAR; ofs, len: TSize; propagate: BOOLEAN; VAR res: LONGINT);
 		BEGIN
 		BEGIN
 			r.file.WriteBytes(r, buf, ofs, len);
 			r.file.WriteBytes(r, buf, ofs, len);
 			IF propagate THEN r.file.Update END;
 			IF propagate THEN r.file.Update END;
@@ -279,7 +279,7 @@ TYPE
 
 
 		(** Read a sequence of len bytes into the buffer x at offset ofs, advancing the Rider. Less bytes will be read when reading over the end of the file. r.res indicates the number of unread bytes. x must be big enough to hold all the bytes. *)
 		(** Read a sequence of len bytes into the buffer x at offset ofs, advancing the Rider. Less bytes will be read when reading over the end of the file. r.res indicates the number of unread bytes. x must be big enough to hold all the bytes. *)
 
 
-		PROCEDURE ReadBytes*(VAR r: Rider; VAR x: ARRAY OF CHAR; ofs, len: LONGINT);
+		PROCEDURE ReadBytes*(VAR r: Rider; VAR x: ARRAY OF CHAR; ofs, len: TSize);
 		BEGIN HALT(301) END ReadBytes;	(* abstract *)
 		BEGIN HALT(301) END ReadBytes;	(* abstract *)
 
 
 		(** Write a byte into the file at the Rider position, advancing the Rider by one. *)
 		(** Write a byte into the file at the Rider position, advancing the Rider by one. *)
@@ -289,7 +289,7 @@ TYPE
 
 
 		(** Write the buffer x containing len bytes (starting at offset ofs) into a file at the Rider position. *)
 		(** Write the buffer x containing len bytes (starting at offset ofs) into a file at the Rider position. *)
 
 
-		PROCEDURE WriteBytes*(VAR r: Rider; CONST x: ARRAY OF CHAR; ofs, len: LONGINT);
+		PROCEDURE WriteBytes*(VAR r: Rider; CONST x: ARRAY OF CHAR; ofs, len: TSize);
 		BEGIN HALT(301) END WriteBytes;	(* abstract *)
 		BEGIN HALT(301) END WriteBytes;	(* abstract *)
 
 
 		(** Return the current length of a file. *)
 		(** Return the current length of a file. *)
@@ -811,7 +811,7 @@ VAR writer : Writer;
 	reader : Reader;
 	reader : Reader;
 	file : File;
 	file : File;
 	chunk : ARRAY 4096 OF CHAR;
 	chunk : ARRAY 4096 OF CHAR;
-	len : LONGINT;
+	len : TSize;
 BEGIN
 BEGIN
 	IF fileClipboard = NIL THEN RETURN END;
 	IF fileClipboard = NIL THEN RETURN END;
 	IF Old(name) # NIL THEN res := FileAlreadyExists;			(* File already exists *)
 	IF Old(name) # NIL THEN res := FileAlreadyExists;			(* File already exists *)