diff options
author | Peter Hutterer <peter@cs.unisa.edu.au> | 2007-12-06 14:23:02 +1030 |
---|---|---|
committer | Peter Hutterer <peter@cs.unisa.edu.au> | 2007-12-06 14:23:02 +1030 |
commit | c4b0ae960d63f461d6e9efd64f70084f06a674b3 (patch) | |
tree | 4c7bbd2fe1075fb1d8d61c7943a5269be169c5b2 | |
parent | d1c93500e2f56b8aefda7133848c21f62572f5d5 (diff) | |
parent | 249daf0d8a044a97d053c957ab45445c159d31e4 (diff) |
Merge branch 'master' into xge
-rw-r--r-- | COPYING | 168 | ||||
-rw-r--r-- | Makefile.am | 5 | ||||
-rw-r--r-- | configure.ac | 9 | ||||
-rw-r--r-- | man/XShape.man | 18 | ||||
-rw-r--r-- | man/XShm.man | 26 | ||||
-rw-r--r-- | man/Xmbuf.man | 54 | ||||
-rw-r--r-- | src/Makefile.am | 16 | ||||
-rw-r--r-- | src/XAppgroup.c | 2 | ||||
-rw-r--r-- | src/XEVI.c | 5 | ||||
-rw-r--r-- | src/XMultibuf.c | 2 | ||||
-rw-r--r-- | src/XShape.c | 4 | ||||
-rw-r--r-- | src/XTestExt1.c | 8 | ||||
-rw-r--r-- | src/Xcup.c | 2 | ||||
-rw-r--r-- | src/extutil.c | 8 | ||||
-rw-r--r-- | src/globals.c | 2 |
15 files changed, 264 insertions, 65 deletions
@@ -1,4 +1,4 @@ -Copyright 1987, 1988, 1998 The Open Group +Copyright 1986, 1987, 1988, 1989, 1994, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that @@ -19,3 +19,169 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. + +Copyright (c) 1996 Digital Equipment Corporation, Maynard, Massachusetts. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING, +BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of Digital Equipment Corporation +shall not be used in advertising or otherwise to promote the sale, use or other +dealings in this Software without prior written authorization from Digital +Equipment Corporation. + +Copyright (c) 1997 by Silicon Graphics Computer Systems, Inc. +Permission to use, copy, modify, and distribute this +software and its documentation for any purpose and without +fee is hereby granted, provided that the above copyright +notice appear in all copies and that both that copyright +notice and this permission notice appear in supporting +documentation, and that the name of Silicon Graphics not be +used in advertising or publicity pertaining to distribution +of the software without specific prior written permission. +Silicon Graphics makes no representation about the suitability +of this software for any purpose. It is provided "as is" +without any express or implied warranty. +SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON +GRAPHICS 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 CONNECTION WITH +THE USE OR PERFORMANCE OF THIS SOFTWARE. + +Copyright 1992 Network Computing Devices + +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 +copyright notice and this permission notice appear in supporting +documentation, and that the name of NCD. not be used in advertising or +publicity pertaining to distribution of the software without specific, +written prior permission. NCD. makes no representations about the +suitability of this software for any purpose. It is provided "as is" +without express or implied warranty. + +NCD. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NCD. +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 +CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +Copyright 1991,1993 by Digital Equipment Corporation, Maynard, Massachusetts, +and Olivetti Research Limited, Cambridge, England. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the names of Digital or Olivetti +not be used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL AND OLIVETTI DISCLAIM ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS, IN NO EVENT SHALL THEY 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 CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + +Copyright 1986, 1987, 1988 by Hewlett-Packard Corporation + +Permission to use, copy, modify, and distribute this +software and its documentation for any purpose and without +fee is hereby granted, provided that the above copyright +notice appear in all copies and that both that copyright +notice and this permission notice appear in supporting +documentation, and that the name of Hewlett-Packard not be used in +advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +Hewlett-Packard makes no representations about the +suitability of this software for any purpose. It is provided +"as is" without express or implied warranty. + +This software is not subject to any license of the American +Telephone and Telegraph Company or of the Regents of the +University of California. + +Copyright (c) 1994, 1995 Hewlett-Packard Company + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL HEWLETT-PACKARD COMPANY BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR +THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the Hewlett-Packard +Company shall not be used in advertising or otherwise to promote the +sale, use or other dealings in this Software without prior written +authorization from the Hewlett-Packard Company. + +Copyright Digital Equipment Corporation, 1996 + +Permission to use, copy, modify, distribute, and sell this +documentation for any purpose is hereby granted without fee, +provided that the above copyright notice and this permission +notice appear in all copies. Digital Equipment Corporation +makes no representations about the suitability for any purpose +of the information in this document. This documentation is +provided ``as is'' without express or implied warranty. + +Copyright 1999, 2005, 2006 Sun Microsystems, Inc. All Rights Reserved + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, +sublicense, and/or sell copies of the Software, and to permit persons +to whom the Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR +THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the names of the copyright holders +shall not be used in advertising or otherwise to promote the sale, use +or other dealings in this Software without prior written authorization +from said copyright holders. diff --git a/Makefile.am b/Makefile.am index 0ee0095..a7443ff 100644 --- a/Makefile.am +++ b/Makefile.am @@ -11,3 +11,8 @@ ChangeLog: dist-hook: ChangeLog +if LINT +# Check source code with tools like lint & sparse +lint: + (cd src && $(MAKE) $(MFLAGS) lint) +endif LINT diff --git a/configure.ac b/configure.ac index bb595e6..6cd40f0 100644 --- a/configure.ac +++ b/configure.ac @@ -14,6 +14,10 @@ AM_MAINTAINER_MODE AM_CONFIG_HEADER([config.h]) +# Require xorg-macros version 1.1.0 or newer for XORG_WITH_LINT macro +m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.1) + # Determine .so library version per platform # based on SharedXextRev in monolith xc/config/cf/*Lib.tmpl AC_CANONICAL_HOST @@ -45,6 +49,11 @@ XORG_RELEASE_VERSION XORG_PROG_RAWCPP XORG_MANPAGE_SECTIONS +dnl Allow checking code with lint, sparse, etc. +XORG_WITH_LINT +XORG_LINT_LIBRARY([Xext]) +LINT_FLAGS="${LINT_FLAGS} ${XEXT_CFLAGS}" + AC_OUTPUT([Makefile man/Makefile src/Makefile diff --git a/man/XShape.man b/man/XShape.man index 408e24a..0f16ce9 100644 --- a/man/XShape.man +++ b/man/XShape.man @@ -131,16 +131,16 @@ XRectangle *XShapeGetRectangles ( .LP .ta 3i 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 request */ - Display *display; /\(** Display the event was read from */ - Window window; /\(** window of event */ - int kind; /\(** ShapeBounding or ShapeClip */ - int x, y; /\(** extents of new region */ + int type; /\&* of event */ + unsigned long serial; /\&* # of last request processed by server */ + Bool send_event; /\&* true if this came from a SendEvent request */ + Display *display; /\&* Display the event was read from */ + Window window; /\&* window of event */ + int kind; /\&* ShapeBounding or ShapeClip */ + int x, y; /\&* extents of new region */ unsigned width, height; - Time time; /\(** server timestamp when region changed */ - Bool shaped; /\(** true if the region exists */ + Time time; /\&* server timestamp when region changed */ + Bool shaped; /\&* true if the region exists */ } XShapeEvent; .fi .SH DESCRIPTION diff --git a/man/XShm.man b/man/XShm.man index 2961e44..2e37997 100644 --- a/man/XShm.man +++ b/man/XShm.man @@ -128,24 +128,24 @@ Status XShmGetEventBase( .ta 3i \fIEvents:\fP 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 request*/ - Display *display; /\\(* Display the event was read from */ - Drawable drawable; /\\(* drawable of request */ - int major_code; /\\(* ShmReqCode */ - int minor_code; /\\(* X_ShmPutImage */ - ShmSeg shmseg; /\\(* the ShmSeg used in the request*/ - unsigned long offset; /\\(* the offset into ShmSeg used in the request*/ + int type; /\&* of event */ + unsigned long serial; /\&* # of last request processed by server*/ + Bool send_event; /\&* true if this came from a SendEvent request*/ + Display *display; /\&* Display the event was read from */ + Drawable drawable; /\&* drawable of request */ + int major_code; /\&* ShmReqCode */ + int minor_code; /\&* X_ShmPutImage */ + ShmSeg shmseg; /\&* the ShmSeg used in the request*/ + unsigned long offset; /\&* the offset into ShmSeg used in the request*/ } XShmCompletionEvent; .LP \fIa structure of type XShmSegmentInfo :\fP typedef struct { - ShmSeg shmseg; /\\(* resource id */ - int shmid; /\\(* kernel id */ - char *shmaddr; /\\(* address in client */ - Bool readOnly; /\\(* how the server should attach it */ + ShmSeg shmseg; /\&* resource id */ + int shmid; /\&* kernel id */ + char *shmaddr; /\&* address in client */ + Bool readOnly; /\&* how the server should attach it */ } XShmSegmentInfo; .SH DESCRIPTION diff --git a/man/Xmbuf.man b/man/Xmbuf.man index ec72027..adca2a1 100644 --- a/man/Xmbuf.man +++ b/man/Xmbuf.man @@ -118,7 +118,7 @@ Window XmbufCreateStereoWindow( unsigned int height, unsigned int border_width, int depth, - unsigned int class, /\(** InputOutput, InputOnly*/ + unsigned int class, /\&* InputOutput, InputOnly*/ Visual *visual, unsigned long valuemask, XSetWindowAttributes *attributes, @@ -130,55 +130,55 @@ Window XmbufCreateStereoWindow( .ta 3i \fIEvents:\fP typedef struct { - int type; /\(** of event */ - unsigned long serial; /\(** # of last request processed by server */ - int send_event; /\(** true if this came from a SendEvent request */ - Display *display; /\(** Display the event was read from */ - Multibuffer buffer; /\(** buffer of event */ - int state; /\(** see Clobbered constants above */ + int type; /\&* of event */ + unsigned long serial; /\&* # of last request processed by server */ + int send_event; /\&* true if this came from a SendEvent request */ + Display *display; /\&* Display the event was read from */ + Multibuffer buffer; /\&* buffer of event */ + int state; /\&* see Clobbered constants above */ } XmbufClobberNotifyEvent; .LP typedef struct { - int type; /\(** of event */ - unsigned long serial; /\(** # of last request processed by server */ - int send_event; /\(** true if this came from a SendEvent request */ - Display *display; /\(** Display the event was read from */ - Multibuffer buffer; /\(** buffer of event */ + int type; /\&* of event */ + unsigned long serial; /\&* # of last request processed by server */ + int send_event; /\&* true if this came from a SendEvent request */ + Display *display; /\&* Display the event was read from */ + Multibuffer buffer; /\&* buffer of event */ } XmbufUpdateNotifyEvent; .LP \fIPer-window attributes that can be got:\fP typedef struct { - int displayed_index; /\(** which buffer is being displayed */ - int update_action; /\(** Undefined, Background, Untouched, Copied */ - int update_hint; /\(** Frequent, Intermittent, Static */ - int window_mode; /\(** Mono, Stereo */ - int nbuffers; /\(** Number of buffers */ - Multibuffer *buffers; /\(** Buffers */ + int displayed_index; /\&* which buffer is being displayed */ + int update_action; /\&* Undefined, Background, Untouched, Copied */ + int update_hint; /\&* Frequent, Intermittent, Static */ + int window_mode; /\&* Mono, Stereo */ + int nbuffers; /\&* Number of buffers */ + Multibuffer *buffers; /\&* Buffers */ } XmbufWindowAttributes; .LP \fIPer-window attributes that can be set:\fP typedef struct { - int update_hint; /\(** Frequent, Intermittent, Static */ + int update_hint; /\&* Frequent, Intermittent, Static */ } XmbufSetWindowAttributes; .LP \fIPer-buffer attributes that can be got:\fP typedef struct { - Window window; /\(** which window this belongs to */ - unsigned long event_mask; /\(** events that have been selected */ - int buffer_index; /\(** which buffer is this */ - int side; /\(** Mono, Left, Right */ + Window window; /\&* which window this belongs to */ + unsigned long event_mask; /\&* events that have been selected */ + int buffer_index; /\&* which buffer is this */ + int side; /\&* Mono, Left, Right */ } XmbufBufferAttributes; .LP \fIPer-buffer attributes that can be set:\fP typedef struct { - unsigned long event_mask; /\(** events that have been selected */ + unsigned long event_mask; /\&* events that have been selected */ } XmbufSetBufferAttributes; .LP \fIPer-screen buffer info (there will be lists of them):\fP typedef struct { - VisualID visualid; /\(** visual usable at this depth */ - int max_buffers; /\(** most buffers for this visual */ - int depth; /\(** depth of buffers to be created */ + VisualID visualid; /\&* visual usable at this depth */ + int max_buffers; /\&* most buffers for this visual */ + int depth; /\&* depth of buffers to be created */ } XmbufBufferInfo; .fi .SH DESCRIPTION diff --git a/src/Makefile.am b/src/Makefile.am index 1a622ab..f9ef744 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -24,3 +24,19 @@ libXext_la_SOURCES = \ extutil.c \ globals.c +if LINT +ALL_LINT_FLAGS=$(LINT_FLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) + +lint: + $(LINT) $(ALL_LINT_FLAGS) $(libXext_la_SOURCES) $(XEXT_LIBS) +endif LINT + +if MAKE_LINT_LIB +lintlibdir = $(libdir) + +lintlib_DATA = $(LINTLIB) + +$(LINTLIB): $(libXext_la_SOURCES) + $(LINT) -y -oXext -x $(ALL_LINT_FLAGS) $(libXext_la_SOURCES) +endif MAKE_LINT_LIB diff --git a/src/XAppgroup.c b/src/XAppgroup.c index 2ca3e4d..48fcc01 100644 --- a/src/XAppgroup.c +++ b/src/XAppgroup.c @@ -26,10 +26,10 @@ in this Software without prior written authorization from The Open Group. */ /* $Xorg: XAppgroup.c,v 1.5 2001/02/09 02:03:49 xorgcvs Exp $ */ -#ifdef WIN32 #ifdef HAVE_CONFIG_H #include <config.h> #endif +#ifdef WIN32 #include <X11/Xwindows.h> #endif @@ -117,10 +117,13 @@ Status XeviGetVisualInfo( register int n_data, visualIndex, vinfoIndex; Bool isValid; XeviCheckExtension (dpy, info, 0); + if (!n_info_return || !evi_return) { + return BadValue; + } *n_info_return = 0; *evi_return = NULL; vinfo = XGetVisualInfo(dpy, 0, NULL, &sz_info); - if (!vinfo || !evi_return) { + if (!vinfo) { return BadValue; } if (!n_visual || !visual) { /* copy the all visual */ diff --git a/src/XMultibuf.c b/src/XMultibuf.c index 3e0049e..106f2c4 100644 --- a/src/XMultibuf.c +++ b/src/XMultibuf.c @@ -354,7 +354,7 @@ void XmbufDestroyBuffers (Display *dpy, Window window) * XmbufDisplayBuffers - * Displays the indicated buffers their appropriate windows within * max_delay milliseconds after min_delay milliseconds have passed. - * No two buffers may be associated with the same window or else a Matc + * No two buffers may be associated with the same window or else a Match * error is generated. */ void XmbufDisplayBuffers ( diff --git a/src/XShape.c b/src/XShape.c index 29a7f83..6bae29a 100644 --- a/src/XShape.c +++ b/src/XShape.c @@ -461,7 +461,7 @@ XRectangle *XShapeGetRectangles ( } *count = rep.nrects; *ordering = rep.ordering; - rects = 0; + rects = NULL; if (*count) { xrects = (xRectangle *) Xmalloc (*count * sizeof (xRectangle)); rects = (XRectangle *) Xmalloc (*count * sizeof (XRectangle)); @@ -471,7 +471,7 @@ XRectangle *XShapeGetRectangles ( if (rects) Xfree (rects); _XEatData (dpy, *count * sizeof (xRectangle)); - rects = 0; + rects = NULL; *count = 0; } else { _XRead (dpy, (char *) xrects, *count * sizeof (xRectangle)); diff --git a/src/XTestExt1.c b/src/XTestExt1.c index ee4a0bd..e7dce92 100644 --- a/src/XTestExt1.c +++ b/src/XTestExt1.c @@ -76,14 +76,14 @@ University of California. * Holds the request type code for this extension. The request type code * for this extension may vary depending on how many extensions are installed * already, so the initial value given below will be added to the base request - * code that is aquired when this extension is installed. + * code that is acquired when this extension is installed. */ static int XTestReqCode = 0; /* * Holds the two event type codes for this extension. The event type codes * for this extension may vary depending on how many extensions are installed * already, so the initial values given below will be added to the base event - * code that is aquired when this extension is installed. + * code that is acquired when this extension is installed. * * These two variables must be available to programs that use this extension. */ @@ -1200,7 +1200,7 @@ int ack_flag) /* * points to XTestIdentifyMyEvent */ - Bool (*func_ptr)(); + Bool (*func_ptr)(Display *, XEvent *, XPointer); /* * write the input actions to the server @@ -1262,7 +1262,7 @@ static Bool XTestIdentifyMyEvent( Display *display, /* - * Holds the event that this routiine is supposed to look at. + * Holds the event that this routine is supposed to look at. */ XEvent *event_ptr, /* @@ -26,10 +26,10 @@ in this Software without prior written authorization from The Open Group. */ /* $Xorg: Xcup.c,v 1.5 2001/02/09 02:03:49 xorgcvs Exp $ */ -#ifdef WIN32 #ifdef HAVE_CONFIG_H #include <config.h> #endif +#ifdef WIN32 #include <X11/Xwindows.h> #endif diff --git a/src/extutil.c b/src/extutil.c index 27a31a9..0f17aae 100644 --- a/src/extutil.c +++ b/src/extutil.c @@ -257,11 +257,11 @@ static int _default_exterror (Display *dpy, char *ext_name, char *reason) * requested extension is referenced. This should eventually move into Xlib. */ -extern int (*_XExtensionErrorFunction)(); +extern int (*_XExtensionErrorFunction)(Display*, char *, char * ); -int (*XSetExtensionErrorHandler(int (*handler)(Display*, char *, char * )))() +int (*XSetExtensionErrorHandler(int (*handler)(Display*, char *, char * )))(Display*, char *, char * ) { - int (*oldhandler)() = _XExtensionErrorFunction; + int (*oldhandler)(Display*, char *, char * ) = _XExtensionErrorFunction; _XExtensionErrorFunction = (handler ? handler : _default_exterror); @@ -274,7 +274,7 @@ int (*XSetExtensionErrorHandler(int (*handler)(Display*, char *, char * )))() */ int XMissingExtension (Display *dpy, _Xconst char *ext_name) { - int (*func)() = (_XExtensionErrorFunction ? + int (*func)(Display*, char *, char *) = (_XExtensionErrorFunction ? _XExtensionErrorFunction : _default_exterror); if (!ext_name) ext_name = X_EXTENSION_UNKNOWN; diff --git a/src/globals.c b/src/globals.c index 0cd5d26..120909a 100644 --- a/src/globals.c +++ b/src/globals.c @@ -75,7 +75,7 @@ from The Open Group. /* * Error handlers; used to be in XlibInt.c */ -typedef int (*funcptr)(); +typedef int (*funcptr)(Display*, char *, char *); ZEROINIT (funcptr, _XExtensionErrorFunction, NULL); /* |