🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #4300

Re: Tin v1.2 PL0 newsreader Bug List

#4300
From: Pope Clifton
Date: Sat, 29 May 1993 06:38
412 lines
12293 bytes
Tom J Parry (parry@yoyo.cc.monash.edu.au) wrote:
: >    Enter a group using TAB or CR; read all messages, then hit Tab to proceed
: > to the next group.  When the "indexing nn/nn" message appears for this
: > group, hit "q", and answer "y" to the "abort indexing" prompt.  Tin will
: > immediately resume indexing the same group; no way to abort it short of a
: > Quit/Kill signal.  

: This happens in other situations too. If you solve it please post it.

Your wish is my command.  This fix includes a lot of changes, only because I
had to "document" some of the special values index_point takes on to
understand it.  The key change is that in select.c, setting index_point to
GRP_UNINDEXED (-1) should happen inside the loop which calls group_page, not
before the loop.

diff -rcs my/tin.h orig/tin.h
*** my/tin.h	Thu May 27 17:46:19 1993
--- orig/tin.h	Thu May 27 17:16:41 1993
***************
*** 544,559 ****
  #define		HEADER_NEWSGROUPS		2
  
  /*
-  *  index_point values used in group.c, select.c, and page.c
-  */
- 
- #define		GRP_UNINDEXED			-1 /* Stop reading group */
- #define		GRP_QUIT			-2 /* Set by 'Q' */
- #define		GRP_GOTONEXT			-3 /* Go to another group */
- #define		GRP_CONTINUE			-4 /* show_page sets this */
- #define		GRP_NOREDRAW			-5 /* Suppress redraw */
- 
- /*
   *  used in page.c & post.c
   */
  
--- 544,549 ----

diff -rcs my/select.c orig/select.c
*** my/select.c	Thu May 27 17:46:19 1993
--- orig/select.c	Thu May 27 17:17:32 1993
***************
*** 159,169 ****
  				if (active[n].min <= active[n].max) {
  					space_mode = pos_first_unread;
  					clear_message();
  					do {
- 						index_point = GRP_UNINDEXED;
  						n = my_group[cur_groupnum];
  						group_page (active[n].name);
! 					} while (index_point == GRP_GOTONEXT || index_point == GRP_CONTINUE);
  #ifndef DONT_REREAD_ACTIVE_FILE					
  					if (! reread_active_file)
  #endif
--- 159,169 ----
  				if (active[n].min <= active[n].max) {
  					space_mode = pos_first_unread;
  					clear_message();
+ 					index_point = -1;
  					do {
  						n = my_group[cur_groupnum];
  						group_page (active[n].name);
! 					} while (index_point == -3 || index_point == -4);
  #ifndef DONT_REREAD_ACTIVE_FILE					
  					if (! reread_active_file)
  #endif
***************
*** 1111,1120 ****
  
  	if (enter_group) {
  		clear_message ();
  		do {
- 			index_point = GRP_UNINDEXED;
  			group_page (active[my_group[cur_groupnum]].name);
! 		} while (index_point == GRP_GOTONEXT || index_point == GRP_CONTINUE);
  		group_selection_page ();
  	}
  }
--- 1111,1120 ----
  
  	if (enter_group) {
  		clear_message ();
+ 		index_point = -1;
  		do {
  			group_page (active[my_group[cur_groupnum]].name);
! 		} while (index_point == -3 || index_point == -4);
  		group_selection_page ();
  	}
  }

diff -rcs my/group.c orig/group.c
*** my/group.c	Thu May 27 17:46:20 1993
--- orig/group.c	Thu May 27 17:16:59 1993
***************
*** 212,223 ****
  					break;
  				}
  				index_point = show_page (this_resp, &dummy, group, group_path);
! 				if (index_point == GRP_NOREDRAW) {
  					index_point = which_thread (this_resp);
  					clear_message ();
  				} else {
  					if (index_point < 0) {
! 						space_mode = (index_point == GRP_CONTINUE);
  						goto group_done;
  					}
  					clear_note_area ();
--- 212,223 ----
  					break;
  				}
  				index_point = show_page (this_resp, &dummy, group, group_path);
! 				if (index_point == -5) {
  					index_point = which_thread (this_resp);
  					clear_message ();
  				} else {
  					if (index_point < 0) {
! 						space_mode = (index_point == -4);
  						goto group_done;
  					}
  					clear_note_area ();
***************
*** 264,275 ****
  				}
  				i = (int) base[index_point];
  				index_point = show_page (i, &dummy, group, group_path);
