[hackers] [scc] Fix letter for return statement || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Wed, 27 Jan 2016 16:59:16 +0100 (CET)

commit 1aea31215a1c95497aaa919b1d88296f59fd8f2c
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Tue Jan 26 23:00:00 2016 +0100
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Tue Jan 26 23:00:00 2016 +0100

    Fix letter for return statement
    
    Return statement was using r which was also used by right shift.
    The new letter is h (remeber backspace ^H).

diff --git a/cc1/code.c b/cc1/code.c
index 49d4a8e..1cdeab4 100644
--- a/cc1/code.c
+++ b/cc1/code.c
_AT_@ -66,7 +66,7 @@ char *optxt[] = {
         [OEFUN] = "}\n",
         [OELOOP] = "\tb\n",
         [OBLOOP] = "\te\n",
- [ORET] = "\tr",
+ [ORET] = "\th",
         [OPAR] = "p",
         [OCALL] = "c",
         [OFIELD] = "."
diff --git a/cc1/tests/test001.c b/cc1/tests/test001.c
index 24563fa..c1eb4fe 100644
--- a/cc1/tests/test001.c
+++ b/cc1/tests/test001.c
_AT_@ -13,7 +13,7 @@ Y7 V8 " (
         #K00
 )
         X4 Y7 'P pP cI
- r #I0
+ h #I0
 }
 */
 
diff --git a/cc1/tests/test003.c b/cc1/tests/test003.c
index b6bfde7..941474e 100644
--- a/cc1/tests/test003.c
+++ b/cc1/tests/test003.c
_AT_@ -6,17 +6,17 @@ output:
 G2 F "foo
 {
 \
- r #I2A
+ h #I2A
 }
 G3 F "bar
 {
 \
- r #I18
+ h #I18
 }
 G4 F "main
 {
 \
- r G2 cI
+ h G2 cI
 }
 */
 
diff --git a/cc1/tests/test004.c b/cc1/tests/test004.c
index fbff35b..5306f36 100644
--- a/cc1/tests/test004.c
+++ b/cc1/tests/test004.c
_AT_@ -23,9 +23,9 @@ A3 I "x
         A3 A3 A3 #I1 >I +I :I
         A3 A3 A3 #I4 <I +I :I
         j L4 A3 #I4 =I
- r #I1
+ h #I1
 L4
- r #I0
+ h #I0
 }
 */
 
diff --git a/cc1/tests/test005.c b/cc1/tests/test005.c
index b8d7be3..983b719 100644
--- a/cc1/tests/test005.c
+++ b/cc1/tests/test005.c
_AT_@ -13,9 +13,9 @@ A3 I "x
         A3 A3 ~I :I
         A3 A3 _I :I
         j L4 A3 #I2 =I
- r #I1
+ h #I1
 L4
- r #I0
+ h #I0
 }
 */
 
diff --git a/cc1/tests/test006.c b/cc1/tests/test006.c
index d504d84..850042c 100644
--- a/cc1/tests/test006.c
+++ b/cc1/tests/test006.c
_AT_@ -11,7 +11,7 @@ G3 F "main
 {
 \
         j L4 #I0
- r #I1
+ h #I1
         j L5
 L4
         j L6 #I0
_AT_@ -19,18 +19,18 @@ L4
 L6
         j L8 #I1
         j L9 G1 gI #I0 =I
- r #I1
+ h #I1
         j L10
 L9
- r #I0
+ h #I0
 L10
         j L11
 L8
- r #I1
+ h #I1
 L11
 L7
 L5
- r #I1
+ h #I1
 }
 */
 
diff --git a/cc1/tests/test007.c b/cc1/tests/test007.c
index e768572..9724639 100644
--- a/cc1/tests/test007.c
+++ b/cc1/tests/test007.c
_AT_@ -16,7 +16,7 @@ L6
         j L4 A3 #I0 !I
         b
 L5
- r A3
+ h A3
 }
 */
 
