/* Accomodate broken VAXC compiler, which applies U8 cast to
* both args of ?: operator, causing EOF to change into 255
*/
-#ifdef DJGPP /* This is basically undoing #17270 for DJGPP. See below. */
- if (cnt)
-#else
if (cnt > 0)
-#endif
- {
- i = (U8)buf[cnt - 1];
- }
- else {
+ i = (U8)buf[cnt - 1];
+ else
i = EOF;
- }
}
-#ifndef DJGPP /* This is basically undoing #17270 for DJGPP. See above.*/
- if (cnt > 0)
-#endif
- {
- if (append)
- sv_catpvn(sv, (char *) buf, cnt);
- else
- sv_setpvn(sv, (char *) buf, cnt);
- }
+ if (cnt < 0)
+ cnt = 0; /* we do need to re-set the sv even when cnt <= 0 */
+ if (append)
+ sv_catpvn(sv, (char *) buf, cnt);
+ else
+ sv_setpvn(sv, (char *) buf, cnt);
if (i != EOF && /* joy */
(!rslen ||
We allow format specification elements in this order:
\d+\$ explicit format parameter index
[-+ 0#]+ flags
- v|*(\d+\$)?v vector with optional (optionally specified) arg
+ v|\*(\d+\$)?v vector with optional (optionally specified) arg
\d+|\*(\d+\$)? width using optional (optionally specified) arg
\.(\d*|\*(\d+\$)?) precision using optional (optionally specified) arg
[hlqLV] size