File: getwhitespace.sh

package info (click to toggle)
pike8.0 8.0.702-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 79,608 kB
  • sloc: ansic: 266,508; xml: 186,324; makefile: 3,537; sh: 1,731; cpp: 1,328; lisp: 655; awk: 441; asm: 242; objc: 240; pascal: 157; perl: 34; sed: 34
file content (26 lines) | stat: -rwxr-xr-x 549 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh

cat <<END
/* File generated on `date`
by getwhitespace <UnicodeData.txt */

#define SPACECASE8							\\
       case ' ':case '\\t':case '\\r':case '\\n':case '\\v':case '\\f':	\\
       case 0x85:case 0xa0:
END

cat <<END
#define SPACECASE16	SPACECASE8 \\
END
sed -n -e '
s/^\([0-9A-Fa-f]*\);[^;]*;[^;]*;[^;]*;\([^;]*\);/\1 \2 /
/;INFORMATION SEPARATOR /d
/^[^;]* [SB] / p
/^[^;]* [WS]S / p
/^[^;]* CS <[^>]*> 0020;/ p
' | sed -e '
y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
/^00/ d
s/^\([^ ]*\) .*$/case 0x\1:\\/
'
echo ''