| 1 | #!/bin/shscip-shell filesystem . . `/bin/sh`. |
| 2 | set -e |
| 3 | LC_ALL=C |
| 4 | export LC_ALL |
| 5 | echoscip-shell system . . echo. |
| 6 | echoscip-shell system . . echo. Generating Unicode2ascii translation table. |
| 7 | ( |
| 8 | catscip-shell system . . cat. 7bitrepl.lnx | awkscip-shell system . . awk. -f tr7bit.awk >tmp |
| 9 | N=`catscip-shell system . . cat. tmp | wcscip-shell system . . wc. -l` |
| 10 | echoscip-shell system . . echo. '/* Automatically generated by gen-7b */scip-shell filesystem . . `/* Automatically generated by gen-7b */`.' |
| 11 | echoscip-shell system . . echo. |
| 12 | echoscip-shell system . . echo. 'static_const struct { int x; char *s; } unicode_7b ['`exprscip-shell system . . expr. $N + 1`'] = {' |
| 13 | sortscip-shell system . . sort. tmp | sedscip-shell system . . sed. 's/\\/\\\\/g' | sedscip-shell system . . sed. 's/\\\\\\\\/\\\\/g' | sedscip-shell system . . sed. 's/:\\\\001$/:\\001/g' | sedscip-shell system . . sed. 's/"/\\"/g' | sedscip-shell system . . sed. 's/^/ { /' | sedscip-shell system . . sed. 's/:/, "/' | sedscip-shell system . . sed. 's/$/" },/' |
| 14 | echoscip-shell system . . echo. ' { -1, NULL }' |
| 15 | echoscip-shell system . . echo. '};' |
| 16 | echoscip-shell system . . echo. |
| 17 | echoscip-shell system . . echo. '#define N_UNICODE_7B' $N |
| 18 | )>../uni_7b.inc |
| 19 | rmscip-shell system . . rm. -f tmp |
| 20 | echoscip-shell system . . echo. Done. |
| 21 | echoscip-shell system . . echo. |