Bron Gondwana brong at fastmail.fm
Mon Feb 2 01:32:37 EST 2009

On Sun, Feb 01, 2009 at 09:39:30PM -0800, Rob Banz wrote:
> Er, I dunno. +1 is a nice and simple way to demonstrate agreement  
> without getting all verbose about it.
> ...and seeing that folks are in agreement with something you propose IS 
> mighty helpful.
> Please, get back to the regular nonsense ;)

ME TOOOO00000!!!!111!!!!eleventyone


As I was saying - I've committed a change that uses the pcre_exec API
if you have PCRE configured, or the regnexec API from RX if you have
that (untested, I don't have RX, and it's not packaged for Debian, but
the API docs were pretty clear!)

There's another bastardised API that MacOS uses, where you can pass a
special flag that tells you that the actual start and end locations in
the string are encoded into the first match struct (generally only used
for getting information back out).  Filthy API compatibility hack that
it is, but the BSDs seem to use it.

I suspect using that API would involve either a configure test or a
#ifdef REG_POSITION (or whatever it was, I'm on the train without net
connectivity at the moment, and I don't have a copy of the API handy)

Oh, here it is in the PCRE headers (they support it too)
#define REG_STARTEND  0x0080 /* BSD feature: pass subject string by so,eo */


302:#define REG_STARTEND (1 << 2)

Different, but what they hey.  That's the standard system library.  Not
bloody documented of course.  Nothing in "man regexec" about it, bah.

Bron ( but it might be worth checking for, because that will pick up a
       lot of systems that don't have PCRE or want it.  It does change
       the regex syntax in sieve, and is probably non-standardly evil! )

More information about the Cyrus-devel mailing list