Renamed logf function to yaz_log. Removed VC++ project files.
authorAdam Dickmeiss <adam@indexdata.dk>
Fri, 27 Aug 1999 09:40:31 +0000 (09:40 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Fri, 27 Aug 1999 09:40:31 +0000 (09:40 +0000)
37 files changed:
CHANGELOG
README
client/client.c
client/client.dsp [deleted file]
include/log.h
include/wrbuf.h
odr/odr.c
retrieval/d1_absyn.c
retrieval/d1_attset.c
retrieval/d1_doespec.c
retrieval/d1_espec.c
retrieval/d1_expout.c
retrieval/d1_grs.c
retrieval/d1_handle.c
retrieval/d1_map.c
retrieval/d1_marc.c
retrieval/d1_read.c
retrieval/d1_sumout.c
retrieval/d1_tagset.c
retrieval/d1_varset.c
server/eventl.c
server/server.dsp [deleted file]
server/seshigh.c
server/statserv.c
server/tcpdchk.c
util/log.c
util/nmem.c
util/readconf.c
util/wrbuf.c
util/xmalloc.c
windows.txt
yaz.dsp [deleted file]
yaz.dsw [deleted file]
ztest/read-grs.c
ztest/ztest.c
ztest/ztest.dsp [deleted file]
zutil/logrpn.c

index e6e6f79..71b7951 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,8 +1,17 @@
 Possible compatibility problems with earlier versions marked with '*'.
 
 Possible compatibility problems with earlier versions marked with '*'.
 
-Added bend_start/bend_stop handlers for server. These handler
-are called on start/stop of server. For windows they are called
-whenever service is started/stopped.
+Compilation of YAZ for WIN32 is now handled by an nmake-style makefile 
+rather than project/workspace files. We switched because project files
+are incompatible between Visual C++ 5 and 6. Refer to windows.txt for
+details.
+
+Changed name of logging function, logf, to yaz_log, to prevent name
+clash with some math-log functions. The YAZ header log.h defines logf
+to yaz_log so there should be no incompatibilities by this modification.
+
+Added bend_start/bend_stop handlers for server. These handler are
+called on start/stop of server. For windows they are called whenever
+a service is started/stopped.
 
 Assigned OID for old DB Update (VAL_DBUPDATE0). Updated YAZ compiled
 version so that it supports both new - and old version of DB Update
 
 Assigned OID for old DB Update (VAL_DBUPDATE0). Updated YAZ compiled
 version so that it supports both new - and old version of DB Update
diff --git a/README b/README
index e4e66d8..4b7b088 100644 (file)
--- a/README
+++ b/README
@@ -4,14 +4,14 @@
  * Sebastian Hammer, Adam Dickmeiss
 
 Compilation and installation for YAZ 
  * Sebastian Hammer, Adam Dickmeiss
 
 Compilation and installation for YAZ 
-  $Id: README,v 1.26 1999-06-09 14:37:37 adam Exp $
+  $Id: README,v 1.27 1999-08-27 09:40:31 adam Exp $
 
 The primary output of the source here is the lib/libyaz.a library,
 which contains support functions for implementing the server or client
 role of Z39.50/SR.
 
 
 The primary output of the source here is the lib/libyaz.a library,
 which contains support functions for implementing the server or client
 role of Z39.50/SR.
 
-Windows programmers: refer to the file windows.txt which describes
-how to compile the software using Microsoft Visual C++.
+Windows programmers: refer to the file windows.txt which describes how
+to build the software using Microsoft Visual C++.
 
 On Unix, GNU configure is used to configure YAZ and generate Makefiles.
 Type "./configure", then "make" to build YAZ.
 
 On Unix, GNU configure is used to configure YAZ and generate Makefiles.
 Type "./configure", then "make" to build YAZ.
@@ -19,56 +19,49 @@ Type "./configure", then "make" to build YAZ.
 Two test-programs of interest are generated when you type 'make' at the
 top level: ztest/ztest and client/client. Ztest is a dummy database
 server which returns canned responses to all queries. It's good for
 Two test-programs of interest are generated when you type 'make' at the
 top level: ztest/ztest and client/client. Ztest is a dummy database
 server which returns canned responses to all queries. It's good for
-verifying that the protocol works ok, and ztest.c shows a minimalistic
-implementation of the 'backend' interface.
+verifying that the protocol works ok, and ztest.c shows an
+implementation of a 'backend' interface.
 
 Client is a linemode Z39.50 client. It supports a fair amount of the
 functionality of Z39.50v2/SR, but some things you need to enable or
 disable by recompilation. Its primary purpose is to excersise the
 
 Client is a linemode Z39.50 client. It supports a fair amount of the
 functionality of Z39.50v2/SR, but some things you need to enable or
 disable by recompilation. Its primary purpose is to excersise the
-package, and verify that the protocol works OK. It can be started
-by typing
+package, and verify that the protocol works OK. It can be started by
+typing
 
 
-client tcp:<hostname>:<port>
+  client tcp:<hostname>:<port>[/<database>]
 
 
-at the UNIX prompt, to connect to a Z39.50 server, or
-
-client osi:[<tsel>'/']<hostname>:<port>
-
-to connect to an OSI SR target (this requires mOSI-support). To connect
-to the DANBIB test target, you might use:
-
-client osi:0103/find2.denet.dk:4500
+at the UNIX prompt, to connect to a Z39.50 server.
 
 Use '?' to get a list of the available commands.
 
 The current query language for the find command is a bit awkward, but
 functional:
 
 
 Use '?' to get a list of the available commands.
 
 The current query language for the find command is a bit awkward, but
 functional:
 
-query     ::= ['@attrset' <attribute-set>] rpn
-rpn       ::= complex | simple | attr rpn
-complex   ::= operator rpn rpn
-operator  ::= '@and' | '@or' | '@not' | '@prox' proximity
-simple    ::= term | set.
-term      ::= <word> | '"' <term> ... '"'.
-set       ::= '@set' <setname>.
-attr      ::= '@attr' [<attribute-set>] <number> '=' <number>.
-proximity ::= exclusion distance ordered relation which unit
-exclusion ::= '1' | '0' | 'void'
-distance  ::= <number>
-ordered   ::= '1' | '0'
-relation  ::= <number>
-which     ::= 'known' | 'private'
-unit      ::= <number>
+ query     ::= ['@attrset' <attribute-set>] rpn
+ rpn       ::= complex | simple | attr rpn
+ complex   ::= operator rpn rpn
+ operator  ::= '@and' | '@or' | '@not' | '@prox' proximity
+ simple    ::= term | set.
+ term      ::= <word> | '"' <term> ... '"'.
+ set       ::= '@set' <setname>.
+ attr      ::= '@attr' [<attribute-set>] <number> '=' <number>.
+ proximity ::= exclusion distance ordered relation which unit
+ exclusion ::= '1' | '0' | 'void'
+ distance  ::= <number>
+ ordered   ::= '1' | '0'
+ relation  ::= <number>
+ which     ::= 'known' | 'private'
+ unit      ::= <number>
 
 Eg.:
 
 
 Eg.:
 
-Andersen
+ Andersen
 
 
-"Hans Andersen"
+ "Hans Andersen"
 
 
-@and @attr 1=1 andersen @attr 1=4 @attr 4=2 duckling
+ @and @attr 1=1 andersen @attr 1=4 @attr 4=2 duckling
 
 
-@attrset Bib-1 @and @attr GILS 2=2008 Washington @attr 1=21 weather
+ @attrset Bib-1 @and @attr GILS 2=2008 Washington @attr 1=21 weather
 
 The sort command takes a sequence of sort specifications. A sort
 specification holds a field (sort criteria) and is followed by flags.
 
 The sort command takes a sequence of sort specifications. A sort
 specification holds a field (sort criteria) and is followed by flags.
@@ -101,14 +94,14 @@ asn     - This module implements the Z39.50/SR protocol. The best way
        which defines structure and type definitions for each of the
        types introduced in the protocol specification.
 
        which defines structure and type definitions for each of the
        types introduced in the protocol specification.
 
-z39.50 - This module implements the Z39.50 protocol. This module
+z39.50  - This module implements the Z39.50 protocol. This module
         does the same job as the 'asn' module except that the source
         files are auto-generated using an YAZ' ASN.1 Compiler (YC).
 
         does the same job as the 'asn' module except that the source
         files are auto-generated using an YAZ' ASN.1 Compiler (YC).
 
-zutil  - This module implements a collection of Z39.50 utilities, such
+zutil   - This module implements a collection of Z39.50 utilities, such
         as query parsing, EXTERNAL handling, etc.
 
         as query parsing, EXTERNAL handling, etc.
 
-comstack- This module implements the transport transparency
+comstack - This module implements the transport transparency
        stack (COMSTACK). The comstack implements a generic interface
        for exchanging BER-encoded records over a network. It supports
        the 'American' mode of exchanging the records straight over
        stack (COMSTACK). The comstack implements a generic interface
        for exchanging BER-encoded records over a network. It supports
        the 'American' mode of exchanging the records straight over
@@ -120,7 +113,7 @@ rfc1006 - Xtimosi requires an implementation of the OSI transport
        notably) provide this. For others, we provide an
        implementation of the RFC1006 protocol (which is what
        ISODE-based implementations often use). This module is not
        notably) provide this. For others, we provide an
        implementation of the RFC1006 protocol (which is what
        ISODE-based implementations often use). This module is not
-       neeeded if you don't use xtimosi, and it's not included in the
+       needed if you don't use xtimosi, and it's not included in the
        libyaz.a library.
 
 server  - This is the implementation of the server frontend. It
        libyaz.a library.
 
 server  - This is the implementation of the server frontend. It
index 21d1650..4d86eca 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: client.c,v $
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: client.c,v $
- * Revision 1.86  1999-07-06 12:13:35  adam
+ * Revision 1.87  1999-08-27 09:40:32  adam
+ * Renamed logf function to yaz_log. Removed VC++ project files.
+ *
+ * Revision 1.86  1999/07/06 12:13:35  adam
  * Added "schema" command.
  *
  * Revision 1.85  1999/06/16 11:55:24  adam
  * Added "schema" command.
  *
  * Revision 1.85  1999/06/16 11:55:24  adam
@@ -1921,7 +1924,7 @@ int cmd_querytype (char *arg)
 {
     if (!strcmp (arg, "ccl"))
         queryType = QueryType_CCL;
 {
     if (!strcmp (arg, "ccl"))
         queryType = QueryType_CCL;
-    else if (!strcmp (arg, "prefix"))
+    else if (!strcmp (arg, "prefix") || !strcmp(arg, "rpn"))
         queryType = QueryType_Prefix;
 #if CCL2RPN
     else if (!strcmp (arg, "ccl2rpn") || !strcmp (arg, "cclrpn"))
         queryType = QueryType_Prefix;
 #if CCL2RPN
     else if (!strcmp (arg, "ccl2rpn") || !strcmp (arg, "cclrpn"))
diff --git a/client/client.dsp b/client/client.dsp
deleted file mode 100644 (file)
index 2a98180..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-# Microsoft Developer Studio Project File - Name="client" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 5.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=client - Win32 Release
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "client.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "client.mak" CFG="client - Win32 Release"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "client - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "client - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE 
-
-# Begin Project
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "client - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir ".\Release"
-# PROP BASE Intermediate_Dir ".\Release"
-# PROP BASE Target_Dir "."
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ".\Release"
-# PROP Intermediate_Dir ".\Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir "."
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x406 /d "NDEBUG"
-# ADD RSC /l 0x406 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib yaz.lib /nologo /subsystem:console /machine:I386 /libpath:"..\release"
-# Begin Special Build Tool
-OutDir=.\.\Release
-ProjDir=.
-TargetName=client
-SOURCE=$(InputPath)
-PostBuild_Desc=Copy client.exe
-PostBuild_Cmds=copy $(OutDir)\$(TargetName).exe $(ProjDir)\..\..\bin
-# End Special Build Tool
-
-!ELSEIF  "$(CFG)" == "client - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir ".\client__"
-# PROP BASE Intermediate_Dir ".\client__"
-# PROP BASE Target_Dir "."
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ".\Debug"
-# PROP Intermediate_Dir ".\Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir "."
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FR /FD /c
-# SUBTRACT CPP /YX /Yc /Yu
-# ADD BASE RSC /l 0x406 /d "_DEBUG"
-# ADD RSC /l 0x406 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib yaz.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /libpath:"..\debug"
-# Begin Special Build Tool
-OutDir=.\.\Debug
-ProjDir=.
-TargetName=client
-SOURCE=$(InputPath)
-PostBuild_Desc=Copy client.exe
-PostBuild_Cmds=copy $(OutDir)\$(TargetName).exe $(ProjDir)\..\..\bin
-# End Special Build Tool
-
-!ENDIF 
-
-# Begin Target
-
-# Name "client - Win32 Release"
-# Name "client - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
-# Begin Source File
-
-SOURCE=.\client.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
index a7e9c9d..f562dfa 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
- * Copyright (c) 1995-1998, Index Data.
+ * Copyright (c) 1995-1999, Index Data.
  *
  * Permission to use, copy, modify, distribute, and sell this software and
  * its documentation, in whole or in part, for any purpose, is hereby granted,
  *
  * Permission to use, copy, modify, distribute, and sell this software and
  * its documentation, in whole or in part, for any purpose, is hereby granted,
  * OF THIS SOFTWARE.
  *
  * $Log: log.h,v $
  * OF THIS SOFTWARE.
  *
  * $Log: log.h,v $
- * Revision 1.14  1998-10-28 10:26:59  adam
+ * Revision 1.15  1999-08-27 09:40:32  adam
+ * Renamed logf function to yaz_log. Removed VC++ project files.
+ *
+ * Revision 1.14  1998/10/28 10:26:59  adam
  * New functions log_init_file, log_init_level, log_init_prefix.
  *
  * Revision 1.13  1998/10/13 16:11:11  adam
  * New functions log_init_file, log_init_level, log_init_prefix.
  *
  * Revision 1.13  1998/10/13 16:11:11  adam
@@ -103,12 +106,14 @@ extern "C" {
 
 #define LOG_DEFAULT_LEVEL (LOG_FATAL | LOG_ERRNO | LOG_LOG | LOG_WARN)
 
 
 #define LOG_DEFAULT_LEVEL (LOG_FATAL | LOG_ERRNO | LOG_LOG | LOG_WARN)
 
+#define logf yaz_log
+
 YAZ_EXPORT void log_init(int level, const char *prefix, const char *name);
 YAZ_EXPORT void log_init_file (const char *fname);
 YAZ_EXPORT void log_init_level (int level);
 YAZ_EXPORT void log_init_prefix (const char *prefix);
 
 YAZ_EXPORT void log_init(int level, const char *prefix, const char *name);
 YAZ_EXPORT void log_init_file (const char *fname);
 YAZ_EXPORT void log_init_level (int level);
 YAZ_EXPORT void log_init_prefix (const char *prefix);
 
-YAZ_EXPORT void logf(int level, const char *fmt, ...)
+YAZ_EXPORT void yaz_log(int level, const char *fmt, ...)
 #ifdef __GNUC__
        __attribute__ ((format (printf, 2, 3)))
 #endif
 #ifdef __GNUC__
        __attribute__ ((format (printf, 2, 3)))
 #endif
index 3a699bc..99a6327 100644 (file)
  * OF THIS SOFTWARE.
  *
  * $Log: wrbuf.h,v $
  * OF THIS SOFTWARE.
  *
  * $Log: wrbuf.h,v $
- * Revision 1.6  1997-10-31 12:20:08  adam
+ * Revision 1.7  1999-08-27 09:40:32  adam
+ * Renamed logf function to yaz_log. Removed VC++ project files.
+ *
+ * Revision 1.6  1997/10/31 12:20:08  adam
  * Improved memory debugging for xmalloc/nmem.c. References to NMEM
  * instead of ODR in n ESPEC-1 handling in source d1_espec.c.
  * Bug fix: missing fclose in data1_read_espec1.
  * Improved memory debugging for xmalloc/nmem.c. References to NMEM
  * instead of ODR in n ESPEC-1 handling in source d1_espec.c.
  * Bug fix: missing fclose in data1_read_espec1.
@@ -54,7 +57,7 @@ YAZ_EXPORT WRBUF wrbuf_alloc(void);
 YAZ_EXPORT void wrbuf_free(WRBUF b, int free_buf);
 YAZ_EXPORT void wrbuf_rewind(WRBUF b);
 YAZ_EXPORT int wrbuf_grow(WRBUF b, int minsize);
 YAZ_EXPORT void wrbuf_free(WRBUF b, int free_buf);
 YAZ_EXPORT void wrbuf_rewind(WRBUF b);
 YAZ_EXPORT int wrbuf_grow(WRBUF b, int minsize);
-YAZ_EXPORT int wrbuf_write(WRBUF b, char *buf, int size);
+YAZ_EXPORT int wrbuf_write(WRBUF b, const char *buf, int size);
 
 #define wrbuf_len(b) ((b)->pos)
 #define wrbuf_buf(b) ((b)->buf)
 
 #define wrbuf_len(b) ((b)->pos)
 #define wrbuf_buf(b) ((b)->buf)
index 5560934..a2e443c 100644 (file)
--- a/odr/odr.c
+++ b/odr/odr.c
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: odr.c,v $
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: odr.c,v $
- * Revision 1.29  1999-04-27 08:34:10  adam
+ * Revision 1.30  1999-08-27 09:40:32  adam
+ * Renamed logf function to yaz_log. Removed VC++ project files.
+ *
+ * Revision 1.29  1999/04/27 08:34:10  adam
  * Modified odr_destroy so that file is not closed when file is 0.
  *
  * Revision 1.28  1998/07/20 12:38:13  adam
  * Modified odr_destroy so that file is not closed when file is 0.
  *
  * Revision 1.28  1998/07/20 12:38:13  adam
@@ -169,7 +172,7 @@ ODR odr_createmem(int direction)
     r->enable_bias = 1;
     r->odr_ber_tag.lclass = -1;
     odr_reset(r);
     r->enable_bias = 1;
     r->odr_ber_tag.lclass = -1;
     odr_reset(r);
-    logf (LOG_DEBUG, "odr_createmem dir=%d o=%p", direction, r);
+    yaz_log (LOG_DEBUG, "odr_createmem dir=%d o=%p", direction, r);
     return r;
 }
 
     return r;
 }
 
@@ -187,7 +190,7 @@ void odr_reset(ODR o)
     nmem_reset(o->mem);
     o->choice_bias = -1;
     o->lenlen = 1;
     nmem_reset(o->mem);
     o->choice_bias = -1;
     o->lenlen = 1;
-    logf (LOG_DEBUG, "odr_reset o=%p", o);
+    yaz_log (LOG_DEBUG, "odr_reset o=%p", o);
 }
     
 void odr_destroy(ODR o)
 }
     
 void odr_destroy(ODR o)
@@ -198,7 +201,7 @@ void odr_destroy(ODR o)
     if (o->print && o->print != stderr)
         fclose(o->print);
     xfree(o);
     if (o->print && o->print != stderr)
         fclose(o->print);
     xfree(o);
-    logf (LOG_DEBUG, "odr_destroy o=%p", o);
+    yaz_log (LOG_DEBUG, "odr_destroy o=%p", o);
 }
 
 void odr_setbuf(ODR o, char *buf, int len, int can_grow)
 }
 
 void odr_setbuf(ODR o, char *buf, int len, int can_grow)
