summaryrefslogtreecommitdiff
path: root/src/XGetVers.c
diff options
context:
space:
mode:
authorKaleb Keithley <kaleb@freedesktop.org>2003-11-25 19:28:15 +0000
committerKaleb Keithley <kaleb@freedesktop.org>2003-11-25 19:28:15 +0000
commit1b4f7c4f6dbbc62db74f433a73d129ae507642cd (patch)
treea88fdd134f3fb83dfa9fdd7c769d15aec8643efa /src/XGetVers.c
parent3986f13c9319b4f64c7b2ec56391370735e7d51d (diff)
XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folksxf86-4_3_99_903_specialxf86-4_3_99_902xf86-4_3_99_901xf86-4_3_99_16xf86-012804-2330
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);
}