From 687d44b6eaa3c64a12af9bbd557b401419b208eb Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Fri, 29 Jul 2016 00:44:38 +0200 Subject: update src files *[ch] to libX11 1.3.4 --- nx-X11/lib/X11/VisUtil.c | 41 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 21 deletions(-) (limited to 'nx-X11/lib/X11/VisUtil.c') diff --git a/nx-X11/lib/X11/VisUtil.c b/nx-X11/lib/X11/VisUtil.c index 70f3d999a..3434c0161 100644 --- a/nx-X11/lib/X11/VisUtil.c +++ b/nx-X11/lib/X11/VisUtil.c @@ -32,7 +32,7 @@ in this Software without prior written authorization from The Open Group. #include /* * This procedure returns a list of visual information structures - * that match the specified attributes given in the visual information + * that match the specified attributes given in the visual information * template. * * If no visuals exist that match the specified attributes, a NULL is @@ -53,12 +53,11 @@ in this Software without prior written authorization from The Open Group. * VisualAllMask */ -XVisualInfo *XGetVisualInfo( dpy, visual_info_mask, - visual_info_template, nitems) -Display *dpy; -register long visual_info_mask; -register XVisualInfo *visual_info_template; -int *nitems; /* RETURN */ +XVisualInfo *XGetVisualInfo( + Display *dpy, + register long visual_info_mask, + register XVisualInfo *visual_info_template, + int *nitems) /* RETURN */ { register Visual *vp; @@ -76,7 +75,7 @@ int *nitems; /* RETURN */ count = 0; total = 10; - if (! (vip_base = vip = (XVisualInfo *) + if (! (vip_base = vip = (XVisualInfo *) Xmalloc((unsigned) (sizeof(XVisualInfo) * total)))) { UnlockDisplay(dpy); return (XVisualInfo *) NULL; @@ -128,13 +127,13 @@ int *nitems; /* RETURN */ (vp->bits_per_rgb != visual_info_template->bits_per_rgb)) continue; /* YEA!!! WE FOUND A GOOD ONE */ - + if (count+1 > total) { XVisualInfo *old_vip_base = vip_base; total += 10; if (! (vip_base = (XVisualInfo *) - Xrealloc((char *) vip_base, + Xrealloc((char *) vip_base, (unsigned) (sizeof(XVisualInfo) * total)))) { Xfree((char *) old_vip_base); UnlockDisplay(dpy); @@ -160,7 +159,7 @@ int *nitems; /* RETURN */ } /* END OF LOOP ON VISUALS */ } /* END OF IF THERE ARE ANY VISUALS AT THIS DEPTH */ - + } /* END OF LOOP ON DEPTHS */ } /* END OF LOOP ON SCREENS */ @@ -180,21 +179,21 @@ int *nitems; /* RETURN */ /* - * This procedure will return the visual information for a visual - * that matches the specified depth and class for a screen. Since - * multiple visuals may exist that match the specified depth and + * This procedure will return the visual information for a visual + * that matches the specified depth and class for a screen. Since + * multiple visuals may exist that match the specified depth and * class, which visual chosen is undefined. * * If a visual is found, True is returned as the function value, * otherwise False is returned. */ -Status XMatchVisualInfo( dpy, screen, depth, class, visual_info) - Display *dpy; - int screen; - int depth; - int class; - XVisualInfo *visual_info; /* RETURNED */ +Status XMatchVisualInfo( + Display *dpy, + int screen, + int depth, + int class, + XVisualInfo *visual_info) /* RETURNED */ { Visual *vp; @@ -225,7 +224,7 @@ Status XMatchVisualInfo( dpy, screen, depth, class, visual_info) /* if nvisuals == 0 then vp will be NULL */ for (jj=0; jjnvisuals; jj++) { - if (vp->class == class) + if (vp->class == class) { visual_info->visual = _XVIDtoVisual(dpy, vp->visualid); visual_info->visualid = vp->visualid; -- cgit v1.2.3