From: Roger Wolff Date: Thu, 4 Mar 1999 00:00:00 +0000 (+0000) Subject: mtr v0.30 X-Git-Tag: v0.30^0 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a81e2a544ac75298404eba8e2069703aee566d24;p=thirdparty%2Fmtr.git mtr v0.30 - Fixed a typo in the changelog (NEWS) entry for 0.27. :-) added use of "MTR_OPTIONS" environment variable for defaults. source: ftp://ftp.bitwizard.nl/mtr/mtr-0.30.tar.gz --- diff --git a/NEWS b/NEWS index 3ed50aa..33da46a 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,9 @@ WHAT'S NEW? + v0.30 Fixed a typo in the changelog (NEWS) entry for 0.27. :-) + added use of "MTR_OPTIONS" environment variable for defaults. + + v0.29 Lots of stuff. Neato overview display by David Sward. FreeBSD does wrong in the kernel the same that Solaris/x86 (see @@ -14,7 +18,7 @@ WHAT'S NEW? v0.27 Fixed bug that showed up on Solaris/x86. - Gimp mainloop now runs as it's supposed to. + GTK mainloop now runs as it's supposed to. v0.26 Added "-n" flag for numeric output. diff --git a/configure.in b/configure.in index 1dc26cb..00cad60 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ AC_INIT(mtr.c) -AM_INIT_AUTOMAKE(mtr, 0.29) +AM_INIT_AUTOMAKE(mtr, 0.30) AC_SUBST(GTK_OBJ) AC_SUBST(CURSES_OBJ) diff --git a/mtr.c b/mtr.c index e80a8f9..81fd74b 100644 --- a/mtr.c +++ b/mtr.c @@ -109,6 +109,31 @@ void parse_arg(int argc, char **argv) { } + +void parse_mtr_options (char *string) +{ + int argc; + char *argv[128], *p; + int i; + + if (!string) return; + + argv[0] = "mtr"; + argc = 1; + p = strtok (string, " \t"); + while (p) { + argv[argc++] = p; + p = strtok (NULL, " \t"); + } + parse_arg (argc, argv); + optind = 0; +} + + + + + + int main(int argc, char **argv) { int traddr; struct hostent *host; @@ -131,6 +156,9 @@ int main(int argc, char **argv) { } display_detect(&argc, &argv); + + parse_mtr_options (getenv ("MTR_OPTIONS")); + parse_arg(argc, argv); if(PrintVersion) {