Browse Source

Fixed interface of querying character positions in strings

git-svn-id: https://svn-dept.inf.ethz.ch/svn/lecturers/a2/trunk@8749 8c9fc860-2736-0410-a75d-ab315db34111
negelef 6 years ago
parent
commit
8fda7536e4

+ 1 - 1
source/Codecs.Mod

@@ -640,7 +640,7 @@ BEGIN
 END GetAnimationDecoder;
 END GetAnimationDecoder;
 
 
 PROCEDURE SplitName*(CONST  name : ARRAY OF CHAR; VAR protocol, filename : ARRAY OF CHAR);
 PROCEDURE SplitName*(CONST  name : ARRAY OF CHAR; VAR protocol, filename : ARRAY OF CHAR);
-VAR pos, i : LONGINT;
+VAR pos, i : SIZE;
 BEGIN
 BEGIN
 	pos := Strings.Pos("://", name);
 	pos := Strings.Pos("://", name);
 	IF pos >= 0 THEN
 	IF pos >= 0 THEN

+ 1 - 1
source/CompilerInterface.Mod

@@ -102,7 +102,7 @@ END GetCompilerByName;
 	if the file extension the compiler requires is part of the filename, e.g. Module.Mod.Bak for the file extension .Mod
 	if the file extension the compiler requires is part of the filename, e.g. Module.Mod.Bak for the file extension .Mod
 	Returns NIL if no appropriate compiler found *)
 	Returns NIL if no appropriate compiler found *)
 PROCEDURE GetCompilerByFilename*(filename : ARRAY OF CHAR) : Compiler;
 PROCEDURE GetCompilerByFilename*(filename : ARRAY OF CHAR) : Compiler;
-VAR c : Compiler; pos : LONGINT;
+VAR c : Compiler; pos : SIZE;
 BEGIN {EXCLUSIVE}
 BEGIN {EXCLUSIVE}
 	Strings.UpperCase(filename);
 	Strings.UpperCase(filename);
 	c := compilers;
 	c := compilers;

+ 4 - 4
source/CyberbitNetInstall.Mod

@@ -19,8 +19,8 @@ TYPE
 		PROCEDURE &New*;
 		PROCEDURE &New*;
 		VAR res : WORD; temp : ARRAY 16 OF CHAR;
 		VAR res : WORD; temp : ARRAY 16 OF CHAR;
 			r : Streams.Reader; w : Files.Writer;
 			r : Streams.Reader; w : Files.Writer;
-			buf: ARRAY BufSize OF CHAR; len : LONGINT;
-			msg, s : ARRAY 256 OF CHAR; i, j : LONGINT;
+			buf: ARRAY BufSize OF CHAR; len, size : LONGINT;
+			msg, s : ARRAY 256 OF CHAR; i, j : SIZE;
 			ftpConnection : FTPClient.FTPClient;
 			ftpConnection : FTPClient.FTPClient;
 			errorStr : ARRAY 512 OF CHAR;
 			errorStr : ARRAY 512 OF CHAR;
 			f : Files.File;
 			f : Files.File;
@@ -60,7 +60,7 @@ TYPE
 				INC(j)
 				INC(j)
 			END;
 			END;
 			temp[j] := 0X;
 			temp[j] := 0X;
-			Strings.StrToInt(temp, i);
+			Strings.StrToInt(temp, size);
 			(* open the local file *)
 			(* open the local file *)
 			res := -1;
 			res := -1;
 			IF (Files.Old(file) = NIL) OR (WMDialogs.Confirmation("Confirm overwriting", file) = WMDialogs.ResYes) THEN
 			IF (Files.Old(file) = NIL) OR (WMDialogs.Confirmation("Confirm overwriting", file) = WMDialogs.ResYes) THEN
@@ -74,7 +74,7 @@ TYPE
 			END;
 			END;
 			(* create the status window *)
 			(* create the status window *)
 			NEW(status);
 			NEW(status);
-			status.fileSize := i;
+			status.fileSize := size;
 			status.nofFiles := 1;
 			status.nofFiles := 1;
 			(* transfer the bytes and update the statuswindow *)
 			(* transfer the bytes and update the statuswindow *)
 			IF res = 0 THEN
 			IF res = 0 THEN

+ 1 - 1
source/Decoder.Mod

