Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!seismo!cmcl2!acf4!spector From: spector@acf4.UUCP Newsgroups: comp.sys.mac Subject: MPW C annoyances.... Message-ID: <12500007@acf4.UUCP> Date: Sun, 29-Mar-87 12:29:00 EST Article-I.D.: acf4.12500007 Posted: Sun Mar 29 12:29:00 1987 Date-Received: Mon, 30-Mar-87 02:43:50 EST Organization: New York University Lines: 51 more MPW-isms: This is one that will most likely be a religious point, but here goes: What is with Apple? I just bought all of MPW. Although its a little too Unixy for a development environment on a Macintosh, I an learning to like it.. but MPW C has been broken by Apple, for why I don't understand! Heres the story, taken from page 17, table 2-1 of the MPW C Reference Manual: Size and range of data types: ----------------------------------------------------------------------------- Data type Bits Description ----------------------------------------------------------------------------- Char 8 Range -128 to 127 unsigned Char 8 Range 0 to 225 short 16 Range -32768 to 32767 unsigned short 16 Range 0 to 65535 int 32 Range -2,147,483,648 to ..... (the rest of the chart details the obvious...) Now, what's wrong with this picture? Well, for starters, someone should have tried to read the motorola manual for the 68000 family of microprocessors. Integers on the 680x0 family are 16 (sixteen) bits wide, longs are 32bits. Whats more is that Apple (!!), in Inside Macintosh states that integers are *16 bits*! (see Inside Macintosh, Vol. I, Pg.86, "Pascal Data Types") I know, we're talking about C and not Pascal, but if it weren't for the fact that all of the toolbox routines that expect integers, expect 16 bit integers I wouldn't be upset. Of course Apple does the type coercion for the toolbox traps, but why do they violate their own spec? Why am I as a programmer forced to rewrite (read: change) thousands of lines of code that make the (correct) assumption that integers on a Macintosh are 16bits?!? I mean, I may be too touchy, but this is really annoying. Bill Duvall started this silly trend of 32bit ints on a Mac with MacC, and he was wrong too. Hmmph! Grumble, grumble. David HM Spector NYU/acf Systems Group