iswctype.c revision 163bd69b3c164dda2a59c7f08ca788e7d6ba9bea
/*
* Copyright (c) 1989, 1993
* The Regents of the University of California. All rights reserved.
* (c) UNIX System Laboratories, Inc.
* All or some portions of this file are derived from material licensed
* to the University of California by American Telephone and Telegraph
* Co. or Unix System Laboratories, Inc. and are reproduced herein with
* the permission of UNIX System Laboratories, Inc.
*
* This code is derived from software contributed to Berkeley by
* Paul Borman at Krystal Technologies.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
/*
* Copyright 2010 Nexenta Systems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include "lint.h"
#include <wctype.h>
#include "runefile.h"
#include "runetype.h"
#include "_ctype.h"
/*
* We removed: iswascii, iswrune, iswhexnumber, and iswnumber, as
* these are not present on Solaris. Note that the standard requires
* iswascii to be a macro, so it is defined in our headers.
*
* We renamed (per Solaris) iswideogram, iswspecial, iswspecial to the
* equivalent values without "w". We added a new isnumber, that looks
* for non-ASCII numbers.
*/
static int
{
unsigned int rt;
/* Fast path for single byte locales */
if (c < 0 || c >= _CACHED_RUNES)
rt = ___runetype(c);
else
return (rt & f);
}
static int
{
unsigned int rt;
/* Fast path for single byte locales */
if (c < 0 || c >= _CACHED_RUNES)
return (0);
else
return (rt & f);
}
int
{
}
unsigned
{
}
int
{
}
int
{
}
int
{
}
int
{
}
int
{
}
int
{
}
int
{
}
int
{
}
int
{
}
int
{
}
int
{
}
int
{
}
int
{
}
int
{
}
int
{
}
int
{
}
int
{
}
/*
* FreeBSD has iswrune() for use by external programs, and this is used by
* the "tr" program. As that program is part of our consolidation, we
* provide an _ILLUMOS_PRIVATE version of this function that we can use.
*
* No programs that are not part of the illumos stack itself should use
* this function -- programs that do reference will not be portable to
* other versions of SunOS or Solaris.
*/
int
{
/*
* Note, FreeBSD ignored the low order byte, as they encode their
* ctype values differently. We can't do that (ctype is baked into
* applications), but instead can just check if *any* bit is set in
* the ctype. Any bit being set indicates its a valid rune.
*/
}