@@ -1718,7 +1718,7 @@ TYPE
 			msg : ARRAY 256 OF CHAR;
 			msg : ARRAY 256 OF CHAR;
 			module : Modules.Module;
 			module : Modules.Module;
 			header: ObjHeader;
 			header: ObjHeader;
-			res: WORD; extPos : LONGINT;
+			res: WORD; extPos : SIZE;
 		BEGIN
 		BEGIN
 			vc := CreateForm();
 			vc := CreateForm();
 			Init(vc.bounds.GetWidth(), vc.bounds.GetHeight(), FALSE);
 			Init(vc.bounds.GetWidth(), vc.bounds.GetHeight(), FALSE);

+ 2 - 2
source/ExerciseGroups.Mod

@@ -1513,7 +1513,7 @@ TYPE
 
 
 		PROCEDURE UpdateList(request: HTTPSupport.HTTPRequest; params: DynamicWebpage.ParameterList);
 		PROCEDURE UpdateList(request: HTTPSupport.HTTPRequest; params: DynamicWebpage.ParameterList);
 		VAR tempStr, personOidStr, exerciseNoStr: Strings.String;
 		VAR tempStr, personOidStr, exerciseNoStr: Strings.String;
-			i, length, sepIdx, personOid, exerciseNo, newGrade: LONGINT; par: DynamicWebpage.Parameter;
+			i, length, sepIdx: SIZE; personOid, exerciseNo, newGrade: LONGINT; par: DynamicWebpage.Parameter;
 			(* params: the grades for all group members *)
 			(* params: the grades for all group members *)
 		BEGIN
 		BEGIN
 			(* if this event handler is manually invoked on this active element such that the active element was not previously
 			(* if this event handler is manually invoked on this active element such that the active element was not previously
@@ -1701,4 +1701,4 @@ TYPE
 BEGIN
 BEGIN
 	NEW(personDesc, ThisModuleNameStr, "Person", GetNewPerson);
 	NEW(personDesc, ThisModuleNameStr, "Person", GetNewPerson);
 	NEW(groupDesc, ThisModuleNameStr, "Group", GetNewGroup)
 	NEW(groupDesc, ThisModuleNameStr, "Group", GetNewGroup)
-END ExerciseGroups.
+END ExerciseGroups.

+ 1 - 1
source/FSTools.Mod

@@ -357,7 +357,7 @@ VAR
 
 
 	PROCEDURE PrepareContext(context : Commands.Context; CONST currentFile, arguments : ARRAY OF CHAR);
 	PROCEDURE PrepareContext(context : Commands.Context; CONST currentFile, arguments : ARRAY OF CHAR);
 	CONST PlaceHolder = "<#filename#>";
 	CONST PlaceHolder = "<#filename#>";
-	VAR thisArguments : Strings.String; position : LONGINT;
+	VAR thisArguments : Strings.String; position : SIZE;
 	BEGIN
 	BEGIN
 		NEW(thisArguments, Strings.Length(arguments) + 1024);
 		NEW(thisArguments, Strings.Length(arguments) + 1024);
 		COPY(arguments, thisArguments^);
 		COPY(arguments, thisArguments^);

+ 1 - 2
source/FTPClient.Mod

@@ -612,7 +612,7 @@ TYPE
 		END AddFTPEntryToListing;
 		END AddFTPEntryToListing;
 
 
 		PROCEDURE GetCurrentDir*(VAR dir : ARRAY OF CHAR; VAR res : WORD);
 		PROCEDURE GetCurrentDir*(VAR dir : ARRAY OF CHAR; VAR res : WORD);
-		VAR p : LONGINT;
+		VAR p : SIZE;
 		BEGIN
 		BEGIN
 			IF ~open OR busy THEN res := -2; RETURN END;
 			IF ~open OR busy THEN res := -2; RETURN END;
 			w.String("PWD"); w.Ln; w.Update;
 			w.String("PWD"); w.Ln; w.Update;
@@ -673,4 +673,3 @@ Permanent Comment
 Assertion
 Assertion
 Debug
 Debug
 
 
-

+ 1 - 1
source/FoxBasic.Mod

@@ -2146,7 +2146,7 @@ VAR
 	END InstallWriterFactory;
 	END InstallWriterFactory;
 
 
 	PROCEDURE Replace(VAR in: ARRAY OF CHAR; CONST this, by: ARRAY OF CHAR);
 	PROCEDURE Replace(VAR in: ARRAY OF CHAR; CONST this, by: ARRAY OF CHAR);
-	VAR pos: LONGINT;
+	VAR pos: SIZE;
 	BEGIN
 	BEGIN
 		pos := Strings.Pos(this,in);
 		pos := Strings.Pos(this,in);
 		IF pos >= 0 THEN
 		IF pos >= 0 THEN

+ 1 - 1
source/FoxProgTools.Mod

@@ -491,7 +491,7 @@ TYPE
 			END Add;
 			END Add;
 
 
 			PROCEDURE Do(VAR src: ARRAY OF CHAR);
 			PROCEDURE Do(VAR src: ARRAY OF CHAR);
-			VAR pos: LONGINT; r: Replacement;
+			VAR pos: SIZE; r: Replacement;
 			BEGIN
 			BEGIN
 				r := first;
 				r := first;
 				WHILE r # NIL DO
 				WHILE r # NIL DO

+ 1 - 2
source/GZip.Mod

@@ -320,7 +320,7 @@ BEGIN
 END GZip;
 END GZip;
 
 
 PROCEDURE UnGZip*(context:Commands.Context);
 PROCEDURE UnGZip*(context:Commands.Context);
-VAR filename: Files.FileName; from,to: Files.File; pos:LONGINT;
+VAR filename: Files.FileName; from,to: Files.File; pos: SIZE;
 BEGIN
 BEGIN
 	IF context.arg.GetString(filename) THEN
 	IF context.arg.GetString(filename) THEN
 		pos:=Strings.Pos(".gz", filename);
 		pos:=Strings.Pos(".gz", filename);
@@ -345,4 +345,3 @@ END GZip.
 GZip.GZip "../httproot/raphael-min.js" ~
 GZip.GZip "../httproot/raphael-min.js" ~
 GZip.UnGZip "../httproot/raphael-min2.js.gz" ~
 GZip.UnGZip "../httproot/raphael-min2.js.gz" ~
 
 
-

+ 1 - 1
source/HTMLTransformer.Mod

@@ -2973,7 +2973,7 @@ END MapBaselineShift;
 PROCEDURE GetExistingFontName(f : String) : String;
 PROCEDURE GetExistingFontName(f : String) : String;
 VAR
 VAR
 	fonts, temp : String;
 	fonts, temp : String;
-	pos : LONGINT;
+	pos : SIZE;
 	font : ARRAY 32 OF CHAR;
 	font : ARRAY 32 OF CHAR;
 
 
 	PROCEDURE Get(f : ARRAY OF CHAR; alternatives : BOOLEAN) : String;
 	PROCEDURE Get(f : ARRAY OF CHAR; alternatives : BOOLEAN) : String;

+ 2 - 3
source/HTTPSupport.Mod

@@ -20,7 +20,7 @@ TYPE
 			variables*: TFClasses.List; (** List of HTTPVariable *)
 			variables*: TFClasses.List; (** List of HTTPVariable *)
 
 
 		PROCEDURE &Init*(VAR requestHeader: WebHTTP.RequestHeader; bodyReader: Streams.Reader);
 		PROCEDURE &Init*(VAR requestHeader: WebHTTP.RequestHeader; bodyReader: Streams.Reader);
-			VAR pos: LONGINT; restLength: LONGINT; uriReader : Streams.StringReader; uriRest : Strings.String;
+			VAR pos, restLength: SIZE; uriReader : Streams.StringReader; uriRest : Strings.String;
 				contentType: ARRAY 40 OF CHAR;
 				contentType: ARRAY 40 OF CHAR;
 		BEGIN
 		BEGIN
 			NEW(variables);
 			NEW(variables);
@@ -154,7 +154,7 @@ TYPE
 	END HTTPRequest;
 	END HTTPRequest;
 
 
 	PROCEDURE RemoveVariablesFromURI*(olduri: ARRAY OF CHAR; VAR newuri: ARRAY OF CHAR);
 	PROCEDURE RemoveVariablesFromURI*(olduri: ARRAY OF CHAR; VAR newuri: ARRAY OF CHAR);
-	VAR pos: LONGINT;
+	VAR pos: SIZE;
 	BEGIN
 	BEGIN
 		pos := Strings.Pos("?", olduri);
 		pos := Strings.Pos("?", olduri);
 		IF (pos > 0) THEN
 		IF (pos > 0) THEN
@@ -261,4 +261,3 @@ version             = "version" EQUAL version-value
 version-value       = 1*DIGIT
 version-value       = 1*DIGIT
 sts-uri             = "sts-uri" EQUAL DQUOTE absoluteURI DQUOTE
 sts-uri             = "sts-uri" EQUAL DQUOTE absoluteURI DQUOTE
 
 
-

+ 1 - 1
source/ModuleTrees.Mod

@@ -268,7 +268,7 @@ TYPE
 
 
 			PROCEDURE Expand(path : ARRAY OF CHAR);
 			PROCEDURE Expand(path : ARRAY OF CHAR);
 			VAR node, tnode : WMTrees.TreeNode;
 			VAR node, tnode : WMTrees.TreeNode;
-				pos : LONGINT;
+				pos : SIZE;
 				found : BOOLEAN;
 				found : BOOLEAN;
 				ident : ARRAY 64 OF CHAR;
 				ident : ARRAY 64 OF CHAR;
 				string : Strings.String;
 				string : Strings.String;

+ 1 - 1
source/OdVCSBase.Mod

@@ -368,7 +368,7 @@ END ApplyDelta;
 
 
 PROCEDURE NameToDelta(name: TFileName; VAR df: TFileName);
 PROCEDURE NameToDelta(name: TFileName; VAR df: TFileName);
 VAR
 VAR
-	i, ofs: LONGINT;
+	i, ofs: SIZE;
 BEGIN
 BEGIN
 	i := Strings.Pos(":", name);
 	i := Strings.Pos(":", name);
 	IF i = -1 THEN (* Add BaseDir *)
 	IF i = -1 THEN (* Add BaseDir *)

+ 3 - 3
source/OdXml.Mod

@@ -619,7 +619,7 @@ END AbsXmlName;
 
 
 (** Expand an xmlns. *)
 (** Expand an xmlns. *)
 PROCEDURE AbsName * (CONST rawName: ARRAY OF CHAR):OdUtil.Line;
 PROCEDURE AbsName * (CONST rawName: ARRAY OF CHAR):OdUtil.Line;
-VAR absName, absSpace, nameSpace, name: OdUtil.Line; colonPos: LONGINT;
+VAR absName, absSpace, nameSpace, name: OdUtil.Line; colonPos: SIZE;
 BEGIN
 BEGIN
 	colonPos := Strings.Pos(":", rawName);
 	colonPos := Strings.Pos(":", rawName);
 	IF colonPos  > -1 THEN
 	IF colonPos  > -1 THEN
@@ -761,7 +761,7 @@ END VersionTreeReq;
 PROCEDURE ProppatchReq*(CONST modeName: ARRAY OF CHAR; props: WebHTTP.AdditionalField): XML.Document;
 PROCEDURE ProppatchReq*(CONST modeName: ARRAY OF CHAR; props: WebHTTP.AdditionalField): XML.Document;
 VAR doc: XML.Document; pu(*propertyupdate*), prop, mode, e : XML.Element;
 VAR doc: XML.Document; pu(*propertyupdate*), prop, mode, e : XML.Element;
 	ac: XML.ArrayChars; modePropName, key, attrKey, attrVal: ARRAY 128 OF CHAR;
 	ac: XML.ArrayChars; modePropName, key, attrKey, attrVal: ARRAY 128 OF CHAR;
-	pos: LONGINT; nameVal: StringSplitter;
+	pos: SIZE; nameVal: StringSplitter;
 BEGIN
 BEGIN
 	NEW(doc); doc.AddContent(xmlDecl);
 	NEW(doc); doc.AddContent(xmlDecl);
 	(* propertyupdate *)
 	(* propertyupdate *)
@@ -1054,4 +1054,4 @@ END ArrayChars;
 
 
 BEGIN
 BEGIN
 	xmlDecl := XmlDecl("1.0", "UTF-8"); (* Standard header *)
 	xmlDecl := XmlDecl("1.0", "UTF-8"); (* Standard header *)
-END OdXml.
+END OdXml.

+ 1 - 1
source/PETTrees.Mod

@@ -223,7 +223,7 @@ TYPE
 
 
 			PROCEDURE Expand(path : ARRAY OF CHAR);
 			PROCEDURE Expand(path : ARRAY OF CHAR);
 			VAR node, tnode : WMTrees.TreeNode;
 			VAR node, tnode : WMTrees.TreeNode;
-				pos : LONGINT;
+				pos : SIZE;
 				found : BOOLEAN;
 				found : BOOLEAN;
 				ident : ARRAY 64 OF CHAR;
 				ident : ARRAY 64 OF CHAR;
 				string : Strings.String;
 				string : Strings.String;

+ 7 - 17
source/Strings.Mod

@@ -82,9 +82,6 @@ TYPE
 
 
 	END Buffer;
 	END Buffer;
 
 
-
-
-
 	OPERATOR "+"*( a: String; CONST b: ARRAY OF CHAR ): String;
 	OPERATOR "+"*( a: String; CONST b: ARRAY OF CHAR ): String;
 	VAR str: String;
 	VAR str: String;
 	BEGIN
 	BEGIN
@@ -131,7 +128,6 @@ TYPE
 		RETURN str
 		RETURN str
 	END "+";
 	END "+";
 
 
-
 (** string handling *)
 (** string handling *)
 
 
 (** returns the length of a string *)
 (** returns the length of a string *)
@@ -169,11 +165,11 @@ END Truncate;
  * Returns the position of the first occurrence of pattern in the string or -1 if no occurrence is found.
  * Returns the position of the first occurrence of pattern in the string or -1 if no occurrence is found.
  * Rabin-Karp algorithm, adopted from Sedgewick.
  * Rabin-Karp algorithm, adopted from Sedgewick.
  *)
  *)
