2 * Copyright (c) 1995, Index Data.
3 * See the file LICENSE for details.
4 * Sebastian Hammer, Adam Dickmeiss
7 * Revision 1.5 1995-09-29 17:11:55 quinn
10 * Revision 1.4 1995/09/27 15:02:43 quinn
11 * Modified function heads & prototypes.
13 * Revision 1.3 1995/06/02 09:49:15 quinn
14 * Adding access control
16 * Revision 1.2 1995/06/01 14:34:53 quinn
19 * Revision 1.1 1995/06/01 11:22:17 quinn
27 /* -------------------- Resource 1 ------------------------- */
29 int z_Estimate1(ODR o, Z_Estimate1 **p, int opt)
31 if (!odr_sequence_begin(o, p, sizeof(**p)))
32 return opt && odr_ok(o);
34 odr_implicit(o, odr_integer, &(*p)->type, ODR_CONTEXT, 1, 0) &&
35 odr_implicit(o, odr_integer, &(*p)->value, ODR_CONTEXT, 2, 0) &&
36 odr_implicit(o, odr_integer, &(*p)->currencyCode, ODR_CONTEXT, 3, 1) &&
40 int z_ResourceReport1(ODR o, Z_ResourceReport1 **p, int opt)
42 if (!odr_sequence_begin(o, p, sizeof(**p)))
43 return opt && odr_ok(o);
45 odr_implicit_settag(o, ODR_CONTEXT, 1) &&
46 odr_sequence_of(o, z_Estimate1, &(*p)->estimates,
47 &(*p)->num_estimates) &&
48 odr_implicit(o, odr_visiblestring, &(*p)->message, ODR_CONTEXT, 2, 0) &&
52 /* -------------------- Resource 2 ------------------------- */
54 int z_StringOrNumeric(ODR, Z_StringOrNumeric **, int);
55 int z_IntUnit(ODR, Z_IntUnit **, int);
57 int z_Estimate2(ODR o, Z_Estimate2 **p, int opt)
59 if (!odr_sequence_begin(o, p, sizeof(**p)))
60 return opt && odr_ok(o);
62 odr_explicit(o, z_StringOrNumeric, &(*p)->type, ODR_CONTEXT, 1, 0) &&
63 odr_implicit(o, z_IntUnit, &(*p)->value, ODR_CONTEXT, 2, 0) &&
67 int z_ResourceReport2(ODR o, Z_ResourceReport2 **p, int opt)
69 if (!odr_sequence_begin(o, p, sizeof(**p)))
70 return opt && odr_ok(o);
72 odr_implicit_settag(o, ODR_CONTEXT, 1) &&
73 (odr_sequence_of(o, z_Estimate2, &(*p)->estimates,
74 &(*p)->num_estimates) || odr_ok(o)) &&
75 odr_implicit(o, odr_visiblestring, &(*p)->message, ODR_CONTEXT, 2, 1) &&