Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker.mit.edu!mit-eddie!uw-beaver!zephyr.ens.tek.com!tektronix!reed!glacier!busker!f20.n226.z1.FIDONET.ORG!Keith.Rollin From: Keith.Rollin@f20.n226.z1.FIDONET.ORG (Keith Rollin) Newsgroups: comp.sys.mac.programmer Subject: Re: THINK C --> MPW C Message-ID: <645.2783DF03@busker.fidonet.org> Date: 28 Dec 90 08:35:20 GMT Sender: ufgate@busker.fidonet.org (newsout1.26) Organization: FidoNet node 1:226/20 - cmhGate UF Gateway, Columbus OH Lines: 34 Reply-To: keith@Apple.COM In article <1990Dec24.073137.16178@cs.uoregon.edu> mkelly@cs.uoregon.edu (Michael A. Kelly) writes: >I've just finished porting a rather simple application from THINK C to >MPW C. After changing all the standard header names, the program compiled, >but it didn't work quite right. After much deliberation (and a bout with >SADE), and finally a trip through the manuals, I discovered that MPW's 'int's >are 4 bytes long (whereas THINK's are 2 bytes). There was a small section >of code that relied on the size of plain integers. After changing those ints >to shorts everything works fine. > >My question is: What other elusive differences do I have to look forward to >when porting from THINK C to MPW C ? I seem to recall that a shift right of a signed value is implementation dependent, according to ANSI. You can either shift the sign bit and fill it in with a zero or maintain the sign bit (this is the difference between using ASR versus LSR). THINK implements it one way, and MPW implements it another. -- ------------------------------------------------------------------------------ Keith Rollin --- Apple Computer, Inc. --- Developer Technical Support INTERNET: keith@apple.com UUCP: {decwrl, hoptoad, nsc, sun, amdahl}!apple!keith "Argue for your Apple, and sure enough, it's yours" - Keith Rollin, Contusions + Organization: Apple Computer Inc., Cupertino, CA -- Keith Rollin - via FidoNet node 1:105/14 UUCP: ...!{uunet!glacier, ..reed.bitnet}!busker!226!20!Keith.Rollin INTERNET: Keith.Rollin@f20.n226.z1.FIDONET.ORG