XawI18n.c

Go to the documentation of this file.
00001 /* $XConsortium: XawI18n.c,v 1.6 94/04/17 20:13:28 kaleb Exp $ */
00002 
00003 /* Copyright 1991 NCR Corporation - Dayton, Ohio, USA */
00004 
00005 /*
00006  * Copyright 1990, 1991 by OMRON Corporation, NTT Software Corporation,
00007  *                      and Nippon Telegraph and Telephone Corporation
00008  *
00009  * Permission to use, copy, modify, distribute, and sell this software and its
00010  * documentation for any purpose is hereby granted without fee, provided that
00011  * the above copyright notice appear in all copies and that both that
00012  * copyright notice and this permission notice appear in supporting
00013  * documentation, and that the names of OMRON, NTT Software, and NTT
00014  * not be used in advertising or publicity pertaining to distribution of the
00015  * software without specific, written prior permission. OMRON, NTT Software,
00016  * and NTT make no representations about the suitability of this
00017  * software for any purpose.  It is provided "as is" without express or
00018  * implied warranty.
00019  *
00020  * OMRON, NTT SOFTWARE, AND NTT, DISCLAIM ALL WARRANTIES WITH REGARD
00021  * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
00022  * AND FITNESS, IN NO EVENT SHALL OMRON, NTT SOFTWARE, OR NTT BE
00023  * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 
00024  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
00025  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
00026  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
00027  *
00028  *      Author: Li Yuhong       OMRON Corporation
00029  */
00030 
00031 /*
00032 
00033 Copyright (c) 1991, 1994  X Consortium
00034 
00035 Permission is hereby granted, free of charge, to any person obtaining a copy
00036 of this software and associated documentation files (the "Software"), to deal
00037 in the Software without restriction, including without limitation the rights
00038 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
00039 copies of the Software, and to permit persons to whom the Software is
00040 furnished to do so, subject to the following conditions:
00041 
00042 The above copyright notice and this permission notice shall be included in
00043 all copies or substantial portions of the Software.
00044 
00045 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00046 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00047 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
00048 X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
00049 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
00050 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00051 
00052 Except as contained in this notice, the name of the X Consortium shall not be
00053 used in advertising or otherwise to promote the sale, use or other dealings
00054 in this Software without prior written authorization from the X Consortium.
00055 
00056 */
00057 
00058 #include <X11/IntrinsicP.h>
00059 #include "XawI18n.h"
00060 
00061 #if NeedFunctionPrototypes
00062 wchar_t _Xaw_atowc(
00063     unsigned char c)
00064 #else
00065 wchar_t _Xaw_atowc(c)
00066     unsigned char c;
00067 #endif
00068 {
00069     wchar_t  wc;
00070     char str[2];
00071 
00072     str[0] = c;
00073     str[1] = '\0';
00074 
00075     mbtowc(&wc, str, 1);
00076     return wc;
00077 }
00078 
00079 #ifdef NCR
00080 int _Xaw_iswspace(wchar_t w)
00081 {
00082     int ret = 0;
00083     wchar_t s = _Xaw_atowc(' ');
00084     if (s == w)
00085         ret = 1;
00086     return ret;
00087 }
00088 #endif

Generated on Sun Mar 4 15:03:56 2007 for Scilab [trunk] by  doxygen 1.5.1