** 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. */
| 163 | ** a regular expression. Dumps an error immediately if the format test fails. |
| 164 | */ |
| 165 | static double getNumeric(char *s) |
| 166 | { |
| 167 | char *err; |
| 168 | double rv; |
| 169 | |
| 170 | rv = strtod(s, &err); |
| 171 | if (*err) { |
| 172 | msSetError(MS_TYPEERR, NULL, "getNumeric()"); |
| 173 | writeError(); |
| 174 | } |
| 175 | return rv; |
| 176 | } |
| 177 | |
| 178 | |
| 179 |
no test coverage detected