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
00088
00089 #define MAX_BIGINTBYTES (1024)
00090
00091
00092 #define OSYEAR_BASIC OSUINTCONST(0x8000000)
00093 #define OSYEAR_PROLEPTIC OSUINTCONST(0x4000000)
00094 #define OSYEAR_NEGATIVE OSUINTCONST(0x2000000)
00095 #define OSYEAR_L(n) ((OSUINT32)(n) << 28)
00096
00097 #define OSYEAR_MASK \
00098 (OSYEAR_BASIC|OSYEAR_PROLEPTIC|OSYEAR_NEGATIVE|OSYEAR_L(0xF))
00099
00100 #define OSANY (OSYEAR_NEGATIVE|OSYEAR_L(5))
00101 #define OSANY_MASK (OSYEAR_NEGATIVE|OSYEAR_L(0xF))
00102
00103 #define OSCENTURY 0x4000u
00104 #define OSYEAR 0x2000u
00105 #define OSMONTH 0x1000u
00106 #define OSWEEK 0x0800u
00107 #define OSDAY 0x0400u
00108
00109 #define OSHOURS 0x0200u
00110 #define OSMINUTES 0x0100u
00111 #define OSSECONDS 0x0080u
00112 #define OSUTC 0x0040u
00113 #define OSDIFF 0x0020u
00114
00115 #define OSFRACTION 0x000Fu
00116
00117 #define OSDURATION 0x0010u
00118
00119
00120
00121
00122 typedef struct PERField {
00123 const char* name;
00124 size_t bitOffset;
00125 size_t numbits;
00126 OSRTSList* openTypeFields;
00127 } PERField;
00128
00129
00130
00131
00132 typedef struct {
00133 unsigned char lb, lbm;
00134 char fmtBitBuffer[40], fmtHexBuffer[10], fmtAscBuffer[10];
00135 int fmtBitCharIdx, fmtHexCharIdx, fmtAscCharIdx;
00136 } BinDumpBuffer;
00137
00138
00139
00140 #define PU_SETCHARSET(csetvar, canset, abits, ubits) \
00141 csetvar.charSet.nchars = 0; \
00142 csetvar.canonicalSet = canset; \
00143 csetvar.canonicalSetSize = sizeof(canset)-1; \
00144 csetvar.canonicalSetBits = pu_bitcnt(csetvar.canonicalSetSize); \
00145 csetvar.charSetUnalignedBits = ubits; \
00146 csetvar.charSetAlignedBits = abits;
00147
00148
00149
00150
00151 #ifdef _TRACE
00152 #define PU_INSLENFLD(pctxt) RTDIAG_INSBITFLDLEN(pctxt)
00153 #define PU_NEWFIELD(pctxt,suffix) RTDIAG_NEWBITFIELD(pctxt,suffix)
00154 #define PU_PUSHNAME(pctxt,name)
00155 #define PU_PUSHELEMNAME(pctxt,idx)
00156 #define PU_POPNAME(pctxt)
00157 #define PU_SETBITOFFSET(pctxt) RTDIAG_SETBITFLDOFFSET(pctxt)
00158 #define PU_SETBITCOUNT(pctxt) RTDIAG_SETBITFLDCOUNT(pctxt)
00159 #define PU_SETOPENTYPEFLDLIST(pMainBFList,pOpenTypeBFList) \
00160 pu_setRtxDiagOpenTypeFldList(pMainBFList,pOpenTypeBFList)
00161 #else
00162 #define PU_INSLENFLD(pctxt)
00163 #define PU_NEWFIELD(pctxt,suffix)
00164 #define PU_PUSHNAME(pctxt,name)
00165 #define PU_PUSHELEMNAME(pctxt,idx)
00166 #define PU_POPNAME(pctxt)
00167 #define PU_SETBITOFFSET(pctxt)
00168 #define PU_SETBITCOUNT(pctxt)
00169 #define PU_SETOPENTYPEFLDLIST(pMainBFList,pOpenTypeBFList)
00170 #endif
00171
00172 #ifdef __cplusplus
00173 extern "C" {
00174 #endif
00175
00176 #ifdef __SYMBIAN32__
00177 #define EXTPERCLASS
00178
00179 #ifdef BUILDASN1PERDLL
00180 #define EXTERNPER EXPORT_C
00181 #define EXTPERMETHOD EXPORT_C
00182 #elif defined(USEASN1PERDLL)
00183 #define EXTERNPER IMPORT_C
00184 #define EXTPERMETHOD IMPORT_C
00185 #else
00186 #define EXTERNPER
00187 #define EXTPERMETHOD
00188 #endif
00189
00190 #else
00191 #define EXTPERMETHOD
00192
00193 #if defined(_WIN32) || defined(_WIN64)
00194 #ifdef BUILDASN1PERDLL
00195 #define EXTERNPER __declspec(dllexport)
00196 #define EXTPERCLASS __declspec(dllexport)
00197 #elif defined (USEASN1PERDLL)
00198 #define EXTERNPER __declspec(dllimport)
00199 #define EXTPERCLASS __declspec(dllimport)
00200 #else
00201 #define EXTERNPER
00202 #define EXTPERCLASS
00203 #endif
00204 #else
00205 #ifndef EXTERNPER
00206 #define EXTERNPER
00207 #endif
00208 #ifndef EXTPERCLASS
00209 #define EXTPERCLASS
00210 #endif
00211 #endif
00212
00213 #endif
00214
00215
00216
00217
00218
00219 #define PD_BIT(pctxt,pvalue) DEC_BIT(pctxt,pvalue)
00220
00221
00222
00223 #define PU_SETSIZECONSTRAINT(pctxt,rootLower,rootUpper,extLower,extUpper) \
00224 ACINFO(pctxt)->sizeConstraint.root.lower = rootLower; \
00225 ACINFO(pctxt)->sizeConstraint.root.upper = rootUpper; \
00226 ACINFO(pctxt)->sizeConstraint.ext.lower = extLower; \
00227 ACINFO(pctxt)->sizeConstraint.ext.upper = extUpper
00228
00229
00230
00231 #define PU_INITSIZECONSTRAINT(pctxt) PU_SETSIZECONSTRAINT(pctxt,0,0,0,0)
00232
00233
00234
00235 #define PU_GETSIZECONSTRAINT(pctxt,extbit) ((extbit) ? \
00236 &ACINFO(pctxt)->sizeConstraint.ext : &ACINFO(pctxt)->sizeConstraint.root)
00237
00238
00239
00240
00241 #define PU_GETCTXTBITOFFSET(pctxt) \
00242 (((pctxt)->buffer.byteIndex * 8) + (8 - (pctxt)->buffer.bitOffset))
00243
00246 #define PU_GETPADBITS(pctxt) \
00247 (((pctxt)->buffer.bitOffset == 8) ? 0 : (pctxt)->buffer.bitOffset)
00248
00249
00250
00251 #define PU_SETCTXTBITOFFSET(pctxt,_bitOffset) \
00252 do { \
00253 (pctxt)->buffer.byteIndex = (_bitOffset / 8); \
00254 (pctxt)->buffer.bitOffset = (OSUINT16)(8 - (_bitOffset % 8)); \
00255 } while(0)
00256
00257
00258
00259 #define PD_BYTE_ALIGN0(pctxt) \
00260 ((!(pctxt)->buffer.aligned) ? 0 : \
00261 (((pctxt)->buffer.bitOffset != 8) ? ( \
00262 (pctxt)->buffer.byteIndex++, \
00263 (pctxt)->buffer.bitOffset = 8, \
00264 0) : 0 \
00265 ))
00266
00267 #ifdef _TRACE
00268 #define PD_BYTE_ALIGN(pctxt) \
00269 ((!(pctxt)->buffer.aligned) ? 0 : \
00270 (((pctxt)->buffer.bitOffset != 8) ? ( \
00271 (pctxt)->buffer.byteIndex++, \
00272 (pctxt)->buffer.bitOffset = 8, \
00273 pu_setFldBitOffset(pctxt), \
00274 0) : 0 \
00275 ))
00276 #else
00277 #define PD_BYTE_ALIGN PD_BYTE_ALIGN0
00278 #endif
00279
00280 #define PD_CHECKSEQOFLEN(pctxt,numElements,minElemBits) \
00281 ((pctxt->buffer.size > 0) ? \
00282 (((numElements * minElemBits) > (pctxt->buffer.size * 8)) ? \
00283 LOG_RTERR (pctxt,ASN_E_INVLEN) : 0) : 0)
00284
00322 EXTERNPER int pd_BigInteger (OSCTXT *pctxt, const char** ppvalue);
00323
00340 EXTERNPER int pd_BigIntegerEx (OSCTXT *pctxt, const char** ppvalue, int radix);
00341
00359 EXTERNPER int pd_BigIntegerValue
00360 (OSCTXT *pctxt, const char** ppvalue, int radix, OSUINT32 nbytes);
00361
00382 EXTERNPER int pd_BitString
00383 (OSCTXT* pctxt, OSUINT32* numbits_p, OSOCTET* buffer, OSSIZE bufsiz);
00384
00391 EXTERNPER int pd_BitString64
00392 (OSCTXT* pctxt, OSSIZE* numbits_p, OSOCTET* buffer, OSSIZE bufsiz);
00393
00400 EXTERNPER int pd_BitString32
00401 (OSCTXT* pctxt, ASN1BitStr32* pbitstr, OSSIZE lower, OSSIZE upper);
00402
00427 EXTERNPER int pd_BMPString
00428 (OSCTXT* pctxt, ASN1BMPString* pvalue, Asn116BitCharSet* permCharSet);
00429
00453 EXTERNPER int pd_UniversalString
00454 (OSCTXT* pctxt, ASN1UniversalString* pvalue, Asn132BitCharSet* permCharSet);
00455
00467 EXTERNPER int pd_byte_align (OSCTXT* pctxt);
00468
00479 EXTERNPER int pd_ChoiceOpenTypeExt
00480 (OSCTXT* pctxt, const OSOCTET** object_p2, OSSIZE* pnumocts);
00481
00494 EXTERNPER int pd_ConsInteger
00495 (OSCTXT* pctxt, OSINT32* pvalue, OSINT64 lower, OSINT64 upper);
00496
00497
00511 EXTERNPER int pd_ConsInt8
00512 (OSCTXT* pctxt, OSINT8* pvalue, OSINT64 lower, OSINT64 upper);
00513
00527 EXTERNPER int pd_ConsInt16 (OSCTXT* pctxt,
00528 OSINT16* pvalue, OSINT64 lower, OSINT64 upper);
00529
00543 EXTERNPER int pd_ConsInt64 (OSCTXT* pctxt,
00544 OSINT64* pvalue, OSINT64 lower, OSINT64 upper);
00545
00559 EXTERNPER int pd_ConsUnsigned
00560 (OSCTXT* pctxt, OSUINT32* pvalue, OSUINT64 lower, OSUINT64 upper);
00561
00575 EXTERNPER int pd_ConsUnsignedSignedBound
00576 (OSCTXT* pctxt, OSUINT32* pvalue, OSINT64 lower, OSINT64 upper);
00577
00578
00592 EXTERNPER int pd_ConsUInt8 (OSCTXT* pctxt,
00593 OSUINT8* pvalue, OSUINT64 lower, OSUINT64 upper);
00594
00608 EXTERNPER int pd_ConsUInt8SignedBound (OSCTXT* pctxt,
00609 OSUINT8* pvalue, OSINT64 lower, OSINT64 upper);
00610
00624 EXTERNPER int pd_ConsUInt16
00625 (OSCTXT* pctxt, OSUINT16* pvalue, OSUINT64 lower, OSUINT64 upper);
00626
00640 EXTERNPER int pd_ConsUInt16SignedBound
00641 (OSCTXT* pctxt, OSUINT16* pvalue, OSINT64 lower, OSINT64 upper);
00642
00656 EXTERNPER int pd_ConsUInt64 (OSCTXT* pctxt, OSUINT64* pvalue,
00657 OSUINT64 lower, OSUINT64 upper);
00658
00672 EXTERNPER int pd_ConsUInt64SignedBound (OSCTXT* pctxt, OSUINT64* pvalue,
00673 OSINT64 lower, OSINT64 upper);
00674
00692 EXTERNPER int pd_ConsWholeNumber
00693 (OSCTXT* pctxt, OSUINT32* padjusted_value, OSUINT32 range_value);
00694
00712 EXTERNPER int pd_ConsWholeNumber64
00713 (OSCTXT* pctxt, OSUINT64* padjusted_value, OSUINT64 range_value);
00714
00731 EXTERNPER int pd_ConstrainedString
00732 (OSCTXT* pctxt, const char** string, Asn1CharSet* pCharSet);
00733
00753 EXTERNPER int pd_ConstrainedStringEx
00754 (OSCTXT* pctxt, const char** string, const char* charSet,
00755 OSUINT32 abits, OSUINT32 ubits, OSUINT32 canSetBits);
00756
00775 EXTERNPER int pd_ConstrFixedLenStringEx
00776 (OSCTXT* pctxt, char* strbuf, size_t bufsiz, const char* charSet,
00777 OSUINT32 abits, OSUINT32 ubits, OSUINT32 canSetBits);
00778
00801 EXTERNPER int pd_16BitConstrainedString
00802 (OSCTXT* pctxt, Asn116BitCharString* pString, Asn116BitCharSet* pCharSet);
00803
00826 EXTERNPER int pd_32BitConstrainedString
00827 (OSCTXT* pctxt, Asn132BitCharString* pString, Asn132BitCharSet* pCharSet);
00828
00840 EXTERNPER int pd_DateStr (OSCTXT* pctxt, const char** string, OSUINT32 flags);
00841
00855 EXTERNPER int pd_DateTimeStr
00856 (OSCTXT* pctxt, const char** string, OSUINT32 flags);
00857
00869 EXTERNPER int pd_Duration (OSCTXT* pctxt, const char** string, OSBOOL rec);
00870
00893 EXTERNPER int pd_DynBitString (OSCTXT* pctxt, ASN1DynBitStr* pBitStr);
00894
00900 EXTERNPER int pd_DynBitString64 (OSCTXT* pctxt, ASN1DynBitStr64* pBitStr);
00901
00918 EXTERNPER int pd_DynOctetString (OSCTXT* pctxt, ASN1DynOctStr* pOctStr);
00919
00925 EXTERNPER int pd_DynOctetString64 (OSCTXT* pctxt, OSDynOctStr64* pOctStr);
00926
00943 EXTERNPER int pd_GetBinStrDataOffset
00944 (OSCTXT* pctxt, OSUINT32* pnumbits, OSBOOL bitStrFlag);
00945
00960 EXTERNPER int pd_GetComponentLength (OSCTXT* pctxt, OSUINT32 itemBits);
00961
00978 EXTERNPER int pd_GetComponentLength64
00979 (OSCTXT* pctxt, OSUINT32 itemBits, OSSIZE* plength);
00980
00997 EXTERNPER int pd_Interval
00998 (OSCTXT* pctxt, const char** string, OSBOOL rec,
00999 OSUINT32 startFlags, OSUINT32 endFlags);
01000
01014 EXTERNPER int pd_Length (OSCTXT* pctxt, OSUINT32* pvalue);
01015
01030 EXTERNPER int pd_Length64 (OSCTXT* pctxt, OSSIZE* pvalue);
01031
01039
01040 #define pd_moveBitCursor(pctxt,bitOffset) rtxMoveBitCursor(pctxt,bitOffset)
01041
01054 EXTERNPER int pd_ObjectIdentifier (OSCTXT* pctxt, ASN1OBJID* pvalue);
01055
01069 EXTERNPER int pd_oid64 (OSCTXT* pctxt, ASN1OID64* pvalue);
01070
01083 EXTERNPER int pd_RelativeOID (OSCTXT* pctxt, ASN1OBJID* pvalue);
01084
01103 EXTERNPER int pd_OctetString
01104 (OSCTXT* pctxt, OSUINT32* pnumocts, OSOCTET* buffer, OSUINT32 bufsiz);
01105
01125 EXTERNPER int pd_OctetString64
01126 (OSCTXT* pctxt, OSSIZE* pnumocts, OSOCTET* buffer, OSSIZE bufsiz);
01127
01145 EXTERNPER int pd_OpenType
01146 (OSCTXT* pctxt, const OSOCTET** object_p2, OSSIZE* pnumocts);
01147
01169 EXTERNPER int pd_OpenTypeExt
01170 (OSCTXT* pctxt, const OSOCTET** object_p2, OSSIZE* pnumocts);
01171
01172 #ifndef _NO_ASN1REAL
01173
01186 EXTERNPER int pd_Real (OSCTXT* pctxt, OSREAL* pvalue);
01187 #endif
01188
01204 EXTERNPER int pd_SmallLength
01205 (OSCTXT* pctxt, OSUINT32* pvalue);
01206
01222 EXTERNPER int pd_SmallNonNegWholeNumber
01223 (OSCTXT* pctxt, OSUINT32* pvalue);
01224
01236 EXTERNPER int pd_SemiConsInteger
01237 (OSCTXT* pctxt, OSINT32* pvalue, OSINT64 lower);
01238
01251 EXTERNPER int pd_SemiConsUnsigned
01252 (OSCTXT* pctxt, OSUINT32* pvalue, OSUINT64 lower);
01253
01266 EXTERNPER int pd_SemiConsUnsignedSignedBound
01267 (OSCTXT* pctxt, OSINT32* pvalue, OSINT64 lower);
01268
01281 EXTERNPER int pd_SemiConsInt8
01282 (OSCTXT* pctxt, OSINT8* pvalue, OSINT64 lower);
01283
01296 EXTERNPER int pd_SemiConsUInt8
01297 (OSCTXT* pctxt, OSUINT8* pvalue, OSUINT64 lower);
01298
01311 EXTERNPER int pd_SemiConsUInt8SignedBound
01312 (OSCTXT* pctxt, OSUINT8* pvalue, OSINT64 lower);
01313
01326 EXTERNPER int pd_SemiConsInt16
01327 (OSCTXT* pctxt, OSINT16* pvalue, OSINT64 lower);
01328
01341 EXTERNPER int pd_SemiConsUInt16
01342 (OSCTXT* pctxt, OSUINT16* pvalue, OSUINT64 lower);
01343
01344
01357 EXTERNPER int pd_SemiConsUInt16SignedBound
01358 (OSCTXT* pctxt, OSUINT16* pvalue, OSINT64 lower);
01359
01360
01373 EXTERNPER int pd_SemiConsInt64
01374 (OSCTXT* pctxt, OSINT64* pvalue, OSINT64 lower);
01375
01388 EXTERNPER int pd_SemiConsUInt64
01389 (OSCTXT* pctxt, OSUINT64* pvalue, OSUINT64 lower);
01390
01403 EXTERNPER int pd_SemiConsUInt64SignedBound
01404 (OSCTXT* pctxt, OSUINT64* pvalue, OSINT64 lower);
01405
01418 EXTERNPER int pd_TimeStr (OSCTXT* pctxt, const char** string, OSUINT32 flags);
01419
01429 EXTERNPER int pd_UnconsInteger (OSCTXT *pctxt, OSINT32* pvalue);
01430
01441 EXTERNPER int pd_UnconsLength (OSCTXT *pctxt, OSUINT32* pvalue);
01442
01454 EXTPERMETHOD int pd_UnconsLength64 (OSCTXT* pctxt, OSSIZE* pvalue);
01455
01468 EXTERNPER int pd_UnconsUnsigned (OSCTXT* pctxt, OSUINT32* pvalue);
01469
01480 EXTERNPER int pd_UnconsInt8 (OSCTXT *pctxt, OSINT8* pvalue);
01481
01495 EXTERNPER int pd_UnconsUInt8 (OSCTXT* pctxt, OSUINT8* pvalue);
01496
01507 EXTERNPER int pd_UnconsInt16 (OSCTXT *pctxt, OSINT16* pvalue);
01508
01522 EXTERNPER int pd_UnconsUInt16 (OSCTXT* pctxt, OSUINT16* pvalue);
01523
01534 EXTERNPER int pd_UnconsInt64 (OSCTXT *pctxt, OSINT64* pvalue);
01535
01549 EXTERNPER int pd_UnconsUInt64 (OSCTXT* pctxt, OSUINT64* pvalue);
01550
01562 EXTERNPER int pd_VarWidthCharString (OSCTXT* pctxt, const char** pvalue);
01563
01573 EXTERNPER int pd_YearInt (OSCTXT* pctxt, OSINT32* pvalue);
01574
01575 #ifndef _NO_ASN1REAL
01576
01589 EXTERNPER int pd_Real10 (OSCTXT *pctxt, const char** ppvalue);
01590 #endif
01591
01597 EXTERNPER OSBOOL pd_isFragmented (OSCTXT* pctxt);
01598
01599 EXTERNPER void pd_OpenTypeStart
01600 (OSCTXT* pctxt, OSSIZE* pSavedSize, OSINT16* pSavedBitOff);
01601
01602 EXTERNPER int pd_OpenTypeEnd
01603 (OSCTXT* pctxt, OSSIZE savedSize, OSINT16 savedBitOff);
01604
01623 EXTERNPER int uperDecConstrString
01624 (OSCTXT* pctxt, const char** string, const char* charSet,
01625 OSUINT32 nbits, OSUINT32 canSetBits);
01626
01645 EXTERNPER int uperDecConstrFixedLenString
01646 (OSCTXT* pctxt, char* strbuf, size_t bufsiz, const char* charSet,
01647 OSUINT32 nbits, OSUINT32 canSetBits);
01648
01651
01695 EXTERNPER int pe_16BitConstrainedString
01696 (OSCTXT* pctxt, Asn116BitCharString value, Asn116BitCharSet* pCharSet);
01697
01720 EXTERNPER int pe_32BitConstrainedString
01721 (OSCTXT* pctxt, Asn132BitCharString value, Asn132BitCharSet* pCharSet);
01722
01733 EXTERNPER int pe_2sCompBinInt
01734 (OSCTXT* pctxt, OSINT32 value);
01735
01746 EXTERNPER int pe_2sCompBinInt64 (OSCTXT* pctxt, OSINT64 value);
01747
01754 EXTERNPER int pe_aligned_octets
01755 (OSCTXT* pctxt, OSOCTET* pvalue, OSUINT32 nocts);
01756
01776 EXTERNPER int pe_BigInteger
01777 (OSCTXT* pctxt, const char* pvalue);
01778
01788
01789
01790 #define pe_bit(pctxt,value) rtxEncBit(pctxt,value)
01791
01802
01803
01804 #define pe_bits(pctxt,value,nbits) rtxEncBits(pctxt,value,nbits)
01805
01818 EXTERNPER int pe_bits64 (OSCTXT* pctxt, OSUINT64 value, OSUINT32 nbits);
01819
01833 EXTERNPER int pe_BitString
01834 (OSCTXT* pctxt, OSSIZE numocts, const OSOCTET* data);
01835
01836 EXTERNPER int pe_BitString32
01837 (OSCTXT* pctxt, ASN1BitStr32* pbitstr, OSUINT32 lower, OSUINT32 upper);
01838
01862 EXTERNPER int pe_BMPString
01863 (OSCTXT* pctxt, ASN1BMPString value, Asn116BitCharSet* permCharSet);
01864
01888 EXTERNPER int pe_UniversalString
01889 (OSCTXT* pctxt, ASN1UniversalString value, Asn132BitCharSet* permCharSet);
01890
01902 EXTERNPER int pe_byte_align (OSCTXT* pctxt);
01903
01919
01920 #define pe_CheckBuffer(pctxt,nbytes) rtxCheckOutputBuffer(pctxt,nbytes)
01921
01933 EXTERNPER int pe_ChoiceTypeExt
01934 (OSCTXT* pctxt, OSUINT32 numocts, const OSOCTET* data);
01935
01948 #define pe_ConsInteger(pctxt, value, lower, upper) \
01949 pe_ConsInt64(pctxt, value, lower, upper)
01950
01963 EXTERNPER int pe_ConsInt64 (OSCTXT* pctxt,
01964 OSINT64 value, OSINT64 lower, OSINT64 upper);
01965
01977 EXTERNPER int pe_ConstrainedString
01978 (OSCTXT* pctxt, const char* string, Asn1CharSet* pCharSet);
01979
01997 EXTERNPER int pe_ConstrainedStringEx
01998 (OSCTXT* pctxt, const char* string, const char* charSet,
01999 OSUINT32 abits, OSUINT32 ubits, OSUINT32 canSetBits);
02000
02016 #define pe_ConsUnsigned(pctxt, value, lower, upper) \
02017 pe_ConsUInt64(pctxt, value, lower, upper)
02018
02034 #define pe_ConsUnsignedSignedBound(pcxt, value, lower, upper) \
02035 pe_ConsUInt64SignedBound(pctxt, value, lower, upper)
02036
02056 EXTERNPER int pe_ConsUInt64 (OSCTXT* pctxt, OSUINT64 value,
02057 OSUINT64 lower, OSUINT64 upper);
02058
02078 EXTERNPER int pe_ConsUInt64SignedBound (OSCTXT* pctxt, OSUINT64 value,
02079 OSINT64 lower, OSINT64 upper);
02080
02096 EXTERNPER int pe_ConsWholeNumber
02097 (OSCTXT* pctxt, OSUINT32 adjusted_value, OSUINT32 range_value);
02098
02114 EXTERNPER int pe_ConsWholeNumber64
02115 (OSCTXT* pctxt, OSUINT64 adjusted_value, OSUINT64 range_value);
02116
02128 EXTERNPER int pe_DateStr (OSCTXT* pctxt, const char* string, OSUINT32 flags);
02129
02143 EXTERNPER int pe_DateTimeStr
02144 (OSCTXT* pctxt, const char* string, OSUINT32 flags);
02145
02157 EXTERNPER int pe_Duration (OSCTXT* pctxt, const char* string, OSBOOL rec);
02158
02162 EXTERNPER OSUINT32 pe_GetIntLen (OSUINT32 value);
02163
02169 EXTERNPER size_t pe_GetMsgBitCnt (OSCTXT* pctxt);
02170
02189 EXTERNPER OSOCTET* pe_GetMsgPtr (OSCTXT* pctxt, OSINT32* pLength);
02190
02197 EXTERNPER OSOCTET* pe_GetMsgPtrU (OSCTXT* pctxt, OSUINT32* pLength);
02198
02205 EXTERNPER OSOCTET* pe_GetMsgPtr64 (OSCTXT* pctxt, OSSIZE* pLength);
02206
02224 EXTERNPER int pe_Interval
02225 (OSCTXT* pctxt, const char* string, OSBOOL rec,
02226 OSUINT32 startFlags, OSUINT32 endFlags);
02227
02245 EXTERNPER int pe_Length (OSCTXT* pctxt, OSSIZE value);
02246
02257 EXTERNPER int pe_NonNegBinInt (OSCTXT* pctxt, OSUINT32 value);
02258
02269 EXTERNPER int pe_NonNegBinInt64 (OSCTXT* pctxt, OSUINT64 value);
02270
02283 EXTERNPER int pe_ObjectIdentifier (OSCTXT* pctxt, ASN1OBJID* pvalue);
02284
02285 #ifndef _NO_INT64_SUPPORT
02286
02299 EXTERNPER int pe_oid64 (OSCTXT* pctxt, ASN1OID64* pvalue);
02300 #endif
02301
02314 EXTERNPER int pe_RelativeOID (OSCTXT* pctxt, ASN1OBJID* pvalue);
02315
02329
02330
02331 #define pe_octets(pctxt,pvalue,nbits) \
02332 rtxEncBitsFromByteArray(pctxt,pvalue,nbits)
02333
02346 EXTERNPER int pe_OctetString
02347 (OSCTXT* pctxt, OSSIZE numocts, const OSOCTET* data);
02348
02364 EXTERNPER int pe_OpenType
02365 (OSCTXT* pctxt, OSSIZE numocts, const OSOCTET* data);
02366
02382 EXTERNPER int pe_OpenTypeEnd (OSCTXT* pctxt, OSUINT32 pos, void* pPerField);
02383
02402 EXTERNPER int pe_OpenTypeExt
02403 (OSCTXT* pctxt, OSRTDList* pElemList);
02404
02414 EXTERNPER int pe_OpenTypeExtBits
02415 (OSCTXT* pctxt, OSRTDList* pElemList);
02416
02431 EXTERNPER int pe_OpenTypeStart
02432 (OSCTXT* pctxt, OSUINT32* pPos, void** ppPerField);
02433
02434 #ifndef _NO_ASN1REAL
02435
02452 EXTERNPER int pe_Real (OSCTXT* pctxt, OSREAL value);
02453 #endif
02454
02469 EXTERNPER int pe_SmallNonNegWholeNumber (OSCTXT* pctxt, OSUINT32 value);
02470
02471
02486 EXTERNPER int pe_SmallLength (OSCTXT* pctxt, OSSIZE value);
02487
02488
02500 #define pe_SemiConsInteger(pctxt, value, lower) \
02501 pe_SemiConsInt64(pctxt, value, lower)
02502
02514 EXTERNPER int pe_SemiConsInt64
02515 (OSCTXT* pctxt, OSINT64 value, OSINT64 lower);
02516
02517
02529 #define pe_SemiConsUnsigned(pctxt,value,lower) pe_SemiConsUInt64(pctxt, value, lower)
02530
02542 EXTERNPER int pe_SemiConsUnsignedSignedBound
02543 (OSCTXT* pctxt, OSUINT32 value, OSINT64 lower);
02544
02545 #ifndef _NO_INT64_SUPPORT
02546
02558 EXTERNPER int pe_SemiConsUInt64
02559 (OSCTXT* pctxt, OSUINT64 value, OSUINT64 lower);
02560
02573 EXTERNPER int pe_SemiConsUInt64SignedBound
02574 (OSCTXT* pctxt, OSUINT64 value, OSINT64 lower);
02575
02576 #endif
02577
02590 EXTERNPER int pe_TimeStr (OSCTXT* pctxt, const char* string, OSUINT32 flags);
02591
02604 EXTERNPER int pe_UnconsLength (OSCTXT* pctxt, OSSIZE value);
02605
02615 EXTERNPER int pe_UnconsInteger (OSCTXT* pctxt, OSINT32 value);
02616
02617 #ifndef _NO_INT64_SUPPORT
02618
02627 EXTERNPER int pe_UnconsInt64 (OSCTXT* pctxt, OSINT64 value);
02628 #endif
02629
02639 EXTERNPER int pe_UnconsUnsigned (OSCTXT* pctxt, OSUINT32 value);
02640
02641 #ifndef _NO_INT64_SUPPORT
02642
02652 EXTERNPER int pe_UnconsUInt64 (OSCTXT* pctxt, OSUINT64 value);
02653 #endif
02654
02667 EXTERNPER int pe_VarWidthCharString (OSCTXT* pctxt, const char* value);
02668
02678 EXTERNPER int pe_YearInt (OSCTXT* pctxt, OSINT32 value);
02679
02680 #ifndef _NO_ASN1REAL
02681
02694 EXTERNPER int pe_Real10 (OSCTXT* pctxt, const char* pvalue);
02695 #endif
02696
02713 EXTERNPER int uperEncConstrString
02714 (OSCTXT* pctxt, const char* string, const char* charSet,
02715 OSUINT32 nbits, OSUINT32 canSetBits);
02716
02719
02720
02721
02742 EXTERNPER int pu_addSizeConstraint (OSCTXT* pctxt, const Asn1SizeCnst* pSize);
02743
02744 EXTERNPER OSBOOL pu_alignCharStr
02745 (OSCTXT* pctxt, OSUINT32 len, OSUINT32 nbits, Asn1SizeCnst* pSize);
02746
02747 EXTERNPER OSUINT32 pu_bitcnt (OSUINT32 value);
02748
02749 EXTERNPER Asn1SizeCnst* pu_checkSize
02750 (Asn1SizeCnst* pSizeList, OSUINT32 value, OSBOOL* pExtendable);
02751
02765 EXTERNPER int pu_checkSizeExt
02766 (Asn1SizeCnst* pSizeCnst, OSSIZE value, OSBOOL* pExtendable,
02767 Asn1SizeValueRange* pSizeRange, OSBOOL* pExtSize);
02768
02782 EXTERNPER void pu_freeContext (OSCTXT* pctxt);
02783
02784 EXTERNPER size_t pu_getMaskAndIndex (size_t bitOffset, unsigned char* pMask);
02785
02800 EXTERNPER size_t pu_getMsgLen (OSCTXT* pctxt);
02801
02816 EXTERNPER size_t pu_getMsgLenBits (OSCTXT* pctxt);
02817
02826 EXTERNPER void pu_hexdump (OSCTXT* pctxt);
02827
02844 EXTERNPER int pu_setBuffer
02845 (OSCTXT* pctxt, OSOCTET* bufaddr, size_t bufsiz, OSBOOL aligned);
02846
02847 #define pd_setp(pctxt, bufaddr, bufsiz, aligned) \
02848 pu_setBuffer(pctxt, bufaddr, bufsiz, aligned)
02849
02850 #define pe_setp(pctxt, bufaddr, bufsiz, aligned) \
02851 pu_setBuffer(pctxt, bufaddr, bufsiz, aligned)
02852
02853 #define pe_resetp(pctxt) rtxResetContext(pctxt)
02854 #define pd_resetp(pctxt) rtxResetContext(pctxt)
02855
02856
02857
02885 EXTERNPER int pu_initContext
02886 (OSCTXT* pctxt, OSOCTET* bufaddr, OSUINT32 bufsiz, OSBOOL aligned);
02887
02904 EXTERNPER int pu_initContextBuffer (OSCTXT* pTarget, OSCTXT* pSource);
02905
02906 EXTERNPER const char* pu_getFullName (OSCTXT* pctxt, const char* suffix);
02907
02914 EXTERNPER void pu_insLenField (OSCTXT* pctxt);
02915
02923 EXTERNPER OSBOOL pu_isFixedSize (const Asn1SizeCnst* pSizeList);
02924
02949 EXTERNPER OSCTXT* pu_newContext
02950 (OSOCTET* bufaddr, OSUINT32 bufsiz, OSBOOL aligned);
02951
02960 EXTERNPER PERField* pu_newField
02961 (OSCTXT* pctxt, const char* nameSuffix);
02962
02973 EXTERNPER void pu_initFieldList (OSCTXT* pctxt, OSINT16 bitOffset);
02974
02983 EXTERNPER void pu_initRtxDiagBitFieldList (OSCTXT* pctxt, OSINT16 bitOffset);
02984
02993 EXTERNPER void pu_popName (OSCTXT* pctxt);
02994
03004 EXTERNPER void pu_pushElemName (OSCTXT* pctxt, int idx);
03005
03015 EXTERNPER void pu_pushName (OSCTXT* pctxt, const char* name);
03016
03028 EXTERNPER void pu_setCharSet (Asn1CharSet* pCharSet, const char* permSet);
03029
03046 EXTERNPER int pu_set16BitCharSet
03047 (OSCTXT* pctxt, Asn116BitCharSet* pCharSet, Asn116BitCharSet* pAlphabet);
03048
03060 EXTERNPER void pu_set16BitCharSetFromRange
03061 (Asn116BitCharSet* pCharSet, OSUINT16 firstChar, OSUINT16 lastChar);
03062
03063 EXTERNPER void pu_setFldBitCount (OSCTXT* pctxt);
03064
03065 EXTERNPER void pu_setFldBitOffset (OSCTXT* pctxt);
03066
03067 EXTERNPER void pu_setFldListFromCtxt (OSCTXT* pctxt, OSCTXT* srcctxt);
03068
03069 EXTERNPER void pu_setOpenTypeFldList (OSCTXT* pctxt, OSRTSList* plist);
03070
03071 EXTERNPER void pu_setRtxDiagOpenTypeFldList
03072 (OSRTDiagBitFieldList* pMainBFList, OSRTDiagBitFieldList* pOpenTypeBFList);
03073
03074 EXTERNPER OSBOOL pu_setTrace (OSCTXT* pCtxt, OSBOOL value);
03075
03076 EXTERNPER void pu_setAligned (OSCTXT* pctxt, OSBOOL value);
03077
03078 EXTERNPER void pu_deleteFieldList (OSCTXT* pctxt);
03079
03094 EXTERNPER void pu_bindump (OSCTXT* pctxt, const char* varname);
03095
03096 EXTERNPER void pu_dumpField
03097 (OSCTXT* pctxt, PERField* pField, const char* varname,
03098 size_t nextBitOffset, BinDumpBuffer* pbuf);
03099
03116 EXTERNPER int pu_set32BitCharSet
03117 (OSCTXT* pctxt, Asn132BitCharSet* pCharSet, Asn132BitCharSet* pAlphabet);
03118
03130 EXTERNPER void pu_set32BitCharSetFromRange
03131 (Asn132BitCharSet* pCharSet, OSUINT32 firstChar, OSUINT32 lastChar);
03132
03142 EXTERNPER int pu_GetLibVersion (OSVOIDARG);
03143
03151 EXTERNPER const char* pu_GetLibInfo (OSVOIDARG);
03152
03157 #ifdef __cplusplus
03158 }
03159 #endif
03160
03161
03162
03163 #define pd_bit(pctxt,pvalue) rtxDecBit(pctxt,pvalue)
03164
03165 #define pd_bits(pctxt,pvalue,nbits) rtxDecBits(pctxt,pvalue,nbits)
03166
03167 #define pd_octets(pctxt,pbuffer,bufsiz,nbits) \
03168 rtxDecBitsToByteArray(pctxt,pbuffer,bufsiz,nbits)
03169
03170 #define pe_GeneralString(pctxt,value,permCharSet) \
03171 pe_VarWidthCharString(pctxt, value)
03172
03173 #define pe_GraphicString(pctxt,value,permCharSet) \
03174 pe_VarWidthCharString(pctxt, value)
03175
03176 #define pe_T61String(pctxt,value,permCharSet) \
03177 pe_VarWidthCharString(pctxt, value)
03178
03179 #define pe_TeletexString(pctxt,value,permCharSet) \
03180 pe_VarWidthCharString(pctxt, value)
03181
03182 #define pe_VideotexString(pctxt,value,permCharSet) \
03183 pe_VarWidthCharString(pctxt, value)
03184
03185 #define pe_ObjectDescriptor(pctxt,value,permCharSet) \
03186 pe_VarWidthCharString(pctxt, value)
03187
03188 #define pe_UTF8String(pctxt,value,permCharSet) \
03189 pe_VarWidthCharString(pctxt, value)
03190
03191 #define pe_IA5String(pctxt,value,permCharSet) \
03192 pe_ConstrainedStringEx (pctxt, value, permCharSet, 8, 7, 7)
03193
03194 #define pe_NumericString(pctxt,value,permCharSet) \
03195 pe_ConstrainedStringEx (pctxt, value, \
03196 (permCharSet == 0)?NUM_CANSET:permCharSet, 4, 4, 4)
03197
03198 #define pe_PrintableString(pctxt,value,permCharSet) \
03199 pe_ConstrainedStringEx (pctxt, value, permCharSet, 8, 7, 7)
03200
03201 #define pe_VisibleString(pctxt,value,permCharSet) \
03202 pe_ConstrainedStringEx (pctxt, value, permCharSet, 8, 7, 7)
03203
03204 #define pe_ISO646String pe_IA5String
03205 #define pe_GeneralizedTime pe_IA5String
03206 #define pe_UTCTime pe_GeneralizedTime
03207
03208 #define pd_GeneralString(pctxt,pvalue,permCharSet) \
03209 pd_VarWidthCharString (pctxt, pvalue)
03210
03211 #define pd_GraphicString(pctxt,pvalue,permCharSet) \
03212 pd_VarWidthCharString (pctxt, pvalue)
03213
03214 #define pd_VideotexString(pctxt,pvalue,permCharSet) \
03215 pd_VarWidthCharString (pctxt, pvalue)
03216
03217 #define pd_TeletexString(pctxt,pvalue,permCharSet) \
03218 pd_VarWidthCharString (pctxt, pvalue)
03219
03220 #define pd_T61String(pctxt,pvalue,permCharSet) \
03221 pd_VarWidthCharString (pctxt, pvalue)
03222
03223 #define pd_ObjectDescriptor(pctxt,pvalue,permCharSet) \
03224 pd_VarWidthCharString (pctxt, pvalue)
03225
03226 #define pd_UTF8String(pctxt,pvalue,permCharSet) \
03227 pd_VarWidthCharString (pctxt, pvalue)
03228
03229 #define pd_IA5String(pctxt,pvalue,permCharSet) \
03230 pd_ConstrainedStringEx (pctxt, pvalue, permCharSet, 8, 7, 7)
03231
03232 #define pd_NumericString(pctxt,pvalue,permCharSet) \
03233 pd_ConstrainedStringEx (pctxt, pvalue, \
03234 (permCharSet == 0)?NUM_CANSET:permCharSet, 4, 4, 4)
03235
03236 #define pd_PrintableString(pctxt,pvalue,permCharSet) \
03237 pd_ConstrainedStringEx (pctxt, pvalue, permCharSet, 8, 7, 7)
03238
03239 #define pd_VisibleString(pctxt,pvalue,permCharSet) \
03240 pd_ConstrainedStringEx (pctxt, pvalue, permCharSet, 8, 7, 7)
03241
03242 #define pd_ISO646String pd_IA5String
03243 #define pd_GeneralizedTime pd_IA5String
03244 #define pd_UTCTime pd_GeneralizedTime
03245 #define pe_GetMsgLen pu_getMsgLen
03246
03247 #define pe_ExpandBuffer(pctxt,nbytes) rtxExpandOutputBuffer(pctxt,nbytes)
03248
03249
03250
03251
03252 #define pd_AnyCentury(pctxt,string) \
03253 pd_DateStr (pctxt, string, OSANY|OSCENTURY)
03254
03255
03256 #define pd_AnyCenturyInt(pctxt,pvalue) \
03257 pd_UnconsInteger (pctxt, pvalue)
03258
03259
03260 #define pd_AnyDate(pctxt,string) \
03261 pd_DateStr (pctxt, string, OSANY|OSYEAR|OSMONTH|OSDAY)
03262
03263
03264 #define pd_AnyYear(pctxt,string) \
03265 pd_DateStr (pctxt, string, OSANY|OSYEAR)
03266
03267
03268 #define pd_AnyYearInt(pctxt,pvalue) \
03269 pd_UnconsInteger (pctxt, pvalue)
03270
03271
03272 #define pd_AnyYearDay(pctxt,string) \
03273 pd_DateStr (pctxt, string, OSANY|OSYEAR|OSDAY)
03274
03275
03276 #define pd_AnyYearMonth(pctxt,string) \
03277 pd_DateStr (pctxt, string, OSANY|OSYEAR|OSMONTH)
03278
03279
03280 #define pd_AnyYearMonthDay(pctxt,string) \
03281 pd_DateStr (pctxt, string, OSANY|OSYEAR|OSMONTH|OSDAY)
03282
03283
03284 #define pd_AnyYearWeek(pctxt,string) \
03285 pd_DateStr (pctxt, string, OSANY|OSYEAR|OSWEEK)
03286
03287
03288 #define pd_AnyYearWeekDay(pctxt,string) \
03289 pd_DateStr (pctxt, string, OSANY|OSYEAR|OSWEEK|OSDAY)
03290
03291
03292 #define pd_Century(pctxt,string) \
03293 pd_DateStr (pctxt, string, OSCENTURY)
03294
03295
03296 #define pd_CenturyInt(pctxt,pvalue) \
03297 pd_ConsUInt8 (pctxt, pvalue, 0, 99)
03298
03299
03300 #define pd_Date(pctxt,string) \
03301 pd_DateStr (pctxt, string, OSYEAR_BASIC|OSYEAR|OSMONTH|OSDAY);
03302
03303
03304 #define pd_DateTime(pctxt,string) \
03305 pd_DateTimeStr (pctxt, string, \
03306 OSYEAR_BASIC|OSYEAR|OSMONTH|OSDAY|OSHOURS|OSMINUTES|OSSECONDS);
03307
03308
03309 #define pd_DurationInterval(pctxt,string) \
03310 pd_Duration (pctxt, string, FALSE)
03311
03312
03313
03314 #define pd_DurationEndDateInterval(pctxt,string,flags) \
03315 pd_Interval (pctxt, string, FALSE, OSDURATION, flags)
03316
03317
03318
03319 #define pd_DurationEndTimeInterval(pctxt,string,flags) \
03320 pd_Interval (pctxt, string, FALSE, OSDURATION, flags)
03321
03322
03323
03324 #define pd_DurationEndDateTimeInterval(pctxt,string,flags) \
03325 pd_Interval (pctxt, string, FALSE, OSDURATION, flags)
03326
03327 #ifdef BINARY_HOURS
03328
03329 #define pd_Hours(pctxt,pvalue) \
03330 pd_ConsInt8 (pctxt, pvalue, 0, 24)
03331
03332 #define pd_HoursUtc(pctxt,pvalue) \
03333 pd_ConsInt8 (pctxt, pvalue, 0, 24)
03334
03335 #else
03336
03337
03338 #define pd_Hours(pctxt,string) \
03339 pd_TimeStr (pctxt, string, OSHOURS)
03340
03341
03342 #define pd_HoursUtc(pctxt,string) \
03343 pd_TimeStr (pctxt, string, OSHOURS|OSUTC)
03344
03345 #endif
03346
03347
03348 #define pd_HoursAndDiff(pctxt,string) \
03349 pd_TimeStr (pctxt, string, OSHOURS|OSDIFF)
03350
03351
03352 #define pd_HoursAndFraction(pctxt,string,n) \
03353 pd_TimeStr (pctxt, string, OSHOURS|(n))
03354
03355
03356
03357 #define pd_HoursUtcAndFraction(pctxt,string,n) \
03358 pd_TimeStr (pctxt, string, OSHOURS|OSUTC|(n))
03359
03360
03361
03362 #define pd_HoursAndDiffAndFraction(pctxt,string,n) \
03363 pd_TimeStr (pctxt, string, OSHOURS|OSDIFF|(n))
03364
03365
03366 #define pd_Minutes(pctxt,string) \
03367 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES)
03368
03369
03370 #define pd_MinutesUtc(pctxt,string) \
03371 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSUTC)
03372
03373
03374 #define pd_MinutesAndDiff(pctxt,string) \
03375 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSDIFF)
03376
03377
03378
03379 #define pd_MinutesAndFraction(pctxt,string,n) \
03380 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|(n))
03381
03382
03383
03384 #define pd_MinutesUtcAndFraction(pctxt,string,n) \
03385 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSUTC|(n))
03386
03387
03388
03389 #define pd_MinutesAndDiffAndFraction(pctxt,string,n) \
03390 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSDIFF|(n))
03391
03392
03393
03394 #define pd_RecStartEndDateInterval(pctxt,string,flags) \
03395 pd_Interval (pctxt, string, TRUE, flags, flags)
03396
03397
03398
03399 #define pd_RecStartEndTimeInterval(pctxt,string,flags) \
03400 pd_Interval (pctxt, string, TRUE, flags, flags)
03401
03402
03403
03404 #define pd_RecStartEndDateTimeInterval(pctxt,string,flags) \
03405 pd_Interval (pctxt, string, TRUE, flags, flags)
03406
03407
03408
03409 #define pd_RecDurationInterval(pctxt,string) \
03410 pd_Duration (pctxt, string, TRUE)
03411
03412
03413
03414 #define pd_RecStartDateDurationInterval(pctxt,string,flags) \
03415 pd_Interval (pctxt, string, TRUE, flags, OSDURATION)
03416
03417
03418
03419 #define pd_RecStartTimeDurationInterval(pctxt,string,flags) \
03420 pd_Interval (pctxt, string, TRUE, flags, OSDURATION)
03421
03422
03423
03424 #define pd_RecStartDateTimeDurationInterval(pctxt,string,flags) \
03425 pd_Interval (pctxt, string, TRUE, flags, OSDURATION)
03426
03427
03428
03429 #define pd_RecDurationEndDateInterval(pctxt,string,flags) \
03430 pd_Interval (pctxt, string, TRUE, OSDURATION, flags)
03431
03432
03433
03434 #define pd_RecDurationEndTimeInterval(pctxt,string,flags) \
03435 pd_Interval (pctxt, string, TRUE, OSDURATION, flags)
03436
03437
03438
03439 #define pd_RecDurationEndDateTimeInterval(pctxt,string,flags) \
03440 pd_Interval (pctxt, string, TRUE, OSDURATION, flags)
03441
03442
03443
03444 #define pd_StartEndDateInterval(pctxt,string,flags) \
03445 pd_Interval (pctxt, string, FALSE, flags, flags)
03446
03447
03448
03449 #define pd_StartEndTimeInterval(pctxt,string,flags) \
03450 pd_Interval (pctxt, string, FALSE, flags, flags)
03451
03452
03453
03454 #define pd_StartEndDateTimeInterval(pctxt,string,flags) \
03455 pd_Interval (pctxt, string, FALSE, flags, flags)
03456
03457
03458
03459 #define pd_StartDateDurationInterval(pctxt,string,flags) \
03460 pd_Interval (pctxt, string, FALSE, flags, OSDURATION)
03461
03462
03463
03464 #define pd_StartTimeDurationInterval(pctxt,string,flags) \
03465 pd_Interval (pctxt, string, FALSE, flags, OSDURATION)
03466
03467
03468
03469 #define pd_StartDateTimeDurationInterval(pctxt,string,flags) \
03470 pd_Interval (pctxt, string, FALSE, flags, OSDURATION)
03471
03472
03473 #define pd_TimeOfDay(pctxt,string) \
03474 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS)
03475
03476
03477 #define pd_TimeOfDayUtc(pctxt,string) \
03478 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|OSUTC)
03479
03480
03481 #define pd_TimeOfDayAndDiff(pctxt,string) \
03482 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|OSDIFF)
03483
03484
03485
03486 #define pd_TimeOfDayAndFraction(pctxt,string,n) \
03487 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|(n))
03488
03489
03490
03491 #define pd_TimeOfDayUtcAndFraction(pctxt,string,n) \
03492 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|OSUTC|(n))
03493
03494
03495
03496 #define pd_TimeOfDayAndDiffAndFraction(pctxt,string,n) \
03497 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|OSDIFF|(n))
03498
03499
03500 #define pd_Year(pctxt,string) \
03501 pd_DateStr (pctxt, string, OSYEAR)
03502
03503
03504 #define pd_YearDay(pctxt,string) \
03505 pd_DateStr (pctxt, string, OSYEAR|OSDAY)
03506
03507
03508 #define pd_YearMonth(pctxt,string) \
03509 pd_DateStr (pctxt, string, OSYEAR|OSMONTH)
03510
03511
03512 #define pd_YearMonthDay(pctxt,string) \
03513 pd_DateStr (pctxt, string, OSYEAR|OSMONTH|OSDAY);
03514
03515
03516 #define pd_YearWeek(pctxt,string) \
03517 pd_DateStr (pctxt, string, OSYEAR|OSWEEK)
03518
03519
03520 #define pd_YearWeekDay(pctxt,string) \
03521 pd_DateStr (pctxt, string, OSYEAR|OSWEEK|OSDAY)
03522
03523
03524
03525
03526 #define pe_AnyCentury(pctxt,string) \
03527 pe_DateStr (pctxt, string, OSANY|OSCENTURY)
03528
03529
03530 #define pe_AnyCenturyInt(pctxt,value) \
03531 pe_UnconsInteger (pctxt, value)
03532
03533
03534 #define pe_AnyDate(pctxt,string) \
03535 pe_DateStr (pctxt, string, OSANY|OSYEAR|OSMONTH|OSDAY)
03536
03537
03538 #define pe_AnyYear(pctxt,string) \
03539 pe_DateStr (pctxt, string, OSANY|OSYEAR)
03540
03541
03542 #define pe_AnyYearInt(pctxt,value) \
03543 pe_UnconsInteger (pctxt, value)
03544
03545
03546 #define pe_AnyYearDay(pctxt,string) \
03547 pe_DateStr (pctxt, string, OSANY|OSYEAR|OSDAY)
03548
03549
03550 #define pe_AnyYearMonth(pctxt,string) \
03551 pe_DateStr (pctxt, string, OSANY|OSYEAR|OSMONTH)
03552
03553
03554 #define pe_AnyYearMonthDay(pctxt,string) \
03555 pe_DateStr (pctxt, string, OSANY|OSYEAR|OSMONTH|OSDAY)
03556
03557
03558 #define pe_AnyYearWeek(pctxt,string) \
03559 pe_DateStr (pctxt, string, OSANY|OSYEAR|OSWEEK)
03560
03561
03562 #define pe_AnyYearWeekDay(pctxt,string) \
03563 pe_DateStr (pctxt, string, OSANY|OSYEAR|OSWEEK|OSDAY)
03564
03565
03566 #define pe_Century(pctxt,string) \
03567 pe_DateStr (pctxt, string, OSCENTURY)
03568
03569
03570 #define pe_CenturyInt(pctxt,value) \
03571 pe_ConsUnsigned (pctxt, value, 0, 99)
03572
03573
03574 #define pe_Date(pctxt,string) \
03575 pe_DateStr (pctxt, string, OSYEAR_BASIC|OSYEAR|OSMONTH|OSDAY)
03576
03577
03578 #define pe_DateTime(pctxt,string) \
03579 pe_DateTimeStr (pctxt, string, \
03580 OSYEAR_BASIC|OSYEAR|OSMONTH|OSDAY|OSHOURS|OSMINUTES|OSSECONDS)
03581
03582
03583 #define pe_DurationInterval(pctxt,string) \
03584 pe_Duration (pctxt, string, FALSE)
03585
03586
03587
03588 #define pe_DurationEndDateInterval(pctxt,string,flags) \
03589 pe_Interval (pctxt, string, FALSE, OSDURATION, flags)
03590
03591
03592
03593 #define pe_DurationEndTimeInterval(pctxt,string,flags) \
03594 pe_Interval (pctxt, string, FALSE, OSDURATION, flags)
03595
03596
03597
03598 #define pe_DurationEndDateTimeInterval(pctxt,string,flags) \
03599 pe_Interval (pctxt, string, FALSE, OSDURATION, flags)
03600
03601 #ifdef BINARY_HOURS
03602
03603 #define pe_Hours(pctxt,value) \
03604 pe_ConsUnsigned (pctxt, value, 0, 24)
03605
03606 #define pe_HoursUtc(pctxt,value) \
03607 pe_ConsUnsigned (pctxt, value, 0, 24)
03608
03609 #else
03610
03611
03612 #define pe_Hours(pctxt,string) \
03613 pe_TimeStr (pctxt, string, OSHOURS)
03614
03615
03616 #define pe_HoursUtc(pctxt,string) \
03617 pe_TimeStr (pctxt, string, OSHOURS|OSUTC)
03618
03619 #endif
03620
03621
03622 #define pe_Hours(pctxt,string) \
03623 pe_TimeStr (pctxt, string, OSHOURS)
03624
03625
03626 #define pe_HoursUtc(pctxt,string) \
03627 pe_TimeStr (pctxt, string, OSHOURS|OSUTC)
03628
03629
03630 #define pe_HoursAndDiff(pctxt,string) \
03631 pe_TimeStr (pctxt, string, OSHOURS|OSDIFF)
03632
03633
03634 #define pe_HoursAndFraction(pctxt,string,n) \
03635 pe_TimeStr (pctxt, string, OSHOURS|(n))
03636
03637
03638
03639 #define pe_HoursUtcAndFraction(pctxt,string,n) \
03640 pe_TimeStr (pctxt, string, OSHOURS|OSUTC|(n))
03641
03642
03643
03644 #define pe_HoursAndDiffAndFraction(pctxt,string,n) \
03645 pe_TimeStr (pctxt, string, OSHOURS|OSDIFF|(n))
03646
03647
03648 #define pe_Minutes(pctxt,string) \
03649 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES)
03650
03651
03652 #define pe_MinutesUtc(pctxt,string) \
03653 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSUTC)
03654
03655
03656 #define pe_MinutesAndDiff(pctxt,string) \
03657 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSDIFF)
03658
03659
03660
03661 #define pe_MinutesAndFraction(pctxt,string,n) \
03662 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|(n))
03663
03664
03665
03666 #define pe_MinutesUtcAndFraction(pctxt,string,n) \
03667 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSUTC|(n))
03668
03669
03670
03671 #define pe_MinutesAndDiffAndFraction(pctxt,string,n) \
03672 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSDIFF|(n))
03673
03674
03675
03676 #define pe_RecStartEndDateInterval(pctxt,string,flags) \
03677 pe_Interval (pctxt, string, TRUE, flags, flags)
03678
03679
03680
03681 #define pe_RecStartEndTimeInterval(pctxt,string,flags) \
03682 pe_Interval (pctxt, string, TRUE, flags, flags)
03683
03684
03685
03686 #define pe_RecStartEndDateTimeInterval(pctxt,string,flags) \
03687 pe_Interval (pctxt, string, TRUE, flags, flags)
03688
03689
03690
03691 #define pe_RecDurationInterval(pctxt,string) \
03692 pe_Duration (pctxt, string, TRUE)
03693
03694
03695
03696 #define pe_RecStartDateDurationInterval(pctxt,string,flags) \
03697 pe_Interval (pctxt, string, TRUE, flags, OSDURATION)
03698
03699
03700
03701 #define pe_RecStartTimeDurationInterval(pctxt,string,flags) \
03702 pe_Interval (pctxt, string, TRUE, flags, OSDURATION)
03703
03704
03705
03706 #define pe_RecStartDateTimeDurationInterval(pctxt,string,flags) \
03707 pe_Interval (pctxt, string, TRUE, flags, OSDURATION)
03708
03709
03710
03711 #define pe_RecDurationEndDateInterval(pctxt,string,flags) \
03712 pe_Interval (pctxt, string, TRUE, OSDURATION, flags)
03713
03714
03715
03716 #define pe_RecDurationEndTimeInterval(pctxt,string,flags) \
03717 pe_Interval (pctxt, string, TRUE, OSDURATION, flags)
03718
03719
03720
03721 #define pe_RecDurationEndDateTimeInterval(pctxt,string,flags) \
03722 pe_Interval (pctxt, string, TRUE, OSDURATION, flags)
03723
03724
03725
03726 #define pe_StartEndDateInterval(pctxt,string,flags) \
03727 pe_Interval (pctxt, string, FALSE, flags, flags)
03728
03729
03730
03731 #define pe_StartEndTimeInterval(pctxt,string,flags) \
03732 pe_Interval (pctxt, string, FALSE, flags, flags)
03733
03734
03735
03736 #define pe_StartEndDateTimeInterval(pctxt,string,flags) \
03737 pe_Interval (pctxt, string, FALSE, flags, flags)
03738
03739
03740
03741 #define pe_StartDateDurationInterval(pctxt,string,flags) \
03742 pe_Interval (pctxt, string, FALSE, flags, OSDURATION)
03743
03744
03745
03746 #define pe_StartTimeDurationInterval(pctxt,string,flags) \
03747 pe_Interval (pctxt, string, FALSE, flags, OSDURATION)
03748
03749
03750
03751 #define pe_StartDateTimeDurationInterval(pctxt,string,flags) \
03752 pe_Interval (pctxt, string, FALSE, flags, OSDURATION)
03753
03754
03755 #define pe_TimeOfDay(pctxt,string) \
03756 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS)
03757
03758
03759 #define pe_TimeOfDayUtc(pctxt,string) \
03760 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|OSUTC)
03761
03762
03763 #define pe_TimeOfDayAndDiff(pctxt,string) \
03764 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|OSDIFF)
03765
03766
03767
03768 #define pe_TimeOfDayAndFraction(pctxt,string,n) \
03769 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|(n))
03770
03771
03772
03773 #define pe_TimeOfDayUtcAndFraction(pctxt,string,n) \
03774 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|OSUTC|(n))
03775
03776
03777
03778 #define pe_TimeOfDayAndDiffAndFraction(pctxt,string,n) \
03779 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|OSDIFF|(n))
03780
03781
03782 #define pe_Year(pctxt,string) \
03783 pe_DateStr (pctxt, string, OSYEAR)
03784
03785
03786 #define pe_YearDay(pctxt,string) \
03787 pe_DateStr (pctxt, string, OSYEAR|OSDAY)
03788
03789
03790 #define pe_YearMonth(pctxt,string) \
03791 pe_DateStr (pctxt, string, OSYEAR|OSMONTH)
03792
03793
03794 #define pe_YearMonthDay(pctxt,string) \
03795 pe_DateStr (pctxt, string, OSYEAR|OSMONTH|OSDAY)
03796
03797
03798 #define pe_YearWeek(pctxt,string) \
03799 pe_DateStr (pctxt, string, OSYEAR|OSWEEK)
03800
03801
03802 #define pe_YearWeekDay(pctxt,string) \
03803 pe_DateStr (pctxt, string, OSYEAR|OSWEEK|OSDAY)
03804
03805
03806
03807
03808 EXTERNPER int pu_checkSizeConstraint (OSCTXT* pctxt, int size);
03809 EXTERNPER Asn1SizeCnst* pu_getSizeConstraint (OSCTXT* pctxt, OSBOOL extbit);
03810 EXTERNPER int pu_getBitOffset (OSCTXT* pctxt);
03811 EXTERNPER void pu_setBitOffset (OSCTXT* pctxt, int bitOffset);
03812
03815 #endif