PER Runtime Library Functions.

Classes

struct  PERField
struct  BinDumpBuffer

Modules

 PER C Decode Functions.
 PER C Encode Functions.
 PER C Utility Functions

Defines

#define ASN_K_EXTENUM   999
#define OSYEAR_BASIC   OSUINTCONST(0x8000000)
#define OSYEAR_PROLEPTIC   OSUINTCONST(0x4000000)
#define OSYEAR_NEGATIVE   OSUINTCONST(0x2000000)
#define OSYEAR_L(n)   ((OSUINT32)(n) << 28)
#define OSYEAR_MASK   (OSYEAR_BASIC|OSYEAR_PROLEPTIC|OSYEAR_NEGATIVE|OSYEAR_L(0xF))
#define OSANY   (OSYEAR_NEGATIVE|OSYEAR_L(5))
#define OSANY_MASK   (OSYEAR_NEGATIVE|OSYEAR_L(0xF))
#define OSCENTURY   0x4000u
#define OSYEAR   0x2000u
#define OSMONTH   0x1000u
#define OSWEEK   0x0800u
#define OSDAY   0x0400u
#define OSHOURS   0x0200u
#define OSMINUTES   0x0100u
#define OSSECONDS   0x0080u
#define OSUTC   0x0040u
#define OSDIFF   0x0020u
#define OSFRACTION   0x000Fu
#define OSDURATION   0x0010u
#define PU_SETCHARSET(csetvar, canset, abits, ubits)
#define PU_INSLENFLD(pctxt)
#define PU_NEWFIELD(pctxt, suffix)
#define PU_PUSHNAME(pctxt, name)
#define PU_PUSHELEMNAME(pctxt, idx)
#define PU_POPNAME(pctxt)
#define PU_SETBITOFFSET(pctxt)
#define PU_SETBITCOUNT(pctxt)
#define PU_SETOPENTYPEFLDLIST(pMainBFList, pOpenTypeBFList)
#define EXTPERMETHOD
#define EXTERNPER
#define EXTPERCLASS
#define PD_BIT(pctxt, pvalue)   DEC_BIT(pctxt,pvalue)
#define PU_SETSIZECONSTRAINT(pctxt, rootLower, rootUpper, extLower, extUpper)
#define PU_INITSIZECONSTRAINT(pctxt)   PU_SETSIZECONSTRAINT(pctxt,0,0,0,0)
#define PU_GETSIZECONSTRAINT(pctxt, extbit)
#define PU_GETCTXTBITOFFSET(pctxt)   (((pctxt)->buffer.byteIndex * 8) + (8 - (pctxt)->buffer.bitOffset))
#define PU_GETPADBITS(pctxt)   (((pctxt)->buffer.bitOffset == 8) ? 0 : (pctxt)->buffer.bitOffset)
#define PU_SETCTXTBITOFFSET(pctxt, _bitOffset)
#define PD_BYTE_ALIGN0(pctxt)
#define PD_BYTE_ALIGN   PD_BYTE_ALIGN0
#define PD_CHECKSEQOFLEN(pctxt, numElements, minElemBits)
#define PD_OPENTYPE_START(pctxt, pSavedSize, pSavedBitOff)   pd_OpenTypeStart(pctxt,pSavedSize,pSavedBitOff);
#define PD_OPENTYPE_END(pctxt, savedSize, savedBitOff)   pd_OpenTypeEnd(pctxt,savedSize,savedBitOff);
#define pd_bit(pctxt, pvalue)   rtxDecBit(pctxt,pvalue)
#define pd_bits(pctxt, pvalue, nbits)   rtxDecBits(pctxt,pvalue,nbits)
#define pd_octets(pctxt, pbuffer, bufsiz, nbits)   rtxDecBitsToByteArray(pctxt,pbuffer,bufsiz,nbits)
#define pe_GeneralString(pctxt, value, permCharSet)   pe_VarWidthCharString(pctxt, value)
#define pe_GraphicString(pctxt, value, permCharSet)   pe_VarWidthCharString(pctxt, value)
#define pe_T61String(pctxt, value, permCharSet)   pe_VarWidthCharString(pctxt, value)
#define pe_TeletexString(pctxt, value, permCharSet)   pe_VarWidthCharString(pctxt, value)
#define pe_VideotexString(pctxt, value, permCharSet)   pe_VarWidthCharString(pctxt, value)
#define pe_ObjectDescriptor(pctxt, value, permCharSet)   pe_VarWidthCharString(pctxt, value)
#define pe_UTF8String(pctxt, value, permCharSet)   pe_VarWidthCharString(pctxt, value)
#define pe_IA5String(pctxt, value, permCharSet)   pe_ConstrainedStringEx (pctxt, value, permCharSet, 8, 7, 7)
#define pe_NumericString(pctxt, value, permCharSet)
#define pe_PrintableString(pctxt, value, permCharSet)   pe_ConstrainedStringEx (pctxt, value, permCharSet, 8, 7, 7)
#define pe_VisibleString(pctxt, value, permCharSet)   pe_ConstrainedStringEx (pctxt, value, permCharSet, 8, 7, 7)
#define pe_ISO646String   pe_IA5String
#define pe_GeneralizedTime   pe_IA5String
#define pe_UTCTime   pe_GeneralizedTime
#define pd_GeneralString(pctxt, pvalue, permCharSet)   pd_VarWidthCharString (pctxt, pvalue)
#define pd_GraphicString(pctxt, pvalue, permCharSet)   pd_VarWidthCharString (pctxt, pvalue)
#define pd_VideotexString(pctxt, pvalue, permCharSet)   pd_VarWidthCharString (pctxt, pvalue)
#define pd_TeletexString(pctxt, pvalue, permCharSet)   pd_VarWidthCharString (pctxt, pvalue)
#define pd_T61String(pctxt, pvalue, permCharSet)   pd_VarWidthCharString (pctxt, pvalue)
#define pd_ObjectDescriptor(pctxt, pvalue, permCharSet)   pd_VarWidthCharString (pctxt, pvalue)
#define pd_UTF8String(pctxt, pvalue, permCharSet)   pd_VarWidthCharString (pctxt, pvalue)
#define pd_IA5String(pctxt, pvalue, permCharSet)   pd_ConstrainedStringEx (pctxt, pvalue, permCharSet, 8, 7, 7)
#define pd_NumericString(pctxt, pvalue, permCharSet)
#define pd_PrintableString(pctxt, pvalue, permCharSet)   pd_ConstrainedStringEx (pctxt, pvalue, permCharSet, 8, 7, 7)
#define pd_VisibleString(pctxt, pvalue, permCharSet)   pd_ConstrainedStringEx (pctxt, pvalue, permCharSet, 8, 7, 7)
#define pd_ISO646String   pd_IA5String
#define pd_GeneralizedTime   pd_IA5String
#define pd_UTCTime   pd_GeneralizedTime
#define pe_GetMsgLen   pu_getMsgLen
#define pe_ExpandBuffer(pctxt, nbytes)   rtxExpandOutputBuffer(pctxt,nbytes)
#define pd_AnyCentury(pctxt, string)   pd_DateStr (pctxt, string, OSANY|OSCENTURY)
#define pd_AnyCenturyInt(pctxt, pvalue)   pd_UnconsInteger (pctxt, pvalue)
#define pd_AnyDate(pctxt, string)   pd_DateStr (pctxt, string, OSANY|OSYEAR|OSMONTH|OSDAY)
#define pd_AnyYear(pctxt, string)   pd_DateStr (pctxt, string, OSANY|OSYEAR)
#define pd_AnyYearInt(pctxt, pvalue)   pd_UnconsInteger (pctxt, pvalue)
#define pd_AnyYearDay(pctxt, string)   pd_DateStr (pctxt, string, OSANY|OSYEAR|OSDAY)
#define pd_AnyYearMonth(pctxt, string)   pd_DateStr (pctxt, string, OSANY|OSYEAR|OSMONTH)
#define pd_AnyYearMonthDay(pctxt, string)   pd_DateStr (pctxt, string, OSANY|OSYEAR|OSMONTH|OSDAY)
#define pd_AnyYearWeek(pctxt, string)   pd_DateStr (pctxt, string, OSANY|OSYEAR|OSWEEK)
#define pd_AnyYearWeekDay(pctxt, string)   pd_DateStr (pctxt, string, OSANY|OSYEAR|OSWEEK|OSDAY)
#define pd_Century(pctxt, string)   pd_DateStr (pctxt, string, OSCENTURY)
#define pd_CenturyInt(pctxt, pvalue)   pd_ConsUInt8 (pctxt, pvalue, 0, 99)
#define pd_Date(pctxt, string)   pd_DateStr (pctxt, string, OSYEAR_BASIC|OSYEAR|OSMONTH|OSDAY);
#define pd_DateTime(pctxt, string)
#define pd_DurationInterval(pctxt, string)   pd_Duration (pctxt, string, FALSE)
#define pd_DurationEndDateInterval(pctxt, string, flags)   pd_Interval (pctxt, string, FALSE, OSDURATION, flags)
#define pd_DurationEndTimeInterval(pctxt, string, flags)   pd_Interval (pctxt, string, FALSE, OSDURATION, flags)
#define pd_DurationEndDateTimeInterval(pctxt, string, flags)   pd_Interval (pctxt, string, FALSE, OSDURATION, flags)
#define pd_Hours(pctxt, string)   pd_TimeStr (pctxt, string, OSHOURS)
#define pd_HoursUtc(pctxt, string)   pd_TimeStr (pctxt, string, OSHOURS|OSUTC)
#define pd_HoursAndDiff(pctxt, string)   pd_TimeStr (pctxt, string, OSHOURS|OSDIFF)
#define pd_HoursAndFraction(pctxt, string, n)   pd_TimeStr (pctxt, string, OSHOURS|(n))
#define pd_HoursUtcAndFraction(pctxt, string, n)   pd_TimeStr (pctxt, string, OSHOURS|OSUTC|(n))
#define pd_HoursAndDiffAndFraction(pctxt, string, n)   pd_TimeStr (pctxt, string, OSHOURS|OSDIFF|(n))
#define pd_Minutes(pctxt, string)   pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES)
#define pd_MinutesUtc(pctxt, string)   pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSUTC)
#define pd_MinutesAndDiff(pctxt, string)   pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSDIFF)
#define pd_MinutesAndFraction(pctxt, string, n)   pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|(n))
#define pd_MinutesUtcAndFraction(pctxt, string, n)   pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSUTC|(n))
#define pd_MinutesAndDiffAndFraction(pctxt, string, n)   pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSDIFF|(n))
#define pd_RecStartEndDateInterval(pctxt, string, flags)   pd_Interval (pctxt, string, TRUE, flags, flags)
#define pd_RecStartEndTimeInterval(pctxt, string, flags)   pd_Interval (pctxt, string, TRUE, flags, flags)
#define pd_RecStartEndDateTimeInterval(pctxt, string, flags)   pd_Interval (pctxt, string, TRUE, flags, flags)
#define pd_RecDurationInterval(pctxt, string)   pd_Duration (pctxt, string, TRUE)
#define pd_RecStartDateDurationInterval(pctxt, string, flags)   pd_Interval (pctxt, string, TRUE, flags, OSDURATION)
#define pd_RecStartTimeDurationInterval(pctxt, string, flags)   pd_Interval (pctxt, string, TRUE, flags, OSDURATION)
#define pd_RecStartDateTimeDurationInterval(pctxt, string, flags)   pd_Interval (pctxt, string, TRUE, flags, OSDURATION)
#define pd_RecDurationEndDateInterval(pctxt, string, flags)   pd_Interval (pctxt, string, TRUE, OSDURATION, flags)
#define pd_RecDurationEndTimeInterval(pctxt, string, flags)   pd_Interval (pctxt, string, TRUE, OSDURATION, flags)
#define pd_RecDurationEndDateTimeInterval(pctxt, string, flags)   pd_Interval (pctxt, string, TRUE, OSDURATION, flags)
#define pd_StartEndDateInterval(pctxt, string, flags)   pd_Interval (pctxt, string, FALSE, flags, flags)
#define pd_StartEndTimeInterval(pctxt, string, flags)   pd_Interval (pctxt, string, FALSE, flags, flags)
#define pd_StartEndDateTimeInterval(pctxt, string, flags)   pd_Interval (pctxt, string, FALSE, flags, flags)
#define pd_StartDateDurationInterval(pctxt, string, flags)   pd_Interval (pctxt, string, FALSE, flags, OSDURATION)
#define pd_StartTimeDurationInterval(pctxt, string, flags)   pd_Interval (pctxt, string, FALSE, flags, OSDURATION)
#define pd_StartDateTimeDurationInterval(pctxt, string, flags)   pd_Interval (pctxt, string, FALSE, flags, OSDURATION)
#define pd_TimeOfDay(pctxt, string)   pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS)
#define pd_TimeOfDayUtc(pctxt, string)   pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|OSUTC)
#define pd_TimeOfDayAndDiff(pctxt, string)   pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|OSDIFF)
#define pd_TimeOfDayAndFraction(pctxt, string, n)   pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|(n))
#define pd_TimeOfDayUtcAndFraction(pctxt, string, n)   pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|OSUTC|(n))
#define pd_TimeOfDayAndDiffAndFraction(pctxt, string, n)   pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|OSDIFF|(n))
#define pd_Year(pctxt, string)   pd_DateStr (pctxt, string, OSYEAR)
#define pd_YearDay(pctxt, string)   pd_DateStr (pctxt, string, OSYEAR|OSDAY)
#define pd_YearMonth(pctxt, string)   pd_DateStr (pctxt, string, OSYEAR|OSMONTH)
#define pd_YearMonthDay(pctxt, string)   pd_DateStr (pctxt, string, OSYEAR|OSMONTH|OSDAY);
#define pd_YearWeek(pctxt, string)   pd_DateStr (pctxt, string, OSYEAR|OSWEEK)
#define pd_YearWeekDay(pctxt, string)   pd_DateStr (pctxt, string, OSYEAR|OSWEEK|OSDAY)
#define pe_AnyCentury(pctxt, string)   pe_DateStr (pctxt, string, OSANY|OSCENTURY)
#define pe_AnyCenturyInt(pctxt, value)   pe_UnconsInteger (pctxt, value)
#define pe_AnyDate(pctxt, string)   pe_DateStr (pctxt, string, OSANY|OSYEAR|OSMONTH|OSDAY)
#define pe_AnyYear(pctxt, string)   pe_DateStr (pctxt, string, OSANY|OSYEAR)
#define pe_AnyYearInt(pctxt, value)   pe_UnconsInteger (pctxt, value)
#define pe_AnyYearDay(pctxt, string)   pe_DateStr (pctxt, string, OSANY|OSYEAR|OSDAY)
#define pe_AnyYearMonth(pctxt, string)   pe_DateStr (pctxt, string, OSANY|OSYEAR|OSMONTH)
#define pe_AnyYearMonthDay(pctxt, string)   pe_DateStr (pctxt, string, OSANY|OSYEAR|OSMONTH|OSDAY)
#define pe_AnyYearWeek(pctxt, string)   pe_DateStr (pctxt, string, OSANY|OSYEAR|OSWEEK)
#define pe_AnyYearWeekDay(pctxt, string)   pe_DateStr (pctxt, string, OSANY|OSYEAR|OSWEEK|OSDAY)
#define pe_Century(pctxt, string)   pe_DateStr (pctxt, string, OSCENTURY)
#define pe_CenturyInt(pctxt, value)   pe_ConsUnsigned (pctxt, value, 0, 99)
#define pe_Date(pctxt, string)   pe_DateStr (pctxt, string, OSYEAR_BASIC|OSYEAR|OSMONTH|OSDAY)
#define pe_DateTime(pctxt, string)
#define pe_DurationInterval(pctxt, string)   pe_Duration (pctxt, string, FALSE)
#define pe_DurationEndDateInterval(pctxt, string, flags)   pe_Interval (pctxt, string, FALSE, OSDURATION, flags)
#define pe_DurationEndTimeInterval(pctxt, string, flags)   pe_Interval (pctxt, string, FALSE, OSDURATION, flags)
#define pe_DurationEndDateTimeInterval(pctxt, string, flags)   pe_Interval (pctxt, string, FALSE, OSDURATION, flags)
#define pe_Hours(pctxt, string)   pe_TimeStr (pctxt, string, OSHOURS)
#define pe_Hours(pctxt, string)   pe_TimeStr (pctxt, string, OSHOURS)
#define pe_HoursUtc(pctxt, string)   pe_TimeStr (pctxt, string, OSHOURS|OSUTC)
#define pe_HoursUtc(pctxt, string)   pe_TimeStr (pctxt, string, OSHOURS|OSUTC)
#define pe_HoursAndDiff(pctxt, string)   pe_TimeStr (pctxt, string, OSHOURS|OSDIFF)
#define pe_HoursAndFraction(pctxt, string, n)   pe_TimeStr (pctxt, string, OSHOURS|(n))
#define pe_HoursUtcAndFraction(pctxt, string, n)   pe_TimeStr (pctxt, string, OSHOURS|OSUTC|(n))
#define pe_HoursAndDiffAndFraction(pctxt, string, n)   pe_TimeStr (pctxt, string, OSHOURS|OSDIFF|(n))
#define pe_Minutes(pctxt, string)   pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES)
#define pe_MinutesUtc(pctxt, string)   pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSUTC)
#define pe_MinutesAndDiff(pctxt, string)   pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSDIFF)
#define pe_MinutesAndFraction(pctxt, string, n)   pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|(n))
#define pe_MinutesUtcAndFraction(pctxt, string, n)   pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSUTC|(n))
#define pe_MinutesAndDiffAndFraction(pctxt, string, n)   pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSDIFF|(n))
#define pe_RecStartEndDateInterval(pctxt, string, flags)   pe_Interval (pctxt, string, TRUE, flags, flags)
#define pe_RecStartEndTimeInterval(pctxt, string, flags)   pe_Interval (pctxt, string, TRUE, flags, flags)
#define pe_RecStartEndDateTimeInterval(pctxt, string, flags)   pe_Interval (pctxt, string, TRUE, flags, flags)
#define pe_RecDurationInterval(pctxt, string)   pe_Duration (pctxt, string, TRUE)
#define pe_RecStartDateDurationInterval(pctxt, string, flags)   pe_Interval (pctxt, string, TRUE, flags, OSDURATION)
#define pe_RecStartTimeDurationInterval(pctxt, string, flags)   pe_Interval (pctxt, string, TRUE, flags, OSDURATION)
#define pe_RecStartDateTimeDurationInterval(pctxt, string, flags)   pe_Interval (pctxt, string, TRUE, flags, OSDURATION)
#define pe_RecDurationEndDateInterval(pctxt, string, flags)   pe_Interval (pctxt, string, TRUE, OSDURATION, flags)
#define pe_RecDurationEndTimeInterval(pctxt, string, flags)   pe_Interval (pctxt, string, TRUE, OSDURATION, flags)
#define pe_RecDurationEndDateTimeInterval(pctxt, string, flags)   pe_Interval (pctxt, string, TRUE, OSDURATION, flags)
#define pe_StartEndDateInterval(pctxt, string, flags)   pe_Interval (pctxt, string, FALSE, flags, flags)
#define pe_StartEndTimeInterval(pctxt, string, flags)   pe_Interval (pctxt, string, FALSE, flags, flags)
#define pe_StartEndDateTimeInterval(pctxt, string, flags)   pe_Interval (pctxt, string, FALSE, flags, flags)
#define pe_StartDateDurationInterval(pctxt, string, flags)   pe_Interval (pctxt, string, FALSE, flags, OSDURATION)
#define pe_StartTimeDurationInterval(pctxt, string, flags)   pe_Interval (pctxt, string, FALSE, flags, OSDURATION)
#define pe_StartDateTimeDurationInterval(pctxt, string, flags)   pe_Interval (pctxt, string, FALSE, flags, OSDURATION)
#define pe_TimeOfDay(pctxt, string)   pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS)
#define pe_TimeOfDayUtc(pctxt, string)   pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|OSUTC)
#define pe_TimeOfDayAndDiff(pctxt, string)   pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|OSDIFF)
#define pe_TimeOfDayAndFraction(pctxt, string, n)   pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|(n))
#define pe_TimeOfDayUtcAndFraction(pctxt, string, n)   pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|OSUTC|(n))
#define pe_TimeOfDayAndDiffAndFraction(pctxt, string, n)   pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|OSDIFF|(n))
#define pe_Year(pctxt, string)   pe_DateStr (pctxt, string, OSYEAR)
#define pe_YearDay(pctxt, string)   pe_DateStr (pctxt, string, OSYEAR|OSDAY)
#define pe_YearMonth(pctxt, string)   pe_DateStr (pctxt, string, OSYEAR|OSMONTH)
#define pe_YearMonthDay(pctxt, string)   pe_DateStr (pctxt, string, OSYEAR|OSMONTH|OSDAY)
#define pe_YearWeek(pctxt, string)   pe_DateStr (pctxt, string, OSYEAR|OSWEEK)
#define pe_YearWeekDay(pctxt, string)   pe_DateStr (pctxt, string, OSYEAR|OSWEEK|OSDAY)

Typedefs

typedef struct PERField PERField

Functions

int pu_checkSizeConstraint (OSCTXT *pctxt, int size)
Asn1SizeCnst * pu_getSizeConstraint (OSCTXT *pctxt, OSBOOL extbit)
int pu_getBitOffset (OSCTXT *pctxt)
void pu_setBitOffset (OSCTXT *pctxt, int bitOffset)

Detailed Description

The ASN.1 Packed Encoding Rules (PER) runtime library contains the low-level constants, types, and functions that are assembled by the compiler to encode/decode more complex structures. The PER low-level C encode/decode functions are identified by their prefixes: pe_ for PER encode, pd_ for PERdecode, and pu_ for PER utility functions.


Define Documentation

#define pd_bit ( pctxt,
pvalue   )     rtxDecBit(pctxt,pvalue)

perutil

#define PD_BYTE_ALIGN0 ( pctxt   ) 
Value:
((!(pctxt)->buffer.aligned) ? 0 : \
(((pctxt)->buffer.bitOffset != 8) ? ( \
(pctxt)->buffer.byteIndex++,       \
(pctxt)->buffer.bitOffset = 8,     \
0) : 0                    \
))
#define PD_CHECKSEQOFLEN ( pctxt,
numElements,
minElemBits   ) 
Value:
((pctxt->buffer.size > 0) ?  \
(((numElements * minElemBits) > (pctxt->buffer.size * 8)) ? \
LOG_RTERR (pctxt,ASN_E_INVLEN) : 0) : 0)
#define pd_DateTime ( pctxt,
string   ) 
Value:
pd_DateTimeStr (pctxt, string, \
OSYEAR_BASIC|OSYEAR|OSMONTH|OSDAY|OSHOURS|OSMINUTES|OSSECONDS);
#define pd_NumericString ( pctxt,
pvalue,
permCharSet   ) 
Value:
pd_ConstrainedStringEx (pctxt, pvalue, \
(permCharSet == 0)?NUM_CANSET:permCharSet, 4, 4, 4)
#define pe_DateTime ( pctxt,
string   ) 
Value:
pe_DateTimeStr (pctxt, string, \
OSYEAR_BASIC|OSYEAR|OSMONTH|OSDAY|OSHOURS|OSMINUTES|OSSECONDS)
#define pe_NumericString ( pctxt,
value,
permCharSet   ) 
Value:
pe_ConstrainedStringEx (pctxt, value, \
(permCharSet == 0)?NUM_CANSET:permCharSet, 4, 4, 4)
#define PU_GETPADBITS ( pctxt   )     (((pctxt)->buffer.bitOffset == 8) ? 0 : (pctxt)->buffer.bitOffset)

