fltk 1.3.0rc3
About: FLTK (Fast Light Tool Kit) is a cross-platform C++ GUI toolkit for UNIX/Linux (X11), Microsoft Windows, and MacOS X. Release candidate.
  SfR Fresh Dox: fltk-1.3.0rc3-source.tar.gz ("inofficial" and yet experimental doxygen-generated source code documentation)  

is_spacing.c

Go to the documentation of this file.
00001 /* "$Id: $"
00002  *
00003  * Author: Jean-Marc Lienher ( http://oksid.ch )
00004  * Copyright 2000-2010 by O'ksi'D.
00005  *
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Library General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2 of the License, or (at your option) any later version.
00010  *
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Library General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Library General Public
00017  * License along with this library; if not, write to the Free Software
00018  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00019  * USA.
00020  *
00021  * Please report all bugs and problems on the following page:
00022  *
00023  *     http://www.fltk.org/str.php
00024  */
00025 
00026 /*
00027  * This file is required on all platforms for utf8 support
00028  */
00029 
00030 #include "headers/spacing.h"
00031 
00032 unsigned short 
00033 XUtf8IsNonSpacing(unsigned int ucs) {
00034 
00035   if (ucs <= 0x0361) {
00036     if (ucs >= 0x0300) return ucs_table_0300[ucs - 0x0300];
00037     return 0;
00038   }
00039 
00040   if (ucs <= 0x0486) {
00041     if (ucs >= 0x0483) return ucs_table_0483[ucs - 0x0483];
00042     return 0;
00043   }
00044 
00045   if (ucs <= 0x05C4) {
00046     if (ucs >= 0x0591) return ucs_table_0591[ucs - 0x0591];
00047     return 0;
00048   }
00049 
00050   if (ucs <= 0x06ED) {
00051     if (ucs >= 0x064B) return ucs_table_064B[ucs - 0x064B];
00052     return 0;
00053   }
00054 
00055   if (ucs <= 0x0D4D) {
00056     if (ucs >= 0x0901) return ucs_table_0901[ucs - 0x0901];
00057     return 0;
00058   }
00059 
00060   if (ucs <= 0x0FB9) {
00061     if (ucs >= 0x0E31) return ucs_table_0E31[ucs - 0x0E31];
00062     return 0;
00063   }
00064 
00065   if (ucs <= 0x20E1) {
00066     if (ucs >= 0x20D0) return ucs_table_20D0[ucs - 0x20D0];
00067     return 0;
00068   }
00069 
00070   if (ucs <= 0x309A) {
00071     if (ucs >= 0x302A) return ucs_table_302A[ucs - 0x302A];
00072     return 0;
00073   }
00074 
00075   if (ucs <= 0xFB1E) {
00076     if (ucs >= 0xFB1E) return ucs_table_FB1E[ucs - 0xFB1E];
00077     return 0;
00078   }
00079 
00080   if (ucs <= 0xFE23) {
00081     if (ucs >= 0xFE20) return ucs_table_FE20[ucs - 0xFE20];
00082     return 0;
00083   }
00084 
00085   return 0;
00086 }
00087 
00088 /*
00089  * End of "$Id$".
00090  */