749N/A/* $XConsortium: XawI18n.c,v 1.6 94/04/17 20:13:28 kaleb Exp $ */
749N/A
749N/A/* Copyright 1991 NCR Corporation - Dayton, Ohio, USA */
749N/A
749N/A/*
749N/A * Copyright 1990, 1991 by OMRON Corporation, NTT Software Corporation,
749N/A * and Nippon Telegraph and Telephone Corporation
749N/A *
749N/A * Permission to use, copy, modify, distribute, and sell this software and its
749N/A * documentation for any purpose is hereby granted without fee, provided that
749N/A * the above copyright notice appear in all copies and that both that
749N/A * copyright notice and this permission notice appear in supporting
749N/A * documentation, and that the names of OMRON, NTT Software, and NTT
749N/A * not be used in advertising or publicity pertaining to distribution of the
749N/A * software without specific, written prior permission. OMRON, NTT Software,
749N/A * and NTT make no representations about the suitability of this
749N/A * software for any purpose. It is provided "as is" without express or
749N/A * implied warranty.
749N/A *
749N/A * OMRON, NTT SOFTWARE, AND NTT, DISCLAIM ALL WARRANTIES WITH REGARD
749N/A * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
749N/A * AND FITNESS, IN NO EVENT SHALL OMRON, NTT SOFTWARE, OR NTT BE
749N/A * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
749N/A * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
749N/A * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
749N/A * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
749N/A *
749N/A * Author: Li Yuhong OMRON Corporation
749N/A */
749N/A
749N/A/*
749N/A
749N/ACopyright (c) 1991, 1994 X Consortium
749N/A
749N/APermission is hereby granted, free of charge, to any person obtaining a copy
749N/Aof this software and associated documentation files (the "Software"), to deal
749N/Ain the Software without restriction, including without limitation the rights
749N/Ato use, copy, modify, merge, publish, distribute, sublicense, and/or sell
749N/Acopies of the Software, and to permit persons to whom the Software is
749N/Afurnished to do so, subject to the following conditions:
749N/A
749N/AThe above copyright notice and this permission notice shall be included in
749N/Aall copies or substantial portions of the Software.
749N/A
749N/ATHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
749N/AIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
749N/AFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
749N/AX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
749N/AAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
749N/ACONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
749N/A
749N/AExcept as contained in this notice, the name of the X Consortium shall not be
749N/Aused in advertising or otherwise to promote the sale, use or other dealings
749N/Ain this Software without prior written authorization from the X Consortium.
749N/A
749N/A*/
749N/A
749N/A#include <stdlib.h>
749N/A#include <limits.h>
749N/A#include <X11/IntrinsicP.h>
749N/A#include "XawI18n.h"
749N/A
749N/A#if NeedFunctionPrototypes
749N/Awchar_t _Xaw_atowc(
749N/A unsigned char c)
749N/A#else
749N/Awchar_t _Xaw_atowc(c)
749N/A unsigned char c;
749N/A#endif
749N/A{
749N/A wchar_t wc;
749N/A char str[2];
749N/A
749N/A str[0] = c;
749N/A str[1] = '\0';
749N/A
749N/A mbtowc(&wc, str, 1);
749N/A return wc;
749N/A}
749N/A
749N/A#ifdef NCR
749N/Aint _Xaw_iswspace(wchar_t w)
749N/A{
749N/A int ret = 0;
749N/A wchar_t s = _Xaw_atowc(' ');
749N/A if (s == w)
749N/A ret = 1;
749N/A return ret;
749N/A}
749N/A#endif