diff options
| author | Matthias Melcher <github@matthiasm.com> | 2025-03-07 20:26:03 +0100 |
|---|---|---|
| committer | Matthias Melcher <github@matthiasm.com> | 2025-03-07 20:26:03 +0100 |
| commit | 1186b4e255832ae322e4dd2778318ebcb4568204 (patch) | |
| tree | 34ec0d5edde3c1f1c5c51f0f5083b7f5d85c708b /FL/filename.H | |
| parent | 70e5dc23aee51fc2fe67c73390d808e01ccfbfa6 (diff) | |
Making fl_filename_... public for std::string.
New functions append "_str" to the function name to
avoid ambiguities when calling them. So
'char *fl_filename_name(const char *)' becomes
'std::string fl_filename_name_str(const std::string &)'
Diffstat (limited to 'FL/filename.H')
| -rw-r--r-- | FL/filename.H | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/FL/filename.H b/FL/filename.H index 92bf96f73..74ef1c91c 100644 --- a/FL/filename.H +++ b/FL/filename.H @@ -72,20 +72,18 @@ FL_EXPORT int fl_filename_isdir(const char *name); FL_EXPORT int fl_filename_absolute(char *to, int tolen, const char *from, const char *cwd); FL_EXPORT int fl_filename_relative(char *to, int tolen, const char *from, const char *cwd); - -// FIXME: We can't do this in 1.4.x - enable this block in 1.5 or higher. -// See fluid/fluid_filename.{h|cxx} for an implementation using Fl_String. - -// FL_EXPORT std::string fl_filename_name(const std::string &filename); -// FL_EXPORT std::string fl_filename_path(const std::string &filename); -// FL_EXPORT std::string fl_filename_ext(const std::string &filename); -// FL_EXPORT std::string fl_filename_setext(const std::string &filename, const std::string &new_extension); -// FL_EXPORT std::string fl_filename_expand(const std::string &from); -// FL_EXPORT std::string fl_filename_absolute(const std::string &from); -// FL_EXPORT std::string fl_filename_absolute(const std::string &from, const std::string &base); -// FL_EXPORT std::string fl_filename_relative(const std::string &from); -// FL_EXPORT std::string fl_filename_relative(const std::string &from, const std::string &base); -// FL_EXPORT std::string fl_getcwd(); +#include <string> + +FL_EXPORT std::string fl_filename_name_str(const std::string &filename); +FL_EXPORT std::string fl_filename_path_str(const std::string &filename); +FL_EXPORT std::string fl_filename_ext_str(const std::string &filename); +FL_EXPORT std::string fl_filename_setext_str(const std::string &filename, const std::string &new_extension); +FL_EXPORT std::string fl_filename_expand_str(const std::string &from); +FL_EXPORT std::string fl_filename_absolute_str(const std::string &from); +FL_EXPORT std::string fl_filename_absolute_str(const std::string &from, const std::string &base); +FL_EXPORT std::string fl_filename_relative_str(const std::string &from); +FL_EXPORT std::string fl_filename_relative_str(const std::string &from, const std::string &base); +FL_EXPORT std::string fl_getcwd_str(); # endif /* defined(__cplusplus) */ |
