X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libraries%2Fliblunicode%2Fucdata%2Fucdata.c;h=457a8a88359e624bf4adc05b9c6a0421d28f3f2b;hb=9705dcfcd65c94d0a2fd7777e3ee7e236435ca85;hp=5e34a31cf1b51d8cb454b0c5c1ade5f777b1cda2;hpb=6c2ea5ec24cba752386d3b185b7b760b4eade0e3;p=openldap diff --git a/libraries/liblunicode/ucdata/ucdata.c b/libraries/liblunicode/ucdata/ucdata.c index 5e34a31cf1..457a8a8835 100644 --- a/libraries/liblunicode/ucdata/ucdata.c +++ b/libraries/liblunicode/ucdata/ucdata.c @@ -27,9 +27,10 @@ /* $Id: ucdata.c,v 1.4 2001/01/02 18:46:20 mleisher Exp $" */ #include "portable.h" +#include "ldap_config.h" #include -#include +#include #include #include @@ -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; }