}
}
else {
+ if (len && (flags & UNPACK_ONLY_ONE))
+ len = 1;
EXTEND(SP, len);
EXTEND_MORTAL(len);
while (len-- > 0) {
}
}
else {
+ if (len && (flags & UNPACK_ONLY_ONE))
+ len = 1;
EXTEND(SP, len);
EXTEND_MORTAL(len);
while (len-- > 0) {
if (checksum) {
while (len-- > 0 && s < strend) {
STRLEN alen;
- auint = NATIVE_TO_UNI(utf8n_to_uvchr((U8*)s, strend - s, &alen, 0));
+ auint = NATIVE_TO_UNI(utf8n_to_uvchr((U8*)s, strend - s, &alen, ckWARN(WARN_UTF8) ? 0 : UTF8_ALLOW_ANYUV));
along = alen;
s += along;
if (checksum > bits_in_uv)
}
}
else {
+ if (len && (flags & UNPACK_ONLY_ONE))
+ len = 1;
EXTEND(SP, len);
EXTEND_MORTAL(len);
while (len-- > 0 && s < strend) {
STRLEN alen;
- auint = NATIVE_TO_UNI(utf8n_to_uvchr((U8*)s, strend - s, &alen, 0));
+ auint = NATIVE_TO_UNI(utf8n_to_uvchr((U8*)s, strend - s, &alen, ckWARN(WARN_UTF8) ? 0 : UTF8_ALLOW_ANYUV));
along = alen;
s += along;
sv = NEWSV(37, 0);
}
}
else {
+ if (len && (flags & UNPACK_ONLY_ONE))
+ len = 1;
EXTEND(SP, len);
EXTEND_MORTAL(len);
#if SHORTSIZE != SIZE16
}
}
else {
+ if (len && (flags & UNPACK_ONLY_ONE))
+ len = 1;
EXTEND(SP, len);
EXTEND_MORTAL(len);
#if SHORTSIZE != SIZE16
}
}
else {
+ if (len && (flags & UNPACK_ONLY_ONE))
+ len = 1;
EXTEND(SP, len);
EXTEND_MORTAL(len);
while (len-- > 0) {
}
}
else {
+ if (len && (flags & UNPACK_ONLY_ONE))
+ len = 1;
EXTEND(SP, len);
EXTEND_MORTAL(len);
while (len-- > 0) {
}
}
else {
+ if (len && (flags & UNPACK_ONLY_ONE))
+ len = 1;
EXTEND(SP, len);
EXTEND_MORTAL(len);
while (len-- > 0) {
}
}
else {
+ if (len && (flags & UNPACK_ONLY_ONE))
+ len = 1;
EXTEND(SP, len);
EXTEND_MORTAL(len);
while (len-- > 0) {
}
}
else {
+ if (len && (flags & UNPACK_ONLY_ONE))
+ len = 1;
EXTEND(SP, len);
EXTEND_MORTAL(len);
#if LONGSIZE != SIZE32
}
}
else {
+ if (len && (flags & UNPACK_ONLY_ONE))
+ len = 1;
EXTEND(SP, len);
EXTEND_MORTAL(len);
#if LONGSIZE != SIZE32
}
break;
case 'w':
+ if (len && (flags & UNPACK_ONLY_ONE))
+ len = 1;
EXTEND(SP, len);
EXTEND_MORTAL(len);
{
}
}
else {
+ if (len && (flags & UNPACK_ONLY_ONE))
+ len = 1;
EXTEND(SP, len);
EXTEND_MORTAL(len);
while (len-- > 0) {
}
}
else {
+ if (len && (flags & UNPACK_ONLY_ONE))
+ len = 1;
EXTEND(SP, len);
EXTEND_MORTAL(len);
while (len-- > 0) {
}
}
else {
+ if (len && (flags & UNPACK_ONLY_ONE))
+ len = 1;
EXTEND(SP, len);
EXTEND_MORTAL(len);
while (len-- > 0) {
}
}
else {
+ if (len && (flags & UNPACK_ONLY_ONE))
+ len = 1;
EXTEND(SP, len);
EXTEND_MORTAL(len);
while (len-- > 0) {
}
}
else {
+ if (len && (flags & UNPACK_ONLY_ONE))
+ len = 1;
EXTEND(SP, len);
EXTEND_MORTAL(len);
while (len-- > 0) {
}
}
else {
+ if (len && (flags & UNPACK_ONLY_ONE))
+ len = 1;
EXTEND(SP, len);
EXTEND_MORTAL(len);
while (len-- > 0) {
fromstr = NEXTFROM;
auint = UNI_TO_NATIVE(SvUV(fromstr));
SvGROW(cat, SvCUR(cat) + UTF8_MAXLEN + 1);
- SvCUR_set(cat, (char*)uvchr_to_utf8((U8*)SvEND(cat),auint)
- - SvPVX(cat));
+ SvCUR_set(cat,
+ (char*)uvchr_to_utf8_flags((U8*)SvEND(cat),
+ auint,
+ ckWARN(WARN_UTF8) ?
+ 0 : UNICODE_ALLOW_ANY)
+ - SvPVX(cat));
}
*SvEND(cat) = '\0';
break;
case 'f':
while (len-- > 0) {
fromstr = NEXTFROM;
+#ifdef __VOS__
+/* VOS does not automatically map a floating-point overflow
+ during conversion from double to float into infinity, so we
+ do it by hand. This code should either be generalized for
+ any OS that needs it, or removed if and when VOS implements
+ posix-976 (suggestion to support mapping to infinity).
+ Paul.Green@stratus.com 02-04-02. */
+ if (SvNV(fromstr) > FLT_MAX)
+ afloat = _float_constants[0]; /* single prec. inf. */
+ else if (SvNV(fromstr) < -FLT_MAX)
+ afloat = _float_constants[0]; /* single prec. inf. */
+ else afloat = (float)SvNV(fromstr);
+#else
afloat = (float)SvNV(fromstr);
+#endif
sv_catpvn(cat, (char *)&afloat, sizeof (float));
}
break;
case 'd':
while (len-- > 0) {
fromstr = NEXTFROM;
+#ifdef __VOS__
+/* VOS does not automatically map a floating-point overflow
+ during conversion from long double to double into infinity,
+ so we do it by hand. This code should either be generalized
+ for any OS that needs it, or removed if and when VOS
+ implements posix-976 (suggestion to support mapping to
+ infinity). Paul.Green@stratus.com 02-04-02. */
+ if (SvNV(fromstr) > DBL_MAX)
+ adouble = _double_constants[0]; /* double prec. inf. */
+ else if (SvNV(fromstr) < -DBL_MAX)
+ adouble = _double_constants[0]; /* double prec. inf. */
+ else adouble = (double)SvNV(fromstr);
+#else
adouble = (double)SvNV(fromstr);
+#endif
sv_catpvn(cat, (char *)&adouble, sizeof (double));
}
break;
against UV_MAX_P1. */
if (SvIOK(fromstr) || adouble < UV_MAX_P1)
{
- char buf[1 + sizeof(UV)];
+ char buf[(sizeof(UV)*8)/7+1];
char *in = buf + sizeof(buf);
UV auv = SvUV(fromstr);