Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports
Path: blob/main/mail/balsa/files/patch-libbalsa_mailbox_maildir.c
18157 views
1
--- libbalsa/mailbox_maildir.c.orig 2023-01-06 18:47:11 UTC
2
+++ libbalsa/mailbox_maildir.c
3
@@ -23,6 +23,8 @@
4
#endif /* HAVE_CONFIG_H */
5
6
7
+#include <sys/types.h>
8
+#include <sys/stat.h>
9
#include <unistd.h>
10
#include <fcntl.h>
11
#include <errno.h>
12
@@ -52,7 +54,7 @@
13
/* The message's order when parsing; needed for saving the message
14
* tree in a form that will match the msgnos when the mailbox is
15
* reopened. */
16
- guint fileno;
17
+ guint mi_fileno;
18
};
19
#define REAL_FLAGS(flags) ((flags) & LIBBALSA_MESSAGE_FLAGS_REAL)
20
#define FLAGS_REALLY_DIFFER(orig_flags, flags) \
21
@@ -152,7 +154,7 @@
22
libbalsa_mailbox_local_class->check_files = lbm_maildir_check_files;
23
libbalsa_mailbox_local_class->set_path = lbm_maildir_set_path;
24
libbalsa_mailbox_local_class->remove_files = lbm_maildir_remove_files;
25
- libbalsa_mailbox_local_class->fileno = lbm_maildir_fileno;
26
+ libbalsa_mailbox_local_class->sti_fileno = lbm_maildir_fileno;
27
libbalsa_mailbox_local_class->get_info = lbm_maildir_get_info;
28
libbalsa_mailbox_local_class->add_message = lbm_maildir_add_message;
29
}
30
@@ -369,7 +371,7 @@
31
static void
32
lbm_maildir_parse(LibBalsaMailboxMaildir *mdir,
33
const gchar *subdir,
34
- guint *fileno)
35
+ guint *md_fileno)
36
{
37
const gchar *local_path;
38
gchar *path;
39
@@ -420,12 +422,12 @@
40
msg_info->key=key;
41
msg_info->filename=g_strdup(filename);
42
msg_info->local_info.flags = msg_info->orig_flags = flags;
43
- msg_info->fileno = 0;
44
+ msg_info->mi_fileno = 0;
45
}
46
msg_info->subdir = subdir;
47
- if (!msg_info->fileno)
48
+ if (!msg_info->mi_fileno)
49
/* First time we saw this key. */
50
- msg_info->fileno = ++*fileno;
51
+ msg_info->mi_fileno = ++*md_fileno;
52
}
53
g_dir_close(dir);
54
}
55
@@ -433,21 +435,21 @@
56
static void
57
lbm_maildir_parse_subdirs(LibBalsaMailboxMaildir * mdir)
58
{
59
- guint msgno, fileno = 0;
60
+ guint msgno, md_fileno = 0;
61
62
for (msgno = mdir->msgno_2_msg_info->len; msgno > 0; --msgno) {
63
struct message_info *msg_info =
64
message_info_from_msgno(mdir, msgno);
65
- msg_info->fileno = 0;
66
+ msg_info->mi_fileno = 0;
67
}
68
69
- lbm_maildir_parse(mdir, "cur", &fileno);
70
+ lbm_maildir_parse(mdir, "cur", &md_fileno);
71
/* We parse "new" after "cur", so that any recent messages will have
72
* higher msgnos than any current messages. That ensures that the
73
* message tree saved by LibBalsaMailboxLocal is still valid, and
74
* that the new messages will be inserted correctly into the tree by
75
* libbalsa_mailbox_local_add_messages. */
76
- lbm_maildir_parse(mdir, "new", &fileno);
77
+ lbm_maildir_parse(mdir, "new", &md_fileno);
78
}
79
80
static gboolean
81
@@ -849,7 +851,7 @@
82
msg_info =
83
message_info_from_msgno((LibBalsaMailboxMaildir *) local, msgno);
84
85
- return msg_info->fileno;
86
+ return msg_info->mi_fileno;
87
}
88
89
static LibBalsaMailboxLocalMessageInfo *
90
91