+bool_t *ill_get_bool (struct ill_get_ctl *gc, const char *name,
+ const char *sub, int val)
+{
+ ODR o = gc->odr;
+ char element[128];
+ const char *v;
+ bool_t *r = odr_malloc (o, sizeof(*r));
+
+ strcpy(element, name);
+ if (sub)
+ {
+ strcat (element, ",");
+ strcat (element, sub);
+ }
+
+ v = (gc->f)(gc->clientData, element);
+ if (v)
+ val = atoi(v);
+ else if (val < 0)
+ return 0;
+ *r = val;
+ return r;
+}
+
+int *ill_get_int (struct ill_get_ctl *gc, const char *name,
+ const char *sub, int val)
+{
+ ODR o = gc->odr;
+ char element[128];
+ const char *v;
+ int *r = odr_malloc (o, sizeof(*r));
+
+ strcpy(element, name);
+ if (sub)
+ {
+ strcat (element, ",");
+ strcat (element, sub);
+ }
+ v = (gc->f)(gc->clientData, element);
+ if (v)
+ val = atoi(v);
+ *r = val;
+ return r;
+}
+
+int *ill_get_enumerated (struct ill_get_ctl *gc, const char *name,
+ const char *sub, int val)
+{
+ return ill_get_int(gc, name, sub, val);
+}
+
+ILL_String *ill_get_ILL_String (struct ill_get_ctl *gc, const char *name,
+ const char *sub)
+{
+ ILL_String *r = (ILL_String *) odr_malloc (gc->odr, sizeof(*r));
+ char element[128];
+ const char *v;
+
+ strcpy(element, name);
+ if (sub)
+ {
+ strcat (element, ",");
+ strcat (element, sub);
+ }
+ v = (gc->f)(gc->clientData, element);
+ if (!v)
+ return 0;
+ r->which = ILL_String_GeneralString;
+ r->u.GeneralString = odr_strdup (gc->odr, v);
+ return r;
+}
+
+
+ILL_ISO_Date *ill_get_ILL_ISO_Date (struct ill_get_ctl *gc, const char *name,
+ const char *sub, const char *val)
+{
+ char element[128];
+ const char *v;
+
+ strcpy(element, name);
+ if (sub)
+ {
+ strcat (element, ",");
+ strcat (element, sub);
+ }
+ v = (gc->f)(gc->clientData, element);
+ if (!v)
+ v = val;
+ if (!v)
+ return 0;
+ return odr_strdup (gc->odr, v);
+}
+
+ILL_ISO_Time *ill_get_ILL_ISO_Time (struct ill_get_ctl *gc, const char *name,
+ const char *sub, const char *val)
+{
+ char element[128];
+ const char *v;
+
+ strcpy(element, name);
+ if (sub)
+ {
+ strcat (element, ",");
+ strcat (element, sub);
+ }
+ v = (gc->f)(gc->clientData, element);
+ if (!v)
+ v = val;
+ if (!v)
+ return 0;
+ return odr_strdup (gc->odr, v);
+}
+
+ILL_Person_Or_Institution_Symbol *ill_get_Person_Or_Insitution_Symbol (
+ struct ill_get_ctl *gc, const char *name, const char *sub)
+{
+ char element[128];
+ ODR o = gc->odr;
+ ILL_Person_Or_Institution_Symbol *p = odr_malloc (o, sizeof(*p));
+
+ strcpy(element, name);
+ if (sub)
+ {
+ strcat (element, ",");
+ strcat (element, sub);
+ }
+ p->which = ILL_Person_Or_Institution_Symbol_person_symbol;
+ if ((p->u.person_symbol = ill_get_ILL_String (gc, element, "person")))
+ return p;
+
+ p->which = ILL_Person_Or_Institution_Symbol_institution_symbol;
+ if ((p->u.institution_symbol =
+ ill_get_ILL_String (gc, element, "institution")))
+ return p;
+ return 0;
+}
+
+static ILL_Name_Of_Person_Or_Institution *ill_get_Name_Of_Person_Or_Institution(
+ struct ill_get_ctl *gc, const char *name, const char *sub)
+{
+ char element[128];
+ ODR o = gc->odr;
+ ILL_Name_Of_Person_Or_Institution *p = odr_malloc (o, sizeof(*p));
+
+ strcpy(element, name);
+ if (sub)
+ {
+ strcat (element, ",");
+ strcat (element, sub);
+ }
+ p->which = ILL_Name_Of_Person_Or_Institution_name_of_person;
+ if ((p->u.name_of_person =
+ ill_get_ILL_String (gc, element, "name-of-person")))
+ return p;
+
+ p->which = ILL_Name_Of_Person_Or_Institution_name_of_institution;
+ if ((p->u.name_of_institution =
+ ill_get_ILL_String (gc, element, "name-of-institution")))
+ return p;
+ return 0;
+}
+
+ILL_System_Id *ill_get_System_Id(struct ill_get_ctl *gc,
+ const char *name, const char *sub)
+{
+ ODR o = gc->odr;
+ char element[128];
+ ILL_System_Id *p;
+
+ strcpy(element, name);
+ if (sub)
+ {
+ strcat (element, ",");
+ strcat (element, sub);
+ }
+ p = (ILL_System_Id *) odr_malloc (o, sizeof(*p));
+ p->person_or_institution_symbol = ill_get_Person_Or_Insitution_Symbol (
+ gc, element, "person-or-institution-symbol");
+ p->name_of_person_or_institution = ill_get_Name_Of_Person_Or_Institution (
+ gc, element, "name-of-person-or-institution");
+ return p;
+}
+
+ILL_Transaction_Id *ill_get_Transaction_Id (struct ill_get_ctl *gc,
+ const char *name, const char *sub)
+{
+ ODR o = gc->odr;
+ ILL_Transaction_Id *r = (ILL_Transaction_Id *) odr_malloc (o, sizeof(*r));
+ char element[128];
+
+ strcpy(element, name);
+ if (sub)
+ {
+ strcat (element, ",");
+ strcat (element, sub);
+ }
+ r->initial_requester_id =
+ ill_get_System_Id (gc, element, "initial-requester-id");
+ r->transaction_group_qualifier =
+ ill_get_ILL_String (gc, element, "transaction-group-qualifier");
+ r->transaction_qualifier =
+ ill_get_ILL_String (gc, element, "transaction-qualifier");
+ r->sub_transaction_qualifier =
+ ill_get_ILL_String (gc, element, "sub-transaction-qualifier");
+ return r;
+}
+
+
+ILL_Service_Date_this *ill_get_Service_Date_this (
+ struct ill_get_ctl *gc, const char *name, const char *sub)
+{
+ ODR o = gc->odr;
+ ILL_Service_Date_this *r =
+ (ILL_Service_Date_this *) odr_malloc (o, sizeof(*r));
+ char element[128];
+
+ strcpy(element, name);
+ if (sub)
+ {
+ strcat (element, ",");
+ strcat (element, sub);
+ }
+ r->date = ill_get_ILL_ISO_Date (gc, element, "date", "20000101");
+ r->time = ill_get_ILL_ISO_Time (gc, element, "time", 0);
+ return r;
+}
+
+ILL_Service_Date_original *ill_get_Service_Date_original (
+ struct ill_get_ctl *gc, const char *name, const char *sub)
+{
+ ODR o = gc->odr;
+ ILL_Service_Date_original *r =
+ (ILL_Service_Date_original *) odr_malloc (o, sizeof(*r));
+ char element[128];
+
+ strcpy(element, name);
+ if (sub)
+ {
+ strcat (element, ",");
+ strcat (element, sub);
+ }
+ r->date = ill_get_ILL_ISO_Date (gc, element, "date", 0);
+ r->time = ill_get_ILL_ISO_Time (gc, element, "time", 0);
+ if (!r->date && !r->time)
+ return 0;
+ return r;
+}
+
+ILL_Service_Date_Time *ill_get_Service_Date_Time (
+ struct ill_get_ctl *gc, const char *name, const char *sub)