[tin-users] Piping/Printing message looks odd TODO

Urs Janßen urs at tin.org
Mon Mar 21 19:10:27 CET 2016


On Mon, Mar 21, 2016 at 07:57:16AM -0400, Glenn Spell wrote:
> Please check and see if the patch below provides any improvement.

If you tag a few articles on the group or thread level and pipe them
into a cmd. the tag mark is still present till the next manually forced
screen redraw (^L)'.

> Index: include/extern.h
> --- tin-2.3.2.orig/include/extern.h	2015-11-22 00:15:40.000000000 +0000
> +++ tin-2.3.2/include/extern.h	2016-03-21 11:20:01.000000000 +0000
> @@ -1605,6 +1605,7 @@ extern char *input_history[HIST_MAXNUM +
>  #	endif /* NNTP_INEWS */
>  #endif /* FORGERY */
>  
> +extern t_bool feed_raw_mode;

Yet another new global var, why not passing a flag to show_progress() if
you're calling it direct (which is IMHO still not right)?

>  extern t_bool word_highlight;
>  #ifdef HAVE_COLOR
>  	extern constext txt_tinrc_colors[];
> 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-21 11:16:13.000000000 +0000
> @@ -439,21 +439,25 @@ feed_article(
>  	switch (function) {
>  #ifndef DONT_HAVE_PIPING
>  		case FEED_PIPE:
> -			/* TODO: looks odd because screen mode is raw */
> -			progress_mesg = fmt_string("%s (%d/%d)", _(txt_piping), counter->total, counter->max);
> +			feed_raw_mode = TRUE;
> +			show_progress(fmt_string("%s (%d/%d)", _(txt_piping), counter->total, counter->max), counter->total, counter->max);
> +			feed_raw_mode = FALSE;
>  			break;
>  #endif /* !DONT_HAVE_PIPING */

progress_mesg is still NULL, but is passed on to art_open() in line 467,
passing it to progress() in the end which then skips show_progress() - not
very clean IMHO.

urs
-- 
"Only whimps use tape backup: _real_ men just upload their important stuff
 on ftp, and let the rest of the world mirror it ;)" - Linus



More information about the tin-users mailing list