index 71e35de..6ff747b 100644 (file)
@@ -1,10 +1,13 @@
 /*
 /*
- * Copyright (c) 1995-1998, Index Data.
+ * Copyright (c) 1995-1999, Index Data.
  * See the file LICENSE for details.
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: d1_absyn.c,v $
  * See the file LICENSE for details.
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: d1_absyn.c,v $
- * Revision 1.23  1998-10-15 08:29:16  adam
+ * Revision 1.24  1999-08-27 09:40:32  adam
+ * Renamed logf function to yaz_log. Removed VC++ project files.
+ *
+ * Revision 1.23  1998/10/15 08:29:16  adam
  * Tag set type may be specified in reference to it using "tagset"
  * directive in .abs-files and "include" directive in .tag-files.
  *
  * Tag set type may be specified in reference to it using "tagset"
  * directive in .abs-files and "include" directive in .tag-files.
  *
@@ -212,7 +215,7 @@ data1_attset *data1_attset_add (data1_handle dh, const char *name)
            *cp = '\0';
     }
     if (!attset)
            *cp = '\0';
     }
     if (!attset)
-       logf (LOG_WARN|LOG_ERRNO, "Couldn't load attribute set %s", name);
+       yaz_log (LOG_WARN|LOG_ERRNO, "Couldn't load attribute set %s", name);
     else
     {
        data1_attset_cache p = (data1_attset_cache)
     else
     {
        data1_attset_cache p = (data1_attset_cache)
@@ -298,7 +301,7 @@ void fix_element_ref (data1_handle dh, data1_absyn *absyn, data1_element *e)
            if (sub_e)
                e->children = sub_e->elements;
            else
            if (sub_e)
                e->children = sub_e->elements;
            else
-               logf (LOG_WARN, "Unresolved reference to sub-elements %s",
+               yaz_log (LOG_WARN, "Unresolved reference to sub-elements %s",
                      e->sub_name);
        }
     }
                      e->sub_name);
        }
     }
@@ -323,7 +326,7 @@ data1_absyn *data1_read_absyn (data1_handle dh, const char *file)
 
     if (!(f = yaz_path_fopen(data1_get_tabpath (dh), file, "r")))
     {
 
     if (!(f = yaz_path_fopen(data1_get_tabpath (dh), file, "r")))
     {
-       logf(LOG_WARN|LOG_ERRNO, "Couldn't open %s", file);
+       yaz_log(LOG_WARN|LOG_ERRNO, "Couldn't open %s", file);
        return 0;
     }
     
        return 0;
     }
     
@@ -360,7 +363,7 @@ data1_absyn *data1_read_absyn (data1_handle dh, const char *file)
 
            if (argc < 4)
            {
 
            if (argc < 4)
            {
-               logf(LOG_WARN, "%s:%d: Bad # of args to elm", file, lineno);
+               yaz_log(LOG_WARN, "%s:%d: Bad # of args to elm", file, lineno);
                continue;
            }
            path = argv[1];
                continue;
            }
            path = argv[1];
@@ -391,7 +394,7 @@ data1_absyn *data1_read_absyn (data1_handle dh, const char *file)
            }
            if (i > level + 1)
            {
            }
            if (i > level + 1)
            {
-               logf(LOG_WARN, "%s:%d: Bad level increase", file, lineno);
+               yaz_log(LOG_WARN, "%s:%d: Bad level increase", file, lineno);
                fclose(f);
                return 0;
            }
                fclose(f);
                return 0;
            }
@@ -419,14 +422,14 @@ data1_absyn *data1_read_absyn (data1_handle dh, const char *file)
            {
                if (!res->tagset)
                {
            {
                if (!res->tagset)
                {
-                   logf(LOG_WARN, "%s:%d: No tagset loaded", file, lineno);
+                   yaz_log(LOG_WARN, "%s:%d: No tagset loaded", file, lineno);
                    fclose(f);
                    return 0;
                }
                if (!(new_element->tag = data1_gettagbynum (dh, res->tagset,
                                                            type, value)))
                {
                    fclose(f);
                    return 0;
                }
                if (!(new_element->tag = data1_gettagbynum (dh, res->tagset,
                                                            type, value)))
                {
-                   logf(LOG_WARN, "%s:%d: Couldn't find tag %s in tagset",
+                   yaz_log(LOG_WARN, "%s:%d: Couldn't find tag %s in tagset",
                         file, lineno, p);
                    fclose(f);
                    return 0;
                         file, lineno, p);
                    fclose(f);
                    return 0;
@@ -452,7 +455,7 @@ data1_absyn *data1_read_absyn (data1_handle dh, const char *file)
            }
            else
            {
            }
            else
            {
-               logf(LOG_WARN, "%s:%d: Bad element", file, lineno);
+               yaz_log(LOG_WARN, "%s:%d: Bad element", file, lineno);
                fclose(f);
                return 0;
            }
                fclose(f);
                return 0;
            }
@@ -471,7 +474,7 @@ data1_absyn *data1_read_absyn (data1_handle dh, const char *file)
                    if (!(r = sscanf(p, "%511[^:,]:%511[^,]", attname,
                                     structure)))
                    {
                    if (!(r = sscanf(p, "%511[^:,]:%511[^,]", attname,
                                     structure)))
                    {
-                       logf(LOG_WARN,
+                       yaz_log(LOG_WARN,
                             "%s:%d: Syntax error in termlistspec '%s'",
                             file, lineno, p);
                        fclose(f);
                             "%s:%d: Syntax error in termlistspec '%s'",
                             file, lineno, p);
                        fclose(f);
@@ -485,7 +488,7 @@ data1_absyn *data1_read_absyn (data1_handle dh, const char *file)
                    if (!((*tp)->att = data1_getattbyname(dh, res->attset,
                                                          attname)))
                    {
                    if (!((*tp)->att = data1_getattbyname(dh, res->attset,
                                                          attname)))
                    {
-                       logf(LOG_WARN,
+                       yaz_log(LOG_WARN,
                             "%s:%d: Couldn't find att '%s' in attset",
                             file, lineno, attname);
                        fclose(f);
                             "%s:%d: Couldn't find att '%s' in attset",
                             file, lineno, attname);
                        fclose(f);
@@ -513,7 +516,7 @@ data1_absyn *data1_read_absyn (data1_handle dh, const char *file)
            
            if (argc < 2)
            {
            
            if (argc < 2)
            {
-               logf(LOG_WARN, "%s:%d: Bad # of args to section",
+               yaz_log(LOG_WARN, "%s:%d: Bad # of args to section",
                     file, lineno);
                continue;
            }
                     file, lineno);
                continue;
            }
@@ -536,14 +539,14 @@ data1_absyn *data1_read_absyn (data1_handle dh, const char *file)
            
            if (all)
            {
            
            if (all)
            {
-               logf(LOG_WARN, "%s:%d: Too many 'all' directives - ignored",
+               yaz_log(LOG_WARN, "%s:%d: Too many 'all' directives - ignored",
                     file, lineno);
                continue;
            }
 
            if (argc != 2)
            {
                     file, lineno);
                continue;
            }
 
            if (argc != 2)
            {
-               logf(LOG_WARN, "%s:%d: Bad # of args to 'all' directive",
+               yaz_log(LOG_WARN, "%s:%d: Bad # of args to 'all' directive",
                     file, lineno);
                continue;
            }
                     file, lineno);
                continue;
            }
@@ -557,7 +560,7 @@ data1_absyn *data1_read_absyn (data1_handle dh, const char *file)
                if (!(r = sscanf(p, "%511[^:,]:%511[^,]", attname,
                                 structure)))
                {
                if (!(r = sscanf(p, "%511[^:,]:%511[^,]", attname,
                                 structure)))
                {
-                   logf(LOG_WARN, "%s:%d: Syntax error in termlistspec",
+                   yaz_log(LOG_WARN, "%s:%d: Syntax error in termlistspec",
                         file, lineno);
                    fclose(f);
                    return 0;
                         file, lineno);
                    fclose(f);
                    return 0;
@@ -567,7 +570,7 @@ data1_absyn *data1_read_absyn (data1_handle dh, const char *file)
                if (!((*tp)->att =
                      data1_getattbyname (dh, res->attset, attname)))
                {
                if (!((*tp)->att =
                      data1_getattbyname (dh, res->attset, attname)))
                {
-                   logf(LOG_WARN, "%s:%d: Couldn't find att '%s' in attset",
+                   yaz_log(LOG_WARN, "%s:%d: Couldn't find att '%s' in attset",
                         file, lineno, attname);
                    fclose(f);
                    return 0;
                         file, lineno, attname);
                    fclose(f);
                    return 0;
@@ -590,7 +593,7 @@ data1_absyn *data1_read_absyn (data1_handle dh, const char *file)
        {
            if (argc != 2)
            {
        {
            if (argc != 2)
            {
-               logf(LOG_WARN, "%s:%d: Bad # of args to name directive",
+               yaz_log(LOG_WARN, "%s:%d: Bad # of args to name directive",
                     file, lineno);
                continue;
            }
                     file, lineno);
                continue;
            }
@@ -602,14 +605,14 @@ data1_absyn *data1_read_absyn (data1_handle dh, const char *file)
            
            if (argc != 2)
            {
            
            if (argc != 2)
            {
-               logf(LOG_WARN, "%s:%d: Bad # of args to reference",
+               yaz_log(LOG_WARN, "%s:%d: Bad # of args to reference",
                     file, lineno);
                continue;
            }
            name = argv[1];
            if ((res->reference = oid_getvalbyname(name)) == VAL_NONE)
            {
                     file, lineno);
                continue;
            }
            name = argv[1];
            if ((res->reference = oid_getvalbyname(name)) == VAL_NONE)
            {
-               logf(LOG_WARN, "%s:%d: Unknown tagset ref '%s'", 
+               yaz_log(LOG_WARN, "%s:%d: Unknown tagset ref '%s'", 
                     file, lineno, name);
                continue;
            }
                     file, lineno, name);
                continue;
            }
@@ -621,14 +624,14 @@ data1_absyn *data1_read_absyn (data1_handle dh, const char *file)
            
            if (argc != 2)
            {
            
            if (argc != 2)
            {
-               logf(LOG_WARN, "%s:%d: Bad # of args to attset",
+               yaz_log(LOG_WARN, "%s:%d: Bad # of args to attset",
                     file, lineno);
                continue;
            }
            name = argv[1];
            if (!(attset = data1_get_attset (dh, name)))
            {
                     file, lineno);
                continue;
            }
            name = argv[1];
            if (!(attset = data1_get_attset (dh, name)))
            {
-               logf(LOG_WARN, "%s:%d: Couldn't find attset  %s",
+               yaz_log(LOG_WARN, "%s:%d: Couldn't find attset  %s",
                     file, lineno, name);
                continue;
            }
                     file, lineno, name);
                continue;
            }
@@ -644,7 +647,7 @@ data1_absyn *data1_read_absyn (data1_handle dh, const char *file)
            int type = 0;
            if (argc < 2)
            {
            int type = 0;
            if (argc < 2)
            {
-               logf(LOG_WARN, "%s:%d: Bad # of args to tagset",
+               yaz_log(LOG_WARN, "%s:%d: Bad # of args to tagset",
                     file, lineno);
                continue;
            }
                     file, lineno);
                continue;
            }
@@ -654,7 +657,7 @@ data1_absyn *data1_read_absyn (data1_handle dh, const char *file)
            *tagset_childp = data1_read_tagset (dh, name, type);
            if (!(*tagset_childp))
            {
            *tagset_childp = data1_read_tagset (dh, name, type);
            if (!(*tagset_childp))
            {
-               logf(LOG_WARN, "%s:%d: Couldn't load tagset %s",
+               yaz_log(LOG_WARN, "%s:%d: Couldn't load tagset %s",
                     file, lineno, name);
                continue;
            }
                     file, lineno, name);
                continue;
            }
@@ -666,14 +669,14 @@ data1_absyn *data1_read_absyn (data1_handle dh, const char *file)
 
            if (argc != 2)
            {
 
            if (argc != 2)
            {
-               logf(LOG_WARN, "%s:%d: Bad # of args in varset",
+               yaz_log(LOG_WARN, "%s:%d: Bad # of args in varset",
                     file, lineno);
                continue;
            }
            name = argv[1];
            if (!(res->varset = data1_read_varset (dh, name)))
            {
                     file, lineno);
                continue;
            }
            name = argv[1];
            if (!(res->varset = data1_read_varset (dh, name)))
            {
-               logf(LOG_WARN, "%s:%d: Couldn't load Varset %s",
+               yaz_log(LOG_WARN, "%s:%d: Couldn't load Varset %s",
                     file, lineno, name);
                continue;
            }
                     file, lineno, name);
                continue;
            }
@@ -684,7 +687,7 @@ data1_absyn *data1_read_absyn (data1_handle dh, const char *file)
 
            if (argc != 3)
            {
 
            if (argc != 3)
            {
-               logf(LOG_WARN, "%s:%d: Bad # of args in esetname",
+               yaz_log(LOG_WARN, "%s:%d: Bad # of args in esetname",
                     file, lineno);
                continue;
            }
                     file, lineno);
                continue;
            }
@@ -699,7 +702,7 @@ data1_absyn *data1_read_absyn (data1_handle dh, const char *file)
                (*esetpp)->spec = 0;
            else if (!((*esetpp)->spec = data1_read_espec1 (dh, fname)))
            {
                (*esetpp)->spec = 0;
            else if (!((*esetpp)->spec = data1_read_espec1 (dh, fname)))
            {
-               logf(LOG_WARN, "%s:%d: Espec-1 read failed for %s",
+               yaz_log(LOG_WARN, "%s:%d: Espec-1 read failed for %s",
                     file, lineno, fname);
                continue;
            }
                     file, lineno, fname);
                continue;
            }
@@ -711,14 +714,14 @@ data1_absyn *data1_read_absyn (data1_handle dh, const char *file)
            
            if (argc != 2)
            {
            
            if (argc != 2)
            {
-               logf(LOG_WARN, "%s:%d: Bad # of args for maptab",
+               yaz_log(LOG_WARN, "%s:%d: Bad # of args for maptab",
                      file, lineno);
                continue;
            }
            name = argv[1];
            if (!(*maptabp = data1_read_maptab (dh, name)))
            {
                      file, lineno);
                continue;
            }
            name = argv[1];
            if (!(*maptabp = data1_read_maptab (dh, name)))
            {
-               logf(LOG_WARN, "%s:%d: Couldn't load maptab %s",
+               yaz_log(LOG_WARN, "%s:%d: Couldn't load maptab %s",
                      file, lineno, name);
                continue;
            }
                      file, lineno, name);
                continue;
            }
@@ -730,14 +733,14 @@ data1_absyn *data1_read_absyn (data1_handle dh, const char *file)
            
            if (argc != 2)
            {
            
            if (argc != 2)
            {
-               logf(LOG_WARN, "%s:%d: Bad # or args for marc",
+               yaz_log(LOG_WARN, "%s:%d: Bad # or args for marc",
                     file, lineno);
                continue;
            }
            name = argv[1];
            if (!(*marcp = data1_read_marctab (dh, name)))
            {
                     file, lineno);
                continue;
            }
            name = argv[1];
            if (!(*marcp = data1_read_marctab (dh, name)))
            {
-               logf(LOG_WARN, "%s:%d: Couldn't read marctab %s",
+               yaz_log(LOG_WARN, "%s:%d: Couldn't read marctab %s",
                      file, lineno, name);
                continue;
            }
                      file, lineno, name);
                continue;
            }
@@ -745,7 +748,7 @@ data1_absyn *data1_read_absyn (data1_handle dh, const char *file)
        }
        else
        {
        }
        else
        {
-           logf(LOG_WARN, "%s:%d: Unknown directive '%s'", file, lineno, cmd);
+           yaz_log(LOG_WARN, "%s:%d: Unknown directive '%s'", file, lineno, cmd);
            continue;
        }
     }
            continue;
        }
     }
@@ -758,6 +761,6 @@ data1_absyn *data1_read_absyn (data1_handle dh, const char *file)
            res->main_elements = cur_elements->elements;
        fix_element_ref (dh, res, cur_elements->elements);
     }
            res->main_elements = cur_elements->elements;
        fix_element_ref (dh, res, cur_elements->elements);
     }
-    logf (LOG_DEBUG, "%s: data1_read_absyn end", file);
+    yaz_log (LOG_DEBUG, "%s: data1_read_absyn end", file);
     return res;
 }
     return res;
 }
index 8ee20ad..30d84ec 100644 (file)
@@ -1,10 +1,13 @@
 /*
 /*
- * Copyright (c) 1995-1998, Index Data.
+ * Copyright (c) 1995-1999, Index Data.
  * See the file LICENSE for details.
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: d1_attset.c,v $
  * See the file LICENSE for details.
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: d1_attset.c,v $
- * Revision 1.11  1998-10-14 13:31:56  adam
+ * Revision 1.12  1999-08-27 09:40:32  adam
+ * Renamed logf function to yaz_log. Removed VC++ project files.
+ *
+ * Revision 1.11  1998/10/14 13:31:56  adam
  * Bug fix. Bug introduced by previous commit.
  *
  * Revision 1.10  1998/10/13 16:09:48  adam
  * Bug fix. Bug introduced by previous commit.
  *
  * Revision 1.10  1998/10/13 16:09:48  adam
@@ -119,7 +122,7 @@ data1_attset *data1_read_attset(data1_handle dh, const char *file)
            
            if (argc < 3)
            {
            
            if (argc < 3)
            {
-               logf(LOG_WARN, "%s:%d: Bad # of args to att", file, lineno);
+               yaz_log(LOG_WARN, "%s:%d: Bad # of args to att", file, lineno);
                continue;
            }
            num = atoi (argv[1]);
                continue;
            }
            num = atoi (argv[1]);
@@ -158,7 +161,7 @@ data1_attset *data1_read_attset(data1_handle dh, const char *file)
        {
            if (argc != 2)
            {
        {
            if (argc != 2)
            {
-               logf(LOG_WARN, "%s:%d: Bad # of args to name", file, lineno);
+               yaz_log(LOG_WARN, "%s:%d: Bad # of args to name", file, lineno);
                continue;
            }
        }
                continue;
            }
        }
@@ -168,23 +171,23 @@ data1_attset *data1_read_attset(data1_handle dh, const char *file)
 
            if (argc != 2)
            {
 
            if (argc != 2)
            {
-               logf(LOG_WARN, "%s:%d: Bad # of args to reference",
-                    file, lineno);
+               yaz_log(LOG_WARN, "%s:%d: Bad # of args to reference",
+                       file, lineno);
                continue;
            }
            name = argv[1];
            if ((res->reference = oid_getvalbyname(name)) == VAL_NONE)
            {
                continue;
            }
            name = argv[1];
            if ((res->reference = oid_getvalbyname(name)) == VAL_NONE)
            {
-               logf(LOG_WARN, "%s:%d: Unknown reference oid '%s'",
-                    file, lineno, name);
+               yaz_log(LOG_WARN, "%s:%d: Unknown reference oid '%s'",
+                       file, lineno, name);
                fclose(f);
                return 0;
            }
        }
        else if (!strcmp(cmd, "ordinal"))
        {
                fclose(f);
                return 0;
            }
        }
        else if (!strcmp(cmd, "ordinal"))
        {
-           logf (LOG_WARN, "%s:%d: Directive ordinal ignored",
-                 file, lineno);
+           yaz_log (LOG_WARN, "%s:%d: Directive ordinal ignored",
+                    file, lineno);
        }
        else if (!strcmp(cmd, "include"))
        {
        }
        else if (!strcmp(cmd, "include"))
        {
@@ -193,16 +196,16 @@ data1_attset *data1_read_attset(data1_handle dh, const char *file)
 
            if (argc != 2)
            {
 
            if (argc != 2)
            {
-               logf(LOG_WARN, "%s:%d: Bad # of args to include",
-                    file, lineno);
+               yaz_log(LOG_WARN, "%s:%d: Bad # of args to include",
+                       file, lineno);
                continue;
            }
            name = argv[1];
 
            if (!(attset = data1_get_attset (dh, name)))
            {
                continue;
            }
            name = argv[1];
 
            if (!(attset = data1_get_attset (dh, name)))
            {
-               logf(LOG_WARN, "%s:%d: Include of attset %s failed",
-                    file, lineno, name);
+               yaz_log(LOG_WARN, "%s:%d: Include of attset %s failed",
+                       file, lineno, name);
                continue;
                
            }
                continue;
                
            }
@@ -214,8 +217,8 @@ data1_attset *data1_read_attset(data1_handle dh, const char *file)
        }
        else
        {
        }
        else
        {
-           logf(LOG_WARN, "%s:%d: Unknown directive '%s'",
-                file, lineno, cmd);
+           yaz_log(LOG_WARN, "%s:%d: Unknown directive '%s'",
+                   file, lineno, cmd);
        }
     }
     fclose(f);
        }
     }
     fclose(f);
index a8d190c..62a4d1d 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: d1_doespec.c,v $
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: d1_doespec.c,v $
- * Revision 1.12  1999-04-23 13:34:33  adam
+ * Revision 1.13  1999-08-27 09:40:32  adam
+ * Renamed logf function to yaz_log. Removed VC++ project files.
+ *
+ * Revision 1.12  1999/04/23 13:34:33  adam
  * Fixed bug in match_triple. Thanks to Franck Falcoz <franck@dtv.dk>.
  *
  * Revision 1.11  1997/11/06 11:36:44  adam
  * Fixed bug in match_triple. Thanks to Franck Falcoz <franck@dtv.dk>.
  *
  * Revision 1.11  1997/11/06 11:36:44  adam
@@ -219,7 +222,7 @@ static int match_children_here (data1_handle dh, data1_node *n,
        counter++;
        if (occur && occur->which == Z_Occurrences_last)
        {
        counter++;
        if (occur && occur->which == Z_Occurrences_last)
        {
-           logf(LOG_WARN, "Can't do occurrences=last (yet)");
+           yaz_log(LOG_WARN, "Can't do occurrences=last (yet)");
            return 0;
        }
        if (!occur || occur->which == Z_Occurrences_all ||
            return 0;
        }
        if (!occur || occur->which == Z_Occurrences_all ||
index 4bbd373..0b6b638 100644 (file)
@@ -1,10 +1,13 @@
 /*
 /*
- * Copyright (c) 1995-1998, Index Data.
+ * Copyright (c) 1995-1999, Index Data.
  * See the file LICENSE for details.
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: d1_espec.c,v $
  * See the file LICENSE for details.
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: d1_espec.c,v $
- * Revision 1.15  1998-10-13 16:09:49  adam
+ * Revision 1.16  1999-08-27 09:40:32  adam
+ * Renamed logf function to yaz_log. Removed VC++ project files.
+ *
+ * Revision 1.15  1998/10/13 16:09:49  adam
  * Added support for arbitrary OID's for tagsets, schemas and attribute sets.
  * Added support for multiple attribute set references and tagset references
  * from an abstract syntax file.
  * Added support for arbitrary OID's for tagsets, schemas and attribute sets.
  * Added support for multiple attribute set references and tagset references
  * from an abstract syntax file.
@@ -98,8 +101,8 @@ static Z_Variant *read_variant(int argc, char **argv, NMEM nmem,
 
        if (sscanf(argv[i], "(%d,%d,%[^)])", &zclass, &type, value) < 3)
        {
 
        if (sscanf(argv[i], "(%d,%d,%[^)])", &zclass, &type, value) < 3)
        {
-           logf(LOG_WARN, "%s:%d: Syntax error in variant component '%s'",
-                file, lineno, argv[i]);
+           yaz_log(LOG_WARN, "%s:%d: Syntax error in variant component '%s'",
+                   file, lineno, argv[i]);
            return 0;
        }
        t = r->triples[i] = (Z_Triple *)nmem_malloc(nmem, sizeof(Z_Triple));
            return 0;
        }
        t = r->triples[i] = (Z_Triple *)nmem_malloc(nmem, sizeof(Z_Triple));
@@ -166,8 +169,8 @@ static Z_Occurrences *read_occurrences(char *occ, NMEM nmem,
     
        if (!isdigit(*occ))
        {
     
        if (!isdigit(*occ))
        {
-           logf(LOG_WARN, "%s:%d: Bad occurrences-spec %s",
-                file, lineno, occ);
+           yaz_log(LOG_WARN, "%s:%d: Bad occurrences-spec %s",
+                   file, lineno, occ);
            return 0;
        }
        op->which = Z_Occurrences_values;
            return 0;
        }
        op->which = Z_Occurrences_values;
@@ -261,7 +264,7 @@ Z_Espec1 *data1_read_espec1 (data1_handle dh, const char *file)
     
     if (!(f = yaz_path_fopen(data1_get_tabpath(dh), file, "r")))
     {
     
     if (!(f = yaz_path_fopen(data1_get_tabpath(dh), file, "r")))
     {
-       logf(LOG_WARN|LOG_ERRNO, "%s", file);
+       yaz_log(LOG_WARN|LOG_ERRNO, "%s", file);
        return 0;
     }
     
        return 0;
     }
     
@@ -280,8 +283,8 @@ Z_Espec1 *data1_read_espec1 (data1_handle dh, const char *file)
            
            if (!nnames)
            {
            
            if (!nnames)
            {
-               logf(LOG_WARN, "%s:%d: Empty elementsetnames directive",
-                    file, lineno);
+               yaz_log(LOG_WARN, "%s:%d: Empty elementsetnames directive",
+                       file, lineno);
                continue;
            }
            
                continue;
            }
            
@@ -299,15 +302,15 @@ Z_Espec1 *data1_read_espec1 (data1_handle dh, const char *file)
        {
            if (argc != 2)
            {
        {
            if (argc != 2)
            {
-               logf(LOG_WARN, "%s:%d: Bad # of args for %s",
-                    file, lineno, argv[0]);
+               yaz_log(LOG_WARN, "%s:%d: Bad # of args for %s",
+                       file, lineno, argv[0]);
                continue;
            }
            if (!(res->defaultVariantSetId =
                  odr_getoidbystr_nmem(nmem, argv[1])))
            {
                continue;
            }
            if (!(res->defaultVariantSetId =
                  odr_getoidbystr_nmem(nmem, argv[1])))
            {
-               logf(LOG_WARN, "%s:%d: Bad defaultvariantsetid",
-                    file, lineno);
+               yaz_log(LOG_WARN, "%s:%d: Bad defaultvariantsetid",
+                       file, lineno);
                continue;
            }
        }
                continue;
            }
        }
@@ -315,8 +318,8 @@ Z_Espec1 *data1_read_espec1 (data1_handle dh, const char *file)
        {
            if (argc != 2)
            {
        {
            if (argc != 2)
            {
-               logf(LOG_WARN, "%s:%d: Bad # of args for %s",
-                    file, lineno, argv[0]);
+               yaz_log(LOG_WARN, "%s:%d: Bad # of args for %s",
+                       file, lineno, argv[0]);
                continue;
            }
            res->defaultTagType = (int *)nmem_malloc(nmem, sizeof(int));
                continue;
            }
            res->defaultTagType = (int *)nmem_malloc(nmem, sizeof(int));
@@ -327,8 +330,8 @@ Z_Espec1 *data1_read_espec1 (data1_handle dh, const char *file)
            if (!(res->defaultVariantRequest =
                  read_variant(argc-1, argv+1, nmem, file, lineno)))
            {
            if (!(res->defaultVariantRequest =
                  read_variant(argc-1, argv+1, nmem, file, lineno)))
            {
-               logf(LOG_WARN, "%s:%d: Bad defaultvariantrequest",
-                    file, lineno);
+               yaz_log(LOG_WARN, "%s:%d: Bad defaultvariantrequest",
+                       file, lineno);
                continue;
            }
        }
                continue;
            }
        }
@@ -354,8 +357,8 @@ Z_Espec1 *data1_read_espec1 (data1_handle dh, const char *file)
            }
            if (argc < 2)
            {
            }
            if (argc < 2)
            {
-               logf(LOG_WARN, "%s:%d: Bad # of args for %s",
-                    file, lineno, argv[0]);
+               yaz_log(LOG_WARN, "%s:%d: Bad # of args for %s",
+                       file, lineno, argv[0]);
                continue;
            }
            
                continue;
            }
            
@@ -391,8 +394,8 @@ Z_Espec1 *data1_read_espec1 (data1_handle dh, const char *file)
                    read_variant(argc-3, argv+3, nmem, file, lineno);
        }
        else
                    read_variant(argc-3, argv+3, nmem, file, lineno);
        }
        else
-           logf(LOG_WARN, "%s:%d: Unknown directive '%s'",
-                file, lineno, argv[0]);
+           yaz_log(LOG_WARN, "%s:%d: Unknown directive '%s'",
+                   file, lineno, argv[0]);
     fclose (f);
     return res;
 }
     fclose (f);
     return res;
 }
index 18de3d3..3df9694 100644 (file)
@@ -1,10 +1,13 @@
 /*
 /*
- * Copyright (c) 1995-1998, Index Data.
+ * Copyright (c) 1995-1999, Index Data.
  * See the file LICENSE for details.
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: d1_expout.c,v $
  * See the file LICENSE for details.
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: d1_expout.c,v $
- * Revision 1.15  1998-09-28 12:44:40  adam
+ * Revision 1.16  1999-08-27 09:40:32  adam
+ * Renamed logf function to yaz_log. Removed VC++ project files.
+ *
+ * Revision 1.15  1998/09/28 12:44:40  adam
  * Fixed bug in f_integer.
  *
  * Revision 1.14  1998/06/08 14:26:41  adam
  * Fixed bug in f_integer.
  *
  * Revision 1.14  1998/06/08 14:26:41  adam
@@ -81,12 +84,12 @@ static int is_numeric_tag (ExpHandle *eh, data1_node *c)
        return 0;
     if (!c->u.tag.element)
     {
        return 0;
     if (!c->u.tag.element)
     {
-       logf(LOG_WARN, "Tag %s is local", c->u.tag.tag);
+       yaz_log(LOG_WARN, "Tag %s is local", c->u.tag.tag);
        return 0;
     }
     if (c->u.tag.element->tag->which != DATA1T_numeric)
     {
        return 0;
     }
     if (c->u.tag.element->tag->which != DATA1T_numeric)
     {
-       logf(LOG_WARN, "Tag %s is not numeric", c->u.tag.tag);
+       yaz_log(LOG_WARN, "Tag %s is not numeric", c->u.tag.tag);
        return 0;
     }
     if (eh->select && !c->u.tag.node_selected)
        return 0;
     }
     if (eh->select && !c->u.tag.node_selected)
@@ -1415,7 +1418,7 @@ Z_ExplainRecord *data1_nodetoexplain (data1_handle dh, data1_node *n,
     assert(n->which == DATA1N_root);
     if (strcmp(n->u.root.type, "explain"))
     {
     assert(n->which == DATA1N_root);
     if (strcmp(n->u.root.type, "explain"))
     {
-       logf(LOG_WARN, "Attempt to convert a non-Explain record");
+       yaz_log(LOG_WARN, "Attempt to convert a non-Explain record");
        return 0;
     }
     for (n = n->child; n; n = n->next)
        return 0;
     }
     for (n = n->child; n; n = n->next)
@@ -1449,6 +1452,6 @@ Z_ExplainRecord *data1_nodetoexplain (data1_handle dh, data1_node *n,
            return res;
        }
     }
            return res;
        }
     }
-    logf(LOG_WARN, "No category in Explain record");
+    yaz_log(LOG_WARN, "No category in Explain record");
     return 0;
 }
     return 0;
 }
index 14503b4..a222aee 100644 (file)
@@ -1,10 +1,13 @@
 /*
 /*
- * Copyright (c) 1995-1998, Index Data.
+ * Copyright (c) 1995-1999, Index Data.
  * See the file LICENSE for details.
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: d1_grs.c,v $
  * See the file LICENSE for details.
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: d1_grs.c,v $
- * Revision 1.15  1999-03-31 11:18:25  adam
+ * Revision 1.16  1999-08-27 09:40:32  adam
+ * Renamed logf function to yaz_log. Removed VC++ project files.
+ *
+ * Revision 1.15  1999/03/31 11:18:25  adam
  * Implemented odr_strdup. Added Reference ID to backend server API.
  *
  * Revision 1.14  1998/03/16 12:21:15  adam
  * Implemented odr_strdup. Added Reference ID to backend server API.
  *
  * Revision 1.14  1998/03/16 12:21:15  adam
@@ -124,8 +127,8 @@ static Z_Variant *make_variant(data1_node *n, int num, ODR o)
                     odr_strdup(o, p->u.variant.value);
                break;
            default:
                     odr_strdup(o, p->u.variant.value);
                break;
            default:
-               logf(LOG_WARN, "Unable to handle value for variant %s",
-                   p->u.variant.type->name);
+               yaz_log(LOG_WARN, "Unable to handle value for variant %s",
+                       p->u.variant.type->name);
                return 0;
        }
     }
                return 0;
        }
     }
@@ -148,8 +151,8 @@ static int traverse_triples(data1_node *n, int level, Z_ElementMetaData *m,
                    D1_VARIANTARRAY);
            else if (m->num_supportedVariants >= D1_VARIANTARRAY)
            {
                    D1_VARIANTARRAY);
            else if (m->num_supportedVariants >= D1_VARIANTARRAY)
            {
-               logf(LOG_WARN, "Too many variants (D1_VARIANTARRAY==%d)",
-                   D1_VARIANTARRAY);
+               yaz_log(LOG_WARN, "Too many variants (D1_VARIANTARRAY==%d)",
+                       D1_VARIANTARRAY);
                return -1;
            }
 
                return -1;
            }
 
@@ -209,7 +212,7 @@ static Z_ElementData *nodetoelementdata(data1_handle dh, data1_node *n,
                *len += n->u.data.len;
                break;
            default:
                *len += n->u.data.len;
                break;
            default:
-               logf(LOG_WARN, "Can't handle datatype.");
+               yaz_log(LOG_WARN, "Can't handle datatype.");
                return 0;
        }
     }
                return 0;
        }
     }
@@ -247,7 +250,7 @@ static Z_TaggedElement *nodetotaggedelement(data1_handle dh, data1_node *n,
        if (!(tag = data1_gettagbyname (dh, n->root->u.root.absyn->tagset,
                                        "wellKnown")))
        {
        if (!(tag = data1_gettagbyname (dh, n->root->u.root.absyn->tagset,
                                        "wellKnown")))
        {
-           logf(LOG_WARN, "Unable to locate tag for 'wellKnown'");
+           yaz_log(LOG_WARN, "Unable to locate tag for 'wellKnown'");
            return 0;
        }
        data = n;
            return 0;
        }
        data = n;
@@ -255,7 +258,7 @@ static Z_TaggedElement *nodetotaggedelement(data1_handle dh, data1_node *n,
     }
     else
     {
     }
     else
     {
-       logf(LOG_WARN, "Bad data.");
+       yaz_log(LOG_WARN, "Bad data.");
        return 0;
     }
 
        return 0;
     }
 
index e888091..b235cfa 100644 (file)
@@ -1,10 +1,13 @@
 /*
 /*
- * Copyright (c) 1995-1997, Index Data.
+ * Copyright (c) 1995-1999, Index Data.
  * See the file LICENSE for details.
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: d1_handle.c,v $
  * See the file LICENSE for details.
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: d1_handle.c,v $
- * Revision 1.4  1998-05-18 13:07:05  adam
+ * Revision 1.5  1999-08-27 09:40:32  adam
+ * Renamed logf function to yaz_log. Removed VC++ project files.
+ *
+ * Revision 1.4  1998/05/18 13:07:05  adam
  * Changed the way attribute sets are handled by the retriaval module.
  * Extended Explain conversion / schema.
  * Modified server and client to work with ASN.1 compiled protocol handlers.
  * Changed the way attribute sets are handled by the retriaval module.
  * Extended Explain conversion / schema.
  * Modified server and client to work with ASN.1 compiled protocol handlers.
@@ -98,14 +101,14 @@ WRBUF data1_get_wrbuf (data1_handle dp)
 char **data1_get_read_buf (data1_handle dp, int **lenp)
 {
     *lenp = &dp->read_len;
 char **data1_get_read_buf (data1_handle dp, int **lenp)
 {
     *lenp = &dp->read_len;
-    logf (LOG_DEBUG, "data1_get_read_buf lenp=%u", **lenp);
+    yaz_log (LOG_DEBUG, "data1_get_read_buf lenp=%u", **lenp);
     return &dp->read_buf;
 }
 
 char **data1_get_map_buf (data1_handle dp, int **lenp)
 {
     *lenp = &dp->map_len;
     return &dp->read_buf;
 }
 
 char **data1_get_map_buf (data1_handle dp, int **lenp)
 {
     *lenp = &dp->map_len;
-    logf (LOG_DEBUG, "data1_get_map_buf lenp=%u", **lenp);
+    yaz_log (LOG_DEBUG, "data1_get_map_buf lenp=%u", **lenp);
     return &dp->map_buf;
 }
 
     return &dp->map_buf;
 }
 
index e1eaf85..84367af 100644 (file)
@@ -1,10 +1,13 @@
 /*
 /*
- * Copyright (c) 1995-1997, Index Data.
+ * Copyright (c) 1995-1999, Index Data.
  * See the file LICENSE for details.
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: d1_map.c,v $
  * See the file LICENSE for details.
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: d1_map.c,v $
- * Revision 1.14  1998-10-13 16:09:50  adam
+ * Revision 1.15  1999-08-27 09:40:32  adam
+ * Renamed logf function to yaz_log. Removed VC++ project files.
+ *
+ * Revision 1.14  1998/10/13 16:09:50  adam
  * Added support for arbitrary OID's for tagsets, schemas and attribute sets.
  * Added support for multiple attribute set references and tagset references
  * from an abstract syntax file.
  * Added support for arbitrary OID's for tagsets, schemas and attribute sets.
  * Added support for multiple attribute set references and tagset references
  * from an abstract syntax file.
@@ -83,7 +86,7 @@ data1_maptab *data1_read_maptab (data1_handle dh, const char *file)
 
     if (!(f = yaz_path_fopen(data1_get_tabpath(dh), file, "r")))
     {
 
     if (!(f = yaz_path_fopen(data1_get_tabpath(dh), file, "r")))
     {
-       logf(LOG_WARN|LOG_ERRNO, "%s", file);
+       yaz_log(LOG_WARN|LOG_ERRNO, "%s", file);
        return 0;
     }
 
        return 0;
     }
 
@@ -98,15 +101,15 @@ data1_maptab *data1_read_maptab (data1_handle dh, const char *file)
        {
            if (argc != 2)
            {
        {
            if (argc != 2)
            {
-               logf(LOG_WARN, "%s:%d: Bad # args for targetref",
-                   file, lineno);
+               yaz_log(LOG_WARN, "%s:%d: Bad # args for targetref",
+                       file, lineno);
                continue;
            }
            if ((res->target_absyn_ref = oid_getvalbyname(argv[1]))
                == VAL_NONE)
            {
                continue;
            }
            if ((res->target_absyn_ref = oid_getvalbyname(argv[1]))
                == VAL_NONE)
            {
-               logf(LOG_WARN, "%s:%d: Unknown reference '%s'",
-                    file, lineno, argv[1]);
+               yaz_log(LOG_WARN, "%s:%d: Unknown reference '%s'",
+                       file, lineno, argv[1]);
                continue;
            }
        }
                continue;
            }
        }
@@ -114,8 +117,8 @@ data1_maptab *data1_read_maptab (data1_handle dh, const char *file)
        {
            if (argc != 2)
            {
        {
            if (argc != 2)
            {
-               logf(LOG_WARN, "%s:%d: Bad # args for targetname",
-                   file, lineno);
+               yaz_log(LOG_WARN, "%s:%d: Bad # args for targetname",
+                       file, lineno);
                continue;
            }
            res->target_absyn_name =
                continue;
            }
            res->target_absyn_name =
@@ -128,7 +131,7 @@ data1_maptab *data1_read_maptab (data1_handle dh, const char *file)
        {
            if (argc != 2)
            {
        {
            if (argc != 2)
            {
-               logf(LOG_WARN, "%s:%d: Bad # args for name", file, lineno);
+               yaz_log(LOG_WARN, "%s:%d: Bad # args for name", file, lineno);
                continue;
            }
            res->name = (char *)nmem_malloc(mem, strlen(argv[1])+1);
                continue;
            }
            res->name = (char *)nmem_malloc(mem, strlen(argv[1])+1);
@@ -141,8 +144,8 @@ data1_maptab *data1_read_maptab (data1_handle dh, const char *file)
 
            if (argc < 3)
            {
 
            if (argc < 3)
            {
-               logf(LOG_WARN, "%s:%d: Bad # of args for map",
-                   file, lineno);
+               yaz_log(LOG_WARN, "%s:%d: Bad # of args for map",
+                       file, lineno);
                continue;
            }
            *mapp = (data1_mapunit *)nmem_malloc(mem, sizeof(**mapp));
                continue;
            }
            *mapp = (data1_mapunit *)nmem_malloc(mem, sizeof(**mapp));
@@ -168,8 +171,8 @@ data1_maptab *data1_read_maptab (data1_handle dh, const char *file)
                if ((np = sscanf(path, "(%d,%[^)]):%[^/]", &type, valstr,
                    parm)) < 2)
                {
                if ((np = sscanf(path, "(%d,%[^)]):%[^/]", &type, valstr,
                    parm)) < 2)
                {
-                   logf(LOG_WARN, "%s:%d: Syntax error in map directive: %s",
-                       file, lineno, argv[2]);
+                   yaz_log(LOG_WARN, "%s:%d: Syntax error in map "
+                           "directive: %s", file, lineno, argv[2]);
                    fclose(f);
                    return 0;
                }
                    fclose(f);
                    return 0;
                }
@@ -197,8 +200,8 @@ data1_maptab *data1_read_maptab (data1_handle dh, const char *file)
            mapp = &(*mapp)->next;
        }
        else 
            mapp = &(*mapp)->next;
        }
        else 
-           logf(LOG_WARN, "%s:%d: Unknown directive '%s'",
-                file, lineno, argv[0]);
+           yaz_log(LOG_WARN, "%s:%d: Unknown directive '%s'",
+                   file, lineno, argv[0]);
 
     fclose(f);
     return res;
 
     fclose(f);
     return res;
@@ -343,8 +346,8 @@ data1_node *data1_map_record (data1_handle dh, data1_node *n,
     res->u.root.type = map->target_absyn_name;
     if (!(res->u.root.absyn = data1_get_absyn(dh, map->target_absyn_name)))
     {
     res->u.root.type = map->target_absyn_name;
     if (!(res->u.root.absyn = data1_get_absyn(dh, map->target_absyn_name)))
     {
-       logf(LOG_WARN, "%s: Failed to load target absyn '%s'",
-           map->name, map->target_absyn_name);
+       yaz_log(LOG_WARN, "%s: Failed to load target absyn '%s'",
+               map->name, map->target_absyn_name);
     }
     res->parent = 0;
     res->root = res;
     }
     res->parent = 0;
     res->root = res;
index 0d257d6..84c6569 100644 (file)
@@ -1,10 +1,13 @@
 /*
 /*
- * Copyright (c) 1995-1998, Index Data.
+ * Copyright (c) 1995-1999, Index Data.
  * See the file LICENSE for details.
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: d1_marc.c,v $
  * See the file LICENSE for details.
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: d1_marc.c,v $
- * Revision 1.13  1998-10-13 16:09:52  adam
+ * Revision 1.14  1999-08-27 09:40:32  adam
+ * Renamed logf function to yaz_log. Removed VC++ project files.
+ *
+ * Revision 1.13  1998/10/13 16:09:52  adam
  * Added support for arbitrary OID's for tagsets, schemas and attribute sets.
  * Added support for multiple attribute set references and tagset references
  * from an abstract syntax file.
  * Added support for arbitrary OID's for tagsets, schemas and attribute sets.
  * Added support for multiple attribute set references and tagset references
  * from an abstract syntax file.
@@ -77,7 +80,7 @@ data1_marctab *data1_read_marctab (data1_handle dh, const char *file)
     
     if (!(f = yaz_path_fopen(data1_get_tabpath(dh), file, "r")))
     {
     
     if (!(f = yaz_path_fopen(data1_get_tabpath(dh), file, "r")))
     {
-       logf(LOG_WARN|LOG_ERRNO, "%s", file);
+       yaz_log(LOG_WARN|LOG_ERRNO, "%s", file);
        return 0;
     }
 
        return 0;
     }
 
@@ -102,8 +105,8 @@ data1_marctab *data1_read_marctab (data1_handle dh, const char *file)
        {
            if (argc != 2)
            {
        {
            if (argc != 2)
            {
-               logf(LOG_WARN, "%s:%d:Missing arg for %s", file, lineno,
-                    *argv);
+               yaz_log(LOG_WARN, "%s:%d:Missing arg for %s", file, lineno,
+                       *argv);
                continue;
            }
            res->name = nmem_strdup(mem, argv[1]);
                continue;
            }
            res->name = nmem_strdup(mem, argv[1]);
@@ -112,14 +115,14 @@ data1_marctab *data1_read_marctab (data1_handle dh, const char *file)
        {
            if (argc != 2)
            {
        {
            if (argc != 2)
            {
-               logf(LOG_WARN, "%s:%d: Missing arg for %s", file, lineno,
-                    *argv);
+               yaz_log(LOG_WARN, "%s:%d: Missing arg for %s", file, lineno,
+                       *argv);
                continue;
            }
            if ((res->reference = oid_getvalbyname(argv[1])) == VAL_NONE)
            {
                continue;
            }
            if ((res->reference = oid_getvalbyname(argv[1])) == VAL_NONE)
            {
-               logf(LOG_WARN, "%s:%d: Unknown tagset reference '%s'",
-                    file, lineno, argv[1]);
+               yaz_log(LOG_WARN, "%s:%d: Unknown tagset reference '%s'",
+                       file, lineno, argv[1]);
                continue;
            }
        }
                continue;
            }
        }
@@ -127,8 +130,8 @@ data1_marctab *data1_read_marctab (data1_handle dh, const char *file)
        {
            if (argc != 2)
            {
        {
            if (argc != 2)
            {
-               logf(LOG_WARN, "%s:%d: Missing arg for %s", file, lineno,
-                    *argv);
+               yaz_log(LOG_WARN, "%s:%d: Missing arg for %s", file, lineno,
+                       *argv);
                continue;
            }
            res->length_data_entry = atoi(argv[1]);
                continue;
            }
            res->length_data_entry = atoi(argv[1]);
@@ -137,8 +140,8 @@ data1_marctab *data1_read_marctab (data1_handle dh, const char *file)
        {
            if (argc != 2)
            {
        {
            if (argc != 2)
            {
-               logf(LOG_WARN, "%s:%d: Missing arg for %s", file, lineno,
-                    *argv);
+               yaz_log(LOG_WARN, "%s:%d: Missing arg for %s", file, lineno,
+                       *argv);
                continue;
            }
            res->length_starting = atoi(argv[1]);
                continue;
            }
            res->length_starting = atoi(argv[1]);
@@ -147,8 +150,8 @@ data1_marctab *data1_read_marctab (data1_handle dh, const char *file)
        {
            if (argc != 2)
            {
        {
            if (argc != 2)
            {
-               logf(LOG_WARN, "%s:%d: Missing arg for %s", file, lineno,
-                    *argv);
+               yaz_log(LOG_WARN, "%s:%d: Missing arg for %s", file, lineno,
+                       *argv);
                continue;
            }
            res->length_implementation = atoi(argv[1]);
                continue;
            }
            res->length_implementation = atoi(argv[1]);
@@ -157,8 +160,8 @@ data1_marctab *data1_read_marctab (data1_handle dh, const char *file)
        {
            if (argc != 2)
            {
        {
            if (argc != 2)
            {
-               logf(LOG_WARN, "%s:%d: Missing arg for %s", file, lineno,
-                    *argv);
+               yaz_log(LOG_WARN, "%s:%d: Missing arg for %s", file, lineno,
+                       *argv);
                continue;
            }
            strncpy(res->future_use, argv[1], 2);
                continue;
            }
            strncpy(res->future_use, argv[1], 2);
@@ -167,8 +170,8 @@ data1_marctab *data1_read_marctab (data1_handle dh, const char *file)
        {
            if (argc != 2)
            {
        {
            if (argc != 2)
            {
-               logf(LOG_WARN, "%s:%d: Missing arg for %s", file, lineno,
-                    *argv);
+               yaz_log(LOG_WARN, "%s:%d: Missing arg for %s", file, lineno,
+                       *argv);
                continue;
            }
            res->force_indicator_length = atoi(argv[1]);
                continue;
            }
            res->force_indicator_length = atoi(argv[1]);
@@ -177,15 +180,15 @@ data1_marctab *data1_read_marctab (data1_handle dh, const char *file)
        {
            if (argc != 2)
            {
        {
            if (argc != 2)
            {
-               logf(LOG_WARN, "%s:%d: Missing arg for %s", file, lineno,
-                    *argv);
+               yaz_log(LOG_WARN, "%s:%d: Missing arg for %s", file, lineno,
+                       *argv);
                continue;
            }
            res->force_identifier_length = atoi(argv[1]);
        }
        else
                continue;
            }
            res->force_identifier_length = atoi(argv[1]);
        }
        else
-           logf(LOG_WARN, "%s:%d: Unknown directive '%s'", file, lineno,
-                *argv);
+           yaz_log(LOG_WARN, "%s:%d: Unknown directive '%s'", file, lineno,
+                   *argv);
 
     fclose(f);
     return res;
 
     fclose(f);
     return res;
@@ -251,12 +254,12 @@ static int nodetomarc(data1_marctab *p, data1_node *n, int selected,
     char *op;
     data1_node *field, *subf;
 
     char *op;
     data1_node *field, *subf;
 
-    logf (LOG_DEBUG, "nodetomarc");
+    yaz_log (LOG_DEBUG, "nodetomarc");
     for (field = n->child; field; field = field->next)
     {
        if (field->which != DATA1N_tag)
        {
     for (field = n->child; field; field = field->next)
     {
        if (field->which != DATA1N_tag)
        {
-           logf(LOG_WARN, "Malformed field composition for marc output.");
+           yaz_log(LOG_WARN, "Malformed field composition for marc output.");
            return -1;
        }
        if (selected && !field->u.tag.node_selected)
            return -1;
        }
        if (selected && !field->u.tag.node_selected)
@@ -277,7 +280,7 @@ static int nodetomarc(data1_marctab *p, data1_node *n, int selected,
         {
            if (subf->which != DATA1N_tag)
            {
         {
            if (subf->which != DATA1N_tag)
            {
-               logf(LOG_WARN,
+               yaz_log(LOG_WARN,
                    "Malformed subfield composition for marc output.");
                return -1;
            }
                    "Malformed subfield composition for marc output.");
                return -1;
            }
index a6e21cd..34759f4 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: d1_read.c,v $
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: d1_read.c,v $
- * Revision 1.26  1999-07-13 13:23:48  adam
+ * Revision 1.27  1999-08-27 09:40:32  adam
+ * Renamed logf function to yaz_log. Removed VC++ project files.
+ *
+ * Revision 1.26  1999/07/13 13:23:48  adam
  * Non-recursive version of data1_read_node. data1_read_nodex reads
  * stream of bytes (instead of buffer in memory).
  *
  * Non-recursive version of data1_read_node. data1_read_nodex reads
  * stream of bytes (instead of buffer in memory).
  *
@@ -319,7 +322,7 @@ data1_node *data1_read_nodex (data1_handle dh, NMEM m,
            args[i] = '\0';
            if (c != '>')
            {
            args[i] = '\0';
            if (c != '>')
            {
-               logf(LOG_WARN, "d1: %d: Malformed tag", line);
+               yaz_log(LOG_WARN, "d1: %d: Malformed tag", line);
                return 0;
            }
            else
                return 0;
            }
            else
@@ -347,8 +350,8 @@ data1_node *data1_read_nodex (data1_handle dh, NMEM m,
                    }
                    if (i != level)
                    {
                    }
                    if (i != level)
                    {
-                       logf (LOG_WARN, "%d: no begin tag for %s",
-                             line, tag);
+                       yaz_log (LOG_WARN, "%d: no begin tag for %s",
+                                line, tag);
                        break;
                    }
                }
                        break;
                    }
                }
@@ -360,8 +363,8 @@ data1_node *data1_read_nodex (data1_handle dh, NMEM m,
            {
                if (!(absyn = data1_get_absyn (dh, tag)))
                {
            {
                if (!(absyn = data1_get_absyn (dh, tag)))
                {
-                   logf(LOG_WARN, "Unable to acquire abstract syntax "
-                        "for '%s'", tag);
+                   yaz_log(LOG_WARN, "Unable to acquire abstract syntax "
+                           "for '%s'", tag);
                    return 0;
                }
                res = data1_mk_node (dh, m);
                    return 0;
                }
                res = data1_mk_node (dh, m);
@@ -378,7 +381,7 @@ data1_node *data1_read_nodex (data1_handle dh, NMEM m,
                
                if (sscanf(args, "%s %s %n", tclass, type, &val_offset) != 2)
                {
                
                if (sscanf(args, "%s %s %n", tclass, type, &val_offset) != 2)
                {
-                   logf(LOG_WARN, "Malformed variant triple at '%s'", tag);
+                   yaz_log(LOG_WARN, "Malformed variant triple at '%s'", tag);
                    continue;
                }
                if (!(tp =
                    continue;
                }
                if (!(tp =
index 2694a2e..fec514e 100644 (file)
@@ -1,10 +1,13 @@
 /*
 /*
- * Copyright (c) 1995, Index Data.
+ * Copyright (c) 1995-1999, Index Data.
  * See the file LICENSE for details.
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: d1_sumout.c,v $
  * See the file LICENSE for details.
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: d1_sumout.c,v $
- * Revision 1.3  1998-02-11 11:53:35  adam
+ * Revision 1.4  1999-08-27 09:40:32  adam
+ * Renamed logf function to yaz_log. Removed VC++ project files.
+ *
+ * Revision 1.3  1998/02/11 11:53:35  adam
  * Changed code so that it compiles as C++.
  *
  * Revision 1.2  1997/09/17 12:10:38  adam
  * Changed code so that it compiles as C++.
  *
  * Revision 1.2  1997/09/17 12:10:38  adam
@@ -59,7 +62,7 @@ Z_BriefBib *data1_nodetosummary (data1_handle dh, data1_node *n,
     assert(n->which == DATA1N_root);
     if (strcmp(n->u.root.type, "summary"))
     {
     assert(n->which == DATA1N_root);
     if (strcmp(n->u.root.type, "summary"))
     {
-       logf(LOG_WARN, "Attempt to convert a non-summary record");
+       yaz_log(LOG_WARN, "Attempt to convert a non-summary record");
        return 0;
     }
 
        return 0;
     }
 
@@ -83,7 +86,7 @@ Z_BriefBib *data1_nodetosummary (data1_handle dh, data1_node *n,
     {
        if (c->which != DATA1N_tag || !c->u.tag.element)
        {
     {
        if (c->which != DATA1N_tag || !c->u.tag.element)
        {
-           logf(LOG_WARN, "Malformed element in Summary record");
+           yaz_log(LOG_WARN, "Malformed element in Summary record");
            return 0;
        }
        if (select && !c->u.tag.node_selected)
            return 0;
        }
        if (select && !c->u.tag.node_selected)
@@ -105,7 +108,7 @@ Z_BriefBib *data1_nodetosummary (data1_handle dh, data1_node *n,
            case 16: res->abstract = f_string(c, o); break;
            case 17: abort(); /* TODO */
            default:
            case 16: res->abstract = f_string(c, o); break;
            case 17: abort(); /* TODO */
            default:
