[Commits] [SCM] claws branch, master, updated. 4.2.0-56-gbc439aecd

mones at claws-mail.org mones at claws-mail.org
Fri Feb 16 18:39:53 UTC 2024


The branch, master has been updated
       via  bc439aecd313e323fbc7d66f3a0325efccac503d (commit)
       via  aaba0f7a16e095357470350ef6335a3a3b16a0a3 (commit)
       via  4fec17a09ad7904c5b661262aeb9c01b2bc40a4f (commit)
      from  3c09756b316066f098ed5d0671ef0cf89ec42999 (commit)

Summary of changes:
 configure.ac                             | 26 +++++++--------
 src/addressbook.c                        |  3 +-
 src/addrharvest.c                        |  4 +--
 src/common/utils.c                       | 15 +--------
 src/common/utils.h                       |  4 +--
 src/exporthtml.c                         |  2 --
 src/exportldif.c                         |  2 --
 src/gtk/gtkaspell.c                      |  1 -
 src/imap.c                               |  3 +-
 src/mh.c                                 |  4 +--
 src/news.c                               |  4 +--
 src/plugins/archive/libarchive_archive.c | 57 +++++++++++++++++---------------
 src/plugins/archive/libarchive_archive.h |  5 ++-
 src/plugins/mailmbox/mailmbox_folder.c   |  7 ++--
 src/plugins/vcalendar/vcal_folder.c      |  3 +-
 src/prefs_template.c                     |  3 +-
 src/ssl_manager.c                        |  3 +-
 src/stock_pixmap.c                       |  3 +-
 src/toolbar.c                            |  3 +-
 src/uri_opener.c                         |  3 +-
 20 files changed, 61 insertions(+), 94 deletions(-)


- Log -----------------------------------------------------------------
commit bc439aecd313e323fbc7d66f3a0325efccac503d
Author: Ricardo Mones <ricardo at mones.org>
Date:   Fri Feb 16 17:24:41 2024 +0100

    Remove remaining references to dirent
    
    which has become unused now.

diff --git a/configure.ac b/configure.ac
index 78e549f92..9b447e9e8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -412,20 +412,7 @@ if test "$ac_cv_va_opt" = yes; then
 	AC_DEFINE([HAVE_VA_OPT], [1], [Define if __VA_OPT__ macro works])
 fi
 
