2 * Copyright (c) 1995, Index Data.
3 * See the file LICENSE for details.
4 * Sebastian Hammer, Adam Dickmeiss
7 * Revision 1.2 1995-06-01 14:34:53 quinn
10 * Revision 1.1 1995/06/01 11:22:17 quinn
18 /* -------------------- Resource 1 ------------------------- */
20 int z_Estimate1(ODR o, Z_Estimate1, int opt)
22 if (!odr_sequence_begin(o, p, sizeof(**p)))
23 return opt && odr_ok(o);
25 odr_implicit(o, odr_integer, &(*p)->type, ODR_CONTEXT, 1, 0) &&
26 odr_implicit(o, odr_integer, &(*p)->value, ODR_CONTEXT, 2, 0) &&
27 odr_implicit(o, odr_integer, &(*p)->currencyCode, ODR_CONTEXT, 3, 1) &&
31 int z_ResourceReport1(ODR o, Z_ResourceReport1 **p, int opt)
33 if (!odr_sequence_begin(o, p, sizeof(**p)))
34 return opt && odr_ok(o);
36 odr_implicit_settag(o, ODR_CONTEXT, 1) &&
37 odr_sequence_of(o, z_Estimate1, &(*p)->estimates,
38 &(*p)->num_estimates) &&
39 odr_implicit(o, odr_visiblestring, &(*p)->message, ODR_CONTEXT, 2, 0) &&
43 /* -------------------- Resource 2 ------------------------- */
45 int z_Estimate2(ODR o, Z_Estimate2 **p, int opt)
47 if (!odr_sequence_begin(o, p, sizeof(**p)))
48 return opt && odr_ok(o);
50 odr_implicit(o, z_StringorNumeric, &(*p)->type, ODR_CONTEXT, 1, 0) &&
51 odr_implicit(o, z_IntUnit, &(*p)->value, ODR_CONTEXT, 2, 0) &&
55 int z_ResourceReport2(ODR o, Z_ResourceReport2 **p, int opt)
57 if (!odr_sequence_begin(o, p, sizeof(**p)))
58 return opt && odr_ok(o);
60 odr_implicit_settag(o, ODR_CONTEXT, 1) &&
61 (odr_sequence_of(o, z_Estimate2, &(*p)->estimates,
62 &(*p)->num_estimates) || odr_ok(o)) &&
63 odr_implicit(o, odr_visiblestring, &(*p)->message, ODR_CONTEXT, 2, 1) &&