-               logf(LOG_WARN, "Unknown element in Summary record.");
+               yaz_log(LOG_WARN, "Unknown element in Summary record.");
        }
     }
     return res;
        }
     }
     return res;
index cd26cc4..65b9daa 100644 (file)
@@ -1,10 +1,13 @@
 /*
 /*
- * Copyright (c) 1995-1998, Index Data.
+ * Copyright (c) 1995-1999, Index Data.
  * See the file LICENSE for details.
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: d1_tagset.c,v $
  * See the file LICENSE for details.
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: d1_tagset.c,v $
- * Revision 1.11  1998-10-19 14:16:36  adam
+ * Revision 1.12  1999-08-27 09:40:32  adam
+ * Renamed logf function to yaz_log. Removed VC++ project files.
+ *
+ * Revision 1.11  1998/10/19 14:16:36  adam
  * Fixed data1_gettagbyname. Bug introduced by previous revision.
  *
  * Revision 1.10  1998/10/15 08:29:17  adam
  * Fixed data1_gettagbyname. Bug introduced by previous revision.
  *
  * Revision 1.10  1998/10/15 08:29:17  adam
@@ -159,7 +162,7 @@ data1_tagset *data1_read_tagset (data1_handle dh, const char *file, int type)
 
     if (!(f = yaz_path_fopen(data1_get_tabpath(dh), file, "r")))
     {
 
     if (!(f = yaz_path_fopen(data1_get_tabpath(dh), file, "r")))
     {
-       logf(LOG_WARN|LOG_ERRNO, "%s", file);
+       yaz_log(LOG_WARN|LOG_ERRNO, "%s", file);
        return 0;
     }
     res = data1_empty_tagset (dh);
        return 0;
     }
     res = data1_empty_tagset (dh);
@@ -179,7 +182,7 @@ data1_tagset *data1_read_tagset (data1_handle dh, const char *file, int type)
 
            if (argc != 4)
            {
 
            if (argc != 4)
            {
-               logf(LOG_WARN, "%s:%d: Bad # args to tag", file, lineno);
+               yaz_log(LOG_WARN, "%s:%d: Bad # args to tag", file, lineno);
                continue;
            }
            value = atoi(argv[1]);
                continue;
            }
            value = atoi(argv[1]);
@@ -197,7 +200,7 @@ data1_tagset *data1_read_tagset (data1_handle dh, const char *file, int type)
 
            if (!(rr->kind = data1_maptype(dh, type)))
            {
 
            if (!(rr->kind = data1_maptype(dh, type)))
            {
-               logf(LOG_WARN, "%s:%d: Unknown datatype %s",
+               yaz_log(LOG_WARN, "%s:%d: Unknown datatype %s",
                     file, lineno, type);
                fclose(f);
                return 0;
                     file, lineno, type);
                fclose(f);
                return 0;
@@ -225,7 +228,7 @@ data1_tagset *data1_read_tagset (data1_handle dh, const char *file, int type)
        {
            if (argc != 2)
            {
        {
            if (argc != 2)
            {
-               logf(LOG_WARN, "%s:%d: Bad # args to name", file, lineno);
+               yaz_log(LOG_WARN, "%s:%d: Bad # args to name", file, lineno);
                continue;
            }
            res->name = nmem_strdup(mem, argv[1]);
                continue;
            }
            res->name = nmem_strdup(mem, argv[1]);
@@ -236,14 +239,15 @@ data1_tagset *data1_read_tagset (data1_handle dh, const char *file, int type)
            
            if (argc != 2)
            {
            
            if (argc != 2)
            {
-               logf(LOG_WARN, "%s:%d: Bad # args to reference", file, lineno);
+               yaz_log(LOG_WARN, "%s:%d: Bad # args to reference",
+                       file, lineno);
                continue;
            }
            name = argv[1];
            if ((res->reference = oid_getvalbyname(name)) == VAL_NONE)
            {
                continue;
            }
            name = argv[1];
            if ((res->reference = oid_getvalbyname(name)) == VAL_NONE)
            {
-               logf(LOG_WARN, "%s:%d: Unknown tagset ref '%s'",
-                    file, lineno, name);
+               yaz_log(LOG_WARN, "%s:%d: Unknown tagset ref '%s'",
+                       file, lineno, name);
                continue;
            }
        }
                continue;
            }
        }
@@ -251,7 +255,7 @@ data1_tagset *data1_read_tagset (data1_handle dh, const char *file, int type)
        {
            if (argc != 2)
            {
        {
            if (argc != 2)
            {
-               logf (LOG_WARN, "%s:%d: Bad # args to type", file, lineno);
+               yaz_log (LOG_WARN, "%s:%d: Bad # args to type", file, lineno);
                continue;
            }
            if (!res->type)
                continue;
            }
            if (!res->type)
@@ -264,8 +268,8 @@ data1_tagset *data1_read_tagset (data1_handle dh, const char *file, int type)
 
            if (argc < 2)
            {
 
            if (argc < 2)
            {
-               logf(LOG_WARN, "%s:%d: Bad # args to include",
-                    file, lineno);
+               yaz_log(LOG_WARN, "%s:%d: Bad # args to include",
+                       file, lineno);
                continue;
            }
            name = argv[1];
                continue;
            }
            name = argv[1];
@@ -274,16 +278,16 @@ data1_tagset *data1_read_tagset (data1_handle dh, const char *file, int type)
            *childp = data1_read_tagset (dh, name, type);
            if (!(*childp))
            {
            *childp = data1_read_tagset (dh, name, type);
            if (!(*childp))
            {
-               logf(LOG_WARN, "%s:%d: Inclusion failed for tagset %s",
-                    file, lineno, name);
+               yaz_log(LOG_WARN, "%s:%d: Inclusion failed for tagset %s",
+                       file, lineno, name);
                continue;
            }
            childp = &(*childp)->next;
        }
        else
        {
                continue;
            }
            childp = &(*childp)->next;
        }
        else
        {
-           logf(LOG_WARN, "%s:%d: Unknown directive '%s'",
-                file, lineno, cmd);
+           yaz_log(LOG_WARN, "%s:%d: Unknown directive '%s'",
+                   file, lineno, cmd);
        }
     }
     fclose(f);
        }
     }
     fclose(f);
index adf3e2e..5b07f68 100644 (file)
@@ -1,10 +1,13 @@
 /*
 /*
- * Copyright (c) 1995-1998, Index Data.
+ * Copyright (c) 1995-1999, Index Data.
  * See the file LICENSE for details.
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: d1_varset.c,v $
  * See the file LICENSE for details.
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: d1_varset.c,v $
- * Revision 1.8  1998-10-13 16:09:54  adam
+ * Revision 1.9  1999-08-27 09:40:32  adam
+ * Renamed logf function to yaz_log. Removed VC++ project files.
+ *
+ * Revision 1.8  1998/10/13 16:09:54  adam
  * Added support for arbitrary OID's for tagsets, schemas and attribute sets.
  * Added support for multiple attribute set references and tagset references
  * from an abstract syntax file.
  * Added support for arbitrary OID's for tagsets, schemas and attribute sets.
  * Added support for multiple attribute set references and tagset references
  * from an abstract syntax file.
@@ -57,11 +60,11 @@ data1_vartype *data1_getvartypebyct (data1_handle dh, data1_varset *set,
            for (t = c->types; t; t = t->next)
                if (!data1_matchstr(t->name, type))
                    return t;
            for (t = c->types; t; t = t->next)
                if (!data1_matchstr(t->name, type))
                    return t;
-           logf(LOG_WARN, "Unknown variant type %s in class %s",
-                type, zclass);
+           yaz_log(LOG_WARN, "Unknown variant type %s in class %s",
+                   type, zclass);
            return 0;
        }
            return 0;
        }
-    logf(LOG_WARN, "Unknown variant class %s", zclass);
+    yaz_log(LOG_WARN, "Unknown variant class %s", zclass);
     return 0;
 }
 
     return 0;
 }
 
@@ -82,7 +85,7 @@ data1_varset *data1_read_varset (data1_handle dh, const char *file)
 
     if (!(f = yaz_path_fopen(data1_get_tabpath(dh), file, "r")))
     {
 
     if (!(f = yaz_path_fopen(data1_get_tabpath(dh), file, "r")))
     {
-       logf(LOG_WARN|LOG_ERRNO, "%s", file);
+       yaz_log(LOG_WARN|LOG_ERRNO, "%s", file);
        return 0;
     }
     while ((argc = readconf_line(f, &lineno, line, 512, argv, 50)))
        return 0;
     }
     while ((argc = readconf_line(f, &lineno, line, 512, argv, 50)))
@@ -92,8 +95,8 @@ data1_varset *data1_read_varset (data1_handle dh, const char *file)
            
            if (argc != 3)
            {
            
            if (argc != 3)
            {
-               logf(LOG_WARN, "%s:%d: Bad # or args to class",
-                    file, lineno);
+               yaz_log(LOG_WARN, "%s:%d: Bad # or args to class",
+                       file, lineno);
                continue;
            }
            *classp = r = zclass = (data1_varclass *)
                continue;
            }
            *classp = r = zclass = (data1_varclass *)
@@ -112,13 +115,14 @@ data1_varset *data1_read_varset (data1_handle dh, const char *file)
 
            if (!typep)
            {
 
            if (!typep)
            {
-               logf(LOG_WARN, "%s:%d: Directive class must precede type",
-                    file, lineno);
+               yaz_log(LOG_WARN, "%s:%d: Directive class must precede type",
+                       file, lineno);
                continue;
            }
            if (argc != 4)
            {
                continue;
            }
            if (argc != 4)
            {
-               logf(LOG_WARN, "%s:%d: Bad # or args to type", file, lineno);
+               yaz_log(LOG_WARN, "%s:%d: Bad # or args to type",
+                       file, lineno);
                continue;
            }
            *typep = r = (data1_vartype *)nmem_malloc(mem, sizeof(*r));
                continue;
            }
            *typep = r = (data1_vartype *)nmem_malloc(mem, sizeof(*r));
@@ -127,8 +131,8 @@ data1_varset *data1_read_varset (data1_handle dh, const char *file)
            r->type = atoi(argv[1]);
            if (!(r->datatype = data1_maptype (dh, argv[3])))
            {
            r->type = atoi(argv[1]);
            if (!(r->datatype = data1_maptype (dh, argv[3])))
            {
-               logf(LOG_WARN, "%s:%d: Unknown datatype '%s'",
-                    file, lineno, argv[3]);
+               yaz_log(LOG_WARN, "%s:%d: Unknown datatype '%s'",
+                       file, lineno, argv[3]);
                fclose(f);
                return 0;
            }
                fclose(f);
                return 0;
            }
@@ -139,8 +143,8 @@ data1_varset *data1_read_varset (data1_handle dh, const char *file)
        {
            if (argc != 2)
            {
        {
            if (argc != 2)
            {
-               logf(LOG_WARN, "%s:%d: Bad # args for name",
-                    file, lineno);
+               yaz_log(LOG_WARN, "%s:%d: Bad # args for name",
+                       file, lineno);
                continue;
            }
            res->name = nmem_strdup(mem, argv[1]);
                continue;
            }
            res->name = nmem_strdup(mem, argv[1]);
@@ -149,20 +153,20 @@ data1_varset *data1_read_varset (data1_handle dh, const char *file)
        {
            if (argc != 2)
            {
        {
            if (argc != 2)
            {
-               logf(LOG_WARN, "%s:%d: Bad # args for reference",
-                    file, lineno);
+               yaz_log(LOG_WARN, "%s:%d: Bad # args for reference",
+                       file, lineno);
                continue;
            }
            if ((res->reference = oid_getvalbyname(argv[1])) == VAL_NONE)
            {
                continue;
            }
            if ((res->reference = oid_getvalbyname(argv[1])) == VAL_NONE)
            {
-               logf(LOG_WARN, "%s:%d: Unknown reference '%s'",
-                    file, lineno, argv[1]);
+               yaz_log(LOG_WARN, "%s:%d: Unknown reference '%s'",
+                       file, lineno, argv[1]);
                continue;
            }
        }
        else 
                continue;
            }
        }
        else 
-           logf(LOG_WARN, "%s:%d: Unknown directive '%s'",
-                file, lineno, argv[0]);
+           yaz_log(LOG_WARN, "%s:%d: Unknown directive '%s'",
+                   file, lineno, argv[0]);
     
     fclose(f);
     return res;
     
     fclose(f);
     return res;
index c4b8b3e..8ea125a 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: eventl.c,v $
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: eventl.c,v $
- * Revision 1.27  1999-02-02 13:57:34  adam
+ * Revision 1.28  1999-08-27 09:40:32  adam
+ * Renamed logf function to yaz_log. Removed VC++ project files.
+ *
+ * Revision 1.27  1999/02/02 13:57:34  adam
  * Uses preprocessor define WIN32 instead of WINDOWS to build code
  * for Microsoft WIN32.
  *
  * Uses preprocessor define WIN32 instead of WINDOWS to build code
  * for Microsoft WIN32.
  *
@@ -169,7 +172,7 @@ int event_loop(IOCHAN *iochans)
                 cs_close(conn);
                destroy_association(assoc);
                iochan_destroy(*iochans);
                 cs_close(conn);
                destroy_association(assoc);
                iochan_destroy(*iochans);
-                logf(LOG_DEBUG, "error while selecting, destroying iochan %p",
+                yaz_log(LOG_DEBUG, "error select, destroying iochan %p",
                        *iochans);
             }
        }
                        *iochans);
             }
        }
diff --git a/server/server.dsp b/server/server.dsp
deleted file mode 100644 (file)
index 59f2c00..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-# Microsoft Developer Studio Project File - Name="server" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 5.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Static Library" 0x0104
-
-CFG=server - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "server.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "server.mak" CFG="server - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "server - Win32 Release" (based on "Win32 (x86) Static Library")
-!MESSAGE "server - Win32 Debug" (based on "Win32 (x86) Static Library")
-!MESSAGE 
-
-# Begin Project
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-
-!IF  "$(CFG)" == "server - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
-# SUBTRACT CPP /YX
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ELSEIF  "$(CFG)" == "server - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /MDd /W3 /GX /Zi /Od /I "..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FR /FD /c
-# SUBTRACT CPP /YX
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ENDIF 
-
-# Begin Target
-
-# Name "server - Win32 Release"
-# Name "server - Win32 Debug"
-# Begin Source File
-
-SOURCE=.\eventl.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\requestq.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\service.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\seshigh.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\session.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\statserv.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\tcpdchk.c
-# End Source File
-# End Target
-# End Project
index e89e830..d56264f 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: seshigh.c,v $
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: seshigh.c,v $
- * Revision 1.93  1999-07-06 12:17:15  adam
+ * Revision 1.94  1999-08-27 09:40:32  adam
+ * Renamed logf function to yaz_log. Removed VC++ project files.
+ *
+ * Revision 1.93  1999/07/06 12:17:15  adam
  * Added option -1 that runs server once (for profiling purposes).
  *
  * Revision 1.92  1999/06/17 10:54:45  adam
  * Added option -1 that runs server once (for profiling purposes).
  *
  * Revision 1.92  1999/06/17 10:54:45  adam
@@ -404,7 +407,7 @@ association *create_association(IOCHAN channel, COMSTACK link)
                {
                    if (!(apduf = fopen(filename, "w")))
                    {
                {
                    if (!(apduf = fopen(filename, "w")))
                    {
-                       logf(LOG_WARN|LOG_ERRNO, "%s", filename);
+                       yaz_log(LOG_WARN|LOG_ERRNO, "%s", filename);
                        return 0;
                    }
                    setvbuf(apduf, 0, _IONBF, 0);
                        return 0;
                    }
                    setvbuf(apduf, 0, _IONBF, 0);
@@ -416,7 +419,7 @@ association *create_association(IOCHAN channel, COMSTACK link)
                sprintf(filename + strlen(filename), ".%d", getpid());
                if (!(f = fopen(filename, "w")))
                {
                sprintf(filename + strlen(filename), ".%d", getpid());
                if (!(f = fopen(filename, "w")))
                {
-                   logf(LOG_WARN|LOG_ERRNO, "%s", filename);
+                   yaz_log(LOG_WARN|LOG_ERRNO, "%s", filename);
                    return 0;
                }
                setvbuf(f, 0, _IONBF, 0);
                    return 0;
                }
                setvbuf(f, 0, _IONBF, 0);
@@ -469,7 +472,7 @@ static void do_close_req(association *a, int reason, char *message,
     while (request_deq(&a->outgoing));
     if (a->version >= 3)
     {
     while (request_deq(&a->outgoing));
     if (a->version >= 3)
     {
-       logf(LOG_LOG, "Sending Close PDU, reason=%d, message=%s",
+       yaz_log(LOG_LOG, "Sending Close PDU, reason=%d, message=%s",
            reason, message ? message : "none");
        apdu.which = Z_APDU_close;
        apdu.u.close = cls;
            reason, message ? message : "none");
        apdu.which = Z_APDU_close;
        apdu.u.close = cls;
@@ -480,7 +483,7 @@ static void do_close_req(association *a, int reason, char *message,
     }
     else
     {
     }
     else
     {
-       logf(LOG_DEBUG, "v2 client. No Close PDU");
+       yaz_log(LOG_DEBUG, "v2 client. No Close PDU");
        iochan_setevent(a->client_chan, EVENT_TIMEOUT); /* force imm close */
     }
     a->state = ASSOC_DEAD;
        iochan_setevent(a->client_chan, EVENT_TIMEOUT); /* force imm close */
     }
     a->state = ASSOC_DEAD;
