]> git.sur5r.net Git - openldap/blobdiff - libraries/liblunicode/ucdata/ucdata.c
Error in exclusion set macros
[openldap] / libraries / liblunicode / ucdata / ucdata.c
index 5e34a31cf1b51d8cb454b0c5c1ade5f777b1cda2..457a8a88359e624bf4adc05b9c6a0421d28f3f2b 100644 (file)
 /* $Id: ucdata.c,v 1.4 2001/01/02 18:46:20 mleisher Exp $" */
 
 #include "portable.h"
+#include "ldap_config.h"
 
 #include <stdio.h>
-#include <stdlib.h>
+#include <ac/stdlib.h>
 #include <ac/string.h>
 #include <ac/unistd.h>
 
@@ -83,7 +84,7 @@ _ucopenfile(char *paths, char *filename, char *mode)
         pp = path;
         while (*dp && *dp != ':')
           *pp++ = *dp++;
-        *pp++ = '/';
+        *pp++ = *LDAP_DIRSEP;
 
         fp = filename;
         while (*fp)
@@ -223,6 +224,9 @@ _ucprop_lookup(unsigned long code, unsigned long n)
 {
     long l, r, m;
 
+    if (_ucprop_size == 0)
+      return 0;
+
     /*
      * There is an extra node on the end of the offsets to allow this routine
      * to work right.  If the index is 0xffff, then there are no nodes for the
@@ -346,6 +350,7 @@ _uccase_load(char *paths, int reload)
         for (i = 0; i < _uccase_size; i++)
           _uccase_map[i] = endian_long(_uccase_map[i]);
     }
+    fclose(in);
     return 0;
 }
 
@@ -538,6 +543,7 @@ _uccomp_load(char *paths, int reload)
         break;
     _uccomp_size = i - 1;
 
+    fclose(in);
     return 0;
 }
 
@@ -717,6 +723,7 @@ _ucdcmp_load(char *paths, int reload)
         for (i = 0; i < size; i++)
             _ucdcmp_nodes[i] = endian_long(_ucdcmp_nodes[i]);
     }
+    fclose(in);
     return 0;
 }
 
@@ -903,6 +910,7 @@ _uccmcl_load(char *paths, int reload)
         for (i = 0; i < _uccmcl_size; i++)
             _uccmcl_nodes[i] = endian_long(_uccmcl_nodes[i]);
     }
+    fclose(in);
     return 0;
 }
 
@@ -1007,6 +1015,7 @@ _ucnumb_load(char *paths, int reload)
         for (i = 0; i < size; i++)
           _ucnum_vals[i] = endian_short(_ucnum_vals[i]);
     }
+    fclose(in);
     return 0;
 }