Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!rutgers!ucla-cs!zen!ucbvax!trwrb.UUCP!simpson From: simpson@trwrb.UUCP (Scott Simpson) Newsgroups: comp.laser-printers Subject: Porting METAFONT to the Pyramid Message-ID: <8708070029.AA08497@brillig.umd.edu> Date: Wed, 5-Aug-87 22:57:50 EDT Article-I.D.: brillig.8708070029.AA08497 Posted: Wed Aug 5 22:57:50 1987 Date-Received: Sun, 9-Aug-87 08:33:55 EDT Sender: daemon@ucbvax.BERKELEY.EDU Distribution: world Organization: The ARPA Internet Lines: 46 Approved: laser-lovers@brillig.umd.edu A couple of weeks ago I requested a change file for METAFONT that would compile under the OSx 4.0 Pascal compiler. (The old OSx 3.5 change file did not work). I expect that many of you Pyramid sites have not upgraded to 4.0 OSx since I did not receive any offers of a change file. Consequently, I decided to get my fingers dirty and fix the METAFONT change file myself. It seems that with this new release of the operating system, Pyramid has made their compiler compatible with the ISO standard and packed array elements can no longer be passed by reference. This causes a compilation error when str_pool is passed to the C calledit routine in TeX and METAFONT. Since the Pyramid pascal compiler packs character arrays anyway, you can simply remove the packed keyword from the str_pool declaration in TeX and METAFONT. This will enable both to compile and TeX will work fine but inimf will go into an infinite loop when it tries to read in the plain.mf file. METAFONT needs a couple of more changes. With the new pascal compiler, you must declare eight bit bytes as 0..255 instead of -128..127 and you must declare 16 bit half words as 0..65536 instead of -32768..32767. Consequently, you will need to set the following constants appropriately in the inimf change file: mem_max=30000 mem_min=0 mem_top=30000 min_quarterword=0 max_quarterword=255 min_halfword=0 max_halfword=65536 Just change the values that are already there. Inimf will now compile correctly. For virmf, I changed the value mem_max to 60000 in the ini_to_vir script. Dvitype breaks too. There is a bug in the pascal compiler that causes expressions to sometimes be evaluated incorrectly. (I reported it to Pyramid.) In the routine signed_quad, the expression signed_quad := (((ord(a) - 256) * 256 + ord(b)) * 256 + ord(c)) * 256 + ord(d); does not evaluate correctly. If you declare "i" and change this to begin i := ((ord(a) - 256) * 256 + ord(b)) * 256 + ord(c); signed_quad := i * 256 + ord(d); end; dvitype works correctly. Good luck! Scott Simpson TRW Space and Defense Sector ...{decvax,ihnp4,ucbvax}!trwrb!simpson