diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2016-01-31 04:33:54 +0000 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2016-01-31 04:33:54 +0000 |
| commit | 0a6be0a83f368aff7df7e1a9c567d7e16b92a579 (patch) | |
| tree | 0fff69bdb746415afd1449a5e9afc216261fdd2e | |
| parent | 642187dc1c99cc041f181438473cda8894564c8b (diff) | |
Fix compiler warnings (STR 2988), porting from branch-1.3.
This commit is the accumulated patch introduced in branch 1.3
in svn r 11094, 11095, and 11096.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11097 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | FL/Fl_Paged_Device.H | 2 | ||||
| -rw-r--r-- | FL/Fl_Table.H | 4 | ||||
| -rw-r--r-- | FL/mac.H | 2 | ||||
| -rw-r--r-- | configh.cmake.in | 12 | ||||
| -rw-r--r-- | configh.in | 12 | ||||
| -rwxr-xr-x | fltk-config.in | 2 | ||||
| -rw-r--r-- | ide/VisualC2008/config.h | 199 | ||||
| -rw-r--r-- | ide/VisualC2010/config.h | 199 | ||||
| -rw-r--r-- | ide/VisualC6/config.h | 8 | ||||
| -rw-r--r-- | src/Fl_Copy_Surface.cxx | 2 | ||||
| -rw-r--r-- | src/Fl_Image_Surface.cxx | 2 | ||||
| -rw-r--r-- | src/Fl_Input.cxx | 6 | ||||
| -rw-r--r-- | src/Fl_Paged_Device.cxx | 2 | ||||
| -rw-r--r-- | src/Fl_cocoa.mm | 2 | ||||
| -rw-r--r-- | src/Fl_grab.cxx | 4 | ||||
| -rw-r--r-- | src/Fl_lock.cxx | 4 | ||||
| -rw-r--r-- | src/Fl_win32.cxx | 4 | ||||
| -rw-r--r-- | src/Fl_x.cxx | 4 | ||||
| -rw-r--r-- | src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx | 4 | ||||
| -rw-r--r-- | src/flstring.h | 10 | ||||
| -rw-r--r-- | src/gl_draw.cxx | 6 | ||||
| -rw-r--r-- | src/glut_compatability.cxx | 6 | ||||
| -rw-r--r-- | src/numericsort.c | 8 | ||||
| -rw-r--r-- | src/vsnprintf.c | 6 | ||||
| -rw-r--r-- | src/xutf8/utf8Input.c | 6 | ||||
| -rw-r--r-- | test/device.cxx | 2 | ||||
| -rw-r--r-- | test/fractals.cxx | 4 | ||||
| -rw-r--r-- | test/list_visuals.cxx | 4 | ||||
| -rw-r--r-- | test/threads.cxx | 4 | ||||
| -rw-r--r-- | test/threads.h | 4 | ||||
| -rw-r--r-- | test/utf8.cxx | 6 |
31 files changed, 407 insertions, 133 deletions
diff --git a/FL/Fl_Paged_Device.H b/FL/Fl_Paged_Device.H index 164cf247f..1c33c4e04 100644 --- a/FL/Fl_Paged_Device.H +++ b/FL/Fl_Paged_Device.H @@ -3,7 +3,7 @@ // // Printing support for the Fast Light Tool Kit (FLTK). // -// Copyright 2010 by Bill Spitzak and others. +// Copyright 2010-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 diff --git a/FL/Fl_Table.H b/FL/Fl_Table.H index 62650c3c3..341f878b8 100644 --- a/FL/Fl_Table.H +++ b/FL/Fl_Table.H @@ -966,7 +966,7 @@ public: Fl_Widget::do_callback(); } -#if FL_DOXYGEN +#ifdef FL_DOXYGEN /** The Fl_Widget::when() function is used to set a group of flags, determining when the widget callback is called: @@ -998,7 +998,7 @@ public: void when(Fl_When flags); #endif -#if FL_DOXYGEN +#ifdef FL_DOXYGEN /** Callbacks will be called depending on the setting of Fl_Widget::when(). @@ -3,7 +3,7 @@ // // Mac header file for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2015 by Bill Spitzak and others. +// 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 diff --git a/configh.cmake.in b/configh.cmake.in index 4dff81b49..b0f0cf1c2 100644 --- a/configh.cmake.in +++ b/configh.cmake.in @@ -4,12 +4,12 @@ * * Configuration file for the Fast Light Tool Kit (FLTK). * - * Copyright 1998-2015 by Bill Spitzak and others. + * 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: @@ -274,8 +274,8 @@ /* * FLTK_USE_CAIRO * - * Do we have the cairo library available and want extended cairo use in fltk ? - * will implies to link cairo.lib in all fltk based apps. + * Do we have the cairo library available and want extended cairo use in FLTK ? + * This implies to link cairo.lib in all FLTK based apps. */ #cmakedefine FLTK_USE_CAIRO 1 @@ -333,8 +333,8 @@ * Do we have the dlsym() function and header? */ -#cmakedefine HAVE_DLFCN_H 1 -#cmakedefine HAVE_DLSYM 1 +#cmakedefine01 HAVE_DLFCN_H +#cmakedefine01 HAVE_DLSYM /* * End of "$Id$". diff --git a/configh.in b/configh.in index 9412de3c5..e0ffaffb3 100644 --- a/configh.in +++ b/configh.in @@ -3,12 +3,12 @@ * * Configuration file for the Fast Light Tool Kit (FLTK). * - * Copyright 1998-2015 by Bill Spitzak and others. + * 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: @@ -273,8 +273,8 @@ /* * FLTK_USE_CAIRO * - * Do we have the cairo library available and want extended cairo use in fltk ? - * will implies to link cairo.lib in all fltk based apps. + * Do we have the cairo library available and want extended cairo use in FLTK ? + * This implies to link cairo.lib in all FLTK based apps. */ #undef FLTK_USE_CAIRO @@ -332,8 +332,8 @@ * Do we have the dlsym() function and header? */ -#undef HAVE_DLFCN_H -#undef HAVE_DLSYM +#define HAVE_DLFCN_H 0 +#define HAVE_DLSYM 0 /* * End of "$Id$". diff --git a/fltk-config.in b/fltk-config.in index f6ab782c9..a85c9a6cb 100755 --- a/fltk-config.in +++ b/fltk-config.in @@ -4,7 +4,7 @@ # # FLTK configuration utility. # -# Copyright 2000-2015 by Bill Spitzak and others. +# Copyright 2000-2016 by Bill Spitzak and others. # Original version Copyright 2000 by James Dean Palmer # Adapted by Vincent Penne and Michael Sweet # diff --git a/ide/VisualC2008/config.h b/ide/VisualC2008/config.h index 1c3dccb36..675880c78 100644 --- a/ide/VisualC2008/config.h +++ b/ide/VisualC2008/config.h @@ -3,7 +3,7 @@ *
* Configuration file for the Fast Light Tool Kit (FLTK) for Visual C++.
*
- * Copyright 1998-2010 by Bill Spitzak and others.
+ * 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
@@ -20,17 +20,21 @@ * Where to find files...
*/
-#define FLTK_DATADIR "C:/FLTK"
-#define FLTK_DOCDIR "C:/FLTK/DOC"
+#define FLTK_DATADIR "C:/FLTK"
+#define FLTK_DOCDIR "C:/FLTK/DOC"
/*
* BORDER_WIDTH:
*
* Thickness of FL_UP_BOX and FL_DOWN_BOX. Current 1,2, and 3 are
- * supported. 3 is the historic FLTK look. 2 looks more like Microsoft
- * Windows, KDE, and Qt, and is the default when building for Windows.
- * 1 is a plausible future evolution... Note that this may be simulated
- * at runtime by redefining the boxtypes using Fl::set_boxtype().
+ * supported.
+ *
+ * 3 is the historic FLTK look.
+ * 2 is the default and looks like Microsoft Windows, KDE, and Qt.
+ * 1 is a plausible future evolution...
+ *
+ * Note that this may be simulated at runtime by redefining the boxtypes
+ * using Fl::set_boxtype().
*/
#define BORDER_WIDTH 2
@@ -54,6 +58,14 @@ #define HAVE_GL_GLU_H 1
/*
+ * HAVE_GLXGETPROCADDRESSARB:
+ *
+ * Do you have the OpenGL glXGetProcAddressARB() function?
+ */
+
+/* #undef HAVE_GLXGETPROCADDRESSARB */
+
+/*
* USE_COLORMAP:
*
* Setting this to zero will save a good deal of code (especially for
@@ -63,6 +75,22 @@ #define USE_COLORMAP 1
/*
+ * HAVE_XINERAMA
+ *
+ * Do we have the Xinerama library to support multi-head displays?
+ */
+
+#define HAVE_XINERAMA 0
+
+/*
+ * USE_XFT
+ *
+ * Use the new Xft library to draw anti-aliased text.
+ */
+
+#define USE_XFT 0
+
+/*
* HAVE_XDBE:
*
* Do we have the X double-buffer extension?
@@ -73,13 +101,64 @@ /*
* USE_XDBE:
*
- * Actually try to use the double-buffer extension? Set this to zero
- * disable use of XDBE without breaking the list_visuals program.
+ * Actually try to use the double-buffer extension?
*/
#define USE_XDBE HAVE_XDBE
/*
+ * HAVE_XFIXES:
+ *
+ * Do we have the X fixes extension?
+ */
+
+#define HAVE_XFIXES 0
+
+/*
+ * HAVE_XCURSOR:
+ *
+ * Do we have the X cursor library?
+ */
+
+#define HAVE_XCURSOR 0
+
+/*
+ * HAVE_XRENDER:
+ *
+ * Do we have the X render library?
+ */
+
+#define HAVE_XRENDER 0
+
+/*
+ * HAVE_X11_XREGION_H:
+ *
+ * Do we have the X11 Xregion.h header file ?
+ */
+
+#define HAVE_X11_XREGION_H 0
+
+/*
+ * __APPLE_QUARTZ__:
+ *
+ * All Apple implementations are now based on Quartz and Cocoa,
+ * so this flag should always be on for Mac OS X. This flag has
+ * no meaning on operating systems other than Mac OS X.
+ */
+
+/* #undef __APPLE_QUARTZ__ */
+
+
+/*
+ * USE_X11
+ *
+ * Should we use X11 for the current platform
+ *
+ */
+
+/* #undef USE_X11 */
+
+/*
* HAVE_OVERLAY:
*
* Use the X overlay extension? FLTK will try to use an overlay
@@ -105,7 +184,11 @@ * Byte order of your machine: 1 = big-endian, 0 = little-endian.
*/
+#ifdef __APPLE__
+#include <mac_endianness.h>
+#else
#define WORDS_BIGENDIAN 0
+#endif
/*
* U16, U32, U64:
@@ -116,34 +199,37 @@ #define U16 unsigned short
#define U32 unsigned
-#undef U64
+/* #undef U64 */
/*
- * HAVE_DIRENT_H, HAVE_SYS_NDIR_H, HAVE_SYS_DIR_H, HAVE_NDIR_H, HAVE_SCANDIR:
+ * HAVE_DIRENT_H, HAVE_SYS_NDIR_H, HAVE_SYS_DIR_H, HAVE_NDIR_H,
+ * HAVE_SCANDIR, HAVE_SCANDIR_POSIX:
*
* Where is <dirent.h> (used only by fl_file_chooser and scandir).
*/
-/*#undef HAVE_DIRENT_H */
-/*#undef HAVE_SYS_NDIR_H */
-/*#undef HAVE_SYS_DIR_H */
-/*#undef HAVE_NDIR_H */
-/*#undef HAVE_SCANDIR */
+/* #undef HAVE_DIRENT_H */
+/* #undef HAVE_SYS_NDIR_H */
+/* #undef HAVE_SYS_DIR_H */
+/* #undef HAVE_NDIR_H */
+/* #undef HAVE_SCANDIR */
+/* #undef HAVE_SCANDIR_POSIX */
/*
* Possibly missing sprintf-style functions:
*/
-#undef HAVE_VSNPRINTF
-#undef HAVE_SNPRINTF
+/* #undef HAVE_VSNPRINTF */
+/* #undef HAVE_SNPRINTF */
/*
- * String functions...
+ * String functions and headers...
*/
-#define HAVE_STRCASECMP 1
-/*#undef HAVE_STRLCAT*/
-/*#undef HAVE_STRLCPY*/
+/* #undef HAVE_STRINGS_H */
+#define HAVE_STRCASECMP 1
+/* #undef HAVE_STRLCAT */
+/* #undef HAVE_STRLCPY */
/*
* Do we have POSIX locale support?
@@ -153,20 +239,36 @@ #define HAVE_LOCALECONV 1
/*
- * HAVE_POLL:
+ * HAVE_SYS_SELECT_H:
*
- * Use poll() if we don't have select().
+ * Whether or not select() call has its own header file.
*/
-#define HAVE_POLL 0
+#define HAVE_SYS_SELECT_H 0
+
+/*
+ * HAVE_SYS_STDTYPES_H:
+ *
+ * Whether or not we have the <sys/stdtypes.h> header file.
+ */
+
+/* #undef HAVE_SYS_STDTYPES_H */
+
+/*
+ * USE_POLL:
+ *
+ * Use the poll() call provided on Linux and Irix instead of select()
+ */
+
+#define USE_POLL 0
/*
* Do we have various image libraries?
*/
-#define HAVE_LIBPNG
-#define HAVE_LIBZ
-#define HAVE_LIBJPEG
+#define HAVE_LIBPNG 1
+#define HAVE_LIBZ 1
+#define HAVE_LIBJPEG 1
/*
* Do we have Cairo ?
@@ -179,16 +281,49 @@ * Which header file do we include for libpng?
*/
-#define HAVE_PNG_H
-#undef HAVE_LIBPNG_PNG_H
+#define HAVE_PNG_H 1
+/* #undef HAVE_LIBPNG_PNG_H */
/*
* Do we have the png_xyz() functions?
*/
-#define HAVE_PNG_GET_VALID
-#define HAVE_PNG_SET_TRNS_TO_ALPHA
+#define HAVE_PNG_GET_VALID 1
+#define HAVE_PNG_SET_TRNS_TO_ALPHA 1
+
+/*
+ * Do we have POSIX threading?
+ */
+
+/* #undef HAVE_PTHREAD */
+/* #undef HAVE_PTHREAD_H */
+
+/*
+ * Do we have the ALSA library?
+ */
+
+/* #undef HAVE_ALSA_ASOUNDLIB_H */
+
+/*
+ * Do we have the long long type?
+ */
+
+/* #undef HAVE_LONG_LONG */
+
+#ifdef HAVE_LONG_LONG
+# define FLTK_LLFMT "%lld"
+# define FLTK_LLCAST (long long)
+#else
+# define FLTK_LLFMT "%ld"
+# define FLTK_LLCAST (long)
+#endif /* HAVE_LONG_LONG */
+
+/*
+ * Do we have the dlsym() function and header?
+ */
+#define HAVE_DLFCN_H 0
+#define HAVE_DLSYM 0
/*
* End of "$Id: config.h 4454 2005-07-24 18:41:30Z matt $".
diff --git a/ide/VisualC2010/config.h b/ide/VisualC2010/config.h index 1c3dccb36..675880c78 100644 --- a/ide/VisualC2010/config.h +++ b/ide/VisualC2010/config.h @@ -3,7 +3,7 @@ *
* Configuration file for the Fast Light Tool Kit (FLTK) for Visual C++.
*
- * Copyright 1998-2010 by Bill Spitzak and others.
+ * 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
@@ -20,17 +20,21 @@ * Where to find files...
*/
-#define FLTK_DATADIR "C:/FLTK"
-#define FLTK_DOCDIR "C:/FLTK/DOC"
+#define FLTK_DATADIR "C:/FLTK"
+#define FLTK_DOCDIR "C:/FLTK/DOC"
/*
* BORDER_WIDTH:
*
* Thickness of FL_UP_BOX and FL_DOWN_BOX. Current 1,2, and 3 are
- * supported. 3 is the historic FLTK look. 2 looks more like Microsoft
- * Windows, KDE, and Qt, and is the default when building for Windows.
- * 1 is a plausible future evolution... Note that this may be simulated
- * at runtime by redefining the boxtypes using Fl::set_boxtype().
+ * supported.
+ *
+ * 3 is the historic FLTK look.
+ * 2 is the default and looks like Microsoft Windows, KDE, and Qt.
+ * 1 is a plausible future evolution...
+ *
+ * Note that this may be simulated at runtime by redefining the boxtypes
+ * using Fl::set_boxtype().
*/
#define BORDER_WIDTH 2
@@ -54,6 +58,14 @@ #define HAVE_GL_GLU_H 1
/*
+ * HAVE_GLXGETPROCADDRESSARB:
+ *
+ * Do you have the OpenGL glXGetProcAddressARB() function?
+ */
+
+/* #undef HAVE_GLXGETPROCADDRESSARB */
+
+/*
* USE_COLORMAP:
*
* Setting this to zero will save a good deal of code (especially for
@@ -63,6 +75,22 @@ #define USE_COLORMAP 1
/*
+ * HAVE_XINERAMA
+ *
+ * Do we have the Xinerama library to support multi-head displays?
+ */
+
+#define HAVE_XINERAMA 0
+
+/*
+ * USE_XFT
+ *
+ * Use the new Xft library to draw anti-aliased text.
+ */
+
+#define USE_XFT 0
+
+/*
* HAVE_XDBE:
*
* Do we have the X double-buffer extension?
@@ -73,13 +101,64 @@ /*
* USE_XDBE:
*
- * Actually try to use the double-buffer extension? Set this to zero
- * disable use of XDBE without breaking the list_visuals program.
+ * Actually try to use the double-buffer extension?
*/
#define USE_XDBE HAVE_XDBE
/*
+ * HAVE_XFIXES:
+ *
+ * Do we have the X fixes extension?
+ */
+
+#define HAVE_XFIXES 0
+
+/*
+ * HAVE_XCURSOR:
+ *
+ * Do we have the X cursor library?
+ */
+
+#define HAVE_XCURSOR 0
+
+/*
+ * HAVE_XRENDER:
+ *
+ * Do we have the X render library?
+ */
+
+#define HAVE_XRENDER 0
+
+/*
+ * HAVE_X11_XREGION_H:
+ *
+ * Do we have the X11 Xregion.h header file ?
+ */
+
+#define HAVE_X11_XREGION_H 0
+
+/*
+ * __APPLE_QUARTZ__:
+ *
+ * All Apple implementations are now based on Quartz and Cocoa,
+ * so this flag should always be on for Mac OS X. This flag has
+ * no meaning on operating systems other than Mac OS X.
+ */
+
+/* #undef __APPLE_QUARTZ__ */
+
+
+/*
+ * USE_X11
+ *
+ * Should we use X11 for the current platform
+ *
+ */
+
+/* #undef USE_X11 */
+
+/*
* HAVE_OVERLAY:
*
* Use the X overlay extension? FLTK will try to use an overlay
@@ -105,7 +184,11 @@ * Byte order of your machine: 1 = big-endian, 0 = little-endian.
*/
+#ifdef __APPLE__
+#include <mac_endianness.h>
+#else
#define WORDS_BIGENDIAN 0
+#endif
/*
* U16, U32, U64:
@@ -116,34 +199,37 @@ #define U16 unsigned short
#define U32 unsigned
-#undef U64
+/* #undef U64 */
/*
- * HAVE_DIRENT_H, HAVE_SYS_NDIR_H, HAVE_SYS_DIR_H, HAVE_NDIR_H, HAVE_SCANDIR:
+ * HAVE_DIRENT_H, HAVE_SYS_NDIR_H, HAVE_SYS_DIR_H, HAVE_NDIR_H,
+ * HAVE_SCANDIR, HAVE_SCANDIR_POSIX:
*
* Where is <dirent.h> (used only by fl_file_chooser and scandir).
*/
-/*#undef HAVE_DIRENT_H */
-/*#undef HAVE_SYS_NDIR_H */
-/*#undef HAVE_SYS_DIR_H */
-/*#undef HAVE_NDIR_H */
-/*#undef HAVE_SCANDIR */
+/* #undef HAVE_DIRENT_H */
+/* #undef HAVE_SYS_NDIR_H */
+/* #undef HAVE_SYS_DIR_H */
+/* #undef HAVE_NDIR_H */
+/* #undef HAVE_SCANDIR */
+/* #undef HAVE_SCANDIR_POSIX */
/*
* Possibly missing sprintf-style functions:
*/
-#undef HAVE_VSNPRINTF
-#undef HAVE_SNPRINTF
+/* #undef HAVE_VSNPRINTF */
+/* #undef HAVE_SNPRINTF */
/*
- * String functions...
+ * String functions and headers...
*/
-#define HAVE_STRCASECMP 1
-/*#undef HAVE_STRLCAT*/
-/*#undef HAVE_STRLCPY*/
+/* #undef HAVE_STRINGS_H */
+#define HAVE_STRCASECMP 1
+/* #undef HAVE_STRLCAT */
+/* #undef HAVE_STRLCPY */
/*
* Do we have POSIX locale support?
@@ -153,20 +239,36 @@ #define HAVE_LOCALECONV 1
/*
- * HAVE_POLL:
+ * HAVE_SYS_SELECT_H:
*
- * Use poll() if we don't have select().
+ * Whether or not select() call has its own header file.
*/
-#define HAVE_POLL 0
+#define HAVE_SYS_SELECT_H 0
+
+/*
+ * HAVE_SYS_STDTYPES_H:
+ *
+ * Whether or not we have the <sys/stdtypes.h> header file.
+ */
+
+/* #undef HAVE_SYS_STDTYPES_H */
+
+/*
+ * USE_POLL:
+ *
+ * Use the poll() call provided on Linux and Irix instead of select()
+ */
+
+#define USE_POLL 0
/*
* Do we have various image libraries?
*/
-#define HAVE_LIBPNG
-#define HAVE_LIBZ
-#define HAVE_LIBJPEG
+#define HAVE_LIBPNG 1
+#define HAVE_LIBZ 1
+#define HAVE_LIBJPEG 1
/*
* Do we have Cairo ?
@@ -179,16 +281,49 @@ * Which header file do we include for libpng?
*/
-#define HAVE_PNG_H
-#undef HAVE_LIBPNG_PNG_H
+#define HAVE_PNG_H 1
+/* #undef HAVE_LIBPNG_PNG_H */
/*
* Do we have the png_xyz() functions?
*/
-#define HAVE_PNG_GET_VALID
-#define HAVE_PNG_SET_TRNS_TO_ALPHA
+#define HAVE_PNG_GET_VALID 1
+#define HAVE_PNG_SET_TRNS_TO_ALPHA 1
+
+/*
+ * Do we have POSIX threading?
+ */
+
+/* #undef HAVE_PTHREAD */
+/* #undef HAVE_PTHREAD_H */
+
+/*
+ * Do we have the ALSA library?
+ */
+
+/* #undef HAVE_ALSA_ASOUNDLIB_H */
+
+/*
+ * Do we have the long long type?
+ */
+
+/* #undef HAVE_LONG_LONG */
+
+#ifdef HAVE_LONG_LONG
+# define FLTK_LLFMT "%lld"
+# define FLTK_LLCAST (long long)
+#else
+# define FLTK_LLFMT "%ld"
+# define FLTK_LLCAST (long)
+#endif /* HAVE_LONG_LONG */
+
+/*
+ * Do we have the dlsym() function and header?
+ */
+#define HAVE_DLFCN_H 0
+#define HAVE_DLSYM 0
/*
* End of "$Id: config.h 4454 2005-07-24 18:41:30Z matt $".
diff --git a/ide/VisualC6/config.h b/ide/VisualC6/config.h index 2034e80f7..f71e8ab52 100644 --- a/ide/VisualC6/config.h +++ b/ide/VisualC6/config.h @@ -1,8 +1,8 @@ /* * "$Id: ide_visualc.cxx 7586 2010-05-03 20:10:13Z ianmacarthur $" */ -#define FLTK_DATADIR "C:/FLTK" -#define FLTK_DOCDIR "C:/FLTK/DOC" +#define FLTK_DATADIR "C:/FLTK" +#define FLTK_DOCDIR "C:/FLTK/DOC" #define BORDER_WIDTH 2 #define HAVE_GL 1 #define HAVE_GL_GLU_H 1 @@ -15,8 +15,8 @@ #define U16 unsigned short #define U32 unsigned #undef U64 -#define HAVE_VSNPRINTF 0 -#define HAVE_SNPRINTF 0 +#undef HAVE_VSNPRINTF +#undef HAVE_SNPRINTF #define HAVE_STRCASECMP 1 #define HAVE_LOCALE_H 1 #define HAVE_LOCALECONV 1 diff --git a/src/Fl_Copy_Surface.cxx b/src/Fl_Copy_Surface.cxx index 716aacfdc..08f494371 100644 --- a/src/Fl_Copy_Surface.cxx +++ b/src/Fl_Copy_Surface.cxx @@ -3,7 +3,7 @@ // // Copy-to-clipboard code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2014 by Bill Spitzak and others. +// 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 diff --git a/src/Fl_Image_Surface.cxx b/src/Fl_Image_Surface.cxx index 48b97ccfd..6de588063 100644 --- a/src/Fl_Image_Surface.cxx +++ b/src/Fl_Image_Surface.cxx @@ -3,7 +3,7 @@ // // Draw-to-image code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2014 by Bill Spitzak and others. +// 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 diff --git a/src/Fl_Input.cxx b/src/Fl_Input.cxx index ae46e7797..1a6c872c9 100644 --- a/src/Fl_Input.cxx +++ b/src/Fl_Input.cxx @@ -3,7 +3,7 @@ // // Input widget for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2011 by Bill Spitzak and others. +// 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 @@ -730,7 +730,7 @@ int Fl_Input::handle(int event) { // fall through: case FL_DND_DRAG: //int p = mouse_position(X, Y, W, H); -#if DND_OUT_XXXX +#ifdef DND_OUT_XXXX if (Fl::focus()==this && (p>=dnd_save_position && p<=dnd_save_mark || p>=dnd_save_mark && p<=dnd_save_position)) { position(dnd_save_position, dnd_save_mark); @@ -746,7 +746,7 @@ int Fl_Input::handle(int event) { case FL_DND_LEAVE: position(dnd_save_position, dnd_save_mark); -#if DND_OUT_XXXX +#ifdef DND_OUT_XXXX if (!focused()) #endif if (dnd_save_focus && dnd_save_focus != this) { diff --git a/src/Fl_Paged_Device.cxx b/src/Fl_Paged_Device.cxx index 0147976d5..e4c27e925 100644 --- a/src/Fl_Paged_Device.cxx +++ b/src/Fl_Paged_Device.cxx @@ -3,7 +3,7 @@ // // implementation of Fl_Paged_Device class for the Fast Light Tool Kit (FLTK). // -// Copyright 2010-2014 by Bill Spitzak and others. +// Copyright 2010-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 diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index 534323965..46c7ac66a 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -3,7 +3,7 @@ // // MacOS-Cocoa specific code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2015 by Bill Spitzak and others. +// 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 diff --git a/src/Fl_grab.cxx b/src/Fl_grab.cxx index 35d69205a..5778607ab 100644 --- a/src/Fl_grab.cxx +++ b/src/Fl_grab.cxx @@ -3,7 +3,7 @@ // // Grab/release code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2010 by Bill Spitzak and others. +// 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 @@ -47,7 +47,7 @@ extern void *fl_capture; #endif void Fl::grab(Fl_Window* win) { -#if USE_X11 +#ifdef USE_X11 Fl_Window *fullscreen_win = NULL; for (Fl_Window *W = Fl::first_window(); W; W = Fl::next_window(W)) { if (W->fullscreen_active()) { diff --git a/src/Fl_lock.cxx b/src/Fl_lock.cxx index fc6daf8b9..0ec2cf0a5 100644 --- a/src/Fl_lock.cxx +++ b/src/Fl_lock.cxx @@ -3,7 +3,7 @@ // // Multi-threading support code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2015 by Bill Spitzak and others. +// 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 @@ -255,7 +255,7 @@ void Fl::awake(void* msg) { //////////////////////////////////////////////////////////////// // POSIX threading... -#elif HAVE_PTHREAD +#elif defined(HAVE_PTHREAD) # include <unistd.h> # include <fcntl.h> # include <pthread.h> diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx index 10e8141da..f15fd4c09 100644 --- a/src/Fl_win32.cxx +++ b/src/Fl_win32.cxx @@ -3,7 +3,7 @@ // // WIN32-specific code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2015 by Bill Spitzak and others. +// 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 @@ -48,7 +48,7 @@ // that makes fltk use easier as only fltk libs are now requested // This idea could be extended to fltk libs themselves, // implementer should then care about DLL linkage flags ... -# if (_MSC_VER>=1310) +# if defined(_MSC_VER) && (_MSC_VER>=1310) # pragma comment (lib, "comctl32.lib") # endif #endif diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx index e45405e70..fde1d8536 100644 --- a/src/Fl_x.cxx +++ b/src/Fl_x.cxx @@ -3,7 +3,7 @@ // // X specific code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2012 by Bill Spitzak and others. +// 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 @@ -1869,7 +1869,7 @@ fprintf(stderr,"\n");*/ case 149: keysym = FL_Menu; break; } # endif -# if BACKSPACE_HACK +# ifdef BACKSPACE_HACK // Attempt to fix keyboards that send "delete" for the key in the // upper-right corner of the main keyboard. But it appears that // very few of these remain? diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx index 33c8d3379..019c0d57f 100644 --- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx +++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx @@ -3,7 +3,7 @@ // // More font utilities for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2011 by Bill Spitzak and others. +// 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 @@ -39,6 +39,8 @@ // of the font name array. #define ENDOFBUFFER 127 // sizeof(Fl_Font.fontname)-1 +#define USE_OVERLAY 0 + // turn a stored font name in "fltk format" into a pretty name: const char* Fl::get_font_name(Fl_Font fnum, int* ap) { Fl_Fontdesc *f = fl_fonts + fnum; diff --git a/src/flstring.h b/src/flstring.h index c575c2069..7c5d2dea6 100644 --- a/src/flstring.h +++ b/src/flstring.h @@ -3,7 +3,7 @@ * * Common string header file for the Fast Light Tool Kit (FLTK). * - * Copyright 1998-2010 by Bill Spitzak and others. + * 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 @@ -60,12 +60,12 @@ extern "C" { # endif /* __cplusplus */ FL_EXPORT extern int fl_snprintf(char *, size_t, const char *, ...); -# if !HAVE_SNPRINTF +# ifndef HAVE_SNPRINTF # define snprintf fl_snprintf # endif /* !HAVE_SNPRINTF */ FL_EXPORT extern int fl_vsnprintf(char *, size_t, const char *, va_list ap); -# if !HAVE_VSNPRINTF +# ifndef HAVE_VSNPRINTF # define vsnprintf fl_vsnprintf # endif /* !HAVE_VSNPRINTF */ @@ -75,12 +75,12 @@ FL_EXPORT extern int fl_vsnprintf(char *, size_t, const char *, va_list ap); */ FL_EXPORT extern size_t fl_strlcat(char *, const char *, size_t); -# if !HAVE_STRLCAT +# ifndef HAVE_STRLCAT # define strlcat fl_strlcat # endif /* !HAVE_STRLCAT */ FL_EXPORT extern size_t fl_strlcpy(char *, const char *, size_t); -# if !HAVE_STRLCPY +# ifndef HAVE_STRLCPY # define strlcpy fl_strlcpy # endif /* !HAVE_STRLCPY */ diff --git a/src/gl_draw.cxx b/src/gl_draw.cxx index 377914c2c..2f91143d8 100644 --- a/src/gl_draw.cxx +++ b/src/gl_draw.cxx @@ -3,7 +3,7 @@ // // OpenGL drawing support routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2011 by Bill Spitzak and others. +// 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 @@ -179,7 +179,7 @@ void gl_remove_displaylist_fonts() #endif } -#if __APPLE__ +#ifdef __APPLE__ static void gl_draw_textures(const char* str, int n); #endif @@ -337,7 +337,7 @@ void gl_draw_image(const uchar* b, int x, int y, int w, int h, int d, int ld) { glDrawPixels(w,h,d<4?GL_RGB:GL_RGBA,GL_UNSIGNED_BYTE,(const ulong*)b); } -#if __APPLE__ || defined(FL_DOXYGEN) +#if defined(__APPLE__) || defined(FL_DOXYGEN) /* Text drawing to an OpenGL scene under Mac OS X is implemented using textures, as recommended by Apple. This allows to use any font at any size, and any Unicode character. Some old Apple hardware doesn't implement the required GL_EXT_texture_rectangle extension. diff --git a/src/glut_compatability.cxx b/src/glut_compatability.cxx index 9b1f9e6dd..1031b94ae 100644 --- a/src/glut_compatability.cxx +++ b/src/glut_compatability.cxx @@ -3,7 +3,7 @@ // // GLUT emulation routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2010 by Bill Spitzak and others. +// 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 @@ -34,7 +34,7 @@ # define GLX_GLXEXT_LEGACY # include <GL/glx.h> # endif // HAVE_GLXGETPROCADDRESSARB -# ifdef HAVE_DLFCN_H +# if HAVE_DLFCN_H # include <dlfcn.h> # endif // HAVE_DLFCN_H # define MAXWINDOWS 32 @@ -443,7 +443,7 @@ GLUTproc glutGetProcAddress(const char *procName) { # ifdef WIN32 return (GLUTproc)wglGetProcAddress((LPCSTR)procName); -# elif defined(HAVE_DLSYM) && defined(HAVE_DLFCN_H) +# elif (HAVE_DLSYM && HAVE_DLFCN_H) char symbol[1024]; snprintf(symbol, sizeof(symbol), "_%s", procName); diff --git a/src/numericsort.c b/src/numericsort.c index 8ffe94aec..9c4297347 100644 --- a/src/numericsort.c +++ b/src/numericsort.c @@ -3,7 +3,7 @@ * * Numeric sorting routine for the Fast Light Tool Kit (FLTK). * - * Copyright 1998-2010 by Bill Spitzak and others. + * 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 @@ -29,13 +29,13 @@ # include <dirent.h> # else # define dirent direct -# if HAVE_SYS_NDIR_H +# ifdef HAVE_SYS_NDIR_H # include <sys/ndir.h> # endif /* HAVE_SYS_NDIR_H */ -# if HAVE_SYS_DIR_H +# ifdef HAVE_SYS_DIR_H # include <sys/dir.h> # endif /* HAVE_SYS_DIR_H */ -# if HAVE_NDIR_H +# ifdef HAVE_NDIR_H # include <ndir.h> # endif /* HAVE_NDIR_H */ # endif /* HAVE_DIRENT_H */ diff --git a/src/vsnprintf.c b/src/vsnprintf.c index eb039f0b0..0fae17ca5 100644 --- a/src/vsnprintf.c +++ b/src/vsnprintf.c @@ -128,7 +128,7 @@ int fl_vsnprintf(char* buffer, size_t bufsize, const char* format, va_list ap) { case 'e' : case 'f' : case 'g' : - if ((width + 2) > sizeof(temp)) break; + if ((width + 2) > (int)sizeof(temp)) break; sprintf(temp, tformat, va_arg(ap, double)); @@ -153,7 +153,7 @@ int fl_vsnprintf(char* buffer, size_t bufsize, const char* format, va_list ap) { case 'o' : case 'u' : case 'x' : - if ((width + 2) > sizeof(temp)) break; + if ((width + 2) > (int)sizeof(temp)) break; #ifdef HAVE_LONG_LONG if (size == 'L') @@ -179,7 +179,7 @@ int fl_vsnprintf(char* buffer, size_t bufsize, const char* format, va_list ap) { break; case 'p' : /* Pointer value */ - if ((width + 2) > sizeof(temp)) break; + if ((width + 2) > (int)sizeof(temp)) break; sprintf(temp, tformat, va_arg(ap, void *)); diff --git a/src/xutf8/utf8Input.c b/src/xutf8/utf8Input.c index 7e21e3f55..392483c52 100644 --- a/src/xutf8/utf8Input.c +++ b/src/xutf8/utf8Input.c @@ -28,7 +28,7 @@ #include <string.h> #include <stdlib.h> -#if HAVE_LIBC_ICONV +#ifdef HAVE_LIBC_ICONV #include <iconv.h> #endif /* @@ -60,7 +60,7 @@ typedef struct { static int XConvertEucTwToUtf8(char* buffer_return, int len) { /* FIXME */ -#if HAVE_LIBC_ICONV +#ifdef HAVE_LIBC_ICONV iconv_t cd; int cdl; #else @@ -73,7 +73,7 @@ XConvertEucTwToUtf8(char* buffer_return, int len) { /*b = */ buf = (char*) malloc((unsigned)len); memcpy(buf, buffer_return, (unsigned) len); -#if HAVE_LIBC_ICONV +#ifdef HAVE_LIBC_ICONV l = cdl = len; cd = iconv_open("EUC-TW", "UTF-8"); iconv(cd, &b, &len, &buffer_return, &cdl); diff --git a/test/device.cxx b/test/device.cxx index 971e4eee7..a1c83a53f 100644 --- a/test/device.cxx +++ b/test/device.cxx @@ -3,7 +3,7 @@ // // Device test program for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2011 by Roman Kantor and others. +// Copyright 1998-2016 by Roman Kantor 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 diff --git a/test/fractals.cxx b/test/fractals.cxx index 34d3ef92e..5d3f1def3 100644 --- a/test/fractals.cxx +++ b/test/fractals.cxx @@ -7,7 +7,7 @@ // demonstrate how to add FLTK controls to a GLUT program. The GLUT // code is unchanged except for the end (search for FLTK to find changes). // -// Copyright 1998-2010 by Bill Spitzak and others. +// 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 @@ -25,7 +25,7 @@ #include <FL/Fl.H> #include <FL/fl_message.H> int main(int, char**) { - fl_alert("This demo does not work without GL and GLU (%d)"); + fl_alert("This demo does not work without GL and GLU"); return 1; } #else diff --git a/test/list_visuals.cxx b/test/list_visuals.cxx index a9ffdfbfe..42bc36f38 100644 --- a/test/list_visuals.cxx +++ b/test/list_visuals.cxx @@ -11,7 +11,7 @@ // This file may be #included in another program to make a function to // call to list the visuals. Fl.H must be included first to indicate this. // -// Copyright 1998-2010 by Bill Spitzak and others. +// 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 @@ -37,6 +37,8 @@ int main(int, char**) { #include <config.h> +#define HAVE_MULTIBUF 0 + #ifndef Fl_H #include <X11/Xlib.h> diff --git a/test/threads.cxx b/test/threads.cxx index c07b2ea9f..522aa0a9f 100644 --- a/test/threads.cxx +++ b/test/threads.cxx @@ -3,7 +3,7 @@ // // Threading example program for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2010 by Bill Spitzak and others. +// 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 @@ -18,7 +18,7 @@ #include <config.h> -#if HAVE_PTHREAD || defined(WIN32) +#if defined(HAVE_PTHREAD) || defined(WIN32) # include <FL/Fl.H> # include <FL/Fl_Double_Window.H> # include <FL/Fl_Browser.H> diff --git a/test/threads.h b/test/threads.h index 73191459b..d81f1e6a6 100644 --- a/test/threads.h +++ b/test/threads.h @@ -3,7 +3,7 @@ // // Simple threading API for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2010 by Bill Spitzak and others. +// 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 @@ -34,7 +34,7 @@ #ifndef Threads_H # define Threads_H -# if HAVE_PTHREAD_H +# ifdef HAVE_PTHREAD_H // Use POSIX threading... # include <pthread.h> diff --git a/test/utf8.cxx b/test/utf8.cxx index 038ebf1f8..b2c40fcb9 100644 --- a/test/utf8.cxx +++ b/test/utf8.cxx @@ -3,7 +3,7 @@ // // UTF-8 test program for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2010 by Bill Spitzak and others. +// 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 @@ -421,7 +421,7 @@ int make_font_chooser(void) // font_count = Fl::set_fonts("*"); #ifdef WIN32 font_count = Fl::set_fonts("*"); -#elif __APPLE__ +#elif defined(__APPLE__) font_count = Fl::set_fonts("*"); #else // Load the systems available fonts - ask for everything that claims to be @@ -582,7 +582,7 @@ int main(int argc, char** argv) Fl::set_font(extra_font, #ifdef WIN32 " Arial Unicode MS" -#elif __APPLE__ +#elif defined(__APPLE__) "Monaco" #else "-*-*-*-*-*-*-*-*-*-*-*-*-iso10646-1" |
