From 9446211daf0869d342b5738d153d810230b7a299 Mon Sep 17 00:00:00 2001 From: Sebastian Hammer Date: Tue, 12 Dec 1995 16:37:02 +0000 Subject: [PATCH] Added destroy element to data1_node. --- client/client.c | 7 ++++++- include/data1.h | 6 +++++- retrieval/d1_map.c | 7 +++++-- retrieval/d1_read.c | 8 +++++++- 4 files changed, 23 insertions(+), 5 deletions(-) diff --git a/client/client.c b/client/client.c index 219f78c..9646c2e 100644 --- a/client/client.c +++ b/client/client.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: client.c,v $ - * Revision 1.26 1995-12-12 14:11:00 quinn + * Revision 1.27 1995-12-12 16:37:02 quinn + * Added destroy element to data1_node. + * + * Revision 1.26 1995/12/12 14:11:00 quinn * Minimal. * * Revision 1.25 1995/11/13 09:27:22 quinn @@ -181,6 +184,8 @@ static void send_initRequest() ODR_MASK_SET(req->protocolVersion, Z_ProtocolVersion_2); ODR_MASK_SET(req->protocolVersion, Z_ProtocolVersion_3); + *req->maximumRecordSize = 1024*1024; + req->idAuthentication = auth; send_apdu(apdu); diff --git a/include/data1.h b/include/data1.h index f803459..6fe7938 100644 --- a/include/data1.h +++ b/include/data1.h @@ -24,7 +24,10 @@ * OF THIS SOFTWARE. * * $Log: data1.h,v $ - * Revision 1.6 1995-12-11 15:22:12 quinn + * Revision 1.7 1995-12-12 16:37:05 quinn + * Added destroy element to data1_node. + * + * Revision 1.6 1995/12/11 15:22:12 quinn * Added last_child field to the node. * * Revision 1.5 1995/12/05 14:26:40 quinn @@ -294,6 +297,7 @@ typedef struct data1_node } indicator; } u; + void (*destroy)(struct data1_node *n); char lbuf[DATA1_LOCALDATA]; /* small buffer for local data */ int line; int num_children; diff --git a/retrieval/d1_map.c b/retrieval/d1_map.c index 73792e3..2fcdd66 100644 --- a/retrieval/d1_map.c +++ b/retrieval/d1_map.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: d1_map.c,v $ - * Revision 1.5 1995-12-12 14:11:31 quinn + * Revision 1.6 1995-12-12 16:37:08 quinn + * Added destroy element to data1_node. + * + * Revision 1.5 1995/12/12 14:11:31 quinn * More work on the large-record problem. * * Revision 1.4 1995/12/11 15:22:37 quinn @@ -250,7 +253,7 @@ static int map_children(data1_node *n, data1_maptab *map, data1_node *res) */ for (mt = m->target_path; mt; mt = mt->next) { - if (!cur || !tagmatch(cur, mt)) + if (!cur || mt->new_field || !tagmatch(cur, mt)) { cur = data1_mk_node(); cur->which = DATA1N_tag; diff --git a/retrieval/d1_read.c b/retrieval/d1_read.c index 66295acb1..e164202 100644 --- a/retrieval/d1_read.c +++ b/retrieval/d1_read.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: d1_read.c,v $ - * Revision 1.5 1995-12-11 15:22:37 quinn + * Revision 1.6 1995-12-12 16:37:08 quinn + * Added destroy element to data1_node. + * + * Revision 1.5 1995/12/11 15:22:37 quinn * Added last_child field to the node. * Rewrote schema-mapping. * @@ -103,6 +106,7 @@ data1_node *data1_mk_node(void) abort(); r->next = r->child = r->last_child = r->parent = 0; r->num_children = 0; + r->destroy = 0; return r; } @@ -122,6 +126,8 @@ void data1_free_tree(data1_node *t) data1_free_tree(p); p = pn; } + if (t->destroy) + (*t->destroy)(t); fr_node(t); } -- 1.7.10.4