[tin-users] Piping/Printing message looks odd TODO
Glenn Spell
glenn at gs.fay.nc.us
Tue Mar 15 01:45:13 CET 2016
For years the following note has been in the tin feed.c file
concerning the piping and printing messages:
/* TODO: looks odd because screen mode is raw */
For almost fifteen years this has been a problem with tin on NetBSD.
Here's what the problem looks like when piping a thread:
Piping... (7/261) 98% Piping... (18/261) 45% Piping... (18/261) 91%
(0:00 remaining)Piping... (23/261) 100% Piping... (43/261) 83% Pipin
g... (47/261) 48% Piping... (47/261) 96% (0:00 remaining)Piping... (
54/261) 98% Piping... (55/261) 64% Piping... (56/261) 94% Piping...
Is there a terminal setting that might affect this issue?
As an illustration, the following patch provides me with a workaround
for this issue. Is there some better way to deal with this issue?
Index: src/feed.c
--- tin-2.3.2.orig/src/feed.c 2015-11-22 00:14:30.000000000 +0000
+++ tin-2.3.2/src/feed.c 2016-03-12 02:26:33.000000000 +0000
@@ -440,6 +440,8 @@ feed_article(
#ifndef DONT_HAVE_PIPING
case FEED_PIPE:
/* TODO: looks odd because screen mode is raw */
+ echochar(13);
+ clrtoeol();
progress_mesg = fmt_string("%s (%d/%d)", _(txt_piping), counter->total, counter->max);
break;
#endif /* !DONT_HAVE_PIPING */
@@ -447,6 +449,8 @@ feed_article(
#ifndef DISABLE_PRINTING
case FEED_PRINT:
/* TODO: looks odd because screen mode is raw */
+ echochar(13);
+ clrtoeol();
progress_mesg = fmt_string("%s (%d/%d)", _(txt_printing), counter->total, counter->max);
break;
#endif /* !DISABLE_PRINTING */
Index: src/lang.c
--- tin-2.3.2.orig/src/lang.c 2015-11-22 00:14:30.000000000 +0000
+++ tin-2.3.2/src/lang.c 2016-03-12 02:25:55.000000000 +0000
@@ -1141,7 +1141,7 @@ Tin will try to use XHDR XREF instead (s
constext txt_articles_printed[] = N_("%d %s printed");
constext txt_help_global_print[] = N_("output article/thread/hot/pattern/tagged articles to printer");
constext txt_print[] = N_("Print");
- constext txt_printing[] = N_("Printing...");
+ constext txt_printing[] = N_("\rPrinting...");
#endif /* !DISABLE_PRINTING */
#ifndef DONT_HAVE_PIPING
@@ -1149,7 +1149,7 @@ Tin will try to use XHDR XREF instead (s
constext txt_no_command[] = N_("No command");
constext txt_pipe[] = N_("Pipe");
constext txt_pipe_to_command[] = N_("Pipe to command [%.*s]> ");
- constext txt_piping[] = N_("Piping...");
+ constext txt_piping[] = N_("\rPiping...");
#else
constext txt_piping_not_enabled[] = N_("Piping not enabled.");
#endif /* !DONT_HAVE_PIPING */
Thanks,
Glenn
More information about the tin-users
mailing list