From 5008dd4b91ad344b7a4fb518f15de3a4f90535c9 Mon Sep 17 00:00:00 2001 From: Ed J Date: Sun, 9 Jan 2022 08:01:17 +0000 Subject: [PATCH] whitespace --- pogl_glut.xs | 60 ++++++++++++++++++++++++++-------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/pogl_glut.xs b/pogl_glut.xs index 1c1b3a1..89684ae 100644 --- a/pogl_glut.xs +++ b/pogl_glut.xs @@ -49,21 +49,21 @@ static void set_glut_win_handler(int win, int type, SV * data) { SV ** h; AV * a; - + if (!glut_handlers) glut_handlers = newAV(); - + h = av_fetch(glut_handlers, win, FALSE); - + if (!h) { a = newAV(); av_store(glut_handlers, win, newRV_inc((SV*)a)); SvREFCNT_dec(a); } else if (!SvOK(*h) || !SvROK(*h)) croak("Unable to establish glut handler"); - else + else a = (AV*)SvRV(*h); - + av_store(a, type, newRV_inc(data)); SvREFCNT_dec(data); } @@ -72,17 +72,17 @@ static void set_glut_win_handler(int win, int type, SV * data) static SV * get_glut_win_handler(int win, int type) { SV ** h; - + if (!glut_handlers) croak("Unable to locate glut handler"); - + h = av_fetch(glut_handlers, win, FALSE); if (!h || !SvOK(*h) || !SvROK(*h)) croak("Unable to locate glut handler"); - + h = av_fetch((AV*)SvRV(*h), type, FALSE); - + if (!h || !SvOK(*h) || !SvROK(*h)) croak("Unable to locate glut handler"); @@ -93,12 +93,12 @@ static SV * get_glut_win_handler(int win, int type) static void destroy_glut_win_handlers(int win) { SV ** h; - + if (!glut_handlers) return; - + h = av_fetch(glut_handlers, win, FALSE); - + if (!h || !SvOK(*h) || !SvROK(*h)) return; @@ -110,17 +110,17 @@ static void destroy_glut_win_handler(int win, int type) { SV ** h; AV * a; - + if (!glut_handlers) glut_handlers = newAV(); - + h = av_fetch(glut_handlers, win, FALSE); - + if (!h || !SvOK(*h) || !SvROK(*h)) return; a = (AV*)SvRV(*h); - + av_store(a, type, newSVsv(&PL_sv_undef)); } @@ -458,7 +458,7 @@ static void generic_glut_timer_handler(int value) PUTBACK; DO_perl_call_sv(handler, G_DISCARD); - + SvREFCNT_dec(handler_data); } @@ -472,11 +472,11 @@ static void generic_glut_menu_handler(int value) SV ** h; int i; dSP; - + h = av_fetch(glut_menu_handlers, glutGetMenu(), FALSE); if (!h || !SvOK(*h) || !SvROK(*h)) croak("Unable to locate menu handler"); - + handler_data = (AV*)SvRV(*h); handler = *av_fetch(handler_data, 0, 0); @@ -526,7 +526,7 @@ glutInit() argv = 0; ARGV = perl_get_av("ARGV", FALSE); ARGV0 = perl_get_sv("0", FALSE); - + argc = av_len(ARGV)+2; if (argc) { argv = malloc(sizeof(char*)*argc); @@ -534,7 +534,7 @@ glutInit() for(i=0;i<=av_len(ARGV);i++) argv[i+1] = SvPV(*av_fetch(ARGV, i, 0), PL_na); } - + i = argc; glutInit(&argc, argv); @@ -542,7 +542,7 @@ glutInit() while(argc= 3 -#//# glutEstablishOverlay(); +#//# glutEstablishOverlay(); void glutEstablishOverlay() @@ -725,18 +725,18 @@ glutCreateMenu(handler=0, ...) croak("A handler must be specified"); } else { AV * handler_data = newAV(); - + PackCallbackST(handler_data, 0); RETVAL = glutCreateMenu(generic_glut_menu_handler); - + if (!glut_menu_handlers) glut_menu_handlers = newAV(); - + av_store(glut_menu_handlers, RETVAL, newRV_inc((SV*)handler_data)); - + SvREFCNT_dec(handler_data); - + } } OUTPUT: @@ -1015,9 +1015,9 @@ glutTimerFunc(msecs, handler=0, ...) croak("A handler must be specified"); } else { AV * handler_data = newAV(); - + PackCallbackST(handler_data, 1); - + glutTimerFunc(msecs, generic_glut_timer_handler, (int)handler_data); } ENSURE_callback_thread;}