[Commits] [SCM] claws branch, gtk2, updated. 3.20.0-53-gdea2d896d
wwp at claws-mail.org
wwp at claws-mail.org
Sat Feb 17 12:25:52 UTC 2024
The branch, gtk2 has been updated
via dea2d896de4740d616bbabb9dd7bea2df757d5ba (commit)
from db78290fe46f86602effe0c68cb8028f512e0e7e (commit)
Summary of changes:
configure.ac | 13 +++++++++++++
src/plugins/archive/libarchive_archive.c | 26 +++++++++++++-------------
src/plugins/archive/libarchive_archive.h | 7 +++----
3 files changed, 29 insertions(+), 17 deletions(-)
- Log -----------------------------------------------------------------
commit dea2d896de4740d616bbabb9dd7bea2df757d5ba
Author: Ricardo Mones <ricardo at mones.org>
Date: Fri Feb 16 12:24:30 2024 +0100
Use a configure flag for archive plugin extra debug
diff --git a/configure.ac b/configure.ac
index 2163be2c2..7d2784178 100644
--- a/configure.ac
+++ b/configure.ac
@@ -341,6 +341,10 @@ AC_ARG_ENABLE(more-ldap-debug,
[ --enable-more-ldap-debug Build with additional LDAP debug calls],
[enable_more_ldap_debug=$enableval], [enable_more_ldap_debug=no])
+AC_ARG_ENABLE(more-archive-debug,
+ [ --enable-more-archive-debug Build with additional debug calls in archive plugin],
+ [enable_more_archive_debug=$enableval], [enable_more_archive_debug=no])
+
manualdir='${docdir}/manual'
AC_ARG_WITH(manualdir,
[ --with-manualdir=DIR Manual directory],
@@ -1070,6 +1074,15 @@ else
AC_MSG_RESULT(no)
fi
+AC_MSG_CHECKING([whether to build archive plugin with more debug calls])
+if test x$enable_more_archive_debug = xyes; then
+ more_debug_output_modules="$more_debug_output_modules ArchivePlugin"
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(DEBUG_ARCHIVE, 1, [Define if you want additional archive plugin debug calls])
+else
+ AC_MSG_RESULT(no)
+fi
+
dnl *************************
dnl ** section for plugins **
dnl *************************
diff --git a/src/plugins/archive/libarchive_archive.c b/src/plugins/archive/libarchive_archive.c
index 66ebc0326..d3fb58a81 100644
--- a/src/plugins/archive/libarchive_archive.c
+++ b/src/plugins/archive/libarchive_archive.c
@@ -1,6 +1,6 @@
/*
- * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2018 Michael Rasmussen and the Claws Mail Team
+ * Claws Mail -- a GTK based, lightweight, and fast e-mail client
+ * Copyright (C) 1999-2024 Michael Rasmussen 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
@@ -27,7 +27,7 @@
#include "libarchive_archive.h"
-#ifndef _TEST
+#ifndef DEBUG_ARCHIVE
# include "archiver.h"
# include "utils.h"
# include "mainwindow.h"
@@ -58,7 +58,7 @@ static GSList* msg_trash_list = NULL;
static GSList* file_list = NULL;
static gboolean stop_action = FALSE;
-#ifdef _TEST
+#ifdef DEBUG_ARCHIVE
static int permissions = 0;
#endif
@@ -311,7 +311,7 @@ static gchar* get_full_path(struct file_info* file) {
return path;
}
-#ifdef _TEST
+#ifdef DEBUG_ARCHIVE
static gchar* strip_leading_slash(gchar* path) {
gchar* stripped = path;
gchar* result = NULL;
@@ -356,7 +356,7 @@ void archive_add_file(gchar* path) {
g_return_if_fail(path != NULL);
-#ifndef _TEST
+#ifndef DEBUG_ARCHIVE
debug_print("add %s to list\n", path);
#endif
filename = g_strrstr_len(path, strlen(path), "/");
@@ -375,7 +375,7 @@ GSList* archive_get_file_list() {
return file_list;
}
-#ifdef _TEST
+#ifdef DEBUG_ARCHIVE
const gchar* archive_extract(const char* archive_name, int flags) {
struct archive* in;
struct archive* out;
@@ -453,7 +453,7 @@ const gchar* archive_create(const char* archive_name, GSList* files,
COMPRESS_METHOD method, ARCHIVE_FORMAT format) {
struct archive* arch;
-#ifndef _TEST
+#ifndef DEBUG_ARCHIVE
gint num = 0;
gint total = g_slist_length (files);
#endif
@@ -571,7 +571,7 @@ const gchar* archive_create(const char* archive_name, GSList* files,
struct file_info* file;
gchar* filename = NULL;
-#ifndef _TEST
+#ifndef DEBUG_ARCHIVE
set_progress_print_all(num++, total, 30);
#endif
file = (struct file_info *) files->data;
@@ -581,7 +581,7 @@ const gchar* archive_create(const char* archive_name, GSList* files,
/* libarchive will crash if instructed to add archive to it self */
if (g_utf8_collate(archive_name, filename) == 0) {
g_warning("%s: not dumping to '%s'", archive_name, filename);
-#ifndef _TEST
+#ifndef DEBUG_ARCHIVE
debug_print("%s: not dumping to '%s'\n", archive_name, filename);
#endif
}
@@ -594,7 +594,7 @@ const gchar* archive_create(const char* archive_name, GSList* files,
int fd;
gchar* msg = NULL;
-#ifndef _TEST
+#ifndef DEBUG_ARCHIVE
debug_print("Adding: %s\n", filename);
msg = g_strdup_printf("%s", filename);
set_progress_file_label(msg);
@@ -649,7 +649,7 @@ const gchar* archive_create(const char* archive_name, GSList* files,
g_free(filename);
files = g_slist_next(files);
}
-#ifndef _TEST
+#ifndef DEBUG_ARCHIVE
if (stop_action)
unlink(archive_name);
stop_action = FALSE;
@@ -663,7 +663,7 @@ const gchar* archive_create(const char* archive_name, GSList* files,
return NULL;
}
-#ifdef _TEST
+#ifdef DEBUG_ARCHIVE
void archive_scan_folder(const char* dir) {
GStatBuf st;
DIR* root;
diff --git a/src/plugins/archive/libarchive_archive.h b/src/plugins/archive/libarchive_archive.h
index 4ceb2fed5..fc7f0c26a 100644
--- a/src/plugins/archive/libarchive_archive.h
+++ b/src/plugins/archive/libarchive_archive.h
@@ -1,8 +1,8 @@
/* vim: set textwidth=80 tabstop=4: */
/*
- * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2018 Michael Rasmussen and the Claws Mail Team
+ * Claws Mail -- a GTK based, lightweight, and fast e-mail client
+ * Copyright (C) 1999-2024 Michael Rasmussen 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
@@ -16,7 +16,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/>.
- *
*/
#ifndef __LIBARCHIVE_ARCHIVE_H__
@@ -77,7 +76,7 @@ const gchar* archive_create(const char* archive_name, GSList* files,
gboolean before_date(time_t msg_mtime, const gchar* before);
void archiver_set_tooltip(GtkWidget* widget, gchar* text);
-#ifdef _TEST
+#ifdef DEBUG_ARCHIVE
void archive_set_permissions(int perm);
const gchar* archive_extract(const char* archive_name, int flags);
void archive_scan_folder(const char* dir);
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list