rpms/slrn/devel slrn-0.9.8.1-fetch.diff, NONE, 1.1 slrn-0.9.8.1-lastchar2.diff, NONE, 1.1 slrn.spec, 1.20, 1.21

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Wed Jul 27 10:38:31 UTC 2005


Author: jnovy

Update of /cvs/dist/rpms/slrn/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv1104

Modified Files:
	slrn.spec 
Added Files:
	slrn-0.9.8.1-fetch.diff slrn-0.9.8.1-lastchar2.diff 
Log Message:

- apply official bugfix patches (#164363)
  - fixes slrnpull problem with group containing no headers
  - fixes last character removal editor problem



slrn-0.9.8.1-fetch.diff:
 slrnpull.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

--- NEW FILE slrn-0.9.8.1-fetch.diff ---
--- slrn-0.9.8.1/src/slrnpull.c	2004-02-28 23:08:17.000000000 +0100
+++ slrn/src/slrnpull.c	2004-10-10 01:42:31.000000000 +0200
@@ -1647,7 +1647,7 @@
 	    || (((unsigned int)server_max <= gmax) && (gmin <= gmax)))
 	  {
 	     log_message (_("%s: no new articles available."), g->name);
-	     return 0;
+	     goto fetch_marked_bodies;
 	  }
 	
 	Num_Duplicates = 0;
@@ -1667,7 +1667,7 @@
 	     g->max = g->server_max;
 	     log_message (_("%s: No new articles available."), g->name);
 	     slrn_free ((char *) numbers);
-	     return 0;
+	     goto fetch_marked_bodies;
 	  }
 	
 	log_message (_("%s: %u articles available."), g->name, num_numbers - i);
@@ -1716,7 +1716,8 @@
      }
 
    /* Now, fetch marked article bodies. */
-   
+
+   fetch_marked_bodies:
    /* Don't request bodies that are no longer there. */
    if (server_min > 1)
      g->requests = slrn_ranges_remove (g->requests, 1, server_min-1);

slrn-0.9.8.1-lastchar2.diff:
 group.c    |    7 +++++--
 misc.c     |    7 +++++--
 post.c     |   22 +++++++++++++++++-----
 slrnpull.c |   10 ++++++++--
 spool.c    |   12 +++++++++---
 5 files changed, 44 insertions(+), 14 deletions(-)

--- NEW FILE slrn-0.9.8.1-lastchar2.diff ---
diff -ru slrn-0.9.8.1.orig/src/group.c slrn-0.9.8.1/src/group.c
--- slrn-0.9.8.1.orig/src/group.c	2004-08-15 23:09:31.000000000 +0200
+++ slrn-0.9.8.1/src/group.c	2004-11-05 23:01:51.391610936 +0100
@@ -3,7 +3,7 @@
  This file is part of SLRN.
 
  Copyright (c) 1994, 1999 John E. Davis <davis at space.mit.edu>
- Copyright (c) 2001-2003 Thomas Schultz <tststs at gmx.de>
+ Copyright (c) 2001-2004 Thomas Schultz <tststs at gmx.de>
 
  This program is free software; you can redistribute it and/or modify it
  under the terms of the GNU General Public License as published by the Free
@@ -2605,7 +2605,10 @@
 	if ((p == pmax) || (p == vline))
 	  continue;
      
-	vline[vlen-1] = 0;	       /* kill \n and NULL terminate */
+	if (vline[vlen-1] == '\n')
+	  vline[vlen-1] = 0;
+	else
+	  vline[vlen] = 0;
 
 	if (-1 == add_group (vline, (unsigned int) (p - vline),
 			     ((ch == '!') ? GROUP_UNSUBSCRIBED : 0), 0, 0))
diff -ru slrn-0.9.8.1.orig/src/misc.c slrn-0.9.8.1/src/misc.c
--- slrn-0.9.8.1.orig/src/misc.c	2004-09-27 23:30:35.000000000 +0200
+++ slrn-0.9.8.1/src/misc.c	2004-11-05 23:02:09.519855024 +0100
@@ -1165,8 +1165,11 @@
 	     if (vlen == 0) continue;
 	     
 	     line = slrn_safe_malloc (vlen+512); /* add some for MIME overhead */
