1// Copyright (C) 2000-2007, Luca Padovani <padovani@sti.uniurb.it>. 2// 3// This file is part of GtkMathView, a flexible, high-quality rendering 4// engine for MathML documents. 5// 6// GtkMathView is free software; you can redistribute it and/or modify it 7// under the terms of the GNU Lesser General Public License as published 8// by the Free Software Foundation; either version 3 of the License, or 9// (at your option) any later version. 10// 11// GtkMathView is distributed in the hope that it will be useful, but 12// WITHOUT ANY WARRANTY; without even the implied warranty of 13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14// Lesser General Public License for more details. 15// 16// You should have received a copy of the GNU Lesser General Public License 17// along with this program. If not, see <http://www.gnu.org/licenses/>. 18 19#ifndef __Char_hh__ 20#define __Char_hh__ 21 22typedef char Char; 23 24#if 1 == 0 25#define GTKMATHVIEW_CHAR_UNSIGNED 1 26#endif 27 28#if 1 == 1 29 typedef char Char8; 30#ifdef GTKMATHVIEW_CHAR_UNSIGNED 31 typedef char UChar8; 32#else 33 typedef unsigned char UChar8; 34#endif 35#define CHAR8 1 36#else 37#error "could not define type Char8" 38#endif 39 40#if 2 == 1 41 typedef char Char16; 42#define CHAR16 1 43#elif 2 == 4 44 typedef wchar_t Char16; 45#else 46#if 2 == 2 47 typedef unsigned short Char16; 48#elif 2 == 4 49 typedef unsigned int Char16; 50#elif 2 == 4 51 typedef unsigned long Char16; 52#else 53#error "could not define type Char16" 54#endif 55#endif 56 57#if 4 == 1 58 typedef char Char32; 59#define CHAR32 1 60#elif 4 == 4 61 typedef wchar_t Char32; 62#else 63#if 4 == 4 64 typedef unsigned int Char32; 65#elif 4 == 4 66 typedef unsigned long Char32; 67#elif 4 == 8 68 typedef unsigned long long Char32; 69#else 70#error "could not define type Char32" 71#endif 72#endif 73 74#endif // __Char_hh__ 75 76