-PROCEDURE Pos*(CONST pattern, string: ARRAY OF CHAR): LONGINT;
+PROCEDURE Pos*(CONST pattern, string: ARRAY OF CHAR): SIZE;
 CONST
 CONST
 	q = 8204957;	(* prime number, {(d+1) * q <= MAX(LONGINT)} *)
 	q = 8204957;	(* prime number, {(d+1) * q <= MAX(LONGINT)} *)
 	d = 256;			(* number of different characters *)
 	d = 256;			(* number of different characters *)
-VAR h1, h2, dM, i, j, m, n: LONGINT; found : BOOLEAN;
+VAR h1, h2, dM: LONGINT; i, j, m, n: SIZE; found : BOOLEAN;
 BEGIN
 BEGIN
 	m := Length(pattern); n := Length(string);
 	m := Length(pattern); n := Length(string);
 	IF (m > n) THEN RETURN -1 END;
 	IF (m > n) THEN RETURN -1 END;
@@ -215,11 +211,11 @@ END Pos;
 (** More generic version of Pos. Basically the same search algorithm, but can also perform case-insensitive searching and/or
 (** More generic version of Pos. Basically the same search algorithm, but can also perform case-insensitive searching and/or
  * backwards directed searching.
  * backwards directed searching.
  * Returns the position of the first character of the first occurence of 'pattern' in 'text'  in search direction or -1 if pattern not found *)
  * Returns the position of the first character of the first occurence of 'pattern' in 'text'  in search direction or -1 if pattern not found *)
