From 67cf9c49337a1320b1723503cb131bf51cb6bf70 Mon Sep 17 00:00:00 2001 From: ceriel Date: Mon, 19 Oct 1987 10:06:24 +0000 Subject: [PATCH] some fixes --- lang/m2/libm2/CSP.mod | 6 +++--- lang/m2/libm2/InOut.mod | 1 - lang/m2/libm2/MathLib0.mod | 4 +++- lang/m2/libm2/RealInOut.mod | 2 +- lang/m2/libm2/Strings.mod | 1 - 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lang/m2/libm2/CSP.mod b/lang/m2/libm2/CSP.mod index 41644603f..b1bb32906 100644 --- a/lang/m2/libm2/CSP.mod +++ b/lang/m2/libm2/CSP.mod @@ -147,7 +147,7 @@ IMPLEMENTATION MODULE CSP; PROCEDURE COEND; (* End of a COBEGIN .. COEND structure *) - VAR aux: ProcessType; + (* VAR aux: ProcessType; *) BEGIN IF cp^.sons > 0 THEN DoTransfer @@ -219,7 +219,7 @@ IMPLEMENTATION MODULE CSP; PROCEDURE Send(data: ARRAY OF BYTE; VAR ch: Channel); (* Send a message with the data to the cvhannel ch *) VAR m: ByteAddress; - aux: ProcessType; + (* aux: ProcessType; *) i: CARDINAL; BEGIN WITH ch^ DO @@ -295,7 +295,7 @@ IMPLEMENTATION MODULE CSP; PROCEDURE GUARD(cond: BOOLEAN; ch: Channel; VAR dest: ARRAY OF BYTE): BOOLEAN; (* Evaluates a guard, including reception management *) - VAR aux: ProcessType; + (* VAR aux: ProcessType; *) BEGIN IF NOT cond THEN RETURN FALSE diff --git a/lang/m2/libm2/InOut.mod b/lang/m2/libm2/InOut.mod index 50b69ed55..eb6799fa8 100644 --- a/lang/m2/libm2/InOut.mod +++ b/lang/m2/libm2/InOut.mod @@ -183,7 +183,6 @@ IMPLEMENTATION MODULE InOut ; VAR buf : ARRAY OF CHAR); VAR i : INTEGER; j : CARDINAL; - ch: CHAR; BEGIN Done := TRUE; IF isatty(0) THEN diff --git a/lang/m2/libm2/MathLib0.mod b/lang/m2/libm2/MathLib0.mod index 9caf5b19b..9834ac036 100644 --- a/lang/m2/libm2/MathLib0.mod +++ b/lang/m2/libm2/MathLib0.mod @@ -34,9 +34,11 @@ BEGIN END exp; PROCEDURE entier(x: REAL): INTEGER; + VAR i: INTEGER; BEGIN IF x < 0.0 THEN - RETURN - TRUNC(-x); + i := TRUNC(-x); + RETURN -i; END; RETURN TRUNC(x); END entier; diff --git a/lang/m2/libm2/RealInOut.mod b/lang/m2/libm2/RealInOut.mod index 430678a6e..64a97d246 100644 --- a/lang/m2/libm2/RealInOut.mod +++ b/lang/m2/libm2/RealInOut.mod @@ -17,7 +17,7 @@ IMPLEMENTATION MODULE RealInOut; BEGIN IF ndigits > MAXWIDTH THEN ndigits := MAXWIDTH; END; IF ndigits < 10 THEN ndigits := 10; END; - RealConversions.RealToString(arg, ndigits, -(ndigits - 7), buf, ok); + RealConversions.RealToString(arg, ndigits, -INTEGER(ndigits - 7), buf, ok); InOut.WriteString(buf); END WriteReal; diff --git a/lang/m2/libm2/Strings.mod b/lang/m2/libm2/Strings.mod index 5639a7f67..9d1226132 100644 --- a/lang/m2/libm2/Strings.mod +++ b/lang/m2/libm2/Strings.mod @@ -53,7 +53,6 @@ PROCEDURE Delete(VAR str: ARRAY OF CHAR; inx, len: CARDINAL); string are deleted. *) VAR length: CARDINAL; - i : CARDINAL; BEGIN IF len = 0 THEN RETURN; END; length := Length(str);