.gitignore | 1 ChangeLog | 187 -------------------------------------------------------- Makefile.am | 16 ++++ configure.ac | 19 +++++ src/Clip.c | 4 - src/CvtStdSel.c | 4 + src/Makefile.am | 27 +++++++- src/StdCmap.c | 4 - src/StrToWidg.c | 5 + 9 files changed, 72 insertions(+), 195 deletions(-)
New commits: commit e2735131202e7801e72ce33def666b6a0a543e26 Author: Alan Coopersmith <[EMAIL PROTECTED]> Date: Mon Jan 14 14:11:43 2008 -0800 Version bump: 1.0.4 diff --git a/configure.ac b/configure.ac index 8469d60..a604592 100644 --- a/configure.ac +++ b/configure.ac @@ -5,7 +5,7 @@ AC_PREREQ(2.57) AC_INIT([libXmu], - 1.0.3, + 1.0.4, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXmu) commit f11b5a161944dc694ee059f88acb20826bd6d90b Author: Alan Coopersmith <[EMAIL PROTECTED]> Date: Mon Jan 14 11:21:36 2008 -0800 Coverity #52: Dead code in get_os_name() diff --git a/src/CvtStdSel.c b/src/CvtStdSel.c index 0422f98..a6f206a 100644 --- a/src/CvtStdSel.c +++ b/src/CvtStdSel.c @@ -114,7 +114,9 @@ get_os_name(void) #ifdef OS_NAME return XtNewString(OS_NAME); #else +#if defined(X_OS_FILE) || defined(MOTD_FILE) FILE *f = NULL; +#endif #ifdef USE_UNAME struct utsname utss; @@ -142,6 +144,7 @@ get_os_name(void) #ifdef MOTD_FILE f = fopen(MOTD_FILE, "r"); #endif +#if defined(X_OS_FILE) || defined(MOTD_FILE) if (f) { char motd[512]; motd[0] = '\0'; @@ -155,6 +158,7 @@ get_os_name(void) return XtNewString(motd); } } +#endif #ifdef sun return XtNewString("SunOS"); commit 6f5ea6a2a0b56674f08f58d95085c0e9a8797fe2 Author: Alan Coopersmith <[EMAIL PROTECTED]> Date: Sun Jan 13 01:58:12 2008 -0800 Clear sparse warnings: Using plain integer as NULL pointer diff --git a/src/Clip.c b/src/Clip.c index 8d2c845..121a69f 100644 --- a/src/Clip.c +++ b/src/Clip.c @@ -799,8 +799,8 @@ XmuScanline * XmuScanlineNot(XmuScanline *scanline, int minx, int maxx) { XmuSegment *z; - static XmuSegment x = { 0, 0, 0 }; - static XmuScanline and = { 0, &x, 0 }; + static XmuSegment x = { 0, 0, NULL }; + static XmuScanline and = { 0, &x, NULL }; if (!scanline) return (scanline); diff --git a/src/StdCmap.c b/src/StdCmap.c index ffce489..3fb3f25 100644 --- a/src/StdCmap.c +++ b/src/StdCmap.c @@ -91,7 +91,7 @@ XmuStandardColormap(Display *dpy, int screen, VisualID visualid, vinfo_template.depth = depth; vinfo_mask = VisualIDMask | VisualScreenMask | VisualDepthMask; if ((vinfo = XGetVisualInfo(dpy, vinfo_mask, &vinfo_template, &n)) == NULL) - return 0; + return NULL; /* Check the validity of the combination of visual characteristics, * allocation, and colormap property. Create an XStandardColormap @@ -101,7 +101,7 @@ XmuStandardColormap(Display *dpy, int screen, VisualID visualid, if (! valid_args(vinfo, red_max, green_max, blue_max, property) || ((stdcmap = XAllocStandardColormap()) == NULL)) { XFree((char *) vinfo); - return 0; + return NULL; } /* Fill in the XStandardColormap structure */ diff --git a/src/StrToWidg.c b/src/StrToWidg.c index 22411de..b9fb8a9 100644 --- a/src/StrToWidg.c +++ b/src/StrToWidg.c @@ -63,8 +63,11 @@ XmuCvtStringToWidget(XrmValuePtr args, Cardinal *num_args, int i; if (*num_args != 1) + { + i = 0; XtErrorMsg("wrongParameters", "cvtStringToWidget", "xtToolkitError", - "StringToWidget conversion needs parent arg", NULL, 0); + "StringToWidget conversion needs parent arg", NULL, &i); + } parent = *(Widget*)args[0].addr; /* try to match names of normal children */ commit 6f76ccc70a5f5ae834a3e63c9f4f35704837a4d1 Author: Alan Coopersmith <[EMAIL PROTECTED]> Date: Fri Jan 11 20:43:26 2008 -0800 Add hooks for checking sources with tools like lint & sparse diff --git a/Makefile.am b/Makefile.am index 89ef346..8482dc5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -20,3 +20,9 @@ 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) dist-hook: ChangeLog + +if LINT +# Check source code with tools like lint & sparse +lint: + (cd src && $(MAKE) $(MFLAGS) lint) +endif LINT diff --git a/configure.ac b/configure.ac index 7abdb21..8469d60 100644 --- a/configure.ac +++ b/configure.ac @@ -17,6 +17,11 @@ AM_MAINTAINER_MODE AM_CONFIG_HEADER([config.h]) +# Require xorg-macros version 1.1.0 or newer for XORG_WITH_LINT macro +m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.1) + + # Checks for programs. AC_PROG_LIBTOOL AC_PROG_CC @@ -51,6 +56,18 @@ XTRANS_CONNECTION_FLAGS AC_DEFINE(HAS_SNPRINTF, [], [Whether we have snprintf()]) AC_SUBST(HAS_SNPRINTF) +dnl Allow checking code with lint, sparse, etc. +XORG_WITH_LINT +XORG_LINT_LIBRARY([Xmu]) +LINTLIBUU=`echo $LINTLIB | sed s/Xmu/Xmuu/` +AC_SUBST(LINTLIBUU) + +if test "x$GCC" = "xyes"; then + GCC_WARNINGS="-Wall -Wpointer-arith -Wstrict-prototypes \ + -Wmissing-prototypes -Wmissing-declarations -Wnested-externs" + XMU_CFLAGS="$GCC_WARNINGS $XMU_CFLAGS" +fi + XORG_RELEASE_VERSION AC_OUTPUT([Makefile diff --git a/src/Makefile.am b/src/Makefile.am index df49a20..0f19c5e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -2,10 +2,12 @@ lib_LTLIBRARIES = libXmu.la libXmuu.la BITMAP_DEFINES = -DBITMAPDIR=\"$(includedir)/X11/bitmaps\" -AM_CFLAGS = \ +AM_CPPFLAGS = \ -I${top_srcdir}/include \ -I${top_srcdir}/include/X11/Xmu \ - $(XMU_CFLAGS) $(BITMAP_DEFINES) -D_BSD_SOURCE + $(BITMAP_DEFINES) -D_BSD_SOURCE + +AM_CFLAGS = $(XMU_CFLAGS) libXmu_la_LDFLAGS = -version-number 6:2:0 -no-undefined libXmuu_la_LDFLAGS = -version-number 1:0:0 -no-undefined @@ -62,3 +64,24 @@ libXmu_la_SOURCES = \ WidgetNode.c \ Xct.c \ sharedlib.c + + +if LINT +ALL_LINT_FLAGS=$(LINT_FLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) + +lint: + $(LINT) $(ALL_LINT_FLAGS) $(libXmu_la_SOURCES) $(XEXT_LIBS) +endif LINT + +if MAKE_LINT_LIB +lintlibdir = $(libdir) + +lintlib_DATA = $(LINTLIB) $(LINTLIBUU) + +$(LINTLIB): $(libXmu_la_SOURCES) + $(LINT) -y -oXmu -x $(ALL_LINT_FLAGS) $(libXmu_la_SOURCES) + +$(LINTLIBUU): $(libXmuu_la_SOURCES) + $(LINT) -y -oXmuu -x $(ALL_LINT_FLAGS) $(libXmuu_la_SOURCES) +endif MAKE_LINT_LIB commit 43ec402bcd6a2333a4e213de3a82d7e3392b0fb0 Author: James Cloos <[EMAIL PROTECTED]> Date: Thu Dec 6 16:38:32 2007 -0500 Replace static ChangeLog with dist-hook to generate from git log diff --git a/ChangeLog b/ChangeLog deleted file mode 100644 index 639a02b..0000000 --- a/ChangeLog +++ /dev/null @@ -1,187 +0,0 @@ -2006-04-30 Matthieu Herrb <[EMAIL PROTECTED]> - - * src/Makefile.am - Define BITMAPDIR for the case where ${prefix} != /usr - -2006-04-26 Adam Jackson <[EMAIL PROTECTED]> - - * configure.ac: - Bump to 1.0.1 - -2006-03-20 Adam Jackson <[EMAIL PROTECTED]> - - * src/Makefile.am: - Bug #6276: Fix build on Cygwin. (Yaakov Selkowitz) - -2005-12-14 Kevin E. Martin <kem-at-freedesktop-dot-org> - - * configure.ac: - Update package version number for final X11R7 release candidate. - -2005-12-03 Kevin E. Martin <kem-at-freedesktop-dot-org> - - * configure.ac: - Update package version number for X11R7 RC3 release. - -2005-11-19 Kevin E. Martin <kem-at-freedesktop-dot-org> - - * xmu.pc.in: - * xmuu.pc.in: - Update pkgconfig files to separate library build-time dependencies - from application build-time dependencies. - * configure.ac: - Update dependencies to work with separate build roots. - -2005-10-18 Kevin E. Martin <kem-at-freedesktop-dot-org> - - * configure.ac: - Update package version number for RC1 release. - -2005-10-05 Kevin E. Martin <kem-at-freedesktop-dot-org> - - * Makefile.am: - Add missing file to EXTRA_DIST - -2005-07-08 Keith Packard <[EMAIL PROTECTED]> - - * .cvsignore: - * include/.cvsignore: - * src/.cvsignore: - Add .cvsignore files - -2005-05-21 Alan Coopersmith <[EMAIL PROTECTED]> - - * configure.ac: - Add XTRANS_CONNECTION_FLAGS to get network transport #defines - for CvdStdSel.c - * src/Makefile.am: - Add libXmuu_la_LIBADD - -2005-01-29 Daniel Stone <[EMAIL PROTECTED]> - - * CvtStdSel.c (get_os_name): - Change uname == 0 to uname >= 0 (X.Org HEAD). - - * include/X11/Xmu/SysUtil.h: - * include/X11/Xmu/Xmu.h: - Add gcc format attribute (X.Org HEAD). - -2005-01-01 Phil Blundell <[EMAIL PROTECTED]> - - * configure.ac (XMUU_CFLAGS, XMUU_LIBS): New. - * xmuu.pc.in: Use XMUU_CFLAGS+XMUU_LIBS, not XMU_CFLAGS+XMU_LIBS. - -2004-05-17 Eric Anholt <[EMAIL PROTECTED]> - - * EditresCom.c: - * WidgetNode.c: (XmuWnFetchResources): - Axe the Xaw header dependency again. - -2004-05-10 Eric Anholt <[EMAIL PROTECTED]> - - * configure.ac: - * xmu.pc.in: - * xmuu.pc.in: - Properly include LIBS/CFLAGS in .pc and linking. - Bump to version 6.2.3. - -2004-04-13 Daniel Stone <[EMAIL PROTECTED]> - - * EditresCom.c: - X11R6.7 merge - various minor cleanups. - - * Bump version to 6.2.2 for xlibs 1.0.1. - -2004-03-17 Carlos Romero <[EMAIL PROTECTED]> - - (Commit sponsored by Daniel Stone.) - * Makefile.am: - * xmu.pc.in: - * configure.ac: - Various cleanups to build system, including correct use of pkg-config. - -2003-12-23 Jeremy C. Reed <[EMAIL PROTECTED]> - - * ChangeLog - Caught up on all missing by me starting Dec. 16. - -2003-12-23 Jeremy C. Reed <[EMAIL PROTECTED]> - - * Makefile.am - * configure.ac - Fix versions for Xmu and Xmuu libraries. Using - -version-number 6:2:1 for Xmu. And using -version-info - 1:0:1 for Xmuu. (This may be out of order, need to test - again.) - -2003-12-23 Jeremy C. Reed <[EMAIL PROTECTED]> - - * configure.ac - * xmu.pc.in - * xmuu.pc.in - Fix LIBS and CFLAGS for xmuu.pc.in and xmu.pc.in. Also use - pkgconfig info for Xt for xmu.pc.in. - -2003-12-23 Jeremy C. Reed <[EMAIL PROTECTED]> - - * EditresCom.c - * WidgetNode.c - Get rid of X11/Xaw/Cardinals.h include. Xmu should - not depend on Xaw to build, because Xaw needs many Xmu - functions to build. In WidgetNode.c, define ZERO (which - X11/Xaw/Cardinals.h would define). - -2003-12-17 Jeremy C. Reed <[EMAIL PROTECTED]> - - * Makefile.am - Don't repeat source filenames for both Xmu and Xmuu. - Just list in libXmuu_la_SOURCES; and use that variable in - the libXmu_la_SOURCES list. (As suggested by keithp on - xlibs@ list.) - -2003-12-16 Jeremy C. Reed <[EMAIL PROTECTED]> - - * .cvsignore - Add two ltconfig related files for CVS to ignore. - -2003-12-16 Jeremy C. Reed <[EMAIL PROTECTED]> - - * Lower.c - Comment out snprintf.c include. (Maybe as a temporary - workaround.) Later, maybe have autoconf check for it. - -2003-12-16 Jeremy C. Reed <[EMAIL PROTECTED]> - - * INSTALL - Add autoconf (./configure) INSTALL instructions. - -2003-12-16 Jeremy C. Reed <[EMAIL PROTECTED]> - - * AUTHORS - * COPYING - * ChangeLog - * Makefile.am - * NEWS - * autogen.sh - * configure.ac - * xmu.pc.in - * xmuu.pc.in - Add beginnings of autoconf/automake/pkgconfig framework for Xmu - and mini Xmu (Xmuu). - -2003-12-16 Jeremy C. Reed <[EMAIL PROTECTED]> - - * include/Makefile.am - Using automake/autoconf for headers. (Note that - headers from original xc/Xmu were moved in CVS to this - Xmu/include/X11/Xmu/ directory.) - -2003-12-16 Jeremy C. Reed <[EMAIL PROTECTED]> - - * include/.cvsignore - Add .cvsignore for CVS to ignore Makefile and Makefile.in. - -2003-12-16 Jeremy C. Reed <[EMAIL PROTECTED]> - - * .cvsignore - Add .cvsignore to list files that should be ignored by CVS. diff --git a/Makefile.am b/Makefile.am index a4a951d..89ef346 100644 --- a/Makefile.am +++ b/Makefile.am @@ -10,3 +10,13 @@ EXTRA_DIST = \ xmuu.pc.in \ autogen.sh \ include/X11/Xmu/WhitePoint.h + +EXTRA_DIST += ChangeLog +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) + +dist-hook: ChangeLog commit 7e35135e9ad1ea2ef101402ea26bec62c3cbb69a Author: James Cloos <[EMAIL PROTECTED]> Date: Mon Sep 3 05:53:43 2007 -0400 Add *~ to .gitignore to skip patch/emacs droppings diff --git a/.gitignore b/.gitignore index ae7fdfa..134f731 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ mkinstalldirs stamp-h1 xmu.pc xmuu.pc +*~ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]