diff --git a/cc1/tests/test008.c b/cc1/tests/test008.c
index 1407347..baa04fc 100644
--- a/cc1/tests/test008.c
+++ b/cc1/tests/test008.c
_AT_@ -20,7 +20,7 @@ L6
         j L6 A3 #I14 <I
         b
 L7
- r A3 #I14 -I
+ h A3 #I14 -I
 }
 */
 
diff --git a/cc1/tests/test009.c b/cc1/tests/test009.c
index 0f4f8eb..3d0d902 100644
--- a/cc1/tests/test009.c
+++ b/cc1/tests/test009.c
_AT_@ -17,9 +17,9 @@ L6
         b
 L5
         j L7 A3 #IA =I
- r #I1
+ h #I1
 L7
- r #I0
+ h #I0
 }
 */
 
diff --git a/cc1/tests/test010.c b/cc1/tests/test010.c
index cafad7a..49d6efa 100644
--- a/cc1/tests/test010.c
+++ b/cc1/tests/test010.c
_AT_@ -55,7 +55,7 @@ L17
         j L15 #I1
         b
 L16
- r A3 #IF -I
+ h A3 #IF -I
 }
 */
 
diff --git a/cc1/tests/test011.c b/cc1/tests/test011.c
index 0dc344d..3ae5214 100644
--- a/cc1/tests/test011.c
+++ b/cc1/tests/test011.c
_AT_@ -10,13 +10,13 @@ G2 F "main
 \
 L3
         j L4
- r #I1
+ h #I1
 L5
- r #I0
+ h #I0
 L4
 L6
         j L5
- r #I1
+ h #I1
 }
 */
 
diff --git a/cc1/tests/test012.c b/cc1/tests/test012.c
index 2c76c85..1810fd3 100644
--- a/cc1/tests/test012.c
+++ b/cc1/tests/test012.c
_AT_@ -22,7 +22,7 @@ L9
 L12
         j L13
 L14
- r #I1
+ h #I1
         j L10
 L11
         t #2
_AT_@ -34,11 +34,11 @@ L8
         t #1
         v L9 #I0
 L7
- r #I2
+ h #I2
 L13
         s L16 A3
 L17
- r #I3
+ h #I3
         j L15
 L16
         t #1
_AT_@ -48,7 +48,7 @@ L15
         A3 #I2 :I
 L20
 L21
- r #I4
+ h #I4
         j L18
 L19
         t #1
_AT_@ -56,11 +56,11 @@ L19
 L18
         s L23 A3
 L24
- r A3
+ h A3
 L25
- r #I1
+ h #I1
 L26
- r #I1
+ h #I1
         j L22
 L23
         t #3
diff --git a/cc1/tests/test014.c b/cc1/tests/test014.c
index b266b60..ce7298b 100644
--- a/cc1/tests/test014.c
+++ b/cc1/tests/test014.c
_AT_@ -30,7 +30,7 @@ T8 K "i
 R9 W "j
 X10 I "k
 T11 Z "a
- r #I0
+ h #I0
 }
 G14 F "func2
 {
diff --git a/cc1/tests/test015.c b/cc1/tests/test015.c
index 9bab063..2e6bf0a 100644
--- a/cc1/tests/test015.c
+++ b/cc1/tests/test015.c
_AT_@ -18,8 +18,8 @@ G14 F "main
         j L15
 A16 S2 "s
 A17 I "s
- r A17
- r A16 M11 .S5 M6 .I A16 M11 .S5 M10 .S8 M9 .I +I
+ h A17
+ h A16 M11 .S5 M6 .I A16 M11 .S5 M10 .S8 M9 .I +I
 L15
 */
 
diff --git a/cc1/tests/test016.c b/cc1/tests/test016.c
index 830c413..50491af 100644
--- a/cc1/tests/test016.c
+++ b/cc1/tests/test016.c
_AT_@ -16,14 +16,14 @@ A6 P "p
         A6 A4 'P :P
         A6 _AT_I #I0 :I
         j L7 A4 #I0 =I
- r #I1
+ h #I1
 L7
         A6 G1 'P :P
         A6 _AT_I #I0 :I
         j L8 A6 #P0 !I
- r #I1
+ h #I1
 L8
- r #I0
+ h #I0
 }
 G9 F "func2
 {
_AT_@ -38,7 +38,7 @@ A13 P "pp
         A13 _AT_P @I #I0 :I
 L14
         A11 #P0 :P
- r A10
+ h A10
 }
 */
 
