blob: 065766e99bbdc1f67d34ab6f8e9fb15f813d1ff0 [file] [log] [blame]
Lev Walkinf15320b2004-06-03 03:38:44 +00001/*
2 * This file is automatically generated by ./expr-h.pl
3 * DO NOT EDIT MANUALLY, fix the ./expr-h.pl instead if necessary.
4 */
5#ifndef ASN1_PARSER_EXPR_STR_H
6#define ASN1_PARSER_EXPR_STR_H
7
Lev Walkin04abdb22016-01-10 20:03:04 -08008#include <assert.h>
9
Lev Walkin4efbfb72005-02-25 14:20:30 +000010#ifndef __GNUC__
11#define __attribute__(x) /* unused */
12#endif
13
Lev Walkinf15320b2004-06-03 03:38:44 +000014static char *asn1p_expr_type2str[] __attribute__ ((unused)) = {
15 [ ASN_CONSTR_SEQUENCE ] = "SEQUENCE",
16 [ ASN_CONSTR_CHOICE ] = "CHOICE",
17 [ ASN_CONSTR_SET ] = "SET",
18 [ ASN_CONSTR_SEQUENCE_OF ] = "SEQUENCE OF",
19 [ ASN_CONSTR_SET_OF ] = "SET OF",
Lev Walkinf6853ce2017-08-11 00:50:27 -070020 [ ASN_CONSTR_OPEN_TYPE ] = "OPEN TYPE",
Lev Walkin609ccbb2004-09-04 04:49:21 +000021 [ ASN_TYPE_ANY ] = "ANY",
Lev Walkinf15320b2004-06-03 03:38:44 +000022 [ ASN_BASIC_BOOLEAN ] = "BOOLEAN",
23 [ ASN_BASIC_NULL ] = "NULL",
24 [ ASN_BASIC_INTEGER ] = "INTEGER",
25 [ ASN_BASIC_REAL ] = "REAL",
26 [ ASN_BASIC_ENUMERATED ] = "ENUMERATED",
27 [ ASN_BASIC_BIT_STRING ] = "BIT STRING",
28 [ ASN_BASIC_OCTET_STRING ] = "OCTET STRING",
29 [ ASN_BASIC_OBJECT_IDENTIFIER ] = "OBJECT IDENTIFIER",
30 [ ASN_BASIC_RELATIVE_OID ] = "RELATIVE-OID",
31 [ ASN_BASIC_EXTERNAL ] = "EXTERNAL",
32 [ ASN_BASIC_EMBEDDED_PDV ] = "EMBEDDED PDV",
33 [ ASN_BASIC_CHARACTER_STRING ] = "CHARACTER STRING",
34 [ ASN_BASIC_UTCTime ] = "UTCTime",
35 [ ASN_BASIC_GeneralizedTime ] = "GeneralizedTime",
Lev Walkinf15320b2004-06-03 03:38:44 +000036 [ ASN_STRING_IA5String ] = "IA5String",
Lev Walkine422e682004-08-25 01:58:59 +000037 [ ASN_STRING_PrintableString ] = "PrintableString",
38 [ ASN_STRING_VisibleString ] = "VisibleString",
Lev Walkinf15320b2004-06-03 03:38:44 +000039 [ ASN_STRING_ISO646String ] = "ISO646String",
40 [ ASN_STRING_NumericString ] = "NumericString",
Lev Walkine422e682004-08-25 01:58:59 +000041 [ ASN_STRING_UniversalString ] = "UniversalString",
42 [ ASN_STRING_BMPString ] = "BMPString",
43 [ ASN_STRING_UTF8String ] = "UTF8String",
44 [ ASN_STRING_GeneralString ] = "GeneralString",
45 [ ASN_STRING_GraphicString ] = "GraphicString",
Lev Walkinf15320b2004-06-03 03:38:44 +000046 [ ASN_STRING_TeletexString ] = "TeletexString",
47 [ ASN_STRING_T61String ] = "T61String",
Lev Walkinf15320b2004-06-03 03:38:44 +000048 [ ASN_STRING_VideotexString ] = "VideotexString",
Lev Walkinf15320b2004-06-03 03:38:44 +000049 [ ASN_STRING_ObjectDescriptor ] = "ObjectDescriptor",
50};
51
52/*
53 * Convert the ASN.1 expression type back into the string representation.
54 */
Lev Walkin483c14f2016-01-10 20:41:57 -080055#define ASN_EXPR_TYPE2STR(type) _asn1p_expr_type2string(type)
Lev Walkin04abdb22016-01-10 20:03:04 -080056
Lev Walkin483c14f2016-01-10 20:41:57 -080057static inline char * __attribute__((unused))
58_asn1p_expr_type2string(asn1p_expr_type_e type) {
59 assert((signed int)type >= 0);
Lev Walkin04abdb22016-01-10 20:03:04 -080060 if(type < sizeof(asn1p_expr_type2str)/sizeof(asn1p_expr_type2str[0]))
61 return asn1p_expr_type2str[type];
62 return NULL;
63}
Lev Walkinf15320b2004-06-03 03:38:44 +000064
65#endif /* ASN1_PARSER_EXPR_STR_H */