diff -ur mtr-0.44/AUTHORS mtr-0.45/AUTHORS
--- mtr-0.44/AUTHORS	Sat Apr 28 01:32:28 2001
+++ mtr-0.45/AUTHORS	Thu Jan 24 09:30:47 2002
@@ -35,6 +35,9 @@
         Moritz Barsnick (barsnick@gmx.net)
         Robert Sparks (rjsparks@nostrum.com)
         David Stone (stone@AsIf.com)
+        Greg Stark (gsstark@mit.edu)
+        Andrew Brown (codewarrior@daemon.org ?) 
+        Marc Bejarano (marc.bejarano@openwave.com)
 
         and anyone who has slipped through the cracks of my mail file.
 
diff -ur mtr-0.44/NEWS mtr-0.45/NEWS
--- mtr-0.44/NEWS	Sat Apr 28 01:29:24 2001
+++ mtr-0.45/NEWS	Wed Jan 23 21:49:57 2002
@@ -1,8 +1,16 @@
 WHAT'S NEW?
 
+  v0.45 People are pressuring me to release new versions with their
+        changes. That's fine. Now this version just adds dynamic
+        switching between numeric / dns names, and some minor
+        stuff I forgot. This release serves as a code-sycn-release.
+        new version with even more new stuff in about two weeks!
+        I'm afraid I don't know how to fix the MaxOS-X compilation
+        problems in the source. Help wanted... 
+
   v0.44 David Stone adds the "last" column to the gtk version. 
 
-  v0.43 Compile fixes. 
+  v0.43 Compile fixes.
 
   v0.41 Added afr's patch to allow disabeling of gtk without Robn's hack. 
         Made report mode report the newly added extra resolution. 
diff -ur mtr-0.44/configure mtr-0.45/configure
--- mtr-0.44/configure	Sun Apr 15 15:15:30 2001
+++ mtr-0.45/configure	Sat Apr 28 01:32:52 2001
@@ -699,7 +699,7 @@
 
 PACKAGE=mtr
 
-VERSION=0.44
+VERSION=0.45
 
 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
diff -ur mtr-0.44/configure.in mtr-0.45/configure.in
--- mtr-0.44/configure.in	Sun Apr 15 15:15:29 2001
+++ mtr-0.45/configure.in	Sat Apr 28 01:32:50 2001
@@ -1,5 +1,5 @@
 AC_INIT(mtr.c)
-AM_INIT_AUTOMAKE(mtr, 0.44)
+AM_INIT_AUTOMAKE(mtr, 0.45)
 
 AC_SUBST(GTK_OBJ)
 AC_SUBST(CURSES_OBJ)
diff -ur mtr-0.44/curses.c mtr-0.45/curses.c
--- mtr-0.44/curses.c	Sun Apr 15 15:15:29 2001
+++ mtr-0.45/curses.c	Tue Jan 22 00:01:18 2002
@@ -48,7 +48,7 @@
 #endif
 
 #ifndef getmaxyx
-#  define getmaxyx(win,y,x)	(y = (win)->_maxy + 1, x = (win)->_maxx + 1)
+#  define getmaxyx(win,y,x)	((y) = (win)->_maxy + 1, (x) = (win)->_maxx + 1)
 #endif
 
 #include "mtr-curses.h"
@@ -88,6 +88,8 @@
     return ActionReset;
   if (tolower(c) == 'd')
     return ActionDisplay;
+  if (tolower(c) == 'n')
+    return ActionDNS;
 
   return 0;
 }
@@ -180,13 +182,13 @@
 	printw(">");
 }
 
