+2006-11-14 [paul] 2.6.0cvs47
+
+ * src/Makefile.am
+ Fix make DESTDIR=...
+ * src/mbox.c
+ Optimise speed
+ * src/plugins/pgpinline/pgpinline.c
+ Probably fix bug 1061
+
2006-11-14 [paul] 2.6.0cvs46
* po/Makevars
( cvs diff -u -r 1.382.2.329 -r 1.382.2.330 src/compose.c; cvs diff -u -r 1.149.2.61 -r 1.149.2.62 src/inc.c; cvs diff -u -r 1.94.2.109 -r 1.94.2.110 src/messageview.c; cvs diff -u -r 1.101.2.32 -r 1.101.2.33 src/news.c; cvs diff -u -r 1.56.2.45 -r 1.56.2.46 src/pop.c; cvs diff -u -r 1.150.2.82 -r 1.150.2.83 src/procmsg.c; cvs diff -u -r 1.3.2.22 -r 1.3.2.23 src/ssl_manager.c; cvs diff -u -r 1.9.2.43 -r 1.9.2.44 src/gtk/gtkaspell.c; cvs diff -u -r 1.1.2.36 -r 1.1.2.37 src/plugins/pgpcore/sgpgme.c; ) > 2.6.0cvs44.patchset
( cvs diff -u -r 1.17.2.12 -r 1.17.2.13 po/ru.po; ) > 2.6.0cvs45.patchset
( cvs diff -u -r 1.1.4.4 -r 1.1.4.5 po/Makevars; cvs diff -u -r 1.155.2.47 -r 1.155.2.48 src/Makefile.am; cvs diff -u -r 1.25.2.29 -r 1.25.2.30 src/stock_pixmap.c; cvs diff -u -r 1.18.2.20 -r 1.18.2.21 src/stock_pixmap.h; cvs diff -u -r 1.4.2.38 -r 1.4.2.39 src/gtk/about.c; diff -u /dev/null src/pixmaps/active.xpm; diff -u /dev/null src/pixmaps/inactive.xpm; ) > 2.6.0cvs46.patchset
+( cvs diff -u -r 1.155.2.48 -r 1.155.2.49 src/Makefile.am; cvs diff -u -r 1.28.2.30 -r 1.28.2.31 src/mbox.c; cvs diff -u -r 1.1.2.23 -r 1.1.2.24 src/plugins/pgpinline/pgpinline.c; ) > 2.6.0cvs47.patchset
MICRO_VERSION=0
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=46
+EXTRA_VERSION=47
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=
bin_PROGRAMS = claws-mail
install-exec-hook:
- @rm -f $(bindir)/sylpheed-claws
- @ln -s claws-mail $(bindir)/sylpheed-claws
+ @rm -f $(DESTDIR)$(bindir)/sylpheed-claws
+ @ln -s claws-mail $(DESTDIR)$(bindir)/sylpheed-claws
claws_mail_SOURCES = \
account.c \
# include "config.h"
#endif
-#include "defs.h"
+#define _GNU_SOURCE
+#include <stdio.h>
+
+#include "defs.h"
#include <glib.h>
#include <glib/gi18n.h>
-#include <stdio.h>
+#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <fcntl.h>
#define MSGBUFSIZE 8192
+#ifdef HAVE_FGETS_UNLOCKED
+#define SC_FGETS fgets_unlocked
+#define SC_FPUTS fputs_unlocked
+#define SC_FPUTC fputc_unlocked
+#else
+#define SC_FGETS fgets
+#define SC_FPUTS fputs
+#define SC_FPUTC fputc
+#endif
+
#define FPUTS_TO_TMP_ABORT_IF_FAIL(s) \
{ \
lines++; \
return -1;
}
+#ifdef HAVE_FGETS_UNLOCKED
+ flockfile(mbox_fp);
+#endif
+
statusbar_print_all(_("Exporting to mbox..."));
for (cur = mlist; cur != NULL; cur = cur->next) {
int len;
continue;
}
+#ifdef HAVE_FGETS_UNLOCKED
+ flockfile(msg_fp);
+#endif
strncpy2(buf,
msginfo->from ? msginfo->from :
cur_account && cur_account->address ?
buf[0] = '\0';
/* write email to mboxrc */
- while (fgets(buf, sizeof(buf), msg_fp) != NULL) {
+ while (SC_FGETS(buf, sizeof(buf), msg_fp) != NULL) {
/* quote any From, >From, >>From, etc., according to mbox format specs */
int offset;
offset++;
}
if (!strncmp(buf+offset, "From ", 5))
- fputc('>', mbox_fp);
- fputs(buf, mbox_fp);
+ SC_FPUTC('>', mbox_fp);
+ SC_FPUTS(buf, mbox_fp);
}
/* force last line to end w/ a newline */
if (len > 0) {
len--;
if ((buf[len] != '\n') && (buf[len] != '\r'))
- fputc('\n', mbox_fp);
+ SC_FPUTC('\n', mbox_fp);
}
/* add a trailing empty line */
- fputc('\n', mbox_fp);
+ SC_FPUTC('\n', mbox_fp);
+#ifdef HAVE_FGETS_UNLOCKED
+ funlockfile(msg_fp);
+#endif
fclose(msg_fp);
statusbar_progress_all(msgs++,total, 500);
if (msgs%500 == 0)
statusbar_progress_all(0,0,0);
statusbar_pop_all();
+#ifdef HAVE_FGETS_UNLOCKED
+ funlockfile(mbox_fp);
+#endif
fclose(mbox_fp);
return 0;
mlist = folder_item_get_msg_list(src);
+ folder_item_update_freeze();
ret = export_list_to_mbox(mlist, mbox);
+ folder_item_update_thaw();
procmsg_msg_list_free(mlist);
PrivacyDataPGP *data = NULL;
gchar *textdata = NULL, *tmp = NULL;
gpgme_data_t plain = NULL, cipher = NULL;
- gpgme_ctx_t ctx;
gpgme_error_t err;
g_return_val_if_fail(mimeinfo != NULL, 0);
textdata = g_strdup(tmp);
g_free(tmp);
- if ((err = gpgme_new(&ctx)) != GPG_ERR_NO_ERROR) {
+ if ((err = gpgme_new(&data->ctx)) != GPG_ERR_NO_ERROR) {
debug_print(("Couldn't initialize GPG context, %s"), gpgme_strerror(err));
privacy_set_error(_("Couldn't initialize GPG context, %s"), gpgme_strerror(err));
return 0;
}
- gpgme_set_textmode(ctx, 1);
- gpgme_set_armor(ctx, 1);
+ gpgme_set_textmode(data->ctx, 1);
+ gpgme_set_armor(data->ctx, 1);
gpgme_data_new_from_mem(&plain, textdata, (size_t)strlen(textdata), 1);
gpgme_data_new(&cipher);
- data->sigstatus = sgpgme_verify_signature(ctx, plain, NULL, cipher);
+ data->sigstatus = sgpgme_verify_signature(data->ctx, plain, NULL, cipher);
gpgme_data_release(plain);
gpgme_data_release(cipher);
- gpgme_release(ctx);
-
g_free(textdata);
return 0;