- switch ( status->flags & ( E_char | E_short | E_long | E_llong | E_intmax | E_size | E_ptrdiff | E_unsigned ) )
- {
- case E_char:
- limit = ( sign == 1 ) ? CHAR_MAX : ( CHAR_MIN * sign );
- break;
- case E_char | E_unsigned:
- limit = UCHAR_MAX;
- break;
- case E_short:
- limit = ( sign == 1 ) ? SHRT_MAX : ( SHRT_MIN * sign );
- break;
- case E_short | E_unsigned:
- limit = USHRT_MAX;
- break;
- case E_long:
- limit = ( sign == 1 ) ? LONG_MAX : ( LONG_MIN * sign );
- break;
- case E_long | E_unsigned:
- limit = ULONG_MAX;
- break;
- case E_llong:
- limit = ( sign == 1 ) ? LLONG_MAX : ( LLONG_MIN * sign );
- break;
- case E_llong | E_unsigned:
- limit = ULLONG_MAX;
- break;
- case E_intmax:
- limit = ( sign == 1 ) ? INTMAX_MAX : ( INTMAX_MIN * sign );
- break;
- case E_intmax | E_unsigned:
- limit = UINTMAX_MAX;
- break;
- case E_size:
- case E_size | E_unsigned:
- limit = SIZE_MAX;
- break;
- case E_ptrdiff:
- case E_ptrdiff | E_unsigned:
- limit = ( sign == 1 ) ? PTRDIFF_MAX : ( PTRDIFF_MIN * sign );
- break;
- case E_unsigned:
- limit = UINT_MAX;
- break;
- default:
- limit = ( sign == 1 ) ? INT_MAX : ( INT_MIN * sign );
- break;
- }