[hackers] [scc] Rename generror to generror.awk and change file mode || FRIGN

From: <git_AT_suckless.org>
Date: Tue, 17 May 2016 21:36:26 +0200 (CEST)

commit 344825fbb21140229625e78462b7e22280e3deb7
Author: FRIGN <dev_AT_frign.de>
AuthorDate: Tue May 17 21:35:49 2016 +0200
Commit: FRIGN <dev_AT_frign.de>
CommitDate: Tue May 17 21:35:49 2016 +0200

    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.

diff --git a/cc2/Makefile b/cc2/Makefile
index c56b70d..12cea53 100644
--- a/cc2/Makefile
+++ b/cc2/Makefile
_AT_@ -18,7 +18,7 @@ main.o: error.h
 
 error.h: cc2.h
         rm -f $_AT_; trap 'rm -f $$$$.h' EXIT INT QUIT ;\
- awk -f generror cc2.h > $$$$.h && mv $$$$.h $_AT_
+ awk -f generror.awk cc2.h > $$$$.h && mv $$$$.h $_AT_
 
 cc2: $(OBJS) ../lib/libcc.a
         $(CC) $(SCC_LDFLAGS) $(OBJS) ../lib/libcc.a -o $_AT_
diff --git a/cc2/generror b/cc2/generror
deleted file mode 100755
index 797fb55..0000000
--- a/cc2/generror
+++ /dev/null
_AT_@ -1,12 +0,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}
-
diff --git a/cc2/generror.awk b/cc2/generror.awk
new file mode 100644
index 0000000..797fb55
--- /dev/null
+++ b/cc2/generror.awk
_AT_@ -0,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}
+
Received on Tue May 17 2016 - 21:36:26 CEST

This archive was generated by hypermail 2.3.0 : Tue May 17 2016 - 21:48:23 CEST