summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2009-01-28 15:56:55 -0200
committerPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2009-01-28 15:56:55 -0200
commitd8f99a8b27b9b85aedd8975485c3bcd872076673 (patch)
tree2ea36d83d159ea27d76ece0765e6621c06e6fbc6
parent177cd34645f6575c44341ed4a081e574a7297ab8 (diff)
Janitor: ansification, make distcheck, compiler warnings.
-rw-r--r--.gitignore8
-rw-r--r--Makefile.am4
-rw-r--r--configure.ac7
-rw-r--r--man/.gitignore2
-rw-r--r--src/.gitignore6
-rw-r--r--src/applewm.c108
6 files changed, 50 insertions, 85 deletions
diff --git a/.gitignore b/.gitignore
index e309ac2..09c84ad 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,5 @@
+.deps
+.libs
Makefile
Makefile.in
aclocal.m4
@@ -18,3 +20,9 @@ ltmain.sh
missing
stamp-h1
*~
+*.o
+*.la
+*.lo
+libAppleWM-*.tar.*
+ChangeLog
+tags
diff --git a/Makefile.am b/Makefile.am
index d5cf273..b672c43 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -24,7 +24,7 @@ SUBDIRS = src man
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = applewm.pc
-EXTRA_DIST = applewm.pc.in autogen.sh
+EXTRA_DIST = applewm.pc.in
EXTRA_DIST += ChangeLog
@@ -33,6 +33,6 @@ MAINTAINERCLEANFILES = ChangeLog
.PHONY: ChangeLog
ChangeLog:
- (GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)
+ $(CHANGELOG_CMD)
dist-hook: ChangeLog
diff --git a/configure.ac b/configure.ac
index 77d5cff..9a67558 100644
--- a/configure.ac
+++ b/configure.ac
@@ -27,20 +27,25 @@ AC_INIT(libAppleWM, 1.0.0, [https://bugs.freedesktop.org/enter_bug.cgi?product=x
AM_INIT_AUTOMAKE([dist-bzip2])
AM_MAINTAINER_MODE
+# Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG
+m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.2)
AM_CONFIG_HEADER(config.h)
# Check for progs
AC_PROG_CC
AC_PROG_LIBTOOL
+XORG_CWARNFLAGS
# Check for dependencies
PKG_CHECK_MODULES(APPLEWM, x11 xext xextproto applewmproto)
-
+APPLEWM_CFLAGS="$CWARNFLAGS $APPLEWM_CFLAGS"
AC_SUBST(APPLEWM_CFLAGS)
AC_SUBST(APPLEWM_LIBS)
XORG_CHECK_MALLOC_ZERO
XORG_RELEASE_VERSION
+XORG_CHANGELOG
AC_OUTPUT([Makefile
src/Makefile
diff --git a/man/.gitignore b/man/.gitignore
deleted file mode 100644
index 282522d..0000000
--- a/man/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/src/.gitignore b/src/.gitignore
deleted file mode 100644
index 9730646..0000000
--- a/src/.gitignore
+++ /dev/null
@@ -1,6 +0,0 @@
-.deps
-.libs
-Makefile
-Makefile.in
-*.la
-*.lo
diff --git a/src/applewm.c b/src/applewm.c
index c627762..a707fa0 100644
--- a/src/applewm.c
+++ b/src/applewm.c
@@ -53,8 +53,8 @@ static char *applewm_extension_name = APPLEWMNAME;
*****************************************************************************/
static int close_display(Display *dpy, XExtCodes *extCodes);
-static Bool wire_to_event();
-static Status event_to_wire();
+static Bool wire_to_event(Display *dpy, XEvent *re, xEvent *event);
+static Status event_to_wire(Display *dpy, XEvent *re, xEvent *event);
static /* const */ XExtensionHooks applewm_extension_hooks = {
NULL, /* create_gc */
@@ -77,10 +77,7 @@ static XEXT_GENERATE_FIND_DISPLAY (find_display, applewm_info,
static XEXT_GENERATE_CLOSE_DISPLAY (close_display, applewm_info)
-static Bool wire_to_event (dpy, re, event)
- Display *dpy;
- XEvent *re;
- xEvent *event;
+static Bool wire_to_event (Display *dpy, XEvent *re, xEvent *event)
{
XExtDisplayInfo *info = find_display (dpy);
XAppleWMNotifyEvent *se;
@@ -107,10 +104,7 @@ static Bool wire_to_event (dpy, re, event)
return False;
}
-static Status event_to_wire (dpy, re, event)
- Display *dpy;
- XEvent *re;
- xEvent *event;
+static Status event_to_wire (Display *dpy, XEvent *re, xEvent *event)
{
XExtDisplayInfo *info = find_display (dpy);
XAppleWMNotifyEvent *se;
@@ -148,9 +142,7 @@ static Status event_to_wire (dpy, re, event)
#endif
-Bool XAppleWMQueryExtension (dpy, event_basep, error_basep)
- Display *dpy;
- int *event_basep, *error_basep;
+Bool XAppleWMQueryExtension (Display *dpy, int *event_basep, int *error_basep)
{
XExtDisplayInfo *info = find_display (dpy);
@@ -166,11 +158,8 @@ Bool XAppleWMQueryExtension (dpy, event_basep, error_basep)
}
}
-Bool XAppleWMQueryVersion(dpy, majorVersion, minorVersion, patchVersion)
- Display* dpy;
- int* majorVersion;
- int* minorVersion;
- int* patchVersion;
+Bool XAppleWMQueryVersion(Display* dpy, int* majorVersion, int* minorVersion,
+ int* patchVersion)
{
XExtDisplayInfo *info = find_display (dpy);
xAppleWMQueryVersionReply rep;
@@ -198,9 +187,7 @@ Bool XAppleWMQueryVersion(dpy, majorVersion, minorVersion, patchVersion)
return True;
}
-Bool XAppleWMDisableUpdate(dpy, screen)
- Display* dpy;
- int screen;
+Bool XAppleWMDisableUpdate(Display* dpy, int screen)
{
XExtDisplayInfo *info = find_display (dpy);
xAppleWMDisableUpdateReq *req;
@@ -219,9 +206,7 @@ Bool XAppleWMDisableUpdate(dpy, screen)
return True;
}
-Bool XAppleWMReenableUpdate(dpy, screen)
- Display* dpy;
- int screen;
+Bool XAppleWMReenableUpdate(Display* dpy, int screen)
{
XExtDisplayInfo *info = find_display (dpy);
xAppleWMReenableUpdateReq *req;
@@ -240,9 +225,7 @@ Bool XAppleWMReenableUpdate(dpy, screen)
return True;
}
-Bool XAppleWMSelectInput(dpy, mask)
- Display* dpy;
- unsigned long mask;
+Bool XAppleWMSelectInput(Display* dpy, unsigned long mask)
{
XExtDisplayInfo *info = find_display (dpy);
xAppleWMSelectInputReq *req;
@@ -261,11 +244,9 @@ Bool XAppleWMSelectInput(dpy, mask)
return True;
}
-Bool XAppleWMSetWindowMenuWithShortcuts(dpy, nitems, items, shortcuts)
- Display* dpy;
- int nitems;
- const char **items;
- const char *shortcuts;
+Bool XAppleWMSetWindowMenuWithShortcuts(Display* dpy, int nitems,
+ const char **items,
+ const char *shortcuts)
{
XExtDisplayInfo *info = find_display (dpy);
xAppleWMSetWindowMenuReq *req;
@@ -304,17 +285,12 @@ Bool XAppleWMSetWindowMenuWithShortcuts(dpy, nitems, items, shortcuts)
return True;
}
-Bool XAppleWMSetWindowMenu(dpy, nitems, items)
- Display* dpy;
- int nitems;
- const char **items;
+Bool XAppleWMSetWindowMenu(Display* dpy, int nitems, const char **items)
{
return XAppleWMSetWindowMenuWithShortcuts (dpy, nitems, items, NULL);
}
-Bool XAppleWMSetWindowMenuCheck(dpy, idx)
- Display* dpy;
- int idx;
+Bool XAppleWMSetWindowMenuCheck(Display* dpy, int idx)
{
XExtDisplayInfo *info = find_display (dpy);
xAppleWMSetWindowMenuCheckReq *req;
@@ -333,8 +309,7 @@ Bool XAppleWMSetWindowMenuCheck(dpy, idx)
return True;
}
-Bool XAppleWMSetFrontProcess(dpy)
- Display* dpy;
+Bool XAppleWMSetFrontProcess(Display* dpy)
{
XExtDisplayInfo *info = find_display (dpy);
xAppleWMSetFrontProcessReq *req;
@@ -352,10 +327,7 @@ Bool XAppleWMSetFrontProcess(dpy)
return True;
}
-Bool XAppleWMSetWindowLevel(dpy, id, level)
- Display* dpy;
- Window id;
- int level;
+Bool XAppleWMSetWindowLevel(Display* dpy, Window id, int level)
{
XExtDisplayInfo *info = find_display (dpy);
xAppleWMSetWindowLevelReq *req;
@@ -375,9 +347,7 @@ Bool XAppleWMSetWindowLevel(dpy, id, level)
return True;
}
-Bool XAppleWMSetCanQuit(dpy, state)
- Display* dpy;
- Bool state;
+Bool XAppleWMSetCanQuit(Display* dpy, Bool state)
{
XExtDisplayInfo *info = find_display (dpy);
xAppleWMSetCanQuitReq *req;
@@ -396,13 +366,11 @@ Bool XAppleWMSetCanQuit(dpy, state)
return True;
}
-Bool XAppleWMFrameGetRect(dpy, frame_class, frame_rect,
- ix, iy, iw, ih, ox, oy, ow, oh, rx, ry, rw, rh)
- Display* dpy;
- unsigned int frame_class, frame_rect;
- short ix, iy, iw, ih;
- short ox, oy, ow, oh;
- short *rx, *ry, *rw, *rh;
+Bool XAppleWMFrameGetRect(Display *dpy,
+ unsigned int frame_class, unsigned int frame_rect,
+ short ix, short iy, short iw, short ih,
+ short ox, short oy, short ow, short oh,
+ short *rx, short *ry, short *rw, short *rh)
{
XExtDisplayInfo *info = find_display (dpy);
xAppleWMFrameGetRectReply rep;
@@ -440,13 +408,11 @@ Bool XAppleWMFrameGetRect(dpy, frame_class, frame_rect,
return True;
}
-unsigned int XAppleWMFrameHitTest(dpy, frame_class, px, py,
- ix, iy, iw, ih, ox, oy, ow, oh)
- Display* dpy;
- unsigned int frame_class;
- short px, py;
- short ix, iy, iw, ih;
- short ox, oy, ow, oh;
+unsigned int XAppleWMFrameHitTest(Display *dpy,
+ unsigned int frame_class,
+ short px, short py,
+ short ix, short iy, short iw, short ih,
+ short ox, short oy, short ow, short oh)
{
XExtDisplayInfo *info = find_display (dpy);
xAppleWMFrameHitTestReply rep;
@@ -483,18 +449,12 @@ unsigned int XAppleWMFrameHitTest(dpy, frame_class, px, py,
return rep.ret;
}
-Bool XAppleWMFrameDraw(dpy, screen, window,
- frame_class, frame_attr,
- ix, iy, iw, ih, ox, oy, ow, oh,
- title_length, title_bytes)
- Display* dpy;
- int screen;
- Window window;
- unsigned int frame_class, frame_attr;
- short ix, iy, iw, ih;
- short ox, oy, ow, oh;
- unsigned int title_length;
- const unsigned char *title_bytes;
+Bool XAppleWMFrameDraw(Display *dpy, int screen, Window window,
+ unsigned int frame_class, unsigned int frame_attr,
+ short ix, short iy, short iw, short ih,
+ short ox, short oy, short ow, short oh,
+ unsigned int title_length,
+ const unsigned char * title_bytes)
{
XExtDisplayInfo *info = find_display (dpy);
xAppleWMFrameDrawReq *req;