* Sebastian Hammer, Adam Dickmeiss
*
* $Log: prt-esp.c,v $
- * Revision 1.1 1995-10-12 10:34:37 quinn
+ * Revision 1.3 1998-02-11 11:53:32 adam
+ * Changed code so that it compiles as C++.
+ *
+ * Revision 1.2 1998/02/10 15:31:46 adam
+ * Implemented date and time structure. Changed the Update Extended
+ * Service.
+ *
+ * Revision 1.1 1995/10/12 10:34:37 quinn
* Added Espec-1.
*
*
{
static Odr_arm arm[] =
{
- {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_Occurrences_all, odr_null},
- {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_Occurrences_last, odr_null},
- {ODR_IMPLICIT, ODR_CONTEXT, 3, Z_Occurrences_values, z_OccurValues},
+ {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_Occurrences_all, (Odr_fun)odr_null},
+ {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_Occurrences_last, (Odr_fun)odr_null},
+ {ODR_IMPLICIT, ODR_CONTEXT, 3, Z_Occurrences_values, (Odr_fun)z_OccurValues},
{-1, -1, -1, -1, 0}
};
if (o->direction == ODR_DECODE)
- *p = odr_malloc(o, sizeof(**p));
+ *p = (Z_Occurrences *)odr_malloc(o, sizeof(**p));
else if (!*p)
return opt;
if (odr_choice(o, arm, &(*p)->u, &(*p)->which))
if (!odr_sequence_begin(o, p, sizeof(**p)))
return opt && odr_ok(o);
return
+ odr_implicit(o, odr_oid, &(*p)->schemaId, ODR_CONTEXT, 0, 1) &&
odr_implicit(o, odr_integer, &(*p)->tagType, ODR_CONTEXT, 1, 1) &&
odr_explicit(o, z_StringOrNumeric, &(*p)->tagValue, ODR_CONTEXT,
2, 0) &&
{
static Odr_arm arm[] =
{
- {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_ETagUnit_specificTag, z_SpecificTag},
- {ODR_EXPLICIT, ODR_CONTEXT, 2, Z_ETagUnit_wildThing, z_Occurrences},
- {ODR_IMPLICIT, ODR_CONTEXT, 3, Z_ETagUnit_wildPath, odr_null},
+ {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_ETagUnit_specificTag, (Odr_fun)z_SpecificTag},
+ {ODR_EXPLICIT, ODR_CONTEXT, 2, Z_ETagUnit_wildThing, (Odr_fun)z_Occurrences},
+ {ODR_IMPLICIT, ODR_CONTEXT, 3, Z_ETagUnit_wildPath, (Odr_fun)odr_null},
{-1, -1, -1 -1, 0}
};
if (o->direction == ODR_DECODE)
- *p = odr_malloc(o, sizeof(**p));
+ *p = (Z_ETagUnit *)odr_malloc(o, sizeof(**p));
else if (!*p)
return opt;
if (odr_choice(o, arm, &(*p)->u, &(*p)->which))
int z_ETagPath(ODR o, Z_ETagPath **p, int opt)
{
if (o->direction == ODR_DECODE)
- *p = odr_malloc(o, sizeof(**p));
+ *p = (Z_ETagPath *)odr_malloc(o, sizeof(**p));
else if (!*p)
return opt;
- if (odr_sequence_of(o, z_ETagUnit, &(*p)->tags, &(*p)->num_tags))
+ if (odr_sequence_of(o, (Odr_fun)z_ETagUnit, &(*p)->tags, &(*p)->num_tags))
return 1;
*p = 0;
return opt && odr_ok(o);
int z_CompoPrimitives(ODR o, Z_CompoPrimitives **p, int opt)
{
if (o->direction == ODR_DECODE)
- *p = odr_malloc(o, sizeof(**p));
+ *p = (Z_CompoPrimitives *)odr_malloc(o, sizeof(**p));
else if (!*p)
return opt;
if (odr_sequence_of(o, z_InternationalString, &(*p)->primitives,
int z_CompoSpecs(ODR o, Z_CompoSpecs **p, int opt)
{
if (o->direction == ODR_DECODE)
- *p = odr_malloc(o, sizeof(**p));
+ *p = (Z_CompoSpecs *)odr_malloc(o, sizeof(**p));
else if (!*p)
return opt;
- if (odr_sequence_of(o, z_SimpleElement, &(*p)->specs, &(*p)->num_specs))
+ if (odr_sequence_of(o, (Odr_fun)z_SimpleElement, &(*p)->specs, &(*p)->num_specs))
return 1;
*p = 0;
return opt && odr_ok(o);
static Odr_arm arm[] =
{
{ODR_IMPLICIT, ODR_CONTEXT, 1, Z_CompoElement_primitives,
- z_CompoPrimitives},
+ (Odr_fun)z_CompoPrimitives},
{ODR_IMPLICIT, ODR_CONTEXT, 2, Z_CompoElement_specs,
- z_CompoSpecs},
+ (Odr_fun)z_CompoSpecs},
{-1, -1, -1, -1, 0}
};
static Odr_arm arm[] =
{
{ODR_IMPLICIT, ODR_CONTEXT, 1, Z_ERequest_simpleElement,
- z_SimpleElement},
+ (Odr_fun)z_SimpleElement},
{ODR_IMPLICIT, ODR_CONTEXT, 2, Z_ERequest_compositeElement,
- z_CompositeElement},
+ (Odr_fun)z_CompositeElement},
{-1, -1, -1 -1, 0}
};
if (o->direction == ODR_DECODE)
- *p = odr_malloc(o, sizeof(**p));
+ *p = (Z_ElementRequest *)odr_malloc(o, sizeof(**p));
else if (!*p)
return opt;
if (odr_choice(o, arm, &(*p)->u, &(*p)->which))
odr_implicit(o, odr_integer, &(*p)->defaultTagType, ODR_CONTEXT,
4, 1) &&
odr_implicit_settag(o, ODR_CONTEXT, 5) &&
- (odr_sequence_of(o, z_ElementRequest, &(*p)->elements,
+ (odr_sequence_of(o, (Odr_fun)z_ElementRequest, &(*p)->elements,
&(*p)->num_elements) || odr_ok(o)) &&
odr_sequence_end(o);
}