Commit Graph

60 Commits (master)

Author SHA1 Message Date
Léo Villeveygoux 65d43e3cea mpick: remove dead code
It would load the seq file even when unused (and complain when it's not found).
Message-Id: <20210706174750.246026-1-l@vgx.fr>
3 years ago
Michael Forney 02e4cf4001 mpick: use function pointer type for callback
Though POSIX requires this conversion to work correctly (for dlsym),
it is not valid in ISO C, so it is better to just uses the appropriate
function pointer type.

Closes: #185 [via git-merge-pr]
4 years ago
Leah Neukirchen ccceb10908 mpick: relax pledge for redirects
This allows mpick to create files and run popen.
In the future, we can only pledge this if these features are actually used.
4 years ago
Tim Kuijsten 4763032430 pledge(2) all programs
All programs except mshow have a very tight set of promises. mshow
has a broad set of promises and might be a good future candidate
to further restrict using unveil(2).

This patch is based on commit 0300a112 by Alex Holst (dated
2017-12-07), which was proposed in GH PR #79.

* pledged mpick, mflow and mdate so that now all programs are pledged
* removed some unneeded promises and added some missing promises
* move err.h include and OpenBSD ifdef into a new xpledge.h
* cleaned up code aligning and whitespace

Closes: #179 [via git-merge-pr]
4 years ago
Duncan Overbruck d9c3914924 mpick: breaking cmdline options
Two breaking changes which will make mpick fit more in with
all other mblaze tools by using mmsg(7) arguments:
- Use the -F flag to read script files.
- Remove msglist support
4 years ago
Julian Rother db7b58f24a mpick: fixed freeing pointer returned from getenv
Closes: #177 [via git-merge-pr]
4 years ago
Duncan Overbruck b79e38b686 mpick: improve unknown binding error and add test case 4 years ago
Duncan Overbruck 95a9c0837b mpick: fix memory leaks 4 years ago
Duncaen 331d0e4680 mpick: use slurp instead of mmaping files 4 years ago
Duncaen d45d1c4ff5 mpick: fix memory leak in parse_dur 4 years ago
Duncaen d93c1e2fe4 mpick: always point to malloc memory in parse_string 4 years ago
Duncaen 8ae4801dd4 mpick: add header decodeop for better address matching 4 years ago
Duncaen 32f0fcbc0d mpick: add let expressions 4 years ago
Duncaen d5afda072b mpick: better error for missing ) over multiple lines 4 years ago
Duncaen 4baa330b63 mpick: allow reading expressions from files i.e. using #!/bin/mpick 4 years ago
Duncaen d235a3e64c mpick: minor cleanups/memleak fixes for parse_msglist 4 years ago
Duncaen 482bbffd2c mpick: refactor mailfile handling
- fix some memory leaks
- fix handling of unexisting files/mthread containers
- in oneline mode use one mailinfo struct for each line
4 years ago
Duncaen 1010ae06bf mpick: add support for multiline expressions and comments 4 years ago
Duncaen b8cf02825a mpick: add xcalloc and xstrdup 4 years ago
Duncaen 28d0d51e34 mpick: add freeexpr 4 years ago
Duncaen 8f0b6e2117 mpick: add ternary (conditional) operator 4 years ago
Duncaen 3968f2ef03 mpick: add skip expression 4 years ago
Duncaen 401aa88752 mpick: add pipes and file redirection 4 years ago
Duncaen cfba3e1c3b mpick: fix off-by-one in parse_string (expression parsing) 5 years ago
Duncaen 9d793b3662 mpick: add -v to usage 6 years ago
Duncaen d09efa6aa9 mpick: add -v flag
Closes: #137 [via git-merge-pr]
6 years ago
Marcin Niestroj 8274295d90 mpick: Increase buffer for decoded header field
When using:

  $ mlist maildir | mpick -t '"cc" ~~ "*vger.kernel.org*"'

with a maildir containing mails from Linux Mailing List, not all
messages were picked correctly. It turned out that the reason was
small (100 bytes) buffer for header fields.

Increase header field buffer to 4096, which is the most commonly used
value.

Closes: #133 [via git-merge-pr]
6 years ago
Duncaen 32144a2eaa mpick: don't allow EXPR_ANYSET with unmatched operator 6 years ago
Duncaen 4e7a5c5ab6 mpick: add negations 7 years ago
Leah Neukirchen 66d0eff12f style 7 years ago
Duncaen b57c2d9b09 mpick: make message numbers starting at one
fixes #29
7 years ago
Duncaen 9bec745dde mpick: allow string expressions on any header 7 years ago
Larry Hynes e7d9d3a922 mpick: prent -> parent
Closes: #23 [via git-merge-pr]
7 years ago
Duncaen 94448994ee mpick: fix subject caching 7 years ago
Duncaen 2ed0a0ea60 mpick: fix flags
fixes #21
7 years ago
Larry Hynes 0c7acf21bb mpick: fall-trough -> fall-through 7 years ago
Duncaen 914c0d744b mpick: add missing :R msglist type 7 years ago
Duncaen 79d5047cde mpick: open mail file only if necessary 7 years ago
Duncaen 5eea6f4efb mpick: fix warnings found by clang-analyze 7 years ago
Duncaen 12e504fa42 mpick: add msglist from address support
Fixes #9
7 years ago
Duncaen 0344e5a425 mpick: add kept expression 7 years ago
Duncaen afdfd07fe4 mpick: fix reuse of num 7 years ago
Christian Neukirchen dfcb53dc0f mpick: shuffle for OpenBSD/FreeBSD 8 years ago
Duncaen cfb490561a mpick: fix subject expression, broke while normalizing style 8 years ago
Duncaen 9ac7a2aeb7 mpick: fixes 8 years ago
Duncaen 610db14582 mpick: fix date expressions 8 years ago
Duncaen a2dc56cd0e mpick: add 'cur' variable to number expressions 8 years ago
Duncaen a3f4227c31 mpick: add to and from string expressions 8 years ago
Duncaen a37c401ad1 mpick: add info expression for message ids without files
and mark them seen by default
8 years ago
Christian Neukirchen d2e3b9411b mpick: drop const 8 years ago