Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!sdd.hp.com!uakari.primate.wisc.edu!bin From: bin@primate.wisc.edu (Brain in Neutral) Newsgroups: comp.sys.mac.programmer Subject: Re: THINK C --> MPW C Message-ID: <3653@uakari.primate.wisc.edu> Date: 28 Dec 90 19:42:50 GMT References: <22341@well.sf.ca.us> Sender: bin@primate.wisc.edu Reply-To: bin@primate.wisc.edu Lines: 18 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