From 6c1ec11d33f5188c792d99977760c71a0215ddad Mon Sep 17 00:00:00 2001 From: Thomas Roessler Date: Wed, 29 Mar 2000 09:42:46 +0000 Subject: [PATCH] Various little patches from Gero Treuner. --- doc/Makefile.in | 6 +++--- doc/manual.sgml.head | 3 ++- init.c | 16 ++++++++++++++-- po/de.po | 5 +++++ thread.c | 18 +++++++----------- 5 files changed, 31 insertions(+), 17 deletions(-) diff --git a/doc/Makefile.in b/doc/Makefile.in index 2efef584..20284c13 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -58,12 +58,12 @@ srcdir_DOCFILES = PGP-Notes.txt applying-patches.txt \ topsrcdir_DOCFILES = COPYRIGHT GPL INSTALL ChangeLog \ README NEWS TODO README.SECURITY README.SSL README.UPGRADE -all: try-html try-txt muttrc.man +all: muttrc.man try-html try-txt -try-html: +try-html: ../makedoc test -f manual.html || $(MAKE) manual.html || cp $(srcdir)/manual*.html ./ -try-txt: +try-txt: ../makedoc test -f manual.txt || $(MAKE) manual.txt || cp $(srcdir)/manual.txt ./ install: all diff --git a/doc/manual.sgml.head b/doc/manual.sgml.head index d9031228..541f2651 100644 --- a/doc/manual.sgml.head +++ b/doc/manual.sgml.head @@ -1147,7 +1147,8 @@ command line with the data); - rc = -1; + if (--rc < -MAXERRS) + break; } + else + if (rc < 0) + rc = -1; } FREE (&token.data); safe_free ((void **) &linebuf); @@ -1199,11 +1205,17 @@ static int source_rc (const char *rcfile, BUFFER *err) if (pid != -1) mutt_wait_filter (pid); if (rc) + { /* the muttrc source keyword */ - snprintf (err->data, err->dsize, _("source: errors in %s"), rcfile); + snprintf (err->data, err->dsize, rc >= -MAXERRS ? _("source: errors in %s") + : _("source: reading aborted due too many errors in %s"), rcfile); + rc = -1; + } return (rc); } +#undef MAXERRS + static int parse_source (BUFFER *tmp, BUFFER *s, unsigned long data, BUFFER *err) { char path[_POSIX_PATH_MAX]; diff --git a/po/de.po b/po/de.po index 4c1e6800..554d25d3 100644 --- a/po/de.po +++ b/po/de.po @@ -1420,6 +1420,11 @@ msgstr "Fehler in %s, Zeile %d: %s" msgid "source: errors in %s" msgstr "source: Fehler in %s" +#: init.c:1210 +#, c-format +msgid "source: reading aborted due too many errors in %s" +msgstr "source: Lesevorgang abgebrochen, zu viele Fehler in %s" + #: init.c:1213 #, c-format msgid "source: error at %s" diff --git a/thread.c b/thread.c index cbb6e6e3..3c12c28d 100644 --- a/thread.c +++ b/thread.c @@ -149,7 +149,7 @@ void mutt_linearize_tree (CONTEXT *ctx, int linearize) char *pfx = NULL, *mypfx = NULL, *arrow = NULL, *myarrow = NULL; char corner = Sort & SORT_REVERSE ? M_TREE_ULCORNER : M_TREE_LLCORNER; int depth = 0, start_depth = 0, max_depth = 0, max_width = 0; - int nextdisp = 0; + int nextdisp = 0, visible; HEADER *tree = ctx->tree; HEADER **array = ctx->hdrs + (Sort & SORT_REVERSE ? ctx->msgcount - 1 : 0); @@ -161,7 +161,7 @@ void mutt_linearize_tree (CONTEXT *ctx, int linearize) FOREVER { - if (tree->virtual >= 0 || (tree->collapsed && (!ctx->pattern || tree->limited))) + if ((visible = (tree->virtual >= 0 || (tree->collapsed && (!ctx->pattern || tree->limited))))) tree->display_subject = need_display_subject (ctx, tree); if (depth >= max_depth) @@ -173,12 +173,8 @@ void mutt_linearize_tree (CONTEXT *ctx, int linearize) (max_width += 16) * 2 * sizeof (char)); safe_free ((void **) &tree->tree); - if (!depth) - { - if (tree->virtual >= 0 || (tree->collapsed && (!ctx->pattern || tree->limited))) - tree->tree = safe_strdup (""); - } - else + + if (depth) { myarrow = arrow + (depth - start_depth - (start_depth ? 0 : 1)) * 2; nextdisp = is_next_displayed (ctx, tree); @@ -188,13 +184,13 @@ void mutt_linearize_tree (CONTEXT *ctx, int linearize) else myarrow[0] = M_TREE_HIDDEN; myarrow[1] = tree->fake_thread ? M_TREE_STAR : M_TREE_HLINE; - if (tree->virtual >= 0 || (tree->collapsed && (!ctx->pattern || tree->limited))) + if (visible) { myarrow[2] = M_TREE_RARROW; myarrow[3] = 0; } - if (tree->virtual >= 0 || (tree->collapsed && (!ctx->pattern || tree->limited))) + if (visible) { tree->tree = safe_malloc ((2 + depth * 2) * sizeof (char)); if (start_depth > 1) @@ -223,7 +219,7 @@ void mutt_linearize_tree (CONTEXT *ctx, int linearize) mypfx[1] = M_TREE_SPACE; } depth++; - if (tree->virtual >= 0 || (tree->collapsed && (!ctx->pattern || tree->limited))) + if (visible) start_depth = depth; tree = tree->child; } -- 2.40.0