Format code according to the CMP, add instructions on how to copy
the code to the fluid tutorial, and update the tutorial with the
current code of test/CubeView.h and test/CubeView.cxx.
macOS Big Sur 11.3 introduced a new "security feature" such that
app bundles created from existing bundle templates in downloaded
files (tar distibutions, expanded) could no longer be executed
without unsetting the "quarantine" attribute. This commit fixes
this by creating all bundles from scratch.
Known *workaround* for older tarballs and snapshots:
$ xattr -d -r com.apple.quarantine xxx.app
There's no need to blow up the source file by including the bitmap
file literally in the source code. Use '#include' instead.
Another benefit is that the original source file is referenced in
the source code so it is not accidentally removed.
Actually we don't know about some newer MSVC versions, but current
version MSVC 2019 works fine w/o defining round(). If other MSVC
versions need this as well we can change the version test or add
a compiler feature test to CMake (configure not required).
Apple clang version 12.0.5 (clang-1205.0.22.9)
Target: arm64-apple-darwin20.4.0
Warning appeared after upgrade to Xcode 12.5 in several files,
example:
In file included from Fl_Scroll.cxx:19:
../FL/Fl_Scroll.H:102:17: warning: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Wnon-c-typedef-for-linkage]
typedef struct {
^
ScrollInfo
../FL/Fl_Scroll.H:104:5: note: type is not C-compatible due to this member declaration
typedef struct { int x,y,w,h; } Fl_Region_XYWH;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../FL/Fl_Scroll.H:128:5: note: type is given name 'ScrollInfo' for linkage purposes by this typedef declaration
} ScrollInfo;
^
The font size is set to the value necessary for the GL scene before
computing the string width.
Virtual Fl_Gl_Window_Driver::effective_size() becomes unnecessary.
Some of the output variables had not been documented, and the "new"
variable for FLTK include directories is 'FLTK_INCLUDE_DIRS' (plural)
rather than 'FLTK_INCLUDE_DIR'.
FLTK_INCLUDE_DIR is now also set for compatibility with FindFLTK.cmake
supplied by CMake.
Since FL/platform.H defines USE_X11 for the X11 platform, it's better to target
the X11 platform by
#include <FL/platform.H>
#if USE_X11
rather than by
#if !defined(_WIN32) && !defined(__APPLE__) && !defined(__ANDROID__)
that would have to grow with future platforms.
PR #203 "Multithread fix for PNG loading" includes a suggested fix
that moves the variable fp to the Fl_PNG_Image structure.
This commit fixes the threading issue by allocating the variable fp
with new, avoiding the [-Wclobbered] warning w/o using a static var.
The same issue is now also fixed in Fl_JPEG_Image.
Albrecht caught a problem with my strncat use (see comments for 12d8da9c).
I noticed we have fl_strlcpy() and fl_strlcat() which is what was really
needed here.