libxxf86vm: Changes to 'upstream-unstable'
configure.ac | 10 --
man/Makefile.am | 1
man/XF86VM.man | 169 +++++++++++++++++++++--------------------
man/XF86VidModeAddModeLine.man | 1
src/XF86VMode.c | 60 +++++---------
5 files changed, 114 insertions(+), 127 deletions(-)
New commits:
commit 92d18649e92566ccc3abeba244adabda249cce1b
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Mon Feb 23 23:01:54 2015 -0800
libXxf86vm 1.1.4
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
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 <alan.coopersmith@oracle.com>
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 <alan.coopersmith@oracle.com>
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 <alan.coopersmith@oracle.com>
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 <alan.coopersmith@oracle.com>
Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
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 <mehl@michael-joost.de>
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 <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
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 <alan.coopersmith@oracle.com>
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 <alan.coopersmith@oracle.com>
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 <alan.coopersmith@oracle.com>
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 <alan.coopersmith@oracle.com>
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 <alan.coopersmith@oracle.com>
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 <alan.coopersmith@oracle.com>
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 <alan.coopersmith@oracle.com>
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 <alan.coopersmith@oracle.com>
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 <esr@thyrsus.com>
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 <esr@thyrsus.com>
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 */
+ 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 */
} XF86VidModeModeLine;
-.sp
+
typedef struct {
- unsigned int dotclock; /\(** Pixel clock */
- 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 int dotclock; /\(** Pixel clock */
+ 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 */
} XF86VidModeModeInfo;
+.EE
.LP
\fIMonitor information:\fP
+.EX
typedef struct {
- char* vendor; /\(** Name of manufacturer */
- char* model; /\(** Model name */
- float EMPTY; /\(** unused, for backward compatibility */
- unsigned char nhsync; /\(** Number of horiz sync ranges */
- XF86VidModeSyncRange* hsync; /\(** Horizontal sync ranges */
- unsigned char nvsync; /\(** Number of vert sync ranges */
- XF86VidModeSyncRange* vsync; /\(** Vertical sync ranges */
+ char* vendor; /\(** Name of manufacturer */
+ char* model; /\(** Model name */
+ float EMPTY; /\(** unused, for backward compatibility */
+ unsigned char nhsync; /\(** Number of horiz sync ranges */
+ XF86VidModeSyncRange* hsync; /\(** Horizontal sync ranges */
+ unsigned char nvsync; /\(** Number of vert sync ranges */
+ XF86VidModeSyncRange* vsync; /\(** Vertical sync ranges */
} XF86VidModeMonitor;
-.sp
+
typedef struct {
- float hi; /\(** Top of range */
- float lo; /\(** Bottom of range */
+ float hi; /\(** Top of range */
+ float lo; /\(** Bottom of range */
} XF86VidModeSyncRange;
-.LP
+
typedef struct {
- int type; /\(** of event */
- unsigned long serial; /\(** # of last request processed by server */
- Bool send_event; /\(** true if this came from a SendEvent req */
- Display *display; /\(** Display the event was read from */
- Window root; /\(** root window of event screen */
- int state; /\(** What happened */
- int kind; /\(** What happened */
- Bool forced; /\(** extents of new region */
- Time time; /\(** event timestamp */
+ int type; /\(** of event */
+ unsigned long serial; /\(** # of last request processed by server */
+ Bool send_event; /\(** true if this came from a SendEvent req */
+ Display *display; /\(** Display the event was read from */
+ Window root; /\(** root window of event screen */
+ int state; /\(** What happened */
+ int kind; /\(** What happened */
+ Bool forced; /\(** extents of new region */
+ Time time; /\(** event timestamp */
} XF86VidModeNotifyEvent;
-.LP
+
typedef struct {
- float red; /\(** Red Gamma value */
- float green; /\(** Green Gamma value */
- float blue; /\(** Blue Gamma value */
+ float red; /\(** Red Gamma value */
+ float green; /\(** Green Gamma value */
+ float blue; /\(** Blue Gamma value */
} XF86VidModeGamma;
-.fi
+.EE
.SH DESCRIPTION
These functions provide an interface to the server extension
\fIXFree86-VidModeExtension\fP
Reply to: