Added last_child field to the node.
[yaz-moved-to-github.git] / include / data1.h
index bd0747d..f803459 100644 (file)
  * OF THIS SOFTWARE.
  *
  * $Log: data1.h,v $
- * Revision 1.2  1995-11-01 13:54:35  quinn
+ * 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
+ * Added global lbuf to data1_node.
+ *
+ * Revision 1.4  1995/11/13  09:27:29  quinn
+ * Fiddling with the variant stuff.
+ *
+ * Revision 1.3  1995/11/01  16:34:52  quinn
+ * Making data1 look for tables in data1_tabpath
+ *
+ * Revision 1.2  1995/11/01  13:54:35  quinn
  * Minor adjustments
  *
  * Revision 1.1  1995/11/01  13:07:18  quinn
@@ -83,6 +95,8 @@
 #include <d1_attset.h>
 #include <d1_map.h>
 
+extern char *data1_tabpath; /* global path for tables */
+
 #define DATA1_MAX_SYMBOL 31
 
 typedef struct data1_name
@@ -229,10 +243,10 @@ typedef struct data1_node
 {
     enum 
     {
-       DATA1N_root,
+       DATA1N_root,        /* the root of a record (containing global data) */
        DATA1N_tag,         /* a tag */
-       DATA1N_data,        /* */
-       DATA1N_variant,     /* variant specification */
+       DATA1N_data,        /* some data under a leaf tag or variant */
+       DATA1N_variant,     /* variant specification (a triple, actually) */
        DATA1N_indicator    /* ISO2709 indicator */
     } which;
 
@@ -249,6 +263,8 @@ typedef struct data1_node
            char *tag;
            data1_element *element;
            int node_selected;
+           int make_variantlist;
+           int no_data_requested;
        } tag;
 
        struct
@@ -262,7 +278,7 @@ typedef struct data1_node
            } what;
            int len;
            char *data;      /* filename or data */
-#define DATA1_LOCALDATA 15
+#define DATA1_LOCALDATA 40
            char lbuf[DATA1_LOCALDATA]; /* small buffer for local data */
        } data;
 
@@ -278,10 +294,12 @@ typedef struct data1_node
        } indicator;
     } u;
 
+    char lbuf[DATA1_LOCALDATA]; /* small buffer for local data */
     int line;
     int num_children;
     struct data1_node *next;
     struct data1_node *child;
+    struct data1_node *last_child;
     struct data1_node *parent;
     struct data1_node *root;
 } data1_node;