2006-09-30 [colin] 2.5.2cvs24
* src/msgcache.c Reenable mmaped reads (*not* writes!) * src/procmsg.c Don't destroy and recreate hashtables just for fun * src/common/utils.c Remove useless reply prefixes (it's case unsensitive)
This commit is contained in:
parent
23170423c3
commit
1e98afac67
6 changed files with 25 additions and 12 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
2006-09-30 [colin] 2.5.2cvs24
|
||||
|
||||
* src/msgcache.c
|
||||
Reenable mmaped reads (*not* writes!)
|
||||
* src/procmsg.c
|
||||
Don't destroy and recreate hashtables just
|
||||
for fun
|
||||
* src/common/utils.c
|
||||
Remove useless reply prefixes (it's case
|
||||
unsensitive)
|
||||
|
||||
2006-09-30 [wwp] 2.5.2cvs23
|
||||
|
||||
* tools/fix_date.sh
|
||||
|
|
|
@ -1937,3 +1937,4 @@
|
|||
( cvs diff -u -r 1.65.2.49 -r 1.65.2.50 src/codeconv.c; cvs diff -u -r 1.96.2.151 -r 1.96.2.152 src/textview.c; ) > 2.5.2cvs21.patchset
|
||||
( cvs diff -u -r 1.4.2.4 -r 1.4.2.5 src/matcher_parser.h; cvs diff -u -r 1.25.2.17 -r 1.25.2.18 src/matcher_parser_parse.y; cvs diff -u -r 1.59.2.49 -r 1.59.2.50 src/prefs_filtering.c; cvs diff -u -r 1.5.2.10 -r 1.5.2.11 src/statusbar.c; cvs diff -u -r 1.15.2.34 -r 1.15.2.35 src/summary_search.c; cvs diff -u -r 1.395.2.257 -r 1.395.2.258 src/summaryview.c; cvs diff -u -r 1.1.2.45 -r 1.1.2.46 src/gtk/quicksearch.c; cvs diff -u -r 1.1.2.7 -r 1.1.2.8 src/gtk/quicksearch.h; ) > 2.5.2cvs22.patchset
|
||||
( cvs diff -u -r 1.1.2.2 -r 1.1.2.3 tools/fix_date.sh; ) > 2.5.2cvs23.patchset
|
||||
( cvs diff -u -r 1.16.2.40 -r 1.16.2.41 src/msgcache.c; cvs diff -u -r 1.150.2.80 -r 1.150.2.81 src/procmsg.c; cvs diff -u -r 1.36.2.80 -r 1.36.2.81 src/common/utils.c; ) > 2.5.2cvs24.patchset
|
||||
|
|
|
@ -11,7 +11,7 @@ MINOR_VERSION=5
|
|||
MICRO_VERSION=2
|
||||
INTERFACE_AGE=0
|
||||
BINARY_AGE=0
|
||||
EXTRA_VERSION=23
|
||||
EXTRA_VERSION=24
|
||||
EXTRA_RELEASE=
|
||||
EXTRA_GTK2_VERSION=
|
||||
|
||||
|
|
|
@ -3661,7 +3661,6 @@ int subject_get_prefix_length(const gchar *subject)
|
|||
/*!< Array with allowable reply prefixes regexps. */
|
||||
static const gchar * const prefixes[] = {
|
||||
"Re\\:", /* "Re:" */
|
||||
"RE\\:", /* "RE:" (outlook) */
|
||||
"Re\\[[1-9][0-9]*\\]\\:", /* "Re[XXX]:" (non-conforming news mail clients) */
|
||||
"Antw\\:", /* "Antw:" (Dutch / German Outlook) */
|
||||
"Aw\\:", /* "Aw:" (German) */
|
||||
|
@ -3671,11 +3670,8 @@ int subject_get_prefix_length(const gchar *subject)
|
|||
"Enc\\:", /* "Enc:" Forward (Brazilian Outlook) */
|
||||
"Odp\\:", /* "Odp:" Re (Polish Outlook) */
|
||||
"Rif\\:", /* "Rif:" (Italian Outlook) */
|
||||
"SV\\:", /* "SV" (Norwegian) */
|
||||
"Sv\\:", /* "Sv" (Norwegian) */
|
||||
"VS\\:", /* "VS" (Norwegian) */
|
||||
"Vs\\:", /* "Vs" (Norwegian) */
|
||||
"AD\\:", /* "AD" (Norwegian) */
|
||||
"Ad\\:", /* "Ad" (Norwegian) */
|
||||
"\347\255\224\345\244\215\\:" /* "Re" (Chinese, UTF-8) */
|
||||
/* add more */
|
||||
|
|
|
@ -50,7 +50,8 @@
|
|||
((x[2]&0xff) << 16) | \
|
||||
((x[3]&0xff) << 24))
|
||||
|
||||
static gboolean msgcache_use_mmap = FALSE;
|
||||
static gboolean msgcache_use_mmap_read = TRUE;
|
||||
static gboolean msgcache_use_mmap_write = FALSE;
|
||||
|
||||
#else
|
||||
#define bswap_32(x) (x)
|
||||
|
@ -67,7 +68,8 @@ static gboolean msgcache_use_mmap = FALSE;
|
|||
((x[2]&0xff) << 16) | \
|
||||
((x[3]&0xff) << 24))
|
||||
|
||||
static gboolean msgcache_use_mmap = FALSE;
|
||||
static gboolean msgcache_use_mmap_read = TRUE;
|
||||
static gboolean msgcache_use_mmap_write = FALSE;
|
||||
#endif
|
||||
|
||||
static gboolean swapping = TRUE;
|
||||
|
@ -601,7 +603,7 @@ MsgCache *msgcache_read_cache(FolderItem *item, const gchar *cache_file)
|
|||
|
||||
cache = msgcache_new();
|
||||
|
||||
if (msgcache_use_mmap == TRUE) {
|
||||
if (msgcache_use_mmap_read == TRUE) {
|
||||
if (fstat(fileno(fp), &st) >= 0)
|
||||
map_len = st.st_size;
|
||||
else
|
||||
|
@ -764,7 +766,7 @@ void msgcache_read_mark(MsgCache *cache, const gchar *mark_file)
|
|||
}
|
||||
debug_print("reading %sswapped mark file.\n", swapping?"":"un");
|
||||
|
||||
if (msgcache_use_mmap) {
|
||||
if (msgcache_use_mmap_read) {
|
||||
if (fstat(fileno(fp), &st) >= 0)
|
||||
map_len = st.st_size;
|
||||
else
|
||||
|
@ -993,7 +995,7 @@ gint msgcache_write(const gchar *cache_file, const gchar *mark_file, MsgCache *c
|
|||
|
||||
write_fps.cache_size = ftell(write_fps.cache_fp);
|
||||
write_fps.mark_size = ftell(write_fps.mark_fp);
|
||||
if (msgcache_use_mmap && cache->memusage > 0) {
|
||||
if (msgcache_use_mmap_write && cache->memusage > 0) {
|
||||
map_len = cache->memusage;
|
||||
if (ftruncate(fileno(write_fps.cache_fp), (off_t)map_len) == 0) {
|
||||
cache_data = mmap(NULL, map_len, PROT_WRITE, MAP_SHARED,
|
||||
|
|
|
@ -2034,11 +2034,14 @@ gboolean parentmsgs_hash_remove(gpointer key,
|
|||
gboolean procmsg_msg_has_flagged_parent(MsgInfo *info, MsgPermFlags perm_flags)
|
||||
{
|
||||
gboolean result;
|
||||
GHashTable *parentmsgs = g_hash_table_new(NULL, NULL);
|
||||
static GHashTable *parentmsgs = NULL;
|
||||
|
||||
if (parentmsgs == NULL)
|
||||
parentmsgs = g_hash_table_new(NULL, NULL);
|
||||
|
||||
result = procmsg_msg_has_flagged_parent_real(info, perm_flags, parentmsgs);
|
||||
g_hash_table_foreach_remove(parentmsgs, parentmsgs_hash_remove, NULL);
|
||||
g_hash_table_destroy(parentmsgs);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue