00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00058 #ifndef _OSRTPER_H_
00059 #define _OSRTPER_H_
00060
00061 #include "rtsrc/asn1type.h"
00062 #include "rtsrc/asn1CharSet.h"
00063 #include "rtxsrc/rtxBitEncode.h"
00064 #include "rtxsrc/rtxBitDecode.h"
00065 #include "rtxsrc/rtxBuffer.h"
00066 #include "rtxsrc/rtxDiagBitTrace.h"
00067
00079
00080
00081
00082
00083
00084 #define ASN_K_EXTENUM 999
00085
00086
00087 #define OSYEAR_BASIC OSUINTCONST(0x8000000)
00088 #define OSYEAR_PROLEPTIC OSUINTCONST(0x4000000)
00089 #define OSYEAR_NEGATIVE OSUINTCONST(0x2000000)
00090 #define OSYEAR_L(n) ((OSUINT32)(n) << 28)
00091
00092 #define OSYEAR_MASK \
00093 (OSYEAR_BASIC|OSYEAR_PROLEPTIC|OSYEAR_NEGATIVE|OSYEAR_L(0xF))
00094
00095 #define OSANY (OSYEAR_NEGATIVE|OSYEAR_L(5))
00096 #define OSANY_MASK (OSYEAR_NEGATIVE|OSYEAR_L(0xF))
00097
00098 #define OSCENTURY 0x4000u
00099 #define OSYEAR 0x2000u
00100 #define OSMONTH 0x1000u
00101 #define OSWEEK 0x0800u
00102 #define OSDAY 0x0400u
00103
00104 #define OSHOURS 0x0200u
00105 #define OSMINUTES 0x0100u
00106 #define OSSECONDS 0x0080u
00107 #define OSUTC 0x0040u
00108 #define OSDIFF 0x0020u
00109
00110 #define OSFRACTION 0x000Fu
00111
00112 #define OSDURATION 0x0010u
00113
00114
00115
00116
00117 typedef struct PERField {
00118 const char* name;
00119 size_t bitOffset;
00120 size_t numbits;
00121 OSRTSList* openTypeFields;
00122 } PERField;
00123
00124
00125
00126
00127 typedef struct {
00128 unsigned char lb, lbm;
00129 char fmtBitBuffer[40], fmtHexBuffer[10], fmtAscBuffer[10];
00130 int fmtBitCharIdx, fmtHexCharIdx, fmtAscCharIdx;
00131 } BinDumpBuffer;
00132
00133
00134
00135 #define PU_SETCHARSET(csetvar, canset, abits, ubits) \
00136 csetvar.charSet.nchars = 0; \
00137 csetvar.canonicalSet = canset; \
00138 csetvar.canonicalSetSize = sizeof(canset)-1; \
00139 csetvar.canonicalSetBits = pu_bitcnt(csetvar.canonicalSetSize); \
00140 csetvar.charSetUnalignedBits = ubits; \
00141 csetvar.charSetAlignedBits = abits;
00142
00143
00144
00145
00146 #ifdef _TRACE
00147 #define PU_INSLENFLD(pctxt) RTDIAG_INSBITFLDLEN(pctxt)
00148 #define PU_NEWFIELD(pctxt,suffix) RTDIAG_NEWBITFIELD(pctxt,suffix)
00149 #define PU_PUSHNAME(pctxt,name)
00150 #define PU_PUSHELEMNAME(pctxt,idx)
00151 #define PU_POPNAME(pctxt)
00152 #define PU_SETBITOFFSET(pctxt) RTDIAG_SETBITFLDOFFSET(pctxt)
00153 #define PU_SETBITCOUNT(pctxt) RTDIAG_SETBITFLDCOUNT(pctxt)
00154 #define PU_SETOPENTYPEFLDLIST(pMainBFList,pOpenTypeBFList) \
00155 pu_setRtxDiagOpenTypeFldList(pMainBFList,pOpenTypeBFList)
00156 #else
00157 #define PU_INSLENFLD(pctxt)
00158 #define PU_NEWFIELD(pctxt,suffix)
00159 #define PU_PUSHNAME(pctxt,name)
00160 #define PU_PUSHELEMNAME(pctxt,idx)
00161 #define PU_POPNAME(pctxt)
00162 #define PU_SETBITOFFSET(pctxt)
00163 #define PU_SETBITCOUNT(pctxt)
00164 #define PU_SETOPENTYPEFLDLIST(pMainBFList,pOpenTypeBFList)
00165 #endif
00166
00167 #ifdef __cplusplus
00168 extern "C" {
00169 #endif
00170
00171 #ifdef __SYMBIAN32__
00172 #define EXTPERCLASS
00173
00174 #ifdef BUILDASN1PERDLL
00175 #define EXTERNPER EXPORT_C
00176 #define EXTPERMETHOD EXPORT_C
00177 #elif defined(USEASN1PERDLL)
00178 #define EXTERNPER IMPORT_C
00179 #define EXTPERMETHOD IMPORT_C
00180 #else
00181 #define EXTERNPER
00182 #define EXTPERMETHOD
00183 #endif
00184
00185 #else
00186 #define EXTPERMETHOD
00187
00188 #ifdef BUILDASN1PERDLL
00189 #define EXTERNPER __declspec(dllexport)
00190 #define EXTPERCLASS __declspec(dllexport)
00191 #elif defined (USEASN1PERDLL)
00192 #define EXTERNPER __declspec(dllimport)
00193 #define EXTPERCLASS __declspec(dllimport)
00194 #else
00195 #define EXTERNPER
00196 #define EXTPERCLASS
00197 #endif
00198
00199 #endif
00200
00201
00202
00203
00204
00205 #define PD_BIT(pctxt,pvalue) DEC_BIT(pctxt,pvalue)
00206
00207
00208
00209 #define PU_SETSIZECONSTRAINT(pctxt,rootLower,rootUpper,extLower,extUpper) \
00210 ACINFO(pctxt)->sizeConstraint.root.lower = rootLower; \
00211 ACINFO(pctxt)->sizeConstraint.root.upper = rootUpper; \
00212 ACINFO(pctxt)->sizeConstraint.ext.lower = extLower; \
00213 ACINFO(pctxt)->sizeConstraint.ext.upper = extUpper
00214
00215
00216
00217 #define PU_INITSIZECONSTRAINT(pctxt) PU_SETSIZECONSTRAINT(pctxt,0,0,0,0)
00218
00219
00220
00221 #define PU_GETSIZECONSTRAINT(pctxt,extbit) ((extbit) ? \
00222 &ACINFO(pctxt)->sizeConstraint.ext : &ACINFO(pctxt)->sizeConstraint.root)
00223
00224
00225
00226
00227 #define PU_GETCTXTBITOFFSET(pctxt) \
00228 (((pctxt)->buffer.byteIndex * 8) + (8 - (pctxt)->buffer.bitOffset))
00229
00232 #define PU_GETPADBITS(pctxt) \
00233 (((pctxt)->buffer.bitOffset == 8) ? 0 : (pctxt)->buffer.bitOffset)
00234
00235
00236
00237 #define PU_SETCTXTBITOFFSET(pctxt,_bitOffset) \
00238 do { \
00239 (pctxt)->buffer.byteIndex = (_bitOffset / 8); \
00240 (pctxt)->buffer.bitOffset = (OSUINT16)(8 - (_bitOffset % 8)); \
00241 } while(0)
00242
00243
00244
00245 #define PD_BYTE_ALIGN0(pctxt) \
00246 ((!(pctxt)->buffer.aligned) ? 0 : \
00247 (((pctxt)->buffer.bitOffset != 8) ? ( \
00248 (pctxt)->buffer.byteIndex++, \
00249 (pctxt)->buffer.bitOffset = 8, \
00250 0) : 0 \
00251 ))
00252
00253 #ifdef _TRACE
00254 #define PD_BYTE_ALIGN(pctxt) \
00255 ((!(pctxt)->buffer.aligned) ? 0 : \
00256 (((pctxt)->buffer.bitOffset != 8) ? ( \
00257 (pctxt)->buffer.byteIndex++, \
00258 (pctxt)->buffer.bitOffset = 8, \
00259 pu_setFldBitOffset(pctxt), \
00260 0) : 0 \
00261 ))
00262 #else
00263 #define PD_BYTE_ALIGN PD_BYTE_ALIGN0
00264 #endif
00265
00266 #define PD_CHECKSEQOFLEN(pctxt,numElements,minElemBits) \
00267 ((pctxt->buffer.size > 0) ? \
00268 (((numElements * minElemBits) > (pctxt->buffer.size * 8)) ? \
00269 LOG_RTERR (pctxt,ASN_E_INVLEN) : 0) : 0)
00270
00271 #define PD_OPENTYPE_START(pctxt,pSavedSize,pSavedBitOff) \
00272 pd_OpenTypeStart(pctxt,pSavedSize,pSavedBitOff);
00273
00274 #define PD_OPENTYPE_END(pctxt,savedSize,savedBitOff) \
00275 pd_OpenTypeEnd(pctxt,savedSize,savedBitOff);
00276
00314 EXTERNPER int pd_BigInteger (OSCTXT *pctxt, const char** ppvalue);
00315
00332 EXTERNPER int pd_BigIntegerEx (OSCTXT *pctxt, const char** ppvalue, int radix);
00333
00351 EXTERNPER int pd_BigIntegerValue
00352 (OSCTXT *pctxt, const char** ppvalue, int radix, OSUINT32 nbytes);
00353
00374 EXTERNPER int pd_BitString
00375 (OSCTXT* pctxt, OSUINT32* numbits_p, OSOCTET* buffer,
00376 OSUINT32 bufsiz);
00377
00378 EXTERNPER int pd_BitString32
00379 (OSCTXT* pctxt, ASN1BitStr32* pbitstr, OSUINT32 lower, OSUINT32 upper);
00380
00405 EXTERNPER int pd_BMPString
00406 (OSCTXT* pctxt, ASN1BMPString* pvalue, Asn116BitCharSet* permCharSet);
00407
00431 EXTERNPER int pd_UniversalString
00432 (OSCTXT* pctxt, ASN1UniversalString* pvalue, Asn132BitCharSet* permCharSet);
00433
00445 EXTERNPER int pd_byte_align (OSCTXT* pctxt);
00446
00457 EXTERNPER int pd_ChoiceOpenTypeExt
00458 (OSCTXT* pctxt, const OSOCTET** object_p2, OSUINT32* pnumocts);
00459
00472 EXTERNPER int pd_ConsInteger
00473 (OSCTXT* pctxt, OSINT32* pvalue, OSINT32 lower, OSINT32 upper);
00474
00488 EXTERNPER int pd_ConsInt8
00489 (OSCTXT* pctxt, OSINT8* pvalue, OSINT32 lower, OSINT32 upper);
00490
00504 EXTERNPER int pd_ConsInt16 (OSCTXT* pctxt,
00505 OSINT16* pvalue, OSINT32 lower, OSINT32 upper);
00506
00520 EXTERNPER int pd_ConsInt64 (OSCTXT* pctxt,
00521 OSINT64* pvalue, OSINT64 lower, OSINT64 upper);
00522
00536 EXTERNPER int pd_ConsUnsigned
00537 (OSCTXT* pctxt, OSUINT32* pvalue, OSUINT32 lower, OSUINT32 upper);
00538
00552 EXTERNPER int pd_ConsUInt8 (OSCTXT* pctxt,
00553 OSUINT8* pvalue, OSUINT32 lower, OSUINT32 upper);
00554
00568 EXTERNPER int pd_ConsUInt16
00569 (OSCTXT* pctxt, OSUINT16* pvalue, OSUINT32 lower, OSUINT32 upper);
00570
00584 EXTERNPER int pd_ConsUInt64 (OSCTXT* pctxt, OSUINT64* pvalue,
00585 OSUINT64 lower, OSUINT64 upper);
00586
00604 EXTERNPER int pd_ConsWholeNumber
00605 (OSCTXT* pctxt, OSUINT32* padjusted_value, OSUINT32 range_value);
00606
00624 EXTERNPER int pd_ConsWholeNumber64
00625 (OSCTXT* pctxt, OSUINT64* padjusted_value, OSUINT64 range_value);
00626
00643 EXTERNPER int pd_ConstrainedString
00644 (OSCTXT* pctxt, const char** string, Asn1CharSet* pCharSet);
00645
00665 EXTERNPER int pd_ConstrainedStringEx
00666 (OSCTXT* pctxt, const char** string, const char* charSet,
00667 OSUINT32 abits, OSUINT32 ubits, OSUINT32 canSetBits);
00668
00687 EXTERNPER int pd_ConstrFixedLenStringEx
00688 (OSCTXT* pctxt, char* strbuf, size_t bufsiz, const char* charSet,
00689 OSUINT32 abits, OSUINT32 ubits, OSUINT32 canSetBits);
00690
00713 EXTERNPER int pd_16BitConstrainedString
00714 (OSCTXT* pctxt, Asn116BitCharString* pString, Asn116BitCharSet* pCharSet);
00715
00738 EXTERNPER int pd_32BitConstrainedString
00739 (OSCTXT* pctxt, Asn132BitCharString* pString, Asn132BitCharSet* pCharSet);
00740
00752 EXTERNPER int pd_DateStr (OSCTXT* pctxt, const char** string, OSUINT32 flags);
00753
00767 EXTERNPER int pd_DateTimeStr
00768 (OSCTXT* pctxt, const char** string, OSUINT32 flags);
00769
00781 EXTERNPER int pd_Duration (OSCTXT* pctxt, const char** string, OSBOOL rec);
00782
00805 EXTERNPER int pd_DynBitString
00806 (OSCTXT* pctxt, ASN1DynBitStr* pBitStr);
00807
00824 EXTERNPER int pd_DynOctetString
00825 (OSCTXT* pctxt, ASN1DynOctStr* pOctStr);
00826
00843 EXTERNPER int pd_GetBinStrDataOffset
00844 (OSCTXT* pctxt, OSUINT32* pnumbits, OSBOOL bitStrFlag);
00845
00860 EXTERNPER int pd_GetComponentLength (OSCTXT* pctxt, OSUINT32 itemBits);
00861
00878 EXTERNPER int pd_Interval
00879 (OSCTXT* pctxt, const char** string, OSBOOL rec,
00880 OSUINT32 startFlags, OSUINT32 endFlags);
00881
00895 EXTERNPER int pd_Length (OSCTXT* pctxt, OSUINT32* pvalue);
00896
00904
00905 #define pd_moveBitCursor(pctxt,bitOffset) rtxMoveBitCursor(pctxt,bitOffset)
00906
00919 EXTERNPER int pd_ObjectIdentifier (OSCTXT* pctxt, ASN1OBJID* pvalue);
00920
00934 EXTERNPER int pd_oid64 (OSCTXT* pctxt, ASN1OID64* pvalue);
00935
00948 EXTERNPER int pd_RelativeOID (OSCTXT* pctxt, ASN1OBJID* pvalue);
00949
00968 EXTERNPER int pd_OctetString
00969 (OSCTXT* pctxt, OSUINT32* pnumocts, OSOCTET* buffer,
00970 OSUINT32 bufsiz);
00971
00989 EXTERNPER int pd_OpenType
00990 (OSCTXT* pctxt, const OSOCTET** object_p2, OSUINT32* pnumocts);
00991
01013 EXTERNPER int pd_OpenTypeExt
01014 (OSCTXT* pctxt, const OSOCTET** object_p2, OSUINT32* pnumocts);
01015
01016 #ifndef _NO_ASN1REAL
01017
01030 EXTERNPER int pd_Real (OSCTXT* pctxt, OSREAL* pvalue);
01031 #endif
01032
01048 EXTERNPER int pd_SmallLength
01049 (OSCTXT* pctxt, OSUINT32* pvalue);
01050
01066 EXTERNPER int pd_SmallNonNegWholeNumber
01067 (OSCTXT* pctxt, OSUINT32* pvalue);
01068
01080 EXTERNPER int pd_SemiConsInteger
01081 (OSCTXT* pctxt, OSINT32* pvalue, OSINT32 lower);
01082
01095 EXTERNPER int pd_SemiConsUnsigned
01096 (OSCTXT* pctxt, OSUINT32* pvalue, OSUINT32 lower);
01097
01110 EXTERNPER int pd_SemiConsInt64
01111 (OSCTXT* pctxt, OSINT64* pvalue, OSINT64 lower);
01112
01125 EXTERNPER int pd_SemiConsUInt64
01126 (OSCTXT* pctxt, OSUINT64* pvalue, OSUINT64 lower);
01127
01140 EXTERNPER int pd_TimeStr (OSCTXT* pctxt, const char** string, OSUINT32 flags);
01141
01151 EXTERNPER int pd_UnconsInteger (OSCTXT *pctxt, OSINT32* pvalue);
01152
01163 EXTERNPER int pd_UnconsLength (OSCTXT *pctxt, OSUINT32* pvalue);
01164
01177 EXTERNPER int pd_UnconsUnsigned (OSCTXT* pctxt, OSUINT32* pvalue);
01178
01179
01190 EXTERNPER int pd_UnconsInt64 (OSCTXT *pctxt, OSINT64* pvalue);
01191
01205 EXTERNPER int pd_UnconsUInt64 (OSCTXT* pctxt, OSUINT64* pvalue);
01206
01218 EXTERNPER int pd_VarWidthCharString (OSCTXT* pctxt, const char** pvalue);
01219
01229 EXTERNPER int pd_YearInt (OSCTXT* pctxt, OSINT32* pvalue);
01230
01231 #ifndef _NO_ASN1REAL
01232
01245 EXTERNPER int pd_Real10 (OSCTXT *pctxt, const char** ppvalue);
01246 #endif
01247
01253 EXTERNPER OSBOOL pd_isFragmented (OSCTXT* pctxt);
01254
01255 EXTERNPER void pd_OpenTypeStart
01256 (OSCTXT* pctxt, OSUINT32* pSavedSize, OSINT16* pSavedBitOff);
01257
01258 EXTERNPER int pd_OpenTypeEnd
01259 (OSCTXT* pctxt, OSUINT32 savedSize, OSINT16 savedBitOff);
01260
01279 EXTERNPER int uperDecConstrString
01280 (OSCTXT* pctxt, const char** string, const char* charSet,
01281 OSUINT32 nbits, OSUINT32 canSetBits);
01282
01301 EXTERNPER int uperDecConstrFixedLenString
01302 (OSCTXT* pctxt, char* strbuf, size_t bufsiz, const char* charSet,
01303 OSUINT32 nbits, OSUINT32 canSetBits);
01304
01307
01351 EXTERNPER int pe_16BitConstrainedString
01352 (OSCTXT* pctxt, Asn116BitCharString value, Asn116BitCharSet* pCharSet);
01353
01376 EXTERNPER int pe_32BitConstrainedString
01377 (OSCTXT* pctxt, Asn132BitCharString value, Asn132BitCharSet* pCharSet);
01378
01389 EXTERNPER int pe_2sCompBinInt
01390 (OSCTXT* pctxt, OSINT32 value);
01391
01402 EXTERNPER int pe_2sCompBinInt64 (OSCTXT* pctxt, OSINT64 value);
01403
01410 EXTERNPER int pe_aligned_octets
01411 (OSCTXT* pctxt, OSOCTET* pvalue, OSUINT32 nocts);
01412
01432 EXTERNPER int pe_BigInteger
01433 (OSCTXT* pctxt, const char* pvalue);
01434
01444
01445
01446 #define pe_bit(pctxt,value) rtxEncBit(pctxt,value)
01447
01458
01459
01460 #define pe_bits(pctxt,value,nbits) rtxEncBits(pctxt,value,nbits)
01461
01474 EXTERNPER int pe_bits64 (OSCTXT* pctxt, OSUINT64 value, OSUINT32 nbits);
01475
01489 EXTERNPER int pe_BitString
01490 (OSCTXT* pctxt, OSUINT32 numocts, const OSOCTET* data);
01491
01492 EXTERNPER int pe_BitString32
01493 (OSCTXT* pctxt, ASN1BitStr32* pbitstr, OSUINT32 lower, OSUINT32 upper);
01494
01518 EXTERNPER int pe_BMPString
01519 (OSCTXT* pctxt, ASN1BMPString value, Asn116BitCharSet* permCharSet);
01520
01544 EXTERNPER int pe_UniversalString
01545 (OSCTXT* pctxt, ASN1UniversalString value, Asn132BitCharSet* permCharSet);
01546
01558 EXTERNPER int pe_byte_align (OSCTXT* pctxt);
01559
01575
01576 #define pe_CheckBuffer(pctxt,nbytes) rtxCheckOutputBuffer(pctxt,nbytes)
01577
01589 EXTERNPER int pe_ChoiceTypeExt
01590 (OSCTXT* pctxt, OSUINT32 numocts, const OSOCTET* data);
01591
01604 EXTERNPER int pe_ConsInteger
01605 (OSCTXT* pctxt, OSINT32 value, OSINT32 lower, OSINT32 upper);
01606
01619 EXTERNPER int pe_ConsInt64 (OSCTXT* pctxt,
01620 OSINT64 value, OSINT64 lower, OSINT64 upper);
01621
01633 EXTERNPER int pe_ConstrainedString
01634 (OSCTXT* pctxt, const char* string, Asn1CharSet* pCharSet);
01635
01653 EXTERNPER int pe_ConstrainedStringEx
01654 (OSCTXT* pctxt, const char* string, const char* charSet,
01655 OSUINT32 abits, OSUINT32 ubits, OSUINT32 canSetBits);
01656
01672 EXTERNPER int pe_ConsUnsigned
01673 (OSCTXT* pctxt, OSUINT32 value, OSUINT32 lower, OSUINT32 upper);
01674
01694 EXTERNPER int pe_ConsUInt64 (OSCTXT* pctxt, OSUINT64 value,
01695 OSUINT64 lower, OSUINT64 upper);
01696
01712 EXTERNPER int pe_ConsWholeNumber
01713 (OSCTXT* pctxt, OSUINT32 adjusted_value, OSUINT32 range_value);
01714
01730 EXTERNPER int pe_ConsWholeNumber64
01731 (OSCTXT* pctxt, OSUINT64 adjusted_value, OSUINT64 range_value);
01732
01744 EXTERNPER int pe_DateStr (OSCTXT* pctxt, const char* string, OSUINT32 flags);
01745
01759 EXTERNPER int pe_DateTimeStr
01760 (OSCTXT* pctxt, const char* string, OSUINT32 flags);
01761
01773 EXTERNPER int pe_Duration (OSCTXT* pctxt, const char* string, OSBOOL rec);
01774
01778 EXTERNPER OSUINT32 pe_GetIntLen (OSUINT32 value);
01779
01785 EXTERNPER size_t pe_GetMsgBitCnt (OSCTXT* pctxt);
01786
01805 EXTERNPER OSOCTET* pe_GetMsgPtr (OSCTXT* pctxt, OSINT32* pLength);
01806
01817 EXTERNPER OSOCTET* pe_GetMsgPtrU (OSCTXT* pctxt, OSUINT32* pLength);
01818
01836 EXTERNPER int pe_Interval
01837 (OSCTXT* pctxt, const char* string, OSBOOL rec,
01838 OSUINT32 startFlags, OSUINT32 endFlags);
01839
01857 EXTERNPER int pe_Length (OSCTXT* pctxt, OSUINT32 value);
01858
01869 EXTERNPER int pe_NonNegBinInt (OSCTXT* pctxt, OSUINT32 value);
01870
01881 EXTERNPER int pe_NonNegBinInt64 (OSCTXT* pctxt, OSUINT64 value);
01882
01895 EXTERNPER int pe_ObjectIdentifier (OSCTXT* pctxt, ASN1OBJID* pvalue);
01896
01897 #ifndef _NO_INT64_SUPPORT
01898
01911 EXTERNPER int pe_oid64 (OSCTXT* pctxt, ASN1OID64* pvalue);
01912 #endif
01913
01926 EXTERNPER int pe_RelativeOID (OSCTXT* pctxt, ASN1OBJID* pvalue);
01927
01941
01942
01943 #define pe_octets(pctxt,pvalue,nbits) \
01944 rtxEncBitsFromByteArray(pctxt,pvalue,nbits)
01945
01958 EXTERNPER int pe_OctetString
01959 (OSCTXT* pctxt, OSUINT32 numocts, const OSOCTET* data);
01960
01976 EXTERNPER int pe_OpenType
01977 (OSCTXT* pctxt, OSUINT32 numocts, const OSOCTET* data);
01978
01994 EXTERNPER int pe_OpenTypeEnd (OSCTXT* pctxt, OSUINT32 pos, void* pPerField);
01995
02014 EXTERNPER int pe_OpenTypeExt
02015 (OSCTXT* pctxt, OSRTDList* pElemList);
02016
02026 EXTERNPER int pe_OpenTypeExtBits
02027 (OSCTXT* pctxt, OSRTDList* pElemList);
02028
02043 EXTERNPER int pe_OpenTypeStart
02044 (OSCTXT* pctxt, OSUINT32* pPos, void** ppPerField);
02045
02046 #ifndef _NO_ASN1REAL
02047
02064 EXTERNPER int pe_Real (OSCTXT* pctxt, OSREAL value);
02065 #endif
02066
02081 EXTERNPER int pe_SmallNonNegWholeNumber (OSCTXT* pctxt, OSUINT32 value);
02082
02083
02098 EXTERNPER int pe_SmallLength (OSCTXT* pctxt, OSUINT32 value);
02099
02100
02112 EXTERNPER int pe_SemiConsInteger
02113 (OSCTXT* pctxt, OSINT32 value, OSINT32 lower);
02114
02115 #ifndef _NO_INT64_SUPPORT
02116
02127 EXTERNPER int pe_SemiConsInt64
02128 (OSCTXT* pctxt, OSINT64 value, OSINT64 lower);
02129 #endif
02130
02142 EXTERNPER int pe_SemiConsUnsigned
02143 (OSCTXT* pctxt, OSUINT32 value, OSUINT32 lower);
02144
02145 #ifndef _NO_INT64_SUPPORT
02146
02158 EXTERNPER int pe_SemiConsUInt64
02159 (OSCTXT* pctxt, OSUINT64 value, OSUINT64 lower);
02160 #endif
02161
02174 EXTERNPER int pe_TimeStr (OSCTXT* pctxt, const char* string, OSUINT32 flags);
02175
02184 EXTERNPER int pe_UnconsLength (OSCTXT* pctxt, OSUINT32 value);
02185
02195 EXTERNPER int pe_UnconsInteger (OSCTXT* pctxt, OSINT32 value);
02196
02197 #ifndef _NO_INT64_SUPPORT
02198
02207 EXTERNPER int pe_UnconsInt64 (OSCTXT* pctxt, OSINT64 value);
02208 #endif
02209
02219 EXTERNPER int pe_UnconsUnsigned (OSCTXT* pctxt, OSUINT32 value);
02220
02221 #ifndef _NO_INT64_SUPPORT
02222
02232 EXTERNPER int pe_UnconsUInt64 (OSCTXT* pctxt, OSUINT64 value);
02233 #endif
02234
02247 EXTERNPER int pe_VarWidthCharString (OSCTXT* pctxt, const char* value);
02248
02258 EXTERNPER int pe_YearInt (OSCTXT* pctxt, OSINT32 value);
02259
02260 #ifndef _NO_ASN1REAL
02261
02274 EXTERNPER int pe_Real10 (OSCTXT* pctxt, const char* pvalue);
02275 #endif
02276
02293 EXTERNPER int uperEncConstrString
02294 (OSCTXT* pctxt, const char* string, const char* charSet,
02295 OSUINT32 nbits, OSUINT32 canSetBits);
02296
02299
02300
02301
02322 EXTERNPER int pu_addSizeConstraint (OSCTXT* pctxt, const Asn1SizeCnst* pSize);
02323
02324 EXTERNPER OSBOOL pu_alignCharStr
02325 (OSCTXT* pctxt, OSUINT32 len, OSUINT32 nbits, Asn1SizeCnst* pSize);
02326
02327 EXTERNPER OSUINT32 pu_bitcnt (OSUINT32 value);
02328
02329 EXTERNPER Asn1SizeCnst* pu_checkSize
02330 (Asn1SizeCnst* pSizeList, OSUINT32 value, OSBOOL* pExtendable);
02331
02345 EXTERNPER int pu_checkSizeExt
02346 (Asn1SizeCnst* pSizeCnst, OSUINT32 value, OSBOOL* pExtendable,
02347 Asn1SizeValueRange* pSizeRange, OSBOOL* pExtSize);
02348
02362 EXTERNPER void pu_freeContext (OSCTXT* pctxt);
02363
02364 EXTERNPER size_t pu_getMaskAndIndex (size_t bitOffset, unsigned char* pMask);
02365
02380 EXTERNPER size_t pu_getMsgLen (OSCTXT* pctxt);
02381
02396 EXTERNPER size_t pu_getMsgLenBits (OSCTXT* pctxt);
02397
02406 EXTERNPER void pu_hexdump (OSCTXT* pctxt);
02407
02424 EXTERNPER int pu_setBuffer
02425 (OSCTXT* pctxt, OSOCTET* bufaddr, size_t bufsiz, OSBOOL aligned);
02426
02427 #define pd_setp(pctxt, bufaddr, bufsiz, aligned) \
02428 pu_setBuffer(pctxt, bufaddr, bufsiz, aligned)
02429
02430 #define pe_setp(pctxt, bufaddr, bufsiz, aligned) \
02431 pu_setBuffer(pctxt, bufaddr, bufsiz, aligned)
02432
02433 #define pe_resetp(pctxt) rtxResetContext(pctxt)
02434 #define pd_resetp(pctxt) rtxResetContext(pctxt)
02435
02436
02437
02465 EXTERNPER int pu_initContext
02466 (OSCTXT* pctxt, OSOCTET* bufaddr, OSUINT32 bufsiz, OSBOOL aligned);
02467
02484 EXTERNPER int pu_initContextBuffer (OSCTXT* pTarget, OSCTXT* pSource);
02485
02486 EXTERNPER const char* pu_getFullName
02487 (OSCTXT* pctxt, const char* suffix);
02488
02489 EXTERNPER void pu_init16BitCharSet
02490 (Asn116BitCharSet* pCharSet, OSUNICHAR first, OSUNICHAR last,
02491 OSUINT32 abits, OSUINT32 ubits);
02492
02499 EXTERNPER void pu_insLenField (OSCTXT* pctxt);
02500
02508 EXTERNPER OSBOOL pu_isFixedSize (const Asn1SizeCnst* pSizeList);
02509
02534 EXTERNPER OSCTXT* pu_newContext
02535 (OSOCTET* bufaddr, OSUINT32 bufsiz, OSBOOL aligned);
02536
02545 EXTERNPER PERField* pu_newField
02546 (OSCTXT* pctxt, const char* nameSuffix);
02547
02558 EXTERNPER void pu_initFieldList (OSCTXT* pctxt, OSINT16 bitOffset);
02559
02568 EXTERNPER void pu_initRtxDiagBitFieldList (OSCTXT* pctxt, OSINT16 bitOffset);
02569
02578 EXTERNPER void pu_popName (OSCTXT* pctxt);
02579
02589 EXTERNPER void pu_pushElemName (OSCTXT* pctxt, int idx);
02590
02600 EXTERNPER void pu_pushName (OSCTXT* pctxt, const char* name);
02601
02613 EXTERNPER void pu_setCharSet (Asn1CharSet* pCharSet, const char* permSet);
02614
02629 EXTERNPER void pu_set16BitCharSet
02630 (OSCTXT* pctxt, Asn116BitCharSet* pCharSet, Asn116BitCharSet* pAlphabet);
02631
02632
02641 EXTERNPER void pu_set16BitCharSetFromRange
02642 (Asn116BitCharSet* pCharSet, OSUINT16 firstChar, OSUINT16 lastChar);
02643
02644 EXTERNPER void pu_setFldBitCount (OSCTXT* pctxt);
02645
02646 EXTERNPER void pu_setFldBitOffset (OSCTXT* pctxt);
02647
02648 EXTERNPER void pu_setFldListFromCtxt (OSCTXT* pctxt, OSCTXT* srcctxt);
02649
02650 EXTERNPER void pu_setOpenTypeFldList (OSCTXT* pctxt, OSRTSList* plist);
02651
02652 EXTERNPER void pu_setRtxDiagOpenTypeFldList
02653 (OSRTDiagBitFieldList* pMainBFList, OSRTDiagBitFieldList* pOpenTypeBFList);
02654
02655 EXTERNPER OSBOOL pu_setTrace (OSCTXT* pCtxt, OSBOOL value);
02656
02657 EXTERNPER void pu_setAligned (OSCTXT* pctxt, OSBOOL value);
02658
02659 EXTERNPER void pu_deleteFieldList (OSCTXT* pctxt);
02660
02675 EXTERNPER void pu_bindump (OSCTXT* pctxt, const char* varname);
02676
02677 EXTERNPER void pu_dumpField
02678 (OSCTXT* pctxt, PERField* pField, const char* varname,
02679 size_t nextBitOffset, BinDumpBuffer* pbuf);
02680
02681 EXTERNPER void pu_init32BitCharSet
02682 (Asn132BitCharSet* pCharSet, OS32BITCHAR first, OS32BITCHAR last,
02683 OSUINT32 abits, OSUINT32 ubits);
02684
02699 EXTERNPER void pu_set32BitCharSet
02700 (OSCTXT* pctxt, Asn132BitCharSet* pCharSet, Asn132BitCharSet* pAlphabet);
02701
02710 EXTERNPER void pu_set32BitCharSetFromRange
02711 (Asn132BitCharSet* pCharSet, OSUINT32 firstChar, OSUINT32 lastChar);
02712
02722 EXTERNPER int pu_GetLibVersion (OSVOIDARG);
02723
02731 EXTERNPER const char* pu_GetLibInfo (OSVOIDARG);
02732
02737 #ifdef __cplusplus
02738 }
02739 #endif
02740
02741
02742
02743 #define pd_bit(pctxt,pvalue) rtxDecBit(pctxt,pvalue)
02744
02745 #define pd_bits(pctxt,pvalue,nbits) rtxDecBits(pctxt,pvalue,nbits)
02746
02747 #define pd_octets(pctxt,pbuffer,bufsiz,nbits) \
02748 rtxDecBitsToByteArray(pctxt,pbuffer,bufsiz,nbits)
02749
02750 #define pe_GeneralString(pctxt,value,permCharSet) \
02751 pe_VarWidthCharString(pctxt, value)
02752
02753 #define pe_GraphicString(pctxt,value,permCharSet) \
02754 pe_VarWidthCharString(pctxt, value)
02755
02756 #define pe_T61String(pctxt,value,permCharSet) \
02757 pe_VarWidthCharString(pctxt, value)
02758
02759 #define pe_TeletexString(pctxt,value,permCharSet) \
02760 pe_VarWidthCharString(pctxt, value)
02761
02762 #define pe_VideotexString(pctxt,value,permCharSet) \
02763 pe_VarWidthCharString(pctxt, value)
02764
02765 #define pe_ObjectDescriptor(pctxt,value,permCharSet) \
02766 pe_VarWidthCharString(pctxt, value)
02767
02768 #define pe_UTF8String(pctxt,value,permCharSet) \
02769 pe_VarWidthCharString(pctxt, value)
02770
02771 #define pe_IA5String(pctxt,value,permCharSet) \
02772 pe_ConstrainedStringEx (pctxt, value, permCharSet, 8, 7, 7)
02773
02774 #define pe_NumericString(pctxt,value,permCharSet) \
02775 pe_ConstrainedStringEx (pctxt, value, \
02776 (permCharSet == 0)?NUM_CANSET:permCharSet, 4, 4, 4)
02777
02778 #define pe_PrintableString(pctxt,value,permCharSet) \
02779 pe_ConstrainedStringEx (pctxt, value, permCharSet, 8, 7, 7)
02780
02781 #define pe_VisibleString(pctxt,value,permCharSet) \
02782 pe_ConstrainedStringEx (pctxt, value, permCharSet, 8, 7, 7)
02783
02784 #define pe_ISO646String pe_IA5String
02785 #define pe_GeneralizedTime pe_IA5String
02786 #define pe_UTCTime pe_GeneralizedTime
02787
02788 #define pd_GeneralString(pctxt,pvalue,permCharSet) \
02789 pd_VarWidthCharString (pctxt, pvalue)
02790
02791 #define pd_GraphicString(pctxt,pvalue,permCharSet) \
02792 pd_VarWidthCharString (pctxt, pvalue)
02793
02794 #define pd_VideotexString(pctxt,pvalue,permCharSet) \
02795 pd_VarWidthCharString (pctxt, pvalue)
02796
02797 #define pd_TeletexString(pctxt,pvalue,permCharSet) \
02798 pd_VarWidthCharString (pctxt, pvalue)
02799
02800 #define pd_T61String(pctxt,pvalue,permCharSet) \
02801 pd_VarWidthCharString (pctxt, pvalue)
02802
02803 #define pd_ObjectDescriptor(pctxt,pvalue,permCharSet) \
02804 pd_VarWidthCharString (pctxt, pvalue)
02805
02806 #define pd_UTF8String(pctxt,pvalue,permCharSet) \
02807 pd_VarWidthCharString (pctxt, pvalue)
02808
02809 #define pd_IA5String(pctxt,pvalue,permCharSet) \
02810 pd_ConstrainedStringEx (pctxt, pvalue, permCharSet, 8, 7, 7)
02811
02812 #define pd_NumericString(pctxt,pvalue,permCharSet) \
02813 pd_ConstrainedStringEx (pctxt, pvalue, \
02814 (permCharSet == 0)?NUM_CANSET:permCharSet, 4, 4, 4)
02815
02816 #define pd_PrintableString(pctxt,pvalue,permCharSet) \
02817 pd_ConstrainedStringEx (pctxt, pvalue, permCharSet, 8, 7, 7)
02818
02819 #define pd_VisibleString(pctxt,pvalue,permCharSet) \
02820 pd_ConstrainedStringEx (pctxt, pvalue, permCharSet, 8, 7, 7)
02821
02822 #define pd_ISO646String pd_IA5String
02823 #define pd_GeneralizedTime pd_IA5String
02824 #define pd_UTCTime pd_GeneralizedTime
02825 #define pe_GetMsgLen pu_getMsgLen
02826
02827 #define pe_ExpandBuffer(pctxt,nbytes) rtxCheckOutputBuffer(pctxt,nbytes)
02828
02829
02830
02831
02832 #define pd_AnyCentury(pctxt,string) \
02833 pd_DateStr (pctxt, string, OSANY|OSCENTURY)
02834
02835
02836 #define pd_AnyCenturyInt(pctxt,pvalue) \
02837 pd_UnconsInteger (pctxt, pvalue)
02838
02839
02840 #define pd_AnyDate(pctxt,string) \
02841 pd_DateStr (pctxt, string, OSANY|OSYEAR|OSMONTH|OSDAY)
02842
02843
02844 #define pd_AnyYear(pctxt,string) \
02845 pd_DateStr (pctxt, string, OSANY|OSYEAR)
02846
02847
02848 #define pd_AnyYearInt(pctxt,pvalue) \
02849 pd_UnconsInteger (pctxt, pvalue)
02850
02851
02852 #define pd_AnyYearDay(pctxt,string) \
02853 pd_DateStr (pctxt, string, OSANY|OSYEAR|OSDAY)
02854
02855
02856 #define pd_AnyYearMonth(pctxt,string) \
02857 pd_DateStr (pctxt, string, OSANY|OSYEAR|OSMONTH)
02858
02859
02860 #define pd_AnyYearMonthDay(pctxt,string) \
02861 pd_DateStr (pctxt, string, OSANY|OSYEAR|OSMONTH|OSDAY)
02862
02863
02864 #define pd_AnyYearWeek(pctxt,string) \
02865 pd_DateStr (pctxt, string, OSANY|OSYEAR|OSWEEK)
02866
02867
02868 #define pd_AnyYearWeekDay(pctxt,string) \
02869 pd_DateStr (pctxt, string, OSANY|OSYEAR|OSWEEK|OSDAY)
02870
02871
02872 #define pd_Century(pctxt,string) \
02873 pd_DateStr (pctxt, string, OSCENTURY)
02874
02875
02876 #define pd_CenturyInt(pctxt,pvalue) \
02877 pd_ConsUInt8 (pctxt, pvalue, 0, 99)
02878
02879
02880 #define pd_Date(pctxt,string) \
02881 pd_DateStr (pctxt, string, OSYEAR_BASIC|OSYEAR|OSMONTH|OSDAY);
02882
02883
02884 #define pd_DateTime(pctxt,string) \
02885 pd_DateTimeStr (pctxt, string, \
02886 OSYEAR_BASIC|OSYEAR|OSMONTH|OSDAY|OSHOURS|OSMINUTES|OSSECONDS);
02887
02888
02889 #define pd_DurationInterval(pctxt,string) \
02890 pd_Duration (pctxt, string, FALSE)
02891
02892
02893
02894 #define pd_DurationEndDateInterval(pctxt,string,flags) \
02895 pd_Interval (pctxt, string, FALSE, OSDURATION, flags)
02896
02897
02898
02899 #define pd_DurationEndTimeInterval(pctxt,string,flags) \
02900 pd_Interval (pctxt, string, FALSE, OSDURATION, flags)
02901
02902
02903
02904 #define pd_DurationEndDateTimeInterval(pctxt,string,flags) \
02905 pd_Interval (pctxt, string, FALSE, OSDURATION, flags)
02906
02907 #ifdef BINARY_HOURS
02908
02909 #define pd_Hours(pctxt,pvalue) \
02910 pd_ConsInt8 (pctxt, pvalue, 0, 24)
02911
02912 #define pd_HoursUtc(pctxt,pvalue) \
02913 pd_ConsInt8 (pctxt, pvalue, 0, 24)
02914
02915 #else
02916
02917
02918 #define pd_Hours(pctxt,string) \
02919 pd_TimeStr (pctxt, string, OSHOURS)
02920
02921
02922 #define pd_HoursUtc(pctxt,string) \
02923 pd_TimeStr (pctxt, string, OSHOURS|OSUTC)
02924
02925 #endif
02926
02927
02928 #define pd_HoursAndDiff(pctxt,string) \
02929 pd_TimeStr (pctxt, string, OSHOURS|OSDIFF)
02930
02931
02932 #define pd_HoursAndFraction(pctxt,string,n) \
02933 pd_TimeStr (pctxt, string, OSHOURS|(n))
02934
02935
02936
02937 #define pd_HoursUtcAndFraction(pctxt,string,n) \
02938 pd_TimeStr (pctxt, string, OSHOURS|OSUTC|(n))
02939
02940
02941
02942 #define pd_HoursAndDiffAndFraction(pctxt,string,n) \
02943 pd_TimeStr (pctxt, string, OSHOURS|OSDIFF|(n))
02944
02945
02946 #define pd_Minutes(pctxt,string) \
02947 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES)
02948
02949
02950 #define pd_MinutesUtc(pctxt,string) \
02951 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSUTC)
02952
02953
02954 #define pd_MinutesAndDiff(pctxt,string) \
02955 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSDIFF)
02956
02957
02958
02959 #define pd_MinutesAndFraction(pctxt,string,n) \
02960 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|(n))
02961
02962
02963
02964 #define pd_MinutesUtcAndFraction(pctxt,string,n) \
02965 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSUTC|(n))
02966
02967
02968
02969 #define pd_MinutesAndDiffAndFraction(pctxt,string,n) \
02970 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSDIFF|(n))
02971
02972
02973
02974 #define pd_RecStartEndDateInterval(pctxt,string,flags) \
02975 pd_Interval (pctxt, string, TRUE, flags, flags)
02976
02977
02978
02979 #define pd_RecStartEndTimeInterval(pctxt,string,flags) \
02980 pd_Interval (pctxt, string, TRUE, flags, flags)
02981
02982
02983
02984 #define pd_RecStartEndDateTimeInterval(pctxt,string,flags) \
02985 pd_Interval (pctxt, string, TRUE, flags, flags)
02986
02987
02988
02989 #define pd_RecDurationInterval(pctxt,string) \
02990 pd_Duration (pctxt, string, TRUE)
02991
02992
02993
02994 #define pd_RecStartDateDurationInterval(pctxt,string,flags) \
02995 pd_Interval (pctxt, string, TRUE, flags, OSDURATION)
02996
02997
02998
02999 #define pd_RecStartTimeDurationInterval(pctxt,string,flags) \
03000 pd_Interval (pctxt, string, TRUE, flags, OSDURATION)
03001
03002
03003
03004 #define pd_RecStartDateTimeDurationInterval(pctxt,string,flags) \
03005 pd_Interval (pctxt, string, TRUE, flags, OSDURATION)
03006
03007
03008
03009 #define pd_RecDurationEndDateInterval(pctxt,string,flags) \
03010 pd_Interval (pctxt, string, TRUE, OSDURATION, flags)
03011
03012
03013
03014 #define pd_RecDurationEndTimeInterval(pctxt,string,flags) \
03015 pd_Interval (pctxt, string, TRUE, OSDURATION, flags)
03016
03017
03018
03019 #define pd_RecDurationEndDateTimeInterval(pctxt,string,flags) \
03020 pd_Interval (pctxt, string, TRUE, OSDURATION, flags)
03021
03022
03023
03024 #define pd_StartEndDateInterval(pctxt,string,flags) \
03025 pd_Interval (pctxt, string, FALSE, flags, flags)
03026
03027
03028
03029 #define pd_StartEndTimeInterval(pctxt,string,flags) \
03030 pd_Interval (pctxt, string, FALSE, flags, flags)
03031
03032
03033
03034 #define pd_StartEndDateTimeInterval(pctxt,string,flags) \
03035 pd_Interval (pctxt, string, FALSE, flags, flags)
03036
03037
03038
03039 #define pd_StartDateDurationInterval(pctxt,string,flags) \
03040 pd_Interval (pctxt, string, FALSE, flags, OSDURATION)
03041
03042
03043
03044 #define pd_StartTimeDurationInterval(pctxt,string,flags) \
03045 pd_Interval (pctxt, string, FALSE, flags, OSDURATION)
03046
03047
03048
03049 #define pd_StartDateTimeDurationInterval(pctxt,string,flags) \
03050 pd_Interval (pctxt, string, FALSE, flags, OSDURATION)
03051
03052
03053 #define pd_TimeOfDay(pctxt,string) \
03054 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS)
03055
03056
03057 #define pd_TimeOfDayUtc(pctxt,string) \
03058 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|OSUTC)
03059
03060
03061 #define pd_TimeOfDayAndDiff(pctxt,string) \
03062 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|OSDIFF)
03063
03064
03065
03066 #define pd_TimeOfDayAndFraction(pctxt,string,n) \
03067 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|(n))
03068
03069
03070
03071 #define pd_TimeOfDayUtcAndFraction(pctxt,string,n) \
03072 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|OSUTC|(n))
03073
03074
03075
03076 #define pd_TimeOfDayAndDiffAndFraction(pctxt,string,n) \
03077 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|OSDIFF|(n))
03078
03079
03080 #define pd_Year(pctxt,string) \
03081 pd_DateStr (pctxt, string, OSYEAR)
03082
03083
03084 #define pd_YearDay(pctxt,string) \
03085 pd_DateStr (pctxt, string, OSYEAR|OSDAY)
03086
03087
03088 #define pd_YearMonth(pctxt,string) \
03089 pd_DateStr (pctxt, string, OSYEAR|OSMONTH)
03090
03091
03092 #define pd_YearMonthDay(pctxt,string) \
03093 pd_DateStr (pctxt, string, OSYEAR|OSMONTH|OSDAY);
03094
03095
03096 #define pd_YearWeek(pctxt,string) \
03097 pd_DateStr (pctxt, string, OSYEAR|OSWEEK)
03098
03099
03100 #define pd_YearWeekDay(pctxt,string) \
03101 pd_DateStr (pctxt, string, OSYEAR|OSWEEK|OSDAY)
03102
03103
03104
03105
03106 #define pe_AnyCentury(pctxt,string) \
03107 pe_DateStr (pctxt, string, OSANY|OSCENTURY)
03108
03109
03110 #define pe_AnyCenturyInt(pctxt,value) \
03111 pe_UnconsInteger (pctxt, value)
03112
03113
03114 #define pe_AnyDate(pctxt,string) \
03115 pe_DateStr (pctxt, string, OSANY|OSYEAR|OSMONTH|OSDAY)
03116
03117
03118 #define pe_AnyYear(pctxt,string) \
03119 pe_DateStr (pctxt, string, OSANY|OSYEAR)
03120
03121
03122 #define pe_AnyYearInt(pctxt,value) \
03123 pe_UnconsInteger (pctxt, value)
03124
03125
03126 #define pe_AnyYearDay(pctxt,string) \
03127 pe_DateStr (pctxt, string, OSANY|OSYEAR|OSDAY)
03128
03129
03130 #define pe_AnyYearMonth(pctxt,string) \
03131 pe_DateStr (pctxt, string, OSANY|OSYEAR|OSMONTH)
03132
03133
03134 #define pe_AnyYearMonthDay(pctxt,string) \
03135 pe_DateStr (pctxt, string, OSANY|OSYEAR|OSMONTH|OSDAY)
03136
03137
03138 #define pe_AnyYearWeek(pctxt,string) \
03139 pe_DateStr (pctxt, string, OSANY|OSYEAR|OSWEEK)
03140
03141
03142 #define pe_AnyYearWeekDay(pctxt,string) \
03143 pe_DateStr (pctxt, string, OSANY|OSYEAR|OSWEEK|OSDAY)
03144
03145
03146 #define pe_Century(pctxt,string) \
03147 pe_DateStr (pctxt, string, OSCENTURY)
03148
03149
03150 #define pe_CenturyInt(pctxt,value) \
03151 pe_ConsUnsigned (pctxt, value, 0, 99)
03152
03153
03154 #define pe_Date(pctxt,string) \
03155 pe_DateStr (pctxt, string, OSYEAR_BASIC|OSYEAR|OSMONTH|OSDAY)
03156
03157
03158 #define pe_DateTime(pctxt,string) \
03159 pe_DateTimeStr (pctxt, string, \
03160 OSYEAR_BASIC|OSYEAR|OSMONTH|OSDAY|OSHOURS|OSMINUTES|OSSECONDS)
03161
03162
03163 #define pe_DurationInterval(pctxt,string) \
03164 pe_Duration (pctxt, string, FALSE)
03165
03166
03167
03168 #define pe_DurationEndDateInterval(pctxt,string,flags) \
03169 pe_Interval (pctxt, string, FALSE, OSDURATION, flags)
03170
03171
03172
03173 #define pe_DurationEndTimeInterval(pctxt,string,flags) \
03174 pe_Interval (pctxt, string, FALSE, OSDURATION, flags)
03175
03176
03177
03178 #define pe_DurationEndDateTimeInterval(pctxt,string,flags) \
03179 pe_Interval (pctxt, string, FALSE, OSDURATION, flags)
03180
03181 #ifdef BINARY_HOURS
03182
03183 #define pe_Hours(pctxt,value) \
03184 pe_ConsUnsigned (pctxt, value, 0, 24)
03185
03186 #define pe_HoursUtc(pctxt,value) \
03187 pe_ConsUnsigned (pctxt, value, 0, 24)
03188
03189 #else
03190
03191
03192 #define pe_Hours(pctxt,string) \
03193 pe_TimeStr (pctxt, string, OSHOURS)
03194
03195
03196 #define pe_HoursUtc(pctxt,string) \
03197 pe_TimeStr (pctxt, string, OSHOURS|OSUTC)
03198
03199 #endif
03200
03201
03202 #define pe_Hours(pctxt,string) \
03203 pe_TimeStr (pctxt, string, OSHOURS)
03204
03205
03206 #define pe_HoursUtc(pctxt,string) \
03207 pe_TimeStr (pctxt, string, OSHOURS|OSUTC)
03208
03209
03210 #define pe_HoursAndDiff(pctxt,string) \
03211 pe_TimeStr (pctxt, string, OSHOURS|OSDIFF)
03212
03213
03214 #define pe_HoursAndFraction(pctxt,string,n) \
03215 pe_TimeStr (pctxt, string, OSHOURS|(n))
03216
03217
03218
03219 #define pe_HoursUtcAndFraction(pctxt,string,n) \
03220 pe_TimeStr (pctxt, string, OSHOURS|OSUTC|(n))
03221
03222
03223
03224 #define pe_HoursAndDiffAndFraction(pctxt,string,n) \
03225 pe_TimeStr (pctxt, string, OSHOURS|OSDIFF|(n))
03226
03227
03228 #define pe_Minutes(pctxt,string) \
03229 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES)
03230
03231
03232 #define pe_MinutesUtc(pctxt,string) \
03233 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSUTC)
03234
03235
03236 #define pe_MinutesAndDiff(pctxt,string) \
03237 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSDIFF)
03238
03239
03240
03241 #define pe_MinutesAndFraction(pctxt,string,n) \
03242 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|(n))
03243
03244
03245
03246 #define pe_MinutesUtcAndFraction(pctxt,string,n) \
03247 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSUTC|(n))
03248
03249
03250
03251 #define pe_MinutesAndDiffAndFraction(pctxt,string,n) \
03252 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSDIFF|(n))
03253
03254
03255
03256 #define pe_RecStartEndDateInterval(pctxt,string,flags) \
03257 pe_Interval (pctxt, string, TRUE, flags, flags)
03258
03259
03260
03261 #define pe_RecStartEndTimeInterval(pctxt,string,flags) \
03262 pe_Interval (pctxt, string, TRUE, flags, flags)
03263
03264
03265
03266 #define pe_RecStartEndDateTimeInterval(pctxt,string,flags) \
03267 pe_Interval (pctxt, string, TRUE, flags, flags)
03268
03269
03270
03271 #define pe_RecDurationInterval(pctxt,string) \
03272 pe_Duration (pctxt, string, TRUE)
03273
03274
03275
03276 #define pe_RecStartDateDurationInterval(pctxt,string,flags) \
03277 pe_Interval (pctxt, string, TRUE, flags, OSDURATION)
03278
03279
03280
03281 #define pe_RecStartTimeDurationInterval(pctxt,string,flags) \
03282 pe_Interval (pctxt, string, TRUE, flags, OSDURATION)
03283
03284
03285
03286 #define pe_RecStartDateTimeDurationInterval(pctxt,string,flags) \
03287 pe_Interval (pctxt, string, TRUE, flags, OSDURATION)
03288
03289
03290
03291 #define pe_RecDurationEndDateInterval(pctxt,string,flags) \
03292 pe_Interval (pctxt, string, TRUE, OSDURATION, flags)
03293
03294
03295
03296 #define pe_RecDurationEndTimeInterval(pctxt,string,flags) \
03297 pe_Interval (pctxt, string, TRUE, OSDURATION, flags)
03298
03299
03300
03301 #define pe_RecDurationEndDateTimeInterval(pctxt,string,flags) \
03302 pe_Interval (pctxt, string, TRUE, OSDURATION, flags)
03303
03304
03305
03306 #define pe_StartEndDateInterval(pctxt,string,flags) \
03307 pe_Interval (pctxt, string, FALSE, flags, flags)
03308
03309
03310
03311 #define pe_StartEndTimeInterval(pctxt,string,flags) \
03312 pe_Interval (pctxt, string, FALSE, flags, flags)
03313
03314
03315
03316 #define pe_StartEndDateTimeInterval(pctxt,string,flags) \
03317 pe_Interval (pctxt, string, FALSE, flags, flags)
03318
03319
03320
03321 #define pe_StartDateDurationInterval(pctxt,string,flags) \
03322 pe_Interval (pctxt, string, FALSE, flags, OSDURATION)
03323
03324
03325
03326 #define pe_StartTimeDurationInterval(pctxt,string,flags) \
03327 pe_Interval (pctxt, string, FALSE, flags, OSDURATION)
03328
03329
03330
03331 #define pe_StartDateTimeDurationInterval(pctxt,string,flags) \
03332 pe_Interval (pctxt, string, FALSE, flags, OSDURATION)
03333
03334
03335 #define pe_TimeOfDay(pctxt,string) \
03336 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS)
03337
03338
03339 #define pe_TimeOfDayUtc(pctxt,string) \
03340 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|OSUTC)
03341
03342
03343 #define pe_TimeOfDayAndDiff(pctxt,string) \
03344 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|OSDIFF)
03345
03346
03347
03348 #define pe_TimeOfDayAndFraction(pctxt,string,n) \
03349 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|(n))
03350
03351
03352
03353 #define pe_TimeOfDayUtcAndFraction(pctxt,string,n) \
03354 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|OSUTC|(n))
03355
03356
03357
03358 #define pe_TimeOfDayAndDiffAndFraction(pctxt,string,n) \
03359 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|OSDIFF|(n))
03360
03361
03362 #define pe_Year(pctxt,string) \
03363 pe_DateStr (pctxt, string, OSYEAR)
03364
03365
03366 #define pe_YearDay(pctxt,string) \
03367 pe_DateStr (pctxt, string, OSYEAR|OSDAY)
03368
03369
03370 #define pe_YearMonth(pctxt,string) \
03371 pe_DateStr (pctxt, string, OSYEAR|OSMONTH)
03372
03373
03374 #define pe_YearMonthDay(pctxt,string) \
03375 pe_DateStr (pctxt, string, OSYEAR|OSMONTH|OSDAY)
03376
03377
03378 #define pe_YearWeek(pctxt,string) \
03379 pe_DateStr (pctxt, string, OSYEAR|OSWEEK)
03380
03381
03382 #define pe_YearWeekDay(pctxt,string) \
03383 pe_DateStr (pctxt, string, OSYEAR|OSWEEK|OSDAY)
03384
03385
03386
03387
03388 EXTERNPER int pu_checkSizeConstraint (OSCTXT* pctxt, int size);
03389 EXTERNPER Asn1SizeCnst* pu_getSizeConstraint (OSCTXT* pctxt, OSBOOL extbit);
03390 EXTERNPER int pu_getBitOffset (OSCTXT* pctxt);
03391 EXTERNPER void pu_setBitOffset (OSCTXT* pctxt, int bitOffset);
03392
03395 #endif