pan-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pan-users] Re: An "alias" feature for group names


From: Benjamin Esham
Subject: [Pan-users] Re: An "alias" feature for group names
Date: Sun, 22 Jul 2007 16:59:58 +0000 (UTC)
User-agent: Pan/0.131 (Ghosts: First Variation)

Benjamin Esham wrote:

> http://bugzilla.gnome.org/show_bug.cgi?id=355041

I've developed a patch for this; there's probably a better way, as I'm not a
C++ hacker, but this seems to work okay.  The Gnome bugzilla is down ATM, so
here's the patch in case anyone wants it now:

71,72c71
<     static const StringView moderated ("moderated");
<     static const StringView d ("d");
---
>     StringView myline, long_token_one, long_token_two;
74,76c73
<     StringView myline, long_token;
< 
<     // find the long token -- use the last, unless that's "moderated" or "d"
---
>       // pop off the last two tokens
78,80c75,77
<     myline.pop_last_token (long_token, '.');
<     if (!myline.empty() && (long_token==moderated || long_token==d))
<       myline.pop_last_token (long_token, '.');
---
>     myline.pop_last_token (long_token_two, '.');
>       if (!myline.empty())
>         myline.pop_last_token (long_token_one, '.');
82c79
<     // build a new string where each token is shortened except for long_token
---
>     // build a new string where each token is shortened except for the 
> long_tokens
87c84
<       out.insert (out.end(), tok.begin(), (tok==long_token ? tok.end() : 
tok.begin()+1));
---
>       out.insert (out.end(), tok.begin(), ((tok==long_token_one || 
> tok==long_token_two) ? tok.end() : tok.begin()+1));

(Hopefully that won't be mangled too badly by anyone's newsreader or mail
client.)

Cheers,
-- 
Benjamin D. Esham
E-mail/Jabber: address@hidden | AIM bdesham128 | PGP D676BB9A
How to Ask Questions the Smart Way, by Eric S. Raymond:
                  http://catb.org/~esr/faqs/smart-questions.html





reply via email to

[Prev in Thread] Current Thread [Next in Thread]