YAZ  5.23.1
z-sum.c
Go to the documentation of this file.
1 
6 #if HAVE_CONFIG_H
7 #include <config.h>
8 #endif
9 
10 #include <yaz/z-sum.h>
11 
12 int z_BriefBib(ODR o, Z_BriefBib **p, int opt, const char *name)
13 {
14  if (!odr_sequence_begin(o, p, sizeof(**p), name))
15  return odr_missing(o, opt, name) && odr_ok (o);
16  return
18  &(*p)->title, ODR_CONTEXT, 1, 0, "title") &&
20  &(*p)->author, ODR_CONTEXT, 2, 1, "author") &&
22  &(*p)->callNumber, ODR_CONTEXT, 3, 1, "callNumber") &&
24  &(*p)->recordType, ODR_CONTEXT, 4, 1, "recordType") &&
26  &(*p)->bibliographicLevel, ODR_CONTEXT, 5, 1, "bibliographicLevel") &&
28  (odr_sequence_of(o, (Odr_fun) z_FormatSpec, &(*p)->format,
29  &(*p)->num_format, "format") || odr_ok(o)) &&
31  &(*p)->publicationPlace, ODR_CONTEXT, 7, 1, "publicationPlace") &&
33  &(*p)->publicationDate, ODR_CONTEXT, 8, 1, "publicationDate") &&
35  &(*p)->targetSystemKey, ODR_CONTEXT, 9, 1, "targetSystemKey") &&
37  &(*p)->satisfyingElement, ODR_CONTEXT, 10, 1, "satisfyingElement") &&
39  &(*p)->rank, ODR_CONTEXT, 11, 1, "rank") &&
41  &(*p)->documentId, ODR_CONTEXT, 12, 1, "documentId") &&
43  &(*p)->abstract, ODR_CONTEXT, 13, 1, "abstract") &&
44  z_OtherInformation(o, &(*p)->otherInfo, 1, "otherInfo") &&
46 }
47 
48 int z_FormatSpec(ODR o, Z_FormatSpec **p, int opt, const char *name)
49 {
50  if (!odr_sequence_begin(o, p, sizeof(**p), name))
51  return odr_missing(o, opt, name) && odr_ok (o);
52  return
54  &(*p)->type, ODR_CONTEXT, 1, 0, "type") &&
56  &(*p)->size, ODR_CONTEXT, 2, 1, "size") &&
58  &(*p)->bestPosn, ODR_CONTEXT, 3, 1, "bestPosn") &&
60 }
#define odr_ok(o)
Definition: odr.h:215
#define odr_implicit_tag(o, t, p, cl, tg, opt, name)
Definition: odr.h:192
int z_OtherInformation(ODR o, Z_OtherInformation **p, int opt, const char *name)
Definition: z-core.c:1545
int odr_sequence_begin(ODR o, void *p, int size, const char *name)
Definition: odr_seq.c:15
char * name
Definition: initopt.c:18
ASN.1 Module RecordSyntax-summary.
int odr_integer(ODR o, Odr_int **p, int opt, const char *name)
Definition: odr_int.c:19
int odr_sequence_of(ODR o, Odr_fun type, void *p, int *num, const char *name)
Definition: odr_seq.c:134
int(* Odr_fun)(ODR, char **, int, const char *)
Definition: odr.h:135
int odr_missing(ODR o, int opt, const char *name)
Definition: odr_util.c:82
Definition: odr.h:124
int odr_sequence_end(ODR o)
Definition: odr_seq.c:61
int opt
Definition: initopt.c:19
int z_FormatSpec(ODR o, Z_FormatSpec **p, int opt, const char *name)
Definition: z-sum.c:48
int z_InternationalString(ODR o, Z_InternationalString **p, int opt, const char *name)
Definition: z-core.c:1598
#define ODR_CONTEXT
Definition: odr.h:67
int z_BriefBib(ODR o, Z_BriefBib **p, int opt, const char *name)
Definition: z-sum.c:12
int odr_implicit_settag(ODR o, int zclass, int tag)
Definition: odr_tag.c:32