summaryrefslogtreecommitdiff
path: root/src/scandir_posix.c
AgeCommit message (Collapse)Author
2021-12-18Generate FL/fl_config.h rather than FL/abi-version.hAlbrecht Schlosser
... as discussed in fltk.coredev in thread "RFC: introduce public config header <FL/fl_config.h>", see: https://groups.google.com/g/fltkcoredev/c/xLCs1AIXMVo/m/MHZpQggzAQAJ - Rename abi-version.h to fl_config.h, rename input files, update dependencies, .gitignore, CMake, configure and Makefiles. - Include Cairo options in FL/fl_config.h - Rename FLTK_USE_CAIRO to FLTK_HAVE_CAIROEXT for consistency. - Include <FL/fl_config.h> in config.h and wherever necessary, fix include order (move FL/Fl.H to the top) and more. - Move USE_X11 to fl_config.h and rename to FLTK_USE_X11 - Do not include <config.h> in Cairo demo program which is no longer required in Cairo programs since FLTK 1.4.0
2020-11-22Fix issue #162Greg Ercolano
2020-08-22Fix .clang-format and some whitespace errorsAlbrecht Schlosser
.clang-format: UseTab: ForIndentation -> Never Update fluid generated files
2020-07-14Extra fool-proofing, and suggested use of strerror_r()Greg Ercolano
strerror_r() sounds like the better thing to use, but if you read the man page carefully, there are pitfalls of competing GNU vs POSIX versions of the same function, with different return values. GNU version returns a pointer to the error string, which may or may not use the error string supplied to use. Makes no sense. Why not use the buffer the user prepared? Makes returning errors hard. One thing GNU does underline is the string is always NUL terminated. POSIX version doesn't return a string at all, it returns an int, making handling the GNU cases impossible. POSIX /doesn't/ say one way or the other about the string being NUL terminated, so you have to make sure when you use it. I trawled the net, seems this is a big annoying issue. For now, leaving the code with strerror(), but we should change it.
2020-07-14First pass at fixing issue 99Greg Ercolano
A lot of code touched because low level functions needed to pass up error messages reliably, and this had to propagate up the entire driver hierarchy. Tested OK *in English* on: > Linux > OSX 10.10.x > Windows VS2017 > Windows mingw64 I have no way to test on Android, but it might work. TODO: Needs testing in other languages to verify proper UTF8 error messages, esp. with Windows VS, due to complexities with FormatMessage() -- see get_ms_errmsg()
2020-07-06Remove $Id$ tags, update URL's, and moreAlbrecht Schlosser
- remove obsolete svn '$Id$' tags from all source files - update .fl files and generated files accordingly - replace 'http://www.fltk.org' URL's with 'https://...' - replace bug report URL 'str.php' with 'bugs.php' - remove trailing whitespace - fix other whitespace errors flagged by Git - add and/or fix missing or wrong standard headers - convert tabs to spaces in all source files The only relevant code changes are in the fluid/ folder where some .fl files and other source files were used to generate the '$Id' headers and footers.
2016-11-12Avoid "empty translation unit" compiler warning.Albrecht Schlosser
gcc "warning: ISO C forbids an empty translation unit [-Wpedantic]" git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12107 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-16Fix C++ comments in C source files and headers. Albrecht Schlosser
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11623 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-14Set correct preprocessor condition for when the content of file ↵Manolo Gouy
src/scandir_posix.c is necessary. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11603 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-07Rewrite filename_list.cxx under the driver model.Manolo Gouy
One more platform-dependent type is necessary: struct dirent Create a new header file, FL/platform_types.h, to define all types whose definition is platform-dependent. This file is for C because it is included by scandir_XXX.c git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11550 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-03-06This check-in brings in the simplified version ofIan MacArthur
Michael Baeuerle's patch to restore scandir like operation on *nix like hosts that do not provide a native scandir implementation, notably SunOS and some others. STR #2931 refers... These changes are tested to have no effect on OSX, Win32 or Linux systems, and indeed on any system that has a working scandir implementation that configure can detect. Michael has released these changes to the fltk project, and they are licensed under our usual conditons. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9832 ea41ed52-d2ee-0310-a9c1-e6b18d33e121