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