tolower.c revision 2d08521bd15501c8370ba2153b9cca4f094979d0
6b5e5868e7ebf1aff3a5abd7d0c4ef0e5fbf3648Garrett D'Amore * This file and its contents are supplied under the terms of the
6b5e5868e7ebf1aff3a5abd7d0c4ef0e5fbf3648Garrett D'Amore * Common Development and Distribution License ("CDDL"), version 1.0.
5aec55eb0591d2fcdd38d7dd5408a6ff3456e596Garrett D'Amore * You may only use this file in accordance with the terms of version
6b5e5868e7ebf1aff3a5abd7d0c4ef0e5fbf3648Garrett D'Amore * 1.0 of the CDDL.
6b5e5868e7ebf1aff3a5abd7d0c4ef0e5fbf3648Garrett D'Amore * A full copy of the text of the CDDL should have accompanied this
5aec55eb0591d2fcdd38d7dd5408a6ff3456e596Garrett D'Amore * source. A copy of the CDDL is also available via the Internet at
2d08521bd15501c8370ba2153b9cca4f094979d0Garrett D'Amore * Copyright 2013 Garrett D'Amore <garrett@damore.org>
4297a3b0d0a35d80f86fff155e288e885a100e6dGarrett D'Amore * Copyright 2010 Nexenta Systems, Inc. All rights reserved.
2d08521bd15501c8370ba2153b9cca4f094979d0Garrett D'Amore return (((unsigned)c > 255) ? c : loc->ctype->lc_trans_lower[c]);
2d08521bd15501c8370ba2153b9cca4f094979d0Garrett D'Amore return (((unsigned)c > 255) ? c : loc->ctype->lc_trans_upper[c]);
2d08521bd15501c8370ba2153b9cca4f094979d0Garrett D'Amore return (isascii(c) ? __trans_lower[c] : tolower_l(c, uselocale(NULL)));
2d08521bd15501c8370ba2153b9cca4f094979d0Garrett D'Amore return (isascii(c) ? __trans_upper[c] : toupper_l(c, uselocale(NULL)));