Fixed minor bug that could cause zmbol to break it data were emitted
[idzebra-moved-to-github.git] / recctrl / regxread.c
index 0ef13aa..299f2ef 100644 (file)
@@ -4,7 +4,17 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: regxread.c,v $
- * Revision 1.31  1999-07-14 13:05:29  adam
+ * Revision 1.34  2000-11-29 14:24:01  adam
+ * Script configure uses yaz pthreads options. Added locking for
+ * zebra_register_{lock,unlock}.
+ *
+ * Revision 1.33  1999/11/30 13:48:04  adam
+ * Improved installation. Updated for inclusion of YAZ header files.
+ *
+ * Revision 1.32  1999/09/07 07:19:21  adam
+ * Work on character mapping. Implemented replace rules.
+ *
+ * Revision 1.31  1999/07/14 13:05:29  adam
  * Tcl filter works with objects when TCL is version 8 or later; filter
  * works with strings otherwise (slow).
  *
 #include <string.h>
 #include <ctype.h>
 
-#include <tpath.h>
+#include <yaz/tpath.h>
 #include <zebrautl.h>
 #include <dfa.h>
 #include "grsread.h"
@@ -1026,9 +1036,9 @@ static void tagStrip (const char **tag, int *len)
 static void tagBegin (struct lexSpec *spec, 
                       const char *tag, int len)
 {
-    struct data1_node *parent = spec->d1_stack[spec->d1_level -1];
+    struct data1_node *parent;
     data1_element *elem = NULL;
-    data1_node *partag = get_parent_tag(spec->dh, parent);
+    data1_node *partag;
     data1_node *res;
     data1_element *e = NULL;
     int localtag = 0;
@@ -1039,11 +1049,12 @@ static void tagBegin (struct lexSpec *spec,
         return ;
     }
     tagStrip (&tag, &len);
+
+    parent = spec->d1_stack[spec->d1_level -1];
+    partag = get_parent_tag(spec->dh, parent);
    
-    res = data1_mk_node (spec->dh, spec->m);
+    res = data1_mk_node_type (spec->dh, spec->m, DATA1N_tag);
     res->parent = parent;
-    res->which = DATA1N_tag;
-    res->u.tag.get_bytes = -1;
 
     if (len >= DATA1_LOCALDATA)
        res->u.tag.tag = (char *) nmem_malloc (spec->m, len+1);
@@ -1066,9 +1077,6 @@ static void tagBegin (struct lexSpec *spec,
                                      spec->d1_stack[0]->u.root.absyn,
                                      e, res->u.tag.tag);
     res->u.tag.element = elem;
-    res->u.tag.node_selected = 0;
-    res->u.tag.make_variantlist = 0;
-    res->u.tag.no_data_requested = 0;
     res->root = parent->root;
 
     parent->last_child = res;