From a9208d44e5123c2f688097c2833abba7e6bcfc71 Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade Date: Tue, 4 Mar 2008 18:51:25 -0300 Subject: libXScrnSaver ansification. Signed-off-by: Alan Coopersmith --- src/XScrnSaver.c | 138 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 76 insertions(+), 62 deletions(-) diff --git a/src/XScrnSaver.c b/src/XScrnSaver.c index d6ed0f4..8ccc44b 100644 --- a/src/XScrnSaver.c +++ b/src/XScrnSaver.c @@ -47,9 +47,23 @@ static /* const */ char *screen_saver_extension_name = ScreenSaverName; #define ScreenSaverSimpleCheckExtension(dpy,i) \ XextSimpleCheckExtension (dpy, i, screen_saver_extension_name) -static int close_display(); -static Bool wire_to_event(); -static Status event_to_wire(); +static int close_display( + Display * /* dpy */, + XExtCodes * /* codes */ +); + +static Bool wire_to_event( + Display * /* dpy */, + XEvent * /* re */, + xEvent * /* event */ +); + +static Status event_to_wire( + Display * /* dpy */, + XEvent * /* re */, + xEvent * /* event */ +); + static /* const */ XExtensionHooks screen_saver_extension_hooks = { NULL, /* create_gc */ NULL, /* copy_gc */ @@ -72,10 +86,10 @@ static XEXT_GENERATE_FIND_DISPLAY (find_display, screen_saver_info, static XEXT_GENERATE_CLOSE_DISPLAY (close_display, screen_saver_info) -static Bool wire_to_event (dpy, re, event) - Display *dpy; - XEvent *re; - xEvent *event; +static Bool wire_to_event ( + Display *dpy, + XEvent *re, + xEvent *event) { XExtDisplayInfo *info = find_display (dpy); XScreenSaverNotifyEvent *se; @@ -104,10 +118,10 @@ static Bool wire_to_event (dpy, re, event) return False; } -static Status event_to_wire (dpy, re, event) - Display *dpy; - XEvent *re; - xEvent *event; +static Status event_to_wire ( + Display *dpy, + XEvent *re, + xEvent *event) { XExtDisplayInfo *info = find_display (dpy); XScreenSaverNotifyEvent *se; @@ -140,9 +154,10 @@ static Status event_to_wire (dpy, re, event) * * ****************************************************************************/ -Bool XScreenSaverQueryExtension (dpy, event_basep, error_basep) - Display *dpy; - int *event_basep, *error_basep; +Bool XScreenSaverQueryExtension ( + Display *dpy, + int *event_basep, + int *error_basep) { XExtDisplayInfo *info = find_display (dpy); @@ -156,9 +171,10 @@ Bool XScreenSaverQueryExtension (dpy, event_basep, error_basep) } -Status XScreenSaverQueryVersion(dpy, major_versionp, minor_versionp) - Display *dpy; - int *major_versionp, *minor_versionp; +Status XScreenSaverQueryVersion( + Display *dpy, + int *major_versionp, + int *minor_versionp) { XExtDisplayInfo *info = find_display (dpy); xScreenSaverQueryVersionReply rep; @@ -184,15 +200,15 @@ Status XScreenSaverQueryVersion(dpy, major_versionp, minor_versionp) return 1; } -XScreenSaverInfo *XScreenSaverAllocInfo () +XScreenSaverInfo *XScreenSaverAllocInfo (void) { return (XScreenSaverInfo *) Xmalloc (sizeof (XScreenSaverInfo)); } -Status XScreenSaverQueryInfo (dpy, drawable, saver_info) - Display *dpy; - Drawable drawable; - XScreenSaverInfo *saver_info; +Status XScreenSaverQueryInfo ( + Display *dpy, + Drawable drawable, + XScreenSaverInfo *saver_info) { XExtDisplayInfo *info = find_display (dpy); xScreenSaverQueryInfoReply rep; @@ -221,10 +237,10 @@ Status XScreenSaverQueryInfo (dpy, drawable, saver_info) return 1; } -void XScreenSaverSelectInput (dpy, drawable, mask) - register Display *dpy; - Drawable drawable; - unsigned long mask; +void XScreenSaverSelectInput ( + register Display *dpy, + Drawable drawable, + unsigned long mask) { XExtDisplayInfo *info = find_display (dpy); register xScreenSaverSelectInputReq *req; @@ -242,11 +258,11 @@ void XScreenSaverSelectInput (dpy, drawable, mask) } static void -XScreenSaverProcessWindowAttributes (dpy, req, valuemask, attributes) - register Display *dpy; - xChangeWindowAttributesReq *req; - register unsigned long valuemask; - register XSetWindowAttributes *attributes; +XScreenSaverProcessWindowAttributes ( + register Display *dpy, + xChangeWindowAttributesReq *req, + register unsigned long valuemask, + register XSetWindowAttributes *attributes) { unsigned long values[32]; register unsigned long *value = values; @@ -304,21 +320,19 @@ XScreenSaverProcessWindowAttributes (dpy, req, valuemask, attributes) } -void XScreenSaverSetAttributes (dpy, drawable, x, y, width, height, - border_width, depth, class, visual, - valuemask, attributes) - Display* dpy; - Drawable drawable; - int x; - int y; - unsigned int width; - unsigned int height; - unsigned int border_width; - int depth; - unsigned int class; - Visual * visual; - unsigned long valuemask; - XSetWindowAttributes *attributes; +void XScreenSaverSetAttributes ( + Display *dpy, + Drawable drawable, + int x, + int y, + unsigned int width, + unsigned int height, + unsigned int border_width, + int depth, + unsigned int class, + Visual *visual, + unsigned long valuemask, + XSetWindowAttributes *attributes) { XExtDisplayInfo *info = find_display (dpy); register xScreenSaverSetAttributesReq *req; @@ -351,9 +365,9 @@ void XScreenSaverSetAttributes (dpy, drawable, x, y, width, height, } -void XScreenSaverUnsetAttributes (dpy, drawable) - register Display *dpy; - Drawable drawable; +void XScreenSaverUnsetAttributes ( + register Display *dpy, + Drawable drawable) { XExtDisplayInfo *info = find_display (dpy); register xScreenSaverUnsetAttributesReq *req; @@ -370,11 +384,11 @@ void XScreenSaverUnsetAttributes (dpy, drawable) } -Status XScreenSaverRegister (dpy, screen, xid, type) - Display *dpy; - int screen; - XID xid; - Atom type; +Status XScreenSaverRegister ( + Display *dpy, + int screen, + XID xid, + Atom type) { Atom prop; unsigned long ul; @@ -391,9 +405,9 @@ Status XScreenSaverRegister (dpy, screen, xid, type) -Status XScreenSaverUnregister (dpy, screen) - Display *dpy; - int screen; +Status XScreenSaverUnregister ( + Display *dpy, + int screen) { Atom prop; @@ -407,11 +421,11 @@ Status XScreenSaverUnregister (dpy, screen) -Status XScreenSaverGetRegistered (dpy, screen, xid, type) - Display *dpy; - int screen; - XID *xid; - Atom *type; +Status XScreenSaverGetRegistered ( + Display *dpy, + int screen, + XID *xid, + Atom *type) { Atom actual_type = None; int actual_format; -- cgit v1.2.3