diff options
author | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2009-01-30 20:41:31 -0200 |
---|---|---|
committer | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2009-01-30 20:41:31 -0200 |
commit | 3237cc5b45a41ffe93ebde10b1090a7f2db6f88e (patch) | |
tree | cf72fc42b228c96d517d5e5ba3abea3b4641122a /src | |
parent | 48544103324d1816139dfafe5873a11c88ee05b6 (diff) |
Janitor: ansification, make distcheck, compiler warnings.
Manual page generation, and xmlto handling, shamelessly cut&paste'd
from libXi/man/Makefile.am, so that make distcheck will work.
Diffstat (limited to 'src')
-rw-r--r-- | src/.gitignore | 6 | ||||
-rw-r--r-- | src/XRecord.c | 74 | ||||
-rw-r--r-- | src/XTest.c | 100 |
3 files changed, 48 insertions, 132 deletions
diff --git a/src/.gitignore b/src/.gitignore deleted file mode 100644 index 4fcb96e..0000000 --- a/src/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -.deps -.libs -libXtst.la -*.lo -Makefile -Makefile.in diff --git a/src/XRecord.c b/src/XRecord.c index 5d2623e..9c6fe87 100644 --- a/src/XRecord.c +++ b/src/XRecord.c @@ -251,16 +251,13 @@ SendRange( **************************************************************************/ XID -XRecordIdBaseMask(dpy) - Display *dpy; +XRecordIdBaseMask(Display *dpy) { return 0x1fffffff & ~dpy->resource_mask; } Status -XRecordQueryVersion (dpy, cmajor_return, cminor_return) - Display *dpy; - int *cmajor_return, *cminor_return; +XRecordQueryVersion(Display *dpy, int *cmajor_return, int *cminor_return) { XExtDisplayInfo *info = find_display (dpy); register xRecordQueryVersionReq *req; @@ -288,13 +285,9 @@ XRecordQueryVersion (dpy, cmajor_return, cminor_return) } XRecordContext -XRecordCreateContext(dpy, datum_flags, clients, nclients, ranges, nranges) - Display *dpy; - int datum_flags; - XRecordClientSpec *clients; - int nclients; - XRecordRange **ranges; - int nranges; +XRecordCreateContext(Display *dpy, int datum_flags, + XRecordClientSpec *clients, int nclients, + XRecordRange **ranges, int nranges) { XExtDisplayInfo *info = find_display (dpy); register xRecordCreateContextReq *req; @@ -322,20 +315,15 @@ XRecordCreateContext(dpy, datum_flags, clients, nclients, ranges, nranges) } XRecordRange * -XRecordAllocRange() +XRecordAllocRange(void) { return (XRecordRange*)Xcalloc(1, sizeof(XRecordRange)); } Status -XRecordRegisterClients(dpy, context, datum_flags, clients, nclients, ranges, nranges) - Display *dpy; - XRecordContext context; - int datum_flags; - XRecordClientSpec *clients; - int nclients; - XRecordRange **ranges; - int nranges; +XRecordRegisterClients(Display *dpy, XRecordContext context, int datum_flags, + XRecordClientSpec *clients, int nclients, + XRecordRange **ranges, int nranges) { XExtDisplayInfo *info = find_display (dpy); register xRecordRegisterClientsReq *req; @@ -363,11 +351,8 @@ XRecordRegisterClients(dpy, context, datum_flags, clients, nclients, ranges, nra } Status -XRecordUnregisterClients(dpy, context, clients, nclients) - Display *dpy; - XRecordContext context; - XRecordClientSpec *clients; - int nclients; +XRecordUnregisterClients(Display *dpy, XRecordContext context, + XRecordClientSpec *clients, int nclients) { XExtDisplayInfo *info = find_display (dpy); register xRecordUnregisterClientsReq *req; @@ -418,10 +403,8 @@ WireToLibRange( } Status -XRecordGetContext(dpy, context, state_return) - Display *dpy; - XRecordContext context; - XRecordState **state_return; +XRecordGetContext(Display *dpy, XRecordContext context, + XRecordState **state_return) { XExtDisplayInfo *info = find_display (dpy); register xRecordGetContextReq *req; @@ -519,8 +502,7 @@ XRecordGetContext(dpy, context, state_return) } void -XRecordFreeState(state) - XRecordState *state; +XRecordFreeState(XRecordState *state) { int i; @@ -608,8 +590,7 @@ static XRecordInterceptData *alloc_inter_data(XExtDisplayInfo *info) } void -XRecordFreeData(data) - XRecordInterceptData *data; +XRecordFreeData(XRecordInterceptData *data) { /* we can do this cast because that is what we really allocated */ struct intercept_queue *iq = (struct intercept_queue *)data; @@ -849,11 +830,8 @@ parse_reply_call_callback( } Status -XRecordEnableContext(dpy, context, callback, closure) - Display *dpy; - XRecordContext context; - XRecordInterceptProc callback; - XPointer closure; +XRecordEnableContext(Display *dpy, XRecordContext context, + XRecordInterceptProc callback, XPointer closure) { XExtDisplayInfo *info = find_display (dpy); register xRecordEnableContextReq *req; @@ -986,11 +964,8 @@ record_async_handler( * to get the rest. */ Status -XRecordEnableContextAsync(dpy, context, callback, closure) - Display *dpy; - XRecordContext context; - XRecordInterceptProc callback; - XPointer closure; +XRecordEnableContextAsync(Display *dpy, XRecordContext context, + XRecordInterceptProc callback, XPointer closure) { XExtDisplayInfo *info = find_display (dpy); register xRecordEnableContextReq *req; @@ -1059,16 +1034,13 @@ XRecordEnableContextAsync(dpy, context, callback, closure) } void -XRecordProcessReplies(dpy) - Display *dpy; +XRecordProcessReplies(Display *dpy) { (void) XPending(dpy); } Status -XRecordDisableContext(dpy, context) - Display *dpy; - XRecordContext context; +XRecordDisableContext(Display *dpy, XRecordContext context) { XExtDisplayInfo *info = find_display (dpy); register xRecordDisableContextReq *req; @@ -1086,9 +1058,7 @@ XRecordDisableContext(dpy, context) } Status -XRecordFreeContext(dpy, context) - Display *dpy; - XRecordContext context; +XRecordFreeContext(Display *dpy, XRecordContext context) { XExtDisplayInfo *info = find_display (dpy); register xRecordFreeContextReq *req; diff --git a/src/XTest.c b/src/XTest.c index 82ad52a..45f593e 100644 --- a/src/XTest.c +++ b/src/XTest.c @@ -97,11 +97,9 @@ static XEXT_GENERATE_CLOSE_DISPLAY (close_display, xtest_info) *****************************************************************************/ Bool -XTestQueryExtension (dpy, event_base_return, error_base_return, - major_return, minor_return) - Display *dpy; - int *event_base_return, *error_base_return; - int *major_return, *minor_return; +XTestQueryExtension (Display *dpy, + int *event_base_return, int *error_base_return, + int *major_return, int *minor_return) { XExtDisplayInfo *info = find_display (dpy); register xXTestGetVersionReq *req; @@ -132,10 +130,7 @@ XTestQueryExtension (dpy, event_base_return, error_base_return, } Bool -XTestCompareCursorWithWindow(dpy, window, cursor) - Display *dpy; - Window window; - Cursor cursor; +XTestCompareCursorWithWindow(Display *dpy, Window window, Cursor cursor) { XExtDisplayInfo *info = find_display (dpy); register xXTestCompareCursorReq *req; @@ -160,19 +155,14 @@ XTestCompareCursorWithWindow(dpy, window, cursor) } Bool -XTestCompareCurrentCursorWithWindow(dpy, window) - Display *dpy; - Window window; +XTestCompareCurrentCursorWithWindow(Display *dpy, Window window) { return XTestCompareCursorWithWindow(dpy, window, XTestCurrentCursor); } int -XTestFakeKeyEvent(dpy, keycode, is_press, delay) - Display *dpy; - unsigned int keycode; - Bool is_press; - unsigned long delay; +XTestFakeKeyEvent(Display *dpy, unsigned int keycode, + Bool is_press, unsigned long delay) { XExtDisplayInfo *info = find_display (dpy); register xXTestFakeInputReq *req; @@ -192,11 +182,8 @@ XTestFakeKeyEvent(dpy, keycode, is_press, delay) } int -XTestFakeButtonEvent(dpy, button, is_press, delay) - Display *dpy; - unsigned int button; - Bool is_press; - unsigned long delay; +XTestFakeButtonEvent(Display *dpy, unsigned int button, + Bool is_press, unsigned long delay) { XExtDisplayInfo *info = find_display (dpy); register xXTestFakeInputReq *req; @@ -216,11 +203,7 @@ XTestFakeButtonEvent(dpy, button, is_press, delay) } int -XTestFakeMotionEvent(dpy, screen, x, y, delay) - Display *dpy; - int screen; - int x, y; - unsigned long delay; +XTestFakeMotionEvent(Display *dpy, int screen, int x, int y, unsigned long delay) { XExtDisplayInfo *info = find_display (dpy); register xXTestFakeInputReq *req; @@ -246,10 +229,7 @@ XTestFakeMotionEvent(dpy, screen, x, y, delay) } int -XTestFakeRelativeMotionEvent(dpy, dx, dy, delay) - Display *dpy; - int dx, dy; - unsigned long delay; +XTestFakeRelativeMotionEvent(Display *dpy, int dx, int dy, unsigned long delay) { XExtDisplayInfo *info = find_display (dpy); register xXTestFakeInputReq *req; @@ -316,14 +296,9 @@ send_axes( } int -XTestFakeDeviceKeyEvent(dpy, dev, keycode, is_press, axes, n_axes, delay) - Display *dpy; - XDevice *dev; - unsigned int keycode; - Bool is_press; - int *axes; - int n_axes; - unsigned long delay; +XTestFakeDeviceKeyEvent(Display *dpy, XDevice *dev, + unsigned int keycode, Bool is_press, + int *axes, int n_axes, unsigned long delay) { XExtDisplayInfo *info = find_display (dpy); register xXTestFakeInputReq *req; @@ -347,14 +322,9 @@ XTestFakeDeviceKeyEvent(dpy, dev, keycode, is_press, axes, n_axes, delay) } int -XTestFakeDeviceButtonEvent(dpy, dev, button, is_press, axes, n_axes, delay) - Display *dpy; - XDevice *dev; - unsigned int button; - Bool is_press; - int *axes; - int n_axes; - unsigned long delay; +XTestFakeDeviceButtonEvent(Display *dpy, XDevice *dev, + unsigned int button, Bool is_press, + int *axes, int n_axes, unsigned long delay) { XExtDisplayInfo *info = find_display (dpy); register xXTestFakeInputReq *req; @@ -378,13 +348,8 @@ XTestFakeDeviceButtonEvent(dpy, dev, button, is_press, axes, n_axes, delay) } int -XTestFakeProximityEvent(dpy, dev, in_prox, axes, n_axes, delay) - Display *dpy; - XDevice *dev; - Bool in_prox; - int *axes; - int n_axes; - unsigned long delay; +XTestFakeProximityEvent(Display *dpy, XDevice *dev, Bool in_prox, + int *axes, int n_axes, unsigned long delay) { XExtDisplayInfo *info = find_display (dpy); register xXTestFakeInputReq *req; @@ -407,15 +372,9 @@ XTestFakeProximityEvent(dpy, dev, in_prox, axes, n_axes, delay) } int -XTestFakeDeviceMotionEvent(dpy, dev, is_relative, - first_axis, axes, n_axes, delay) - Display *dpy; - XDevice *dev; - Bool is_relative; - int first_axis; - int *axes; - int n_axes; - unsigned long delay; +XTestFakeDeviceMotionEvent(Display *dpy, XDevice *dev, + Bool is_relative, int first_axis, + int *axes, int n_axes, unsigned long delay) { XExtDisplayInfo *info = find_display (dpy); register xXTestFakeInputReq *req; @@ -437,9 +396,7 @@ XTestFakeDeviceMotionEvent(dpy, dev, is_relative, } int -XTestGrabControl(dpy, impervious) - Display *dpy; - Bool impervious; +XTestGrabControl(Display *dpy, Bool impervious) { XExtDisplayInfo *info = find_display (dpy); register xXTestGrabControlReq *req; @@ -457,17 +414,13 @@ XTestGrabControl(dpy, impervious) } void -XTestSetGContextOfGC(gc, gid) - GC gc; - GContext gid; +XTestSetGContextOfGC(GC gc, GContext gid) { gc->gid = gid; } void -XTestSetVisualIDOfVisual(visual, visualid) - Visual *visual; - VisualID visualid; +XTestSetVisualIDOfVisual(Visual *visual, VisualID visualid) { visual->visualid = visualid; } @@ -477,8 +430,7 @@ static xReq _dummy_request = { }; Status -XTestDiscard(dpy) - Display *dpy; +XTestDiscard(Display *dpy) { Bool something; register char *ptr; |