]> granicus.if.org Git - neomutt/log
neomutt
6 years agodoc/neomuttrc.man.{head,tail}: Catch up overlooked parts
Floyd Anderson [Tue, 20 Mar 2018 17:43:11 +0000 (18:43 +0100)]
doc/neomuttrc.man.{head,tail}: Catch up overlooked parts

6 years agodoc/neomuttrc.man.head: Small tidying
Floyd Anderson [Tue, 20 Mar 2018 16:11:48 +0000 (17:11 +0100)]
doc/neomuttrc.man.head: Small tidying

6 years agodoc/neomuttrc.man.head: Add and fix command definitions
Floyd Anderson [Tue, 20 Mar 2018 15:54:16 +0000 (16:54 +0100)]
doc/neomuttrc.man.head: Add and fix command definitions

These command definitions based on generated manual.xml file.

6 years agodoc/neomuttrc.man.head: Sort commands
Floyd Anderson [Tue, 20 Mar 2018 11:27:36 +0000 (12:27 +0100)]
doc/neomuttrc.man.head: Sort commands

Sorting based on (but not entirely) generated manual.xml file.
Current exceptions are:

  • append-hook, close-hook and open-hook
  • fcc-hook, save-hook and fcc-save-hook
  • lists, unlists, subscribe and unsubscribe

because they are contextually-related commands and therefore grouped and
described together.

Further changes (consistency/readability):

  • macro .TP replaced with .PP or .IP (normal/indented paragraph)
  • command definition(s) enclosed with .nf and .fi (Nofill/Fill mode)

