History log of /netbsd/games/adventure/save.c (Results 1 – 15 of 15)
Revision Date Author Comments
# bd4339c5 12-Apr-2021 mrg <mrg@NetBSD.org>

avoid leaving off the trailing nul in a literal string.


# 6b4a3e3d 22-Mar-2014 dholland <dholland@NetBSD.org>

Minor tidyup.


# e8977780 08-Jan-2012 dholland <dholland@NetBSD.org>

Oops, I forgot to actually implement the checksumming code for the new
savefile format, so any savefiles generated yesterday can be tampered
with. Oh well. While here, tidy up the crc code.


# 80e33b59 07-Jan-2012 dholland <dholland@NetBSD.org>

Redo save file handling. The old save files were unportable, had no
magic number or versioning, relied on random(3) never changing to a
different implementation, and were also saving pointers to disk

Redo save file handling. The old save files were unportable, had no
magic number or versioning, relied on random(3) never changing to a
different implementation, and were also saving pointers to disk and
reading them back again. It *looks* as if the pointers thus loaded
were reset before being used, but it's not particularly clear as the
main loop of this thing is goto-based FORTRAN translated lightly to C.
I've changed the logic to null these pointers instead of saving and
loading them, and things seem to still work.

The new save files have a header, support versioning, write only sized
types in network byte order, and for the toy encryption to discourage
cheating do something self-contained instead of using random(3) as a
stream cipher.

Because between the original import from 4.4 until earlier today
trying to save would result in SIGSEGV on most platforms, it's
unlikely anyone has a save file, but just in case (since the pointer
issue appears to be nonlethal) I've kept compat code for old save
files.

show more ...


# aa19a9d0 25-Aug-2009 dholland <dholland@NetBSD.org>

Whn ths cd ws wrttn, thr ws bt shrtg nd vwls wr xtrml xpnsv. Nowadays,
however, we have an ample vowel budget, and bit shortages are a thing
of the past (even in a down economy) so spend a bit to imp

Whn ths cd ws wrttn, thr ws bt shrtg nd vwls wr xtrml xpnsv. Nowadays,
however, we have an ample vowel budget, and bit shortages are a thing
of the past (even in a down economy) so spend a bit to improve
readability.

show more ...


# c62bf84c 12-Aug-2009 dholland <dholland@NetBSD.org>

sprinkle static


# 243d04ef 01-Jul-2005 jmc <jmc@NetBSD.org>

KNF and WARNS=3


# e5aeb4ea 07-Aug-2003 agc <agc@NetBSD.org>

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22269, verified by myself.


# aac1ec24 17-Jul-1999 hubertf <hubertf@NetBSD.org>

Adventure(6) should check for errors (e.g. disk full or quota
exceeded) when writing out saved games. Do so!

Patch supplied by Joseph Myers <jsm28@cam.ac.uk> in PR 8016


# adf74b1e 16-Jul-1999 hubertf <hubertf@NetBSD.org>

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
requ

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>

show more ...


# 4e1357c7 13-Sep-1998 hubertf <hubertf@NetBSD.org>

constify, per PR 6041 by Joseph Myers <jsm28@cam.ac.uk>


# 84f80fd6 11-Oct-1997 lukem <lukem@NetBSD.org>

KNFify


# 690bee10 11-Aug-1997 christos <christos@NetBSD.org>

PR/3964: Eric Fischer: Remove dependencies to traditional cpp...
While I was there add WARNS?= too.


# 43b95251 21-Mar-1995 cgd <cgd@NetBSD.org>

clean up RCS ids


# 107c0a28 21-Oct-1994 jtc <jtc@NetBSD.org>

adventure(6), from 44lite