From d96213e7e29deb01d3f24408b557319adea3cb3d Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 16 May 2001 07:37:39 +0000 Subject: [PATCH] Added script cvs-date.tcl that determines last CVS change for YAZ by using output of 'cvs log'. The script generates include/yaz/yaz-date.h which defines YAZ_DATE - format YYYYMMDD. --- CHANGELOG | 7 +++++++ buildconf.sh | 3 ++- configure.in | 3 +-- include/yaz/Makefile.am | 9 ++++----- include/yaz/yaz-version.h | 10 +++++++++- util/Makefile.am | 4 ++-- util/cvs-date.tcl | 33 +++++++++++++++++++++++++++++++++ 7 files changed, 58 insertions(+), 11 deletions(-) create mode 100755 util/cvs-date.tcl diff --git a/CHANGELOG b/CHANGELOG index a7897d1..d0bf821 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,12 @@ Possible compatibility problems with earlier versions marked with '*'. +* Minor adjustments to pquery parser (PQF). Token characters may be +escaped by using backslash (C-style). + +PQF parser allows string attribute values to be specified. For @attr, +non-numeric characters after the equal-sign are treated as strings +(e.g. @attr 9=title). + CCL trunction character may be defined (@truncation in file) * function zget_ExtendedServicesRequest sets waitAction to diff --git a/buildconf.sh b/buildconf.sh index 1ded9da..3debbfc 100755 --- a/buildconf.sh +++ b/buildconf.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: buildconf.sh,v 1.2 2001-02-26 22:52:54 adam Exp $ +# $Id: buildconf.sh,v 1.3 2001-05-16 07:37:39 adam Exp $ aclocal || exit 1 libtoolize --force >/dev/null 2>&1 || exit 2 automake -a >/dev/null 2>&1 || exit 3 @@ -7,3 +7,4 @@ autoconf || exit 4 if [ -f config.cache ]; then rm config.cache fi +util/cvs-date.tcl include/yaz/yaz-date.h diff --git a/configure.in b/configure.in index cd22775..45b4e61 100644 --- a/configure.in +++ b/configure.in @@ -1,6 +1,6 @@ dnl YAZ Toolkit, Index Data 1994-2001 dnl See the file LICENSE for details. -dnl $Id: configure.in,v 1.44 2001-04-06 12:26:46 adam Exp $ +dnl $Id: configure.in,v 1.45 2001-05-16 07:37:39 adam Exp $ AC_INIT(include/yaz/yaz-version.h) AM_INIT_AUTOMAKE(yaz, 1.7) dnl @@ -31,7 +31,6 @@ fi EXTRAMODULE="$EXTRAMODULE ill ccl" ]) EXTRALIB="" -echo $EXTRAMODULE for module in $EXTRAMODULE; do EXTRALIB="$EXTRALIB ../$module/lib${module}.la" if test $module = "z39.50"; then diff --git a/include/yaz/Makefile.am b/include/yaz/Makefile.am index 980261e..89d7fcf 100644 --- a/include/yaz/Makefile.am +++ b/include/yaz/Makefile.am @@ -1,15 +1,14 @@ -## $Id: Makefile.am,v 1.9 2000-10-03 12:55:50 adam Exp $ +## $Id: Makefile.am,v 1.10 2001-05-16 07:37:39 adam Exp $ pkginclude_HEADERS= backend.h ccl.h comstack.h \ d1_attset.h d1_map.h data1.h diagbib1.h \ log.h logrpn.h marcdisp.h nmem.h odr.h oid.h options.h otherinfo.h \ pquery.h prt-ext.h readconf.h statserv.h tcpip.h tpath.h wrbuf.h xmalloc.h \ - yaz-ccl.h yaz-util.h yaz-version.h yconfig.h proto.h \ + yaz-ccl.h yaz-util.h yaz-version.h yaz-date.h yconfig.h proto.h \ \ ill.h ill-core.h item-req.h z-accdes1.h z-accform1.h \ z-acckrb1.h z-core.h z-date.h z-diag1.h z-espec1.h z-estask.h z-exp.h \ z-grs.h z-opac.h z-proto.h z-rrf1.h z-rrf2.h z-sum.h z-sutrs.h z-uifr1.h \ - z-univ.h zes-expi.h zes-exps.h zes-order.h zes-pquery.h zes-psched.h zes-admin.h \ - \ - zes-pset.h zes-update.h zes-update0.h + z-univ.h zes-expi.h zes-exps.h zes-order.h zes-pquery.h \ + zes-psched.h zes-admin.h zes-pset.h zes-update.h zes-update0.h diff --git a/include/yaz/yaz-version.h b/include/yaz/yaz-version.h index 3926e7f..e33da44 100644 --- a/include/yaz/yaz-version.h +++ b/include/yaz/yaz-version.h @@ -2,7 +2,12 @@ * Current software version. * * $Log: yaz-version.h,v $ - * Revision 1.3 2000-04-05 07:39:55 adam + * Revision 1.4 2001-05-16 07:37:39 adam + * Added script cvs-date.tcl that determines last CVS change for YAZ by + * using output of 'cvs log'. The script generates include/yaz/yaz-date.h + * which defines YAZ_DATE - format YYYYMMDD. + * + * Revision 1.3 2000/04/05 07:39:55 adam * Added shared library support (libtool). * * Revision 1.2 2000/02/28 11:20:06 adam @@ -89,5 +94,8 @@ */ #ifndef YAZ_VERSION #define YAZ_VERSION "1.7" +#ifndef WIN32 +#include +#endif #endif diff --git a/util/Makefile.am b/util/Makefile.am index c023e99..4f6ad78 100644 --- a/util/Makefile.am +++ b/util/Makefile.am @@ -1,6 +1,6 @@ ## Copyright (C) 1994-2001, Index Data ## All rights reserved. -## $Id: Makefile.am,v 1.9 2001-03-21 15:02:39 adam Exp $ +## $Id: Makefile.am,v 1.10 2001-05-16 07:37:39 adam Exp $ noinst_LTLIBRARIES = libutil.la @@ -8,7 +8,7 @@ noinst_LTLIBRARIES = libutil.la bin_SCRIPTS = yaz-comp -EXTRA_DIST = yaz-comp +EXTRA_DIST = yaz-comp cvs-date.tcl LIBS = diff --git a/util/cvs-date.tcl b/util/cvs-date.tcl new file mode 100755 index 0000000..b1f9dd4 --- /dev/null +++ b/util/cvs-date.tcl @@ -0,0 +1,33 @@ +#!/bin/sh +# the next line restarts using tclsh \ +exec tclsh "$0" "$@" +# +# $Id: cvs-date.tcl,v 1.1 2001-05-16 07:37:39 adam Exp $ +set sec 0 + +proc cvslog {} { + global sec + + set f [open {|cvs log} r] + while {[gets $f line] >= 0} { + if {[regexp {^date: ([0-9]+)[ /]+([0-9]+)[ /]+([0-9]+)[ /]} $line dummy year month day]} { + set this $year$month$day + if {$this > $sec} { + set sec $this + } + } + } +} + +cvslog + +if {$sec} { + set fname [lindex $argv 0] + if {[string length $fname]} { + set f [open [lindex $argv 0] w] + puts $f "#define YAZ_DATE \"$sec\"" + close $f + } else { + puts $sec + } +} -- 1.7.10.4