Urs Janßen | 1 Oct 2004 16:24

Re: make HAVE_FASCIST_NEWSADMIN runtime option

> Now : Is there a reason HAVE_FASCIST_NEWSADMIN is a compile time option?

HAVE_FASCIST_NEWSADMIN cuts down some features which is usualy
something users won't do on thier own (but systemadministrators like
to do for thier users) so IMHO it doesn't make sense to allow users
to (un)do this themself. if they like to restrict themself they can
always do so by not using the advanced rights they have without
HAVE_FASCIST_NEWSADMIN.

> Will a patch to make it a runtime option be acceptable?

I don't think so.

> If so, besides changing the code, what else needs to be done for this
> (documentation, manpage, ... ?)

doc/INSTALL and tin.{1,5} should be updated accordingly.

> Please cc me, as I am not a subscriber to tin-dev!

that's why you mail didn't make it to tin-dev - the list is
restricted to subscribers only (to avoid beeing spammed).

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

Michael Bienia | 1 Oct 2004 21:28
Picon
Picon

[PATCH] Enable line-scrolling in {SELECT,GROUP,THREAD}_LEVEL

Hello,

the attached patch enables line-scrolling in
{SELECT,GROUP,THREAD}_LEVEL.

Changes:
* enable line-scrolling
* add a missing call to set_last_option_on_screen() in options_menu.c
* some small clean up

Michael
Attachment (patch-20041001.diff.bz2): application/octet-stream, 5496 bytes
Urs Janßen | 2 Oct 2004 11:29

Re: [PATCH] Enable line-scrolling in {SELECT,GROUP,THREAD}_LEVEL

On Fri, Oct 01, 2004 at 09:28:11PM +0200, Michael Bienia wrote:
> Hello,
> 
> the attached patch enables line-scrolling in
> {SELECT,GROUP,THREAD}_LEVEL.
> 
> Changes:
> * enable line-scrolling
> * add a missing call to set_last_option_on_screen() in options_menu.c
> * some small clean up

there is a unneccessarry behaviour change (which IMHO is a bug):
if the contents fits on one page (checked for select-, group-
and thread-level) hitting space doesn't toggle between putting the
cursor to the last/first item anymore. the cursor is now always set
to the first item.

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

Michael Bienia | 2 Oct 2004 15:37
Picon
Picon

Re: [PATCH] Enable line-scrolling in {SELECT,GROUP,THREAD}_LEVEL

On 2004-10-02 11:29:08 +0200, Urs Janßen wrote:
> there is a unneccessarry behaviour change (which IMHO is a bug):
> if the contents fits on one page (checked for select-, group-
> and thread-level) hitting space doesn't toggle between putting the
> cursor to the last/first item anymore. the cursor is now always set
> to the first item.

The attached patch should fix it (also for the options menu).

Michael
 global.c       |   40 +++++++++++++++++++++++++---------------
 options_menu.c |   41 +++++++++++++++++++++++++++++------------
 2 files changed, 54 insertions(+), 27 deletions(-)
