ChangeLog | 119 ++++++++++++++++++++++++++++ configure.ac | 10 -- debian/changelog | 9 ++ debian/control | 2 debian/upstream/signing-key.asc | 60 ++++++++++++++ debian/watch | 1 man/Makefile.am | 1 man/XF86VM.man | 169 ++++++++++++++++++++-------------------- man/XF86VidModeAddModeLine.man | 1 src/XF86VMode.c | 60 +++++--------- 10 files changed, 304 insertions(+), 128 deletions(-)
New commits: commit 1997cc31b9c3b03ead956f0feeb527bd3ce6e204 Author: Julien Cristau <[email protected]> Date: Thu Apr 30 23:10:51 2015 +0200 Upload to unstable diff --git a/debian/changelog b/debian/changelog index 18fcae7..7af47e7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,11 +1,11 @@ -libxxf86vm (1:1.1.4-1) UNRELEASED; urgency=medium +libxxf86vm (1:1.1.4-1) unstable; urgency=medium * New upstream release. * Let uscan verify tarball signatures. * Build-depend on Xlib 1.6. * Remove Cyril from Uploaders. - -- Julien Cristau <[email protected]> Thu, 30 Apr 2015 23:02:28 +0200 + -- Julien Cristau <[email protected]> Thu, 30 Apr 2015 23:10:48 +0200 libxxf86vm (1:1.1.3-1) unstable; urgency=low commit f52e92ab50c443d42ceceeb206d9bf58db46b6f4 Author: Julien Cristau <[email protected]> Date: Thu Apr 30 23:10:12 2015 +0200 Remove Cyril from Uploaders. diff --git a/debian/changelog b/debian/changelog index 94731b0..18fcae7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,7 @@ libxxf86vm (1:1.1.4-1) UNRELEASED; urgency=medium * New upstream release. * Let uscan verify tarball signatures. * Build-depend on Xlib 1.6. + * Remove Cyril from Uploaders. -- Julien Cristau <[email protected]> Thu, 30 Apr 2015 23:02:28 +0200 diff --git a/debian/control b/debian/control index a3f8b0c..fc7617d 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,6 @@ Source: libxxf86vm Section: x11 Priority: optional Maintainer: Debian X Strike Force <[email protected]> -Uploaders: Cyril Brulebois <[email protected]> Build-Depends: debhelper (>= 9), dh-autoreconf, commit adfe211b18d05bb2d4ea6605e2d0ea217f9768ab Author: Julien Cristau <[email protected]> Date: Thu Apr 30 23:10:00 2015 +0200 Build-depend on Xlib 1.6. diff --git a/debian/changelog b/debian/changelog index 1598575..94731b0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ libxxf86vm (1:1.1.4-1) UNRELEASED; urgency=medium * New upstream release. * Let uscan verify tarball signatures. + * Build-depend on Xlib 1.6. -- Julien Cristau <[email protected]> Thu, 30 Apr 2015 23:02:28 +0200 diff --git a/debian/control b/debian/control index 8362f05..a3f8b0c 100644 --- a/debian/control +++ b/debian/control @@ -8,6 +8,7 @@ Build-Depends: dh-autoreconf, libx11-dev (>= 1:0.99.2), x11proto-xf86vidmode-dev (>= 2.2.99.1), + libx11-6 (>= 2:1.6), libxext-dev (>= 1:0.99.1), pkg-config, quilt, commit b1e72e20a696c0f1ea93e12d236bdaa6e02065f8 Author: Julien Cristau <[email protected]> Date: Thu Apr 30 23:02:51 2015 +0200 Let uscan verify tarball signatures. diff --git a/debian/changelog b/debian/changelog index e15a2a0..1598575 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ libxxf86vm (1:1.1.4-1) UNRELEASED; urgency=medium * New upstream release. + * Let uscan verify tarball signatures. -- Julien Cristau <[email protected]> Thu, 30 Apr 2015 23:02:28 +0200 diff --git a/debian/upstream/signing-key.asc b/debian/upstream/signing-key.asc new file mode 100644 index 0000000..863981f --- /dev/null +++ b/debian/upstream/signing-key.asc @@ -0,0 +1,60 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1 + +mQGiBEab+moRBACDH5yKqS3wcc5bdxY7PBNuwKvF5TKMfagmSvuRDtZjjIIWaA/n +Z1KboV9Gq5g7kP7+Kfu+Qgd8u65eVsWwmPW10fXvj3aCU53glx2EdGdrHcgiyH2g +EQfPiyBw+trIppWFRV0IDXSLMA1FNC92t2nSG/VFHaPTVwcgkIRSfcXDvwCglG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DleOmdsS8cN31yf5KB8rsL4u +n4u1yrMJfpnSblPMu5wJi3kjoA+Dd5ZFqx9nTi4wBjfVYGCPsleq59K8kQCYx1Cn +lZcq630ITy9dB/aHCQry2gCbBwZ2Rsf9kr05S8uLhlwW3vRSvRs= +=tc6G +-----END PGP PUBLIC KEY BLOCK----- diff --git a/debian/watch b/debian/watch index f4fc39e..1b50ba2 100644 --- a/debian/watch +++ b/debian/watch @@ -1,3 +1,4 @@ #git=git://anongit.freedesktop.org/xorg/lib/libXxf86vm version=3 +opts=pgpsigurlmangle=s/$/.sig/ \ http://xorg.freedesktop.org/releases/individual/lib/ libXxf86vm-(.*)\.tar\.gz commit 6e2586aa8913b350ba4ae4d791c0a2944798d40f Author: Julien Cristau <[email protected]> Date: Thu Apr 30 23:02:38 2015 +0200 Bump changelogs diff --git a/ChangeLog b/ChangeLog index 225701f..49800c4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,122 @@ +commit 92d18649e92566ccc3abeba244adabda249cce1b +Author: Alan Coopersmith <[email protected]> +Date: Mon Feb 23 23:01:54 2015 -0800 + + libXxf86vm 1.1.4 + + Signed-off-by: Alan Coopersmith <[email protected]> + +commit e13937ebf1da3c062c9d9731f2b49207d9e4ea2a +Author: Alan Coopersmith <[email protected]> +Date: Fri Jan 9 22:23:31 2015 -0800 + + Tell the compiler it's unlikely we're talking to an XFree86 3.x server + + Hint that the current (XFree86 4.0 & later) version of the protocol + is most common today. + + Signed-off-by: Alan Coopersmith <[email protected]> + +commit 723f4a1430dad0d495e3c83c7c95edb94e9f4304 +Author: Alan Coopersmith <[email protected]> +Date: Mon Jan 5 22:52:39 2015 -0800 + + Discard correct length for old-format replies in XF86VidModeGetGamma + + Regression introduced in libXxf86vm 1.1.3 / commit 284a88e21fc05a63466 + Unlikely to be hit in practice since it requires out-of-range privsize + or malloc failure while talking to a server using the XFree86 3.x version + of the protocol. + + Found by Oracle Parfait 1.5.1: + + Error: Uninitialised memory (CWE 456) + Possible access to uninitialised memory '&rep.length' + at line 279 of open-src/lib/libXxf86vm/unpacked-src/src/XF86VMode.c in function 'XF86VidModeGetModeLine'. + &rep.length allocated at line 218. + &rep.length uninitialised when majorVersion < 2 at line 233. + + Signed-off-by: Alan Coopersmith <[email protected]> + Reviewed-by: Matthieu Herrb <[email protected]> + +commit f3cdbabadd4626a030e3ac139a333450a462e055 +Author: Michael Joost <[email protected]> +Date: Mon Nov 18 16:11:26 2013 +0100 + + Remove fallback for _XEatDataWords, require libX11 1.6 for it + + _XEatDataWords was orignally introduced with the May 2013 security + patches, and in order to ease the process of delivering those, + fallback versions of _XEatDataWords were included in the X extension + library patches so they could be applied to older versions that didn't + have libX11 1.6 yet. Now that we're past that hurdle, we can drop + the fallbacks and just require libX11 1.6 for building new versions + of the extension libraries. + + Reviewed-by: Alan Coopersmith <[email protected]> + Signed-off-by: Alan Coopersmith <[email protected]> + +commit 68a23c66892e973db389db6b12a1d70a0d03b797 +Author: Alan Coopersmith <[email protected]> +Date: Sat Jul 6 12:48:16 2013 -0700 + + Add man/XF86VidModeAddModeLine.man file (missed in previous commit) + + Oops, forgot to git add the shadow man page. + + Signed-off-by: Alan Coopersmith <[email protected]> + +commit 01adc331604d77e71a42a77619560b59d7a53d26 +Author: Alan Coopersmith <[email protected]> +Date: Fri Jul 5 21:35:14 2013 -0700 + + Add XF86VidModeAddModeLine man page + + The function was actually already described in the man page, and + even had a commented out prototype in the man page until it was + removed by the cleanup in commit aac92ef0f20f8. + + So this commit restores the prototype (but doesn't comment it out as + before), adds the function to the NAME section, and adds a .so for it. + + Signed-off-by: Alan Coopersmith <[email protected]> + +commit 980ed7e7c98606f09e981a52255acd76b335a19a +Author: Alan Coopersmith <[email protected]> +Date: Mon Jun 24 22:27:37 2013 -0700 + + Fix a couple sign comparison warnings + + XF86VMode.c:352:19: warning: comparison of integers of different signs: 'int' and 'CARD32' (aka 'unsigned int') [-Wsign-compare] + for (i = 0; i < rep.modecount; i++) { + ~ ^ ~~~~~~~~~~~~~ + + XF86VMode.c:1048:16: warning: comparison of integers of different signs: 'int' and 'CARD32' (aka 'unsigned int') [-Wsign-compare] + for (i = 0; i < rep.clocks; i++) { + ~ ^ ~~~~~~~~~~ + + Signed-off-by: Alan Coopersmith <[email protected]> + +commit 4219ed8b5cfb832b20cb50a0404b3bd02bc863b4 +Author: Alan Coopersmith <[email protected]> +Date: Mon Jun 24 22:20:41 2013 -0700 + + Require ANSI C89 pre-processor, drop pre-C89 token pasting support + + Signed-off-by: Alan Coopersmith <[email protected]> + +commit aac92ef0f20f8ce6592245e9e6ff9d8f7eac3efa +Author: Eric S. Raymond <[email protected]> +Date: Fri Jun 7 07:14:43 2013 -0400 + + Enable parsing of C prototypes in the synopsis into prototype markup. + +commit 3897537c9b79521d498112988e668815067301b1 +Author: Eric S. Raymond <[email protected]> +Date: Fri Jun 7 07:01:28 2013 -0400 + + Eliminate use of .ta. + commit 4ca5d221d35ed6981247caa5d5069f083e83b7fb Author: Alan Coopersmith <[email protected]> Date: Thu May 30 18:43:11 2013 -0700 diff --git a/debian/changelog b/debian/changelog index 871bb6f..e15a2a0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +libxxf86vm (1:1.1.4-1) UNRELEASED; urgency=medium + + * New upstream release. + + -- Julien Cristau <[email protected]> Thu, 30 Apr 2015 23:02:28 +0200 + libxxf86vm (1:1.1.3-1) unstable; urgency=low * New upstream release. commit 92d18649e92566ccc3abeba244adabda249cce1b Author: Alan Coopersmith <[email protected]> Date: Mon Feb 23 23:01:54 2015 -0800 libXxf86vm 1.1.4 Signed-off-by: Alan Coopersmith <[email protected]> diff --git a/configure.ac b/configure.ac index ac4c803..cdf365d 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) -AC_INIT([libXxf86vm], [1.1.3], +AC_INIT([libXxf86vm], [1.1.4], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXxf86vm]) AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_HEADERS(src/config.h) commit e13937ebf1da3c062c9d9731f2b49207d9e4ea2a Author: Alan Coopersmith <[email protected]> Date: Fri Jan 9 22:23:31 2015 -0800 Tell the compiler it's unlikely we're talking to an XFree86 3.x server Hint that the current (XFree86 4.0 & later) version of the protocol is most common today. Signed-off-by: Alan Coopersmith <[email protected]> diff --git a/src/XF86VMode.c b/src/XF86VMode.c index d13da14..00eeb26 100644 --- a/src/XF86VMode.c +++ b/src/XF86VMode.c @@ -218,7 +218,7 @@ XF86VidModeGetModeLine(Display* dpy, int screen, int* dotclock, req->xf86vidmodeReqType = X_XF86VidModeGetModeLine; req->screen = screen; - if (majorVersion < 2) { + if (_X_UNLIKELY(majorVersion < 2)) { xXF86OldVidModeGetModeLineReply oldrep; if (!_XReply(dpy, (xReply *)&oldrep, @@ -346,7 +346,7 @@ XF86VidModeGetAllModeLines(Display* dpy, int screen, int* modecount, for (i = 0; i < rep.modecount; i++) { modelines[i] = mdinfptr++; - if (majorVersion < 2) { + if (_X_UNLIKELY(majorVersion < 2)) { _XRead(dpy, (char*)&oldxmdline, sizeof(xXF86OldVidModeModeInfo)); modelines[i]->dotclock = oldxmdline.dotclock; modelines[i]->hdisplay = oldxmdline.hdisplay; @@ -441,7 +441,7 @@ XF86VidModeAddModeLine(Display *dpy, int screen, XF86VidModeQueryVersion(dpy, &majorVersion, &minorVersion); LockDisplay(dpy); - if (majorVersion < 2) { + if (_X_UNLIKELY(majorVersion < 2)) { GetOldReq(XF86VidModeAddModeLine, XF86OldVidModeAddModeLine, oldreq); oldreq->reqType = info->codes->major_opcode; oldreq->xf86vidmodeReqType = X_XF86VidModeAddModeLine; @@ -551,7 +551,7 @@ XF86VidModeDeleteModeLine(Display *dpy, int screen, XF86VidModeQueryVersion(dpy, &majorVersion, &minorVersion); LockDisplay(dpy); - if (majorVersion < 2) { + if (_X_UNLIKELY(majorVersion < 2)) { GetOldReq(XF86VidModeDeleteModeLine, XF86OldVidModeDeleteModeLine, oldreq); oldreq->reqType = info->codes->major_opcode; oldreq->xf86vidmodeReqType = X_XF86VidModeDeleteModeLine; @@ -612,7 +612,7 @@ XF86VidModeModModeLine(Display *dpy, int screen, XF86VidModeModeLine* modeline) XF86VidModeQueryVersion(dpy, &majorVersion, &minorVersion); LockDisplay(dpy); - if (majorVersion < 2) { + if (_X_UNLIKELY(majorVersion < 2)) { GetOldReq(XF86VidModeModModeLine, XF86OldVidModeModModeLine, oldreq); oldreq->reqType = info->codes->major_opcode; oldreq->xf86vidmodeReqType = X_XF86VidModeModModeLine; @@ -674,7 +674,7 @@ XF86VidModeValidateModeLine(Display *dpy, int screen, LockDisplay(dpy); - if (majorVersion < 2) { + if (_X_UNLIKELY(majorVersion < 2)) { GetOldReq(XF86VidModeValidateModeLine, XF86OldVidModeValidateModeLine, oldreq); oldreq->reqType = info->codes->major_opcode; oldreq->xf86vidmodeReqType = X_XF86VidModeValidateModeLine; @@ -766,7 +766,7 @@ XF86VidModeSwitchToMode(Display* dpy, int screen, XF86VidModeModeInfo* modeline) */ XF86VidModeQueryVersion(dpy, &majorVersion, &minorVersion); - if (majorVersion == 0 && minorVersion < 8) { + if (_X_UNLIKELY(majorVersion == 0 && minorVersion < 8)) { protocolBug = True; #ifdef DEBUG fprintf(stderr, "XF86VidModeSwitchToMode: Warning: Xserver is" @@ -776,7 +776,7 @@ XF86VidModeSwitchToMode(Display* dpy, int screen, XF86VidModeModeInfo* modeline) } LockDisplay(dpy); - if (majorVersion < 2) { + if (_X_UNLIKELY(majorVersion < 2)) { GetOldReq(XF86VidModeSwitchToMode, XF86OldVidModeSwitchToMode, oldreq); oldreq->reqType = info->codes->major_opcode; oldreq->xf86vidmodeReqType = X_XF86VidModeSwitchToMode; commit 723f4a1430dad0d495e3c83c7c95edb94e9f4304 Author: Alan Coopersmith <[email protected]> Date: Mon Jan 5 22:52:39 2015 -0800 Discard correct length for old-format replies in XF86VidModeGetGamma Regression introduced in libXxf86vm 1.1.3 / commit 284a88e21fc05a63466 Unlikely to be hit in practice since it requires out-of-range privsize or malloc failure while talking to a server using the XFree86 3.x version of the protocol. Found by Oracle Parfait 1.5.1: Error: Uninitialised memory (CWE 456) Possible access to uninitialised memory '&rep.length' at line 279 of open-src/lib/libXxf86vm/unpacked-src/src/XF86VMode.c in function 'XF86VidModeGetModeLine'. &rep.length allocated at line 218. &rep.length uninitialised when majorVersion < 2 at line 233. Signed-off-by: Alan Coopersmith <[email protected]> Reviewed-by: Matthieu Herrb <[email protected]> diff --git a/src/XF86VMode.c b/src/XF86VMode.c index c7169c7..d13da14 100644 --- a/src/XF86VMode.c +++ b/src/XF86VMode.c @@ -204,10 +204,9 @@ XF86VidModeGetModeLine(Display* dpy, int screen, int* dotclock, XF86VidModeModeLine* modeline) { XExtDisplayInfo *info = find_display (dpy); - xXF86VidModeGetModeLineReply rep; - xXF86OldVidModeGetModeLineReply oldrep; xXF86VidModeGetModeLineReq *req; int majorVersion, minorVersion; + CARD32 remaining_len; Bool result = True; XF86VidModeCheckExtension (dpy, info, False); @@ -220,12 +219,16 @@ XF86VidModeGetModeLine(Display* dpy, int screen, int* dotclock, req->screen = screen; if (majorVersion < 2) { + xXF86OldVidModeGetModeLineReply oldrep; + if (!_XReply(dpy, (xReply *)&oldrep, (SIZEOF(xXF86OldVidModeGetModeLineReply) - SIZEOF(xReply)) >> 2, xFalse)) { UnlockDisplay(dpy); SyncHandle(); return False; } + remaining_len = oldrep.length - + ((SIZEOF(xXF86OldVidModeGetModeLineReply) - SIZEOF(xReply)) >> 2); *dotclock = oldrep.dotclock; modeline->hdisplay = oldrep.hdisplay; modeline->hsyncstart = oldrep.hsyncstart; @@ -239,12 +242,16 @@ XF86VidModeGetModeLine(Display* dpy, int screen, int* dotclock, modeline->flags = oldrep.flags; modeline->privsize = oldrep.privsize; } else { + xXF86VidModeGetModeLineReply rep; + if (!_XReply(dpy, (xReply *)&rep, (SIZEOF(xXF86VidModeGetModeLineReply) - SIZEOF(xReply)) >> 2, xFalse)) { UnlockDisplay(dpy); SyncHandle(); return False; } + remaining_len = rep.length - + ((SIZEOF(xXF86VidModeGetModeLineReply) - SIZEOF(xReply)) >> 2); *dotclock = rep.dotclock; modeline->hdisplay = rep.hdisplay; modeline->hsyncstart = rep.hsyncstart; @@ -265,8 +272,7 @@ XF86VidModeGetModeLine(Display* dpy, int screen, int* dotclock, else modeline->private = NULL; if (modeline->private == NULL) { - _XEatDataWords(dpy, rep.length - - ((SIZEOF(xXF86VidModeGetModeLineReply) - SIZEOF(xReply)) >> 2)); + _XEatDataWords(dpy, remaining_len); result = False; } else _XRead(dpy, (char*)modeline->private, modeline->privsize * sizeof(INT32)); commit f3cdbabadd4626a030e3ac139a333450a462e055 Author: Michael Joost <[email protected]> Date: Mon Nov 18 16:11:26 2013 +0100 Remove fallback for _XEatDataWords, require libX11 1.6 for it _XEatDataWords was orignally introduced with the May 2013 security patches, and in order to ease the process of delivering those, fallback versions of _XEatDataWords were included in the X extension library patches so they could be applied to older versions that didn't have libX11 1.6 yet. Now that we're past that hurdle, we can drop the fallbacks and just require libX11 1.6 for building new versions of the extension libraries. Reviewed-by: Alan Coopersmith <[email protected]> Signed-off-by: Alan Coopersmith <[email protected]> diff --git a/configure.ac b/configure.ac index d0dbcef..ac4c803 100644 --- a/configure.ac +++ b/configure.ac @@ -20,13 +20,7 @@ XORG_DEFAULT_OPTIONS XORG_CHECK_MALLOC_ZERO # Obtain compiler/linker options for depedencies -PKG_CHECK_MODULES(XXF86VM, xproto x11 xextproto xext [xf86vidmodeproto >= 2.2.99.1]) - -# Check for _XEatDataWords function that may be patched into older Xlib release -SAVE_LIBS="$LIBS" -LIBS="$XXF86VM_LIBS" -AC_CHECK_FUNCS([_XEatDataWords]) -LIBS="$SAVE_LIBS" +PKG_CHECK_MODULES(XXF86VM, xproto [x11 >= 1.6] xextproto xext [xf86vidmodeproto >= 2.2.99.1]) AC_CONFIG_FILES([Makefile src/Makefile diff --git a/src/XF86VMode.c b/src/XF86VMode.c index 9407c47..c7169c7 100644 --- a/src/XF86VMode.c +++ b/src/XF86VMode.c @@ -41,17 +41,6 @@ from Kaleb S. KEITHLEY. #include <X11/extensions/extutil.h> #include <limits.h> -#ifndef HAVE__XEATDATAWORDS -static inline void _XEatDataWords(Display *dpy, unsigned long n) -{ -# ifndef LONG64 - if (n >= (ULONG_MAX >> 2)) - _XIOError(dpy); -# endif - _XEatData (dpy, n << 2); -} -#endif - #ifdef DEBUG #include <stdio.h> #endif commit 68a23c66892e973db389db6b12a1d70a0d03b797 Author: Alan Coopersmith <[email protected]> Date: Sat Jul 6 12:48:16 2013 -0700 Add man/XF86VidModeAddModeLine.man file (missed in previous commit) Oops, forgot to git add the shadow man page. Signed-off-by: Alan Coopersmith <[email protected]> diff --git a/man/XF86VidModeAddModeLine.man b/man/XF86VidModeAddModeLine.man new file mode 100644 index 0000000..cf4cb48 --- /dev/null +++ b/man/XF86VidModeAddModeLine.man @@ -0,0 +1 @@ +.so man__libmansuffix__/XF86VM.__libmansuffix__ commit 01adc331604d77e71a42a77619560b59d7a53d26 Author: Alan Coopersmith <[email protected]> Date: Fri Jul 5 21:35:14 2013 -0700 Add XF86VidModeAddModeLine man page The function was actually already described in the man page, and even had a commented out prototype in the man page until it was removed by the cleanup in commit aac92ef0f20f8. So this commit restores the prototype (but doesn't comment it out as before), adds the function to the NAME section, and adds a .so for it. Signed-off-by: Alan Coopersmith <[email protected]> diff --git a/man/Makefile.am b/man/Makefile.am index 89d3172..bd88ffc 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -32,6 +32,7 @@ XF86VM_shadows = \ XF86VidModeQueryVersion \ XF86VidModeGetModeLine \ XF86VidModeGetAllModeLines \ + XF86VidModeAddModeLine \ XF86VidModeDeleteModeLine \ XF86VidModeModModeLine \ XF86VidModeSwitchMode \ diff --git a/man/XF86VM.man b/man/XF86VM.man index fabc4f4..aa03da1 100644 --- a/man/XF86VM.man +++ b/man/XF86VM.man @@ -19,7 +19,7 @@ .. .TH XF86VIDMODE __libmansuffix__ __vendorversion__ .SH NAME -XF86VidModeQueryExtension, XF86VidModeQueryVersion, XF86VidModeSetClientVersion, XF86VidModeGetModeLine, XF86VidModeGetAllModeLines, XF86VidModeDeleteModeLine, XF86VidModeModModeLine, XF86VidModeValidateModeLine, XF86VidModeSwitchMode, XF86VidModeSwitchToMode, XF86VidModeLockModeSwitch, XF86VidModeGetMonitor, XF86VidModeGetViewPort, XF86VidModeSetViewPort, XF86VidModeGetDotClocks, XF86VidModeGetGamma, XF86VidModeSetGamma, XF86VidModeGetGammaRamp, XF86VidModeSetGammaRamp, XF86VidModeGetGammaRampSize, XF86VidModeGetPermissions \- Extension library for the XFree86-VidMode X extension +XF86VidModeQueryExtension, XF86VidModeQueryVersion, XF86VidModeSetClientVersion, XF86VidModeGetModeLine, XF86VidModeGetAllModeLines, XF86VidModeAddModeLine, XF86VidModeDeleteModeLine, XF86VidModeModModeLine, XF86VidModeValidateModeLine, XF86VidModeSwitchMode, XF86VidModeSwitchToMode, XF86VidModeLockModeSwitch, XF86VidModeGetMonitor, XF86VidModeGetViewPort, XF86VidModeSetViewPort, XF86VidModeGetDotClocks, XF86VidModeGetGamma, XF86VidModeSetGamma, XF86VidModeGetGammaRamp, XF86VidModeSetGammaRamp, XF86VidModeGetGammaRampSize, XF86VidModeGetPermissions \- Extension library for the XFree86-VidMode X extension .SH SYNOPSIS .nf @@ -50,6 +50,12 @@ Bool XF86VidModeGetAllModeLines( int *\fImodecount_return\fP\^, XF86VidModeModeInfo ***\fImodesinfo\fP\^); +Bool XF86VidModeAddModeLine( + Display *\fIdisplay\fP\^, + int \fIscreen\fP\^, + XF86VidModeModeInfo *\fImodeline\fP\, + XF86VidModeModeInfo *\fIaftermode\fP\^); + Bool XF86VidModeDeleteModeLine( Display *\fIdisplay\fP\^, int \fIscreen\fP\^, @@ -160,11 +166,9 @@ the next mode, otherwise switch to the previous mode. Indicates that mode switching should be locked, if non-zero. .IP \fImodeline\fP 2i Specifies or returns the timing values for a video mode. -.ig .IP \fIaftermode\fP 2i Specifies the timing values for the video mode after which the new mode will added. -.. .IP \fImodesinfo\fP 2i Returns the timing values and dotclocks for all of the available video modes. @@ -287,7 +291,6 @@ function can be used to change the settings of the current video mode provided the requested settings are valid (e.g. they don't exceed the capabilities of the monitor). .PP -.ig To add a mode to the list of available modes, the .ZN XF86VidModeAddModeLine function can be used. @@ -307,7 +310,6 @@ If the parameter is zero, the mode will be added after the current mode. .PP -.. Modes can be deleted with the .ZN XF86VidModeDeleteModeLine function. The specified mode must match an existing mode. commit 980ed7e7c98606f09e981a52255acd76b335a19a Author: Alan Coopersmith <[email protected]> Date: Mon Jun 24 22:27:37 2013 -0700 Fix a couple sign comparison warnings XF86VMode.c:352:19: warning: comparison of integers of different signs: 'int' and 'CARD32' (aka 'unsigned int') [-Wsign-compare] for (i = 0; i < rep.modecount; i++) { ~ ^ ~~~~~~~~~~~~~ XF86VMode.c:1048:16: warning: comparison of integers of different signs: 'int' and 'CARD32' (aka 'unsigned int') [-Wsign-compare] for (i = 0; i < rep.clocks; i++) { ~ ^ ~~~~~~~~~~ Signed-off-by: Alan Coopersmith <[email protected]> diff --git a/src/XF86VMode.c b/src/XF86VMode.c index c85cbd8..9407c47 100644 --- a/src/XF86VMode.c +++ b/src/XF86VMode.c @@ -299,7 +299,7 @@ XF86VidModeGetAllModeLines(Display* dpy, int screen, int* modecount, XF86VidModeModeInfo *mdinfptr, **modelines; xXF86VidModeModeInfo xmdline; xXF86OldVidModeModeInfo oldxmdline; - int i; + unsigned int i; int majorVersion, minorVersion; Bool protocolBug = False; @@ -1016,7 +1016,7 @@ XF86VidModeGetDotClocks(Display* dpy, int screen, int *flagsPtr, XExtDisplayInfo *info = find_display (dpy); xXF86VidModeGetDotClocksReply rep; xXF86VidModeGetDotClocksReq *req; - int i, *dotclocks; + int *dotclocks; CARD32 dotclk; Bool result = True; @@ -1045,6 +1045,8 @@ XF86VidModeGetDotClocks(Display* dpy, int screen, int *flagsPtr, result = False; } else { + unsigned int i; + for (i = 0; i < rep.clocks; i++) { _XRead(dpy, (char*)&dotclk, 4); dotclocks[i] = dotclk; commit 4219ed8b5cfb832b20cb50a0404b3bd02bc863b4 Author: Alan Coopersmith <[email protected]> Date: Mon Jun 24 22:20:41 2013 -0700 Require ANSI C89 pre-processor, drop pre-C89 token pasting support Signed-off-by: Alan Coopersmith <[email protected]> diff --git a/src/XF86VMode.c b/src/XF86VMode.c index fb94816..c85cbd8 100644 --- a/src/XF86VMode.c +++ b/src/XF86VMode.c @@ -422,7 +422,6 @@ XF86VidModeGetAllModeLines(Display* dpy, int screen, int* modecount, /* * GetReq replacement for use with VidMode protocols earlier than 2.0 */ -#if !defined(UNIXCPP) || defined(ANSICPP) #define GetOldReq(name, oldname, req) \ WORD64ALIGN\ if ((dpy->bufptr + SIZEOF(x##oldname##Req)) > dpy->bufmax)\ @@ -433,18 +432,6 @@ XF86VidModeGetAllModeLines(Display* dpy, int screen, int* modecount, dpy->bufptr += SIZEOF(x##oldname##Req);\ dpy->request++ -#else /* non-ANSI C uses empty comment instead of "##" for token concatenation */ -#define GetOldReq(name, oldname, req) \ - WORD64ALIGN\ - if ((dpy->bufptr + SIZEOF(x/**/oldname/**/Req)) > dpy->bufmax)\ - _XFlush(dpy);\ - req = (x/**/oldname/**/Req *)(dpy->last_req = dpy->bufptr);\ - req->reqType = X_/**/name;\ - req->length = (SIZEOF(x/**/oldname/**/Req))>>2;\ - dpy->bufptr += SIZEOF(x/**/oldname/**/Req);\ - dpy->request++ -#endif - Bool XF86VidModeAddModeLine(Display *dpy, int screen, XF86VidModeModeInfo* newmodeline, commit aac92ef0f20f8ce6592245e9e6ff9d8f7eac3efa Author: Eric S. Raymond <[email protected]> Date: Fri Jun 7 07:14:43 2013 -0400 Enable parsing of C prototypes in the synopsis into prototype markup. diff --git a/man/XF86VM.man b/man/XF86VM.man index ac36724..fabc4f4 100644 --- a/man/XF86VM.man +++ b/man/XF86VM.man @@ -20,91 +20,83 @@ .TH XF86VIDMODE __libmansuffix__ __vendorversion__ .SH NAME XF86VidModeQueryExtension, XF86VidModeQueryVersion, XF86VidModeSetClientVersion, XF86VidModeGetModeLine, XF86VidModeGetAllModeLines, XF86VidModeDeleteModeLine, XF86VidModeModModeLine, XF86VidModeValidateModeLine, XF86VidModeSwitchMode, XF86VidModeSwitchToMode, XF86VidModeLockModeSwitch, XF86VidModeGetMonitor, XF86VidModeGetViewPort, XF86VidModeSetViewPort, XF86VidModeGetDotClocks, XF86VidModeGetGamma, XF86VidModeSetGamma, XF86VidModeGetGammaRamp, XF86VidModeSetGammaRamp, XF86VidModeGetGammaRampSize, XF86VidModeGetPermissions \- Extension library for the XFree86-VidMode X extension -.SH FUNCTIONS +.SH SYNOPSIS .nf -.LP + \&#include <X11/extensions/xf86vmode.h> -.LP + Bool XF86VidModeQueryExtension( Display *\fIdisplay\fP\^, int *\fIevent_base_return\fP\^, int *\fIerror_base_return\fP\^); -.LP + Bool XF86VidModeQueryVersion( Display *\fIdisplay\fP\^, int *\fImajor_version_return\fP\^, int *\fIminor_version_return\fP\^); -.LP + Bool XF86VidModeSetClientVersion( Display *\fIdisplay\fP\^); -.LP + Bool XF86VidModeGetModeLine( Display *\fIdisplay\fP\^, int \fIscreen\fP\^, int *\fIdotclock_return\fP\^, XF86VidModeModeLine *\fImodeline\fP\^); -.LP + Bool XF86VidModeGetAllModeLines( Display *\fIdisplay\fP\^, int \fIscreen\fP\^, int *\fImodecount_return\fP\^, XF86VidModeModeInfo ***\fImodesinfo\fP\^); -.ig -.LP -Bool XF86VidModeAddModeLine( - Display *\fIdisplay\fP\^, - int \fIscreen\fP\^, - XF86VidModeModeInfo *\fImodeline\fP\, - XF86VidModeModeInfo *\fIaftermode\fP\^); -.. -.LP + Bool XF86VidModeDeleteModeLine( Display *\fIdisplay\fP\^, int \fIscreen\fP\^, XF86VidModeModeInfo *\fImodeline\fP\^); -.LP + Bool XF86VidModeModModeLine( Display *\fIdisplay\fP\^, int \fIscreen\fP\^, XF86VidModeModeLine *\fImodeline\fP\^); -.LP + Status XF86VidModeValidateModeLine( Display *\fIdisplay\fP\^, int \fIscreen\fP\^, XF86VidModeModeLine *\fImodeline\fP\^); -.LP + Bool XF86VidModeSwitchMode( Display *\fIdisplay\fP\^, int \fIscreen\fP\^, int \fIzoom\fP\^); -.LP + Bool XF86VidModeSwitchToMode( Display *\fIdisplay\fP\^, int \fIscreen\fP\^, XF86VidModeModeInfo *\fImodeline\fP\^); -.LP + Bool XF86VidModeLockModeSwitch( Display *\fIdisplay\fP\^, int \fIscreen\fP\^, int \fIlock\fP\^); -.LP + Bool XF86VidModeGetMonitor( Display *\fIdisplay\fP\^, int \fIscreen\fP\^, XF86VidModeMonitor *\fImonitor\fP\^); -.LP + Bool XF86VidModeGetViewPort( Display *\fIdisplay\fP\^, int \fIscreen\fP\^, int *\fIx_return\fP\^, int *\fIy_return\fP\^); -.LP + Bool XF86VidModeSetViewPort( Display *\fIdisplay\fP\^, int \fIscreen\fP\^, int \fIx\fP\^, int \fIy\fP\^); -.LP + XF86VidModeGetDotClocks( Display *\fIdisplay\fP\^, int \fIscreen\fP\^, @@ -112,17 +104,17 @@ XF86VidModeGetDotClocks( int *\fInumber of clocks return\fP\^, int *\fImax dot clock return\fP\^, int **\fIclocks return\fP\^); -.LP + XF86VidModeGetGamma( Display *\fIdisplay\fP\^, int \fIscreen\fP\^, XF86VidModeGamma *\fIGamma\fP\^); -.LP + XF86VidModeSetGamma( Display *\fIdisplay\fP\^, int \fIscreen\fP\^, XF86VidModeGamma *\fIGamma\fP\^); -.LP + XF86VidModeGetGammaRamp( Display *\fIdisplay\fP\^, int \fIscreen\fP\^, @@ -130,7 +122,7 @@ XF86VidModeGetGammaRamp( unsigned short *\fIred array\fP\^, unsigned short *\fIgreen array\fP\^, unsigned short *\fIblue array\fP\^); -.LP + XF86VidModeSetGammaRamp( Display *\fIdisplay\fP\^, int \fIscreen\fP\^, @@ -138,7 +130,7 @@ XF86VidModeSetGammaRamp( unsigned short *\fIred array\fP\^, unsigned short *\fIgreen array\fP\^, unsigned short *\fIblue array\fP\^); -.LP + XF86VidModeGetGammaRampSize( Display *\fIdisplay\fP\^, int \fIscreen\fP\^, commit 3897537c9b79521d498112988e668815067301b1 Author: Eric S. Raymond <[email protected]> Date: Fri Jun 7 07:01:28 2013 -0400 Eliminate use of .ta. diff --git a/man/XF86VM.man b/man/XF86VM.man index 97431b1..ac36724 100644 --- a/man/XF86VM.man +++ b/man/XF86VM.man @@ -5,10 +5,22 @@ .ie t \fB\^\\$1\^\fR\\$2 .el \fI\^\\$1\^\fP\\$2 .. +.de EX +.RS +.nf +.sp 1 +.ft CW +.. +.de EE +.ft +.sp 1 +.fi +.RE +.. .TH XF86VIDMODE __libmansuffix__ __vendorversion__ .SH NAME XF86VidModeQueryExtension, XF86VidModeQueryVersion, XF86VidModeSetClientVersion, XF86VidModeGetModeLine, XF86VidModeGetAllModeLines, XF86VidModeDeleteModeLine, XF86VidModeModModeLine, XF86VidModeValidateModeLine, XF86VidModeSwitchMode, XF86VidModeSwitchToMode, XF86VidModeLockModeSwitch, XF86VidModeGetMonitor, XF86VidModeGetViewPort, XF86VidModeSetViewPort, XF86VidModeGetDotClocks, XF86VidModeGetGamma, XF86VidModeSetGamma, XF86VidModeGetGammaRamp, XF86VidModeSetGammaRamp, XF86VidModeGetGammaRampSize, XF86VidModeGetPermissions \- Extension library for the XFree86-VidMode X extension -.SH SYNTAX +.SH FUNCTIONS .nf .LP \&#include <X11/extensions/xf86vmode.h> @@ -175,72 +187,73 @@ Specifies the desired Y location for the viewport. .IP \fIy_return\fP 2i Returns the current Y location of the viewport. .SH STRUCTURES -.nf -.ta 2.25i 3.5i \fIVideo Mode Settings:\fP +.EX typedef struct { - unsigned short hdisplay; /\(** Number of display pixels horizontally */ - unsigned short hsyncstart; /\(** Horizontal sync start */ - unsigned short hsyncend; /\(** Horizontal sync end */ - unsigned short htotal; /\(** Total horizontal pixels */ - unsigned short vdisplay; /\(** Number of display pixels vertically */ - unsigned short vsyncstart; /\(** Vertical sync start */ - unsigned short vsyncend; /\(** Vertical sync start */ - unsigned short vtotal; /\(** Total vertical pixels */ - unsigned int flags; /\(** Mode flags */ - int privsize; /\(** Size of private */ - INT32 *private; /\(** Server privates */ + unsigned short hdisplay; /\(** Number of display pixels horizontally */ + unsigned short hsyncstart; /\(** Horizontal sync start */ + unsigned short hsyncend; /\(** Horizontal sync end */ + unsigned short htotal; /\(** Total horizontal pixels */ + unsigned short vdisplay; /\(** Number of display pixels vertically */ -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: https://lists.debian.org/[email protected]

