Declare Fl_Scroll::bbox() and Fl_Scroll::recalc_scrollbars() 'const'.
These methods don't change the Fl_Scroll widget.
Use Fl_Scroll::recalc_scrollbars() in Fl_Scroll::bbox() to simplify
the code and to avoid code duplication.
bbox() can now be called at any time and returns the correct values,
no matter if draw() has been called before.
The intention is to make it more convenient for developers to add
one or more test programs for their tests by editing only one
variable (extra_tests).
lib/README.txt: clarify where built libraries are located
documentation/src/basics.dox: clarify (C++) compiler command usage
and improve documentation of the fltk-config script
There's not much we can do if we find unknown data in the main
parser loop. The best we can do is terminating.
If we find a GIF trailer (0x3b) this means logical end of file.
If we get there in the main loop the GIF file is empty (no image).
This behavior is consistent with many other image viewers including
browsers (Firefox and Chrome).
This is part 1 and a prerequisite for the fix of issue #271.
It enables the user of this internal class (Fl_{BMP|GIF}_Image)
to test for read errors and EOF (end of file) while reading.
The method used to read data from memory got an optional third
argument 'const long datasize = -1)' to limit the size of the
memory block of data provided to the image reader. Default is -1
which means "unlimited" (backwards compatibility).
Using only two arguments (w/o size limit) is deprecated and should
only be done if the data size is not available.
src/Fl_Native_File_Chooser_WIN32.cxx:331:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
331 | while ( s=strchr(s,'\\') ) *s = '/';
| ~^~~~~~~~~~~~~~~
src/Fl_Native_File_Chooser_WIN32.cxx:336:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
336 | while ( s=strchr(s,'/') ) *s = '\\';
| ~^~~~~~~~~~~~~~
I compiled with `-Wextra-semi -Werror=extra-semi` on Linux and Windows
(cross-compiled on Linux) and removed all "extra semicolon" warnings
I could find. I didn't check on macOS (yet).
Note: Linux configured with and w/o Pango but not w/o Xft. Compilation
with other options (e.g. Cairo) might still emit such warnings.
CMake/compatibility.cmake: define functions and macros to be used
if a particular CMake functionality requires a higher CMake version
than FLTK's minimum CMake version, see 'cmake_minimum_required(...)'
in the root CMakeLists.txt.
Note: target_link_directories() is available since CMake 3.13
Add CMake test for PTHREAD_MUTEX_RECURSIVE
Add autoconf/configure compile test for PTHREAD_MUTEX_RECURSIVE
Replace "#ifdef PTHREAD_MUTEX_RECURSIVE"
with "#ifdef HAVE_PTHREAD_MUTEX_RECURSIVE"
and define HAVE_PTHREAD_MUTEX_RECURSIVE in config.h