mirror of https://gerrit.osmocom.org/asn1c
removed orthohonality
git-svn-id: https://asn1c.svn.sourceforge.net/svnroot/asn1c/trunk@376 59561ff5-6e30-0410-9f3c-9617f08c8826
This commit is contained in:
parent
dcd32fe424
commit
74ce239f62
|
@ -448,8 +448,8 @@ maintainer-clean-generic:
|
||||||
@echo "This command is intended for maintainers to use"
|
@echo "This command is intended for maintainers to use"
|
||||||
@echo "it deletes files that may require special tools to rebuild."
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
-rm -f asn1p_y.c
|
-rm -f asn1p_y.c
|
||||||
-rm -f asn1p_y.h
|
|
||||||
-rm -f asn1p_l.c
|
-rm -f asn1p_l.c
|
||||||
|
-rm -f asn1p_y.h
|
||||||
clean: clean-am
|
clean: clean-am
|
||||||
|
|
||||||
clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
|
clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
|
||||||
|
|
|
@ -37,37 +37,52 @@ static int expr_type2uclass_value[ASN_EXPR_TYPE_MAX]
|
||||||
[ ASN_STRING_BMPString ] = 30,
|
[ ASN_STRING_BMPString ] = 30,
|
||||||
};
|
};
|
||||||
|
|
||||||
static char *expr_uclass2str[32] __attribute__ ((unused)) = {
|
static enum asn1p_expr_type expr_utag2type[32] __attribute__ ((unused)) = {
|
||||||
[ 0 ] = 0, /* If zero length, end-of-content */
|
[ 0 ] = 0, /* If zero length, end-of-content */
|
||||||
[ 1 ] = "BOOLEAN",
|
[ 1 ] = ASN_BASIC_BOOLEAN,
|
||||||
[ 2 ] = "INTEGER",
|
[ 2 ] = ASN_BASIC_INTEGER,
|
||||||
[ 3 ] = "BIT STRING",
|
[ 3 ] = ASN_BASIC_BIT_STRING,
|
||||||
[ 4 ] = "OCTET STRING",
|
[ 4 ] = ASN_BASIC_OCTET_STRING,
|
||||||
[ 5 ] = "NULL",
|
[ 5 ] = ASN_BASIC_NULL,
|
||||||
[ 6 ] = "OBJECT IDENTIFIER",
|
[ 6 ] = ASN_BASIC_OBJECT_IDENTIFIER,
|
||||||
[ 7 ] = "ObjectDescriptor",
|
[ 7 ] = ASN_STRING_ObjectDescriptor,
|
||||||
[ 8 ] = "EXTERNAL",
|
[ 8 ] = ASN_BASIC_EXTERNAL,
|
||||||
[ 9 ] = "REAL",
|
[ 9 ] = ASN_BASIC_REAL,
|
||||||
[ 10 ] = "ENUMERATED",
|
[ 10 ] = ASN_BASIC_ENUMERATED,
|
||||||
[ 11 ] = "EMBEDDED-PDV",
|
[ 11 ] = ASN_BASIC_EMBEDDED_PDV,
|
||||||
[ 12 ] = "UTF8String",
|
[ 12 ] = ASN_STRING_UTF8String,
|
||||||
[ 13 ] = "RELATIVE-OID",
|
[ 13 ] = ASN_BASIC_RELATIVE_OID,
|
||||||
[ 14 ] = 0,
|
[ 14 ] = 0,
|
||||||
[ 16 ] = "SEQUENCE", /* Or "SEQUENCE OF" */
|
[ 15 ] = 0,
|
||||||
[ 17 ] = "SET", /* Or "SET OF" */
|
[ 16 ] = ASN_CONSTR_SEQUENCE, /* Or SEQUENCE OF */
|
||||||
[ 18 ] = "NumericString", /* " "|"0".."9" */
|
[ 17 ] = ASN_CONSTR_SET, /* Or SET OF */
|
||||||
[ 19 ] = "PrintableString",
|
[ 18 ] = ASN_STRING_NumericString, /* " "|"0".."9" */
|
||||||
[ 20 ] = "TeletexString",
|
[ 19 ] = ASN_STRING_PrintableString,
|
||||||
[ 21 ] = "VideotexString",
|
[ 20 ] = ASN_STRING_TeletexString,
|
||||||
[ 22 ] = "IA5String",
|
[ 21 ] = ASN_STRING_VideotexString,
|
||||||
[ 23 ] = "UTCTime",
|
[ 22 ] = ASN_STRING_IA5String,
|
||||||
[ 24 ] = "GeneralizedTime",
|
[ 23 ] = ASN_BASIC_UTCTime,
|
||||||
[ 25 ] = "GraphicString",
|
[ 24 ] = ASN_BASIC_GeneralizedTime,
|
||||||
[ 26 ] = "VisibleString",
|
[ 25 ] = ASN_STRING_GraphicString,
|
||||||
[ 27 ] = "GeneralString",
|
[ 26 ] = ASN_STRING_VisibleString,
|
||||||
[ 28 ] = "UniversalString", /* 32-bit UCS-4 */
|
[ 27 ] = ASN_STRING_GeneralString,
|
||||||
[ 29 ] = "CharacterString",
|
[ 28 ] = ASN_STRING_UniversalString, /* 32-bit UCS-4 */
|
||||||
[ 30 ] = "BMPString", /* 16-bit UCS-2 */
|
[ 29 ] = ASN_BASIC_CHARACTER_STRING,
|
||||||
|
[ 30 ] = ASN_STRING_BMPString, /* 16-bit UCS-2 */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Convert the [UNIVERSAL value] into the internal type or a string.
|
||||||
|
*/
|
||||||
|
#define ASN_UNIVERSAL_TAG2TYPE(utag) \
|
||||||
|
( \
|
||||||
|
(((int)(utag)) < 0 \
|
||||||
|
|| ((int)(utag)) >= (int)(sizeof(expr_utag2type) \
|
||||||
|
/ sizeof(expr_utag2type[0]))) \
|
||||||
|
? 0 \
|
||||||
|
: expr_utag2type[(int)(utag)] \
|
||||||
|
)
|
||||||
|
#define ASN_UNIVERSAL_TAG2STR(utag) \
|
||||||
|
ASN_EXPR_TYPE2STR(ASN_UNIVERSAL_TAG2TYPE(utag))
|
||||||
|
|
||||||
#endif /* ASN1_PARSER_EXPR2UCLASS_H */
|
#endif /* ASN1_PARSER_EXPR2UCLASS_H */
|
||||||
|
|
|
@ -51,7 +51,7 @@ static char *asn1p_expr_type2str[] __attribute__ ((unused)) = {
|
||||||
|| ((size_t)(type)) >= sizeof(asn1p_expr_type2str) \
|
|| ((size_t)(type)) >= sizeof(asn1p_expr_type2str) \
|
||||||
/ sizeof(asn1p_expr_type2str[0])) \
|
/ sizeof(asn1p_expr_type2str[0])) \
|
||||||
? (char *)0 \
|
? (char *)0 \
|
||||||
: asn1p_expr_type2str[(type)] \
|
: asn1p_expr_type2str[(int)(type)] \
|
||||||
)
|
)
|
||||||
|
|
||||||
#endif /* ASN1_PARSER_EXPR_STR_H */
|
#endif /* ASN1_PARSER_EXPR_STR_H */
|
||||||
|
|
|
@ -42,7 +42,7 @@ print<<EOM;
|
||||||
|| ((size_t)(type)) >= sizeof(asn1p_expr_type2str) \\
|
|| ((size_t)(type)) >= sizeof(asn1p_expr_type2str) \\
|
||||||
/ sizeof(asn1p_expr_type2str[0])) \\
|
/ sizeof(asn1p_expr_type2str[0])) \\
|
||||||
? (char *)0 \\
|
? (char *)0 \\
|
||||||
: asn1p_expr_type2str[(type)] \\
|
: asn1p_expr_type2str[(int)(type)] \\
|
||||||
)
|
)
|
||||||
|
|
||||||
#endif /* ASN1_PARSER_EXPR_STR_H */
|
#endif /* ASN1_PARSER_EXPR_STR_H */
|
||||||
|
|
Loading…
Reference in New Issue