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
* 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.
-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.
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
-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:
-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.:
-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.
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).
-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.
-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
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
* 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
{
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"))
+++ /dev/null
-# 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
/*
- * 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,
* 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
#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 logf(int level, const char *fmt, ...)
+YAZ_EXPORT void yaz_log(int level, const char *fmt, ...)
#ifdef __GNUC__
__attribute__ ((format (printf, 2, 3)))
#endif
* 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.
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)
* 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
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;
}
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)
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)
/*
- * 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 $
- * 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.
*
*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)
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);
}
}
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;
}
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];
}
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;
}
{
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)))
{
- 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;
}
else
{
- logf(LOG_WARN, "%s:%d: Bad element", file, lineno);
+ yaz_log(LOG_WARN, "%s:%d: Bad element", file, lineno);
fclose(f);
return 0;
}
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);
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);
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;
}
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)
{
- 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;
}
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;
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;
{
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;
}
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)
{
- logf(LOG_WARN, "%s:%d: Unknown tagset ref '%s'",
+ yaz_log(LOG_WARN, "%s:%d: Unknown tagset ref '%s'",
file, lineno, name);
continue;
}
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)))
{
- 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;
}
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;
}
*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;
}
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)))
{
- 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;
}
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;
}
(*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;
}
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)))
{
- 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;
}
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)))
{
- 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;
}
}
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;
}
}
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;
}
/*
- * 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 $
- * 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
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]);
{
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;
}
}
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)
{
- 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"))
{
- 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"))
{
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)))
{
- 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;
}
}
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);
* 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
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 ||
/*
- * 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 $
- * 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.
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));
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;
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;
}
if (!nnames)
{
- logf(LOG_WARN, "%s:%d: Empty elementsetnames directive",
- file, lineno);
+ yaz_log(LOG_WARN, "%s:%d: Empty elementsetnames directive",
+ file, lineno);
continue;
}
{
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])))
{
- logf(LOG_WARN, "%s:%d: Bad defaultvariantsetid",
- file, lineno);
+ yaz_log(LOG_WARN, "%s:%d: Bad defaultvariantsetid",
+ file, lineno);
continue;
}
}
{
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));
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;
}
}
}
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;
}
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;
}
/*
- * 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 $
- * 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
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)
{
- 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)
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 res;
}
}
- logf(LOG_WARN, "No category in Explain record");
+ yaz_log(LOG_WARN, "No category in Explain record");
return 0;
}
/*
- * 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 $
- * 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
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;
}
}
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;
}
*len += n->u.data.len;
break;
default:
- logf(LOG_WARN, "Can't handle datatype.");
+ yaz_log(LOG_WARN, "Can't handle datatype.");
return 0;
}
}
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;
}
else
{
- logf(LOG_WARN, "Bad data.");
+ yaz_log(LOG_WARN, "Bad data.");
return 0;
}
/*
- * 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 $
- * 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.
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;
- 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;
}
/*
- * 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 $
- * 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.
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;
}
{
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)
{
- 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;
}
}
{
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 =
{
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);
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));
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;
}
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;
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;
/*
- * 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 $
- * 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.
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;
}
{
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]);
{
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)
{
- 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;
}
}
{
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]);
{
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]);
{
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]);
{
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);
{
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]);
{
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
- 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;
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)
{
- 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)
{
if (subf->which != DATA1N_tag)
{
- logf(LOG_WARN,
+ yaz_log(LOG_WARN,
"Malformed subfield composition for marc output.");
return -1;
}
* 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).
*
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
}
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;
}
}
{
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);
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 =
/*
- * 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 $
- * 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
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;
}
{
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)
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;
/*
- * 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 $
- * 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
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);
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]);
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;
{
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]);
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)
{
- 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;
}
}
{
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)
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];
*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
{
- 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);
/*
- * 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 $
- * 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.
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;
}
- logf(LOG_WARN, "Unknown variant class %s", zclass);
+ yaz_log(LOG_WARN, "Unknown variant class %s", zclass);
return 0;
}
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)))
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 *)
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)
{
- 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));
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;
}
{
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]);
{
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)
{
- 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
- 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;
* 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.
*
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);
}
}
+++ /dev/null
-# 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
* 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
{
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);
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);
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;
}
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;
{
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
{
- 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;
{
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)
{
- logf(LOG_LOG, "Closed connection after reject");
+ yaz_log(LOG_LOG, "Closed connection after reject");
cs_close(conn);
destroy_association(assoc);
iochan_destroy(h);
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);
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))
{
- 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));
- 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;
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);
}
{
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:
- 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 */
- 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);
}
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);
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;
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;
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:
- logf(LOG_WARN, "Bad APDU received");
+ yaz_log(LOG_WARN, "Bad APDU received");
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)
{
- logf(LOG_DEBUG, " result unavailble");
+ yaz_log(LOG_DEBUG, " result unavailble");
retval = 0;
}
else /* no result yet - one will be provided later */
/* 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();
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)
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)
{
- 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 */
{
- logf(LOG_DEBUG, " no result yet");
+ yaz_log(LOG_DEBUG, " no result yet");
iochan_setfd(i, fd); /* in case fd has changed */
}
}
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_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);
}
#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
bend_initresult *binitres;
char options[100];
- logf(LOG_LOG, "Got initRequest");
+ yaz_log(LOG_LOG, "Got initRequest");
if (req->implementationId)
- logf(LOG_LOG, "Id: %s", req->implementationId);
+ yaz_log(LOG_LOG, "Id: %s", req->implementationId);
if (req->implementationName)
- logf(LOG_LOG, "Name: %s", req->implementationName);
+ yaz_log(LOG_LOG, "Name: %s", req->implementationName);
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.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))
- logf (LOG_DEBUG, "Sort handler installed");
+ yaz_log (LOG_DEBUG, "Sort handler installed");
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))
- logf (LOG_DEBUG, "Present handler installed");
+ yaz_log (LOG_DEBUG, "Present handler installed");
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))
- logf (LOG_DEBUG, "Delete handler installed");
+ yaz_log (LOG_DEBUG, "Delete handler installed");
resp->referenceId = req->referenceId;
*options = '\0';
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;
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;
}
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;
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;
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;
*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++)
{
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)
{
- 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)
{
- logf(LOG_DEBUG, " Record > prefmsgsz");
+ yaz_log(LOG_DEBUG, " Record > prefmsgsz");
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++;
}
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++;
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);
- 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++)
- logf (LOG_LOG, "Database '%s'", req->databaseNames[i]);
+ yaz_log (LOG_LOG, "Database '%s'", req->databaseNames[i]);
}
switch (req->query->which)
{
*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)
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)
bend_scanresult *srs;
oident *attset;
- logf(LOG_LOG, "Got ScanRequest");
+ yaz_log(LOG_LOG, "Got ScanRequest");
*scanStatus = Z_Scan_failure;
*numberOfEntriesReturned = 0;
{
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;
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
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;
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;
"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 */
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;
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 */
- logf(LOG_DEBUG,"Request could be processed...Done !");
+ yaz_log(LOG_DEBUG,"Request could be processed...Done !");
*resp->operationStatus = Z_ExtendedServicesResponse_done;
}
else
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 */
- logf(LOG_DEBUG,"Send the result apdu");
+ yaz_log(LOG_DEBUG,"Send the result apdu");
return apdu;
}
* 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
{
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;
- 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 */
}
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;
}
- logf(LOG_DEBUG, "Accept ok");
+ yaz_log(LOG_DEBUG, "Accept ok");
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;
}
- logf(LOG_DEBUG, "Creating association");
+ yaz_log(LOG_DEBUG, "Creating association");
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;
}
- 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
- logf(LOG_DEBUG, "Determining client address");
+ yaz_log(LOG_DEBUG, "Determining client address");
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 */
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);
- 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
{
- logf(LOG_FATAL, "Bad event on listener.");
+ yaz_log(LOG_FATAL, "Bad event on listener.");
iochan_destroy(h);
return;
}
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)
{
- logf(LOG_FATAL|LOG_ERRNO, "fork");
+ yaz_log(LOG_FATAL|LOG_ERRNO, "fork");
iochan_destroy(h);
return;
}
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;
}
- logf(LOG_DEBUG, "P: Child has taken the call");
+ yaz_log(LOG_DEBUG, "P: Child has taken the call");
close(hand[0]);
return;
}
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;
- 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 */
}
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;
}
- logf(LOG_DEBUG, "accept ok");
+ yaz_log(LOG_DEBUG, "accept ok");
if (control_block.dynamic)
{
IOCHAN pp;
iochan_destroy(pp);
}
/* release dad */
- logf(LOG_DEBUG, "Releasing parent");
+ yaz_log(LOG_DEBUG, "Releasing parent");
close(hand[1]);
}
else
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;
}
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);
- logf(LOG_LOG, "Accepted connection from %s", a ? a : "[Unknown]");
+ yaz_log(LOG_LOG, "Accepted connection from %s", a ? a : "[Unknown]");
}
else
{
- logf(LOG_FATAL, "Bad event on listener.");
+ yaz_log(LOG_FATAL, "Bad event on listener.");
iochan_destroy(h);
return;
}
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
{
- logf(LOG_FATAL, "Failed to create association structure");
+ yaz_log(LOG_FATAL, "Failed to create association structure");
}
chan->next = pListener;
pListener = chan;
}
else
{
- logf(LOG_FATAL, "Failed to create iochan");
+ yaz_log(LOG_FATAL, "Failed to create iochan");
}
}
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");
}
}
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"))
#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
{
- logf (LOG_WARN, "You must specify either 'osi:' or 'tcp:'");
+ yaz_log (LOG_WARN, "You must specify either 'osi:' or 'tcp:'");
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)))
{
- 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);
}
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)))
{
- 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;
}
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)
{
- logf(LOG_FATAL|LOG_ERRNO, "setuid");
+ yaz_log(LOG_FATAL|LOG_ERRNO, "setuid");
exit(1);
}
}
ret = 1;
else
{
- logf(LOG_LOG, "Entering event loop.");
+ yaz_log(LOG_LOG, "Entering event loop.");
ret = event_loop(&pListener);
}
nmem_exit ();
* 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.
*
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;
}
- 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
}
}
/*
- * 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 $
- * 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
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];
* 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
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
}
{
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)
- 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_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)
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;
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);
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;
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)
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;
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));
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_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
* 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
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 (;;)
/*
- * 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 $
- * 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
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);
* 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
#include <log.h>
#include <xmalloc.h>
-#define TRACE_XMALLOC 0
+#define TRACE_XMALLOC 2
#if TRACE_XMALLOC > 1
((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)))
{
- 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)
{
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)))
{
- 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)
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)
{
- 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;
}
- logf (LOG_LOG, "total bytes %ld", (long) size);
+ yaz_log (LOG_LOG, "total bytes %ld", (long) size);
}
#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)
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)
{
- 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;
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)
{
- 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;
{
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)
{
- 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;
{
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;
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);
}
-
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
- 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
- (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
- 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.
+++ /dev/null
-# 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
+++ /dev/null
-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>
-{{{
-}}}
-
-###############################################################################
-
/*
- * 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 $
- * 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
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')
/*
- * Copyright (c) 1995-1998, Index Data.
+ * Copyright (c) 1995-1999, Index Data.
* See the file LICENSE for details.
* Sebastian Hammer, Adam Dickmeiss
*
* 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
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)
- 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)
{
- 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;
- logf (LOG_LOG, "Received ItemOrder");
+ yaz_log (LOG_LOG, "Received ItemOrder");
switch (it->which)
{
#ifdef ASN_COMPILED
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)
- logf(LOG_LOG, "contact phone %s", k->contact->phone);
+ yaz_log(LOG_LOG, "contact phone %s", k->contact->phone);
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)
{
- logf(LOG_LOG, "Billing info (not shown)");
+ yaz_log(LOG_LOG, "Billing info (not shown)");
}
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;
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;
- logf (LOG_LOG, "action");
+ yaz_log (LOG_LOG, "action");
if (toKeep->action)
{
switch (*toKeep->action)
{
case Z_IUOriginPartToKeep_recordInsert:
- logf (LOG_LOG, " recordInsert");
+ yaz_log (LOG_LOG, " recordInsert");
break;
case Z_IUOriginPartToKeep_recordReplace:
- logf (LOG_LOG, " recordUpdate");
+ yaz_log (LOG_LOG, " recordUpdate");
break;
case Z_IUOriginPartToKeep_recordDelete:
- logf (LOG_LOG, " recordDelete");
+ yaz_log (LOG_LOG, " recordDelete");
break;
case Z_IUOriginPartToKeep_elementUpdate:
- logf (LOG_LOG, " elementUpdate");
+ yaz_log (LOG_LOG, " elementUpdate");
break;
case Z_IUOriginPartToKeep_specialUpdate:
- logf (LOG_LOG, " specialUpdate");
+ yaz_log (LOG_LOG, " specialUpdate");
break;
default:
- logf (LOG_LOG, " unknown (%d)", *toKeep->action);
+ yaz_log (LOG_LOG, " unknown (%d)", *toKeep->action);
}
}
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;
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)
- 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
- 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)
- 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
- 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);
}
}
}
}
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;
+++ /dev/null
-# 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
/*
- * Copyright (C) 1995-1998, Index Data
+ * Copyright (C) 1995-1999, Index Data
* 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
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:
- 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)
- 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)
- 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:
- logf (LOG_LOG, "%.*s%s attribute unknown",
- level, "", attset_name);
+ yaz_log (LOG_LOG, "%.*s%s attribute unknown",
+ level, "", attset_name);
}
}
}
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:
- logf (LOG_LOG, "%*.0s or", level, "");
+ yaz_log (LOG_LOG, "%*.0s or", level, "");
break;
case Z_Operator_and_not:
- logf (LOG_LOG, "%*.0s and-not", level, "");
+ yaz_log (LOG_LOG, "%*.0s and-not", level, "");
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);
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
{
- 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)
{
- 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
- logf (LOG_LOG, "%*.0s unknown simple structure", level, "");
+ yaz_log (LOG_LOG, "%*.0s unknown simple structure", level, "");
}
else
- logf (LOG_LOG, "%*.0s unknown structure", level, "");
+ yaz_log (LOG_LOG, "%*.0s unknown structure", level, "");
}
void log_rpn_query (Z_RPNQuery *rpn)
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;
- logf (LOG_LOG, "RPN query. Unknown type");
+ yaz_log (LOG_LOG, "RPN query. Unknown type");
}
zlog_structure (rpn->RPNStructure, 0, ast);
}
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
- logf (LOG_LOG, "%*.0s term (not general)", level, "");
+ yaz_log (LOG_LOG, "%*.0s term (not general)", level, "");
zlog_attributes (zapt, level+2, ast);
}