From 1186b4e255832ae322e4dd2778318ebcb4568204 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Fri, 7 Mar 2025 20:26:03 +0100 Subject: 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 &)' --- FL/filename.H | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) (limited to 'FL') 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 + +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) */ -- cgit v1.2.3