]> git.mdlowis.com Git - proto/obnc.git/commitdiff
Changed SET to Set
authormike lowis <mike@mdlowis.com>
Fri, 9 Apr 2021 18:27:09 +0000 (14:27 -0400)
committermike lowis <mike@mdlowis.com>
Fri, 9 Apr 2021 18:27:09 +0000 (14:27 -0400)
12 files changed:
lib/obnc/Files.c
lib/obnc/Files.obn
lib/obnc/FilesTest.obn
lib/obnc/Input.obn
lib/obnc/InputTest.obn
lib/obnc/XYplane.obn
src/Table.c
tests/obnc/passing/A.obn
tests/obnc/passing/T1ConstantDeclarations.obn
tests/obnc/passing/T4Expressions.obn
tests/obnc/passing/T5Statements.obn
tests/obnc/passing/T5SystemStatements.obn

index 0680fd0bf3596a013fc1d628dec777ddab02f11d..a80ec30b570eb5f4a1610c9fbeebe8507d66de6b 100644 (file)
@@ -307,7 +307,7 @@ void Files__GetDate_(Files__File_ file, OBNC_INTEGER *t, OBNC_INTEGER *d)
 }
 
 
-void Files__Set_(Files__Rider_ *r, const OBNC_Td *rTD, Files__File_ f, OBNC_INTEGER pos)
+void Files__SetPos_(Files__Rider_ *r, const OBNC_Td *rTD, Files__File_ f, OBNC_INTEGER pos)
 {
        OBNC_C_ASSERT(r != NULL);
        OBNC_C_ASSERT(f != NULL);
index d3fec2303235f508c4782f8cf4fe75cbc31fdf45..f86eba81cc7c0cc8f3f82fdd467efdb68dd32f16 100644 (file)
@@ -71,10 +71,10 @@ Implements the basic library module from "The Oakwood Guidelines for Oberon-2 Co
        end GetDate;
 
 
-       procedure Set*(var r: Rider; f: File; pos: Int);
+       procedure SetPos*(var r: Rider; f: File; pos: Int);
 (**sets the rider r to position pos in file f. The field r.eof is set to false. The
 operation requires that 0 <= pos <= Length(f)*)
-       end Set;
+       end SetPos;
 
 
        procedure Pos*(var r: Rider): Int;
@@ -113,7 +113,7 @@ operation requires that 0 <= pos <= Length(f)*)
        end ReadString;
 
 
-       procedure ReadSet*(var r: Rider; var s: SET);
+       procedure ReadSet*(var r: Rider; var s: Set);
 (**reads a set s from rider r and advances r accordingly*)
        end ReadSet;
 
@@ -153,7 +153,7 @@ operation requires that 0 <= pos <= Length(f)*)
        end WriteString;
 
 
-       procedure WriteSet*(var r: Rider; s: SET);
+       procedure WriteSet*(var r: Rider; s: Set);
 (**writes the set s to rider r and advances r accordingly*)
        end WriteSet;
 
