3 Nov 2010 14:57
6 Nov 2010 13:52
[PATCH] small fix for save.c:show_attachment_page()
Dennis Preiser <onkelp <at> gmx.de>
2010-11-06 12:52:27 GMT
2010-11-06 12:52:27 GMT
In save.c:show_attachment_page() we determine the largest
content-type/encoding... -part of all attachments (info_len). The
current loop starts at attmenu.first (first line/attachment on screen)
which is wrong. The loop has to start at 0 to consider all attachments,
otherwise the screen layout may change during scrolling.
Dennis
diff -urp tin-1.9.6/src/save.c tin-1.9.6_r1/src/save.c
--- tin-1.9.6/src/save.c 2010-10-29 17:17:43.000000000 +0200
+++ tin-1.9.6_r1/src/save.c 2010-11-06 13:27:26.000000000 +0100
<at> <at> -1524,7 +1524,7 <at> <at> show_attachment_page(
attmenu.curr = 0;
info_len = max_depth = 0;
- for (i = attmenu.first; i < attmenu.max; ++i) {
+ for (i = 0; i < attmenu.max; ++i) {
part = get_part(i);
snprintf(buf, sizeof(buf), _(txt_attachment_lines), part->line_count);
tmp_len = strwidth(buf);
13 Nov 2010 10:16
col_inverse_bg=0 && col_inverse_fg=7
Dennis Preiser <onkelp <at> gmx.de>
2010-11-13 09:16:07 GMT
2010-11-13 09:16:07 GMT
While playing with colors I found the following issue which happens in
the USE_CURSES && HAVE_USE_DEFAULT_COLORS case:
It's not possible to set col_inverse_bg=0 (black) and col_inverse_fg=7
(white). tin uses the (terminal) default fg an bg colors instead and
thus the inverse bar gets 'invisible'. Steps to reproduce:
open 'xterm -fg yellow -bg blue', start tin
'M'enu
Draw -> instead of highlighted bar : OFF
Use inverse video for page headers : ON
Standard foreground color : Default
Standard background color : Default
Color for inverse text (foreground) : White
Color for inverse text (background) : Black
-> the inverse bar is 'invisible'.
What happens: During startup use_default_colors() (in
tcurses.c:InitScreen()) assign terminals fg and bg to color pair 0.
Later on, color.c:set_colors() checks if the given fcolor and bcolor
matches COLOR_WHITE and COLOR_BLACK. If so, color pair 0 is used.
Unfortunately, for HAVE_USE_DEFAULT_COLORS, color pair 0 may hold other
color informations. For col_inverse_bg=0 && col_inverse_fg=7 this
results in an inverse bar with standard fg/bg -> the bar is 'invisible'.
The following fixes this for me, alas I'm not an curses expert so I
might be wrong:
diff -urp tin-1.9.6/src/color.c tin-1.9.6_r2/src/color.c
(Continue reading)
13 Nov 2010 13:48
Re: col_inverse_bg=0 && col_inverse_fg=7
Thomas Dickey <dickey <at> his.com>
2010-11-13 12:48:02 GMT
2010-11-13 12:48:02 GMT
On Sat, 13 Nov 2010, Dennis Preiser wrote: > While playing with colors I found the following issue which happens in > the USE_CURSES && HAVE_USE_DEFAULT_COLORS case: > > It's not possible to set col_inverse_bg=0 (black) and col_inverse_fg=7 > (white). tin uses the (terminal) default fg an bg colors instead and > thus the inverse bar gets 'invisible'. Steps to reproduce: > > open 'xterm -fg yellow -bg blue', start tin > 'M'enu > Draw -> instead of highlighted bar : OFF > Use inverse video for page headers : ON > Standard foreground color : Default > Standard background color : Default > Color for inverse text (foreground) : White > Color for inverse text (background) : Black > > -> the inverse bar is 'invisible'. > > What happens: During startup use_default_colors() (in > tcurses.c:InitScreen()) assign terminals fg and bg to color pair 0. > Later on, color.c:set_colors() checks if the given fcolor and bcolor > matches COLOR_WHITE and COLOR_BLACK. If so, color pair 0 is used. > Unfortunately, for HAVE_USE_DEFAULT_COLORS, color pair 0 may hold other > color informations. For col_inverse_bg=0 && col_inverse_fg=7 this > results in an inverse bar with standard fg/bg -> the bar is 'invisible'. > > The following fixes this for me, alas I'm not an curses expert so I > might be wrong:(Continue reading)
13 Nov 2010 14:29
Re: col_inverse_bg=0 && col_inverse_fg=7
Dennis Preiser <onkelp <at> gmx.de>
2010-11-13 13:29:35 GMT
2010-11-13 13:29:35 GMT
On Sat, Nov 13, 2010 at 07:48:02AM -0500, Thomas Dickey wrote:
> On Sat, 13 Nov 2010, Dennis Preiser wrote:
>>diff -urp tin-1.9.6/src/color.c tin-1.9.6_r2/src/color.c
>>--- tin-1.9.6/src/color.c 2010-05-07 16:00:53.000000000 +0200
>>+++ tin-1.9.6_r2/src/color.c 2010-11-12 18:01:32.000000000 +0100
>> <at> <at> -110,8 +110,12 <at> <at> set_colors(
>> if (bcolor > 0)
>> bcolor %= COLORS;
>>
>>+# ifdef HAVE_USE_DEFAULT_COLORS
>>+ if (fcolor != default_fcol || bcolor != default_bcol) {
>>+# else
>> /* curses assumes white/black */
>> if (fcolor != COLOR_WHITE || bcolor != COLOR_BLACK) {
>>+# endif /* HAVE_USE_DEFAULT_COLORS */
>> struct LIST *p;
>> t_bool found = FALSE;
>>
>>default_fcol and default_bcol are either white/black or, if
>>use_default_colors() succeeds, -1/-1 (default colors from terminal).
>
> something like that (I'd be inclined to fold the two if-lines together
> by defining DEFAULT_FCOL and DEFAULT_BCOL somewhere, and using those
> for cases like this).
Thanks. Initially, default_fcol is 7 and default_bcol is 0. This changes
to -1/-1 only when use_default_colors() succeeds. So the diff shrinks
to:
diff -urp tin-1.9.6/src/color.c tin-1.9.6_r2/src/color.c
(Continue reading)
13 Nov 2010 14:30
Re: col_inverse_bg=0 && col_inverse_fg=7
Thomas Dickey <dickey <at> his.com>
2010-11-13 13:30:04 GMT
2010-11-13 13:30:04 GMT
On Sat, 13 Nov 2010, Dennis Preiser wrote:
> On Sat, Nov 13, 2010 at 07:48:02AM -0500, Thomas Dickey wrote:
>> On Sat, 13 Nov 2010, Dennis Preiser wrote:
>>> diff -urp tin-1.9.6/src/color.c tin-1.9.6_r2/src/color.c
>>> --- tin-1.9.6/src/color.c 2010-05-07 16:00:53.000000000 +0200
>>> +++ tin-1.9.6_r2/src/color.c 2010-11-12 18:01:32.000000000 +0100
>>> <at> <at> -110,8 +110,12 <at> <at> set_colors(
>>> if (bcolor > 0)
>>> bcolor %= COLORS;
>>>
>>> +# ifdef HAVE_USE_DEFAULT_COLORS
>>> + if (fcolor != default_fcol || bcolor != default_bcol) {
>>> +# else
>>> /* curses assumes white/black */
>>> if (fcolor != COLOR_WHITE || bcolor != COLOR_BLACK) {
>>> +# endif /* HAVE_USE_DEFAULT_COLORS */
>>> struct LIST *p;
>>> t_bool found = FALSE;
>>>
>>> default_fcol and default_bcol are either white/black or, if
>>> use_default_colors() succeeds, -1/-1 (default colors from terminal).
>>
>> something like that (I'd be inclined to fold the two if-lines together
>> by defining DEFAULT_FCOL and DEFAULT_BCOL somewhere, and using those
>> for cases like this).
>
> Thanks. Initially, default_fcol is 7 and default_bcol is 0. This changes
> to -1/-1 only when use_default_colors() succeeds. So the diff shrinks
> to:
(Continue reading)
14 Nov 2010 19:38
[PATCH] fix some (hypothetic) null pointer dereference
Urs Janßen <urs <at> tin.org>
2010-11-14 18:38:04 GMT
2010-11-14 18:38:04 GMT
--- src/cook.c 2010-10-03 10:58:09 +0000
+++ src/cook.c 2010-11-14 10:53:47 +0000
<at> <at> -455,7 +455,7 <at> <at>
if (max_line_len < strlen(buf) + 2) {
max_line_len = strlen(buf) + 2;
line = my_realloc(line, max_line_len);
- };
+ }
strcpy(line, buf);
/*
--- src/filter.c 2010-09-08 21:25:42 +0000
+++ src/filter.c 2010-11-12 23:41:57 +0000
<at> <at> -517,11 +517,11 <at> <at>
FreeIfNeeded(ptr[i].subj);
ptr[i].subj = my_strdup(subj);
}
- }
#ifdef DEBUG
- if (debug & DEBUG_FILTER)
- debug_print_file("FILTER","buf=[%s] Gsubj=[%s]", ptr[i].subj, glob_filter.filter[i].subj);
+ if (debug & DEBUG_FILTER)
+ debug_print_file("FILTER","buf=[%s] Gsubj=[%s]", ptr[i].subj, glob_filter.filter[i].subj);
#endif /* DEBUG */
+ }
break;
}
--- src/nntplib.c 2010-11-03 19:17:32 +0000
(Continue reading)
19 Nov 2010 16:13
doc/config-anomalies cleanup
Dennis Preiser <onkelp <at> gmx.de>
2010-11-19 15:13:43 GMT
2010-11-19 15:13:43 GMT
5 former tinrc variables can be removed and auto_cc + auto_bcc have been merged into auto_cc_bcc. Dennis --- tin-1.9.6/doc/config-anomalies 2010-03-19 23:35:49.000000000 +0100 +++ tin-1.9.6_r3/doc/config-anomalies 2010-11-19 16:01:04.000000000 +0100 <at> <at> -51,11 +51,6 <at> <at> prompt_followupto pos_first_unread show_only_unread_arts kill_level * -tab_goto_next_unread * -space_goto_next_unread * -pgdn_goto_next * -full_page_scroll * -show_last_line_prev_page * group_catchup_on_exit thread_catchup_on_exit thread_articles <at> <at> -88,8 +83,7 <at> <at> hide_uue * news_quote_format mail_quote_format * xpost_quote_format * -auto_cc -auto_bcc +auto_cc_bcc default_filter_days * getart_limit * recent_time *(Continue reading)
24 Nov 2010 18:42
questions about tin-1.5.6 to tin-1.5.7 misc.c:copy_body() change
Urs Janßen <urs <at> tin.org>
2010-11-24 17:42:40 GMT
2010-11-24 17:42:40 GMT
between tin 1.5.6 and tin 1.5.7 misc.c:copy_body() was changed -
does anyone remeber why? it may leed to wrong indented underlining
^^^^^^^^^^^^^^^^^^^^^^^^^^
--- tin-1.5.6/src/misc.c 2000-08-03 15:49:22.000000000 +0200
+++ tin-1.5.7/src/misc.c 2000-10-19 19:46:46.000000000 +0200
<at> <at> -174,6 +174,8 <at> <at>
* copy the body of articles with given file pointers,
* prefix (= quote_chars), initials of the articles author
* with_sig is set if the signature should be quoted
+ *
+ * TODO: rewrite from scratch, the code is awfull
*/
void
copy_body (
<at> <at> -244,10 +246,9 <at> <at>
} else /* line is empty */
retcode = fprintf (fp_op, "%s\n", (tinrc.quote_empty_lines ? prefixbuf : ""));
} else { /* no initials in quote_string, just copy */
- if ((buf[0] != '\n') || tinrc.quote_empty_lines) {
- /* use blank-stripped quote string if line is already quoted */
- retcode = fprintf (fp_op, "%s%s", ((buf[0] == '>') ? prefixbuf : prefix), buf);
- } else
+ if ((buf[0] != '\n') || tinrc.quote_empty_lines)
+ retcode = fprintf (fp_op, "%s%s", ((buf[0] == '>' || buf[0] == ' ') ? prefixbuf : prefix), buf); /* use
blank-stripped quote string if line is already quoted or beginns with a space */
+ else
retcode = fprintf (fp_op, "\n");
}
if (retcode == EOF) {
(Continue reading)
26 Nov 2010 16:40
[ANNOUNCE] tin 1.9.6 released
Urs Janßen <urs <at> tin.org>
2010-11-26 15:40:01 GMT
2010-11-26 15:40:01 GMT
I've just released tin 1.9.6 which is the last 1.x.er release. The
next release will be tin 2.0.0. It would be nice if someone could
look over the documentation and translation files, do some test
builds and code checking, ...
<ftp://ftp.tin.org/pub/news/clients/tin/v1.9/tin-1.9.6.tar.gz>
<ftp://ftp.tin.org/pub/news/clients/tin/v1.9/tin-1.9.6.tar.bz2>
<ftp://ftp.tin.org/pub/news/clients/tin/v1.9/tin-1.9.6.tar.lzma>
-- 1.9.6 release 20101126 "Burnside" --
U025) Matt Anton <tin <at> syrius.org>
ADD. updated french translation
FIX. fr.po
U024) Toomas Soome <Toomas.Soome <at> microlink.ee>
ADD. updated estonian translation
FIX. et.po
U023) Joe Hansen <joedalton2 <at> yahoo.dk>
ADD. updated danish translation
FIX. da.po
U022) Thomas E. Dickey <dickey <at> invisible-island.net>
BUG. _XOPEN_SOURCE was defined on darwin
ADD. CF_SIGWINCH - compile check for SIGWINCH
FIX. aclocal.m4, configure[.in], Makefile[.in]
U021) Dennis Preiser <onkelp <at> gmx.de>
BUG. SIGWINCH at page level after a connection timeout lead to a crash
(Continue reading)
RSS Feed