Re: Realnames with dot.

Robert Grimm <[email protected]>
Newsgroups gmane.network.slrn.user
Organization Disorganized
Message-ID <[email protected]>
Robert <[email protected]> wrote:
> John E. Davis <[email protected]> wrote:
>> Once I start working on slrn again, I intend to scrap those functions
>> in favor of the ones in parse2882.c.  I cannot say when I will do this
>> because slrn appears to be working quite well.  Feel free to send me a
>> patch, which I will integrate on a much shorter time scale.  Thanks, --John

> Maybe this will do. Still have to do some testing. I will get back to
> it.

I used the following patch and testet it with a bunch of From: lines,
more or less strange ones, and didn't run into problems, so far.
#v+
diff -urNad slrn-1.0.0~pre15.orig/src/art.c slrn-1.0.0~pre15/src/art.c
--- slrn-1.0.0~pre15.orig/src/art.c	2009-09-19 08:35:51.000000000 +0200
+++ slrn-1.0.0~pre15/src/art.c	2009-09-20 19:48:54.000000000 +0200
@@ -1949,17 +1949,36 @@
    if (*start == '"')
      {
 	len = read_quotedstring (start, dest, max ? max-1 : 0);
+	start += len;
      }
    else if (*start && (NULL == slrn_strbyte ("\t \"(),.:;<>@[\\]", *start)))
      {
-	len = read_dotatom (start, dest, max ? max-1 : 0);
+	char *d = dest;
+	if (len < max)
+	   *dest++ = *start;
+	len++;
+	start++;
+	
+	while (1)
+	  {
+	     if ((*start == '\0') ||
+	         (NULL != slrn_strbyte ("\"(),:;<>@[\\]", *start)))
+	        break;
+	
+	     if (len < max)
+	          *dest++ = *start;
+	
+	     len++;
+	     start++;
+	  }
+	dest = d;
      }
    else
      {
 	if (max) *dest = '\0';
 	len = 1;
+	start += len;
      }
-   start += len;
    if (max)
      {
 	if (len <= max-1)
#v-

Rob
-- 
A right is not what someone gives you; 
it's what no one can take from you.
		-- Ramsey Clark


------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.