1/* Copyright (C) 2001 Free Software Foundation, Inc. 2 3 This program is free software; you can redistribute it and/or modify 4 it under the terms of the GNU General Public License as published by 5 the Free Software Foundation; either version 2, or (at your option) 6 any later version. 7 8 This program is distributed in the hope that it will be useful, 9 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 GNU General Public License for more details. 12 13 You should have received a copy of the GNU General Public License 14 along with this program; if not, write to the Free Software Foundation, 15 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 16#include <sys/cdefs.h> 17__RCSID("$NetBSD: mbchar.c,v 1.2 2016/05/17 14:00:09 christos Exp $"); 18 19 20 21#ifdef HAVE_CONFIG_H 22# include <config.h> 23#endif 24 25#include <limits.h> 26 27#include "mbchar.h" 28 29#if IS_BASIC_ASCII 30 31/* Bit table of characters in the ISO C "basic character set". */ 32unsigned int is_basic_table [UCHAR_MAX / 32 + 1] = 33{ 34 0x00001a00, /* '\t' '\v' '\f' */ 35 0xffffffef, /* ' '...'#' '%'...'?' */ 36 0xfffffffe, /* 'A'...'Z' '[' '\\' ']' '^' '_' */ 37 0x7ffffffe /* 'a'...'z' '{' '|' '}' '~' */ 38 /* The remaining bits are 0. */ 39}; 40 41#endif /* IS_BASIC_ASCII */ 42