diff --git a/src/Xutf8.h b/src/Xutf8.h index 8fe0ba0cb..050226500 100644 --- a/src/Xutf8.h +++ b/src/Xutf8.h @@ -156,24 +156,6 @@ XUtf8LookupString( Status* status_return); #endif -unsigned short -XUtf8IsNonSpacing( - unsigned int ucs); - -unsigned short -XUtf8IsRightToLeft( - unsigned int ucs); - - -int -XUtf8Tolower( - int ucs); - -int -XUtf8Toupper( - int ucs); - - # ifdef __cplusplus } # endif diff --git a/src/fl_utf8.cxx b/src/fl_utf8.cxx index 7ae9f1f8f..b7d58eecd 100644 --- a/src/fl_utf8.cxx +++ b/src/fl_utf8.cxx @@ -23,15 +23,12 @@ #include #include #include +#include "utf8_internal.h" + #include #include #undef fl_open -extern "C" { - int XUtf8Tolower(int ucs); // in src/xutf8/case.c - unsigned short XUtf8IsNonSpacing(unsigned int ucs); // in src/xutf8/is_spacing.c -} - /** \addtogroup fl_unicode @{ diff --git a/src/utf8_internal.h b/src/utf8_internal.h new file mode 100644 index 000000000..6d5def687 --- /dev/null +++ b/src/utf8_internal.h @@ -0,0 +1,62 @@ +/* + * "$Id$" + * + * Internal UTF-8 header file for the Fast Light Tool Kit (FLTK). + * + * Copyright 1998-2016 by Bill Spitzak and others. + * + * This library is free software. Distribution and use rights are outlined in + * the file "COPYING" which should have been included with this file. If this + * file is missing or damaged, see the license at: + * + * http://www.fltk.org/COPYING.php + * + * Please report all bugs and problems on the following page: + * + * http://www.fltk.org/str.php + */ + +/* + ---------------- + Note to editors: + ---------------- + + This file may only contain common, platform-independent function + declarations used internally in FLTK. It may be #included everywhere + in source files in the library, but not in public header files. +*/ + +#ifndef _SRC__FL_UTF8_H +#define _SRC__FL_UTF8_H + +# ifdef __cplusplus +extern "C" { +# endif + +unsigned short +XUtf8IsNonSpacing( + unsigned int ucs); + +unsigned short +XUtf8IsRightToLeft( + unsigned int ucs); + + +int +XUtf8Tolower( + int ucs); + +int +XUtf8Toupper( + int ucs); + + +# ifdef __cplusplus +} +# endif + +#endif /* _SRC__FL_UTF8_H */ + +/* + * End of "$Id$". + */ diff --git a/src/xutf8/case.c b/src/xutf8/case.c index de97348cf..e6589cc5b 100644 --- a/src/xutf8/case.c +++ b/src/xutf8/case.c @@ -19,7 +19,7 @@ * This file is required on all platforms for UTF-8 support */ -#include "../Xutf8.h" +#include "../utf8_internal.h" #include /* include UCS tables */ diff --git a/src/xutf8/is_right2left.c b/src/xutf8/is_right2left.c index e79a55f25..c36a0829b 100644 --- a/src/xutf8/is_right2left.c +++ b/src/xutf8/is_right2left.c @@ -14,22 +14,11 @@ * http://www.fltk.org/str.php */ -#if defined(WIN32) || defined(__APPLE__) /* PORTME: Fl_Screen_Driver - platform unicode */ -#elif defined(FL_PORTING) -# pragma message "FL_PORTING: utf8 functionality" -#else -#endif - /* - * This file is required on all platforms for utf8 support + * This file is required on all platforms for UTF-8 support */ -#if defined(WIN32) || defined(__APPLE__) -#elif defined(FL_PORTING) -# pragma message "FL_PORTING: do you want to include Xutf8.h? It's written for X11." -#else -# include "../Xutf8.h" -#endif /* !defined(WIN32) && !defined(__APPLE__) */ +#include "../utf8_internal.h" unsigned short XUtf8IsRightToLeft(unsigned int ucs) { diff --git a/src/xutf8/is_spacing.c b/src/xutf8/is_spacing.c index 30229e72e..72e4df4e8 100644 --- a/src/xutf8/is_spacing.c +++ b/src/xutf8/is_spacing.c @@ -18,7 +18,7 @@ * This file is required on all platforms for UTF-8 support */ -#include "../Xutf8.h" +#include "../utf8_internal.h" /* include UCS tables */ #include "headers/spacing.h"