diff --git a/cc1/tests/test017.c b/cc1/tests/test017.c
index 77c19b9..76437c3 100644
--- a/cc1/tests/test017.c
+++ b/cc1/tests/test017.c
_AT_@ -17,12 +17,12 @@ A12 S6 "v
         A12 M8 .P _AT_S2 M3 .I #I1 :I
         A12 M8 .P _AT_S2 M4 .I #I2 :I
         j L13 A11 M3 .I #I1 =I
- r #I1
+ h #I1
 L13
         j L14 A11 M4 .I #I2 =I
- r #I2
+ h #I2
 L14
- r #I0
+ h #I0
 }
 */
 
diff --git a/cc1/tests/test018.c b/cc1/tests/test018.c
index 1e7a30b..ecca022 100644
--- a/cc1/tests/test018.c
+++ b/cc1/tests/test018.c
_AT_@ -18,18 +18,18 @@ A11 V10 "v
         A5 'P #P4 +P #P3 +P _AT_K #K2 :K
         A11 #I2 :I
         j L13 A5 'P #P4 +P #P3 +P _AT_K gI #I2 =I
- r #I1
+ h #I1
 L13
         j L14 A7 #P4 +P #P3 +P _AT_K gI #I2 =I
- r #I1
+ h #I1
 L14
         j L15 A9 _AT_K gI #I2 =I
- r #I1
+ h #I1
 L15
         j L16 A11 #I2 =I
- r #I1
+ h #I1
 L16
- r #I0
+ h #I0
 }
 */
 
diff --git a/cc1/tests/test022.c b/cc1/tests/test022.c
index c820e36..2d97bc8 100644
--- a/cc1/tests/test022.c
+++ b/cc1/tests/test022.c
_AT_@ -26,7 +26,7 @@ A4 N "u
         A4 #N0 :N
         A4 #N3 :N
         A4 #N0 :N
- r #I0
+ h #I0
 }
 */
 
diff --git a/cc1/tests/test023.c b/cc1/tests/test023.c
index 7ab4bf4..87790a8 100644
--- a/cc1/tests/test023.c
+++ b/cc1/tests/test023.c
_AT_@ -26,7 +26,7 @@ A4 Z "u
         A4 #Z3 :Z
         A4 #Z1 :Z
         A4 #Z0 :Z
- r #I0
+ h #I0
 }
 */
 
diff --git a/cc1/tests/test024.c b/cc1/tests/test024.c
index 3c08b91..75200b9 100644
--- a/cc1/tests/test024.c
+++ b/cc1/tests/test024.c
_AT_@ -24,7 +24,7 @@ A4 O "u
         A4 #OFFFFFFFFFFFFFFFF :O
         A4 #O3 :O
         A4 #O0 :O
- r #I0
+ h #I0
 }
 */
 
diff --git a/cc1/tests/test027.c b/cc1/tests/test027.c
index 79ac32c..79f87a7 100644
--- a/cc1/tests/test027.c
+++ b/cc1/tests/test027.c
_AT_@ -14,7 +14,7 @@ Y6 V7 " (
         #K00
 )
         A5 Y6 'P :P
- r A5 _AT_K gI
+ h A5 _AT_K gI
 }
 */
 
diff --git a/cc1/tests/test028.c b/cc1/tests/test028.c
index 2b89d02..6cee134 100644
--- a/cc1/tests/test028.c
+++ b/cc1/tests/test028.c
_AT_@ -12,7 +12,7 @@ Y10 V8 " (
         #"hi
         #K00
 )
- r Y10 'P
+ h Y10 'P
 }
 */
 
