myserver-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myserver-commit] [SCM] GNU MyServer branch, master, updated. 0_9_2-86-g


From: Giuseppe Scrivano
Subject: [myserver-commit] [SCM] GNU MyServer branch, master, updated. 0_9_2-86-g116935a
Date: Sat, 27 Mar 2010 02:15:51 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  116935a34fd9e9534079a4b655f98b4b2a24884c (commit)
      from  d4f6ff444fb4990f80891fd0b6861d838b578740 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 116935a34fd9e9534079a4b655f98b4b2a24884c
Author: Daniele Cocca <address@hidden>
Date:   Sat Mar 27 02:48:29 2010 +0100

    Two more useless functions removed.

diff --git a/myserver/include/base/file/files_utility.h 
b/myserver/include/base/file/files_utility.h
index 77e06a6..f8e79b4 100644
--- a/myserver/include/base/file/files_utility.h
+++ b/myserver/include/base/file/files_utility.h
@@ -89,8 +89,6 @@ public:
   static void splitPath (const char* path, char* dir, char*filename);
   static void splitPath (string const &path, string& dir, string& filename);
 
-  static int getFilenameLength (const char*, int *);
-  static void getFilename (const char* path, char* filename);
   static void getFilename (string const &path, string& filename);
 
   static int rmdir (const char *path);
diff --git a/myserver/src/base/file/files_utility.cpp 
b/myserver/src/base/file/files_utility.cpp
index 61c4a88..75b2cfc 100644
--- a/myserver/src/base/file/files_utility.cpp
+++ b/myserver/src/base/file/files_utility.cpp
@@ -60,7 +60,7 @@ FilesUtility::FilesUtility ()
 }
 
 /*!
- * This funtion iterates through every character of the path
+ * This function iterates through every character of the path
  * The first IF tries to clear out the bars, if it finds one,
  * just advances one character and starts the cycle again
  * The second IF tries to find at least two dots.
@@ -275,7 +275,7 @@ int FilesUtility::nodeExists (const char* filename)
                              NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL
                              | FILE_FLAG_BACKUP_SEMANTICS, NULL);
 
-  int nRet = hFile != INVALID_HANDLE_VALUE ? 1 : 0;
+  int nRet = (hFile != INVALID_HANDLE_VALUE) ? 1 : 0;
   CloseHandle (hFile);
   return nRet;
 #else
@@ -369,49 +369,6 @@ int FilesUtility::chown (const char* filename, string 
&uid, string &gid)
 }
 
 /*!
- *Get the length of the file in the path.
- *\param path The full path where get the filename length.
- *\param filename A pointer to the start of the file name.
- */
-int FilesUtility::getFilenameLength (const char *path, int *filename)
-{
-  int splitpoint = static_cast<int> (strlen (path) - 1);
-  while ((splitpoint > 0) && (path[splitpoint] != '/'))
-    splitpoint--;
-  *filename = splitpoint + 1;
-  return *filename;
-}
-
-/*!
- * Get the filename from a path.
- * Be sure that the filename buffer is at least getFilenameLength (...) bytes
- * before call this function.
- * \param path The full path to the file.
- * \param filename A buffer to fullfill with the file name.
- */
-void FilesUtility::getFilename (const char *path, char *filename)
-{
-  int splitpoint, i = 0, j = 0;
-  splitpoint = static_cast<int>(strlen (path) - 1);
-  while ((splitpoint > 0) && (path[splitpoint] != '/'))
-    splitpoint--;
-  if ((splitpoint == 0) && (path[splitpoint] != '/'))
-    strcpy (filename, path);
-  else
-    {
-      splitpoint++;
-      i=splitpoint;
-      while (path[i] != 0)
-        {
-          filename[j] = path[i];
-          j++;
-          i++;
-        }
-      filename[j] = 0;
-    }
-}
-
-/*!
  * Get the filename from a path.
  * \param path The full path to the file.
  * \param filename A buffer to fullfill with the file name.

-----------------------------------------------------------------------

Summary of changes:
 myserver/include/base/file/files_utility.h |    2 -
 myserver/src/base/file/files_utility.cpp   |   47 +--------------------------
 2 files changed, 2 insertions(+), 47 deletions(-)


hooks/post-receive
-- 
GNU MyServer




reply via email to

[Prev in Thread] Current Thread [Next in Thread]