[balsa] Remove unused code



commit 47950e267c689981da5525c320515b708196fa46
Author: Albrecht Dreß <albrecht dress arcor de>
Date:   Tue Apr 18 10:11:20 2017 -0400

    Remove unused code
    
        * libbalsa/misc.c: remove unused function libbalsa_truncate_string;
        * libbalsa/misc.h: remove obsolete declarations.
    
    Signed-off-by: Peter Bloomfield <PeterBloomfield bellsouth net>

 ChangeLog       |    7 +++++++
 libbalsa/misc.c |   33 ---------------------------------
 libbalsa/misc.h |    5 -----
 3 files changed, 7 insertions(+), 38 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 8bf4919..2c17ed9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2017-04-18  Peter Bloomfield  <pbloomfield bellsouth net>
+
+       Remove unused code
+
+       * libbalsa/misc.c: remove unused function libbalsa_truncate_string;
+       * libbalsa/misc.h: remove obsolete declarations.
+
 2017-04-17  Peter Bloomfield  <pbloomfield bellsouth net>
 
        Clean up identity code
diff --git a/libbalsa/misc.c b/libbalsa/misc.c
index 33133a4..7b04fff 100644
--- a/libbalsa/misc.c
+++ b/libbalsa/misc.c
@@ -228,39 +228,6 @@ libbalsa_delete_directory_contents(const gchar *path)
     return TRUE;
 }
 
-/* libbalsa_truncate_string
- *
- * Arguments:
- *   str    the string to be truncated;
- *   length truncation length;
- *   dots   the number of trailing dots to be used to indicate
- *          truncation.
- *
- * Value:
- *   pointer to a newly allocated string; free with `g_free' when it's
- *   no longer needed.
- */
-gchar *
-libbalsa_truncate_string(const gchar *str, gint length, gint dots)
-{
-    gchar *res;
-    gchar *p;
-
-    if (str == NULL)
-        return NULL;
-
-    if (length <= 0 || strlen(str) <= (guint) length)
-        return g_strdup(str);
-
-    res = g_strndup(str, length);
-
-    p = res + length - dots;
-    while (--dots >= 0)
-        *p++ = '.';
-
-    return res;
-}
-
 /* libbalsa_expand_path:
    We handle only references to ~/.
 */
diff --git a/libbalsa/misc.h b/libbalsa/misc.h
index ec63140..677394c 100644
--- a/libbalsa/misc.h
+++ b/libbalsa/misc.h
@@ -108,13 +108,8 @@ void libbalsa_wrap_view(GtkTextView * view, gint length);
 void libbalsa_unwrap_buffer(GtkTextBuffer * buffer, GtkTextIter * iter,
                             gint lines);
 
-const char* libbalsa_set_charset(const gchar * charset);
-const char* libbalsa_set_send_charset(const gchar * charset);
-
 gboolean libbalsa_delete_directory_contents(const gchar *path);
-gchar *libbalsa_truncate_string(const gchar * str, gint length, gint dots);
 gchar *libbalsa_expand_path(const gchar *path);
-void libbalsa_contract_path(gchar *path);
 gboolean libbalsa_mktempdir(gchar ** name);
 LibBalsaCodeset libbalsa_set_fallback_codeset(LibBalsaCodeset codeset);
 gboolean libbalsa_utf8_sanitize(gchar ** text, gboolean fallback,


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