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]
2020-09-25 14:53:47 +02:00
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.
2020-09-06 16:56:18 +02:00
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]
2020-09-06 16:34:56 +02:00
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
2020-07-30 22:18:21 +02:00
Julian Rother
db7b58f24a
mpick: fixed freeing pointer returned from getenv
...
Closes : #177 [via git-merge-pr]
2020-06-07 15:33:53 +02:00
Duncan Overbruck
b79e38b686
mpick: improve unknown binding error and add test case
2020-05-15 18:41:13 +02:00
Duncan Overbruck
95a9c0837b
mpick: fix memory leaks
2020-05-15 18:41:13 +02:00
Duncaen
331d0e4680
mpick: use slurp instead of mmaping files
2020-05-15 18:41:13 +02:00
Duncaen
d45d1c4ff5
mpick: fix memory leak in parse_dur
2020-05-15 18:41:13 +02:00
Duncaen
d93c1e2fe4
mpick: always point to malloc memory in parse_string
2020-05-15 18:41:13 +02:00
Duncaen
8ae4801dd4
mpick: add header decodeop for better address matching
2020-05-15 18:41:13 +02:00
Duncaen
32f0fcbc0d
mpick: add let expressions
2020-05-15 18:41:13 +02:00
Duncaen
d5afda072b
mpick: better error for missing ) over multiple lines
2020-05-15 18:41:13 +02:00
Duncaen
4baa330b63
mpick: allow reading expressions from files i.e. using #!/bin/mpick
2020-05-15 18:41:13 +02:00
Duncaen
d235a3e64c
mpick: minor cleanups/memleak fixes for parse_msglist
2020-05-15 18:41:13 +02:00
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
2020-05-15 18:41:13 +02:00
Duncaen
1010ae06bf
mpick: add support for multiline expressions and comments
2020-05-15 18:41:13 +02:00
Duncaen
b8cf02825a
mpick: add xcalloc and xstrdup
2020-05-15 18:41:13 +02:00
Duncaen
28d0d51e34
mpick: add freeexpr
2020-05-15 18:41:13 +02:00
Duncaen
8f0b6e2117
mpick: add ternary (conditional) operator
2020-05-15 18:41:13 +02:00
Duncaen
3968f2ef03
mpick: add skip expression
2020-05-15 18:41:13 +02:00
Duncaen
401aa88752
mpick: add pipes and file redirection
2020-05-15 18:41:13 +02:00
Duncaen
cfba3e1c3b
mpick: fix off-by-one in parse_string (expression parsing)
2019-02-08 19:55:47 +01:00
Duncaen
9d793b3662
mpick: add -v to usage
2018-09-25 16:37:38 +02:00
Duncaen
d09efa6aa9
mpick: add -v flag
...
Closes : #137 [via git-merge-pr]
2018-09-25 16:05:51 +02:00
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]
2018-08-30 13:08:08 +02:00
Duncaen
32144a2eaa
mpick: don't allow EXPR_ANYSET with unmatched operator
2018-02-05 15:36:25 +01:00
Duncaen
4e7a5c5ab6
mpick: add negations
2017-10-26 23:14:23 +02:00
Leah Neukirchen
66d0eff12f
style
2017-08-31 17:30:17 +02:00
Duncaen
b57c2d9b09
mpick: make message numbers starting at one
...
fixes #29
2017-04-27 23:49:12 +02:00
Duncaen
9bec745dde
mpick: allow string expressions on any header
2017-04-17 03:01:57 +02:00
Larry Hynes
e7d9d3a922
mpick: prent -> parent
...
Closes : #23 [via git-merge-pr]
2017-03-30 20:29:01 +02:00
Duncaen
94448994ee
mpick: fix subject caching
2017-03-30 20:29:01 +02:00
Duncaen
2ed0a0ea60
mpick: fix flags
...
fixes #21
2017-03-30 20:29:01 +02:00
Larry Hynes
0c7acf21bb
mpick: fall-trough -> fall-through
2017-03-30 20:29:01 +02:00
Duncaen
914c0d744b
mpick: add missing :R msglist type
2017-03-30 20:28:27 +02:00
Duncaen
79d5047cde
mpick: open mail file only if necessary
2017-03-30 17:07:28 +02:00
Duncaen
5eea6f4efb
mpick: fix warnings found by clang-analyze
2017-02-23 20:35:14 +01:00
Duncaen
12e504fa42
mpick: add msglist from address support
...
Fixes #9
2017-01-20 23:31:17 +01:00
Duncaen
0344e5a425
mpick: add kept expression
2017-01-20 23:31:17 +01:00
Duncaen
afdfd07fe4
mpick: fix reuse of num
2017-01-20 23:30:54 +01:00
Christian Neukirchen
dfcb53dc0f
mpick: shuffle for OpenBSD/FreeBSD
2016-09-05 14:03:46 +02:00
Duncaen
cfb490561a
mpick: fix subject expression, broke while normalizing style
2016-07-30 00:21:13 +02:00
Duncaen
9ac7a2aeb7
mpick: fixes
2016-07-29 04:31:34 +02:00
Duncaen
610db14582
mpick: fix date expressions
2016-07-29 02:20:24 +02:00
Duncaen
a2dc56cd0e
mpick: add 'cur' variable to number expressions
2016-07-29 01:49:37 +02:00
Duncaen
a3f4227c31
mpick: add to and from string expressions
2016-07-28 19:31:56 +02:00
Duncaen
a37c401ad1
mpick: add info expression for message ids without files
...
and mark them seen by default
2016-07-28 18:47:50 +02:00
Christian Neukirchen
d2e3b9411b
mpick: drop const
2016-07-28 18:09:10 +02:00
Christian Neukirchen
48a1779efb
mpick: add mmsg(7) style ranges to msglist
2016-07-28 18:00:52 +02:00