Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Kill now unused xbt_basename().
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 25 Oct 2017 19:28:06 +0000 (21:28 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 25 Oct 2017 19:30:56 +0000 (21:30 +0200)
ChangeLog
include/xbt.h
include/xbt/file.h [deleted file]
src/xbt/graph.c
src/xbt/memory_map.cpp
src/xbt/xbt_os_file.cpp
tools/cmake/DefinePackages.cmake

index 2ca220f..3c8d633 100644 (file)
--- 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
 
index 9d5510e..9dd4caf 100644 (file)
@@ -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 <xbt/misc.h>
 #include <xbt/sysdep.h>
 #include <xbt/str.h>
-#include <xbt/file.h>
 #include <xbt/function_types.h>
 
 #include <xbt/asserts.h>
diff --git a/include/xbt/file.h b/include/xbt/file.h
deleted file mode 100644 (file)
index 3d588ba..0000000
+++ /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 <xbt/base.h>
-
-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 */
index befa76c..a07efb9 100644 (file)
@@ -12,7 +12,6 @@
 #include "graph_private.h"
 #include "xbt/dict.h"
 #include "xbt/heap.h"
-#include "xbt/file.h"
 
 #include <errno.h>
 #include <stdio.h>
index 418e93b..b575f5e 100644 (file)
@@ -48,7 +48,6 @@
 
 #include <xbt/sysdep.h>
 #include <xbt/base.h>
-#include <xbt/file.h>
 #include <xbt/log.h>
 
 #include "memory_map.hpp"
index 1e1e9f8..1248350 100644 (file)
@@ -8,9 +8,6 @@
 
 #include "xbt/file.hpp" /* this module */
 
-#include "xbt/file.h"
-#include "xbt/sysdep.h"
-
 #ifdef _WIN32
 #include <windows.h>
 #endif
 #include <cstring>
 #include <libgen.h> /* 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_);
index 93f4930..cae9f73 100644 (file)
@@ -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