home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / unixtex-6.1b-src.tgz / tar.out / contrib / unixtex / web2c / mf / convert < prev    next >
Encoding:
Text File  |  1996-09-28  |  510 b   |  31 lines

  1. #!/bin/sh
  2. # Convert Metafont to C.
  3. srcdir=$1
  4. sed=sed
  5.  
  6. $sed -e '
  7.     : again
  8.     /\.$/{
  9.         N
  10.         s/\.\n/\
  11. ./
  12.         t again
  13.     }
  14.     s/\.hh/.hhfield/g
  15.     s/\.lh/.lhfield/g
  16. ' $srcdir/../lib/common.defines $srcdir/../lib/texmf.defines mf.p \
  17.     | ../web2c/web2c -htexmf.h -m \
  18.     | $sed -e '
  19.         s/else write/else\
  20. write/
  21.         s/ maxcoef\( *[^( ]\)/ lmaxcoef\1/g
  22.         s/ b1/ lb1/g
  23.         s/ b2/ lb2/g
  24.         s/ b3/ lb3/g
  25.       ' \
  26.     | ../web2c/fixwrites \
  27.     | ../web2c/splitup mf
  28.  
  29. cat coerce.h $srcdir/coerce.add >xcoerce.h
  30. mv xcoerce.h coerce.h
  31.