Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!ux1.cso.uiuc.edu!midway!quads.uchicago.edu!wjb1 From: wjb1@quads.uchicago.edu (William J. Buikema) Newsgroups: comp.sys.mac.apps Subject: Re: Edit 2.1 and Many, Many Fonts Message-ID: <1990Sep11.132832.12935@midway.uchicago.edu> Date: 11 Sep 90 13:28:32 GMT References: <4582@crystal9.UUCP> <1990Sep11.053504.8927@silvlis.com> Sender: news@midway.uchicago.edu (News Administrator) Distribution: comp Organization: University of Chicago Lines: 57 In article <1990Sep11.053504.8927@silvlis.com> jimb@silvlis.com (Jim Budler) writes: >In article <4582@crystal9.UUCP> derosa@motcid.UUCP (John DeRosa) writes: >>I enjoy two things in my Macintosh life; Lots of Fonts and >>a simple text editor like Edit 2.1. >> >>Unfortunately, it appears that too many fonts causes >>Edit to choke. Has anyone else had this problem? Some time ago a patch was posted specifically for this problem, and is reproduced below: Edit is not doing anything funny with the enableFlags field of the menu resource. In fact, this particular menu isn't even kept in a resource, but is built on the fly! Pretty good guess, though. I have MDS Edit version 2.1, according to the "About Edit..." box. It calls NewMenu() to get a new font menu, then calls AddResMenu() to fill the menu with font names. Then, it gets the font names from the menu using GetItem(), and fills a local stack frame array with the corresponding font numbers, which it gets from GetFNum(). Finally, it checks the item with the name of the font it is using. The font numbers are stored in a 31-word array. When it gets to menu item 32, guess what happens? Yeah, it overwrites the counter it is using to keep track of what menu item to look at next, and this puts it in an infinite loop. The offending function is about 3328 bytes into CODE resource #5. It can be patched by making the stack frame bigger, and by moving the font number array to the bottom of the new stack frame. If you make the stack frame 1024 bytes larger, and move the font number array down to the bottom of it, then you get room for 512 fonts, which is probably enough. That should fix it for a while. I patched mine, and it runs OK with 52 fonts installed. Oh, you wanted the patch in hex? Sorry, here it is. Find the first 4E56FE8C in CODE resource 5. Replace it with 4E56FA8C. Replace 41EEFFB4 with 41EEFBB8 twice. These three changes are within 142 bytes of each other. Earle R. Horton. 23 Fletcher Circle, Hanover, NH 03755--Graduate student. He who puts his hand to the plow and looks back is not fit for the kingdom of winners. In any case, 'BACK' doesn't work. Bill Bill Buikema internet: wjb1@midway.uchicago.edu Univ. of Chicago bitnet: wjb1%midway.uchicago.edu@uchimvs1 Dept. of Molecular Genetics or wjb1@midway.uchicago.edu Cell Biology, CLSC 313 920 E. 58th St. Chicago, IL 60637