diff --git a/cc1/tests/test030.c b/cc1/tests/test030.c
index 7842baa..eca7376 100644
--- a/cc1/tests/test030.c
+++ b/cc1/tests/test030.c
_AT_@ -17,9 +17,9 @@ A11 P "p
 A12 I "n
 \
         j L15 A9 M3 .I A11 _AT_S2 M3 .I =I
- r #I0
+ h #I0
 L15
- r A11 _AT_S2 M4 .I A12 +I
+ h A11 _AT_S2 M4 .I A12 +I
 }
 G17 F "main
 {
_AT_@ -28,7 +28,7 @@ A18 S2 "f
         A18 M3 .I A18 M4 .I #I1 :I :I
         G14 A18 pS2 A18 'P pP #I2 pI cI
         G14 A18 pS2 A18 'P pP #I2 pI #I1 pI A18 pS2 A18 'P pP cI
- r #I0
+ h #I0
 }
 */
 
diff --git a/cc1/tests/test032.c b/cc1/tests/test032.c
index 072c811..00e89fa 100644
--- a/cc1/tests/test032.c
+++ b/cc1/tests/test032.c
_AT_@ -14,7 +14,7 @@ Y8 V9 " (
 )
 A7 P "p
         A7 Y8 'P :P
- r A7 #P0 !I
+ h A7 #P0 !I
 }
 */
 
diff --git a/cc1/tests/test034.c b/cc1/tests/test034.c
index 546423d..277634d 100644
--- a/cc1/tests/test034.c
+++ b/cc1/tests/test034.c
_AT_@ -11,13 +11,13 @@ G6 F "main
 {
 \
 X7 S2 "x
- r X7 'P #P0 !I
+ h X7 'P #P0 !I
 }
 G5 F "foo
 {
 \
         X3 M9 .I #I0 :I
- r X3 M9 .I
+ h X3 M9 .I
 }
 X13 S11 "bar2
 */
diff --git a/cc1/tests/test035.c b/cc1/tests/test035.c
index 4189fe4..b708232 100644
--- a/cc1/tests/test035.c
+++ b/cc1/tests/test035.c
_AT_@ -10,18 +10,18 @@ G7 F "main
 A8 I "e
         A8 #I3 :I
         j L9 A8 #I1 =I
- r #I0
+ h #I0
 L9
         j L10 A8 #I0 =I
- r #I1
+ h #I1
 L10
         j L11 A8 #I2 =I
- r #I2
+ h #I2
 L11
         j L12 A8 #I3 =I
- r #I3
+ h #I3
 L12
- r #I0
+ h #I0
 }
 */
 
diff --git a/cc1/tests/test037.c b/cc1/tests/test037.c
index e044774..7cffbb7 100644
--- a/cc1/tests/test037.c
+++ b/cc1/tests/test037.c
_AT_@ -12,15 +12,15 @@ G2 F "main
 {
 \
         j L3 #I0
- r #I1
+ h #I1
 L3
         j L4 #I0
- r #I2
+ h #I2
 L4
         j L5 #I0
- r #I3
+ h #I3
 L5
- r #I0
+ h #I0
 }
 */
 
diff --git a/cc1/tests/test038.c b/cc1/tests/test038.c
index edc0a75..44c1614 100644
--- a/cc1/tests/test038.c
+++ b/cc1/tests/test038.c
_AT_@ -12,13 +12,13 @@ G1 I "x
 G5 F "foo
 {
 \
- r X3 'P
+ h X3 'P
 }
 G3 F "main
 {
 \
         G1 #I0 :I
- r G1
+ h G1
 }
 */
 
diff --git a/cc1/tests/test039.c b/cc1/tests/test039.c
index 887a3ad..a1af77f 100644
--- a/cc1/tests/test039.c
+++ b/cc1/tests/test039.c
_AT_@ -27,7 +27,7 @@ A8 O "ull
         A6 #Z0 :Z
         A8 #O1 :O
         A8 #O1 :O
- r #I0
+ h #I0
 }
 */
 
