~ubuntu-branches/ubuntu/dapper/asn1c/dapper

« back to all changes in this revision

Viewing changes to libasn1parser/asn1p_expr_str.h

  • Committer: Bazaar Package Importer
  • Author(s): W. Borgert
  • Date: 2005-05-28 12:36:42 UTC
  • Revision ID: james.westby@ubuntu.com-20050528123642-3h6kstws5u0xcovl
Tags: upstream-0.9.14
ImportĀ upstreamĀ versionĀ 0.9.14

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
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
 
 
8
#ifndef __GNUC__
 
9
#define __attribute__(x)        /* unused */
 
10
#endif
 
11
 
 
12
static char *asn1p_expr_type2str[] __attribute__ ((unused)) = {
 
13
        [ ASN_CONSTR_SEQUENCE ]  = "SEQUENCE",
 
14
        [ ASN_CONSTR_CHOICE ]    = "CHOICE",
 
15
        [ ASN_CONSTR_SET ]       = "SET",
 
16
        [ ASN_CONSTR_SEQUENCE_OF ]       = "SEQUENCE OF",
 
17
        [ ASN_CONSTR_SET_OF ]    = "SET OF",
 
18
        [ ASN_TYPE_ANY ]         = "ANY",
 
19
        [ ASN_BASIC_BOOLEAN ]    = "BOOLEAN",
 
20
        [ ASN_BASIC_NULL ]       = "NULL",
 
21
        [ ASN_BASIC_INTEGER ]    = "INTEGER",
 
22
        [ ASN_BASIC_REAL ]       = "REAL",
 
23
        [ ASN_BASIC_ENUMERATED ]         = "ENUMERATED",
 
24
        [ ASN_BASIC_BIT_STRING ]         = "BIT STRING",
 
25
        [ ASN_BASIC_OCTET_STRING ]       = "OCTET STRING",
 
26
        [ ASN_BASIC_OBJECT_IDENTIFIER ]  = "OBJECT IDENTIFIER",
 
27
        [ ASN_BASIC_RELATIVE_OID ]       = "RELATIVE-OID",
 
28
        [ ASN_BASIC_EXTERNAL ]   = "EXTERNAL",
 
29
        [ ASN_BASIC_EMBEDDED_PDV ]       = "EMBEDDED PDV",
 
30
        [ ASN_BASIC_CHARACTER_STRING ]   = "CHARACTER STRING",
 
31
        [ ASN_BASIC_UTCTime ]    = "UTCTime",
 
32
        [ ASN_BASIC_GeneralizedTime ]    = "GeneralizedTime",
 
33
        [ ASN_STRING_IA5String ]         = "IA5String",
 
34
        [ ASN_STRING_PrintableString ]   = "PrintableString",
 
35
        [ ASN_STRING_VisibleString ]     = "VisibleString",
 
36
        [ ASN_STRING_ISO646String ]      = "ISO646String",
 
37
        [ ASN_STRING_NumericString ]     = "NumericString",
 
38
        [ ASN_STRING_UniversalString ]   = "UniversalString",
 
39
        [ ASN_STRING_BMPString ]         = "BMPString",
 
40
        [ ASN_STRING_UTF8String ]        = "UTF8String",
 
41
        [ ASN_STRING_GeneralString ]     = "GeneralString",
 
42
        [ ASN_STRING_GraphicString ]     = "GraphicString",
 
43
        [ ASN_STRING_TeletexString ]     = "TeletexString",
 
44
        [ ASN_STRING_T61String ]         = "T61String",
 
45
        [ ASN_STRING_VideotexString ]    = "VideotexString",
 
46
        [ ASN_STRING_ObjectDescriptor ]  = "ObjectDescriptor",
 
47
};
 
48
 
 
49
/*
 
50
 * Convert the ASN.1 expression type back into the string representation.
 
51
 */
 
52
#define ASN_EXPR_TYPE2STR(type)                                 \
 
53
        (                                                       \
 
54
        (((ssize_t)(type)) < 0                                  \
 
55
        || ((size_t)(type)) >= sizeof(asn1p_expr_type2str)      \
 
56
                / sizeof(asn1p_expr_type2str[0]))               \
 
57
                ? (char *)0                                     \
 
58
                : asn1p_expr_type2str[(int)(type)]              \
 
59
        )
 
60
 
 
61
#endif  /* ASN1_PARSER_EXPR_STR_H */