[Commits] [SCM] claws branch, gtk2, updated. 3.19.1-12-ga9aceadf4

mones at claws-mail.org mones at claws-mail.org
Sat Nov 26 18:59:55 CET 2022


The branch, gtk2 has been updated
       via  a9aceadf445aea6d3be06b6109d8290c79d1ac9f (commit)
      from  e0e5d6675ff110c099543fee2094fe09bcec0fea (commit)

Summary of changes:
 configure.ac      | 12 ++++++++++++
 src/addrbook.c    |  7 ++++---
 src/addrbook.h    |  9 +++++----
 src/addrclip.c    |  7 ++++---
 src/addrclip.h    |  7 ++++---
 src/addressbook.c | 21 +++++++++++++++------
 src/addrindex.c   |  5 +++--
 7 files changed, 47 insertions(+), 21 deletions(-)


- Log -----------------------------------------------------------------
commit a9aceadf445aea6d3be06b6109d8290c79d1ac9f
Author: Ricardo Mones <ricardo at mones.org>
Date:   Sat Nov 26 19:38:00 2022 +0100

    Don't include unused debug functions in binary
    
    Unless requested by user with the new configure flag.

diff --git a/configure.ac b/configure.ac
index 64a9e7500..86d4d3e0f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -341,6 +341,10 @@ AC_ARG_ENABLE(tests,
 				[  --enable-tests                   Build unit tests],
 				[enable_tests=$enableval], [enable_tests=no])
 
+AC_ARG_ENABLE(addressbook-debug,
+        [  --enable-addressbook-debug      Build with addressbook debug calls],
+        [enable_addressbook_debug=$enableval], [enable_addressbook_debug=no])
+
 manualdir='${docdir}/manual'
 AC_ARG_WITH(manualdir,
 	[  --with-manualdir=DIR    Manual directory],
@@ -1054,6 +1058,14 @@ else
 fi
 AM_CONDITIONAL(BUILD_TESTS, test "x$enable_tests" = "xyes")
 
+AC_MSG_CHECKING([whether to build addressbook debug calls])
+if test x$enable_addressbook_debug = xyes; then
+	AC_MSG_RESULT(yes)
+	AC_DEFINE(DEBUG_ADDRBOOK, 1, [Define if you want addressbook debug calls])
+else
+	AC_MSG_RESULT(no)
+fi
+
 dnl *************************
 dnl ** section for plugins **
 dnl *************************
diff --git a/src/addrbook.c b/src/addrbook.c
index 7f31ed55d..61b1c817f 100644
--- a/src/addrbook.c
+++ b/src/addrbook.c
@@ -1,6 +1,6 @@
 /*
- * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 2001-2012 Match Grun and the Claws Mail team
+ * Claws Mail -- a GTK based, lightweight, and fast e-mail client
+ * Copyright (C) 2001-2022 Match Grun and the Claws Mail team
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,7 +14,6 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * 
  */
 
 /* General functions for accessing address book files */
@@ -232,6 +231,7 @@ static void addrbook_print_book(AddressBookFile *book, FILE *stream)
 	addrcache_print(book->addressCache, stream);
 }
 
+#ifdef DEBUG_ADDRBOOK
 /**
  * Dump entire address book traversing folders.
  * \param book   Address book.
@@ -247,6 +247,7 @@ void addrbook_dump_book(AddressBookFile *book, FILE *stream)
 	folder = book->addressCache->rootFolder;
 	addritem_print_item_folder(folder, stream);
 }
+#endif
 
 /**
  * Remove specified group from address book. Note that object should still
diff --git a/src/addrbook.h b/src/addrbook.h
index 863a8b0a2..f4a516ef5 100644
--- a/src/addrbook.h
+++ b/src/addrbook.h
@@ -1,11 +1,11 @@
 /*
- * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright 		(C) 2001 Match Grun
+ * Claws Mail -- a GTK based, lightweight, and fast e-mail client
+ * Copyright (C) 2001-2022 Match Grun and the Claws Mail team
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 3 of the License, or
- * 		(at your option) any later version.
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -14,7 +14,6 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * 
  */
 
 /*
@@ -52,7 +51,9 @@ struct _AddressBookFile {
 AddressBookFile *addrbook_create_book	( void );
 
 void addrbook_free_book			( AddressBookFile *book );
+#ifdef DEBUG_ADDRBOOK
 void addrbook_dump_book			( AddressBookFile *book, FILE *stream );
+#endif
 void addrbook_set_name			( AddressBookFile *book, const gchar *value );
 void addrbook_set_path			( AddressBookFile *book, const gchar *value );
 void addrbook_set_file			( AddressBookFile *book, const gchar *value );
diff --git a/src/addrclip.c b/src/addrclip.c
index b41603942..215efaaf5 100644
--- a/src/addrclip.c
+++ b/src/addrclip.c
@@ -1,6 +1,6 @@
 /*
- * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 2002-2012 Match Grun and the Claws Mail team
+ * Claws Mail -- a GTK based, lightweight, and fast e-mail client
+ * Copyright (C) 2002-2022 Match Grun and the Claws Mail team
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,7 +14,6 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * 
  */
 
 /*
@@ -149,6 +148,7 @@ void addrclip_add( AddressClipboard *clipBoard, AddrSelectList *asl ) {
 	}
 }
 
+#ifdef DEBUG_ADDRBOOK
 /*
 * Show clipboard contents.
 * Enter: clipBoard Clipboard.
@@ -186,6 +186,7 @@ void addrclip_list_show( AddressClipboard *clipBoard, FILE *stream ) {
 		node = g_list_next( node );
 	}
 }
+#endif
 
 /* Pasted address pointers */
 typedef struct _AddrClip_EMail_ AddrClip_EMail;
