Article View: demon.ip.developers
Article #1040Re: Wishlist addition for Snews
From: Graham E Kinns
Date: Wed, 08 May 1996 00:00
Date: Wed, 08 May 1996 00:00
59 lines
2218 bytes
2218 bytes
Brian {Hamilton Kelly} <bhk@dsl.co.uk> wrote:
>Could Snews be changed to recognize "Re:" at the beginning of the subject
>line, with or without a following space. It should continue to
>*generate* the trailing space, of course.
This has bugged me before but I could never find a broken article in
my newsbase when I looked for one ... anyway I've found a couple to
test it on, neat little diff below for eat_gunk() in snews.c - the
line numbers are against my minor mods, not the v1.30 source.
This should still work with headers such as
Subject: new subject (was Re: old subject)
or
Subject: new subject (was Re:old subject)
and still cope with Re: Re: etc.
Note this only fixes the threading and doesn't fix following up such
articles; ends up with Re: RE:broken subject ... ( post_header() in
post.c is responsible )
Cheers, Graham.
---------------
*** snews.bak Wed Apr 10 11:52:14 1996
--- snews.c Wed May 08 23:46:06 1996
***************
*** 2616,2630 ****
while (p != NULL) {
! if (stricmp(p, "Re:") != 0) {
strcat(buf, p);
strcat(buf, " ");
}
! else {
! if (strlen(buf) > 0) {
! strcat(buf, p);
! strcat(buf, " ");
! }
}
p = strtok(NULL, " \t\n\r");
}
--- 2616,2629 ----
while (p != NULL) {
! if (strlen(buf) > 0 || strnicmp(p, "Re:", 3) != 0) {
strcat(buf, p);
strcat(buf, " ");
}
! else if (*(p+3) != '\0') {
! /* GeK - something following Re: - can't be space or \t since strtok got 'em */
! strcpy(buf, p+3);
! strcat(buf, " ");
}
p = strtok(NULL, " \t\n\r");
}
--
----[ Graham E. Kinns ]----==========----< Graham@grempc.demon.co.uk >----
Technical Details
Message-ID:
<831596356snz.4318@grempc.demon.co.uk>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<831560092snz@dsl.co.uk>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10bb05,a371e3780a42003b X-Google-Attributes: gid10bb05,public From: Graham E Kinns <Graham@grempc.demon.co.uk> Subject: Re: Wishlist addition for Snews Date: 1996/05/08 Message-ID: <831596356snz.4318@grempc.demon.co.uk> X-Deja-AN: 154279296 x-mail2news-path: grempc.demon.co.uk x-nntp-posting-host: grempc.demon.co.uk references: <831560092snz@dsl.co.uk> organization: Home, N Yorks, UK newsgroups: demon.ip.developers