@@ -512,14 +515,14 @@ void ir_session(IOCHAN h, int event)
     {
        if (assoc->state != ASSOC_UP)
        {
     {
        if (assoc->state != ASSOC_UP)
        {
-           logf(LOG_LOG, "Final timeout - closing connection.");
+           yaz_log(LOG_LOG, "Final timeout - closing connection.");
            cs_close(conn);
            destroy_association(assoc);
            iochan_destroy(h);
        }
        else
        {
            cs_close(conn);
            destroy_association(assoc);
            iochan_destroy(h);
        }
        else
        {
-           logf(LOG_LOG, "Session idle too long. Sending close.");
+           yaz_log(LOG_LOG, "Session idle too long. Sending close.");
            do_close(assoc, Z_Close_lackOfActivity, 0);
        }
        return;
            do_close(assoc, Z_Close_lackOfActivity, 0);
        }
        return;
@@ -528,12 +531,12 @@ void ir_session(IOCHAN h, int event)
     {
        if (event & EVENT_INPUT)
        {
     {
        if (event & EVENT_INPUT)
        {
-           logf(LOG_DEBUG, "ir_session (input)");
+           yaz_log(LOG_DEBUG, "ir_session (input)");
            assert(assoc && conn);
            /* We aren't speaking to this fellow */
            if (assoc->state == ASSOC_DEAD)
            {
            assert(assoc && conn);
            /* We aren't speaking to this fellow */
            if (assoc->state == ASSOC_DEAD)
            {
-               logf(LOG_LOG, "Closed connection after reject");
+               yaz_log(LOG_LOG, "Closed connection after reject");
                cs_close(conn);
                destroy_association(assoc);
                iochan_destroy(h);
                cs_close(conn);
                destroy_association(assoc);
                iochan_destroy(h);
@@ -542,7 +545,7 @@ void ir_session(IOCHAN h, int event)
            if ((res = cs_get(conn, &assoc->input_buffer,
                &assoc->input_buffer_len)) <= 0)
            {
            if ((res = cs_get(conn, &assoc->input_buffer,
                &assoc->input_buffer_len)) <= 0)
            {
-               logf(LOG_LOG, "Connection closed by client");
+               yaz_log(LOG_LOG, "Connection closed by client");
                cs_close(conn);
                destroy_association(assoc);
                iochan_destroy(h);
                cs_close(conn);
                destroy_association(assoc);
                iochan_destroy(h);
@@ -554,16 +557,16 @@ void ir_session(IOCHAN h, int event)
                iochan_setevent(h, EVENT_INPUT);
                
            /* we got a complete PDU. Let's decode it */
                iochan_setevent(h, EVENT_INPUT);
                
            /* we got a complete PDU. Let's decode it */
-           logf(LOG_DEBUG, "Got PDU, %d bytes", res);
+           yaz_log(LOG_DEBUG, "Got PDU, %d bytes", res);
            req = request_get(&assoc->incoming); /* get a new request structure */
            odr_reset(assoc->decode);
            odr_setbuf(assoc->decode, assoc->input_buffer, res, 0);
            if (!z_APDU(assoc->decode, &req->request, 0, 0))
            {
            req = request_get(&assoc->incoming); /* get a new request structure */
            odr_reset(assoc->decode);
            odr_setbuf(assoc->decode, assoc->input_buffer, res, 0);
            if (!z_APDU(assoc->decode, &req->request, 0, 0))
            {
-               logf(LOG_LOG, "ODR error on incoming PDU: %s [near byte %d] ",
+               yaz_log(LOG_LOG, "ODR error on incoming PDU: %s [near byte %d] ",
                    odr_errmsg(odr_geterror(assoc->decode)),
                    odr_offset(assoc->decode));
                    odr_errmsg(odr_geterror(assoc->decode)),
                    odr_offset(assoc->decode));
-               logf(LOG_LOG, "PDU dump:");
+               yaz_log(LOG_LOG, "PDU dump:");
                odr_dumpBER(log_file(), assoc->input_buffer, res);
                do_close(assoc, Z_Close_protocolError, "Malformed package");
                return;
                odr_dumpBER(log_file(), assoc->input_buffer, res);
                do_close(assoc, Z_Close_protocolError, "Malformed package");
                return;
@@ -571,7 +574,7 @@ void ir_session(IOCHAN h, int event)
            req->request_mem = odr_extract_mem(assoc->decode);
            if (assoc->print && !z_APDU(assoc->print, &req->request, 0, 0))
            {
            req->request_mem = odr_extract_mem(assoc->decode);
            if (assoc->print && !z_APDU(assoc->print, &req->request, 0, 0))
            {
-               logf(LOG_WARN, "ODR print error: %s", 
+               yaz_log(LOG_WARN, "ODR print error: %s", 
                    odr_errmsg(odr_geterror(assoc->print)));
                odr_reset(assoc->print);
            }
                    odr_errmsg(odr_geterror(assoc->print)));
                odr_reset(assoc->print);
            }
@@ -592,18 +595,18 @@ void ir_session(IOCHAN h, int event)
     {
        request *req = request_head(&assoc->outgoing);
 
     {
        request *req = request_head(&assoc->outgoing);
 
-       logf(LOG_DEBUG, "ir_session (output)");
+       yaz_log(LOG_DEBUG, "ir_session (output)");
        req->state = REQUEST_PENDING;
        switch (res = cs_put(conn, req->response, req->len_response))
        {
            case -1:
        req->state = REQUEST_PENDING;
        switch (res = cs_put(conn, req->response, req->len_response))
        {
            case -1:
-               logf(LOG_LOG, "Connection closed by client");
+               yaz_log(LOG_LOG, "Connection closed by client");
                cs_close(conn);
                destroy_association(assoc);
                iochan_destroy(h);
                break;
            case 0: /* all sent - release the request structure */
                cs_close(conn);
                destroy_association(assoc);
                iochan_destroy(h);
                break;
            case 0: /* all sent - release the request structure */
-               logf(LOG_DEBUG, "Wrote PDU, %d bytes", req->len_response);
+               yaz_log(LOG_DEBUG, "Wrote PDU, %d bytes", req->len_response);
                nmem_destroy(req->request_mem);
                request_deq(&assoc->outgoing);
                request_release(req);
                nmem_destroy(req->request_mem);
                request_deq(&assoc->outgoing);
                request_release(req);
@@ -615,7 +618,7 @@ void ir_session(IOCHAN h, int event)
     }
     if (event & EVENT_EXCEPT)
     {
     }
     if (event & EVENT_EXCEPT)
     {
-       logf(LOG_DEBUG, "ir_session (exception)");
+       yaz_log(LOG_DEBUG, "ir_session (exception)");
        cs_close(conn);
        destroy_association(assoc);
        iochan_destroy(h);
        cs_close(conn);
        destroy_association(assoc);
        iochan_destroy(h);
@@ -647,7 +650,7 @@ static int process_request(association *assoc, request *req)
                res = process_ESRequest(assoc, req, &fd);
            else
            {
                res = process_ESRequest(assoc, req, &fd);
            else
            {
-               logf(LOG_WARN, "Cannot handle EXTENDED SERVICES APDU");
+               yaz_log(LOG_WARN, "Cannot handle EXTENDED SERVICES APDU");
                return -1;
            }
            break;
                return -1;
            }
            break;
@@ -656,7 +659,7 @@ static int process_request(association *assoc, request *req)
                res = process_sortRequest(assoc, req, &fd);
            else
            {
                res = process_sortRequest(assoc, req, &fd);
            else
            {
-               logf(LOG_WARN, "Cannot handle SORT APDU");
+               yaz_log(LOG_WARN, "Cannot handle SORT APDU");
                return -1;
            }
            break;
                return -1;
            }
            break;
@@ -667,22 +670,22 @@ static int process_request(association *assoc, request *req)
                res = process_deleteRequest(assoc, req, &fd);
            else
            {
                res = process_deleteRequest(assoc, req, &fd);
            else
            {
-               logf (LOG_WARN, "Cannot handle Delete APDU");
+               yaz_log (LOG_WARN, "Cannot handle Delete APDU");
                return -1;
            }
            break;
        default:
                return -1;
            }
            break;
        default:
-           logf(LOG_WARN, "Bad APDU received");
+           yaz_log(LOG_WARN, "Bad APDU received");
            return -1;
     }
     if (res)
     {
            return -1;
     }
     if (res)
     {
-       logf(LOG_DEBUG, "  result immediately available");
+       yaz_log(LOG_DEBUG, "  result immediately available");
        retval = process_response(assoc, req, res);
     }
     else if (fd < 0)
     {
        retval = process_response(assoc, req, res);
     }
     else if (fd < 0)
     {
-       logf(LOG_DEBUG, "  result unavailble");
+       yaz_log(LOG_DEBUG, "  result unavailble");
        retval = 0;
     }
     else /* no result yet - one will be provided later */
        retval = 0;
     }
     else /* no result yet - one will be provided later */
@@ -691,7 +694,7 @@ static int process_request(association *assoc, request *req)
 
        /* Set up an I/O handler for the fd supplied by the backend */
 
 
        /* Set up an I/O handler for the fd supplied by the backend */
 
-       logf(LOG_DEBUG, "   establishing handler for result");
+       yaz_log(LOG_DEBUG, "   establishing handler for result");
        req->state = REQUEST_PENDING;
        if (!(chan = iochan_create(fd, backend_response, EVENT_INPUT)))
            abort();
        req->state = REQUEST_PENDING;
        if (!(chan = iochan_create(fd, backend_response, EVENT_INPUT)))
            abort();
@@ -711,7 +714,7 @@ void backend_response(IOCHAN i, int event)
     Z_APDU *res;
     int fd;
 
     Z_APDU *res;
     int fd;
 
-    logf(LOG_DEBUG, "backend_response");
+    yaz_log(LOG_DEBUG, "backend_response");
     assert(assoc && req && req->state != REQUEST_IDLE);
     /* determine what it is we're waiting for */
     switch (req->request->which)
     assert(assoc && req && req->state != REQUEST_IDLE);
     /* determine what it is we're waiting for */
     switch (req->request->which)
@@ -725,19 +728,19 @@ void backend_response(IOCHAN i, int event)
            res = response_scanRequest(assoc, req, 0, &fd); break;
 #endif
        default:
            res = response_scanRequest(assoc, req, 0, &fd); break;
 #endif
        default:
-           logf(LOG_WARN, "Serious programmer's lapse or bug");
+           yaz_log(LOG_WARN, "Serious programmer's lapse or bug");
            abort();
     }
     if ((res && process_response(assoc, req, res) < 0) || fd < 0)
     {
            abort();
     }
     if ((res && process_response(assoc, req, res) < 0) || fd < 0)
     {
-       logf(LOG_LOG, "Fatal error when talking to backend");
+       yaz_log(LOG_LOG, "Fatal error when talking to backend");
        do_close(assoc, Z_Close_systemProblem, 0);
        iochan_destroy(i);
        return;
     }
     else if (!res) /* no result yet - try again later */
     {
        do_close(assoc, Z_Close_systemProblem, 0);
        iochan_destroy(i);
        return;
     }
     else if (!res) /* no result yet - try again later */
     {
-       logf(LOG_DEBUG, "   no result yet");
+       yaz_log(LOG_DEBUG, "   no result yet");
        iochan_setfd(i, fd); /* in case fd has changed */
     }
 }
        iochan_setfd(i, fd); /* in case fd has changed */
     }
 }
@@ -750,7 +753,7 @@ static int process_response(association *assoc, request *req, Z_APDU *res)
     odr_setbuf(assoc->encode, req->response, req->size_response, 1);
     if (!z_APDU(assoc->encode, &res, 0, 0))
     {
     odr_setbuf(assoc->encode, req->response, req->size_response, 1);
     if (!z_APDU(assoc->encode, &res, 0, 0))
     {
-       logf(LOG_WARN, "ODR error when encoding response: %s",
+       yaz_log(LOG_WARN, "ODR error when encoding response: %s",
            odr_errmsg(odr_geterror(assoc->decode)));
        odr_reset(assoc->encode);
        return -1;
            odr_errmsg(odr_geterror(assoc->decode)));
        odr_reset(assoc->encode);
        return -1;
@@ -760,7 +763,7 @@ static int process_response(association *assoc, request *req, Z_APDU *res)
     odr_setbuf(assoc->encode, 0, 0, 0); /* don'txfree if we abort later */
     if (assoc->print && !z_APDU(assoc->print, &res, 0, 0))
     {
     odr_setbuf(assoc->encode, 0, 0, 0); /* don'txfree if we abort later */
     if (assoc->print && !z_APDU(assoc->print, &res, 0, 0))
     {
-       logf(LOG_WARN, "ODR print error: %s", 
+       yaz_log(LOG_WARN, "ODR print error: %s", 
            odr_errmsg(odr_geterror(assoc->print)));
        odr_reset(assoc->print);
     }
            odr_errmsg(odr_geterror(assoc->print)));
        odr_reset(assoc->print);
     }
@@ -773,7 +776,7 @@ static int process_response(association *assoc, request *req, Z_APDU *res)
 #if 1
     if (request_head(&assoc->incoming))
     {
 #if 1
     if (request_head(&assoc->incoming))
     {
-       logf (LOG_DEBUG, "more work to be done");
+       yaz_log (LOG_DEBUG, "more work to be done");
        iochan_setevent(assoc->client_chan, EVENT_WORK);
     }
 #endif
        iochan_setevent(assoc->client_chan, EVENT_WORK);
     }
 #endif
@@ -796,13 +799,13 @@ static Z_APDU *process_initRequest(association *assoc, request *reqb)
     bend_initresult *binitres;
     char options[100];
 
     bend_initresult *binitres;
     char options[100];
 
-    logf(LOG_LOG, "Got initRequest");
+    yaz_log(LOG_LOG, "Got initRequest");
     if (req->implementationId)
     if (req->implementationId)
-       logf(LOG_LOG, "Id:        %s", req->implementationId);
+       yaz_log(LOG_LOG, "Id:        %s", req->implementationId);
     if (req->implementationName)
     if (req->implementationName)
-       logf(LOG_LOG, "Name:      %s", req->implementationName);
+       yaz_log(LOG_LOG, "Name:      %s", req->implementationName);
     if (req->implementationVersion)
     if (req->implementationVersion)
-       logf(LOG_LOG, "Version:   %s", req->implementationVersion);
+       yaz_log(LOG_LOG, "Version:   %s", req->implementationVersion);
 
     binitreq.stream = assoc->encode;
     binitreq.configname = "default-config";
 
     binitreq.stream = assoc->encode;
     binitreq.configname = "default-config";
@@ -817,21 +820,21 @@ static Z_APDU *process_initRequest(association *assoc, request *reqb)
     binitreq.bend_delete = NULL;
     if (!(binitres = bend_init(&binitreq)))
     {
     binitreq.bend_delete = NULL;
     if (!(binitres = bend_init(&binitreq)))
     {
-       logf(LOG_WARN, "Bad response from backend.");
+       yaz_log(LOG_WARN, "Bad response from backend.");
        return 0;
     }
 
     assoc->backend = binitres->handle;
     if ((assoc->bend_sort = (int (*)())binitreq.bend_sort))
        return 0;
     }
 
     assoc->backend = binitres->handle;
     if ((assoc->bend_sort = (int (*)())binitreq.bend_sort))
-       logf (LOG_DEBUG, "Sort handler installed");
+       yaz_log (LOG_DEBUG, "Sort handler installed");
     if ((assoc->bend_search = (int (*)())binitreq.bend_search))
     if ((assoc->bend_search = (int (*)())binitreq.bend_search))
-       logf (LOG_DEBUG, "Search handler installed");
+       yaz_log (LOG_DEBUG, "Search handler installed");
     if ((assoc->bend_present = (int (*)())binitreq.bend_present))
     if ((assoc->bend_present = (int (*)())binitreq.bend_present))
-       logf (LOG_DEBUG, "Present handler installed");   
+       yaz_log (LOG_DEBUG, "Present handler installed");   
     if ((assoc->bend_esrequest = (int (*)())binitreq.bend_esrequest))
     if ((assoc->bend_esrequest = (int (*)())binitreq.bend_esrequest))
-       logf (LOG_DEBUG, "ESRequest handler installed");   
+       yaz_log (LOG_DEBUG, "ESRequest handler installed");   
     if ((assoc->bend_delete = (int (*)())binitreq.bend_delete))
     if ((assoc->bend_delete = (int (*)())binitreq.bend_delete))
-       logf (LOG_DEBUG, "Delete handler installed");   
+       yaz_log (LOG_DEBUG, "Delete handler installed");   
     
     resp->referenceId = req->referenceId;
     *options = '\0';
     
     resp->referenceId = req->referenceId;
     *options = '\0';
@@ -892,7 +895,7 @@ static Z_APDU *process_initRequest(association *assoc, request *reqb)
        ODR_MASK_SET(resp->protocolVersion, Z_ProtocolVersion_3);
        assoc->version = 3;
     }
        ODR_MASK_SET(resp->protocolVersion, Z_ProtocolVersion_3);
        assoc->version = 3;
     }
-    logf(LOG_LOG, "Negotiated to v%d: %s", assoc->version, options);
+    yaz_log(LOG_LOG, "Negotiated to v%d: %s", assoc->version, options);
     assoc->maximumRecordSize = *req->maximumRecordSize;
     if (assoc->maximumRecordSize > control_block->maxrecordsize)
        assoc->maximumRecordSize = control_block->maxrecordsize;
     assoc->maximumRecordSize = *req->maximumRecordSize;
     if (assoc->maximumRecordSize > control_block->maxrecordsize)
        assoc->maximumRecordSize = control_block->maxrecordsize;
@@ -927,7 +930,7 @@ static Z_APDU *process_initRequest(association *assoc, request *reqb)
 
     if (binitres->errcode)
     {
 
     if (binitres->errcode)
     {
-       logf(LOG_LOG, "Connection rejected by backend.");
+       yaz_log(LOG_LOG, "Connection rejected by backend.");
        *resp->result = 0;
        assoc->state = ASSOC_DEAD;
     }
        *resp->result = 0;
        assoc->state = ASSOC_DEAD;
     }
@@ -971,7 +974,7 @@ static Z_Records *diagrec(association *assoc, int error, char *addinfo)
     bib1.oclass = CLASS_DIAGSET;
     bib1.value = VAL_BIB1;
 
     bib1.oclass = CLASS_DIAGSET;
     bib1.value = VAL_BIB1;
 
-    logf(LOG_DEBUG, "Diagnostic: %d -- %s", error, addinfo ? addinfo :
+    yaz_log(LOG_DEBUG, "Diagnostic: %d -- %s", error, addinfo ? addinfo :
        "NULL");
     *err = error;
     rec->which = Z_Records_NSD;
        "NULL");
     *err = error;
     rec->which = Z_Records_NSD;
@@ -1008,7 +1011,7 @@ static Z_NamePlusRecord *surrogatediagrec(association *assoc, char *dbname,
     bib1.oclass = CLASS_DIAGSET;
     bib1.value = VAL_BIB1;
 
     bib1.oclass = CLASS_DIAGSET;
     bib1.value = VAL_BIB1;
 
-    logf(LOG_DEBUG, "SurrogateDiagnotic: %d -- %s", error, addinfo);
+    yaz_log(LOG_DEBUG, "SurrogateDiagnotic: %d -- %s", error, addinfo);
     *err = error;
     rec->databaseName = dbname;
     rec->which = Z_NamePlusRecord_surrogateDiagnostic;
     *err = error;
     rec->databaseName = dbname;
     rec->which = Z_NamePlusRecord_surrogateDiagnostic;
@@ -1036,7 +1039,7 @@ static Z_DiagRecs *diagrecs(association *assoc, int error, char *addinfo)
     Z_DiagRec *drec = (Z_DiagRec *)odr_malloc (assoc->encode, sizeof(*drec));
     Z_DefaultDiagFormat *rec = (Z_DefaultDiagFormat *)odr_malloc (assoc->encode, sizeof(*rec));
 
     Z_DiagRec *drec = (Z_DiagRec *)odr_malloc (assoc->encode, sizeof(*drec));
     Z_DefaultDiagFormat *rec = (Z_DefaultDiagFormat *)odr_malloc (assoc->encode, sizeof(*rec));
 
-    logf(LOG_DEBUG, "DiagRecs: %d -- %s", error, addinfo ? addinfo : "");
+    yaz_log(LOG_DEBUG, "DiagRecs: %d -- %s", error, addinfo ? addinfo : "");
     bib1.proto = assoc->proto;
     bib1.oclass = CLASS_DIAGSET;
     bib1.value = VAL_BIB1;
     bib1.proto = assoc->proto;
     bib1.oclass = CLASS_DIAGSET;
     bib1.value = VAL_BIB1;
@@ -1083,8 +1086,8 @@ static Z_Records *pack_records(association *a, char *setname, int start,
     *num = 0;
     *next = 0;
 
     *num = 0;
     *next = 0;
 
-    logf(LOG_LOG, "Request to pack %d+%d", start, toget);
-    logf(LOG_DEBUG, "pms=%d, mrs=%d", a->preferredMessageSize,
+    yaz_log(LOG_LOG, "Request to pack %d+%d", start, toget);
+    yaz_log(LOG_DEBUG, "pms=%d, mrs=%d", a->preferredMessageSize,
        a->maximumRecordSize);
     for (recno = start; reclist->num_records < toget; recno++)
     {
        a->maximumRecordSize);
     for (recno = start; reclist->num_records < toget; recno++)
     {
@@ -1130,24 +1133,24 @@ static Z_Records *pack_records(association *a, char *setname, int start,
            this_length = fres->len;
        else
            this_length = odr_total(a->encode) - total_length;
            this_length = fres->len;
        else
            this_length = odr_total(a->encode) - total_length;
-       logf(LOG_DEBUG, "  fetched record, len=%d, total=%d",
+       yaz_log(LOG_DEBUG, "  fetched record, len=%d, total=%d",
            this_length, total_length);
        if (this_length + total_length > a->preferredMessageSize)
        {
            /* record is small enough, really */
            if (this_length <= a->preferredMessageSize)
            {
            this_length, total_length);
        if (this_length + total_length > a->preferredMessageSize)
        {
            /* record is small enough, really */
            if (this_length <= a->preferredMessageSize)
            {
-               logf(LOG_DEBUG, "  Dropped last normal-sized record");
+               yaz_log(LOG_DEBUG, "  Dropped last normal-sized record");
                *pres = Z_PRES_PARTIAL_2;
                break;
            }
            /* record can only be fetched by itself */
            if (this_length < a->maximumRecordSize)
            {
                *pres = Z_PRES_PARTIAL_2;
                break;
            }
            /* record can only be fetched by itself */
            if (this_length < a->maximumRecordSize)
            {
-               logf(LOG_DEBUG, "  Record > prefmsgsz");
+               yaz_log(LOG_DEBUG, "  Record > prefmsgsz");
                if (toget > 1)
                {
                if (toget > 1)
                {
-                   logf(LOG_DEBUG, "  Dropped it");
+                   yaz_log(LOG_DEBUG, "  Dropped it");
                    reclist->records[reclist->num_records] =
                         surrogatediagrec(a, fres->basename, 16, 0);
                    reclist->num_records++;
                    reclist->records[reclist->num_records] =
                         surrogatediagrec(a, fres->basename, 16, 0);
                    reclist->num_records++;
@@ -1158,7 +1161,7 @@ static Z_Records *pack_records(association *a, char *setname, int start,
            }
            else /* too big entirely */
            {
            }
            else /* too big entirely */
            {
-               logf(LOG_DEBUG, "Record > maxrcdsz");
+               yaz_log(LOG_DEBUG, "Record > maxrcdsz");
                reclist->records[reclist->num_records] =
                    surrogatediagrec(a, fres->basename, 17, 0);
                reclist->num_records++;
                reclist->records[reclist->num_records] =
                    surrogatediagrec(a, fres->basename, 17, 0);
                reclist->num_records++;
@@ -1195,19 +1198,19 @@ static Z_APDU *process_searchRequest(association *assoc, request *reqb,
     bend_search_rr *bsrr = 
        (bend_search_rr *)nmem_malloc (reqb->request_mem, sizeof(*bsrr));
     
     bend_search_rr *bsrr = 
        (bend_search_rr *)nmem_malloc (reqb->request_mem, sizeof(*bsrr));
     
-    logf(LOG_LOG, "Got SearchRequest.");
+    yaz_log(LOG_LOG, "Got SearchRequest.");
     bsrr->fd = fd;
     bsrr->request = reqb;
     bsrr->association = assoc;
     bsrr->referenceId = req->referenceId;
     save_referenceId (reqb, bsrr->referenceId);
 
     bsrr->fd = fd;
     bsrr->request = reqb;
     bsrr->association = assoc;
     bsrr->referenceId = req->referenceId;
     save_referenceId (reqb, bsrr->referenceId);
 
-    logf (LOG_LOG, "ResultSet '%s'", req->resultSetName);
+    yaz_log (LOG_LOG, "ResultSet '%s'", req->resultSetName);
     if (req->databaseNames)
     {
        int i;
        for (i = 0; i < req->num_databaseNames; i++)
     if (req->databaseNames)
     {
        int i;
        for (i = 0; i < req->num_databaseNames; i++)
-           logf (LOG_LOG, "Database '%s'", req->databaseNames[i]);
+           yaz_log (LOG_LOG, "Database '%s'", req->databaseNames[i]);
     }
     switch (req->query->which)
     {
     }
     switch (req->query->which)
     {
@@ -1287,7 +1290,7 @@ static Z_APDU *response_searchRequest(association *assoc, request *reqb,
     *fd = -1;
     if (!bsrt && !bend_searchresponse(assoc->backend, bsrt))
     {
     *fd = -1;
     if (!bsrt && !bend_searchresponse(assoc->backend, bsrt))
     {
-       logf(LOG_FATAL, "Bad result from backend");
+       yaz_log(LOG_FATAL, "Bad result from backend");
        return 0;
     }
     else if (bsrt->errcode)
        return 0;
     }
     else if (bsrt->errcode)
@@ -1391,7 +1394,7 @@ static Z_APDU *process_presentRequest(association *assoc, request *reqb,
     int *next;
     int *num;
 
     int *next;
     int *num;
 
-    logf(LOG_LOG, "Got PresentRequest.");
+    yaz_log(LOG_LOG, "Got PresentRequest.");
 
     if (!(prefformat = oid_getentbyoid(req->preferredRecordSyntax)) ||
        prefformat->oclass != CLASS_RECSYN)
 
     if (!(prefformat = oid_getentbyoid(req->preferredRecordSyntax)) ||
        prefformat->oclass != CLASS_RECSYN)
@@ -1468,7 +1471,7 @@ static Z_APDU *process_scanRequest(association *assoc, request *reqb, int *fd)
     bend_scanresult *srs;
     oident *attset;
 
     bend_scanresult *srs;
     oident *attset;
 
-    logf(LOG_LOG, "Got ScanRequest");
+    yaz_log(LOG_LOG, "Got ScanRequest");
     *scanStatus = Z_Scan_failure;
     *numberOfEntriesReturned = 0;
 
     *scanStatus = Z_Scan_failure;
     *numberOfEntriesReturned = 0;
 
@@ -1499,7 +1502,7 @@ static Z_APDU *process_scanRequest(association *assoc, request *reqb, int *fd)
        {
            int i;
            for (i = 0; i < req->num_databaseNames; i++)
        {
            int i;
            for (i = 0; i < req->num_databaseNames; i++)
-               logf (LOG_LOG, "Database '%s'", req->databaseNames[i]);
+               yaz_log (LOG_LOG, "Database '%s'", req->databaseNames[i]);
        }
        srq.num_bases = req->num_databaseNames;
        srq.basenames = req->databaseNames;
        }
        srq.num_bases = req->num_databaseNames;
        srq.basenames = req->databaseNames;
@@ -1560,7 +1563,7 @@ static Z_APDU *process_scanRequest(association *assoc, request *reqb, int *fd)
                        odr_malloc(assoc->encode, o->len = o->size =
                                   strlen(srs->entries[i].term));
                    memcpy(o->buf, srs->entries[i].term, o->len);
                        odr_malloc(assoc->encode, o->len = o->size =
                                   strlen(srs->entries[i].term));
                    memcpy(o->buf, srs->entries[i].term, o->len);
-                   logf(LOG_DEBUG, "  term #%d: '%s' (%d)", i,
+                   yaz_log(LOG_DEBUG, "  term #%d: '%s' (%d)", i,
                         srs->entries[i].term, srs->entries[i].occurrences);
                }
                else
                         srs->entries[i].term, srs->entries[i].occurrences);
                }
                else
@@ -1595,7 +1598,7 @@ static Z_APDU *process_sortRequest(association *assoc, request *reqb,
 
     Z_APDU *apdu = (Z_APDU *)odr_malloc (assoc->encode, sizeof(*apdu));
 
 
     Z_APDU *apdu = (Z_APDU *)odr_malloc (assoc->encode, sizeof(*apdu));
 
-    logf(LOG_LOG, "Got SortRequest.");
+    yaz_log(LOG_LOG, "Got SortRequest.");
 
 #ifdef ASN_COMPILED
     bsrr->num_input_setnames = req->num_inputResultSetNames;
 
 #ifdef ASN_COMPILED
     bsrr->num_input_setnames = req->num_inputResultSetNames;
@@ -1655,7 +1658,7 @@ static Z_APDU *process_deleteRequest(association *assoc, request *reqb,
        odr_malloc (assoc->encode, sizeof(*bdrr));
     Z_APDU *apdu = (Z_APDU *)odr_malloc (assoc->encode, sizeof(*apdu));
 
        odr_malloc (assoc->encode, sizeof(*bdrr));
     Z_APDU *apdu = (Z_APDU *)odr_malloc (assoc->encode, sizeof(*apdu));
 
-    logf(LOG_LOG, "Got DeleteRequest.");
+    yaz_log(LOG_LOG, "Got DeleteRequest.");
 
     bdrr->num_setnames = req->num_resultSetList;
     bdrr->setnames = req->resultSetList;
 
     bdrr->num_setnames = req->num_resultSetList;
     bdrr->setnames = req->resultSetList;
@@ -1700,7 +1703,7 @@ static void process_close(association *assoc, request *reqb)
        "unspecified"
     };
 
        "unspecified"
     };
 
-    logf(LOG_LOG, "Got Close, reason %s, message %s",
+    yaz_log(LOG_LOG, "Got Close, reason %s, message %s",
        reasons[*req->closeReason], req->diagnosticInformation ?
        req->diagnosticInformation : "NULL");
     if (assoc->version < 3) /* to make do_force respond with close */
        reasons[*req->closeReason], req->diagnosticInformation ?
        req->diagnosticInformation : "NULL");
     if (assoc->version < 3) /* to make do_force respond with close */
@@ -1779,7 +1782,7 @@ static Z_APDU *process_ESRequest(association *assoc, request *reqb, int *fd)
 
     Z_ExtendedServicesResponse *resp = apdu->u.extendedServicesResponse;
 
 
     Z_ExtendedServicesResponse *resp = apdu->u.extendedServicesResponse;
 
-    logf(LOG_DEBUG,"inside Process esRequest");
+    yaz_log(LOG_DEBUG,"inside Process esRequest");
 
     esrequest.esr = reqb->request->u.extendedServicesRequest;
     esrequest.stream = assoc->encode;
 
     esrequest.esr = reqb->request->u.extendedServicesRequest;
     esrequest.stream = assoc->encode;
@@ -1801,13 +1804,13 @@ static Z_APDU *process_ESRequest(association *assoc, request *reqb, int *fd)
     if (esrequest.errcode == -1)
     {
         /* Backend service indicates request will be processed */
     if (esrequest.errcode == -1)
     {
         /* Backend service indicates request will be processed */
-        logf(LOG_DEBUG,"Request could be processed...Accepted !");
+        yaz_log(LOG_DEBUG,"Request could be processed...Accepted !");
         *resp->operationStatus = Z_ExtendedServicesResponse_accepted;
     }
     else if (esrequest.errcode == 0)
     {
         /* Backend service indicates request will be processed */
         *resp->operationStatus = Z_ExtendedServicesResponse_accepted;
     }
     else if (esrequest.errcode == 0)
     {
         /* Backend service indicates request will be processed */
-        logf(LOG_DEBUG,"Request could be processed...Done !");
+        yaz_log(LOG_DEBUG,"Request could be processed...Done !");
         *resp->operationStatus = Z_ExtendedServicesResponse_done;
     }
     else
         *resp->operationStatus = Z_ExtendedServicesResponse_done;
     }
     else
@@ -1816,13 +1819,13 @@ static Z_APDU *process_ESRequest(association *assoc, request *reqb, int *fd)
                                         esrequest.errstring);
 
         /* Backend indicates error, request will not be processed */
                                         esrequest.errstring);
 
         /* Backend indicates error, request will not be processed */
-        logf(LOG_DEBUG,"Request could not be processed...failure !");
+        yaz_log(LOG_DEBUG,"Request could not be processed...failure !");
         *resp->operationStatus = Z_ExtendedServicesResponse_failure;
        resp->num_diagnostics = diagRecs->num_diagRecs;
        resp->diagnostics = diagRecs->diagRecs;
     }
     /* Do something with the members of bend_extendedservice */
 
         *resp->operationStatus = Z_ExtendedServicesResponse_failure;
        resp->num_diagnostics = diagRecs->num_diagRecs;
        resp->diagnostics = diagRecs->diagRecs;
     }
     /* Do something with the members of bend_extendedservice */
 
-    logf(LOG_DEBUG,"Send the result apdu");
+    yaz_log(LOG_DEBUG,"Send the result apdu");
     return apdu;
 }
     return apdu;
 }
index 9305cdf..7df2baa 100644 (file)
@@ -7,7 +7,10 @@
  *   Chas Woodfield, Fretwell Downing Datasystems.
  *
  * $Log: statserv.c,v $
  *   Chas Woodfield, Fretwell Downing Datasystems.
  *
  * $Log: statserv.c,v $
- * Revision 1.57  1999-07-06 12:17:15  adam
+ * Revision 1.58  1999-08-27 09:40:32  adam
+ * Renamed logf function to yaz_log. Removed VC++ project files.
+ *
+ * Revision 1.57  1999/07/06 12:17:15  adam
  * Added option -1 that runs server once (for profiling purposes).
  *
  * Revision 1.56  1999/06/10 11:45:30  adam
  * Added option -1 that runs server once (for profiling purposes).
  *
  * Revision 1.56  1999/06/10 11:45:30  adam
@@ -438,12 +441,12 @@ static void listener(IOCHAN h, int event)
     {
         if ((res = cs_listen(line, 0, 0)) < 0)
         {
     {
         if ((res = cs_listen(line, 0, 0)) < 0)
         {
-           logf(LOG_FATAL, "cs_listen failed");
+           yaz_log(LOG_FATAL, "cs_listen failed");
            return;
         }
         else if (res == 1)
             return;
            return;
         }
         else if (res == 1)
             return;
-        logf(LOG_DEBUG, "listen ok");
+        yaz_log(LOG_DEBUG, "listen ok");
         iochan_setevent(h, EVENT_OUTPUT);
         iochan_setflags(h, EVENT_OUTPUT | EVENT_EXCEPT); /* set up for acpt */
     }
         iochan_setevent(h, EVENT_OUTPUT);
         iochan_setflags(h, EVENT_OUTPUT | EVENT_EXCEPT); /* set up for acpt */
     }
@@ -456,34 +459,34 @@ static void listener(IOCHAN h, int event)
 
        if (!(new_line = cs_accept(line)))
        {
 
        if (!(new_line = cs_accept(line)))
        {
-           logf(LOG_FATAL, "Accept failed.");
+           yaz_log(LOG_FATAL, "Accept failed.");
            iochan_setflags(h, EVENT_INPUT | EVENT_EXCEPT); /* reset listener */
            return;
        }
            iochan_setflags(h, EVENT_INPUT | EVENT_EXCEPT); /* reset listener */
            return;
        }
-       logf(LOG_DEBUG, "Accept ok");
+       yaz_log(LOG_DEBUG, "Accept ok");
 
        if (!(new_chan = iochan_create(cs_fileno(new_line), ir_session,
                                       EVENT_INPUT)))
        {
 
        if (!(new_chan = iochan_create(cs_fileno(new_line), ir_session,
                                       EVENT_INPUT)))
        {
-           logf(LOG_FATAL, "Failed to create iochan");
+           yaz_log(LOG_FATAL, "Failed to create iochan");
             iochan_destroy(h);
             return;
        }
 
             iochan_destroy(h);
             return;
        }
 
-       logf(LOG_DEBUG, "Creating association");
+       yaz_log(LOG_DEBUG, "Creating association");
        if (!(newas = create_association(new_chan, new_line)))
        {
        if (!(newas = create_association(new_chan, new_line)))
        {
-           logf(LOG_FATAL, "Failed to create new assoc.");
+           yaz_log(LOG_FATAL, "Failed to create new assoc.");
             iochan_destroy(h);
             return;
        }
             iochan_destroy(h);
             return;
        }
-       logf(LOG_DEBUG, "Setting timeout %d", control_block.idle_timeout);
+       yaz_log(LOG_DEBUG, "Setting timeout %d", control_block.idle_timeout);
        iochan_setdata(new_chan, newas);
        iochan_settimeout(new_chan, control_block.idle_timeout * 60);
 #ifndef WIN32
        iochan_setdata(new_chan, newas);
        iochan_settimeout(new_chan, control_block.idle_timeout * 60);
 #ifndef WIN32
-       logf(LOG_DEBUG, "Determining client address");
+       yaz_log(LOG_DEBUG, "Determining client address");
        a = cs_addrstr(new_line);
        a = cs_addrstr(new_line);
-       logf(LOG_LOG, "Accepted connection from %s", a ? a : "[Unknown]");
+       yaz_log(LOG_LOG, "Accepted connection from %s", a ? a : "[Unknown]");
 #endif
        /* Now what we need todo is create a new thread with this iochan as
           the parameter */
 #endif
        /* Now what we need todo is create a new thread with this iochan as
           the parameter */
@@ -496,19 +499,19 @@ static void listener(IOCHAN h, int event)
         if (NewHandle == (HANDLE)-1)
        {
            
         if (NewHandle == (HANDLE)-1)
        {
            
-           logf(LOG_FATAL|LOG_ERRNO, "Failed to create new thread.");
+           yaz_log(LOG_FATAL|LOG_ERRNO, "Failed to create new thread.");
             iochan_destroy(h);
             return;
        }
         /* We successfully created the thread, so add it to the list */
         statserv_add(NewHandle, new_chan);
 
             iochan_destroy(h);
             return;
        }
         /* We successfully created the thread, so add it to the list */
         statserv_add(NewHandle, new_chan);
 
-        logf(LOG_DEBUG, "Created new thread, iochan %p", new_chan);
+        yaz_log(LOG_DEBUG, "Created new thread, iochan %p", new_chan);
         iochan_setflags(h, EVENT_INPUT | EVENT_EXCEPT); /* reset listener */
     }
     else
     {
         iochan_setflags(h, EVENT_INPUT | EVENT_EXCEPT); /* reset listener */
     }
     else
     {
-       logf(LOG_FATAL, "Bad event on listener.");
+       yaz_log(LOG_FATAL, "Bad event on listener.");
         iochan_destroy(h);
         return;
     }
         iochan_destroy(h);
         return;
     }
@@ -544,13 +547,13 @@ static void listener(IOCHAN h, int event)
 
            if (pipe(hand) < 0)
            {
 
            if (pipe(hand) < 0)
            {
-               logf(LOG_FATAL|LOG_ERRNO, "pipe");
+               yaz_log(LOG_FATAL|LOG_ERRNO, "pipe");
                 iochan_destroy(h);
                 return;
            }
            if ((res = fork()) < 0)
            {
                 iochan_destroy(h);
                 return;
            }
            if ((res = fork()) < 0)
            {
-               logf(LOG_FATAL|LOG_ERRNO, "fork");
+               yaz_log(LOG_FATAL|LOG_ERRNO, "fork");
                 iochan_destroy(h);
                 return;
            }
                 iochan_destroy(h);
                 return;
            }
@@ -584,13 +587,13 @@ static void listener(IOCHAN h, int event)
                    
                    if ((res = read(hand[0], dummy, 1)) < 0 && errno != EINTR)
                    {
                    
                    if ((res = read(hand[0], dummy, 1)) < 0 && errno != EINTR)
                    {
-                       logf(LOG_FATAL|LOG_ERRNO, "handshake read");
+                       yaz_log(LOG_FATAL|LOG_ERRNO, "handshake read");
                         return;
                    }
                    else if (res >= 0)
                        break;
                }
                         return;
                    }
                    else if (res >= 0)
                        break;
                }
-               logf(LOG_DEBUG, "P: Child has taken the call");
+               yaz_log(LOG_DEBUG, "P: Child has taken the call");
                close(hand[0]);
                return;
            }
                close(hand[0]);
                return;
            }
@@ -598,12 +601,12 @@ static void listener(IOCHAN h, int event)
        if ((res = cs_listen_check(line, 0, 0, control_block.check_ip,
                                   control_block.daemon_name)) < 0)
        {
        if ((res = cs_listen_check(line, 0, 0, control_block.check_ip,
                                   control_block.daemon_name)) < 0)
        {
-           logf(LOG_WARN, "cs_listen failed");
+           yaz_log(LOG_WARN, "cs_listen failed");
            return;
        }
        else if (res == 1)
            return;
            return;
        }
        else if (res == 1)
            return;
-       logf(LOG_DEBUG, "listen ok");
+       yaz_log(LOG_DEBUG, "listen ok");
        iochan_setevent(h, EVENT_OUTPUT);
        iochan_setflags(h, EVENT_OUTPUT | EVENT_EXCEPT); /* set up for acpt */
     }
        iochan_setevent(h, EVENT_OUTPUT);
        iochan_setflags(h, EVENT_OUTPUT | EVENT_EXCEPT); /* set up for acpt */
     }
@@ -616,11 +619,11 @@ static void listener(IOCHAN h, int event)
 
        if (!(new_line = cs_accept(line)))
        {
 
        if (!(new_line = cs_accept(line)))
        {
-           logf(LOG_FATAL, "Accept failed.");
+           yaz_log(LOG_FATAL, "Accept failed.");
            iochan_setflags(h, EVENT_INPUT | EVENT_EXCEPT); /* reset listener */
            return;
        }
            iochan_setflags(h, EVENT_INPUT | EVENT_EXCEPT); /* reset listener */
            return;
        }
-       logf(LOG_DEBUG, "accept ok");
+       yaz_log(LOG_DEBUG, "accept ok");
        if (control_block.dynamic)
        {
            IOCHAN pp;
        if (control_block.dynamic)
        {
            IOCHAN pp;
@@ -632,7 +635,7 @@ static void listener(IOCHAN h, int event)
                iochan_destroy(pp);
            }
            /* release dad */
                iochan_destroy(pp);
            }
            /* release dad */
-           logf(LOG_DEBUG, "Releasing parent");
+           yaz_log(LOG_DEBUG, "Releasing parent");
            close(hand[1]);
        }
        else
            close(hand[1]);
        }
        else
@@ -641,7 +644,7 @@ static void listener(IOCHAN h, int event)
        if (!(new_chan = iochan_create(cs_fileno(new_line), ir_session,
            EVENT_INPUT)))
        {
        if (!(new_chan = iochan_create(cs_fileno(new_line), ir_session,
            EVENT_INPUT)))
        {
-           logf(LOG_FATAL, "Failed to create iochan");
+           yaz_log(LOG_FATAL, "Failed to create iochan");
             iochan_destroy(h);
             return;
        }
             iochan_destroy(h);
             return;
        }
@@ -649,18 +652,18 @@ static void listener(IOCHAN h, int event)
         pListener = new_chan;
        if (!(newas = create_association(new_chan, new_line)))
        {
         pListener = new_chan;
        if (!(newas = create_association(new_chan, new_line)))
        {
-           logf(LOG_FATAL, "Failed to create new assoc.");
+           yaz_log(LOG_FATAL, "Failed to create new assoc.");
             iochan_destroy(h);
             return;
        }
        iochan_setdata(new_chan, newas);
        iochan_settimeout(new_chan, control_block.idle_timeout * 60);
        a = cs_addrstr(new_line);
             iochan_destroy(h);
             return;
        }
        iochan_setdata(new_chan, newas);
        iochan_settimeout(new_chan, control_block.idle_timeout * 60);
        a = cs_addrstr(new_line);
-       logf(LOG_LOG, "Accepted connection from %s", a ? a : "[Unknown]");
+       yaz_log(LOG_LOG, "Accepted connection from %s", a ? a : "[Unknown]");
     }
     else
     {
     }
     else
     {
-       logf(LOG_FATAL, "Bad event on listener.");
+       yaz_log(LOG_FATAL, "Bad event on listener.");
         iochan_destroy(h);
         return;
     }
         iochan_destroy(h);
         return;
     }
@@ -684,23 +687,23 @@ static void inetd_connection(int what)
                 iochan_setdata(chan, assoc);
                 iochan_settimeout(chan, control_block.idle_timeout * 60);
                 addr = cs_addrstr(line);
                 iochan_setdata(chan, assoc);
                 iochan_settimeout(chan, control_block.idle_timeout * 60);
                 addr = cs_addrstr(line);
-                logf(LOG_LOG, "Inetd association from %s", addr ? addr : "[UNKNOWN]");
+                yaz_log(LOG_LOG, "Inetd association from %s", addr ? addr : "[UNKNOWN]");
             }
             else
             {
             }
             else
             {
-               logf(LOG_FATAL, "Failed to create association structure");
+               yaz_log(LOG_FATAL, "Failed to create association structure");
             }
             chan->next = pListener;
             pListener = chan;
         }
         else
         {
             }
             chan->next = pListener;
             pListener = chan;
         }
         else
         {
-            logf(LOG_FATAL, "Failed to create iochan");
+            yaz_log(LOG_FATAL, "Failed to create iochan");
         }
     }
     else
     {
         }
     }
     else
     {
-       logf(LOG_ERRNO|LOG_FATAL, "Failed to create comstack on socket 0");
+       yaz_log(LOG_ERRNO|LOG_FATAL, "Failed to create comstack on socket 0");
     }
 }
 
     }
 }
 
