summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2008-09-19 17:40:20 +0000
committerMatthias Melcher <fltk@matthiasm.com>2008-09-19 17:40:20 +0000
commite8f467b9e3c52914b234d539a113a981c868df53 (patch)
tree56b38732c3532dd82f307d693ac49bb437707f23
parentc7453106b907771651ba580ead4a3d75f81537f4 (diff)
Updating fl_utf8.h references. Fixing copyright date in .fl files.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6311 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--FL/Fl.H2
-rw-r--r--FL/fl_utf8.h69
-rw-r--r--documentation/unicode.dox2
-rw-r--r--fluid/function_panel.fl2
-rw-r--r--fluid/print_panel.fl2
-rw-r--r--fluid/template_panel.fl2
-rw-r--r--fluid/widget_panel.fl2
-rw-r--r--src/Fl_Browser_load.cxx2
-rw-r--r--src/Fl_File_Chooser.fl2
-rw-r--r--src/Fl_File_Icon.cxx2
-rw-r--r--src/Fl_File_Icon2.cxx2
-rw-r--r--src/Fl_GIF_Image.cxx2
-rw-r--r--src/Fl_Gl_Choice.cxx2
-rw-r--r--src/Fl_Gl_Window.cxx2
-rw-r--r--src/Fl_Help_Dialog.fl2
-rw-r--r--src/Fl_Help_View.cxx2
-rw-r--r--src/Fl_Input_.cxx2
-rw-r--r--src/Fl_PNG_Image.cxx2
-rw-r--r--src/Fl_PNM_Image.cxx2
-rw-r--r--src/Fl_Preferences.cxx2
-rw-r--r--src/Fl_Shared_Image.cxx2
-rw-r--r--src/Fl_Text_Buffer.cxx2
-rw-r--r--src/Fl_Text_Display.cxx2
-rw-r--r--src/Fl_XBM_Image.cxx2
-rw-r--r--src/Fl_XPM_Image.cxx2
-rw-r--r--src/Fl_get_system_colors.cxx2
-rw-r--r--src/Fl_win32.cxx2
-rw-r--r--src/Fl_x.cxx2
-rw-r--r--src/filename_absolute.cxx2
-rw-r--r--src/filename_expand.cxx2
-rw-r--r--src/filename_isdir.cxx2
-rw-r--r--src/fl_call_main.c2
-rw-r--r--src/fl_dnd_win32.cxx2
-rw-r--r--src/fl_draw.cxx2
-rw-r--r--src/fl_set_fonts_win32.cxx2
-rw-r--r--src/fl_utf.c35
-rw-r--r--src/fl_utf8.cxx4
-rw-r--r--src/gl_draw.cxx2
-rw-r--r--src/scandir.c2
-rw-r--r--src/scandir_win32.c2
-rw-r--r--test/utf8.cxx2
41 files changed, 100 insertions, 84 deletions
diff --git a/FL/Fl.H b/FL/Fl.H
index bbd1e92d9..df1b9d861 100644
--- a/FL/Fl.H
+++ b/FL/Fl.H
@@ -33,7 +33,7 @@
#ifndef Fl_H
# define Fl_H
-# include "fl_utf8.H"
+# include "fl_utf8.h"
# include "Enumerations.H"
# ifndef Fl_Object
# define Fl_Object Fl_Widget
diff --git a/FL/fl_utf8.h b/FL/fl_utf8.h
index f9c084fdb..97c94674f 100644
--- a/FL/fl_utf8.h
+++ b/FL/fl_utf8.h
@@ -28,53 +28,21 @@
/*** NOTE : all functions are LIMITED to 24 bits Unicode values !!! ***/
#ifndef _HAVE_FL_UTF8_HDR_
-# define _HAVE_FL_UTF8_HDR_
-# include <stdio.h>
-# include <string.h>
-# include <stdlib.h>
-
-# ifndef FL_EXPORT
-# if defined(FL_DLL) && defined(_MSC_VER)
-# ifdef FL_LIBRARY
-# define FL_EXPORT __declspec(dllexport)
-# else
-# define FL_EXPORT __declspec(dllimport)
-# endif /* FL_LIBRARY */
-# else
-# define FL_EXPORT
-# endif /* FL_DLL && _MSC_VER */
-# endif /* FL_EXPORT */
-
-
-
-# if __APPLE__
-# include <wchar.h>
-# include <sys/stat.h>
-# else
-# include <sys/types.h>
-# include <sys/stat.h>
-# ifndef _WIN32
-# include "Xutf8.h"
-# include <X11/Xlocale.h>
-# include <X11/Xlib.h>
-# endif
-# include <locale.h>
-# endif
-
+#define _HAVE_FL_UTF8_HDR_
+#include "FL/Fl_Export.H"
-# if defined(WIN32)
-# include <ctype.h>
-# define xchar wchar_t
-# else
-# if __APPLE__
-# define xchar wchar_t
-# else
-# define xchar unsigned short
-# endif
-# endif
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
-# if defined(WIN32) && !defined(FL_DLL)
+#ifdef WIN32
+# include <sys/types.h>
+# include <sys/stat.h>
+# include <locale.h>
+# include <ctype.h>
+# define xchar wchar_t
+# ifndef FL_DLL
# undef strdup
# define strdup _strdup
# undef putenv
@@ -88,6 +56,19 @@
# undef chdir
# define chdir _chdir
# endif
+#elif defined(__APPLE__)
+# include <wchar.h>
+# include <sys/stat.h>
+# define xchar wchar_t
+#else /* X11 */
+# include <sys/types.h>
+# include <sys/stat.h>
+# include "Xutf8.h"
+# include <X11/Xlocale.h>
+# include <X11/Xlib.h>
+# include <locale.h>
+# define xchar unsigned short
+#endif
# ifdef __cplusplus
extern "C" {
diff --git a/documentation/unicode.dox b/documentation/unicode.dox
index c3c992fe7..aea16eb06 100644
--- a/documentation/unicode.dox
+++ b/documentation/unicode.dox
@@ -38,6 +38,8 @@ TODO:
<LI> more doc on unicode, add links
<LI> write something about filename encoding on OS X...
<LI> explain the fl_utf8_... commands
+<LI> explain issues with Fl_Preferences
+<LI> why FLTK has no Fl_String class
</UL>
DONE:
diff --git a/fluid/function_panel.fl b/fluid/function_panel.fl
index 3dc9206a5..dd5adb58f 100644
--- a/fluid/function_panel.fl
+++ b/fluid/function_panel.fl
@@ -7,7 +7,7 @@ comment {//
//
// Code dialogs for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2005 by Bill Spitzak and others.
+// Copyright 1998-2008 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
diff --git a/fluid/print_panel.fl b/fluid/print_panel.fl
index 723dbe841..3ae714405 100644
--- a/fluid/print_panel.fl
+++ b/fluid/print_panel.fl
@@ -7,7 +7,7 @@ comment {//
//
// FLUID print panel for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2005 by Bill Spitzak and others.
+// Copyright 1998-2008 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
diff --git a/fluid/template_panel.fl b/fluid/template_panel.fl
index dbcadf891..ec44cdfd8 100644
--- a/fluid/template_panel.fl
+++ b/fluid/template_panel.fl
@@ -7,7 +7,7 @@ comment {//
//
// FLUID template support for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2005 by Bill Spitzak and others.
+// Copyright 1998-2008 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
diff --git a/fluid/widget_panel.fl b/fluid/widget_panel.fl
index 7fc44753f..b25589c8a 100644
--- a/fluid/widget_panel.fl
+++ b/fluid/widget_panel.fl
@@ -7,7 +7,7 @@ comment {//
//
// Widget panel for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2005 by Bill Spitzak and others.
+// Copyright 1998-2008 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
diff --git a/src/Fl_Browser_load.cxx b/src/Fl_Browser_load.cxx
index 30b3b25f0..65e1c78a0 100644
--- a/src/Fl_Browser_load.cxx
+++ b/src/Fl_Browser_load.cxx
@@ -28,7 +28,7 @@
#include <FL/Fl.H>
#include <FL/Fl_Browser.H>
#include <stdio.h>
-#include <FL/fl_utf8.H>
+#include <FL/fl_utf8.h>
/**
Clears the browser and reads the file, adding each line from the file
diff --git a/src/Fl_File_Chooser.fl b/src/Fl_File_Chooser.fl
index 39d3fca8f..beaef51c8 100644
--- a/src/Fl_File_Chooser.fl
+++ b/src/Fl_File_Chooser.fl
@@ -7,7 +7,7 @@ comment {//
//
// Fl_File_Chooser dialog for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2005 by Bill Spitzak and others.
+// Copyright 1998-2008 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
diff --git a/src/Fl_File_Icon.cxx b/src/Fl_File_Icon.cxx
index 6ac6438b3..92c642eca 100644
--- a/src/Fl_File_Icon.cxx
+++ b/src/Fl_File_Icon.cxx
@@ -43,7 +43,7 @@
#include <stdio.h>
#include <stdlib.h>
-#include <FL/fl_utf8.H>
+#include <FL/fl_utf8.h>
#include "flstring.h"
#include <errno.h>
#include <sys/types.h>
diff --git a/src/Fl_File_Icon2.cxx b/src/Fl_File_Icon2.cxx
index 119954949..886ce4a51 100644
--- a/src/Fl_File_Icon2.cxx
+++ b/src/Fl_File_Icon2.cxx
@@ -44,7 +44,7 @@
#include <stdio.h>
#include <stdlib.h>
-#include <FL/fl_utf8.H>
+#include <FL/fl_utf8.h>
#include "flstring.h"
#include <ctype.h>
#include <errno.h>
diff --git a/src/Fl_GIF_Image.cxx b/src/Fl_GIF_Image.cxx
index ee5e726da..0cf6ebe49 100644
--- a/src/Fl_GIF_Image.cxx
+++ b/src/Fl_GIF_Image.cxx
@@ -36,7 +36,7 @@
#include <FL/Fl_GIF_Image.H>
#include <stdio.h>
#include <stdlib.h>
-#include <FL/fl_utf8.H>
+#include <FL/fl_utf8.h>
#include "flstring.h"
// Read a .gif file and convert it to a "xpm" format (actually my
diff --git a/src/Fl_Gl_Choice.cxx b/src/Fl_Gl_Choice.cxx
index df0562686..7c2787b68 100644
--- a/src/Fl_Gl_Choice.cxx
+++ b/src/Fl_Gl_Choice.cxx
@@ -34,7 +34,7 @@
# include "Fl_Gl_Choice.H"
# include <FL/gl_draw.H>
# include "flstring.h"
-# include <FL/fl_utf8.H>
+# include <FL/fl_utf8.h>
# ifdef __APPLE__
# include <FL/Fl_Window.H>
diff --git a/src/Fl_Gl_Window.cxx b/src/Fl_Gl_Window.cxx
index 3093dcd44..a6757a2ce 100644
--- a/src/Fl_Gl_Window.cxx
+++ b/src/Fl_Gl_Window.cxx
@@ -33,7 +33,7 @@
#include "Fl_Gl_Choice.H"
#include <FL/Fl_Gl_Window.H>
#include <stdlib.h>
-#include <FL/fl_utf8.H>
+#include <FL/fl_utf8.h>
////////////////////////////////////////////////////////////////
diff --git a/src/Fl_Help_Dialog.fl b/src/Fl_Help_Dialog.fl
index 88c349df3..7f3122975 100644
--- a/src/Fl_Help_Dialog.fl
+++ b/src/Fl_Help_Dialog.fl
@@ -7,7 +7,7 @@ comment {//
//
// Fl_Help_Dialog dialog for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2005 by Bill Spitzak and others.
+// Copyright 1998-2008 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
diff --git a/src/Fl_Help_View.cxx b/src/Fl_Help_View.cxx
index dbf37d39c..a04874975 100644
--- a/src/Fl_Help_View.cxx
+++ b/src/Fl_Help_View.cxx
@@ -61,7 +61,7 @@
#include <FL/x.H>
#include <stdio.h>
#include <stdlib.h>
-#include <FL/fl_utf8.H>
+#include <FL/fl_utf8.h>
#include "flstring.h"
#include <ctype.h>
#include <errno.h>
diff --git a/src/Fl_Input_.cxx b/src/Fl_Input_.cxx
index 251df6987..62495e15a 100644
--- a/src/Fl_Input_.cxx
+++ b/src/Fl_Input_.cxx
@@ -44,7 +44,7 @@
#include <FL/fl_draw.H>
#include <FL/fl_ask.H>
#include <math.h>
-#include <FL/fl_utf8.H>
+#include <FL/fl_utf8.h>
#include "flstring.h"
#include <stdlib.h>
#include <ctype.h>
diff --git a/src/Fl_PNG_Image.cxx b/src/Fl_PNG_Image.cxx
index 547601c7b..d8b7615a0 100644
--- a/src/Fl_PNG_Image.cxx
+++ b/src/Fl_PNG_Image.cxx
@@ -40,7 +40,7 @@
#include <config.h>
#include <stdio.h>
#include <stdlib.h>
-#include <FL/fl_utf8.H>
+#include <FL/fl_utf8.h>
extern "C"
{
diff --git a/src/Fl_PNM_Image.cxx b/src/Fl_PNM_Image.cxx
index 168f570f5..41d65e1f3 100644
--- a/src/Fl_PNM_Image.cxx
+++ b/src/Fl_PNM_Image.cxx
@@ -38,7 +38,7 @@
#include <FL/Fl_PNM_Image.H>
#include <stdio.h>
#include <stdlib.h>
-#include <FL/fl_utf8.H>
+#include <FL/fl_utf8.h>
#include "flstring.h"
diff --git a/src/Fl_Preferences.cxx b/src/Fl_Preferences.cxx
index a44509a0b..3cd1df5a0 100644
--- a/src/Fl_Preferences.cxx
+++ b/src/Fl_Preferences.cxx
@@ -33,7 +33,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
-#include <FL/fl_utf8.H>
+#include <FL/fl_utf8.h>
#include "flstring.h"
#include <sys/stat.h>
diff --git a/src/Fl_Shared_Image.cxx b/src/Fl_Shared_Image.cxx
index 58837e0bd..345e0e1fb 100644
--- a/src/Fl_Shared_Image.cxx
+++ b/src/Fl_Shared_Image.cxx
@@ -27,7 +27,7 @@
#include <stdio.h>
#include <stdlib.h>
-#include <FL/fl_utf8.H>
+#include <FL/fl_utf8.h>
#include "flstring.h"
#include <FL/Fl.H>
diff --git a/src/Fl_Text_Buffer.cxx b/src/Fl_Text_Buffer.cxx
index e7550f3ba..7bb18a948 100644
--- a/src/Fl_Text_Buffer.cxx
+++ b/src/Fl_Text_Buffer.cxx
@@ -27,7 +27,7 @@
#include <stdio.h>
#include <stdlib.h>
-#include <FL/fl_utf8.H>
+#include <FL/fl_utf8.h>
#include "flstring.h"
#include <ctype.h>
#include <FL/Fl.H>
diff --git a/src/Fl_Text_Display.cxx b/src/Fl_Text_Display.cxx
index d3b2eb69e..0ba0e3630 100644
--- a/src/Fl_Text_Display.cxx
+++ b/src/Fl_Text_Display.cxx
@@ -27,7 +27,7 @@
#include <stdio.h>
#include <stdlib.h>
-#include <FL/fl_utf8.H>
+#include <FL/fl_utf8.h>
#include "flstring.h"
#include <limits.h>
#include <ctype.h>
diff --git a/src/Fl_XBM_Image.cxx b/src/Fl_XBM_Image.cxx
index 4406f7cef..8ffb86c03 100644
--- a/src/Fl_XBM_Image.cxx
+++ b/src/Fl_XBM_Image.cxx
@@ -37,7 +37,7 @@
#include <FL/Fl_XBM_Image.H>
#include <stdio.h>
#include <stdlib.h>
-#include <FL/fl_utf8.H>
+#include <FL/fl_utf8.h>
#include "flstring.h"
//
diff --git a/src/Fl_XPM_Image.cxx b/src/Fl_XPM_Image.cxx
index 603e58b35..4e64a9ff5 100644
--- a/src/Fl_XPM_Image.cxx
+++ b/src/Fl_XPM_Image.cxx
@@ -36,7 +36,7 @@
#include <FL/Fl_XPM_Image.H>
#include <stdio.h>
#include <stdlib.h>
-#include <FL/fl_utf8.H>
+#include <FL/fl_utf8.h>
#include "flstring.h"
diff --git a/src/Fl_get_system_colors.cxx b/src/Fl_get_system_colors.cxx
index e294a5246..87af217b9 100644
--- a/src/Fl_get_system_colors.cxx
+++ b/src/Fl_get_system_colors.cxx
@@ -29,7 +29,7 @@
#include <FL/fl_draw.H>
#include <FL/x.H>
#include <FL/math.h>
-#include <FL/fl_utf8.H>
+#include <FL/fl_utf8.h>
#include "flstring.h"
#include <stdio.h>
#include <stdlib.h>
diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx
index accd05498..b67bf80dd 100644
--- a/src/Fl_win32.cxx
+++ b/src/Fl_win32.cxx
@@ -32,7 +32,7 @@
#ifndef FL_DOXYGEN
#include <FL/Fl.H>
#include <FL/x.H>
-#include <FL/fl_utf8.H>
+#include <FL/fl_utf8.h>
#include <FL/Fl_Window.H>
#include <FL/fl_draw.H>
#include <FL/Enumerations.H>
diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx
index e92766968..3fffb0ab5 100644
--- a/src/Fl_x.cxx
+++ b/src/Fl_x.cxx
@@ -39,7 +39,7 @@
# include <FL/Fl.H>
# include <FL/x.H>
# include <FL/Fl_Window.H>
-# include <FL/fl_utf8.H>
+# include <FL/fl_utf8.h>
# include <FL/Fl_Tooltip.H>
# include <stdio.h>
# include <stdlib.h>
diff --git a/src/filename_absolute.cxx b/src/filename_absolute.cxx
index 6da3ddd11..635fde26c 100644
--- a/src/filename_absolute.cxx
+++ b/src/filename_absolute.cxx
@@ -32,7 +32,7 @@
*/
#include <FL/filename.H>
-#include <FL/fl_utf8.H>
+#include <FL/fl_utf8.h>
#include <stdlib.h>
#include "flstring.h"
#include <ctype.h>
diff --git a/src/filename_expand.cxx b/src/filename_expand.cxx
index 607510a34..f152efc59 100644
--- a/src/filename_expand.cxx
+++ b/src/filename_expand.cxx
@@ -31,7 +31,7 @@
*/
#include <FL/filename.H>
-#include <FL/fl_utf8.H>
+#include <FL/fl_utf8.h>
#include <stdlib.h>
#include "flstring.h"
#if defined(WIN32) && !defined(__CYGWIN__)
diff --git a/src/filename_isdir.cxx b/src/filename_isdir.cxx
index c456f5771..6b48048c8 100644
--- a/src/filename_isdir.cxx
+++ b/src/filename_isdir.cxx
@@ -32,7 +32,7 @@
#include <sys/stat.h>
#include <ctype.h>
#include <FL/filename.H>
-#include <FL/fl_utf8.H>
+#include <FL/fl_utf8.h>
#if defined(WIN32) || defined(__EMX__) && !defined(__CYGWIN__)
diff --git a/src/fl_call_main.c b/src/fl_call_main.c
index f1bd1a50e..67051fcac 100644
--- a/src/fl_call_main.c
+++ b/src/fl_call_main.c
@@ -51,7 +51,7 @@
# include <windows.h>
# include <stdio.h>
# include <stdlib.h>
-#include <FL/fl_utf8.H>
+#include <FL/fl_utf8.h>
# ifdef __MWERKS__
# include <crtl.h>
diff --git a/src/fl_dnd_win32.cxx b/src/fl_dnd_win32.cxx
index 5a81f1838..092c598eb 100644
--- a/src/fl_dnd_win32.cxx
+++ b/src/fl_dnd_win32.cxx
@@ -29,7 +29,7 @@
#include <FL/Fl.H>
#include <FL/x.H>
#include <FL/Fl_Window.H>
-#include <FL/fl_utf8.H>
+#include <FL/fl_utf8.h>
#include "flstring.h"
#include <stdio.h>
#include <stdlib.h>
diff --git a/src/fl_draw.cxx b/src/fl_draw.cxx
index e315010f5..d321a875e 100644
--- a/src/fl_draw.cxx
+++ b/src/fl_draw.cxx
@@ -33,7 +33,7 @@
// Aligns them against the inside of the box.
#define min(a,b) ((a)<(b)?(a):(b))
-#include <FL/fl_utf8.H>
+#include <FL/fl_utf8.h>
#include <FL/Fl.H>
#include <FL/fl_draw.H>
#include <FL/Fl_Image.H>
diff --git a/src/fl_set_fonts_win32.cxx b/src/fl_set_fonts_win32.cxx
index 31c1d5c8a..b87a574b5 100644
--- a/src/fl_set_fonts_win32.cxx
+++ b/src/fl_set_fonts_win32.cxx
@@ -29,7 +29,7 @@
// are found on the X server. It tries to place the fonts into families
// and to sort them so the first 4 in a family are normal, bold, italic,
// and bold italic.
-#include <Fl/fl_utf8.H>
+#include <Fl/fl_utf8.h>
// Bug: older versions calculated the value for *ap as a side effect of
// making the name, and then forgot about it. To avoid having to change
diff --git a/src/fl_utf.c b/src/fl_utf.c
index 95b4e37c6..29cbe9e27 100644
--- a/src/fl_utf.c
+++ b/src/fl_utf.c
@@ -19,14 +19,45 @@
// Modified to obey rfc3629, which limits unicode to 0-0x10ffff
-#include <FL/fl_utf8.H>
+#include <FL/fl_utf8.h>
#include <string.h>
#include <stdlib.h>
#ifdef __cplusplus
extern "C" {
#endif
-
+
+ /**
+ \defgroup fl_unichar FLTK Unicode Character Functions
+ Global Functions Handling Single Unicode Characters
+ @{ */
+
+ /**
+ Convert a Unicode character into a utf-8 sequnece.
+ \param uc[in] Unicode characte
+ \param text[out] utf-8 sequence will be written here; if this pointer is
+ \c NULL, only the length of the utf-8 sequence is calculated
+ \return length of the sequence in bytes
+ */
+ //FL_EXPORT int fl_unichar_to_utf8(Fl_Unichar uc, char *text);
+
+ /** @} */
+
+ /**
+ \defgroup fl_utf8 FLTK Unicode String Functions
+ Global Functions Handling Unicode Text
+ @{ */
+
+ /**
+ Calculate the size of a utf-8 sequnce for a Unnicode character.
+ \param uc[in] Unicode characte
+ \return length of the sequence in bytes
+ */
+ //FL_EXPORT int fl_utf8_size(Fl_Unichar uc);
+
+ /** @} */
+
+
/* Set to 1 to turn bad UTF8 bytes into ISO-8859-1. If this is to zero
they are instead turned into the Unicode REPLACEMENT CHARACTER, of
value 0xfffd.
diff --git a/src/fl_utf8.cxx b/src/fl_utf8.cxx
index 48b4e08d0..07b4f7915 100644
--- a/src/fl_utf8.cxx
+++ b/src/fl_utf8.cxx
@@ -62,6 +62,8 @@ extern "C" {
# include <unistd.h>
# include <wchar.h>
# include <stdlib.h>
+# include <sys/types.h>
+# include <sys/stat.h>
extern "C" {
int XUtf8Tolower(int ucs);
@@ -77,7 +79,7 @@ extern "C" {
# include <unistd.h>
#endif // WIN32
-#include <FL/fl_utf8.H>
+#include <FL/fl_utf8.h>
#include <string.h>
#include <stdlib.h>
diff --git a/src/gl_draw.cxx b/src/gl_draw.cxx
index 457f04cf4..3bc2e3a73 100644
--- a/src/gl_draw.cxx
+++ b/src/gl_draw.cxx
@@ -37,7 +37,7 @@
#include <FL/fl_draw.H>
#include "Fl_Gl_Choice.H"
#include "Fl_Font.H"
-#include <FL/fl_utf8.H>
+#include <FL/fl_utf8.h>
#if !defined(WIN32) && !defined(__APPLE__)
#include <FL/Xutf8.h>
diff --git a/src/scandir.c b/src/scandir.c
index 27aa63567..622e4ddb8 100644
--- a/src/scandir.c
+++ b/src/scandir.c
@@ -21,7 +21,7 @@ USA. */
#else
# include "flstring.h"
-# include <FL/fl_utf8.H>
+# include <FL/fl_utf8.h>
# if !HAVE_SCANDIR
# include <stdlib.h>
diff --git a/src/scandir_win32.c b/src/scandir_win32.c
index 804fadc0c..47d70479a 100644
--- a/src/scandir_win32.c
+++ b/src/scandir_win32.c
@@ -27,7 +27,7 @@
#ifndef __CYGWIN__
/* Emulation of posix scandir() call */
-#include <FL/fl_utf8.H>
+#include <FL/fl_utf8.h>
#include <FL/filename.H>
#include "flstring.h"
#include <windows.h>
diff --git a/test/utf8.cxx b/test/utf8.cxx
index 2beaf402f..73438cf22 100644
--- a/test/utf8.cxx
+++ b/test/utf8.cxx
@@ -35,7 +35,7 @@
#include <FL/Fl_Check_Button.H>
#include <FL/Fl_Output.H>
#include <FL/fl_draw.H>
-#include <FL/fl_utf8.H>
+#include <FL/fl_utf8.h>
#include <stdio.h>
#include <stdlib.h>