X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fglx%2Fsonar.c;h=42bcdc8e7d6cc4ddb3d8afff039dff1535c00f2a;hp=f3a4d9d518b73f66ce2576bc6a2995456b498db0;hb=4361b69d3178d7fc98d0388f9a223af6c2651aba;hpb=d6b0217f2417bd19187f0ebc389d6c5c2233b11c diff --git a/hacks/glx/sonar.c b/hacks/glx/sonar.c index f3a4d9d5..42bcdc8e 100644 --- a/hacks/glx/sonar.c +++ b/hacks/glx/sonar.c @@ -77,6 +77,7 @@ # define refresh_sonar 0 +# define release_sonar 0 #undef countof #define countof(x) (sizeof((x))/sizeof((*x))) @@ -816,20 +817,14 @@ sonar_handle_event (ModeInfo *mi, XEvent *event) 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); @@ -1223,8 +1218,8 @@ draw_sonar (ModeInfo *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)];