Minor changes.
[idzebra-moved-to-github.git] / index / zebraapi.c
index eaf6987..30cf988 100644 (file)
@@ -1,10 +1,16 @@
 /*
- * Copyright (C) 1995-1998, Index Data
+ * Copyright (C) 1995-1999, Index Data
  * All rights reserved.
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: zebraapi.c,v $
- * Revision 1.13  1998-12-16 12:23:30  adam
+ * Revision 1.15  1999-02-17 12:18:12  adam
+ * Fixed zebra_close so that a NULL pointer is ignored.
+ *
+ * Revision 1.14  1999/02/02 14:51:11  adam
+ * Updated WIN32 code specific sections. Changed header.
+ *
+ * Revision 1.13  1998/12/16 12:23:30  adam
  * Added facility for database name mapping using resource mapdb.
  *
  * Revision 1.12  1998/11/16 10:18:10  adam
@@ -53,7 +59,7 @@
  */
 
 #include <stdio.h>
-#ifdef WINDOWS
+#ifdef WIN32
 #include <io.h>
 #include <process.h>
 #else
@@ -161,7 +167,7 @@ static void zebra_register_unlock (ZebraHandle zh)
         else
             waitSec = 0;
     }
-#ifdef WINDOWS
+#ifdef WIN32
 #else
     if (waitSec > 0)
         sleep (waitSec);
@@ -213,6 +219,8 @@ ZebraHandle zebra_open (const char *configName)
 
 void zebra_close (ZebraHandle zh)
 {
+    if (!zh)
+       return;
     if (zh->records)
     {
         resultSetDestroy (zh);