- if (!sstate) {
- sstate = (State *)
- calloc( MI_NUM_SCREENS(mi), sizeof(State) );
- if (!sstate) {
- fprintf( stderr, "%s: out of memory\n", progname );
- exit(1);
- }
- }
+ MI_INIT(mi, sstate, free_glcells);
- /* nuke everything before exit */
- if (st->sphere) free_Object( st->sphere );
- if (st->food) free( st->food );
- for (i=0; i<NUM_CELL_SHAPES; ++i) {
- if (st->cell_list[i] != -1) {
- glDeleteLists( st->cell_list[i], 1 );
+ /* nuke everything before exit */
+ if (st->sphere) free_Object( st->sphere );
+ if (st->food) free( st->food );
+ for (i=0; i<NUM_CELL_SHAPES; ++i) {
+ if (st->cell_list[i] != -1) {
+ glDeleteLists( st->cell_list[i], 1 );
+ }