tolower.c revision 6b5e5868e7ebf1aff3a5abd7d0c4ef0e5fbf3648
4297a3b0d0a35d80f86fff155e288e885a100e6dGarrett D'Amore/*
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.
6b5e5868e7ebf1aff3a5abd7d0c4ef0e5fbf3648Garrett D'Amore * You may only use this file in accordance with the terms version
6b5e5868e7ebf1aff3a5abd7d0c4ef0e5fbf3648Garrett D'Amore * 1.0 of the CDDL.
4297a3b0d0a35d80f86fff155e288e885a100e6dGarrett D'Amore *
6b5e5868e7ebf1aff3a5abd7d0c4ef0e5fbf3648Garrett D'Amore * A full copy of the text of the CDDL should have accompanied this
6b5e5868e7ebf1aff3a5abd7d0c4ef0e5fbf3648Garrett D'Amore * source. A copy is of the CDDL is also available via the Internet
6b5e5868e7ebf1aff3a5abd7d0c4ef0e5fbf3648Garrett D'Amore * at http://www.illumos.org/license/CDDL.
4297a3b0d0a35d80f86fff155e288e885a100e6dGarrett D'Amore */
4297a3b0d0a35d80f86fff155e288e885a100e6dGarrett D'Amore
4297a3b0d0a35d80f86fff155e288e885a100e6dGarrett D'Amore/*
4297a3b0d0a35d80f86fff155e288e885a100e6dGarrett D'Amore * Copyright 2010 Nexenta Systems, Inc. All rights reserved.
4297a3b0d0a35d80f86fff155e288e885a100e6dGarrett D'Amore */
4297a3b0d0a35d80f86fff155e288e885a100e6dGarrett D'Amore#include "lint.h"
4297a3b0d0a35d80f86fff155e288e885a100e6dGarrett D'Amore#include <ctype.h>
4297a3b0d0a35d80f86fff155e288e885a100e6dGarrett D'Amore
4297a3b0d0a35d80f86fff155e288e885a100e6dGarrett D'Amore#pragma weak _tolower = tolower
4297a3b0d0a35d80f86fff155e288e885a100e6dGarrett D'Amore#pragma weak _toupper = toupper
4297a3b0d0a35d80f86fff155e288e885a100e6dGarrett D'Amore
4297a3b0d0a35d80f86fff155e288e885a100e6dGarrett D'Amoreint
4297a3b0d0a35d80f86fff155e288e885a100e6dGarrett D'Amoretolower(int c)
4297a3b0d0a35d80f86fff155e288e885a100e6dGarrett D'Amore{
4297a3b0d0a35d80f86fff155e288e885a100e6dGarrett D'Amore return (((unsigned)c > 255) ? c : __trans_lower[c]);
4297a3b0d0a35d80f86fff155e288e885a100e6dGarrett D'Amore}
4297a3b0d0a35d80f86fff155e288e885a100e6dGarrett D'Amore
4297a3b0d0a35d80f86fff155e288e885a100e6dGarrett D'Amoreint
4297a3b0d0a35d80f86fff155e288e885a100e6dGarrett D'Amoretoupper(int c)
4297a3b0d0a35d80f86fff155e288e885a100e6dGarrett D'Amore{
4297a3b0d0a35d80f86fff155e288e885a100e6dGarrett D'Amore return (((unsigned)c > 255) ? c : __trans_upper[c]);
4297a3b0d0a35d80f86fff155e288e885a100e6dGarrett D'Amore}