From fa3f53eb473b7d7cb50f83e094526dbd58cd5760 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 9 Oct 2003 15:51:36 +0000 Subject: [PATCH] Towards 2.0.5 --- configure.in | 4 ++-- include/yaz/log.h | 3 ++- include/yaz/yaz-version.h | 4 ++-- util/log.c | 20 +++++++++++++++++--- win/yaz.nsi | 4 ++-- win/yaz.rc | 8 ++++---- yaz.spec.in | 2 +- 7 files changed, 30 insertions(+), 15 deletions(-) diff --git a/configure.in b/configure.in index 133e28f..ac5bdc5 100644 --- a/configure.in +++ b/configure.in @@ -1,8 +1,8 @@ dnl YAZ Toolkit, Index Data 1994-2003 dnl See the file LICENSE for details. -dnl $Id: configure.in,v 1.115 2003-09-04 18:18:07 adam Exp $ +dnl $Id: configure.in,v 1.116 2003-10-09 15:51:36 adam Exp $ AC_INIT(include/yaz/yaz-version.h) -AM_INIT_AUTOMAKE(yaz, 2.0.4) +AM_INIT_AUTOMAKE(yaz, 2.0.5) AM_MAINTAINER_MODE dnl AC_SUBST(READLINE_LIBS) diff --git a/include/yaz/log.h b/include/yaz/log.h index ca2a36e..b17c4ae 100644 --- a/include/yaz/log.h +++ b/include/yaz/log.h @@ -23,7 +23,7 @@ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. * - * $Id: log.h,v 1.11 2003-05-22 15:41:58 heikki Exp $ + * $Id: log.h,v 1.12 2003-10-09 15:51:36 adam Exp $ */ #ifndef LOG_H @@ -73,6 +73,7 @@ YAZ_EXPORT void log_event_start (void (*func)(int level, const char *msg, void * YAZ_EXPORT void log_event_end (void (*func)(int level, const char *msg, void *info), void *info); +YAZ_EXPORT void yaz_log_reopen(void); YAZ_END_CDECL #endif diff --git a/include/yaz/yaz-version.h b/include/yaz/yaz-version.h index 7681f3b..96734b1 100644 --- a/include/yaz/yaz-version.h +++ b/include/yaz/yaz-version.h @@ -2,7 +2,7 @@ * Copyright (c) 1995-2003, Index Data. * See the file LICENSE for details. * - * $Id: yaz-version.h,v 1.28 2003-09-04 18:18:07 adam Exp $ + * $Id: yaz-version.h,v 1.29 2003-10-09 15:51:36 adam Exp $ */ /* @@ -13,7 +13,7 @@ #include #define YAZ_VERSION "2.0.4" -#define YAZ_VERSIONL 0x020004 +#define YAZ_VERSIONL 0x020005 #define YAZ_DATE 1 diff --git a/util/log.c b/util/log.c index 5a61699..90a2c5b 100644 --- a/util/log.c +++ b/util/log.c @@ -2,7 +2,7 @@ * Copyright (c) 1995-2003, Index Data * See the file LICENSE for details. * - * $Id: log.c,v 1.38 2003-05-22 13:15:08 heikki Exp $ + * $Id: log.c,v 1.39 2003-10-09 15:51:36 adam Exp $ */ #if HAVE_CONFIG_H @@ -40,6 +40,7 @@ static int l_level = LOG_DEFAULT_LEVEL; static FILE *l_file = NULL; static char l_prefix[512] = ""; static char l_prefix2[512] = ""; +static char l_fname[512] = ""; static struct { int mask; @@ -70,12 +71,25 @@ FILE *yaz_log_file(void) void yaz_log_init_file (const char *fname) { + if (fname) + { + strncpy(l_fname, fname, sizeof(l_fname)-1); + l_fname[sizeof(l_fname)-1] = '\0'; + } + else + l_fname[0] = '\0'; + yaz_log_reopen(); +} + +void yaz_log_reopen(void) +{ FILE *new_file; if (!l_file) l_file = stderr; - if (!fname || !*fname) + + if (!*l_fname) new_file=stderr; - else if (!(new_file = fopen(fname, "a"))) + else if (!(new_file = fopen(l_fname, "a"))) return; if (l_file != stderr) { diff --git a/win/yaz.nsi b/win/yaz.nsi index dcd580c..d71c842 100644 --- a/win/yaz.nsi +++ b/win/yaz.nsi @@ -1,6 +1,6 @@ -; $Id: yaz.nsi,v 1.24 2003-09-04 18:18:07 adam Exp $ +; $Id: yaz.nsi,v 1.25 2003-10-09 15:51:36 adam Exp $ -!define VERSION "2.0.4" +!define VERSION "2.0.5" Name "YAZ" Caption "Index Data YAZ ${VERSION} Setup" diff --git a/win/yaz.rc b/win/yaz.rc index d0b09e9..a311254 100644 --- a/win/yaz.rc +++ b/win/yaz.rc @@ -54,8 +54,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,0,4,1 - PRODUCTVERSION 2,0,4,1 + FILEVERSION 2,0,5,1 + PRODUCTVERSION 2,0,5,1 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -73,14 +73,14 @@ BEGIN VALUE "Comments", "Z39.50 C Library\0" VALUE "CompanyName", "Index Data\0" VALUE "FileDescription", "YAZ Toolkit\0" - VALUE "FileVersion", "2, 0, 4, 1\0" + VALUE "FileVersion", "2, 0, 5, 1\0" VALUE "InternalName", "YAZ\0" VALUE "LegalCopyright", "Copyright © 1995-2003 Index Data\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "yaz.rc\0" VALUE "PrivateBuild", "\0" VALUE "ProductName", "Index Data YAZ Toolkit\0" - VALUE "ProductVersion", "2, 0, 4, 1\0" + VALUE "ProductVersion", "2, 0, 5, 1\0" VALUE "SpecialBuild", "\0" END END diff --git a/yaz.spec.in b/yaz.spec.in index c85e95a..f70dd60 100644 --- a/yaz.spec.in +++ b/yaz.spec.in @@ -1,7 +1,7 @@ Summary: Z39.50 Programs Name: yaz Version: @VERSION@ -Release: 2 +Release: 1 Requires: libxml2 openssl readline libyaz = %{version} Copyright: YAZ License Group: Other -- 1.7.10.4