goto string;
}
- if (!args)
+ if (vectorize)
+ argsv = vecsv;
+ else if (!args)
argsv = (efix ? efix <= svmax : svix < svmax) ?
svargs[efix ? efix-1 : svix++] : &PL_sv_undef;
/* STRINGS */
case 'c':
- uv = args ? va_arg(*args, int) : SvIVx(argsv);
+ uv = (args && !vectorize) ? va_arg(*args, int) : SvIVx(argsv);
if ((uv > 255 ||
(!UNI_IS_INVARIANT(uv) && SvUTF8(sv)))
&& !IN_BYTES) {
goto string;
case 's':
- if (args) {
+ if (args && !vectorize) {
eptr = va_arg(*args, char*);
if (eptr)
#ifdef MACOS_TRADITIONAL
* if ISO or ANSI decide to use '_' for something.
* So we keep it hidden from users' code.
*/
- if (!args)
+ if (!args || vectorize)
goto unknown;
argsv = va_arg(*args, SV*);
eptr = SvPVx(argsv, elen);
/* INTEGERS */
case 'p':
- if (alt)
+ if (alt || vectorize)
goto unknown;
uv = PTR2UV(args ? va_arg(*args, void*) : argsv);
base = 16;
/* This is evil, but floating point is even more evil */
- vectorize = FALSE;
/* for SV-style calling, we can only get NV
for C-style calling, we assume %f is double;
for simplicity we allow any of %Lf, %llf, %qf for long double
}
/* now we need (long double) if intsize == 'q', else (double) */
- nv = args ?
+ nv = (args && !vectorize) ?
#if LONG_DOUBLESIZE > DOUBLESIZE
intsize == 'q' ?
va_arg(*args, long double) :
: SvNVx(argsv);
need = 0;
+ vectorize = FALSE;
if (c != 'e' && c != 'E') {
i = PERL_INT_MIN;
/* FIXME: if HAS_LONG_DOUBLE but not USE_LONG_DOUBLE this
/* SPECIAL */
case 'n':
- vectorize = FALSE;
i = SvCUR(sv) - origlen;
- if (args) {
+ if (args && !vectorize) {
switch (intsize) {
case 'h': *(va_arg(*args, short*)) = i; break;
default: *(va_arg(*args, int*)) = i; break;
}
else
sv_setuv_mg(argsv, (UV)i);
+ vectorize = FALSE;
continue; /* not "break" */
/* UNKNOWN */
>%*2$*2$d< >[12, 3]< >%*2$*2$d INVALID<
>%*2*2$d< >[12, 3]< >%*2*2$d INVALID<
>%0v2.2d< >''< ><
+>%vc,%d< >[63, 64, 65]< >?,64<
+>%vd,%d< >[1, 2, 3]< >49,2<
+>%vf,%d< >[1, 2, 3]< >1.000000,2<
+>%vp< >''< >%vp INVALID<
+>%vs,%d< >[1, 2, 3]< >1,2<
+>%v_< >''< >%v_ INVALID<