home *** CD-ROM | disk | FTP | other *** search
- |#!/bin/sh
- |# Convert Metafont to C.
- |#
- |sed=sed
-
- |# The `volatile's in the second sed below help avoid bugs in the MIPS
- |# compiler.
- |$sed -e '
- | : again
- | /\.$/{
- | N
- | s/\.\n/\
- |./
- | t again
- | }
- | s/\.hh/.hhfield/g
- | s/\.lh/.lhfield/g
- |' ../lib/common.defines ../lib/texmf.defines mf.p \
- | | ../web2c/web2c -htexmf.h -m \
- | | $sed -e '
- | s/else write/else\
- |write/
- | s/ maxcoef\( *[^( ]\)/ lmaxcoef\1/g
- | s/ b1/ lb1/g
- | s/ b2/ lb2/g
- | s/ b3/ lb3/g
- | /^integer takescaled/,/becareful/s/integer becareful/volatile &/
- | /^void initbignode/,/halfword q/s/halfword q/volatile &/
- | ' \
- | | ../web2c/fixwrites \
- | | ../web2c/splitup mf
-
- |sync
-
- |cat coerce.h fixcoerce.h > xcoerce.h
- |mv xcoerce.h coerce.h
-
- |RISC OS:
- echo Concatenating...
- fcat ^.lib.common_def ^.lib.texmf_def ^.lib.riscos_def mf.p >temp
- echo First sed run...
- sed -f SedScr1 temp >temp2
- echo web2c...
- web2c -hh.texmf -m <temp2 >temp
- echo second sed run...
- sed -f SedScr2 temp >temp2
- echo fixwrites...
- fixwrites <temp2 >temp
- echo splitup...
- splitup mf <temp
- fcat h.coerce h.fixcoerce >h.xcoerce
- copy h.xcoerce h.coerce ~CD~V
- remove temp
- remove temp2
-