]> mj.ucw.cz Git - minsk.git/commitdiff
Minsk: a line starting with "." acts as an end of the program
authorMartin Mares <mj@ucw.cz>
Mon, 22 Nov 2010 21:50:21 +0000 (22:50 +0100)
committerMartin Mares <mj@ucw.cz>
Mon, 27 Dec 2010 16:13:48 +0000 (17:13 +0100)
ex-arith
ex-hello
ex-hello2
ex-loop
minsk.c

index 9d94a08feeaeab18da69b22b9f50bf5abce30589..2a7e0fd31d6d8f319202800d3ddf47352c8eb25e 100644 (file)
--- a/ex-arith
+++ b/ex-arith
@@ -21,3 +21,4 @@
 @1100
 +120000000000
 +250000000000
+.
index ac2294db32a8a33c03653a076c532839096eb7a7..e4f9a011532cacbe344e6c16f9fbd40eeae4c8ca 100644 (file)
--- a/ex-hello
+++ b/ex-hello
@@ -9,3 +9,4 @@
 @1000
 +65 45 53 53 56 17
 +42 56 60 53 44 16
+.
index 4f71f89c9bb2410bf17869f68dd67a64473f7a67..a4c632eb9b253570d7df7ad2f70bd58a2ae71d0c 100644 (file)
--- a/ex-hello2
+++ b/ex-hello2
@@ -13,3 +13,4 @@
 +62 42 63 51 17 62
 +56 42 40 60 50 71
 +16 00 00 00 00 00
+.
diff --git a/ex-loop b/ex-loop
index 5f2177df2286e3445c454fc758017a210a719e57..4f53bb601b0d1dd510e6119606106dd3a40c4232 100644 (file)
--- a/ex-loop
+++ b/ex-loop
@@ -15,3 +15,4 @@
 @1000
 +0000 0000 0144
 +0000 0000 0001
+.
diff --git a/minsk.c b/minsk.c
index 2532dbaca97314b3dd13a0171ee2ab8012bb3c2d..6ffe02343b4827176d33af5ec50fd58cb8e4197d 100644 (file)
--- a/minsk.c
+++ b/minsk.c
@@ -198,6 +198,9 @@ static void parse_in(void)
          continue;
        }
 
+      if (c[0] == '.')
+       return;
+
       if (c[0] == '@')
        {
          c++;