🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #66260

Re: slrn default score

#66260
From: Matthias Friedrich
Date: Tue, 03 Oct 2000 00:00
101 lines
4232 bytes
Jens Wahnes <jewa@gmx.net> wrote:
[...]
> AFAICS, other than using a macro that puts in another value (one could
> probably use <http://slrn.sourceforge.net/macros/onekey-score.sl> for
> this), there ist only one way to accomplish that: change the value of
> -9999 to 10 at line 72 of editscore.c and recompile.

Or use a simple patch and set 'default_score' to 10 in ~/.slrnrc:

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
diff -cr slrn-0.9.6.3/src/editscore.c slrn-0.9.6.3_defscore/src/editscore.c
*** slrn-0.9.6.3/src/editscore.c	Mon Sep 18 00:35:31 2000
--- slrn-0.9.6.3_defscore/src/editscore.c	Tue Oct  3 09:15:50 2000
***************
*** 39,44 ****
--- 39,45 ----
  #include "score.h"
  #include "util.h"
  
+ int Slrn_Default_Score = -9999;
  
  /* Returns 0 if score file not modified, -1 if error, or 1 if scores modified. */
  int slrn_edit_score (Slrn_Header_Type *h, char *newsgroup)
***************
*** 51,57 ****
     int use_expired = 0;
     unsigned int linenum = 0;
     char *q, *ng = newsgroup;
-    int score;
     FILE *fp;
     time_t myclock;
     int file_modified = 0;
--- 52,57 ----
***************
*** 69,78 ****
  	ch |= 0x20;
  	if (ch == 'c') return -1;
     
! 	score = -9999;
! 	if (-1 == slrn_read_integer ("Score", &score, &score))
  	  return -1;
! 	if (score == 0) return -1;
  	
  	if ('a' == (0x20 | slrn_get_response ("TtaA", "Which newsgroups: \001This group, \001All groups")))
  	  ng = "*";
--- 69,77 ----
  	ch |= 0x20;
  	if (ch == 'c') return -1;
     
! 	if (-1 == slrn_read_integer ("Score", &Slrn_Default_Score, &Slrn_Default_Score))
  	  return -1;
! 	if (Slrn_Default_Score == 0) return -1;
  	
  	if ('a' == (0x20 | slrn_get_response ("TtaA", "Which newsgroups: \001This group, \001All groups")))
  	  ng = "*";
***************
*** 118,124 ****
  	
  	myclock = time((time_t *) 0);
  	fprintf (fp, "\n%%Score created by slrn on %s\n[%s]\nScore: %d\n",
! 		 (char *) ctime(&myclock), ng, score);
  	
  	if (use_expired)
  	  fprintf (fp, "Expires: %u/%u/%u\n", mm, dd, yy);
--- 117,123 ----
  	
  	myclock = time((time_t *) 0);
  	fprintf (fp, "\n%%Score created by slrn on %s\n[%s]\nScore: %d\n",
! 		 (char *) ctime(&myclock), ng, Slrn_Default_Score);
  	
  	if (use_expired)
  	  fprintf (fp, "Expires: %u/%u/%u\n", mm, dd, yy);
diff -cr slrn-0.9.6.3/src/score.h slrn-0.9.6.3_defscore/src/score.h
*** slrn-0.9.6.3/src/score.h	Mon Sep 18 00:35:26 2000
--- slrn-0.9.6.3_defscore/src/score.h	Tue Oct  3 09:15:50 2000
***************
*** 25,27 ****
--- 25,28 ----
  #define SLRN_XOVER_SCORING 1
  #define SLRN_EXPENSIVE_SCORING 2
  extern int Slrn_Perform_Scoring;
+ extern int Slrn_Default_Score;
diff -cr slrn-0.9.6.3/src/startup.c slrn-0.9.6.3_defscore/src/startup.c
*** slrn-0.9.6.3/src/startup.c	Mon Sep 18 00:35:29 2000
--- slrn-0.9.6.3_defscore/src/startup.c	Tue Oct  3 09:15:50 2000
***************
*** 388,393 ****
--- 388,394 ----
       {"min_high_score", &Slrn_High_Score_Min},
       {"max_low_score", &Slrn_Low_Score_Max},
       {"kill_score", &Slrn_Kill_Score_Max},
+      {"default_score", &Slrn_Default_Score},
       {"followup_strip_signature", &Slrn_Followup_Strip_Sig},
  #if !defined(IBMPC_SYSTEM)
       {"use_blink", &SLtt_Blink_Mode},
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

HTH,
    Matthias

Technical Details
Message-ID: <8rc3m2$3i0$1@endeavour.mafr.de>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
References: <slrn8tfjag.1co.ajlewis2@sidekick.com> <slrn8tg7eh.2eb.no_spam_here@middle.of.nowhere> <slrn8tgc4n.shj.jewa@message-id.wahnes-world.de>

Show Full Headers
Complete Article Headers
Message-ID: <8rc3m2$3i0$1@endeavour.mafr.de>
Subject: Re: slrn default score
Date: Tue, 03 Oct 2000 00:00:00 +0000
From: Matthias Friedrich <mafr@topmail.de>
References: <slrn8tfjag.1co.ajlewis2@sidekick.com> <slrn8tg7eh.2eb.no_spam_here@middle.of.nowhere> <slrn8tgc4n.shj.jewa@message-id.wahnes-world.de>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
X-Deja-AN: 676951882
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset=iso-8859-1
X-Trace: fu-berlin.de 970560422 18327283 213.21.11.65 (16 [47474])
Organization: Chaos Inc.
Mime-Version: 1.0
Newsgroups: news.software.readers