2 * Copyright (c) 1995, Index Data
3 * See the file LICENSE for details.
4 * Sebastian Hammer, Adam Dickmeiss
7 * Revision 1.7 1995-09-29 17:12:27 quinn
10 * Revision 1.6 1995/09/27 15:03:00 quinn
11 * Modified function heads & prototypes.
13 * Revision 1.5 1995/08/10 08:54:47 quinn
16 * Revision 1.4 1995/06/16 13:16:12 quinn
17 * Fixed Defaultdiagformat.
19 * Revision 1.3 1995/05/16 08:51:00 quinn
20 * License, documentation, and memory fixes
22 * Revision 1.2 1995/02/09 15:51:50 quinn
25 * Revision 1.1 1995/02/03 17:04:39 quinn
33 int odr_external(ODR o, Odr_external **p, int opt)
36 static Odr_arm arm[] =
38 {ODR_EXPLICIT, ODR_CONTEXT, 0, ODR_EXTERNAL_single, odr_any},
39 {ODR_IMPLICIT, ODR_CONTEXT, 1, ODR_EXTERNAL_octet, odr_octetstring},
40 {ODR_IMPLICIT, ODR_CONTEXT, 2, ODR_EXTERNAL_arbitrary, odr_bitstring},
44 odr_implicit_settag(o, ODR_UNIVERSAL, ODR_EXTERNAL);
45 if (!odr_sequence_begin(o, p, sizeof(Odr_external)))
49 odr_oid(o, &pp->direct_reference, 1) &&
50 odr_integer(o, &pp->indirect_reference, 1) &&
51 odr_graphicstring(o, &pp->descriptor, 1) &&
52 odr_choice(o, arm, &pp->u, &pp->which) &&
56 int odr_visiblestring(ODR o, char **p, int opt)
58 return odr_implicit(o, odr_cstring, p, ODR_UNIVERSAL, ODR_VISIBLESTRING,
63 * a char may not be sufficient to hold a general string, but we'll deal
64 * with that once we start looking more closely at UniCode & co.
66 int odr_generalstring(ODR o, char **p, int opt)
68 return odr_implicit(o, odr_cstring, p, ODR_UNIVERSAL, ODR_GENERALSTRING,
72 int odr_graphicstring(ODR o, char **p, int opt)
74 return odr_implicit(o, odr_cstring, p, ODR_UNIVERSAL, ODR_GRAPHICSTRING,
78 int odr_generalizedtime(ODR o, char **p, int opt)
80 return odr_implicit(o, odr_cstring, p, ODR_UNIVERSAL, ODR_GENERALIZEDTIME,