shithub: scc

Download patch

ref: 951bb631de5ebf0959ddbbb8fb6d3acdc092ccf1
parent: f854f2009e61e412676d754b8b7b317d2643d5df
author: FRIGN <dev@frign.de>
date: Tue May 17 17:35:49 EDT 2016

Rename generror to generror.awk and change file mode

Now it's clear what it is. The executable bit was not necessary,
as we execute it using awk -f.

--- a/cc2/Makefile
+++ b/cc2/Makefile
@@ -18,7 +18,7 @@
 
 error.h: cc2.h
 	rm -f $@; trap 'rm -f $$$$.h' EXIT INT QUIT ;\
-	awk -f generror cc2.h > $$$$.h && mv $$$$.h $@
+	awk -f generror.awk cc2.h > $$$$.h && mv $$$$.h $@
 
 cc2: $(OBJS) ../lib/libcc.a
 	$(CC) $(SCC_LDFLAGS) $(OBJS) ../lib/libcc.a -o $@
--- a/cc2/generror
+++ /dev/null
@@ -1,12 +1,0 @@
-# See LICENSE file for copyright and license details.
-BEGIN {
-	print "char *errlist[] = {"
-}
-/^enum nerrors \{/     {inhome = 1}
-inhome && /E[A-Z]*, /  {sub(/,/, "", $1)
-                        printf("\t[%s] = \"", $1)
-                        for (i = 3; i < NF-1; ++i)
-                        	printf("%s ", $i)
-                        printf("%s\",\n", $(NF-1));}
-inhome && /^}/          {print "};" ; inhome = 0}
-
--- /dev/null
+++ b/cc2/generror.awk
@@ -1,0 +1,12 @@
+# See LICENSE file for copyright and license details.
+BEGIN {
+	print "char *errlist[] = {"
+}
+/^enum nerrors \{/     {inhome = 1}
+inhome && /E[A-Z]*, /  {sub(/,/, "", $1)
+                        printf("\t[%s] = \"", $1)
+                        for (i = 3; i < NF-1; ++i)
+                        	printf("%s ", $i)
+                        printf("%s\",\n", $(NF-1));}
+inhome && /^}/          {print "};" ; inhome = 0}
+