index b703e04ef740221ee4bd6fb6afd2720bc9406f94..d0712d5439854991e4c3bee5987bef5a92b57273 100644 (file)
@@ -58,7 +58,7 @@ module FilesTest;
 
                f := Files.New("RegisterTest");
                ASSERT(f # nil);
-               Files.Set(r, f, 0);
+               Files.SetPos(r, f, 0);
                Files.Write(r, 37);
                Files.Close(f);
                Files.Register(f);
@@ -78,7 +78,7 @@ module FilesTest;
        begin
                f := Files.New("CloseTest");
                ASSERT(f # nil);
-               Files.Set(r, f, 0);
+               Files.SetPos(r, f, 0);
                Files.Write(r, 65);
                ASSERT(Files.Length(f) <= 1);
                Files.Close(f);
@@ -92,7 +92,7 @@ module FilesTest;
        begin
                f := Files.New("PurgeTest");
                ASSERT(f # nil);
-               Files.Set(r, f, 0);
+               Files.SetPos(r, f, 0);
                Files.Write(r, 65);
                Files.Purge(f);
                ASSERT(Files.Length(f) = 0)
@@ -179,15 +179,15 @@ module FilesTest;
        end TestDate;
 
 
-       procedure TestSet;
+       procedure TestSetPos;
                var f: Files.File;
                        r: Files.Rider;
        begin
                f := Files.New("SetTest");
                ASSERT(f # nil);
-               Files.Set(r, f, 0);
+               Files.SetPos(r, f, 0);
                ASSERT(~r.eof)
-       end TestSet;
+       end TestSetPos;
 
 
        procedure TestPos;
@@ -196,7 +196,7 @@ module FilesTest;
        begin
                f := Files.New("PosTest");
                ASSERT(f # nil);
-               Files.Set(r, f, 0);
+               Files.SetPos(r, f, 0);
                ASSERT(Files.Pos(r) = 0)
        end TestPos;
 
@@ -207,7 +207,7 @@ module FilesTest;
        begin
                f := Files.New("BaseTest");
                ASSERT(f # nil);
-               Files.Set(r, f, 0);
+               Files.SetPos(r, f, 0);
                ASSERT(Files.Base(r) = f)
        end TestBase;
 
@@ -219,11 +219,11 @@ module FilesTest;
        begin
                f := Files.New("ReadWriteTest");
                ASSERT(f # nil);
-               Files.Set(r, f, 0);
+               Files.SetPos(r, f, 0);
                Files.Write(r, 65);
                Files.Close(f);
                ASSERT(Files.Length(f) = 1);
-               Files.Set(r, f, 0);
+               Files.SetPos(r, f, 0);
                Files.Read(r, b);
                ASSERT(~r.eof);
                ASSERT(b = 65);
@@ -239,12 +239,12 @@ module FilesTest;
                f := Files.New("ReadWriteIntTest");
                ASSERT(f # nil);
 
-               Files.Set(r, f, 0);
+               Files.SetPos(r, f, 0);
                Files.WriteInt(r, 100);
                Files.WriteInt(r, -1000);
                Files.Close(f);
 
-               Files.Set(r, f, 0);
+               Files.SetPos(r, f, 0);
                Files.ReadInt(r, i);
                ASSERT(~r.eof);
                ASSERT(i = 100);
@@ -264,12 +264,12 @@ module FilesTest;
                f := Files.New("ReadWriteRealTest");
                ASSERT(f # nil);
 
-               Files.Set(r, f, 0);
+               Files.SetPos(r, f, 0);
                Files.WriteReal(r, 3.14);
                Files.WriteReal(r, -3.14);
                Files.Close(f);
 
-               Files.Set(r, f, 0);
+               Files.SetPos(r, f, 0);
                Files.ReadReal(r, x);
                ASSERT(~r.eof);
                ASSERT(ABS(x - 3.14) < 1.0E-6);
@@ -289,12 +289,12 @@ module FilesTest;
                f := Files.New("ReadWriteNumTest");
                ASSERT(f # nil);
 
-               Files.Set(r, f, 0);
+               Files.SetPos(r, f, 0);
                Files.WriteNum(r, 100);
                Files.WriteNum(r, -1000);
                Files.Close(f);
 
-               Files.Set(r, f, 0);
+               Files.SetPos(r, f, 0);
                Files.ReadNum(r, i);
                ASSERT(~r.eof);
                ASSERT(i = 100);
@@ -314,13 +314,13 @@ module FilesTest;
                f := Files.New("ReadWriteStringTest");
                ASSERT(f # nil);
 
-               Files.Set(r, f, 0);
+               Files.SetPos(r, f, 0);
                Files.WriteString(r, "hello");
                Files.WriteString(r, "there");
                Files.WriteString(r, "");
                Files.Close(f);
 
-               Files.Set(r, f, 0);
+               Files.SetPos(r, f, 0);
                Files.ReadString(r, s);
                ASSERT(~r.eof);
                ASSERT(s = "hello");
@@ -338,18 +338,18 @@ module FilesTest;
        procedure TestReadWriteSet;
                var f: Files.File;
                        r: Files.Rider;
-                       s: SET;
+                       s: Set;
        begin
                f := Files.New("ReadWriteSetTest");
                ASSERT(f # nil);
 
-               Files.Set(r, f, 0);
+               Files.SetPos(r, f, 0);
                Files.WriteSet(r, {});
                Files.WriteSet(r, {0});
                Files.WriteSet(r, {0, 1});
                Files.Close(f);
 
-               Files.Set(r, f, 0);
+               Files.SetPos(r, f, 0);
                Files.ReadSet(r, s);
                ASSERT(~r.eof);
                ASSERT(s = {});
@@ -372,12 +372,12 @@ module FilesTest;
                f := Files.New("ReadWriteBoolTest");
                ASSERT(f # nil);
 
-               Files.Set(r, f, 0);
+               Files.SetPos(r, f, 0);
                Files.WriteBool(r, true);
                Files.WriteBool(r, false);
                Files.Close(f);
 
-               Files.Set(r, f, 0);
+               Files.SetPos(r, f, 0);
                Files.ReadBool(r, b);
                ASSERT(~r.eof);
                ASSERT(b);
@@ -400,14 +400,14 @@ module FilesTest;
                f := Files.New("ReadWriteBytesTest");
                ASSERT(f # nil);
 
-               Files.Set(r, f, 0);
+               Files.SetPos(r, f, 0);
                Files.WriteBytes(r, buf, LEN(buf));
                Files.WriteBytes(r, buf, LEN(buf));
                Files.Close(f);
 
                for i := 0 to LEN(buf) - 1 do buf[i] := 0 end;
 
-               Files.Set(r, f, 0);
+               Files.SetPos(r, f, 0);
 
                Files.ReadBytes(r, buf, LEN(buf));
                ASSERT(~r.eof);
@@ -437,7 +437,7 @@ begin
        if SYSTEM.SIZE(Int) >= 4 then
                TestDate
        end;
-       TestSet;
+       TestSetPos;
        TestPos;
        TestBase;
        TestReadWrite;
index 10986c136040296c52a1fc796b78d19ecc6bee35..77f53390aad4fd8be8ef9473313ed3a5a295a904 100644 (file)
@@ -24,7 +24,7 @@ Implements the basic library module from "The Oakwood Guidelines for Oberon-2 Co
 (**returns (and removes) the next character from the keyboard buffer. If the buffer is empty, Read waits until a key is pressed.*)
        end Read;
 
-       procedure Mouse*(var keys: SET; var x, y: Int);
+       procedure Mouse*(var keys: Set; var x, y: Int);
 (**returns the current mouse position (x, y) in pixels relative to the lower left corner of the screen. keys is the set of the currently pressed mouse keys (left = 2, middle = 1, right = 0).*)
        end Mouse;
 
index 6f9e6f4ff1278776568cd8a9124d43777f7236ec..67d53597bbf96a97f85bc350a07f019a2d6356d3 100644 (file)
@@ -55,7 +55,7 @@ module InputTest;
 
        procedure TestButton(button: Int);
                var buttonLabels: array 3, 8 of Char;
-                       buttons: SET; x, y: Int;
+                       buttons: Set; x, y: Int;
        begin
                buttonLabels[0] := "right";
                buttonLabels[1] := "middle";
index c85f4c872a38c9e6f9f4d92a5a4b2d66bfad0d2e..4c88ee8403ec77a408459f8d30db7cd6dc05d6a0 100644 (file)
@@ -67,7 +67,7 @@ module drawpixels;
 
        var
                x, y: Int;
-               keys: SET;
+               keys: Set;
 
 begin
        XYplane.Open;
index d09e36e90f869ea015248933e0f34d3817941846..3a33876a0ab12f06dc8c7e323ebb31e605909780 100644 (file)
@@ -101,7 +101,7 @@ void Table_Init(void)
                {"PACK", TREES_PROCEDURE_KIND, TREES_PACK_PROC},
                {"ROR", TREES_PROCEDURE_KIND, TREES_ROR_PROC},
                {"Real", TREES_TYPE_KIND, TREES_REAL_TYPE},
-               {"SET", TREES_TYPE_KIND, TREES_SET_TYPE},
+               {"Set", TREES_TYPE_KIND, TREES_SET_TYPE},
                {"UNPK", TREES_PROCEDURE_KIND, TREES_UNPK_PROC}
        };
 
index 826dd0bd02f3162406821512122fb1e09f425aa4..741c7a8c99c9104369df9a5edd9b28b5c63370f5 100644 (file)
@@ -60,7 +60,7 @@ module A;
                intVar*: Int;
                realVar* : Real;
                byteVar*: Byte;
-               setVar*: SET;
+               setVar*: Set;
                strVar*: String;
                recVar*, recVar1: record
                        f*: Int
index 54c67b4252631ebfd6a805a73ccc38ab3b29a75c..c0335ae2ad3758698029dc76a84d76e1ea8c57a8 100644 (file)
@@ -41,7 +41,7 @@ module T1ConstantDeclarations;
                i: Int;
                x: Real;
                j: Byte;
-               A: SET;
+               A: Set;
 
 begin
        p := null;
index 366080debc5341bd30f6d6fbf7218dee7004c164..6f7ce7cb55c0c0755a8ca2e5182727e46a208f57 100644 (file)
@@ -26,7 +26,7 @@ module T4Expressions;
        end IncReturnZero;
 
 
-       procedure IncReturnEmpty(var x: Int): SET;
+       procedure IncReturnEmpty(var x: Int): Set;
        begin
                INC(x)
        return {}
@@ -69,7 +69,7 @@ module T4Expressions;
        procedure TestSetConstructors;
                var
                        a, b, i, j: Int;
-                       A: SET;
+                       A: Set;
        begin
                a := 4;
                b := 6;
@@ -96,7 +96,7 @@ Out.Integer(ORD({1, 2, a, 5, b, 8} = {1, 2, a..b, 8}), 0); Out.Ln;
                        i, j, n: Int;
                        x: Real;
                        y: Byte;
-                       A, B: SET;
+                       A, B: Set;
                        str: array 24 of Char;
                        strs: array 2, 32 of Char;
                        t: T;
@@ -253,7 +253,7 @@ Out.Integer(ORD({1, 2, a, 5, b, 8} = {1, 2, a..b, 8}), 0); Out.Ln;
                        n: Int;
                        x: Real;
                        y: Byte;
-                       A: SET;
+                       A: Set;
        begin
                (*booleans*)
                ASSERT(true or true);
@@ -321,7 +321,7 @@ Out.Integer(ORD({1, 2, a, 5, b, 8} = {1, 2, a..b, 8}), 0); Out.Ln;
                        i, j, n: Int;
                        x: Real;
                        y: Byte;
-                       A: SET;
+                       A: Set;
        begin
                (*booleans*)
                ASSERT(true & true);
@@ -394,7 +394,7 @@ Out.Integer(ORD({1, 2, a, 5, b, 8} = {1, 2, a..b, 8}), 0); Out.Ln;
                        i, j, k: Int;
                        r: Real;
                        x: Byte;
-                       s: SET;
+                       s: Set;
        begin
                ASSERT(ABS(-1) = 1);
                ASSERT(ABS(0) = 0);
index b0bcbaba04a97052427d6894f545c151f14d9399..db6d9247fa0244fe087559892fff46380e044adf 100644 (file)
@@ -47,7 +47,7 @@ module T5Statements;
                        n, n1: Int;
                        x, x1: Real;
                        y, y1: Byte;
-                       A, A1: SET;
+                       A, A1: Set;
        begin
                b := true;
                b1 := false;
@@ -296,7 +296,7 @@ module T5Statements;
        procedure TestPredeclaredProperProcedures;
                const eps = 0.01;
                var n, i, j: Int;
-                       A: SET;
+                       A: Set;
                        x: Real;
                        a: array 1 of Real;
                        b: array 1 of Int;
index 558f187fa07da8217ff84328fb0b01b141f4ea17..32c8d2a23b69123eecd006d291a24903543e82c9 100644 (file)
@@ -29,7 +29,7 @@ module T5SystemStatements;
                        r, r1: Real;
                        x, x1: Byte;
                        xs: array 2 of Byte;
-                       s, s1: SET;
+                       s, s1: Set;
                        a, a1: Array;
                        a2: array SYSTEM.SIZE(Array) + 1 of Int;
        begin