apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Orton <...@manyfish.co.uk>
Subject Re: [PATCH] add apr_strtoff function (string to apr_off_t)
Date Sun, 23 May 2004 21:04:54 GMT
On Sun, May 23, 2004 at 10:48:51PM +0200, André Malo wrote:
> The attachted patch adds a strtoff (maybe bad named) function, which converts
> a numerical string to an apr_off_t value. (Win32 and Netware untested).

Nice, thanks.  I was thinking of doing the same but actually using an
apr_status_t-based interface to hide the errno handling, what do you
think?  Ease of use would outweigh consistency with the other *toi64
function, I think...

apr_status_t apr_strtoff(apr_off_t *offset, const char *buf, char **end, int base)
{
  errno = 0;
  *offset = APR_STRTOFF(buf, end, base);
  return errno ? errno : 0;
} 


Mime
View raw message