blob: faa1cf8d89f56f41088d7008fe55b80eeaaf83ed [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 Walkin609ccbb2004-09-04 04:49:21 +000020 [ ASN_TYPE_ANY ] = "ANY",
Lev Walkinf15320b2004-06-03 03:38:44 +000021 [ ASN_BASIC_BOOLEAN ] = "BOOLEAN",
22 [ ASN_BASIC_NULL ] = "NULL",
23 [ ASN_BASIC_INTEGER ] = "INTEGER",
24 [ ASN_BASIC_REAL ] = "REAL",
25 [ ASN_BASIC_ENUMERATED ] = "ENUMERATED",
26 [ ASN_BASIC_BIT_STRING ] = "BIT STRING",
27 [ ASN_BASIC_OCTET_STRING ] = "OCTET STRING",
28 [ ASN_BASIC_OBJECT_IDENTIFIER ] = "OBJECT IDENTIFIER",
29 [ ASN_BASIC_RELATIVE_OID ] = "RELATIVE-OID",
30 [ ASN_BASIC_EXTERNAL ] = "EXTERNAL",
31 [ ASN_BASIC_EMBEDDED_PDV ] = "EMBEDDED PDV",
32 [ ASN_BASIC_CHARACTER_STRING ] = "CHARACTER STRING",
33 [ ASN_BASIC_UTCTime ] = "UTCTime",
34 [ ASN_BASIC_GeneralizedTime ] = "GeneralizedTime",
Lev Walkinf15320b2004-06-03 03:38:44 +000035 [ ASN_STRING_IA5String ] = "IA5String",
Lev Walkine422e682004-08-25 01:58:59 +000036 [ ASN_STRING_PrintableString ] = "PrintableString",
37 [ ASN_STRING_VisibleString ] = "VisibleString",
Lev Walkinf15320b2004-06-03 03:38:44 +000038 [ ASN_STRING_ISO646String ] = "ISO646String",
39 [ ASN_STRING_NumericString ] = "NumericString",
Lev Walkine422e682004-08-25 01:58:59 +000040 [ ASN_STRING_UniversalString ] = "UniversalString",
41 [ ASN_STRING_BMPString ] = "BMPString",
42 [ ASN_STRING_UTF8String ] = "UTF8String",
43 [ ASN_STRING_GeneralString ] = "GeneralString",
44 [ ASN_STRING_GraphicString ] = "GraphicString",
Lev Walkinf15320b2004-06-03 03:38:44 +000045 [ ASN_STRING_TeletexString ] = "TeletexString",
46 [ ASN_STRING_T61String ] = "T61String",
Lev Walkinf15320b2004-06-03 03:38:44 +000047 [ ASN_STRING_VideotexString ] = "VideotexString",
Lev Walkinf15320b2004-06-03 03:38:44 +000048 [ ASN_STRING_ObjectDescriptor ] = "ObjectDescriptor",
49};
50
51/*
52 * Convert the ASN.1 expression type back into the string representation.
53 */
Lev Walkin483c14f2016-01-10 20:41:57 -080054#define ASN_EXPR_TYPE2STR(type) _asn1p_expr_type2string(type)
Lev Walkin04abdb22016-01-10 20:03:04 -080055
Lev Walkin483c14f2016-01-10 20:41:57 -080056static inline char * __attribute__((unused))
57_asn1p_expr_type2string(asn1p_expr_type_e type) {
58 assert((signed int)type >= 0);
Lev Walkin04abdb22016-01-10 20:03:04 -080059 if(type < sizeof(asn1p_expr_type2str)/sizeof(asn1p_expr_type2str[0]))
60 return asn1p_expr_type2str[type];
61 return NULL;
62}
Lev Walkinf15320b2004-06-03 03:38:44 +000063
64#endif /* ASN1_PARSER_EXPR_STR_H */