@@ -717,7 +720,7 @@ static void add_listener(char *where, int what)
 
     if (!where || sscanf(where, "%[^:]:%s", mode, addr) != 2)
     {
 
     if (!where || sscanf(where, "%[^:]:%s", mode, addr) != 2)
     {
-       logf (LOG_WARN, "%s: Address format: ('tcp'|'osi')':'<address>", me);
+       yaz_log (LOG_WARN, "%s: Address format: ('tcp'|'osi')':'<address>", me);
        return;
     }
     if (!strcmp(mode, "tcp"))
        return;
     }
     if (!strcmp(mode, "tcp"))
@@ -727,21 +730,21 @@ static void add_listener(char *where, int what)
 #ifdef USE_XTIMOSI
        type = mosi_type;
 #else
 #ifdef USE_XTIMOSI
        type = mosi_type;
 #else
-       logf (LOG_WARN, "OSI Transport not allowed by configuration.");
+       yaz_log (LOG_WARN, "OSI Transport not allowed by configuration.");
        return;
 #endif
     }
     else
     {
        return;
 #endif
     }
     else
     {
-       logf (LOG_WARN, "You must specify either 'osi:' or 'tcp:'");
+       yaz_log (LOG_WARN, "You must specify either 'osi:' or 'tcp:'");
        return;
     }
        return;
     }
