2 * Copyright (c) 1998, Index Data.
3 * See the file LICENSE for details.
4 * Sebastian Hammer, Adam Dickmeiss
7 * Revision 1.1 1998-03-20 14:46:06 adam
8 * Added UNIverse Resource Reports.
14 /* YC 0.1 Fri Mar 20 14:28:54 CET 1998 */
15 /* Module-C: ResourceReport-Format-Universe-1 */
17 int z_UniverseReportHits (ODR o, Z_UniverseReportHits **p, int opt)
19 if (!odr_sequence_begin (o, p, sizeof(**p)))
20 return opt && odr_ok (o);
22 z_StringOrNumeric(o, &(*p)->database, 0) &&
23 z_StringOrNumeric(o, &(*p)->hits, 0) &&
27 int z_UniverseReportDuplicate (ODR o, Z_UniverseReportDuplicate **p, int opt)
29 if (!odr_sequence_begin (o, p, sizeof(**p)))
30 return opt && odr_ok (o);
32 z_StringOrNumeric(o, &(*p)->hitno, 0) &&
36 int z_UniverseReport (ODR o, Z_UniverseReport **p, int opt)
38 static Odr_arm arm[] = {
39 {ODR_IMPLICIT, ODR_CONTEXT, 0, Z_UniverseReport_databaseHits,
40 (Odr_fun) z_UniverseReportHits},
41 {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_UniverseReport_duplicate,
42 (Odr_fun) z_UniverseReportDuplicate},
43 {-1, -1, -1, -1, (Odr_fun) 0}
45 if (!odr_sequence_begin (o, p, sizeof(**p)))
46 return opt && odr_ok (o);
48 odr_integer(o, &(*p)->totalHits, 0) &&
49 odr_choice (o, arm, &(*p)->u, &(*p)->which) &&