# define refresh_sonar 0
+# define release_sonar 0
#undef countof
#define countof(x) (sizeof((x))/sizeof((*x)))
return False;
}
+static void free_sonar (ModeInfo *mi);
ENTRYPOINT void
init_sonar (ModeInfo *mi)
{
sonar_configuration *sp;
- if (!sps) {
- sps = (sonar_configuration *)
- calloc (MI_NUM_SCREENS(mi), sizeof (sonar_configuration));
- if (!sps) {
- fprintf(stderr, "%s: out of memory\n", progname);
- exit(1);
- }
- }
+ MI_INIT (mi, sps, free_sonar);
sp = &sps[MI_SCREEN(mi)];
sp->glx_context = init_GL(mi);
# endif /* TEST_ASYNC_NETDB */
}
-ENTRYPOINT void
-release_sonar (ModeInfo *mi)
+static void
+free_sonar (ModeInfo *mi)
{
#if 0
sonar_configuration *sp = &sps[MI_SCREEN(mi)];