🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
5 messages
5 total messages Started by Curly++ Sun, 02 Apr 2000 00:00
[slrn] [suggestion] kill for N days
#59987
Author: Curly++
Date: Sun, 02 Apr 2000 00:00
21 lines
1564 bytes
AFAIK this is not already implemented.  I'd be delighted if 
someone showed how I was wrong!

When I 'K'ill a message, usually to mark the subject as 
interesting for the next month or two, I have to enter the 
duration by figuring out the termination date.  I know I want 
to keep the entry in my killfile for about 40 days.  Enough time 
for the thread to run it's course and then time out on my 
server. 
 
Why not let me enter something like "+40" instead of "10/5/2000"?
It's not the keystrokes, it's all the converting back and forth. 
Software can do that stuff better than wetware. 


-- 
Oisin  "Curly++"  Curtin                     ocurtin@SPAM.usa.net
Surface Liaison, Minetown Digger                    Send no SPAM.
                                http://pages.infinit.net/curlypp/

Re: [slrn] [suggestion] kill for N days -> Slrn WishList
#60078
Author: Sven Guckes
Date: Mon, 03 Apr 2000 00:00
19 lines
1533 bytes
* Curly++ <ocurtin@NOSPAM.usa.net>:
> When I 'K'ill a message, usually to mark the subject as interesting
> for the next month or two, I have to enter the duration by figuring
> out the termination date.  I know I want to keep the entry in my
> killfile for about 40 days. [...] Why not let me enter something
> like "+40" instead of "10/5/2000"?
> It's not the keystrokes, it's all the converting back and forth.

Your wish has been on the wishlist since July 1996.  ;-)

Sven  [who once used NN which had this feature]

-- 
Sven Guckes    guckes-slrn@math.fu-berlin.de
SLRN WishList: http://www.slrn.org/wish.html
SLRN WishList: http://www.math.fu-berlin.de/~guckes/slrn/wish.html
SLRN WishList: Please check before posting on news.software.readers!

Re: [slrn] [suggestion] kill for N days -> Slrn WishList
#60090
Author: phg... Philipp Grau
Date: Mon, 03 Apr 2000 00:00
72 lines
3077 bytes
On 3 Apr 2000 10:57:56 GMT, Sven Guckes wrote:
>* Curly++ <ocu...@NOSPAM.usa.net>:
>> When I 'K'ill a message, usually to mark the subject as interesting
>> for the next month or two, I have to enter the duration by figuring
>> out the termination date.  I know I want to keep the entry in my
>> killfile for about 40 days. [...] Why not let me enter something
>> like "+40" instead of "10/5/2000"?
>> It's not the keystrokes, it's all the converting back and forth.
>
>Your wish has been on the wishlist since July 1996.  ;-)

Here is a small patch that works for me, the usual disclaimers
apply... Did not check for mktime on non-Irix systems.

#v+
--- editscore.c.org	Thu Dec 23 18:24:44 1999
+++ editscore.c	Mon Apr  3 16:41:38 2000
@@ -48,6 +48,7 @@
    char file[256];
    char qregexp[512];
    unsigned int mm = 0, dd = 0, yy = 0;
+   int days = 0;
    int use_expired = 0;
    unsigned int linenum = 0;
    char *q, *ng = newsgroup;
@@ -80,10 +81,29 @@
 	while (1)
 	  {
 	     *qregexp = 0;
-	     if (-1 == slrn_read_input ("Expires (MM/DD/YYYY or DD-MM-YYYY or leave blank)", NULL, qregexp, 1, 0))
+	     if (-1 == slrn_read_input ("Expires (MM/DD/YYYY, DD-MM-YYYY, +NN (days)  or leave blank)", NULL, qregexp, 1, 0))
 	       return -1;
 	     if (*qregexp)
 	       {
+		  if (1 == sscanf(qregexp, "+%d",&days)) {
+		     if (days < 1) {
+		       continue;
+		     } else {
+			struct tm *mytime,*newtime;
+			time_t newclock;
+			myclock = time((time_t *) 0); 
+			mytime = localtime(&myclock);
+			mytime->tm_hour = mytime->tm_hour + (24 * days);
+			newclock = mktime(mytime);
+			newtime = localtime(&newclock);
+			dd = newtime->tm_mday;
+			mm = newtime->tm_mon + 1;
+			yy = newtime->tm_year + 1900;
+			use_expired = 1;
+			break;
+		     }
+		  }
+		  
 		  if (((3 != sscanf (qregexp, "%u/%u/%u", &mm, &dd, &yy))
 		       && (3 != sscanf (qregexp, "%u-%u-%u", &dd, &mm, &yy)))
 		      || (dd > 31)

#v-

Give it a try and let me know if something goes wrong.

\bye
Philipp


-- 
 Philipp Grau               | Freie Universitaet Berlin 
 phg...@zedat.fu-berlin.de  | Zentraleinrichtung fuer Datenverarbeitung
                            |
    We had joy, we had fun, | we had Pacman on the sun...      
Re: [slrn] [suggestion] kill for N days -> Slrn WishList
#60112
Author: ocu... Curly
Date: Tue, 04 Apr 2000 00:00
34 lines
1950 bytes
In news.software.readers, Philipp Grau proclaimed:
> On 3 Apr 2000 10:57:56 GMT, Sven Guckes wrote:
> >* Curly++ <ocu...@NOSPAM.usa.net>:

> >> like "+40" instead of "10/5/2000"?

> >Your wish has been on the wishlist since July 1996.  ;-)

Hmm.  I wish it came off there.  :-/
 
> Here is a small patch that works for me, the usual disclaimers
> apply... Did not check for mktime on non-Irix systems.

Thanks for the patch.  If I ever get around to compiling my own 
copy of slrn... 

FYI, mktime is quite portable.  Some research done on the 
leafnode list in the last few days dug it up on every *nix anyone
looked at. 

> Give it a try and let me know if something goes wrong.

If I could get time in function 
the first thing that I'd want to do 
is build ever app on my Linux 
until Microsoft passes away. 


-- 
Oisin  "Curly++"  Curtin                     ocu...@SPAM.usa.net
Surface Liaison, Minetown Digger                    Send no SPAM.
                                http://pages.infinit.net/curlypp/
Re: [slrn] [suggestion] kill for N days -> Slrn WishList
#60142
Author: William McBrine
Date: Tue, 04 Apr 2000 00:00
12 lines
1276 bytes
On Tue, 4 Apr 2000 01:25:44 -0400, Curly++ wrote:

> FYI, mktime is quite portable.  Some research done on the leafnode list
> in the last few days dug it up on every *nix anyone looked at.

mktime() is part of the ANSI C standard, so it's even a lot more portable
than that. :-)

-- 
The value of a program is proportional to the weight of its output.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads