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
This commit is contained in:
Matthias Melcher 2008-09-19 17:40:20 +00:00
parent c7453106b9
commit e8f467b9e3
41 changed files with 100 additions and 84 deletions

View File

@ -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

View File

@ -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>
#define _HAVE_FL_UTF8_HDR_
# 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 */
#include "FL/Fl_Export.H"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
# if __APPLE__
# include <wchar.h>
# include <sys/stat.h>
# else
#ifdef WIN32
# 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
# if defined(WIN32)
# include <ctype.h>
# define xchar wchar_t
# else
# if __APPLE__
# define xchar wchar_t
# else
# define xchar unsigned short
# endif
# endif
# if defined(WIN32) && !defined(FL_DLL)
# 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" {

View File

@ -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:

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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>

View File

@ -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>

View File

@ -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

View File

@ -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>

View File

@ -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>
////////////////////////////////////////////////////////////////

View File

@ -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

View File

@ -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>

View File

@ -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>

View File

@ -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"
{

View File

@ -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"

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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"
//

View File

@ -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"

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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__)

View File

@ -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__)

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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

View File

@ -19,7 +19,7 @@
// 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>
@ -27,6 +27,37 @@
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.

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>