]> Cypherpunks repositories - gostls13.git/commitdiff
gc: use octal escapes in mkopnames
authorAnthony Martin <ality@pbrane.org>
Wed, 1 Feb 2012 02:15:42 +0000 (18:15 -0800)
committerAnthony Martin <ality@pbrane.org>
Wed, 1 Feb 2012 02:15:42 +0000 (18:15 -0800)
Plan 9's tr(1) doesn't accept the C-style escapes
for tab and newline characters.  I was going to use
the \xFF hexadecimal escapes but GNU tr(1) doesn't
accept those.  It seems octal is the least common
denominator.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5576079

src/cmd/gc/mkopnames

index fb2ceec81f87865c1b64f7b3d9a522b4e9ba3a9c..d3f27e8152eaf7f1aae2a5f58f4c7be7f31116dc 100755 (executable)
@@ -14,8 +14,8 @@ echo '{'
 sed -n '/OXXX/,/OEND/p' go.h |
        cpp |
        sed 's!//.*!!; /^#/d'  |
-       tr ' ' '\n' |
-       tr -d ' \t,' |
+       tr ' ' '\012' |
+       tr -d ' \011,' |
        grep . |
        sort |
        grep -v '^OEND$' |