[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] svn-fast-time-from-cstring.patch

From: Michael Price <mprice_at_atl.lmco.com>
Date: 2002-12-11 17:21:03 CET

Philip Martin writes:
> If I look at /usr/local/apache2/include/httpd.h it says
>
> /** strtoul does not exist on sunos4. */
> #ifdef strtoul
> #undef strtoul
> #endif
> #define strtoul strtoul_is_not_a_portable_function_use_strtol_instead
>
> Perhaps we should use strtol into a temporary, and check for -ve
> values.
>
> > + exploded_time.tm_mon = strtoul(c, (char**)&c, 10);
> > + if (*c++ != '-') goto fail;
> > + exploded_time.tm_mday = strtoul(c, (char**)&c, 10);
> > + if (*c++ != 'T') goto fail;
> > + exploded_time.tm_hour = strtoul(c, (char**)&c, 10);
> > + if (*c++ != ':') goto fail;
> > + exploded_time.tm_min = strtoul(c, (char**)&c, 10);
> > + if (*c++ != ':') goto fail;
> > + exploded_time.tm_sec = strtoul(c, (char**)&c, 10);
> > + if (*c++ != '.') goto fail;
> > + exploded_time.tm_usec = strtoul(c, (char**)&c, 10);
> > + if (*c++ != 'Z') goto fail;

I now see why Kirk McKusick refers to code optimization as code
"uglification". His use of "uglify" in place of optimize is even
more humorous after seeing examples like this.

Michael

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Dec 11 17:23:46 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.