From 0c735e9fde88387a3d2d0bfa40a22a9f59a44edf Mon Sep 17 00:00:00 2001 From: Lev Walkin <vlm@lionet.info> Date: Thu, 19 Aug 2004 13:32:46 +0000 Subject: [PATCH] uclass2str --- libasn1parser/asn1p_expr2uclass.h | 36 +++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/libasn1parser/asn1p_expr2uclass.h b/libasn1parser/asn1p_expr2uclass.h index 20f37003..8812a0be 100644 --- a/libasn1parser/asn1p_expr2uclass.h +++ b/libasn1parser/asn1p_expr2uclass.h @@ -1,8 +1,7 @@ #ifndef ASN1_PARSER_EXPR2UCLASS_H #define ASN1_PARSER_EXPR2UCLASS_H -static int -expr_type2uclass_value[ASN_EXPR_TYPE_MAX] +static int expr_type2uclass_value[ASN_EXPR_TYPE_MAX] __attribute__ ((unused)) = { [ ASN_BASIC_BOOLEAN ] = 1, [ ASN_BASIC_INTEGER ] = 2, @@ -38,4 +37,37 @@ expr_type2uclass_value[ASN_EXPR_TYPE_MAX] [ ASN_STRING_BMPString ] = 30, }; +static char *expr_uclass2str[32] __attribute__ ((unused)) = { + [ 0 ] = 0, /* If zero length, end-of-content */ + [ 1 ] = "BOOLEAN", + [ 2 ] = "INTEGER", + [ 3 ] = "BIT STRING", + [ 4 ] = "OCTET STRING", + [ 5 ] = "NULL", + [ 6 ] = "OBJECT IDENTIFIER", + [ 7 ] = "ObjectDescriptor", + [ 8 ] = "EXTERNAL", + [ 9 ] = "REAL", + [ 10 ] = "ENUMERATED", + [ 11 ] = "EMBEDDED-PDV", + [ 12 ] = "UTF8String", + [ 13 ] = "RELATIVE-OID", + [ 14 ] = 0, + [ 16 ] = "SEQUENCE", /* Or "SEQUENCE OF" */ + [ 17 ] = "SET", /* Or "SET OF" */ + [ 18 ] = "NumericString", /* " "|"0".."9" */ + [ 19 ] = "PrintableString", + [ 20 ] = "TeletexString", + [ 21 ] = "VideotexString", + [ 22 ] = "IA5String", + [ 23 ] = "UTCTime", + [ 24 ] = "GeneralizedTime", + [ 25 ] = "GraphicString", + [ 26 ] = "VisibleString", + [ 27 ] = "GeneralString", + [ 28 ] = "UniversalString", /* 32-bit UCS-4 */ + [ 29 ] = "CharacterString", + [ 30 ] = "BMPString", /* 16-bit UCS-2 */ +}; + #endif /* ASN1_PARSER_EXPR2UCLASS_H */ -- GitLab