diff --git a/cc1/tests/test040.c b/cc1/tests/test040.c
index f0ecc69..34c7c00 100644
--- a/cc1/tests/test040.c
+++ b/cc1/tests/test040.c
_AT_@ -11,7 +11,7 @@ M4 I "len #N0
 M6 P "head #N2
 M7 P "back #N6
 A10 S2 "List
- r A10 M4 .I
+ h A10 M4 .I
 }
 */
 
diff --git a/cc1/tests/test043.c b/cc1/tests/test043.c
index 14c9bf0..f6c65b1 100644
--- a/cc1/tests/test043.c
+++ b/cc1/tests/test043.c
_AT_@ -11,7 +11,7 @@ G11 F "main
 {
 \
         G9 M6 .P _AT_F c0
- r #I0
+ h #I0
 }
 */
 
diff --git a/cc1/tests/test045.c b/cc1/tests/test045.c
index 3d48eda..2d52e1e 100644
--- a/cc1/tests/test045.c
+++ b/cc1/tests/test045.c
_AT_@ -10,9 +10,9 @@ G3 F "main
 {
 \
         j L4 G1 #I5 =I
- r #I1
+ h #I1
 L4
- r #I0
+ h #I0
 }
 */
 
diff --git a/cc1/tests/test046.c b/cc1/tests/test046.c
index 4b1d3b1..2d80b1f 100644
--- a/cc1/tests/test046.c
+++ b/cc1/tests/test046.c
_AT_@ -13,15 +13,15 @@ G4 F "main
 {
 \
         j L5 G2 #I1 =I
- r #I1
+ h #I1
 L5
         j L7 G2 'P #P2 +P _AT_I #I2 =I
- r #I2
+ h #I2
 L7
         j L8 G2 'P #P4 +P _AT_I #I3 =I
- r #I3
+ h #I3
 L8
- r #I0
+ h #I0
 }
 */
 
diff --git a/cc1/tests/test047.c b/cc1/tests/test047.c
index 6f3ef1e..dd948ec 100644
--- a/cc1/tests/test047.c
+++ b/cc1/tests/test047.c
_AT_@ -16,15 +16,15 @@ G8 F "main
 {
 \
         j L9 G6 M3 .I #I1 =I
- r #I1
+ h #I1
 L9
         j L10 G6 M4 .I #I2 =I
- r #I2
+ h #I2
 L10
         j L11 G6 M5 .I #I3 =I
- r #I3
+ h #I3
 L11
- r #I0
+ h #I0
 }
 */
 
diff --git a/cc1/tests/test048.c b/cc1/tests/test048.c
index e0230df..62589cb 100644
--- a/cc1/tests/test048.c
+++ b/cc1/tests/test048.c
_AT_@ -15,12 +15,12 @@ G8 F "main
 {
 \
         j L9 G6 M3 .I #I1 =I
- r #I1
+ h #I1
 L9
         j L11 G6 M4 .I #I2 =I
- r #I2
+ h #I2
 L11
- r #I0
+ h #I0
 }
 */
 
diff --git a/cc1/tests/test049.c b/cc1/tests/test049.c
index febd514..6e90255 100644
--- a/cc1/tests/test049.c
+++ b/cc1/tests/test049.c
_AT_@ -13,9 +13,9 @@ G5 F "main
 {
 \
         j L6 G3 _AT_I #I5 =I
- r #I1
+ h #I1
 L6
- r #I0
+ h #I0
 }
 */
 
diff --git a/cc1/tests/test051.c b/cc1/tests/test051.c
index 6b81814..ac30de5 100644
--- a/cc1/tests/test051.c
+++ b/cc1/tests/test051.c
_AT_@ -13,15 +13,15 @@ G4 F "main
 {
 \
         j L5 G2 #I0 =I
- r #I1
+ h #I1
 L5
         j L7 G2 'P #P2 +P _AT_I #I1 =I
- r #I2
+ h #I2
 L7
         j L8 G2 'P #P4 +P _AT_I #I2 =I
- r #I3
+ h #I3
 L8
- r #I0
+ h #I0
 }
 */
 
