Subject: CVS commit: basesrc
To: None <source-changes@netbsd.org>
From: Hubert Feyrer <hubertf@netbsd.org>
List: source-changes
Date: 07/15/1999 18:38:21
Module Name:	basesrc
Committed By:	hubertf
Date:		Fri Jul 16 01:38:20 UTC 1999

Modified Files:
	basesrc/games/adventure: hdr.h main.c save.c wizard.c

Log Message:
This patch cleans up the handling of the variable `saved' in
adventure(6).  The handling of this variable is somewhat confusing,
since it is used for two different purposes (controlling the time
required before a saved game can be restored, and controlling various
aspects of dwarf behaviour); in fact, it is also declared twice in
hdr.h.  Except possibly when saving a game fails, these uses can never
interfere; when used for controlling dwarf behaviour, we always have
saved == -1.  This can be better understood with reference to the
original PDP-10 FORTRAN source (URL in patch, since hdr.h references
the comments of the FORTRAN as still relevant to this version) of
which the C version is a direct translation: the wrong value for
`saved' meant that someone was cheating and had bypassed normal
initialisation.  Saving was done by halting and telling the user to
save their core image, so the question of carrying on after saving
failed to open the output file did not arise.

This patch separates the uses of `saved' into uses of two separate
variables.

Closes PR 8005 by Joseph Myers <jsm28@cam.ac.uk>


To generate a diff of this commit:
cvs rdiff -r1.6 -r1.7 basesrc/games/adventure/hdr.h
cvs rdiff -r1.13 -r1.14 basesrc/games/adventure/main.c
cvs rdiff -r1.5 -r1.6 basesrc/games/adventure/save.c
cvs rdiff -r1.9 -r1.10 basesrc/games/adventure/wizard.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.