-PROCEDURE GenericPos*(CONST pattern: ARRAY OF CHAR; from : LONGINT; CONST string: ARRAY OF CHAR; ignoreCase, backwards : BOOLEAN): LONGINT;
+PROCEDURE GenericPos*(CONST pattern: ARRAY OF CHAR; from : SIZE; CONST string: ARRAY OF CHAR; ignoreCase, backwards : BOOLEAN): SIZE;
 CONST
 CONST
 	q = 8204957;	(* prime number, {(d+1) * q <= MAX(LONGINT)} *)
 	q = 8204957;	(* prime number, {(d+1) * q <= MAX(LONGINT)} *)
 	d = 256;			(* number of different characters *)
 	d = 256;			(* number of different characters *)
-VAR ch, chp : CHAR; h1, h2, dM, i, j, patternLength, stringLength: LONGINT; found : BOOLEAN;
+VAR ch, chp : CHAR; h1, h2, dM: LONGINT; i, j, patternLength, stringLength: SIZE; found : BOOLEAN;
 BEGIN
 BEGIN
 	patternLength := Length(pattern); stringLength := Length(string);
 	patternLength := Length(pattern); stringLength := Length(string);
 
 
@@ -392,7 +388,6 @@ PROCEDURE Append* (VAR s: ARRAY OF CHAR; CONST appendix: ARRAY OF CHAR);
 BEGIN Concat (s, appendix, s)
 BEGIN Concat (s, appendix, s)
 END Append;
 END Append;
 
 
