Path: utzoo!attcan!uunet!lll-winken!lll-tis!mordor!joyce!ames!mailrus!tut.cis.ohio-state.edu!bloom-beacon!ATHENA.MIT.EDU!swick From: swick@ATHENA.MIT.EDU (Ralph R. Swick) Newsgroups: comp.windows.x Subject: Re: Xtk "unsigned int" typedefs considered harmful Message-ID: <8809122025.AA00876@LYRE.MIT.EDU> Date: 12 Sep 88 20:24:57 GMT References: <6289@batcomputer.tn.cornell.edu> Sender: daemon@bloom-beacon.MIT.EDU Organization: DEC/MIT Project Athena Lines: 10 Well, that's C for ya. You're quite correct; there will soon be lots of bugs lurking around, especially in your code. Nowhere in the specification does it say that you may assume Dimensions and Positions are of any particular size. If you want to write portable C code, you will have to use the (opaque) definitions of Dimension, Position and Cardinal and do the appropriate casts to get signed arithmetic where you want it. It is quite possible that the spec should give a larger warning to C programmers.