#include "php.h"
#if HAVE_YAZ
+#include "ext/standard/info.h"
#include "php_yaz.h"
#include <yaz/proto.h>
#include <yaz/otherinfo.h>
#include <yaz/marcdisp.h>
#include <yaz/yaz-util.h>
+#include <yaz/yaz-version.h>
#define MAX_ASSOC 100
if (!t->resultSets->recordList) /* no records to retrieve at all .. */
{
-#if PHP_YAZ_DEBUG
- php_log_err("No records to retrieve...");
-#endif
return 0;
}
p = get_assoc (id);
if (!p)
{
-#if PHP_YAZ_DEBUG
- php_log_err ("get_assoc failed");
-#endif
RETURN_FALSE;
}
convert_to_string_ex (type);
{
yaz_resultset_destroy(r);
p->resultSets = 0;
-#if PHP_YAZ_DEBUG
- php_log_err ("bad rpn");
-#endif
RETURN_FALSE;
}
}
{
yaz_resultset_destroy(r);
p->resultSets = 0;
-#if PHP_YAZ_DEBUG
- php_log_err ("bad query type");
-#endif
RETURN_FALSE;
}
RETURN_TRUE;
level++;
grs[level] = e->content->u.subtree;
eno[level] = -1;
- default:
}
zend_hash_next_index_insert (return_value->value.ht,
(void *) &my_zval, sizeof(zval *), NULL);
case VAL_TEXT_XML:
case VAL_APPLICATION_XML:
break;
- default:
}
RETVAL_STRINGL(buf, len, 1);
}
PHP_MINIT_FUNCTION(yaz)
{
int i;
-#if PHP_YAZ_DEBUG
- php_log_err ("PHP_MINIT_FUNCTION yaz");
-#endif
nmem_init();
order_associations = 1;
shared_associations = xmalloc (sizeof(*shared_associations) * MAX_ASSOC);
{
int i;
-#if PHP_YAZ_DEBUG
- php_log_err ("PHP_MSHUTDOWN_FUNCTION yaz");
-#endif
if (shared_associations)
{
for (i = 0; i<MAX_ASSOC; i++)
PHP_MINFO_FUNCTION(yaz)
{
-#if PHP_YAZ_DEBUG
- php_log_err ("PHP_MINFO_FUNCTION yaz");
-#endif
+ php_info_print_table_start();
+ php_info_print_table_row(2, "YAZ Support", "enabled");
+ php_info_print_table_row(2, "YAZ Version", YAZ_VERSION);
+ php_info_print_table_end();
}
PHP_RSHUTDOWN_FUNCTION(yaz)
{
int i;
-#if PHP_YAZ_DEBUG
- php_log_err ("PHP_RSHUTDOWN yaz");
-#endif
+
if (shared_associations)
{
for (i = 0; i<MAX_ASSOC; i++)
PHP_RINIT_FUNCTION(yaz)
{
order_associations++;
-#if PHP_YAZ_DEBUG
- php_log_err ("PHP_RINIT yaz");
-#endif
return SUCCESS;
}
--- /dev/null
+# Microsoft Developer Studio Project File - Name="yaz" - Package Owner=<4>\r
+# Microsoft Developer Studio Generated Build File, Format Version 6.00\r
+# ** DO NOT EDIT **\r
+\r
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102\r
+\r
+CFG=yaz - Win32 Debug_TS\r
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,\r
+!MESSAGE use the Export Makefile command and run\r
+!MESSAGE \r
+!MESSAGE NMAKE /f "yaz.mak".\r
+!MESSAGE \r
+!MESSAGE You can specify a configuration when running NMAKE\r
+!MESSAGE by defining the macro CFG on the command line. For example:\r
+!MESSAGE \r
+!MESSAGE NMAKE /f "yaz.mak" CFG="yaz - Win32 Debug_TS"\r
+!MESSAGE \r
+!MESSAGE Possible choices for configuration are:\r
+!MESSAGE \r
+!MESSAGE "yaz - Win32 Release_TS" (based on "Win32 (x86) Dynamic-Link Library")\r
+!MESSAGE "yaz - Win32 Debug_TS" (based on "Win32 (x86) Dynamic-Link Library")\r
+!MESSAGE \r
+\r
+# Begin Project\r
+# PROP AllowPerConfigDependencies 0\r
+# PROP Scc_ProjName ""\r
+# PROP Scc_LocalPath ""\r
+CPP=cl.exe\r
+MTL=midl.exe\r
+RSC=rc.exe\r
+\r
+!IF "$(CFG)" == "yaz - Win32 Release_TS"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 0\r
+# PROP BASE Output_Dir "Release_TS"\r
+# PROP BASE Intermediate_Dir "Release_TS"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 0\r
+# PROP Output_Dir "Release_TS"\r
+# PROP Intermediate_Dir "Release_TS"\r
+# PROP Ignore_Export_Lib 0\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "YAZ_EXPORTS" /YX /FD /c\r
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I "..\..\main" /D ZEND_DEBUG=0 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "PHP_EXPORTS" /D "COMPILE_DL_YAZ" /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_YAZ=1 /D ZTS=1 /YX /FD /c\r
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32\r
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32\r
+# ADD BASE RSC /l 0x407 /d "NDEBUG"\r
+# ADD RSC /l 0x407 /d "NDEBUG"\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# 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 /dll /machine:I386\r
+# ADD LINK32 php4ts.lib yaz.lib 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 /dll /machine:I386 /out:"..\..\Release_TS/php_yaz.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\Release_TS_Inline"\r
+\r
+!ELSEIF "$(CFG)" == "yaz - Win32 Debug_TS"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 1\r
+# PROP BASE Output_Dir "Debug_TS"\r
+# PROP BASE Intermediate_Dir "Debug_TS"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 1\r
+# PROP Output_Dir "Debug_TS"\r
+# PROP Intermediate_Dir "Debug_TS"\r
+# PROP Ignore_Export_Lib 0\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "YAZ_EXPORTS" /YX /FD /GZ /c\r
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I "..\..\main" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "PHP_EXPORTS" /D "COMPILE_DL_YAZ" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_YAZ=1 /YX /FD /GZ /c\r
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32\r
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32\r
+# ADD BASE RSC /l 0x407 /d "_DEBUG"\r
+# ADD RSC /l 0x407 /d "_DEBUG"\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# 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 /dll /debug /machine:I386 /pdbtype:sept\r
+# ADD LINK32 php4ts-debug.lib yaz.lib 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 /dll /debug /machine:I386 /out:"..\..\Debug_TS/php_yaz.dll" /pdbtype:sept /libpath:"..\..\Debug_TS"\r
+\r
+!ENDIF \r
+\r
+# Begin Target\r
+\r
+# Name "yaz - Win32 Release_TS"\r
+# Name "yaz - Win32 Debug_TS"\r
+# Begin Group "Source Files"\r
+\r
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"\r
+# Begin Source File\r
+\r
+SOURCE=.\php_yaz.c\r
+# End Source File\r
+# End Group\r
+# Begin Group "Header Files"\r
+\r
+# PROP Default_Filter "h;hpp;hxx;hm;inl"\r
+# Begin Source File\r
+\r
+SOURCE=.\php_yaz.h\r
+# End Source File\r
+# End Group\r
+# Begin Source File\r
+\r
+SOURCE=.\README\r
+# End Source File\r
+# End Target\r
+# End Project\r