"Fossies" - the Fresh Open Source Software Archive

Member "links-1.03/Unicode/gen-7b" (18 Apr 2011, 467 Bytes) of archive /linux/www/links-1.03.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "gen-7b": 2.8_vs_1.03.

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