[Mapserver-dev] the pfffurpose of getNumeric
Steve Lime
steve.lime at dnr.state.mn.us
Wed Jun 2 02:33:39 EDT 2004
No comments implies permission, so I made the switch in mapserv.c and
mapserv_fcgi.c. Are we keeping the FastCGI stuff up-to-date? I've tried
but am not sure all changes have been made in both spots...
Steve
>>> "Steve Lime" <steve.lime at dnr.state.mn.us> 05/27/04 4:48 PM >>>
Had to think for a minute, really old code. It does what the comment
suggests...
/*
** Converts a string (e.g. form parameter) to a double, first checking
the format against
** a regular expression. Dumps an error immediately if the format test
fails.
*/
I was really into regex for awhile. Anyone see a reason not to use the
function below? If
not I'll swap'em...
Steve
>>> "Mladen Turk" <mturk at apache.org> 5/27/2004 8:54:26 AM >>>
Hi all,
I was wondering what is the purpose of the getNumeric function?
For example IMHO the:
static double getNumeric(char *s)
{
char *err;
double rv;
rv = strtod(s, &err);
If (*err) {
msSetError(MS_TYPEERR, NULL, "getNumeric()");
writeError();
}
return rv;
}
has the same functionality as the existing one, but doesn't require
either
regex nor malloc/free for each param.
MT.
_______________________________________________
Mapserver-dev mailing list
Mapserver-dev at lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-dev
More information about the mapserver-dev
mailing list