From e96f9f3869c6ea5803f5759bf1737547a46be22f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Mon, 19 Jul 2021 11:32:34 +0200 Subject: Change function declaration style This is a very sweeping change, but I feel that it is necessary. --- src/root.c | 60 +++++++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 45 insertions(+), 15 deletions(-) (limited to 'src/root.c') diff --git a/src/root.c b/src/root.c index 13f85e6..d824c89 100644 --- a/src/root.c +++ b/src/root.c @@ -27,7 +27,9 @@ static void RunRootCommand(const MenuAction *action); /*************************************************************************** ***************************************************************************/ -void InitializeRootMenu() { +void +InitializeRootMenu() +{ int x; @@ -39,7 +41,9 @@ void InitializeRootMenu() { /*************************************************************************** ***************************************************************************/ -void StartupRootMenu() { +void +StartupRootMenu() +{ int x, y; int found; @@ -63,12 +67,16 @@ void StartupRootMenu() { /*************************************************************************** ***************************************************************************/ -void ShutdownRootMenu() { +void +ShutdownRootMenu() +{ } /*************************************************************************** ***************************************************************************/ -void DestroyRootMenu() { +void +DestroyRootMenu() +{ int x, y; @@ -88,7 +96,9 @@ void DestroyRootMenu() { /*************************************************************************** ***************************************************************************/ -void SetRootMenu(const char *indexes, Menu *m) { +void +SetRootMenu(const char *indexes, Menu *m) +{ int x, y; int index; @@ -130,7 +140,9 @@ void SetRootMenu(const char *indexes, Menu *m) { /*************************************************************************** ***************************************************************************/ -int IsRootMenuDefined(int index) { +int +IsRootMenuDefined(int index) +{ if(index >= 0 && index < ROOT_MENU_COUNT && rootMenu[index]) { return 1; } else { @@ -140,7 +152,9 @@ int IsRootMenuDefined(int index) { /*************************************************************************** ***************************************************************************/ -void GetRootMenuSize(int index, int *width, int *height) { +void +GetRootMenuSize(int index, int *width, int *height) +{ if(!rootMenu[index]) { *width = 0; @@ -157,7 +171,9 @@ void GetRootMenuSize(int index, int *width, int *height) { /*************************************************************************** ***************************************************************************/ -int ShowRootMenu(int index, int x, int y) { +int +ShowRootMenu(int index, int x, int y) +{ if(!rootMenu[index]) { return 0; @@ -173,7 +189,9 @@ int ShowRootMenu(int index, int x, int y) { /*************************************************************************** ***************************************************************************/ -void PatchRootMenu(Menu *menu) { +void +PatchRootMenu(Menu *menu) +{ MenuItem *item; @@ -191,7 +209,9 @@ void PatchRootMenu(Menu *menu) { /*************************************************************************** ***************************************************************************/ -void UnpatchRootMenu(Menu *menu) { +void +UnpatchRootMenu(Menu *menu) +{ MenuItem *item; @@ -208,20 +228,26 @@ void UnpatchRootMenu(Menu *menu) { /*************************************************************************** ***************************************************************************/ -void ExitHandler(ClientNode *np) { +void +ExitHandler(ClientNode *np) +{ shouldExit = 1; } /*************************************************************************** ***************************************************************************/ -void Restart() { +void +Restart() +{ shouldRestart = 1; shouldExit = 1; } /*************************************************************************** ***************************************************************************/ -void Exit(int confirm) { +void +Exit(int confirm) +{ if(confirm) { ShowConfirmDialog(NULL, ExitHandler, "Exit JWM", @@ -234,7 +260,9 @@ void Exit(int confirm) { /*************************************************************************** ***************************************************************************/ -void RunRootCommand(const MenuAction *action) { +void +RunRootCommand(const MenuAction *action) +{ switch(action->type) { @@ -284,7 +312,9 @@ void RunRootCommand(const MenuAction *action) { /*************************************************************************** ***************************************************************************/ -void RunCommand(const char *command) { +void +RunCommand(const char *command) +{ char *displayString; char *str; -- cgit v1.2.3