Function nmem_exit calls oid_exit (when reference is 0).
authorAdam Dickmeiss <adam@indexdata.dk>
Thu, 27 Sep 2001 12:09:18 +0000 (12:09 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Thu, 27 Sep 2001 12:09:18 +0000 (12:09 +0000)
util/nmem.c
util/oid.c
win/makefile
win/yaz.rc

index 7e3fc1b..ceb8210 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: nmem.c,v $
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: nmem.c,v $
- * Revision 1.26  2001-07-19 19:51:42  adam
+ * Revision 1.27  2001-09-27 12:09:18  adam
+ * Function nmem_exit calls oid_exit (when reference is 0).
+ *
+ * Revision 1.26  2001/07/19 19:51:42  adam
  * Added typecasts to make C++ happy.
  *
  * Revision 1.25  2001/06/26 14:11:27  adam
  * Added typecasts to make C++ happy.
  *
  * Revision 1.25  2001/06/26 14:11:27  adam
 #include <yaz/xmalloc.h>
 #include <yaz/nmem.h>
 #include <yaz/log.h>
 #include <yaz/xmalloc.h>
 #include <yaz/nmem.h>
 #include <yaz/log.h>
+#include <yaz/oid.h>
 #ifdef WIN32
 #include <windows.h>
 #elif _REENTRANT
 #ifdef WIN32
 #include <windows.h>
 #elif _REENTRANT
@@ -465,6 +469,7 @@ void nmem_exit (void)
 {
     if (--nmem_init_flag == 0)
     {
 {
     if (--nmem_init_flag == 0)
     {
+        oid_exit();
        while (freelist)
        {
            struct nmem_block *fl = freelist;
        while (freelist)
        {
            struct nmem_block *fl = freelist;
index 47fc423..d5c193d 100644 (file)
@@ -3,7 +3,10 @@
  * See the file LICENSE for details.
  *
  * $Log: oid.c,v $
  * See the file LICENSE for details.
  *
  * $Log: oid.c,v $
- * Revision 1.47  2001-09-24 21:51:55  adam
+ * Revision 1.48  2001-09-27 12:09:18  adam
+ * Function nmem_exit calls oid_exit (when reference is 0).
+ *
+ * Revision 1.47  2001/09/24 21:51:55  adam
  * New Z39.50 OID utilities: yaz_oidval_to_z3950oid, yaz_str_to_z3950oid
  * and yaz_z3950oid_to_str.
  *
  * New Z39.50 OID utilities: yaz_oidval_to_z3950oid, yaz_str_to_z3950oid
  * and yaz_z3950oid_to_str.
  *
@@ -612,10 +615,13 @@ void oid_init (void)
 
 void oid_exit (void)
 {
 
 void oid_exit (void)
 {
-    oid_init_flag = 0;
-    nmem_mutex_destroy (&oid_mutex);
-    nmem_destroy (oid_nmem);
-    oid_nmem = 0;
+    if (oid_init_flag)
+    {
+        oid_init_flag = 0;
+        nmem_mutex_destroy (&oid_mutex);
+        nmem_destroy (oid_nmem);
+        oid_nmem = 0;
+    }
 }
 
 static struct oident *oid_getentbyoid_x(int *o)
 }
 
 static struct oident *oid_getentbyoid_x(int *o)
index 7aca592..1f60dfa 100644 (file)
@@ -1,5 +1,5 @@
 # makefile.mak - makefile for MS NMAKE 
 # makefile.mak - makefile for MS NMAKE 
-# $Id: makefile,v 1.25 2001-09-24 21:51:56 adam Exp $
+# $Id: makefile,v 1.26 2001-09-27 12:09:18 adam Exp $
 #
 # Programmed by
 #  HL: Heikki Levanto, Index Data
 #
 # Programmed by
 #  HL: Heikki Levanto, Index Data
@@ -23,7 +23,7 @@
 ############### Parameters 
 ###########################################################
 
 ############### Parameters 
 ###########################################################
 
-DEBUG=0   # 0 for release, 1 for debug
+DEBUG=1   # 0 for release, 1 for debug
 
 NEW_Z3950=1  # 0= use old asn files
              # 1= generate files from *.asn (needs tcl)
 
 NEW_Z3950=1  # 0= use old asn files
              # 1= generate files from *.asn (needs tcl)
@@ -709,7 +709,10 @@ $(PROTOH): $(GENERATED_C_FILES) $(GENERATED_H_FILES)
 ###########################################################
 #
 # $Log: makefile,v $
 ###########################################################
 #
 # $Log: makefile,v $
-# Revision 1.25  2001-09-24 21:51:56  adam
+# Revision 1.26  2001-09-27 12:09:18  adam
+# Function nmem_exit calls oid_exit (when reference is 0).
+#
+# Revision 1.25  2001/09/24 21:51:56  adam
 # New Z39.50 OID utilities: yaz_oidval_to_z3950oid, yaz_str_to_z3950oid
 # and yaz_z3950oid_to_str.
 #
 # New Z39.50 OID utilities: yaz_oidval_to_z3950oid, yaz_str_to_z3950oid
 # and yaz_z3950oid_to_str.
 #
index 1d5c410..8966e0c 100644 (file)
@@ -54,8 +54,8 @@ END
 //
 
 VS_VERSION_INFO VERSIONINFO
 //
 
 VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,7,0,8
- PRODUCTVERSION 1,7,0,8
+ FILEVERSION 1,7,0,9
+ PRODUCTVERSION 1,7,0,9
  FILEFLAGSMASK 0x3fL
 #ifdef _DEBUG
  FILEFLAGS 0x1L
  FILEFLAGSMASK 0x3fL
 #ifdef _DEBUG
  FILEFLAGS 0x1L
@@ -73,14 +73,14 @@ BEGIN
             VALUE "Comments", "Z39.50 C Library\0"
             VALUE "CompanyName", "Index Data\0"
             VALUE "FileDescription", "YAZ Toolkit\0"
             VALUE "Comments", "Z39.50 C Library\0"
             VALUE "CompanyName", "Index Data\0"
             VALUE "FileDescription", "YAZ Toolkit\0"
-            VALUE "FileVersion", "1, 7, 0, 8\0"
+            VALUE "FileVersion", "1, 7, 0, 9\0"
             VALUE "InternalName", "YAZ\0"
             VALUE "LegalCopyright", "Copyright © 1996-2001 Index Data\0"
             VALUE "LegalTrademarks", "\0"
             VALUE "OriginalFilename", "yaz.rc\0"
             VALUE "PrivateBuild", "\0"
             VALUE "ProductName", "Index Data YAZ Toolkit\0"
             VALUE "InternalName", "YAZ\0"
             VALUE "LegalCopyright", "Copyright © 1996-2001 Index Data\0"
             VALUE "LegalTrademarks", "\0"
             VALUE "OriginalFilename", "yaz.rc\0"
             VALUE "PrivateBuild", "\0"
             VALUE "ProductName", "Index Data YAZ Toolkit\0"
-            VALUE "ProductVersion", "1, 7, 0, 8\0"
+            VALUE "ProductVersion", "1, 7, 0, 9\0"
             VALUE "SpecialBuild", "\0"
         END
     END
             VALUE "SpecialBuild", "\0"
         END
     END