-	     slrn_strncpy (line, vline, vlen);
-	     line[vlen-1] = 0;		/* kill \n and NULL terminate */
+	     strncpy (line, vline, vlen);
+	     if (line[vlen-1] == '\n')
+	       line[vlen-1] = 0;
+	     else
+	       line[vlen] = 0;
 
 	     if (header)
 	       {
diff -ru slrn-0.9.8.1.orig/src/post.c slrn-0.9.8.1/src/post.c
--- slrn-0.9.8.1.orig/src/post.c	2004-09-28 11:05:54.000000000 +0200
+++ slrn-0.9.8.1/src/post.c	2004-11-05 23:02:53.936102728 +0100
@@ -467,7 +467,10 @@
    linenum = 0;
    while ((NULL != (vline = vgets (vp, &vlen))) && (*vline != '\n'))
      {
-	vline[vlen-1] = 0;
+	if (vline[vlen-1] == '\n')
+	  vline[vlen-1] = 0;
+	else
+	  vline[vlen] = 0;
 	linenum++;
 	if (0 == slrn_case_strncmp ((unsigned char *)vline,
 				    (unsigned char *) "Cc: ", 4))
@@ -540,7 +543,10 @@
 
    while ((NULL != (vline = vgets (vp, &vlen))) && (*vline != '\n'))
      {
-	vline[vlen-1] = 0;
+	if (vline[vlen-1] == '\n')
+	  vline[vlen-1] = 0;
+	else
+	  vline[vlen] = 0;	
 	linenum++;
 	if (linenum == cc_line) continue;
 	if (is_empty_header (vline)) continue;
@@ -593,7 +599,10 @@
 
    while (NULL != (vline = vgets (vp, &vlen)))
      {
-	vline[vlen-1] = 0;
+	if (vline[vlen-1] == '\n')
+	  vline[vlen-1] = 0;
+	else
+	  vline[vlen] = 0;	
 	fputs (vline, pp);
 	fputs ("\n", pp);
      }
@@ -1411,8 +1420,11 @@
 	if (vlen == 0) continue;
 
 	linep = slrn_safe_malloc (vlen+512); /* add some for MIME overhead */
-	slrn_strncpy (linep, vline, vlen);
-	linep[vlen-1] = 0;	/* kill \n and NULL terminate */
+	strncpy (linep, vline, vlen);
+	if (linep[vlen-1] == '\n')
+	  linep[vlen-1] = 0;	/* kill \n and NULL terminate */
+	else
+	  linep[vlen] = 0;
 	
 	if (header)
 	  {
diff -ru slrn-0.9.8.1.orig/src/slrnpull.c slrn-0.9.8.1/src/slrnpull.c
--- slrn-0.9.8.1.orig/src/slrnpull.c	2004-02-28 23:08:17.000000000 +0100
+++ slrn-0.9.8.1/src/slrnpull.c	2004-11-05 23:03:18.859313824 +0100
@@ -3273,7 +3273,10 @@
 	
 	if (NULL != (vline = vgets (vp, &vlen)))
 	  {
-	     vline[vlen] = 0; /* make sure line is NULL terminated */
+	     if (vline[vlen-1] == '\n')
+	       vline[vlen-1] = 0; /* make sure line is NULL terminated */
+	     else
+	       vline[vlen] = 0;
 	     group->headers = slrn_ranges_from_newsrc_line (vline);
 	  }
 	
@@ -3382,7 +3385,10 @@
 	     if (NULL == (group = find_group_type (vline)))
 	       continue;
 	     
-	     vline[vlen-1] = 0;	       /* kill \n and NULL terminate */
+	     if (vline[vlen-1] == '\n')
+	       vline[vlen-1] = 0;
+	     else
+	       vline[vlen] = 0;
 	     
 	     r = slrn_ranges_from_newsrc_line (p+1);
 	     group->requests = slrn_ranges_merge (group->requests, r);
diff -ru slrn-0.9.8.1.orig/src/spool.c slrn-0.9.8.1/src/spool.c
--- slrn-0.9.8.1.orig/src/spool.c	2004-08-15 22:48:13.000000000 +0200
+++ slrn-0.9.8.1/src/spool.c	2004-11-05 23:04:17.628379568 +0100
@@ -1757,7 +1757,10 @@
    
    if (NULL != (vline = vgets (vp, &vlen)))
      {
-	vline[vlen] = 0; /* make sure line is NULL terminated */
+	if (vline[vlen-1] == '\n')
+	  vline[vlen-1] = 0; /* make sure line is NULL terminated */
+	else
+	  vline[vlen] = 0;
 	retval = slrn_ranges_from_newsrc_line (vline);
      }
    
@@ -1787,8 +1790,11 @@
 	if ((p == pmax) || (p == vline) ||
 	    (strncmp(vline, group, (p-vline))))
 	  continue;
-     
-	vline[vlen-1] = 0;	       /* kill \n and NULL terminate */
+
+	if (vline[vlen-1] == '\n')
+	  vline[vlen-1] = 0;
+	else
+	  vline[vlen] = 0;
 	
 	retval = slrn_ranges_from_newsrc_line (p+1);
 	break;


Index: slrn.spec
===================================================================
RCS file: /cvs/dist/rpms/slrn/devel/slrn.spec,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- slrn.spec	7 Mar 2005 13:56:43 -0000	1.20
+++ slrn.spec	27 Jul 2005 10:38:29 -0000	1.21
@@ -1,6 +1,6 @@
 Name: slrn
 Version: 0.9.8.1
-Release: 4
+Release: 5
 License: GPL
 Group: Applications/Internet
 Source0: http://download.sourceforge.net/slrn/slrn-%{version}.tar.bz2
@@ -10,6 +10,8 @@
 Patch0: slrn-0.9.8.0-config.patch
 Patch1: slrn-scorefile.patch
 Patch2: slrn-0.9.8.1-gcc4.patch
+Patch3: slrn-0.9.8.1-fetch.diff
+Patch4: slrn-0.9.8.1-lastchar2.diff
 Requires: slang >= 1.2.2
 BuildRequires: slang-devel inews openssl-devel pkgconfig /usr/sbin/sendmail
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
@@ -38,6 +40,8 @@
 %patch0 -p1 -b .config
 %patch1 -p1 -b .scorefile
 %patch2 -p1 -b .gcc4
+%patch3 -p1 -b .fetch
+%patch4 -p1 -b .lastchar2
 
 %build
 if pkg-config openssl ; then
@@ -100,6 +104,11 @@
 %{_mandir}/man1/slrnpull.1*
 
 %changelog
+* Wed Jul 27 2005 Jindrich Novy <jnovy at redhat.com> 0.9.8.1-5
+- apply official bugfix patches (#164363)
+  - fixes slrnpull problem with group containing no headers
+  - fixes last character removal editor problem
+
 * Mon Mar  7 2005 Jindrich Novy <jnovy at redhat.com> 0.9.8.1-4
 - fix type confusions reported by gcc4
 - add RPM_OPT_FLAGS to CFLAGS




More information about the fedora-cvs-commits mailing list