X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=retrieval%2Fd1_map.c;h=15d14cb886d2bfad029475e01534583f6e38e819;hb=3ee667935c4cac82445ecd05c8ae421888dfd40f;hp=84367af9beaee91666e60ab2b869a41c4685e773;hpb=b440dce0831a72bebe4f4821ab7771cc05e8facb;p=yaz-moved-to-github.git diff --git a/retrieval/d1_map.c b/retrieval/d1_map.c index 84367af..15d14cb 100644 --- a/retrieval/d1_map.c +++ b/retrieval/d1_map.c @@ -1,10 +1,21 @@ /* - * Copyright (c) 1995-1999, Index Data. + * Copyright (c) 1995-2000, Index Data. * See the file LICENSE for details. * Sebastian Hammer, Adam Dickmeiss * * $Log: d1_map.c,v $ - * Revision 1.15 1999-08-27 09:40:32 adam + * Revision 1.18 2000-11-29 14:22:47 adam + * Implemented XML/SGML attributes for data1 so that d1_read reads them + * and d1_write generates proper attributes for XML/SGML records. Added + * register locking for threaded version. + * + * Revision 1.17 1999/11/30 13:47:12 adam + * Improved installation. Moved header files to include/yaz. + * + * Revision 1.16 1999/10/21 12:06:29 adam + * Retrieval module no longer uses ctype.h - functions. + * + * Revision 1.15 1999/08/27 09:40:32 adam * Renamed logf function to yaz_log. Removed VC++ project files. * * Revision 1.14 1998/10/13 16:09:50 adam @@ -63,15 +74,13 @@ #include #include #include -#include -#include -#include -#include - -#include -#include -#include +#include +#include +#include +#include +#include +#include data1_maptab *data1_read_maptab (data1_handle dh, const char *file) { @@ -183,7 +192,7 @@ data1_maptab *data1_read_maptab (data1_handle dh, const char *file) (*mtp)->new_field = 1; else (*mtp)->new_field = 0; - if ((type != 3 || local_numeric) && isdigit(*valstr)) + if ((type != 3 || local_numeric) && d1_isdigit(*valstr)) { (*mtp)->which = D1_MAPTAG_numeric; (*mtp)->value.numeric = atoi(valstr); @@ -299,11 +308,9 @@ static int map_children(data1_handle dh, data1_node *n, data1_maptab *map, { if (!cur || mt->new_field || !tagmatch(cur, mt)) { - cur = data1_mk_node (dh, mem); - cur->which = DATA1N_tag; - cur->u.tag.element = 0; + cur = data1_mk_node_type (dh, mem, DATA1N_tag); cur->u.tag.tag = mt->value.string; - cur->u.tag.node_selected = 0; + cur->parent = pn; cur->root = pn->root; if (!pn->child)