Re: Another non-standard search/sort field :)

2015-09-14 Thread ellie timoney
This patch contains code from libspamc.c (SpamAssassin?) > +/* Stolen from libspamc.c, and I'm not sure about license compatibility */ > +static float _locale_safe_string_to_float(char *buf, int siz) > +{ Here it is in their repo: http://svn.apache.org/viewvc/spamassassin/trunk/spamc/libspamc.c?

Re: Another non-standard search/sort field :)

2015-09-14 Thread Bron Gondwana
What's the problem with atof? (or just skipping the dot and making it an integer?) Bron. On Tue, Sep 15, 2015, at 11:32, ellie timoney wrote: > This patch contains code from libspamc.c (SpamAssassin?) > > > +/* Stolen from libspamc.c, and I'm not sure about license compatibility */ > > +static

Re: Another non-standard search/sort field :)

2015-09-14 Thread ellie timoney
Apparently atof and strtod will respect the current locale, and expect the decimal separator to be a ',' in places where that's a thing -- which is bad if the string you're parsing is always dot-separated, regardless of locale, because you'll end up parsing it wrong depending on where you run the s

Re: Slow unit tests

2015-09-14 Thread ellie timoney
I've reverted the commits that introduced the (new, unused) lib/lock_file module and its test suite, so the cunit tests now run a lot quicker. On Mon, Aug 31, 2015, at 10:17 AM, ellie timoney wrote: > > I've noticed a bit of a creep in the cunit tests - they've gone from > > taking a few seconds t