Yes, folks, this is the same old rogue 5.3-clone source that I've posted
here before.  So why do it again?  Well, I got many complaints/inquisitions
about whether this code was ported to a number of different UNIX/ULTRIX/VMS
systems.  The answer is still "no."  BUTTTT..., I would like to first port
it to as may of the different UNIX systems as I can, and go from there.

My problem is that I'm not particularly familiar with the ins and outs of
other UNIX systems besides the one I work on. (BSD 4.[23])  So what I've
done is set up the rogue source code so that all of the machine dependent
stuff is localized in one source file, machdep.c.  Enclosed in machdep.c
are all of the routines that I thought were even slightly machine-dependent.
Also enclosed in machdep.c is a copious set of comments describing what's
going on in there.  Now, most of these routines I believe will run most
UNIX systems without modification, but then again, some won't.
That's where I need some help.  I need folks who have access to other
UNIX systems to make modifications to machdep.c that will effectively
port the entire rogue program to their particular UNIX system.  Enough
instructions are included in machdep.c to do this.  The modified machdep.c
can be e-mailed to me, whereby I can incorporate the changes, and post
versions of machdep.c to comp.sources.games as it becomes more complete.

Does this sound remotely interesting to you?  Please give me a hand.

If you can't do it yourself, maybe you know someone who can.  A little
thumbing through your system documentation is all you probably need.

I am hoping all the system-dependencies are in machdep.c, but I suspect
there may be some 'C' constructs that various compilers out there don't
support or treat differently.  I need to know about these too.  I'm not
expecting much of this on UNIX systems, though.

The code runs through 'lint' fine on my system.  All identifiers are unique
within their first eight characters.  Function names are unique within
their first seven characters.  All file names are under 14 characters.


Prerequisites of the operating system:

	32-bit long integer. (at least)
	16-bit short integer. (at least)

	Standard I/O library providing the following:
		stdio.h (include file),
		getchar(),
		fopen(),
		fclose(),
		fread(),
		fwrite(),
		fgets(),
		printf(),
		sprintf(),
		fflush(),
		rewind().

	String library providing the following:
		strcpy(),
		strncpy(),
		strcmp(),
		strncmp().

	The curses/termlib libraries are desireable, but not strictly necessary.
	The rogue source can be compiled with -DCURSES.  This will enable a
	self-contained curses/termlib emulation package.  This package has some
	restrictions which are outined in the comments near the top of the
	enclosed source file curses.c.  This curses emulation package was put
	into the source for systems that may not have curses available, or have
	very buggy versions.  If your system has usable working curses/termlib
	libraries, it is suggested that you use them instead of the enclosed
	curses library.


Tim Stoehr
tims@zeus.TEK.COM

================================================================================

Hi, folks, after two nights of hacking, this is rogue for COHERENT!

First, I found another two bugs in the rogue 5.3 patchlevel 2:

	* in curses.c function initscr() clear() is called before
	  get_term_info()! I swaped this two lines.

	* in score.c function insert_score() is a line:

	sprintf(buf, "%2d    %6d   %s: ", rank+1, rogue.gold, login_name);

	  I changed this to the following line because of 16-Bit integers
	  and 16-Bit pointers (small memory model) used by COHERENT's cc in
	  release 3.0.0:

	sprintf(buf, "%2d    %6ld   %s: ", rank+1, rogue.gold, login_name);

In the Makefile I added entrys in CFLAGS and LDFLAGS to compile under
COHERENT. The option -DCURSES is neccessary, because the code size
exceeds 64kbyte with the curses library.
The command ^A is not available under COHERENT, because it needs the
floating point version of printf, which exceeds also the 64kbyte limit
of the code segment.

Udo Munk
Oberstr. 21
4040 Neuss 1
Germany

================================================================================

Updated to Coherent 4.2.10, can be compiled with the MWC compiler and the
GNU C compiler. Because of flat memory model under Coherent 4.x the command
^A does work now and the real curses lib is used. I've added "make clean"
to the Makefile.

Udo Munk  udo@mwc.com or udo@umunk.GUN.de, CIS: 100021,2515
