Commit 687d44b6 authored by Ulrich Sibiller's avatar Ulrich Sibiller

update src files *[ch] to libX11 1.3.4

parent ea24f0b0
...@@ -24,19 +24,21 @@ in this Software without prior written authorization from The Open Group. ...@@ -24,19 +24,21 @@ in this Software without prior written authorization from The Open Group.
*/ */
#define NEED_REPLIES
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include <config.h> #include <config.h>
#endif #endif
#include "Xlibint.h" #include "Xlibint.h"
Status XAllocColorCells(dpy, cmap, contig, masks, nplanes, pixels, ncolors) Status XAllocColorCells(
register Display *dpy; register Display *dpy,
Colormap cmap; Colormap cmap,
Bool contig; Bool contig,
unsigned int ncolors; /* CARD16 */ unsigned long *masks, /* LISTofCARD32 */ /* RETURN */
unsigned int nplanes; /* CARD16 */ unsigned int nplanes, /* CARD16 */
unsigned long *masks; /* LISTofCARD32 */ /* RETURN */ unsigned long *pixels, /* LISTofCARD32 */ /* RETURN */
unsigned long *pixels; /* LISTofCARD32 */ /* RETURN */ unsigned int ncolors) /* CARD16 */
{ {
Status status; Status status;
......
...@@ -29,15 +29,18 @@ in this Software without prior written authorization from The Open Group. ...@@ -29,15 +29,18 @@ in this Software without prior written authorization from The Open Group.
#endif #endif
#include "Xlibint.h" #include "Xlibint.h"
Status XAllocColorPlanes(dpy, cmap, contig, pixels, ncolors, nreds, ngreens, Status XAllocColorPlanes(
nblues, rmask, gmask, bmask) register Display *dpy,
register Display *dpy; Colormap cmap,
Colormap cmap; Bool contig,
Bool contig; unsigned long *pixels, /* LISTofCARD32 */ /* RETURN */
unsigned long *pixels; /* LISTofCARD32 */ /* RETURN */ int ncolors,
int ncolors; int nreds,
int nreds, ngreens, nblues; int ngreens,
unsigned long *rmask, *gmask, *bmask; /* CARD32 */ /* RETURN */ int nblues,
unsigned long *rmask,
unsigned long *gmask,
unsigned long *bmask) /* CARD32 */ /* RETURN */
{ {
xAllocColorPlanesReply rep; xAllocColorPlanesReply rep;
Status status; Status status;
......
...@@ -30,10 +30,10 @@ in this Software without prior written authorization from The Open Group. ...@@ -30,10 +30,10 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h" #include "Xlibint.h"
int int
XAllowEvents(dpy, mode, time) XAllowEvents(
register Display *dpy; register Display *dpy,
int mode; int mode,
Time time; Time time)
{ {
register xAllowEventsReq *req; register xAllowEventsReq *req;
......
...@@ -30,8 +30,7 @@ in this Software without prior written authorization from The Open Group. ...@@ -30,8 +30,7 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h" #include "Xlibint.h"
int int
XAutoRepeatOn (dpy) XAutoRepeatOn (register Display *dpy)
register Display *dpy;
{ {
XKeyboardControl values; XKeyboardControl values;
values.auto_repeat_mode = AutoRepeatModeOn; values.auto_repeat_mode = AutoRepeatModeOn;
...@@ -40,8 +39,7 @@ register Display *dpy; ...@@ -40,8 +39,7 @@ register Display *dpy;
} }
int int
XAutoRepeatOff (dpy) XAutoRepeatOff (register Display *dpy)
register Display *dpy;
{ {
XKeyboardControl values; XKeyboardControl values;
values.auto_repeat_mode = AutoRepeatModeOff; values.auto_repeat_mode = AutoRepeatModeOff;
......
...@@ -30,10 +30,10 @@ in this Software without prior written authorization from The Open Group. ...@@ -30,10 +30,10 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h" #include "Xlibint.h"
int int
XSetWindowBackground(dpy, w, pixel) XSetWindowBackground(
register Display *dpy; register Display *dpy,
Window w; Window w,
unsigned long pixel; unsigned long pixel)
{ {
register xChangeWindowAttributesReq *req; register xChangeWindowAttributesReq *req;
......
...@@ -33,10 +33,10 @@ from The Open Group. ...@@ -33,10 +33,10 @@ from The Open Group.
#include "Xlibint.h" #include "Xlibint.h"
int int
XSetWindowBorderWidth(dpy, w, width) XSetWindowBorderWidth(
Display *dpy; Display *dpy,
Window w; Window w,
unsigned int width; unsigned int width)
{ {
unsigned long lwidth = width; /* must be CARD32 */ unsigned long lwidth = width; /* must be CARD32 */
......
...@@ -30,9 +30,9 @@ in this Software without prior written authorization from The Open Group. ...@@ -30,9 +30,9 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h" #include "Xlibint.h"
int int
XBell(dpy, percent) XBell(
register Display *dpy; register Display *dpy,
int percent; int percent)
{ {
register xBellReq *req; register xBellReq *req;
......
...@@ -30,10 +30,10 @@ in this Software without prior written authorization from The Open Group. ...@@ -30,10 +30,10 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h" #include "Xlibint.h"
int int
XSetWindowBorder(dpy, w, pixel) XSetWindowBorder(
register Display *dpy; register Display *dpy,
Window w; Window w,
unsigned long pixel; unsigned long pixel)
{ {
register xChangeWindowAttributesReq *req; register xChangeWindowAttributesReq *req;
......
...@@ -30,25 +30,21 @@ in this Software without prior written authorization from The Open Group. ...@@ -30,25 +30,21 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h" #include "Xlibint.h"
int int
XEnableAccessControl(dpy) XEnableAccessControl(register Display *dpy)
register Display *dpy;
{ {
return XSetAccessControl(dpy, EnableAccess); return XSetAccessControl(dpy, EnableAccess);
} }
int int
XDisableAccessControl(dpy) XDisableAccessControl(register Display *dpy)
register Display *dpy;
{ {
return XSetAccessControl(dpy, DisableAccess); return XSetAccessControl(dpy, DisableAccess);
} }
int int
XSetAccessControl(dpy, mode) XSetAccessControl(
register Display *dpy; register Display *dpy,
int mode; int mode)
{ {
register xSetAccessControlReq *req; register xSetAccessControlReq *req;
......
...@@ -30,11 +30,11 @@ in this Software without prior written authorization from The Open Group. ...@@ -30,11 +30,11 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h" #include "Xlibint.h"
int int
XChangeActivePointerGrab(dpy, event_mask, curs, time) XChangeActivePointerGrab(
register Display *dpy; register Display *dpy,
unsigned int event_mask; /* CARD16 */ unsigned int event_mask, /* CARD16 */
Cursor curs; Cursor curs,
Time time; Time time)
{ {
register xChangeActivePointerGrabReq *req; register xChangeActivePointerGrabReq *req;
......
...@@ -30,10 +30,9 @@ in this Software without prior written authorization from The Open Group. ...@@ -30,10 +30,9 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h" #include "Xlibint.h"
int int
XSetCloseDownMode(dpy, mode) XSetCloseDownMode(
register Display *dpy; register Display *dpy,
int mode; int mode)
{ {
register xSetCloseDownModeReq *req; register xSetCloseDownModeReq *req;
......
...@@ -30,10 +30,10 @@ in this Software without prior written authorization from The Open Group. ...@@ -30,10 +30,10 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h" #include "Xlibint.h"
int int
XSetWindowColormap(dpy, w, colormap) XSetWindowColormap(
register Display *dpy; register Display *dpy,
Window w; Window w,
Colormap colormap; Colormap colormap)
{ {
register xChangeWindowAttributesReq *req; register xChangeWindowAttributesReq *req;
......
...@@ -31,11 +31,11 @@ in this Software without prior written authorization from The Open Group. ...@@ -31,11 +31,11 @@ in this Software without prior written authorization from The Open Group.
#include "Cr.h" #include "Cr.h"
int int
XChangeGC (dpy, gc, valuemask, values) XChangeGC (
register Display *dpy; register Display *dpy,
GC gc; GC gc,
unsigned long valuemask; unsigned long valuemask,
XGCValues *values; XGCValues *values)
{ {
LockDisplay(dpy); LockDisplay(dpy);
......
...@@ -30,10 +30,10 @@ in this Software without prior written authorization from The Open Group. ...@@ -30,10 +30,10 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h" #include "Xlibint.h"
int int
XChangeKeyboardControl(dpy, mask, value_list) XChangeKeyboardControl(
register Display *dpy; register Display *dpy,
unsigned long mask; unsigned long mask,
XKeyboardControl *value_list; XKeyboardControl *value_list)
{ {
unsigned long values[8]; unsigned long values[8];
register unsigned long *value = values; register unsigned long *value = values;
......
...@@ -30,11 +30,13 @@ in this Software without prior written authorization from The Open Group. ...@@ -30,11 +30,13 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h" #include "Xlibint.h"
int int
XChangePointerControl(dpy, do_acc, do_thresh, acc_numerator, XChangePointerControl(
acc_denominator, threshold) register Display *dpy,
register Display *dpy; Bool do_acc,
Bool do_acc, do_thresh; Bool do_thresh,
int acc_numerator, acc_denominator, threshold; int acc_numerator,
int acc_denominator,
int threshold)
{ {
register xChangePointerControlReq *req; register xChangePointerControlReq *req;
......
...@@ -30,10 +30,10 @@ in this Software without prior written authorization from The Open Group. ...@@ -30,10 +30,10 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h" #include "Xlibint.h"
int int
XChangeSaveSet(dpy, win, mode) XChangeSaveSet(
register Display *dpy; register Display *dpy,
Window win; Window win,
int mode; int mode)
{ {
register xChangeSaveSetReq *req; register xChangeSaveSetReq *req;
...@@ -47,17 +47,17 @@ int mode; ...@@ -47,17 +47,17 @@ int mode;
} }
int int
XAddToSaveSet(dpy, win) XAddToSaveSet(
register Display *dpy; register Display *dpy,
Window win; Window win)
{ {
return XChangeSaveSet(dpy,win,SetModeInsert); return XChangeSaveSet(dpy,win,SetModeInsert);
} }
int int
XRemoveFromSaveSet (dpy, win) XRemoveFromSaveSet (
register Display *dpy; register Display *dpy,
Window win; Window win)
{ {
return XChangeSaveSet(dpy,win,SetModeDelete); return XChangeSaveSet(dpy,win,SetModeDelete);
} }
...@@ -36,11 +36,11 @@ in this Software without prior written authorization from The Open Group. ...@@ -36,11 +36,11 @@ in this Software without prior written authorization from The Open Group.
CWDontPropagate|CWColormap|CWCursor) CWDontPropagate|CWColormap|CWCursor)
int int
XChangeWindowAttributes (dpy, w, valuemask, attributes) XChangeWindowAttributes (
register Display *dpy; register Display *dpy,
Window w; Window w,
unsigned long valuemask; unsigned long valuemask,
XSetWindowAttributes *attributes; XSetWindowAttributes *attributes)
{ {
register xChangeWindowAttributesReq *req; register xChangeWindowAttributesReq *req;
......
...@@ -30,10 +30,11 @@ in this Software without prior written authorization from The Open Group. ...@@ -30,10 +30,11 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h" #include "Xlibint.h"
int int
XResizeWindow(dpy, w, width, height) XResizeWindow(
register Display *dpy; register Display *dpy,
Window w; Window w,
unsigned int width, height; unsigned int width,
unsigned int height)
{ {
register xConfigureWindowReq *req; register xConfigureWindowReq *req;
......
...@@ -41,22 +41,26 @@ extern long const _Xevent_to_mask[]; ...@@ -41,22 +41,26 @@ extern long const _Xevent_to_mask[];
* matches, return. If all else fails, tell the user no events found. * matches, return. If all else fails, tell the user no events found.
*/ */
Bool XCheckMaskEvent (dpy, mask, event) Bool XCheckMaskEvent (
register Display *dpy; register Display *dpy,
long mask; /* Selected event mask. */ long mask, /* Selected event mask. */
register XEvent *event; /* XEvent to be filled in. */ register XEvent *event) /* XEvent to be filled in. */
{ {
register _XQEvent *prev, *qelt; register _XQEvent *prev, *qelt;
unsigned long qe_serial = 0; unsigned long qe_serial = 0;
int n; /* time through count */ int n; /* time through count */
LockDisplay(dpy); LockDisplay(dpy);
/* Delete unclaimed cookies */
_XFreeEventCookies(dpy);
prev = NULL; prev = NULL;
for (n = 3; --n >= 0;) { for (n = 3; --n >= 0;) {
for (qelt = prev ? prev->next : dpy->head; for (qelt = prev ? prev->next : dpy->head;
qelt; qelt;
prev = qelt, qelt = qelt->next) { prev = qelt, qelt = qelt->next) {
if ((qelt->event.type < LASTEvent) && if ((qelt->event.type < GenericEvent) &&
(_Xevent_to_mask[qelt->event.type] & mask) && (_Xevent_to_mask[qelt->event.type] & mask) &&
((qelt->event.type != MotionNotify) || ((qelt->event.type != MotionNotify) ||
(mask & AllPointers) || (mask & AllPointers) ||
......
...@@ -35,16 +35,20 @@ in this Software without prior written authorization from The Open Group. ...@@ -35,16 +35,20 @@ in this Software without prior written authorization from The Open Group.
* matches, return. If all else fails, tell the user no events found. * matches, return. If all else fails, tell the user no events found.
*/ */
Bool XCheckTypedEvent (dpy, type, event) Bool XCheckTypedEvent (
register Display *dpy; register Display *dpy,
int type; /* Selected event type. */ int type, /* Selected event type. */
register XEvent *event; /* XEvent to be filled in. */ register XEvent *event) /* XEvent to be filled in. */
{ {
register _XQEvent *prev, *qelt; register _XQEvent *prev, *qelt;
unsigned long qe_serial = 0; unsigned long qe_serial = 0;
int n; /* time through count */ int n; /* time through count */
LockDisplay(dpy); LockDisplay(dpy);
/* Delete unclaimed cookies */
_XFreeEventCookies(dpy);
prev = NULL; prev = NULL;
for (n = 3; --n >= 0;) { for (n = 3; --n >= 0;) {
for (qelt = prev ? prev->next : dpy->head; for (qelt = prev ? prev->next : dpy->head;
......
...@@ -35,17 +35,21 @@ in this Software without prior written authorization from The Open Group. ...@@ -35,17 +35,21 @@ in this Software without prior written authorization from The Open Group.
* matches, return. If all else fails, tell the user no events found. * matches, return. If all else fails, tell the user no events found.
*/ */
Bool XCheckTypedWindowEvent (dpy, w, type, event) Bool XCheckTypedWindowEvent (
register Display *dpy; register Display *dpy,
Window w; /* Selected window. */ Window w, /* Selected window. */
int type; /* Selected event type. */ int type, /* Selected event type. */
register XEvent *event; /* XEvent to be filled in. */ register XEvent *event) /* XEvent to be filled in. */
{ {
register _XQEvent *prev, *qelt; register _XQEvent *prev, *qelt;
unsigned long qe_serial = 0; unsigned long qe_serial = 0;
int n; /* time through count */ int n; /* time through count */
LockDisplay(dpy); LockDisplay(dpy);
/* Delete unclaimed cookies */
_XFreeEventCookies(dpy);
prev = NULL; prev = NULL;
for (n = 3; --n >= 0;) { for (n = 3; --n >= 0;) {
for (qelt = prev ? prev->next : dpy->head; for (qelt = prev ? prev->next : dpy->head;
......
...@@ -40,24 +40,28 @@ extern long const _Xevent_to_mask[]; ...@@ -40,24 +40,28 @@ extern long const _Xevent_to_mask[];
* matches, return. If all else fails, tell the user no events found. * matches, return. If all else fails, tell the user no events found.
*/ */
Bool XCheckWindowEvent (dpy, w, mask, event) Bool XCheckWindowEvent (
register Display *dpy; register Display *dpy,
Window w; /* Selected window. */ Window w, /* Selected window. */
long mask; /* Selected event mask. */ long mask, /* Selected event mask. */
register XEvent *event; /* XEvent to be filled in. */ register XEvent *event) /* XEvent to be filled in. */
{ {
register _XQEvent *prev, *qelt; register _XQEvent *prev, *qelt;
unsigned long qe_serial = 0; unsigned long qe_serial = 0;
int n; /* time through count */ int n; /* time through count */
LockDisplay(dpy); LockDisplay(dpy);
/* Delete unclaimed cookies */
_XFreeEventCookies(dpy);
prev = NULL; prev = NULL;
for (n = 3; --n >= 0;) { for (n = 3; --n >= 0;) {
for (qelt = prev ? prev->next : dpy->head; for (qelt = prev ? prev->next : dpy->head;
qelt; qelt;
prev = qelt, qelt = qelt->next) { prev = qelt, qelt = qelt->next) {
if ((qelt->event.xany.window == w) && if ((qelt->event.xany.window == w) &&
(qelt->event.type < LASTEvent) && (qelt->event.type < GenericEvent) &&
(_Xevent_to_mask[qelt->event.type] & mask) && (_Xevent_to_mask[qelt->event.type] & mask) &&
((qelt->event.type != MotionNotify) || ((qelt->event.type != MotionNotify) ||
(mask & AllPointers) || (mask & AllPointers) ||
......
...@@ -30,10 +30,10 @@ in this Software without prior written authorization from The Open Group. ...@@ -30,10 +30,10 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h" #include "Xlibint.h"
int int
XCirculateSubwindows(dpy, w, direction) XCirculateSubwindows(
register Display *dpy; register Display *dpy,
Window w; Window w,
int direction; int direction)
{ {
register xCirculateWindowReq *req; register xCirculateWindowReq *req;
......
...@@ -30,9 +30,9 @@ in this Software without prior written authorization from The Open Group. ...@@ -30,9 +30,9 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h" #include "Xlibint.h"
int int
XCirculateSubwindowsDown(dpy,w) XCirculateSubwindowsDown(
register Display *dpy; register Display *dpy,
Window w; Window w)
{ {
register xCirculateWindowReq *req; register xCirculateWindowReq *req;
......
...@@ -30,9 +30,9 @@ in this Software without prior written authorization from The Open Group. ...@@ -30,9 +30,9 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h" #include "Xlibint.h"
int int
XCirculateSubwindowsUp(dpy, w) XCirculateSubwindowsUp(
register Display *dpy; register Display *dpy,
Window w; Window w)
{ {
register xCirculateWindowReq *req; register xCirculateWindowReq *req;
......
...@@ -30,7 +30,11 @@ from The Open Group. ...@@ -30,7 +30,11 @@ from The Open Group.
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include <config.h> #include <config.h>
#endif #endif
#if USE_XCB
#include "Xxcbint.h"
#else /* !USE_XCB */
#include <nx-X11/Xtrans/Xtrans.h> #include <nx-X11/Xtrans/Xtrans.h>
#endif /* USE_XCB */
#include "Xlib.h" #include "Xlib.h"
#include "Xlibint.h" #include "Xlibint.h"
#include "Xintconn.h" #include "Xintconn.h"
...@@ -68,7 +72,11 @@ XCloseDisplay ( ...@@ -68,7 +72,11 @@ XCloseDisplay (
if (dpy->request != dpy->last_request_read) if (dpy->request != dpy->last_request_read)
XSync(dpy, 1); XSync(dpy, 1);
} }
#if USE_XCB
xcb_disconnect(dpy->xcb->connection);
#else /* !USE_XCB */
_XDisconnectDisplay(dpy->trans_conn); _XDisconnectDisplay(dpy->trans_conn);
#endif /* USE_XCB */
_XFreeDisplayStructure (dpy); _XFreeDisplayStructure (dpy);
return 0; return 0;
} }
...@@ -30,9 +30,9 @@ in this Software without prior written authorization from The Open Group. ...@@ -30,9 +30,9 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h" #include "Xlibint.h"
int int
XClearWindow(dpy, w) XClearWindow(
register Display *dpy; register Display *dpy,
Window w; Window w)
{ {
register xClearAreaReq *req; register xClearAreaReq *req;
......
...@@ -30,12 +30,14 @@ in this Software without prior written authorization from The Open Group. ...@@ -30,12 +30,14 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h" #include "Xlibint.h"
int int
XClearArea (dpy, w, x, y, width, height, exposures) XClearArea (
register Display *dpy; register Display *dpy,
Window w; Window w,
int x, y; int x,
unsigned int width, height; int y,
Bool exposures; unsigned int width,
unsigned int height,
Bool exposures)
{ {
register xClearAreaReq *req; register xClearAreaReq *req;
......
/* $XFree86$ */
#ifndef _CMAP_H_ #ifndef _CMAP_H_
#define _CMAP_H_ #define _CMAP_H_
......
...@@ -30,11 +30,13 @@ in this Software without prior written authorization from The Open Group. ...@@ -30,11 +30,13 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h" #include "Xlibint.h"
int int
XMoveResizeWindow(dpy, w, x, y, width, height) XMoveResizeWindow(
register Display *dpy; register Display *dpy,
Window w; Window w,
int x, y; int x,
unsigned int width, height; int y,
unsigned int width,
unsigned int height)
{ {
register xConfigureWindowReq *req; register xConfigureWindowReq *req;
......
...@@ -233,11 +233,7 @@ int XSaveContext( ...@@ -233,11 +233,7 @@ int XSaveContext(
if an error has occured, 0 otherwise. Possible errors are Entry-not-found. if an error has occured, 0 otherwise. Possible errors are Entry-not-found.
*/ */
int XFindContext(display, rid, context, data) int XFindContext(Display *display, XID rid, XContext context, XPointer *data)
Display *display;
register XID rid;
register XContext context;
XPointer *data; /* RETURN */
{ {
register DB db; register DB db;
register TableEntry entry; register TableEntry entry;
...@@ -272,10 +268,7 @@ int XFindContext(display, rid, context, data) ...@@ -272,10 +268,7 @@ int XFindContext(display, rid, context, data)
with the same arguments. with the same arguments.
*/ */
int XDeleteContext(display, rid, context) int XDeleteContext(Display *display, XID rid, XContext context)
Display *display;
register XID rid;
register XContext context;
{ {
register DB db; register DB db;
register TableEntry entry, *prev; register TableEntry entry, *prev;
......
...@@ -30,12 +30,13 @@ in this Software without prior written authorization from The Open Group. ...@@ -30,12 +30,13 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h" #include "Xlibint.h"
int int
XConvertSelection(dpy, selection, target, property, requestor, time) XConvertSelection(
register Display *dpy; register Display *dpy,
Atom selection, target; Atom selection,
Atom property; Atom target,
Window requestor; Atom property,
Time time; Window requestor,
Time time)
{ {
register xConvertSelectionReq *req; register xConvertSelectionReq *req;
......
...@@ -30,15 +30,17 @@ in this Software without prior written authorization from The Open Group. ...@@ -30,15 +30,17 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h" #include "Xlibint.h"
int int
XCopyArea(dpy, src_drawable, dst_drawable, gc, XCopyArea(
src_x, src_y, width, height, register Display *dpy,
dst_x, dst_y) Drawable src_drawable,
register Display *dpy; Drawable dst_drawable,
Drawable src_drawable, dst_drawable; GC gc,
GC gc; int src_x,
int src_x, src_y; int src_y,
unsigned int width, height; unsigned int width,
int dst_x, dst_y; unsigned int height,
int dst_x,
int dst_y)
{ {
register xCopyAreaReq *req; register xCopyAreaReq *req;
......
...@@ -40,9 +40,9 @@ extern XcmsCmapRec * _XcmsCopyCmapRecAndFree(Display *dpy, ...@@ -40,9 +40,9 @@ extern XcmsCmapRec * _XcmsCopyCmapRecAndFree(Display *dpy,
Colormap copy_cmap); Colormap copy_cmap);
#endif #endif
Colormap XCopyColormapAndFree(dpy, src_cmap) Colormap XCopyColormapAndFree(
register Display *dpy; register Display *dpy,
Colormap src_cmap; Colormap src_cmap)
{ {
Colormap mid; Colormap mid;
register xCopyColormapAndFreeReq *req; register xCopyColormapAndFreeReq *req;
......
...@@ -30,10 +30,11 @@ in this Software without prior written authorization from The Open Group. ...@@ -30,10 +30,11 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h" #include "Xlibint.h"
int int
XCopyGC (dpy, srcGC, mask, destGC) XCopyGC (
register Display *dpy; register Display *dpy,
unsigned long mask; /* which ones to set initially */ GC srcGC,
GC srcGC, destGC; unsigned long mask, /* which ones to set initially */
GC destGC)
{ {
register XGCValues *destgv = &destGC->values, register XGCValues *destgv = &destGC->values,
*srcgv = &srcGC->values; *srcgv = &srcGC->values;
......
...@@ -30,16 +30,18 @@ in this Software without prior written authorization from The Open Group. ...@@ -30,16 +30,18 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h" #include "Xlibint.h"
int int
XCopyPlane(dpy, src_drawable, dst_drawable, gc, XCopyPlane(
src_x, src_y, width, height, register Display *dpy,
dst_x, dst_y, bit_plane) Drawable src_drawable,
register Display *dpy; Drawable dst_drawable,
Drawable src_drawable, dst_drawable; GC gc,
GC gc; int src_x,
int src_x, src_y; int src_y,
unsigned int width, height; unsigned int width,
int dst_x, dst_y; unsigned int height,
unsigned long bit_plane; int dst_x,
int dst_y,
unsigned long bit_plane)
{ {
register xCopyPlaneReq *req; register xCopyPlaneReq *req;
......
/* $XFree86$ */
#ifndef _CR_H_ #ifndef _CR_H_
#define _CR_H_ #define _CR_H_
......
...@@ -23,7 +23,6 @@ used in advertising or otherwise to promote the sale, use or other dealings ...@@ -23,7 +23,6 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group. in this Software without prior written authorization from The Open Group.
*/ */
/* $XFree86$ */
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include <config.h> #include <config.h>
......
...@@ -31,11 +31,11 @@ in this Software without prior written authorization from The Open Group. ...@@ -31,11 +31,11 @@ in this Software without prior written authorization from The Open Group.
#include "Xcmsint.h" #include "Xcmsint.h"
Colormap XCreateColormap(dpy, w, visual, alloc) Colormap XCreateColormap(
register Display *dpy; register Display *dpy,
Window w; Window w,
Visual *visual; Visual *visual,
int alloc; int alloc)
{ {
register xCreateColormapReq *req; register xCreateColormapReq *req;
Colormap mid; Colormap mid;
...@@ -51,7 +51,9 @@ int alloc; ...@@ -51,7 +51,9 @@ int alloc;
UnlockDisplay(dpy); UnlockDisplay(dpy);
SyncHandle(); SyncHandle();
#ifdef XCMS
_XcmsAddCmapRec(dpy, mid, w, visual); _XcmsAddCmapRec(dpy, mid, w, visual);
#endif
return(mid); return(mid);
} }
...@@ -23,7 +23,6 @@ used in advertising or otherwise to promote the sale, use or other dealings ...@@ -23,7 +23,6 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group. in this Software without prior written authorization from The Open Group.
*/ */
/* $XFree86$ */
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include <config.h> #include <config.h>
...@@ -41,11 +40,14 @@ _XTryShapeBitmapCursor (Display *dpy, ...@@ -41,11 +40,14 @@ _XTryShapeBitmapCursor (Display *dpy,
unsigned int y); unsigned int y);
#endif #endif
Cursor XCreatePixmapCursor(dpy, source, mask, foreground, background, x, y) Cursor XCreatePixmapCursor(
register Display *dpy; register Display *dpy,
Pixmap source, mask; Pixmap source,
XColor *foreground, *background; Pixmap mask,
unsigned int x, y; XColor *foreground,
XColor *background,
unsigned int x,
unsigned int y)
{ {
register xCreateCursorReq *req; register xCreateCursorReq *req;
......
...@@ -61,11 +61,11 @@ static void _XGenerateGCList( ...@@ -61,11 +61,11 @@ static void _XGenerateGCList(
GC gc, GC gc,
xReq *req); xReq *req);
GC XCreateGC (dpy, d, valuemask, values) GC XCreateGC (
register Display *dpy; register Display *dpy,
Drawable d; /* Window or Pixmap for which depth matches */ Drawable d, /* Window or Pixmap for which depth matches */
unsigned long valuemask; /* which ones to set initially */ unsigned long valuemask, /* which ones to set initially */
XGCValues *values; /* the values themselves */ XGCValues *values) /* the values themselves */
{ {
register GC gc; register GC gc;
register xCreateGCReq *req; register xCreateGCReq *req;
...@@ -161,11 +161,11 @@ _XGenerateGCList ( ...@@ -161,11 +161,11 @@ _XGenerateGCList (
int int
_XUpdateGCCache (gc, mask, attr) _XUpdateGCCache (
register unsigned long mask; register GC gc,
register XGCValues *attr; register unsigned long mask,
register GC gc; register XGCValues *attr)
{ {
register XGCValues *gv = &gc->values; register XGCValues *gv = &gc->values;
if (mask & GCFunction) if (mask & GCFunction)
...@@ -308,13 +308,13 @@ _XUpdateGCCache (gc, mask, attr) ...@@ -308,13 +308,13 @@ _XUpdateGCCache (gc, mask, attr)
gc->dashes = 0; gc->dashes = 0;
} }
return 0; return 0;
} }
/* can only call when display is already locked. */ /* can only call when display is already locked. */
void _XFlushGCCache(dpy, gc) void _XFlushGCCache(
Display *dpy; Display *dpy,
GC gc; GC gc)
{ {
register xChangeGCReq *req; register xChangeGCReq *req;
register _XExtension *ext; register _XExtension *ext;
...@@ -331,13 +331,15 @@ void _XFlushGCCache(dpy, gc) ...@@ -331,13 +331,15 @@ void _XFlushGCCache(dpy, gc)
} }
} }
void XFlushGC(dpy, gc) void
Display *dpy; XFlushGC(
GC gc; Display *dpy,
GC gc)
{ {
FlushGC(dpy, gc); FlushGC(dpy, gc);
} }
GContext XGContextFromGC(gc) GContext XGContextFromGC(GC gc)
GC gc; {
{ return (gc->gid); } return (gc->gid);
}
...@@ -44,14 +44,18 @@ in this Software without prior written authorization from The Open Group. ...@@ -44,14 +44,18 @@ in this Software without prior written authorization from The Open Group.
#endif #endif
#include "Cr.h" #include "Cr.h"
#ifdef __CYGWIN__
#define LIBXCURSOR "cygXcursor-1.dll"
#endif
#if defined(hpux) #if defined(hpux)
typedef shl_dt XModuleType; typedef shl_t XModuleType;
#else #else
typedef void *XModuleType; typedef void *XModuleType;
#endif #endif
#ifndef LIBXCURSOR #ifndef LIBXCURSOR
#define LIBXCURSOR "libXcursor.so" #define LIBXCURSOR "libXcursor.so.1"
#endif #endif
static char libraryName[] = LIBXCURSOR; static char libraryName[] = LIBXCURSOR;
...@@ -76,14 +80,14 @@ open_library (void) ...@@ -76,14 +80,14 @@ open_library (void)
break; break;
*dot = '\0'; *dot = '\0';
} }
return 0; return NULL;
} }
static void * static void *
fetch_symbol (XModuleType module, char *under_symbol) fetch_symbol (XModuleType module, const char *under_symbol)
{ {
void *result = NULL; void *result = NULL;
char *symbol = under_symbol + 1; const char *symbol = under_symbol + 1;
#if defined(hpux) #if defined(hpux)
int getsyms_cnt, i; int getsyms_cnt, i;
struct shl_symbol *symbols; struct shl_symbol *symbols;
...@@ -218,14 +222,14 @@ _XTryShapeBitmapCursor (Display *dpy, ...@@ -218,14 +222,14 @@ _XTryShapeBitmapCursor (Display *dpy,
} }
#endif #endif
Cursor XCreateGlyphCursor(dpy, source_font, mask_font, Cursor XCreateGlyphCursor(
source_char, mask_char, register Display *dpy,
foreground, background) Font source_font,
register Display *dpy; Font mask_font,
Font source_font, mask_font; unsigned int source_char,
unsigned int source_char, mask_char; unsigned int mask_char,
XColor _Xconst *foreground, *background; XColor _Xconst *foreground,
XColor _Xconst *background)
{ {
Cursor cid; Cursor cid;
register xCreateGlyphCursorReq *req; register xCreateGlyphCursorReq *req;
......
...@@ -48,13 +48,15 @@ in this Software without prior written authorization from The Open Group. ...@@ -48,13 +48,15 @@ in this Software without prior written authorization from The Open Group.
* xoffset=0 * xoffset=0
* no extra bytes per line * no extra bytes per line
*/ */
Pixmap XCreatePixmapFromBitmapData(display,d,data,width,height,fg,bg,depth) Pixmap XCreatePixmapFromBitmapData(
Display *display; Display *display,
Drawable d; Drawable d,
char *data; char *data,
unsigned int width, height; unsigned int width,
unsigned long fg, bg; unsigned int height,
unsigned int depth; unsigned long fg,
unsigned long bg,
unsigned int depth)
{ {
XImage ximage; XImage ximage;
GC gc; GC gc;
......
...@@ -23,7 +23,6 @@ used in advertising or otherwise to promote the sale, use or other dealings ...@@ -23,7 +23,6 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group. in this Software without prior written authorization from The Open Group.
*/ */
/* $XFree86$ */
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include <config.h> #include <config.h>
...@@ -38,10 +37,12 @@ _XNoticeCreateBitmap (Display *dpy, ...@@ -38,10 +37,12 @@ _XNoticeCreateBitmap (Display *dpy,
unsigned int height); unsigned int height);
#endif #endif
Pixmap XCreatePixmap (dpy, d, width, height, depth) Pixmap XCreatePixmap (
register Display *dpy; register Display *dpy,
Drawable d; Drawable d,
unsigned int width, height, depth; unsigned int width,
unsigned int height,
unsigned int depth)
{ {
Pixmap pid; Pixmap pid;
register xCreatePixmapReq *req; register xCreatePixmapReq *req;
......
...@@ -29,14 +29,16 @@ in this Software without prior written authorization from The Open Group. ...@@ -29,14 +29,16 @@ in this Software without prior written authorization from The Open Group.
#endif #endif
#include "Xlibint.h" #include "Xlibint.h"
Window XCreateSimpleWindow(dpy, parent, x, y, width, height, Window XCreateSimpleWindow(
borderWidth, border, background) register Display *dpy,
register Display *dpy; Window parent,
Window parent; int x,
int x, y; int y,
unsigned int width, height, borderWidth; unsigned int width,
unsigned long border; unsigned int height,
unsigned long background; unsigned int borderWidth,
unsigned long border,
unsigned long background)
{ {
Window wid; Window wid;
register xCreateWindowReq *req; register xCreateWindowReq *req;
......
...@@ -31,9 +31,9 @@ in this Software without prior written authorization from The Open Group. ...@@ -31,9 +31,9 @@ in this Software without prior written authorization from The Open Group.
static XColor _Xconst foreground = { 0, 0, 0, 0 }; /* black */ static XColor _Xconst foreground = { 0, 0, 0, 0 }; /* black */
static XColor _Xconst background = { 0, 65535, 65535, 65535 }; /* white */ static XColor _Xconst background = { 0, 65535, 65535, 65535 }; /* white */
Cursor XCreateFontCursor(dpy, which) Cursor XCreateFontCursor(
Display *dpy; Display *dpy,
unsigned int which; unsigned int which)
{ {
/* /*
* the cursor font contains the shape glyph followed by the mask * the cursor font contains the shape glyph followed by the mask
......
...@@ -30,10 +30,10 @@ in this Software without prior written authorization from The Open Group. ...@@ -30,10 +30,10 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h" #include "Xlibint.h"
int int
XDefineCursor (dpy, w, cursor) XDefineCursor (
register Display *dpy; register Display *dpy,
Window w; Window w,
Cursor cursor; Cursor cursor)
{ {
register xChangeWindowAttributesReq *req; register xChangeWindowAttributesReq *req;
......
...@@ -30,10 +30,10 @@ in this Software without prior written authorization from The Open Group. ...@@ -30,10 +30,10 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h" #include "Xlibint.h"
int int
XDeleteProperty(dpy, window, property) XDeleteProperty(
register Display *dpy; register Display *dpy,
Window window; Window window,
Atom property; Atom property)
{ {
register xDeletePropertyReq *req; register xDeletePropertyReq *req;
......
...@@ -33,10 +33,10 @@ in this Software without prior written authorization from The Open Group. ...@@ -33,10 +33,10 @@ in this Software without prior written authorization from The Open Group.
/* /*
* XListDepths - return info from connection setup * XListDepths - return info from connection setup
*/ */
int *XListDepths (dpy, scrnum, countp) int *XListDepths (
Display *dpy; Display *dpy,
int scrnum; int scrnum,
int *countp; int *countp)
{ {
Screen *scr; Screen *scr;
int count; int count;
......
...@@ -30,9 +30,9 @@ in this Software without prior written authorization from The Open Group. ...@@ -30,9 +30,9 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h" #include "Xlibint.h"
int int
XDestroySubwindows(dpy, win) XDestroySubwindows(
register Display *dpy; register Display *dpy,
Window win; Window win)
{ {
register xResourceReq *req; register xResourceReq *req;
......
...@@ -30,9 +30,9 @@ in this Software without prior written authorization from The Open Group. ...@@ -30,9 +30,9 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h" #include "Xlibint.h"
int int
XDestroyWindow (dpy, w) XDestroyWindow (
register Display *dpy; register Display *dpy,
Window w; Window w)
{ {
register xResourceReq *req; register xResourceReq *req;
......
...@@ -36,13 +36,16 @@ in this Software without prior written authorization from The Open Group. ...@@ -36,13 +36,16 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h" #include "Xlibint.h"
int int
XDrawArc(dpy, d, gc, x, y, width, height, angle1, angle2) XDrawArc(
register Display *dpy; register Display *dpy,
Drawable d; Drawable d,
GC gc; GC gc,
int x, y; /* INT16 */ int x,
unsigned int width, height; /* CARD16 */ int y, /* INT16 */
int angle1, angle2; /* INT16 */ unsigned int width,
unsigned int height, /* CARD16 */
int angle1,
int angle2) /* INT16 */
{ {
register xPolyArcReq *req; register xPolyArcReq *req;
register xArc *arc; register xArc *arc;
......
...@@ -32,12 +32,12 @@ in this Software without prior written authorization from The Open Group. ...@@ -32,12 +32,12 @@ in this Software without prior written authorization from The Open Group.
#define arc_scale (SIZEOF(xArc) / 4) #define arc_scale (SIZEOF(xArc) / 4)
int int
XDrawArcs(dpy, d, gc, arcs, n_arcs) XDrawArcs(
register Display *dpy; register Display *dpy,
Drawable d; Drawable d,
GC gc; GC gc,
XArc *arcs; XArc *arcs,
int n_arcs; int n_arcs)
{ {
register xPolyArcReq *req; register xPolyArcReq *req;
register long len; register long len;
......
...@@ -35,11 +35,14 @@ in this Software without prior written authorization from The Open Group. ...@@ -35,11 +35,14 @@ in this Software without prior written authorization from The Open Group.
#define zsize (SIZEOF(xPolySegmentReq) + ZLNSPERBATCH * SIZEOF(xSegment)) #define zsize (SIZEOF(xPolySegmentReq) + ZLNSPERBATCH * SIZEOF(xSegment))
int int
XDrawLine (dpy, d, gc, x1, y1, x2, y2) XDrawLine (
register Display *dpy; register Display *dpy,
Drawable d; Drawable d,
GC gc; GC gc,
int x1, y1, x2, y2; int x1,
int y1,
int x2,
int y2)
{ {
register xSegment *segment; register xSegment *segment;
......
...@@ -30,13 +30,13 @@ in this Software without prior written authorization from The Open Group. ...@@ -30,13 +30,13 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h" #include "Xlibint.h"
int int
XDrawLines (dpy, d, gc, points, npoints, mode) XDrawLines (
register Display *dpy; register Display *dpy,
Drawable d; Drawable d,
GC gc; GC gc,
XPoint *points; XPoint *points,
int npoints; int npoints,
int mode; int mode)
{ {
register xPolyLineReq *req; register xPolyLineReq *req;
register long length; register long length;
......
...@@ -34,11 +34,12 @@ in this Software without prior written authorization from The Open Group. ...@@ -34,11 +34,12 @@ in this Software without prior written authorization from The Open Group.
#define size (SIZEOF(xPolyPointReq) + PTSPERBATCH * SIZEOF(xPoint)) #define size (SIZEOF(xPolyPointReq) + PTSPERBATCH * SIZEOF(xPoint))
int int
XDrawPoint(dpy, d, gc, x, y) XDrawPoint(
register Display *dpy; register Display *dpy,
Drawable d; Drawable d,
GC gc; GC gc,
int x, y; /* INT16 */ int x,
int y) /* INT16 */
{ {
xPoint *point; xPoint *point;
......
...@@ -30,13 +30,13 @@ in this Software without prior written authorization from The Open Group. ...@@ -30,13 +30,13 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h" #include "Xlibint.h"
int int
XDrawPoints(dpy, d, gc, points, n_points, mode) XDrawPoints(
register Display *dpy; register Display *dpy,
Drawable d; Drawable d,
GC gc; GC gc,
XPoint *points; XPoint *points,
int n_points; int n_points,
int mode; /* CoordMode */ int mode) /* CoordMode */
{ {
register xPolyPointReq *req; register xPolyPointReq *req;
register long nbytes; register long nbytes;
......
...@@ -35,12 +35,14 @@ in this Software without prior written authorization from The Open Group. ...@@ -35,12 +35,14 @@ in this Software without prior written authorization from The Open Group.
#define zsize (SIZEOF(xPolyRectangleReq) + ZRCTSPERBATCH * SIZEOF(xRectangle)) #define zsize (SIZEOF(xPolyRectangleReq) + ZRCTSPERBATCH * SIZEOF(xRectangle))
int int
XDrawRectangle(dpy, d, gc, x, y, width, height) XDrawRectangle(
register Display *dpy; register Display *dpy,
Drawable d; Drawable d,
GC gc; GC gc,
int x, y; /* INT16 */ int x,
unsigned int width, height; /* CARD16 */ int y, /* INT16 */
unsigned int width,
unsigned int height) /* CARD16 */
{ {
xRectangle *rect; xRectangle *rect;
......
...@@ -30,12 +30,12 @@ in this Software without prior written authorization from The Open Group. ...@@ -30,12 +30,12 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h" #include "Xlibint.h"
int int
XDrawRectangles(dpy, d, gc, rects, n_rects) XDrawRectangles(
register Display *dpy; register Display *dpy,
Drawable d; Drawable d,
GC gc; GC gc,
XRectangle *rects; XRectangle *rects,
int n_rects; int n_rects)
{ {
register xPolyRectangleReq *req; register xPolyRectangleReq *req;
long len; long len;
......
...@@ -30,12 +30,12 @@ in this Software without prior written authorization from The Open Group. ...@@ -30,12 +30,12 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h" #include "Xlibint.h"
int int
XDrawSegments (dpy, d, gc, segments, nsegments) XDrawSegments (
register Display *dpy; register Display *dpy,
Drawable d; Drawable d,
GC gc; GC gc,
XSegment *segments; XSegment *segments,
int nsegments; int nsegments)
{ {
register xPolySegmentReq *req; register xPolySegmentReq *req;
long len; long len;
......
/* /*
* $Xorg: ErrDes.c,v 1.4 2001/02/09 02:03:32 xorgcvs Exp $
* $XdotOrg: xc/lib/X11/ErrDes.c,v 1.8 2005/08/26 05:16:46 daniels Exp $
*/ */
/*********************************************************** /***********************************************************
...@@ -70,34 +68,40 @@ SOFTWARE. ...@@ -70,34 +68,40 @@ SOFTWARE.
* descriptions of errors in Section 4 of Protocol doc (pp. 350-351); more * descriptions of errors in Section 4 of Protocol doc (pp. 350-351); more
* verbose descriptions are given in the error database * verbose descriptions are given in the error database
*/ */
static const char * const _XErrorList[] = { static const char _XErrorList[] =
/* No error */ "no error", /* No error */ "no error\0"
/* BadRequest */ "BadRequest", /* BadRequest */ "BadRequest\0"
/* BadValue */ "BadValue", /* BadValue */ "BadValue\0"
/* BadWindow */ "BadWindow", /* BadWindow */ "BadWindow\0"
/* BadPixmap */ "BadPixmap", /* BadPixmap */ "BadPixmap\0"
/* BadAtom */ "BadAtom", /* BadAtom */ "BadAtom\0"
/* BadCursor */ "BadCursor", /* BadCursor */ "BadCursor\0"
/* BadFont */ "BadFont", /* BadFont */ "BadFont\0"
/* BadMatch */ "BadMatch", /* BadMatch */ "BadMatch\0"
/* BadDrawable */ "BadDrawable", /* BadDrawable */ "BadDrawable\0"
/* BadAccess */ "BadAccess", /* BadAccess */ "BadAccess\0"
/* BadAlloc */ "BadAlloc", /* BadAlloc */ "BadAlloc\0"
/* BadColor */ "BadColor", /* BadColor */ "BadColor\0"
/* BadGC */ "BadGC", /* BadGC */ "BadGC\0"
/* BadIDChoice */ "BadIDChoice", /* BadIDChoice */ "BadIDChoice\0"
/* BadName */ "BadName", /* BadName */ "BadName\0"
/* BadLength */ "BadLength", /* BadLength */ "BadLength\0"
/* BadImplementation */ "BadImplementation", /* BadImplementation */ "BadImplementation"
;
/* offsets into _XErrorList */
static const unsigned char _XErrorOffsets[] = {
0, 9, 20, 29, 39, 49, 57, 67, 75, 84, 96,
106, 115, 124, 130, 142, 150, 160
}; };
int int
XGetErrorText(dpy, code, buffer, nbytes) XGetErrorText(
register int code; register Display *dpy,
register Display *dpy; register int code,
char *buffer; char *buffer,
int nbytes; int nbytes)
{ {
char buf[150]; char buf[150];
register _XExtension *ext; register _XExtension *ext;
...@@ -106,7 +110,8 @@ XGetErrorText(dpy, code, buffer, nbytes) ...@@ -106,7 +110,8 @@ XGetErrorText(dpy, code, buffer, nbytes)
if (nbytes == 0) return 0; if (nbytes == 0) return 0;
if (code <= BadImplementation && code > 0) { if (code <= BadImplementation && code > 0) {
sprintf(buf, "%d", code); sprintf(buf, "%d", code);
(void) XGetErrorDatabaseText(dpy, "XProtoError", buf, _XErrorList[code], (void) XGetErrorDatabaseText(dpy, "XProtoError", buf,
_XErrorList + _XErrorOffsets[code],
buffer, nbytes); buffer, nbytes);
} else } else
buffer[0] = '\0'; buffer[0] = '\0';
...@@ -115,7 +120,7 @@ XGetErrorText(dpy, code, buffer, nbytes) ...@@ -115,7 +120,7 @@ XGetErrorText(dpy, code, buffer, nbytes)
if (ext->error_string) if (ext->error_string)
(*ext->error_string)(dpy, code, &ext->codes, buffer, nbytes); (*ext->error_string)(dpy, code, &ext->codes, buffer, nbytes);
if (ext->codes.first_error && if (ext->codes.first_error &&
ext->codes.first_error < code && ext->codes.first_error <= code &&
(!bext || ext->codes.first_error > bext->codes.first_error)) (!bext || ext->codes.first_error > bext->codes.first_error))
bext = ext; bext = ext;
} }
......
...@@ -38,13 +38,15 @@ from The Open Group. ...@@ -38,13 +38,15 @@ from The Open Group.
#include "Xlibint.h" #include "Xlibint.h"
/* /*
* reformat a wire event into an XEvent structure of the right type. * Reformat an XEvent structure to a wire event of the right type.
* Return True on success. If the type is unrecognized, return what
* _XUnknownNativeEvent returns (i.e., False).
*/ */
Status Status
_XEventToWire( _XEventToWire(
register Display *dpy, /* pointer to display structure */ register Display *dpy,
register XEvent *re, /* pointer to where event should be reformatted */ register XEvent *re, /* in: from */
register xEvent *event) /* wire protocol event */ register xEvent *event) /* out: to */
{ {
switch (event->u.u.type = re->type) { switch (event->u.u.type = re->type) {
case KeyPress: case KeyPress:
......
...@@ -30,28 +30,23 @@ in this Software without prior written authorization from The Open Group. ...@@ -30,28 +30,23 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h" #include "Xlibint.h"
int int
XActivateScreenSaver(dpy) XActivateScreenSaver(register Display *dpy)
register Display *dpy;
{ {
XForceScreenSaver (dpy, ScreenSaverActive); XForceScreenSaver (dpy, ScreenSaverActive);
return 1; return 1;
} }
int int
XResetScreenSaver(dpy) XResetScreenSaver(register Display *dpy)
register Display *dpy;
{ {
XForceScreenSaver (dpy, ScreenSaverReset); XForceScreenSaver (dpy, ScreenSaverReset);
return 1; return 1;
} }
int int
XForceScreenSaver(dpy, mode) XForceScreenSaver(
register Display *dpy; register Display *dpy,
int mode; int mode)
{ {
register xForceScreenSaverReq *req; register xForceScreenSaverReq *req;
......
...@@ -206,10 +206,10 @@ XCreateFontSet ( ...@@ -206,10 +206,10 @@ XCreateFontSet (
} }
int int
XFontsOfFontSet(font_set, font_struct_list, font_name_list) XFontsOfFontSet(
XFontSet font_set; XFontSet font_set,
XFontStruct ***font_struct_list; XFontStruct ***font_struct_list,
char ***font_name_list; char ***font_name_list)
{ {
*font_name_list = font_set->core.font_info.font_name_list; *font_name_list = font_set->core.font_info.font_name_list;
*font_struct_list = font_set->core.font_info.font_struct_list; *font_struct_list = font_set->core.font_info.font_struct_list;
...@@ -217,50 +217,47 @@ XFontsOfFontSet(font_set, font_struct_list, font_name_list) ...@@ -217,50 +217,47 @@ XFontsOfFontSet(font_set, font_struct_list, font_name_list)
} }
char * char *
XBaseFontNameListOfFontSet(font_set) XBaseFontNameListOfFontSet(XFontSet font_set)
XFontSet font_set;
{ {
return font_set->core.base_name_list; return font_set->core.base_name_list;
} }
char * char *
XLocaleOfFontSet(font_set) XLocaleOfFontSet(XFontSet font_set)
XFontSet font_set;
{ {
return font_set->core.om->core.lcd->core->name; return font_set->core.om->core.lcd->core->name;
} }
extern Bool XContextDependentDrawing(font_set) Bool
XFontSet font_set; XContextDependentDrawing(XFontSet font_set)
{ {
return font_set->core.om->core.context_dependent; return font_set->core.om->core.context_dependent;
} }
Bool Bool
XDirectionalDependentDrawing(font_set) XDirectionalDependentDrawing(XFontSet font_set)
XFontSet font_set;
{ {
return font_set->core.om->core.directional_dependent; return font_set->core.om->core.directional_dependent;
} }
Bool Bool
XContextualDrawing(font_set) XContextualDrawing(XFontSet font_set)
XFontSet font_set;
{ {
return font_set->core.om->core.contextual_drawing; return font_set->core.om->core.contextual_drawing;
} }
XFontSetExtents * XFontSetExtents *
XExtentsOfFontSet(font_set) XExtentsOfFontSet(XFontSet font_set)
XFontSet font_set;
{ {
if (!font_set)
return NULL;
return &font_set->core.font_set_extents; return &font_set->core.font_set_extents;
} }
void void
XFreeFontSet(dpy, font_set) XFreeFontSet(
Display *dpy; Display *dpy,
XFontSet font_set; XFontSet font_set)
{ {
XCloseOM(font_set->core.om); XCloseOM(font_set->core.om);
} }
...@@ -33,10 +33,10 @@ in this Software without prior written authorization from The Open Group. ...@@ -33,10 +33,10 @@ in this Software without prior written authorization from The Open Group.
#include <stdio.h> #include <stdio.h>
Status XFetchName (dpy, w, name) Status XFetchName (
register Display *dpy; register Display *dpy,
Window w; Window w,
char **name; char **name)
{ {
Atom actual_type; Atom actual_type;
int actual_format; int actual_format;
...@@ -63,10 +63,10 @@ Status XFetchName (dpy, w, name) ...@@ -63,10 +63,10 @@ Status XFetchName (dpy, w, name)
return(0); return(0);
} }
Status XGetIconName (dpy, w, icon_name) Status XGetIconName (
register Display *dpy; register Display *dpy,
Window w; Window w,
char **icon_name; char **icon_name)
{ {
Atom actual_type; Atom actual_type;
int actual_format; int actual_format;
......
...@@ -34,13 +34,16 @@ in this Software without prior written authorization from The Open Group. ...@@ -34,13 +34,16 @@ in this Software without prior written authorization from The Open Group.
#define size (SIZEOF(xPolyFillArcReq) + FARCSPERBATCH * SIZEOF(xArc)) #define size (SIZEOF(xPolyFillArcReq) + FARCSPERBATCH * SIZEOF(xArc))
int int
XFillArc(dpy, d, gc, x, y, width, height, angle1, angle2) XFillArc(
register Display *dpy; register Display *dpy,
Drawable d; Drawable d,
GC gc; GC gc,
int x, y; /* INT16 */ int x,
unsigned int width, height; /* CARD16 */ int y, /* INT16 */
int angle1, angle2; /* INT16 */ unsigned int width,
unsigned int height, /* CARD16 */
int angle1,
int angle2) /* INT16 */
{ {
xArc *arc; xArc *arc;
......
...@@ -32,12 +32,12 @@ in this Software without prior written authorization from The Open Group. ...@@ -32,12 +32,12 @@ in this Software without prior written authorization from The Open Group.
#define arc_scale (SIZEOF(xArc) / 4) #define arc_scale (SIZEOF(xArc) / 4)
int int
XFillArcs(dpy, d, gc, arcs, n_arcs) XFillArcs(
register Display *dpy; register Display *dpy,
Drawable d; Drawable d,
GC gc; GC gc,
XArc *arcs; XArc *arcs,
int n_arcs; int n_arcs)
{ {
register xPolyFillArcReq *req; register xPolyFillArcReq *req;
long len; long len;
......
...@@ -30,14 +30,14 @@ in this Software without prior written authorization from The Open Group. ...@@ -30,14 +30,14 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h" #include "Xlibint.h"
int int
XFillPolygon(dpy, d, gc, points, n_points, shape, mode) XFillPolygon(
register Display *dpy; register Display *dpy,
Drawable d; Drawable d,
GC gc; GC gc,
XPoint *points; XPoint *points,
int n_points; int n_points,
int shape; int shape,
int mode; int mode)
{ {
register xFillPolyReq *req; register xFillPolyReq *req;
register long nbytes; register long nbytes;
......
...@@ -34,12 +34,14 @@ in this Software without prior written authorization from The Open Group. ...@@ -34,12 +34,14 @@ in this Software without prior written authorization from The Open Group.
#define size (SIZEOF(xPolyFillRectangleReq) + FRCTSPERBATCH * SIZEOF(xRectangle)) #define size (SIZEOF(xPolyFillRectangleReq) + FRCTSPERBATCH * SIZEOF(xRectangle))
int int
XFillRectangle(dpy, d, gc, x, y, width, height) XFillRectangle(
register Display *dpy; register Display *dpy,
Drawable d; Drawable d,
GC gc; GC gc,
int x, y; /* INT16 */ int x,
unsigned int width, height; /* CARD16 */ int y, /* INT16 */
unsigned int width,
unsigned int height) /* CARD16 */
{ {
xRectangle *rect; xRectangle *rect;
......
...@@ -30,12 +30,12 @@ in this Software without prior written authorization from The Open Group. ...@@ -30,12 +30,12 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h" #include "Xlibint.h"
int int
XFillRectangles(dpy, d, gc, rectangles, n_rects) XFillRectangles(
register Display *dpy; register Display *dpy,
Drawable d; Drawable d,
GC gc; GC gc,
XRectangle *rectangles; XRectangle *rectangles,
int n_rects; int n_rects)
{ {
register xPolyFillRectangleReq *req; register xPolyFillRectangleReq *req;
long len; long len;
...@@ -63,4 +63,3 @@ int n_rects; ...@@ -63,4 +63,3 @@ int n_rects;
SyncHandle(); SyncHandle();
return 1; return 1;
} }
...@@ -69,9 +69,9 @@ extern long const _Xevent_to_mask[]; ...@@ -69,9 +69,9 @@ extern long const _Xevent_to_mask[];
* Look up if there is a specified filter for the event. * Look up if there is a specified filter for the event.
*/ */
Bool Bool
XFilterEvent(ev, window) XFilterEvent(
XEvent *ev; XEvent *ev,
Window window; Window window)
{ {
#if XLOCALE #if XLOCALE
XFilterEventList p; XFilterEventList p;
...@@ -93,9 +93,9 @@ XFilterEvent(ev, window) ...@@ -93,9 +93,9 @@ XFilterEvent(ev, window)
if (win == p->window) { if (win == p->window) {
if ((mask & p->event_mask) || if ((mask & p->event_mask) ||
(ev->type >= p->start_type && ev->type <= p->end_type)) { (ev->type >= p->start_type && ev->type <= p->end_type)) {
UnlockDisplay(ev->xany.display);
ret = (*(p->filter))(ev->xany.display, p->window, ev, ret = (*(p->filter))(ev->xany.display, p->window, ev,
p->client_data); p->client_data);
UnlockDisplay(ev->xany.display);
return(ret); return(ret);
} }
} }
......
...@@ -33,9 +33,8 @@ in this Software without prior written authorization from The Open Group. ...@@ -33,9 +33,8 @@ in this Software without prior written authorization from The Open Group.
/* NOTE: NOT necessary when calling any of the Xlib routines. */ /* NOTE: NOT necessary when calling any of the Xlib routines. */
int int
XFlush (dpy) XFlush (register Display *dpy)
register Display *dpy; {
{
LockDisplay(dpy); LockDisplay(dpy);
_XFlush (dpy); _XFlush (dpy);
UnlockDisplay(dpy); UnlockDisplay(dpy);
......
...@@ -123,9 +123,9 @@ XFontStruct *XLoadQueryFont( ...@@ -123,9 +123,9 @@ XFontStruct *XLoadQueryFont(
return font_result; return font_result;
} }
XFontStruct *XQueryFont (dpy, fid) XFontStruct *XQueryFont (
register Display *dpy; register Display *dpy,
Font fid; Font fid)
{ {
XFontStruct *font_result; XFontStruct *font_result;
#ifdef USE_XF86BIGFONT #ifdef USE_XF86BIGFONT
...@@ -147,9 +147,9 @@ XFontStruct *XQueryFont (dpy, fid) ...@@ -147,9 +147,9 @@ XFontStruct *XQueryFont (dpy, fid)
} }
int int
XFreeFont(dpy, fs) XFreeFont(
register Display *dpy; register Display *dpy,
XFontStruct *fs; XFontStruct *fs)
{ {
register xResourceReq *req; register xResourceReq *req;
register _XExtension *ext; register _XExtension *ext;
...@@ -177,10 +177,10 @@ XFreeFont(dpy, fs) ...@@ -177,10 +177,10 @@ XFreeFont(dpy, fs)
static XFontStruct * static XFontStruct *
_XQueryFont (dpy, fid, seq) _XQueryFont (
register Display *dpy; register Display *dpy,
Font fid; Font fid,
unsigned long seq; unsigned long seq)
{ {
register XFontStruct *fs; register XFontStruct *fs;
register long nbytes; register long nbytes;
...@@ -384,11 +384,11 @@ _XF86BigfontFreeNop ( ...@@ -384,11 +384,11 @@ _XF86BigfontFreeNop (
} }
static XFontStruct * static XFontStruct *
_XF86BigfontQueryFont (dpy, extcodes, fid, seq) _XF86BigfontQueryFont (
register Display *dpy; register Display *dpy,
XF86BigfontCodes *extcodes; XF86BigfontCodes *extcodes,
Font fid; Font fid,
unsigned long seq; unsigned long seq)
{ {
register XFontStruct *fs; register XFontStruct *fs;
register long nbytes; register long nbytes;
...@@ -554,7 +554,7 @@ _XF86BigfontQueryFont (dpy, extcodes, fid, seq) ...@@ -554,7 +554,7 @@ _XF86BigfontQueryFont (dpy, extcodes, fid, seq)
signature. Then we set the CAP_VerifiedLocal bit to indicate signature. Then we set the CAP_VerifiedLocal bit to indicate
the verification was successful. */ the verification was successful. */
if ((addr = shmat(reply.shmid, 0, SHM_RDONLY)) == (char *)-1) { if ((addr = shmat(reply.shmid, NULL, SHM_RDONLY)) == (char *)-1) {
if (extcodes->serverCapabilities & CAP_VerifiedLocal) if (extcodes->serverCapabilities & CAP_VerifiedLocal)
fprintf(stderr, "_XF86BigfontQueryFont: could not attach shm segment\n"); fprintf(stderr, "_XF86BigfontQueryFont: could not attach shm segment\n");
Xfree((char *) pData); Xfree((char *) pData);
...@@ -606,8 +606,7 @@ _XF86BigfontQueryFont (dpy, extcodes, fid, seq) ...@@ -606,8 +606,7 @@ _XF86BigfontQueryFont (dpy, extcodes, fid, seq)
} }
void void
_XF86BigfontFreeFontMetrics (fs) _XF86BigfontFreeFontMetrics (XFontStruct *fs)
XFontStruct *fs;
{ {
#ifdef HAS_SHM #ifdef HAS_SHM
XExtData *pData; XExtData *pData;
...@@ -633,7 +632,7 @@ int _XF86LoadQueryLocaleFont( ...@@ -633,7 +632,7 @@ int _XF86LoadQueryLocaleFont(
Font *fidp) Font *fidp)
{ {
int l; int l;
char *charset, *p; const char *charset, *p;
char buf[256]; char buf[256];
XFontStruct *fs; XFontStruct *fs;
XLCd lcd; XLCd lcd;
...@@ -643,7 +642,7 @@ int _XF86LoadQueryLocaleFont( ...@@ -643,7 +642,7 @@ int _XF86LoadQueryLocaleFont(
l = strlen(name); l = strlen(name);
if (l < 2 || name[l - 1] != '*' || name[l - 2] != '-') if (l < 2 || name[l - 1] != '*' || name[l - 2] != '-')
return 0; return 0;
charset = 0; charset = NULL;
/* next three lines stolen from _XkbGetCharset() */ /* next three lines stolen from _XkbGetCharset() */
lcd = _XlcCurrentLC(); lcd = _XlcCurrentLC();
if ((lcd = _XlcCurrentLC()) != 0) if ((lcd = _XlcCurrentLC()) != 0)
......
...@@ -201,10 +201,10 @@ XFontStruct **info) /* RETURN */ ...@@ -201,10 +201,10 @@ XFontStruct **info) /* RETURN */
} }
int int
XFreeFontInfo (names, info, actualCount) XFreeFontInfo (
char **names; char **names,
XFontStruct *info; XFontStruct *info,
int actualCount; int actualCount)
{ {
register int i; register int i;
if (names) { if (names) {
......
...@@ -98,8 +98,7 @@ int *actualCount) /* RETURN */ ...@@ -98,8 +98,7 @@ int *actualCount) /* RETURN */
} }
int int
XFreeFontNames(list) XFreeFontNames(char **list)
char **list;
{ {
if (list) { if (list) {
if (!*(list[0]-1)) { /* from ListFontsWithInfo */ if (!*(list[0]-1)) { /* from ListFontsWithInfo */
......
...@@ -44,6 +44,9 @@ XFreeColormap( ...@@ -44,6 +44,9 @@ XFreeColormap(
UnlockDisplay(dpy); UnlockDisplay(dpy);
SyncHandle(); SyncHandle();
#ifdef XCMS
_XcmsDeleteCmapRec(dpy, cmap); _XcmsDeleteCmapRec(dpy, cmap);
#endif
return 1; return 1;
} }
...@@ -30,12 +30,12 @@ in this Software without prior written authorization from The Open Group. ...@@ -30,12 +30,12 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h" #include "Xlibint.h"
int int
XFreeColors(dpy, cmap, pixels, npixels, planes) XFreeColors(
register Display *dpy; register Display *dpy,
Colormap cmap; Colormap cmap,
unsigned long *pixels; /* LISTofCARD32 */ unsigned long *pixels, /* LISTofCARD32 */
int npixels; int npixels,
unsigned long planes; /* CARD32 */ unsigned long planes) /* CARD32 */
{ {
register xFreeColorsReq *req; register xFreeColorsReq *req;
register long nbytes; register long nbytes;
......
...@@ -30,9 +30,9 @@ in this Software without prior written authorization from The Open Group. ...@@ -30,9 +30,9 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h" #include "Xlibint.h"
int int
XFreeCursor(dpy, cursor) XFreeCursor(
register Display *dpy; register Display *dpy,
Cursor cursor; Cursor cursor)
{ {
register xResourceReq *req; register xResourceReq *req;
LockDisplay(dpy); LockDisplay(dpy);
......
...@@ -30,8 +30,7 @@ in this Software without prior written authorization from The Open Group. ...@@ -30,8 +30,7 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h" #include "Xlibint.h"
int int
_XFreeExtData (extension) _XFreeExtData (XExtData *extension)
XExtData *extension;
{ {
XExtData *temp; XExtData *temp;
while (extension) { while (extension) {
......
...@@ -30,9 +30,9 @@ in this Software without prior written authorization from The Open Group. ...@@ -30,9 +30,9 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h" #include "Xlibint.h"
int int
XFreeGC (dpy, gc) XFreeGC (
register Display *dpy; register Display *dpy,
GC gc; GC gc)
{ {
register xResourceReq *req; register xResourceReq *req;
register _XExtension *ext; register _XExtension *ext;
...@@ -47,4 +47,3 @@ XFreeGC (dpy, gc) ...@@ -47,4 +47,3 @@ XFreeGC (dpy, gc)
Xfree ((char *) gc); Xfree ((char *) gc);
return 1; return 1;
} }
...@@ -30,10 +30,9 @@ in this Software without prior written authorization from The Open Group. ...@@ -30,10 +30,9 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h" #include "Xlibint.h"
int int
XFreePixmap(dpy, pixmap) XFreePixmap(
register Display *dpy; register Display *dpy,
Pixmap pixmap; Pixmap pixmap)
{ {
register xResourceReq *req; register xResourceReq *req;
LockDisplay(dpy); LockDisplay(dpy);
......
...@@ -30,10 +30,10 @@ in this Software without prior written authorization from The Open Group. ...@@ -30,10 +30,10 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h" #include "Xlibint.h"
int int
XSetArcMode (dpy, gc, arc_mode) XSetArcMode (
register Display *dpy; register Display *dpy,
register GC gc; register GC gc,
int arc_mode; int arc_mode)
{ {
LockDisplay(dpy); LockDisplay(dpy);
if (gc->values.arc_mode != arc_mode) { if (gc->values.arc_mode != arc_mode) {
...@@ -46,10 +46,10 @@ int arc_mode; ...@@ -46,10 +46,10 @@ int arc_mode;
} }
int int
XSetFillRule (dpy, gc, fill_rule) XSetFillRule (
register Display *dpy; register Display *dpy,
register GC gc; register GC gc,
int fill_rule; int fill_rule)
{ {
LockDisplay(dpy); LockDisplay(dpy);
if (gc->values.fill_rule != fill_rule) { if (gc->values.fill_rule != fill_rule) {
...@@ -62,10 +62,10 @@ int fill_rule; ...@@ -62,10 +62,10 @@ int fill_rule;
} }
int int
XSetFillStyle (dpy, gc, fill_style) XSetFillStyle (
register Display *dpy; register Display *dpy,
register GC gc; register GC gc,
int fill_style; int fill_style)
{ {
LockDisplay(dpy); LockDisplay(dpy);
if (gc->values.fill_style != fill_style) { if (gc->values.fill_style != fill_style) {
...@@ -78,10 +78,10 @@ int fill_style; ...@@ -78,10 +78,10 @@ int fill_style;
} }
int int
XSetGraphicsExposures (dpy, gc, graphics_exposures) XSetGraphicsExposures (
register Display *dpy; register Display *dpy,
register GC gc; register GC gc,
Bool graphics_exposures; Bool graphics_exposures)
{ {
LockDisplay(dpy); LockDisplay(dpy);
if (gc->values.graphics_exposures != graphics_exposures) { if (gc->values.graphics_exposures != graphics_exposures) {
...@@ -94,10 +94,10 @@ Bool graphics_exposures; ...@@ -94,10 +94,10 @@ Bool graphics_exposures;
} }
int int
XSetSubwindowMode (dpy, gc, subwindow_mode) XSetSubwindowMode (
register Display *dpy; register Display *dpy,
register GC gc; register GC gc,
int subwindow_mode; int subwindow_mode)
{ {
LockDisplay(dpy); LockDisplay(dpy);
if (gc->values.subwindow_mode != subwindow_mode) { if (gc->values.subwindow_mode != subwindow_mode) {
......
...@@ -26,7 +26,6 @@ other dealings in this Software without prior written authorization ...@@ -26,7 +26,6 @@ other dealings in this Software without prior written authorization
from The Open Group. from The Open Group.
*/ */
/* $XFree86$ */
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include <config.h> #include <config.h>
......
...@@ -56,9 +56,9 @@ char *_XGetAtomName( ...@@ -56,9 +56,9 @@ char *_XGetAtomName(
return (char *)NULL; return (char *)NULL;
} }
char *XGetAtomName(dpy, atom) char *XGetAtomName(
register Display *dpy; register Display *dpy,
Atom atom; Atom atom)
{ {
xGetAtomNameReply rep; xGetAtomNameReply rep;
char *name; char *name;
...@@ -139,11 +139,11 @@ Bool _XGetAtomNameHandler( ...@@ -139,11 +139,11 @@ Bool _XGetAtomNameHandler(
} }
Status Status
XGetAtomNames (dpy, atoms, count, names_return) XGetAtomNames (
Display *dpy; Display *dpy,
Atom *atoms; Atom *atoms,
int count; int count,
char **names_return; char **names_return)
{ {
_XAsyncHandler async; _XAsyncHandler async;
_XGetAtomNameState async_state; _XGetAtomNameState async_state;
......
...@@ -48,6 +48,7 @@ XColor *exact_def) /* RETURN */ ...@@ -48,6 +48,7 @@ XColor *exact_def) /* RETURN */
XcmsColor cmsColor_exact; XcmsColor cmsColor_exact;
Status ret; Status ret;
#ifdef XCMS
/* /*
* Let's Attempt to use Xcms and i18n approach to Parse Color * Let's Attempt to use Xcms and i18n approach to Parse Color
*/ */
...@@ -73,6 +74,7 @@ XColor *exact_def) /* RETURN */ ...@@ -73,6 +74,7 @@ XColor *exact_def) /* RETURN */
break; break;
} }
} }
#endif
/* /*
* Xcms and i18n approach failed. * Xcms and i18n approach failed.
......
...@@ -96,16 +96,16 @@ GetHomeDir( ...@@ -96,16 +96,16 @@ GetHomeDir(
int len) int len)
{ {
#ifdef WIN32 #ifdef WIN32
register char *ptr1; register char *ptr1 = NULL;
register char *ptr2; register char *ptr2 = NULL;
int len1 = 0, len2 = 0; int len1 = 0, len2 = 0;
if (ptr1 = getenv("HOME")) { /* old, deprecated */ if ((ptr1 = getenv("HOME"))) { /* old, deprecated */
len1 = strlen (ptr1); len1 = strlen (ptr1);
} else if ((ptr1 = getenv("HOMEDRIVE")) && (ptr2 = getenv("HOMEDIR"))) { } else if ((ptr1 = getenv("HOMEDRIVE")) && (ptr2 = getenv("HOMEDIR"))) {
len1 = strlen (ptr1); len1 = strlen (ptr1);
len2 = strlen (ptr2); len2 = strlen (ptr2);
} else if (ptr2 = getenv("USERNAME")) { } else if ((ptr2 = getenv("USERNAME"))) {
len1 = strlen (ptr1 = "/users/"); len1 = strlen (ptr1 = "/users/");
len2 = strlen (ptr2); len2 = strlen (ptr2);
} }
...@@ -162,7 +162,7 @@ InitDefaults( ...@@ -162,7 +162,7 @@ InitDefaults(
*/ */
if (dpy->xdefaults == NULL) { if (dpy->xdefaults == NULL) {
char *slashDotXdefaults = "/.Xdefaults"; const char *slashDotXdefaults = "/.Xdefaults";
(void) GetHomeDir (fname, PATH_MAX - strlen (slashDotXdefaults) - 1); (void) GetHomeDir (fname, PATH_MAX - strlen (slashDotXdefaults) - 1);
(void) strcat (fname, slashDotXdefaults); (void) strcat (fname, slashDotXdefaults);
...@@ -172,7 +172,7 @@ InitDefaults( ...@@ -172,7 +172,7 @@ InitDefaults(
} }
if (!(xenv = getenv ("XENVIRONMENT"))) { if (!(xenv = getenv ("XENVIRONMENT"))) {
char *slashDotXdefaultsDash = "/.Xdefaults-"; const char *slashDotXdefaultsDash = "/.Xdefaults-";
int len; int len;
(void) GetHomeDir (fname, PATH_MAX - strlen (slashDotXdefaultsDash) - 1); (void) GetHomeDir (fname, PATH_MAX - strlen (slashDotXdefaultsDash) - 1);
......
...@@ -29,9 +29,9 @@ in this Software without prior written authorization from The Open Group. ...@@ -29,9 +29,9 @@ in this Software without prior written authorization from The Open Group.
#endif #endif
#include "Xlibint.h" #include "Xlibint.h"
char **XGetFontPath(dpy, npaths) char **XGetFontPath(
register Display *dpy; register Display *dpy,
int *npaths; /* RETURN */ int *npaths) /* RETURN */
{ {
xGetFontPathReply rep; xGetFontPathReply rep;
register long nbytes; register long nbytes;
...@@ -81,8 +81,7 @@ int *npaths; /* RETURN */ ...@@ -81,8 +81,7 @@ int *npaths; /* RETURN */
} }
int int
XFreeFontPath (list) XFreeFontPath (char **list)
char **list;
{ {
if (list != NULL) { if (list != NULL) {
Xfree (list[0]-1); Xfree (list[0]-1);
......
...@@ -29,11 +29,11 @@ in this Software without prior written authorization from The Open Group. ...@@ -29,11 +29,11 @@ in this Software without prior written authorization from The Open Group.
#endif #endif
#include "Xlibint.h" #include "Xlibint.h"
Bool XGetFontProperty (fs, name, valuePtr) Bool XGetFontProperty (
XFontStruct *fs; XFontStruct *fs,
register Atom name; register Atom name,
unsigned long *valuePtr; unsigned long *valuePtr)
{ {
/* XXX this is a simple linear search for now. If the /* XXX this is a simple linear search for now. If the
protocol is changed to sort the property list, this should protocol is changed to sort the property list, this should
become a binary search. */ become a binary search. */
...@@ -50,6 +50,3 @@ Bool XGetFontProperty (fs, name, valuePtr) ...@@ -50,6 +50,3 @@ Bool XGetFontProperty (fs, name, valuePtr)
} }
...@@ -43,11 +43,11 @@ in this Software without prior written authorization from The Open Group. ...@@ -43,11 +43,11 @@ in this Software without prior written authorization from The Open Group.
GCArcMode) GCArcMode)
/*ARGSUSED*/ /*ARGSUSED*/
Status XGetGCValues (dpy, gc, valuemask, values) Status XGetGCValues (
Display *dpy; Display *dpy,
GC gc; GC gc,
unsigned long valuemask; unsigned long valuemask,
XGCValues *values; XGCValues *values)
{ {
if (valuemask == ValidGCValuesBits) { if (valuemask == ValidGCValuesBits) {
char dashes = values->dashes; char dashes = values->dashes;
......
...@@ -29,12 +29,16 @@ in this Software without prior written authorization from The Open Group. ...@@ -29,12 +29,16 @@ in this Software without prior written authorization from The Open Group.
#endif #endif
#include "Xlibint.h" #include "Xlibint.h"
Status XGetGeometry (dpy, d, root, x, y, width, height, borderWidth, depth) Status XGetGeometry (
register Display *dpy; register Display *dpy,
Drawable d; Drawable d,
Window *root; /* RETURN */ Window *root, /* RETURN */
int *x, *y; /* RETURN */ int *x,
unsigned int *width, *height, *borderWidth, *depth; /* RETURN */ int *y, /* RETURN */
unsigned int *width,
unsigned int *height,
unsigned int *borderWidth,
unsigned int *depth) /* RETURN */
{ {
xGetGeometryReply rep; xGetGeometryReply rep;
register xResourceReq *req; register xResourceReq *req;
......
...@@ -29,10 +29,10 @@ in this Software without prior written authorization from The Open Group. ...@@ -29,10 +29,10 @@ in this Software without prior written authorization from The Open Group.
#endif #endif
#include "Xlibint.h" #include "Xlibint.h"
Status XAllocColor(dpy, cmap, def) Status XAllocColor(
register Display *dpy; register Display *dpy,
Colormap cmap; Colormap cmap,
XColor *def; XColor *def)
{ {
Status status; Status status;
xAllocColorReply rep; xAllocColorReply rep;
......
...@@ -56,11 +56,11 @@ SOFTWARE. ...@@ -56,11 +56,11 @@ SOFTWARE.
#include <nx-X11/Xatom.h> #include <nx-X11/Xatom.h>
#include <stdio.h> #include <stdio.h>
Status XGetSizeHints (dpy, w, hints, property) Status XGetSizeHints (
Display *dpy; Display *dpy,
Window w; Window w,
XSizeHints *hints; XSizeHints *hints,
Atom property; Atom property)
{ {
xPropSizeHints *prop = NULL; xPropSizeHints *prop = NULL;
Atom actual_type; Atom actual_type;
...@@ -103,9 +103,9 @@ Status XGetSizeHints (dpy, w, hints, property) ...@@ -103,9 +103,9 @@ Status XGetSizeHints (dpy, w, hints, property)
* on. * on.
*/ */
XWMHints *XGetWMHints (dpy, w) XWMHints *XGetWMHints (
Display *dpy; Display *dpy,
Window w; Window w)
{ {
xPropWMHints *prop = NULL; xPropWMHints *prop = NULL;
register XWMHints *hints; register XWMHints *hints;
...@@ -147,19 +147,19 @@ XWMHints *XGetWMHints (dpy, w) ...@@ -147,19 +147,19 @@ XWMHints *XGetWMHints (dpy, w)
} }
Status Status
XGetZoomHints (dpy, w, zhints) XGetZoomHints (
Display *dpy; Display *dpy,
Window w; Window w,
XSizeHints *zhints; XSizeHints *zhints)
{ {
return (XGetSizeHints(dpy, w, zhints, XA_WM_ZOOM_HINTS)); return (XGetSizeHints(dpy, w, zhints, XA_WM_ZOOM_HINTS));
} }
Status Status
XGetNormalHints (dpy, w, hints) XGetNormalHints (
Display *dpy; Display *dpy,
Window w; Window w,
XSizeHints *hints; XSizeHints *hints)
{ {
return (XGetSizeHints(dpy, w, hints, XA_WM_NORMAL_HINTS)); return (XGetSizeHints(dpy, w, hints, XA_WM_NORMAL_HINTS));
} }
...@@ -170,11 +170,11 @@ XGetNormalHints (dpy, w, hints) ...@@ -170,11 +170,11 @@ XGetNormalHints (dpy, w, hints)
* ICONSIZE_ATOM type: ICONSIZE_ATOM format: 32 * ICONSIZE_ATOM type: ICONSIZE_ATOM format: 32
*/ */
Status XGetIconSizes (dpy, w, size_list, count) Status XGetIconSizes (
Display *dpy; Display *dpy,
Window w; /* typically, root */ Window w, /* typically, root */
XIconSize **size_list; /* RETURN */ XIconSize **size_list, /* RETURN */
int *count; /* RETURN number of items on the list */ int *count) /* RETURN number of items on the list */
{ {
xPropIconSize *prop = NULL; xPropIconSize *prop = NULL;
register xPropIconSize *pp; register xPropIconSize *pp;
...@@ -227,11 +227,11 @@ Status XGetIconSizes (dpy, w, size_list, count) ...@@ -227,11 +227,11 @@ Status XGetIconSizes (dpy, w, size_list, count)
} }
Status XGetCommand (dpy, w, argvp, argcp) Status XGetCommand (
Display *dpy; Display *dpy,
Window w; Window w,
char ***argvp; char ***argvp,
int *argcp; int *argcp)
{ {
XTextProperty tp; XTextProperty tp;
int argc; int argc;
...@@ -267,10 +267,10 @@ Status XGetCommand (dpy, w, argvp, argcp) ...@@ -267,10 +267,10 @@ Status XGetCommand (dpy, w, argvp, argcp)
Status Status
XGetTransientForHint(dpy, w, propWindow) XGetTransientForHint(
Display *dpy; Display *dpy,
Window w; Window w,
Window *propWindow; Window *propWindow)
{ {
Atom actual_type; Atom actual_type;
int actual_format; int actual_format;
...@@ -297,10 +297,10 @@ XGetTransientForHint(dpy, w, propWindow) ...@@ -297,10 +297,10 @@ XGetTransientForHint(dpy, w, propWindow)
} }
Status Status
XGetClassHint(dpy, w, classhint) XGetClassHint(
Display *dpy; Display *dpy,
Window w; Window w,
XClassHint *classhint; /* RETURN */ XClassHint *classhint) /* RETURN */
{ {
int len_name, len_class; int len_name, len_class;
......
...@@ -30,10 +30,10 @@ in this Software without prior written authorization from The Open Group. ...@@ -30,10 +30,10 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h" #include "Xlibint.h"
int int
XGetInputFocus(dpy, focus, revert_to) XGetInputFocus(
register Display *dpy; register Display *dpy,
Window *focus; Window *focus,
int *revert_to; int *revert_to)
{ {
xGetInputFocusReply rep; xGetInputFocusReply rep;
register xReq *req; register xReq *req;
......
...@@ -43,13 +43,15 @@ static unsigned int Ones( /* HACKMEM 169 */ ...@@ -43,13 +43,15 @@ static unsigned int Ones( /* HACKMEM 169 */
return ((unsigned int) (((y + (y >> 3)) & 030707070707) % 077)); return ((unsigned int) (((y + (y >> 3)) & 030707070707) % 077));
} }
XImage *XGetImage (dpy, d, x, y, width, height, plane_mask, format) XImage *XGetImage (
register Display *dpy; register Display *dpy,
Drawable d; Drawable d,
int x, y; int x,
unsigned int width, height; int y,
unsigned long plane_mask; unsigned int width,
int format; /* either XYPixmap or ZPixmap */ unsigned int height,
unsigned long plane_mask,
int format) /* either XYPixmap or ZPixmap */
{ {
xGetImageReply rep; xGetImageReply rep;
register xGetImageReq *req; register xGetImageReq *req;
...@@ -102,16 +104,18 @@ XImage *XGetImage (dpy, d, x, y, width, height, plane_mask, format) ...@@ -102,16 +104,18 @@ XImage *XGetImage (dpy, d, x, y, width, height, plane_mask, format)
return (image); return (image);
} }
XImage *XGetSubImage(dpy, d, x, y, width, height, plane_mask, format, XImage *XGetSubImage(
dest_image, dest_x, dest_y) register Display *dpy,
register Display *dpy; Drawable d,
Drawable d; int x,
int x, y; int y,
unsigned int width, height; unsigned int width,
unsigned long plane_mask; unsigned int height,
int format; /* either XYPixmap or ZPixmap */ unsigned long plane_mask,
XImage *dest_image; int format, /* either XYPixmap or ZPixmap */
int dest_x, dest_y; XImage *dest_image,
int dest_x,
int dest_y)
{ {
XImage *temp_image; XImage *temp_image;
temp_image = XGetImage(dpy, d, x, y, width, height, temp_image = XGetImage(dpy, d, x, y, width, height,
......
...@@ -30,10 +30,10 @@ in this Software without prior written authorization from The Open Group. ...@@ -30,10 +30,10 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h" #include "Xlibint.h"
int int
XGetKeyboardControl (dpy, state) XGetKeyboardControl (
register Display *dpy; register Display *dpy,
register XKeyboardState *state; register XKeyboardState *state)
{ {
xGetKeyboardControlReply rep; xGetKeyboardControlReply rep;
register xReq *req; register xReq *req;
LockDisplay(dpy); LockDisplay(dpy);
......
...@@ -29,11 +29,12 @@ in this Software without prior written authorization from The Open Group. ...@@ -29,11 +29,12 @@ in this Software without prior written authorization from The Open Group.
#endif #endif
#include "Xlibint.h" #include "Xlibint.h"
XTimeCoord *XGetMotionEvents(dpy, w, start, stop, nEvents) XTimeCoord *XGetMotionEvents(
register Display *dpy; register Display *dpy,
Time start, stop; Window w,
Window w; Time start,
int *nEvents; /* RETURN */ Time stop,
int *nEvents) /* RETURN */
{ {
xGetMotionEventsReply rep; xGetMotionEventsReply rep;
register xGetMotionEventsReq *req; register xGetMotionEventsReq *req;
......
...@@ -60,12 +60,12 @@ from The Open Group. ...@@ -60,12 +60,12 @@ from The Open Group.
#include <nx-X11/Xutil.h> #include <nx-X11/Xutil.h>
#include <stdio.h> #include <stdio.h>
Status XGetWMSizeHints (dpy, w, hints, supplied, property) Status XGetWMSizeHints (
Display *dpy; Display *dpy,
Window w; Window w,
XSizeHints *hints; XSizeHints *hints,
long *supplied; long *supplied,
Atom property; Atom property)
{ {
xPropSizeHints *prop = NULL; xPropSizeHints *prop = NULL;
Atom actual_type; Atom actual_type;
...@@ -117,11 +117,11 @@ Status XGetWMSizeHints (dpy, w, hints, supplied, property) ...@@ -117,11 +117,11 @@ Status XGetWMSizeHints (dpy, w, hints, supplied, property)
} }
Status XGetWMNormalHints (dpy, w, hints, supplied) Status XGetWMNormalHints (
Display *dpy; Display *dpy,
Window w; Window w,
XSizeHints *hints; XSizeHints *hints,
long *supplied; long *supplied)
{ {
return (XGetWMSizeHints (dpy, w, hints, supplied, XA_WM_NORMAL_HINTS)); return (XGetWMSizeHints (dpy, w, hints, supplied, XA_WM_NORMAL_HINTS));
} }
...@@ -30,11 +30,12 @@ in this Software without prior written authorization from The Open Group. ...@@ -30,11 +30,12 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h" #include "Xlibint.h"
int int
XGetPointerControl(dpy, accel_numer, accel_denom, threshold) XGetPointerControl(
register Display *dpy; register Display *dpy,
/* the following are return only vars */ /* the following are return only vars */
int *accel_numer, *accel_denom; int *accel_numer,
int *threshold; int *accel_denom,
int *threshold)
{ {
xGetPointerControlReply rep; xGetPointerControlReply rep;
xReq *req; xReq *req;
......
...@@ -35,10 +35,10 @@ in this Software without prior written authorization from The Open Group. ...@@ -35,10 +35,10 @@ in this Software without prior written authorization from The Open Group.
#endif #endif
#define MIN(a, b) ((a) < (b) ? (a) : (b)) #define MIN(a, b) ((a) < (b) ? (a) : (b))
int XGetPointerMapping (dpy, map, nmaps) int XGetPointerMapping (
register Display *dpy; register Display *dpy,
unsigned char *map; /* RETURN */ unsigned char *map, /* RETURN */
int nmaps; int nmaps)
{ {
unsigned char mapping[256]; /* known fixed size */ unsigned char mapping[256]; /* known fixed size */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment