From 2891636277fb96f992eaf08b4e6acc11ca9ea57c Mon Sep 17 00:00:00 2001 From: Pierre Habouzit Date: Sat, 4 Nov 2006 23:53:59 +0100 Subject: [PATCH] drop oldies Signed-off-by: Pierre Habouzit --- configure.ac | 23 ++------------ main.c | 5 --- mh.c | 89 ---------------------------------------------------- 3 files changed, 2 insertions(+), 115 deletions(-) diff --git a/configure.ac b/configure.ac index 358a853..3d3b904 100644 --- a/configure.ac +++ b/configure.ac @@ -652,27 +652,8 @@ if test x$ac_cv_dirent_d_ino = xyes ; then fi AC_MSG_RESULT($ac_cv_dirent_d_ino) -dnl This may look cumbersome -- please keep it that way, so we can -dnl quickly change the default to "yes" again. -mutt_cv_inodesort=no -AC_ARG_ENABLE(inodesort, AC_HELP_STRING([--enable-inodesort], [Read files in maildir folders sorted by inode.]), - [if test x$enableval = xyes -a x$ac_cv_dirent_d_ino = xyes ; then mutt_cv_inodesort=yes; fi]) - -if test $mutt_cv_inodesort = yes; then - AC_DEFINE(USE_INODESORT, 1, [ Define to sort files in a maildir by inode number. ]) -fi - -mutt_cv_warnings=yes -AC_ARG_ENABLE(warnings, AC_HELP_STRING([--disable-warnings], [Turn off compiler warnings (not recommended)]), -[if test $enableval = no; then - mutt_cv_warnings=no -fi]) - -if test x$GCC = xyes -a $mutt_cv_warnings = yes; then - CFLAGS="-Wall -pedantic $CFLAGS" -fi - -AC_ARG_ENABLE(nfs-fix, AC_HELP_STRING([--enable-nfs-fix], [Work around an NFS with broken attributes caching]), +AC_ARG_ENABLE(nfs-fix, AC_HELP_STRING([--enable-nfs-fix], + [Work around an NFS with broken attributes caching]), [if test x$enableval = xyes; then AC_DEFINE(NFS_ATTRIBUTE_HACK,1, [Define if you have problems with mutt not detecting diff --git a/main.c b/main.c index 2e29d02..6f318e9 100644 --- a/main.c +++ b/main.c @@ -294,11 +294,6 @@ static void show_version (void) #else "-USE_FLOCK " #endif -#ifdef USE_INODESORT - "+USE_INODESORT " -#else - "-USE_INODESORT " -#endif #ifdef USE_HCACHE "+USE_HCACHE " #else diff --git a/mh.c b/mh.c index a013376..63c7bd7 100644 --- a/mh.c +++ b/mh.c @@ -56,9 +56,6 @@ struct maildir { HEADER *h; char *canon_fname; unsigned header_parsed:1; -#ifdef USE_INODESORT - ino_t inode; -#endif /* USE_INODESORT */ struct maildir *next; }; @@ -649,9 +646,6 @@ static int maildir_parse_entry (CONTEXT * ctx, struct maildir ***last, entry = p_new(struct maildir, 1); entry->h = h; entry->header_parsed = (ctx->magic == M_MH); -#ifdef USE_INODESORT - entry->inode = inode; -#endif /* USE_INODESORT */ **last = entry; *last = &entry->next; @@ -760,85 +754,6 @@ static int maildir_move_to_context (CONTEXT * ctx, struct maildir **md) return r; } -#ifdef USE_INODESORT -/* - * Merge two maildir lists according to the inode numbers. - */ -static struct maildir *maildir_merge_inode (struct maildir *left, - struct maildir *right) -{ - struct maildir *head; - struct maildir *tail; - - if (left && right) { - if (left->inode < right->inode) { - head = left; - left = left->next; - } - else { - head = right; - right = right->next; - } - } - else { - if (left) - return left; - else - return right; - } - - tail = head; - - while (left && right) { - if (left->inode < right->inode) { - tail->next = left; - left = left->next; - } - else { - tail->next = right; - right = right->next; - } - tail = tail->next; - } - - if (left) { - tail->next = left; - } - else { - tail->next = right; - } - - return head; -} - -/* - * Sort maildir list according to inode. - */ -static struct maildir *maildir_sort_inode (struct maildir *list) -{ - struct maildir *left = list; - struct maildir *right = list; - - if (!list || !list->next) { - return list; - } - - list = list->next; - while (list && list->next) { - right = right->next; - list = list->next->next; - } - - list = right; - right = right->next; - list->next = 0; - - left = maildir_sort_inode (left); - right = maildir_sort_inode (right); - return maildir_merge_inode (left, right); -} -#endif /* USE_INODESORT */ - #ifdef USE_HCACHE static size_t maildir_hcache_keylen (const char *fn) { @@ -945,10 +860,6 @@ static int _mh_read_dir (CONTEXT * ctx, const char *subdir) mhs_free_sequences (&mhs); } -#ifdef USE_INODESORT - md = maildir_sort_inode (md); -#endif /* USE_INODESORT */ - if (ctx->magic == M_MAILDIR) maildir_delayed_parsing (ctx, md); -- 2.20.1