Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!spool.mu.edu!cs.umn.edu!thelake!steve From: steve@thelake.mn.org (Steve Yelvington) Newsgroups: comp.sys.atari.st.tech Subject: Re: Porting from MWC code Message-ID: Date: 9 Apr 91 12:25:30 GMT References: <1840@mwca.UUCP> Organization: St. Croix Valley C and Ski Lines: 42 [In article <1840@mwca.UUCP>, bill@mwca.UUCP (Bill Sheppard) writes ... ] > I'm in the process of attempting to recompile MicroEmacs 3.11 to make some > changes (remove mouse support so I can use within a CLI, for one). The > source code appears to expect Mark Williams C, but I'm using Sozobon (also > have Alcyon). So far I've seen two compilation (haven't tried linking yet) > errors: the structure DMABUFFER is expected in stat.h, the Sozobon stat.h > doesn't reference it, and "aesbind.h" is expected, which also isn't in the > Sozobon or dlibs distribution. Any ideas how these can be compensated for > or where I might find AES bindings (are they in another .h file?) The DMABUFFER is a 44-byte buffer used by Fsfirst() and Fsnext(). The MWC stat.h file includes a typedef for it; dLibs includes it directly in the definition of the stat struct. The MWC definition provides some access to internal GEMdos memory (the part dLibs identified as ``reserved field. DON'T TOUCH'' but you probably won't need any of that. The dLibs source code should have some examples of using its stat structure. I think the rule of thumb is to get the old DTA pointer and save it, declare a new DTA buffer, Fsetdta(), use it, then restore the old buffer with Fsetdta. The MWC aesbind.h file declares the values returned by AES functions -- all are ints, so you don't have to worry about that -- plus a couple of peculiar structure typedefs: Rect (four integers), Prect and Mouse (both four pointers to ints). The Mark Williams documentation uses those structures in a (probably vain) attempt to make GEM function calls more readable. > What other things should I watch for when porting from one variant of C to > another, especially when I don't have documentation for the original target? I can't think of any really bizarre things that you'll run into going from MWC to Sozobon. If you go in the opposite direction you'll need the dLibs source code handy, because Sozobon's library is far more complete than Mark Williams', especially in the string-handling functions. ---- Steve Yelvington / P. O. Box 38 / Marine on St. Croix, MN 55047 USA INTERNET: steve@thelake.mn.org UUCP: plains!umn-cs!thelake!steve GEnie: S.YELVINGTO2 Delphi: YELVINGTON