0, 0,
/* L */ sizeof(unsigned long),
0,
-#if defined(PERL_PACK_CAN_SHRIEKSIGN)
/* N */ SIZE32,
-#else
- 0,
-#endif
0, 0, 0, 0,
/* S */ sizeof(unsigned short),
0, 0,
-#if defined(PERL_PACK_CAN_SHRIEKSIGN)
/* V */ SIZE32,
-#else
- 0,
-#endif
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0,
/* i */ sizeof(int),
0, 0,
/* l */ sizeof(long),
0,
-#if defined(PERL_PACK_CAN_SHRIEKSIGN)
/* n */ SIZE16,
-#else
- 0,
-#endif
0, 0, 0, 0,
/* s */ sizeof(short),
0, 0,
-#if defined(PERL_PACK_CAN_SHRIEKSIGN)
/* v */ SIZE16,
-#else
- 0,
-#endif
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
/* l */ sizeof(long),
0,
-#if defined(PERL_PACK_CAN_SHRIEKSIGN)
/* n */ SIZE16,
-#else
- 0,
-#endif
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* s */ sizeof(short),
0, 0,
-#if defined(PERL_PACK_CAN_SHRIEKSIGN)
/* v */ SIZE16,
-#else
- 0,
-#endif
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
/* L */ sizeof(unsigned long),
0,
-#if defined(PERL_PACK_CAN_SHRIEKSIGN)
/* N */ SIZE32,
-#else
- 0,
-#endif
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* S */ sizeof(unsigned short),
0, 0,
-#if defined(PERL_PACK_CAN_SHRIEKSIGN)
/* V */ SIZE32,
-#else
- 0,
-#endif
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
} ld_bytes;
#endif
-#if PERL_VERSION >= 9
-# define PERL_PACK_CAN_SHRIEKSIGN
-#endif
-
#ifndef CHAR_BIT
# define CHAR_BIT 8
#endif
#define TYPE_MODIFIERS(t) ((t) & ~0xFF)
#define TYPE_NO_MODIFIERS(t) ((t) & 0xFF)
-#ifdef PERL_PACK_CAN_SHRIEKSIGN
-# define SHRIEKING_ALLOWED_TYPES "sSiIlLxXnNvV@."
-#else
-# define SHRIEKING_ALLOWED_TYPES "sSiIlLxX"
-#endif
-
# define TYPE_ENDIANNESS(t) ((t) & TYPE_ENDIANNESS_MASK)
# define TYPE_NO_ENDIANNESS(t) ((t) & ~TYPE_ENDIANNESS_MASK)
Perl_croak(aTHX_ "Invalid type '%c' in %s",
(int)TYPE_NO_MODIFIERS(symptr->code),
_action( symptr ) );
-#ifdef PERL_PACK_CAN_SHRIEKSIGN
case '.' | TYPE_IS_SHRIEKING:
case '@' | TYPE_IS_SHRIEKING:
-#endif
case '@':
case '.':
case '/':
switch (*patptr) {
case '!':
modifier = TYPE_IS_SHRIEKING;
- allowed = SHRIEKING_ALLOWED_TYPES;
+ allowed = "sSiIlLxXnNvV@.";
break;
case '>':
modifier = TYPE_IS_BIG_ENDIAN;
*symptr = savsym;
break;
}
-#ifdef PERL_PACK_CAN_SHRIEKSIGN
case '.' | TYPE_IS_SHRIEKING:
-#endif
case '.': {
const char *from;
SV *sv;
-#ifdef PERL_PACK_CAN_SHRIEKSIGN
const bool u8 = utf8 && !(datumtype & TYPE_IS_SHRIEKING);
-#else /* PERL_PACK_CAN_SHRIEKSIGN */
- const bool u8 = utf8;
-#endif
if (howlen == e_star) from = strbeg;
else if (len <= 0) from = s;
else {
mXPUSHs(sv);
break;
}
-#ifdef PERL_PACK_CAN_SHRIEKSIGN
case '@' | TYPE_IS_SHRIEKING:
-#endif
case '@':
s = strbeg + symptr->strbeg;
-#ifdef PERL_PACK_CAN_SHRIEKSIGN
if (utf8 && !(datumtype & TYPE_IS_SHRIEKING))
-#else /* PERL_PACK_CAN_SHRIEKSIGN */
- if (utf8)
-#endif
{
while (len > 0) {
if (s >= strend)
cuv += au16;
}
break;
-#ifdef PERL_PACK_CAN_SHRIEKSIGN
case 'v' | TYPE_IS_SHRIEKING:
case 'n' | TYPE_IS_SHRIEKING:
while (len-- > 0) {
cuv += ai16;
}
break;
-#endif /* PERL_PACK_CAN_SHRIEKSIGN */
case 'i':
case 'i' | TYPE_IS_SHRIEKING:
while (len-- > 0) {
cuv += au32;
}
break;
-#ifdef PERL_PACK_CAN_SHRIEKSIGN
case 'V' | TYPE_IS_SHRIEKING:
case 'N' | TYPE_IS_SHRIEKING:
while (len-- > 0) {
I32 ai32;
-# if U32SIZE > SIZE32
+#if U32SIZE > SIZE32
ai32 = 0;
-# endif
+#endif
SHIFT32(utf8, s, strend, &ai32, datumtype);
-# ifdef HAS_NTOHL
+#ifdef HAS_NTOHL
if (datumtype == ('N' | TYPE_IS_SHRIEKING))
ai32 = (I32)PerlSock_ntohl((U32)ai32);
-# endif
-# ifdef HAS_VTOHL
+#endif
+#ifdef HAS_VTOHL
if (datumtype == ('V' | TYPE_IS_SHRIEKING))
ai32 = (I32)vtohl((U32)ai32);
-# endif
+#endif
if (!checksum)
mPUSHi(ai32);
else if (checksum > bits_in_uv)
cuv += ai32;
}
break;
-#endif /* PERL_PACK_CAN_SHRIEKSIGN */
case 'p':
while (len-- > 0) {
const char *aptr;
Perl_croak(aTHX_ "'%%' may not be used in pack");
{
char *from;
-#ifdef PERL_PACK_CAN_SHRIEKSIGN
case '.' | TYPE_IS_SHRIEKING:
-#endif
case '.':
if (howlen == e_star) from = start;
else if (len == 0) from = cur;
fromstr = NEXTFROM;
len = SvIV(fromstr);
goto resize;
-#ifdef PERL_PACK_CAN_SHRIEKSIGN
case '@' | TYPE_IS_SHRIEKING:
-#endif
case '@':
from = start + symptr->strbeg;
resize:
-#ifdef PERL_PACK_CAN_SHRIEKSIGN
if (utf8 && !(datumtype & TYPE_IS_SHRIEKING))
-#else /* PERL_PACK_CAN_SHRIEKSIGN */
- if (utf8)
-#endif
if (len >= 0) {
while (len && from < cur) {
from += UTF8SKIP(from);
break;
}
#endif
-#ifdef PERL_PACK_CAN_SHRIEKSIGN
case 'n' | TYPE_IS_SHRIEKING:
-#endif
case 'n':
while (len-- > 0) {
I16 ai16;
PUSH16(utf8, cur, &ai16);
}
break;
-#ifdef PERL_PACK_CAN_SHRIEKSIGN
case 'v' | TYPE_IS_SHRIEKING:
-#endif
case 'v':
while (len-- > 0) {
I16 ai16;
PUSH_VAR(utf8, cur, aint);
}
break;
-#ifdef PERL_PACK_CAN_SHRIEKSIGN
case 'N' | TYPE_IS_SHRIEKING:
-#endif
case 'N':
while (len-- > 0) {
U32 au32;
PUSH32(utf8, cur, &au32);
}
break;
-#ifdef PERL_PACK_CAN_SHRIEKSIGN
case 'V' | TYPE_IS_SHRIEKING:
-#endif
case 'V':
while (len-- > 0) {
U32 au32;