-void mtr_fill_graph(int at) {
+void mtr_fill_graph(int at, int cols) {
 	int* saved;
 	int i;
 	int val;
 
 	saved = net_saved_pings(at);
-	for (i = 0; i < SAVED_PINGS; i++) {
+	for (i = SAVED_PINGS-cols; i < SAVED_PINGS; i++) {
 		if (saved[i] == -2) {
 			printw(" ");
 		} else if (saved[i] == -1) {
@@ -207,12 +209,12 @@
 	}
 }
 
-void mtr_curses_graph(int startstat) {
+void mtr_curses_graph(int startstat, int cols) {
 	int max, at, addr, y, x;
 	char* name;
-	char blocks[50];
 
 	max = net_max();
+
 	for (at = 0; at < max; at++) {
 		printw("%2d. ", at+1);
 
@@ -233,7 +235,7 @@
 		move(y, startstat);
 
 		printw(" ");
-		mtr_fill_graph(at);
+		mtr_fill_graph(at, cols);
 		printw("\n");
 	}
 }
@@ -283,15 +285,18 @@
     mtr_curses_hosts(startstat);
   } else {
     /* David Sward, Jan 1999 */
-    startstat = maxx - 52;
-
-    mvprintw(rowstat - 1, startstat, " Last 50 pings");
-
+    char msg[80];
+    int max_cols = maxx<=SAVED_PINGS+30 ? maxx-30 : SAVED_PINGS;
+    startstat = 28;
+
+    sprintf(msg, " Last %3d pings", max_cols);
+    mvprintw(rowstat - 1, startstat, msg);
+    
     attroff(A_BOLD);
     move(rowstat, 0);
 
     mtr_gen_scale();
-    mtr_curses_graph(startstat);
+    mtr_curses_graph(startstat, max_cols);
 
     printw("\n");
     attron(A_BOLD);
diff -ur mtr-0.44/display.h mtr-0.45/display.h
--- mtr-0.44/display.h	Sun Apr 15 15:15:29 2001
+++ mtr-0.45/display.h	Tue Jan 22 00:01:18 2002
@@ -18,7 +18,7 @@
 */
 
 enum { ActionNone, ActionQuit, ActionReset, ActionDisplay, ActionClear,
-	ActionPause, ActionResume };
+	ActionPause, ActionResume, ActionDNS };
 enum { DisplayReport, DisplayCurses, DisplayGTK, DisplaySplit, DisplayRaw };
 
 /*  Prototypes for display.c  */
@@ -33,3 +33,5 @@
 void display_clear();
 
 extern int display_mode;
+extern int use_dns;
+extern int dns;
diff -ur mtr-0.44/dns.c mtr-0.45/dns.c
--- mtr-0.44/dns.c	Sun Apr 15 15:15:29 2001
+++ mtr-0.45/dns.c	Tue Jan 22 00:01:18 2002
@@ -1189,11 +1189,12 @@
    return NULL;
 }
 
+int use_dns = 1;
 
 char *dns_lookup(ip_t ip){
   char *t;
 
   if (!dns) return strlongip (ip);
   t = dns_lookup2 (ip);
-  return t?t:strlongip(ip);
+  return (t&&use_dns)?t:strlongip(ip);
 }
diff -ur mtr-0.44/net.c mtr-0.45/net.c
--- mtr-0.44/net.c	Sun Apr 15 15:15:29 2001
+++ mtr-0.45/net.c	Sat Jan 19 10:26:25 2002
@@ -91,6 +91,7 @@
   int worst;
   int transit;
   int saved[SAVED_PINGS];
+  int saved_seq_offset;
 };
 
 struct sequence {
@@ -459,6 +460,7 @@
     for (i=0; i<SAVED_PINGS; i++) {
       host[at].saved[i] = -2;	/* unsent */
     }
+    host[at].saved_seq_offset = -SAVED_PINGS+2;
   }
   
   for(at = 0; at < MaxSequence; at++) {
@@ -482,18 +484,27 @@
 	return host[at].saved;
 }
 
+void net_save_increment() 
+{
+  int at;
+  for (at = 0; at < MaxHost; at++) {
+    memmove(host[at].saved, host[at].saved+1, (SAVED_PINGS-1)*sizeof(int));
+    host[at].saved[SAVED_PINGS-1] = -2;
+    host[at].saved_seq_offset += 1;
+  }
+}
+
 void net_save_xmit(int at) {
-	int tmp[SAVED_PINGS];
-	memcpy(tmp, &host[at].saved[1], (SAVED_PINGS-1)*sizeof(int));
-	memcpy(host[at].saved, tmp, (SAVED_PINGS-1)*sizeof(int));
-	host[at].saved[SAVED_PINGS-1] = -1;
+  if (host[at].saved[SAVED_PINGS-1] != -2) 
+    net_save_increment();
+  host[at].saved[SAVED_PINGS-1] = -1;
 }
 
 void net_save_return(int at, int seq, int ms) {
 	int idx;
-	idx = SAVED_PINGS - (host[at].xmit - seq) - 1;
-	if (idx < 0) {
-		return;
+	idx = seq - host[at].saved_seq_offset;
+	if (idx < 0 || idx > SAVED_PINGS) {
+	  return;
 	}
 	host[at].saved[idx] = ms;
 }
diff -ur mtr-0.44/net.h mtr-0.45/net.h
--- mtr-0.44/net.h	Sun Apr 15 15:15:29 2001
+++ mtr-0.45/net.h	Sat Jan 19 10:26:25 2002
@@ -43,7 +43,7 @@
 int net_xmit(int at);
 int net_transit(int at);
 
-#define SAVED_PINGS 50
+#define SAVED_PINGS 200
 int* net_saved_pings(int at);
 void net_save_xmit(int at);
 void net_save_return(int at, int seq, int ms);
diff -ur mtr-0.44/select.c mtr-0.45/select.c
--- mtr-0.44/select.c	Sun Apr 15 15:15:29 2001
+++ mtr-0.45/select.c	Tue Jan 22 00:01:18 2002
@@ -150,6 +150,11 @@
       if (action == ActionResume) 
 	paused=0;
 
+      if (action == ActionDNS && dns) {
+	use_dns = !use_dns;
+	display_clear();
+      }
+
       anyset = 1;
     }
 
