[comp.sources.d] spacewar: sizeof

root@ibmpcug.UUCP (Super user) (06/16/88)

[The useful bit is: those chaps without -ldbm.. I wonder if the dbm.{c,h}
 in news would suffice? I can't get spacewar to work even WITH -ldbm
 which I HAVE - so I can't tell you.. see below if you're interested]

ARRRRRRRGGGGHHHHHH NOT AGAIN!!!!!!!
(now that I've got that out of my system, i'll begin...)

...nice multiuser game posted by nice people...
Great! I thot - compile and GO - Xenix SYSV 286 (wot I'm running on a
compaq 386) has named pipes, should be OK.

	B U T sizeof(int) must == sizeof (anything *) in spacewar
	and in Xenix: sizeof(int) == 2 and sizeof(anything *) == 4 

in the large model (memory models, ick) and worse, with Xenix 386 (wot I
WILL be running in a few weeks time) that is the case for the 'normal'
nominally 'small' memory model, i think - correct me if I'm wrong. 

I'm sure this discussion has been flogged to death before in somewhere
like comp.lang.c, but perhaps there should be some discussion
especially with respect to sources in comp.sources.* ..

I suppose my feeling is that as the game was based on much older software,
i can't really blame the authors, so i'll put in my vote against compilers
that break older software by NOT choosing to make sizeof(int) == sizeof(char *)

But really, this posting is to just warn other iAPX users, so please reduce
flame levels, please? And IF (big IF) I get it work.. i'll post diffs. Promise.

This is a request for discussion, and news latency to my site is quite slow..
so probably more useful to post them than email in this case possibly?

Cheers

PS no - middle model doesn't work either - DATA size is too big - that
compilation just finished :-(
-- 
Ronald is either ronald%ibmpcug@ukc.ac.uk,
or ...!ukc!pyrltd!slxsys!ibmpcug!ronald if you're old fashioned..
(like my boss is, but I'll try to persuade him that my opinions ARE his :-)