From: Arnaud Giersch Date: Wed, 25 Oct 2017 13:26:49 +0000 (+0200) Subject: Kill now unused xbt_dirname(). X-Git-Tag: v3.18~397^2~7 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/cd4198031d4f1c3c98cc0d21bcac25d1eb363259?ds=sidebyside Kill now unused xbt_dirname(). --- diff --git a/ChangeLog b/ChangeLog index 89a432dc16..2ca220f5ed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,7 +11,7 @@ SimGrid (3.18) NOT RELEASED YET (target: December 24 2017) XBT - Define class simgrid::xbt::Path to manage file names. - Removed unused functions: - - xbt/file.h: xbt_getline() + - xbt/file.h: xbt_dirname(), xbt_getline() SimGrid (3.17) Released October 8 2017 diff --git a/include/xbt/file.h b/include/xbt/file.h index b22a004e46..3d588ba4df 100644 --- a/include/xbt/file.h +++ b/include/xbt/file.h @@ -14,12 +14,10 @@ SG_BEGIN_DECL() /** @defgroup XBT_file File manipulation functions * @ingroup XBT_misc * - * This module redefine some quite classical functions such as xbt_dirname() or xbt_basename() for the platforms - * lacking them. + * This module redefine some quite classical functions such as xbt_basename() for the platforms lacking them. * @{ */ -/* Our own implementation of dirname, that does not exist on windows */ -XBT_PUBLIC(char *) xbt_dirname(const char *path); +/* Our own implementation of basename, that does not exist on windows */ XBT_PUBLIC(char *) xbt_basename(const char *path); /**@}*/ diff --git a/src/xbt/xbt_os_file.cpp b/src/xbt/xbt_os_file.cpp index d3e87dfd16..1e1e9f82e8 100644 --- a/src/xbt/xbt_os_file.cpp +++ b/src/xbt/xbt_os_file.cpp @@ -18,15 +18,6 @@ #include #include /* POSIX dirname */ -/** @brief Returns the directory component of a path (reimplementation of POSIX dirname) - * - * The argument is never modified, and the returned value must be freed after use. - */ -char *xbt_dirname(const char *path) -{ - return xbt_strdup(simgrid::xbt::Path(path).getDirname().c_str()); -} - /** @brief Returns the file component of a path (reimplementation of POSIX basename) * * The argument is never modified, and the returned value must be freed after use.