From e8f6124996faf0a48a6748532153f5f364992b06 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Mon, 3 May 2004 07:52:33 +0000 Subject: Game configuration box for Windows, by constructing the dialog box right from scratch without the slightest reference to any dialog templates (meaning that we get to figure out the layout and _then_ choose the window size). I'm rather pleased with that. Also introduced free_cfg(), which is why this checkin touched gtk.c as well. [originally from svn r4184] --- misc.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'misc.c') diff --git a/misc.c b/misc.c index 58c4fb7..48088da 100644 --- a/misc.c +++ b/misc.c @@ -23,3 +23,13 @@ int rand_upto(int limit) return (int)n; } + +void free_cfg(config_item *cfg) +{ + config_item *i; + + for (i = cfg; i->type != C_END; i++) + if (i->type == C_STRING) + sfree(i->sval); + sfree(cfg); +} -- cgit v1.1