Refactor ui_model handling in oggquiz.c
commit04913160840e52087f8471a440e3437e8fd52cbb
authorTobias Rehbein <tobias.rehbein@web.de>
Thu, 10 Jun 2010 17:58:22 +0000 (10 19:58 +0200)
committerTobias Rehbein <tobias.rehbein@web.de>
Thu, 10 Jun 2010 17:58:22 +0000 (10 19:58 +0200)
tree8f305cc10b7780439aaf7a626b5f15fe8d61e79e
parent98ceb144b3d5b5695f7d0edb509fb8fa8039e241
Refactor ui_model handling in oggquiz.c

`struct ui_model` was held in a static variable and was never freed. Resolve
this issue by implementing dedicated functions to create and destroy the
ui_model. Manage the lifetime of ui_model in main function.

While here move the initial seeding of the random number generator to the main
function eliminating the need for any static variables.

 * create dedicated functions to create and destroy `struct ui_model`
 * manage lifetime of `struct ui_model` in main function
 * seed random number generator in main function
oggquiz.c