From: Greg Wooledge (wooledge@ces.cwru.edu)
Date: 05/06/93


From: wooledge@ces.cwru.edu (Greg Wooledge)
Subject: Angband for Linux (help!)
Date: 7 May 1993 01:48:59 GMT

Has anyone successfully compiled and run Angband for Linux yet? If so,
please tell me what you had to change to get it going.

After defining SYS_V and mucking about with the signal handling stuff,
I managed to compile it, but when I run it I get the following message:

Can't open score file "/user/games/lib/angband/lib/files/newscores"

This file does exist, and has permission 0644. It is 0 bytes long.

Here are the relevant lines of the source code:

/* SNIP SNIP */
init_scorefile()
{
#ifdef SET_UID
  if (1 > (highscore_fd = open(ANGBAND_TOP, O_RDWR | O_CREAT, 0644)))
#else
  if (1 > (highscore_fd = open(ANGBAND_TOP, O_RDWR | O_CREAT, 0666)))
#endif
  {
    (void) fprintf (stderr, "Can't open score file \"%s\"\n", ANGBAND_TOP);
    exit(1);
  }
}
/* SNIP SNIP */

(Note the crossposting.) For those of you who follow comp.os.linux,
it seems that Angband was derived from an older version of UMoria, which
had some slightly weird constructs in it. These were altered in newer
versions of UMoria (for instance, highscore_fd was changed to a FILE *
and used fopen()), but remain in Angband. If the alterations were fewer,
I would just retype the relevant stuff, but they're quite pervasive.

For those of you in rec.games.moria, Linux is a UNIX clone for i386
machines. It's largely POSIX compliant, with some SysV stuff thrown
in.

Am I getting in over my head trying to port this game? Or am I missing
something quite obvious? I have a few years' experience with C, but am
a newcomer to Linux (and UNIX programming in general).

-- 
Greg Wooledge          /..\                     Wizard in training.
wooledge@ces.cwru.edu  \--/ Have a day.