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).
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.
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.
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).
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.
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):
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.
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.
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.
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)
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.
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
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.
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.
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
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.