[Pkg-wmaker-commits] [wmifs] 27/118: Imported Debian patch 1.3b1-15
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Thu Aug 27 02:37:48 UTC 2015
This is an automated email from the git hooks/post-receive script.
dtorrance-guest pushed a commit to branch master
in repository wmifs.
commit 40d2556cb630c30398e7413cbdd5b5e27539fb39
Author: Romain Francoise <rfrancoise at debian.org>
Date: Sun Feb 29 17:19:12 2004 +0100
Imported Debian patch 1.3b1-15
---
debian/changelog | 44 ++++++++++++++++++++++++++++++-
debian/compat | 1 +
debian/control | 7 ++---
debian/copyright | 3 +++
debian/rules | 80 +++-----------------------------------------------------
debian/wmifs.1 | 13 +++++++--
wmifs/wmifs.c | 53 ++++++++++++++++++++++++++++---------
7 files changed, 107 insertions(+), 94 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 0c94b40..a09793b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,45 @@
+wmifs (1.3b1-15) unstable; urgency=low
+
+ * wmifs/wmifs.c: patch from Tom Marshall <tommy at home.tig-grr.com>, adds
+ a special interface name "auto" for the -i option. "wmifs -i auto"
+ will automatically select the first up interface (closes: #204873).
+ * debian/wmifs.1: Document "-i auto" behavior.
+
+ -- Romain Francoise <rfrancoise at debian.org> Sun, 29 Feb 2004 17:19:12 +0100
+
+wmifs (1.3b1-14) unstable; urgency=low
+
+ * wmifs/wmifs.c: patch from Peter Samuelson <peter at samba-tng.org> to
+ make sampling and scrolling intervals customizable, adds new options
+ -I and -s (closes: #226689).
+ * debian/wmifs.1: Add new options -I and -s.
+
+ -- Romain Francoise <rfrancoise at debian.org> Thu, 8 Jan 2004 19:21:06 +0100
+
+wmifs (1.3b1-13) unstable; urgency=low
+
+ * The "Stepping up" release.
+ * New maintainer.
+ * debian/control:
+ + Update maintainer contact info.
+ + Add Recommends on wmaker.
+ + Add Build-Depends on cdbs.
+ * debian/copyright: Update maintainer information.
+
+ -- Romain Francoise <rfrancoise at debian.org> Fri, 5 Dec 2003 20:17:25 +0100
+
+wmifs (1.3b1-12) unstable; urgency=low
+
+ * The "Why hasn't anyone taken over wmifs yet?" release.
+ * debian/changelog: recode as UTF-8.
+ * debian/control:
+ + build-depend on cdbs, bump debhelper to (>= 4.1.0).
+ + bump Standards-Version to 3.6.1.0.
+ * debian/compat: use debhelper 4.
+ * debian/rules: switch to cdbs.
+
+ -- Jordi Mallach <jordi at debian.org> Tue, 25 Nov 2003 17:20:41 +0100
+
wmifs (1.3b1-11) unstable; urgency=low
* debian/changelog: removed emacs stuff.
@@ -45,7 +87,7 @@ wmifs (1.3b1-7) unstable; urgency=low
* wmifs/wmifs.c: added a new command line argument, -l, which starts
wmifs in "Lock Mode". With it, if you specify an interface with -i
but it's not up, wmifs won't try to fall back to another existing
- interface. Thanks to Jorge Garc�a for the help. (closes: #26870)
+ interface. Thanks to Jorge García for the help. (closes: #26870)
* And finally wmifs is bugfree(tm) (or you haven't reported them :)
-- Jordi Mallach <jordi at debian.org> Sat, 16 Jun 2001 20:11:58 +0200
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..b8626c4
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+4
diff --git a/debian/control b/debian/control
index 878b8fd..e4bf0f3 100644
--- a/debian/control
+++ b/debian/control
@@ -1,13 +1,14 @@
Source: wmifs
Section: x11
Priority: optional
-Maintainer: Jordi Mallach <jordi at debian.org>
-Build-Depends: debhelper (>= 3.0.0), xlibs-dev
-Standards-Version: 3.5.6.0
+Maintainer: Romain Francoise <rfrancoise at debian.org>
+Build-Depends: debhelper (>= 4.1.0), cdbs, xlibs-dev
+Standards-Version: 3.6.1.0
Package: wmifs
Architecture: any
Depends: ${shlibs:Depends}
+Recommends: wmaker
Conflicts: wmppp.app (<= 1.1-1)
Replaces: wmppp.app (<= 1.1-1)
Description: WindowMaker dock app for monitoring network traffic
diff --git a/debian/copyright b/debian/copyright
index e05cde1..bb7e783 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -2,6 +2,9 @@ This package was debianized by Ben Gertzfield <che at debian.org> on
Tue, 25 Aug 1998 13:37:07 -0700
Jordi Mallach <jordi at debian.org> took over the packaging on
Sun, 6 May 2001 13:50:04 +0200
+Romain Francoise <rfrancoise at debian.org> then took the package from
+Jordi's hands on Fri, 05 Dec 2003 20:05:51 +0100
+
It was downloaded from http://web.cs.mun.ca/~gstarkes/wmaker/dockapps/net.html
diff --git a/debian/rules b/debian/rules
index 8e53364..26366dd 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,80 +1,8 @@
#!/usr/bin/make -f
-# Made with the aid of dh_make, by Craig Small
-# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
-# Some lines taken from debmake, by Cristoph Lameter.
-# Uncomment this to turn on verbose mode.
-# export DH_VERBOSE=1
+include /usr/share/cdbs/1/class/makefile.mk
+include /usr/share/cdbs/1/rules/debhelper.mk
-# This is the debhelper compatability version to use.
-export DH_COMPAT=3
+DEB_BUILDDIR = wmifs
-CFLAGS = -O2 -Wall
-INSTALL = install
-INSTALL_FILE = $(INSTALL) -p -o root -g root -m 644
-INSTALL_PROGRAM = $(INSTALL) -p -o root -g root -m 755
-INSTALL_DIR = $(INSTALL) -p -d -o root -g root -m 755
-
-ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
-CFLAGS += -g
-endif
-ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
-INSTALL_PROGRAM += -s
-endif
-
-build: build-stamp
-build-stamp:
- dh_testdir
-
- cd wmifs && $(MAKE) CFLAGS="$(CFLAGS)"
-
- touch build-stamp
-
-clean:
- dh_testdir
- dh_testroot
- rm -f build-stamp install-stamp
-
- cd wmifs && $(MAKE) clean
-
- dh_clean
-
-install: build
- dh_testdir
- dh_testroot
- dh_clean -k
- dh_installdirs
-
- cd wmifs ; $(MAKE) DESTDIR=$(CURDIR)/debian/wmifs prefix=/usr \
- INSTALL_PROGRAM="$(INSTALL_PROGRAM)" install
-
- touch install-stamp
-
-binary-indep: build install
-
-binary-arch: build install
- dh_testdir
- dh_testroot
- dh_installdirs
- dh_installdocs
- dh_installexamples
- dh_installmenu
-# dh_installinit
- dh_installman
-# dh_undocumented wmifs.1x
- dh_installchangelogs CHANGES
- dh_strip
- dh_compress
- dh_fixperms
- dh_installdeb
- dh_shlibdeps
- dh_gencontrol
-# dh_makeshlibs
- dh_md5sums
- dh_builddeb
-
-source diff:
- @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install
+DEB_MAKE_INSTALL_TARGET = install DESTDIR=$(DEB_DESTDIR) prefix=/usr
diff --git a/debian/wmifs.1 b/debian/wmifs.1
index 3dbe9c6..16e6b3e 100644
--- a/debian/wmifs.1
+++ b/debian/wmifs.1
@@ -1,5 +1,6 @@
.\" Hey, Emacs! This is an -*- nroff -*- source file.
-.\" wmifs is copyright 1999-2001 by Jordi Mallach <jordi at debian.org>
+.\" wmifs is copyright 1999-2003 by Jordi Mallach <jordi at debian.org>
+.\" copyright 2003-2004 by Romain Francoise <rfrancoise at debian.org>
.\"
.\" This is free documentation, see the latest version of the GNU
.\" General Public License for copying conditions. There is NO warranty.
@@ -36,13 +37,21 @@ Show version of the program.
Use an alternate X display.
.TP
.B \-i <interface name>
-Interface that should come up initially when executing wmifs.
+Interface that should come up initially when executing wmifs. If you
+use "auto" as interface name, the first active ("up") interface will be
+used.
+.TP
+.B \-I <interval>
+Sampling interval, in seconds (default: 0.05).
.TP
.B \-l
Starts wmifs in lock mode. Useful if combined with \-i, if you want to
monitor a, for example, ppp device which isn't up when wmifs is started.
It won't switch to the next available interface.
.TP
+.B \-s <interval>
+Scrolling interval, in seconds (default: 5)
+.TP
.B \-w
Use the waveform graph instead of the classic one.
diff --git a/wmifs/wmifs.c b/wmifs/wmifs.c
index 6b756d8..95d4cf1 100644
--- a/wmifs/wmifs.c
+++ b/wmifs/wmifs.c
@@ -74,6 +74,13 @@
----
Changes:
---
+ 02/29/2004 (Tom Marshall, tommy at home.tig-grr.com)
+ * Patch to add a special interface name "auto" for the -i
+ option. "wmifs -i auto" will automatically select the
+ first up interface.
+ 01/08/2004 (Peter Samuelson, peter at samba-tng.org)
+ * Patch to make make sampling and scrolling intervals
+ customizable, adds new options -I and -s.
01/15/2002 (Matyas Koszik, koszik at debijan.lonyay.edu.hu)
* Patch that fixes segfaults on long interface names.
08/31/2001 (Davi Leal, davileal at terra.es)
@@ -183,6 +190,7 @@
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
+#include <sys/time.h>
#include <X11/Xlib.h>
#include <X11/xpm.h>
@@ -197,8 +205,11 @@
#include "wmifs-master.xpm"
#include "wmifs-mask.xbm"
-/* How often to check for new network interface, in seconds */
-#define CHECK_INTERFACE_INTERVAL 5
+/* How often to check for new network interface, in ms */
+#define CHECK_INTERFACE_INTERVAL 5000
+
+/* How often to query the interfaces, in ms */
+#define DEFAULT_SAMPLE_INTERVAL 50
/***********/
/* Defines */
@@ -233,6 +244,8 @@ char *active_interface = NULL;
int TimerDivisor=60;
int WaveForm=0;
int LockMode=0;
+int SampleInt = DEFAULT_SAMPLE_INTERVAL;
+int ScrollSpeed = CHECK_INTERFACE_INTERVAL;
/*****************/
/* PPP variables */
@@ -291,9 +304,17 @@ int main(int argc, char *argv[]) {
active_interface = argv[i+1];
i++;
break;
+ case 'I' :
+ SampleInt = atof(argv[i+1]) * 1000;
+ i++;
+ break;
case 'l' :
LockMode = 1;
break;
+ case 's' :
+ ScrollSpeed = atof(argv[i+1]) * 1000;
+ i++;
+ break;
case 'v' :
printversion();
exit(0);
@@ -356,9 +377,9 @@ void wmifs_routine(int argc, char **argv) {
int stat_online;
int stat_current;
- time_t starttime;
- time_t curtime;
- time_t nexttime;
+ unsigned int curtime;
+ unsigned int nexttime;
+ struct timeval tv, tv2;
long ipacket, opacket, istat, ostat;
@@ -377,9 +398,13 @@ void wmifs_routine(int argc, char **argv) {
stat_current = 0;
if (active_interface) {
+ int isauto = !strcmp(active_interface, "auto");
for (i=0; i<stat_online; i++) {
- if (!strcmp(stat_devices[i].name, active_interface))
+ if ((isauto && stillonline(stat_devices[i].name)) ||
+ !strcmp(stat_devices[i].name, active_interface)) {
stat_current = i;
+ break;
+ }
}
}
@@ -403,14 +428,16 @@ void wmifs_routine(int argc, char **argv) {
AddMouseRegion(0, 5, 5, 35, 15);
AddMouseRegion(1, 5, 20, 58, 58);
- starttime = time(0);
- nexttime = starttime + CHECK_INTERFACE_INTERVAL;
-
+ gettimeofday(&tv2, NULL);
+ nexttime = ScrollSpeed;
DrawActiveIFS(stat_devices[stat_current].name);
while (1) {
- curtime = time(0);
+ gettimeofday(&tv, NULL);
+ curtime = (tv.tv_sec - tv2.tv_sec) * 1000
+ + (tv.tv_usec - tv2.tv_usec) / 1000;
+
waitpid(0, NULL, WNOHANG);
for (i=0; i<stat_online; i++) {
@@ -443,7 +470,7 @@ void wmifs_routine(int argc, char **argv) {
RedrawWindow();
if (curtime >= nexttime) {
- nexttime=curtime+CHECK_INTERFACE_INTERVAL;
+ nexttime=curtime+ScrollSpeed;
DrawStats(&stat_devices[stat_current].his[0][0], 54, 40, 5, 58);
for (i=0; i<stat_online; i++) {
@@ -520,7 +547,7 @@ void wmifs_routine(int argc, char **argv) {
}
}
- usleep(50000L); /* 50 milliseconds */
+ usleep(SampleInt * 1000);
}
}
@@ -862,7 +889,9 @@ void usage(void) {
fprintf(stderr, "\t-d <display name>\n");
fprintf(stderr, "\t-h\tthis help screen\n");
fprintf(stderr, "\t-i <interface name>\tdefault (as it appears in /proc/net/route)\n");
+ fprintf(stderr, "\t-I <interval>\tsampling interval, in seconds (default: 0.05)\n");
fprintf(stderr, "\t-l\tstarts in lock mode\n");
+ fprintf(stderr, "\t-s <interval>\tscrolling interval, in seconds (default: 5)\n");
fprintf(stderr, "\t-v\tprint the version number\n");
fprintf(stderr, "\t-w\twaveform load\n");
fprintf(stderr, "\n");
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmifs.git
More information about the Pkg-wmaker-commits
mailing list