summaryrefslogtreecommitdiff
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
commit8ce660406b1f5a90cd3e743f77313f6e24808126 (patch)
treeb6888473ddfebe03b899972613670c5ce797c4d2
parent99a0cba679efb900ec8e379c35cacaea6064d913 (diff)
downloadxorg-lib-libXext-8ce660406b1f5a90cd3e743f77313f6e24808126.tar.gz
merge latest (4.3.99.16) from XFree86 (vendor) branch
-rw-r--r--man/DBE.man4
-rw-r--r--man/XdbeSwapBuffers.man4
-rw-r--r--src/XAppgroup.c17
-rw-r--r--src/XShm.c8
-rw-r--r--src/XSync.c40
-rw-r--r--src/Xcup.c18
-rw-r--r--src/Xdbe.c72
-rw-r--r--src/extutil.c18
8 files changed, 32 insertions, 149 deletions
diff --git a/man/DBE.man b/man/DBE.man
index b13427c..62b6992 100644
--- a/man/DBE.man
+++ b/man/DBE.man
@@ -25,7 +25,7 @@
.\" dealing in this Software without prior written authorization from the
.\" Hewlett-Packard Company.
.\"
-.\" $XFree86: xc/doc/man/Xext/dbe/DBE.man,v 3.4 2001/01/27 18:20:19 dawes Exp $
+.\" $XFree86: xc/doc/man/Xext/dbe/DBE.man,v 3.5 2003/05/29 21:48:04 herrb Exp $
.\"
.TH DBE 3X11 __xorgversion__ "X FUNCTIONS"
.SH NAME
@@ -131,7 +131,7 @@ is cleared.
.RE
The effect of passing a window to a function that accepts a drawable
-is unchanged by this extension. The window and front buffer are synonomous
+is unchanged by this extension. The window and front buffer are synonymous
with each other. This includes obeying the
.B XGetImage()
and
diff --git a/man/XdbeSwapBuffers.man b/man/XdbeSwapBuffers.man
index 0795cd8..4313e4c 100644
--- a/man/XdbeSwapBuffers.man
+++ b/man/XdbeSwapBuffers.man
@@ -25,7 +25,7 @@
.\" dealing in this Software without prior written authorization from the
.\" Hewlett-Packard Company.
.\"
-.\" $XFree86: xc/doc/man/Xext/dbe/XdbeSwap.man,v 3.5 2001/02/07 22:35:22 tsi Exp $
+.\" $XFree86: xc/doc/man/Xext/dbe/XdbeSwap.man,v 3.6 2003/05/29 21:48:04 herrb Exp $
.\"
.TH XdbeSwapBuffers 3X11 __xorgversion__ "X FUNCTIONS"
.SH NAME
@@ -82,7 +82,7 @@ The unobscured region of the new back buffer will be the contents of the old
back buffer
.SH ERRORS
.IP BadMatch
-A non-double-buffered window was specififed or a window was specified twice.
+A non-double-buffered window was specified or a window was specified twice.
.IP BadWindow
An invalid window was specified.
.IP BadValue
diff --git a/src/XAppgroup.c b/src/XAppgroup.c
index fc61f03..6c98e04 100644
--- a/src/XAppgroup.c
+++ b/src/XAppgroup.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/lib/Xext/XAppgroup.c,v 1.11 2002/10/16 02:19:22 dawes Exp $ */
+/* $XFree86: xc/lib/Xext/XAppgroup.c,v 1.12 2003/11/17 22:20:21 dawes Exp $ */
/*
Copyright 1996, 1998 The Open Group
@@ -164,7 +164,6 @@ StuffToWire (Display *dpy, struct xagstuff *stuff, xXagCreateReq *req)
}
Bool
-#if NeedFunctionPrototypes
XagCreateEmbeddedApplicationGroup(
Display* dpy,
VisualID root_visual,
@@ -172,14 +171,6 @@ XagCreateEmbeddedApplicationGroup(
unsigned long black_pixel,
unsigned long white_pixel,
XAppGroup* app_group_return)
-#else
-XagCreateEmbeddedApplicationGroup(dpy, root_visual, default_colormap, black_pixel, white_pixel, app_group_return)
- Display* dpy;
- VisualID root_visual;
- Colormap default_colormap;
- unsigned long black_pixel, white_pixel;
- XAppGroup* app_group_return;
-#endif
{
XExtDisplayInfo *info = find_display (dpy);
xXagCreateReq *req;
@@ -214,15 +205,9 @@ XagCreateEmbeddedApplicationGroup(dpy, root_visual, default_colormap, black_pixe
}
Bool
-#if NeedFunctionPrototypes
XagCreateNonembeddedApplicationGroup(
Display* dpy,
XAppGroup* app_group_return)
-#else
-XagCreateNonembeddedApplicationGroup(dpy, app_group_return)
- Display* dpy;
- XAppGroup* app_group_return;
-#endif
{
XExtDisplayInfo *info = find_display (dpy);
xXagCreateReq *req;
diff --git a/src/XShm.c b/src/XShm.c
index b91c0ba..4e17e58 100644
--- a/src/XShm.c
+++ b/src/XShm.c
@@ -25,7 +25,7 @@ in this Software without prior written authorization from The Open Group.
*
* Author: Bob Scheifler and Keith Packard, MIT X Consortium
*/
-/* $XFree86: xc/lib/Xext/XShm.c,v 1.6 2002/10/16 02:19:22 dawes Exp $ */
+/* $XFree86: xc/lib/Xext/XShm.c,v 1.7 2003/04/15 22:33:55 paulo Exp $ */
/* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */
@@ -37,6 +37,7 @@ in this Software without prior written authorization from The Open Group.
#include <X11/extensions/shmstr.h>
#include <X11/extensions/Xext.h>
#include <X11/extensions/extutil.h>
+#include "ImUtil.h"
static XExtensionInfo _shm_info_data;
static XExtensionInfo *shm_info = &_shm_info_data;
@@ -51,11 +52,6 @@ static /* const */ char *shm_extension_name = SHMNAME;
* *
*****************************************************************************/
-/* in X11/ImUtil.c */
-extern int _XGetScanlinePad();
-extern int _XGetBitsPerPixel();
-extern void _XInitImageFuncPtrs();
-
static int close_display(Display *dpy, XExtCodes *codes);
static char *error_string(Display *dpy, int code, XExtCodes *codes,
char *buf, int n);
diff --git a/src/XSync.c b/src/XSync.c
index 308089f..be1efbd 100644
--- a/src/XSync.c
+++ b/src/XSync.c
@@ -50,7 +50,7 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
******************************************************************/
-/* $XFree86: xc/lib/Xext/XSync.c,v 1.7 2002/10/16 02:19:22 dawes Exp $ */
+/* $XFree86: xc/lib/Xext/XSync.c,v 1.8 2003/10/23 21:36:09 tsi Exp $ */
#include <stdio.h>
#define NEED_EVENTS
@@ -94,21 +94,21 @@ static char *sync_error_list[] = {
"BadAlarm",
};
-static
+static
XEXT_GENERATE_FIND_DISPLAY(find_display, sync_info,
sync_extension_name,
&sync_extension_hooks,
XSyncNumberEvents, (XPointer) NULL)
-static
+static
XEXT_GENERATE_CLOSE_DISPLAY(close_display, sync_info)
-static
+static
XEXT_GENERATE_ERROR_STRING(error_string, sync_extension_name,
XSyncNumberErrors, sync_error_list)
-static Bool
+static Bool
wire_to_event(Display *dpy, XEvent *event, xEvent *wire)
{
XExtDisplayInfo *info = find_display(dpy);
@@ -155,7 +155,7 @@ wire_to_event(Display *dpy, XEvent *event, xEvent *wire)
XSyncIntsToValue(&anl->alarm_value,
ane->alarm_value_lo,
ane->alarm_value_hi);
- anl->state = ane->state;
+ anl->state = (XSyncAlarmState)ane->state;
anl->time = ane->time;
return True;
}
@@ -163,7 +163,7 @@ wire_to_event(Display *dpy, XEvent *event, xEvent *wire)
return False;
}
-static Status
+static Status
event_to_wire(Display *dpy, XEvent *event, xEvent *wire)
{
XExtDisplayInfo *info = find_display(dpy);
@@ -317,11 +317,11 @@ XSyncListSystemCounters(dpy, n_counters_return)
* here.
*/
pNextWireSysCounter = (xSyncSystemCounter *)
- (((char *)pWireSysCounter) + ((SIZEOF(xSyncSystemCounter) +
+ (((char *)pWireSysCounter) + ((SIZEOF(xSyncSystemCounter) +
pWireSysCounter->name_length + 3) & ~3));
counter = pNextWireSysCounter->counter;
- list[i].name = ((char *)pWireSysCounter) +
+ list[i].name = ((char *)pWireSysCounter) +
SIZEOF(xSyncSystemCounter);
/* null-terminate the string */
*(list[i].name + pWireSysCounter->name_length) = '\0';
@@ -347,7 +347,7 @@ XSyncFreeSystemCounterList(list)
}
-XSyncCounter
+XSyncCounter
XSyncCreateCounter(dpy, initial_value)
Display *dpy;
XSyncValue initial_value;
@@ -371,7 +371,7 @@ XSyncCreateCounter(dpy, initial_value)
return req->cid;
}
-Status
+Status
XSyncSetCounter(dpy, counter, value)
Display *dpy;
XSyncCounter counter;
@@ -394,7 +394,7 @@ XSyncSetCounter(dpy, counter, value)
return True;
}
-Status
+Status
XSyncChangeCounter(dpy, counter, value)
Display *dpy;
XSyncCounter counter;
@@ -417,7 +417,7 @@ XSyncChangeCounter(dpy, counter, value)
return True;
}
-Status
+Status
XSyncDestroyCounter(dpy, counter)
Display *dpy;
XSyncCounter counter;
@@ -438,7 +438,7 @@ XSyncDestroyCounter(dpy, counter)
return True;
}
-Status
+Status
XSyncQueryCounter(dpy, counter, value_return)
Display *dpy;
XSyncCounter counter;
@@ -549,7 +549,7 @@ _XProcessAlarmAttributes(Display *dpy, xSyncChangeAlarmReq *req,
Data32(dpy, (long *) values, (long) nvalues);
}
-XSyncAlarm
+XSyncAlarm
XSyncCreateAlarm(dpy, values_mask, values)
Display *dpy;
unsigned long values_mask;
@@ -567,7 +567,7 @@ XSyncCreateAlarm(dpy, values_mask, values)
req->syncReqType = X_SyncCreateAlarm;
req->id = aid = XAllocID(dpy);
values_mask &= XSyncCACounter | XSyncCAValueType | XSyncCAValue
- | XSyncCATestType | XSyncCADelta | XSyncCAEvents;
+ | XSyncCATestType | XSyncCADelta | XSyncCAEvents;
if ((req->valueMask = values_mask))
_XProcessAlarmAttributes(dpy, (xSyncChangeAlarmReq *) req,
values_mask, values);
@@ -623,14 +623,14 @@ XSyncQueryAlarm(dpy, alarm, values_return)
}
values_return->trigger.counter = rep.counter;
- values_return->trigger.value_type = rep.value_type;
+ values_return->trigger.value_type = (XSyncValueType)rep.value_type;
XSyncIntsToValue(&values_return->trigger.wait_value,
rep.wait_value_lo, rep.wait_value_hi);
- values_return->trigger.test_type = rep.test_type;
+ values_return->trigger.test_type = (XSyncTestType)rep.test_type;
XSyncIntsToValue(&values_return->delta, rep.delta_lo,
rep.delta_hi);
values_return->events = rep.events;
- values_return->state = rep.state;
+ values_return->state = (XSyncAlarmState)rep.state;
UnlockDisplay(dpy);
SyncHandle();
return True;
@@ -684,7 +684,7 @@ XSyncSetPriority(dpy, client_resource_id, priority)
return True;
}
-Status
+Status
XSyncGetPriority(dpy, client_resource_id, return_priority)
Display *dpy;
XID client_resource_id;
diff --git a/src/Xcup.c b/src/Xcup.c
index 1d6d9b6..5abc7b0 100644
--- a/src/Xcup.c
+++ b/src/Xcup.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/lib/Xext/Xcup.c,v 1.8 2002/10/16 02:19:22 dawes Exp $ */
+/* $XFree86: xc/lib/Xext/Xcup.c,v 1.9 2003/11/17 22:20:21 dawes Exp $ */
/*
Copyright 1987, 1988, 1998 The Open Group
@@ -118,19 +118,11 @@ XcupQueryVersion(dpy, major_version_return, minor_version_return)
#endif
Status
-#if NeedFunctionPrototypes
XcupGetReservedColormapEntries(
Display* dpy,
int screen,
XColor** colors_out,
int* ncolors)
-#else
-XcupGetReservedColormapEntries(dpy, screen, colors_out, ncolors)
- Display* dpy;
- int screen;
- XColor** colors_out;
- int* ncolors;
-#endif
{
XExtDisplayInfo *info = find_display (dpy);
xXcupGetReservedColormapEntriesReply rep;
@@ -192,19 +184,11 @@ XcupGetReservedColormapEntries(dpy, screen, colors_out, ncolors)
}
Status
-#if NeedFunctionPrototypes
XcupStoreColors(
Display* dpy,
Colormap colormap,
XColor* colors_in_out,
int ncolors)
-#else
-XcupStoreColors(dpy, colormap, colors_in_out, ncolors)
- Display* dpy;
- Colormap colormap;
- XColor* colors_in_out;
- int ncolors;
-#endif
{
XExtDisplayInfo *info = find_display (dpy);
xXcupStoreColorsReply rep;
diff --git a/src/Xdbe.c b/src/Xdbe.c
index 28d6660..77f1c96 100644
--- a/src/Xdbe.c
+++ b/src/Xdbe.c
@@ -30,7 +30,7 @@
* Xlib DBE code
*
*****************************************************************************/
-/* $XFree86: xc/lib/Xext/Xdbe.c,v 3.7 2002/10/16 02:19:22 dawes Exp $ */
+/* $XFree86: xc/lib/Xext/Xdbe.c,v 3.8 2003/11/17 22:20:21 dawes Exp $ */
#define NEED_EVENTS
#define NEED_REPLIES
@@ -121,17 +121,10 @@ static XEXT_GENERATE_ERROR_STRING (error_string, dbe_extension_name,
* may be called before this function. If a client violates this rule,
* the effects of all subsequent Xdbe calls are undefined.
*/
-#if NeedFunctionPrototypes
Status XdbeQueryExtension (
Display *dpy,
int *major_version_return,
int *minor_version_return)
-#else
-Status XdbeQueryExtension (dpy, major_version_return, minor_version_return)
- Display *dpy;
- int *major_version_return;
- int *minor_version_return;
-#endif
{
XExtDisplayInfo *info = find_display (dpy);
xDbeGetVersionReply rep;
@@ -174,32 +167,10 @@ Status XdbeQueryExtension (dpy, major_version_return, minor_version_return)
* accurate information whenever possible.
*/
-/*## If NeedFunctionPrototypes is defined, the swap_action parameter causes
- *## compiler failure without the #ifdef workaround below. With
- *## NeedFunctionPrototype enabled, this function is prototyped as
- *##
- *## XdbeBackBuffer XdbeAllocateBackBufferName (dpy, window, swap_action)
- *## Display *dpy;
- *## Window window;
- *## XdbeSwapAction swap_action;
- *##
- *## Without the workaround, an error occurs because swap_action is promoted to
- *## an int by the compiler when compiling this file. However, this type does
- *## not match what is in the function prototype in Xdbe.h. In Xdbe.h, the
- *## swap_action parameter is defined as an unsigned char, not an int.
- *##*/
-
-#if NeedFunctionPrototypes
XdbeBackBuffer XdbeAllocateBackBufferName(
Display *dpy,
Window window,
XdbeSwapAction swap_action)
-#else
-XdbeBackBuffer XdbeAllocateBackBufferName (dpy, window, swap_action)
- Display *dpy;
- Window window;
- XdbeSwapAction swap_action;
-#endif
{
XExtDisplayInfo *info = find_display (dpy);
register xDbeAllocateBackBufferNameReq *req;
@@ -231,15 +202,9 @@ XdbeBackBuffer XdbeAllocateBackBufferName (dpy, window, swap_action)
* XdbeAllocateBackBufferName. The buffer must refer to the back buffer
* of the specified window, or a protocol error results.
*/
-#if NeedFunctionPrototypes
Status XdbeDeallocateBackBufferName (
Display *dpy,
XdbeBackBuffer buffer)
-#else
-Status XdbeDeallocateBackBufferName (dpy, buffer)
- Display *dpy;
- XdbeBackBuffer buffer;
-#endif
{
XExtDisplayInfo *info = find_display (dpy);
register xDbeDeallocateBackBufferNameReq *req;
@@ -264,17 +229,10 @@ Status XdbeDeallocateBackBufferName (dpy, buffer)
* The argument swap_info specifies the information needed per window
* to do the swap.
*/
-#if NeedFunctionPrototypes
Status XdbeSwapBuffers (
Display *dpy,
XdbeSwapInfo *swap_info,
int num_windows)
-#else
-Status XdbeSwapBuffers (dpy, swap_info, num_windows)
- Display *dpy;
- XdbeSwapInfo *swap_info;
- int num_windows;
-#endif
{
XExtDisplayInfo *info = find_display (dpy);
register xDbeSwapBuffersReq *req;
@@ -312,13 +270,8 @@ Status XdbeSwapBuffers (dpy, swap_info, num_windows)
* XdbeBeginIdiom -
* This function marks the beginning of an idiom sequence.
*/
-#if NeedFunctionPrototypes
Status XdbeBeginIdiom (
Display *dpy)
-#else
-Status XdbeBeginIdiom (dpy)
- Display *dpy;
-#endif
{
XExtDisplayInfo *info = find_display(dpy);
register xDbeBeginIdiomReq *req;
@@ -338,13 +291,8 @@ Status XdbeBeginIdiom (dpy)
* XdbeEndIdiom -
* This function marks the end of an idiom sequence.
*/
-#if NeedFunctionPrototypes
Status XdbeEndIdiom (
Display *dpy)
-#else
-Status XdbeEndIdiom (dpy)
- Display *dpy;
-#endif
{
XExtDisplayInfo *info = find_display(dpy);
register xDbeEndIdiomReq *req;
@@ -377,17 +325,10 @@ Status XdbeEndIdiom (dpy)
* returned list corresponds to the nth screen of the server, starting
* with screen zero.
*/
-#if NeedFunctionPrototypes
XdbeScreenVisualInfo *XdbeGetVisualInfo (
Display *dpy,
Drawable *screen_specifiers,
int *num_screens) /* SEND and RETURN */
-#else
-XdbeScreenVisualInfo *XdbeGetVisualInfo (dpy, screen_specifiers, num_screens)
- Display *dpy;
- Drawable *screen_specifiers;
- int *num_screens; /* SEND and RETURN */
-#endif
{
XExtDisplayInfo *info = find_display(dpy);
register xDbeGetVisualInfoReq *req;
@@ -478,13 +419,8 @@ XdbeScreenVisualInfo *XdbeGetVisualInfo (dpy, screen_specifiers, num_screens)
* This function frees the list of XdbeScreenVisualInfo returned by the
* function XdbeGetVisualInfo.
*/
-#if NeedFunctionPrototypes
void XdbeFreeVisualInfo(
XdbeScreenVisualInfo *visual_info)
-#else
-void XdbeFreeVisualInfo(visual_info)
- XdbeScreenVisualInfo *visual_info;
-#endif
{
if (visual_info == NULL) {
return;
@@ -503,15 +439,9 @@ void XdbeFreeVisualInfo(visual_info)
* This function returns the attributes associated with the specified
* buffer.
*/
-#if NeedFunctionPrototypes
XdbeBackBufferAttributes *XdbeGetBackBufferAttributes(
Display *dpy,
XdbeBackBuffer buffer)
-#else
-XdbeBackBufferAttributes *XdbeGetBackBufferAttributes(dpy, buffer)
- Display *dpy;
- XdbeBackBuffer buffer;
-#endif
{
XExtDisplayInfo *info = find_display(dpy);
register xDbeGetBackBufferAttributesReq *req;
diff --git a/src/extutil.c b/src/extutil.c
index 8057cce..bf89453 100644
--- a/src/extutil.c
+++ b/src/extutil.c
@@ -45,7 +45,7 @@ in this Software without prior written authorization from The Open Group.
* XSetExtensionErrorHandler establish an extension error handler
* XMissingExtension raise an error about missing ext
*/
-/* $XFree86: xc/lib/Xext/extutil.c,v 1.5 2002/10/16 00:37:27 dawes Exp $ */
+/* $XFree86: xc/lib/Xext/extutil.c,v 1.6 2003/11/17 22:20:21 dawes Exp $ */
#include <stdio.h>
#include <X11/Xlibint.h>
@@ -255,20 +255,13 @@ static int _default_exterror (
extern int (*_XExtensionErrorFunction)();
-#if NeedFunctionPrototypes
int (*XSetExtensionErrorHandler(
int (*handler)(
-#if NeedNestedPrototypes
Display*,
char *,
char *
-#endif
)
))()
-#else
-int (*XSetExtensionErrorHandler(handler))()
- int (*handler)();
-#endif
{
int (*oldhandler)() = _XExtensionErrorFunction;
@@ -281,15 +274,10 @@ int (*XSetExtensionErrorHandler(handler))()
/*
* XMissingExtension - call the extension error handler
*/
-#if NeedFunctionPrototypes
-int XMissingExtension (
+int
+XMissingExtension (
Display *dpy,
_Xconst char *ext_name)
-#else
-int XMissingExtension (dpy, ext_name)
- Display *dpy;
- char *ext_name;
-#endif
{
int (*func)() = (_XExtensionErrorFunction ?
_XExtensionErrorFunction : _default_exterror);