-
 (** appends appendix to s: s := s || appendix. The resulting string is truncated to the length of s if necessary *)
 (** appends appendix to s: s := s || appendix. The resulting string is truncated to the length of s if necessary *)
 PROCEDURE AppendX* (VAR s: ARRAY OF CHAR; CONST appendix: ARRAY OF CHAR);
 PROCEDURE AppendX* (VAR s: ARRAY OF CHAR; CONST appendix: ARRAY OF CHAR);
 BEGIN ConcatX (s, appendix, s)
 BEGIN ConcatX (s, appendix, s)
@@ -405,7 +400,6 @@ BEGIN
 	IntToStr(num,number); Append(s,number);
 	IntToStr(num,number); Append(s,number);
 END AppendInt;
 END AppendInt;
 
 
-
 (** appends a character to a string s := s || char *)
 (** appends a character to a string s := s || char *)
 PROCEDURE AppendChar*(VAR s: ARRAY OF CHAR; ch: CHAR);
 PROCEDURE AppendChar*(VAR s: ARRAY OF CHAR; ch: CHAR);
 VAR cs: ARRAY 2 OF CHAR;
 VAR cs: ARRAY 2 OF CHAR;
@@ -413,7 +407,6 @@ BEGIN
 	cs[0] := ch; cs[1] := 0X; Append(s,cs);
 	cs[0] := ch; cs[1] := 0X; Append(s,cs);
 END AppendChar;
 END AppendChar;
 
 
