1 --- ldpart.c.orig 2004-11-25 11:38:17.000000000 -0800
2 +++ ldpart.c 2005-02-13 01:59:35.000000000 -0800
5 __FBSDID("$FreeBSD: src/lib/libc/locale/ldpart.c,v 1.15 2004/04/25 19:56:50 ache Exp $");
7 +#include "xlocale_private.h"
10 #include <sys/types.h>
14 static int split_lines(char *, const char *);
17 +__private_extern__ int
18 __part_load_locale(const char *name,
20 + unsigned char *using_locale,
22 const char *category_filename,
23 int locale_buf_size_max,
26 size_t namesize, bufsize;
28 - /* 'name' must be already checked. */
29 - if (strcmp(name, "C") == 0 || strcmp(name, "POSIX") == 0) {
31 - return (_LDP_CACHE);
35 - * If the locale name is the same as our cache, use the cache.
37 - if (*locale_buf != NULL && strcmp(name, *locale_buf) == 0) {
39 - return (_LDP_CACHE);
43 * Slurp the locale file into the cache.
49 +__private_extern__ void
50 +__ldpart_free_extra(struct __xlocale_st_ldpart *lp)
53 + free(lp->_locale_buf);