On Sat, 10 May 2014 at 13:28:43 +0100, Carlos R. Mafra wrote: > On Sat, 10 May 2014 at 19:43:42 +0800, David Maciejak wrote: > > > > +void ROperateRectangle(RImage * image, int operation, int x0, int y0, > > Just a nitpick, "RImage *image" is preferred. > > All instances of such "* stuff" in function arguments in the repository > is my fault when converting the coding style to the linux kernel conventions > with indent a few years ago. 'indent' didn't screw this up when the type > is well-known (e.g. char, int etc), but considered it as a multiplication > otherwise. > > It should be possible to fix this with a script.
I wrote a script to do that and applied it (random choice) to src/icon.c I'd suggest that people could run this script on the files they are touching so that we can slowly fix this. Or I can apply this on the whole tree in a "flag day", with some days of warning in order not to break not-yet-submitted patches. >From 3515c4c63d729f8508d6c30cbedbf06c9c41df1e Mon Sep 17 00:00:00 2001 From: "Carlos R. Mafra" <crma...@gmail.com> Date: Sun, 18 May 2014 01:10:06 +0100 Subject: [PATCH] Coding style: Change 'foo * bar' to 'foo *bar' in function arguments Since 'foo' and 'bar' are not being multiplied... Done automatically with the sed script: /(/{ s/ \* \([a-zA-Z]\)/ *\1/g } Signed-off-by: Carlos R. Mafra <crma...@gmail.com> --- src/icon.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/icon.c b/src/icon.c index d297cbc..b5bb308 100644 --- a/src/icon.c +++ b/src/icon.c @@ -54,9 +54,9 @@ #define CACHE_ICON_PATH "/Library/WindowMaker/CachedPixmaps" #define ICON_BORDER 3 -static void miniwindowExpose(WObjDescriptor * desc, XEvent * event); -static void miniwindowMouseDown(WObjDescriptor * desc, XEvent * event); -static void miniwindowDblClick(WObjDescriptor * desc, XEvent * event); +static void miniwindowExpose(WObjDescriptor *desc, XEvent *event); +static void miniwindowMouseDown(WObjDescriptor *desc, XEvent *event); +static void miniwindowDblClick(WObjDescriptor *desc, XEvent *event); static WIcon *icon_create_core(WScreen *scr, int coord_x, int coord_y); @@ -199,7 +199,7 @@ static WIcon *icon_create_core(WScreen *scr, int coord_x, int coord_y) return icon; } -void wIconDestroy(WIcon * icon) +void wIconDestroy(WIcon *icon) { WCoreWindow *core = icon->core; WScreen *scr = core->screen_ptr; @@ -463,7 +463,7 @@ static RImage *get_wwindow_image_from_wmhints(WWindow *wwin, WIcon *icon) * Side effects: * New directories might be created. */ -char *wIconStore(WIcon * icon) +char *wIconStore(WIcon *icon) { char *path, *dir_path, *file; int len = 0; @@ -537,7 +537,7 @@ void wIconSetHighlited(WIcon *icon, Bool flag) update_icon_pixmap(icon); } -void wIconSelect(WIcon * icon) +void wIconSelect(WIcon *icon) { WScreen *scr = icon->core->screen_ptr; icon->selected = !icon->selected; @@ -785,7 +785,7 @@ void wIconPaint(WIcon *icon) /******************************************************************/ -static void miniwindowExpose(WObjDescriptor * desc, XEvent * event) +static void miniwindowExpose(WObjDescriptor *desc, XEvent *event) { /* Parameter not used, but tell the compiler that it is ok */ (void) event; @@ -793,7 +793,7 @@ static void miniwindowExpose(WObjDescriptor * desc, XEvent * event) wIconPaint(desc->parent); } -static void miniwindowDblClick(WObjDescriptor * desc, XEvent * event) +static void miniwindowDblClick(WObjDescriptor *desc, XEvent *event) { WIcon *icon = desc->parent; @@ -805,7 +805,7 @@ static void miniwindowDblClick(WObjDescriptor * desc, XEvent * event) wDeiconifyWindow(icon->owner); } -static void miniwindowMouseDown(WObjDescriptor * desc, XEvent * event) +static void miniwindowMouseDown(WObjDescriptor *desc, XEvent *event) { WIcon *icon = desc->parent; WWindow *wwin = icon->owner; -- 1.8.1.4 -- To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.