-dnl Check for d_type member in struct dirent
-AC_MSG_CHECKING([whether struct dirent has d_type member])
-AC_CACHE_VAL(ac_cv_dirent_d_type,[
-	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <dirent.h>]], [[struct dirent d; d.d_type = DT_REG;]])],[ac_cv_dirent_d_type=yes],[ac_cv_dirent_d_type=no])
-])
-AC_MSG_RESULT($ac_cv_dirent_d_type)
-if test $ac_cv_dirent_d_type = yes; then
-	AC_DEFINE(HAVE_DIRENT_D_TYPE, 1,
-		  Define if `struct dirent' has `d_type' member.)
-fi
-
 dnl Checks for header files.
-AC_HEADER_DIRENT
-
 AC_HEADER_SYS_WAIT
 AC_CHECK_HEADERS(fcntl.h sys/file.h unistd.h paths.h \
 		 sys/param.h sys/utsname.h sys/select.h \
diff --git a/src/addressbook.c b/src/addressbook.c
index 49ba3e55e..413668ec4 100644
--- a/src/addressbook.c
+++ b/src/addressbook.c
@@ -1,6 +1,6 @@
 /*
  * Claws Mail -- a GTK based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2022 the Claws Mail team and Hiroyuki Yamamoto
+ * Copyright (C) 1999-2024 the Claws Mail team and Hiroyuki Yamamoto
  *
  * 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
@@ -30,7 +30,6 @@
 #include <string.h>
 #include <setjmp.h>
 #include <sys/types.h>
-#include <dirent.h>
 
 #include "main.h"
 #include "addressbook.h"
diff --git a/src/addrharvest.c b/src/addrharvest.c
index b14ac5290..020e9c467 100644
--- a/src/addrharvest.c
+++ b/src/addrharvest.c
@@ -1,6 +1,6 @@
 /*
  * Claws Mail -- a GTK based, lightweight, and fast e-mail client
- * Copyright (C) 2002-2022 Match Grun and the Claws Mail team
+ * Copyright (C) 2002-2024 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/>.
- * 
  */
 
 /*
@@ -27,7 +26,6 @@
 #endif
 
 #include <sys/stat.h>
-#include <dirent.h>
 #include <glib.h>
 #include <string.h>
 
diff --git a/src/common/utils.c b/src/common/utils.c
index fa01d1c0e..8181d5f15 100644
--- a/src/common/utils.c
+++ b/src/common/utils.c
@@ -1,6 +1,6 @@
 /*
  * Claws Mail -- a GTK based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2021 The Claws Mail Team and Hiroyuki Yamamoto
+ * Copyright (C) 1999-2024 The Claws Mail Team and Hiroyuki Yamamoto
  *
  * 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
@@ -67,7 +67,6 @@
 #if HAVE_SYS_WAIT_H
 #  include <sys/wait.h>
 #endif
-#include <dirent.h>
 #include <time.h>
 #include <regex.h>
 
@@ -2094,18 +2093,6 @@ gboolean is_file_entry_regular(const gchar *file)
 	return g_file_test(file, G_FILE_TEST_IS_REGULAR);
 }
 
-gboolean dirent_is_regular_file(struct dirent *d)
-{
-#if !defined(G_OS_WIN32) && defined(HAVE_DIRENT_D_TYPE)
-	if (d->d_type == DT_REG)
-		return TRUE;
-	else if (d->d_type != DT_UNKNOWN)
-		return FALSE;
-#endif
-
-	return g_file_test(d->d_name, G_FILE_TEST_IS_REGULAR);
-}
-
 gint change_dir(const gchar *dir)
 {
 	gchar *prevdir = NULL;
diff --git a/src/common/utils.h b/src/common/utils.h
index 43f68a2ac..ab07def2e 100644
--- a/src/common/utils.h
+++ b/src/common/utils.h
@@ -1,6 +1,6 @@
 /*
  * Claws Mail -- a GTK based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2022 The Claws Mail Team and Hiroyuki Yamamoto
+ * Copyright (C) 1999-2024 The Claws Mail Team and Hiroyuki Yamamoto
  *
  * 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
@@ -38,7 +38,6 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <sys/types.h>
-#include <dirent.h>
 #include <time.h>
 #if HAVE_ALLOCA_H
 #  include <alloca.h>
@@ -428,7 +427,6 @@ gboolean is_relative_filename   (const gchar *file);
 gboolean is_dir_exist		(const gchar	*dir);
 gboolean is_file_entry_exist	(const gchar	*file);
 gboolean is_file_entry_regular(const gchar *file);
-gboolean dirent_is_regular_file	(struct dirent	*d);
 
 #define is_file_exist(file)		file_exist(file, FALSE)
 #define is_file_or_fifo_exist(file)	file_exist(file, TRUE)
diff --git a/src/exporthtml.c b/src/exporthtml.c
index b2ea89268..4fc48db4d 100644
--- a/src/exporthtml.c
+++ b/src/exporthtml.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/>.
- * 
  */
 
 /*
@@ -31,7 +30,6 @@
 #endif
 
 #include <sys/stat.h>
-#include <dirent.h>
 #include <errno.h>
 #include <time.h>
 #include <string.h>
diff --git a/src/exportldif.c b/src/exportldif.c
index 16006cf8b..c2cfab9e5 100644
--- a/src/exportldif.c
+++ b/src/exportldif.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/>.
- *
  */
 
 /*
@@ -26,7 +25,6 @@
 #endif
 
 #include <sys/stat.h>
-#include <dirent.h>
 #include <errno.h>
 #include <time.h>
 #include <string.h>
diff --git a/src/gtk/gtkaspell.c b/src/gtk/gtkaspell.c
index 97d1b4586..a89f08de2 100644
--- a/src/gtk/gtkaspell.c
+++ b/src/gtk/gtkaspell.c
@@ -45,7 +45,6 @@
 #include <sys/time.h>
 #include <fcntl.h>
 #include <time.h>
-#include <dirent.h>
 
 #include <glib.h>
 #include <glib/gi18n.h>
diff --git a/src/imap.c b/src/imap.c
index 3450e2d8d..012b77c4b 100644
--- a/src/imap.c
+++ b/src/imap.c
@@ -1,6 +1,6 @@
 /*
  * Claws Mail -- a GTK based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2023 the Claws Mail team and Hiroyuki Yamamoto
+ * Copyright (C) 1999-2024 the Claws Mail team and Hiroyuki Yamamoto
  *
  * 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
@@ -36,7 +36,6 @@
 #ifdef HAVE_LIBETPAN
 
 #include <stdlib.h>
-#include <dirent.h>
 #include <unistd.h>
 #include <ctype.h>
 #include <time.h>
diff --git a/src/mh.c b/src/mh.c
index 1b46ad4d0..613886052 100644
--- a/src/mh.c
+++ b/src/mh.c
@@ -1,6 +1,6 @@
 /*
  * Claws Mail -- a GTK based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2013 Hiroyuki Yamamoto and the Claws Mail team
+ * Copyright (C) 1999-2024 Hiroyuki Yamamoto 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/>.
- * 
  */
 
 #ifdef HAVE_CONFIG_H
@@ -26,7 +25,6 @@
 
 #include <glib.h>
 #include <glib/gi18n.h>
-#include <dirent.h>
 #include <sys/stat.h>
 #include <unistd.h>
 #include <string.h>
diff --git a/src/news.c b/src/news.c
index 450e47386..3373623fa 100644
--- a/src/news.c
+++ b/src/news.c
@@ -1,6 +1,6 @@
 /*
  * Claws Mail -- a GTK based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2022 the Claws Mail team and Hiroyuki Yamamoto
+ * Copyright (C) 1999-2024 the Claws Mail team and Hiroyuki Yamamoto
  *
  * 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/>.
- * 
  */
 
 #ifdef HAVE_CONFIG_H
@@ -31,7 +30,6 @@
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
-#include <dirent.h>
 #include <unistd.h>
 #include <time.h>
 #include <libetpan/libetpan.h>
diff --git a/src/plugins/mailmbox/mailmbox_folder.c b/src/plugins/mailmbox/mailmbox_folder.c
index 3e6824052..179ec2486 100644
--- a/src/plugins/mailmbox/mailmbox_folder.c
+++ b/src/plugins/mailmbox/mailmbox_folder.c
@@ -1,6 +1,6 @@
 /*
  * Claws Mail -- a GTK based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2003 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2024 Hiroyuki Yamamoto 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
@@ -13,11 +13,9 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 
-
 #ifdef HAVE_CONFIG_H
 #  include "config.h"
 #  include "claws-features.h"
@@ -28,7 +26,6 @@
 
 #include "defs.h"
 
-#include <dirent.h>
 #include <sys/stat.h>
 #include <unistd.h>
 #include <string.h>
diff --git a/src/plugins/vcalendar/vcal_folder.c b/src/plugins/vcalendar/vcal_folder.c
index 652ff281f..1581691a8 100644
--- a/src/plugins/vcalendar/vcal_folder.c
+++ b/src/plugins/vcalendar/vcal_folder.c
@@ -1,6 +1,6 @@
 /*
  * Claws Mail -- a GTK based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2023 the Claws Mail team and Colin Leroy <colin at colino.net>
+ * Copyright (C) 1999-2024 the Claws Mail team and Colin Leroy <colin at colino.net>
  *
  * 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
@@ -66,7 +66,6 @@
 #include "messageview.h"
 
 #include <gtk/gtk.h>
-#include <dirent.h>
 
 #ifdef USE_PTHREAD
 #include <pthread.h>
diff --git a/src/prefs_template.c b/src/prefs_template.c
index 1b5abf592..b20683b37 100644
--- a/src/prefs_template.c
+++ b/src/prefs_template.c
@@ -1,7 +1,7 @@
 /*
  * Claws Mail templates subsystem 
  * Copyright (C) 2001 Alexander Barinov
- * Copyright (C) 2001-2022 The Claws Mail team
+ * Copyright (C) 2001-2024 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
@@ -25,7 +25,6 @@
 #include <gtk/gtk.h>
 #include <gdk/gdkkeysyms.h>
 #include <string.h>
-#include <dirent.h>
 #include <sys/stat.h>
 
 #include "template.h"
diff --git a/src/ssl_manager.c b/src/ssl_manager.c
index 6f2e63704..b055ecb36 100644
--- a/src/ssl_manager.c
+++ b/src/ssl_manager.c
@@ -1,6 +1,6 @@
 /*
  * Claws Mail -- a GTK based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2022 the Claws Mail team and Colin Leroy
+ * Copyright (C) 1999-2024 the Claws Mail team and Colin Leroy
  *
  * 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
@@ -26,7 +26,6 @@
 #include <glib/gi18n.h>
 #include <gdk/gdkkeysyms.h>
 #include <sys/types.h>
-#include <dirent.h>
 
 #include "ssl_manager.h"
 #include "ssl_certificate.h"
diff --git a/src/stock_pixmap.c b/src/stock_pixmap.c
index 90fa053fb..2834b4fd2 100644
--- a/src/stock_pixmap.c
+++ b/src/stock_pixmap.c
@@ -1,6 +1,6 @@
 /*
  * Claws Mail -- a GTK based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2023 the Claws Mail team and Hiroyuki Yamamoto
+ * Copyright (C) 1999-2024 the Claws Mail team and Hiroyuki Yamamoto
  *
  * 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
@@ -24,7 +24,6 @@
 #include <glib.h>
 #include <gtk/gtk.h>
 #include <string.h>
-#include <dirent.h>
 #ifdef HAVE_SVG
 #include <librsvg/rsvg.h>
 #include <math.h>
diff --git a/src/toolbar.c b/src/toolbar.c
index 51092b9f0..061c1c46b 100644
--- a/src/toolbar.c
+++ b/src/toolbar.c
@@ -1,6 +1,6 @@
 /*
  * Claws Mail -- a GTK based, lightweight, and fast e-mail client
- * Copyright (C) 2001-2022 the Claws Mail team and Hiroyuki Yamamoto
+ * Copyright (C) 2001-2024 the Claws Mail team and Hiroyuki Yamamoto
  *
  * 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,6 @@
 #include <glib/gi18n.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <dirent.h>
 #include <sys/stat.h>
 #include <math.h>
 #include <setjmp.h>
diff --git a/src/uri_opener.c b/src/uri_opener.c
index 6b3ea3705..cca1ceb92 100644
--- a/src/uri_opener.c
+++ b/src/uri_opener.c
@@ -1,6 +1,6 @@
 /*
  * Claws Mail -- a GTK based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2022 the Claws Mail team and Colin Leroy
+ * Copyright (C) 1999-2024 the Claws Mail team and Colin Leroy
  *
  * 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
@@ -25,7 +25,6 @@
 #include <glib/gi18n.h>
 #include <gdk/gdkkeysyms.h>
 #include <sys/types.h>
-#include <dirent.h>
 
 #include "manage_window.h"
 #include "utils.h"

commit aaba0f7a16e095357470350ef6335a3a3b16a0a3
Author: Ricardo Mones <ricardo at mones.org>
Date:   Fri Feb 16 16:23:06 2024 +0100

    Use g_dir calls for directory processing
    
    Also fix building with --enable-more-archive-debug while at it.

diff --git a/src/plugins/archive/libarchive_archive.c b/src/plugins/archive/libarchive_archive.c
index c1e52ef3e..1a0ae5a29 100644
--- a/src/plugins/archive/libarchive_archive.c
+++ b/src/plugins/archive/libarchive_archive.c
@@ -33,6 +33,9 @@
 #	include "mainwindow.h"
 #   include "folder.h"
 #endif
+#ifdef DEBUG_ARCHIVE
+#include "procmsg.h"
+#endif
 
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -44,7 +47,6 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
-#include <dirent.h>
 #include <libgen.h>
 
 #define READ_BLOCK_SIZE 10240
@@ -382,9 +384,9 @@ const gchar* archive_extract(const char* archive_name, int flags) {
 	struct archive_entry* entry;
 	int res = ARCHIVE_OK;
 	gchar* buf = NULL;
-	const char* result == NULL;
+	const char* result = NULL;
 
-	g_return_val_if_fail(archive_name != NULL, ARCHIVE_FATAL);
+	g_return_val_if_fail(archive_name != NULL, NULL);
 
 	fprintf(stdout, "%s: extracting\n", archive_name);
 	in = archive_read_new();
@@ -666,29 +668,32 @@ const gchar* archive_create(const char* archive_name, GSList* files,
 #ifdef DEBUG_ARCHIVE
 void archive_scan_folder(const char* dir) {
 	GStatBuf st;
-	DIR* root;
-	struct dirent* ent;
+	GDir* root;
+	const gchar* ent;
 	gchar cwd[PATH_MAX];
 	gchar path[PATH_MAX];
-	
+	GError *error = NULL;
+
 	getcwd(cwd, PATH_MAX);
 
 	if (g_stat(dir, &st) == -1)
 		return;
 	if (! S_ISDIR(st.st_mode))
 		return;
-	if (!(root = opendir(dir)))
+	if (!(root = g_dir_open(dir, 0, &error))) {
+		debug_print("opening '%s' failed: %d (%s)\n", dir, error->code, error->message);
 		return;
+	}
 	chdir(dir);
 
-	while ((ent = readdir(root)) != NULL) {
-		if (strcmp(".", ent->d_name) == 0 || strcmp("..", ent->d_name) == 0)
+	while ((ent = g_dir_read_name(root)) != NULL) {
+		if (strcmp(".", ent) == 0 || strcmp("..", ent) == 0)
 			continue;
-		if (g_stat(ent->d_name, &st) == -1) {
-			FILE_OP_ERROR(filename, "g_stat");
+		if (g_stat(ent, &st) == -1) {
+			FILE_OP_ERROR(ent, "g_stat");
 			continue;
 		}
-		sprintf(path, "%s/%s", dir, ent->d_name);
+		sprintf(path, "%s/%s", dir, ent);
 		if (S_ISREG(st.st_mode) || S_ISLNK(st.st_mode)) {
 			archive_add_file(path);
 		}
@@ -697,7 +702,7 @@ void archive_scan_folder(const char* dir) {
 		}
 	}
 	chdir(cwd);
-	closedir(root);
+	g_dir_close(root);
 }
 
 int main(int argc, char** argv) {
@@ -743,7 +748,7 @@ int main(int argc, char** argv) {
 	
 	while (*argv) {
 		archive_scan_folder(*argv++);
-		res = archive_create(archive, file_list);
+		res = archive_create(archive, file_list, GZIP, TAR);
 		if (res != ARCHIVE_OK) {
 			fprintf(stderr, "%s: Creating archive failed\n", archive);
 			return EXIT_FAILURE;

commit 4fec17a09ad7904c5b661262aeb9c01b2bc40a4f
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 a45769b9e..78e549f92 100644
--- a/configure.ac
+++ b/configure.ac
@@ -333,6 +333,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],
@@ -1062,6 +1066,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 4ecc6a01d..c1e52ef3e 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
+ * 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 a29efedef..fc7f0c26a 100644
--- a/src/plugins/archive/libarchive_archive.h
+++ b/src/plugins/archive/libarchive_archive.h
@@ -2,7 +2,7 @@
 
 /*
  * Claws Mail -- a GTK based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2018 Michael Rasmussen and the Claws Mail Team
+ * 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