-
 (** copies src[index ... index + len-1] to dst *)
 (** copies src[index ... index + len-1] to dst *)
 PROCEDURE Copy* (CONST src: ARRAY OF CHAR; index, len: SIZE; VAR dst: ARRAY OF CHAR);
 PROCEDURE Copy* (CONST src: ARRAY OF CHAR; index, len: SIZE; VAR dst: ARRAY OF CHAR);
 BEGIN
 BEGIN
@@ -468,8 +461,8 @@ END Trim;
 (**
 (**
  * Splits 'string' into multiple strings separated by 'separator'.
  * Splits 'string' into multiple strings separated by 'separator'.
  * Result properties:
  * Result properties:
- *	separator = 0X: 	LEN(StringArray) = 1
- *	separator # 0X: 	LEN(StringArray) = 1 + <Number of occurences of 'ch' in 'string'>
+ *	separator = 0X:	LEN(StringArray) = 1
+ *	separator # 0X:	LEN(StringArray) = 1 + <Number of occurences of 'ch' in 'string'>
  *	StringArray[i] # NIL (0 <= i <= LEN(StringArray)-1)
  *	StringArray[i] # NIL (0 <= i <= LEN(StringArray)-1)
  *)
  *)
 PROCEDURE Split*(CONST string : ARRAY OF CHAR; separator : CHAR) : StringArray;
 PROCEDURE Split*(CONST string : ARRAY OF CHAR; separator : CHAR) : StringArray;
@@ -559,7 +552,6 @@ BEGIN
 	RETURN (ch>=20X) & (ch<=7EX)
 	RETURN (ch>=20X) & (ch<=7EX)
 END IsPrintable;
 END IsPrintable;
 
 
-
 (** conversion functions *)
 (** conversion functions *)
 
 
 (** converts a boolean value to a string *)
 (** converts a boolean value to a string *)
@@ -803,7 +795,7 @@ END StrToDate;
 	www	->  clear-text week-day, e.g. Mon
 	www	->  clear-text week-day, e.g. Mon
 
 
 	hh		->	two-digit hour, e.g. 08
 	hh		->	two-digit hour, e.g. 08
-	h		-> 	hour, e.g. 8
+	h		->	hour, e.g. 8
 	nn		-> two-digit minute, e.g. 03
 	nn		-> two-digit minute, e.g. 03
 	n		-> minute, e.g. 3
 	n		-> minute, e.g. 3
 	ss		-> two-digit second, e.g. 00
 	ss		-> two-digit second, e.g. 00
