level file handling and trickery feedback

1) consolidate all core usage of `errno' in files.c;
2) give more feedback for any failure by create_levelfile or open_levelfile,
   similar to what was being done for problems during level change;
3) include trickery info in paniclog (many instances of "trickery" seem to
   be due to disk or quota problems rather than user misbehavior...).

The create_levelfile call in pcmain probably ought to be changed to use
error feedback, but in the meantime this should continue working.

Perhaps error() should be modified to update paniclog too, but I didn't
want to go through all its port-specific incarnations making changes.
This commit is contained in:
nethack.rankin
2002-08-23 14:52:25 +00:00
parent c3125ec0f9
commit b00a9dcd4a
7 changed files with 103 additions and 71 deletions

View File

@@ -1,4 +1,4 @@
/* SCCS Id: @(#)pcmain.c 3.4 1997/01/22 */
/* SCCS Id: @(#)pcmain.c 3.4 2002/08/22 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -338,7 +338,7 @@ char *argv[];
/* Set up level 0 file to keep the game state.
*/
fd = create_levelfile(0);
fd = create_levelfile(0, (char *)0);
if (fd < 0) {
raw_print("Cannot create lock file");
} else {