-    logf(LOG_LOG, "Adding %s %s listener on %s",
+    yaz_log(LOG_LOG, "Adding %s %s listener on %s",
         control_block.dynamic ? "dynamic" : "static",
        what == PROTO_SR ? "SR" : "Z3950", where);
     if (!(l = cs_create(type, 0, what)))
     {
         control_block.dynamic ? "dynamic" : "static",
        what == PROTO_SR ? "SR" : "Z3950", where);
     if (!(l = cs_create(type, 0, what)))
     {
-       logf(LOG_FATAL|LOG_ERRNO, "Failed to create listener");
+       yaz_log(LOG_FATAL|LOG_ERRNO, "Failed to create listener");
        return;
     }
     ap = cs_straddr (l, addr);
        return;
     }
     ap = cs_straddr (l, addr);
@@ -753,14 +756,14 @@ static void add_listener(char *where, int what)
     }
     if (cs_bind(l, ap, CS_SERVER) < 0)
     {
     }
     if (cs_bind(l, ap, CS_SERVER) < 0)
     {
-       logf(LOG_FATAL|LOG_ERRNO, "Failed to bind to %s", where);
+       yaz_log(LOG_FATAL|LOG_ERRNO, "Failed to bind to %s", where);
        cs_close (l);
        return;
     }
     if (!(lst = iochan_create(cs_fileno(l), listener, EVENT_INPUT |
         EVENT_EXCEPT)))
     {
        cs_close (l);
        return;
     }
     if (!(lst = iochan_create(cs_fileno(l), listener, EVENT_INPUT |
         EVENT_EXCEPT)))
     {
-       logf(LOG_FATAL|LOG_ERRNO, "Failed to create IOCHAN-type");
+       yaz_log(LOG_FATAL|LOG_ERRNO, "Failed to create IOCHAN-type");
        cs_close (l);
        return;
     }
        cs_close (l);
        return;
     }
@@ -831,12 +834,12 @@ int statserv_start(int argc, char **argv)
        
        if (!(pw = getpwnam(control_block.setuid)))
        {
        
        if (!(pw = getpwnam(control_block.setuid)))
        {
-           logf(LOG_FATAL, "%s: Unknown user", control_block.setuid);
+           yaz_log(LOG_FATAL, "%s: Unknown user", control_block.setuid);
            return(1);
        }
        if (setuid(pw->pw_uid) < 0)
        {
            return(1);
        }
        if (setuid(pw->pw_uid) < 0)
        {
-           logf(LOG_FATAL|LOG_ERRNO, "setuid");
+           yaz_log(LOG_FATAL|LOG_ERRNO, "setuid");
            exit(1);
        }
     }
            exit(1);
        }
     }
@@ -850,7 +853,7 @@ int statserv_start(int argc, char **argv)
        ret = 1;
     else
     {
        ret = 1;
     else
     {
-       logf(LOG_LOG, "Entering event loop.");
+       yaz_log(LOG_LOG, "Entering event loop.");
         ret = event_loop(&pListener);
     }
     nmem_exit ();
         ret = event_loop(&pListener);
     }
     nmem_exit ();
index e0a793d..3d629ec 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: tcpdchk.c,v $
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: tcpdchk.c,v $
- * Revision 1.2  1999-04-20 09:56:48  adam
+ * Revision 1.3  1999-08-27 09:40:32  adam
+ * Renamed logf function to yaz_log. Removed VC++ project files.
+ *
+ * Revision 1.2  1999/04/20 09:56:48  adam
  * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
  * Modified all encoders/decoders to reflect this change.
  *
  * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
  * Modified all encoders/decoders to reflect this change.
  *
@@ -77,12 +80,12 @@ int check_ip_tcpd(void *cd, const char *addr, int len, int type)
            i = hosts_access(&request_info);
            if (!i)
            {
            i = hosts_access(&request_info);
            if (!i)
            {
-               logf (LOG_DEBUG, "access denied from %s",
-                     host_name ? host_name : host_addr);
+               yaz_log (LOG_DEBUG, "access denied from %s",
+                        host_name ? host_name : host_addr);
                return 1;
            }
                return 1;
            }
-           logf (LOG_DEBUG, "access granted from %s",
-                 host_name ? host_name : host_addr);
+           yaz_log (LOG_DEBUG, "access granted from %s",
+                    host_name ? host_name : host_addr);
 #endif
        }
     }
 #endif
        }
     }