@@ -891,7 +883,6 @@ BEGIN
 	COPY(str, s^);
 	COPY(str, s^);
 END SetAOC;
 END SetAOC;
 
 
-
 (* Gets extension of the given name, returns file (without extension) and ext *)
 (* Gets extension of the given name, returns file (without extension) and ext *)
 PROCEDURE GetExtension* (CONST name : ARRAY OF CHAR; VAR file, ext: ARRAY OF CHAR);
 PROCEDURE GetExtension* (CONST name : ARRAY OF CHAR; VAR file, ext: ARRAY OF CHAR);
 VAR len, index: SIZE;
 VAR len, index: SIZE;
@@ -1079,4 +1070,3 @@ BEGIN
 END Strings.
 END Strings.
 
 
 System.Free Utilities ~
 System.Free Utilities ~
-

+ 1 - 1
source/TFModuleTrees.Mod

@@ -338,7 +338,7 @@ TYPE
 		END SetEditor;
 		END SetEditor;
 
 
 		PROCEDURE BrowseToDefinition*(sender, data : ANY);
 		PROCEDURE BrowseToDefinition*(sender, data : ANY);
-		VAR pos : LONGINT;
+		VAR pos : SIZE;
 			no : TS.NamedObject;
 			no : TS.NamedObject;
 			scope : TS.Scope;
 			scope : TS.Scope;
 			ident : ARRAY 64 OF CHAR;
 			ident : ARRAY 64 OF CHAR;

+ 1 - 1
source/TFSMTPServer.Mod

@@ -159,7 +159,7 @@ TYPE
 			message : Message;
 			message : Message;
 
 
 		PROCEDURE AddRecipient(VAR x : ARRAY OF CHAR);
 		PROCEDURE AddRecipient(VAR x : ARRAY OF CHAR);
-		VAR l, p : LONGINT; s : String; line : Line;
+		VAR l, p : SIZE; s : String; line : Line;
 		BEGIN
 		BEGIN
 			p := Strings.Pos("<", x); IF p >= 0 THEN Strings.Delete(x, 0, p + 1) END; Strings.TrimRight(x, ">");
 			p := Strings.Pos("<", x); IF p >= 0 THEN Strings.Delete(x, 0, p + 1) END; Strings.TrimRight(x, ">");
 			l := Strings.Length(x) + 1 ; IF l = 1 THEN RETURN END;
 			l := Strings.Length(x) + 1 ; IF l = 1 THEN RETURN END;

+ 1 - 1
source/TestFiles.Mod

@@ -513,7 +513,7 @@ TYPE
 			arg : Streams.StringReader;
 			arg : Streams.StringReader;
 			commandStr : ARRAY 128 OF CHAR; parameterStr : Strings.String;
 			commandStr : ARRAY 128 OF CHAR; parameterStr : Strings.String;
 			msg : ARRAY 128 OF CHAR;
 			msg : ARRAY 128 OF CHAR;
-			pos  : LONGINT; res : WORD;
+			pos : SIZE; res : WORD;
 		BEGIN
 		BEGIN
 			NEW(parameterStr, 4096); Strings.Truncate(parameterStr^, 0);
 			NEW(parameterStr, 4096); Strings.Truncate(parameterStr^, 0);
 			r.SkipWhitespace; r.String(commandStr);
 			r.SkipWhitespace; r.String(commandStr);

+ 3 - 3
source/WMArchives.Mod

@@ -432,7 +432,7 @@ TYPE
 
 
 		(* recursive method insert a new node at the right place *)
 		(* recursive method insert a new node at the right place *)
 		PROCEDURE InsertTreeNode(parent : WMTrees.TreeNode; name : Strings.String; data : EntryInfo);
 		PROCEDURE InsertTreeNode(parent : WMTrees.TreeNode; name : Strings.String; data : EntryInfo);
-		VAR posOfSlash : LONGINT;
+		VAR posOfSlash : SIZE;
 			subnode : WMTrees.TreeNode;
 			subnode : WMTrees.TreeNode;
 			dirName, tail : Strings.String;
 			dirName, tail : Strings.String;
 		BEGIN
 		BEGIN
@@ -1057,7 +1057,7 @@ VAR
 (* ----- helpers ------------------------------------------------------- *)
 (* ----- helpers ------------------------------------------------------- *)
 
 
 (* copy the head of string to head and the tail of string to tail *)
 (* copy the head of string to head and the tail of string to tail *)