! 				if (index_point == GRP_NOREDRAW) {
  					index_point = which_thread (i);
  					clear_message ();
  				} else {
  					if (index_point < 0) {
! 						space_mode = (index_point == GRP_CONTINUE);
  						goto group_done;
  					}
  					clear_note_area ();
--- 264,275 ----
  				}
  				i = (int) base[index_point];
  				index_point = show_page (i, &dummy, group, group_path);
! 				if (index_point == -5) {
  					index_point = which_thread (i);
  					clear_message ();
  				} else {
  					if (index_point < 0) {
! 						space_mode = (index_point == -4);
  						goto group_done;
  					}
  					clear_note_area ();
***************
*** 295,305 ****
  						goto group_done;
  					}
  					cur_groupnum = i;
! 					index_point = GRP_GOTONEXT;
  					goto group_done;
  				}
  				index_point = show_page (n, &dummy, group, group_path);
! 				if (index_point == GRP_NOREDRAW) {
  					index_point = which_thread (n);
  					goto group_tab_pressed;	/* repeat TAB */
  				} else {
--- 295,305 ----
  						goto group_done;
  					}
  					cur_groupnum = i;
! 					index_point = -3;
  					goto group_done;
  				}
  				index_point = show_page (n, &dummy, group, group_path);
! 				if (index_point == -5) {
  					index_point = which_thread (n);
  					goto group_tab_pressed;	/* repeat TAB */
  				} else {
***************
*** 495,501 ****
  					break;
  
  				index_point = show_page (n, &dummy, group, group_path);
! 				if (index_point != GRP_NOREDRAW) {
  					if (index_point < 0) {
  						space_mode = FALSE;
  						goto group_done;
--- 495,501 ----
  					break;
  
  				index_point = show_page (n, &dummy, group, group_path);
! 				if (index_point != -5) {
  					if (index_point < 0) {
  						space_mode = FALSE;
  						goto group_done;
***************
*** 532,538 ****
  				n = choose_new_group ();
  				if (n >= 0 && n != cur_groupnum) {
  					cur_groupnum = n;
! 					index_point = GRP_GOTONEXT;
  					goto group_done;
  				}
  				break;
--- 532,538 ----
  				n = choose_new_group ();
  				if (n >= 0 && n != cur_groupnum) {
  					cur_groupnum = n;
! 					index_point = -3;
  					goto group_done;
  				}
  				break;
***************
*** 603,609 ****
  				}
   				space_mode = TRUE;
  				n = show_thread ((int) base[index_point], group, group_path);
! 				if (n == GRP_QUIT) {
  					index_point = n;
  					space_mode = FALSE;
  					goto group_done;
--- 603,609 ----
  				}
   				space_mode = TRUE;
  				n = show_thread ((int) base[index_point], group, group_path);
! 				if (n == -2) {
  					index_point = n;
  					space_mode = FALSE;
  					goto group_done;
***************
*** 647,653 ****
  					info_message (txt_no_more_groups);
  				else {
  					cur_groupnum++;
! 					index_point = GRP_GOTONEXT;
  					space_mode = pos_first_unread;
  					goto group_done;
  				}
--- 647,653 ----
  					info_message (txt_no_more_groups);
  				else {
  					cur_groupnum++;
! 					index_point = -3;
  					space_mode = pos_first_unread;
  					goto group_done;
  				}
***************
*** 664,670 ****
  					info_message (txt_no_next_unread_art);
  				else {
  					index_point = show_page (n, &dummy, group, group_path);
! 					if (index_point != GRP_NOREDRAW) {
  						if (index_point < 0) {
  							space_mode = pos_first_unread;
  							goto group_done;
--- 664,670 ----
  					info_message (txt_no_next_unread_art);
  				else {
  					index_point = show_page (n, &dummy, group, group_path);
! 					if (index_point != -5) {
  						if (index_point < 0) {
  							space_mode = pos_first_unread;
  							goto group_done;
***************
*** 688,694 ****
  					info_message(txt_no_prev_group);
  				else {
  					cur_groupnum--;
! 					index_point = GRP_GOTONEXT;
  					space_mode = pos_first_unread;
  					goto group_done;
  				}
--- 688,694 ----
  					info_message(txt_no_prev_group);
  				else {
  					cur_groupnum--;
! 					index_point = -3;
  					space_mode = pos_first_unread;
  					goto group_done;
  				}
***************
*** 705,711 ****
  				    info_message(txt_no_prev_unread_art);
  				else {
  					index_point = show_page (n, &dummy, group, group_path);
! 					if (index_point != GRP_NOREDRAW) {
  						if (index_point < 0) {
  							space_mode = pos_first_unread;
  							goto group_done;
--- 705,711 ----
  				    info_message(txt_no_prev_unread_art);
  				else {
  					index_point = show_page (n, &dummy, group, group_path);
! 					if (index_point != -5) {
  						if (index_point < 0) {
  							space_mode = pos_first_unread;
  							goto group_done;
***************
*** 721,727 ****
  				goto group_done;
  
  			case 'Q':		/* quit */
! 				index_point = GRP_QUIT;
  				space_mode = FALSE;
  				goto group_done;
  
--- 721,727 ----
  				goto group_done;
  
  			case 'Q':		/* quit */
! 				index_point = -2;
  				space_mode = FALSE;
  				goto group_done;
  
***************
*** 1049,1055 ****
  	fix_new_highest (sav_groupnum);
  	update_newsrc (group, my_group[sav_groupnum], FALSE);
  
! 	if (index_point == GRP_QUIT) {
  		write_rcfile ();
  		tin_done (0);
  	}	
--- 1049,1055 ----
  	fix_new_highest (sav_groupnum);
  	update_newsrc (group, my_group[sav_groupnum], FALSE);
  
! 	if (index_point == -2) {
  		write_rcfile ();
  		tin_done (0);
  	}	

diff -rcs my/page.c orig/page.c
*** my/page.c	Thu May 27 17:46:20 1993
--- orig/page.c	Thu May 27 17:32:28 1993
***************
*** 93,99 ****
  		} else {
  			wait_message (msg);
  		}
! 		return (GRP_NOREDRAW);	/* special retcode to stop redrawing screen */
  	} else {
  		show_note_page (respnum, group);
  	}
--- 93,99 ----
  		} else {
  			wait_message (msg);
  		}
! 		return (-5);	/* special retcode to stop redrawing screen */
  	} else {
  		show_note_page (respnum, group);
  	}
***************
*** 304,310 ****
  				}
  /*
  				if (which_thread (respnum) < 0) {
! 					return GRP_UNINDEXED;
  				}
  */
  				redraw_page (respnum, group);
--- 304,310 ----
  				}
  /*
  				if (which_thread (respnum) < 0) {
! 					return -1;
  				}
  */
  				redraw_page (respnum, group);
***************
*** 377,388 ****
  					for (n = 0; n < top; n++) {
  						arts[n].unread = ART_READ;
  					}
! 					ret_code = (ch == 'C' ? GRP_CONTINUE : GRP_UNINDEXED);
  					fix_new_highest (cur_groupnum);
  					if (cur_groupnum + 1 < group_top) {
  						cur_groupnum++;
  					} else {
! 						ret_code = GRP_UNINDEXED;
  					}
  					art_close ();
  					space_mode = TRUE;
--- 377,388 ----
  					for (n = 0; n < top; n++) {
  						arts[n].unread = ART_READ;
  					}
! 					ret_code = (ch == 'C' ? -4 : -1);
  					fix_new_highest (cur_groupnum);
  					if (cur_groupnum + 1 < group_top) {
  						cur_groupnum++;
  					} else {
! 						ret_code = -1;
  					}
  					art_close ();
  					space_mode = TRUE;
***************
*** 530,536 ****
  				break;
  
  			case 'Q':	/* quit */
! 				return GRP_QUIT;
  	
  			case 'r':	/* reply to author through mail */
  			case 'R':
--- 530,536 ----
  				break;
  
  			case 'Q':	/* quit */
! 				return -2;
  	
  			case 'r':	/* reply to author through mail */
  			case 'R':

--
cliftonr@netcom.com     Home: +1 808 521 9073  Work: +1 808 625 3234
Clifton Royston, Pope of the Church of the Subgenius in Paradise
"Well now I don't know about that.  I'm a skeptic." -- John_-_Winston
Technical Details
Message-ID: <cliftonrC7rzrx.3uK@netcom.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!usc!elroy.jpl.nasa.gov!decwrl!netcomsv!netcom.com!cliftonr
References: <1993May25.071802.10899@anl433.uucp> <cliftonrC7pLz3.B1r@netcom.com> <1993May29.003007.17543@monu6.cc.monash.edu.au>

Show Full Headers
Complete Article Headers
Message-ID: <cliftonrC7rzrx.3uK@netcom.com>
Subject: Re: Tin v1.2 PL0 newsreader Bug List
Date: Sat, 29 May 1993 06:38:21 GMT
From: cliftonr@netcom.com (Pope Clifton)
References: <1993May25.071802.10899@anl433.uucp> <cliftonrC7pLz3.B1r@netcom.com> <1993May29.003007.17543@monu6.cc.monash.edu.au>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!usc!elroy.jpl.nasa.gov!decwrl!netcomsv!netcom.com!cliftonr
Newsgroups: news.software.readers
Organization: Inst. for Epistemological Pathology
X-Newsreader: TIN [version 1.2 PL0]
Lines: 412