[PATCH] small cosmetic changes

Dennis Preiser <[email protected]> Thu, 1 Apr 2010 19:05:44 +0200
Newsgroups gmane.network.tin.devel
Message-ID <[email protected]>
On startup, the txt_connection(_port) message (nntplib.c:nntp_open())
was overwritten by the next message and not shown in the batch_mode &&
verbose case.

The txt_url_done message (page.c:process_url()) never appeared
(immediately overwritten by draw_page()).

Dennis

diff -urp tin-1.9.6_r5/src/nntplib.c tin-1.9.6_r6/src/nntplib.c
--- tin-1.9.6_r5/src/nntplib.c	2010-01-26 23:12:43.000000000 +0100
+++ tin-1.9.6_r6/src/nntplib.c	2010-04-01 17:17:38.000000000 +0200
@@ -1297,7 +1297,7 @@ nntp_open(
 		return -EHOSTUNREACH;
 	}
 
-	if (!batch_mode) {
+	if (!batch_mode || verbose) {
 		if (nntp_tcp_port != IPPORT_NNTP)
 			wait_message(0, _(txt_connecting_port), nntp_server, nntp_tcp_port);
 		else
@@ -1312,7 +1312,7 @@ nntp_open(
 	ret = server_init(nntp_server, NNTP_TCP_NAME, nntp_tcp_port, line, sizeof(line));
 	DEBUG_IO((stderr, "server_init returns %d,%s\n", ret, line));
 
-	if (!batch_mode && ret >= 0 && cmd_line)
+	if ((!batch_mode || verbose) && ret >= 0)
 		my_fputc('\n', stdout);
 
 #	ifdef DEBUG
diff -urp tin-1.9.6_r5/src/page.c tin-1.9.6_r6/src/page.c
--- tin-1.9.6_r5/src/page.c	2010-04-01 16:07:41.000000000 +0200
+++ tin-1.9.6_r6/src/page.c	2010-04-01 16:05:18.000000000 +0200
@@ -989,6 +989,7 @@ return_to_index:
 					process_url();
 					resize_article(TRUE, &pgart); /* rebreak long lines */
 					draw_page(group->name, 0);
+					info_message(_(txt_url_done));
 					XFACE_SHOW();
 				}
 				break;
@@ -2047,7 +2048,6 @@ process_url(
 			ptr += offsets[1] + 1;
 		}
 	}
-	info_message(_(txt_url_done));
 }