summaryrefslogtreecommitdiff
path: root/src/XRecord.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/XRecord.c')
-rw-r--r--src/XRecord.c61
1 files changed, 30 insertions, 31 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;