Put content of headers into data1.h
authorAdam Dickmeiss <adam@indexdata.dk>
Tue, 28 Sep 2004 10:43:37 +0000 (10:43 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Tue, 28 Sep 2004 10:43:37 +0000 (10:43 +0000)
data1/d1_attset.c
data1/d1_map.c
include/Makefile.am
include/d1_attset.h [deleted file]
include/d1_map.h [deleted file]
include/idzebra/data1.h

index 2a3014a..904d25a 100644 (file)
@@ -1,5 +1,5 @@
-/* $Id: d1_attset.c,v 1.3 2004-09-28 10:15:03 adam Exp $
-   Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002
+/* $Id: d1_attset.c,v 1.4 2004-09-28 10:43:37 adam Exp $
+   Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
    Index Data Aps
 
 This file is part of the Zebra server.
@@ -25,7 +25,6 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #include <stdlib.h>
 
 #include <yaz/log.h>
-#include <d1_attset.h>
 #include <idzebra/data1.h>
 
 data1_att *data1_getattbyname(data1_handle dh, data1_attset *s, char *name)
index c021cb4..151b3c4 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: d1_map.c,v 1.4 2004-09-28 10:15:03 adam Exp $
+/* $Id: d1_map.c,v 1.5 2004-09-28 10:43:37 adam Exp $
    Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002
    Index Data Aps
 
@@ -29,7 +29,6 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #include <yaz/readconf.h>
 #include <yaz/tpath.h>
 #include <d1_absyn.h>
-#include <d1_map.h>
 
 data1_maptab *data1_read_maptab (data1_handle dh, const char *file)
 {
index 9e316c1..03033f7 100644 (file)
@@ -1,5 +1,5 @@
-# $Id: Makefile.am,v 1.15 2004-09-28 10:15:03 adam Exp $
-noinst_HEADERS = bfile.h bset.h charmap.h d1_attset.h d1_map.h \
+# $Id: Makefile.am,v 1.16 2004-09-28 10:43:37 adam Exp $
+noinst_HEADERS = bfile.h bset.h charmap.h  \
 dict.h direntz.h isam-codec.h isamb.h isamc.h isamg.h \
 isams.h mfile.h passwddb.h dfa.h zebra_xpath.h d1_absyn.h \
 rset.h set.h sortidx.h str.h zebra-lock.h zebramap.h zebrautl.h
diff --git a/include/d1_attset.h b/include/d1_attset.h
deleted file mode 100644 (file)
index 39dbbf6..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-/* $Id: d1_attset.h,v 1.2 2002-10-22 13:19:50 adam Exp $
-   Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002
-   Index Data Aps
-
-This file is part of the Zebra server.
-
-Zebra is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-Zebra is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License
-along with Zebra; see the file LICENSE.zebra.  If not, write to the
-Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA.
-*/
-
-#ifndef D1_ATTSET_H
-#define D1_ATTSET_H
-
-#include <yaz/oid.h>
-
-YAZ_BEGIN_CDECL
-
-/*
- * This structure describes a attset, perhaps made up by inclusion
- * (supersetting) of other attribute sets. When indexing and searching,
- * we perform a normalisation, where we associate a given tag with
- * the set that originally defined it, rather than the superset. This
- * allows the most flexible access. Eg, the tags common to GILS and BIB-1
- * should be searchable by both names.
- */
-
-struct data1_attset;
-
-typedef struct data1_local_attribute
-{
-    int local;
-    struct data1_local_attribute *next;
-} data1_local_attribute;
-
-typedef struct data1_attset data1_attset;    
-typedef struct data1_att data1_att;
-typedef struct data1_attset_child data1_attset_child;
-
-struct data1_att
-{
-    data1_attset *parent;          /* attribute set */
-    char *name;                    /* symbolic name of this attribute */
-    int value;                     /* attribute value */
-    data1_local_attribute *locals; /* local index values */
-    data1_att *next;
-};
-
-struct data1_attset_child {
-    data1_attset *child;
-    data1_attset_child *next;
-};
-
-struct data1_attset
-{
-    char *name;          /* symbolic name */
-    oid_value reference;   /* external ID of attset */
-    data1_att *atts;          /* attributes */
-    data1_attset_child *children;  /* included attset */
-    data1_attset *next;       /* next in cache */
-};
-
-typedef struct data1_handle_info *data1_handle;
-
-YAZ_EXPORT data1_att *data1_getattbyname(data1_handle dh, data1_attset *s,
-                                        char *name);
-YAZ_EXPORT data1_attset *data1_read_attset(data1_handle dh, const char *file);
-
-YAZ_EXPORT data1_attset *data1_empty_attset(data1_handle dh);
-
-YAZ_END_CDECL
-
-#endif
diff --git a/include/d1_map.h b/include/d1_map.h
deleted file mode 100644 (file)
index a8b6944..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/* $Id: d1_map.h,v 1.2 2002-10-22 13:19:50 adam Exp $
-   Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002
-   Index Data Aps
-
-This file is part of the Zebra server.
-
-Zebra is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-Zebra is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License
-along with Zebra; see the file LICENSE.zebra.  If not, write to the
-Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA.
-*/
-
-#ifndef D1_MAP_H
-#define D1_MAP_H
-
-YAZ_BEGIN_CDECL
-
-typedef struct data1_maptag
-{
-    int new_field;
-    int type;
-#define D1_MAPTAG_numeric 1
-#define D1_MAPTAG_string 2
-    int which;
-    union
-    {
-       int numeric;
-       char *string;
-    } value;
-    struct data1_maptag *next;
-} data1_maptag;
-
-typedef struct data1_mapunit
-{
-    int no_data;
-    char *source_element_name;
-    data1_maptag *target_path;
-    struct data1_mapunit *next;
-} data1_mapunit;
-
-typedef struct data1_maptab
-{
-    char *name;
-    oid_value target_absyn_ref;
-    char *target_absyn_name;
-    data1_mapunit *map;
-    struct data1_maptab *next;
-} data1_maptab;
-
-YAZ_END_CDECL
-
-#endif
index 81c579a..6596cb6 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: data1.h,v 1.1 2004-09-28 10:15:03 adam Exp $
+/* $Id: data1.h,v 1.2 2004-09-28 10:43:37 adam Exp $
    Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
    Index Data Aps
 
@@ -30,8 +30,6 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #include <yaz/proto.h>
 
 #include <idzebra/version.h>
-#include <d1_attset.h>
-#include <d1_map.h>
 #include <yaz/yaz-util.h>
 #include <yaz/wrbuf.h>
 
@@ -44,6 +42,90 @@ YAZ_BEGIN_CDECL
 
 #define DATA1_MAX_SYMBOL 31
 
+/*
+ * This structure describes a attset, perhaps made up by inclusion
+ * (supersetting) of other attribute sets. When indexing and searching,
+ * we perform a normalisation, where we associate a given tag with
+ * the set that originally defined it, rather than the superset. This
+ * allows the most flexible access. Eg, the tags common to GILS and BIB-1
+ * should be searchable by both names.
+ */
+
+struct data1_attset;
+
+typedef struct data1_local_attribute
+{
+    int local;
+    struct data1_local_attribute *next;
+} data1_local_attribute;
+
+typedef struct data1_attset data1_attset;    
+typedef struct data1_att data1_att;
+typedef struct data1_attset_child data1_attset_child;
+
+struct data1_att
+{
+    data1_attset *parent;          /* attribute set */
+    char *name;                    /* symbolic name of this attribute */
+    int value;                     /* attribute value */
+    data1_local_attribute *locals; /* local index values */
+    data1_att *next;
+};
+
+struct data1_attset_child {
+    data1_attset *child;
+    data1_attset_child *next;
+};
+
+struct data1_attset
+{
+    char *name;          /* symbolic name */
+    oid_value reference;   /* external ID of attset */
+    data1_att *atts;          /* attributes */
+    data1_attset_child *children;  /* included attset */
+    data1_attset *next;       /* next in cache */
+};
+
+typedef struct data1_handle_info *data1_handle;
+
+YAZ_EXPORT data1_att *data1_getattbyname(data1_handle dh, data1_attset *s,
+                                        char *name);
+YAZ_EXPORT data1_attset *data1_read_attset(data1_handle dh, const char *file);
+
+YAZ_EXPORT data1_attset *data1_empty_attset(data1_handle dh);
+
+typedef struct data1_maptag
+{
+    int new_field;
+    int type;
+#define D1_MAPTAG_numeric 1
+#define D1_MAPTAG_string 2
+    int which;
+    union
+    {
+       int numeric;
+       char *string;
+    } value;
+    struct data1_maptag *next;
+} data1_maptag;
+
+typedef struct data1_mapunit
+{
+    int no_data;
+    char *source_element_name;
+    data1_maptag *target_path;
+    struct data1_mapunit *next;
+} data1_mapunit;
+
+typedef struct data1_maptab
+{
+    char *name;
+    oid_value target_absyn_ref;
+    char *target_absyn_name;
+    data1_mapunit *map;
+    struct data1_maptab *next;
+} data1_maptab;
+
 typedef struct data1_name
 {
     char *name;