diff --git a/cc1/tests/test052.c b/cc1/tests/test052.c
index ac62914..4f83e19 100644
--- a/cc1/tests/test052.c
+++ b/cc1/tests/test052.c
_AT_@ -17,18 +17,18 @@ G8 F "main
 {
 \
         j L9 G6 M3 .I #I1 =I
- r #I1
+ h #I1
 L9
         j L11 G6 M4 .I #I2 =I
- r #I2
+ h #I2
 L11
         j L12 G6 'P #P4 +P _AT_S2 M3 .I #I3 =I
- r #I3
+ h #I3
 L12
         j L13 G6 'P #P4 +P _AT_S2 M4 .I #I4 =I
- r #I4
+ h #I4
 L13
- r #I0
+ h #I0
 }
 */
 
diff --git a/cc1/tests/test053.c b/cc1/tests/test053.c
index 319a8f6..ac1134e 100644
--- a/cc1/tests/test053.c
+++ b/cc1/tests/test053.c
_AT_@ -14,12 +14,12 @@ G7 F "main
 {
 \
         j L8 G5 M3 .I #I1 =I
- r #I1
+ h #I1
 L8
         j L9 G5 M4 .I #I2 =I
- r #I2
+ h #I2
 L9
- r #I0
+ h #I0
 }
 */
 
diff --git a/cc1/tests/test056.c b/cc1/tests/test056.c
index bf97936..6f4df91 100644
--- a/cc1/tests/test056.c
+++ b/cc1/tests/test056.c
_AT_@ -25,7 +25,7 @@ G11 V10 "m (
 G13 F "main
 {
 \
- r G9 M7 .V6 'P #P2 +P _AT_K gI gN #N0 !I
+ h G9 M7 .V6 'P #P2 +P _AT_K gI gN #N0 !I
 }
 */
 
diff --git a/cc1/tests/test057.c b/cc1/tests/test057.c
index a0b8d4b..1b1b3ee 100644
--- a/cc1/tests/test057.c
+++ b/cc1/tests/test057.c
_AT_@ -25,7 +25,7 @@ G4 V2 "arr2 (
 G6 F "main
 {
 \
- r G3 'P #P6 +P #P4 +P _AT_I G4 'P #P6 +P #P6 +P @I !I
+ h G3 'P #P6 +P #P4 +P _AT_I G4 'P #P6 +P #P6 +P @I !I
 }
 */
 
diff --git a/cc1/tests/test058.c b/cc1/tests/test058.c
index f76908f..2a8f66b 100644
--- a/cc1/tests/test058.c
+++ b/cc1/tests/test058.c
_AT_@ -41,7 +41,7 @@ G4 V3 "arr (
 G6 F "main
 {
 \
- r G4 'P #PA +P #P8 +P _AT_I G4 'P #P1E +P #PA +P #P8 +P @I !I
+ h G4 'P #PA +P #P8 +P _AT_I G4 'P #P1E +P #PA +P #P8 +P @I !I
 }
 */
 
diff --git a/cc1/tests/test060.c b/cc1/tests/test060.c
index 9883c07..3ef98cf 100644
--- a/cc1/tests/test060.c
+++ b/cc1/tests/test060.c
_AT_@ -6,7 +6,7 @@ output:
 G2 F "main
 {
 \
- r #I0
+ h #I0
 }
 */
 
diff --git a/cc2/cc2.h b/cc2/cc2.h
index 3c90a68..52dfd85 100644
--- a/cc2/cc2.h
+++ b/cc2/cc2.h
_AT_@ -78,7 +78,7 @@ enum op {
         OSTRING = '"',
         /*statements */
         OJMP = 'j',
- ORET = 'r',
+ ORET = 'h',
         OBLOOP = 'b',
         OELOOP = 'e',
         OCASE = 'v',
Received on Wed Jan 27 2016 - 16:59:16 CET

This archive was generated by hypermail 2.3.0 : Wed Jan 27 2016 - 17:00:47 CET