if (separator = strchr(Z_STRVAL_PP(entry), ';')) {
const char *ptr = separator;
- do {
- ++ptr;
- } while ((*ptr == ' ') || (*ptr == 'q') || (*ptr == '='));
+ while (*++ptr && !isdigit(*ptr));
- quality = strtod(ptr, NULL);
+ quality = atof(ptr);
identifier = estrndup(Z_STRVAL_PP(entry), separator - Z_STRVAL_PP(entry));
} else {
quality = 1000.0 - i++;
size_t header_len;
zval array;
- Z_ARRVAL(array) = headers;
+ INIT_ZARR(array, headers);
+
if (body) {
header_len = body - header;
} else {
while (header_len >= (size_t) (line - begin)) {
int value_len = 0;
-
+ /* note: valgrind may choke on that -- should be safe though */
switch (*line++)
{
case ':':