X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=asn%2Fproto.c;h=6a682ed7e2f0db5b5988cf90db5c069f17bb1bda;hb=092d47f339eb07f67dc9e8356a53af81be546737;hp=0390e50a4036d381824da94edc9cc8ced0d9b66c;hpb=ab66367f19b935a874d190bbe5b5d8f20dbf3592;p=yaz-moved-to-github.git diff --git a/asn/proto.c b/asn/proto.c index 0390e50..6a682ed 100644 --- a/asn/proto.c +++ b/asn/proto.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: proto.c,v $ - * Revision 1.44 1996-02-20 12:51:41 quinn + * Revision 1.45 1996-02-23 10:00:25 quinn + * Fixes to SCAN + * + * Revision 1.44 1996/02/20 12:51:41 quinn * Completed SCAN. Fixed problems with EXTERNAL. * * Revision 1.43 1996/02/10 12:22:49 quinn @@ -1082,7 +1085,8 @@ int z_ScanOccurrences(ODR o, Z_ScanOccurrences **p, int opt) return opt && odr_ok(o); } -int z_OccurrenceByAttributes(ODR o, Z_OccurrenceByAttributes **p, int opt) +int z_OccurrenceByAttributesElem(ODR o, Z_OccurrenceByAttributesElem **p, + int opt) { if (!odr_sequence_begin(o, p, sizeof(**p))) return opt && odr_ok(o); @@ -1094,6 +1098,17 @@ int z_OccurrenceByAttributes(ODR o, Z_OccurrenceByAttributes **p, int opt) odr_sequence_end(o); } +int z_OccurrenceByAttributes(ODR o, Z_OccurrenceByAttributes **p, int opt) +{ + if (!odr_initmember(o, p, sizeof(**p))) + return opt && odr_ok(o); + if (!odr_sequence_of(o, z_OccurrenceByAttributesElem, &(*p)->elements, + &(*p)->num_elements)) + return 1; + *p = 0; + return opt && odr_ok(o); +} + #else /*