index f6b1185..f404cfc 100644 (file)
@@ -1,10 +1,13 @@
 /*
 /*
- * Copyright (c) 1995-1997, Index Data
+ * Copyright (c) 1995-1999, Index Data
  * See the file LICENSE for details.
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: log.c,v $
  * See the file LICENSE for details.
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: log.c,v $
- * Revision 1.18  1998-10-28 10:27:00  adam
+ * Revision 1.19  1999-08-27 09:40:32  adam
+ * Renamed logf function to yaz_log. Removed VC++ project files.
+ *
+ * Revision 1.18  1998/10/28 10:27:00  adam
  * New functions log_init_file, log_init_level, log_init_prefix.
  *
  * Revision 1.17  1997/12/09 16:11:02  adam
  * New functions log_init_file, log_init_level, log_init_prefix.
  *
  * Revision 1.17  1997/12/09 16:11:02  adam
@@ -190,7 +193,7 @@ void log_event_end (void (*func)(int, const char *, void *), void *info)
     end_hook_info = info;
 }
 
     end_hook_info = info;
 }
 
-void logf(int level, const char *fmt, ...)
+void yaz_log(int level, const char *fmt, ...)
 {
     va_list ap;
     char buf[4096], flags[1024];
 {
     va_list ap;
     char buf[4096], flags[1024];
index 16d8421..61fe862 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: nmem.c,v $
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: nmem.c,v $
- * Revision 1.17  1999-07-13 13:28:25  adam
+ * Revision 1.18  1999-08-27 09:40:32  adam
+ * Renamed logf function to yaz_log. Removed VC++ project files.
+ *
+ * Revision 1.17  1999/07/13 13:28:25  adam
  * Better debugging for NMEM routines.
  *
  * Revision 1.16  1999/03/31 11:18:25  adam
  * Better debugging for NMEM routines.
  *
  * Revision 1.16  1999/03/31 11:18:25  adam
@@ -122,7 +125,7 @@ static void free_block(nmem_block *p)
     p->next = freelist;
     freelist = p;
 #if NMEM_DEBUG
     p->next = freelist;
     freelist = p;
 #if NMEM_DEBUG
-    logf (LOG_DEBUG, "nmem free_block p=%p", p);
+    yaz_log (LOG_DEBUG, "nmem free_block p=%p", p);
 #endif
 }
 
 #endif
 }
 
@@ -131,10 +134,10 @@ void nmem_print_list (void)
 {
     struct nmem_debug *p;
 
 {
     struct nmem_debug *p;
 
-    logf (LOG_DEBUG, "nmem print list");
+    yaz_log (LOG_DEBUG, "nmem print list");
     NMEM_ENTER;
     for (p = nmem_debug_list; p; p = p->next)
     NMEM_ENTER;
     for (p = nmem_debug_list; p; p = p->next)
-       logf (LOG_DEBUG, " %s:%d p=%p", p->file, p->line, p->p);
+       yaz_log (LOG_DEBUG, " %s:%d p=%p", p->file, p->line, p->p);
     NMEM_LEAVE;
 }
 #endif
     NMEM_LEAVE;
 }
 #endif
@@ -146,7 +149,7 @@ static nmem_block *get_block(int size)
     nmem_block *r, *l;
 
 #if NMEM_DEBUG
     nmem_block *r, *l;
 
 #if NMEM_DEBUG
-    logf (LOG_DEBUG, "nmem get_block size=%d", size);
+    yaz_log (LOG_DEBUG, "nmem get_block size=%d", size);
 #endif
     for (r = freelist, l = 0; r; l = r, r = r->next)
        if (r->size >= size)
 #endif
     for (r = freelist, l = 0; r; l = r, r = r->next)
        if (r->size >= size)
@@ -154,7 +157,7 @@ static nmem_block *get_block(int size)
     if (r)
     {
 #if NMEM_DEBUG
     if (r)
     {
 #if NMEM_DEBUG
-       logf (LOG_DEBUG, "nmem get_block found free block p=%p", r);
+       yaz_log (LOG_DEBUG, "nmem get_block found free block p=%p", r);
 #endif
        if (l)
            l->next = r->next;
 #endif
        if (l)
            l->next = r->next;
@@ -168,7 +171,7 @@ static nmem_block *get_block(int size)
        if (get < size)
            get = size;
 #if NMEM_DEBUG
        if (get < size)
            get = size;
 #if NMEM_DEBUG
-       logf (LOG_DEBUG, "nmem get_block alloc new block size=%d", get);
+       yaz_log (LOG_DEBUG, "nmem get_block alloc new block size=%d", get);
 #endif
        r = (nmem_block *)xmalloc(sizeof(*r));
        r->buf = (char *)xmalloc(r->size = get);
 #endif
        r = (nmem_block *)xmalloc(sizeof(*r));
        r->buf = (char *)xmalloc(r->size = get);
@@ -182,7 +185,7 @@ void nmem_reset(NMEM n)
     nmem_block *t;
 
 #if NMEM_DEBUG
     nmem_block *t;
 
 #if NMEM_DEBUG
-    logf (LOG_DEBUG, "nmem_reset p=%p", n);
+    yaz_log (LOG_DEBUG, "nmem_reset p=%p", n);
 #endif
     if (!n)
        return;
 #endif
     if (!n)
        return;
@@ -207,7 +210,7 @@ void *nmem_malloc(NMEM n, int size)
     char *r;
 
 #if NMEM_DEBUG
     char *r;
 
 #if NMEM_DEBUG
-    logf (LOG_DEBUG, "%s:%d: nmem_malloc p=%p size=%d", file, line,
+    yaz_log (LOG_DEBUG, "%s:%d: nmem_malloc p=%p size=%d", file, line,
                      n, size);
 #endif
     if (!n)
                      n, size);
 #endif
     if (!n)
@@ -260,7 +263,7 @@ NMEM nmem_create(void)
     NMEM_LEAVE;
 
 #if NMEM_DEBUG
     NMEM_LEAVE;
 
 #if NMEM_DEBUG
-    logf (LOG_DEBUG, "%s:%d: nmem_create %d p=%p", file, line,
+    yaz_log (LOG_DEBUG, "%s:%d: nmem_create %d p=%p", file, line,
                      nmem_active_no, r);
 #endif
     r->blocks = 0;
                      nmem_active_no, r);
 #endif
     r->blocks = 0;
@@ -271,7 +274,7 @@ NMEM nmem_create(void)
     for (debug_p = nmem_debug_list; debug_p; debug_p = debug_p->next)
        if (debug_p->p == r)
        {
     for (debug_p = nmem_debug_list; debug_p; debug_p = debug_p->next)
        if (debug_p->p == r)
        {
-           logf (LOG_FATAL, "multi used block in nmem");
+           yaz_log (LOG_FATAL, "multi used block in nmem");
            abort ();
        }
     debug_p = xmalloc (sizeof(*debug_p));
            abort ();
        }
     debug_p = xmalloc (sizeof(*debug_p));
@@ -301,7 +304,7 @@ void nmem_destroy(NMEM n)
        return;
     
 #if NMEM_DEBUG
        return;
     
 #if NMEM_DEBUG
-    logf (LOG_DEBUG, "%s:%d: nmem_destroy %d p=%p", file, line,
+    yaz_log (LOG_DEBUG, "%s:%d: nmem_destroy %d p=%p", file, line,
                      nmem_active_no-1, n);
     NMEM_ENTER;
     for (debug_p = &nmem_debug_list; *debug_p; debug_p = &(*debug_p)->next)
                      nmem_active_no-1, n);
     NMEM_ENTER;
     for (debug_p = &nmem_debug_list; *debug_p; debug_p = &(*debug_p)->next)
@@ -317,8 +320,8 @@ void nmem_destroy(NMEM n)
     nmem_print_list();
     if (!ok)
     {
     nmem_print_list();
     if (!ok)
     {
-       logf (LOG_WARN, "%s:%d destroying unallocated nmem block p=%p",
-             file, line, n);
+       yaz_log (LOG_WARN, "%s:%d destroying unallocated nmem block p=%p",
+                file, line, n);
        return;
     }
 #endif
        return;
     }
 #endif
index 194317f..a4d4f64 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: readconf.c,v $
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: readconf.c,v $
- * Revision 1.7  1999-06-30 09:10:32  adam
+ * Revision 1.8  1999-08-27 09:40:32  adam
+ * Renamed logf function to yaz_log. Removed VC++ project files.
+ *
+ * Revision 1.7  1999/06/30 09:10:32  adam
  * Fixed reading of MS-DOS files.
  *
  * Revision 1.6  1998/10/13 16:09:55  adam
  * Fixed reading of MS-DOS files.
  *
  * Revision 1.6  1998/10/13 16:09:55  adam
@@ -95,7 +98,7 @@ int readconf(char *name, void *rprivate,
     
     if (!(f = fopen(name, "r")))
     {
     
     if (!(f = fopen(name, "r")))
     {
-       logf(LOG_WARN|LOG_ERRNO, "readconf: %s", name);
+       yaz_log(LOG_WARN|LOG_ERRNO, "readconf: %s", name);
        return -1;
     }
     for (;;)
        return -1;
     }
     for (;;)
index c948dc1..4cfc8d8 100644 (file)
@@ -1,10 +1,13 @@
 /*
 /*
- * Copyright (c) 1995, Index Data.
+ * Copyright (c) 1995-1999, Index Data.
  * See the file LICENSE for details.
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: wrbuf.c,v $
  * See the file LICENSE for details.
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: wrbuf.c,v $
- * Revision 1.4  1998-02-11 11:53:36  adam
+ * Revision 1.5  1999-08-27 09:40:32  adam
+ * Renamed logf function to yaz_log. Removed VC++ project files.
+ *
+ * Revision 1.4  1998/02/11 11:53:36  adam
  * Changed code so that it compiles as C++.
  *
  * Revision 1.3  1997/05/01 15:08:15  adam
  * Changed code so that it compiles as C++.
  *
  * Revision 1.3  1997/05/01 15:08:15  adam
@@ -69,7 +72,7 @@ int wrbuf_grow(WRBUF b, int minsize)
     return 0;
 }
 
     return 0;
 }
 
-int wrbuf_write(WRBUF b, char *buf, int size)
+int wrbuf_write(WRBUF b, const char *buf, int size)
 {
     if (b->pos + size >= b->size)
        wrbuf_grow(b, size);
 {
     if (b->pos + size >= b->size)
        wrbuf_grow(b, size);
index d4aa919..fb76a53 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: xmalloc.c,v $
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: xmalloc.c,v $
- * Revision 1.7  1999-07-13 13:24:53  adam
+ * Revision 1.8  1999-08-27 09:40:32  adam
+ * Renamed logf function to yaz_log. Removed VC++ project files.
+ *
+ * Revision 1.7  1999/07/13 13:24:53  adam
  * Updated memory debugging memory allocatation routines.
  *
  * Revision 1.6  1998/02/11 11:53:36  adam
  * Updated memory debugging memory allocatation routines.
  *
  * Revision 1.6  1998/02/11 11:53:36  adam
@@ -54,7 +57,7 @@
 #include <log.h>
 #include <xmalloc.h>
 
 #include <log.h>
 #include <xmalloc.h>
 
-#define TRACE_XMALLOC 0
+#define TRACE_XMALLOC 2
 
 #if TRACE_XMALLOC > 1
 
 
 #if TRACE_XMALLOC > 1
 
@@ -107,12 +110,12 @@ void xfree_d(void *ptr, const char *file, int line)
        ((char*)ptr - 4*sizeof(char) - sizeof(*dinfo));
     if (memcmp(head, (char*) ptr - 4*sizeof(char), 4*sizeof(char)))
     {
        ((char*)ptr - 4*sizeof(char) - sizeof(*dinfo));
     if (memcmp(head, (char*) ptr - 4*sizeof(char), 4*sizeof(char)))
     {
-       logf(LOG_FATAL, "xfree_d bad head, %s:%d, %p", file, line, ptr);
+       yaz_log(LOG_FATAL, "xfree_d bad head, %s:%d, %p", file, line, ptr);
         abort();
     }
     if (memcmp((char*) ptr + dinfo->len, tail, 4*sizeof(char)))
     {
         abort();
     }
     if (memcmp((char*) ptr + dinfo->len, tail, 4*sizeof(char)))
     {
-       logf(LOG_FATAL, "xfree_d bad tail, %s:%d, %p", file, line, ptr);
+       yaz_log(LOG_FATAL, "xfree_d bad tail, %s:%d, %p", file, line, ptr);
         abort();
     }
     if (dinfo->prev)
         abort();
     }
     if (dinfo->prev)
@@ -142,13 +145,15 @@ void *xrealloc_d(void *p, size_t nbytes, const char *file, int line)
     {
        if (memcmp(head, ptr - 4*sizeof(char), 4*sizeof(char)))
        {
     {
        if (memcmp(head, ptr - 4*sizeof(char), 4*sizeof(char)))
        {
-           logf(LOG_FATAL, "xrealloc_d bad head, %s:%d, %p", file, line, ptr);
+           yaz_log(LOG_FATAL, "xrealloc_d bad head, %s:%d, %p",
+                   file, line, ptr);
            abort();
        }
        dinfo = (struct dmalloc_info *) (ptr-4*sizeof(char) - sizeof(*dinfo));
        if (memcmp(ptr + dinfo->len, tail, 4*sizeof(char)))
        {
            abort();
        }
        dinfo = (struct dmalloc_info *) (ptr-4*sizeof(char) - sizeof(*dinfo));
        if (memcmp(ptr + dinfo->len, tail, 4*sizeof(char)))
        {
-           logf(LOG_FATAL, "xrealloc_d bad tail, %s:%d, %p", file, line, ptr);
+           yaz_log(LOG_FATAL, "xrealloc_d bad tail, %s:%d, %p",
+                   file, line, ptr);
            abort();
        }
        if (dinfo->prev)
            abort();
        }
        if (dinfo->prev)
@@ -217,19 +222,19 @@ void xmalloc_trav_d(const char *file, int line)
     size_t size = 0;
     struct dmalloc_info *dinfo = dmalloc_list;
     
     size_t size = 0;
     struct dmalloc_info *dinfo = dmalloc_list;
     
-    logf (LOG_LOG, "malloc_trav %s:%d", file, line);
+    yaz_log (LOG_LOG, "malloc_trav %s:%d", file, line);
     while (dinfo)
     {
     while (dinfo)
     {
-       logf (LOG_LOG, " %20s:%d p=%p size=%d", dinfo->file, dinfo->line,
+       yaz_log (LOG_LOG, " %20s:%d p=%p size=%d", dinfo->file, dinfo->line,
              dinfo+sizeof(*dinfo)+4*sizeof(char), dinfo->len);
        size += dinfo->len;
        dinfo = dinfo->next;
     }
              dinfo+sizeof(*dinfo)+4*sizeof(char), dinfo->len);
        size += dinfo->len;
        dinfo = dinfo->next;
     }
-    logf (LOG_LOG, "total bytes %ld", (long) size);
+    yaz_log (LOG_LOG, "total bytes %ld", (long) size);
 }
 
 #else
 }
 
 #else
-/* ! TRACE_XMALLOC */
+/* TRACE_XMALLOC <= 1 */
 #define xrealloc_d(o, x, f, l) realloc(o, x)
 #define xmalloc_d(x, f, l) malloc(x)
 #define xcalloc_d(x,y, f, l) calloc(x,y)
 #define xrealloc_d(o, x, f, l) realloc(o, x)
 #define xmalloc_d(x, f, l) malloc(x)
 #define xcalloc_d(x,y, f, l) calloc(x,y)
@@ -247,12 +252,13 @@ void *xrealloc_f (void *o, size_t size, const char *file, int line)
     void *p = xrealloc_d (o, size, file, line);
 
 #if TRACE_XMALLOC
     void *p = xrealloc_d (o, size, file, line);
 
 #if TRACE_XMALLOC
-    logf (LOG_DEBUG,
+    yaz_log (LOG_DEBUG,
             "%s:%d: xrealloc(s=%d) %p -> %p", file, line, size, o, p);
 #endif
     if (!p)
     {
             "%s:%d: xrealloc(s=%d) %p -> %p", file, line, size, o, p);
 #endif
     if (!p)
     {
-       logf (LOG_FATAL|LOG_ERRNO, "Out of memory, realloc (%d bytes)", size);
+       yaz_log (LOG_FATAL|LOG_ERRNO, "Out of memory, realloc (%d bytes)",
+                size);
        exit(1);
     }
     return p;
        exit(1);
     }
     return p;
@@ -263,11 +269,11 @@ void *xmalloc_f (size_t size, const char *file, int line)
     void *p = xmalloc_d (size, file, line);
     
 #if TRACE_XMALLOC
     void *p = xmalloc_d (size, file, line);
     
 #if TRACE_XMALLOC
-    logf (LOG_DEBUG, "%s:%d: xmalloc(s=%d) %p", file, line, size, p);
+    yaz_log (LOG_DEBUG, "%s:%d: xmalloc(s=%d) %p", file, line, size, p);
 #endif
     if (!p)
     {
 #endif
     if (!p)
     {
-        logf (LOG_FATAL, "Out of memory - malloc (%d bytes)", size);
+        yaz_log (LOG_FATAL, "Out of memory - malloc (%d bytes)", size);
         exit (1);
     }
     return p;
         exit (1);
     }
     return p;
