Changeset View
Changeset View
Standalone View
Standalone View
head/lib/libc/locale/ldpart.c
Show First 20 Lines • Show All 57 Lines • ▼ Show 20 Lines | __part_load_locale(const char *name, | ||||
int saverr, fd, i, num_lines; | int saverr, fd, i, num_lines; | ||||
char *lbuf, *p; | char *lbuf, *p; | ||||
const char *plim; | const char *plim; | ||||
char filename[PATH_MAX]; | char filename[PATH_MAX]; | ||||
struct stat st; | struct stat st; | ||||
size_t namesize, bufsize; | size_t namesize, bufsize; | ||||
/* 'name' must be already checked. */ | /* 'name' must be already checked. */ | ||||
if (strcmp(name, "C") == 0 || strcmp(name, "POSIX") == 0) { | if (strcmp(name, "C") == 0 || strcmp(name, "POSIX") == 0 || | ||||
strncmp(name, "C.", 2) == 0) { | |||||
*using_locale = 0; | *using_locale = 0; | ||||
return (_LDP_CACHE); | return (_LDP_CACHE); | ||||
} | } | ||||
/* | /* | ||||
* If the locale name is the same as our cache, use the cache. | * If the locale name is the same as our cache, use the cache. | ||||
*/ | */ | ||||
if (*locale_buf != NULL && strcmp(name, *locale_buf) == 0) { | if (*locale_buf != NULL && strcmp(name, *locale_buf) == 0) { | ||||
▲ Show 20 Lines • Show All 94 Lines • Show Last 20 Lines |