Image-PNG-Simple
view release on metacpan or search on metacpan
libpng-1.6.17/configure view on Meta::CPAN
char *term;
double value;
value = strtod (string, &term);
if (value != 69 || term != (string + 4))
return 1;
}
{
/* Under Solaris 2.4, strtod returns the wrong value for the
terminating character under some conditions. */
char *string = "NaN";
char *term;
strtod (string, &term);
if (term != string && *(term - 1) == 0)
return 1;
}
return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
libpng-1.6.17/contrib/libtests/pngvalid.c view on Meta::CPAN
}
/* At the end of the list recalculate the output image pixel value from the
* double precision values set up by the preceding 'mod' calls:
*/
static unsigned int
sample_scale(double sample_value, unsigned int scale)
{
sample_value = floor(sample_value * scale + .5);
/* Return NaN as 0: */
if (!(sample_value > 0))
sample_value = 0;
else if (sample_value > scale)
sample_value = scale;
return (unsigned int)sample_value;
}
static void
image_transform_mod_end(PNG_CONST image_transform *this, image_pixel *that,
s++; if (s == send || (*s != 'F' && *s != 'f')) return 0;
s++; if (s < send && (*s == 'I' || *s == 'i')) {
s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
s++; if (s == send || (*s != 'I' && *s != 'i')) return 0;
s++; if (s == send || (*s != 'T' && *s != 't')) return 0;
s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
s++;
}
sawinf = 1;
} else if (*s == 'N' || *s == 'n') {
/* XXX TODO: There are signaling NaNs and quiet NaNs. */
s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
s++;
sawnan = 1;
} else
return 0;
if (sawinf) {
numtype &= IS_NUMBER_NEG; /* Keep track of sign */
numtype |= IS_NUMBER_INFINITY | IS_NUMBER_NOT_INT;
( run in 0.901 second using v1.01-cache-2.11-cpan-4d50c553e7e )