Plain integer as NULL pointer, non-ANSI function declaration etc.
---
src/actions.c | 2 +-
src/appmenu.c | 2 +-
src/dialog.c | 2 +-
src/dock.c | 2 +-
src/misc.c | 4 ++--
src/resources.c | 1 +
src/screen.c | 2 +-
src/session.c | 2 +-
src/startup.c | 2 +-
src/superfluous.c | 2 +-
src/superfluous.h | 13 +++++++------
src/switchmenu.c | 4 ++--
src/switchpanel.c | 2 +-
src/wdefaults.c | 11 ++---------
src/window.c | 6 +++---
src/window.h | 2 +-
src/winspector.c | 13 +++----------
src/wmspec.c | 12 ++++++------
src/wmspec.h | 4 ++--
src/workspace.c | 2 +-
src/xmodifier.c | 1 +
21 files changed, 40 insertions(+), 51 deletions(-)
diff --git a/src/actions.c b/src/actions.c
index 65ebc0b..16e1267 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -815,7 +815,7 @@ void animateResize(WScreen *scr, int x, int y, int w, int
h, int fx, int fy, int
}
#endif /* ANIMATIONS */
-static void flushExpose()
+static void flushExpose(void)
{
XEvent tmpev;
diff --git a/src/appmenu.c b/src/appmenu.c
index 5778cab..2f001b4 100644
--- a/src/appmenu.c
+++ b/src/appmenu.c
@@ -35,7 +35,7 @@
#include "menu.h"
#include "actions.h"
#include "funcs.h"
-
+#include "appmenu.h"
#include "framewin.h"
/******** Global Variables **********/
diff --git a/src/dialog.c b/src/dialog.c
index 6ee0703..a08fc6b 100644
--- a/src/dialog.c
+++ b/src/dialog.c
@@ -104,7 +104,7 @@ int wMessageDialog(WScreen * scr, char *title, char
*message, char *defBtn, char
return result;
}
-void toggleSaveSession(WMWidget * w, void *data)
+static void toggleSaveSession(WMWidget *w, void *data)
{
wPreferences.save_session_on_exit = WMGetButtonSelected((WMButton *) w);
}
diff --git a/src/dock.c b/src/dock.c
index e4a6022..4fb830b 100644
--- a/src/dock.c
+++ b/src/dock.c
@@ -129,7 +129,7 @@ static void clipAutoRaise(void *cdata);
static void showClipBalloon(WDock * dock, int workspace);
-static void make_keys()
+static void make_keys(void)
{
if (dCommand != NULL)
return;
diff --git a/src/misc.c b/src/misc.c
index b881053..0a2de1c 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -72,7 +72,7 @@ static void putidef(char *line, char *name, int value)
strcat(line, tmp);
}
-static char *username()
+static char *username(void)
{
char *tmp;
@@ -235,7 +235,7 @@ Bool wGetIconName(Display *dpy, Window win, char **iconname)
return False;
}
-static void eatExpose()
+static void eatExpose(void)
{
XEvent event, foo;
diff --git a/src/resources.c b/src/resources.c
index 90c9159..af99230 100644
--- a/src/resources.c
+++ b/src/resources.c
@@ -33,6 +33,7 @@
#include "WindowMaker.h"
#include "texture.h"
+#include "resources.h"
#include "screen.h"
int wGetColor(WScreen * scr, char *color_name, XColor * color)
diff --git a/src/screen.c b/src/screen.c
index 884e4f2..1a119c2 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -92,7 +92,7 @@ static WMPropList *dWorkspace;
static WMPropList *dDock;
static WMPropList *dClip;
-static void make_keys()
+static void make_keys(void)
{
if (dApplications != NULL)
return;
diff --git a/src/session.c b/src/session.c
index 5b47309..349e1d5 100644
--- a/src/session.c
+++ b/src/session.c
@@ -104,7 +104,7 @@ static WMPropList *sShortcutMask;
static WMPropList *sDock;
static WMPropList *sYes, *sNo;
-static void make_keys()
+static void make_keys(void)
{
if (sApplications != NULL)
return;
diff --git a/src/startup.c b/src/startup.c
index 6ef3580..1e6d8e4 100644
--- a/src/startup.c
+++ b/src/startup.c
@@ -301,7 +301,7 @@ static RETSIGTYPE buryChild(int foo)
errno = save_errno;
}
-static void getOffendingModifiers()
+static void getOffendingModifiers(void)
{
int i;
XModifierKeymap *modmap;
diff --git a/src/superfluous.c b/src/superfluous.c
index 59ce334..a270b53 100644
--- a/src/superfluous.c
+++ b/src/superfluous.c
@@ -34,8 +34,8 @@
#include "WindowMaker.h"
#include "screen.h"
-#include "superfluous.h"
#include "dock.h"
+#include "superfluous.h"
#include "framewin.h"
#include "window.h"
#include "actions.h"
diff --git a/src/superfluous.h b/src/superfluous.h
index 99b087b..d2686e1 100644
--- a/src/superfluous.h
+++ b/src/superfluous.h
@@ -19,11 +19,12 @@
* USA.
*/
-#define PIECES ((64/ICON_KABOOM_PIECE_SIZE)*(64/ICON_KABOOM_PIECE_SIZE))
-
-
+#ifndef WMSUPERFLUOUS_H
+#define WMSUPERFLUOUS_H
+#define PIECES ((64/ICON_KABOOM_PIECE_SIZE)*(64/ICON_KABOOM_PIECE_SIZE))
-extern void DoKaboom();
-extern Pixmap MakeGhostDock();
-extern Pixmap MakeGhostIcon();
+extern void DoKaboom(WScreen *scr, Window win, int x, int y);
+extern Pixmap MakeGhostDock(WDock *dock, int sx, int dx, int y);
+extern Pixmap MakeGhostIcon(WScreen *scr, Drawable drawable);
+#endif /* WMSUPERFLUOUS_H */
diff --git a/src/switchmenu.c b/src/switchmenu.c
index 849ec8b..dc97c33 100644
--- a/src/switchmenu.c
+++ b/src/switchmenu.c
@@ -81,7 +81,7 @@ static void focusWindow(WMenu * menu, WMenuEntry * entry)
}
}
-void InitializeSwitchMenu()
+void InitializeSwitchMenu(void)
{
if (!initialized) {
initialized = 1;
@@ -357,7 +357,7 @@ void UpdateSwitchMenu(WScreen * scr, WWindow * wwin, int
action)
wMenuPaint(switchmenu);
}
-void UpdateSwitchMenuWorkspace(WScreen * scr, int workspace)
+static void UpdateSwitchMenuWorkspace(WScreen *scr, int workspace)
{
WMenu *menu = scr->switch_menu;
int i;
diff --git a/src/switchpanel.c b/src/switchpanel.c
index 79aad38..9940144 100644
--- a/src/switchpanel.c
+++ b/src/switchpanel.c
@@ -435,7 +435,7 @@ WSwitchPanel *wInitSwitchPanel(WScreen * scr, WWindow *
curwin, Bool class_only)
panel->scr = scr;
- panel->windows = makeWindowListArray(curwin, wPreferences.swtileImage
!= 0, class_only);
+ panel->windows = makeWindowListArray(curwin, wPreferences.swtileImage
!= NULL, class_only);
count = WMGetArrayItemCount(panel->windows);
if (count == 0) {
diff --git a/src/wdefaults.c b/src/wdefaults.c
index c7e7126..9189fa7 100644
--- a/src/wdefaults.c
+++ b/src/wdefaults.c
@@ -43,20 +43,15 @@
#include "icon.h"
/* Global stuff */
-
extern WPreferences wPreferences;
-
extern WMPropList *wAttributeDomainName;
-
extern WDDomain *WDWindowAttributes;
/* Local stuff */
/* type converters */
static int getBool(WMPropList *, WMPropList *);
-
static char *getString(WMPropList *, WMPropList *);
-
static WMPropList *ANoTitlebar = NULL;
static WMPropList *ANoResizebar;
static WMPropList *ANoMiniaturizeButton;
@@ -84,11 +79,8 @@ static WMPropList *ASharedAppIcon; /* app */
#ifdef XKB_BUTTON_HINT
static WMPropList *ANoLanguageButton;
#endif
-
static WMPropList *AStartWorkspace;
-
static WMPropList *AIcon;
-
static WMPropList *AnyWindow;
static WMPropList *No;
@@ -321,7 +313,8 @@ wDefaultFillAttributes(WScreen * scr, char *instance, char
*class,
WMPLSetCaseSensitive(False);
}
-WMPropList *get_generic_value(WScreen * scr, char *instance, char *class,
WMPropList * option, Bool noDefault)
+static WMPropList *get_generic_value(WScreen *scr, char *instance, char *class,
+ WMPropList *option, Bool noDefault)
{
WMPropList *value, *key, *dict;
diff --git a/src/window.c b/src/window.c
index 8863275..cd3a0d4 100644
--- a/src/window.c
+++ b/src/window.c
@@ -165,7 +165,7 @@ WWindow *wWindowFor(Window window)
return NULL;
}
-WWindow *wWindowCreate()
+WWindow *wWindowCreate(void)
{
WWindow *wwin;
@@ -675,7 +675,7 @@ WWindow *wManageWindow(WScreen *scr, Window window)
XSetWindowBorderWidth(dpy, window, 0);
/* get hints from GNUstep app */
- if (wwin->wm_class != 0 && strcmp(wwin->wm_class, "GNUstep") == 0) {
+ if (wwin->wm_class != NULL && strcmp(wwin->wm_class, "GNUstep") == 0) {
wwin->flags.is_gnustep = 1;
}
if (!PropGetGNUstepWMAttr(window, &wwin->wm_gnustep_attr)) {
@@ -2571,7 +2571,7 @@ WMagicNumber wWindowAddSavedState(char *instance, char
*class, char *command, pi
wstate = malloc(sizeof(WWindowState));
if (!wstate)
- return 0;
+ return NULL;
memset(wstate, 0, sizeof(WWindowState));
wstate->pid = pid;
diff --git a/src/window.h b/src/window.h
index 12834c3..867e222 100644
--- a/src/window.h
+++ b/src/window.h
@@ -355,7 +355,7 @@ typedef void* WMagicNumber;
void wWindowDestroy(WWindow *wwin);
-WWindow *wWindowCreate();
+WWindow *wWindowCreate(void);
#ifdef SHAPE
void wWindowSetShape(WWindow *wwin);
diff --git a/src/winspector.c b/src/winspector.c
index 06328cc..3375736 100644
--- a/src/winspector.c
+++ b/src/winspector.c
@@ -118,13 +118,10 @@ typedef struct InspectorPanel {
} InspectorPanel;
extern Cursor wCursor[WCUR_LAST];
-
extern WDDomain *WDWindowAttributes;
-
-static InspectorPanel *panelList = NULL;
-
extern WPreferences wPreferences;
+static InspectorPanel *panelList = NULL;
static WMPropList *ANoTitlebar = NULL;
static WMPropList *ANoResizebar;
static WMPropList *ANoMiniaturizeButton;
@@ -151,14 +148,11 @@ static WMPropList *ASharedAppIcon;
#ifdef XKB_BUTTON_HINT
static WMPropList *ANoLanguageButton;
#endif
-
static WMPropList *AStartWorkspace;
-
static WMPropList *AIcon;
/* application wide options */
static WMPropList *AStartHidden;
-
static WMPropList *AnyWindow;
static WMPropList *EmptyString;
static WMPropList *Yes, *No;
@@ -167,14 +161,13 @@ static WMPropList *Yes, *No;
#define PHEIGHT 350
static char *spec_text;
-
static void applySettings(WMButton * button, InspectorPanel * panel);
#define UNDEFINED_POS 0xffffff
static InspectorPanel *createInspectorForWindow(WWindow * wwin, int xpos, int
ypos, Bool showSelectPanel);
-static void make_keys()
+static void make_keys(void)
{
if (ANoTitlebar != NULL)
return;
@@ -258,7 +251,7 @@ static void destroyInspector(WCoreWindow * foo, void *data,
XEvent * event)
freeInspector(panel);
}
-void wDestroyInspectorPanels()
+void wDestroyInspectorPanels(void)
{
InspectorPanel *panel;
diff --git a/src/wmspec.c b/src/wmspec.c
index 1ffe955..a926d54 100644
--- a/src/wmspec.c
+++ b/src/wmspec.c
@@ -874,7 +874,7 @@ static Bool updateStrut(WWindow * wwin, Bool adding)
int fmt_ret;
unsigned long nitems_ret;
unsigned long bytes_after_ret;
- long *data = 0;
+ long *data = NULL;
if (XGetWindowProperty(dpy, wwin->client_win, net_wm_strut, 0,
4, False,
XA_CARDINAL, &type_ret, &fmt_ret,
&nitems_ret,
@@ -1177,7 +1177,7 @@ static void updateWindowType(WWindow * wwin)
int fmt_ret;
unsigned long nitems_ret;
unsigned long bytes_after_ret;
- long *data = 0;
+ long *data = NULL;
int layer;
if (XGetWindowProperty(dpy, wwin->client_win, net_wm_window_type, 0, 1,
False, XA_ATOM, &type_ret, &fmt_ret, &nitems_ret,
@@ -1207,7 +1207,7 @@ Bool wNETWMCheckClientHints(WWindow * wwin, int *layer,
int *workspace)
int fmt_ret;
unsigned long nitems_ret;
unsigned long bytes_after_ret;
- long *data = 0;
+ long *data = NULL;
Bool hasState = False;
int i;
@@ -1268,7 +1268,7 @@ static Bool updateNetIconInfo(WWindow * wwin)
int fmt_ret;
unsigned long nitems_ret;
unsigned long bytes_after_ret;
- long *data = 0;
+ long *data = NULL;
Bool hasState = False;
Bool old_state = wwin->flags.net_handle_icon;
@@ -1348,7 +1348,7 @@ static void handleDesktopNames(XClientMessageEvent *
event, WScreen * scr)
return;
}
- if (data == 0)
+ if (data == NULL)
return;
if (type_ret != utf8_string || fmt_ret != 8)
@@ -1516,7 +1516,7 @@ int wNETWMGetPidForWindow(Window window)
int fmt_ret;
unsigned long nitems_ret;
unsigned long bytes_after_ret;
- long *data = 0;
+ long *data = NULL;
int pid;
if (XGetWindowProperty(dpy, window, net_wm_pid, 0, 1, False,
diff --git a/src/wmspec.h b/src/wmspec.h
index 978950a..d498cf2 100644
--- a/src/wmspec.h
+++ b/src/wmspec.h
@@ -25,8 +25,8 @@
#ifndef _WMSPEC_H_
#define _WMSPEC_H_
-#include <screen.h>
-#include <window.h>
+#include "screen.h"
+#include "window.h"
#include <X11/Xlib.h>
void wNETWMInitStuff(WScreen *scr);
diff --git a/src/workspace.c b/src/workspace.c
index d9d9e64..1b7044c 100644
--- a/src/workspace.c
+++ b/src/workspace.c
@@ -63,7 +63,7 @@ extern void ProcessPendingEvents();
static WMPropList *dWorkspaces = NULL;
static WMPropList *dClip, *dName;
-static void make_keys()
+static void make_keys(void)
{
if (dWorkspaces != NULL)
return;
diff --git a/src/xmodifier.c b/src/xmodifier.c
index c288e26..c6d3e45 100644
--- a/src/xmodifier.c
+++ b/src/xmodifier.c
@@ -34,6 +34,7 @@ Perpetrator: Sudish Joseph <[email protected]>, Sept.
1997. */
#include <X11/keysym.h>
#include <WINGs/WUtil.h>
+#include "xmodifier.h"
extern Display *dpy;
--
1.7.1.rc0.13.g7ec1e
--
To unsubscribe, send mail to [email protected].