f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica * Copyright 2014 Garrett D'Amore <garrett@damore.org>
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica * Copyright 2010 Nexenta Systems, Inc. All rights reserved.
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica * Copyright (c) 1996 - 2002 FreeBSD Project
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica * Copyright (c) 1991, 1993
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica * The Regents of the University of California. All rights reserved.
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica * This code is derived from software contributed to Berkeley by
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica * Paul Borman at Krystal Technologies.
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica * Redistribution and use in source and binary forms, with or without
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica * modification, are permitted provided that the following conditions
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica * are met:
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica * 1. Redistributions of source code must retain the above copyright
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica * notice, this list of conditions and the following disclaimer.
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica * 2. Redistributions in binary form must reproduce the above copyright
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica * notice, this list of conditions and the following disclaimer in the
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica * documentation and/or other materials provided with the distribution.
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica * 4. Neither the name of the University nor the names of its contributors
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica * may be used to endorse or promote products derived from this software
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica * without specific prior written permission.
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica * SUCH DAMAGE.
#include <errno.h>
#include <limits.h>
#include <locale.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <stdio.h>
#include "mtlib.h"
#include "collate.h"
#include "runetype.h"
#include "setlocale.h"
#include "../i18n/_loc_path.h"
#include "localeimpl.h"
#include "../i18n/_locale.h"
#include "libc.h"
* Path to locale storage directory. See ../i18n/_loc_path.h
return (NULL);
return (NULL);
switch (cat) {
case LC_CTYPE:
case LC_COLLATE:
case LC_MESSAGES:
case LC_MONETARY:
case LC_NUMERIC:
case LC_TIME:
case LC_ALL:
return (NULL);
for (int i = 0; i < _CACHED_RUNES; i++) {
for (int i = 0; i < _CACHED_RUNES; i++) {
__trans_upper[i] = u;
__trans_lower[i] = l;