| 247 | } |
| 248 | |
| 249 | static double get_y_coord(const char *args) |
| 250 | { |
| 251 | char *endptr; /* we want it non-null */ |
| 252 | const char *start_of_y = NULL; |
| 253 | double y_coord = -1; /* -1 is returned on error */ |
| 254 | |
| 255 | if (args == NULL) { |
| 256 | return (-1); /* in case we aren't passed anything */ |
| 257 | } |
| 258 | |
| 259 | start_of_y = ap_strchr_c(args, ','); /* the comma */ |
| 260 | |
| 261 | if (start_of_y) { |
| 262 | |
| 263 | start_of_y++; /* start looking at the character after |
| 264 | the comma */ |
| 265 | |
| 266 | while (*start_of_y && !apr_isdigit(*start_of_y)) { |
| 267 | start_of_y++; /* jump to the first digit, but not |
| 268 | past the end */ |
| 269 | } |
| 270 | |
| 271 | y_coord = strtod(start_of_y, &endptr); |
| 272 | |
| 273 | if (endptr > start_of_y) { |
| 274 | return (y_coord); |
| 275 | } |
| 276 | } |
| 277 | |
| 278 | return (-1); /* if no conversion was made, or |
| 279 | no comma was found in args */ |
| 280 | } |
| 281 | |
| 282 | |
| 283 | /* See if string has a "quoted part", and if so set *quoted_part to |
no test coverage detected