diff --git a/src/addrclip.h b/src/addrclip.h
index 01733c67e..9ddb054a5 100644
--- a/src/addrclip.h
+++ b/src/addrclip.h
@@ -1,6 +1,6 @@
 /*
- * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 2002-2012 Match Grun and the Claws Mail team
+ * Claws Mail -- a GTK based, lightweight, and fast e-mail client
+ * Copyright (C) 2002-2022 Match Grun and the Claws Mail team
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,7 +14,6 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * 
  */
 
 /*
@@ -52,8 +51,10 @@ void addrclip_set_index		( AddressClipboard *clipBoard,
 void addrclip_add		( AddressClipboard *clipBoard,
 				  AddrSelectList *asl );
 gboolean addrclip_is_empty	( AddressClipboard *clipBoard );
+#ifdef DEBUG_ADDRBOOK
 void addrclip_list_show		( AddressClipboard *clipBoard,
 				  FILE *stream );
+#endif
 void addrclip_delete_item	( AddressClipboard *clipBoard );
 GList *addrclip_paste_copy	( AddressClipboard *clipBoard,
 				  AddressBookFile *book,
diff --git a/src/addressbook.c b/src/addressbook.c
index 5c07df4a7..82536d96e 100644
--- a/src/addressbook.c
+++ b/src/addressbook.c
@@ -14,7 +14,6 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * 
  */
 
 #ifdef HAVE_CONFIG_H
@@ -2174,7 +2173,9 @@ static void addressbook_clip_cut_cb( GtkAction *action, gpointer data ) {
 	_clipBoard_->cutFlag = TRUE;
 	addrclip_clear( _clipBoard_ );
 	addrclip_add( _clipBoard_, _addressSelect_ );
-	/* addrclip_list_show( _clipBoard_, stdout ); */
+#ifdef DEBUG_ADDRBOOK
+	addrclip_list_show( _clipBoard_, stdout );
+#endif
 }
 
 /**
@@ -2184,7 +2185,9 @@ static void addressbook_clip_copy_cb(GtkAction *action, gpointer data) {
 	_clipBoard_->cutFlag = FALSE;
 	addrclip_clear( _clipBoard_ );
 	addrclip_add( _clipBoard_, _addressSelect_ );
-	/* addrclip_list_show( _clipBoard_, stdout ); */
+#ifdef DEBUG_ADDRBOOK
+	addrclip_list_show( _clipBoard_, stdout );
+#endif
 }
 
 /**
@@ -2238,7 +2241,9 @@ static void addressbook_clip_paste_cb( GtkAction *action, gpointer data ) {
 		folderGroup = addrclip_paste_copy( _clipBoard_, abf, folder );
 	}
 
-	/* addrclip_list_show( _clipBoard_, stdout ); */
+#ifdef DEBUG_ADDRBOOK
+	addrclip_list_show( _clipBoard_, stdout );
+#endif
 	if( folderGroup ) {
 		/* Update tree by inserting node for each folder or group */
 		addressbook_treenode_add_list(
@@ -2317,7 +2322,9 @@ static void addressbook_treenode_cut_cb( GtkAction *action, gpointer data ) {
 	addressbook_treenode_to_clipboard();
 	addrclip_clear( _clipBoard_ );
 	addrclip_add( _clipBoard_, _addressSelect_ );
-	/* addrclip_list_show( _clipBoard_, stdout ); */
+#ifdef DEBUG_ADDRBOOK
+	addrclip_list_show( _clipBoard_, stdout );
+#endif
 }
 
 /**
@@ -2328,7 +2335,9 @@ static void addressbook_treenode_copy_cb( GtkAction *action, gpointer data ) {
 	addressbook_treenode_to_clipboard();
 	addrclip_clear( _clipBoard_ );
 	addrclip_add( _clipBoard_, _addressSelect_ );
-	/* addrclip_list_show( _clipBoard_, stdout ); */
+#ifdef DEBUG_ADDRBOOK
+	addrclip_list_show( _clipBoard_, stdout );
+#endif
 }
 
 /**
diff --git a/src/addrindex.c b/src/addrindex.c
index a1dbd7380..1508f014d 100644
--- a/src/addrindex.c
+++ b/src/addrindex.c
@@ -14,7 +14,6 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * 
  */
 
 /*
@@ -2168,7 +2167,9 @@ static gboolean addrindex_process_book( AddressIndex *addrIndex, XMLFile *file,
 
 	addrindex_process_node( abf, rootNode, abf->addressCache->rootFolder, NULL, NULL );
 
-	/* addrbook_dump_book( abf, stdout ); */
+#ifdef DEBUG_ADDRBOOK
+	addrbook_dump_book( abf, stdout );
+#endif
 	addrbook_save_data( abf );
 	addrIndex->retVal = abf->retVal;
 	if( abf->retVal == MGU_SUCCESS ) retVal = TRUE;

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list