"Fossies" - the Fresh Open Source Software Archive

Member "links-1.03/Unicode/gen-ent" (18 Apr 2011, 370 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-ent": 2.8_vs_1.03.

    1 #!/bin/sh
    2 LC_ALL=C
    3 export LC_ALL
    4 echo
    5 echo Generating entity table.
    6 (
    7 cat entities.lnx | grep '^[     ]*{"' | sort >tmp
    8 N=`cat tmp | wc -l`
    9 echo '/* Automatically generated by gen-ent */'
   10 echo
   11 echo 'struct { char *s; int c; } entities ['`expr $N + 1`'] = {'
   12 cat tmp
   13 echo '  {NULL,  0}'
   14 echo '};'
   15 echo
   16 echo '#define N_ENTITIES' $N
   17 ) > ../entity.inc
   18 rm -f tmp
   19 echo Done.
   20 echo