diff options
author | Alan Coopersmith <alan.coopersmith@sun.com> | 2007-06-06 14:23:17 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@sun.com> | 2007-06-06 14:23:17 -0700 |
commit | dab4830b8db0d3cf5db5e96b2b870e94a48330bc (patch) | |
tree | 48a2112d246dea28b4a6f1f1e4fc8c5a35c12c11 | |
parent | 57a201a15637cfea6c15a4d0ed8b629c9cd49495 (diff) |
ANSIfy static function declarations (clears some lint warnings)
-rw-r--r-- | src/XRecord.c | 61 | ||||
-rw-r--r-- | src/XTest.c | 21 |
2 files changed, 40 insertions, 42 deletions
diff --git a/src/XRecord.c b/src/XRecord.c index 16eaeff..191a504 100644 --- a/src/XRecord.c +++ b/src/XRecord.c @@ -74,7 +74,7 @@ static /* const */ char *xrecord_extension_name = RECORD_NAME; * * **************************************************************************/ -static XExtDisplayInfo *find_display(); +static XExtDisplayInfo *find_display(Display *dpy); /* * A reply buffer holds a reply from RecordEnableContext. @@ -118,9 +118,9 @@ struct mem_cache_str Bool display_closed; /* so we know when to free ourself */ }; -static int close_display(dpy, codes) - Display *dpy; - XExtCodes *codes; /* not used */ +static int close_display( + Display *dpy, + XExtCodes *codes) /* not used */ { XExtDisplayInfo *info = find_display (dpy); @@ -161,7 +161,7 @@ static int close_display(dpy, codes) return XextRemoveDisplay(xrecord_info, dpy); } -static XPointer alloc_mem_cache() +static XPointer alloc_mem_cache(void) { struct mem_cache_str *cache; @@ -176,7 +176,7 @@ static XPointer alloc_mem_cache() return (XPointer) cache; } -static char *xrecord_error_list[] = { +static const char *xrecord_error_list[] = { "XRecordBadContext (Not a defined RECORD context)", }; @@ -208,10 +208,10 @@ static XEXT_GENERATE_FIND_DISPLAY (find_display, xrecord_info, **************************************************************************/ static void -SendRange(dpy, range_item, nranges) - Display *dpy; - XRecordRange **range_item; - int nranges; +SendRange( + Display *dpy, + XRecordRange **range_item, + int nranges) { int rlen = SIZEOF(xRecordRange); while(nranges--) @@ -391,9 +391,9 @@ XRecordUnregisterClients(dpy, context, clients, nclients) } static void -WireToLibRange(wire_range, lib_range) - xRecordRange *wire_range; - XRecordRange *lib_range; +WireToLibRange( + xRecordRange *wire_range, + XRecordRange *lib_range) { lib_range->core_requests.first = wire_range->coreRequestsFirst; lib_range->core_requests.last = wire_range->coreRequestsLast; @@ -534,9 +534,9 @@ XRecordFreeState(state) Xfree(state); } -static struct reply_buffer *alloc_reply_buffer(info, nbytes) - XExtDisplayInfo *info; - int nbytes; +static struct reply_buffer *alloc_reply_buffer( + XExtDisplayInfo *info, + int nbytes) { struct mem_cache_str *cache = (struct mem_cache_str *)info->data; struct reply_buffer *rbp; @@ -582,8 +582,7 @@ static struct reply_buffer *alloc_reply_buffer(info, nbytes) return rbp; } -static XRecordInterceptData *alloc_inter_data(info) - XExtDisplayInfo *info; +static XRecordInterceptData *alloc_inter_data(XExtDisplayInfo *info) { struct mem_cache_str *cache = (struct mem_cache_str *)info->data; struct intercept_queue *iq; @@ -728,13 +727,13 @@ XRecordFreeData(data) enum parser_return { Continue, End, Error }; static enum parser_return -parse_reply_call_callback(dpy, info, rep, reply, callback, closure) - Display *dpy; - XExtDisplayInfo *info; - xRecordEnableContextReply *rep; - struct reply_buffer *reply; - XRecordInterceptProc callback; - XPointer closure; +parse_reply_call_callback( + Display *dpy, + XExtDisplayInfo *info, + xRecordEnableContextReply *rep, + struct reply_buffer *reply, + XRecordInterceptProc callback, + XPointer closure) { int current_index; int datum_bytes = 0; @@ -916,12 +915,12 @@ typedef struct _record_async_state } record_async_state; static Bool -record_async_handler(dpy, rep, buf, len, adata) - register Display *dpy; - register xReply *rep; - char *buf; - int len; - XPointer adata; +record_async_handler( + register Display *dpy, + register xReply *rep, + char *buf, + int len, + XPointer adata) { register record_async_state *state = (record_async_state *)adata; struct reply_buffer *reply; diff --git a/src/XTest.c b/src/XTest.c index 2c3ae2b..eccf1fb 100644 --- a/src/XTest.c +++ b/src/XTest.c @@ -58,7 +58,7 @@ static /* const */ char *xtest_extension_name = XTestExtensionName; * * *****************************************************************************/ -static int close_display(); +static int close_display(Display *dpy, XExtCodes *codes); static /* const */ XExtensionHooks xtest_extension_hooks = { NULL, /* create_gc */ NULL, /* copy_gc */ @@ -74,8 +74,7 @@ static /* const */ XExtensionHooks xtest_extension_hooks = { }; static XPointer -get_xinput_base(dpy) - Display *dpy; +get_xinput_base(Display *dpy) { int major_opcode, first_event, first_error; first_event = 0; @@ -272,14 +271,14 @@ XTestFakeRelativeMotionEvent(dpy, dx, dy, delay) } static void -send_axes(dpy, info, req, dev, first_axis, axes, n_axes) - Display *dpy; - XExtDisplayInfo *info; - xXTestFakeInputReq *req; - XDevice *dev; - int first_axis; - int *axes; - int n_axes; +send_axes( + Display *dpy, + XExtDisplayInfo *info, + xXTestFakeInputReq *req, + XDevice *dev, + int first_axis, + int *axes, + int n_axes) { deviceValuator ev; int n; |