Commit a48386ce authored by Magnus Kessler's avatar Magnus Kessler Committed by Tilman Sauerbeck

Switched function definitions from K&R to ANSI style.

parent 605d3570
......@@ -32,14 +32,14 @@ in this Software without prior written authorization from The Open Group.
#endif
#include "Xlibint.h"
Status XAllocColorCells(dpy, cmap, contig, masks, nplanes, pixels, ncolors)
register Display *dpy;
Colormap cmap;
Bool contig;
unsigned int ncolors; /* CARD16 */
unsigned int nplanes; /* CARD16 */
unsigned long *masks; /* LISTofCARD32 */ /* RETURN */
unsigned long *pixels; /* LISTofCARD32 */ /* RETURN */
Status XAllocColorCells(
register Display *dpy,
Colormap cmap,
Bool contig,
unsigned long *masks, /* LISTofCARD32 */ /* RETURN */
unsigned int nplanes, /* CARD16 */
unsigned long *pixels, /* LISTofCARD32 */ /* RETURN */
unsigned int ncolors) /* CARD16 */
{
Status status;
......
......@@ -32,15 +32,18 @@ in this Software without prior written authorization from The Open Group.
#endif
#include "Xlibint.h"
Status XAllocColorPlanes(dpy, cmap, contig, pixels, ncolors, nreds, ngreens,
nblues, rmask, gmask, bmask)
register Display *dpy;
Colormap cmap;
Bool contig;
unsigned long *pixels; /* LISTofCARD32 */ /* RETURN */
int ncolors;
int nreds, ngreens, nblues;
unsigned long *rmask, *gmask, *bmask; /* CARD32 */ /* RETURN */
Status XAllocColorPlanes(
register Display *dpy,
Colormap cmap,
Bool contig,
unsigned long *pixels, /* LISTofCARD32 */ /* RETURN */
int ncolors,
int nreds,
int ngreens,
int nblues,
unsigned long *rmask,
unsigned long *gmask,
unsigned long *bmask) /* CARD32 */ /* RETURN */
{
xAllocColorPlanesReply rep;
Status status;
......
......@@ -32,10 +32,10 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XAllowEvents(dpy, mode, time)
register Display *dpy;
int mode;
Time time;
XAllowEvents(
register Display *dpy,
int mode,
Time time)
{
register xAllowEventsReq *req;
......
......@@ -32,8 +32,7 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XAutoRepeatOn (dpy)
register Display *dpy;
XAutoRepeatOn (register Display *dpy)
{
XKeyboardControl values;
values.auto_repeat_mode = AutoRepeatModeOn;
......@@ -42,8 +41,7 @@ register Display *dpy;
}
int
XAutoRepeatOff (dpy)
register Display *dpy;
XAutoRepeatOff (register Display *dpy)
{
XKeyboardControl values;
values.auto_repeat_mode = AutoRepeatModeOff;
......
......@@ -32,10 +32,10 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XSetWindowBackground(dpy, w, pixel)
register Display *dpy;
Window w;
unsigned long pixel;
XSetWindowBackground(
register Display *dpy,
Window w,
unsigned long pixel)
{
register xChangeWindowAttributesReq *req;
......
......@@ -35,10 +35,10 @@ from The Open Group.
#include "Xlibint.h"
int
XSetWindowBorderWidth(dpy, w, width)
Display *dpy;
Window w;
unsigned int width;
XSetWindowBorderWidth(
Display *dpy,
Window w,
unsigned int width)
{
unsigned long lwidth = width; /* must be CARD32 */
......
......@@ -32,9 +32,9 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XBell(dpy, percent)
register Display *dpy;
int percent;
XBell(
register Display *dpy,
int percent)
{
register xBellReq *req;
......
......@@ -32,10 +32,10 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XSetWindowBorder(dpy, w, pixel)
register Display *dpy;
Window w;
unsigned long pixel;
XSetWindowBorder(
register Display *dpy,
Window w,
unsigned long pixel)
{
register xChangeWindowAttributesReq *req;
......
......@@ -32,25 +32,21 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XEnableAccessControl(dpy)
register Display *dpy;
XEnableAccessControl(register Display *dpy)
{
return XSetAccessControl(dpy, EnableAccess);
}
int
XDisableAccessControl(dpy)
register Display *dpy;
XDisableAccessControl(register Display *dpy)
{
return XSetAccessControl(dpy, DisableAccess);
}
int
XSetAccessControl(dpy, mode)
register Display *dpy;
int mode;
XSetAccessControl(
register Display *dpy,
int mode)
{
register xSetAccessControlReq *req;
......
......@@ -32,11 +32,11 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XChangeActivePointerGrab(dpy, event_mask, curs, time)
register Display *dpy;
unsigned int event_mask; /* CARD16 */
Cursor curs;
Time time;
XChangeActivePointerGrab(
register Display *dpy,
unsigned int event_mask, /* CARD16 */
Cursor curs,
Time time)
{
register xChangeActivePointerGrabReq *req;
......
......@@ -32,10 +32,9 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XSetCloseDownMode(dpy, mode)
register Display *dpy;
int mode;
XSetCloseDownMode(
register Display *dpy,
int mode)
{
register xSetCloseDownModeReq *req;
......
......@@ -32,10 +32,10 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XSetWindowColormap(dpy, w, colormap)
register Display *dpy;
Window w;
Colormap colormap;
XSetWindowColormap(
register Display *dpy,
Window w,
Colormap colormap)
{
register xChangeWindowAttributesReq *req;
......
......@@ -33,11 +33,11 @@ in this Software without prior written authorization from The Open Group.
#include "Cr.h"
int
XChangeGC (dpy, gc, valuemask, values)
register Display *dpy;
GC gc;
unsigned long valuemask;
XGCValues *values;
XChangeGC (
register Display *dpy,
GC gc,
unsigned long valuemask,
XGCValues *values)
{
LockDisplay(dpy);
......
......@@ -32,10 +32,10 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XChangeKeyboardControl(dpy, mask, value_list)
register Display *dpy;
unsigned long mask;
XKeyboardControl *value_list;
XChangeKeyboardControl(
register Display *dpy,
unsigned long mask,
XKeyboardControl *value_list)
{
unsigned long values[8];
register unsigned long *value = values;
......
......@@ -32,11 +32,13 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XChangePointerControl(dpy, do_acc, do_thresh, acc_numerator,
acc_denominator, threshold)
register Display *dpy;
Bool do_acc, do_thresh;
int acc_numerator, acc_denominator, threshold;
XChangePointerControl(
register Display *dpy,
Bool do_acc,
Bool do_thresh,
int acc_numerator,
int acc_denominator,
int threshold)
{
register xChangePointerControlReq *req;
......
......@@ -32,10 +32,10 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XChangeSaveSet(dpy, win, mode)
register Display *dpy;
Window win;
int mode;
XChangeSaveSet(
register Display *dpy,
Window win,
int mode)
{
register xChangeSaveSetReq *req;
......@@ -49,17 +49,17 @@ int mode;
}
int
XAddToSaveSet(dpy, win)
register Display *dpy;
Window win;
XAddToSaveSet(
register Display *dpy,
Window win)
{
return XChangeSaveSet(dpy,win,SetModeInsert);
}
int
XRemoveFromSaveSet (dpy, win)
register Display *dpy;
Window win;
XRemoveFromSaveSet (
register Display *dpy,
Window win)
{
return XChangeSaveSet(dpy,win,SetModeDelete);
}
......@@ -38,11 +38,11 @@ in this Software without prior written authorization from The Open Group.
CWDontPropagate|CWColormap|CWCursor)
int
XChangeWindowAttributes (dpy, w, valuemask, attributes)
register Display *dpy;
Window w;
unsigned long valuemask;
XSetWindowAttributes *attributes;
XChangeWindowAttributes (
register Display *dpy,
Window w,
unsigned long valuemask,
XSetWindowAttributes *attributes)
{
register xChangeWindowAttributesReq *req;
......
......@@ -32,10 +32,11 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XResizeWindow(dpy, w, width, height)
register Display *dpy;
Window w;
unsigned int width, height;
XResizeWindow(
register Display *dpy,
Window w,
unsigned int width,
unsigned int height)
{
register xConfigureWindowReq *req;
......
......@@ -38,15 +38,15 @@ in this Software without prior written authorization from The Open Group.
* matches, return. If all else fails, tell the user no events found.
*/
Bool XCheckIfEvent (dpy, event, predicate, arg)
register Display *dpy;
Bool XCheckIfEvent (
register Display *dpy,
register XEvent *event, /* XEvent to be filled in. */
Bool (*predicate)(
Display* /* display */,
XEvent* /* event */,
char* /* arg */
); /* function to call */
register XEvent *event; /* XEvent to be filled in. */
char *arg;
), /* function to call */
char *arg)
{
register _XQEvent *prev, *qelt;
unsigned long qe_serial = 0;
......
......@@ -44,10 +44,10 @@ extern long const _Xevent_to_mask[];
* matches, return. If all else fails, tell the user no events found.
*/
Bool XCheckMaskEvent (dpy, mask, event)
register Display *dpy;
long mask; /* Selected event mask. */
register XEvent *event; /* XEvent to be filled in. */
Bool XCheckMaskEvent (
register Display *dpy,
long mask, /* Selected event mask. */
register XEvent *event) /* XEvent to be filled in. */
{
register _XQEvent *prev, *qelt;
unsigned long qe_serial = 0;
......
......@@ -38,10 +38,10 @@ in this Software without prior written authorization from The Open Group.
* matches, return. If all else fails, tell the user no events found.
*/
Bool XCheckTypedEvent (dpy, type, event)
register Display *dpy;
int type; /* Selected event type. */
register XEvent *event; /* XEvent to be filled in. */
Bool XCheckTypedEvent (
register Display *dpy,
int type, /* Selected event type. */
register XEvent *event) /* XEvent to be filled in. */
{
register _XQEvent *prev, *qelt;
unsigned long qe_serial = 0;
......
......@@ -38,11 +38,11 @@ in this Software without prior written authorization from The Open Group.
* matches, return. If all else fails, tell the user no events found.
*/
Bool XCheckTypedWindowEvent (dpy, w, type, event)
register Display *dpy;
Window w; /* Selected window. */
int type; /* Selected event type. */
register XEvent *event; /* XEvent to be filled in. */
Bool XCheckTypedWindowEvent (
register Display *dpy,
Window w, /* Selected window. */
int type, /* Selected event type. */
register XEvent *event) /* XEvent to be filled in. */
{
register _XQEvent *prev, *qelt;
unsigned long qe_serial = 0;
......
......@@ -43,11 +43,11 @@ extern long const _Xevent_to_mask[];
* matches, return. If all else fails, tell the user no events found.
*/
Bool XCheckWindowEvent (dpy, w, mask, event)
register Display *dpy;
Window w; /* Selected window. */
long mask; /* Selected event mask. */
register XEvent *event; /* XEvent to be filled in. */
Bool XCheckWindowEvent (
register Display *dpy,
Window w, /* Selected window. */
long mask, /* Selected event mask. */
register XEvent *event) /* XEvent to be filled in. */
{
register _XQEvent *prev, *qelt;
unsigned long qe_serial = 0;
......
......@@ -32,10 +32,10 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XCirculateSubwindows(dpy, w, direction)
register Display *dpy;
Window w;
int direction;
XCirculateSubwindows(
register Display *dpy,
Window w,
int direction)
{
register xCirculateWindowReq *req;
......
......@@ -32,9 +32,9 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XCirculateSubwindowsDown(dpy,w)
register Display *dpy;
Window w;
XCirculateSubwindowsDown(
register Display *dpy,
Window w)
{
register xCirculateWindowReq *req;
......
......@@ -32,9 +32,9 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XCirculateSubwindowsUp(dpy, w)
register Display *dpy;
Window w;
XCirculateSubwindowsUp(
register Display *dpy,
Window w)
{
register xCirculateWindowReq *req;
......
......@@ -32,9 +32,9 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XClearWindow(dpy, w)
register Display *dpy;
Window w;
XClearWindow(
register Display *dpy,
Window w)
{
register xClearAreaReq *req;
......
......@@ -32,12 +32,14 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XClearArea (dpy, w, x, y, width, height, exposures)
register Display *dpy;
Window w;
int x, y;
unsigned int width, height;
Bool exposures;
XClearArea (
register Display *dpy,
Window w,
int x,
int y,
unsigned int width,
unsigned int height,
Bool exposures)
{
register xClearAreaReq *req;
......
......@@ -32,11 +32,13 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XMoveResizeWindow(dpy, w, x, y, width, height)
register Display *dpy;
Window w;
int x, y;
unsigned int width, height;
XMoveResizeWindow(
register Display *dpy,
Window w,
int x,
int y,
unsigned int width,
unsigned int height)
{
register xConfigureWindowReq *req;
......
......@@ -32,12 +32,13 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XConvertSelection(dpy, selection, target, property, requestor, time)
register Display *dpy;
Atom selection, target;
Atom property;
Window requestor;
Time time;
XConvertSelection(
register Display *dpy,
Atom selection,
Atom target,
Atom property,
Window requestor,
Time time)
{
register xConvertSelectionReq *req;
......
......@@ -32,15 +32,17 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XCopyArea(dpy, src_drawable, dst_drawable, gc,
src_x, src_y, width, height,
dst_x, dst_y)
register Display *dpy;
Drawable src_drawable, dst_drawable;
GC gc;
int src_x, src_y;
unsigned int width, height;
int dst_x, dst_y;
XCopyArea(
register Display *dpy,
Drawable src_drawable,
Drawable dst_drawable,
GC gc,
int src_x,
int src_y,
unsigned int width,
unsigned int height,
int dst_x,
int dst_y)
{
register xCopyAreaReq *req;
......
......@@ -42,9 +42,9 @@ extern XcmsCmapRec * _XcmsCopyCmapRecAndFree(Display *dpy,
Colormap copy_cmap);
#endif
Colormap XCopyColormapAndFree(dpy, src_cmap)
register Display *dpy;
Colormap src_cmap;
Colormap XCopyColormapAndFree(
register Display *dpy,
Colormap src_cmap)
{
Colormap mid;
register xCopyColormapAndFreeReq *req;
......
......@@ -32,10 +32,11 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XCopyGC (dpy, srcGC, mask, destGC)
register Display *dpy;
unsigned long mask; /* which ones to set initially */
GC srcGC, destGC;
XCopyGC (
register Display *dpy,
GC srcGC,
unsigned long mask, /* which ones to set initially */
GC destGC)
{
register XGCValues *destgv = &destGC->values,
*srcgv = &srcGC->values;
......
......@@ -32,16 +32,18 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XCopyPlane(dpy, src_drawable, dst_drawable, gc,
src_x, src_y, width, height,
dst_x, dst_y, bit_plane)
register Display *dpy;
Drawable src_drawable, dst_drawable;
GC gc;
int src_x, src_y;
unsigned int width, height;
int dst_x, dst_y;
unsigned long bit_plane;
XCopyPlane(