aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client.c16
-rw-r--r--src/color.c4
-rw-r--r--src/confirm.c4
-rw-r--r--src/debug.c4
-rw-r--r--src/desktop.c4
-rw-r--r--src/dock.c4
-rw-r--r--src/group.c4
-rw-r--r--src/icon.c32
-rw-r--r--src/image.c20
-rw-r--r--src/lex.c28
-rw-r--r--src/menu.c4
-rw-r--r--src/misc.c8
-rw-r--r--src/pager.c4
-rw-r--r--src/parse.c12
-rw-r--r--src/screen.c12
-rw-r--r--src/taskbar.c8
-rw-r--r--src/timing.c4
-rw-r--r--src/tray.c12
-rw-r--r--src/winmenu.c4
19 files changed, 141 insertions, 47 deletions
diff --git a/src/client.c b/src/client.c
index df66b5b..1a293e3 100644
--- a/src/client.c
+++ b/src/client.c
@@ -135,7 +135,9 @@ LoadFocus()
}
/** Add a window to management. */
-ClientNode *AddClientWindow(Window w, int alreadyMapped, int notOwner) {
+ClientNode *
+AddClientWindow(Window w, int alreadyMapped, int notOwner)
+{
XWindowAttributes attr;
ClientNode *np;
@@ -1279,14 +1281,18 @@ RemoveClient(ClientNode *np)
}
/** Get the active client (possibly NULL). */
-ClientNode *GetActiveClient() {
+ClientNode *
+GetActiveClient()
+{
return activeClient;
}
/** Find a client given a window (searches frame windows too). */
-ClientNode *FindClientByWindow(Window w) {
+ClientNode *
+FindClientByWindow(Window w)
+{
ClientNode *np;
@@ -1299,7 +1305,9 @@ ClientNode *FindClientByWindow(Window w) {
}
/** Find a client by its frame window. */
-ClientNode *FindClientByParent(Window p) {
+ClientNode *
+FindClientByParent(Window p)
+{
ClientNode *np;
diff --git a/src/color.c b/src/color.c
index 1ed527e..38f0be6 100644
--- a/src/color.c
+++ b/src/color.c
@@ -623,7 +623,9 @@ GetColorIndex(XColor *c)
/****************************************************************************
****************************************************************************/
#ifdef USE_XFT
-XftColor *GetXftColor(ColorType type) {
+XftColor *
+GetXftColor(ColorType type)
+{
unsigned long rgb;
XRenderColor rcolor;
diff --git a/src/confirm.c b/src/confirm.c
index fc89aec..13b39f9 100644
--- a/src/confirm.c
+++ b/src/confirm.c
@@ -205,7 +205,9 @@ HandleDialogKey(const XKeyEvent *event)
}
/** Find a dialog by window or frame. */
-DialogType *FindDialogByWindow(Window w) {
+DialogType *
+FindDialogByWindow(Window w)
+{
DialogType *dp;
diff --git a/src/debug.c b/src/debug.c
index 4c64ff1..6044c4a 100644
--- a/src/debug.c
+++ b/src/debug.c
@@ -196,7 +196,9 @@ DEBUG_ShowCheckpoint()
/***************************************************************************
* Allocate memory and log.
***************************************************************************/
-void *DEBUG_Allocate(size_t size, const char *file, unsigned int line) {
+void *
+DEBUG_Allocate(size_t size, const char *file, unsigned int line)
+{
MemoryType *mp;
if(size <= 0) {
diff --git a/src/desktop.c b/src/desktop.c
index ea8bad7..d60d5e2 100644
--- a/src/desktop.c
+++ b/src/desktop.c
@@ -137,7 +137,9 @@ ChangeDesktop(unsigned int desktop)
/***************************************************************************
***************************************************************************/
-Menu *CreateDesktopMenu(unsigned int mask) {
+Menu *
+CreateDesktopMenu(unsigned int mask)
+{
Menu *menu;
MenuItem *item;
diff --git a/src/dock.c b/src/dock.c
index 01db3af..f41a392 100644
--- a/src/dock.c
+++ b/src/dock.c
@@ -171,7 +171,9 @@ DestroyDock()
}
/** Create a dock component. */
-TrayComponentType *CreateDock() {
+TrayComponentType *
+CreateDock()
+{
TrayComponentType *cp;
diff --git a/src/group.c b/src/group.c
index ca38329..5a743a8 100644
--- a/src/group.c
+++ b/src/group.c
@@ -121,7 +121,9 @@ ReleaseOptionList(OptionListType *lp)
/****************************************************************************
****************************************************************************/
-GroupType *CreateGroup() {
+GroupType *
+CreateGroup()
+{
GroupType *tp;
tp = Allocate(sizeof(GroupType));
diff --git a/src/icon.c b/src/icon.c
index afc415d..20255ae 100644
--- a/src/icon.c
+++ b/src/icon.c
@@ -323,7 +323,9 @@ IconNode *LoadSuffixedIcon(const char *path, const char *name,
/****************************************************************************
****************************************************************************/
-IconNode *LoadNamedIcon(const char *name) {
+IconNode *
+LoadNamedIcon(const char *name)
+{
IconPathNode *ip;
IconNode *icon;
@@ -348,7 +350,9 @@ IconNode *LoadNamedIcon(const char *name) {
/****************************************************************************
****************************************************************************/
-IconNode *LoadNamedIconHelper(const char *name, const char *path) {
+IconNode *
+LoadNamedIconHelper(const char *name, const char *path)
+{
IconNode *result;
char *temp;
@@ -390,13 +394,17 @@ ReadNetWMIcon(ClientNode *np)
/****************************************************************************
****************************************************************************/
-IconNode *GetDefaultIcon() {
+IconNode *
+GetDefaultIcon()
+{
return CreateIconFromData("default", x_xpm);
}
/****************************************************************************
****************************************************************************/
-IconNode *CreateIconFromData(const char *name, char **data) {
+IconNode *
+CreateIconFromData(const char *name, char **data)
+{
ImageNode *image;
IconNode *result;
@@ -425,7 +433,9 @@ IconNode *CreateIconFromData(const char *name, char **data) {
/****************************************************************************
****************************************************************************/
-IconNode *CreateIconFromFile(const char *fileName) {
+IconNode *
+CreateIconFromFile(const char *fileName)
+{
ImageNode *image;
IconNode *result;
@@ -455,7 +465,9 @@ IconNode *CreateIconFromFile(const char *fileName) {
/****************************************************************************
****************************************************************************/
-ScaledIconNode *GetScaledIcon(IconNode *icon, int rwidth, int rheight) {
+ScaledIconNode *
+GetScaledIcon(IconNode *icon, int rwidth, int rheight)
+{
XColor color;
ScaledIconNode *np;
@@ -605,7 +617,9 @@ IconNode *CreateIconFromBinary(const unsigned long *input,
/****************************************************************************
****************************************************************************/
-IconNode *CreateIcon() {
+IconNode *
+CreateIcon()
+{
IconNode *icon;
@@ -708,7 +722,9 @@ InsertIcon(IconNode *icon)
/****************************************************************************
****************************************************************************/
-IconNode *FindIcon(const char *name) {
+IconNode *
+FindIcon(const char *name)
+{
IconNode *icon;
int index;
diff --git a/src/image.c b/src/image.c
index 16e39e7..9d03baf 100644
--- a/src/image.c
+++ b/src/image.c
@@ -22,7 +22,9 @@ static int FreeColors(Display *d, Colormap cmap, Pixel *pixels, int n,
/****************************************************************************
****************************************************************************/
-ImageNode *LoadImage(const char *fileName) {
+ImageNode *
+LoadImage(const char *fileName)
+{
ImageNode *result;
@@ -48,7 +50,9 @@ ImageNode *LoadImage(const char *fileName) {
/****************************************************************************
****************************************************************************/
-ImageNode *LoadImageFromData(char **data) {
+ImageNode *
+LoadImageFromData(char **data)
+{
ImageNode *result = NULL;
@@ -85,7 +89,9 @@ ImageNode *LoadImageFromData(char **data) {
* Since libpng uses longjmp, this function is not reentrant to simplify
* the issues surrounding longjmp and local variables.
****************************************************************************/
-ImageNode *LoadPNGImage(const char *fileName) {
+ImageNode *
+LoadPNGImage(const char *fileName)
+{
#ifdef USE_PNG
@@ -240,7 +246,9 @@ ImageNode *LoadPNGImage(const char *fileName) {
/****************************************************************************
****************************************************************************/
-ImageNode *LoadXPMImage(const char *fileName) {
+ImageNode *
+LoadXPMImage(const char *fileName)
+{
ImageNode *result = NULL;
@@ -275,7 +283,9 @@ ImageNode *LoadXPMImage(const char *fileName) {
/****************************************************************************
****************************************************************************/
-ImageNode *CreateImageFromXImages(XImage *image, XImage *shape) {
+ImageNode *
+CreateImageFromXImages(XImage *image, XImage *shape)
+{
ImageNode *result;
XColor color;
diff --git a/src/lex.c b/src/lex.c
index 257c2d3..97d6301 100644
--- a/src/lex.c
+++ b/src/lex.c
@@ -96,7 +96,9 @@ static TokenType LookupType(const char *name, TokenNode *np);
/*****************************************************************************
*****************************************************************************/
-TokenNode *Tokenize(const char *line, const char *fileName) {
+TokenNode *
+Tokenize(const char *line, const char *fileName)
+{
TokenNode *np;
AttributeNode *ap;
@@ -386,7 +388,9 @@ IsSpace(char ch, int *lineNumber)
/*****************************************************************************
*****************************************************************************/
-char *ReadElementName(const char *line) {
+char *
+ReadElementName(const char *line)
+{
char *buffer;
int len, max;
int x;
@@ -409,7 +413,9 @@ char *ReadElementName(const char *line) {
/*****************************************************************************
*****************************************************************************/
-char *ReadElementValue(const char *line, const char *file, int *lineNumber) {
+char *
+ReadElementValue(const char *line, const char *file, int *lineNumber)
+{
char *buffer;
char ch;
int len, max;
@@ -513,7 +519,9 @@ LookupType(const char *name, TokenNode *np)
/*****************************************************************************
*****************************************************************************/
-const char *GetTokenName(const TokenNode *tp) {
+const char *
+GetTokenName(const TokenNode *tp)
+{
if(tp->invalidName) {
return tp->invalidName;
} else if(tp->type >= sizeof(TOKEN_MAP) / sizeof(const char*)) {
@@ -525,13 +533,17 @@ const char *GetTokenName(const TokenNode *tp) {
/*****************************************************************************
*****************************************************************************/
-const char *GetTokenTypeName(TokenType type) {
+const char *
+GetTokenTypeName(TokenType type)
+{
return TOKEN_MAP[type];
}
/*****************************************************************************
*****************************************************************************/
-TokenNode *CreateNode(TokenNode *parent, const char *file, int line) {
+TokenNode *
+CreateNode(TokenNode *parent, const char *file, int line)
+{
TokenNode *np;
np = Allocate(sizeof(TokenNode));
@@ -568,7 +580,9 @@ TokenNode *CreateNode(TokenNode *parent, const char *file, int line) {
/*****************************************************************************
*****************************************************************************/
-AttributeNode *CreateAttribute(TokenNode *np) {
+AttributeNode *
+CreateAttribute(TokenNode *np)
+{
AttributeNode *ap;
ap = Allocate(sizeof(AttributeNode));
diff --git a/src/menu.c b/src/menu.c
index 98940f2..f65e2c4 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -774,7 +774,9 @@ GetMenuIndex(Menu *menu, int y)
/***************************************************************************
***************************************************************************/
-MenuItem *GetMenuItem(Menu *menu, int index) {
+MenuItem *
+GetMenuItem(Menu *menu, int index)
+{
MenuItem *ip;
diff --git a/src/misc.c b/src/misc.c
index 23d90b0..3010d16 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -50,7 +50,9 @@ IsSymbolic(char ch)
}
/** Get the name of a shell variable (returns a copy). */
-char *GetSymbolName(const char *str) {
+char *
+GetSymbolName(const char *str)
+{
char *temp;
int stop;
@@ -187,7 +189,9 @@ Trim(char *str)
}
/** Copy a string. */
-char *CopyString(const char *str) {
+char *
+CopyString(const char *str)
+{
char *temp;
int len;
diff --git a/src/pager.c b/src/pager.c
index 3c88c7e..40ee459 100644
--- a/src/pager.c
+++ b/src/pager.c
@@ -85,7 +85,9 @@ DestroyPager()
/****************************************************************************
****************************************************************************/
-TrayComponentType *CreatePager() {
+TrayComponentType *
+CreatePager()
+{
TrayComponentType *cp;
PagerType *pp;
diff --git a/src/parse.c b/src/parse.c
index c1ccf2c..8d07632 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -494,7 +494,9 @@ ParseRootMenu(const TokenNode *start)
/****************************************************************************
****************************************************************************/
-MenuItem *InsertMenuItem(MenuItem *last) {
+MenuItem *
+InsertMenuItem(MenuItem *last)
+{
MenuItem *item;
@@ -1532,7 +1534,9 @@ ParseGroupOption(const TokenNode *tp, struct GroupType *group,
/***************************************************************************
***************************************************************************/
-char *FindAttribute(AttributeNode *ap, const char *name) {
+char *
+FindAttribute(AttributeNode *ap, const char *name)
+{
while(ap) {
if(!strcmp(name, ap->name)) {
@@ -1546,7 +1550,9 @@ char *FindAttribute(AttributeNode *ap, const char *name) {
/***************************************************************************
***************************************************************************/
-char *ReadFile(FILE *fd) {
+char *
+ReadFile(FILE *fd)
+{
const int BLOCK_SIZE = 1024;
diff --git a/src/screen.c b/src/screen.c
index d62c1d5..0f9289c 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -89,7 +89,9 @@ DestroyScreens()
/****************************************************************************
****************************************************************************/
-const ScreenType *GetCurrentScreen(int x, int y) {
+const ScreenType *
+GetCurrentScreen(int x, int y)
+{
ScreenType *sp;
int index;
@@ -109,7 +111,9 @@ const ScreenType *GetCurrentScreen(int x, int y) {
/****************************************************************************
****************************************************************************/
-const ScreenType *GetMouseScreen() {
+const ScreenType *
+GetMouseScreen()
+{
#ifdef USE_XINERAMA
int x, y;
@@ -126,7 +130,9 @@ const ScreenType *GetMouseScreen() {
/****************************************************************************
****************************************************************************/
-const ScreenType *GetScreen(int index) {
+const ScreenType *
+GetScreen(int index)
+{
Assert(index >= 0);
Assert(index < screenCount);
diff --git a/src/taskbar.c b/src/taskbar.c
index 4cee2ab..c75911e 100644
--- a/src/taskbar.c
+++ b/src/taskbar.c
@@ -133,7 +133,9 @@ DestroyTaskBar()
/***************************************************************************
***************************************************************************/
-TrayComponentType *CreateTaskBar() {
+TrayComponentType *
+CreateTaskBar()
+{
TrayComponentType *cp;
TaskBarType *tp;
@@ -816,7 +818,9 @@ FocusPreviousStackedCircular()
/***************************************************************************
***************************************************************************/
-Node *GetNode(TaskBarType *bar, int x) {
+Node *
+GetNode(TaskBarType *bar, int x)
+{
Node *tp;
int remainder;
diff --git a/src/timing.c b/src/timing.c
index d7c5546..1a06f53 100644
--- a/src/timing.c
+++ b/src/timing.c
@@ -58,7 +58,9 @@ GetTimeDifference(const TimeType *t1, const TimeType *t2)
* Get the current time.
* Not reenterent.
****************************************************************************/
-const char *GetTimeString(const char *format) {
+const char *
+GetTimeString(const char *format)
+{
static char str[80];
time_t t;
diff --git a/src/tray.c b/src/tray.c
index a710941..c6c8862 100644
--- a/src/tray.c
+++ b/src/tray.c
@@ -200,7 +200,9 @@ DestroyTray()
/***************************************************************************
***************************************************************************/
-TrayType *CreateTray() {
+TrayType *
+CreateTray()
+{
TrayType *tp;
@@ -235,7 +237,9 @@ TrayType *CreateTray() {
/***************************************************************************
***************************************************************************/
-TrayComponentType *CreateTrayComponent() {
+TrayComponentType *
+CreateTrayComponent()
+{
TrayComponentType *cp;
@@ -952,7 +956,9 @@ ResizeTray(TrayType *tp)
/***************************************************************************
***************************************************************************/
-TrayType *GetTrays() {
+TrayType *
+GetTrays()
+{
return trays;
}
diff --git a/src/winmenu.c b/src/winmenu.c
index ff2ea26..553b546 100644
--- a/src/winmenu.c
+++ b/src/winmenu.c
@@ -66,7 +66,9 @@ ShowWindowMenu(ClientNode *np, int x, int y)
/****************************************************************************
****************************************************************************/
-Menu *CreateWindowMenu() {
+Menu *
+CreateWindowMenu()
+{
Menu *menu;