6 years agomerge: sanitize usage of gettext
Richard Russon [Tue, 24 Apr 2018 23:32:45 +0000 (00:32 +0100)]
merge: sanitize usage of gettext

 * I18N: ncrypt/smime.c: Remove outdated comment
 * I18N: recvattach.c: Add comment to translation string
 * I18N: Document the choice strings for translators
 * I18N: Use _() instead of N_() for marking strings for translation
 * I18N: Combine split translatable strings into one translatable string
 * I18N: ncrypt/smime.c: Translate strings and document them
 * I18N: Define ngettext macro when compiling without gettext support
 * I18N: Use ngettext to choose correct plural form
 * I18N: Use ngettext to select plural form for a string
 * I18N: Choose correct plural form in recvcmd.c
 * I18N: No need to translate "%s: %s"
 * I18N: Choose correct plural form in commands.c
 * I18N: Choose correct plural form and avoid gluing translations
 * I18N: commands.c: Do not glue translations together
 * I18N: handler.c: Do not glue translations together
 * I18N: handler.c: Pass the complete line to the translators
 * I18N: handler.c: Pass the complete line to the translators
 * I18N: handler.c: Pass the complete string to the translator
 * I18N: handler.c: Pass the complete string to the translator
 * I18N: handler.c: Pass the complete string to the translator
 * I18N: Unify printed string on signal caught
 * I18N: Combine help string into a single string for translation
 * I18N: version.c: Pass the complete license string to the translator
 * I18N: po/*.po updated to match new master
 * I18N: Update po files
 * I18N: Update po files
 * I18N: Update po files
 * I18N: Update po files
 * I18N: Update po files
 * I18N: Update po files
 * I18N: Update po files
 * I18N: Update po files to new messages
 * I18N: Update po files
 * I18N: Update po files for handler.c
 * I18N: Update po files for handler.c
 * I18N: Update po files for handler.c
 * I18N: Update po files for signal.c and mutt/signal.c
 * I18N: Update po files
 * I18N: Update po files
 * L10N: Review British English translation
 * add missing state_mark_attach()

6 years agoadd missing state_mark_attach() 1156/head
Richard Russon [Tue, 24 Apr 2018 23:12:24 +0000 (00:12 +0100)]
add missing state_mark_attach()

6 years agoL10N: Review British English translation
Reis Radomil [Sun, 22 Apr 2018 04:16:05 +0000 (04:16 +0000)]
L10N: Review British English translation

6 years agoI18N: Update po files
Reis Radomil [Sun, 22 Apr 2018 04:16:05 +0000 (04:16 +0000)]
I18N: Update po files

Merge the two old separate translations into a single translation of the
new string.

6 years agoI18N: Update po files
Reis Radomil [Sun, 22 Apr 2018 04:16:04 +0000 (04:16 +0000)]
I18N: Update po files

We merged the translations of the individual strings to a translation of
the new string. Note that for some strings the translation did not
exists. In that case we used the original English version, which yields
a mixture between English and the other language.

6 years agoI18N: Update po files for signal.c and mutt/signal.c
Reis Radomil [Sun, 22 Apr 2018 04:16:04 +0000 (04:16 +0000)]
I18N: Update po files for signal.c and mutt/signal.c

The original string was changed from "Caught signal %s... Exiting.\n"
to include also the signal number:

   "Caught signal %d (%s) ...  Exiting.\n"

We adapted the translation by inserting " (%s)" after "%d" in the
translation of "Caught signal %d... Exiting.\n".

6 years agoI18N: Update po files for handler.c
Reis Radomil [Sun, 22 Apr 2018 04:16:04 +0000 (04:16 +0000)]
I18N: Update po files for handler.c

Combine the old translations of the chopped strings

    "[-- This is an attachment "]

    "[-- %s/%s is unsupported "]

    "(use '%s' to view this part)"]

    "(need 'view-attachments' bound to key!)"]

into a translation for the following six strings. These strings have
also a " --]\n" appended at the end.

    "[-- This is an attachment (use '%3$s' to view this part) --]\n"

    "[-- %s/%s is unsupported (use '%s' to view this part) --]\n"

    "[-- This is an attachment (need 'view-attachments' bound to key!) --]\n"

    "[-- %s/%s is unsupported (need 'view-attachments' bound to key!) --]\n"

    "[-- This is an attachment --]\n"

    "[-- %s/%s is unsupported --]\n"

6 years agoI18N: Update po files for handler.c
Reis Radomil [Sun, 22 Apr 2018 04:16:03 +0000 (04:16 +0000)]
I18N: Update po files for handler.c

Combine the old translations of the chopped strings

    s1 =
    "[-- This %s/%s attachment is not included, --]\n"

    s2 =
    "[-- and the indicated access-type %s is unsupported --]\n"

into one translation for the single string

    s_new =
    "[-- This %s/%s attachment is not included, --]\n"
    "[-- and the indicated access-type %s is unsupported --]\n"

Four translators (Galician (gl), Lithuanian (lt), Slovak (sk), Taiwanese
Mandarin (zh_WT)) seemed to have translated the old s2 as "s1 s2", so
the translation of s_new would have a doubling at the start. In these
versions we modified the translation to not have this doubling.

6 years agoI18N: Update po files for handler.c
Reis Radomil [Sun, 22 Apr 2018 04:16:03 +0000 (04:16 +0000)]
I18N: Update po files for handler.c

Combine the old translations of the chopped strings

    s1 =
    "[-- This %s/%s attachment is not included, --]\n"

    s2 =
    "[-- and the indicated external source has --]\n"
    "[-- expired. --]\n"

into one translation for the single string

    s_new =
    "[-- This %s/%s attachment is not included, --]\n"
    "[-- and the indicated external source has --]\n"
    "[-- expired. --]\n"

Four translators (Galician (gl), Lithuanian (lt), Slovak (sk), Taiwanese
Mandarin (zh_WT)) seemed to have translated the old s2 as "s1 s2", so
the translation of s_new would have a doubling at the start. In these
versions we modified the translation to not have this doubling.

6 years agoI18N: Update po files
Reis Radomil [Sun, 22 Apr 2018 04:16:02 +0000 (04:16 +0000)]
I18N: Update po files

The old translations where build together in the C code. Now we pass the
complete string to gettext. Update the po files and combine the old
translations into new ones.

In the old version the strings translated where

    "[-- This %s/%s attachment "

    "(size %s bytes) "

    "has been deleted --]\n"

    "[-- on %s --]\n"

The four new strings are

    "[-- This %s/%s attachment (size %s bytes) has been deleted --]\n"
    "[-- on %s --]\n"

    "[-- This %s/%s attachment (size %s bytes) has been deleted --]\n"

    "[-- This %s/%s attachment has been deleted --]\n
    "[-- on %4$s --]\n"

    "[-- This %s/%s attachment has been deleted --]\n"

6 years agoI18N: Update po files to new messages
Reis Radomil [Sun, 22 Apr 2018 04:16:02 +0000 (04:16 +0000)]
I18N: Update po files to new messages

The old translation was for "[-- Attachment #%d" and was extended in the
C code by either " --]" or ": %s --]". Now we translate the
complete string.

Update the po files to reflect this. Reuse the old translation and
append " --]" or ": %s --]" to it, respectively.

6 years agoI18N: Update po files
Reis Radomil [Sun, 22 Apr 2018 04:16:01 +0000 (04:16 +0000)]
I18N: Update po files

Join the old translations of

    "[-- Alternative Type #%d: "
    "[-- Type: "
    "%s/%s%s%s, Encoding: %s, Size: %s --]\n"

together to the translations of

    "[-- Alternative Type #%d: %s/%s%s%s, Encoding: %s, Size: %s --]\n"
    "[-- Type: %s/%s%s%s, Encoding: %s, Size: %s --]\n"

Some notes:

* Some translators translated "%s/%... ---]" with "[-- %s/%...  --]"
  (note the leading "[--" in the translation).  Thus, the new
  translation is "[-- .. [-- ... --]" which is kinda odd but still the
  same string as would previously be displayed to the user.

* The new string "[-- Alternative Type #%d: ... --]" has an additional
  parameter "%d". Some translators ignored it in their translation of
  the old "[-- Alternative Type #%d: " (by not translating it), so that
  the index for the '%s' would be off.

  This applies to the majority of translations. However, most of them
  are out of date and do not have enough '%s', to event print the old
  string correctly, i.e. "A %s%s B %s" was translated with "A %s B %s".
  We ignored those languages as a translator must take care of this.

  There were two exceptions, however, Polish (pl) and Turkish (tr).
  We used the untranslated version of "[-- Alternative Type #%d: " and
  "[-- Type: " and appended it to the start of the translation.

6 years agoI18N: Update po files
Reis Radomil [Sun, 22 Apr 2018 04:16:01 +0000 (04:16 +0000)]
I18N: Update po files

Merge the old translation of

    "Character set changed to %s; %s."

together with the translations of

    "not converting"
or

    "converting"

respectively, by replacing the second '%s' with the translated string.
The resulting translation might not be correct but it is better than
nothing. Although it is the current translation by NeoMutt as this merge
was done previously in the C code.

6 years agoI18N: Update po files
Reis Radomil [Sun, 22 Apr 2018 04:16:00 +0000 (04:16 +0000)]
I18N: Update po files

6 years agoI18N: Update po files
Reis Radomil [Sun, 22 Apr 2018 04:16:00 +0000 (04:16 +0000)]
I18N: Update po files

Combine the separated singular and plural translations into a single
translation. For languages with more than a single plural form, the old
plural form is used in any case. This might not be correct but is better
than nothing (it also is the current behaviour).

6 years agoI18N: Update po files
Reis Radomil [Sun, 22 Apr 2018 04:15:59 +0000 (04:15 +0000)]
I18N: Update po files

Combine the separated singular and plural translations into a single
translation. For languages with more than a single plural form, the old
plural form is used in any case. This might not be correct but is better
than nothing (it also is the current behaviour).

6 years agoI18N: Update po files
Reis Radomil [Sun, 22 Apr 2018 04:15:58 +0000 (04:15 +0000)]
I18N: Update po files

We merged the two translations of the singular message and plural
messages into one translation. If the language has more than one plural
the old plural translation is used for any plural form of the language.
This might not be accurate but more precise than leaving the plural
completely untranslated.

All the new places were marked as fuzzy.

6 years agoI18N: Update po files
Reis Radomil [Sun, 22 Apr 2018 04:15:57 +0000 (04:15 +0000)]
I18N: Update po files

Translations for the strings "s1" and "s2" which are now "s1 s2"  were
concatenated except for the cases where a translation of s1 or s2 was
not present.

6 years agoI18N: po/*.po updated to match new master
Reis Radomil [Sun, 22 Apr 2018 04:15:57 +0000 (04:15 +0000)]
I18N: po/*.po updated to match new master

No changes to messages

6 years agoI18N: version.c: Pass the complete license string to the translator
Reis Radomil [Sun, 22 Apr 2018 04:16:05 +0000 (04:16 +0000)]
I18N: version.c: Pass the complete license string to the translator

This partly reverses commit 9b7faeeb7eb3dd436444c98c662ab1656fb9ba14.

6 years agoI18N: Combine help string into a single string for translation
Reis Radomil [Sun, 22 Apr 2018 04:16:04 +0000 (04:16 +0000)]
I18N: Combine help string into a single string for translation

Do not chop the help string into multiple parts instead pass the
complete string on for translation.

Reverts partly 9b7faeeb7eb3dd436444c98c662ab1656fb9ba14.

6 years agoI18N: Unify printed string on signal caught
Reis Radomil [Sun, 22 Apr 2018 04:16:04 +0000 (04:16 +0000)]
I18N: Unify printed string on signal caught

Also include the signal number in the output.

6 years agoI18N: handler.c: Pass the complete string to the translator
Reis Radomil [Sun, 22 Apr 2018 04:16:03 +0000 (04:16 +0000)]
I18N: handler.c: Pass the complete string to the translator

Pass the complete string to the translator instead of chopping it into
pieces and translate every piece.

6 years agoI18N: handler.c: Pass the complete string to the translator
Reis Radomil [Sun, 22 Apr 2018 04:16:03 +0000 (04:16 +0000)]
I18N: handler.c: Pass the complete string to the translator

Pass the complete string to the translator instead of chopping it into
pieces and translate every piece.

6 years agoI18N: handler.c: Pass the complete string to the translator
Reis Radomil [Sun, 22 Apr 2018 04:16:02 +0000 (04:16 +0000)]
I18N: handler.c: Pass the complete string to the translator

Pass the complete string to the translator instead of chopping it into
pieces and translate every piece.

6 years agoI18N: handler.c: Pass the complete line to the translators
Reis Radomil [Sun, 22 Apr 2018 04:16:02 +0000 (04:16 +0000)]
I18N: handler.c: Pass the complete line to the translators

Pass the complete string "This %s/%s attachment has been deleted on %s"
to gettext and not single parts gluing them together afterwards.

Although it is tempting to toggle optional sentence parts at the end,
this is a bad idea as this might not work in all languages since these
might have special rules (compare "manner before place before time" rule
for adverbs in the end-position or subject-verb-object order in English).

6 years agoI18N: handler.c: Pass the complete line to the translators
Reis Radomil [Sun, 22 Apr 2018 04:16:01 +0000 (04:16 +0000)]
I18N: handler.c: Pass the complete line to the translators

6 years agoI18N: handler.c: Do not glue translations together
Reis Radomil [Sun, 22 Apr 2018 04:16:01 +0000 (04:16 +0000)]
I18N: handler.c: Do not glue translations together

Do not use this antipattern:

  printf(_("some %s sentence."), b ? _("big") : _("small"));

as the translation of "big"/"small" and depends on the sentence it is
used in. Instead give the translator the complete sentence:

  if (b)
    printf(_("some big sentence."));
  else
    printf(_("some small sentence."));

6 years agoI18N: commands.c: Do not glue translations together
Reis Radomil [Sun, 22 Apr 2018 04:16:00 +0000 (04:16 +0000)]
I18N: commands.c: Do not glue translations together

Do not use this antipattern:

  printf(_("some %s sentence."), b ? _("big") : _("small"));

as the translation of "big"/"small" and depends on the sentence it is
used in. Instead give the translator the complete sentence:

  if (b)
    printf(_("some big sentence."));
  else
    printf(_("some small sentence."));

6 years agoI18N: Choose correct plural form and avoid gluing translations
Reis Radomil [Sun, 22 Apr 2018 04:16:00 +0000 (04:16 +0000)]
I18N: Choose correct plural form and avoid gluing translations

Split up the horrible construction of choosing the plural and gluing
translations together. This should make the job of a translator easier.

Gluing translations is

   printf(_("Decode-save%s to mailbox"), h ? _("") : _(" tagged"));

instead of the better

   if (h)
     printf(_("Decode-save to mailbox"));
   else
     printf(_("Decode-save tagged to mailbox"));

6 years agoI18N: Choose correct plural form in commands.c
Reis Radomil [Sun, 22 Apr 2018 04:15:59 +0000 (04:15 +0000)]
I18N: Choose correct plural form in commands.c

Choose the correct plural depending on the number of messages handled.
Some choices are between one and not one as the precise number of
messages is not known. A clarifying comment is added for the translator
in these cases.

6 years agoI18N: No need to translate "%s: %s"
Reis Radomil [Sun, 22 Apr 2018 04:15:59 +0000 (04:15 +0000)]
I18N: No need to translate "%s: %s"

6 years agoI18N: Choose correct plural form in recvcmd.c
Reis Radomil [Sun, 22 Apr 2018 04:15:58 +0000 (04:15 +0000)]
I18N: Choose correct plural form in recvcmd.c

6 years agoI18N: Use ngettext to select plural form for a string
Reis Radomil [Sun, 22 Apr 2018 04:15:58 +0000 (04:15 +0000)]
I18N: Use ngettext to select plural form for a string

Convert some occurrences of

   printf("%d things", n);

to

   printf(ngettext("%d thing", "%d things", n), n);

6 years agoI18N: Use ngettext to choose correct plural form
Reis Radomil [Sun, 22 Apr 2018 04:15:57 +0000 (04:15 +0000)]
I18N: Use ngettext to choose correct plural form

Avoid the antipattern

   printf(n == 1 ? _("one thing") : _("%d things"), n);

instead use

   printf(ngettext("one thing", "%d things", n), n);

(note: n has to be passed to ngettext and printf)

Although most Germanic languages (including English) use the singular
form for n=1 and a (single) plural form for all other n (including n=0),
this is not the case in general. An example from the GNU gettext manual
[0] for Polish work plik (file):

1 plik
2,3,4 pliki
5-21 pliko'w
22-24 pliki
25-31 pliko'w

When using numbers in translatable strings, do not choose the translated
plural form in the code. Instead let GNU gettext capability pick the
correct translated plural (provided by a translator) depending on the
number.

[0] https://www.gnu.org/software/gettext/manual/html_chapter/gettext.html#Plural-forms

6 years agoI18N: Define ngettext macro when compiling without gettext support
Reis Radomil [Sun, 22 Apr 2018 04:15:57 +0000 (04:15 +0000)]
I18N: Define ngettext macro when compiling without gettext support

6 years agoI18N: ncrypt/smime.c: Translate strings and document them
Reis Radomil [Sun, 22 Apr 2018 04:15:57 +0000 (04:15 +0000)]
I18N: ncrypt/smime.c: Translate strings and document them

Add a comment for translators that the strings must be padded with
spaces.

Also do actually translate the strings (using '_()') and not only mark
them for translation with 'N_()'.

6 years agoI18N: Combine split translatable strings into one translatable string
Reis Radomil [Sun, 22 Apr 2018 04:15:57 +0000 (04:15 +0000)]
I18N: Combine split translatable strings into one translatable string

Translatable strings should not be split in the middle but be one
self-contained and complete unit of thought. In particular do not split
them arbitrary at the end of a sentence.

Replace

  s1 = _("sentence 1.");
  printf("%s sentence2.", s1);

with

  s = _("sentence 1. sentence 2.");
  printf("%s", s);

6 years agoI18N: Use _() instead of N_() for marking strings for translation
Reis Radomil [Sun, 22 Apr 2018 04:15:57 +0000 (04:15 +0000)]
I18N: Use _() instead of N_() for marking strings for translation

Use _() directly instead of N_() followed by _() for strings where
this is applicable, i.e.

   s = N_("string");
   printf("...", _(s));

becomes

   s = _("string")
   printf("...", s);

6 years agoI18N: Document the choice strings for translators
Reis Radomil [Sun, 22 Apr 2018 04:15:57 +0000 (04:15 +0000)]
I18N: Document the choice strings for translators

Document that the choice string (which contains the characters for the
choice) must match up with the translated string of the question.

6 years agoI18N: recvattach.c: Add comment to translation string
Reis Radomil [Sun, 22 Apr 2018 04:15:57 +0000 (04:15 +0000)]
I18N: recvattach.c: Add comment to translation string

Document the '%s' parameter for translators.

6 years agoI18N: ncrypt/smime.c: Remove outdated comment
Reis Radomil [Sun, 22 Apr 2018 04:15:57 +0000 (04:15 +0000)]
I18N: ncrypt/smime.c: Remove outdated comment

The corresponding code to the comment was changed in
49a037a67b91e5965f747630f783804e60567d14.

6 years agomutt/file.c: split mutt_file_{lock,unlock} into flock/fcntl versions
Lars Kellogg-Stedman [Sun, 22 Apr 2018 00:42:28 +0000 (20:42 -0400)]
mutt/file.c: split mutt_file_{lock,unlock} into flock/fcntl versions

this splits mutt_file_lock and mutt_file_unlock into separate
fcntl() and flock() based versions.  It teaches ./configure
about the new --with-lock option (--with-lock=fcntl or
--with-lock=flock).

Includes updates to INSTALL and AUTOSETUP.md that reference the
removed --enable-fcntl and --enable-flock options.

Closes #1147

6 years agomutt/logging.c: set line buffering for logging stream
Vladimir Zakharov [Sun, 22 Apr 2018 17:15:32 +0000 (20:15 +0300)]
mutt/logging.c: set line buffering for logging stream

6 years agoinit.c: convert MyVars to use TAILQ
Vladimir Zakharov [Sat, 21 Apr 2018 22:15:36 +0000 (01:15 +0300)]
init.c: convert MyVars to use TAILQ

6 years agoRename and make another file-level variable static
Pietro Cerutti [Mon, 23 Apr 2018 13:37:14 +0000 (13:37 +0000)]
Rename and make another file-level variable static

6 years agoMake a file-level variable static
Pietro Cerutti [Mon, 23 Apr 2018 13:35:38 +0000 (13:35 +0000)]
Make a file-level variable static

6 years agoAvoid naming queue heads that are not referenced by name
Pietro Cerutti [Mon, 23 Apr 2018 12:48:32 +0000 (12:48 +0000)]
Avoid naming queue heads that are not referenced by name

6 years agoUpdate to latest autosetup
Pietro Cerutti [Mon, 23 Apr 2018 10:04:58 +0000 (10:04 +0000)]
Update to latest autosetup

6 years agoinit.c: remove unnecessary newline
Floyd Anderson [Sat, 14 Apr 2018 18:44:31 +0000 (20:44 +0200)]
init.c: remove unnecessary newline

6 years agoRefactor several callers of mutt_mktemp() to mutt_file_mkstemp()
Will Curry [Wed, 18 Apr 2018 03:32:04 +0000 (22:32 -0500)]
Refactor several callers of mutt_mktemp() to mutt_file_mkstemp()

6 years agoAdd mutt_file_mkstemp() to create temp file using mkstemp()
Will Curry [Wed, 18 Apr 2018 03:31:03 +0000 (22:31 -0500)]
Add mutt_file_mkstemp() to create temp file using mkstemp()

Relocated Tmpdir from globals.h to mutt library.

6 years agomerge: tidy the guide's docbook
Richard Russon [Sat, 21 Apr 2018 12:00:25 +0000 (13:00 +0100)]
merge: tidy the guide's docbook

 * Add Vim modeline
 * Reformat <screen> elements: too long or multi lines
 * Reformat <para> elements: indentation/wrapping
 * Reformat list/table elements: indentation/wrapping
 * Reformat new master commits (<para>, whitespace)

6 years agoReformat new master commits (<para>, whitespace)
Floyd Anderson [Sat, 21 Apr 2018 03:04:25 +0000 (05:04 +0200)]
Reformat new master commits (<para>, whitespace)

6 years agoReformat list/table elements: indentation/wrapping
Floyd Anderson [Thu, 19 Apr 2018 18:37:21 +0000 (20:37 +0200)]
Reformat list/table elements: indentation/wrapping

...to unify their children, tidy dashes and whitespace, add missing
items and reposition some anchor tags.

6 years agoReformat <para> elements: indentation/wrapping
Floyd Anderson [Thu, 19 Apr 2018 03:42:01 +0000 (05:42 +0200)]
Reformat <para> elements: indentation/wrapping

...and tidy dashes, trailing whitespace, try to fix all spaces around
brackets and punctuation marks etc., e.g. keep link tags on the same
line to avoid an underlined space after hyperlinks in rendered result.

6 years agoReformat <screen> elements: too long or multi lines
Floyd Anderson [Wed, 18 Apr 2018 03:37:24 +0000 (05:37 +0200)]
Reformat <screen> elements: too long or multi lines

...and tidy comments, dashes, potential Vim modelines, whitespace.

6 years agoAdd Vim modeline
Floyd Anderson [Tue, 17 Apr 2018 21:15:03 +0000 (23:15 +0200)]
Add Vim modeline

6 years agodoxygen: Add lots of new comment blocks
Richard Russon [Thu, 19 Apr 2018 16:13:51 +0000 (17:13 +0100)]
doxygen: Add lots of new comment blocks

6 years agodoxygen: Fix, improve, tidy comment blocks
Richard Russon [Thu, 19 Apr 2018 16:38:59 +0000 (17:38 +0100)]
doxygen: Fix, improve, tidy comment blocks

6 years agomerge: minor changes
Richard Russon [Tue, 17 Apr 2018 20:45:40 +0000 (21:45 +0100)]
merge: minor changes

 * Add a comment in auth_gss about RFCs and null-termination.
 * validate docs
 * fix the case of some variables
 * rename convert_to_7bit
 * doxy: add headers

6 years agodoxy: add headers
Richard Russon [Thu, 12 Apr 2018 10:00:59 +0000 (11:00 +0100)]
doxy: add headers

6 years agorename convert_to_7bit
Richard Russon [Tue, 17 Apr 2018 19:35:23 +0000 (20:35 +0100)]
rename convert_to_7bit

6 years agofix the case of some variables
Richard Russon [Sat, 14 Apr 2018 15:00:30 +0000 (16:00 +0100)]
fix the case of some variables

6 years agovalidate docs
Richard Russon [Thu, 12 Apr 2018 22:36:05 +0000 (23:36 +0100)]
validate docs

6 years agoAdd a comment in auth_gss about RFCs and null-termination.
Kevin McCarthy [Sun, 15 Apr 2018 22:57:28 +0000 (15:57 -0700)]
Add a comment in auth_gss about RFCs and null-termination.

6 years agoDocument the config priority
Richard Russon [Sun, 15 Apr 2018 20:37:34 +0000 (21:37 +0100)]
Document the config priority

6 years agoAdjust the precedence of some more config items
Richard Russon [Mon, 9 Apr 2018 17:08:24 +0000 (18:08 +0100)]
Adjust the precedence of some more config items

6 years agoLet config file have precedence over environment
Pietro Cerutti [Thu, 12 Apr 2018 09:58:59 +0000 (09:58 +0000)]
Let config file have precedence over environment

Issue #1140

6 years agoadd support for idn2 (IDNA2008)
Pietro Cerutti [Tue, 20 Feb 2018 13:34:14 +0000 (13:34 +0000)]
add support for idn2 (IDNA2008)

6 years agoImprove gss debug printing of status_string.
Kevin McCarthy [Sat, 14 Apr 2018 03:39:35 +0000 (20:39 -0700)]
Improve gss debug printing of status_string.

Commit f52ee2f7 ensured the debug strings were properly '\0'
terminated.  However, it did not prevent the strncpy from reading past
the end of the status_string.value data; it simply capped it
afterwards.  Improve the code so it only reads up to
status_string.length without overwriting the buffer.

6 years agoRemove trailing null count from gss_buffer_desc.length field.
Kevin McCarthy [Sat, 14 Apr 2018 02:03:29 +0000 (19:03 -0700)]
Remove trailing null count from gss_buffer_desc.length field.

RFC 2744 section 3.2.2 clearly states that trailing NULL characters
are not to be included in the length field, and are not to be assumed
to be present in the value field.

Thanks to Greg Hudson, who recently debugged this same issue with
fetchmail, and kindly took the time to look at Mutt's code too.

6 years agominor IMAP string handling fixes
Joey Pabalinas [Thu, 12 Apr 2018 09:05:17 +0000 (23:05 -1000)]
minor IMAP string handling fixes

6 years agomerge: improvements to libconn
Richard Russon [Thu, 12 Apr 2018 09:00:49 +0000 (10:00 +0100)]
merge: improvements to libconn

 * replace mutt_socket_write_d by mutt_socket_send_d
 * rename mutt_socket_write to mutt_socket_send
 * introduce mutt_socket_{read,write}
 * don't try to determine buffer size if length was negative
 * rename socket_new_conn to mutt_socket_new
 * define mutt_ssl_socket_setup even when building without SSL
 * move mutt_socket_free to conn/socket.c
 * let mutt_socket_new add Connection to the list
 * move Connections declaration to conn/socket.c
 * add parameter to mutt_socket_new to specify socket type
 * move raw connection to its own file
 * conn/ssl.c: rename local var data to ssldata
 * factorise ssl_socket_open and mutt_ssl_starttls
 * rename tls_close to ssl_socket_close_and_restore

6 years agoconn: rename tls_close to ssl_socket_close_and_restore 942/head
Damien Riegel [Wed, 8 Nov 2017 23:42:29 +0000 (18:42 -0500)]
conn: rename tls_close to ssl_socket_close_and_restore

6 years agoconn: factorise ssl_socket_open and mutt_ssl_starttls
Damien Riegel [Wed, 8 Nov 2017 22:55:06 +0000 (17:55 -0500)]
conn: factorise ssl_socket_open and mutt_ssl_starttls

It was in the TODO of mutt_ssl_starttls, so let's do this! The main
difference is that mutt_ssl_starttls now respects options
OPT_SSL_USE_SSLV2 and OPT_SSL_USE_SSLV3. These options default to 0, so
it should have no impacts for users who didn't explicitely set these
options in their config. And if they did, they should be aware of the
security concerns already.

6 years agoconn/ssl.c: rename local var data to ssldata
Damien Riegel [Wed, 8 Nov 2017 22:08:52 +0000 (17:08 -0500)]
conn/ssl.c: rename local var data to ssldata

6 years agoconn: move raw connection to its own file
Damien Riegel [Wed, 8 Nov 2017 21:14:34 +0000 (16:14 -0500)]
conn: move raw connection to its own file

6 years agoconn: add parameter to mutt_socket_new to specify socket type
Damien Riegel [Wed, 8 Nov 2017 21:08:23 +0000 (16:08 -0500)]
conn: add parameter to mutt_socket_new to specify socket type

It's currently the responsibility of mutt_conn_find to setup the
Connection, but this should really be done by mutt_socket_new, as it's
part of the socket initialization. To let it know which kind of
Connection it should create, add a parameter to allow callers to
specify the type.

6 years agomove Connections declaration to conn/socket.c
Damien Riegel [Wed, 8 Nov 2017 20:25:42 +0000 (15:25 -0500)]
move Connections declaration to conn/socket.c

Functions responsible for adding and removing entries to Connections
(the Connection list) are in conn/socket.c, so it makes sense to move
it there too.

Also change mutt_conn_find to use the accessor instead of the global
variable, so it can be made static again.

6 years agoconn: let mutt_socket_new add Connection to the list
Damien Riegel [Wed, 8 Nov 2017 20:48:44 +0000 (15:48 -0500)]
conn: let mutt_socket_new add Connection to the list

mutt_socket_new is followed by a call to TAILQ_INSERT_HEAD; and
mutt_socket_free takes care of removing the Connection from the
Connection list. Make these two more in pair by making mutt_socket_new
adds the newly created Connection to the connection list.

6 years agomove mutt_socket_free to conn/socket.c
Damien Riegel [Wed, 8 Nov 2017 20:47:35 +0000 (15:47 -0500)]
move mutt_socket_free to conn/socket.c

mutt_socket_new is in conn/socket.c, mutt_socket_free is in
mutt_socket.c. Let's move these two together. "Connections" is made
global during the transition to keep the diffs more straightforward.

6 years agoconn: define mutt_ssl_socket_setup even when building without SSL
Damien Riegel [Wed, 8 Nov 2017 20:26:39 +0000 (15:26 -0500)]
conn: define mutt_ssl_socket_setup even when building without SSL

Error conditions were duplicated for builds with and without SSL. This
can be factorized by letting mutt_ssl_socket_setup be defined even when
SSL is not enabled.

6 years agoconn: rename socket_new_conn to mutt_socket_new
Damien Riegel [Wed, 8 Nov 2017 20:44:41 +0000 (15:44 -0500)]
conn: rename socket_new_conn to mutt_socket_new

Make this function be in the same "namespace" as other Connection
related functions by making its prefix be "mutt_socket".

6 years agoconn: don't try to determine buffer size if length was negative
Damien Riegel [Wed, 8 Nov 2017 15:53:36 +0000 (10:53 -0500)]
conn: don't try to determine buffer size if length was negative

It's caller's responsibility to pass the correct buffer size.

6 years agoconn: introduce mutt_socket_{read,write}
Damien Riegel [Wed, 8 Nov 2017 15:52:45 +0000 (10:52 -0500)]
conn: introduce mutt_socket_{read,write}

6 years agoconn: rename mutt_socket_write to mutt_socket_send
Damien Riegel [Wed, 8 Nov 2017 15:29:23 +0000 (10:29 -0500)]
conn: rename mutt_socket_write to mutt_socket_send

For consistency, and as the buffer size is not passed to this function,
rename it to use "send" instead of "write". This frees
"mutt_socket_write" symbol, so we will be able to reuse it as a wrapper
over conn->conn_write.

6 years agoconn: replace mutt_socket_write_d by mutt_socket_send_d
Damien Riegel [Wed, 8 Nov 2017 15:44:19 +0000 (10:44 -0500)]
conn: replace mutt_socket_write_d by mutt_socket_send_d

Every occurrence of mutt_socket_write_d used -1 as buffer size. Wrap
these calls in a new macro mutt_socket_send_d. Keep "write" for
functions where the size is passed as parameter.

6 years agopager specific "show incoming mailboxes list" macro
Christian Ebert [Fri, 30 Mar 2018 12:37:54 +0000 (13:37 +0100)]
pager specific "show incoming mailboxes list" macro

Exiting the pager before change-folder avoids 'Not available in this
menu' error when selecting a different entry in some circumstances.

[ci skip]

6 years agomerge: small cleanups
Richard Russon [Thu, 12 Apr 2018 08:27:14 +0000 (09:27 +0100)]
merge: small cleanups

 * add missing extern
 * rename OPT_ variables
 * comment list functions
 * comment and reorder params
 * history: move static functions first
 * history: tidy/sync functions
 * history: free resources
 * free resources

6 years agoClarify the relation between NeoMutt and Mutt
rawtaz [Wed, 11 Apr 2018 11:40:43 +0000 (13:40 +0200)]
Clarify the relation between NeoMutt and Mutt

Fixes a discrepancy between the website and this README on the topic of "is it a fork?".

6 years ago Let mutt_ch_choose report conversion failure (#1137)
Pietro Cerutti [Wed, 11 Apr 2018 14:01:57 +0000 (15:01 +0100)]
 Let mutt_ch_choose report conversion failure (#1137)

* Let mutt_ch_choose report conversion failure

Issue #1136

* Let mutt_ch_convert_string return errno if iconv(..) fails

Previously, mutt_ch_convert_string returned error only if any arguments
failed the sanity check or iconv_open() failed.

With this change, an error value is returned even if the iconv()
conversion fails, such as when the input string contains an invalid
character in the source character set (EILSEQ).

I have looked at each caller and it seems to me that this change won't
introduce any misbehaviour, but I'm far from being 100% confident.

Issue #1136

* test int functions against 0

* Better error reporting in mutt_ch_iconv

Issue #1136

6 years agofree resources
Richard Russon [Sat, 7 Apr 2018 23:00:09 +0000 (00:00 +0100)]
free resources

6 years agodoc: Describe logging capabilities of NeoMutt
Reis Radomil [Fri, 6 Apr 2018 01:55:51 +0000 (01:55 +0000)]
doc: Describe logging capabilities of NeoMutt

Describe the logging capabilities of NeoMutt in the User Guide. The
section currently covers the different log message types (perror, error,
warning, informational debug), where they are shown and how to enable
debug log messages.

6 years agoRename <show-messages> to <show-log-messages>
Reis Radomil [Sun, 1 Apr 2018 13:31:16 +0000 (13:31 +0000)]
Rename <show-messages> to <show-log-messages>

Rename the function <show-messages> to <show-log-messages> as well as
its symbolic constant OP_SHOW_MESSAGES to OP_SHOW_LOG_MESSAGES.

Background is that 'messages' (in the context of neomutt) refers usually
to emails instead of log messages.

6 years agoDescribe <show-messages> more precisely
Reis Radomil [Sun, 1 Apr 2018 13:31:16 +0000 (13:31 +0000)]
Describe <show-messages> more precisely

The term 'message' is used for log-messages as well as for ordinary
mails. In the help 'message' usually means an email. Adjust the
description of <show-message>/OP_SHOW_MESSAGE to clarify that log and
debug messages are meant.