This macro returns the number of padding bits in the last byte following an encode or decode operation.

#define PU_GETSIZECONSTRAINT ( pctxt,
extbit   ) 
Value:
((extbit) ? \
&ACINFO(pctxt)->sizeConstraint.ext : &ACINFO(pctxt)->sizeConstraint.root)
#define PU_SETCHARSET ( csetvar,
canset,
abits,
ubits   ) 
Value:
csetvar.charSet.nchars = 0; \
csetvar.canonicalSet = canset; \
csetvar.canonicalSetSize = sizeof(canset)-1; \
csetvar.canonicalSetBits = pu_bitcnt(csetvar.canonicalSetSize); \
csetvar.charSetUnalignedBits = ubits; \
csetvar.charSetAlignedBits = abits;
#define PU_SETCTXTBITOFFSET ( pctxt,
_bitOffset   ) 
Value:
do { \
(pctxt)->buffer.byteIndex = (_bitOffset / 8); \
(pctxt)->buffer.bitOffset = (OSUINT16)(8 - (_bitOffset % 8)); \
} while(0)
#define PU_SETSIZECONSTRAINT ( pctxt,
rootLower,
rootUpper,
extLower,
extUpper   ) 
Value:
ACINFO(pctxt)->sizeConstraint.root.lower = rootLower; \
ACINFO(pctxt)->sizeConstraint.root.upper = rootUpper; \
ACINFO(pctxt)->sizeConstraint.ext.lower = extLower; \
ACINFO(pctxt)->sizeConstraint.ext.upper = extUpper