@@ -277,11 +283,11 @@ void *xcalloc_f (size_t nmemb, size_t size, const char *file, int line)
 {
     void *p = xcalloc_d (nmemb, size, file, line);
 #if TRACE_XMALLOC
 {
     void *p = xcalloc_d (nmemb, size, file, line);
 #if TRACE_XMALLOC
-    logf (LOG_DEBUG, "%s:%d: xcalloc(s=%d) %p", file, line, size, p);
+    yaz_log (LOG_DEBUG, "%s:%d: xcalloc(s=%d) %p", file, line, size, p);
 #endif
     if (!p)
     {
 #endif
     if (!p)
     {
-        logf (LOG_FATAL, "Out of memory - calloc (%d, %d)", nmemb, size);
+        yaz_log (LOG_FATAL, "Out of memory - calloc (%d, %d)", nmemb, size);
         exit (1);
     }
     return p;
         exit (1);
     }
     return p;
@@ -291,7 +297,7 @@ char *xstrdup_f (const char *s, const char *file, int line)
 {
     char *p = (char *)xmalloc_d (strlen(s)+1, file, line);
 #if TRACE_XMALLOC
 {
     char *p = (char *)xmalloc_d (strlen(s)+1, file, line);
 #if TRACE_XMALLOC
-    logf (LOG_DEBUG, "%s:%d: xstrdup(s=%d) %p", file, line, strlen(s)+1, p);
+    yaz_log (LOG_DEBUG, "%s:%d: xstrdup(s=%d) %p", file, line, strlen(s)+1, p);
 #endif
     strcpy (p, s);
     return p;
 #endif
     strcpy (p, s);
     return p;
@@ -303,7 +309,7 @@ void xfree_f(void *p, const char *file, int line)
         return ;
 #if TRACE_XMALLOC
     if (p)
         return ;
 #if TRACE_XMALLOC
     if (p)
-        logf (LOG_DEBUG, "%s:%d: xfree %p", file, line, p);
+        yaz_log (LOG_DEBUG, "%s:%d: xfree %p", file, line, p);
 #endif
     xfree_d(p, file, line);
 }
 #endif
     xfree_d(p, file, line);
 }
index 4c7f1fb..751384a 100644 (file)
@@ -1,46 +1,57 @@
-
 YAZ Compilation guidelines for winNT/95.
 YAZ Compilation guidelines for winNT/95.
-  $Id: windows.txt,v 1.1 1998-01-07 12:59:27 adam Exp $
-
-This distribution of YAZ was compiled with Visual C++ 5.0.
-The workspace file, yaz.dsw, is located in the top-level directory.
-
-It includes 4 sub-projects:
-   yaz.dsp 
-         Builds yaz.dll. This DLL includes the source in all
-         sub directories except for 'server', 'client' and
-         'ztest'. To export public functions the header files
-         includes the modifier YAZ_EXPORT which is defined in
-         yconfig.h. The value of this modifier,
-          __declspec(dllexport), probably only works with VC.
-
-   client/client.dsp   
-         Builds client.exe as a console application. It links
-         with the import library yaz.lib. This application 
-         searches for yaz.dll during runtime.
-
-   server/server.dsp
-         Builds the library, server.lib, which includes the
-         source from 'server'. Unlike the UNIX version, the
-         server library is multi-threaded.
-
-   ztest/ztest.dsp
-         Builds ztest.exe as a console application. It links
+  $Id: windows.txt,v 1.2 1999-08-27 09:40:31 adam Exp $
+
+This distribution of YAZ includes makefiles that works with Visual
+C++ version 5 and 6. The makefile is located in sub directory 'win'.
+
+If you wish to make modifications to the make process you should
+edit makefile before proceeding. For example, a DEBUG version of YAZ
+can be build by modifying the line 'DEBUG=0' to 'DEBUG=1' in the
+makefile.
+
+Run nmake in that directory (in a Command prompt for example). Eg:
+    >CD \YAZ\WIN
+    >NMAKE
+
+Make sure that the environment variables PATH, LIB and INCLUDE are
+set properly. They *should* be set by the Visual C++ installation.
+Programs cl.exe, link.exe and others must be found in the PATH. The
+standard includes files, standard libraries must be found in INCLUDE
+and LIB respectively.
+
+The following components are build by the nmake process:
+
+yaz.dll - This DLL is made of the source in all sub directories except
+         for 'server', 'client' and 'ztest'. To export public functions
+         the header files contain the modifier YAZ_EXPORT which is
+         defined in yconfig.h. The value of this modifier,
+         __declspec(dllexport), is probably specific to Visual C++. 
+
+server.lib - The server library, which includes the source from
+         'server'.  Unlike the UNIX version, the server library is
+         multi-threaded.
+
+client.exe - A Z39.50 client console application. It links with the
+         import library yaz.lib. This application searches for yaz.dll
+         during runtime.
+
+ztest.exe - The Z39.50 test server as a console application. It links
          with the import library yaz.lib and the regular library
          with the import library yaz.lib and the regular library
-         server.lib. When running ztest make sure it is able to
-         find the record test files dummy-records, dummy-grs,
-         and dummy-words in the current directory. 
+         server.lib. When running ztest make sure it is able to find
+         the record test files dummy-records, dummy-grs, and dummy-words
+         in the current directory. 
 
          As an option ztest may be installed as an NT service
 
          As an option ztest may be installed as an NT service
-         (not Windows 95). Use 'ztest -install <otherargs>' to
-         install it and 'ztest -remove <otherargs>' to remove it
-         again. Since NT runs the service program in some weird
-         directory, such as \winnt\system32, it's probably a good
-         idea to use the option '-w' to change to some other
-         directory. For example
+         (not Windows 95). Use 'ztest -install <otherargs>' to install
+         it and 'ztest -remove <otherargs>' to remove it again. Since
+         NT runs the service program in some weird directory, such as
+         \winnt\system32, it's probably a good idea to use the option
+         '-w' to change to some other directory. For example
 
             ztest -install -w d:\proj\yaz\ztest -l ztest.out tcp:@:210
 
 
             ztest -install -w d:\proj\yaz\ztest -l ztest.out tcp:@:210
 
-         which specifies both working directory and a log file, so
-         you can see what's going on.
+         which specifies both working directory (d:\proj\yaz\ztest) 
+         and a log file (ztest.out). The server is started on port 210.
 
 
+After successful compilation all executables and DLL's are located
+in sub YAZ\BIN. Libraries are located in YAZ\LIB.
diff --git a/yaz.dsp b/yaz.dsp
deleted file mode 100644 (file)
index dac8256..0000000
--- a/yaz.dsp
+++ /dev/null
@@ -1,610 +0,0 @@
-# Microsoft Developer Studio Project File - Name="yaz" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 5.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=yaz - Win32 Release
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "yaz.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "yaz.mak" CFG="yaz - Win32 Release"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "yaz - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "yaz - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE 
-
-# Begin Project
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "yaz - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir ".\Release"
-# PROP BASE Intermediate_Dir ".\Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ".\Release"
-# PROP Intermediate_Dir ".\Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE MTL /nologo /D "NDEBUG" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x406 /d "NDEBUG"
-# ADD RSC /l 0x406 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:windows /dll /pdb:none /machine:I386
-# SUBTRACT LINK32 /map
-# Begin Special Build Tool
-OutDir=.\.\Release
-ProjDir=.
-TargetName=yaz
-SOURCE=$(InputPath)
-PostBuild_Desc=Copy Lib and Dll
-PostBuild_Cmds=copy    $(OutDir)\$(TargetName).dll $(ProjDir)\..\bin
-# End Special Build Tool
-
-!ELSEIF  "$(CFG)" == "yaz - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir ".\yaz___Wi"
-# PROP BASE Intermediate_Dir ".\yaz___Wi"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ".\Debug"
-# PROP Intermediate_Dir ".\Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /FR /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE MTL /nologo /D "_DEBUG" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x406 /d "_DEBUG"
-# ADD RSC /l 0x406 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:windows /dll /incremental:no /map /debug /machine:I386
-# SUBTRACT LINK32 /pdb:none /force
-# Begin Special Build Tool
-OutDir=.\.\Debug
-ProjDir=.
-TargetName=yaz
-SOURCE=$(InputPath)
-PostBuild_Desc=Copy Dll
-PostBuild_Cmds=copy    $(OutDir)\$(TargetName).dll $(ProjDir)\..\bin
-# End Special Build Tool
-
-!ENDIF 
-
-# Begin Target
-
-# Name "yaz - Win32 Release"
-# Name "yaz - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
-# Begin Source File
-
-SOURCE=.\Util\atoin.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\odr\ber_any.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\odr\ber_bit.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\odr\ber_bool.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\odr\ber_int.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\odr\ber_len.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\odr\ber_null.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\odr\ber_oct.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\odr\ber_oid.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\odr\ber_tag.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\ccl\cclerrms.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\ccl\cclfind.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\ccl\cclptree.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\ccl\cclqfile.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\ccl\cclqual.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\ccl\cclstr.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\ccl\ccltoken.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\comstack\comstack.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\retrieval\d1_absyn.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\retrieval\d1_attset.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\retrieval\d1_doespec.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\retrieval\d1_espec.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\retrieval\d1_expout.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\retrieval\d1_grs.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\retrieval\d1_handle.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\retrieval\d1_map.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\retrieval\d1_marc.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\retrieval\d1_prtree.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\retrieval\d1_read.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\retrieval\d1_soif.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\retrieval\d1_sumout.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\retrieval\d1_sutrs.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\retrieval\d1_tagset.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\retrieval\d1_varset.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\retrieval\d1_write.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\asn\diagbib1.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\util\dmalloc.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\odr\dumpber.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\util\log.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\util\logrpn.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\util\marcdisp.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\util\nmem.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\util\nmemsdup.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\odr\odr.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\odr\odr_any.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\odr\odr_bit.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\odr\odr_bool.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\odr\odr_choice.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\odr\odr_cons.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\odr\odr_int.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\odr\odr_mem.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\odr\odr_null.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\odr\odr_oct.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\odr\odr_oid.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\odr\odr_priv.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\odr\odr_seq.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\odr\odr_tag.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\odr\odr_use.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\odr\odr_util.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\util\oid.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\util\options.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\util\pquery.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\asn\proto.c
-# End Source File
-# Begin Source File
-
-SOURCE=".\asn\prt-acc.c"
-# End Source File
-# Begin Source File
-
-SOURCE=".\asn\prt-add.c"
-# End Source File
-# Begin Source File
-
-SOURCE=".\asn\prt-arc.c"
-# End Source File
-# Begin Source File
-
-SOURCE=".\asn\prt-dat.c"
-# End Source File
-# Begin Source File
-
-SOURCE=".\asn\prt-dia.c"
-# End Source File
-# Begin Source File
-
-SOURCE=".\asn\prt-esp.c"
-# End Source File
-# Begin Source File
-
-SOURCE=".\asn\prt-exd.c"
-# End Source File
-# Begin Source File
-
-SOURCE=".\asn\prt-exp.c"
-# End Source File
-# Begin Source File
-
-SOURCE=".\asn\prt-ext.c"
-# End Source File
-# Begin Source File
-
-SOURCE=".\asn\prt-grs.c"
-# End Source File
-# Begin Source File
-
-SOURCE=".\asn\prt-rsc.c"
-# End Source File
-# Begin Source File
-
-SOURCE=".\asn\prt-univ.c"
-# End Source File
-# Begin Source File
-
-SOURCE=.\util\query.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\util\readconf.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\comstack\tcpip.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\util\tpath.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\comstack\waislen.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\util\wrbuf.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\util\xmalloc.c
-# End Source File
-# Begin Source File
-
-SOURCE=".\util\yaz-ccl.c"
-# End Source File
-# Begin Source File
-
-SOURCE=".\util\yaz-util.c"
-# End Source File
-# Begin Source File
-
-SOURCE=.\asn\zget.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
-# Begin Source File
-
-SOURCE=.\include\ccl.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\comstack.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\d1_attset.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\d1_map.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\data1.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\diagbib1.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\dmalloc.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\server\eventl.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\log.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\marcdisp.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\nmem.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\odr.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\odr_use.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\oid.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\options.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\pquery.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\proto.h
-# End Source File
-# Begin Source File
-
-SOURCE=".\include\prt-acc.h"
-# End Source File
-# Begin Source File
-
-SOURCE=".\include\prt-add.h"
-# End Source File
-# Begin Source File
-
-SOURCE=".\include\prt-arc.h"
-# End Source File
-# Begin Source File
-
-SOURCE=".\include\prt-dia.h"
-# End Source File
-# Begin Source File
-
-SOURCE=".\include\prt-esp.h"
-# End Source File
-# Begin Source File
-
-SOURCE=".\include\prt-exd.h"
-# End Source File
-# Begin Source File
-
-SOURCE=".\include\prt-exp.h"
-# End Source File
-# Begin Source File
-
-SOURCE=".\include\prt-ext.h"
-# End Source File
-# Begin Source File
-
-SOURCE=".\include\prt-grs.h"
-# End Source File
-# Begin Source File
-
-SOURCE=".\include\prt-rsc.h"
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\prt.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\readconf.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\tcpip.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\tpath.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\wrbuf.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\xmalloc.h
-# End Source File
-# Begin Source File
-
-SOURCE=".\include\yaz-ccl.h"
-# End Source File
-# Begin Source File
-
-SOURCE=".\include\yaz-util.h"
-# End Source File
-# Begin Source File
-
-SOURCE=".\include\yaz-version.h"
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\yconfig.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/yaz.dsw b/yaz.dsw
deleted file mode 100644 (file)
index e7115e8..0000000
--- a/yaz.dsw
+++ /dev/null
@@ -1,77 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 5.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "client"=.\client\client.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-    Begin Project Dependency
-    Project_Dep_Name yaz
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "server"=.\server\server.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-    Begin Project Dependency
-    Project_Dep_Name yaz
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "yaz"=.\yaz.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "ztest"=.\ztest\ztest.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-    Begin Project Dependency
-    Project_Dep_Name server
-    End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name yaz
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
index cd4a5ae..3312ff4 100644 (file)
@@ -1,10 +1,13 @@
 /*
 /*
- * Copyright (c) 1995, Index Data.
+ * Copyright (c) 1995-1999, Index Data.
  * See the file LICENSE for details.
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: read-grs.c,v $
  * See the file LICENSE for details.
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: read-grs.c,v $
- * Revision 1.3  1999-03-31 11:18:25  adam
+ * Revision 1.4  1999-08-27 09:40:32  adam
+ * Renamed logf function to yaz_log. Removed VC++ project files.
+ *
+ * Revision 1.3  1999/03/31 11:18:25  adam
  * Implemented odr_strdup. Added Reference ID to backend server API.
  *
  * Revision 1.2  1998/02/11 11:53:36  adam
  * Implemented odr_strdup. Added Reference ID to backend server API.
  *
  * Revision 1.2  1998/02/11 11:53:36  adam
@@ -59,7 +62,7 @@ Z_GenericRecord *read_grs1(FILE *f, ODR o)
            return r;
        if (sscanf(buf, "(%d,%[^)])", &type, value) != 2)
        {
            return r;
        if (sscanf(buf, "(%d,%[^)])", &type, value) != 2)
        {
-           logf(LOG_WARN, "Bad data in '%s'", buf);
+           yaz_log(LOG_WARN, "Bad data in '%s'", buf);
            return 0;
        }
        if (!type && *value == '0')
            return 0;
        }
        if (!type && *value == '0')
index c6cfa7f..75eded2 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
- * Copyright (c) 1995-1998, Index Data.
+ * Copyright (c) 1995-1999, Index Data.
  * See the file LICENSE for details.
  * Sebastian Hammer, Adam Dickmeiss
  *
  * See the file LICENSE for details.
  * Sebastian Hammer, Adam Dickmeiss
  *
@@ -7,7 +7,10 @@
  *    Chas Woodfield, Fretwell Downing Datasystems.
  *
  * $Log: ztest.c,v $
  *    Chas Woodfield, Fretwell Downing Datasystems.
  *
  * $Log: ztest.c,v $
- * Revision 1.25  1999-06-01 14:29:12  adam
+ * Revision 1.26  1999-08-27 09:40:32  adam
+ * Renamed logf function to yaz_log. Removed VC++ project files.
+ *
+ * Revision 1.25  1999/06/01 14:29:12  adam
  * Work on Extended Services.
  *
  * Revision 1.24  1999/05/27 13:07:54  adam
  * Work on Extended Services.
  *
  * Revision 1.24  1999/05/27 13:07:54  adam
@@ -135,19 +138,19 @@ int ztest_present (void *handle, bend_present_rr *rr)
 
 int ztest_esrequest (void *handle, bend_esrequest_rr *rr)
 {
 
 int ztest_esrequest (void *handle, bend_esrequest_rr *rr)
 {
-    logf(LOG_LOG, "function: %d", *rr->esr->function);
+    yaz_log(LOG_LOG, "function: %d", *rr->esr->function);
     if (rr->esr->packageName)
     if (rr->esr->packageName)
-       logf(LOG_LOG, "packagename: %s", rr->esr->packageName);
-    logf(LOG_LOG, "Waitaction: %d", *rr->esr->waitAction);
+       yaz_log(LOG_LOG, "packagename: %s", rr->esr->packageName);
+    yaz_log(LOG_LOG, "Waitaction: %d", *rr->esr->waitAction);
 
     if (!rr->esr->taskSpecificParameters)
     {
 
     if (!rr->esr->taskSpecificParameters)
     {
-        logf (LOG_WARN, "No task specific parameters");
+        yaz_log (LOG_WARN, "No task specific parameters");
     }
     else if (rr->esr->taskSpecificParameters->which == Z_External_itemOrder)
     {
        Z_ItemOrder *it = rr->esr->taskSpecificParameters->u.itemOrder;
     }
     else if (rr->esr->taskSpecificParameters->which == Z_External_itemOrder)
     {
        Z_ItemOrder *it = rr->esr->taskSpecificParameters->u.itemOrder;
-       logf (LOG_LOG, "Received ItemOrder");
+       yaz_log (LOG_LOG, "Received ItemOrder");
        switch (it->which)
        {
 #ifdef ASN_COMPILED
        switch (it->which)
        {
 #ifdef ASN_COMPILED
@@ -163,22 +166,22 @@ int ztest_esrequest (void *handle, bend_esrequest_rr *rr)
            if (k && k->contact)
            {
                if (k->contact->name)
            if (k && k->contact)
            {
                if (k->contact->name)
-                   logf(LOG_LOG, "contact name %s", k->contact->name);
+                   yaz_log(LOG_LOG, "contact name %s", k->contact->name);
                if (k->contact->phone)
                if (k->contact->phone)
-                   logf(LOG_LOG, "contact phone %s", k->contact->phone);
+                   yaz_log(LOG_LOG, "contact phone %s", k->contact->phone);
                if (k->contact->email)
                if (k->contact->email)
-                   logf(LOG_LOG, "contact email %s", k->contact->email);
+                   yaz_log(LOG_LOG, "contact email %s", k->contact->email);
            }
            if (k->addlBilling)
            {
            }
            if (k->addlBilling)
            {
-               logf(LOG_LOG, "Billing info (not shown)");
+               yaz_log(LOG_LOG, "Billing info (not shown)");
            }
            
            if (n->resultSetItem)
            {
            }
            
            if (n->resultSetItem)
            {
-               logf(LOG_LOG, "resultsetItem");
-               logf(LOG_LOG, "setId: %s", n->resultSetItem->resultSetId);
-               logf(LOG_LOG, "item: %d", *n->resultSetItem->item);
+               yaz_log(LOG_LOG, "resultsetItem");
+               yaz_log(LOG_LOG, "setId: %s", n->resultSetItem->resultSetId);
+               yaz_log(LOG_LOG, "item: %d", *n->resultSetItem->item);
            }
        }
        break;
            }
        }
        break;
@@ -187,40 +190,40 @@ int ztest_esrequest (void *handle, bend_esrequest_rr *rr)
     else if (rr->esr->taskSpecificParameters->which == Z_External_update)
     {
        Z_IUUpdate *up = rr->esr->taskSpecificParameters->u.update;
     else if (rr->esr->taskSpecificParameters->which == Z_External_update)
     {
        Z_IUUpdate *up = rr->esr->taskSpecificParameters->u.update;
-       logf (LOG_LOG, "Received DB Update");
+       yaz_log (LOG_LOG, "Received DB Update");
        if (up->which == Z_IUUpdate_esRequest)
        {
            Z_IUUpdateEsRequest *esRequest = up->u.esRequest;
            Z_IUOriginPartToKeep *toKeep = esRequest->toKeep;
            Z_IUSuppliedRecords *notToKeep = esRequest->notToKeep;
            
        if (up->which == Z_IUUpdate_esRequest)
        {
            Z_IUUpdateEsRequest *esRequest = up->u.esRequest;
            Z_IUOriginPartToKeep *toKeep = esRequest->toKeep;
            Z_IUSuppliedRecords *notToKeep = esRequest->notToKeep;
            
-           logf (LOG_LOG, "action");
+           yaz_log (LOG_LOG, "action");
            if (toKeep->action)
            {
                switch (*toKeep->action)
                {
                case Z_IUOriginPartToKeep_recordInsert:
            if (toKeep->action)
            {
                switch (*toKeep->action)
                {
                case Z_IUOriginPartToKeep_recordInsert:
-                   logf (LOG_LOG, " recordInsert");
+                   yaz_log (LOG_LOG, " recordInsert");
                    break;
                case Z_IUOriginPartToKeep_recordReplace:
                    break;
                case Z_IUOriginPartToKeep_recordReplace:
-                   logf (LOG_LOG, " recordUpdate");
+                   yaz_log (LOG_LOG, " recordUpdate");
                    break;
                case Z_IUOriginPartToKeep_recordDelete:
                    break;
                case Z_IUOriginPartToKeep_recordDelete:
-                   logf (LOG_LOG, " recordDelete");
+                   yaz_log (LOG_LOG, " recordDelete");
                    break;
                case Z_IUOriginPartToKeep_elementUpdate:
                    break;
                case Z_IUOriginPartToKeep_elementUpdate:
-                   logf (LOG_LOG, " elementUpdate");
+                   yaz_log (LOG_LOG, " elementUpdate");
                    break;
                case Z_IUOriginPartToKeep_specialUpdate:
                    break;
                case Z_IUOriginPartToKeep_specialUpdate:
-                   logf (LOG_LOG, " specialUpdate");
+                   yaz_log (LOG_LOG, " specialUpdate");
                    break;
                default:
                    break;
                default:
-                   logf (LOG_LOG, " unknown (%d)", *toKeep->action);
+                   yaz_log (LOG_LOG, " unknown (%d)", *toKeep->action);
                }
            }
            if (toKeep->databaseName)
            {
                }
            }
            if (toKeep->databaseName)
            {
-               logf (LOG_LOG, "database: %s", toKeep->databaseName);
+               yaz_log (LOG_LOG, "database: %s", toKeep->databaseName);
                if (!strcmp(toKeep->databaseName, "fault"))
                {
                    rr->errcode = 109;
                if (!strcmp(toKeep->databaseName, "fault"))
                {
                    rr->errcode = 109;
@@ -241,30 +244,30 @@ int ztest_esrequest (void *handle, bend_esrequest_rr *rr)
                        struct oident *oident;
                        oident = oid_getentbyoid(rec->direct_reference);
                        if (oident)
                        struct oident *oident;
                        oident = oid_getentbyoid(rec->direct_reference);
                        if (oident)
-                           logf (LOG_LOG, "record %d type %s", i,
-                                 oident->desc);
+                           yaz_log (LOG_LOG, "record %d type %s", i,
+                                    oident->desc);
                    }
                    switch (rec->which)
                    {
                    case Z_External_sutrs:
                        if (rec->u.octet_aligned->len > 170)
                    }
                    switch (rec->which)
                    {
                    case Z_External_sutrs:
                        if (rec->u.octet_aligned->len > 170)
-                           logf (LOG_LOG, "%d bytes:\n%.168s ...",
-                                 rec->u.sutrs->len,
-                                 rec->u.sutrs->buf);
+                           yaz_log (LOG_LOG, "%d bytes:\n%.168s ...",
+                                    rec->u.sutrs->len,
+                                    rec->u.sutrs->buf);
                        else
                        else
-                           logf (LOG_LOG, "%d bytes:\n%s",
-                                 rec->u.sutrs->len,
-                                 rec->u.sutrs->buf);
+                           yaz_log (LOG_LOG, "%d bytes:\n%s",
+                                    rec->u.sutrs->len,
+                                    rec->u.sutrs->buf);
                         break;
                    case Z_External_octet        :
                        if (rec->u.octet_aligned->len > 170)
                         break;
                    case Z_External_octet        :
                        if (rec->u.octet_aligned->len > 170)
-                           logf (LOG_LOG, "%d bytes:\n%.168s ...",
-                                 rec->u.octet_aligned->len,
-                                 rec->u.octet_aligned->buf);
+                           yaz_log (LOG_LOG, "%d bytes:\n%.168s ...",
+                                    rec->u.octet_aligned->len,
+                                    rec->u.octet_aligned->buf);
                        else
                        else
-                           logf (LOG_LOG, "%d bytes\n%s",
-                                 rec->u.octet_aligned->len,
-                                 rec->u.octet_aligned->buf);
+                           yaz_log (LOG_LOG, "%d bytes\n%s",
+                                    rec->u.octet_aligned->len,
+                                    rec->u.octet_aligned->buf);
                    }
                }
            }
                    }
                }
            }
@@ -272,8 +275,8 @@ int ztest_esrequest (void *handle, bend_esrequest_rr *rr)
     }
     else
     {
     }
     else
     {
-        logf (LOG_WARN, "Unknown Extended Service(%d)",
-             rr->esr->taskSpecificParameters->which);
+        yaz_log (LOG_WARN, "Unknown Extended Service(%d)",
+                rr->esr->taskSpecificParameters->which);
        
     }
     return 0;
        
     }
     return 0;
diff --git a/ztest/ztest.dsp b/ztest/ztest.dsp
deleted file mode 100644 (file)
index 5153bc6..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-# Microsoft Developer Studio Project File - Name="ztest" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 5.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=ztest - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "ztest.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "ztest.mak" CFG="ztest - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "ztest - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "ztest - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE 
-
-# Begin Project
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "ztest - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x406 /d "NDEBUG"
-# ADD RSC /l 0x406 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib yaz.lib server.lib /nologo /subsystem:console /machine:I386 /libpath:"..\release" /libpath:"..\server\release"
-# Begin Special Build Tool
-OutDir=.\Release
-ProjDir=.
-TargetName=ztest
-SOURCE=$(InputPath)
-PostBuild_Desc=Copy ztest.exe
-PostBuild_Cmds=copy $(OutDir)\$(TargetName).exe $(ProjDir)\..\..\bin
-# End Special Build Tool
-
-!ELSEIF  "$(CFG)" == "ztest - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MDd /W3 /GX /Zi /Od /I "..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /FD /c
-# ADD BASE RSC /l 0x406 /d "_DEBUG"
-# ADD RSC /l 0x406 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib yaz.lib server.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /pdbtype:sept /libpath:"..\debug" /libpath:"..\server\debug"
-# Begin Special Build Tool
-OutDir=.\Debug
-ProjDir=.
-TargetName=ztest
-SOURCE=$(InputPath)
-PostBuild_Desc=Copy ztest.exe
-PostBuild_Cmds=copy $(OutDir)\$(TargetName).exe $(ProjDir)\..\..\bin
-# End Special Build Tool
-
-!ENDIF 
-
-# Begin Target
-
-# Name "ztest - Win32 Release"
-# Name "ztest - Win32 Debug"
-# Begin Source File
-
-SOURCE=".\read-grs.c"
-# End Source File
-# Begin Source File
-
-SOURCE=.\ztest.c
-# End Source File
-# End Target
-# End Project
index a263cdf..0b1d5fa 100644 (file)
@@ -1,10 +1,13 @@
 /*
 /*
- * Copyright (C) 1995-1998, Index Data
+ * Copyright (C) 1995-1999, Index Data
  * All rights reserved.
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: logrpn.c,v $
  * All rights reserved.
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: logrpn.c,v $
- * Revision 1.1  1999-06-08 10:10:16  adam
+ * Revision 1.2  1999-08-27 09:40:33  adam
+ * Renamed logf function to yaz_log. Removed VC++ project files.
+ *
+ * Revision 1.1  1999/06/08 10:10:16  adam
  * New sub directory zutil. Moved YAZ Compiler to be part of YAZ tree.
  *
  * Revision 1.1  1998/11/16 16:02:35  adam
  * New sub directory zutil. Moved YAZ Compiler to be part of YAZ tree.
  *
  * Revision 1.1  1998/11/16 16:02:35  adam
@@ -261,26 +264,26 @@ static void zlog_attributes (Z_AttributesPlusTerm *t, int level,
         case Z_AttributeValue_numeric:
            attrStr (*element->attributeType,
                     *element->value.numeric, ast, str);
         case Z_AttributeValue_numeric:
            attrStr (*element->attributeType,
                     *element->value.numeric, ast, str);
-            logf (LOG_LOG, "%*.0s%s %s", level, "", attset_name, str);
+            yaz_log (LOG_LOG, "%*.0s%s %s", level, "", attset_name, str);
             break;
         case Z_AttributeValue_complex:
             break;
         case Z_AttributeValue_complex:
-            logf (LOG_LOG, "%*.0s%s attributeType=%d complex",
+            yaz_log (LOG_LOG, "%*.0s%s attributeType=%d complex",
                  level, "", attset_name, *element->attributeType);
             for (i = 0; i<element->value.complex->num_list; i++)
             {
                 if (element->value.complex->list[i]->which ==
                     Z_StringOrNumeric_string)
                  level, "", attset_name, *element->attributeType);
             for (i = 0; i<element->value.complex->num_list; i++)
             {
                 if (element->value.complex->list[i]->which ==
                     Z_StringOrNumeric_string)
-                    logf (LOG_LOG, "%*.0s  string: '%s'", level, "",
-                          element->value.complex->list[i]->u.string);
+                    yaz_log (LOG_LOG, "%*.0s  string: '%s'", level, "",
+                            element->value.complex->list[i]->u.string);
                 else if (element->value.complex->list[i]->which ==
                          Z_StringOrNumeric_numeric)
                 else if (element->value.complex->list[i]->which ==
                          Z_StringOrNumeric_numeric)
-                    logf (LOG_LOG, "%*.0s  numeric: '%d'", level, "",
-                          *element->value.complex->list[i]->u.numeric);
+                    yaz_log (LOG_LOG, "%*.0s  numeric: '%d'", level, "",
+                            *element->value.complex->list[i]->u.numeric);
             }
             break;
         default:
             }
             break;
         default:
-            logf (LOG_LOG, "%.*s%s attribute unknown",
-                 level, "", attset_name);
+            yaz_log (LOG_LOG, "%.*s%s attribute unknown",
+                    level, "", attset_name);
         }
     }
 }
         }
     }
 }
@@ -292,16 +295,16 @@ static void zlog_structure (Z_RPNStructure *zs, int level, enum oid_value ast)
         switch (zs->u.complex->roperator->which)
         {
         case Z_Operator_and:
         switch (zs->u.complex->roperator->which)
         {
         case Z_Operator_and:
-            logf (LOG_LOG, "%*.0s and", level, "");
+            yaz_log (LOG_LOG, "%*.0s and", level, "");
             break;
         case Z_Operator_or:
             break;
         case Z_Operator_or:
-            logf (LOG_LOG, "%*.0s or", level, "");
+            yaz_log (LOG_LOG, "%*.0s or", level, "");
             break;
         case Z_Operator_and_not:
             break;
         case Z_Operator_and_not:
-            logf (LOG_LOG, "%*.0s and-not", level, "");
+            yaz_log (LOG_LOG, "%*.0s and-not", level, "");
             break;
         default:
             break;
         default:
-            logf (LOG_LOG, "%*.0s unknown complex", level, "");
+            yaz_log (LOG_LOG, "%*.0s unknown complex", level, "");
             return;
         }
         zlog_structure (zs->u.complex->s1, level+2, ast);
             return;
         }
         zlog_structure (zs->u.complex->s1, level+2, ast);
@@ -315,25 +318,26 @@ static void zlog_structure (Z_RPNStructure *zs, int level, enum oid_value ast)
 
             if (zapt->term->which == Z_Term_general) 
             {
 
             if (zapt->term->which == Z_Term_general) 
             {
-                logf (LOG_LOG, "%*.0s term '%.*s' (general)", level, "",
-                      zapt->term->u.general->len, zapt->term->u.general->buf);
+                yaz_log (LOG_LOG, "%*.0s term '%.*s' (general)", level, "",
+                        zapt->term->u.general->len,
+                        zapt->term->u.general->buf);
             }
             else
             {
             }
             else
             {
-                logf (LOG_LOG, "%*.0s term (not general)", level, "");
+                yaz_log (LOG_LOG, "%*.0s term (not general)", level, "");
             }
             zlog_attributes (zapt, level+2, ast);
         }
         else if (zs->u.simple->which == Z_Operand_resultSetId)
         {
             }
             zlog_attributes (zapt, level+2, ast);
         }
         else if (zs->u.simple->which == Z_Operand_resultSetId)
         {
-            logf (LOG_LOG, "%*.0s set '%s'", level, "",
-                  zs->u.simple->u.resultSetId);
+            yaz_log (LOG_LOG, "%*.0s set '%s'", level, "",
+                    zs->u.simple->u.resultSetId);
         }
         else
         }
         else
-            logf (LOG_LOG, "%*.0s unknown simple structure", level, "");
+            yaz_log (LOG_LOG, "%*.0s unknown simple structure", level, "");
     }
     else
     }
     else
-        logf (LOG_LOG, "%*.0s unknown structure", level, "");
+        yaz_log (LOG_LOG, "%*.0s unknown structure", level, "");
 }
 
 void log_rpn_query (Z_RPNQuery *rpn)
 }
 
 void log_rpn_query (Z_RPNQuery *rpn)
@@ -345,12 +349,12 @@ void log_rpn_query (Z_RPNQuery *rpn)
     if (attrset)
     {
         ast = attrset->value;
     if (attrset)
     {
         ast = attrset->value;
-       logf (LOG_LOG, "RPN query. Type: %s", attrset->desc);
+       yaz_log (LOG_LOG, "RPN query. Type: %s", attrset->desc);
     } 
     else
     {
        ast = VAL_NONE;
     } 
     else
     {
        ast = VAL_NONE;
-       logf (LOG_LOG, "RPN query. Unknown type");
+       yaz_log (LOG_LOG, "RPN query. Unknown type");
     }
     zlog_structure (rpn->RPNStructure, 0, ast);
 }
     }
     zlog_structure (rpn->RPNStructure, 0, ast);
 }
@@ -360,10 +364,10 @@ void log_scan_term (Z_AttributesPlusTerm *zapt, oid_value ast)
     int level = 0;
     if (zapt->term->which == Z_Term_general) 
     {
     int level = 0;
     if (zapt->term->which == Z_Term_general) 
     {
-       logf (LOG_LOG, "%*.0s term '%.*s' (general)", level, "",
-             zapt->term->u.general->len, zapt->term->u.general->buf);
+       yaz_log (LOG_LOG, "%*.0s term '%.*s' (general)", level, "",
+                zapt->term->u.general->len, zapt->term->u.general->buf);
     }
     else
     }
     else
-       logf (LOG_LOG, "%*.0s term (not general)", level, "");
+       yaz_log (LOG_LOG, "%*.0s term (not general)", level, "");
     zlog_attributes (zapt, level+2, ast);
 }
     zlog_attributes (zapt, level+2, ast);
 }