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
00078
00079
00080
00081
00082
00083 #define ASN_K_EXTENUM 999
00084
00085
00086 #define OSYEAR_BASIC OSUINTCONST(0x8000000)
00087 #define OSYEAR_PROLEPTIC OSUINTCONST(0x4000000)
00088 #define OSYEAR_NEGATIVE OSUINTCONST(0x2000000)
00089 #define OSYEAR_L(n) ((OSUINT32)(n) << 28)
00090
00091 #define OSYEAR_MASK \
00092 (OSYEAR_BASIC|OSYEAR_PROLEPTIC|OSYEAR_NEGATIVE|OSYEAR_L(0xF))
00093
00094 #define OSANY (OSYEAR_NEGATIVE|OSYEAR_L(5))
00095 #define OSANY_MASK (OSYEAR_NEGATIVE|OSYEAR_L(0xF))
00096
00097 #define OSCENTURY 0x4000u
00098 #define OSYEAR 0x2000u
00099 #define OSMONTH 0x1000u
00100 #define OSWEEK 0x0800u
00101 #define OSDAY 0x0400u
00102
00103 #define OSHOURS 0x0200u
00104 #define OSMINUTES 0x0100u
00105 #define OSSECONDS 0x0080u
00106 #define OSUTC 0x0040u
00107 #define OSDIFF 0x0020u
00108
00109 #define OSFRACTION 0x000Fu
00110
00111 #define OSDURATION 0x0010u
00112
00113
00114
00115
00116 typedef struct PERField {
00117 const char* name;
00118 size_t bitOffset;
00119 size_t numbits;
00120 OSRTSList* openTypeFields;
00121 } PERField;
00122
00123
00124
00125
00126 typedef struct {
00127 unsigned char lb, lbm;
00128 char fmtBitBuffer[40], fmtHexBuffer[10], fmtAscBuffer[10];
00129 int fmtBitCharIdx, fmtHexCharIdx, fmtAscCharIdx;
00130 } BinDumpBuffer;
00131
00132
00133
00134 #define PU_SETCHARSET(csetvar, canset, abits, ubits) \
00135 csetvar.charSet.nchars = 0; \
00136 csetvar.canonicalSet = canset; \
00137 csetvar.canonicalSetSize = sizeof(canset)-1; \
00138 csetvar.canonicalSetBits = pu_bitcnt(csetvar.canonicalSetSize); \
00139 csetvar.charSetUnalignedBits = ubits; \
00140 csetvar.charSetAlignedBits = abits;
00141
00142
00143
00144
00145 #ifdef _TRACE
00146 #define PU_INSLENFLD(pctxt) pu_insLenField(pctxt)
00147 #define PU_NEWFIELD(pctxt,suffix) pu_newField(pctxt,suffix)
00148 #define PU_PUSHNAME(pctxt,name) pu_pushName(pctxt,name)
00149 #define PU_PUSHELEMNAME(pctxt,idx) pu_pushElemName(pctxt,idx)
00150 #define PU_POPNAME(pctxt) pu_popName(pctxt)
00151 #define PU_SETBITOFFSET(pctxt) pu_setFldBitOffset(pctxt)
00152 #define PU_SETBITCOUNT(pctxt) pu_setFldBitCount(pctxt)
00153 #define PU_SETOPENTYPEFLDLIST(pctxt,flist) pu_setOpenTypeFldList(pctxt,flist)
00154 #else
00155 #define PU_INSLENFLD(pctxt)
00156 #define PU_NEWFIELD(pctxt,suffix)
00157 #define PU_PUSHNAME(pctxt,name)
00158 #define PU_PUSHELEMNAME(pctxt,idx)
00159 #define PU_POPNAME(pctxt)
00160 #define PU_SETBITOFFSET(pctxt)
00161 #define PU_SETBITCOUNT(pctxt)
00162 #define PU_SETOPENTYPEFLDLIST(pctxt,flist)
00163 #endif
00164
00165 #ifdef __cplusplus
00166 extern "C" {
00167 #endif
00168
00169 #ifdef __SYMBIAN32__
00170 #define EXTPERCLASS
00171
00172 #ifdef BUILDASN1PERDLL
00173 #define EXTERNPER EXPORT_C
00174 #define EXTPERMETHOD EXPORT_C
00175 #elif defined(USEASN1PERDLL)
00176 #define EXTERNPER IMPORT_C
00177 #define EXTPERMETHOD IMPORT_C
00178 #else
00179 #define EXTERNPER
00180 #define EXTPERMETHOD
00181 #endif
00182
00183 #else
00184 #define EXTPERMETHOD
00185
00186 #ifdef BUILDASN1PERDLL
00187 #define EXTERNPER __declspec(dllexport)
00188 #define EXTPERCLASS __declspec(dllexport)
00189 #elif defined (USEASN1PERDLL)
00190 #define EXTERNPER __declspec(dllimport)
00191 #define EXTPERCLASS __declspec(dllimport)
00192 #else
00193 #define EXTERNPER
00194 #define EXTPERCLASS
00195 #endif
00196
00197 #endif
00198
00199
00200
00201
00202
00203 #define PD_BIT(pctxt,pvalue) DEC_BIT(pctxt,pvalue)
00204
00205
00206
00207 #define PU_SETSIZECONSTRAINT(pctxt,rootLower,rootUpper,extLower,extUpper) \
00208 ACINFO(pctxt)->sizeConstraint.root.lower = rootLower; \
00209 ACINFO(pctxt)->sizeConstraint.root.upper = rootUpper; \
00210 ACINFO(pctxt)->sizeConstraint.ext.lower = extLower; \
00211 ACINFO(pctxt)->sizeConstraint.ext.upper = extUpper
00212
00213
00214
00215 #define PU_INITSIZECONSTRAINT(pctxt) PU_SETSIZECONSTRAINT(pctxt,0,0,0,0)
00216
00217
00218
00219 #define PU_GETSIZECONSTRAINT(pctxt,extbit) ((extbit) ? \
00220 &ACINFO(pctxt)->sizeConstraint.ext : &ACINFO(pctxt)->sizeConstraint.root)
00221
00222
00223
00224
00225 #define PU_GETCTXTBITOFFSET(pctxt) \
00226 (((pctxt)->buffer.byteIndex * 8) + (8 - (pctxt)->buffer.bitOffset))
00227
00230 #define PU_GETPADBITS(pctxt) \
00231 (((pctxt)->buffer.bitOffset == 8) ? 0 : (pctxt)->buffer.bitOffset)
00232
00233
00234
00235 #define PU_SETCTXTBITOFFSET(pctxt,_bitOffset) \
00236 do { \
00237 (pctxt)->buffer.byteIndex = (_bitOffset / 8); \
00238 (pctxt)->buffer.bitOffset = (OSUINT16)(8 - (_bitOffset % 8)); \
00239 } while(0)
00240
00241
00242
00243 #define PD_BYTE_ALIGN0(pctxt) \
00244 ((!(pctxt)->buffer.aligned) ? 0 : \
00245 (((pctxt)->buffer.bitOffset != 8) ? ( \
00246 (pctxt)->buffer.byteIndex++, \
00247 (pctxt)->buffer.bitOffset = 8, \
00248 0) : 0 \
00249 ))
00250
00251 #ifdef _TRACE
00252 #define PD_BYTE_ALIGN(pctxt) \
00253 ((!(pctxt)->buffer.aligned) ? 0 : \
00254 (((pctxt)->buffer.bitOffset != 8) ? ( \
00255 (pctxt)->buffer.byteIndex++, \
00256 (pctxt)->buffer.bitOffset = 8, \
00257 pu_setFldBitOffset(pctxt), \
00258 0) : 0 \
00259 ))
00260 #else
00261 #define PD_BYTE_ALIGN PD_BYTE_ALIGN0
00262 #endif
00263
00264 #define PD_CHECKSEQOFLEN(pctxt,numElements,minElemBits) \
00265 ((pctxt->buffer.size > 0) ? \
00266 (((numElements * minElemBits) > (pctxt->buffer.size * 8)) ? \
00267 LOG_RTERR (pctxt,ASN_E_INVLEN) : 0) : 0)
00268
00269 #define PD_OPENTYPE_START(pctxt,pSavedSize,pSavedBitOff) \
00270 pd_OpenTypeStart(pctxt,pSavedSize,pSavedBitOff);
00271
00272 #define PD_OPENTYPE_END(pctxt,savedSize,savedBitOff) \
00273 pd_OpenTypeEnd(pctxt,savedSize,savedBitOff);
00274
00312 EXTERNPER int pd_BigInteger (OSCTXT *pctxt, const char** ppvalue);
00313
00330 EXTERNPER int pd_BigIntegerEx (OSCTXT *pctxt, const char** ppvalue, int radix);
00331
00349 EXTERNPER int pd_BigIntegerValue
00350 (OSCTXT *pctxt, const char** ppvalue, int radix, OSUINT32 nbytes);
00351
00372 EXTERNPER int pd_BitString
00373 (OSCTXT* pctxt, OSUINT32* numbits_p, OSOCTET* buffer,
00374 OSUINT32 bufsiz);
00375
00376 EXTERNPER int pd_BitString32
00377 (OSCTXT* pctxt, ASN1BitStr32* pbitstr, OSUINT32 lower, OSUINT32 upper);
00378
00403 EXTERNPER int pd_BMPString
00404 (OSCTXT* pctxt, ASN1BMPString* pvalue, Asn116BitCharSet* permCharSet);
00405
00429 EXTERNPER int pd_UniversalString
00430 (OSCTXT* pctxt, ASN1UniversalString* pvalue, Asn132BitCharSet* permCharSet);
00431
00443 EXTERNPER int pd_byte_align (OSCTXT* pctxt);
00444
00455 EXTERNPER int pd_ChoiceOpenTypeExt
00456 (OSCTXT* pctxt, const OSOCTET** object_p2, OSUINT32* pnumocts);
00457
00470 EXTERNPER int pd_ConsInteger
00471 (OSCTXT* pctxt, OSINT32* pvalue, OSINT32 lower, OSINT32 upper);
00472
00486 EXTERNPER int pd_ConsInt8
00487 (OSCTXT* pctxt, OSINT8* pvalue, OSINT32 lower, OSINT32 upper);
00488
00502 EXTERNPER int pd_ConsInt16 (OSCTXT* pctxt,
00503 OSINT16* pvalue, OSINT32 lower, OSINT32 upper);
00504
00518 EXTERNPER int pd_ConsInt64 (OSCTXT* pctxt,
00519 OSINT64* pvalue, OSINT64 lower, OSINT64 upper);
00520
00534 EXTERNPER int pd_ConsUnsigned
00535 (OSCTXT* pctxt, OSUINT32* pvalue, OSUINT32 lower, OSUINT32 upper);
00536
00550 EXTERNPER int pd_ConsUInt8 (OSCTXT* pctxt,
00551 OSUINT8* pvalue, OSUINT32 lower, OSUINT32 upper);
00552
00566 EXTERNPER int pd_ConsUInt16
00567 (OSCTXT* pctxt, OSUINT16* pvalue, OSUINT32 lower, OSUINT32 upper);
00568
00582 EXTERNPER int pd_ConsUInt64 (OSCTXT* pctxt, OSUINT64* pvalue,
00583 OSUINT64 lower, OSUINT64 upper);
00584
00602 EXTERNPER int pd_ConsWholeNumber
00603 (OSCTXT* pctxt, OSUINT32* padjusted_value, OSUINT32 range_value);
00604
00622 EXTERNPER int pd_ConsWholeNumber64
00623 (OSCTXT* pctxt, OSUINT64* padjusted_value, OSUINT64 range_value);
00624
00641 EXTERNPER int pd_ConstrainedString
00642 (OSCTXT* pctxt, const char** string, Asn1CharSet* pCharSet);
00643
00663 EXTERNPER int pd_ConstrainedStringEx
00664 (OSCTXT* pctxt, const char** string, const char* charSet,
00665 OSUINT32 abits, OSUINT32 ubits, OSUINT32 canSetBits);
00666
00685 EXTERNPER int pd_ConstrFixedLenStringEx
00686 (OSCTXT* pctxt, char* strbuf, size_t bufsiz, const char* charSet,
00687 OSUINT32 abits, OSUINT32 ubits, OSUINT32 canSetBits);
00688
00711 EXTERNPER int pd_16BitConstrainedString
00712 (OSCTXT* pctxt, Asn116BitCharString* pString, Asn116BitCharSet* pCharSet);
00713
00736 EXTERNPER int pd_32BitConstrainedString
00737 (OSCTXT* pctxt, Asn132BitCharString* pString, Asn132BitCharSet* pCharSet);
00738
00750 EXTERNPER int pd_DateStr (OSCTXT* pctxt, const char** string, OSUINT32 flags);
00751
00765 EXTERNPER int pd_DateTimeStr
00766 (OSCTXT* pctxt, const char** string, OSUINT32 flags);
00767
00779 EXTERNPER int pd_Duration (OSCTXT* pctxt, const char** string, OSBOOL rec);
00780
00803 EXTERNPER int pd_DynBitString
00804 (OSCTXT* pctxt, ASN1DynBitStr* pBitStr);
00805
00822 EXTERNPER int pd_DynOctetString
00823 (OSCTXT* pctxt, ASN1DynOctStr* pOctStr);
00824
00841 EXTERNPER int pd_GetBinStrDataOffset
00842 (OSCTXT* pctxt, OSUINT32* pnumbits, OSBOOL bitStrFlag);
00843
00858 EXTERNPER int pd_GetComponentLength (OSCTXT* pctxt, OSUINT32 itemBits);
00859
00876 EXTERNPER int pd_Interval
00877 (OSCTXT* pctxt, const char** string, OSBOOL rec,
00878 OSUINT32 startFlags, OSUINT32 endFlags);
00879
00893 EXTERNPER int pd_Length (OSCTXT* pctxt, OSUINT32* pvalue);
00894
00902
00903 #define pd_moveBitCursor(pctxt,bitOffset) rtxMoveBitCursor(pctxt,bitOffset)
00904
00917 EXTERNPER int pd_ObjectIdentifier (OSCTXT* pctxt, ASN1OBJID* pvalue);
00918
00932 EXTERNPER int pd_oid64 (OSCTXT* pctxt, ASN1OID64* pvalue);
00933
00946 EXTERNPER int pd_RelativeOID (OSCTXT* pctxt, ASN1OBJID* pvalue);
00947
00966 EXTERNPER int pd_OctetString
00967 (OSCTXT* pctxt, OSUINT32* pnumocts, OSOCTET* buffer,
00968 OSUINT32 bufsiz);
00969
00987 EXTERNPER int pd_OpenType
00988 (OSCTXT* pctxt, const OSOCTET** object_p2, OSUINT32* pnumocts);
00989
01011 EXTERNPER int pd_OpenTypeExt
01012 (OSCTXT* pctxt, const OSOCTET** object_p2, OSUINT32* pnumocts);
01013
01014 #ifndef _NO_ASN1REAL
01015
01028 EXTERNPER int pd_Real (OSCTXT* pctxt, OSREAL* pvalue);
01029 #endif
01030
01046 EXTERNPER int pd_SmallLength
01047 (OSCTXT* pctxt, OSUINT32* pvalue);
01048
01064 EXTERNPER int pd_SmallNonNegWholeNumber
01065 (OSCTXT* pctxt, OSUINT32* pvalue);
01066
01078 EXTERNPER int pd_SemiConsInteger
01079 (OSCTXT* pctxt, OSINT32* pvalue, OSINT32 lower);
01080
01093 EXTERNPER int pd_SemiConsUnsigned
01094 (OSCTXT* pctxt, OSUINT32* pvalue, OSUINT32 lower);
01095
01108 EXTERNPER int pd_SemiConsInt64
01109 (OSCTXT* pctxt, OSINT64* pvalue, OSINT64 lower);
01110
01123 EXTERNPER int pd_SemiConsUInt64
01124 (OSCTXT* pctxt, OSUINT64* pvalue, OSUINT64 lower);
01125
01138 EXTERNPER int pd_TimeStr (OSCTXT* pctxt, const char** string, OSUINT32 flags);
01139
01149 EXTERNPER int pd_UnconsInteger (OSCTXT *pctxt, OSINT32* pvalue);
01150
01161 EXTERNPER int pd_UnconsLength (OSCTXT *pctxt, OSUINT32* pvalue);
01162
01175 EXTERNPER int pd_UnconsUnsigned (OSCTXT* pctxt, OSUINT32* pvalue);
01176
01177
01188 EXTERNPER int pd_UnconsInt64 (OSCTXT *pctxt, OSINT64* pvalue);
01189
01203 EXTERNPER int pd_UnconsUInt64 (OSCTXT* pctxt, OSUINT64* pvalue);
01204
01216 EXTERNPER int pd_VarWidthCharString (OSCTXT* pctxt, const char** pvalue);
01217
01227 EXTERNPER int pd_YearInt (OSCTXT* pctxt, OSINT32* pvalue);
01228
01229 #ifndef _NO_ASN1REAL
01230
01243 EXTERNPER int pd_Real10 (OSCTXT *pctxt, const char** ppvalue);
01244 #endif
01245
01251 EXTERNPER OSBOOL pd_isFragmented (OSCTXT* pctxt);
01252
01253 EXTERNPER void pd_OpenTypeStart
01254 (OSCTXT* pctxt, OSUINT32* pSavedSize, OSINT16* pSavedBitOff);
01255
01256 EXTERNPER int pd_OpenTypeEnd
01257 (OSCTXT* pctxt, OSUINT32 savedSize, OSINT16 savedBitOff);
01258
01277 EXTERNPER int uperDecConstrString
01278 (OSCTXT* pctxt, const char** string, const char* charSet,
01279 OSUINT32 nbits, OSUINT32 canSetBits);
01280
01299 EXTERNPER int uperDecConstrFixedLenString
01300 (OSCTXT* pctxt, char* strbuf, size_t bufsiz, const char* charSet,
01301 OSUINT32 nbits, OSUINT32 canSetBits);
01302
01305
01349 EXTERNPER int pe_16BitConstrainedString
01350 (OSCTXT* pctxt, Asn116BitCharString value, Asn116BitCharSet* pCharSet);
01351
01374 EXTERNPER int pe_32BitConstrainedString
01375 (OSCTXT* pctxt, Asn132BitCharString value, Asn132BitCharSet* pCharSet);
01376
01387 EXTERNPER int pe_2sCompBinInt
01388 (OSCTXT* pctxt, OSINT32 value);
01389
01400 EXTERNPER int pe_2sCompBinInt64 (OSCTXT* pctxt, OSINT64 value);
01401
01408 EXTERNPER int pe_aligned_octets
01409 (OSCTXT* pctxt, OSOCTET* pvalue, OSUINT32 nocts);
01410
01430 EXTERNPER int pe_BigInteger
01431 (OSCTXT* pctxt, const char* pvalue);
01432
01442
01443
01444 #define pe_bit(pctxt,value) rtxEncBit(pctxt,value)
01445
01456
01457
01458 #define pe_bits(pctxt,value,nbits) rtxEncBits(pctxt,value,nbits)
01459
01472 EXTERNPER int pe_bits64 (OSCTXT* pctxt, OSUINT64 value, OSUINT32 nbits);
01473
01487 EXTERNPER int pe_BitString
01488 (OSCTXT* pctxt, OSUINT32 numocts, const OSOCTET* data);
01489
01490 EXTERNPER int pe_BitString32
01491 (OSCTXT* pctxt, ASN1BitStr32* pbitstr, OSUINT32 lower, OSUINT32 upper);
01492
01516 EXTERNPER int pe_BMPString
01517 (OSCTXT* pctxt, ASN1BMPString value, Asn116BitCharSet* permCharSet);
01518
01542 EXTERNPER int pe_UniversalString
01543 (OSCTXT* pctxt, ASN1UniversalString value, Asn132BitCharSet* permCharSet);
01544
01556 EXTERNPER int pe_byte_align (OSCTXT* pctxt);
01557
01573
01574 #define pe_CheckBuffer(pctxt,nbytes) rtxCheckOutputBuffer(pctxt,nbytes)
01575
01587 EXTERNPER int pe_ChoiceTypeExt
01588 (OSCTXT* pctxt, OSUINT32 numocts, const OSOCTET* data);
01589
01602 EXTERNPER int pe_ConsInteger
01603 (OSCTXT* pctxt, OSINT32 value, OSINT32 lower, OSINT32 upper);
01604
01617 EXTERNPER int pe_ConsInt64 (OSCTXT* pctxt,
01618 OSINT64 value, OSINT64 lower, OSINT64 upper);
01619
01631 EXTERNPER int pe_ConstrainedString
01632 (OSCTXT* pctxt, const char* string, Asn1CharSet* pCharSet);
01633
01651 EXTERNPER int pe_ConstrainedStringEx
01652 (OSCTXT* pctxt, const char* string, const char* charSet,
01653 OSUINT32 abits, OSUINT32 ubits, OSUINT32 canSetBits);
01654
01670 EXTERNPER int pe_ConsUnsigned
01671 (OSCTXT* pctxt, OSUINT32 value, OSUINT32 lower, OSUINT32 upper);
01672
01692 EXTERNPER int pe_ConsUInt64 (OSCTXT* pctxt, OSUINT64 value,
01693 OSUINT64 lower, OSUINT64 upper);
01694
01710 EXTERNPER int pe_ConsWholeNumber
01711 (OSCTXT* pctxt, OSUINT32 adjusted_value, OSUINT32 range_value);
01712
01728 EXTERNPER int pe_ConsWholeNumber64
01729 (OSCTXT* pctxt, OSUINT64 adjusted_value, OSUINT64 range_value);
01730
01742 EXTERNPER int pe_DateStr (OSCTXT* pctxt, const char* string, OSUINT32 flags);
01743
01757 EXTERNPER int pe_DateTimeStr
01758 (OSCTXT* pctxt, const char* string, OSUINT32 flags);
01759
01771 EXTERNPER int pe_Duration (OSCTXT* pctxt, const char* string, OSBOOL rec);
01772
01776 EXTERNPER OSUINT32 pe_GetIntLen (OSUINT32 value);
01777
01783 EXTERNPER size_t pe_GetMsgBitCnt (OSCTXT* pctxt);
01784
01803 EXTERNPER OSOCTET* pe_GetMsgPtr (OSCTXT* pctxt, OSINT32* pLength);
01804
01815 EXTERNPER OSOCTET* pe_GetMsgPtrU (OSCTXT* pctxt, OSUINT32* pLength);
01816
01834 EXTERNPER int pe_Interval
01835 (OSCTXT* pctxt, const char* string, OSBOOL rec,
01836 OSUINT32 startFlags, OSUINT32 endFlags);
01837
01848 EXTERNPER int pe_Length (OSCTXT* pctxt, OSUINT32 value);
01849
01860 EXTERNPER int pe_NonNegBinInt (OSCTXT* pctxt, OSUINT32 value);
01861
01872 EXTERNPER int pe_NonNegBinInt64 (OSCTXT* pctxt, OSUINT64 value);
01873
01886 EXTERNPER int pe_ObjectIdentifier (OSCTXT* pctxt, ASN1OBJID* pvalue);
01887
01888 #ifndef _NO_INT64_SUPPORT
01889
01902 EXTERNPER int pe_oid64 (OSCTXT* pctxt, ASN1OID64* pvalue);
01903 #endif
01904
01917 EXTERNPER int pe_RelativeOID (OSCTXT* pctxt, ASN1OBJID* pvalue);
01918
01932
01933
01934 #define pe_octets(pctxt,pvalue,nbits) \
01935 rtxEncBitsFromByteArray(pctxt,pvalue,nbits)
01936
01949 EXTERNPER int pe_OctetString
01950 (OSCTXT* pctxt, OSUINT32 numocts, const OSOCTET* data);
01951
01967 EXTERNPER int pe_OpenType
01968 (OSCTXT* pctxt, OSUINT32 numocts, const OSOCTET* data);
01969
01985 EXTERNPER int pe_OpenTypeEnd (OSCTXT* pctxt, OSUINT32 pos, void* pPerField);
01986
02005 EXTERNPER int pe_OpenTypeExt
02006 (OSCTXT* pctxt, OSRTDList* pElemList);
02007
02017 EXTERNPER int pe_OpenTypeExtBits
02018 (OSCTXT* pctxt, OSRTDList* pElemList);
02019
02034 EXTERNPER int pe_OpenTypeStart
02035 (OSCTXT* pctxt, OSUINT32* pPos, void** ppPerField);
02036
02037 #ifndef _NO_ASN1REAL
02038
02055 EXTERNPER int pe_Real (OSCTXT* pctxt, OSREAL value);
02056 #endif
02057
02072 EXTERNPER int pe_SmallNonNegWholeNumber (OSCTXT* pctxt, OSUINT32 value);
02073
02074
02089 EXTERNPER int pe_SmallLength (OSCTXT* pctxt, OSUINT32 value);
02090
02091
02103 EXTERNPER int pe_SemiConsInteger
02104 (OSCTXT* pctxt, OSINT32 value, OSINT32 lower);
02105
02106 #ifndef _NO_INT64_SUPPORT
02107
02118 EXTERNPER int pe_SemiConsInt64
02119 (OSCTXT* pctxt, OSINT64 value, OSINT64 lower);
02120 #endif
02121
02133 EXTERNPER int pe_SemiConsUnsigned
02134 (OSCTXT* pctxt, OSUINT32 value, OSUINT32 lower);
02135
02136 #ifndef _NO_INT64_SUPPORT
02137
02149 EXTERNPER int pe_SemiConsUInt64
02150 (OSCTXT* pctxt, OSUINT64 value, OSUINT64 lower);
02151 #endif
02152
02165 EXTERNPER int pe_TimeStr (OSCTXT* pctxt, const char* string, OSUINT32 flags);
02166
02175 EXTERNPER int pe_UnconsLength (OSCTXT* pctxt, OSUINT32 value);
02176
02186 EXTERNPER int pe_UnconsInteger (OSCTXT* pctxt, OSINT32 value);
02187
02188 #ifndef _NO_INT64_SUPPORT
02189
02198 EXTERNPER int pe_UnconsInt64 (OSCTXT* pctxt, OSINT64 value);
02199 #endif
02200
02210 EXTERNPER int pe_UnconsUnsigned (OSCTXT* pctxt, OSUINT32 value);
02211
02212 #ifndef _NO_INT64_SUPPORT
02213
02223 EXTERNPER int pe_UnconsUInt64 (OSCTXT* pctxt, OSUINT64 value);
02224 #endif
02225
02238 EXTERNPER int pe_VarWidthCharString (OSCTXT* pctxt, const char* value);
02239
02249 EXTERNPER int pe_YearInt (OSCTXT* pctxt, OSINT32 value);
02250
02251 #ifndef _NO_ASN1REAL
02252
02265 EXTERNPER int pe_Real10 (OSCTXT* pctxt, const char* pvalue);
02266 #endif
02267
02284 EXTERNPER int uperEncConstrString
02285 (OSCTXT* pctxt, const char* string, const char* charSet,
02286 OSUINT32 nbits, OSUINT32 canSetBits);
02287
02290
02291
02292
02313 EXTERNPER int pu_addSizeConstraint (OSCTXT* pctxt, const Asn1SizeCnst* pSize);
02314
02315 EXTERNPER OSBOOL pu_alignCharStr
02316 (OSCTXT* pctxt, OSUINT32 len, OSUINT32 nbits, Asn1SizeCnst* pSize);
02317
02318 EXTERNPER OSUINT32 pu_bitcnt (OSUINT32 value);
02319
02320 EXTERNPER Asn1SizeCnst* pu_checkSize
02321 (Asn1SizeCnst* pSizeList, OSUINT32 value, OSBOOL* pExtendable);
02322
02336 EXTERNPER int pu_checkSizeExt
02337 (Asn1SizeCnst* pSizeCnst, OSUINT32 value, OSBOOL* pExtendable,
02338 Asn1SizeValueRange* pSizeRange, OSBOOL* pExtSize);
02339
02353 EXTERNPER void pu_freeContext (OSCTXT* pctxt);
02354
02355 EXTERNPER size_t pu_getMaskAndIndex (size_t bitOffset, unsigned char* pMask);
02356
02371 EXTERNPER size_t pu_getMsgLen (OSCTXT* pctxt);
02372
02387 EXTERNPER size_t pu_getMsgLenBits (OSCTXT* pctxt);
02388
02397 EXTERNPER void pu_hexdump (OSCTXT* pctxt);
02398
02415 EXTERNPER int pu_setBuffer
02416 (OSCTXT* pctxt, OSOCTET* bufaddr, size_t bufsiz, OSBOOL aligned);
02417
02418 #define pd_setp(pctxt, bufaddr, bufsiz, aligned) \
02419 pu_setBuffer(pctxt, bufaddr, bufsiz, aligned)
02420
02421 #define pe_setp(pctxt, bufaddr, bufsiz, aligned) \
02422 pu_setBuffer(pctxt, bufaddr, bufsiz, aligned)
02423
02424 #define pe_resetp(pctxt) rtxResetContext(pctxt)
02425 #define pd_resetp(pctxt) rtxResetContext(pctxt)
02426
02427
02428
02456 EXTERNPER int pu_initContext
02457 (OSCTXT* pctxt, OSOCTET* bufaddr, OSUINT32 bufsiz, OSBOOL aligned);
02458
02475 EXTERNPER int pu_initContextBuffer (OSCTXT* pTarget, OSCTXT* pSource);
02476
02477 EXTERNPER const char* pu_getFullName
02478 (OSCTXT* pctxt, const char* suffix);
02479
02480 EXTERNPER void pu_init16BitCharSet
02481 (Asn116BitCharSet* pCharSet, OSUNICHAR first, OSUNICHAR last,
02482 OSUINT32 abits, OSUINT32 ubits);
02483
02490 EXTERNPER void pu_insLenField (OSCTXT* pctxt);
02491
02499 EXTERNPER OSBOOL pu_isFixedSize (const Asn1SizeCnst* pSizeList);
02500
02525 EXTERNPER OSCTXT* pu_newContext
02526 (OSOCTET* bufaddr, OSUINT32 bufsiz, OSBOOL aligned);
02527
02528 EXTERNPER PERField* pu_newField
02529 (OSCTXT* pctxt, const char* nameSuffix);
02530
02531 EXTERNPER void pu_initFieldList (OSCTXT* pctxt, OSINT16 bitOffset);
02532
02536 EXTERNPER void pu_popName (OSCTXT* pctxt);
02537
02544 EXTERNPER void pu_pushElemName (OSCTXT* pctxt, int idx);
02545
02550 EXTERNPER void pu_pushName (OSCTXT* pctxt, const char* name);
02551
02563 EXTERNPER void pu_setCharSet (Asn1CharSet* pCharSet, const char* permSet);
02564
02579 EXTERNPER void pu_set16BitCharSet
02580 (OSCTXT* pctxt, Asn116BitCharSet* pCharSet, Asn116BitCharSet* pAlphabet);
02581
02582
02591 EXTERNPER void pu_set16BitCharSetFromRange
02592 (Asn116BitCharSet* pCharSet, OSUINT16 firstChar, OSUINT16 lastChar);
02593
02594 EXTERNPER void pu_setFldBitCount (OSCTXT* pctxt);
02595
02596 EXTERNPER void pu_setFldBitOffset (OSCTXT* pctxt);
02597
02598 EXTERNPER void pu_setFldListFromCtxt (OSCTXT* pctxt, OSCTXT* srcctxt);
02599
02600 EXTERNPER void pu_setOpenTypeFldList (OSCTXT* pctxt, OSRTSList* plist);
02601
02602 EXTERNPER OSBOOL pu_setTrace (OSCTXT* pCtxt, OSBOOL value);
02603
02604 EXTERNPER void pu_setAligned (OSCTXT* pctxt, OSBOOL value);
02605
02606 EXTERNPER void pu_deleteFieldList (OSCTXT* pctxt);
02607
02622 EXTERNPER void pu_bindump (OSCTXT* pctxt, const char* varname);
02623
02624 EXTERNPER void pu_dumpField
02625 (OSCTXT* pctxt, PERField* pField, const char* varname,
02626 size_t nextBitOffset, BinDumpBuffer* pbuf);
02627
02628 EXTERNPER void pu_init32BitCharSet
02629 (Asn132BitCharSet* pCharSet, OS32BITCHAR first, OS32BITCHAR last,
02630 OSUINT32 abits, OSUINT32 ubits);
02631
02646 EXTERNPER void pu_set32BitCharSet
02647 (OSCTXT* pctxt, Asn132BitCharSet* pCharSet, Asn132BitCharSet* pAlphabet);
02648
02657 EXTERNPER void pu_set32BitCharSetFromRange
02658 (Asn132BitCharSet* pCharSet, OSUINT32 firstChar, OSUINT32 lastChar);
02659
02669 EXTERNPER int pu_GetLibVersion (void);
02670
02678 EXTERNPER const char* pu_GetLibInfo (void);
02679
02684 #ifdef __cplusplus
02685 }
02686 #endif
02687
02688
02689
02690 #define pd_bit(pctxt,pvalue) rtxDecBit(pctxt,pvalue)
02691
02692 #define pd_bits(pctxt,pvalue,nbits) rtxDecBits(pctxt,pvalue,nbits)
02693
02694 #define pd_octets(pctxt,pbuffer,bufsiz,nbits) \
02695 rtxDecBitsToByteArray(pctxt,pbuffer,bufsiz,nbits)
02696
02697 #define pe_GeneralString(pctxt,value,permCharSet) \
02698 pe_VarWidthCharString(pctxt, value)
02699
02700 #define pe_GraphicString(pctxt,value,permCharSet) \
02701 pe_VarWidthCharString(pctxt, value)
02702
02703 #define pe_T61String(pctxt,value,permCharSet) \
02704 pe_VarWidthCharString(pctxt, value)
02705
02706 #define pe_TeletexString(pctxt,value,permCharSet) \
02707 pe_VarWidthCharString(pctxt, value)
02708
02709 #define pe_VideotexString(pctxt,value,permCharSet) \
02710 pe_VarWidthCharString(pctxt, value)
02711
02712 #define pe_ObjectDescriptor(pctxt,value,permCharSet) \
02713 pe_VarWidthCharString(pctxt, value)
02714
02715 #define pe_UTF8String(pctxt,value,permCharSet) \
02716 pe_VarWidthCharString(pctxt, value)
02717
02718 #define pe_IA5String(pctxt,value,permCharSet) \
02719 pe_ConstrainedStringEx (pctxt, value, permCharSet, 8, 7, 7)
02720
02721 #define pe_NumericString(pctxt,value,permCharSet) \
02722 pe_ConstrainedStringEx (pctxt, value, \
02723 (permCharSet == 0)?NUM_CANSET:permCharSet, 4, 4, 4)
02724
02725 #define pe_PrintableString(pctxt,value,permCharSet) \
02726 pe_ConstrainedStringEx (pctxt, value, permCharSet, 8, 7, 7)
02727
02728 #define pe_VisibleString(pctxt,value,permCharSet) \
02729 pe_ConstrainedStringEx (pctxt, value, permCharSet, 8, 7, 7)
02730
02731 #define pe_ISO646String pe_IA5String
02732 #define pe_GeneralizedTime pe_IA5String
02733 #define pe_UTCTime pe_GeneralizedTime
02734
02735 #define pd_GeneralString(pctxt,pvalue,permCharSet) \
02736 pd_VarWidthCharString (pctxt, pvalue)
02737
02738 #define pd_GraphicString(pctxt,pvalue,permCharSet) \
02739 pd_VarWidthCharString (pctxt, pvalue)
02740
02741 #define pd_VideotexString(pctxt,pvalue,permCharSet) \
02742 pd_VarWidthCharString (pctxt, pvalue)
02743
02744 #define pd_TeletexString(pctxt,pvalue,permCharSet) \
02745 pd_VarWidthCharString (pctxt, pvalue)
02746
02747 #define pd_T61String(pctxt,pvalue,permCharSet) \
02748 pd_VarWidthCharString (pctxt, pvalue)
02749
02750 #define pd_ObjectDescriptor(pctxt,pvalue,permCharSet) \
02751 pd_VarWidthCharString (pctxt, pvalue)
02752
02753 #define pd_UTF8String(pctxt,pvalue,permCharSet) \
02754 pd_VarWidthCharString (pctxt, pvalue)
02755
02756 #define pd_IA5String(pctxt,pvalue,permCharSet) \
02757 pd_ConstrainedStringEx (pctxt, pvalue, permCharSet, 8, 7, 7)
02758
02759 #define pd_NumericString(pctxt,pvalue,permCharSet) \
02760 pd_ConstrainedStringEx (pctxt, pvalue, \
02761 (permCharSet == 0)?NUM_CANSET:permCharSet, 4, 4, 4)
02762
02763 #define pd_PrintableString(pctxt,pvalue,permCharSet) \
02764 pd_ConstrainedStringEx (pctxt, pvalue, permCharSet, 8, 7, 7)
02765
02766 #define pd_VisibleString(pctxt,pvalue,permCharSet) \
02767 pd_ConstrainedStringEx (pctxt, pvalue, permCharSet, 8, 7, 7)
02768
02769 #define pd_ISO646String pd_IA5String
02770 #define pd_GeneralizedTime pd_IA5String
02771 #define pd_UTCTime pd_GeneralizedTime
02772 #define pe_GetMsgLen pu_getMsgLen
02773
02774 #define pe_ExpandBuffer(pctxt,nbytes) rtxCheckOutputBuffer(pctxt,nbytes)
02775
02776
02777
02778
02779 #define pd_AnyCentury(pctxt,string) \
02780 pd_DateStr (pctxt, string, OSANY|OSCENTURY)
02781
02782
02783 #define pd_AnyCenturyInt(pctxt,pvalue) \
02784 pd_UnconsInteger (pctxt, pvalue)
02785
02786
02787 #define pd_AnyDate(pctxt,string) \
02788 pd_DateStr (pctxt, string, OSANY|OSYEAR|OSMONTH|OSDAY)
02789
02790
02791 #define pd_AnyYear(pctxt,string) \
02792 pd_DateStr (pctxt, string, OSANY|OSYEAR)
02793
02794
02795 #define pd_AnyYearInt(pctxt,pvalue) \
02796 pd_UnconsInteger (pctxt, pvalue)
02797
02798
02799 #define pd_AnyYearDay(pctxt,string) \
02800 pd_DateStr (pctxt, string, OSANY|OSYEAR|OSDAY)
02801
02802
02803 #define pd_AnyYearMonth(pctxt,string) \
02804 pd_DateStr (pctxt, string, OSANY|OSYEAR|OSMONTH)
02805
02806
02807 #define pd_AnyYearMonthDay(pctxt,string) \
02808 pd_DateStr (pctxt, string, OSANY|OSYEAR|OSMONTH|OSDAY)
02809
02810
02811 #define pd_AnyYearWeek(pctxt,string) \
02812 pd_DateStr (pctxt, string, OSANY|OSYEAR|OSWEEK)
02813
02814
02815 #define pd_AnyYearWeekDay(pctxt,string) \
02816 pd_DateStr (pctxt, string, OSANY|OSYEAR|OSWEEK|OSDAY)
02817
02818
02819 #define pd_Century(pctxt,string) \
02820 pd_DateStr (pctxt, string, OSCENTURY)
02821
02822
02823 #define pd_CenturyInt(pctxt,pvalue) \
02824 pd_ConsUInt8 (pctxt, pvalue, 0, 99)
02825
02826
02827 #define pd_Date(pctxt,string) \
02828 pd_DateStr (pctxt, string, OSYEAR_BASIC|OSYEAR|OSMONTH|OSDAY);
02829
02830
02831 #define pd_DateTime(pctxt,string) \
02832 pd_DateTimeStr (pctxt, string, \
02833 OSYEAR_BASIC|OSYEAR|OSMONTH|OSDAY|OSHOURS|OSMINUTES|OSSECONDS);
02834
02835
02836 #define pd_DurationInterval(pctxt,string) \
02837 pd_Duration (pctxt, string, FALSE)
02838
02839
02840
02841 #define pd_DurationEndDateInterval(pctxt,string,flags) \
02842 pd_Interval (pctxt, string, FALSE, OSDURATION, flags)
02843
02844
02845
02846 #define pd_DurationEndTimeInterval(pctxt,string,flags) \
02847 pd_Interval (pctxt, string, FALSE, OSDURATION, flags)
02848
02849
02850
02851 #define pd_DurationEndDateTimeInterval(pctxt,string,flags) \
02852 pd_Interval (pctxt, string, FALSE, OSDURATION, flags)
02853
02854 #ifdef BINARY_HOURS
02855
02856 #define pd_Hours(pctxt,pvalue) \
02857 pd_ConsInt8 (pctxt, pvalue, 0, 24)
02858
02859 #define pd_HoursUtc(pctxt,pvalue) \
02860 pd_ConsInt8 (pctxt, pvalue, 0, 24)
02861
02862 #else
02863
02864
02865 #define pd_Hours(pctxt,string) \
02866 pd_TimeStr (pctxt, string, OSHOURS)
02867
02868
02869 #define pd_HoursUtc(pctxt,string) \
02870 pd_TimeStr (pctxt, string, OSHOURS|OSUTC)
02871
02872 #endif
02873
02874
02875 #define pd_HoursAndDiff(pctxt,string) \
02876 pd_TimeStr (pctxt, string, OSHOURS|OSDIFF)
02877
02878
02879 #define pd_HoursAndFraction(pctxt,string,n) \
02880 pd_TimeStr (pctxt, string, OSHOURS|(n))
02881
02882
02883
02884 #define pd_HoursUtcAndFraction(pctxt,string,n) \
02885 pd_TimeStr (pctxt, string, OSHOURS|OSUTC|(n))
02886
02887
02888
02889 #define pd_HoursAndDiffAndFraction(pctxt,string,n) \
02890 pd_TimeStr (pctxt, string, OSHOURS|OSDIFF|(n))
02891
02892
02893 #define pd_Minutes(pctxt,string) \
02894 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES)
02895
02896
02897 #define pd_MinutesUtc(pctxt,string) \
02898 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSUTC)
02899
02900
02901 #define pd_MinutesAndDiff(pctxt,string) \
02902 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSDIFF)
02903
02904
02905
02906 #define pd_MinutesAndFraction(pctxt,string,n) \
02907 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|(n))
02908
02909
02910
02911 #define pd_MinutesUtcAndFraction(pctxt,string,n) \
02912 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSUTC|(n))
02913
02914
02915
02916 #define pd_MinutesAndDiffAndFraction(pctxt,string,n) \
02917 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSDIFF|(n))
02918
02919
02920
02921 #define pd_RecStartEndDateInterval(pctxt,string,flags) \
02922 pd_Interval (pctxt, string, TRUE, flags, flags)
02923
02924
02925
02926 #define pd_RecStartEndTimeInterval(pctxt,string,flags) \
02927 pd_Interval (pctxt, string, TRUE, flags, flags)
02928
02929
02930
02931 #define pd_RecStartEndDateTimeInterval(pctxt,string,flags) \
02932 pd_Interval (pctxt, string, TRUE, flags, flags)
02933
02934
02935
02936 #define pd_RecDurationInterval(pctxt,string) \
02937 pd_Duration (pctxt, string, TRUE)
02938
02939
02940
02941 #define pd_RecStartDateDurationInterval(pctxt,string,flags) \
02942 pd_Interval (pctxt, string, TRUE, flags, OSDURATION)
02943
02944
02945
02946 #define pd_RecStartTimeDurationInterval(pctxt,string,flags) \
02947 pd_Interval (pctxt, string, TRUE, flags, OSDURATION)
02948
02949
02950
02951 #define pd_RecStartDateTimeDurationInterval(pctxt,string,flags) \
02952 pd_Interval (pctxt, string, TRUE, flags, OSDURATION)
02953
02954
02955
02956 #define pd_RecDurationEndDateInterval(pctxt,string,flags) \
02957 pd_Interval (pctxt, string, TRUE, OSDURATION, flags)
02958
02959
02960
02961 #define pd_RecDurationEndTimeInterval(pctxt,string,flags) \
02962 pd_Interval (pctxt, string, TRUE, OSDURATION, flags)
02963
02964
02965
02966 #define pd_RecDurationEndDateTimeInterval(pctxt,string,flags) \
02967 pd_Interval (pctxt, string, TRUE, OSDURATION, flags)
02968
02969
02970
02971 #define pd_StartEndDateInterval(pctxt,string,flags) \
02972 pd_Interval (pctxt, string, FALSE, flags, flags)
02973
02974
02975
02976 #define pd_StartEndTimeInterval(pctxt,string,flags) \
02977 pd_Interval (pctxt, string, FALSE, flags, flags)
02978
02979
02980
02981 #define pd_StartEndDateTimeInterval(pctxt,string,flags) \
02982 pd_Interval (pctxt, string, FALSE, flags, flags)
02983
02984
02985
02986 #define pd_StartDateDurationInterval(pctxt,string,flags) \
02987 pd_Interval (pctxt, string, FALSE, flags, OSDURATION)
02988
02989
02990
02991 #define pd_StartTimeDurationInterval(pctxt,string,flags) \
02992 pd_Interval (pctxt, string, FALSE, flags, OSDURATION)
02993
02994
02995
02996 #define pd_StartDateTimeDurationInterval(pctxt,string,flags) \
02997 pd_Interval (pctxt, string, FALSE, flags, OSDURATION)
02998
02999
03000 #define pd_TimeOfDay(pctxt,string) \
03001 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS)
03002
03003
03004 #define pd_TimeOfDayUtc(pctxt,string) \
03005 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|OSUTC)
03006
03007
03008 #define pd_TimeOfDayAndDiff(pctxt,string) \
03009 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|OSDIFF)
03010
03011
03012
03013 #define pd_TimeOfDayAndFraction(pctxt,string,n) \
03014 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|(n))
03015
03016
03017
03018 #define pd_TimeOfDayUtcAndFraction(pctxt,string,n) \
03019 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|OSUTC|(n))
03020
03021
03022
03023 #define pd_TimeOfDayAndDiffAndFraction(pctxt,string,n) \
03024 pd_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|OSDIFF|(n))
03025
03026
03027 #define pd_Year(pctxt,string) \
03028 pd_DateStr (pctxt, string, OSYEAR)
03029
03030
03031 #define pd_YearDay(pctxt,string) \
03032 pd_DateStr (pctxt, string, OSYEAR|OSDAY)
03033
03034
03035 #define pd_YearMonth(pctxt,string) \
03036 pd_DateStr (pctxt, string, OSYEAR|OSMONTH)
03037
03038
03039 #define pd_YearMonthDay(pctxt,string) \
03040 pd_DateStr (pctxt, string, OSYEAR|OSMONTH|OSDAY);
03041
03042
03043 #define pd_YearWeek(pctxt,string) \
03044 pd_DateStr (pctxt, string, OSYEAR|OSWEEK)
03045
03046
03047 #define pd_YearWeekDay(pctxt,string) \
03048 pd_DateStr (pctxt, string, OSYEAR|OSWEEK|OSDAY)
03049
03050
03051
03052
03053 #define pe_AnyCentury(pctxt,string) \
03054 pe_DateStr (pctxt, string, OSANY|OSCENTURY)
03055
03056
03057 #define pe_AnyCenturyInt(pctxt,value) \
03058 pe_UnconsInteger (pctxt, value)
03059
03060
03061 #define pe_AnyDate(pctxt,string) \
03062 pe_DateStr (pctxt, string, OSANY|OSYEAR|OSMONTH|OSDAY)
03063
03064
03065 #define pe_AnyYear(pctxt,string) \
03066 pe_DateStr (pctxt, string, OSANY|OSYEAR)
03067
03068
03069 #define pe_AnyYearInt(pctxt,value) \
03070 pe_UnconsInteger (pctxt, value)
03071
03072
03073 #define pe_AnyYearDay(pctxt,string) \
03074 pe_DateStr (pctxt, string, OSANY|OSYEAR|OSDAY)
03075
03076
03077 #define pe_AnyYearMonth(pctxt,string) \
03078 pe_DateStr (pctxt, string, OSANY|OSYEAR|OSMONTH)
03079
03080
03081 #define pe_AnyYearMonthDay(pctxt,string) \
03082 pe_DateStr (pctxt, string, OSANY|OSYEAR|OSMONTH|OSDAY)
03083
03084
03085 #define pe_AnyYearWeek(pctxt,string) \
03086 pe_DateStr (pctxt, string, OSANY|OSYEAR|OSWEEK)
03087
03088
03089 #define pe_AnyYearWeekDay(pctxt,string) \
03090 pe_DateStr (pctxt, string, OSANY|OSYEAR|OSWEEK|OSDAY)
03091
03092
03093 #define pe_Century(pctxt,string) \
03094 pe_DateStr (pctxt, string, OSCENTURY)
03095
03096
03097 #define pe_CenturyInt(pctxt,value) \
03098 pe_ConsUnsigned (pctxt, value, 0, 99)
03099
03100
03101 #define pe_Date(pctxt,string) \
03102 pe_DateStr (pctxt, string, OSYEAR_BASIC|OSYEAR|OSMONTH|OSDAY)
03103
03104
03105 #define pe_DateTime(pctxt,string) \
03106 pe_DateTimeStr (pctxt, string, \
03107 OSYEAR_BASIC|OSYEAR|OSMONTH|OSDAY|OSHOURS|OSMINUTES|OSSECONDS)
03108
03109
03110 #define pe_DurationInterval(pctxt,string) \
03111 pe_Duration (pctxt, string, FALSE)
03112
03113
03114
03115 #define pe_DurationEndDateInterval(pctxt,string,flags) \
03116 pe_Interval (pctxt, string, FALSE, OSDURATION, flags)
03117
03118
03119
03120 #define pe_DurationEndTimeInterval(pctxt,string,flags) \
03121 pe_Interval (pctxt, string, FALSE, OSDURATION, flags)
03122
03123
03124
03125 #define pe_DurationEndDateTimeInterval(pctxt,string,flags) \
03126 pe_Interval (pctxt, string, FALSE, OSDURATION, flags)
03127
03128 #ifdef BINARY_HOURS
03129
03130 #define pe_Hours(pctxt,value) \
03131 pe_ConsUnsigned (pctxt, value, 0, 24)
03132
03133 #define pe_HoursUtc(pctxt,value) \
03134 pe_ConsUnsigned (pctxt, value, 0, 24)
03135
03136 #else
03137
03138
03139 #define pe_Hours(pctxt,string) \
03140 pe_TimeStr (pctxt, string, OSHOURS)
03141
03142
03143 #define pe_HoursUtc(pctxt,string) \
03144 pe_TimeStr (pctxt, string, OSHOURS|OSUTC)
03145
03146 #endif
03147
03148
03149 #define pe_Hours(pctxt,string) \
03150 pe_TimeStr (pctxt, string, OSHOURS)
03151
03152
03153 #define pe_HoursUtc(pctxt,string) \
03154 pe_TimeStr (pctxt, string, OSHOURS|OSUTC)
03155
03156
03157 #define pe_HoursAndDiff(pctxt,string) \
03158 pe_TimeStr (pctxt, string, OSHOURS|OSDIFF)
03159
03160
03161 #define pe_HoursAndFraction(pctxt,string,n) \
03162 pe_TimeStr (pctxt, string, OSHOURS|(n))
03163
03164
03165
03166 #define pe_HoursUtcAndFraction(pctxt,string,n) \
03167 pe_TimeStr (pctxt, string, OSHOURS|OSUTC|(n))
03168
03169
03170
03171 #define pe_HoursAndDiffAndFraction(pctxt,string,n) \
03172 pe_TimeStr (pctxt, string, OSHOURS|OSDIFF|(n))
03173
03174
03175 #define pe_Minutes(pctxt,string) \
03176 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES)
03177
03178
03179 #define pe_MinutesUtc(pctxt,string) \
03180 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSUTC)
03181
03182
03183 #define pe_MinutesAndDiff(pctxt,string) \
03184 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSDIFF)
03185
03186
03187
03188 #define pe_MinutesAndFraction(pctxt,string,n) \
03189 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|(n))
03190
03191
03192
03193 #define pe_MinutesUtcAndFraction(pctxt,string,n) \
03194 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSUTC|(n))
03195
03196
03197
03198 #define pe_MinutesAndDiffAndFraction(pctxt,string,n) \
03199 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSDIFF|(n))
03200
03201
03202
03203 #define pe_RecStartEndDateInterval(pctxt,string,flags) \
03204 pe_Interval (pctxt, string, TRUE, flags, flags)
03205
03206
03207
03208 #define pe_RecStartEndTimeInterval(pctxt,string,flags) \
03209 pe_Interval (pctxt, string, TRUE, flags, flags)
03210
03211
03212
03213 #define pe_RecStartEndDateTimeInterval(pctxt,string,flags) \
03214 pe_Interval (pctxt, string, TRUE, flags, flags)
03215
03216
03217
03218 #define pe_RecDurationInterval(pctxt,string) \
03219 pe_Duration (pctxt, string, TRUE)
03220
03221
03222
03223 #define pe_RecStartDateDurationInterval(pctxt,string,flags) \
03224 pe_Interval (pctxt, string, TRUE, flags, OSDURATION)
03225
03226
03227
03228 #define pe_RecStartTimeDurationInterval(pctxt,string,flags) \
03229 pe_Interval (pctxt, string, TRUE, flags, OSDURATION)
03230
03231
03232
03233 #define pe_RecStartDateTimeDurationInterval(pctxt,string,flags) \
03234 pe_Interval (pctxt, string, TRUE, flags, OSDURATION)
03235
03236
03237
03238 #define pe_RecDurationEndDateInterval(pctxt,string,flags) \
03239 pe_Interval (pctxt, string, TRUE, OSDURATION, flags)
03240
03241
03242
03243 #define pe_RecDurationEndTimeInterval(pctxt,string,flags) \
03244 pe_Interval (pctxt, string, TRUE, OSDURATION, flags)
03245
03246
03247
03248 #define pe_RecDurationEndDateTimeInterval(pctxt,string,flags) \
03249 pe_Interval (pctxt, string, TRUE, OSDURATION, flags)
03250
03251
03252
03253 #define pe_StartEndDateInterval(pctxt,string,flags) \
03254 pe_Interval (pctxt, string, FALSE, flags, flags)
03255
03256
03257
03258 #define pe_StartEndTimeInterval(pctxt,string,flags) \
03259 pe_Interval (pctxt, string, FALSE, flags, flags)
03260
03261
03262
03263 #define pe_StartEndDateTimeInterval(pctxt,string,flags) \
03264 pe_Interval (pctxt, string, FALSE, flags, flags)
03265
03266
03267
03268 #define pe_StartDateDurationInterval(pctxt,string,flags) \
03269 pe_Interval (pctxt, string, FALSE, flags, OSDURATION)
03270
03271
03272
03273 #define pe_StartTimeDurationInterval(pctxt,string,flags) \
03274 pe_Interval (pctxt, string, FALSE, flags, OSDURATION)
03275
03276
03277
03278 #define pe_StartDateTimeDurationInterval(pctxt,string,flags) \
03279 pe_Interval (pctxt, string, FALSE, flags, OSDURATION)
03280
03281
03282 #define pe_TimeOfDay(pctxt,string) \
03283 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS)
03284
03285
03286 #define pe_TimeOfDayUtc(pctxt,string) \
03287 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|OSUTC)
03288
03289
03290 #define pe_TimeOfDayAndDiff(pctxt,string) \
03291 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|OSDIFF)
03292
03293
03294
03295 #define pe_TimeOfDayAndFraction(pctxt,string,n) \
03296 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|(n))
03297
03298
03299
03300 #define pe_TimeOfDayUtcAndFraction(pctxt,string,n) \
03301 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|OSUTC|(n))
03302
03303
03304
03305 #define pe_TimeOfDayAndDiffAndFraction(pctxt,string,n) \
03306 pe_TimeStr (pctxt, string, OSHOURS|OSMINUTES|OSSECONDS|OSDIFF|(n))
03307
03308
03309 #define pe_Year(pctxt,string) \
03310 pe_DateStr (pctxt, string, OSYEAR)
03311
03312
03313 #define pe_YearDay(pctxt,string) \
03314 pe_DateStr (pctxt, string, OSYEAR|OSDAY)
03315
03316
03317 #define pe_YearMonth(pctxt,string) \
03318 pe_DateStr (pctxt, string, OSYEAR|OSMONTH)
03319
03320
03321 #define pe_YearMonthDay(pctxt,string) \
03322 pe_DateStr (pctxt, string, OSYEAR|OSMONTH|OSDAY)
03323
03324
03325 #define pe_YearWeek(pctxt,string) \
03326 pe_DateStr (pctxt, string, OSYEAR|OSWEEK)
03327
03328
03329 #define pe_YearWeekDay(pctxt,string) \
03330 pe_DateStr (pctxt, string, OSYEAR|OSWEEK|OSDAY)
03331
03332
03333
03334
03335 EXTERNPER int pu_checkSizeConstraint (OSCTXT* pctxt, int size);
03336 EXTERNPER Asn1SizeCnst* pu_getSizeConstraint (OSCTXT* pctxt, OSBOOL extbit);
03337 EXTERNPER int pu_getBitOffset (OSCTXT* pctxt);
03338 EXTERNPER void pu_setBitOffset (OSCTXT* pctxt, int bitOffset);
03339
03342 #endif