-PROCEDURE SplitString(string : Strings.String;  VAR head, tail : Strings.String; index : LONGINT);
+PROCEDURE SplitString(string : Strings.String;  VAR head, tail : Strings.String; index : SIZE);
 VAR i : LONGINT;
 VAR i : LONGINT;
 BEGIN
 BEGIN
 	NEW(head, index+1);
 	NEW(head, index+1);
@@ -1183,4 +1183,4 @@ END WMArchives.
 
 
 WMArchives.Open ~
 WMArchives.Open ~
 WMArchives.Open traditional.skin ~
 WMArchives.Open traditional.skin ~
-System.Free WMArchives ~
+System.Free WMArchives ~

+ 1 - 1
source/WMSystemComponents.Mod

@@ -443,7 +443,7 @@ TYPE
 			w : SelectionWrapper;
 			w : SelectionWrapper;
 			filename : Files.FileName;
 			filename : Files.FileName;
 			command : ARRAY 1024 OF CHAR;
 			command : ARRAY 1024 OF CHAR;
-			position: LONGINT; res: WORD;
+			position: SIZE; res: WORD;
 			msg : ARRAY 256 OF CHAR;
 			msg : ARRAY 256 OF CHAR;
 		BEGIN
 		BEGIN
 			IF (data # NIL) & (data IS SelectionWrapper) THEN
 			IF (data # NIL) & (data IS SelectionWrapper) THEN

+ 1 - 1
source/WebBrowser.Mod

@@ -156,7 +156,7 @@ TYPE
 		VAR
 		VAR
 			urlNode : URLNode;
 			urlNode : URLNode;
 			urlAOC : ARRAY 1024 OF CHAR;
 			urlAOC : ARRAY 1024 OF CHAR;
-			i: LONGINT;
+			i: SIZE;
 		BEGIN
 		BEGIN
 			IF ~IsCallFromSequencer() THEN sequencer.ScheduleEvent(SELF.Go, sender, data)
 			IF ~IsCallFromSequencer() THEN sequencer.ScheduleEvent(SELF.Go, sender, data)
 			ELSE
 			ELSE

+ 1 - 1
source/WebBrowserComponents.Mod

@@ -475,7 +475,7 @@ VAR
 
 
 PROCEDURE GetResourceConnection*(url : String) : ResourceConnection;
 PROCEDURE GetResourceConnection*(url : String) : ResourceConnection;
 VAR
 VAR
-	pos : LONGINT;
+	pos : SIZE;
 	protocol : String;
 	protocol : String;
 	filename : String;
 	filename : String;
 	connection : ResourceConnection;
 	connection : ResourceConnection;

+ 1 - 1
source/WebBrowserPanel.Mod

@@ -735,7 +735,7 @@ END GetContent;
 PROCEDURE DecodeLinkData*(data : ANY; VAR link : String; VAR target : String);
 PROCEDURE DecodeLinkData*(data : ANY; VAR link : String; VAR target : String);
 VAR
 VAR
 	linkValue : String;
 	linkValue : String;
-	urlPos, len : LONGINT;
+	urlPos, len : SIZE;
 BEGIN
 BEGIN
 	linkValue := data(WMTextView.LinkWrapper).link;
 	linkValue := data(WMTextView.LinkWrapper).link;
 	IF Strings.StartsWith2("#", linkValue^) THEN
 	IF Strings.StartsWith2("#", linkValue^) THEN

+ 1 - 1
source/WebFTPServer.Mod

@@ -848,7 +848,7 @@ END Code;
 
 
 PROCEDURE ComposeDirectory(path, name: ARRAY OF CHAR; VAR res: ARRAY OF CHAR);
 PROCEDURE ComposeDirectory(path, name: ARRAY OF CHAR; VAR res: ARRAY OF CHAR);
 VAR
 VAR
-	prefix: Files.Prefix; tmp: ARRAY dirLen OF CHAR; p: LONGINT;
+	prefix: Files.Prefix; tmp: ARRAY dirLen OF CHAR; p: SIZE;
 	absolute : BOOLEAN;
 	absolute : BOOLEAN;
 BEGIN
 BEGIN
 	COPY(path, res); absolute :=  PathDelimiter = name[0];
 	COPY(path, res); absolute :=  PathDelimiter = name[0];