dnl Zebra, Index Data ApS, 1995-2005
-dnl $Id: configure.in,v 1.125 2005-06-13 10:29:20 adam Exp $
+dnl $Id: configure.in,v 1.126 2005-06-14 20:03:01 adam Exp $
dnl
AC_INIT(include/idzebra/version.h)
AM_INIT_AUTOMAKE(idzebra,1.4.0)
AM_PROG_LIBTOOL
dnl
dnl ------ headers
-AC_CHECK_HEADERS(sys/times.h unistd.h)
+AC_CHECK_HEADERS(sys/times.h sys/time.h unistd.h)
dnl ------ crypt
AC_CHECK_LIB(crypt, crypt)
if test "$ac_cv_lib_crypt_crypt" = "yes"; then
test/dmoz/Makefile test/sort/Makefile test/zsh/Makefile
test/marcxml/Makefile test/charmap/Makefile test/codec/Makefile
test/espec/Makefile
+ test/filters/Makefile
examples/Makefile examples/gils/Makefile examples/zthes/Makefile
examples/marc21/Makefile
idzebra.spec
-SUBDIRS=codec api xslt xpath gils malxml config usmarc dmoz sort \
+SUBDIRS=codec api filters xslt xpath gils malxml config usmarc dmoz sort \
sort2 xelm cddb rusmarc zsh marcxml charmap mbox espec
--- /dev/null
+Makefile
+Makefile.in
+*.mf
+*.log
+log
+*.LCK
+shadow
+reg
+socket
+zebrasrv.pid
+.libs
+.deps
+grs.marc
+grs.xml
+text
--- /dev/null
+# $Id: Makefile.am,v 1.1 2005-06-14 20:03:02 adam Exp $
+
+check_PROGRAMS = text grs.xml grs.marc
+
+TESTS = $(check_PROGRAMS)
+
+EXTRA_DIST = zebra.cfg record.xml record.mrc
+
+text_SOURCES = text.c
+grs_xml_SOURCES = grs.xml.c
+grs_marc_SOURCES = grs.marc.c
+
+AM_CPPFLAGS = -I$(top_srcdir)/include $(YAZINC)
+
+zebralibs = \
+ ../../index/libidzebra-api.la \
+ ../../rset/libidzebra-rset.la \
+ ../../recctrl/libidzebra-recctrl.la \
+ ../../dict/libidzebra-dict.la \
+ ../../isams/libidzebra-isams.la \
+ ../../isamc/libidzebra-isamc.la \
+ ../../isamb/libidzebra-isamb.la \
+ ../../data1/libidzebra-data1.la \
+ ../../bfile/libidzebra-bfile.la \
+ ../../dfa/libidzebra-dfa.la \
+ ../../util/libidzebra-util.la
+
+LDADD = ../api/libtestlib.a $(zebralibs) $(YAZLALIB)
+
+
--- /dev/null
+/* $Id: grs.marc.c,v 1.1 2005-06-14 20:03:02 adam Exp $
+ Copyright (C) 1995-2005
+ 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.
+*/
+
+#include "../api/testlib.h"
+
+int main(int argc, char **argv)
+{
+ ZebraService zs = start_up(0, argc, argv);
+ ZebraHandle zh = zebra_open(zs);
+ char path[256];
+
+ check_filter(zs, "grs.marc");
+
+ zebra_select_database(zh, "Default");
+
+ zebra_set_resource(zh, "recordType", "grs.marc.usmarc");
+
+ zebra_init(zh);
+
+ zebra_begin_trans(zh, 1);
+ sprintf(path, "%.200s/record.mrc", get_srcdir());
+ zebra_repository_update(zh, path);
+ zebra_end_trans(zh);
+ zebra_commit(zh);
+
+ do_query(__LINE__, zh, "computer", 1);
+
+ do_query(__LINE__, zh, "computee", 0);
+
+ return close_down(zh, zs, 0);
+}
--- /dev/null
+/* $Id: grs.xml.c,v 1.1 2005-06-14 20:03:02 adam Exp $
+ Copyright (C) 1995-2005
+ 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.
+*/
+
+#include "../api/testlib.h"
+
+int main(int argc, char **argv)
+{
+ ZebraService zs = start_up(0, argc, argv);
+ ZebraHandle zh = zebra_open(zs);
+ char path[256];
+
+ check_filter(zs, "grs.xml");
+
+ zebra_select_database(zh, "Default");
+
+ zebra_set_resource(zh, "recordType", "grs.xml");
+
+ zebra_init(zh);
+
+ zebra_begin_trans(zh, 1);
+ sprintf(path, "%.200s/record.xml", get_srcdir());
+ zebra_repository_update(zh, path);
+ zebra_end_trans(zh);
+ zebra_commit(zh);
+
+ do_query(__LINE__, zh, "@attr 1=/ text", 1);
+
+ do_query(__LINE__, zh, "@attr 1=/ test", 0);
+
+ return close_down(zh, zs, 0);
+}
--- /dev/null
+00366nam 22001698a 4500001001300000003000400013005001700017008004100034010001700179040001300075050001200088100001700100245003000117260001200147263000900159300001100168\1e 11224466 \1eDLC\1e00000000000000.0\1e910710c19910701nju 00010 eng \1e \1faDLC\1fcDLC\1e00\1fa123-xyz\1e10\1faJack Collins\1e10\1faHow to program a computer\1e1 \1faPenguin\1e \1fa8710\1e \1fap. cm.\1e \1fa 11224466 \1e\1d
\ No newline at end of file
--- /dev/null
+<elem>some text $ text here.</elem>
--- /dev/null
+/* $Id: text.c,v 1.1 2005-06-14 20:03:02 adam Exp $
+ Copyright (C) 1995-2005
+ 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.
+*/
+
+#include "../api/testlib.h"
+
+int main(int argc, char **argv)
+{
+ ZebraService zs = start_up(0, argc, argv);
+ ZebraHandle zh = zebra_open(zs);
+ char path[256];
+
+ check_filter(zs, "text");
+
+ zebra_select_database(zh, "Default");
+
+ zebra_set_resource(zh, "recordType", "text");
+
+ zebra_init(zh);
+
+ zebra_begin_trans(zh, 1);
+ sprintf(path, "%.200s/record.xml", get_srcdir());
+ zebra_repository_update(zh, path);
+ zebra_end_trans(zh);
+ zebra_commit(zh);
+
+ do_query(__LINE__, zh, "text", 1);
+
+ do_query(__LINE__, zh, "test", 0);
+
+ zebra_set_resource(zh, "recordType", "text.$");
+
+ zebra_begin_trans(zh, 1);
+ sprintf(path, "%.200s/record.xml", get_srcdir());
+ zebra_repository_update(zh, path);
+ zebra_end_trans(zh);
+ zebra_commit(zh);
+
+ do_query(__LINE__, zh, "text", 3);
+
+ do_query(__LINE__, zh, "here", 2);
+
+ return close_down(zh, zs, 0);
+}
--- /dev/null
+# Simple Zebra configuration file
+# $Id: zebra.cfg,v 1.1 2005-06-14 20:03:02 adam Exp $
+#
+# Where the schema files, attribute files, etc are located.
+profilePath: ${srcdir:-.}:${srcdir:-.}/../../tab
+
+
+# Files that describe the attribute sets supported.
+attset: bib1.att
+attset: gils.att
+attset: explain.att
+
+recordtype: grs.xml
+
+isam: b
+
+modulePath: ../../recctrl/.libs