summaryrefslogtreecommitdiff
path: root/src/XGetVers.c
diff options
context:
space:
mode:
authorKaleb Keithley <kaleb@freedesktop.org>2003-11-26 22:48:39 +0000
committerKaleb Keithley <kaleb@freedesktop.org>2003-11-26 22:48:39 +0000
commite096ac42209e3f383cd4e52cb4e2dff564bdbc8e (patch)
treea88fdd134f3fb83dfa9fdd7c769d15aec8643efa /src/XGetVers.c
parent3d0889d2b8d326319e17ffc49e114892ef54f979 (diff)
merge latest (4.3.99.16) from XFree86 (vendor) branchXORG-RELEASE-1-BASEXEVIE-MERGEXEVIE-BASEXINERAMA_2XEVIE
Diffstat (limited to 'src/XGetVers.c')
-rw-r--r--src/XGetVers.c33
1 files changed, 19 insertions, 14 deletions
diff --git a/src/XGetVers.c b/src/XGetVers.c
index 0672e75..fa8cf7f 100644
--- a/src/XGetVers.c
+++ b/src/XGetVers.c
@@ -45,7 +45,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
********************************************************/
-/* $XFree86: xc/lib/Xi/XGetVers.c,v 3.4 2002/10/16 00:37:29 dawes Exp $ */
+/* $XFree86: xc/lib/Xi/XGetVers.c,v 3.7 2003/11/17 22:20:21 dawes Exp $ */
/***********************************************************************
*
@@ -60,23 +60,32 @@ SOFTWARE.
#include <X11/extensions/extutil.h>
#include "XIint.h"
-XExtensionVersion
-#if NeedFunctionPrototypes
-*XGetExtensionVersion (
+XExtensionVersion *
+XGetExtensionVersion (
+ register Display *dpy,
+ _Xconst char *name)
+ {
+ XExtensionVersion *ext;
+
+ LockDisplay (dpy);
+ ext = _XiGetExtensionVersion (dpy, name);
+ if (ext != (XExtensionVersion *) NoSuchExtension) {
+ UnlockDisplay (dpy);
+ SyncHandle();
+ }
+ return (ext);
+ }
+
+XExtensionVersion *
+_XiGetExtensionVersion (
register Display *dpy,
_Xconst char *name)
-#else
-*XGetExtensionVersion (dpy, name)
- register Display *dpy;
- char *name;
-#endif
{
xGetExtensionVersionReq *req;
xGetExtensionVersionReply rep;
XExtensionVersion *ext;
XExtDisplayInfo *info = XInput_find_display (dpy);
- LockDisplay (dpy);
if (_XiCheckExtInit(dpy, Dont_Check) == -1)
return ((XExtensionVersion *) NoSuchExtension);
@@ -89,8 +98,6 @@ XExtensionVersion
if (! _XReply (dpy, (xReply *) &rep, 0, xTrue))
{
- UnlockDisplay(dpy);
- SyncHandle();
return (XExtensionVersion *) NULL;
}
ext = (XExtensionVersion *) Xmalloc (sizeof (XExtensionVersion));
@@ -103,8 +110,6 @@ XExtensionVersion
ext->minor_version = rep.minor_version;
}
}
- UnlockDisplay(dpy);
- SyncHandle();
return (ext);
}