Added --with-yc option to configure. For the data1_node in data1.h:
[yaz-moved-to-github.git] / include / data1.h
index 3deae89..dce4698 100644 (file)
  * OF THIS SOFTWARE.
  *
  * $Log: data1.h,v $
- * Revision 1.36  1998-05-18 13:06:57  adam
+ * Revision 1.39  1998-10-28 15:10:06  adam
+ * Added --with-yc option to configure. For the data1_node in data1.h:
+ * decreased size of localdata and removed member "line" which wasn't useful.
+ *
+ * Revision 1.38  1998/10/15 08:29:15  adam
+ * Tag set type may be specified in reference to it using "tagset"
+ * directive in .abs-files and "include" directive in .tag-files.
+ *
+ * Revision 1.37  1998/10/13 16:09:46  adam
+ * Added support for arbitrary OID's for tagsets, schemas and attribute sets.
+ * Added support for multiple attribute set references and tagset references
+ * from an abstract syntax file.
+ * Fixed many bad logs-calls in routines that read the various
+ * specifications regarding data1 (*.abs,*.att,...) and made the messages
+ * consistent whenever possible.
+ * Added extra 'lineno' argument to function readconf_line.
+ *
+ * Revision 1.36  1998/05/18 13:06:57  adam
  * Changed the way attribute sets are handled by the retriaval module.
  * Extended Explain conversion / schema.
  * Modified server and client to work with ASN.1 compiled protocol handlers.
@@ -219,7 +236,8 @@ typedef struct data1_attset_cache_info *data1_attset_cache;
 
 typedef enum data1_datatype
 {
-    DATA1K_structured = 1,
+    DATA1K_unknown,
+    DATA1K_structured,
     DATA1K_string,
     DATA1K_numeric,
     DATA1K_bool,
@@ -311,15 +329,17 @@ typedef struct data1_tag
     struct data1_tag *next;
 } data1_tag;
 
-typedef struct data1_tagset
+typedef struct data1_tagset data1_tagset;
+
+struct data1_tagset
 {
+    int type;                        /* type of tagset in current context */
     char *name;                      /* symbolic name */
     oid_value reference;
-    int type;                        /* type of tagset in current context */
     data1_tag *tags;                 /* tags defined by this set */
-    struct data1_tagset *children;   /* included tagsets */
-    struct data1_tagset *next;       /* sibling */
-} data1_tagset;
+    data1_tagset *children;          /* children */
+    data1_tagset *next;              /* sibling */
+};
 
 typedef struct data1_termlist
 {
@@ -422,9 +442,8 @@ typedef struct data1_node
     } u;
 
     void (*destroy)(struct data1_node *n);
-#define DATA1_LOCALDATA 40
+#define DATA1_LOCALDATA 20
     char lbuf[DATA1_LOCALDATA]; /* small buffer for local data */
-    int line;
     struct data1_node *next;
     struct data1_node *child;
     struct data1_node *last_child;
@@ -442,9 +461,13 @@ YAZ_EXPORT data1_node *data1_read_record(data1_handle dh,
                                         int (*rf)(void *, char *, size_t),
                                         void *fh, NMEM m);
 YAZ_EXPORT data1_absyn *data1_read_absyn(data1_handle dh, const char *file);
-YAZ_EXPORT data1_tag *data1_gettagbynum(data1_handle dh, data1_tagset *s,
+YAZ_EXPORT data1_tag *data1_gettagbynum(data1_handle dh,
+                                       data1_tagset *s,
                                        int type, int value);
-YAZ_EXPORT data1_tagset *data1_read_tagset(data1_handle dh, char *file);
+YAZ_EXPORT data1_tagset *data1_empty_tagset (data1_handle dh);
+YAZ_EXPORT data1_tagset *data1_read_tagset(data1_handle dh, 
+                                          const char *file,
+                                          int type);
 YAZ_EXPORT data1_element *data1_getelementbytagname(data1_handle dh, 
                                                    data1_absyn *abs,
                                                    data1_element *parent,
@@ -453,7 +476,7 @@ YAZ_EXPORT Z_GenericRecord *data1_nodetogr(data1_handle dh, data1_node *n,
                                           int select, ODR o,
                                           int *len);
 YAZ_EXPORT data1_tag *data1_gettagbyname(data1_handle dh, data1_tagset *s,
-                                        char *name);
+                                        const char *name);
 YAZ_EXPORT void data1_free_tree(data1_handle dh, data1_node *t);
 YAZ_EXPORT char *data1_nodetobuf(data1_handle dh, data1_node *n,
                                 int select, int *len);