X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=asn%2Fprt-exd.c;h=05de183d52dad24cd4cffaf164183556b488803e;hp=085d09c79814aa6f15ba74a362d380758b2c6502;hb=c71d717ada2a9ef730d527f161eb5ba9aa641a9f;hpb=fa86345c14168c451f8c76b71309b27230bfee44 diff --git a/asn/prt-exd.c b/asn/prt-exd.c index 085d09c..05de183 100644 --- a/asn/prt-exd.c +++ b/asn/prt-exd.c @@ -1,10 +1,23 @@ /* - * Copyright (c) 1995-1998, Index Data. + * Copyright (c) 1995-1999, Index Data. * See the file LICENSE for details. * Sebastian Hammer, Adam Dickmeiss * * $Log: prt-exd.c,v $ - * Revision 1.7 1998-02-10 15:31:46 adam + * Revision 1.11 1999-11-30 13:47:11 adam + * Improved installation. Moved header files to include/yaz. + * + * Revision 1.10 1999/05/26 13:49:12 adam + * DB Update implemented in client (very basic). + * + * Revision 1.9 1999/04/20 09:56:48 adam + * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun). + * Modified all encoders/decoders to reflect this change. + * + * Revision 1.8 1998/02/11 11:53:32 adam + * Changed code so that it compiles as C++. + * + * Revision 1.7 1998/02/10 15:31:46 adam * Implemented date and time structure. Changed the Update Extended * Service. * @@ -29,41 +42,42 @@ * */ -#include +#include -int z_TaskPackage(ODR o, Z_TaskPackage **p, int opt) +int z_TaskPackage(ODR o, Z_TaskPackage **p, int opt, const char *name) { - if (!odr_sequence_begin(o, p, sizeof(**p))) + if (!odr_sequence_begin(o, p, sizeof(**p), 0)) return opt && odr_ok(o); return odr_implicit(o, odr_oid, &(*p)->packageType, ODR_CONTEXT, 1, 0) && - odr_implicit(o, z_InternationalString, &(*p)->packageName, ODR_CONTEXT, - 2, 1) && - odr_implicit(o, z_InternationalString, &(*p)->userId, ODR_CONTEXT, - 3, 1) && + odr_implicit(o, z_InternationalString, &(*p)->packageName, + ODR_CONTEXT, 2, 1) && + odr_implicit(o, z_InternationalString, &(*p)->userId, + ODR_CONTEXT, 3, 1) && odr_implicit(o, z_IntUnit, &(*p)->retentionTime, ODR_CONTEXT, 4, 1) && - odr_implicit(o, z_Permissions, &(*p)->permissions, ODR_CONTEXT, 5, 1) && - odr_implicit(o, z_InternationalString, &(*p)->description, ODR_CONTEXT, - 6, 1) && - odr_implicit(o, odr_octetstring, &(*p)->targetReference, ODR_CONTEXT, - 7, 0) && + odr_implicit(o, z_Permissions, &(*p)->permissions, + ODR_CONTEXT, 5, 1) && + odr_implicit(o, z_InternationalString, &(*p)->description, + ODR_CONTEXT, 6, 1) && + odr_implicit(o, odr_octetstring, &(*p)->targetReference, + ODR_CONTEXT, 7, 0) && odr_implicit(o, odr_generalizedtime, &(*p)->creationDateTime, - ODR_CONTEXT, - 8, 1) && - odr_implicit(o, odr_integer, &(*p)->taskStatus, ODR_CONTEXT, 9, 0) && + ODR_CONTEXT, 8, 1) && + odr_implicit(o, odr_integer, &(*p)->taskStatus, + ODR_CONTEXT, 9, 0) && odr_implicit_settag(o, ODR_CONTEXT, 10) && - (odr_sequence_of(o, z_DiagRec, &(*p)->packageDiagnostics, - &(*p)->num_packageDiagnostics) || odr_ok(o)) && - odr_implicit(o, z_External, &(*p)->taskSpecificParameters, ODR_CONTEXT, - 11, 0) && + (odr_sequence_of(o, (Odr_fun)z_DiagRec, &(*p)->packageDiagnostics, + &(*p)->num_packageDiagnostics, 0) || odr_ok(o)) && + odr_implicit(o, z_External, &(*p)->taskSpecificParameters, + ODR_CONTEXT, 11, 0) && odr_sequence_end(o); } /* ----------------------- ITEM ORDER --------------------- */ -int z_IOTargetPart(ODR o, Z_IOTargetPart **p, int opt) +int z_IOTargetPart(ODR o, Z_IOTargetPart **p, int opt, const char *name) { - if (!odr_sequence_begin(o, p, sizeof(**p))) + if (!odr_sequence_begin(o, p, sizeof(**p), 0)) return opt && odr_ok(o); return odr_implicit(o, z_External, &(*p)->itemRequest, ODR_CONTEXT, 1, 1) && @@ -74,9 +88,9 @@ int z_IOTargetPart(ODR o, Z_IOTargetPart **p, int opt) odr_sequence_end(o); } -int z_IOResultSetItem(ODR o, Z_IOResultSetItem **p, int opt) +int z_IOResultSetItem(ODR o, Z_IOResultSetItem **p, int opt, const char *name) { - if (!odr_sequence_begin(o, p, sizeof(**p))) + if (!odr_sequence_begin(o, p, sizeof(**p), 0)) return opt && odr_ok(o); return odr_implicit(o, z_InternationalString, &(*p)->resultSetId, ODR_CONTEXT, @@ -85,9 +99,10 @@ int z_IOResultSetItem(ODR o, Z_IOResultSetItem **p, int opt) odr_sequence_end(o); } -int z_IOOriginPartNotToKeep(ODR o, Z_IOOriginPartNotToKeep **p, int opt) +int z_IOOriginPartNotToKeep(ODR o, Z_IOOriginPartNotToKeep **p, int opt, + const char *name) { - if (!odr_sequence_begin(o, p, sizeof(**p))) + if (!odr_sequence_begin(o, p, sizeof(**p), 0)) return opt && odr_ok(o); return odr_implicit(o, z_IOResultSetItem, &(*p)->resultSetItem, ODR_CONTEXT, @@ -96,9 +111,9 @@ int z_IOOriginPartNotToKeep(ODR o, Z_IOOriginPartNotToKeep **p, int opt) odr_sequence_end(o); } -int z_IOContact(ODR o, Z_IOContact **p, int opt) +int z_IOContact(ODR o, Z_IOContact **p, int opt, const char *name) { - if (!odr_sequence_begin(o, p, sizeof(**p))) + if (!odr_sequence_begin(o, p, sizeof(**p), 0)) return opt && odr_ok(o); return odr_implicit(o, z_InternationalString, &(*p)->name, ODR_CONTEXT, @@ -110,9 +125,10 @@ int z_IOContact(ODR o, Z_IOContact **p, int opt) odr_sequence_end(o); } -int z_IOCreditCardInfo(ODR o, Z_IOCreditCardInfo **p, int opt) +int z_IOCreditCardInfo(ODR o, Z_IOCreditCardInfo **p, int opt, + const char *name) { - if (!odr_sequence_begin(o, p, sizeof(**p))) + if (!odr_sequence_begin(o, p, sizeof(**p), 0)) return opt && odr_ok(o); return odr_implicit(o, z_InternationalString, &(*p)->nameOnCard, ODR_CONTEXT, @@ -124,88 +140,95 @@ int z_IOCreditCardInfo(ODR o, Z_IOCreditCardInfo **p, int opt) odr_sequence_end(o); } -int z_IOBilling(ODR o, Z_IOBilling **p, int opt) +int z_IOBilling(ODR o, Z_IOBilling **p, int opt, const char *name) { static Odr_arm arm[] = { - {ODR_IMPLICIT, ODR_CONTEXT, 0, Z_IOBilling_billInvoice, odr_null}, - {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_IOBilling_prepay, odr_null}, - {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_IOBilling_depositAccount, odr_null}, + {ODR_IMPLICIT, ODR_CONTEXT, 0, Z_IOBilling_billInvoice, + (Odr_fun)odr_null, 0}, + {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_IOBilling_prepay, + (Odr_fun)odr_null, 0}, + {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_IOBilling_depositAccount, + (Odr_fun)odr_null, 0}, {ODR_IMPLICIT, ODR_CONTEXT, 3, Z_IOBilling_creditCard, - z_IOCreditCardInfo}, + (Odr_fun)z_IOCreditCardInfo, 0}, {ODR_IMPLICIT, ODR_CONTEXT, 4, Z_IOBilling_cardInfoPreviouslySupplied, - odr_null}, - {ODR_IMPLICIT, ODR_CONTEXT, 5, Z_IOBilling_privateKnown, odr_null}, + (Odr_fun)odr_null, 0}, + {ODR_IMPLICIT, ODR_CONTEXT, 5, Z_IOBilling_privateKnown, + (Odr_fun)odr_null, 0}, {ODR_IMPLICIT, ODR_CONTEXT, 6, Z_IOBilling_privateNotKnown, - z_External}, - {-1, -1, -1, -1, 0} + (Odr_fun)z_External, 0}, + {-1, -1, -1, -1, 0, 0} }; - - if (!odr_sequence_begin(o, p, sizeof(**p))) + + if (!odr_sequence_begin(o, p, sizeof(**p), 0)) return opt && odr_ok(o); return odr_constructed_begin(o, &(*p)->paymentMethod, - ODR_CONTEXT, 1) && - odr_choice(o, arm, &(*p)->paymentMethod, &(*p)->which) && + ODR_CONTEXT, 1, 0) && + odr_choice(o, arm, &(*p)->paymentMethod, &(*p)->which, 0) && odr_constructed_end(o) && odr_implicit(o, z_InternationalString, &(*p)->customerReference, - ODR_CONTEXT, 2, 1) && + ODR_CONTEXT, 2, 1) && odr_implicit(o, z_InternationalString, &(*p)->customerPONumber, - ODR_CONTEXT, 3, 1) && + ODR_CONTEXT, 3, 1) && odr_sequence_end(o); } -int z_IOOriginPartToKeep(ODR o, Z_IOOriginPartToKeep **p, int opt) +int z_IOOriginPartToKeep(ODR o, Z_IOOriginPartToKeep **p, int opt, + const char *name) { - if (!odr_sequence_begin(o, p, sizeof(**p))) + if (!odr_sequence_begin(o, p, sizeof(**p), 0)) return opt && odr_ok(o); return - odr_implicit(o, z_External, &(*p)->supplDescription, ODR_CONTEXT, - 1, 1) && + odr_implicit(o, z_External, &(*p)->supplDescription, + ODR_CONTEXT, 1, 1) && odr_implicit(o, z_IOContact, &(*p)->contact, ODR_CONTEXT, 2, 1) && - odr_implicit(o, z_IOBilling, &(*p)->addlBilling, ODR_CONTEXT, - 3, 1) && + odr_implicit(o, z_IOBilling, &(*p)->addlBilling, + ODR_CONTEXT, 3, 1) && odr_sequence_end(o); } -int z_IORequest(ODR o, Z_IORequest **p, int opt) +int z_IORequest(ODR o, Z_IORequest **p, int opt, const char *name) { - if (!odr_sequence_begin(o, p, sizeof(**p))) + if (!odr_sequence_begin(o, p, sizeof(**p), 0)) return opt && odr_ok(o); return - odr_implicit(o, z_IOOriginPartToKeep, &(*p)->toKeep, ODR_CONTEXT, - 1, 1) && - odr_implicit(o, z_IOOriginPartNotToKeep, &(*p)->notToKeep, ODR_CONTEXT, - 2, 0) && + odr_implicit(o, z_IOOriginPartToKeep, &(*p)->toKeep, + ODR_CONTEXT, 1, 1) && + odr_implicit(o, z_IOOriginPartNotToKeep, &(*p)->notToKeep, + ODR_CONTEXT, 2, 0) && odr_sequence_end(o); } -int z_IOTaskPackage(ODR o, Z_IOTaskPackage **p, int opt) +int z_IOTaskPackage(ODR o, Z_IOTaskPackage **p, int opt, const char *name) { - if (!odr_sequence_begin(o, p, sizeof(**p))) + if (!odr_sequence_begin(o, p, sizeof(**p), 0)) return opt && odr_ok(o); return - odr_implicit(o, z_IOOriginPartToKeep, &(*p)->originPart, ODR_CONTEXT, - 1, 1) && - odr_implicit(o, z_IOTargetPart, &(*p)->targetPart, ODR_CONTEXT, 2, 0) && + odr_implicit(o, z_IOOriginPartToKeep, &(*p)->originPart, + ODR_CONTEXT, 1, 1) && + odr_implicit(o, z_IOTargetPart, &(*p)->targetPart, + ODR_CONTEXT, 2, 0) && odr_sequence_end(o); } -int z_ItemOrder(ODR o, Z_ItemOrder **p, int opt) +int z_ItemOrder(ODR o, Z_ItemOrder **p, int opt, const char *name) { static Odr_arm arm[] = { - {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_ItemOrder_esRequest, z_IORequest}, + {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_ItemOrder_esRequest, + (Odr_fun)z_IORequest, 0}, {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_ItemOrder_taskPackage, - z_IOTaskPackage}, - {-1, -1, -1, -1, 0} + (Odr_fun)z_IOTaskPackage, 0}, + {-1, -1, -1, -1, 0, 0} }; - + if (o->direction == ODR_DECODE) - *p = odr_malloc(o, sizeof(**p)); + *p = (Z_ItemOrder *)odr_malloc(o, sizeof(**p)); else if (!*p) return opt; - if (odr_choice(o, arm, &(*p)->u, &(*p)->which)) + if (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0)) return 1; *p = 0; return opt && odr_ok(o); @@ -213,169 +236,178 @@ int z_ItemOrder(ODR o, Z_ItemOrder **p, int opt) /* ----------------------- ITEM UPDATE -------------------- */ -int z_IUSuppliedRecordsId (ODR o, Z_IUSuppliedRecordsId **p, int opt) +int z_IUSuppliedRecordsId (ODR o, Z_IUSuppliedRecordsId **p, int opt, + const char *name) { static Odr_arm arm[] = { {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_IUSuppliedRecordsId_timeStamp, - odr_generalizedtime}, + odr_generalizedtime, 0}, {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_IUSuppliedRecordsId_versionNumber, - z_InternationalString}, + z_InternationalString, 0}, {ODR_IMPLICIT, ODR_CONTEXT, 3, Z_IUSuppliedRecordsId_previousVersion, - odr_external}, - {-1, -1, -1, -1, 0} + (Odr_fun)odr_external, 0}, + {-1, -1, -1, -1, 0, 0} }; if (!odr_initmember(o, p, sizeof(**p))) return opt && odr_ok(o); - if (odr_choice(o, arm, &(*p)->u, &(*p)->which)) + if (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0)) return 1; *p = 0; return opt && odr_ok(o); } -int z_IUCorrelationInfo (ODR o, Z_IUCorrelationInfo **p, int opt) +int z_IUCorrelationInfo (ODR o, Z_IUCorrelationInfo **p, int opt, + const char *name) { - if (!odr_sequence_begin (o, p, sizeof(**p))) + if (!odr_sequence_begin (o, p, sizeof(**p), 0)) return opt && odr_ok (o); return odr_implicit (o, z_InternationalString, - &(*p)->note, ODR_CONTEXT, 1, 1) && + &(*p)->note, ODR_CONTEXT, 1, 1) && odr_implicit (o, odr_integer, - &(*p)->id, ODR_CONTEXT, 2, 1) && + &(*p)->id, ODR_CONTEXT, 2, 1) && odr_sequence_end (o); } -int z_IUSuppliedRecords_elem (ODR o, Z_IUSuppliedRecords_elem **p, int opt) +int z_IUSuppliedRecords_elem (ODR o, Z_IUSuppliedRecords_elem **p, int opt, + const char *name) { static Odr_arm arm[] = { {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_IUSuppliedRecords_number, - odr_integer}, + (Odr_fun)odr_integer, 0}, {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_IUSuppliedRecords_string, - z_InternationalString}, + (Odr_fun)z_InternationalString, 0}, {ODR_IMPLICIT, ODR_CONTEXT, 3, Z_IUSuppliedRecords_opaque, - odr_octetstring}, - {-1, -1, -1, -1, 0} + (Odr_fun)odr_octetstring, 0}, + {-1, -1, -1, -1, 0, 0} }; - if (!odr_sequence_begin (o, p, sizeof(**p))) + if (!odr_sequence_begin (o, p, sizeof(**p), 0)) return opt && odr_ok (o); return - ((odr_constructed_begin (o, &(*p)->u, ODR_CONTEXT, 1) && - odr_choice (o, arm, &(*p)->u, &(*p)->which) && - odr_constructed_end (o)) || odr_ok(o)) && + ((odr_constructed_begin (o, &(*p)->u, ODR_CONTEXT, 1, 0) && + odr_choice (o, arm, &(*p)->u, &(*p)->which, 0) && + odr_constructed_end (o)) || odr_ok(o)) && odr_explicit (o, z_IUSuppliedRecordsId, - &(*p)->supplementalId, ODR_CONTEXT, 2, 1) && + &(*p)->supplementalId, ODR_CONTEXT, 2, 1) && odr_implicit (o, z_IUCorrelationInfo, - &(*p)->correlationInfo, ODR_CONTEXT, 3, 1) && - odr_implicit (o, odr_external, - &(*p)->record, ODR_CONTEXT, 4, 0) && + &(*p)->correlationInfo, ODR_CONTEXT, 3, 1) && + odr_implicit (o, z_External, + &(*p)->record, ODR_CONTEXT, 4, 0) && odr_sequence_end (o); } -int z_IUSuppliedRecords (ODR o, Z_IUSuppliedRecords **p, int opt) +int z_IUSuppliedRecords (ODR o, Z_IUSuppliedRecords **p, int opt, + const char *name) { if (!odr_initmember (o, p, sizeof(**p))) return opt && odr_ok(o); - if (odr_sequence_of (o, z_IUSuppliedRecords_elem, &(*p)->elements, - &(*p)->num)) + if (odr_sequence_of (o, (Odr_fun)z_IUSuppliedRecords_elem, &(*p)->elements, + &(*p)->num, 0)) return 1; *p = 0; return opt && odr_ok(o); } int z_IUTaskPackageRecordStructure (ODR o, Z_IUTaskPackageRecordStructure **p, - int opt) + int opt, const char *name) { static Odr_arm arm[] = { {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_IUTaskPackageRecordStructure_record, - odr_external}, - {ODR_EXPLICIT, ODR_CONTEXT, 2, Z_IUTaskPackageRecordStructure_surrogateDiagnostics, - z_DiagRecs}, - {-1, -1, -1, -1, 0} + (Odr_fun)odr_external, 0}, + {ODR_EXPLICIT, ODR_CONTEXT, 2, + Z_IUTaskPackageRecordStructure_surrogateDiagnostics, + (Odr_fun)z_DiagRecs, 0}, + {-1, -1, -1, -1, 0, 0} }; - if (!odr_sequence_begin (o, p, sizeof(**p))) + if (!odr_sequence_begin (o, p, sizeof(**p), 0)) return opt && odr_ok (o); return - ((odr_constructed_begin (o, &(*p)->u, ODR_CONTEXT, 1) && - odr_choice (o, arm, &(*p)->u, &(*p)->which) && - odr_constructed_end (o)) || odr_ok(o)) && + ((odr_constructed_begin (o, &(*p)->u, ODR_CONTEXT, 1, 0) && + odr_choice (o, arm, &(*p)->u, &(*p)->which, 0) && + odr_constructed_end (o)) || odr_ok(o)) && odr_implicit (o, z_IUCorrelationInfo, - &(*p)->correlationInfo, ODR_CONTEXT, 2, 1) && + &(*p)->correlationInfo, ODR_CONTEXT, 2, 1) && odr_implicit (o, odr_integer, - &(*p)->recordStatus, ODR_CONTEXT, 3, 0) && + &(*p)->recordStatus, ODR_CONTEXT, 3, 0) && odr_implicit (o, z_DiagRecs, - &(*p)->supplementalDiagnostics, ODR_CONTEXT, 4, 1) && + &(*p)->supplementalDiagnostics, ODR_CONTEXT, 4, 1) && odr_sequence_end (o); } -int z_IUOriginPartToKeep (ODR o, Z_IUOriginPartToKeep **p, int opt) +int z_IUOriginPartToKeep (ODR o, Z_IUOriginPartToKeep **p, int opt, + const char *name) { - if (!odr_sequence_begin (o, p, sizeof(**p))) + if (!odr_sequence_begin (o, p, sizeof(**p), 0)) return opt && odr_ok (o); return odr_implicit (o, odr_integer, - &(*p)->action, ODR_CONTEXT, 1, 0) && + &(*p)->action, ODR_CONTEXT, 1, 0) && odr_implicit (o, z_InternationalString, - &(*p)->databaseName, ODR_CONTEXT, 2, 0) && + &(*p)->databaseName, ODR_CONTEXT, 2, 0) && odr_implicit (o, odr_oid, - &(*p)->schema, ODR_CONTEXT, 3, 1) && + &(*p)->schema, ODR_CONTEXT, 3, 1) && odr_implicit (o, z_InternationalString, - &(*p)->elementSetName, ODR_CONTEXT, 4, 1) && + &(*p)->elementSetName, ODR_CONTEXT, 4, 1) && odr_implicit (o, odr_external, - &(*p)->actionQualifier, ODR_CONTEXT, 5, 1) && + &(*p)->actionQualifier, ODR_CONTEXT, 5, 1) && odr_sequence_end (o); } -int z_IUTargetPart (ODR o, Z_IUTargetPart **p, int opt) +int z_IUTargetPart (ODR o, Z_IUTargetPart **p, int opt, const char *name) { - if (!odr_sequence_begin (o, p, sizeof(**p))) + if (!odr_sequence_begin (o, p, sizeof(**p), 0)) return opt && odr_ok (o); return odr_implicit (o, odr_integer, - &(*p)->updateStatus, ODR_CONTEXT, 1, 0) && + &(*p)->updateStatus, ODR_CONTEXT, 1, 0) && odr_implicit_settag (o, ODR_CONTEXT, 2) && - (odr_sequence_of(o, z_DiagRec, &(*p)->globalDiagnostics, - &(*p)->num_globalDiagnostics) || odr_ok(o)) && + (odr_sequence_of(o, (Odr_fun)z_DiagRec, &(*p)->globalDiagnostics, + &(*p)->num_globalDiagnostics, 0) || odr_ok(o)) && odr_implicit_settag (o, ODR_CONTEXT, 3) && - odr_sequence_of(o, z_IUTaskPackageRecordStructure, &(*p)->taskPackageRecords, - &(*p)->num_taskPackageRecords) && + odr_sequence_of(o, (Odr_fun)z_IUTaskPackageRecordStructure, + &(*p)->taskPackageRecords, + &(*p)->num_taskPackageRecords, 0) && odr_sequence_end (o); } -int z_IUUpdateEsRequest (ODR o, Z_IUUpdateEsRequest **p, int opt) +int z_IUUpdateEsRequest (ODR o, Z_IUUpdateEsRequest **p, int opt, + const char *name) { - if (!odr_sequence_begin (o, p, sizeof(**p))) + if (!odr_sequence_begin (o, p, sizeof(**p), 0)) return opt && odr_ok (o); return odr_explicit (o, z_IUOriginPartToKeep, - &(*p)->toKeep, ODR_CONTEXT, 1, 0) && + &(*p)->toKeep, ODR_CONTEXT, 1, 0) && odr_explicit (o, z_IUSuppliedRecords, - &(*p)->notToKeep, ODR_CONTEXT, 2, 0) && + &(*p)->notToKeep, ODR_CONTEXT, 2, 0) && odr_sequence_end (o); } -int z_IUUpdateTaskPackage (ODR o, Z_IUUpdateTaskPackage **p, int opt) +int z_IUUpdateTaskPackage (ODR o, Z_IUUpdateTaskPackage **p, int opt, + const char *name) { - if (!odr_sequence_begin (o, p, sizeof(**p))) + if (!odr_sequence_begin (o, p, sizeof(**p), 0)) return opt && odr_ok (o); return odr_explicit (o, z_IUOriginPartToKeep, - &(*p)->originPart, ODR_CONTEXT, 1, 0) && + &(*p)->originPart, ODR_CONTEXT, 1, 0) && odr_explicit (o, z_IUTargetPart, - &(*p)->targetPart, ODR_CONTEXT, 2, 0) && + &(*p)->targetPart, ODR_CONTEXT, 2, 0) && odr_sequence_end (o); } -int z_IUUpdate (ODR o, Z_IUUpdate **p, int opt) +int z_IUUpdate (ODR o, Z_IUUpdate **p, int opt, const char *name) { static Odr_arm arm[] = { {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_IUUpdate_esRequest, - z_IUUpdateEsRequest}, + (Odr_fun)z_IUUpdateEsRequest, 0}, {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_IUUpdate_taskPackage, - z_IUUpdateTaskPackage}, - {-1, -1, -1, -1, 0} + (Odr_fun)z_IUUpdateTaskPackage, 0}, + {-1, -1, -1, -1, 0, 0} }; if (!odr_initmember(o, p, sizeof(**p))) return opt && odr_ok(o); - if (odr_choice(o, arm, &(*p)->u, &(*p)->which)) + if (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0)) return 1; *p = 0; return opt && odr_ok(o);