From 9006495b0949ec4c474866cb69376653540b1aab Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 9 Sep 1997 10:10:18 +0000 Subject: [PATCH] Another MSV5.0 port. Changed projects to include proper library/include paths. Server starts server in test-mode when no options are given. --- client/client.dsp | 10 +- server/server.dsp | 4 +- server/statserv.c | 83 +++--- util/oid.c | 8 +- yaz.dsp | 721 ++++++++++++++++++++++++++++++++++++++++++++++++++++- ztest/ztest.c | 14 +- ztest/ztest.dsp | 19 +- 7 files changed, 802 insertions(+), 57 deletions(-) diff --git a/client/client.dsp b/client/client.dsp index d54ea9b..48f7c5e 100644 --- a/client/client.dsp +++ b/client/client.dsp @@ -38,9 +38,10 @@ RSC=rc.exe # 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 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D WINDOWS=1 /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D WINDOWS=1 /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x406 /d "NDEBUG" # ADD RSC /l 0x406 /d "NDEBUG" @@ -49,7 +50,7 @@ BSC32=bscmake.exe # 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 +# 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" !ELSEIF "$(CFG)" == "client - Win32 Debug" @@ -62,9 +63,10 @@ LINK32=link.exe # 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 /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D WINDOWS=1 /FR /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D WINDOWS=1 /FR /FD /c # SUBTRACT CPP /YX /Yc /Yu # ADD BASE RSC /l 0x406 /d "_DEBUG" # ADD RSC /l 0x406 /d "_DEBUG" @@ -73,7 +75,7 @@ BSC32=bscmake.exe # 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 +# 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" !ENDIF diff --git a/server/server.dsp b/server/server.dsp index 66295acb2..90eb32d 100644 --- a/server/server.dsp +++ b/server/server.dsp @@ -39,7 +39,7 @@ CPP=cl.exe # 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 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "WINDOWS" /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "WINDOWS" /FD /c # SUBTRACT CPP /YX BSC32=bscmake.exe # ADD BASE BSC32 /nologo @@ -69,7 +69,7 @@ PostBuild_Cmds=copy $(OutDir)\$(TargetName).lib $(ProjDir)\..\lib # 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 /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "WINDOWS" /FR /FD /c +# ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I "..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "WINDOWS" /FR /FD /c # SUBTRACT CPP /YX BSC32=bscmake.exe # ADD BASE BSC32 /nologo diff --git a/server/statserv.c b/server/statserv.c index 3756a7f..03822ef 100644 --- a/server/statserv.c +++ b/server/statserv.c @@ -7,7 +7,12 @@ * Chas Woodfield, Fretwell Downing Datasystem. * * $Log: statserv.c,v $ - * Revision 1.38 1997-09-04 14:19:14 adam + * Revision 1.39 1997-09-09 10:10:19 adam + * Another MSV5.0 port. Changed projects to include proper + * library/include paths. + * Server starts server in test-mode when no options are given. + * + * Revision 1.38 1997/09/04 14:19:14 adam * Added credits. * * Revision 1.37 1997/09/01 08:53:01 adam @@ -127,11 +132,6 @@ * */ -/* - * Simple, static server. I wouldn't advise a static server unless you - * really have to, but it's great for debugging memory management. :) - */ - #include #include #ifdef WINDOWS @@ -276,7 +276,8 @@ void statserv_closedown() int iHandles = 0; HANDLE *pThreadHandles = NULL; - /* We need to stop threads adding and removing while we start the closedown process */ + /* We need to stop threads adding and removing while we */ + /* start the closedown process */ EnterCriticalSection(&Thread_CritSect); { @@ -344,11 +345,11 @@ static void listener(IOCHAN h, int event) { if ((res = cs_listen(line, 0, 0)) < 0) { - logf(LOG_FATAL, "cs_listen failed."); + logf(LOG_FATAL, "cs_listen failed."); return; } else if (res == 1) - return; + return; logf(LOG_DEBUG, "listen ok"); iochan_setevent(h, EVENT_OUTPUT); iochan_setflags(h, EVENT_OUTPUT | EVENT_EXCEPT); /* set up for acpt */ @@ -357,46 +358,50 @@ static void listener(IOCHAN h, int event) { COMSTACK new_line; IOCHAN new_chan; - char *a; + char *a = NULL; DWORD ThreadId; - if (!(new_line = cs_accept(line))) - { - logf(LOG_FATAL, "Accept failed."); - iochan_setflags(h, EVENT_INPUT | EVENT_EXCEPT); /* reset listener */ - return; - } - logf(LOG_DEBUG, "accept ok"); + if (!(new_line = cs_accept(line))) + { + logf(LOG_FATAL, "Accept failed."); + iochan_setflags(h, EVENT_INPUT | EVENT_EXCEPT); /* reset listener */ + return; + } + logf(LOG_DEBUG, "accept ok"); - if (!(new_chan = iochan_create(cs_fileno(new_line), ir_session, EVENT_INPUT))) - { - logf(LOG_FATAL, "Failed to create iochan"); + if (!(new_chan = iochan_create(cs_fileno(new_line), ir_session, EVENT_INPUT))) + { + logf(LOG_FATAL, "Failed to create iochan"); iochan_destroy(h); return; - } - if (!(newas = create_association(new_chan, new_line))) - { - logf(LOG_FATAL, "Failed to create new assoc."); + } + + logf(LOG_DEBUG, "accept ok 2"); + if (!(newas = create_association(new_chan, new_line))) + { + logf(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]"); - - /* Now what we need todo is create a new thread with this iochan as the parameter */ -/* if (CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)event_loop, new_chan, 0, &ThreadId) == NULL) -*/ - /* Somehow, somewhere we need to store this thread id, otherwise we won't be able to close cleanly */ + } + logf(LOG_DEBUG, "accept ok 3"); + 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]"); + /* Now what we need todo is create a new thread with this iochan as + the parameter */ + /* if (CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)event_loop, new_chan, + 0, &ThreadId) == NULL) */ + /* Somehow, somewhere we need to store this thread id, otherwise we won't be + able to close cleanly */ NewHandle = (HANDLE)_beginthreadex(NULL, 0, event_loop, new_chan, 0, &ThreadId); if (NewHandle == (HANDLE)-1) - { - logf(LOG_FATAL, "Failed to create new thread."); + { + + logf(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); @@ -756,7 +761,7 @@ int statserv_main(int argc, char **argv) } } -#ifdef WINDOWS +#if 0 log_init(control_block.loglevel, NULL, control_block.logfile); #endif /* WINDOWS */ diff --git a/util/oid.c b/util/oid.c index e521961..55ba752 100644 --- a/util/oid.c +++ b/util/oid.c @@ -4,7 +4,12 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: oid.c,v $ - * Revision 1.22 1997-08-29 13:34:58 quinn + * Revision 1.23 1997-09-09 10:10:19 adam + * Another MSV5.0 port. Changed projects to include proper + * library/include paths. + * Server starts server in test-mode when no options are given. + * + * Revision 1.22 1997/08/29 13:34:58 quinn * Added thesaurus oids * * Revision 1.21 1997/08/19 08:46:05 quinn @@ -94,6 +99,7 @@ * entries to the list at initialization. */ +#include #include #include diff --git a/yaz.dsp b/yaz.dsp index 9ff8bec..da411b3 100644 --- a/yaz.dsp +++ b/yaz.dsp @@ -42,7 +42,7 @@ RSC=rc.exe # 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 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINDOWS=1 /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINDOWS=1 /FD /c # SUBTRACT CPP /YX # ADD BASE MTL /nologo /D "NDEBUG" /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 @@ -62,7 +62,7 @@ TargetName=yaz SOURCE=$(InputPath) PostBuild_Desc=Copy Lib and Dll PostBuild_Cmds=copy $(OutDir)\$(TargetName).lib $(ProjDir)\lib copy\ - $(OutDir)\$(TargetName).dll $(ProjDir)\lib + $(OutDir)\$(TargetName).dll $(ProjDir)\lib # End Special Build Tool !ELSEIF "$(CFG)" == "yaz - Win32 Debug" @@ -99,7 +99,7 @@ TargetName=yaz SOURCE=$(InputPath) PostBuild_Desc=Copy Lib and Dll PostBuild_Cmds=copy $(OutDir)\$(TargetName).lib $(ProjDir)\lib copy\ - $(OutDir)\$(TargetName).dll $(ProjDir)\lib + $(OutDir)\$(TargetName).dll $(ProjDir)\lib # End Special Build Tool !ENDIF @@ -113,315 +113,1030 @@ PostBuild_Cmds=copy $(OutDir)\$(TargetName).lib $(ProjDir)\lib copy\ # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" # Begin Source File +SOURCE=.\Util\atoin.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + +# End Source File +# Begin Source File + SOURCE=.\odr\ber_any.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\odr\ber_bit.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\odr\ber_bool.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\odr\ber_int.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\odr\ber_len.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\odr\ber_null.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\odr\ber_oct.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\odr\ber_oid.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\odr\ber_tag.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\ccl\cclerrms.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\ccl\cclfind.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\ccl\cclptree.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\ccl\cclqfile.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\ccl\cclqual.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\ccl\cclstr.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\ccl\ccltoken.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\comstack\comstack.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\retrieval\d1_absyn.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\retrieval\d1_attset.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\retrieval\d1_doespec.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\retrieval\d1_espec.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\retrieval\d1_expout.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\retrieval\d1_grs.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\retrieval\d1_map.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\retrieval\d1_marc.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\retrieval\d1_read.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\retrieval\d1_soif.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\retrieval\d1_sumout.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\retrieval\d1_sutrs.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\retrieval\d1_tagset.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\retrieval\d1_varset.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\retrieval\d1_write.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\asn\diagbib1.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\util\dmalloc.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\odr\dumpber.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\util\log.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\util\marcdisp.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\util\nmem.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\odr\odr.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\odr\odr_any.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\odr\odr_bit.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\odr\odr_bool.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\odr\odr_choice.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\odr\odr_cons.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\odr\odr_int.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\odr\odr_mem.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\odr\odr_null.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\odr\odr_oct.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\odr\odr_oid.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\odr\odr_priv.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\odr\odr_seq.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\odr\odr_tag.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\odr\odr_use.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\odr\odr_util.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\util\oid.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\util\options.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\util\pquery.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\asn\proto.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=".\asn\prt-acc.c" + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=".\asn\prt-add.c" + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=".\asn\prt-arc.c" + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=".\asn\prt-dia.c" + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=".\asn\prt-esp.c" + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=".\asn\prt-exd.c" + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=".\asn\prt-exp.c" + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=".\asn\prt-ext.c" + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=".\asn\prt-grs.c" + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=".\asn\prt-rsc.c" + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\util\query.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\util\readconf.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\comstack\tcpip.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\util\tpath.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\comstack\waislen.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\util\wrbuf.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\util\xmalloc.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=".\util\yaz-ccl.c" + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=".\util\yaz-util.c" + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # Begin Source File SOURCE=.\asn\zget.c + +!IF "$(CFG)" == "yaz - Win32 Release" + +!ELSEIF "$(CFG)" == "yaz - Win32 Debug" + +# ADD CPP /I "include" + +!ENDIF + # End Source File # End Group # Begin Group "Header Files" diff --git a/ztest/ztest.c b/ztest/ztest.c index 5be99a9..52ea666 100644 --- a/ztest/ztest.c +++ b/ztest/ztest.c @@ -7,7 +7,12 @@ * Chas Woodfield, Fretwell Downing Datasystems. * * $Log: ztest.c,v $ - * Revision 1.2 1997-09-04 13:50:31 adam + * Revision 1.3 1997-09-09 10:10:20 adam + * Another MSV5.0 port. Changed projects to include proper + * library/include paths. + * Server starts server in test-mode when no options are given. + * + * Revision 1.2 1997/09/04 13:50:31 adam * Bug fix in ztest. * */ @@ -48,6 +53,7 @@ bend_searchresult *bend_search(void *handle, bend_searchrequest *q, int *fd) r.errcode = 0; r.errstring = 0; r.hits = rand() % 22; + return &r; } @@ -144,10 +150,10 @@ bend_fetchresult *bend_fetch(void *handle, bend_fetchrequest *q, int *num) r.basename = "DUMMY"; if (bbb) { - xfree(bbb); + xfree(bbb); bbb = 0; } - + r.format = q->format; if (q->format == VAL_SUTRS) { char buf[100]; @@ -170,11 +176,11 @@ bend_fetchresult *bend_fetch(void *handle, bend_fetchrequest *q, int *num) else if (!(r.record = bbb = dummy_database_record(q->number))) { r.errcode = 13; + r.format = VAL_USMARC; return &r; } else r.len = strlen(r.record); - r.format = q->format; r.errcode = 0; return &r; } diff --git a/ztest/ztest.dsp b/ztest/ztest.dsp index c7a0405..0e5a6de 100644 --- a/ztest/ztest.dsp +++ b/ztest/ztest.dsp @@ -38,9 +38,10 @@ RSC=rc.exe # 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 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "WINDOWS" /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "WINDOWS" /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x406 /d "NDEBUG" # ADD RSC /l 0x406 /d "NDEBUG" @@ -49,7 +50,12 @@ BSC32=bscmake.exe # 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 +# 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 +ProjDir=. +SOURCE=$(InputPath) +PostBuild_Cmds=copy ..\..\yaz\release\yaz.dll $(ProjDir) +# End Special Build Tool !ELSEIF "$(CFG)" == "ztest - Win32 Debug" @@ -65,7 +71,7 @@ LINK32=link.exe # 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 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "WINDOWS" /FR /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "WINDOWS" /FR /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x406 /d "_DEBUG" # ADD RSC /l 0x406 /d "_DEBUG" @@ -74,7 +80,12 @@ BSC32=bscmake.exe # 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 /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 +ProjDir=. +SOURCE=$(InputPath) +PostBuild_Cmds=copy ..\..\yaz\debug\yaz.dll $(ProjDir) +# End Special Build Tool !ENDIF -- 1.7.10.4