From a0e20c08bbe18b41ea54c319bd83874b5a7f9788 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Fri, 16 Sep 2011 22:50:38 -0700 Subject: Strip trailing whitespace Performed with: find * -type f | xargs perl -i -p -e 's{[ \t]+$}{}' git diff -w & git diff -b show no diffs from this change Signed-off-by: Alan Coopersmith --- AUTHORS | 2 +- COPYING | 4 ++-- Makefile.am | 8 ++++---- configure.ac | 2 +- include/X11/extensions/Xrandr.h | 32 +++++++++++++++--------------- src/Makefile.am | 2 +- src/Xrandr.c | 20 +++++++++---------- src/Xrandrint.h | 8 ++++---- src/XrrConfig.c | 44 ++++++++++++++++++++--------------------- src/XrrCrtc.c | 24 +++++++++++----------- src/XrrMode.c | 8 ++++---- src/XrrOutput.c | 18 ++++++++--------- src/XrrProperty.c | 4 ++-- src/XrrScreen.c | 14 ++++++------- 14 files changed, 95 insertions(+), 95 deletions(-) diff --git a/AUTHORS b/AUTHORS index 3fbe686..e794390 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,2 +1,2 @@ -Jim Gettys, Compaq and Hewlett-Packard, and Keith Packard, +Jim Gettys, Compaq and Hewlett-Packard, and Keith Packard, SuSE and Hewlett-Packard diff --git a/COPYING b/COPYING index 1552c1f..29a2f5d 100644 --- a/COPYING +++ b/COPYING @@ -1,4 +1,4 @@ -Copyright © 2000, Compaq Computer Corporation, +Copyright © 2000, Compaq Computer Corporation, Copyright © 2002, Hewlett Packard, Inc. Permission to use, copy, modify, distribute, and sell this software and its @@ -15,7 +15,7 @@ HP DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HP BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION -OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. Copyright © 2000 Compaq Computer Corporation, Inc. diff --git a/Makefile.am b/Makefile.am index 860193e..7d6700d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,6 @@ -# +# # Copyright © 2003 Keith Packard, Noah Levitt -# +# # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that # the above copyright notice appear in all copies and that both that @@ -10,7 +10,7 @@ # specific, written prior permission. Keith Packard makes no # representations about the suitability of this software for any purpose. It # is provided "as is" without express or implied warranty. -# +# # KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, # INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO # EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR @@ -19,7 +19,7 @@ # TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -SUBDIRS = src man +SUBDIRS = src man pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = xrandr.pc diff --git a/configure.ac b/configure.ac index 8c74adb..cdfbf77 100644 --- a/configure.ac +++ b/configure.ac @@ -40,7 +40,7 @@ AM_MAINTAINER_MODE # Initialize libtool AC_PROG_LIBTOOL - + # Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS m4_ifndef([XORG_MACROS_VERSION], [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])]) diff --git a/include/X11/extensions/Xrandr.h b/include/X11/extensions/Xrandr.h index 6b756a7..4b29c3f 100644 --- a/include/X11/extensions/Xrandr.h +++ b/include/X11/extensions/Xrandr.h @@ -119,7 +119,7 @@ typedef struct { } XRROutputPropertyNotifyEvent; /* internal representation is private to the library */ -typedef struct _XRRScreenConfiguration XRRScreenConfiguration; +typedef struct _XRRScreenConfiguration XRRScreenConfiguration; Bool XRRQueryExtension (Display *dpy, int *event_base_return, @@ -130,17 +130,17 @@ Status XRRQueryVersion (Display *dpy, XRRScreenConfiguration *XRRGetScreenInfo (Display *dpy, Window window); - + void XRRFreeScreenConfigInfo (XRRScreenConfiguration *config); -/* +/* * Note that screen configuration changes are only permitted if the client can * prove it has up to date configuration information. We are trying to * insist that it become possible for screens to change dynamically, so * we want to ensure the client knows what it is talking about when requesting * changes. */ -Status XRRSetScreenConfig (Display *dpy, +Status XRRSetScreenConfig (Display *dpy, XRRScreenConfiguration *config, Drawable draw, int size_index, @@ -148,7 +148,7 @@ Status XRRSetScreenConfig (Display *dpy, Time timestamp); /* added in v1.1, sorry for the lame name */ -Status XRRSetScreenConfigAndRate (Display *dpy, +Status XRRSetScreenConfigAndRate (Display *dpy, XRRScreenConfiguration *config, Drawable draw, int size_index, @@ -165,14 +165,14 @@ XRRScreenSize *XRRConfigSizes(XRRScreenConfiguration *config, int *nsizes); short *XRRConfigRates (XRRScreenConfiguration *config, int sizeID, int *nrates); -SizeID XRRConfigCurrentConfiguration (XRRScreenConfiguration *config, +SizeID XRRConfigCurrentConfiguration (XRRScreenConfiguration *config, Rotation *rotation); - + short XRRConfigCurrentRate (XRRScreenConfiguration *config); int XRRRootToScreen(Display *dpy, Window root); -/* +/* * returns the screen configuration for the specified screen; does a lazy * evalution to delay getting the information, and caches the result. * These routines should be used in preference to XRRGetScreenInfo @@ -183,9 +183,9 @@ int XRRRootToScreen(Display *dpy, Window root); void XRRSelectInput(Display *dpy, Window window, int mask); -/* - * the following are always safe to call, even if RandR is not implemented - * on a screen +/* + * the following are always safe to call, even if RandR is not implemented + * on a screen */ @@ -237,7 +237,7 @@ typedef struct _XRRScreenResources { int nmode; XRRModeInfo *modes; } XRRScreenResources; - + XRRScreenResources * XRRGetScreenResources (Display *dpy, Window window); @@ -286,7 +286,7 @@ void XRRConfigureOutputProperty (Display *dpy, RROutput output, Atom property, Bool pending, Bool range, int num_values, long *values); - + void XRRChangeOutputProperty (Display *dpy, RROutput output, Atom property, Atom type, @@ -321,7 +321,7 @@ XRRDeleteOutputMode (Display *dpy, RROutput output, RRMode mode); void XRRFreeModeInfo (XRRModeInfo *modeInfo); - + typedef struct _XRRCrtcInfo { Time timestamp; int x, y; @@ -381,7 +381,7 @@ XRRGetScreenResourcesCurrent (Display *dpy, Window window); void XRRSetCrtcTransform (Display *dpy, - RRCrtc crtc, + RRCrtc crtc, XTransform *transform, char *filter, XFixed *params, @@ -408,7 +408,7 @@ XRRGetCrtcTransform (Display *dpy, XRRCrtcTransformAttributes **attributes); /* - * intended to take RRScreenChangeNotify, or + * intended to take RRScreenChangeNotify, or * ConfigureNotify (on the root window) * returns 1 if it is an event type it understands, 0 if not */ diff --git a/src/Makefile.am b/src/Makefile.am index 85b05da..d80a3c2 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -22,4 +22,4 @@ INCLUDES = -I$(top_srcdir)/include/X11/extensions libXrandr_la_LDFLAGS = -version-number 2:2:0 -no-undefined libXrandrincludedir = $(includedir)/X11/extensions -libXrandrinclude_HEADERS = $(top_srcdir)/include/X11/extensions/Xrandr.h +libXrandrinclude_HEADERS = $(top_srcdir)/include/X11/extensions/Xrandr.h diff --git a/src/Xrandr.c b/src/Xrandr.c index 8ab1eae..2bdbe97 100644 --- a/src/Xrandr.c +++ b/src/Xrandr.c @@ -16,7 +16,7 @@ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL COMPAQ * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Author: Jim Gettys, HP Labs, HP. @@ -229,15 +229,15 @@ XRRFindDisplay (Display *dpy) dpyinfo = XextFindDisplay (&XRRExtensionInfo, dpy); if (!dpyinfo) { - dpyinfo = XextAddDisplay (&XRRExtensionInfo, dpy, + dpyinfo = XextAddDisplay (&XRRExtensionInfo, dpy, XRRExtensionName, &rr_extension_hooks, RRNumberEvents, NULL); numscreens = ScreenCount(dpy); - xrri = Xmalloc (sizeof(XRandRInfo) + + xrri = Xmalloc (sizeof(XRandRInfo) + sizeof(char *) * numscreens); xrri->config = (XRRScreenConfiguration **)(xrri + 1); - for(i = 0; i < numscreens; i++) + for(i = 0; i < numscreens; i++) xrri->config[i] = NULL; xrri->major_version = -1; dpyinfo->data = (char *) xrri; @@ -316,7 +316,7 @@ Status XRRQueryVersion (Display *dpy, xrri = (XRandRInfo *) info->data; - /* + /* * only get the version information from the server if we don't have it already */ if (xrri->major_version == -1) { @@ -369,7 +369,7 @@ _XRRVersionHandler (Display *dpy, return True; } -/* +/* * in protocol version 0.1, routine added to allow selecting for new events. */ @@ -418,7 +418,7 @@ int XRRUpdateConfiguration(XEvent *event) switch (event->type - info->codes->first_event) { case RRScreenChangeNotify: scevent = (XRRScreenChangeNotifyEvent *) event; - snum = XRRRootToScreen(dpy, + snum = XRRRootToScreen(dpy, ((XRRScreenChangeNotifyEvent *) event)->root); if (scevent->rotation & (RR_Rotate_90 | RR_Rotate_270)) { dpy->screens[snum].width = scevent->height; @@ -437,9 +437,9 @@ int XRRUpdateConfiguration(XEvent *event) return 0; } xrri = (XRandRInfo *) info->data; - /* - * so the next time someone wants some data, it will be fetched; - * it might be better to force the round trip immediately, but + /* + * so the next time someone wants some data, it will be fetched; + * it might be better to force the round trip immediately, but * I dislike pounding the server simultaneously when not necessary */ if (xrri->config[snum] != NULL) { diff --git a/src/Xrandrint.h b/src/Xrandrint.h index 7fb5831..aed10e4 100644 --- a/src/Xrandrint.h +++ b/src/Xrandrint.h @@ -1,5 +1,5 @@ /* - * Copyright © 2000, Compaq Computer Corporation, + * Copyright © 2000, Compaq Computer Corporation, * Copyright © 2002, Hewlett Packard, Inc. * * Permission to use, copy, modify, distribute, and sell this software and its @@ -16,7 +16,7 @@ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HP * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Author: Jim Gettys, HP Labs, Hewlett-Packard, Inc. @@ -43,7 +43,7 @@ extern char XRRExtensionName[]; XExtDisplayInfo *XRRFindDisplay (Display *dpy); -/* deliberately opaque internal data structure; can be extended, +/* deliberately opaque internal data structure; can be extended, but not reordered */ struct _XRRScreenConfiguration { Screen *screen; /* the root window in GetScreenInfo */ @@ -69,7 +69,7 @@ struct _XRRScreenConfiguration { * when next used. Returns invalid status if not an event type * the library routine understand. */ - + /* we cache one screen configuration/screen */ typedef struct _XRandRInfo { diff --git a/src/XrrConfig.c b/src/XrrConfig.c index 793d8b6..2f0282b 100644 --- a/src/XrrConfig.c +++ b/src/XrrConfig.c @@ -82,7 +82,7 @@ Time XRRConfigTimes (XRRScreenConfiguration *config, Time *config_timestamp) } -SizeID XRRConfigCurrentConfiguration (XRRScreenConfiguration *config, +SizeID XRRConfigCurrentConfiguration (XRRScreenConfiguration *config, Rotation *rotation) { *rotation = (Rotation) config->current_rotation; @@ -94,11 +94,11 @@ short XRRConfigCurrentRate (XRRScreenConfiguration *config) return config->current_rate; } -/* - * Go get the screen configuration data and salt it away for future use; +/* + * Go get the screen configuration data and salt it away for future use; * returns NULL if extension not supported */ -static XRRScreenConfiguration *_XRRValidateCache (Display *dpy, +static XRRScreenConfiguration *_XRRValidateCache (Display *dpy, XExtDisplayInfo *info, int screen) { @@ -140,7 +140,7 @@ Rotation XRRRotations(Display *dpy, int screen, Rotation *current_rotation) /* given a screen, return the information from the (possibly) cached data */ XRRScreenSize *XRRSizes(Display *dpy, int screen, int *nsizes) { - XRRScreenConfiguration *config; + XRRScreenConfiguration *config; XExtDisplayInfo *info = XRRFindDisplay(dpy); XRRScreenSize *sizes; @@ -155,12 +155,12 @@ XRRScreenSize *XRRSizes(Display *dpy, int screen, int *nsizes) UnlockDisplay(dpy); *nsizes = 0; return NULL; - } + } } short *XRRRates (Display *dpy, int screen, int sizeID, int *nrates) { - XRRScreenConfiguration *config; + XRRScreenConfiguration *config; XExtDisplayInfo *info = XRRFindDisplay(dpy); short *rates; @@ -174,13 +174,13 @@ short *XRRRates (Display *dpy, int screen, int sizeID, int *nrates) UnlockDisplay(dpy); *nrates = 0; return NULL; - } + } } /* given a screen, return the information from the (possibly) cached data */ Time XRRTimes (Display *dpy, int screen, Time *config_timestamp) { - XRRScreenConfiguration *config; + XRRScreenConfiguration *config; XExtDisplayInfo *info = XRRFindDisplay(dpy); Time ts; @@ -227,7 +227,7 @@ static XRRScreenConfiguration *_XRRGetScreenInfo (Display *dpy, vreq->randrReqType = X_RRQueryVersion; vreq->majorVersion = RANDR_MAJOR; vreq->minorVersion = RANDR_MINOR; - + async_state.version_seq = dpy->request; async_state.error = False; async.next = dpy->async_handlers; @@ -272,14 +272,14 @@ static XRRScreenConfiguration *_XRRGetScreenInfo (Display *dpy, rep.rate = 0; rep.nrateEnts = 0; } - + nbytes = (long) rep.length << 2; nbytesRead = (long) (rep.nSizes * SIZEOF (xScreenSizes) + ((rep.nrateEnts + 1)& ~1) * 2 /* SIZEOF (CARD16) */); - - /* - * first we must compute how much space to allocate for + + /* + * first we must compute how much space to allocate for * randr library's use; we'll allocate the structures in a single * allocation, on cleanlyness grounds. */ @@ -299,7 +299,7 @@ static XRRScreenConfiguration *_XRRGetScreenInfo (Display *dpy, rates = (short *) (ssp + rep.nSizes); /* set up the screen configuration structure */ - scp->screen = + scp->screen = ScreenOfDisplay (dpy, XRRRootToScreen(dpy, rep.root)); scp->sizes = ssp; @@ -322,7 +322,7 @@ static XRRScreenConfiguration *_XRRGetScreenInfo (Display *dpy, */ for (i = 0; i < rep.nSizes; i++) { _XReadPad (dpy, (char *) &size, SIZEOF (xScreenSizes)); - + ssp[i].width = size.widthInPixels; ssp[i].height = size.heightInPixels; ssp[i].mwidth = size.widthInMillimeters; @@ -332,13 +332,13 @@ static XRRScreenConfiguration *_XRRGetScreenInfo (Display *dpy, * And the rates */ _XRead16Pad (dpy, rates, 2 /* SIZEOF (CARD16) */ * rep.nrateEnts); - + /* * Skip any extra data */ if (nbytes > nbytesRead) _XEatData (dpy, (unsigned long) (nbytes - nbytesRead)); - + return (XRRScreenConfiguration *)(scp); } @@ -354,7 +354,7 @@ XRRScreenConfiguration *XRRGetScreenInfo (Display *dpy, Window window) return config; } - + void XRRFreeScreenConfigInfo (XRRScreenConfiguration *config) { Xfree (config); @@ -364,7 +364,7 @@ Status XRRSetScreenConfigAndRate (Display *dpy, XRRScreenConfiguration *config, Drawable draw, int size_index, - Rotation rotation, + Rotation rotation, short rate, Time timestamp) { @@ -378,7 +378,7 @@ Status XRRSetScreenConfigAndRate (Display *dpy, /* Make sure has_rates is set */ if (!XRRQueryVersion (dpy, &major, &minor)) return 0; - + LockDisplay (dpy); xrri = (XRandRInfo *) info->data; if (xrri->has_rates) @@ -406,7 +406,7 @@ Status XRRSetScreenConfigAndRate (Display *dpy, req->timestamp = timestamp; req->configTimestamp = config->config_timestamp; } - + (void) _XReply (dpy, (xReply *) &rep, 0, xTrue); /* actually .errorCode in struct xError */ diff --git a/src/XrrCrtc.c b/src/XrrCrtc.c index 697987a..0762373 100644 --- a/src/XrrCrtc.c +++ b/src/XrrCrtc.c @@ -62,8 +62,8 @@ XRRGetCrtcInfo (Display *dpy, XRRScreenResources *resources, RRCrtc crtc) nbytesRead = (long) (rep.nOutput * 4 + rep.nPossibleOutput * 4); - /* - * first we must compute how much space to allocate for + /* + * first we must compute how much space to allocate for * randr library's use; we'll allocate the structures in a single * allocation, on cleanlyness grounds. */ @@ -95,13 +95,13 @@ XRRGetCrtcInfo (Display *dpy, XRRScreenResources *resources, RRCrtc crtc) _XRead32 (dpy, xci->outputs, rep.nOutput << 2); _XRead32 (dpy, xci->possible, rep.nPossibleOutput << 2); - + /* * Skip any extra data */ if (nbytes > nbytesRead) _XEatData (dpy, (unsigned long) (nbytes - nbytesRead)); - + UnlockDisplay (dpy); SyncHandle (); return (XRRCrtcInfo *) xci; @@ -195,12 +195,12 @@ XRRGetCrtcGamma (Display *dpy, RRCrtc crtc) goto out; nbytes = (long) rep.length << 2; - + /* three channels of CARD16 data */ nbytesRead = (rep.size * 2 * 3); crtc_gamma = XRRAllocGamma (rep.size); - + if (!crtc_gamma) { _XEatData (dpy, (unsigned long) nbytes); @@ -209,7 +209,7 @@ XRRGetCrtcGamma (Display *dpy, RRCrtc crtc) _XRead16 (dpy, crtc_gamma->red, rep.size * 2); _XRead16 (dpy, crtc_gamma->green, rep.size * 2); _XRead16 (dpy, crtc_gamma->blue, rep.size * 2); - + if (nbytes > nbytesRead) _XEatData (dpy, (unsigned long) (nbytes - nbytesRead)); @@ -255,7 +255,7 @@ XRRSetCrtcGamma (Display *dpy, RRCrtc crtc, XRRCrtcGamma *crtc_gamma) * otherwise the channels might not be contiguous */ Data16 (dpy, crtc_gamma->red, crtc_gamma->size * 2 * 3); - + UnlockDisplay (dpy); SyncHandle (); } @@ -304,7 +304,7 @@ xRenderTransform_from_XTransform (xRenderTransform *render, void XRRSetCrtcTransform (Display *dpy, - RRCrtc crtc, + RRCrtc crtc, XTransform *transform, char *filter, XFixed *params, @@ -334,7 +334,7 @@ XRRSetCrtcTransform (Display *dpy, } #define CrtcTransformExtra (SIZEOF(xRRGetCrtcTransformReply) - 32) - + static const xRenderTransform identity = { 0x10000, 0, 0, 0, 0x10000, 0, @@ -364,7 +364,7 @@ XRRGetCrtcTransform (Display *dpy, RRCheckExtension (dpy, info, False); - if (!XRRQueryVersion (dpy, &major_version, &minor_version) || + if (!XRRQueryVersion (dpy, &major_version, &minor_version) || !_XRRHasTransform (major_version, minor_version)) { /* For pre-1.3 servers, just report identity matrices everywhere */ @@ -382,7 +382,7 @@ XRRGetCrtcTransform (Display *dpy, req->reqType = info->codes->major_opcode; req->randrReqType = X_RRGetCrtcTransform; req->crtc = crtc; - + if (!_XReply (dpy, (xReply *) &rep, CrtcTransformExtra >> 2, xFalse)) { rep.pendingTransform = identity; diff --git a/src/XrrMode.c b/src/XrrMode.c index 58ef68b..0b74a73 100644 --- a/src/XrrMode.c +++ b/src/XrrMode.c @@ -62,9 +62,9 @@ XRRCreateMode (Display *dpy, Window window, XRRModeInfo *mode_info) req->reqType = info->codes->major_opcode; req->randrReqType = X_RRCreateMode; req->length += (mode_info->nameLength + 3) >> 2; - + req->window = window; - + req->modeInfo.id = 0; req->modeInfo.width = mode_info->width; req->modeInfo.height = mode_info->height; @@ -78,7 +78,7 @@ XRRCreateMode (Display *dpy, Window window, XRRModeInfo *mode_info) req->modeInfo.vTotal = mode_info->vTotal; req->modeInfo.nameLength = mode_info->nameLength; req->modeInfo.modeFlags = mode_info->modeFlags; - + Data (dpy, mode_info->name, mode_info->nameLength); if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) { @@ -86,7 +86,7 @@ XRRCreateMode (Display *dpy, Window window, XRRModeInfo *mode_info) SyncHandle (); return None; } - + UnlockDisplay (dpy); SyncHandle (); return rep.mode; diff --git a/src/XrrOutput.c b/src/XrrOutput.c index 18863bd..2288ca8 100644 --- a/src/XrrOutput.c +++ b/src/XrrOutput.c @@ -34,7 +34,7 @@ #include "Xrandrint.h" #define OutputInfoExtra (SIZEOF(xRRGetOutputInfoReply) - 32) - + XRROutputInfo * XRRGetOutputInfo (Display *dpy, XRRScreenResources *resources, RROutput output) { @@ -67,8 +67,8 @@ XRRGetOutputInfo (Display *dpy, XRRScreenResources *resources, RROutput output) rep.nClones * 4 + ((rep.nameLength + 3) & ~3)); - /* - * first we must compute how much space to allocate for + /* + * first we must compute how much space to allocate for * randr library's use; we'll allocate the structures in a single * allocation, on cleanlyness grounds. */ @@ -105,19 +105,19 @@ XRRGetOutputInfo (Display *dpy, XRRScreenResources *resources, RROutput output) _XRead32 (dpy, xoi->crtcs, rep.nCrtcs << 2); _XRead32 (dpy, xoi->modes, rep.nModes << 2); _XRead32 (dpy, xoi->clones, rep.nClones << 2); - + /* * Read name and '\0' terminate */ _XReadPad (dpy, xoi->name, rep.nameLength); xoi->name[rep.nameLength] = '\0'; - + /* * Skip any extra data */ if (nbytes > nbytesRead) _XEatData (dpy, (unsigned long) (nbytes - nbytesRead)); - + UnlockDisplay (dpy); SyncHandle (); return (XRROutputInfo *) xoi; @@ -144,7 +144,7 @@ XRRSetOutputPrimary(Display *dpy, Window window, RROutput output) RRSimpleCheckExtension (dpy, info); - if (!XRRQueryVersion (dpy, &major_version, &minor_version) || + if (!XRRQueryVersion (dpy, &major_version, &minor_version) || !_XRRHasOutputPrimary (major_version, minor_version)) return; @@ -169,7 +169,7 @@ XRRGetOutputPrimary(Display *dpy, Window window) RRCheckExtension (dpy, info, 0); - if (!XRRQueryVersion (dpy, &major_version, &minor_version) || + if (!XRRQueryVersion (dpy, &major_version, &minor_version) || !_XRRHasOutputPrimary (major_version, minor_version)) return None; @@ -181,7 +181,7 @@ XRRGetOutputPrimary(Display *dpy, Window window) if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) rep.output = None; - + UnlockDisplay(dpy); SyncHandle(); diff --git a/src/XrrProperty.c b/src/XrrProperty.c index 1a125b2..4c3fdb0 100644 --- a/src/XrrProperty.c +++ b/src/XrrProperty.c @@ -159,7 +159,7 @@ XRRConfigureOutputProperty (Display *dpy, RROutput output, Atom property, UnlockDisplay(dpy); SyncHandle(); } - + void XRRChangeOutputProperty (Display *dpy, RROutput output, Atom property, Atom type, @@ -244,7 +244,7 @@ XRRDeleteOutputProperty (Display *dpy, RROutput output, Atom property) int XRRGetOutputProperty (Display *dpy, RROutput output, Atom property, long offset, long length, - Bool delete, Bool pending, Atom req_type, + Bool delete, Bool pending, Atom req_type, Atom *actual_type, int *actual_format, unsigned long *nitems, unsigned long *bytes_after, unsigned char **prop) diff --git a/src/XrrScreen.c b/src/XrrScreen.c index 54bc2ca..f830913 100644 --- a/src/XrrScreen.c +++ b/src/XrrScreen.c @@ -66,7 +66,7 @@ doGetScreenResources (Display *dpy, Window window, int poll) vreq->randrReqType = X_RRQueryVersion; vreq->majorVersion = RANDR_MAJOR; vreq->minorVersion = RANDR_MINOR; - + async_state.version_seq = dpy->request; async_state.error = False; async.next = dpy->async_handlers; @@ -112,8 +112,8 @@ doGetScreenResources (Display *dpy, Window window, int poll) rep.nModes * SIZEOF (xRRModeInfo) + ((rep.nbytesNames + 3) & ~3)); - /* - * first we must compute how much space to allocate for + /* + * first we must compute how much space to allocate for * randr library's use; we'll allocate the structures in a single * allocation, on cleanlyness grounds. */ @@ -147,10 +147,10 @@ doGetScreenResources (Display *dpy, Window window, int poll) _XRead32 (dpy, xrsr->crtcs, rep.nCrtcs << 2); _XRead32 (dpy, xrsr->outputs, rep.nOutputs << 2); - + for (i = 0; i < rep.nModes; i++) { xRRModeInfo modeInfo; - + _XReadPad (dpy, (char *) &modeInfo, SIZEOF (xRRModeInfo)); xrsr->modes[i].id = modeInfo.id; xrsr->modes[i].width = modeInfo.width; @@ -180,13 +180,13 @@ doGetScreenResources (Display *dpy, Window window, int poll) wire_name += xrsr->modes[i].nameLength; } Xfree (wire_names); - + /* * Skip any extra data */ if (nbytes > nbytesRead) _XEatData (dpy, (unsigned long) (nbytes - nbytesRead)); - + UnlockDisplay (dpy); SyncHandle(); return (XRRScreenResources *) xrsr; -- cgit v1.2.3