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, OSINT64 lower, OSINT64 upper);
00474
00475
00489 EXTERNPER int pd_ConsInt8
00490 (OSCTXT* pctxt, OSINT8* pvalue, OSINT64 lower, OSINT64 upper);
00491
00505 EXTERNPER int pd_ConsInt16 (OSCTXT* pctxt,
00506 OSINT16* pvalue, OSINT64 lower, OSINT64 upper);
00507
00521 EXTERNPER int pd_ConsInt64 (OSCTXT* pctxt,
00522 OSINT64* pvalue, OSINT64 lower, OSINT64 upper);
00523
00537 EXTERNPER int pd_ConsUnsigned
00538 (OSCTXT* pctxt, OSUINT32* pvalue, OSUINT64 lower, OSUINT64 upper);
00539
00553 EXTERNPER int pd_ConsUnsignedSignedBound
00554 (OSCTXT* pctxt, OSUINT32* pvalue, OSINT64 lower, OSINT64 upper);
00555
00556
00570 EXTERNPER int pd_ConsUInt8 (OSCTXT* pctxt,
00571 OSUINT8* pvalue, OSUINT64 lower, OSUINT64 upper);
00572
00586 EXTERNPER int pd_ConsUInt8SignedBound (OSCTXT* pctxt,
00587 OSUINT8* pvalue, OSINT64 lower, OSINT64 upper);
00588
00602 EXTERNPER int pd_ConsUInt16
00603 (OSCTXT* pctxt, OSUINT16* pvalue, OSUINT64 lower, OSUINT64 upper);
00604
00618 EXTERNPER int pd_ConsUInt16SignedBound
00619 (OSCTXT* pctxt, OSUINT16* pvalue, OSINT64 lower, OSINT64 upper);
00620
00634 EXTERNPER int pd_ConsUInt64 (OSCTXT* pctxt, OSUINT64* pvalue,
00635 OSUINT64 lower, OSUINT64 upper);
00636
00650 EXTERNPER int pd_ConsUInt64SignedBound (OSCTXT* pctxt, OSUINT64* pvalue,
00651 OSINT64 lower, OSINT64 upper);
00652
00670 EXTERNPER int pd_ConsWholeNumber
00671 (OSCTXT* pctxt, OSUINT32* padjusted_value, OSUINT32 range_value);
00672
00690 EXTERNPER int pd_ConsWholeNumber64
00691 (OSCTXT* pctxt, OSUINT64* padjusted_value, OSUINT64 range_value);
00692
00709 EXTERNPER int pd_ConstrainedString
00710 (OSCTXT* pctxt, const char** string, Asn1CharSet* pCharSet);
00711
00731 EXTERNPER int pd_ConstrainedStringEx
00732 (OSCTXT* pctxt, const char** string, const char* charSet,
00733 OSUINT32 abits, OSUINT32 ubits, OSUINT32 canSetBits);
00734
00753 EXTERNPER int pd_ConstrFixedLenStringEx
00754 (OSCTXT* pctxt, char* strbuf, size_t bufsiz, const char* charSet,
00755 OSUINT32 abits, OSUINT32 ubits, OSUINT32 canSetBits);
00756
00779 EXTERNPER int pd_16BitConstrainedString
00780 (OSCTXT* pctxt, Asn116BitCharString* pString, Asn116BitCharSet* pCharSet);
00781
00804 EXTERNPER int pd_32BitConstrainedString
00805 (OSCTXT* pctxt, Asn132BitCharString* pString, Asn132BitCharSet* pCharSet);
00806
00818 EXTERNPER int pd_DateStr (OSCTXT* pctxt, const char** string, OSUINT32 flags);
00819
00833 EXTERNPER int pd_DateTimeStr
00834 (OSCTXT* pctxt, const char** string, OSUINT32 flags);
00835
00847 EXTERNPER int pd_Duration (OSCTXT* pctxt, const char** string, OSBOOL rec);
00848
00871 EXTERNPER int pd_DynBitString
00872 (OSCTXT* pctxt, ASN1DynBitStr* pBitStr);
00873
00890 EXTERNPER int pd_DynOctetString
00891 (OSCTXT* pctxt, ASN1DynOctStr* pOctStr);
00892
00909 EXTERNPER int pd_GetBinStrDataOffset
00910 (OSCTXT* pctxt, OSUINT32* pnumbits, OSBOOL bitStrFlag);
00911
00926 EXTERNPER int pd_GetComponentLength (OSCTXT* pctxt, OSUINT32 itemBits);
00927
00944 EXTERNPER int pd_Interval
00945 (OSCTXT* pctxt, const char** string, OSBOOL rec,
00946 OSUINT32 startFlags, OSUINT32 endFlags);
00947
00961 EXTERNPER int pd_Length (OSCTXT* pctxt, OSUINT32* pvalue);
00962
00970
00971 #define pd_moveBitCursor(pctxt,bitOffset) rtxMoveBitCursor(pctxt,bitOffset)
00972
00985 EXTERNPER int pd_ObjectIdentifier (OSCTXT* pctxt, ASN1OBJID* pvalue);
00986
01000 EXTERNPER int pd_oid64 (OSCTXT* pctxt, ASN1OID64* pvalue);
01001
01014 EXTERNPER int pd_RelativeOID (OSCTXT* pctxt, ASN1OBJID* pvalue);
01015
01034 EXTERNPER int pd_OctetString
01035 (OSCTXT* pctxt, OSUINT32* pnumocts, OSOCTET* buffer,
01036 OSUINT32 bufsiz);
01037
01055 EXTERNPER int pd_OpenType
01056 (OSCTXT* pctxt, const OSOCTET** object_p2, OSUINT32* pnumocts);
01057
01079 EXTERNPER int pd_OpenTypeExt
01080 (OSCTXT* pctxt, const OSOCTET** object_p2, OSUINT32* pnumocts);
01081
01082 #ifndef _NO_ASN1REAL
01083
01096 EXTERNPER int pd_Real (OSCTXT* pctxt, OSREAL* pvalue);
01097 #endif
01098
01114 EXTERNPER int pd_SmallLength
01115 (OSCTXT* pctxt, OSUINT32* pvalue);
01116
01132 EXTERNPER int pd_SmallNonNegWholeNumber
01133 (OSCTXT* pctxt, OSUINT32* pvalue);
01134
01146 EXTERNPER int pd_SemiConsInteger
01147 (OSCTXT* pctxt, OSINT32* pvalue, OSINT64 lower);
01148
01161 EXTERNPER int pd_SemiConsUnsigned
01162 (OSCTXT* pctxt, OSUINT32* pvalue, OSUINT64 lower);
01163
01176 EXTERNPER int pd_SemiConsUnsignedSignedBound
01177 (OSCTXT* pctxt, OSINT32* pvalue, OSINT64 lower);
01178
01191 EXTERNPER int pd_SemiConsInt8
01192 (OSCTXT* pctxt, OSINT8* pvalue, OSINT64 lower);
01193
01206 EXTERNPER int pd_SemiConsUInt8
01207 (OSCTXT* pctxt, OSUINT8* pvalue, OSUINT64 lower);
01208
01221 EXTERNPER int pd_SemiConsUInt8SignedBound
01222 (OSCTXT* pctxt, OSUINT8* pvalue, OSINT64 lower);
01223
01236 EXTERNPER int pd_SemiConsInt16
01237 (OSCTXT* pctxt, OSINT16* pvalue, OSINT64 lower);
01238
01251 EXTERNPER int pd_SemiConsUInt16
01252 (OSCTXT* pctxt, OSUINT16* pvalue, OSUINT64 lower);
01253
01254
01267 EXTERNPER int pd_SemiConsUInt16SignedBound
01268 (OSCTXT* pctxt, OSUINT16* pvalue, OSINT64 lower);
01269
01270
01283 EXTERNPER int pd_SemiConsInt64
01284 (OSCTXT* pctxt, OSINT64* pvalue, OSINT64 lower);
01285
01298 EXTERNPER int pd_SemiConsUInt64
01299 (OSCTXT* pctxt, OSUINT64* pvalue, OSUINT64 lower);
01300
01313 EXTERNPER int pd_SemiConsUInt64SignedBound
01314 (OSCTXT* pctxt, OSUINT64* pvalue, OSINT64 lower);
01315
01328 EXTERNPER int pd_TimeStr (OSCTXT* pctxt, const char** string, OSUINT32 flags);
01329
01339 EXTERNPER int pd_UnconsInteger (OSCTXT *pctxt, OSINT32* pvalue);
01340
01351 EXTERNPER int pd_UnconsLength (OSCTXT *pctxt, OSUINT32* pvalue);
01352
01365 EXTERNPER int pd_UnconsUnsigned (OSCTXT* pctxt, OSUINT32* pvalue);
01366
01377 EXTERNPER int pd_UnconsInt8 (OSCTXT *pctxt, OSINT8* pvalue);
01378
01392 EXTERNPER int pd_UnconsUInt8 (OSCTXT* pctxt, OSUINT8* pvalue);
01393
01404 EXTERNPER int pd_UnconsInt16 (OSCTXT *pctxt, OSINT16* pvalue);
01405
01419 EXTERNPER int pd_UnconsUInt16 (OSCTXT* pctxt, OSUINT16* pvalue);
01420
01431 EXTERNPER int pd_UnconsInt64 (OSCTXT *pctxt, OSINT64* pvalue);
01432
01446 EXTERNPER int pd_UnconsUInt64 (OSCTXT* pctxt, OSUINT64* pvalue);
01447
01459 EXTERNPER int pd_VarWidthCharString (OSCTXT* pctxt, const char** pvalue);
01460
01470 EXTERNPER int pd_YearInt (OSCTXT* pctxt, OSINT32* pvalue);
01471
01472 #ifndef _NO_ASN1REAL
01473
01486 EXTERNPER int pd_Real10 (OSCTXT *pctxt, const char** ppvalue);
01487 #endif
01488
01494 EXTERNPER OSBOOL pd_isFragmented (OSCTXT* pctxt);
01495
01496 EXTERNPER void pd_OpenTypeStart
01497 (OSCTXT* pctxt, OSUINT32* pSavedSize, OSINT16* pSavedBitOff);
01498
01499 EXTERNPER int pd_OpenTypeEnd
01500 (OSCTXT* pctxt, OSUINT32 savedSize, OSINT16 savedBitOff);
01501
01520 EXTERNPER int uperDecConstrString
01521 (OSCTXT* pctxt, const char** string, const char* charSet,
01522 OSUINT32 nbits, OSUINT32 canSetBits);
01523
01542 EXTERNPER int uperDecConstrFixedLenString
01543 (OSCTXT* pctxt, char* strbuf, size_t bufsiz, const char* charSet,
01544 OSUINT32 nbits, OSUINT32 canSetBits);
01545
01548
01592 EXTERNPER int pe_16BitConstrainedString
01593 (OSCTXT* pctxt, Asn116BitCharString value, Asn116BitCharSet* pCharSet);
01594
01617 EXTERNPER int pe_32BitConstrainedString
01618 (OSCTXT* pctxt, Asn132BitCharString value, Asn132BitCharSet* pCharSet);
01619
01630 EXTERNPER int pe_2sCompBinInt
01631 (OSCTXT* pctxt, OSINT32 value);
01632
01643 EXTERNPER int pe_2sCompBinInt64 (OSCTXT* pctxt, OSINT64 value);
01644
01651 EXTERNPER int pe_aligned_octets
01652 (OSCTXT* pctxt, OSOCTET* pvalue, OSUINT32 nocts);
01653
01673 EXTERNPER int pe_BigInteger
01674 (OSCTXT* pctxt, const char* pvalue);
01675
01685
01686
01687 #define pe_bit(pctxt,value) rtxEncBit(pctxt,value)
01688
01699
01700
01701 #define pe_bits(pctxt,value,nbits) rtxEncBits(pctxt,value,nbits)
01702
01715 EXTERNPER int pe_bits64 (OSCTXT* pctxt, OSUINT64 value, OSUINT32 nbits);
01716
01730 EXTERNPER int pe_BitString
01731 (OSCTXT* pctxt, OSUINT32 numocts, const OSOCTET* data);
01732
01733 EXTERNPER int pe_BitString32
01734 (OSCTXT* pctxt, ASN1BitStr32* pbitstr, OSUINT32 lower, OSUINT32 upper);
01735
01759 EXTERNPER int pe_BMPString
01760 (OSCTXT* pctxt, ASN1BMPString value, Asn116BitCharSet* permCharSet);
01761
01785 EXTERNPER int pe_UniversalString
01786 (OSCTXT* pctxt, ASN1UniversalString value, Asn132BitCharSet* permCharSet);
01787
01799 EXTERNPER int pe_byte_align (OSCTXT* pctxt);
01800
01816
01817 #define pe_CheckBuffer(pctxt,nbytes) rtxCheckOutputBuffer(pctxt,nbytes)
01818
01830 EXTERNPER int pe_ChoiceTypeExt
01831 (OSCTXT* pctxt, OSUINT32 numocts, const OSOCTET* data);
01832
01845 #define pe_ConsInteger(pctxt, value, lower, upper) \
01846 pe_ConsInt64(pctxt, value, lower, upper)
01847
01860 EXTERNPER int pe_ConsInt64 (OSCTXT* pctxt,
01861 OSINT64 value, OSINT64 lower, OSINT64 upper);
01862
01874 EXTERNPER int pe_ConstrainedString
01875 (OSCTXT* pctxt, const char* string, Asn1CharSet* pCharSet);
01876
01894 EXTERNPER int pe_ConstrainedStringEx
01895 (OSCTXT* pctxt, const char* string, const char* charSet,
01896 OSUINT32 abits, OSUINT32 ubits, OSUINT32 canSetBits);
01897
01913 #define pe_ConsUnsigned(pctxt, value, lower, upper) \
01914 pe_ConsUInt64(pctxt, value, lower, upper)
01915
01931 #define pe_ConsUnsignedSignedBound(pcxt, value, lower, upper) \
01932 pe_ConsUInt64SignedBound(pctxt, value, lower, upper)
01933
01953 EXTERNPER int pe_ConsUInt64 (OSCTXT* pctxt, OSUINT64 value,
01954 OSUINT64 lower, OSUINT64 upper);
01955
01975 EXTERNPER int pe_ConsUInt64SignedBound (OSCTXT* pctxt, OSUINT64 value,
01976 OSINT64 lower, OSINT64 upper);
01977
01993 EXTERNPER int pe_ConsWholeNumber
01994 (OSCTXT* pctxt, OSUINT32 adjusted_value, OSUINT32 range_value);
01995
02011 EXTERNPER int pe_ConsWholeNumber64
02012 (OSCTXT* pctxt, OSUINT64 adjusted_value, OSUINT64 range_value);
02013
02025 EXTERNPER int pe_DateStr (OSCTXT* pctxt, const char* string, OSUINT32 flags);
02026
02040 EXTERNPER int pe_DateTimeStr
02041 (OSCTXT* pctxt, const char* string, OSUINT32 flags);
02042
02054 EXTERNPER int pe_Duration (OSCTXT* pctxt, const char* string, OSBOOL rec);
02055
02059 EXTERNPER OSUINT32 pe_GetIntLen (OSUINT32 value);
02060
02066 EXTERNPER size_t pe_GetMsgBitCnt (OSCTXT* pctxt);
02067
02086 EXTERNPER OSOCTET* pe_GetMsgPtr (OSCTXT* pctxt, OSINT32* pLength);
02087
02098 EXTERNPER OSOCTET* pe_GetMsgPtrU (OSCTXT* pctxt, OSUINT32* pLength);
02099
02117 EXTERNPER int pe_Interval
02118 (OSCTXT* pctxt, const char* string, OSBOOL rec,
02119 OSUINT32 startFlags, OSUINT32 endFlags);
02120
02138 EXTERNPER int pe_Length (OSCTXT* pctxt, OSUINT32 value);
02139
02150 EXTERNPER int pe_NonNegBinInt (OSCTXT* pctxt, OSUINT32 value);
02151
02162 EXTERNPER int pe_NonNegBinInt64 (OSCTXT* pctxt, OSUINT64 value);
02163
02176 EXTERNPER int pe_ObjectIdentifier (OSCTXT* pctxt, ASN1OBJID* pvalue);
02177
02178 #ifndef _NO_INT64_SUPPORT
02179
02192 EXTERNPER int pe_oid64 (OSCTXT* pctxt, ASN1OID64* pvalue);
02193 #endif
02194
02207 EXTERNPER int pe_RelativeOID (OSCTXT* pctxt, ASN1OBJID* pvalue);
02208
02222
02223
02224 #define pe_octets(pctxt,pvalue,nbits) \
02225 rtxEncBitsFromByteArray(pctxt,pvalue,nbits)
02226
02239 EXTERNPER int pe_OctetString
02240 (OSCTXT* pctxt, OSUINT32 numocts, const OSOCTET* data);
02241
02257 EXTERNPER int pe_OpenType
02258 (OSCTXT* pctxt, OSUINT32 numocts, const OSOCTET* data);
02259
02275 EXTERNPER int pe_OpenTypeEnd (OSCTXT* pctxt, OSUINT32 pos, void* pPerField);
02276
02295 EXTERNPER int pe_OpenTypeExt
02296 (OSCTXT* pctxt, OSRTDList* pElemList);
02297
02307 EXTERNPER int pe_OpenTypeExtBits
02308 (OSCTXT* pctxt, OSRTDList* pElemList);
02309
02324 EXTERNPER int pe_OpenTypeStart
02325 (OSCTXT* pctxt, OSUINT32* pPos, void** ppPerField);
02326
02327 #ifndef _NO_ASN1REAL
02328
02345 EXTERNPER int pe_Real (OSCTXT* pctxt, OSREAL value);
02346 #endif
02347
02362 EXTERNPER int pe_SmallNonNegWholeNumber (OSCTXT* pctxt, OSUINT32 value);
02363
02364
02379 EXTERNPER int pe_SmallLength (OSCTXT* pctxt, OSUINT32 value);
02380
02381
02393 #define pe_SemiConsInteger(pctxt, value, lower) \
02394 pe_SemiConsInt64(pctxt, value, lower)
02395
02407 EXTERNPER int pe_SemiConsInt64
02408 (OSCTXT* pctxt, OSINT64 value, OSINT64 lower);
02409
02410
02422 #define pe_SemiConsUnsigned(pctxt,value,lower) pe_SemiConsUInt64(pctxt, value, lower)
02423
02435 EXTERNPER int pe_SemiConsUnsignedSignedBound
02436 (OSCTXT* pctxt, OSUINT32 value, OSINT64 lower);
02437
02438 #ifndef _NO_INT64_SUPPORT
02439
02451 EXTERNPER int pe_SemiConsUInt64
02452 (OSCTXT* pctxt, OSUINT64 value, OSUINT64 lower);
02453
02466 EXTERNPER int pe_SemiConsUInt64SignedBound
02467 (OSCTXT* pctxt, OSUINT64 value, OSINT64 lower);
02468
02469 #endif
02470
02483 EXTERNPER int pe_TimeStr (OSCTXT* pctxt, const char* string, OSUINT32 flags);
02484
02493 EXTERNPER int pe_UnconsLength (OSCTXT* pctxt, OSUINT32 value);
02494
02504 EXTERNPER int pe_UnconsInteger (OSCTXT* pctxt, OSINT32 value);
02505
02506 #ifndef _NO_INT64_SUPPORT
02507
02516 EXTERNPER int pe_UnconsInt64 (OSCTXT* pctxt, OSINT64 value);
02517 #endif
02518
02528 EXTERNPER int pe_UnconsUnsigned (OSCTXT* pctxt, OSUINT32 value);
02529
02530 #ifndef _NO_INT64_SUPPORT
02531
02541 EXTERNPER int pe_UnconsUInt64 (OSCTXT* pctxt, OSUINT64 value);
02542 #endif
02543
02556 EXTERNPER int pe_VarWidthCharString (OSCTXT* pctxt, const char* value);
02557
02567 EXTERNPER int pe_YearInt (OSCTXT* pctxt, OSINT32 value);
02568
02569 #ifndef _NO_ASN1REAL
02570
02583 EXTERNPER int pe_Real10 (OSCTXT* pctxt, const char* pvalue);
02584 #endif
02585
02602 EXTERNPER int uperEncConstrString
02603 (OSCTXT* pctxt, const char* string, const char* charSet,
02604 OSUINT32 nbits, OSUINT32 canSetBits);
02605
02608
02609
02610
02631 EXTERNPER int pu_addSizeConstraint (OSCTXT* pctxt, const Asn1SizeCnst* pSize);
02632
02633 EXTERNPER OSBOOL pu_alignCharStr
02634 (OSCTXT* pctxt, OSUINT32 len, OSUINT32 nbits, Asn1SizeCnst* pSize);
02635
02636 EXTERNPER OSUINT32 pu_bitcnt (OSUINT32 value);
02637
02638 EXTERNPER Asn1SizeCnst* pu_checkSize
02639 (Asn1SizeCnst* pSizeList, OSUINT32 value, OSBOOL* pExtendable);
02640
02654 EXTERNPER int pu_checkSizeExt
02655 (Asn1SizeCnst* pSizeCnst, OSUINT32 value, OSBOOL* pExtendable,
02656 Asn1SizeValueRange* pSizeRange, OSBOOL* pExtSize);
02657
02671 EXTERNPER void pu_freeContext (OSCTXT* pctxt);
02672
02673 EXTERNPER size_t pu_getMaskAndIndex (size_t bitOffset, unsigned char* pMask);
02674
02689 EXTERNPER size_t pu_getMsgLen (OSCTXT* pctxt);
02690
02705 EXTERNPER size_t pu_getMsgLenBits (OSCTXT* pctxt);
02706
02715 EXTERNPER void pu_hexdump (OSCTXT* pctxt);
02716
02733 EXTERNPER int pu_setBuffer
02734 (OSCTXT* pctxt, OSOCTET* bufaddr, size_t bufsiz, OSBOOL aligned);
02735
02736 #define pd_setp(pctxt, bufaddr, bufsiz, aligned) \
02737 pu_setBuffer(pctxt, bufaddr, bufsiz, aligned)
02738
02739 #define pe_setp(pctxt, bufaddr, bufsiz, aligned) \
02740 pu_setBuffer(pctxt, bufaddr, bufsiz, aligned)
02741
02742 #define pe_resetp(pctxt) rtxResetContext(pctxt)
02743 #define pd_resetp(pctxt) rtxResetContext(pctxt)
02744
02745
02746
02774 EXTERNPER int pu_initContext
02775 (OSCTXT* pctxt, OSOCTET* bufaddr, OSUINT32 bufsiz, OSBOOL aligned);
02776
02793 EXTERNPER int pu_initContextBuffer (OSCTXT* pTarget, OSCTXT* pSource);
02794
02795 EXTERNPER const char* pu_getFullName
02796 (OSCTXT* pctxt, const char* suffix);
02797
02798 EXTERNPER void pu_init16BitCharSet
02799 (Asn116BitCharSet* pCharSet, OSUNICHAR first, OSUNICHAR last,
02800 OSUINT32 abits, OSUINT32 ubits);
02801
02808 EXTERNPER void pu_insLenField (OSCTXT* pctxt);
02809
02817 EXTERNPER OSBOOL pu_isFixedSize (const Asn1SizeCnst* pSizeList);
02818
02843 EXTERNPER OSCTXT* pu_newContext
02844 (OSOCTET* bufaddr, OSUINT32 bufsiz, OSBOOL aligned);
02845
02854 EXTERNPER PERField* pu_newField
02855 (OSCTXT* pctxt, const char* nameSuffix);
02856
02867 EXTERNPER void pu_initFieldList (OSCTXT* pctxt, OSINT16 bitOffset);
02868
02877 EXTERNPER void pu_initRtxDiagBitFieldList (OSCTXT* pctxt, OSINT16 bitOffset);
02878
02887 EXTERNPER void pu_popName (OSCTXT* pctxt);
02888
02898 EXTERNPER void pu_pushElemName (OSCTXT* pctxt, int idx);
02899
02909 EXTERNPER void pu_pushName (OSCTXT* pctxt, const char* name);
02910
02922 EXTERNPER void pu_setCharSet (Asn1CharSet* pCharSet, const char* permSet);
02923
02938 EXTERNPER void pu_set16BitCharSet
02939 (OSCTXT* pctxt, Asn116BitCharSet* pCharSet, Asn116BitCharSet* pAlphabet);
02940
02941
02950 EXTERNPER void pu_set16BitCharSetFromRange
02951 (Asn116BitCharSet* pCharSet, OSUINT16 firstChar, OSUINT16 lastChar);
02952
02953 EXTERNPER void pu_setFldBitCount (OSCTXT* pctxt);
02954
02955 EXTERNPER void pu_setFldBitOffset (OSCTXT* pctxt);
02956
02957 EXTERNPER void pu_setFldListFromCtxt (OSCTXT* pctxt, OSCTXT* srcctxt);
02958
02959 EXTERNPER void pu_setOpenTypeFldList (OSCTXT* pctxt, OSRTSList* plist);
02960
02961 EXTERNPER void pu_setRtxDiagOpenTypeFldList
02962 (OSRTDiagBitFieldList* pMainBFList, OSRTDiagBitFieldList* pOpenTypeBFList);
02963
02964 EXTERNPER OSBOOL pu_setTrace (OSCTXT* pCtxt, OSBOOL value);
02965
02966 EXTERNPER void pu_setAligned (OSCTXT* pctxt, OSBOOL value);
02967
02968 EXTERNPER void pu_deleteFieldList (OSCTXT* pctxt);
02969
02984 EXTERNPER void pu_bindump (OSCTXT* pctxt, const char* varname);
02985
02986 EXTERNPER void pu_dumpField
02987 (OSCTXT* pctxt, PERField* pField, const char* varname,
02988 size_t nextBitOffset, BinDumpBuffer* pbuf);
02989
02990 EXTERNPER void pu_init32BitCharSet
02991 (Asn132BitCharSet* pCharSet, OS32BITCHAR first, OS32BITCHAR last,
02992 OSUINT32 abits, OSUINT32 ubits);
02993
03008 EXTERNPER void pu_set32BitCharSet
03009 (OSCTXT* pctxt, Asn132BitCharSet* pCharSet, Asn132BitCharSet* pAlphabet);
03010
03019 EXTERNPER void pu_set32BitCharSetFromRange
03020 (Asn132BitCharSet* pCharSet, OSUINT32 firstChar, OSUINT32 lastChar);
03021
03031 EXTERNPER int pu_GetLibVersion (OSVOIDARG);
03032
03040 EXTERNPER const char* pu_GetLibInfo (OSVOIDARG);
03041
03046 #ifdef __cplusplus
03047 }
03048 #endif
03049
03050
03051
03052 #define pd_bit(pctxt,pvalue) rtxDecBit(pctxt,pvalue)
03053
03054 #define pd_bits(pctxt,pvalue,nbits) rtxDecBits(pctxt,pvalue,nbits)
03055
03056 #define pd_octets(pctxt,pbuffer,bufsiz,nbits) \
03057 rtxDecBitsToByteArray(pctxt,pbuffer,bufsiz,nbits)
03058
03059 #define pe_GeneralString(pctxt,value,permCharSet) \
03060 pe_VarWidthCharString(pctxt, value)
03061
03062 #define pe_GraphicString(pctxt,value,permCharSet) \
03063 pe_VarWidthCharString(pctxt, value)
03064
03065 #define pe_T61String(pctxt,value,permCharSet) \
03066 pe_VarWidthCharString(pctxt, value)
03067
03068 #define pe_TeletexString(pctxt,value,permCharSet) \
03069 pe_VarWidthCharString(pctxt, value)
03070
03071 #define pe_VideotexString(pctxt,value,permCharSet) \
03072 pe_VarWidthCharString(pctxt, value)
03073
03074 #define pe_ObjectDescriptor(pctxt,value,permCharSet) \
03075 pe_VarWidthCharString(pctxt, value)
03076
03077 #define pe_UTF8String(pctxt,value,permCharSet) \
03078 pe_VarWidthCharString(pctxt, value)
03079
03080 #define pe_IA5String(pctxt,value,permCharSet) \
03081 pe_ConstrainedStringEx (pctxt, value, permCharSet, 8, 7, 7)
03082
03083 #define pe_NumericString(pctxt,value,permCharSet) \
03084 pe_ConstrainedStringEx (pctxt, value, \
03085 (permCharSet == 0)?NUM_CANSET:permCharSet, 4, 4, 4)
03086
03087 #define pe_PrintableString(pctxt,value,permCharSet) \
03088 pe_ConstrainedStringEx (pctxt, value, permCharSet, 8, 7, 7)
03089
03090 #define pe_VisibleString(pctxt,value,permCharSet) \
03091 pe_ConstrainedStringEx (pctxt, value, permCharSet, 8, 7, 7)
03092
03093 #define pe_ISO646String pe_IA5String
03094 #define pe_GeneralizedTime pe_IA5String
03095 #define pe_UTCTime pe_GeneralizedTime
03096
03097 #define pd_GeneralString(pctxt,pvalue,permCharSet) \
03098 pd_VarWidthCharString (pctxt, pvalue)
03099
03100 #define pd_GraphicString(pctxt,pvalue,permCharSet) \
03101 pd_VarWidthCharString (pctxt, pvalue)
03102
03103 #define pd_VideotexString(pctxt,pvalue,permCharSet) \
03104 pd_VarWidthCharString (pctxt, pvalue)
03105
03106 #define pd_TeletexString(pctxt,pvalue,permCharSet) \
03107 pd_VarWidthCharString (pctxt, pvalue)
03108
03109 #define pd_T61String(pctxt,pvalue,permCharSet) \
03110 pd_VarWidthCharString (pctxt, pvalue)
03111
03112 #define pd_ObjectDescriptor(pctxt,pvalue,permCharSet) \
03113 pd_VarWidthCharString (pctxt, pvalue)
03114
03115 #define pd_UTF8String(pctxt,pvalue,permCharSet) \
03116 pd_VarWidthCharString (pctxt, pvalue)
03117
03118 #define pd_IA5String(pctxt,pvalue,permCharSet) \
03119 pd_ConstrainedStringEx (pctxt, pvalue, permCharSet, 8, 7, 7)
03120
03121 #define pd_NumericString(pctxt,pvalue,permCharSet) \
03122 pd_ConstrainedStringEx (pctxt, pvalue, \
03123 (permCharSet == 0)?NUM_CANSET:permCharSet, 4, 4, 4)
03124
03125 #define pd_PrintableString(pctxt,pvalue,permCharSet) \
03126 pd_ConstrainedStringEx (pctxt, pvalue, permCharSet, 8, 7, 7)
03127
03128 #define pd_VisibleString(pctxt,pvalue,permCharSet) \
03129 pd_ConstrainedStringEx (pctxt, pvalue, permCharSet, 8, 7, 7)
03130
03131 #define pd_ISO646String pd_IA5String
03132 #define pd_GeneralizedTime pd_IA5String
03133 #define pd_UTCTime pd_GeneralizedTime
03134 #define pe_GetMsgLen pu_getMsgLen
03135
03136 #define pe_ExpandBuffer(pctxt,nbytes) rtxExpandOutputBuffer(pctxt,nbytes)
03137
03138
03139
03140
03141 #define pd_AnyCentury(pctxt,string) \
03142 pd_DateStr (pctxt, string, OSANY|OSCENTURY)
03143
03144
03145 #define pd_AnyCenturyInt(pctxt,pvalue) \
03146 pd_UnconsInteger (pctxt, pvalue)
03147
03148
03149 #define pd_AnyDate(pctxt,string) \
03150 pd_DateStr (pctxt, string, OSANY|OSYEAR|OSMONTH|OSDAY)
03151
03152
03153 #define pd_AnyYear(pctxt,string) \
03154 pd_DateStr (pctxt, string, OSANY|OSYEAR)
03155
03156
03157 #define pd_AnyYearInt(pctxt,pvalue) \
03158 pd_UnconsInteger (pctxt, pvalue)
03159
03160
03161 #define pd_AnyYearDay(pctxt,string) \
03162 pd_DateStr (pctxt, string, OSANY|OSYEAR|OSDAY)
03163
03164
03165 #define pd_AnyYearMonth(pctxt,string) \
03166 pd_DateStr (pctxt, string, OSANY|OSYEAR|OSMONTH)
03167
03168
03169 #define pd_AnyYearMonthDay(pctxt,string) \
03170 pd_DateStr (pctxt, string, OSANY|OSYEAR|OSMONTH|OSDAY)
03171
03172
03173 #define pd_AnyYearWeek(pctxt,string) \
03174 pd_DateStr (pctxt, string, OSANY|OSYEAR|OSWEEK)
03175
03176
03177 #define pd_AnyYearWeekDay(pctxt,string) \
03178 pd_DateStr (pctxt, string, OSANY|OSYEAR|OSWEEK|OSDAY)
03179
03180
03181 #define pd_Century(pctxt,string) \
03182 pd_DateStr (pctxt, string, OSCENTURY)
03183
03184
03185 #define pd_CenturyInt(pctxt,pvalue) \
03186 pd_ConsUInt8 (pctxt, pvalue, 0, 99)
03187
03188
03189 #define pd_Date(pctxt,string) \
03190 pd_DateStr (pctxt, string, OSYEAR_BASIC|OSYEAR|OSMONTH|OSDAY);
03191
03192
03193 #define pd_DateTime(pctxt,string) \
03194 pd_DateTimeStr (pctxt, string, \
03195 OSYEAR_BASIC|OSYEAR|OSMONTH|OSDAY|OSHOURS|OSMINUTES|OSSECONDS);
03196
03197
03198 #define pd_DurationInterval(pctxt,string) \
03199 pd_Duration (pctxt, string, FALSE)
03200
03201
03202
03203 #define pd_DurationEndDateInterval(pctxt,string,flags) \
03204 pd_Interval (pctxt, string, FALSE, OSDURATION, flags)
03205
03206
03207
03208 #define pd_DurationEndTimeInterval(pctxt,string,flags) \
03209 pd_Interval (pctxt, string, FALSE, OSDURATION, flags)
03210
03211
03212
03213 #define pd_DurationEndDateTimeInterval(pctxt,string,flags) \
03214 pd_Interval (pctxt, string, FALSE, OSDURATION, flags)
03215
03216 #ifdef BINARY_HOURS
03217
03218 #define pd_Hours(pctxt,pvalue) \
03219 pd_ConsInt8 (pctxt, pvalue, 0, 24)
03220
03221 #define pd_HoursUtc(pctxt,pvalue) \
03222 pd_ConsInt8 (pctxt, pvalue, 0, 24)
03223
03224 #else
03225
03226
03227 #define pd_Hours(pctxt,string) \
03228 pd_TimeStr (pctxt, string, OSHOURS)
03229
03230
03231 #define pd_HoursUtc(pctxt,string) \
03232 pd_TimeStr (pctxt, string, OSHOURS|OSUTC)
03233
03234 #endif
03235
03236
03237 #define pd_HoursAndDiff(pctxt,string) \
03238 pd_TimeStr (pctxt, string, OSHOURS|OSDIFF)
03239
03240
03241 #define pd_HoursAndFraction(pctxt,string,n) \
03242 pd_TimeStr (pctxt, string, OSHOURS|(n))
03243
03244
03245
03246 #define pd_HoursUtcAndFraction(pctxt,string,n) \
03247 pd_TimeStr (pctxt, string, OSHOURS|OSUTC|(n))
03248
03249
03250
03251 #define pd_HoursAndDiffAndFraction(pctxt,string,n) \
03252 pd_TimeStr (pctxt, string, OSHOURS|OSDIFF|(n))
03253
03254
03255 #define pd_Minutes(pctxt,string) \
03256 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES)
03257
03258
03259 #define pd_MinutesUtc(pctxt,string) \
03260 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSUTC)
03261
03262
03263 #define pd_MinutesAndDiff(pctxt,string) \
03264 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSDIFF)
03265
03266
03267
03268 #define pd_MinutesAndFraction(pctxt,string,n) \
03269 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|(n))
03270
03271
03272
03273 #define pd_MinutesUtcAndFraction(pctxt,string,n) \
03274 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSUTC|(n))
03275
03276
03277
03278 #define pd_MinutesAndDiffAndFraction(pctxt,string,n) \
03279 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSDIFF|(n))
03280
03281
03282
03283 #define pd_RecStartEndDateInterval(pctxt,string,flags) \
03284 pd_Interval (pctxt, string, TRUE, flags, flags)
03285
03286
03287
03288 #define pd_RecStartEndTimeInterval(pctxt,string,flags) \
03289 pd_Interval (pctxt, string, TRUE, flags, flags)
03290
03291
03292
03293 #define pd_RecStartEndDateTimeInterval(pctxt,string,flags) \
03294 pd_Interval (pctxt, string, TRUE, flags, flags)
03295
03296
03297
03298 #define pd_RecDurationInterval(pctxt,string) \
03299 pd_Duration (pctxt, string, TRUE)
03300
03301
03302
03303 #define pd_RecStartDateDurationInterval(pctxt,string,flags) \
03304 pd_Interval (pctxt, string, TRUE, flags, OSDURATION)
03305
03306
03307
03308 #define pd_RecStartTimeDurationInterval(pctxt,string,flags) \
03309 pd_Interval (pctxt, string, TRUE, flags, OSDURATION)
03310
03311
03312
03313 #define pd_RecStartDateTimeDurationInterval(pctxt,string,flags) \
03314 pd_Interval (pctxt, string, TRUE, flags, OSDURATION)
03315
03316
03317
03318 #define pd_RecDurationEndDateInterval(pctxt,string,flags) \
03319 pd_Interval (pctxt, string, TRUE, OSDURATION, flags)
03320
03321
03322
03323 #define pd_RecDurationEndTimeInterval(pctxt,string,flags) \
03324 pd_Interval (pctxt, string, TRUE, OSDURATION, flags)
03325
03326
03327
03328 #define pd_RecDurationEndDateTimeInterval(pctxt,string,flags) \
03329 pd_Interval (pctxt, string, TRUE, OSDURATION, flags)
03330
03331
03332
03333 #define pd_StartEndDateInterval(pctxt,string,flags) \
03334 pd_Interval (pctxt, string, FALSE, flags, flags)
03335
03336
03337
03338 #define pd_StartEndTimeInterval(pctxt,string,flags) \
03339 pd_Interval (pctxt, string, FALSE, flags, flags)
03340
03341
03342
03343 #define pd_StartEndDateTimeInterval(pctxt,string,flags) \
03344 pd_Interval (pctxt, string, FALSE, flags, flags)
03345
03346
03347
03348 #define pd_StartDateDurationInterval(pctxt,string,flags) \
03349 pd_Interval (pctxt, string, FALSE, flags, OSDURATION)
03350
03351
03352
03353 #define pd_StartTimeDurationInterval(pctxt,string,flags) \
03354 pd_Interval (pctxt, string, FALSE, flags, OSDURATION)
03355
03356
03357
03358 #define pd_StartDateTimeDurationInterval(pctxt,string,flags) \
03359 pd_Interval (pctxt, string, FALSE, flags, OSDURATION)
03360
03361
03362 #define pd_TimeOfDay(pctxt,string) \
03363 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS)
03364
03365
03366 #define pd_TimeOfDayUtc(pctxt,string) \
03367 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|OSUTC)
03368
03369
03370 #define pd_TimeOfDayAndDiff(pctxt,string) \
03371 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|OSDIFF)
03372
03373
03374
03375 #define pd_TimeOfDayAndFraction(pctxt,string,n) \
03376 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|(n))
03377
03378
03379
03380 #define pd_TimeOfDayUtcAndFraction(pctxt,string,n) \
03381 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|OSUTC|(n))
03382
03383
03384
03385 #define pd_TimeOfDayAndDiffAndFraction(pctxt,string,n) \
03386 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|OSDIFF|(n))
03387
03388
03389 #define pd_Year(pctxt,string) \
03390 pd_DateStr (pctxt, string, OSYEAR)
03391
03392
03393 #define pd_YearDay(pctxt,string) \
03394 pd_DateStr (pctxt, string, OSYEAR|OSDAY)
03395
03396
03397 #define pd_YearMonth(pctxt,string) \
03398 pd_DateStr (pctxt, string, OSYEAR|OSMONTH)
03399
03400
03401 #define pd_YearMonthDay(pctxt,string) \
03402 pd_DateStr (pctxt, string, OSYEAR|OSMONTH|OSDAY);
03403
03404
03405 #define pd_YearWeek(pctxt,string) \
03406 pd_DateStr (pctxt, string, OSYEAR|OSWEEK)
03407
03408
03409 #define pd_YearWeekDay(pctxt,string) \
03410 pd_DateStr (pctxt, string, OSYEAR|OSWEEK|OSDAY)
03411
03412
03413
03414
03415 #define pe_AnyCentury(pctxt,string) \
03416 pe_DateStr (pctxt, string, OSANY|OSCENTURY)
03417
03418
03419 #define pe_AnyCenturyInt(pctxt,value) \
03420 pe_UnconsInteger (pctxt, value)
03421
03422
03423 #define pe_AnyDate(pctxt,string) \
03424 pe_DateStr (pctxt, string, OSANY|OSYEAR|OSMONTH|OSDAY)
03425
03426
03427 #define pe_AnyYear(pctxt,string) \
03428 pe_DateStr (pctxt, string, OSANY|OSYEAR)
03429
03430
03431 #define pe_AnyYearInt(pctxt,value) \
03432 pe_UnconsInteger (pctxt, value)
03433
03434
03435 #define pe_AnyYearDay(pctxt,string) \
03436 pe_DateStr (pctxt, string, OSANY|OSYEAR|OSDAY)
03437
03438
03439 #define pe_AnyYearMonth(pctxt,string) \
03440 pe_DateStr (pctxt, string, OSANY|OSYEAR|OSMONTH)
03441
03442
03443 #define pe_AnyYearMonthDay(pctxt,string) \
03444 pe_DateStr (pctxt, string, OSANY|OSYEAR|OSMONTH|OSDAY)
03445
03446
03447 #define pe_AnyYearWeek(pctxt,string) \
03448 pe_DateStr (pctxt, string, OSANY|OSYEAR|OSWEEK)
03449
03450
03451 #define pe_AnyYearWeekDay(pctxt,string) \
03452 pe_DateStr (pctxt, string, OSANY|OSYEAR|OSWEEK|OSDAY)
03453
03454
03455 #define pe_Century(pctxt,string) \
03456 pe_DateStr (pctxt, string, OSCENTURY)
03457
03458
03459 #define pe_CenturyInt(pctxt,value) \
03460 pe_ConsUnsigned (pctxt, value, 0, 99)
03461
03462
03463 #define pe_Date(pctxt,string) \
03464 pe_DateStr (pctxt, string, OSYEAR_BASIC|OSYEAR|OSMONTH|OSDAY)
03465
03466
03467 #define pe_DateTime(pctxt,string) \
03468 pe_DateTimeStr (pctxt, string, \
03469 OSYEAR_BASIC|OSYEAR|OSMONTH|OSDAY|OSHOURS|OSMINUTES|OSSECONDS)
03470
03471
03472 #define pe_DurationInterval(pctxt,string) \
03473 pe_Duration (pctxt, string, FALSE)
03474
03475
03476
03477 #define pe_DurationEndDateInterval(pctxt,string,flags) \
03478 pe_Interval (pctxt, string, FALSE, OSDURATION, flags)
03479
03480
03481
03482 #define pe_DurationEndTimeInterval(pctxt,string,flags) \
03483 pe_Interval (pctxt, string, FALSE, OSDURATION, flags)
03484
03485
03486
03487 #define pe_DurationEndDateTimeInterval(pctxt,string,flags) \
03488 pe_Interval (pctxt, string, FALSE, OSDURATION, flags)
03489
03490 #ifdef BINARY_HOURS
03491
03492 #define pe_Hours(pctxt,value) \
03493 pe_ConsUnsigned (pctxt, value, 0, 24)
03494
03495 #define pe_HoursUtc(pctxt,value) \
03496 pe_ConsUnsigned (pctxt, value, 0, 24)
03497
03498 #else
03499
03500
03501 #define pe_Hours(pctxt,string) \
03502 pe_TimeStr (pctxt, string, OSHOURS)
03503
03504
03505 #define pe_HoursUtc(pctxt,string) \
03506 pe_TimeStr (pctxt, string, OSHOURS|OSUTC)
03507
03508 #endif
03509
03510
03511 #define pe_Hours(pctxt,string) \
03512 pe_TimeStr (pctxt, string, OSHOURS)
03513
03514
03515 #define pe_HoursUtc(pctxt,string) \
03516 pe_TimeStr (pctxt, string, OSHOURS|OSUTC)
03517
03518
03519 #define pe_HoursAndDiff(pctxt,string) \
03520 pe_TimeStr (pctxt, string, OSHOURS|OSDIFF)
03521
03522
03523 #define pe_HoursAndFraction(pctxt,string,n) \
03524 pe_TimeStr (pctxt, string, OSHOURS|(n))
03525
03526
03527
03528 #define pe_HoursUtcAndFraction(pctxt,string,n) \
03529 pe_TimeStr (pctxt, string, OSHOURS|OSUTC|(n))
03530
03531
03532
03533 #define pe_HoursAndDiffAndFraction(pctxt,string,n) \
03534 pe_TimeStr (pctxt, string, OSHOURS|OSDIFF|(n))
03535
03536
03537 #define pe_Minutes(pctxt,string) \
03538 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES)
03539
03540
03541 #define pe_MinutesUtc(pctxt,string) \
03542 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSUTC)
03543
03544
03545 #define pe_MinutesAndDiff(pctxt,string) \
03546 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSDIFF)
03547
03548
03549
03550 #define pe_MinutesAndFraction(pctxt,string,n) \
03551 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|(n))
03552
03553
03554
03555 #define pe_MinutesUtcAndFraction(pctxt,string,n) \
03556 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSUTC|(n))
03557
03558
03559
03560 #define pe_MinutesAndDiffAndFraction(pctxt,string,n) \
03561 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSDIFF|(n))
03562
03563
03564
03565 #define pe_RecStartEndDateInterval(pctxt,string,flags) \
03566 pe_Interval (pctxt, string, TRUE, flags, flags)
03567
03568
03569
03570 #define pe_RecStartEndTimeInterval(pctxt,string,flags) \
03571 pe_Interval (pctxt, string, TRUE, flags, flags)
03572
03573
03574
03575 #define pe_RecStartEndDateTimeInterval(pctxt,string,flags) \
03576 pe_Interval (pctxt, string, TRUE, flags, flags)
03577
03578
03579
03580 #define pe_RecDurationInterval(pctxt,string) \
03581 pe_Duration (pctxt, string, TRUE)
03582
03583
03584
03585 #define pe_RecStartDateDurationInterval(pctxt,string,flags) \
03586 pe_Interval (pctxt, string, TRUE, flags, OSDURATION)
03587
03588
03589
03590 #define pe_RecStartTimeDurationInterval(pctxt,string,flags) \
03591 pe_Interval (pctxt, string, TRUE, flags, OSDURATION)
03592
03593
03594
03595 #define pe_RecStartDateTimeDurationInterval(pctxt,string,flags) \
03596 pe_Interval (pctxt, string, TRUE, flags, OSDURATION)
03597
03598
03599
03600 #define pe_RecDurationEndDateInterval(pctxt,string,flags) \
03601 pe_Interval (pctxt, string, TRUE, OSDURATION, flags)
03602
03603
03604
03605 #define pe_RecDurationEndTimeInterval(pctxt,string,flags) \
03606 pe_Interval (pctxt, string, TRUE, OSDURATION, flags)
03607
03608
03609
03610 #define pe_RecDurationEndDateTimeInterval(pctxt,string,flags) \
03611 pe_Interval (pctxt, string, TRUE, OSDURATION, flags)
03612
03613
03614
03615 #define pe_StartEndDateInterval(pctxt,string,flags) \
03616 pe_Interval (pctxt, string, FALSE, flags, flags)
03617
03618
03619
03620 #define pe_StartEndTimeInterval(pctxt,string,flags) \
03621 pe_Interval (pctxt, string, FALSE, flags, flags)
03622
03623
03624
03625 #define pe_StartEndDateTimeInterval(pctxt,string,flags) \
03626 pe_Interval (pctxt, string, FALSE, flags, flags)
03627
03628
03629
03630 #define pe_StartDateDurationInterval(pctxt,string,flags) \
03631 pe_Interval (pctxt, string, FALSE, flags, OSDURATION)
03632
03633
03634
03635 #define pe_StartTimeDurationInterval(pctxt,string,flags) \
03636 pe_Interval (pctxt, string, FALSE, flags, OSDURATION)
03637
03638
03639
03640 #define pe_StartDateTimeDurationInterval(pctxt,string,flags) \
03641 pe_Interval (pctxt, string, FALSE, flags, OSDURATION)
03642
03643
03644 #define pe_TimeOfDay(pctxt,string) \
03645 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS)
03646
03647
03648 #define pe_TimeOfDayUtc(pctxt,string) \
03649 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|OSUTC)
03650
03651
03652 #define pe_TimeOfDayAndDiff(pctxt,string) \
03653 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|OSDIFF)
03654
03655
03656
03657 #define pe_TimeOfDayAndFraction(pctxt,string,n) \
03658 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|(n))
03659
03660
03661
03662 #define pe_TimeOfDayUtcAndFraction(pctxt,string,n) \
03663 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|OSUTC|(n))
03664
03665
03666
03667 #define pe_TimeOfDayAndDiffAndFraction(pctxt,string,n) \
03668 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|OSDIFF|(n))
03669
03670
03671 #define pe_Year(pctxt,string) \
03672 pe_DateStr (pctxt, string, OSYEAR)
03673
03674
03675 #define pe_YearDay(pctxt,string) \
03676 pe_DateStr (pctxt, string, OSYEAR|OSDAY)
03677
03678
03679 #define pe_YearMonth(pctxt,string) \
03680 pe_DateStr (pctxt, string, OSYEAR|OSMONTH)
03681
03682
03683 #define pe_YearMonthDay(pctxt,string) \
03684 pe_DateStr (pctxt, string, OSYEAR|OSMONTH|OSDAY)
03685
03686
03687 #define pe_YearWeek(pctxt,string) \
03688 pe_DateStr (pctxt, string, OSYEAR|OSWEEK)
03689
03690
03691 #define pe_YearWeekDay(pctxt,string) \
03692 pe_DateStr (pctxt, string, OSYEAR|OSWEEK|OSDAY)
03693
03694
03695
03696
03697 EXTERNPER int pu_checkSizeConstraint (OSCTXT* pctxt, int size);
03698 EXTERNPER Asn1SizeCnst* pu_getSizeConstraint (OSCTXT* pctxt, OSBOOL extbit);
03699 EXTERNPER int pu_getBitOffset (OSCTXT* pctxt);
03700 EXTERNPER void pu_setBitOffset (OSCTXT* pctxt, int bitOffset);
03701
03704 #endif