[Pkg-owncloud-commits] [owncloud-client] 44/332: CSync: Remove more unused things

Sandro Knauß hefee-guest at moszumanska.debian.org
Thu Aug 14 21:06:36 UTC 2014


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit 2f8116716495617fa05f1ea5d7cf5a73db4f6233
Author: Markus Goetz <markus at woboq.com>
Date:   Wed Jun 4 11:13:44 2014 +0200

    CSync: Remove more unused things
---
 csync/src/csync.h      | 17 +----------------
 csync/src/csync_misc.c | 46 ----------------------------------------------
 csync/src/csync_misc.h |  2 --
 3 files changed, 1 insertion(+), 64 deletions(-)

diff --git a/csync/src/csync.h b/csync/src/csync.h
index 4fd46f3..8ebf9a2 100644
--- a/csync/src/csync.h
+++ b/csync/src/csync.h
@@ -44,13 +44,6 @@
 extern "C" {
 #endif
 
-/*
- * csync file declarations
- */
-#define CSYNC_CONF_DIR ".ocsync"
-#define CSYNC_CONF_FILE "ocsync.conf"
-#define CSYNC_EXCLUDE_FILE "ocsync_exclude.conf"
-
 /**
   * Instruction enum. In the file traversal structure, it describes
   * the csync state of a file.
@@ -59,7 +52,7 @@ enum csync_status_codes_e {
   CSYNC_STATUS_OK         = 0,
 
   CSYNC_STATUS_ERROR      = 1024, /* don't use this code,
-                                     just use in csync_status_ok */
+                                     */
   CSYNC_STATUS_UNSUCCESSFUL,
   CSYNC_STATUS_NO_LOCK, /* OBSOLETE  does not happen anymore */
   CSYNC_STATUS_STATEDB_LOAD_ERROR,
@@ -216,14 +209,6 @@ typedef void (*csync_log_callback) (int verbosity,
                                     const char *buffer,
                                     void *userdata);
 
-/**
- * @brief Check internal csync status.
- *
- * @param csync  The context to check.
- *
- * @return  true if status is error free, false for error states.
- */
-bool csync_status_ok(CSYNC *ctx);
 
 /**
  * @brief Allocate a csync context.
diff --git a/csync/src/csync_misc.c b/csync/src/csync_misc.c
index c8b4774..5be46ed 100644
--- a/csync/src/csync_misc.c
+++ b/csync/src/csync_misc.c
@@ -47,52 +47,6 @@
 #include "csync_macros.h"
 #include "csync_log.h"
 
-#ifdef _WIN32
-char *csync_get_user_home_dir(void) {
-    wchar_t tmp[MAX_PATH];
-    char *szPath = NULL;
-
-    if( SHGetFolderPathW( NULL,
-                          CSIDL_PROFILE|CSIDL_FLAG_CREATE,
-                          NULL,
-                          0,
-                          tmp) == S_OK ) {
-        szPath = c_utf8_from_locale(tmp);
-        return szPath;
-    }
-
-    return NULL;
-}
-
-#else /* ************* !WIN32 ************ */
-
-#ifndef NSS_BUFLEN_PASSWD
-#define NSS_BUFLEN_PASSWD 4096
-#endif /* NSS_BUFLEN_PASSWD */
-
-char *csync_get_user_home_dir(void) {
-    const char *envp;
-    struct passwd pwd;
-    struct passwd *pwdbuf;
-    char buf[NSS_BUFLEN_PASSWD];
-    int rc;
-
-    envp = getenv("HOME");
-    if (envp != NULL && envp[0] != '\0') {
-        return c_strdup(envp);
-    }
-
-    /* Still nothing found, read the password file */
-    rc = getpwuid_r(getuid(), &pwd, buf, NSS_BUFLEN_PASSWD, &pwdbuf);
-    if (rc != 0) {
-        return c_strdup(pwd.pw_dir);
-    }
-
-    return NULL;
-}
-
-#endif /* ************* WIN32 ************ */
-
 #ifdef HAVE_FNMATCH
 #include <fnmatch.h>
 
diff --git a/csync/src/csync_misc.h b/csync/src/csync_misc.h
index 4fba1c8..b9fb493 100644
--- a/csync/src/csync_misc.h
+++ b/csync/src/csync_misc.h
@@ -35,8 +35,6 @@
 #define FNM_PATHNAME    (1 << 0) /* No wildcard can ever match `/'.  */
 #endif
 
-char *csync_get_user_home_dir(void);
-
 int csync_fnmatch(__const char *__pattern, __const char *__name, int __flags);
 
 /**

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list