Correct make distcheck and sparse warnings.

parent 0436471f
...@@ -19,3 +19,7 @@ stamp-h1 ...@@ -19,3 +19,7 @@ stamp-h1
xload xload
xload.1 xload.1
*~ *~
*.o
xload-*.tar.*
ChangeLog
tags
...@@ -33,33 +33,22 @@ xload_SOURCES = \ ...@@ -33,33 +33,22 @@ xload_SOURCES = \
appman_PRE = \ appman_PRE = \
xload.man xload.man
# App default files (*.ad) # App default files
DISTCHECK_CONFIGURE_FLAGS = --with-appdefaultdir=\$${datadir}/X11/app-defaults
appdefaultdir = @appdefaultdir@ appdefaultdir = @appdefaultdir@
dist_appdefault_DATA = \
APPDEFAULTFILES = \
app-defaults/XLoad app-defaults/XLoad
SUFFIXES = .ad EXTRA_DIST = xload.bit
.ad:
[ -d app-defaults ] || mkdir app-defaults
cp $< $@
appdefault_DATA = $(APPDEFAULTFILES)
EXTRA_DIST = $(APPDEFAULTFILES:%=%.ad) xload.bit
CLEANFILES = $(APPDEFAULTFILES)
appmandir = $(APP_MAN_DIR) appmandir = $(APP_MAN_DIR)
appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@) appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
EXTRA_DIST += $(appman_PRE) EXTRA_DIST += $(appman_PRE)
CLEANFILES += $(appman_DATA) CLEANFILES = $(appman_DATA)
SED = sed SED = sed
...@@ -80,7 +69,7 @@ MAN_SUBSTS = \ ...@@ -80,7 +69,7 @@ MAN_SUBSTS = \
-e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \ -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
-e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g' -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
SUFFIXES += .$(APP_MAN_SUFFIX) .man SUFFIXES = .$(APP_MAN_SUFFIX) .man
.man.$(APP_MAN_SUFFIX): .man.$(APP_MAN_SUFFIX):
sed $(MAN_SUBSTS) < $< > $@ sed $(MAN_SUBSTS) < $< > $@
...@@ -91,6 +80,6 @@ MAINTAINERCLEANFILES = ChangeLog ...@@ -91,6 +80,6 @@ MAINTAINERCLEANFILES = ChangeLog
.PHONY: ChangeLog .PHONY: ChangeLog
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 dist-hook: ChangeLog
...@@ -26,11 +26,17 @@ AC_INIT(xload,[1.0.2], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg] ...@@ -26,11 +26,17 @@ AC_INIT(xload,[1.0.2], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg]
AM_INIT_AUTOMAKE([dist-bzip2]) AM_INIT_AUTOMAKE([dist-bzip2])
AM_MAINTAINER_MODE 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) AM_CONFIG_HEADER(config.h)
AC_PROG_CC AC_PROG_CC
AC_PROG_INSTALL AC_PROG_INSTALL
XORG_CWARNFLAGS
### How to check load average on various OS'es: ### How to check load average on various OS'es:
# Solaris: libkstat # Solaris: libkstat
...@@ -38,15 +44,20 @@ AC_CHECK_LIB([kstat], [kstat_open]) ...@@ -38,15 +44,20 @@ AC_CHECK_LIB([kstat], [kstat_open])
# Checks for pkg-config packages # Checks for pkg-config packages
PKG_CHECK_MODULES(XLOAD, xaw7) PKG_CHECK_MODULES(XLOAD, xaw7)
XLOAD_CFLAGS="$CWARNFLAGS $XLOAD_CFLAGS"
AC_SUBST(XLOAD_CFLAGS) AC_SUBST(XLOAD_CFLAGS)
AC_SUBST(XLOAD_LIBS) AC_SUBST(XLOAD_LIBS)
PKG_CHECK_MODULES(APPDEFS, xt) PKG_CHECK_MODULES(APPDEFS, xt)
appdefaultdir=$(pkg-config --variable=appdefaultdir xt) xt_appdefaultdir=$(pkg-config --variable=appdefaultdir xt)
AC_ARG_WITH(appdefaultdir,
AC_HELP_STRING([--with-appdefaultdir=<pathname>],
[specify directory for app-defaults files (default is autodetected)]),
[appdefaultdir="$withval"], [appdefaultdir="${xt_appdefaultdir}"])
AC_SUBST(appdefaultdir) AC_SUBST(appdefaultdir)
XORG_MANPAGE_SECTIONS XORG_MANPAGE_SECTIONS
XORG_RELEASE_VERSION XORG_RELEASE_VERSION
XORG_CHANGELOG
AC_OUTPUT([Makefile]) AC_OUTPUT([Makefile])
...@@ -30,14 +30,6 @@ void GetRLoadPoint( ...@@ -30,14 +30,6 @@ void GetRLoadPoint(
#define _PATH_RWHODIR "/var/spool/rwho" #define _PATH_RWHODIR "/var/spool/rwho"
#endif #endif
typedef struct _XLoadResources {
Boolean show_label;
Boolean use_lights;
String remote;
} XLoadResources;
extern XLoadResources resources ;
#define WHDRSIZE ((int)(sizeof (buf) - sizeof (buf.wd_we))) #define WHDRSIZE ((int)(sizeof (buf) - sizeof (buf.wd_we)))
void GetRLoadPoint( void GetRLoadPoint(
......
...@@ -52,21 +52,12 @@ from the X Consortium. ...@@ -52,21 +52,12 @@ from the X Consortium.
#include "xload.bit" #include "xload.bit"
char *ProgramName; static char *ProgramName;
static void quit(Widget w, XEvent *event, String *params, Cardinal *num_params); static void quit(Widget w, XEvent *event, String *params, Cardinal *num_params);
static void ClearLights(Display *dpy); static void ClearLights(Display *dpy);
static void SetLights(XtPointer data, XtIntervalId *timer); static void SetLights(XtPointer data, XtIntervalId *timer);
/*
* Definition of the Application resources structure.
*/
typedef struct _XLoadResources {
Boolean show_label;
Boolean use_lights;
String remote;
} XLoadResources;
/* /*
* Command line options table. Only resources are entered here...there is a * Command line options table. Only resources are entered here...there is a
......
...@@ -5,8 +5,21 @@ ...@@ -5,8 +5,21 @@
#include <X11/Intrinsic.h> #include <X11/Intrinsic.h>
/*
* Definition of the Application resources structure.
*/
typedef struct _XLoadResources {
Boolean show_label;
Boolean use_lights;
String remote;
} XLoadResources;
extern void InitLoadPoint(void); extern void InitLoadPoint(void);
extern void GetLoadPoint(Widget w, XtPointer closure, XtPointer call_data); extern void GetLoadPoint(Widget w, XtPointer closure, XtPointer call_data);
extern void GetRLoadPoint(Widget w, XtPointer closure, XtPointer call_data); extern void GetRLoadPoint(Widget w, XtPointer closure, XtPointer call_data);
extern XLoadResources resources;
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment