Use LIBS instead of XML2_LIBS for Makefiles
[yaz-moved-to-github.git] / comstack / comstack.c
index 1027792..07903eb 100644 (file)
@@ -1,41 +1,14 @@
 /*
- * Copyright (c) 1995-1998, Index Data
+ * Copyright (c) 1995-2003, Index Data
  * See the file LICENSE for details.
- * Sebastian Hammer, Adam Dickmeiss
- *
- * $Log: comstack.c,v $
- * Revision 1.7  2001-03-21 12:43:36  adam
- * Implemented cs_create_host. Better error reporting for SSL comstack.
- *
- * Revision 1.6  1999/11/30 13:47:11  adam
- * Improved installation. Moved header files to include/yaz.
- *
- * Revision 1.5  1998/06/22 11:32:35  adam
- * Added 'conditional cs_listen' feature.
- *
- * Revision 1.4  1997/09/29 07:16:14  adam
- * Array cs_errlist no longer global.
- *
- * Revision 1.3  1997/09/01 08:49:14  adam
- * New windows NT/95 port using MSV5.0. Minor changes only.
- *
- * Revision 1.2  1995/09/29 17:01:48  quinn
- * More Windows work
- *
- * Revision 1.1  1995/06/14  09:58:20  quinn
- * Renamed yazlib to comstack.
- *
- * Revision 1.2  1995/05/16  08:51:15  quinn
- * License, documentation, and memory fixes
- *
- * Revision 1.1  1995/03/14  10:28:34  quinn
- * Adding server-side support to tcpip.c and fixing bugs in nonblocking I/O
- *
  *
+ * $Id: comstack.c,v 1.11 2003-02-14 18:49:23 adam Exp $
  */
 
+#include <string.h>
 #include <yaz/comstack.h>
 #include <yaz/tcpip.h>
+#include <yaz/unix.h>
 
 static const char *cs_errlist[] =
 {
@@ -80,6 +53,15 @@ COMSTACK cs_create_host(const char *type_and_host, int blocking, void **vp)
        return 0;
 #endif
     }
+    else if (strncmp (type_and_host, "unix:", 5) == 0)
+    {
+#ifndef WIN32
+       t = unix_type;
+        host = type_and_host + 5;
+#else
+       return 0;
+#endif
+    }
     else
     {
        t = tcpip_type;
@@ -97,3 +79,8 @@ COMSTACK cs_create_host(const char *type_and_host, int blocking, void **vp)
     }    
     return cs;
 }
+
+int cs_look (COMSTACK cs)
+{
+    return cs->event;
+}