diff --git a/IDMETA b/IDMETA index bd2ec74..714b1d3 100644 --- a/IDMETA +++ b/IDMETA @@ -1,4 +1,4 @@ DEBIAN_DIST="bookworm bullseye" UBUNTU_DIST="noble jammy focal" CENTOS_DIST="centos7 centos8 centos9" -VERSION=1.8.1 +VERSION=1.9.0 diff --git a/configure.ac b/configure.ac index a8057a1..2abeb39 100644 --- a/configure.ac +++ b/configure.ac @@ -14,7 +14,7 @@ AC_PROG_EGREP LT_INIT -YAZ_INIT([],[5.1.0]) +YAZ_INIT([],[5.35.0]) if test -z "$YAZLIB"; then AC_MSG_ERROR([YAZ development libraries missing]) fi diff --git a/debian/control b/debian/control index 98126bf..4d8a67a 100644 --- a/debian/control +++ b/debian/control @@ -6,7 +6,7 @@ Standards-Version: 3.6.2 Build-Depends: debhelper (>= 9.0.0), libxml2-dev, libxslt1-dev, pkg-config, - libyaz5-dev (>= 5.29.0) + libyaz5-dev (>= 5.35.0) Package: libyazpp7 Section: libs diff --git a/include/yazpp/cql2rpn.h b/include/yazpp/cql2rpn.h index 6f4d820..5eb6fad 100644 --- a/include/yazpp/cql2rpn.h +++ b/include/yazpp/cql2rpn.h @@ -1,5 +1,5 @@ /* This file is part of the yazpp toolkit. - * Copyright (C) Index Data + * Copyright (C) Index Data * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -35,6 +35,7 @@ class YAZ_EXPORT Yaz_cql2rpn { ~Yaz_cql2rpn(); void set_pqf_file(const char *fname); bool parse_spec_file(const char *fname, int *error); + int define_pattern(const char *pattern, const char *value); int query_transform(const char *cql, Z_RPNQuery **rpnquery, ODR o, char **addinfop); int rpn2cql_transform(Z_RPNQuery *q, WRBUF cql, ODR o, char **addinfop); diff --git a/src/Makefile.am b/src/Makefile.am index fca2afc..e04526c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -8,7 +8,7 @@ TESTS = $(check_PROGRAMS) AM_CXXFLAGS = -I$(srcdir)/../include $(YAZINC) lib_LTLIBRARIES = libyazpp.la -libyazpp_la_LDFLAGS=-version-info 6:0:0 +libyazpp_la_LDFLAGS=-version-info 7:0:1 DISTCLEANFILES = yazpp-config diff --git a/src/test_query.cpp b/src/test_query.cpp index 0367b4b..24bd5b0 100644 --- a/src/test_query.cpp +++ b/src/test_query.cpp @@ -1,5 +1,5 @@ /* This file is part of the yazpp toolkit. - * Copyright (C) Index Data + * Copyright (C) Index Data * See the file LICENSE for details. */ diff --git a/src/yaz-cql2rpn.cpp b/src/yaz-cql2rpn.cpp index 54d0006..a946295 100644 --- a/src/yaz-cql2rpn.cpp +++ b/src/yaz-cql2rpn.cpp @@ -1,5 +1,5 @@ /* This file is part of the yazpp toolkit. - * Copyright (C) Index Data + * Copyright (C) Index Data * See the file LICENSE for details. */ @@ -32,13 +32,19 @@ void Yaz_cql2rpn::set_pqf_file(const char *fname) m_transform = cql_transform_open_fname(fname); } - bool Yaz_cql2rpn::parse_spec_file(const char *fname, int *error) { - *error = 0; - cql_transform_close(m_transform); - m_transform = cql_transform_open_fname(fname); - return m_transform ? true : false; + if (!m_transform) + m_transform = cql_transform_create(); + *error = cql_transform_define_fname(m_transform, fname); + return *error == 0 ? true : false; +} + +int Yaz_cql2rpn::define_pattern(const char *pattern, const char *value) +{ + if (!m_transform) + m_transform = cql_transform_create(); + return cql_transform_define_pattern(m_transform, pattern, value); } int Yaz_cql2rpn::rpn2cql_transform(Z_RPNQuery *q, WRBUF cql, ODR o, diff --git a/yazpp.spec b/yazpp.spec index 19d06cf..56b72e0 100644 --- a/yazpp.spec +++ b/yazpp.spec @@ -9,7 +9,7 @@ Vendor: Index Data ApS Source: yazpp-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-root Prefix: %{_prefix} -BuildRequires: pkgconfig, libyaz5-devel >= 5.29.0 +BuildRequires: pkgconfig, libyaz5-devel >= 5.35.0 Packager: Adam Dickmeiss URL: http://www.indexdata.com/yazplusplus