diff -Nurp tin-1.7.7/src/global.c tin-1.7.7.work/src/global.c
--- tin-1.7.7/src/global.c	2004-10-02 14:22:05.636281709 +0200
+++ tin-1.7.7.work/src/global.c	2004-10-02 14:18:18.950184918 +0200
 <at>  <at>  -135,16 +135,17  <at>  <at>  page_up(

 	if (currmenu->curr == currmenu->first) {
 		scroll_lines = (tinrc.scroll_lines == -2) ? NOTESLINES / 2 : NOTESLINES;
-		if (currmenu->first > 0)
-			currmenu->first -= scroll_lines;
-		else
-			currmenu->first = currmenu->max - scroll_lines ;
-
-		if (currmenu->first < 0)
-			currmenu->first = 0;
-	}
(Continue reading)

Urs Janßen | 2 Oct 2004 23:37

Re: [PATCH] Enable line-scrolling in {SELECT,GROUP,THREAD}_LEVEL

On Sat, Oct 02, 2004 at 03:37:13PM +0200, Michael Bienia wrote:
> The attached patch should fix it (also for the options menu).

it does, now I've spoted another problem: in the thread starting with
<2rk7lbF1a2bn3U1 <at> uni-berlin.de> in de.admin.net-abuse.news if have
read all articles except
<415ea2dd$0$3627$9b4e6d93 <at> newsread2.arcor-online.net>. I use
thread_articles=3 ; sort_threads_type=1 ; sort_article_type=6
when I enter the thread-level I see:

|                              List Thread (2 of 2)                     h=help
|
|->  16   o  [  28]  `->                           Frank Kloeker <eumel <at> gno.de

instead of:

|                              List Thread (2 of 2)                     h=help
|
|     1      [  19]  Netzmissbrauch durch Call-by  Reinhard Hausschild <Reinha
|     2      [  17]  +->                           Lars P. Wolschner <lars.wol
|     3      [  28]  | `->                         Reinhard Hausschild <Reinha
|     4      [  39]  |   +->                       Lars P. Wolschner <lars.wol
|     5      [  16]  |   `->                       Thomas Hochstein <thh <at> inter
|     6      [  10]  |     `->                     Florian Weimer <fw <at> deneb.en
|     7      [  13]  +->                           Wolfgang Jäth <jawo.usenet.
|     8      [  10]  +->                           Florian Weimer <fw <at> deneb.en
|     9      [   8]  | `->                         Turan Fettahoglu <Turan.Fe <at> 
|    10      [   9]  |   +->                       Florian Weimer <fw <at> deneb.en
|    11      [  21]  |   | `->                     Thomas Gohel <gohel <at> basicgu
|    12      [  16]  |   `->                       Dietmar Hoelscher <dietmar <at> 
(Continue reading)

Michael Bienia | 3 Oct 2004 01:08
Picon
Picon

Re: [PATCH] Enable line-scrolling in {SELECT,GROUP,THREAD}_LEVEL

On 2004-10-02 23:37:02 +0200, Urs Janßen wrote:
> On Sat, Oct 02, 2004 at 03:37:13PM +0200, Michael Bienia wrote:
> > The attached patch should fix it (also for the options menu).
> 
> it does, now I've spoted another problem: in the thread starting with
> <2rk7lbF1a2bn3U1 <at> uni-berlin.de> in de.admin.net-abuse.news if have
> read all articles except
> <415ea2dd$0$3627$9b4e6d93 <at> newsread2.arcor-online.net>. I use
> thread_articles=3 ; sort_threads_type=1 ; sort_article_type=6
> when I enter the thread-level I see:
> 
> |                              List Thread (2 of 2)                     h=help
> |
> |->  16   o  [  28]  `->                           Frank Kloeker <eumel <at> gno.de

Try the attached patch, it should fix it.

Michael
--- tin-1.7.7/src/thread.c	2004-10-02 15:36:41.482756293 +0200
+++ tin-1.7.7.work/src/thread.c	2004-10-03 00:21:51.959444466 +0200
 <at>  <at>  -416,6 +416,8  <at>  <at>  thread_page(
 	 * or an explicit thread_depth has been specified
 	 */
 	thdmenu.curr = thdmenu.max;
+	/* reset the first item on screen to 0 */
+	thdmenu.first = 0;

 	if (thread_depth)
(Continue reading)

Urs Janßen | 3 Oct 2004 11:36

Re: [PATCH] Enable line-scrolling in {SELECT,GROUP,THREAD}_LEVEL

On Sun, Oct 03, 2004 at 01:28:28AM +0200, Urs Janßen wrote:
> here is the next problem, a unreprodiuceable crash:

happend again (different group and server):

#7  <signal handler called>
#8  0x0808971a in next_unread (n=172599) at thread.c:1208
#9  0x080601b4 in tab_pressed () at group.c:1549
#10 0x0805e02a in group_page (group=0x40634030) at group.c:301
#11 0x08084fa6 in read_groups () at select.c:1012
#12 0x08083c38 in selection_page (start_groupnum=135669184, 
    num_cmd_line_groups=0) at select.c:216
#13 0x08064ad3 in main (argc=3, argv=0x0) at main.c:391
#9  0x080601b4 in tab_pressed () at group.c:1549
1549            if ((n = ((grpmenu.curr < 0) ? -1 : next_unread((int)
base[grpmenu.curr]))) < 0)
(gdb) print grpmenu.curr
$1 = 0
(gdb) print base[grpmenu.curr]
$2 = 172599
(gdb) frame 8
#8  0x0808971a in next_unread (n=172599) at thread.c:1208
1208                    if (((arts[n].status == ART_UNREAD) ||
(arts[n].status == ART_WILL_RETURN)) && arts[n].thread !=
ART_EXPIRED)
(gdb) print arts[n].status 
Cannot access memory at address 0x411f76a4

urs
--

-- 
(Continue reading)

Michael Bienia | 3 Oct 2004 16:27
Picon
Picon

Re: [PATCH] Enable line-scrolling in {SELECT,GROUP,THREAD}_LEVEL

On 2004-10-03 11:36:29 +0200, Urs Janßen wrote:
> On Sun, Oct 03, 2004 at 01:28:28AM +0200, Urs Janßen wrote:
> > here is the next problem, a unreprodiuceable crash:
> 
> happend again (different group and server):
> 
[...]
> (gdb) print grpmenu.curr
> $1 = 0
> (gdb) print base[grpmenu.curr]
> $2 = 172599
> (gdb) frame 8
> #8  0x0808971a in next_unread (n=172599) at thread.c:1208
> 1208                    if (((arts[n].status == ART_UNREAD) ||
> (arts[n].status == ART_WILL_RETURN)) && arts[n].thread !=
> ART_EXPIRED)
> (gdb) print arts[n].status 
> Cannot access memory at address 0x411f76a4

After a first look on the backtraces I don't see a connection with the
line-scrolling patches. 0 should be a valid value for grpmenu.curr.
The question is why isn't base[0] pointing to a valid art?

Michael

Urs Janßen | 3 Oct 2004 22:22

Re: [PATCH] Enable line-scrolling in {SELECT,GROUP,THREAD}_LEVEL

On Sun, Oct 03, 2004 at 04:27:44PM +0200, Michael Bienia wrote:
> [...]
> > (gdb) print grpmenu.curr
> > $1 = 0
> > (gdb) print base[grpmenu.curr]
> > $2 = 172599
> > (gdb) frame 8
> > #8  0x0808971a in next_unread (n=172599) at thread.c:1208
> > 1208                    if (((arts[n].status == ART_UNREAD) ||
> > (arts[n].status == ART_WILL_RETURN)) && arts[n].thread !=
> > ART_EXPIRED)
> > (gdb) print arts[n].status 
> > Cannot access memory at address 0x411f76a4
> 
> After a first look on the backtraces I don't see a connection with the
> line-scrolling patches.

I also can't see a connection, but the crash happen ~5 times in the
last 24h with a patched version whereas I havn't had any crashes with
tin in the last few month before, so it's very likely that the
problem is related to the patches.

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

Urs Janßen | 4 Oct 2004 10:33

Re: [PATCH] Enable line-scrolling in {SELECT,GROUP,THREAD}_LEVEL

On Sun, Oct 03, 2004 at 04:27:44PM +0200, Michael Bienia wrote:
> After a first look on the backtraces I don't see a connection with the
> line-scrolling patches. 0 should be a valid value for grpmenu.curr.
> The question is why isn't base[0] pointing to a valid art?

currently the patched version crashes at on newsgroup (might change
when the next article arrives) whereas the unpatched snapshop
doesn't. I noticed that the patched version gives me a lot of
txt_cannot_find_base_art warnings (about every second group), but when
looking at the diff (I can make the patched version & diff available if
anyone is intereested) I can't see anything obvious.

(gdb) bt
#8  0x0808971a in next_unread (n=58385) at thread.c:1208
#9  0x080601b4 in tab_pressed () at group.c:1549
#10 0x0805e02a in group_page (group=0x8141fb8) at group.c:301
#11 0x08084fa6 in read_groups () at select.c:1012
#12 0x08083c38 in selection_page (start_groupnum=135750792, 
    num_cmd_line_groups=0) at select.c:216
#13 0x08064ad3 in main (argc=1, argv=0x0) at main.c:391
(gdb) frame 11
#11 0x08084fa6 in read_groups () at select.c:1012
1012                    switch (group_page(&CURR_GROUP)) {
(gdb) print active[my_group[selmenu.curr]]
$2 = {name = 0x81ba6d8 "de.admin.net-abuse.news", aliasedto = 0x0, 
  description = 0x820e828 "Fehlverhalten im Usenet.", spooldir = 0x8128340 "", 
  moderated = 121 'y', count = -1, xmax = 58968, xmin = 58385, type = 1, 
  inrange = 0, read_during_session = 1, art_was_posted = 0, subscribed = 1, 
  newgroup = 0, bogus = 0, next = 897, newsrc = {present = 1, num_unread = 0, 
    xmax = 58968, xmin = 58384, xbitlen = 585, xbitmap = 0x82778b8 ""}, 
(Continue reading)


Gmane