X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=asn%2Fprt-rsc.c;h=f7fe7b651307195addf7d0039d1193a51d460835;hb=3060b77b776350c6e677c06b3070542dba5c42b6;hp=c548d168dcc9207c408a170fd47e7fdbe591b324;hpb=4b449e2e477bc6feca0b83ce8e8e0bbc205c7e4a;p=yaz-moved-to-github.git diff --git a/asn/prt-rsc.c b/asn/prt-rsc.c index c548d16..f7fe7b6 100644 --- a/asn/prt-rsc.c +++ b/asn/prt-rsc.c @@ -4,7 +4,22 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: prt-rsc.c,v $ - * Revision 1.1 1995-06-01 11:22:17 quinn + * Revision 1.6 1998-02-11 11:53:32 adam + * Changed code so that it compiles as C++. + * + * Revision 1.5 1995/09/29 17:11:55 quinn + * Smallish + * + * Revision 1.4 1995/09/27 15:02:43 quinn + * Modified function heads & prototypes. + * + * Revision 1.3 1995/06/02 09:49:15 quinn + * Adding access control + * + * Revision 1.2 1995/06/01 14:34:53 quinn + * Work + * + * Revision 1.1 1995/06/01 11:22:17 quinn * Resource control * * @@ -14,7 +29,7 @@ /* -------------------- Resource 1 ------------------------- */ -int z_Estimate1(ODR o, Z_Estimate1, int opt) +int z_Estimate1(ODR o, Z_Estimate1 **p, int opt) { if (!odr_sequence_begin(o, p, sizeof(**p))) return opt && odr_ok(o); @@ -22,7 +37,7 @@ int z_Estimate1(ODR o, Z_Estimate1, int opt) odr_implicit(o, odr_integer, &(*p)->type, ODR_CONTEXT, 1, 0) && odr_implicit(o, odr_integer, &(*p)->value, ODR_CONTEXT, 2, 0) && odr_implicit(o, odr_integer, &(*p)->currencyCode, ODR_CONTEXT, 3, 1) && - odr_sequence-end(o); + odr_sequence_end(o); } int z_ResourceReport1(ODR o, Z_ResourceReport1 **p, int opt) @@ -31,11 +46,37 @@ int z_ResourceReport1(ODR o, Z_ResourceReport1 **p, int opt) return opt && odr_ok(o); return odr_implicit_settag(o, ODR_CONTEXT, 1) && - odr_sequence_of(o, z_Estimate1, &(*p)->estimates, + odr_sequence_of(o, (Odr_fun)z_Estimate1, &(*p)->estimates, &(*p)->num_estimates) && odr_implicit(o, odr_visiblestring, &(*p)->message, ODR_CONTEXT, 2, 0) && odr_sequence_end(o); } -/* -------------------- Resource 1 ------------------------- */ +/* -------------------- Resource 2 ------------------------- */ + +int z_StringOrNumeric(ODR, Z_StringOrNumeric **, int); +int z_IntUnit(ODR, Z_IntUnit **, int); + +int z_Estimate2(ODR o, Z_Estimate2 **p, int opt) +{ + if (!odr_sequence_begin(o, p, sizeof(**p))) + return opt && odr_ok(o); + return + odr_explicit(o, z_StringOrNumeric, &(*p)->type, ODR_CONTEXT, 1, 0) && + odr_implicit(o, z_IntUnit, &(*p)->value, ODR_CONTEXT, 2, 0) && + odr_sequence_end(o); +} + +int z_ResourceReport2(ODR o, Z_ResourceReport2 **p, int opt) +{ +if (!odr_sequence_begin(o, p, sizeof(**p))) + return opt && odr_ok(o); +return + odr_implicit_settag(o, ODR_CONTEXT, 1) && + (odr_sequence_of(o, (Odr_fun)z_Estimate2, &(*p)->estimates, + &(*p)->num_estimates) || odr_ok(o)) && + odr_implicit(o, odr_visiblestring, &(*p)->message, ODR_CONTEXT, 2, 1) && + odr_sequence_end(o); +} +