info-mac@uw-beaver (info-mac) (09/29/84)
From: winkler@harvard.ARPA (Dan Winkler) Manx looked at the Sumacc code I was trying to port and they got it working. As Bill Croft anticipated, the problems were all related to the difference in size between ints and pointers/longs. One mistake was a call to NewPtr that looked like this: msgbuf = (char *) NewPtr( 100 ); The first problem was that NewPtr takes a long, not an int, so I should have passed either 100L or (long) 100. The second problem was that I had failed to include mem.h in this file, so the compiler assumed that NewPtr returned and int and truncated the value, even though it was casting it to a char *. The compiler gave no error messages about either of these problems. Manx says that although they will not have a full lint ready for a long time, they might do something that at least finds problems like this. But at least we now have a partial list of the changes necessary to make Sumacc code run under Manx: booleans must be 0x100 or 0, you have to do your own string conversions, you cannot pass or return structures, you only get 8 significant characters in identifiers, and you have to be very careful to cast ints when necessary.