Complexity Shock Horror II: the Sequel (was Re: MD5 in erlang.)

Chris Pressey <>
Sun Apr 13 04:19:08 CEST 2003


On Sat, 12 Apr 2003 15:03:27 -0500
Chris Pressey <> wrote:

> If this is something the OTP team wants, I can make a better patch in
> the near future (tail-recursive, fixup the references in httpd_*.erl,
> etc.)

Done this now, see attached patch
(also contains my older patch for regexp and a few minor tweaks to other
files (e.g. -include to -include_lib so I could recompile it easily)

math:base/2 returns the same (goofy) error codes as
httpd_util:hexlist_to_integer/1 and httpd_util:integer_to_hexlist/1

It does NOT, however, simulate the what-I'd-consider-broken behaviour of
httpd_util:hexlist_to_integer/1:

Eshell V5.2.3.3  (abort with ^G)
1> httpd_util:hexlist_to_integer("3G5").
3
2> httpd_util:hexlist_to_integer("-3F5").
0

Instead it returns 'error' or 'not_a_num' for negative values, as the
httpd_util functions do, on the errors that they do detect.

-Chris
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: stdlib+inets.patch
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20030412/ae1ef295/attachment.ksh>


More information about the erlang-questions mailing list