From: Arnaud Giersch Date: Wed, 25 Oct 2017 19:28:06 +0000 (+0200) Subject: Kill now unused xbt_basename(). X-Git-Tag: v3.18~397^2~3 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/47f0168a8d8b7b257528283ca0e20e3b27d1ea4b?hp=bd40b9e8ea0ee4905025eef6ab5767f7fa25bba8 Kill now unused xbt_basename(). --- diff --git a/ChangeLog b/ChangeLog index 2ca220f5ed..3c8d633b10 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_dirname(), xbt_getline() + - xbt/file.h: xbt_basename(), xbt_dirname(), xbt_getline() SimGrid (3.17) Released October 8 2017 diff --git a/include/xbt.h b/include/xbt.h index 9d5510ec9f..9dd4cafead 100644 --- a/include/xbt.h +++ b/include/xbt.h @@ -1,6 +1,6 @@ /* xbt.h - Public interface to the xbt (SimGrid's toolbox) */ -/* Copyright (c) 2004-2014. The SimGrid Team. +/* Copyright (c) 2004-2017. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -12,7 +12,6 @@ #include #include #include -#include #include #include diff --git a/include/xbt/file.h b/include/xbt/file.h deleted file mode 100644 index 3d588ba4df..0000000000 --- a/include/xbt/file.h +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright (c) 2007-2017. The SimGrid Team. - * All rights reserved. */ - -/* This program is free software; you can redistribute it and/or modify it - * under the terms of the license (GNU LGPL) which comes with this package. */ - -#ifndef XBT_FILE_H -#define XBT_FILE_H - -#include - -SG_BEGIN_DECL() - -/** @defgroup XBT_file File manipulation functions - * @ingroup XBT_misc - * - * This module redefine some quite classical functions such as xbt_basename() for the platforms lacking them. - * @{ - */ -/* Our own implementation of basename, that does not exist on windows */ -XBT_PUBLIC(char *) xbt_basename(const char *path); - -/**@}*/ - -SG_END_DECL() -#endif /* XBT_FILE_H */ diff --git a/src/xbt/graph.c b/src/xbt/graph.c index befa76cd7d..a07efb9c2a 100644 --- a/src/xbt/graph.c +++ b/src/xbt/graph.c @@ -12,7 +12,6 @@ #include "graph_private.h" #include "xbt/dict.h" #include "xbt/heap.h" -#include "xbt/file.h" #include #include diff --git a/src/xbt/memory_map.cpp b/src/xbt/memory_map.cpp index 418e93b8af..b575f5e3ec 100644 --- a/src/xbt/memory_map.cpp +++ b/src/xbt/memory_map.cpp @@ -48,7 +48,6 @@ #include #include -#include #include #include "memory_map.hpp" diff --git a/src/xbt/xbt_os_file.cpp b/src/xbt/xbt_os_file.cpp index 1e1e9f82e8..1248350f79 100644 --- a/src/xbt/xbt_os_file.cpp +++ b/src/xbt/xbt_os_file.cpp @@ -8,9 +8,6 @@ #include "xbt/file.hpp" /* this module */ -#include "xbt/file.h" -#include "xbt/sysdep.h" - #ifdef _WIN32 #include #endif @@ -18,15 +15,6 @@ #include #include /* POSIX dirname */ -/** @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. - */ -char *xbt_basename(const char *path) -{ - return xbt_strdup(simgrid::xbt::Path(path).getBasename().c_str()); -} - std::string simgrid::xbt::Path::getDirname() { std::string p(path_); diff --git a/tools/cmake/DefinePackages.cmake b/tools/cmake/DefinePackages.cmake index 93f4930444..cae9f7347a 100644 --- a/tools/cmake/DefinePackages.cmake +++ b/tools/cmake/DefinePackages.cmake @@ -716,7 +716,6 @@ set(headers_to_install include/xbt/ex.hpp include/xbt/exception.hpp include/xbt/Extendable.hpp - include/xbt/file.h include/xbt/file.hpp include/xbt/functional.hpp include/xbt/function_types.h