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/border.c | 62 +++++++++++++++++------- src/button.c | 14 ++++-- src/client.c | 144 +++++++++++++++++++++++++++++++++++++++++-------------- src/clock.c | 46 +++++++++++++----- src/color.c | 82 +++++++++++++++++++++++-------- src/command.c | 40 ++++++++++++---- src/confirm.c | 56 ++++++++++++++++------ src/cursor.c | 72 +++++++++++++++++++++------- src/debug.c | 40 +++++++++++----- src/desktop.c | 40 ++++++++++++---- src/dock.c | 64 ++++++++++++++++++------- src/error.c | 16 +++++-- src/event.c | 92 ++++++++++++++++++++++++++--------- src/font.c | 34 +++++++++---- src/group.c | 54 +++++++++++++++------ src/help.c | 16 +++++-- src/hint.c | 88 +++++++++++++++++++++++++--------- src/icon.c | 54 +++++++++++++++------ src/image.c | 10 ++-- src/key.c | 66 ++++++++++++++++++------- src/lex.c | 24 +++++++--- src/main.c | 52 +++++++++++++++----- src/match.c | 8 +++- src/menu.c | 64 ++++++++++++++++++------- src/misc.c | 20 ++++++-- src/move.c | 88 ++++++++++++++++++++++++---------- src/outline.c | 24 +++++++--- src/pager.c | 40 ++++++++++++---- src/parse.c | 130 ++++++++++++++++++++++++++++++++++++------------- src/place.c | 60 +++++++++++++++++------ src/popup.c | 40 ++++++++++++---- src/resize.c | 30 ++++++++---- src/root.c | 60 +++++++++++++++++------ src/screen.c | 20 ++++++-- src/status.c | 54 +++++++++++++++------ src/swallow.c | 32 +++++++++---- src/taskbar.c | 108 ++++++++++++++++++++++++++++++----------- src/theme.c | 24 +++++++--- src/timing.c | 8 +++- src/tray.c | 144 +++++++++++++++++++++++++++++++++++++++++-------------- src/traybutton.c | 52 +++++++++++++++----- src/winmenu.c | 30 ++++++++---- 42 files changed, 1641 insertions(+), 561 deletions(-) diff --git a/src/border.c b/src/border.c index 8baf7b7..cfe6b93 100644 --- a/src/border.c +++ b/src/border.c @@ -63,12 +63,16 @@ static int DrawBorderButtons(const ClientNode *np, Pixmap canvas, GC gc); /**************************************************************************** ****************************************************************************/ -void InitializeBorders() { +void +InitializeBorders() +{ } /**************************************************************************** ****************************************************************************/ -void StartupBorders() { +void +StartupBorders() +{ XGCValues gcValues; unsigned long gcMask; @@ -98,7 +102,9 @@ void StartupBorders() { /**************************************************************************** ****************************************************************************/ -void ShutdownBorders() { +void +ShutdownBorders() +{ int x; @@ -112,18 +118,24 @@ void ShutdownBorders() { /**************************************************************************** ****************************************************************************/ -void DestroyBorders() { +void +DestroyBorders() +{ } /**************************************************************************** ****************************************************************************/ -int GetBorderIconSize() { +int +GetBorderIconSize() +{ return titleHeight - 4; } /**************************************************************************** ****************************************************************************/ -BorderActionType GetBorderActionType(const ClientNode *np, int x, int y) { +BorderActionType +GetBorderActionType(const ClientNode *np, int x, int y) +{ int north; int offset; @@ -230,7 +242,9 @@ BorderActionType GetBorderActionType(const ClientNode *np, int x, int y) { /**************************************************************************** ****************************************************************************/ -void DrawBorder(const ClientNode *np, const XExposeEvent *expose) { +void +DrawBorder(const ClientNode *np, const XExposeEvent *expose) +{ XRectangle rect; unsigned int width; @@ -332,8 +346,10 @@ void DrawBorder(const ClientNode *np, const XExposeEvent *expose) { /**************************************************************************** ****************************************************************************/ -void DrawBorderHelper(const ClientNode *np, - unsigned int width, unsigned int height, int drawIcon) { +void +DrawBorderHelper(const ClientNode *np, + unsigned int width, unsigned int height, int drawIcon) +{ ColorType borderTextColor; long borderPixel, borderTextPixel; @@ -517,8 +533,10 @@ void DrawBorderHelper(const ClientNode *np, /**************************************************************************** ****************************************************************************/ -void DrawButtonBorder(const ClientNode *np, int offset, - Pixmap canvas, GC gc) { +void +DrawButtonBorder(const ClientNode *np, int offset, + Pixmap canvas, GC gc) +{ long up, down; long bsize; @@ -551,7 +569,9 @@ void DrawButtonBorder(const ClientNode *np, int offset, /**************************************************************************** ****************************************************************************/ -int DrawBorderButtons(const ClientNode *np, Pixmap canvas, GC gc) { +int +DrawBorderButtons(const ClientNode *np, Pixmap canvas, GC gc) +{ Pixmap pixmap; int count = 0; @@ -653,7 +673,9 @@ int DrawBorderButtons(const ClientNode *np, Pixmap canvas, GC gc) { * may cause borders on the current desktop to become visible after moving * clients to their assigned desktops. ****************************************************************************/ -void ExposeCurrentDesktop() { +void +ExposeCurrentDesktop() +{ ClientNode *np; int layer; @@ -670,8 +692,10 @@ void ExposeCurrentDesktop() { /**************************************************************************** ****************************************************************************/ -void GetBorderSize(const ClientNode *np, - int *north, int *south, int *east, int *west) { +void +GetBorderSize(const ClientNode *np, + int *north, int *south, int *east, int *west) +{ Assert(np); Assert(north); @@ -712,7 +736,9 @@ void GetBorderSize(const ClientNode *np, /**************************************************************************** ****************************************************************************/ -void SetBorderWidth(const char *str) { +void +SetBorderWidth(const char *str) +{ int width; @@ -732,7 +758,9 @@ void SetBorderWidth(const char *str) { /**************************************************************************** ****************************************************************************/ -void SetTitleHeight(const char *str) { +void +SetTitleHeight(const char *str) +{ int height; diff --git a/src/button.c b/src/button.c index 0d62742..ca40644 100644 --- a/src/button.c +++ b/src/button.c @@ -16,7 +16,9 @@ static void GetScaledIconSize(IconNode *ip, int maxsize, /*************************************************************************** ***************************************************************************/ -void DrawButton(ButtonNode *bp) { +void +DrawButton(ButtonNode *bp) +{ long outlinePixel; long topPixel, bottomPixel; @@ -161,7 +163,9 @@ void DrawButton(ButtonNode *bp) { /*************************************************************************** ***************************************************************************/ -void ResetButton(ButtonNode *bp, Drawable d, GC g) { +void +ResetButton(ButtonNode *bp, Drawable d, GC g) +{ Assert(bp); @@ -181,8 +185,10 @@ void ResetButton(ButtonNode *bp, Drawable d, GC g) { /*************************************************************************** ***************************************************************************/ -void GetScaledIconSize(IconNode *ip, int maxsize, - int *width, int *height) { +void +GetScaledIconSize(IconNode *ip, int maxsize, + int *width, int *height) +{ double ratio; diff --git a/src/client.c b/src/client.c index 14c214c..df66b5b 100644 --- a/src/client.c +++ b/src/client.c @@ -44,11 +44,15 @@ static void RestoreTransients(ClientNode *np, int raise); static void KillClientHandler(ClientNode *np); /** Initialize client data. */ -void InitializeClients() { +void +InitializeClients() +{ } /** Load windows that are already mapped. */ -void StartupClients() { +void +StartupClients() +{ XWindowAttributes attr; Window rootReturn, parentReturn, *childrenReturn; @@ -89,7 +93,9 @@ void StartupClients() { } /** Release client windows. */ -void ShutdownClients() { +void +ShutdownClients() +{ int x; @@ -102,11 +108,15 @@ void ShutdownClients() { } /** Destroy client data. */ -void DestroyClients() { +void +DestroyClients() +{ } /** Set the focus to the window currently under the mouse pointer. */ -void LoadFocus() { +void +LoadFocus() +{ ClientNode *np; Window rootReturn, childReturn; @@ -261,7 +271,9 @@ ClientNode *AddClientWindow(Window w, int alreadyMapped, int notOwner) { } /** Minimize a client window and all of its transients. */ -void MinimizeClient(ClientNode *np) { +void +MinimizeClient(ClientNode *np) +{ Assert(np); @@ -277,7 +289,9 @@ void MinimizeClient(ClientNode *np) { } /** Minimize all transients as well as the specified client. */ -void MinimizeTransients(ClientNode *np) { +void +MinimizeTransients(ClientNode *np) +{ ClientNode *tp; int x; @@ -313,7 +327,9 @@ void MinimizeTransients(ClientNode *np) { } /** Shade a client. */ -void ShadeClient(ClientNode *np) { +void +ShadeClient(ClientNode *np) +{ int north, south, east, west; @@ -347,7 +363,9 @@ void ShadeClient(ClientNode *np) { } /** Unshade a client. */ -void UnshadeClient(ClientNode *np) { +void +UnshadeClient(ClientNode *np) +{ int bsize; @@ -385,7 +403,9 @@ void UnshadeClient(ClientNode *np) { } /** Set a client's state to withdrawn. */ -void SetClientWithdrawn(ClientNode *np) { +void +SetClientWithdrawn(ClientNode *np) +{ Assert(np); @@ -415,7 +435,9 @@ void SetClientWithdrawn(ClientNode *np) { } /** Restore a window with its transients (helper method). */ -void RestoreTransients(ClientNode *np, int raise) { +void +RestoreTransients(ClientNode *np, int raise) +{ ClientNode *tp; int x; @@ -455,7 +477,9 @@ void RestoreTransients(ClientNode *np, int raise) { } /** Restore a client window and its transients. */ -void RestoreClient(ClientNode *np, int raise) { +void +RestoreClient(ClientNode *np, int raise) +{ Assert(np); @@ -468,7 +492,9 @@ void RestoreClient(ClientNode *np, int raise) { } /** Set the client layer. This will affect transients. */ -void SetClientLayer(ClientNode *np, unsigned int layer) { +void +SetClientLayer(ClientNode *np, unsigned int layer) +{ ClientNode *tp, *next; int x; @@ -532,7 +558,9 @@ void SetClientLayer(ClientNode *np, unsigned int layer) { } /** Set a client's sticky status. This will update transients. */ -void SetClientSticky(ClientNode *np, int isSticky) { +void +SetClientSticky(ClientNode *np, int isSticky) +{ ClientNode *tp; int old; @@ -585,7 +613,9 @@ void SetClientSticky(ClientNode *np, int isSticky) { } /** Set a client's desktop. This will update transients. */ -void SetClientDesktop(ClientNode *np, unsigned int desktop) { +void +SetClientDesktop(ClientNode *np, unsigned int desktop) +{ ClientNode *tp; int x; @@ -621,7 +651,9 @@ void SetClientDesktop(ClientNode *np, unsigned int desktop) { } /** Hide a client without unmapping. This will NOT update transients. */ -void HideClient(ClientNode *np) { +void +HideClient(ClientNode *np) +{ Assert(np); @@ -636,7 +668,9 @@ void HideClient(ClientNode *np) { } /** Show a hidden client. This will NOT update transients. */ -void ShowClient(ClientNode *np) { +void +ShowClient(ClientNode *np) +{ Assert(np); @@ -653,7 +687,9 @@ void ShowClient(ClientNode *np) { } /** Maximize a client window. */ -void MaximizeClient(ClientNode *np) { +void +MaximizeClient(ClientNode *np) +{ int north, south, east, west; @@ -693,7 +729,9 @@ void MaximizeClient(ClientNode *np) { } /** Set a client's full screen state. */ -void SetClientFullScreen(ClientNode *np, int fullScreen) { +void +SetClientFullScreen(ClientNode *np, int fullScreen) +{ XEvent event; int north, south, east, west; @@ -752,7 +790,9 @@ void SetClientFullScreen(ClientNode *np, int fullScreen) { } /** Set the active client. */ -void FocusClient(ClientNode *np) { +void +FocusClient(ClientNode *np) +{ Assert(np); @@ -791,7 +831,9 @@ void FocusClient(ClientNode *np) { } /** Focus the next client in the stacking order. */ -void FocusNextStacked(ClientNode *np) { +void +FocusNextStacked(ClientNode *np) +{ int x; ClientNode *tp; @@ -818,7 +860,9 @@ void FocusNextStacked(ClientNode *np) { } /** Refocus the active client (if there is one). */ -void RefocusClient() { +void +RefocusClient() +{ if(activeClient) { FocusClient(activeClient); @@ -827,7 +871,9 @@ void RefocusClient() { } /** Send a delete message to a client. */ -void DeleteClient(ClientNode *np) { +void +DeleteClient(ClientNode *np) +{ ClientProtocolType protocols; @@ -844,7 +890,9 @@ void DeleteClient(ClientNode *np) { } /** Callback to kill a client after a confirm dialog. */ -void KillClientHandler(ClientNode *np) { +void +KillClientHandler(ClientNode *np) +{ Assert(np); @@ -865,7 +913,9 @@ void KillClientHandler(ClientNode *np) { } /** Kill a client window. */ -void KillClient(ClientNode *np) { +void +KillClient(ClientNode *np) +{ Assert(np); @@ -876,7 +926,9 @@ void KillClient(ClientNode *np) { } /** Move the cursor to the middle of the client. **/ -void MoveMouseToClient(ClientNode *np) { +void +MoveMouseToClient(ClientNode *np) +{ int height, width, x, y; @@ -898,7 +950,9 @@ void MoveMouseToClient(ClientNode *np) { } /** Raise the client. This will affect transients. */ -void RaiseClient(ClientNode *np) { +void +RaiseClient(ClientNode *np) +{ ClientNode *tp, *next; int x; @@ -956,7 +1010,9 @@ void RaiseClient(ClientNode *np) { } /** Lower the client. This will not affect transients. */ -void LowerClient(ClientNode *np) { +void +LowerClient(ClientNode *np) +{ ClientNode *tp; @@ -988,7 +1044,9 @@ void LowerClient(ClientNode *np) { } /** Restack the clients according the way we want them. */ -void RestackClients() { +void +RestackClients() +{ TrayType *tp; ClientNode *np; @@ -1039,7 +1097,9 @@ void RestackClients() { } /** Send a client message to a window. */ -void SendClientMessage(Window w, AtomType type, AtomType message) { +void +SendClientMessage(Window w, AtomType type, AtomType message) +{ XEvent event; int status; @@ -1061,7 +1121,9 @@ void SendClientMessage(Window w, AtomType type, AtomType message) { /** Set the border shape for windows using the shape extension. */ #ifdef USE_SHAPE -void SetShape(ClientNode *np) { +void +SetShape(ClientNode *np) +{ XRectangle rect[4]; int north, south, east, west; @@ -1126,7 +1188,9 @@ void SetShape(ClientNode *np) { #endif /* USE_SHAPE */ /** Remove a client window from management. */ -void RemoveClient(ClientNode *np) { +void +RemoveClient(ClientNode *np) +{ ColormapNode *cp; @@ -1248,7 +1312,9 @@ ClientNode *FindClientByParent(Window p) { } /** Reparent a client window. */ -void ReparentClient(ClientNode *np, int notOwner) { +void +ReparentClient(ClientNode *np, int notOwner) +{ XSetWindowAttributes attr; int attrMask; @@ -1352,7 +1418,9 @@ void ReparentClient(ClientNode *np, int notOwner) { /** Determine if a window uses the shape extension. */ #ifdef USE_SHAPE -void CheckShape(ClientNode *np) { +void +CheckShape(ClientNode *np) +{ int xb, yb; int xc, yc; @@ -1371,7 +1439,9 @@ void CheckShape(ClientNode *np) { #endif /** Send a configure event to a client window. */ -void SendConfigureEvent(ClientNode *np) { +void +SendConfigureEvent(ClientNode *np) +{ XConfigureEvent event; const ScreenType *sp; @@ -1409,7 +1479,9 @@ void SendConfigureEvent(ClientNode *np) { * client changed. This will change the active colormap(s) if the given * client is active. */ -void UpdateClientColormap(ClientNode *np) { +void +UpdateClientColormap(ClientNode *np) +{ XWindowAttributes attr; ColormapNode *cp; diff --git a/src/clock.c b/src/clock.c index 147c1f6..27e0064 100644 --- a/src/clock.c +++ b/src/clock.c @@ -56,12 +56,16 @@ static void ProcessClockMotionEvent(TrayComponentType *cp, static void DrawClock(ClockType *clk, const TimeType *now, int x, int y); /** Initialize clocks. */ -void InitializeClock() { +void +InitializeClock() +{ clocks = NULL; } /** Start clock(s). */ -void StartupClock() { +void +StartupClock() +{ ClockType *clk; @@ -77,11 +81,15 @@ void StartupClock() { } /** Stop clock(s). */ -void ShutdownClock() { +void +ShutdownClock() +{ } /** Destroy clock(s). */ -void DestroyClock() { +void +DestroyClock() +{ ClockType *cp; @@ -150,7 +158,9 @@ TrayComponentType *CreateClock(const char *format, const char *command, } /** Initialize a clock tray component. */ -void Create(TrayComponentType *cp) { +void +Create(TrayComponentType *cp) +{ ClockType *clk; @@ -169,7 +179,9 @@ void Create(TrayComponentType *cp) { } /** Resize a clock tray component. */ -void Resize(TrayComponentType *cp) { +void +Resize(TrayComponentType *cp) +{ ClockType *clk; TimeType now; @@ -197,7 +209,9 @@ void Resize(TrayComponentType *cp) { } /** Destroy a clock tray component. */ -void Destroy(TrayComponentType *cp) { +void +Destroy(TrayComponentType *cp) +{ ClockType *clk; @@ -213,7 +227,9 @@ void Destroy(TrayComponentType *cp) { } /** Process a click event on a clock tray component. */ -void ProcessClockButtonEvent(TrayComponentType *cp, int x, int y, int mask) { +void +ProcessClockButtonEvent(TrayComponentType *cp, int x, int y, int mask) +{ ClockType *clk; @@ -230,8 +246,10 @@ void ProcessClockButtonEvent(TrayComponentType *cp, int x, int y, int mask) { } /** Process a motion event on a clock tray component. */ -void ProcessClockMotionEvent(TrayComponentType *cp, - int x, int y, int mask) { +void +ProcessClockMotionEvent(TrayComponentType *cp, + int x, int y, int mask) +{ Assert(cp); @@ -243,7 +261,9 @@ void ProcessClockMotionEvent(TrayComponentType *cp, } /** Update a clock tray component. */ -void SignalClock(const TimeType *now, int x, int y) { +void +SignalClock(const TimeType *now, int x, int y) +{ ClockType *cp; int shouldDraw; @@ -282,7 +302,9 @@ void SignalClock(const TimeType *now, int x, int y) { } /** Draw a clock tray component. */ -void DrawClock(ClockType *clk, const TimeType *now, int x, int y) { +void +DrawClock(ClockType *clk, const TimeType *now, int x, int y) +{ TrayComponentType *cp; const char *shortTime; diff --git a/src/color.c b/src/color.c index edf5f7a..1ed527e 100644 --- a/src/color.c +++ b/src/color.c @@ -86,13 +86,17 @@ static void DarkenColor(ColorType oldColor, ColorType newColor); /**************************************************************************** ****************************************************************************/ -void InitializeColors() { +void +InitializeColors() +{ } /**************************************************************************** ****************************************************************************/ -void StartupColors() { +void +StartupColors() +{ int x; int red, green, blue; @@ -206,7 +210,9 @@ void StartupColors() { /**************************************************************************** ****************************************************************************/ -void ShutdownColors() { +void +ShutdownColors() +{ #ifdef USE_XFT @@ -232,7 +238,9 @@ void ShutdownColors() { /**************************************************************************** ****************************************************************************/ -void DestroyColors() { +void +DestroyColors() +{ int x; @@ -250,8 +258,10 @@ void DestroyColors() { /**************************************************************************** ****************************************************************************/ -void ComputeShiftMask(unsigned long maskIn, - unsigned long *shiftOut, unsigned long *maskOut) { +void +ComputeShiftMask(unsigned long maskIn, + unsigned long *shiftOut, unsigned long *maskOut) +{ int shift; @@ -276,7 +286,9 @@ void ComputeShiftMask(unsigned long maskIn, /**************************************************************************** ****************************************************************************/ -unsigned long GetRGBFromXColor(const XColor *c) { +unsigned long +GetRGBFromXColor(const XColor *c) +{ float red, green, blue; unsigned long rgb; @@ -297,7 +309,9 @@ unsigned long GetRGBFromXColor(const XColor *c) { /**************************************************************************** ****************************************************************************/ -XColor GetXColorFromRGB(unsigned long rgb) { +XColor +GetXColorFromRGB(unsigned long rgb) +{ XColor ret = { 0 }; @@ -312,7 +326,9 @@ XColor GetXColorFromRGB(unsigned long rgb) { /**************************************************************************** ****************************************************************************/ -void SetColor(ColorType c, const char *value) { +void +SetColor(ColorType c, const char *value) +{ if(!value) { Warning("empty color tag"); @@ -331,7 +347,9 @@ void SetColor(ColorType c, const char *value) { /**************************************************************************** ****************************************************************************/ -int ParseColor(ColorType type, const char *value) { +int +ParseColor(ColorType type, const char *value) +{ XColor temp; unsigned long rgb; @@ -362,7 +380,9 @@ int ParseColor(ColorType type, const char *value) { /**************************************************************************** ****************************************************************************/ -void SetDefaultColor(ColorType type) { +void +SetDefaultColor(ColorType type) +{ int x; @@ -377,7 +397,9 @@ void SetDefaultColor(ColorType type) { /**************************************************************************** ****************************************************************************/ -void InitializeNames() { +void +InitializeNames() +{ int x; @@ -392,7 +414,9 @@ void InitializeNames() { /**************************************************************************** ****************************************************************************/ -unsigned long ReadHex(const char *hex) { +unsigned long +ReadHex(const char *hex) +{ unsigned long value = 0; int x; @@ -416,7 +440,9 @@ unsigned long ReadHex(const char *hex) { /**************************************************************************** ****************************************************************************/ -void LightenColor(ColorType oldColor, ColorType newColor) { +void +LightenColor(ColorType oldColor, ColorType newColor) +{ XColor temp; float red, green, blue; @@ -444,7 +470,9 @@ void LightenColor(ColorType oldColor, ColorType newColor) { /**************************************************************************** ****************************************************************************/ -void DarkenColor(ColorType oldColor, ColorType newColor) { +void +DarkenColor(ColorType oldColor, ColorType newColor) +{ XColor temp; float red, green, blue; @@ -472,7 +500,9 @@ void DarkenColor(ColorType oldColor, ColorType newColor) { /*************************************************************************** ***************************************************************************/ -int GetColorByName(const char *str, XColor *c) { +int +GetColorByName(const char *str, XColor *c) +{ Assert(str); Assert(c); @@ -490,7 +520,9 @@ int GetColorByName(const char *str, XColor *c) { /*************************************************************************** * Compute the RGB components from an index into our RGB colormap. ***************************************************************************/ -void GetColorFromIndex(XColor *c) { +void +GetColorFromIndex(XColor *c) +{ unsigned long red; unsigned long green; @@ -511,7 +543,9 @@ void GetColorFromIndex(XColor *c) { /*************************************************************************** * Compute the pixel value from RGB components. ***************************************************************************/ -void GetDirectPixel(XColor *c) { +void +GetDirectPixel(XColor *c) +{ unsigned long red; unsigned long green; @@ -537,7 +571,9 @@ void GetDirectPixel(XColor *c) { /*************************************************************************** * Compute the pixel value from RGB components. ***************************************************************************/ -void GetMappedPixel(XColor *c) { +void +GetMappedPixel(XColor *c) +{ Assert(c); @@ -549,7 +585,9 @@ void GetMappedPixel(XColor *c) { /*************************************************************************** * Compute the pixel value from RGB components. ***************************************************************************/ -void GetColor(XColor *c) { +void +GetColor(XColor *c) +{ Assert(c); Assert(rootVisual); @@ -572,7 +610,9 @@ void GetColor(XColor *c) { * we have a linear RGB colormap even if we don't. * This prevents calls to XQueryColor later. ***************************************************************************/ -void GetColorIndex(XColor *c) { +void +GetColorIndex(XColor *c) +{ Assert(c); diff --git a/src/command.c b/src/command.c index b82498d..5f47126 100644 --- a/src/command.c +++ b/src/command.c @@ -28,14 +28,18 @@ static void ReleaseCommands(CommandNode **commands); static void AddCommand(CommandNode **commands, const char *command); /** Initialize the command lists. */ -void InitializeCommands() { +void +InitializeCommands() +{ startupCommands = NULL; shutdownCommands = NULL; restartCommands = NULL; } /** Process startup/restart commands. */ -void StartupCommands() { +void +StartupCommands() +{ if(isRestarting) { RunCommands(restartCommands); @@ -46,7 +50,9 @@ void StartupCommands() { } /** Process shutdown commands. */ -void ShutdownCommands() { +void +ShutdownCommands() +{ if(!shouldRestart) { RunCommands(shutdownCommands); @@ -55,14 +61,18 @@ void ShutdownCommands() { } /** Destroy the command lists. */ -void DestroyCommands() { +void +DestroyCommands() +{ ReleaseCommands(&startupCommands); ReleaseCommands(&shutdownCommands); ReleaseCommands(&restartCommands); } /** Run the commands in a command list. */ -void RunCommands(CommandNode *commands) { +void +RunCommands(CommandNode *commands) +{ CommandNode *cp; @@ -73,7 +83,9 @@ void RunCommands(CommandNode *commands) { } /** Release a command list. */ -void ReleaseCommands(CommandNode **commands) { +void +ReleaseCommands(CommandNode **commands) +{ CommandNode *cp; @@ -89,7 +101,9 @@ void ReleaseCommands(CommandNode **commands) { } /** Add a command to a command list. */ -void AddCommand(CommandNode **commands, const char *command) { +void +AddCommand(CommandNode **commands, const char *command) +{ CommandNode *cp; @@ -108,17 +122,23 @@ void AddCommand(CommandNode **commands, const char *command) { } /** Add a startup command. */ -void AddStartupCommand(const char *command) { +void +AddStartupCommand(const char *command) +{ AddCommand(&startupCommands, command); } /** Add a shutdown command. */ -void AddShutdownCommand(const char *command) { +void +AddShutdownCommand(const char *command) +{ AddCommand(&shutdownCommands, command); } /** Add a restart command. */ -void AddRestartCommand(const char *command) { +void +AddRestartCommand(const char *command) +{ AddCommand(&restartCommands, command); } diff --git a/src/confirm.c b/src/confirm.c index e71735a..fc89aec 100644 --- a/src/confirm.c +++ b/src/confirm.c @@ -62,15 +62,21 @@ static int HandleDialogButtonRelease(const XButtonEvent *event); static int HandleDialogKey(const XKeyEvent *event); /** Initialize the dialog processing data. */ -void InitializeDialogs() { +void +InitializeDialogs() +{ } /** Startup dialog processing. */ -void StartupDialogs() { +void +StartupDialogs() +{ } /** Stop dialog processing. */ -void ShutdownDialogs() { +void +ShutdownDialogs() +{ while(dialogList) { DestroyConfirmDialog(dialogList); @@ -79,11 +85,15 @@ void ShutdownDialogs() { } /** Destroy dialog processing data. */ -void DestroyDialogs() { +void +DestroyDialogs() +{ } /** Handle an event on a dialog window. */ -int ProcessDialogEvent(const XEvent *event) { +int +ProcessDialogEvent(const XEvent *event) +{ int handled = 0; @@ -106,7 +116,9 @@ int ProcessDialogEvent(const XEvent *event) { } /** Handle an expose event. */ -int HandleDialogExpose(const XExposeEvent *event) { +int +HandleDialogExpose(const XExposeEvent *event) +{ DialogType *dp; @@ -122,7 +134,9 @@ int HandleDialogExpose(const XExposeEvent *event) { } /** Handle a mouse button release event. */ -int HandleDialogButtonRelease(const XButtonEvent *event) { +int +HandleDialogButtonRelease(const XButtonEvent *event) +{ DialogType *dp; int x, y; @@ -160,7 +174,9 @@ int HandleDialogButtonRelease(const XButtonEvent *event) { } /** Handle a key release event. */ -int HandleDialogKey(const XKeyEvent *event) { +int +HandleDialogKey(const XKeyEvent *event) +{ static int enter = 0; ClientNode *np; @@ -275,7 +291,9 @@ void ShowConfirmDialog(ClientNode *np, void (*action)(ClientNode*), ...) { } /** Draw a confirm dialog. */ -void DrawConfirmDialog(DialogType *dp) { +void +DrawConfirmDialog(DialogType *dp) +{ Assert(dp); @@ -285,7 +303,9 @@ void DrawConfirmDialog(DialogType *dp) { } /** Destroy a confirm dialog. */ -void DestroyConfirmDialog(DialogType *dp) { +void +DestroyConfirmDialog(DialogType *dp) +{ int x; @@ -315,7 +335,9 @@ void DestroyConfirmDialog(DialogType *dp) { } /** Compute the size of a dialog window. */ -void ComputeDimensions(DialogType *dp) { +void +ComputeDimensions(DialogType *dp) +{ const ScreenType *sp; int width; @@ -373,7 +395,9 @@ void ComputeDimensions(DialogType *dp) { } /** Display the message on the dialog window. */ -void DrawMessage(DialogType *dp) { +void +DrawMessage(DialogType *dp) +{ int yoffset; int x; @@ -390,7 +414,9 @@ void DrawMessage(DialogType *dp) { } /** Draw the buttons on the dialog window. */ -void DrawButtons(DialogType *dp) { +void +DrawButtons(DialogType *dp) +{ ButtonNode button; int temp; @@ -431,7 +457,9 @@ void DrawButtons(DialogType *dp) { #else /* DISABLE_CONFIRM */ /** Process an event on a dialog window. */ -int ProcessDialogEvent(const XEvent *event) { +int +ProcessDialogEvent(const XEvent *event) +{ return 0; } diff --git a/src/cursor.c b/src/cursor.c index b4a6ca7..53641f7 100644 --- a/src/cursor.c +++ b/src/cursor.c @@ -28,12 +28,16 @@ static int mousey; /**************************************************************************** ****************************************************************************/ -void InitializeCursors() { +void +InitializeCursors() +{ } /**************************************************************************** ****************************************************************************/ -void StartupCursors() { +void +StartupCursors() +{ Window win1, win2; int winx, winy; @@ -58,13 +62,17 @@ void StartupCursors() { /**************************************************************************** ****************************************************************************/ -Cursor CreateCursor(unsigned int shape) { +Cursor +CreateCursor(unsigned int shape) +{ return JXCreateFontCursor(display, shape); } /**************************************************************************** ****************************************************************************/ -void ShutdownCursors() { +void +ShutdownCursors() +{ JXFreeCursor(display, defaultCursor); JXFreeCursor(display, moveCursor); @@ -82,12 +90,16 @@ void ShutdownCursors() { /**************************************************************************** ****************************************************************************/ -void DestroyCursors() { +void +DestroyCursors() +{ } /**************************************************************************** ****************************************************************************/ -Cursor GetFrameCursor(BorderActionType action) { +Cursor +GetFrameCursor(BorderActionType action) +{ switch(action & 0x0F) { case BA_RESIZE: @@ -109,7 +121,9 @@ Cursor GetFrameCursor(BorderActionType action) { /**************************************************************************** ****************************************************************************/ -Cursor GetResizeCursor(BorderActionType action) { +Cursor +GetResizeCursor(BorderActionType action) +{ if(action & BA_RESIZE_N) { if(action & BA_RESIZE_E) { @@ -139,7 +153,9 @@ Cursor GetResizeCursor(BorderActionType action) { /**************************************************************************** ****************************************************************************/ -int GrabMouseForResize(BorderActionType action) { +int +GrabMouseForResize(BorderActionType action) +{ Cursor cur; int result; @@ -160,7 +176,9 @@ int GrabMouseForResize(BorderActionType action) { /**************************************************************************** ****************************************************************************/ -int GrabMouseForMove() { +int +GrabMouseForMove() +{ int result; @@ -182,7 +200,9 @@ int GrabMouseForMove() { /**************************************************************************** ****************************************************************************/ -int GrabMouseForMenu() { +int +GrabMouseForMenu() +{ int result; @@ -200,7 +220,9 @@ int GrabMouseForMenu() { /**************************************************************************** ****************************************************************************/ -int GrabMouseForChoose() { +int +GrabMouseForChoose() +{ int result; @@ -218,7 +240,9 @@ int GrabMouseForChoose() { /**************************************************************************** ****************************************************************************/ -void SetDefaultCursor(Window w) { +void +SetDefaultCursor(Window w) +{ JXDefineCursor(display, w, defaultCursor); @@ -226,7 +250,9 @@ void SetDefaultCursor(Window w) { /**************************************************************************** ****************************************************************************/ -void MoveMouse(Window win, int x, int y) { +void +MoveMouse(Window win, int x, int y) +{ Window win1, win2; int winx, winy; @@ -241,7 +267,9 @@ void MoveMouse(Window win, int x, int y) { /**************************************************************************** ****************************************************************************/ -void SetMousePosition(int x, int y) { +void +SetMousePosition(int x, int y) +{ mousex = x; mousey = y; @@ -250,7 +278,9 @@ void SetMousePosition(int x, int y) { /**************************************************************************** ****************************************************************************/ -void GetMousePosition(int *x, int *y) { +void +GetMousePosition(int *x, int *y) +{ Assert(x); Assert(y); @@ -262,7 +292,9 @@ void GetMousePosition(int *x, int *y) { /**************************************************************************** ****************************************************************************/ -unsigned int GetMouseMask() { +unsigned int +GetMouseMask() +{ Window win1, win2; int winx, winy; @@ -277,7 +309,9 @@ unsigned int GetMouseMask() { /**************************************************************************** ****************************************************************************/ -void SetDoubleClickSpeed(const char *str) { +void +SetDoubleClickSpeed(const char *str) +{ int speed; @@ -295,7 +329,9 @@ void SetDoubleClickSpeed(const char *str) { /**************************************************************************** ****************************************************************************/ -void SetDoubleClickDelta(const char *str) { +void +SetDoubleClickDelta(const char *str) +{ int delta; diff --git a/src/debug.c b/src/debug.c index 6527abd..4c64ff1 100644 --- a/src/debug.c +++ b/src/debug.c @@ -22,7 +22,9 @@ /*************************************************************************** * Emit a message. ***************************************************************************/ -void Debug(const char *str, ...) { +void +Debug(const char *str, ...) +{ #ifdef DEBUG va_list ap; va_start(ap, str); @@ -74,7 +76,9 @@ static void DEBUG_PrintResourceStack(ResourceType *rp); /*************************************************************************** * Start the debugger. ***************************************************************************/ -void DEBUG_StartDebug(const char *file, unsigned int line) { +void +DEBUG_StartDebug(const char *file, unsigned int line) +{ int x; Debug("%s[%u]: debug mode started", file, line); @@ -90,7 +94,9 @@ void DEBUG_StartDebug(const char *file, unsigned int line) { /*************************************************************************** * Stop the debugger. ***************************************************************************/ -void DEBUG_StopDebug(const char *file, unsigned int line) { +void +DEBUG_StopDebug(const char *file, unsigned int line) +{ MemoryType *mp; ResourceType *rp; unsigned int count = 0; @@ -128,7 +134,9 @@ void DEBUG_StopDebug(const char *file, unsigned int line) { /*************************************************************************** * Print the resource allocation/release stacks for a resource. ***************************************************************************/ -void DEBUG_PrintResourceStack(ResourceType *rp) { +void +DEBUG_PrintResourceStack(ResourceType *rp) +{ unsigned int x, offset; Debug(" Allocation stack: (oldest)"); @@ -154,7 +162,9 @@ void DEBUG_PrintResourceStack(ResourceType *rp) { /*************************************************************************** * Set a checkpoint. ***************************************************************************/ -void DEBUG_SetCheckpoint(const char *file, unsigned int line) { +void +DEBUG_SetCheckpoint(const char *file, unsigned int line) +{ checkpointFile[checkpointOffset] = file; checkpointLine[checkpointOffset] = line; @@ -166,7 +176,9 @@ void DEBUG_SetCheckpoint(const char *file, unsigned int line) { /*************************************************************************** * Display the location of the last checkpoint. ***************************************************************************/ -void DEBUG_ShowCheckpoint() { +void +DEBUG_ShowCheckpoint() +{ int x, offset; Debug("CHECKPOINT LIST (oldest)"); @@ -284,7 +296,9 @@ void *DEBUG_Reallocate(void *ptr, size_t size, const char *file, /*************************************************************************** * Release memory and log. ***************************************************************************/ -void DEBUG_Release(void **ptr, const char *file, unsigned int line) { +void +DEBUG_Release(void **ptr, const char *file, unsigned int line) +{ MemoryType *mp, *last; if(!ptr) { @@ -328,8 +342,10 @@ void DEBUG_Release(void **ptr, const char *file, unsigned int line) { /*************************************************************************** * Add a resource. ***************************************************************************/ -void DEBUG_AllocateResource(int resource, const char *file, - unsigned int line) { +void +DEBUG_AllocateResource(int resource, const char *file, + unsigned int line) +{ ResourceType *rp; @@ -363,8 +379,10 @@ void DEBUG_AllocateResource(int resource, const char *file, /*************************************************************************** * Remove a resource. ***************************************************************************/ -void DEBUG_ReleaseResource(int resource, const char *file, - unsigned int line) { +void +DEBUG_ReleaseResource(int resource, const char *file, + unsigned int line) +{ ResourceType *rp; diff --git a/src/desktop.c b/src/desktop.c index 1d09050..ea8bad7 100644 --- a/src/desktop.c +++ b/src/desktop.c @@ -18,12 +18,16 @@ static int showingDesktop; /*************************************************************************** ***************************************************************************/ -void InitializeDesktops() { +void +InitializeDesktops() +{ } /*************************************************************************** ***************************************************************************/ -void StartupDesktops() { +void +StartupDesktops() +{ unsigned int x; @@ -46,12 +50,16 @@ void StartupDesktops() { /*************************************************************************** ***************************************************************************/ -void ShutdownDesktops() { +void +ShutdownDesktops() +{ } /*************************************************************************** ***************************************************************************/ -void DestroyDesktops() { +void +DestroyDesktops() +{ unsigned int x; @@ -67,13 +75,17 @@ void DestroyDesktops() { /*************************************************************************** ***************************************************************************/ -void NextDesktop() { +void +NextDesktop() +{ ChangeDesktop((currentDesktop + 1) % desktopCount); } /*************************************************************************** ***************************************************************************/ -void PreviousDesktop() { +void +PreviousDesktop() +{ if(currentDesktop > 0) { ChangeDesktop(currentDesktop - 1); } else { @@ -83,7 +95,9 @@ void PreviousDesktop() { /*************************************************************************** ***************************************************************************/ -void ChangeDesktop(unsigned int desktop) { +void +ChangeDesktop(unsigned int desktop) +{ ClientNode *np; unsigned int x; @@ -165,7 +179,9 @@ Menu *CreateDesktopMenu(unsigned int mask) { /*************************************************************************** ***************************************************************************/ -void ShowDesktop() { +void +ShowDesktop() +{ ClientNode *np; int layer; @@ -194,7 +210,9 @@ void ShowDesktop() { /*************************************************************************** ***************************************************************************/ -void SetDesktopCount(const char *str) { +void +SetDesktopCount(const char *str) +{ if(!str) { Warning("invalid desktop count"); @@ -211,7 +229,9 @@ void SetDesktopCount(const char *str) { /*************************************************************************** ***************************************************************************/ -void SetDesktopName(unsigned int desktop, const char *str) { +void +SetDesktopName(unsigned int desktop, const char *str) +{ unsigned int x; diff --git a/src/dock.c b/src/dock.c index 289e85f..01db3af 100644 --- a/src/dock.c +++ b/src/dock.c @@ -60,11 +60,15 @@ static int UndockWindow(Window win); static void UpdateDock(); /** Initialize dock data. */ -void InitializeDock() { +void +InitializeDock() +{ } /** Startup the dock. */ -void StartupDock() { +void +StartupDock() +{ char *selectionName; @@ -107,7 +111,9 @@ void StartupDock() { } /** Shutdown the dock. */ -void ShutdownDock() { +void +ShutdownDock() +{ DockNode *np; @@ -149,7 +155,9 @@ void ShutdownDock() { } /** Destroy dock data. */ -void DestroyDock() { +void +DestroyDock() +{ if(dock) { if(shouldRestart) { @@ -191,7 +199,9 @@ TrayComponentType *CreateDock() { } /** Set the size of a dock component. */ -void SetSize(TrayComponentType *cp, int width, int height) { +void +SetSize(TrayComponentType *cp, int width, int height) +{ int count; DockNode *np; @@ -225,7 +235,9 @@ void SetSize(TrayComponentType *cp, int width, int height) { } /** Initialize a dock component. */ -void Create(TrayComponentType *cp) { +void +Create(TrayComponentType *cp) +{ XEvent event; Atom orientationAtom; @@ -283,7 +295,9 @@ void Create(TrayComponentType *cp) { } /** Resize a dock component. */ -void Resize(TrayComponentType *cp) { +void +Resize(TrayComponentType *cp) +{ Assert(cp); @@ -293,7 +307,9 @@ void Resize(TrayComponentType *cp) { } /** Handle a dock event. */ -void HandleDockEvent(const XClientMessageEvent *event) { +void +HandleDockEvent(const XClientMessageEvent *event) +{ Assert(event); @@ -313,7 +329,9 @@ void HandleDockEvent(const XClientMessageEvent *event) { } /** Handle a resize request event. */ -int HandleDockResizeRequest(const XResizeRequestEvent *event) { +int +HandleDockResizeRequest(const XResizeRequestEvent *event) +{ DockNode *np; @@ -337,7 +355,9 @@ int HandleDockResizeRequest(const XResizeRequestEvent *event) { } /** Handle a configure request event. */ -int HandleDockConfigureRequest(const XConfigureRequestEvent *event) { +int +HandleDockConfigureRequest(const XConfigureRequestEvent *event) +{ XWindowChanges wc; DockNode *np; @@ -368,7 +388,9 @@ int HandleDockConfigureRequest(const XConfigureRequestEvent *event) { } /** Handle a reparent notify event. */ -int HandleDockReparentNotify(const XReparentEvent *event) { +int +HandleDockReparentNotify(const XReparentEvent *event) +{ DockNode *np; int handled; @@ -406,7 +428,9 @@ int HandleDockReparentNotify(const XReparentEvent *event) { } /** Handle a destroy event. */ -int HandleDockDestroy(Window win) { +int +HandleDockDestroy(Window win) +{ if(dock) { return UndockWindow(win); @@ -417,7 +441,9 @@ int HandleDockDestroy(Window win) { } /** Handle a selection clear event. */ -int HandleDockSelectionClear(const XSelectionClearEvent *event) { +int +HandleDockSelectionClear(const XSelectionClearEvent *event) +{ if(event->selection == dockAtom) { Debug("lost _NET_SYSTEM_TRAY selection"); @@ -429,7 +455,9 @@ int HandleDockSelectionClear(const XSelectionClearEvent *event) { } /** Add a window to the dock. */ -void DockWindow(Window win) { +void +DockWindow(Window win) +{ DockNode *np; @@ -486,7 +514,9 @@ void DockWindow(Window win) { } /** Remove a window from the dock. */ -int UndockWindow(Window win) { +int +UndockWindow(Window win) +{ DockNode *np; DockNode *last; @@ -531,7 +561,9 @@ int UndockWindow(Window win) { } /** Layout items on the dock. */ -void UpdateDock() { +void +UpdateDock() +{ XWindowAttributes attr; DockNode *np; diff --git a/src/error.c b/src/error.c index a4b1277..af634a0 100644 --- a/src/error.c +++ b/src/error.c @@ -12,7 +12,9 @@ #include "main.h" /** Log a fatal error and exit. */ -void FatalError(const char *str, ...) { +void +FatalError(const char *str, ...) +{ va_list ap; va_start(ap, str); @@ -30,7 +32,9 @@ void FatalError(const char *str, ...) { } /** Log a warning. */ -void Warning(const char *str, ...) { +void +Warning(const char *str, ...) +{ va_list ap; va_start(ap, str); @@ -44,7 +48,9 @@ void Warning(const char *str, ...) { } /** Log a warning. */ -void WarningVA(const char *part, const char *str, va_list ap) { +void +WarningVA(const char *part, const char *str, va_list ap) +{ Assert(str); @@ -62,7 +68,9 @@ void WarningVA(const char *part, const char *str, va_list ap) { * much output can cause a dead lock (this happens on HP-UX). Therefore * ShowCheckpoint isn't used by default. */ -int ErrorHandler(Display *d, XErrorEvent *e) { +int +ErrorHandler(Display *d, XErrorEvent *e) +{ #ifdef DEBUG diff --git a/src/event.c b/src/event.c index e95aee8..b508a1e 100644 --- a/src/event.c +++ b/src/event.c @@ -64,7 +64,9 @@ static void HandleShapeEvent(const XShapeEvent *event); /**************************************************************************** ****************************************************************************/ -void WaitForEvent(XEvent *event) { +void +WaitForEvent(XEvent *event) +{ struct timeval timeout; fd_set fds; @@ -175,7 +177,9 @@ void WaitForEvent(XEvent *event) { /**************************************************************************** ****************************************************************************/ -void Signal() { +void +Signal() +{ static TimeType last = ZERO_TIME; @@ -201,7 +205,9 @@ void Signal() { /**************************************************************************** ****************************************************************************/ -void ProcessEvent(XEvent *event) { +void +ProcessEvent(XEvent *event) +{ switch(event->type) { case ButtonPress: @@ -236,7 +242,9 @@ void ProcessEvent(XEvent *event) { /**************************************************************************** ****************************************************************************/ -void DiscardMotionEvents(XEvent *event, Window w) { +void +DiscardMotionEvents(XEvent *event, Window w) +{ XEvent temp; @@ -251,7 +259,9 @@ void DiscardMotionEvents(XEvent *event, Window w) { /**************************************************************************** ****************************************************************************/ -int HandleSelectionClear(const XSelectionClearEvent *event) { +int +HandleSelectionClear(const XSelectionClearEvent *event) +{ return HandleDockSelectionClear(event); @@ -259,7 +269,9 @@ int HandleSelectionClear(const XSelectionClearEvent *event) { /**************************************************************************** ****************************************************************************/ -void HandleButtonEvent(const XButtonEvent *event) { +void +HandleButtonEvent(const XButtonEvent *event) +{ int x, y; ClientNode *np; @@ -341,7 +353,9 @@ void HandleButtonEvent(const XButtonEvent *event) { /**************************************************************************** ****************************************************************************/ -void HandleKeyPress(const XKeyEvent *event) { +void +HandleKeyPress(const XKeyEvent *event) +{ ClientNode *np; KeyType key; @@ -450,7 +464,9 @@ void HandleKeyPress(const XKeyEvent *event) { /**************************************************************************** ****************************************************************************/ -void HandleKeyRelease(const XKeyEvent *event) { +void +HandleKeyRelease(const XKeyEvent *event) +{ ClientNode *np; if(!switching || Switching(event)) @@ -465,7 +481,9 @@ void HandleKeyRelease(const XKeyEvent *event) { /**************************************************************************** ****************************************************************************/ -void HandleConfigureRequest(const XConfigureRequestEvent *event) { +void +HandleConfigureRequest(const XConfigureRequestEvent *event) +{ XWindowChanges wc; ClientNode *np; @@ -548,7 +566,9 @@ void HandleConfigureRequest(const XConfigureRequestEvent *event) { /**************************************************************************** ****************************************************************************/ -void HandleEnterNotify(const XCrossingEvent *event) { +void +HandleEnterNotify(const XCrossingEvent *event) +{ ClientNode *np; Cursor cur; @@ -574,7 +594,9 @@ void HandleEnterNotify(const XCrossingEvent *event) { /**************************************************************************** ****************************************************************************/ -void HandleLeaveNotify(const XCrossingEvent *event) { +void +HandleLeaveNotify(const XCrossingEvent *event) +{ ClientNode *np; @@ -589,7 +611,9 @@ void HandleLeaveNotify(const XCrossingEvent *event) { /**************************************************************************** ****************************************************************************/ -int HandleExpose(const XExposeEvent *event) { +int +HandleExpose(const XExposeEvent *event) +{ ClientNode *np; @@ -612,7 +636,9 @@ int HandleExpose(const XExposeEvent *event) { /**************************************************************************** ****************************************************************************/ -int HandlePropertyNotify(const XPropertyEvent *event) { +int +HandlePropertyNotify(const XPropertyEvent *event) +{ ClientNode *np; int changed; @@ -668,7 +694,9 @@ int HandlePropertyNotify(const XPropertyEvent *event) { /**************************************************************************** ****************************************************************************/ -void HandleClientMessage(const XClientMessageEvent *event) { +void +HandleClientMessage(const XClientMessageEvent *event) +{ ClientNode *np; long mask, flags; @@ -795,7 +823,9 @@ void HandleClientMessage(const XClientMessageEvent *event) { /**************************************************************************** * Handle a _NET_MOVERESIZE_WINDOW request. ****************************************************************************/ -void HandleNetMoveResize(const XClientMessageEvent *event, ClientNode *np) { +void +HandleNetMoveResize(const XClientMessageEvent *event, ClientNode *np) +{ long flags, gravity; long x, y; @@ -857,7 +887,9 @@ void HandleNetMoveResize(const XClientMessageEvent *event, ClientNode *np) { /**************************************************************************** * Handle a _NET_WM_STATE request. ****************************************************************************/ -void HandleNetWMState(const XClientMessageEvent *event, ClientNode *np) { +void +HandleNetWMState(const XClientMessageEvent *event, ClientNode *np) +{ int actionMaximize; int actionStick; @@ -953,7 +985,9 @@ void HandleNetWMState(const XClientMessageEvent *event, ClientNode *np) { /**************************************************************************** ****************************************************************************/ -void HandleMotionNotify(const XMotionEvent *event) { +void +HandleMotionNotify(const XMotionEvent *event) +{ ClientNode *np; Cursor cur; @@ -980,7 +1014,9 @@ void HandleMotionNotify(const XMotionEvent *event) { /**************************************************************************** ****************************************************************************/ #ifdef USE_SHAPE -void HandleShapeEvent(const XShapeEvent *event) { +void +HandleShapeEvent(const XShapeEvent *event) +{ ClientNode *np; @@ -994,7 +1030,9 @@ void HandleShapeEvent(const XShapeEvent *event) { /**************************************************************************** ****************************************************************************/ -void HandleColormapChange(const XColormapEvent *event) { +void +HandleColormapChange(const XColormapEvent *event) +{ ClientNode *np; if(event->new == True) { @@ -1009,7 +1047,9 @@ void HandleColormapChange(const XColormapEvent *event) { /**************************************************************************** ****************************************************************************/ -void HandleMapRequest(const XMapEvent *event) { +void +HandleMapRequest(const XMapEvent *event) +{ ClientNode *np; @@ -1053,7 +1093,9 @@ void HandleMapRequest(const XMapEvent *event) { /**************************************************************************** ****************************************************************************/ -void HandleUnmapNotify(const XUnmapEvent *event) { +void +HandleUnmapNotify(const XUnmapEvent *event) +{ ClientNode *np; XEvent e; @@ -1089,7 +1131,9 @@ void HandleUnmapNotify(const XUnmapEvent *event) { /**************************************************************************** ****************************************************************************/ -int HandleDestroyNotify(const XDestroyWindowEvent *event) { +int +HandleDestroyNotify(const XDestroyWindowEvent *event) +{ ClientNode *np; @@ -1116,7 +1160,9 @@ int HandleDestroyNotify(const XDestroyWindowEvent *event) { /**************************************************************************** ****************************************************************************/ -void DispatchBorderButtonEvent(const XButtonEvent *event, ClientNode *np) { +void +DispatchBorderButtonEvent(const XButtonEvent *event, ClientNode *np) +{ static Time lastClickTime = 0; static int lastX = 0, lastY = 0; diff --git a/src/font.c b/src/font.c index 8ebf19a..d296589 100644 --- a/src/font.c +++ b/src/font.c @@ -23,7 +23,9 @@ static GC fontGC; /**************************************************************************** ****************************************************************************/ -void InitializeFonts() { +void +InitializeFonts() +{ int x; @@ -36,7 +38,9 @@ void InitializeFonts() { /**************************************************************************** ****************************************************************************/ -void StartupFonts() { +void +StartupFonts() +{ #ifndef USE_XFT XGCValues gcValues; @@ -102,7 +106,9 @@ void StartupFonts() { /**************************************************************************** ****************************************************************************/ -void ShutdownFonts() { +void +ShutdownFonts() +{ int x; @@ -128,7 +134,9 @@ void ShutdownFonts() { /**************************************************************************** ****************************************************************************/ -void DestroyFonts() { +void +DestroyFonts() +{ int x; @@ -143,7 +151,9 @@ void DestroyFonts() { /**************************************************************************** ****************************************************************************/ -int GetStringWidth(FontType type, const char *str) { +int +GetStringWidth(FontType type, const char *str) +{ #ifdef USE_XFT XGlyphInfo extents; @@ -171,7 +181,9 @@ int GetStringWidth(FontType type, const char *str) { /**************************************************************************** ****************************************************************************/ -int GetStringHeight(FontType type) { +int +GetStringHeight(FontType type) +{ Assert(fonts[type]); @@ -181,7 +193,9 @@ int GetStringHeight(FontType type) { /**************************************************************************** ****************************************************************************/ -void SetFont(FontType type, const char *value) { +void +SetFont(FontType type, const char *value) +{ if(!value) { Warning("empty Font tag"); @@ -198,8 +212,10 @@ void SetFont(FontType type, const char *value) { /**************************************************************************** ****************************************************************************/ -void RenderString(Drawable d, FontType font, ColorType color, - int x, int y, int width, Region region, const char *str) { +void +RenderString(Drawable d, FontType font, ColorType color, + int x, int y, int width, Region region, const char *str) +{ #ifdef USE_XFT XftDraw *xd; diff --git a/src/group.c b/src/group.c index cd3aba4..ca38329 100644 --- a/src/group.c +++ b/src/group.c @@ -46,22 +46,30 @@ static void ApplyGroup(const GroupType *gp, ClientNode *np); /**************************************************************************** ****************************************************************************/ -void InitializeGroups() { +void +InitializeGroups() +{ } /**************************************************************************** ****************************************************************************/ -void StartupGroups() { +void +StartupGroups() +{ } /**************************************************************************** ****************************************************************************/ -void ShutdownGroups() { +void +ShutdownGroups() +{ } /**************************************************************************** ****************************************************************************/ -void DestroyGroups() { +void +DestroyGroups() +{ GroupType *gp; @@ -77,7 +85,9 @@ void DestroyGroups() { /**************************************************************************** ****************************************************************************/ -void ReleasePatternList(PatternListType *lp) { +void +ReleasePatternList(PatternListType *lp) +{ PatternListType *tp; @@ -92,7 +102,9 @@ void ReleasePatternList(PatternListType *lp) { /**************************************************************************** ****************************************************************************/ -void ReleaseOptionList(OptionListType *lp) { +void +ReleaseOptionList(OptionListType *lp) +{ OptionListType *tp; @@ -123,7 +135,9 @@ GroupType *CreateGroup() { /**************************************************************************** ****************************************************************************/ -void AddGroupClass(GroupType *gp, const char *pattern) { +void +AddGroupClass(GroupType *gp, const char *pattern) +{ Assert(gp); @@ -137,7 +151,9 @@ void AddGroupClass(GroupType *gp, const char *pattern) { /**************************************************************************** ****************************************************************************/ -void AddGroupName(GroupType *gp, const char *pattern) { +void +AddGroupName(GroupType *gp, const char *pattern) +{ Assert(gp); @@ -151,7 +167,9 @@ void AddGroupName(GroupType *gp, const char *pattern) { /**************************************************************************** ****************************************************************************/ -void AddPattern(PatternListType **lp, const char *pattern, MatchType match) { +void +AddPattern(PatternListType **lp, const char *pattern, MatchType match) +{ PatternListType *tp; @@ -169,7 +187,9 @@ void AddPattern(PatternListType **lp, const char *pattern, MatchType match) { /**************************************************************************** ****************************************************************************/ -void AddGroupOption(GroupType *gp, OptionType option) { +void +AddGroupOption(GroupType *gp, OptionType option) +{ OptionListType *lp; @@ -183,8 +203,10 @@ void AddGroupOption(GroupType *gp, OptionType option) { /**************************************************************************** ****************************************************************************/ -void AddGroupOptionValue(GroupType *gp, OptionType option, - const char *value) { +void +AddGroupOptionValue(GroupType *gp, OptionType option, + const char *value) +{ OptionListType *lp; @@ -200,7 +222,9 @@ void AddGroupOptionValue(GroupType *gp, OptionType option, /**************************************************************************** ****************************************************************************/ -void ApplyGroups(ClientNode *np) { +void +ApplyGroups(ClientNode *np) +{ PatternListType *lp; GroupType *gp; @@ -229,7 +253,9 @@ void ApplyGroups(ClientNode *np) { /**************************************************************************** ****************************************************************************/ -void ApplyGroup(const GroupType *gp, ClientNode *np) { +void +ApplyGroup(const GroupType *gp, ClientNode *np) +{ OptionListType *lp; unsigned int temp; diff --git a/src/help.c b/src/help.c index cdcd377..6078be2 100644 --- a/src/help.c +++ b/src/help.c @@ -11,13 +11,17 @@ #include "help.h" /** Display program name, version, and compiled options . */ -void DisplayAbout() { +void +DisplayAbout() +{ printf("JWM v%s by Joe Wingbermuehle\n", PACKAGE_VERSION); DisplayCompileOptions(); } /** Display compiled options. */ -void DisplayCompileOptions() { +void +DisplayCompileOptions() +{ printf("compiled options: "); @@ -66,7 +70,9 @@ void DisplayCompileOptions() { } /** Display all help. */ -void DisplayHelp() { +void +DisplayHelp() +{ DisplayUsage(); printf(" -display X Set the X display to use\n"); printf(" -exit Exit JWM (send _JWM_EXIT to the root)\n"); @@ -77,7 +83,9 @@ void DisplayHelp() { } /** Display program usage information. */ -void DisplayUsage() { +void +DisplayUsage() +{ DisplayAbout(); printf("usage: jwm [ options ]\n"); } diff --git a/src/hint.c b/src/hint.c index 6ab096b..d743419 100644 --- a/src/hint.c +++ b/src/hint.c @@ -137,12 +137,16 @@ static void ReadMotifHints(Window win, ClientState *state); /**************************************************************************** ****************************************************************************/ -void InitializeHints() { +void +InitializeHints() +{ } /**************************************************************************** ****************************************************************************/ -void StartupHints() { +void +StartupHints() +{ unsigned long array[128]; Atom supported[ATOM_COUNT]; @@ -233,17 +237,23 @@ void StartupHints() { /**************************************************************************** ****************************************************************************/ -void ShutdownHints() { +void +ShutdownHints() +{ } /**************************************************************************** ****************************************************************************/ -void DestroyHints() { +void +DestroyHints() +{ } /**************************************************************************** ****************************************************************************/ -void ReadCurrentDesktop() { +void +ReadCurrentDesktop() +{ unsigned long temp; @@ -263,7 +273,9 @@ void ReadCurrentDesktop() { * Read client protocls/hints. * This is called while the client is being added to management. ****************************************************************************/ -void ReadClientProtocols(ClientNode *np) { +void +ReadClientProtocols(ClientNode *np) +{ Status status; ClientNode *pp; @@ -297,7 +309,9 @@ void ReadClientProtocols(ClientNode *np) { /**************************************************************************** ****************************************************************************/ -void WriteState(ClientNode *np) { +void +WriteState(ClientNode *np) +{ unsigned long data[2]; @@ -324,7 +338,9 @@ void WriteState(ClientNode *np) { /**************************************************************************** ****************************************************************************/ -void WriteNetState(ClientNode *np) { +void +WriteNetState(ClientNode *np) +{ unsigned long values[5]; int north, south, east, west; @@ -369,7 +385,9 @@ void WriteNetState(ClientNode *np) { /**************************************************************************** ****************************************************************************/ -void WriteNetAllowed(ClientNode *np) { +void +WriteNetAllowed(ClientNode *np) +{ unsigned long values[10]; int index; @@ -416,7 +434,9 @@ void WriteNetAllowed(ClientNode *np) { /**************************************************************************** ****************************************************************************/ -void WriteWinState(ClientNode *np) { +void +WriteWinState(ClientNode *np) +{ unsigned long flags; @@ -447,7 +467,9 @@ void WriteWinState(ClientNode *np) { /**************************************************************************** * Read all hints needed to determine the current window state. ****************************************************************************/ -ClientState ReadWindowState(Window win) { +ClientState +ReadWindowState(Window win) +{ ClientState result; Status status; @@ -572,7 +594,9 @@ ClientState ReadWindowState(Window win) { /**************************************************************************** ****************************************************************************/ -void ReadWMName(ClientNode *np) { +void +ReadWMName(ClientNode *np) +{ unsigned long count; int status; @@ -617,7 +641,9 @@ void ReadWMName(ClientNode *np) { /**************************************************************************** ****************************************************************************/ -void ReadWMClass(ClientNode *np) { +void +ReadWMClass(ClientNode *np) +{ XClassHint hint; @@ -632,7 +658,9 @@ void ReadWMClass(ClientNode *np) { /**************************************************************************** ****************************************************************************/ -ClientProtocolType ReadWMProtocols(Window w) { +ClientProtocolType +ReadWMProtocols(Window w) +{ ClientProtocolType result; unsigned long count, x; @@ -670,7 +698,9 @@ ClientProtocolType ReadWMProtocols(Window w) { /**************************************************************************** ****************************************************************************/ -void ReadWMNormalHints(ClientNode *np) { +void +ReadWMNormalHints(ClientNode *np) +{ XSizeHints hints; long temp; @@ -753,7 +783,9 @@ void ReadWMNormalHints(ClientNode *np) { /**************************************************************************** ****************************************************************************/ -void ReadWMColormaps(ClientNode *np) { +void +ReadWMColormaps(ClientNode *np) +{ Window *windows; ColormapNode *cp; @@ -794,7 +826,9 @@ void ReadWMColormaps(ClientNode *np) { /**************************************************************************** ****************************************************************************/ -void ReadWMHints(Window win, ClientState *state) { +void +ReadWMHints(Window win, ClientState *state) +{ XWMHints *wmhints; @@ -823,7 +857,9 @@ void ReadWMHints(Window win, ClientState *state) { /**************************************************************************** * Read _MOTIF_WM_HINTS ****************************************************************************/ -void ReadMotifHints(Window win, ClientState *state) { +void +ReadMotifHints(Window win, ClientState *state) +{ PropMwmHints *mhints; Atom type; @@ -886,7 +922,9 @@ void ReadMotifHints(Window win, ClientState *state) { /**************************************************************************** ****************************************************************************/ -int GetCardinalAtom(Window window, AtomType atom, unsigned long *value) { +int +GetCardinalAtom(Window window, AtomType atom, unsigned long *value) +{ unsigned long count; int status; @@ -917,7 +955,9 @@ int GetCardinalAtom(Window window, AtomType atom, unsigned long *value) { /**************************************************************************** ****************************************************************************/ -int GetWindowAtom(Window window, AtomType atom, Window *value) { +int +GetWindowAtom(Window window, AtomType atom, Window *value) +{ unsigned long count; int status; unsigned long extra; @@ -947,7 +987,9 @@ int GetWindowAtom(Window window, AtomType atom, Window *value) { /**************************************************************************** ****************************************************************************/ -void SetCardinalAtom(Window window, AtomType atom, unsigned long value) { +void +SetCardinalAtom(Window window, AtomType atom, unsigned long value) +{ Assert(window != None); @@ -958,7 +1000,9 @@ void SetCardinalAtom(Window window, AtomType atom, unsigned long value) { /**************************************************************************** ****************************************************************************/ -void SetWindowAtom(Window window, AtomType atom, unsigned long value) { +void +SetWindowAtom(Window window, AtomType atom, unsigned long value) +{ Assert(window != None); diff --git a/src/icon.c b/src/icon.c index b6f5ca6..afc415d 100644 --- a/src/icon.c +++ b/src/icon.c @@ -54,7 +54,9 @@ static int GetHash(const char *str); /**************************************************************************** * Must be initialized before parsing the configuration. ****************************************************************************/ -void InitializeIcons() { +void +InitializeIcons() +{ int x; @@ -70,7 +72,9 @@ void InitializeIcons() { /**************************************************************************** ****************************************************************************/ -void StartupIcons() { +void +StartupIcons() +{ XGCValues gcValues; unsigned long gcMask; @@ -85,7 +89,9 @@ void StartupIcons() { /**************************************************************************** ****************************************************************************/ -void ShutdownIcons() { +void +ShutdownIcons() +{ int x; @@ -101,7 +107,9 @@ void ShutdownIcons() { /**************************************************************************** ****************************************************************************/ -void DestroyIcons() { +void +DestroyIcons() +{ IconPathNode *pn; @@ -121,7 +129,9 @@ void DestroyIcons() { /**************************************************************************** ****************************************************************************/ -void SetIconSize() { +void +SetIconSize() +{ XIconSize size; @@ -145,7 +155,9 @@ void SetIconSize() { /**************************************************************************** ****************************************************************************/ -void AddIconPath(char *path) { +void +AddIconPath(char *path) +{ IconPathNode *ip; int length; @@ -185,8 +197,10 @@ void AddIconPath(char *path) { /**************************************************************************** ****************************************************************************/ -void PutIcon(IconNode *icon, Drawable d, int x, int y, - int width, int height) { +void +PutIcon(IconNode *icon, Drawable d, int x, int y, + int width, int height) +{ ScaledIconNode *node; @@ -223,7 +237,9 @@ void PutIcon(IconNode *icon, Drawable d, int x, int y, /**************************************************************************** ****************************************************************************/ -void LoadIcon(ClientNode *np) { +void +LoadIcon(ClientNode *np) +{ IconPathNode *ip; @@ -349,7 +365,9 @@ IconNode *LoadNamedIconHelper(const char *name, const char *path) { /**************************************************************************** ****************************************************************************/ -void ReadNetWMIcon(ClientNode *np) { +void +ReadNetWMIcon(ClientNode *np) +{ unsigned long count; int status; @@ -604,7 +622,9 @@ IconNode *CreateIcon() { /**************************************************************************** ****************************************************************************/ -void DoDestroyIcon(int index, IconNode *icon) { +void +DoDestroyIcon(int index, IconNode *icon) +{ ScaledIconNode *np; @@ -651,7 +671,9 @@ void DoDestroyIcon(int index, IconNode *icon) { /**************************************************************************** ****************************************************************************/ -void DestroyIcon(IconNode *icon) { +void +DestroyIcon(IconNode *icon) +{ int index; @@ -664,7 +686,9 @@ void DestroyIcon(IconNode *icon) { /**************************************************************************** ****************************************************************************/ -void InsertIcon(IconNode *icon) { +void +InsertIcon(IconNode *icon) +{ int index; @@ -705,7 +729,9 @@ IconNode *FindIcon(const char *name) { /**************************************************************************** ****************************************************************************/ -int GetHash(const char *str) { +int +GetHash(const char *str) +{ int x; int hash = 0; diff --git a/src/image.c b/src/image.c index af52ae7..16e39e7 100644 --- a/src/image.c +++ b/src/image.c @@ -320,7 +320,9 @@ ImageNode *CreateImageFromXImages(XImage *image, XImage *shape) { /**************************************************************************** ****************************************************************************/ -void DestroyImage(ImageNode *image) { +void +DestroyImage(ImageNode *image) +{ if(image) { Release(image->data); Release(image); @@ -352,8 +354,10 @@ int AllocateColor(Display *d, Colormap cmap, char *name, * We don't need to do anything here as color.c takes care of this. ****************************************************************************/ #ifdef USE_XPM -int FreeColors(Display *d, Colormap cmap, Pixel *pixels, int n, - void *closure) { +int +FreeColors(Display *d, Colormap cmap, Pixel *pixels, int n, + void *closure) +{ return 1; diff --git a/src/key.c b/src/key.c index f14ad62..5cedd3d 100644 --- a/src/key.c +++ b/src/key.c @@ -62,7 +62,9 @@ static void GrabKey(KeyNode *np); /*************************************************************************** ***************************************************************************/ -void InitializeKeys() { +void +InitializeKeys() +{ bindings = NULL; modifierMask = 0; @@ -71,7 +73,9 @@ void InitializeKeys() { /*************************************************************************** ***************************************************************************/ -void StartupKeys() { +void +StartupKeys() +{ KeyNode *np; int x; @@ -121,7 +125,9 @@ void StartupKeys() { /*************************************************************************** ***************************************************************************/ -void ShutdownKeys() { +void +ShutdownKeys() +{ ClientNode *np; int layer; @@ -138,7 +144,9 @@ void ShutdownKeys() { /*************************************************************************** ***************************************************************************/ -void DestroyKeys() { +void +DestroyKeys() +{ KeyNode *np; @@ -155,7 +163,9 @@ void DestroyKeys() { /*************************************************************************** ***************************************************************************/ -void GrabKey(KeyNode *np) { +void +GrabKey(KeyNode *np) +{ TrayType *tp; int x; @@ -186,7 +196,9 @@ void GrabKey(KeyNode *np) { /*************************************************************************** ***************************************************************************/ -KeyType GetKey(const XKeyEvent *event) { +KeyType +GetKey(const XKeyEvent *event) +{ KeyNode *np; unsigned int state; @@ -204,7 +216,9 @@ KeyType GetKey(const XKeyEvent *event) { /*************************************************************************** ***************************************************************************/ -void RunKeyCommand(const XKeyEvent *event) { +void +RunKeyCommand(const XKeyEvent *event) +{ KeyNode *np; @@ -219,7 +233,9 @@ void RunKeyCommand(const XKeyEvent *event) { /*************************************************************************** ***************************************************************************/ -void ShowKeyMenu(const XKeyEvent *event) { +void +ShowKeyMenu(const XKeyEvent *event) +{ KeyNode *np; int button; @@ -238,7 +254,9 @@ void ShowKeyMenu(const XKeyEvent *event) { /*************************************************************************** ***************************************************************************/ -int ShouldGrab(KeyType key) { +int +ShouldGrab(KeyType key) +{ switch(key & 0xFF) { case KEY_NEXT: case KEY_NEXT_STACKED: @@ -267,7 +285,9 @@ int ShouldGrab(KeyType key) { /*************************************************************************** ***************************************************************************/ -void GrabKeys(ClientNode *np) { +void +GrabKeys(ClientNode *np) +{ KeyNode *kp; @@ -282,7 +302,9 @@ void GrabKeys(ClientNode *np) { /*************************************************************************** ***************************************************************************/ -unsigned int GetModifierMask(KeySym key) { +unsigned int +GetModifierMask(KeySym key) +{ KeyCode temp; int x; @@ -302,7 +324,9 @@ unsigned int GetModifierMask(KeySym key) { /*************************************************************************** ***************************************************************************/ -unsigned int ParseModifierString(const char *str) { +unsigned int +ParseModifierString(const char *str) +{ unsigned int mask; int x; @@ -343,7 +367,9 @@ unsigned int ParseModifierString(const char *str) { /*************************************************************************** ***************************************************************************/ -KeySym ParseKeyString(const char *str) { +KeySym +ParseKeyString(const char *str) +{ KeySym symbol; @@ -358,8 +384,10 @@ KeySym ParseKeyString(const char *str) { /*************************************************************************** ***************************************************************************/ -void InsertBinding(KeyType key, const char *modifiers, - const char *stroke, const char *code, const char *command) { +void +InsertBinding(KeyType key, const char *modifiers, + const char *stroke, const char *code, const char *command) +{ KeyNode *np; unsigned int mask; @@ -439,7 +467,9 @@ void InsertBinding(KeyType key, const char *modifiers, /*************************************************************************** ***************************************************************************/ -void ValidateKeys() { +void +ValidateKeys() +{ KeyNode *kp; int bindex; @@ -456,7 +486,9 @@ void ValidateKeys() { } /** Return true if the key event matches any switching key or its modifiers. */ -int Switching(const XKeyEvent *event) { +int +Switching(const XKeyEvent *event) +{ KeyNode *np; KeySym keysym; KeyType key; diff --git a/src/lex.c b/src/lex.c index 0e0f65d..257c2d3 100644 --- a/src/lex.c +++ b/src/lex.c @@ -279,7 +279,9 @@ ReadDefault: * The entity value is returned in ch and the length of the entity * is returned as the value of the function. *****************************************************************************/ -int ParseEntity(const char *entity, char *ch, const char *file, int line) { +int +ParseEntity(const char *entity, char *ch, const char *file, int line) +{ char *temp; int x; @@ -316,7 +318,9 @@ int ParseEntity(const char *entity, char *ch, const char *file, int line) { /***************************************************************************** *****************************************************************************/ -int IsElementEnd(char ch) { +int +IsElementEnd(char ch) +{ switch(ch) { case ' ': case '\t': @@ -336,7 +340,9 @@ int IsElementEnd(char ch) { /***************************************************************************** *****************************************************************************/ -int IsAttributeEnd(char ch) { +int +IsAttributeEnd(char ch) +{ switch(ch) { case 0: case '\"': @@ -348,7 +354,9 @@ int IsAttributeEnd(char ch) { /***************************************************************************** *****************************************************************************/ -int IsValueEnd(char ch) { +int +IsValueEnd(char ch) +{ switch(ch) { case 0: case '<': @@ -360,7 +368,9 @@ int IsValueEnd(char ch) { /***************************************************************************** *****************************************************************************/ -int IsSpace(char ch, int *lineNumber) { +int +IsSpace(char ch, int *lineNumber) +{ switch(ch) { case ' ': case '\t': @@ -476,7 +486,9 @@ char *ReadAttributeValue(const char *line, const char *file, /***************************************************************************** *****************************************************************************/ -TokenType LookupType(const char *name, TokenNode *np) { +TokenType +LookupType(const char *name, TokenNode *np) +{ unsigned int x; Assert(name); diff --git a/src/main.c b/src/main.c index d9c6e78..ed3a901 100644 --- a/src/main.c +++ b/src/main.c @@ -174,7 +174,9 @@ int main(int argc, char *argv[]) { /**************************************************************************** ****************************************************************************/ -void DoExit(int code) { +void +DoExit(int code) +{ Destroy(); if(configPath) { @@ -192,7 +194,9 @@ void DoExit(int code) { /**************************************************************************** ****************************************************************************/ -void EventLoop() { +void +EventLoop() +{ XEvent event; while(!shouldExit) { @@ -203,7 +207,9 @@ void EventLoop() { /**************************************************************************** ****************************************************************************/ -void OpenConnection() { +void +OpenConnection() +{ display = JXOpenDisplay(displayString); if(!display) { @@ -231,7 +237,9 @@ void OpenConnection() { /**************************************************************************** ****************************************************************************/ -void StartupConnection() { +void +StartupConnection() +{ XSetWindowAttributes attr; int temp; @@ -276,20 +284,26 @@ void StartupConnection() { /**************************************************************************** ****************************************************************************/ -void CloseConnection() { +void +CloseConnection() +{ JXFlush(display); JXCloseDisplay(display); } /**************************************************************************** ****************************************************************************/ -void ShutdownConnection() { +void +ShutdownConnection() +{ CloseConnection(); } /**************************************************************************** ****************************************************************************/ -void HandleExit() { +void +HandleExit() +{ signal(SIGTERM, HandleExit); signal(SIGINT, HandleExit); signal(SIGHUP, HandleExit); @@ -299,7 +313,9 @@ void HandleExit() { /**************************************************************************** * This is called before the X connection is opened. ****************************************************************************/ -void Initialize() { +void +Initialize() +{ InitializeBorders(); InitializeClients(); InitializeClock(); @@ -332,7 +348,9 @@ void Initialize() { /**************************************************************************** * This is called after the X connection is opened. ****************************************************************************/ -void Startup() { +void +Startup() +{ /* This order is important. */ @@ -393,7 +411,9 @@ void Startup() { /**************************************************************************** * This is called before the X connection is closed. ****************************************************************************/ -void Shutdown() { +void +Shutdown() +{ /* This order is important. */ @@ -434,7 +454,9 @@ void Shutdown() { * This is called after the X connection is closed. * Note that it is possible for this to be called more than once. ****************************************************************************/ -void Destroy() { +void +Destroy() +{ DestroyBorders(); DestroyClients(); DestroyClock(); @@ -467,7 +489,9 @@ void Destroy() { /**************************************************************************** * Send _JWM_RESTART to the root window. ****************************************************************************/ -void SendRestart() { +void +SendRestart() +{ XEvent event; @@ -488,7 +512,9 @@ void SendRestart() { /**************************************************************************** * Send _JWM_EXIT to the root window. ****************************************************************************/ -void SendExit() { +void +SendExit() +{ XEvent event; diff --git a/src/match.c b/src/match.c index 95edd39..f299724 100644 --- a/src/match.c +++ b/src/match.c @@ -18,7 +18,9 @@ static int DoMatch(MatchStateType state); /**************************************************************************** ****************************************************************************/ -int Match(const char *pattern, const char *expression) { +int +Match(const char *pattern, const char *expression) +{ MatchStateType state; @@ -40,7 +42,9 @@ int Match(const char *pattern, const char *expression) { /**************************************************************************** ****************************************************************************/ -int DoMatch(MatchStateType state) { +int +DoMatch(MatchStateType state) +{ char p, e; diff --git a/src/menu.c b/src/menu.c index ecc5516..98940f2 100644 --- a/src/menu.c +++ b/src/menu.c @@ -53,7 +53,9 @@ int menuShown = 0; /*************************************************************************** ***************************************************************************/ -void InitializeMenu(Menu *menu) { +void +InitializeMenu(Menu *menu) +{ MenuItem *np; int index, temp; @@ -137,7 +139,9 @@ void InitializeMenu(Menu *menu) { /*************************************************************************** ***************************************************************************/ -void ShowMenu(Menu *menu, RunMenuCommandType runner, int x, int y) { +void +ShowMenu(Menu *menu, RunMenuCommandType runner, int x, int y) +{ int mouseStatus, keyboardStatus; @@ -163,7 +167,9 @@ void ShowMenu(Menu *menu, RunMenuCommandType runner, int x, int y) { /*************************************************************************** ***************************************************************************/ -void DestroyMenu(Menu *menu) { +void +DestroyMenu(Menu *menu) +{ MenuItem *np; if(menu) { @@ -205,7 +211,9 @@ void DestroyMenu(Menu *menu) { /*************************************************************************** ***************************************************************************/ -int ShowSubmenu(Menu *menu, Menu *parent, int x, int y) { +int +ShowSubmenu(Menu *menu, Menu *parent, int x, int y) +{ int status; menu->parent = parent; @@ -223,7 +231,9 @@ int ShowSubmenu(Menu *menu, Menu *parent, int x, int y) { /*************************************************************************** * Returns 0 if no selection was made or 1 if a selection was made. ***************************************************************************/ -int MenuLoop(Menu *menu) { +int +MenuLoop(Menu *menu) +{ XEvent event; MenuItem *ip; @@ -300,7 +310,9 @@ int MenuLoop(Menu *menu) { /*************************************************************************** ***************************************************************************/ -void CreateMenu(Menu *menu, int x, int y) { +void +CreateMenu(Menu *menu, int x, int y) +{ XSetWindowAttributes attr; unsigned long attrMask; @@ -349,7 +361,9 @@ void CreateMenu(Menu *menu, int x, int y) { /*************************************************************************** ***************************************************************************/ -void HideMenu(Menu *menu) { +void +HideMenu(Menu *menu) +{ JXDestroyWindow(display, menu->window); @@ -357,7 +371,9 @@ void HideMenu(Menu *menu) { /*************************************************************************** ***************************************************************************/ -void RedrawMenuTree(Menu *menu) { +void +RedrawMenuTree(Menu *menu) +{ if(menu->parent) { RedrawMenuTree(menu->parent); @@ -370,7 +386,9 @@ void RedrawMenuTree(Menu *menu) { /*************************************************************************** ***************************************************************************/ -void DrawMenu(Menu *menu) { +void +DrawMenu(Menu *menu) +{ MenuItem *np; int x; @@ -409,7 +427,9 @@ void DrawMenu(Menu *menu) { /*************************************************************************** ***************************************************************************/ -MenuSelectionType UpdateMotion(Menu *menu, XEvent *event) { +MenuSelectionType +UpdateMotion(Menu *menu, XEvent *event) +{ MenuItem *ip; Menu *tp; @@ -582,7 +602,9 @@ MenuSelectionType UpdateMotion(Menu *menu, XEvent *event) { /*************************************************************************** ***************************************************************************/ -void UpdateMenu(Menu *menu) { +void +UpdateMenu(Menu *menu) +{ ButtonNode button; Pixmap pixmap; @@ -626,7 +648,9 @@ void UpdateMenu(Menu *menu) { /*************************************************************************** ***************************************************************************/ -void DrawMenuItem(Menu *menu, MenuItem *item, int index) { +void +DrawMenuItem(Menu *menu, MenuItem *item, int index) +{ ButtonNode button; Pixmap pixmap; @@ -690,7 +714,9 @@ void DrawMenuItem(Menu *menu, MenuItem *item, int index) { /*************************************************************************** ***************************************************************************/ -int GetNextMenuIndex(Menu *menu) { +int +GetNextMenuIndex(Menu *menu) +{ MenuItem *item; int x; @@ -708,7 +734,9 @@ int GetNextMenuIndex(Menu *menu) { /*************************************************************************** ***************************************************************************/ -int GetPreviousMenuIndex(Menu *menu) { +int +GetPreviousMenuIndex(Menu *menu) +{ MenuItem *item; int x; @@ -726,7 +754,9 @@ int GetPreviousMenuIndex(Menu *menu) { /*************************************************************************** ***************************************************************************/ -int GetMenuIndex(Menu *menu, int y) { +int +GetMenuIndex(Menu *menu, int y) +{ int x; @@ -765,7 +795,9 @@ MenuItem *GetMenuItem(Menu *menu, int index) { /*************************************************************************** ***************************************************************************/ -void SetPosition(Menu *tp, int index) { +void +SetPosition(Menu *tp, int index) +{ int y; int updated; diff --git a/src/misc.c b/src/misc.c index 5728323..23d90b0 100644 --- a/src/misc.c +++ b/src/misc.c @@ -16,7 +16,9 @@ static char *GetSymbolName(const char *str); static void ReplaceSymbol(char **str, const char *name, const char *value); /** Determine if a character is a space character. */ -int IsSpace(char ch) { +int +IsSpace(char ch) +{ switch(ch) { case ' ': case '\t': @@ -29,7 +31,9 @@ int IsSpace(char ch) { } /** Determine if a character is a valid for a shell variable. */ -int IsSymbolic(char ch) { +int +IsSymbolic(char ch) +{ if(ch >= 'A' && ch <= 'Z') { return 1; @@ -67,7 +71,9 @@ char *GetSymbolName(const char *str) { } /** Replace "name" with "value" in str (reallocates if needed). */ -void ReplaceSymbol(char **str, const char *name, const char *value) { +void +ReplaceSymbol(char **str, const char *name, const char *value) +{ char *temp; int strLength; @@ -122,7 +128,9 @@ void ReplaceSymbol(char **str, const char *name, const char *value) { } /** Perform shell-like macro path expansion. */ -void ExpandPath(char **path) { +void +ExpandPath(char **path) +{ char *name; char *value; @@ -147,7 +155,9 @@ void ExpandPath(char **path) { } /** Trim leading and trailing whitespace from a string. */ -void Trim(char *str) { +void +Trim(char *str) +{ int length; int start; diff --git a/src/move.c b/src/move.c index 7370f06..bce5d27 100644 --- a/src/move.c +++ b/src/move.c @@ -55,19 +55,25 @@ static int CheckBottomValid(const RectangleType *client, /**************************************************************************** ****************************************************************************/ -void SetSnapMode(SnapModeType mode) { +void +SetSnapMode(SnapModeType mode) +{ snapMode = mode; } /**************************************************************************** ****************************************************************************/ -void SetMoveMode(MoveModeType mode) { +void +SetMoveMode(MoveModeType mode) +{ moveMode = mode; } /**************************************************************************** ****************************************************************************/ -void SetSnapDistance(const char *value) { +void +SetSnapDistance(const char *value) +{ int temp; Assert(value); @@ -84,13 +90,17 @@ void SetSnapDistance(const char *value) { /**************************************************************************** ****************************************************************************/ -void SetDefaultSnapDistance() { +void +SetDefaultSnapDistance() +{ snapDistance = DEFAULT_SNAP_DISTANCE; } /**************************************************************************** ****************************************************************************/ -void MoveController(int wasDestroyed) { +void +MoveController(int wasDestroyed) +{ if(moveMode == MOVE_OUTLINE) { ClearOutline(); @@ -106,7 +116,9 @@ void MoveController(int wasDestroyed) { /**************************************************************************** ****************************************************************************/ -int MoveClient(ClientNode *np, int startx, int starty) { +int +MoveClient(ClientNode *np, int startx, int starty) +{ XEvent event; int oldx, oldy; @@ -208,7 +220,9 @@ int MoveClient(ClientNode *np, int startx, int starty) { /**************************************************************************** ****************************************************************************/ -int MoveClientKeyboard(ClientNode *np) { +int +MoveClientKeyboard(ClientNode *np) +{ XEvent event; int oldx, oldy; @@ -339,7 +353,9 @@ int MoveClientKeyboard(ClientNode *np) { /**************************************************************************** ****************************************************************************/ -void StopMove(ClientNode *np, int doMove, int oldx, int oldy) { +void +StopMove(ClientNode *np, int doMove, int oldx, int oldy) +{ int north, south, east, west; @@ -367,7 +383,9 @@ void StopMove(ClientNode *np, int doMove, int oldx, int oldy) { /**************************************************************************** ****************************************************************************/ -void DoSnap(ClientNode *np, int north, int west) { +void +DoSnap(ClientNode *np, int north, int west) +{ switch(snapMode) { case SNAP_BORDER: DoSnapBorder(np, north, west); @@ -383,7 +401,9 @@ void DoSnap(ClientNode *np, int north, int west) { /**************************************************************************** ****************************************************************************/ -void DoSnapScreen(ClientNode *np, int north, int west) { +void +DoSnapScreen(ClientNode *np, int north, int west) +{ RectangleType client; int screen; @@ -419,7 +439,9 @@ void DoSnapScreen(ClientNode *np, int north, int west) { /**************************************************************************** ****************************************************************************/ -void DoSnapBorder(ClientNode *np, int north, int west) { +void +DoSnapBorder(ClientNode *np, int north, int west) +{ const ClientNode *tp; const TrayType *tray; @@ -530,7 +552,9 @@ void DoSnapBorder(ClientNode *np, int north, int west) { /**************************************************************************** ****************************************************************************/ -void ReturnToBorder(ClientNode *np, int north, int west) { +void +ReturnToBorder(ClientNode *np, int north, int west) +{ const ScreenType *screen; const TrayType *tray; @@ -605,7 +629,9 @@ void ReturnToBorder(ClientNode *np, int north, int west) { /**************************************************************************** ****************************************************************************/ -int ShouldSnap(const ClientNode *np) { +int +ShouldSnap(const ClientNode *np) +{ if(np->state.status & STAT_HIDDEN) { return 0; } else if(np->state.status & STAT_MINIMIZED) { @@ -617,7 +643,9 @@ int ShouldSnap(const ClientNode *np) { /**************************************************************************** ****************************************************************************/ -void GetClientRectangle(const ClientNode *np, RectangleType *r) { +void +GetClientRectangle(const ClientNode *np, RectangleType *r) +{ int border; @@ -651,7 +679,9 @@ void GetClientRectangle(const ClientNode *np, RectangleType *r) { /**************************************************************************** ****************************************************************************/ -int CheckOverlapTopBottom(const RectangleType *a, const RectangleType *b) { +int +CheckOverlapTopBottom(const RectangleType *a, const RectangleType *b) +{ if(a->top >= b->bottom) { return 0; } else if(a->bottom <= b->top) { @@ -663,7 +693,9 @@ int CheckOverlapTopBottom(const RectangleType *a, const RectangleType *b) { /**************************************************************************** ****************************************************************************/ -int CheckOverlapLeftRight(const RectangleType *a, const RectangleType *b) { +int +CheckOverlapLeftRight(const RectangleType *a, const RectangleType *b) +{ if(a->left >= b->right) { return 0; } else if(a->right <= b->left) { @@ -680,8 +712,10 @@ int CheckOverlapLeftRight(const RectangleType *a, const RectangleType *b) { * left - The top/bottom of the current left snap window. * Returns 1 if the current left snap position is still valid, otherwise 0. ****************************************************************************/ -int CheckLeftValid(const RectangleType *client, - const RectangleType *other, const RectangleType *left) { +int +CheckLeftValid(const RectangleType *client, + const RectangleType *other, const RectangleType *left) +{ if(!left->valid) { return 0; @@ -711,8 +745,10 @@ int CheckLeftValid(const RectangleType *client, /**************************************************************************** ****************************************************************************/ -int CheckRightValid(const RectangleType *client, - const RectangleType *other, const RectangleType *right) { +int +CheckRightValid(const RectangleType *client, + const RectangleType *other, const RectangleType *right) +{ if(!right->valid) { return 0; @@ -742,8 +778,10 @@ int CheckRightValid(const RectangleType *client, /**************************************************************************** ****************************************************************************/ -int CheckTopValid(const RectangleType *client, - const RectangleType *other, const RectangleType *top) { +int +CheckTopValid(const RectangleType *client, + const RectangleType *other, const RectangleType *top) +{ if(!top->valid) { return 0; @@ -773,8 +811,10 @@ int CheckTopValid(const RectangleType *client, /**************************************************************************** ****************************************************************************/ -int CheckBottomValid(const RectangleType *client, - const RectangleType *other, const RectangleType *bottom) { +int +CheckBottomValid(const RectangleType *client, + const RectangleType *other, const RectangleType *bottom) +{ if(!bottom->valid) { return 0; diff --git a/src/outline.c b/src/outline.c index b42e70a..03b7ad9 100644 --- a/src/outline.c +++ b/src/outline.c @@ -15,12 +15,16 @@ static int outlineDrawn; /**************************************************************************** ****************************************************************************/ -void InitializeOutline() { +void +InitializeOutline() +{ } /**************************************************************************** ****************************************************************************/ -void StartupOutline() { +void +StartupOutline() +{ XGCValues gcValues; @@ -35,18 +39,24 @@ void StartupOutline() { /**************************************************************************** ****************************************************************************/ -void ShutdownOutline() { +void +ShutdownOutline() +{ JXFreeGC(display, outlineGC); } /**************************************************************************** ****************************************************************************/ -void DestroyOutline() { +void +DestroyOutline() +{ } /**************************************************************************** ****************************************************************************/ -void DrawOutline(int x, int y, int width, int height) { +void +DrawOutline(int x, int y, int width, int height) +{ if(!outlineDrawn) { JXSync(display, False); JXGrabServer(display); @@ -61,7 +71,9 @@ void DrawOutline(int x, int y, int width, int height) { /**************************************************************************** ****************************************************************************/ -void ClearOutline() { +void +ClearOutline() +{ if(outlineDrawn) { JXDrawRectangle(display, rootWindow, outlineGC, lastX, lastY, lastWidth, lastHeight); diff --git a/src/pager.c b/src/pager.c index 6c237bd..3c88c7e 100644 --- a/src/pager.c +++ b/src/pager.c @@ -40,18 +40,24 @@ static void DrawPagerClient(const PagerType *pp, const ClientNode *np); /**************************************************************************** ****************************************************************************/ -void InitializePager() { +void +InitializePager() +{ pagers = NULL; } /**************************************************************************** ****************************************************************************/ -void StartupPager() { +void +StartupPager() +{ } /**************************************************************************** ****************************************************************************/ -void ShutdownPager() { +void +ShutdownPager() +{ PagerType *pp; @@ -63,7 +69,9 @@ void ShutdownPager() { /**************************************************************************** ****************************************************************************/ -void DestroyPager() { +void +DestroyPager() +{ PagerType *pp; @@ -99,7 +107,9 @@ TrayComponentType *CreatePager() { /**************************************************************************** ****************************************************************************/ -void Create(TrayComponentType *cp) { +void +Create(TrayComponentType *cp) +{ PagerType *pp; @@ -120,13 +130,17 @@ void Create(TrayComponentType *cp) { /**************************************************************************** ****************************************************************************/ -void Destroy(TrayComponentType *cp) { +void +Destroy(TrayComponentType *cp) +{ } /**************************************************************************** ****************************************************************************/ -void SetSize(TrayComponentType *cp, int width, int height) { +void +SetSize(TrayComponentType *cp, int width, int height) +{ PagerType *pp; @@ -165,7 +179,9 @@ void SetSize(TrayComponentType *cp, int width, int height) { /**************************************************************************** ****************************************************************************/ -void ProcessPagerButtonEvent(TrayComponentType *cp, int x, int y, int mask) { +void +ProcessPagerButtonEvent(TrayComponentType *cp, int x, int y, int mask) +{ PagerType *pp; @@ -193,7 +209,9 @@ void ProcessPagerButtonEvent(TrayComponentType *cp, int x, int y, int mask) { /**************************************************************************** ****************************************************************************/ -void UpdatePager() { +void +UpdatePager() +{ PagerType *pp; ClientNode *np; @@ -260,7 +278,9 @@ void UpdatePager() { /**************************************************************************** ****************************************************************************/ -void DrawPagerClient(const PagerType *pp, const ClientNode *np) { +void +DrawPagerClient(const PagerType *pp, const ClientNode *np) +{ int x, y; int width, height; diff --git a/src/parse.c b/src/parse.c index 45a0470..c1ccf2c 100644 --- a/src/parse.c +++ b/src/parse.c @@ -153,7 +153,9 @@ static void ParseError(const TokenNode *tp, const char *str, ...); /**************************************************************************** ****************************************************************************/ -void ParseConfig(const char *fileName) { +void +ParseConfig(const char *fileName) +{ if(!ParseFile(fileName, 0)) { if(!ParseFile(SYSTEM_CONFIG, 0)) { ParseError(NULL, "could not open %s or %s", fileName, SYSTEM_CONFIG); @@ -167,7 +169,9 @@ void ParseConfig(const char *fileName) { * Parse a specific file. * Returns 1 on success and 0 on failure. ****************************************************************************/ -int ParseFile(const char *fileName, int depth) { +int +ParseFile(const char *fileName, int depth) +{ TokenNode *tokens; FILE *fd; @@ -198,7 +202,9 @@ int ParseFile(const char *fileName, int depth) { /*************************************************************************** ***************************************************************************/ -void ReleaseTokens(TokenNode *np) { +void +ReleaseTokens(TokenNode *np) +{ AttributeNode *ap; TokenNode *tp; @@ -242,7 +248,9 @@ void ReleaseTokens(TokenNode *np) { /*************************************************************************** ***************************************************************************/ -void Parse(const TokenNode *start, int depth) { +void +Parse(const TokenNode *start, int depth) +{ TokenNode *tp; @@ -347,7 +355,9 @@ void Parse(const TokenNode *start, int depth) { /**************************************************************************** ****************************************************************************/ -void ParseFocusModel(const TokenNode *tp) { +void +ParseFocusModel(const TokenNode *tp) +{ if(tp->value) { if(!strcmp(tp->value, "sloppy")) { focusModel = FOCUS_SLOPPY; @@ -363,7 +373,9 @@ void ParseFocusModel(const TokenNode *tp) { /**************************************************************************** ****************************************************************************/ -void ParseSnapMode(const TokenNode *tp) { +void +ParseSnapMode(const TokenNode *tp) +{ const char *distance; @@ -391,7 +403,9 @@ void ParseSnapMode(const TokenNode *tp) { /**************************************************************************** ****************************************************************************/ -void ParseMoveMode(const TokenNode *tp) { +void +ParseMoveMode(const TokenNode *tp) +{ const char *str; @@ -414,7 +428,9 @@ void ParseMoveMode(const TokenNode *tp) { /**************************************************************************** ****************************************************************************/ -void ParseResizeMode(const TokenNode *tp) { +void +ParseResizeMode(const TokenNode *tp) +{ const char *str; @@ -437,7 +453,9 @@ void ParseResizeMode(const TokenNode *tp) { /**************************************************************************** ****************************************************************************/ -void ParseRootMenu(const TokenNode *start) { +void +ParseRootMenu(const TokenNode *start) +{ const char *value; Menu *menu; @@ -762,7 +780,9 @@ MenuItem *ParseMenuInclude(const TokenNode *tp, Menu *menu, /**************************************************************************** ****************************************************************************/ -void ParseKey(const TokenNode *tp) { +void +ParseKey(const TokenNode *tp) +{ const char *key; const char *code; @@ -811,12 +831,16 @@ void ParseKey(const TokenNode *tp) { /**************************************************************************** ****************************************************************************/ -void ParseMouse(const TokenNode *tp) { +void +ParseMouse(const TokenNode *tp) +{ } /*************************************************************************** ***************************************************************************/ -void ParseBorderStyle(const TokenNode *tp) { +void +ParseBorderStyle(const TokenNode *tp) +{ const TokenNode *np; @@ -855,7 +879,9 @@ void ParseBorderStyle(const TokenNode *tp) { /*************************************************************************** ***************************************************************************/ -void ParseInclude(const TokenNode *tp, int depth) { +void +ParseInclude(const TokenNode *tp, int depth) +{ char *temp; @@ -883,7 +909,9 @@ void ParseInclude(const TokenNode *tp, int depth) { /**************************************************************************** ****************************************************************************/ -void ParseDesktops(const TokenNode *tp) { +void +ParseDesktops(const TokenNode *tp) +{ TokenNode *np; char *attr; @@ -917,7 +945,9 @@ void ParseDesktops(const TokenNode *tp) { /*************************************************************************** ***************************************************************************/ -void ParseTaskListStyle(const TokenNode *tp) { +void +ParseTaskListStyle(const TokenNode *tp) +{ const char *temp; TokenNode *np; @@ -954,7 +984,9 @@ void ParseTaskListStyle(const TokenNode *tp) { /*************************************************************************** ***************************************************************************/ -void ParseTrayStyle(const TokenNode *tp) { +void +ParseTrayStyle(const TokenNode *tp) +{ const TokenNode *np; @@ -979,7 +1011,9 @@ void ParseTrayStyle(const TokenNode *tp) { /*************************************************************************** ***************************************************************************/ -void ParseTray(const TokenNode *tp) { +void +ParseTray(const TokenNode *tp) +{ const TokenNode *np; const char *attr; @@ -1065,7 +1099,9 @@ void ParseTray(const TokenNode *tp) { /*************************************************************************** ***************************************************************************/ -void ParsePager(const TokenNode *tp, TrayType *tray) { +void +ParsePager(const TokenNode *tp, TrayType *tray) +{ TrayComponentType *cp; @@ -1079,7 +1115,9 @@ void ParsePager(const TokenNode *tp, TrayType *tray) { /*************************************************************************** ***************************************************************************/ -void ParseTaskList(const TokenNode *tp, TrayType *tray) { +void +ParseTaskList(const TokenNode *tp, TrayType *tray) +{ TrayComponentType *cp; const char *temp; @@ -1099,7 +1137,9 @@ void ParseTaskList(const TokenNode *tp, TrayType *tray) { /*************************************************************************** ***************************************************************************/ -void ParseSwallow(const TokenNode *tp, TrayType *tray) { +void +ParseSwallow(const TokenNode *tp, TrayType *tray) +{ TrayComponentType *cp; const char *name; @@ -1137,7 +1177,9 @@ void ParseSwallow(const TokenNode *tp, TrayType *tray) { /*************************************************************************** ***************************************************************************/ -void ParseTrayButton(const TokenNode *tp, TrayType *tray) { +void +ParseTrayButton(const TokenNode *tp, TrayType *tray) +{ TrayComponentType *cp; const char *icon; @@ -1176,7 +1218,9 @@ void ParseTrayButton(const TokenNode *tp, TrayType *tray) { /*************************************************************************** ***************************************************************************/ -void ParseClock(const TokenNode *tp, TrayType *tray) { +void +ParseClock(const TokenNode *tp, TrayType *tray) +{ TrayComponentType *cp; const char *format; @@ -1218,7 +1262,9 @@ void ParseClock(const TokenNode *tp, TrayType *tray) { /*************************************************************************** ***************************************************************************/ -void ParseDock(const TokenNode *tp, TrayType *tray) { +void +ParseDock(const TokenNode *tp, TrayType *tray) +{ TrayComponentType *cp; @@ -1234,7 +1280,9 @@ void ParseDock(const TokenNode *tp, TrayType *tray) { /*************************************************************************** ***************************************************************************/ -void ParsePagerStyle(const TokenNode *tp) { +void +ParsePagerStyle(const TokenNode *tp) +{ const TokenNode *np; @@ -1267,7 +1315,9 @@ void ParsePagerStyle(const TokenNode *tp) { /*************************************************************************** ***************************************************************************/ -void ParsePopupStyle(const TokenNode *tp) { +void +ParsePopupStyle(const TokenNode *tp) +{ const TokenNode *np; const char *str; @@ -1314,7 +1364,9 @@ void ParsePopupStyle(const TokenNode *tp) { /*************************************************************************** ***************************************************************************/ -void ParseMenuStyle(const TokenNode *tp) { +void +ParseMenuStyle(const TokenNode *tp) +{ const TokenNode *np; @@ -1347,7 +1399,9 @@ void ParseMenuStyle(const TokenNode *tp) { /*************************************************************************** ***************************************************************************/ -void ParseClockStyle(const TokenNode *tp) { +void +ParseClockStyle(const TokenNode *tp) +{ const TokenNode *np; @@ -1374,7 +1428,9 @@ void ParseClockStyle(const TokenNode *tp) { /**************************************************************************** ****************************************************************************/ -void ParseTrayButtonStyle(const TokenNode *tp) { +void +ParseTrayButtonStyle(const TokenNode *tp) +{ const TokenNode *np; @@ -1401,7 +1457,9 @@ void ParseTrayButtonStyle(const TokenNode *tp) { /*************************************************************************** ***************************************************************************/ -void ParseGroup(const TokenNode *tp) { +void +ParseGroup(const TokenNode *tp) +{ const TokenNode *np; struct GroupType *group; @@ -1431,8 +1489,10 @@ void ParseGroup(const TokenNode *tp) { /*************************************************************************** ***************************************************************************/ -void ParseGroupOption(const TokenNode *tp, struct GroupType *group, - const char *option) { +void +ParseGroupOption(const TokenNode *tp, struct GroupType *group, + const char *option) +{ if(!option) { return; @@ -1516,7 +1576,9 @@ char *ReadFile(FILE *fd) { /**************************************************************************** ****************************************************************************/ -void InvalidTag(const TokenNode *tp, TokenType parent) { +void +InvalidTag(const TokenNode *tp, TokenType parent) +{ ParseError(tp, "invalid tag in %s: %s", GetTokenTypeName(parent), GetTokenName(tp)); @@ -1525,7 +1587,9 @@ void InvalidTag(const TokenNode *tp, TokenType parent) { /**************************************************************************** ****************************************************************************/ -void ParseError(const TokenNode *tp, const char *str, ...) { +void +ParseError(const TokenNode *tp, const char *str, ...) +{ va_list ap; diff --git a/src/place.c b/src/place.c index b9cdaf4..3ccebdf 100644 --- a/src/place.c +++ b/src/place.c @@ -38,17 +38,23 @@ static void SubtractBounds(const BoundingBox *src, BoundingBox *dest); /**************************************************************************** ****************************************************************************/ -void InitializePlacement() { +void +InitializePlacement() +{ } /**************************************************************************** ****************************************************************************/ -void StartupPlacement() { +void +StartupPlacement() +{ } /**************************************************************************** ****************************************************************************/ -void ShutdownPlacement() { +void +ShutdownPlacement() +{ Strut *sp; @@ -63,12 +69,16 @@ void ShutdownPlacement() { /**************************************************************************** ****************************************************************************/ -void DestroyPlacement() { +void +DestroyPlacement() +{ } /**************************************************************************** ****************************************************************************/ -void RemoveClientStrut(ClientNode *np) { +void +RemoveClientStrut(ClientNode *np) +{ Strut *sp; @@ -92,7 +102,9 @@ void RemoveClientStrut(ClientNode *np) { /**************************************************************************** ****************************************************************************/ -void ReadClientStrut(ClientNode *np) { +void +ReadClientStrut(ClientNode *np) +{ BoundingBox box; Strut *sp; @@ -230,7 +242,9 @@ void ReadClientStrut(ClientNode *np) { /**************************************************************************** ****************************************************************************/ -void GetScreenBounds(const ScreenType *sp, BoundingBox *box) { +void +GetScreenBounds(const ScreenType *sp, BoundingBox *box) +{ box->x = sp->x; box->y = sp->y; @@ -242,7 +256,9 @@ void GetScreenBounds(const ScreenType *sp, BoundingBox *box) { /**************************************************************************** * Shrink dest such that it does not intersect with src. ****************************************************************************/ -void SubtractBounds(const BoundingBox *src, BoundingBox *dest) { +void +SubtractBounds(const BoundingBox *src, BoundingBox *dest) +{ BoundingBox boxes[4]; @@ -307,7 +323,9 @@ void SubtractBounds(const BoundingBox *src, BoundingBox *dest) { /**************************************************************************** ****************************************************************************/ -void UpdateTrayBounds(BoundingBox *box, unsigned int layer) { +void +UpdateTrayBounds(BoundingBox *box, unsigned int layer) +{ TrayType *tp; BoundingBox src; @@ -337,7 +355,9 @@ void UpdateTrayBounds(BoundingBox *box, unsigned int layer) { /**************************************************************************** ****************************************************************************/ -void UpdateStrutBounds(BoundingBox *box) { +void +UpdateStrutBounds(BoundingBox *box) +{ Strut *sp; BoundingBox last; @@ -359,7 +379,9 @@ void UpdateStrutBounds(BoundingBox *box) { /**************************************************************************** ****************************************************************************/ -void PlaceClient(ClientNode *np, int alreadyMapped) { +void +PlaceClient(ClientNode *np, int alreadyMapped) +{ static int offset = 0; static int prevx = -1; @@ -458,7 +480,9 @@ void PlaceClient(ClientNode *np, int alreadyMapped) { /**************************************************************************** ****************************************************************************/ -void ConstrainSize(ClientNode *np) { +void +ConstrainSize(ClientNode *np) +{ BoundingBox box; const ScreenType *sp; @@ -517,7 +541,9 @@ void ConstrainSize(ClientNode *np) { /**************************************************************************** ****************************************************************************/ -void PlaceMaximizedClient(ClientNode *np) { +void +PlaceMaximizedClient(ClientNode *np) +{ BoundingBox box; const ScreenType *sp; @@ -577,7 +603,9 @@ void PlaceMaximizedClient(ClientNode *np) { /**************************************************************************** ****************************************************************************/ -void GetGravityDelta(const ClientNode *np, int *x, int *y) { +void +GetGravityDelta(const ClientNode *np, int *x, int *y) +{ int north, south, east, west; @@ -631,7 +659,9 @@ void GetGravityDelta(const ClientNode *np, int *x, int *y) { /**************************************************************************** * Move the window in the specified direction for reparenting. ****************************************************************************/ -void GravitateClient(ClientNode *np, int negate) { +void +GravitateClient(ClientNode *np, int negate) +{ int deltax, deltay; diff --git a/src/popup.c b/src/popup.c index c9caafc..3a9fae2 100644 --- a/src/popup.c +++ b/src/popup.c @@ -33,14 +33,18 @@ static void DrawPopup(); /**************************************************************************** ****************************************************************************/ -void InitializePopup() { +void +InitializePopup() +{ popupDelay = DEFAULT_POPUP_DELAY; popupEnabled = 1; } /**************************************************************************** ****************************************************************************/ -void StartupPopup() { +void +StartupPopup() +{ popup.isActive = 0; popup.text = NULL; popup.window = None; @@ -48,7 +52,9 @@ void StartupPopup() { /**************************************************************************** ****************************************************************************/ -void ShutdownPopup() { +void +ShutdownPopup() +{ if(popup.text) { Release(popup.text); popup.text = NULL; @@ -61,7 +67,9 @@ void ShutdownPopup() { /**************************************************************************** ****************************************************************************/ -void DestroyPopup() { +void +DestroyPopup() +{ } /**************************************************************************** @@ -70,7 +78,9 @@ void DestroyPopup() { * y - The y coordinate of the popup window. * text - The text to display in the popup. ****************************************************************************/ -void ShowPopup(int x, int y, const char *text) { +void +ShowPopup(int x, int y, const char *text) +{ unsigned long attrMask; XSetWindowAttributes attr; @@ -162,13 +172,17 @@ void ShowPopup(int x, int y, const char *text) { /**************************************************************************** ****************************************************************************/ -void SetPopupEnabled(int e) { +void +SetPopupEnabled(int e) +{ popupEnabled = e; } /**************************************************************************** ****************************************************************************/ -void SetPopupDelay(const char *str) { +void +SetPopupDelay(const char *str) +{ int temp; @@ -188,7 +202,9 @@ void SetPopupDelay(const char *str) { /**************************************************************************** ****************************************************************************/ -void SignalPopup(const TimeType *now, int x, int y) { +void +SignalPopup(const TimeType *now, int x, int y) +{ if(popup.isActive) { if(abs(popup.mx - x) > 2 || abs(popup.my - y) > 2) { @@ -201,7 +217,9 @@ void SignalPopup(const TimeType *now, int x, int y) { /**************************************************************************** ****************************************************************************/ -int ProcessPopupEvent(const XEvent *event) { +int +ProcessPopupEvent(const XEvent *event) +{ if(popup.isActive && event->xany.window == popup.window) { if(event->type == Expose) { @@ -220,7 +238,9 @@ int ProcessPopupEvent(const XEvent *event) { /**************************************************************************** ****************************************************************************/ -void DrawPopup() { +void +DrawPopup() +{ Assert(popup.isActive); diff --git a/src/resize.c b/src/resize.c index c7961f9..9b512c3 100644 --- a/src/resize.c +++ b/src/resize.c @@ -30,12 +30,16 @@ static void FixWidth(ClientNode *np); static void FixHeight(ClientNode *np); /** Set the resize mode to use. */ -void SetResizeMode(ResizeModeType mode) { +void +SetResizeMode(ResizeModeType mode) +{ resizeMode = mode; } /** Callback to stop a resize. */ -void ResizeController(int wasDestroyed) { +void +ResizeController(int wasDestroyed) +{ if(resizeMode == RESIZE_OUTLINE) { ClearOutline(); } @@ -46,8 +50,10 @@ void ResizeController(int wasDestroyed) { } /** Resize a client window (mouse initiated). */ -void ResizeClient(ClientNode *np, BorderActionType action, - int startx, int starty) { +void +ResizeClient(ClientNode *np, BorderActionType action, + int startx, int starty) +{ XEvent event; int oldx, oldy; @@ -245,7 +251,9 @@ void ResizeClient(ClientNode *np, BorderActionType action, } /** Resize a client window (keyboard or menu initiated). */ -void ResizeClientKeyboard(ClientNode *np) { +void +ResizeClientKeyboard(ClientNode *np) +{ XEvent event; int gwidth, gheight; @@ -406,7 +414,9 @@ void ResizeClientKeyboard(ClientNode *np) { } /** Stop a resize action. */ -void StopResize(ClientNode *np) { +void +StopResize(ClientNode *np) +{ int north, south, east, west; @@ -440,7 +450,9 @@ void StopResize(ClientNode *np) { } /** Fix the width to match the aspect ratio. */ -void FixWidth(ClientNode *np) { +void +FixWidth(ClientNode *np) +{ float ratio, minr, maxr; @@ -465,7 +477,9 @@ void FixWidth(ClientNode *np) { } /** Fix the height to match the aspect ratio. */ -void FixHeight(ClientNode *np) { +void +FixHeight(ClientNode *np) +{ float ratio, minr, maxr; 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; diff --git a/src/screen.c b/src/screen.c index cc2b8fd..d62c1d5 100644 --- a/src/screen.c +++ b/src/screen.c @@ -13,13 +13,17 @@ static int screenCount; /**************************************************************************** ****************************************************************************/ -void InitializeScreens() { +void +InitializeScreens() +{ screens = NULL; } /**************************************************************************** ****************************************************************************/ -void StartupScreens() { +void +StartupScreens() +{ #ifdef USE_XINERAMA XineramaScreenInfo *info; @@ -67,7 +71,9 @@ void StartupScreens() { /**************************************************************************** ****************************************************************************/ -void ShutdownScreens() { +void +ShutdownScreens() +{ if(screens) { Release(screens); screens = NULL; @@ -76,7 +82,9 @@ void ShutdownScreens() { /**************************************************************************** ****************************************************************************/ -void DestroyScreens() { +void +DestroyScreens() +{ } /**************************************************************************** @@ -129,7 +137,9 @@ const ScreenType *GetScreen(int index) { /**************************************************************************** ****************************************************************************/ -int GetScreenCount() { +int +GetScreenCount() +{ return screenCount; diff --git a/src/status.c b/src/status.c index 88c7ddb..0283494 100644 --- a/src/status.c +++ b/src/status.c @@ -37,8 +37,10 @@ static StatusWindowType ParseType(const char *str); /************************************************************************* *************************************************************************/ -void GetMoveResizeCoordinates(const ClientNode *np, StatusWindowType type, - int *x, int *y) { +void +GetMoveResizeCoordinates(const ClientNode *np, StatusWindowType type, + int *x, int *y) +{ const ScreenType *sp; @@ -65,7 +67,9 @@ void GetMoveResizeCoordinates(const ClientNode *np, StatusWindowType type, /************************************************************************* *************************************************************************/ -void CreateMoveResizeWindow(const ClientNode *np, StatusWindowType type) { +void +CreateMoveResizeWindow(const ClientNode *np, StatusWindowType type) +{ XSetWindowAttributes attrs; @@ -95,7 +99,9 @@ void CreateMoveResizeWindow(const ClientNode *np, StatusWindowType type) { /************************************************************************* *************************************************************************/ -void DrawMoveResizeWindow(const ClientNode *np, StatusWindowType type) { +void +DrawMoveResizeWindow(const ClientNode *np, StatusWindowType type) +{ int x, y; @@ -139,7 +145,9 @@ void DrawMoveResizeWindow(const ClientNode *np, StatusWindowType type) { /************************************************************************* *************************************************************************/ -void DestroyMoveResizeWindow() { +void +DestroyMoveResizeWindow() +{ if(statusWindow != None) { JXDestroyWindow(display, statusWindow); @@ -150,7 +158,9 @@ void DestroyMoveResizeWindow() { /************************************************************************* *************************************************************************/ -void CreateMoveWindow(ClientNode *np) { +void +CreateMoveWindow(ClientNode *np) +{ CreateMoveResizeWindow(np, moveStatusType); @@ -158,7 +168,9 @@ void CreateMoveWindow(ClientNode *np) { /************************************************************************* *************************************************************************/ -void UpdateMoveWindow(ClientNode *np) { +void +UpdateMoveWindow(ClientNode *np) +{ char str[80]; unsigned int width; @@ -178,7 +190,9 @@ void UpdateMoveWindow(ClientNode *np) { /************************************************************************* *************************************************************************/ -void DestroyMoveWindow() { +void +DestroyMoveWindow() +{ DestroyMoveResizeWindow(); @@ -186,7 +200,9 @@ void DestroyMoveWindow() { /************************************************************************* *************************************************************************/ -void CreateResizeWindow(ClientNode *np) { +void +CreateResizeWindow(ClientNode *np) +{ CreateMoveResizeWindow(np, resizeStatusType); @@ -194,7 +210,9 @@ void CreateResizeWindow(ClientNode *np) { /************************************************************************* *************************************************************************/ -void UpdateResizeWindow(ClientNode *np, int gwidth, int gheight) { +void +UpdateResizeWindow(ClientNode *np, int gwidth, int gheight) +{ char str[80]; unsigned int fontWidth; @@ -214,7 +232,9 @@ void UpdateResizeWindow(ClientNode *np, int gwidth, int gheight) { /************************************************************************* *************************************************************************/ -void DestroyResizeWindow() { +void +DestroyResizeWindow() +{ DestroyMoveResizeWindow(); @@ -222,7 +242,9 @@ void DestroyResizeWindow() { /************************************************************************* *************************************************************************/ -StatusWindowType ParseType(const char *str) { +StatusWindowType +ParseType(const char *str) +{ if(!str) { return SW_SCREEN; @@ -242,7 +264,9 @@ StatusWindowType ParseType(const char *str) { /************************************************************************* *************************************************************************/ -void SetMoveStatusType(const char *str) { +void +SetMoveStatusType(const char *str) +{ StatusWindowType type; @@ -258,7 +282,9 @@ void SetMoveStatusType(const char *str) { /************************************************************************* *************************************************************************/ -void SetResizeStatusType(const char *str) { +void +SetResizeStatusType(const char *str) +{ StatusWindowType type; diff --git a/src/swallow.c b/src/swallow.c index 26836f1..44124a0 100644 --- a/src/swallow.c +++ b/src/swallow.c @@ -38,12 +38,16 @@ static void Destroy(TrayComponentType *cp); static void Resize(TrayComponentType *cp); /** Initialize swallow data. */ -void InitializeSwallow() { +void +InitializeSwallow() +{ swallowNodes = NULL; } /** Start swallow processing. */ -void StartupSwallow() { +void +StartupSwallow() +{ SwallowNode *np; @@ -56,11 +60,15 @@ void StartupSwallow() { } /** Stop swallow processing. */ -void ShutdownSwallow() { +void +ShutdownSwallow() +{ } /** Destroy swallow data. */ -void DestroySwallow() { +void +DestroySwallow() +{ SwallowNode *np; @@ -135,7 +143,9 @@ TrayComponentType *CreateSwallow(const char *name, const char *command, } /** Process an event on a swallowed window. */ -int ProcessSwallowEvent(const XEvent *event) { +int +ProcessSwallowEvent(const XEvent *event) +{ SwallowNode *np; int width, height; @@ -180,7 +190,9 @@ int ProcessSwallowEvent(const XEvent *event) { } /** Handle a tray resize. */ -void Resize(TrayComponentType *cp) { +void +Resize(TrayComponentType *cp) +{ int width, height; @@ -198,7 +210,9 @@ void Resize(TrayComponentType *cp) { } /** Destroy a swallow tray component. */ -void Destroy(TrayComponentType *cp) { +void +Destroy(TrayComponentType *cp) +{ ClientProtocolType protocols; @@ -220,7 +234,9 @@ void Destroy(TrayComponentType *cp) { } /** Determine if this is a window to be swallowed, if it is, swallow it. */ -int CheckSwallowMap(const XMapEvent *event) { +int +CheckSwallowMap(const XMapEvent *event) +{ SwallowNode *np; XClassHint hint; diff --git a/src/taskbar.c b/src/taskbar.c index 0b9a130..7975d3b 100644 --- a/src/taskbar.c +++ b/src/taskbar.c @@ -81,7 +81,9 @@ static void ProcessTaskMotionEvent(TrayComponentType *cp, /*************************************************************************** ***************************************************************************/ -void InitializeTaskBar() { +void +InitializeTaskBar() +{ bars = NULL; taskBarNodes = NULL; taskBarNodesTail = NULL; @@ -90,7 +92,9 @@ void InitializeTaskBar() { /*************************************************************************** ***************************************************************************/ -void StartupTaskBar() { +void +StartupTaskBar() +{ minimizedPixmap = JXCreatePixmapFromBitmapData(display, rootWindow, minimized_bitmap, 4, 4, colors[COLOR_TASK_FG], colors[COLOR_TASK_BG], rootDepth); @@ -98,7 +102,9 @@ void StartupTaskBar() { /*************************************************************************** ***************************************************************************/ -void ShutdownTaskBar() { +void +ShutdownTaskBar() +{ TaskBarType *bp; @@ -111,7 +117,9 @@ void ShutdownTaskBar() { /*************************************************************************** ***************************************************************************/ -void DestroyTaskBar() { +void +DestroyTaskBar() +{ TaskBarType *bp; @@ -158,7 +166,9 @@ TrayComponentType *CreateTaskBar() { /*************************************************************************** ***************************************************************************/ -void SetSize(TrayComponentType *cp, int width, int height) { +void +SetSize(TrayComponentType *cp, int width, int height) +{ TaskBarType *tp; @@ -182,7 +192,9 @@ void SetSize(TrayComponentType *cp, int width, int height) { /*************************************************************************** ***************************************************************************/ -void Create(TrayComponentType *cp) { +void +Create(TrayComponentType *cp) +{ TaskBarType *tp; @@ -212,7 +224,9 @@ void Create(TrayComponentType *cp) { /*************************************************************************** ***************************************************************************/ -void Resize(TrayComponentType *cp) { +void +Resize(TrayComponentType *cp) +{ TaskBarType *tp; @@ -246,13 +260,17 @@ void Resize(TrayComponentType *cp) { /*************************************************************************** ***************************************************************************/ -void Destroy(TrayComponentType *cp) { +void +Destroy(TrayComponentType *cp) +{ } /*************************************************************************** ***************************************************************************/ -void ProcessTaskButtonEvent(TrayComponentType *cp, int x, int y, int mask) { +void +ProcessTaskButtonEvent(TrayComponentType *cp, int x, int y, int mask) +{ TaskBarType *bar = (TaskBarType*)cp->object; Node *np; @@ -302,7 +320,9 @@ void ProcessTaskButtonEvent(TrayComponentType *cp, int x, int y, int mask) { /*************************************************************************** ***************************************************************************/ -void ProcessTaskMotionEvent(TrayComponentType *cp, int x, int y, int mask) { +void +ProcessTaskMotionEvent(TrayComponentType *cp, int x, int y, int mask) +{ TaskBarType *bp = (TaskBarType*)cp->object; @@ -314,7 +334,9 @@ void ProcessTaskMotionEvent(TrayComponentType *cp, int x, int y, int mask) { /*************************************************************************** ***************************************************************************/ -void ShowTaskWindowMenu(TaskBarType *bar, Node *np) { +void +ShowTaskWindowMenu(TaskBarType *bar, Node *np) +{ int x, y; int mwidth, mheight; @@ -347,7 +369,9 @@ void ShowTaskWindowMenu(TaskBarType *bar, Node *np) { /*************************************************************************** ***************************************************************************/ -void AddClientToTaskBar(ClientNode *np) { +void +AddClientToTaskBar(ClientNode *np) +{ Node *tp; @@ -385,7 +409,9 @@ void AddClientToTaskBar(ClientNode *np) { /*************************************************************************** ***************************************************************************/ -void RemoveClientFromTaskBar(ClientNode *np) { +void +RemoveClientFromTaskBar(ClientNode *np) +{ Node *tp; @@ -416,7 +442,9 @@ void RemoveClientFromTaskBar(ClientNode *np) { /*************************************************************************** ***************************************************************************/ -void UpdateTaskBar() { +void +UpdateTaskBar() +{ TaskBarType *bp; unsigned int count; @@ -446,7 +474,9 @@ void UpdateTaskBar() { /*************************************************************************** ***************************************************************************/ -void SignalTaskbar(const TimeType *now, int x, int y) { +void +SignalTaskbar(const TimeType *now, int x, int y) +{ TaskBarType *bp; Node *np; @@ -473,7 +503,9 @@ void SignalTaskbar(const TimeType *now, int x, int y) { /*************************************************************************** ***************************************************************************/ -void Render(const TaskBarType *bp) { +void +Render(const TaskBarType *bp) +{ Node *tp; ButtonNode button; @@ -583,7 +615,9 @@ void Render(const TaskBarType *bp) { /*************************************************************************** ***************************************************************************/ -void FocusNext() { +void +FocusNext() +{ Node *tp; @@ -620,7 +654,9 @@ void FocusNext() { /*************************************************************************** ***************************************************************************/ -void FocusPrevious() { +void +FocusPrevious() +{ Node *tp; @@ -657,7 +693,9 @@ void FocusPrevious() { /*************************************************************************** ***************************************************************************/ -void FocusNextStackedCircular() { +void +FocusNextStackedCircular() +{ ClientNode *ac; ClientNode *np; @@ -711,7 +749,9 @@ void FocusNextStackedCircular() { /*************************************************************************** ***************************************************************************/ -void FocusPreviousStackedCircular() { +void +FocusPreviousStackedCircular() +{ ClientNode *ac; ClientNode *np; @@ -830,7 +870,9 @@ Node *GetNode(TaskBarType *bar, int x) { /*************************************************************************** ***************************************************************************/ -unsigned int GetItemCount() { +unsigned int +GetItemCount() +{ Node *tp; unsigned int count; @@ -848,7 +890,9 @@ unsigned int GetItemCount() { /*************************************************************************** ***************************************************************************/ -int ShouldShowItem(const ClientNode *np) { +int +ShouldShowItem(const ClientNode *np) +{ if(np->state.desktop != currentDesktop && !(np->state.status & STAT_STICKY)) { @@ -874,7 +918,9 @@ int ShouldShowItem(const ClientNode *np) { /*************************************************************************** ***************************************************************************/ -int ShouldFocusItem(const ClientNode *np) { +int +ShouldFocusItem(const ClientNode *np) +{ if(np->state.desktop != currentDesktop && !(np->state.status & STAT_STICKY)) { @@ -899,7 +945,9 @@ int ShouldFocusItem(const ClientNode *np) { /*************************************************************************** ***************************************************************************/ -unsigned int GetItemWidth(const TaskBarType *bp, unsigned int itemCount) { +unsigned int +GetItemWidth(const TaskBarType *bp, unsigned int itemCount) +{ unsigned int itemWidth; @@ -924,7 +972,9 @@ unsigned int GetItemWidth(const TaskBarType *bp, unsigned int itemCount) { /*************************************************************************** ***************************************************************************/ -void SetMaxTaskBarItemWidth(TrayComponentType *cp, const char *value) { +void +SetMaxTaskBarItemWidth(TrayComponentType *cp, const char *value) +{ int temp; TaskBarType *bp; @@ -945,7 +995,9 @@ void SetMaxTaskBarItemWidth(TrayComponentType *cp, const char *value) { /*************************************************************************** ***************************************************************************/ -void SetTaskBarInsertMode(const char *mode) { +void +SetTaskBarInsertMode(const char *mode) +{ if(!mode) { insertMode = INSERT_RIGHT; @@ -966,7 +1018,9 @@ void SetTaskBarInsertMode(const char *mode) { /*************************************************************************** * Maintain the _NET_CLIENT_LIST[_STACKING] properties on the root window. ***************************************************************************/ -void UpdateNetClientList() { +void +UpdateNetClientList() +{ Node *np; ClientNode *client; diff --git a/src/theme.c b/src/theme.c index 4560abc..00e0d30 100644 --- a/src/theme.c +++ b/src/theme.c @@ -18,7 +18,9 @@ static char *themeName; /**************************************************************************** ****************************************************************************/ -void InitializeThemes() { +void +InitializeThemes() +{ themeName = NULL; themePaths = NULL; @@ -27,17 +29,23 @@ void InitializeThemes() { /**************************************************************************** ****************************************************************************/ -void StartupThemes() { +void +StartupThemes() +{ } /**************************************************************************** ****************************************************************************/ -void ShutdownThemes() { +void +ShutdownThemes() +{ } /**************************************************************************** ****************************************************************************/ -void DestroyThemes() { +void +DestroyThemes() +{ ThemePathNode *tp; @@ -56,7 +64,9 @@ void DestroyThemes() { /**************************************************************************** ****************************************************************************/ -void AddThemePath(const char *path) { +void +AddThemePath(const char *path) +{ ThemePathNode *tp; @@ -75,7 +85,9 @@ void AddThemePath(const char *path) { /**************************************************************************** ****************************************************************************/ -void SetTheme(const char *name) { +void +SetTheme(const char *name) +{ if(themeName) { Warning("theme set multiple times"); diff --git a/src/timing.c b/src/timing.c index 047d919..d7c5546 100644 --- a/src/timing.c +++ b/src/timing.c @@ -11,7 +11,9 @@ static const unsigned long MAX_TIME_SECONDS = 60; /**************************************************************************** * Get the current time in milliseconds since midnight 1970-01-01 UTC. ****************************************************************************/ -void GetCurrentTime(TimeType *t) { +void +GetCurrentTime(TimeType *t) +{ struct timeval val; gettimeofday(&val, NULL); t->seconds = val.tv_sec; @@ -24,7 +26,9 @@ void GetCurrentTime(TimeType *t) { * MAX_TIME_SECONDS will be returned. * Note that the times must be normalized. ****************************************************************************/ -unsigned long GetTimeDifference(const TimeType *t1, const TimeType *t2) { +unsigned long +GetTimeDifference(const TimeType *t1, const TimeType *t2) +{ unsigned long deltaSeconds; int deltaMs; diff --git a/src/tray.c b/src/tray.c index d30dd1e..a710941 100644 --- a/src/tray.c +++ b/src/tray.c @@ -38,14 +38,18 @@ static void LayoutTray(TrayType *tp, int *variableSize, /*************************************************************************** ***************************************************************************/ -void InitializeTray() { +void +InitializeTray() +{ trays = NULL; supportingWindow = None; } /*************************************************************************** ***************************************************************************/ -void StartupTray() { +void +StartupTray() +{ XSetWindowAttributes attr; unsigned long attrMask; @@ -146,7 +150,9 @@ void StartupTray() { /*************************************************************************** ***************************************************************************/ -void ShutdownTray() { +void +ShutdownTray() +{ TrayType *tp; TrayComponentType *cp; @@ -170,7 +176,9 @@ void ShutdownTray() { /*************************************************************************** ***************************************************************************/ -void DestroyTray() { +void +DestroyTray() +{ TrayType *tp; TrayComponentType *cp; @@ -263,7 +271,9 @@ TrayComponentType *CreateTrayComponent() { /*************************************************************************** ***************************************************************************/ -void AddTrayComponent(TrayType *tp, TrayComponentType *cp) { +void +AddTrayComponent(TrayType *tp, TrayComponentType *cp) +{ Assert(tp); Assert(cp); @@ -283,7 +293,9 @@ void AddTrayComponent(TrayType *tp, TrayComponentType *cp) { /*************************************************************************** * Compute the max component width. ***************************************************************************/ -int ComputeMaxWidth(TrayType *tp) { +int +ComputeMaxWidth(TrayType *tp) +{ TrayComponentType *cp; int result; @@ -306,7 +318,9 @@ int ComputeMaxWidth(TrayType *tp) { /*************************************************************************** ***************************************************************************/ -int ComputeTotalWidth(TrayType *tp) { +int +ComputeTotalWidth(TrayType *tp) +{ TrayComponentType *cp; int result; @@ -323,7 +337,9 @@ int ComputeTotalWidth(TrayType *tp) { /*************************************************************************** * Compute the max component height. ***************************************************************************/ -int ComputeMaxHeight(TrayType *tp) { +int +ComputeMaxHeight(TrayType *tp) +{ TrayComponentType *cp; int result; @@ -346,7 +362,9 @@ int ComputeMaxHeight(TrayType *tp) { /*************************************************************************** ***************************************************************************/ -int ComputeTotalHeight(TrayType *tp) { +int +ComputeTotalHeight(TrayType *tp) +{ TrayComponentType *cp; int result; @@ -362,7 +380,9 @@ int ComputeTotalHeight(TrayType *tp) { /*************************************************************************** ***************************************************************************/ -int CheckHorizontalFill(TrayType *tp) { +int +CheckHorizontalFill(TrayType *tp) +{ TrayComponentType *cp; @@ -378,7 +398,9 @@ int CheckHorizontalFill(TrayType *tp) { /*************************************************************************** ***************************************************************************/ -int CheckVerticalFill(TrayType *tp) { +int +CheckVerticalFill(TrayType *tp) +{ TrayComponentType *cp; @@ -394,7 +416,9 @@ int CheckVerticalFill(TrayType *tp) { /*************************************************************************** ***************************************************************************/ -void ComputeTraySize(TrayType *tp) { +void +ComputeTraySize(TrayType *tp) +{ TrayComponentType *cp; @@ -496,7 +520,9 @@ void ComputeTraySize(TrayType *tp) { /*************************************************************************** ***************************************************************************/ -void ShowTray(TrayType *tp) { +void +ShowTray(TrayType *tp) +{ Window win1, win2; int winx, winy; @@ -518,7 +544,9 @@ void ShowTray(TrayType *tp) { /*************************************************************************** ***************************************************************************/ -void HideTray(TrayType *tp) { +void +HideTray(TrayType *tp) +{ int x, y; @@ -554,7 +582,9 @@ void HideTray(TrayType *tp) { /*************************************************************************** ***************************************************************************/ -int ProcessTrayEvent(const XEvent *event) { +int +ProcessTrayEvent(const XEvent *event) +{ TrayType *tp; @@ -585,7 +615,9 @@ int ProcessTrayEvent(const XEvent *event) { /*************************************************************************** ***************************************************************************/ -void SignalTray(const TimeType *now, int x, int y) { +void +SignalTray(const TimeType *now, int x, int y) +{ TrayType *tp; @@ -602,7 +634,9 @@ void SignalTray(const TimeType *now, int x, int y) { /*************************************************************************** ***************************************************************************/ -void HandleTrayExpose(TrayType *tp, const XExposeEvent *event) { +void +HandleTrayExpose(TrayType *tp, const XExposeEvent *event) +{ DrawSpecificTray(tp); @@ -610,7 +644,9 @@ void HandleTrayExpose(TrayType *tp, const XExposeEvent *event) { /*************************************************************************** ***************************************************************************/ -void HandleTrayEnterNotify(TrayType *tp, const XCrossingEvent *event) { +void +HandleTrayEnterNotify(TrayType *tp, const XCrossingEvent *event) +{ ShowTray(tp); @@ -618,7 +654,9 @@ void HandleTrayEnterNotify(TrayType *tp, const XCrossingEvent *event) { /*************************************************************************** ***************************************************************************/ -void HandleTrayButtonPress(TrayType *tp, const XButtonEvent *event) { +void +HandleTrayButtonPress(TrayType *tp, const XButtonEvent *event) +{ TrayComponentType *cp; int xoffset, yoffset; @@ -652,7 +690,9 @@ void HandleTrayButtonPress(TrayType *tp, const XButtonEvent *event) { /*************************************************************************** ***************************************************************************/ -void HandleTrayMotionNotify(TrayType *tp, const XMotionEvent *event) { +void +HandleTrayMotionNotify(TrayType *tp, const XMotionEvent *event) +{ TrayComponentType *cp; int xoffset, yoffset; @@ -686,7 +726,9 @@ void HandleTrayMotionNotify(TrayType *tp, const XMotionEvent *event) { /*************************************************************************** ***************************************************************************/ -void DrawTray() { +void +DrawTray() +{ TrayType *tp; @@ -702,7 +744,9 @@ void DrawTray() { /*************************************************************************** ***************************************************************************/ -void DrawSpecificTray(const TrayType *tp) { +void +DrawSpecificTray(const TrayType *tp) +{ TrayComponentType *cp; int x; @@ -747,7 +791,9 @@ void DrawSpecificTray(const TrayType *tp) { /*************************************************************************** ***************************************************************************/ -void UpdateSpecificTray(const TrayType *tp, const TrayComponentType *cp) { +void +UpdateSpecificTray(const TrayType *tp, const TrayComponentType *cp) +{ if(cp->pixmap != None && !shouldExit) { JXCopyArea(display, cp->pixmap, tp->window, rootGC, 0, 0, @@ -758,7 +804,9 @@ void UpdateSpecificTray(const TrayType *tp, const TrayComponentType *cp) { /*************************************************************************** ***************************************************************************/ -void LayoutTray(TrayType *tp, int *variableSize, int *variableRemainder) { +void +LayoutTray(TrayType *tp, int *variableSize, int *variableRemainder) +{ TrayComponentType *cp; int variableCount; @@ -828,7 +876,9 @@ void LayoutTray(TrayType *tp, int *variableSize, int *variableRemainder) { /*************************************************************************** ***************************************************************************/ -void ResizeTray(TrayType *tp) { +void +ResizeTray(TrayType *tp) +{ TrayComponentType *cp; int variableSize; @@ -908,7 +958,9 @@ TrayType *GetTrays() { /*************************************************************************** ***************************************************************************/ -Window GetSupportingWindow() { +Window +GetSupportingWindow() +{ if(trays) { return trays->window; @@ -924,14 +976,18 @@ Window GetSupportingWindow() { /*************************************************************************** ***************************************************************************/ -void SetAutoHideTray(TrayType *tp, int v) { +void +SetAutoHideTray(TrayType *tp, int v) +{ Assert(tp); tp->autoHide = v; } /*************************************************************************** ***************************************************************************/ -void SetTrayX(TrayType *tp, const char *str) { +void +SetTrayX(TrayType *tp, const char *str) +{ Assert(tp); Assert(str); tp->x = atoi(str); @@ -939,7 +995,9 @@ void SetTrayX(TrayType *tp, const char *str) { /*************************************************************************** ***************************************************************************/ -void SetTrayY(TrayType *tp, const char *str) { +void +SetTrayY(TrayType *tp, const char *str) +{ Assert(tp); Assert(str); tp->y = atoi(str); @@ -947,7 +1005,9 @@ void SetTrayY(TrayType *tp, const char *str) { /*************************************************************************** ***************************************************************************/ -void SetTrayWidth(TrayType *tp, const char *str) { +void +SetTrayWidth(TrayType *tp, const char *str) +{ int width; @@ -966,7 +1026,9 @@ void SetTrayWidth(TrayType *tp, const char *str) { /*************************************************************************** ***************************************************************************/ -void SetTrayHeight(TrayType *tp, const char *str) { +void +SetTrayHeight(TrayType *tp, const char *str) +{ int height; @@ -986,7 +1048,9 @@ void SetTrayHeight(TrayType *tp, const char *str) { /*************************************************************************** ***************************************************************************/ -void SetTrayLayout(TrayType *tp, const char *str) { +void +SetTrayLayout(TrayType *tp, const char *str) +{ Assert(tp); @@ -1023,7 +1087,9 @@ void SetTrayLayout(TrayType *tp, const char *str) { /*************************************************************************** ***************************************************************************/ -void SetTrayLayer(TrayType *tp, const char *str) { +void +SetTrayLayer(TrayType *tp, const char *str) +{ int temp; @@ -1042,7 +1108,9 @@ void SetTrayLayer(TrayType *tp, const char *str) { /*************************************************************************** ***************************************************************************/ -void SetTrayBorder(TrayType *tp, const char *str) { +void +SetTrayBorder(TrayType *tp, const char *str) +{ int temp; @@ -1061,7 +1129,9 @@ void SetTrayBorder(TrayType *tp, const char *str) { /*************************************************************************** ***************************************************************************/ -void SetTrayHorizontalAlignment(TrayType *tp, const char *str) { +void +SetTrayHorizontalAlignment(TrayType *tp, const char *str) +{ Assert(tp); @@ -1082,7 +1152,9 @@ void SetTrayHorizontalAlignment(TrayType *tp, const char *str) { /*************************************************************************** ***************************************************************************/ -void SetTrayVerticalAlignment(TrayType *tp, const char *str) { +void +SetTrayVerticalAlignment(TrayType *tp, const char *str) +{ Assert(tp); diff --git a/src/traybutton.c b/src/traybutton.c index b596ba0..6761d7c 100644 --- a/src/traybutton.c +++ b/src/traybutton.c @@ -54,13 +54,17 @@ static void ProcessMotionEvent(TrayComponentType *cp, /*************************************************************************** ***************************************************************************/ -void InitializeTrayButtons() { +void +InitializeTrayButtons() +{ buttons = NULL; } /*************************************************************************** ***************************************************************************/ -void StartupTrayButtons() { +void +StartupTrayButtons() +{ TrayButtonType *bp; @@ -91,13 +95,17 @@ void StartupTrayButtons() { /*************************************************************************** ***************************************************************************/ -void ShutdownTrayButtons() { +void +ShutdownTrayButtons() +{ } /*************************************************************************** ***************************************************************************/ -void DestroyTrayButtons() { +void +DestroyTrayButtons() +{ TrayButtonType *bp; @@ -200,7 +208,9 @@ TrayComponentType *CreateTrayButton(const char *iconName, /*************************************************************************** ***************************************************************************/ -void SetSize(TrayComponentType *cp, int width, int height) { +void +SetSize(TrayComponentType *cp, int width, int height) +{ TrayButtonType *bp; int labelWidth, labelHeight; @@ -248,7 +258,9 @@ void SetSize(TrayComponentType *cp, int width, int height) { /*************************************************************************** ***************************************************************************/ -void CheckedCreate(TrayComponentType *cp) { +void +CheckedCreate(TrayComponentType *cp) +{ TrayButtonType *bp; @@ -279,7 +291,9 @@ void CheckedCreate(TrayComponentType *cp) { /*************************************************************************** ***************************************************************************/ -void Create(TrayComponentType *cp) { +void +Create(TrayComponentType *cp) +{ ButtonNode button; TrayButtonType *bp; @@ -330,7 +344,9 @@ void Create(TrayComponentType *cp) { /*************************************************************************** ***************************************************************************/ -void Resize(TrayComponentType *cp) { +void +Resize(TrayComponentType *cp) +{ Destroy(cp); Create(cp); @@ -339,7 +355,9 @@ void Resize(TrayComponentType *cp) { /*************************************************************************** ***************************************************************************/ -void Destroy(TrayComponentType *cp) { +void +Destroy(TrayComponentType *cp) +{ if(cp->pixmap != None) { JXFreePixmap(display, cp->pixmap); } @@ -347,7 +365,9 @@ void Destroy(TrayComponentType *cp) { /*************************************************************************** ***************************************************************************/ -void ProcessButtonEvent(TrayComponentType *cp, int x, int y, int mask) { +void +ProcessButtonEvent(TrayComponentType *cp, int x, int y, int mask) +{ const ScreenType *sp; int mwidth, mheight; @@ -399,7 +419,9 @@ void ProcessButtonEvent(TrayComponentType *cp, int x, int y, int mask) { /*************************************************************************** ***************************************************************************/ -void ProcessMotionEvent(TrayComponentType *cp, int x, int y, int mask) { +void +ProcessMotionEvent(TrayComponentType *cp, int x, int y, int mask) +{ TrayButtonType *bp = (TrayButtonType*)cp->object; @@ -411,7 +433,9 @@ void ProcessMotionEvent(TrayComponentType *cp, int x, int y, int mask) { /*************************************************************************** ***************************************************************************/ -void SignalTrayButton(const TimeType *now, int x, int y) { +void +SignalTrayButton(const TimeType *now, int x, int y) +{ TrayButtonType *bp; const char *popup; @@ -436,7 +460,9 @@ void SignalTrayButton(const TimeType *now, int x, int y) { /*************************************************************************** ***************************************************************************/ -void ValidateTrayButtons() { +void +ValidateTrayButtons() +{ TrayButtonType *bp; int bindex; diff --git a/src/winmenu.c b/src/winmenu.c index 7b537cc..ff2ea26 100644 --- a/src/winmenu.c +++ b/src/winmenu.c @@ -30,7 +30,9 @@ static ClientNode *client = NULL; /**************************************************************************** ****************************************************************************/ -void GetWindowMenuSize(ClientNode *np, int *width, int *height) { +void +GetWindowMenuSize(ClientNode *np, int *width, int *height) +{ Menu *menu; @@ -45,7 +47,9 @@ void GetWindowMenuSize(ClientNode *np, int *width, int *height) { /**************************************************************************** ****************************************************************************/ -void ShowWindowMenu(ClientNode *np, int x, int y) { +void +ShowWindowMenu(ClientNode *np, int x, int y) +{ Menu *menu; @@ -130,7 +134,9 @@ Menu *CreateWindowMenu() { /**************************************************************************** ****************************************************************************/ -void CreateWindowLayerMenu(Menu *menu) { +void +CreateWindowLayerMenu(Menu *menu) +{ Menu *submenu; MenuItem *item; @@ -195,7 +201,9 @@ void CreateWindowLayerMenu(Menu *menu) { /**************************************************************************** ****************************************************************************/ -void CreateWindowSendToMenu(Menu *menu) { +void +CreateWindowSendToMenu(Menu *menu) +{ unsigned int mask; unsigned int x; @@ -217,8 +225,10 @@ void CreateWindowSendToMenu(Menu *menu) { /**************************************************************************** ****************************************************************************/ -void AddWindowMenuItem(Menu *menu, const char *name, - MenuActionType type, int value) { +void +AddWindowMenuItem(Menu *menu, const char *name, + MenuActionType type, int value) +{ MenuItem *item; @@ -241,7 +251,9 @@ void AddWindowMenuItem(Menu *menu, const char *name, /**************************************************************************** ****************************************************************************/ -void ChooseWindow(const MenuAction *action) { +void +ChooseWindow(const MenuAction *action) +{ XEvent event; ClientNode *np; @@ -273,7 +285,9 @@ void ChooseWindow(const MenuAction *action) { /**************************************************************************** ****************************************************************************/ -void RunWindowCommand(const MenuAction *action) { +void +RunWindowCommand(const MenuAction *action) +{ switch(action->type) { case MA_STICK: -- cgit v1.2.3