Skip to content
Snippets Groups Projects
Commit c756df7f authored by Arne Goedeke's avatar Arne Goedeke
Browse files

printf is not portable

printf is not available on many unix like system (e.g. embedded ARM fan
controllers). cat with here-document should be even more widely
available. Thanks to Chris Angelico for proposing this solution.
parent f5d4efec
No related branches found
No related tags found
No related merge requests found
#!/bin/sh #!/bin/sh
printf "/* File generated on `date` cat <<END
/* File generated on `date`
by getwhitespace <UnicodeData.txt */ by getwhitespace <UnicodeData.txt */
#define SPACECASE8 \\ #define SPACECASE8 \\
case ' ':case '\\\\t':case '\\\\r':case '\\\\n':case '\\\\v':case '\\\\f': \\ case ' ':case '\\t':case '\\r':case '\\n':case '\\v':case '\\f': \\
case 0x85:case 0xa0: case 0x85:case 0xa0:
" END
printf '#define SPACECASE16 SPACECASE8 ' cat <<END
#define SPACECASE16 SPACECASE8 \\
END
sed -n -e ' sed -n -e '
s/^\([0-9A-Fa-f]*\);[^;]*;[^;]*;[^;]*;\([^;]*\);/\1 \2 / s/^\([0-9A-Fa-f]*\);[^;]*;[^;]*;[^;]*;\([^;]*\);/\1 \2 /
/;INFORMATION SEPARATOR /d /;INFORMATION SEPARATOR /d
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment