Age | Commit message (Collapse) | Author |
|
Subtraction can overflow, resulting in incorrect sorts. This is
especially a concern for the date and size sorting, whose fields are
greater than an 'int' size.
The index values should be okay, but it's better to be consistent and
avoid any possible issues.
Define a macro, mutt_numeric_cmp(), that uses direct comparison rather
than subtraction.
|
|
Thanks to Ian Collier for making this suggestion!
It's more efficient and disables unhelpful compiler warnings about
strncpy(), since strfcpy is terminating the string itself.
If memccpy() is unavailable, use strncpy() but keep the old behavior
of strncpy() length C instead of C-1, as I believe it tickles less
compiler warnings.
Add parenthesis around macro parameter uses, to be safe. Thanks to
Vincent Lefèvre for pointing that out.
|
|
This will allow "view" mailcap invocations and autoview invocations to
display something reasonable for international file names. Also add
the flag to mutt_adv_mktemp(), which the mailcap viewer calls.
Convert the 'slash parameter' to an ALLOW_SLASH flag. This makes the
flags consistent (both "allow" something not permitted by default),
and invocations more readable.
|
|
Run 'gettextize -f --no-changelog' to update to 0.21.
This removes the entire intl directory, and relies on an external
libintl only.
$(INTLLIBS) should now be referred to as $(LIBINTL), so change all
references.
Unfortunately, some of the gettext m4 files were modified and "mutt
customized" in the past. I'm trying to keep them in a pristine state
after this upgrade. glibc21.m4, lcmessage.m4, codeset.m4 have also
been removed.
Manually call AM_ICONV in configure.ac. This was previously called
in the modified "MUTT_AM_GNU_GETTEXT" but the result $am_cv_func_iconv
is tested just below.
locale.h is a standard library defined by C99. The gpgme and pgp code
wrapped those includes in HAVE_LOCALE_H checks, but that check was
performed inside of gettext.m4. Remove the check inside those
files (locale.h is already included unconditionally elsewhere in
Mutt).
Copy the sample gettext.h file and include that instead, as suggested
by the gettext documentation.
unistd.h is also a standard posix header, so remove HAVE_UNISTD_H
checks inside mutt too.
Create po/LINGUAS file listing available languages.
Create po/Makevars from the template and customize for Mutt.
Set PO_DEPENDS_ON_POT to no to prevent po file rebuilds. According to
the gettext manual, with this set, "PO files can be accidentally
updated even if a POT file is not updated" when using git.
|
|
* Remove the automatic conversion of NULL and '\0' to 0. Add a flag
for the cases that require lax evaluation.
* Make trailing characters generate an error by default for the
mutt_atouX functions. Add a flag for that case. Most of the IMAP
code parses numbers out of a stream, so add the flag to those
calls.
* The mutt_atouX functions were also behaving incorrectly with
invalid input, e.g. "ABC", returning and setting 0. Fix them to
return an error in those cases.
* Add a mutt_atoll() function, to be used in the next commit.
* Change converters to store 0 on error. atos, atoi, and atoui were
already doing this, but the others were not.
|
|
dprintf(n, fmt, ...) is a more natural form of
dprint(n, (debugfile, fmt, ...)). It prints code location in the debug
file where possible.
I believe this approach, while common, was not previously used because
we were trying to be C90-compatible. C90 doesn't provide variadic
macros. Now we require C99, so it makes sense to add this pattern.
|
|
All callers now call the buffer function instead.
|
|
Add helper functions mutt_buffer_substrcpy() and
mutt_buffer_concatn_path().
Remove mutt_concatn_path() because mutt_complete() was the only
caller.
|
|
Add mutt_mkdir() library function supporting recursive mkdir.
|
|
The C standard says static storage duration variables will be
initialized to NULL/0.
|
|
Relocate safe_symlink(), safe_open(), mutt_rmtree() and their
dependent functions.
This rearrangement is a bit awkward. Another approach for the future
might be to convert lib.c into a muttlib.c aware file, and just copy
the functions pgppubring.c uses inside itself.
|
|
So it can be converted to use BUFFER.
|
|
Add spaces after if, else, while, for, switch.
Unify the brace placement style. The vast majority of the code uses
Allman style so convert the relatively few K&R braces over.
|
|
The result of
find . -name "*.[ch]" -exec emacs -batch {} \
--eval="(progn (delete-trailing-whitespace) (and (buffer-modified-p) (save-buffer)))" \;
|
|
Use to ensure assembled IMAP commands fit in the resultant buffer to
be imap_exec()'ed.
RFC2683 suggested a limit of 1000, but asked servers to accept up to
8000. Furthermore, RFC7162 bumped the client limit suggestion up to
8192. So I don't believe any issues will be caused by this.
Most of these are increases are just to remove theoretical truncation
warned about by the compiler; I don't believe we've had reports of
actual command truncation due to a mailbox 1024 characters long.
|
|
Store MODSEQ in the header cache, and use that to perform a "FETCH
CHANGEDSINCE" for header updates when initially downloading messages.
Further improvements could be made to add support when syncing.
Handling MODSEQ for FLAG updates while the mailbox is open would be
complicated by the fact that Mutt supports locally modified headers,
so we couldn't accept the new (or subsequent) MODSEQ.
However, this initial step may at least provide some benefit when
opening the mailbox, which is generally the most time and data
intensive.
|
|
Several places in the imap code, when parsing "number" and "nz-number"
values from the IMAP data, use atoi() and strtol(). This is
incorrect, and can result in failures when a uid value happens to be
larger than 2^31.
Create a helper function, mutt_atoui() and use that instead. One
place was using strtol() and relying on the endptr parameter, and so
was changed to use strtoul() instead.
Thanks to Paul Saunders for the bug report and original patch, which
this commit is based on.
|
|
#3899)
While I have reservations about the construct, it does make the
interactive_check_cert() menu->max and part loop less fragile.
|
|
Changeset 23334e967dd7 created a workaround for a namespace conflict
with Solaris and derivatives. After some discussion, the team decided
it would be best to move away from using the "M_" prefix for macros.
This patch was automatically generated by running:
perl -wpi -e 's/\bM_(\w+)\b/MUTT_$1/g' `find . -name '*.[ch]' -print`
with the exception that sys_socket.h was exempted. (That file will
be backed out subsequent to this commit.)
Thanks to Andras Salamon for supplying the perl script used to make
this change.
|
|
The interface for editing a large number of recipients is poor and
perhaps shouldn't be using a fixed buffer size. Until a redesign can
be thought about, this will help.
|
|
This patch only updates existing copyright notices in the source
files, using commit dates since the last copyright update in commits
e3af935cdb1a and f8fd60d8d3f2.
Add a notice to the COPYRIGHT file to refer to our mercurial
repository for the full commit history.
Add myself to the COPYRIGHT file and smime_keys.pl file.
|
|
After fixing the ticket 3787 strchr issue, this patch cleans up other
potentially incorrect uses of strchr for the '\0' case.
In mutt_multi_choice(), mutt_getch() can technically return 0. Although
it seems the user would have to try quite hard to do this, it's
incorrect to return that index into letters. Change "ch.ch==0" to be
considered the same as an abort.
is_email_wsp() is used in a couple places where it wasn't obvious
whether '\0' was being accounted for, so add an explicit check to the
function.
Inside eat_date(), if mutt_extract_token() had no input and returned
"", the strchr ("<>=", buffer.data[0]) below would return a pointer.
In actuality, this is prevented by an empty parameter check inside
mutt_pattern_comp(), but it doesn't hurt to make it the same as
eat_regexp() and have the check explicitly done here too.
rfc2047_encode() was another borderline case for adding a check. The
convert_string() sets a length, so it seems highly unlikely that *t
could be 0, but doesn't hurt to add the check.
The find_encoded_word() fix looks necessary. If the passed in s was
something like "=?charset?" (followed by EOS, '\0'), the strchr("BbQq",
q[1]) would in fact return a pointer and the following q[2] would read
past the end of string. If q[2] happened to be '?', it might even
continue reading in the for loop below.
Lastly, in parse_mailboxdomain(), the potential overread was already
fixed in changeset:a6919571eb59, but although the nonspecial and special
strchr() line happens to "work" for the case of '\0', it's pretty
fragile to leave as is. It's better to be explicit and just return if
we hit EOS without calling next_token().
|
|
add new inline funtion skip_email_wsp() to be used in lieu of SKIPWS() when parsing ASCII protocols rather than user input.
change use of SKIPWS() to skip_email_wsp() in places where it is likely to be a problem.
|
|
performs a similar task
|
|
|
|
|
|
|
|
|
|
We use these to stop supporting EOL-escaping with \ which was
wrong in most cases (e.g. $history_file), support is kept for
reading config and mailcap files.
Leaving CRLF in will be used for the pager.
|
|
I went through the logs of each file with a copyright header and
updated the years for the authors in the headers for any non-comment
changes they introduced. What a pain!
|
|
This was pretty convoluted because GPGME provides no way to examine a
key block without importing it. This code creates a temporary GPG home
in which to import the key in order to display it.
|
|
|
|
|
|
#2162.
|
|
|
|
but gives precedence to the right side instead of to the left when the
fill length is zero. The default $pager_format is updated to use it so
that %P is always available at the edge of the screen.
|
|
Avoid altering the argument to mutt_complete() when completion fails. Previously, the trailing component of filename was removed each time the user pressed TAB.
|
|
to safe_rename().
|
|
|
|
|
|
|
|
missing ones. May fix some bugs.
|
|
use of strncat in part of the mutt code base.
|
|
user interface. Changes include:
* When tagging and saving multiple attachments, you can now use the
same target directory for multiple attachments.
* When you can't save an attachment, you get an opportunity to enter
a new file name.
* The menu cursor will highlight the attachment that you are
currently discussing with mutt.
* Various bug fixes.
This does, in particular, address #1619 (Debian#208430).
|
|
there's a lot of type-punning in Mutt. With help from Philipp
Thomas, I've fixed all I could find in CVS (please double-check, one
might have slipped through the cracks), I can make one for 1.4 CVS
branch as well if wanted.
|
|
that mutt may currently build IMAP URLs like
imap://exchange//herbert for FCCs. The fix in this patch is to
include a function named mutt_concat_path which concatenates path
elements, but avoids the creation of double slashes. (These don't
create problems when you're just accessing the file system, but
apparently thy do cause problems with IMAP.)
|
|
|
|
|
|
|
|
|