Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!dali.cs.montana.edu!milton!uw-beaver!zephyr.ens.tek.com!tektronix!reed!glacier!busker!f20.n226.z1.FIDONET.ORG!Brain.in.Neutral From: Brain.in.Neutral@f20.n226.z1.FIDONET.ORG (Brain in Neutral) Newsgroups: comp.sys.mac.programmer Subject: Re: THINK C --> MPW C Message-ID: <667.2783DF2A@busker.fidonet.org> Date: 29 Dec 90 03:42:50 GMT Sender: ufgate@busker.fidonet.org (newsout1.26) Organization: FidoNet node 1:226/20 - cmhGate UF Gateway, Columbus OH Lines: 26 Reply-To: bin@primate.wisc.edu From article <22341@well.sf.ca.us>, by wdh@well.sf.ca.us (Bill Hofmann): > Ouch. Haven't run into that one yet. I'm doing some development that has > to compile and work in both environments, and have an #include file that > contains the differences I've found. Obviously, the int size thing bit me > *ages* ago, so I *always* use short or long except for an index where I want > the compiler to produce best results. I tend to #include a file "Compiler.h" which, for THINK C, contains: typedef int Integer; typedef long Longint; and then I use Integer and Longint (i.e., the Pascal names for the 2 and 4 byte integer types) in my code. To port to a different language you change Compiler.h, not your code. -- Paul DuBois dubois@primate.wisc.edu -- Brain in Neutral - via FidoNet node 1:105/14 UUCP: ...!{uunet!glacier, ..reed.bitnet}!busker!226!20!Brain.in.Neutral INTERNET: Brain.in.Neutral@f20.n226.z1.FIDONET.ORG