[DGD] Dump File Management

Neil McBride neil at castinian.org
Tue Jan 22 12:07:46 CET 2002


Hi,

I've been thinking about dump files and the management of them for 
things like backups of the game state, and being able to have more than 
two.  Currently, if I dump one file, it uses the name in my DGD config 
file.  If I dump again and the dumpfile already exists, it's renamed 
with a .old extension and a new one created.  I was wondering if there 
was an option to have the dumpfile option in the config file configured 
something like: -

dump_file 
= "../dump.&T";		/* dump file */

Where '&T' is converted to the current time, either unix format or 
otherwise - it doesn't really matter.  It's easy enough to modify the 
swap.c file to put the output of P_time() into the file name, but I was 
wondering if there was a more elegant solution in place already?

I had a look at the config.c file to see if I could add it in there, but 
I'm rusty and couldn't remember how to replace the string with what I 
wanted ;)

Has anyone else wanted to do anything like this?  How did you go about 
doing it?  I want to be able to eventually have a collection of game 
states I can go back to for when I do something I shouldn't and don't 
notice for days ;)

Thanks,

Neil.

_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list