Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 UW 5/3/83; site uw-beaver Path: utzoo!watmath!clyde!burl!ulysses!cbosgd!cbdkc1!desoto!packard!hoxna!houxm!vax135!cornell!uw-beaver!info-mac From: info-mac@uw-beaver (info-mac) Newsgroups: fa.info-mac Subject: porting Sumacc to Manx Message-ID: <1818@uw-beaver> Date: Fri, 28-Sep-84 20:44:16 EDT Article-I.D.: uw-beave.1818 Posted: Fri Sep 28 20:44:16 1984 Date-Received: Thu, 4-Oct-84 01:58:59 EDT Sender: daemon@uw-beave Organization: U of Washington Computer Science Lines: 23 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.