Commit Graph

71 Commits

Author SHA1 Message Date
midipix
b078f8c19e Maildir: support winnt/ntfs based systems (currently midipix).
Per the Maildir specification, the info (trailing) part of message
filenames is identified by a <colon><spec_version><comma>; however,
on WINNT/NTFS, a colon may not be part of a filename, therefore use
a <semicolon> instead. Since the default remains to use a <colon>,
all targets (other than those definining the __winnt__ macro)
should remain unaffected by this change.
2024-06-15 21:51:51 +02:00
Leah Neukirchen
43f2cb8b49 mscan: only spawn pager when stdout is a tty
We still get the terminal size for when users manually page, e.g.
mscan | less

This is consistent with how mshow already works.

Fixes #243.
2023-07-18 14:04:59 +02:00
gco
e6813fd07c solaris needs termios.h and __EXTENSIONS__ for TIOCGWINSZ and winsize 2022-06-20 16:08:12 +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
Leah Neukirchen
513ac7d002 mscan: fix underrun in %F when filename doesn't contain three slashes 2020-01-17 12:14:47 +01:00
Leah Neukirchen
9e91eb6e8b mscan: add dottime formatting 2020-01-02 16:15:35 +01:00
Leah Neukirchen
0d73424edf mscan: u8putstr: assume wcwidth of -1 means actually 2 (probably emojis) 2019-03-21 15:59:42 +01:00
Leah Neukirchen
d5714df6c9 mscan: rename pid1 to pager_pid 2018-09-25 14:01:32 +02:00
Leah Neukirchen
ddd7e54fbb mscan: hide message count behind -v
Also ensure output is flushed before printing it.
2018-09-25 13:59:58 +02:00
Leah Neukirchen
82faec5cfe mscan: u8putstr: take length of replacement char into account 2018-09-14 13:25:59 +02:00
Leah Neukirchen
704c9cec62 mscan: prioritize displaying trashed mail over other markers
Trashing is the most dangerous flag.

Closes #130.
2018-08-26 16:47:15 +02:00
Leah Neukirchen
3957080127 mscan: u8putstr: factor out common code 2018-01-11 15:37:47 +01:00
Leah Neukirchen
4d40475364 mscan: fetch window size from /dev/tty
Fixes mscan width inside mless.
2017-11-28 18:31:49 +01:00
Leah Neukirchen
73641367db revamp utf-8 handling code 2017-11-22 23:48:32 +01:00
Leah Neukirchen
5131b4305f mscan: display TO: address decode 2017-11-08 21:32:28 +01:00
Leah Neukirchen
5fe0003c98 mscan: revert width to int 2017-10-06 13:20:28 +02:00
Leah Neukirchen
5f45b7d533 use appropriate integer types
Mainly found with clang -Wconversion -Wshorten-64-to-32.
2017-10-06 13:15:28 +02:00
Leah Neukirchen
66d0eff12f style 2017-08-31 17:30:17 +02:00
Leah Neukirchen
b2e97e6cfe mscan: use wint_t for %lc
%lc arguments in fprintf are of type wint_t, not wchar_t.

Reported by Léo Villeveygoux.
2017-05-31 14:57:24 +02:00
Leah Neukirchen
94854ad185 mscan: spawn a pager for interactive use 2017-05-23 15:25:28 +02:00
Leah Neukirchen
3732dd355d mscan: use %H:%M timestamp for all mails newer than 24h 2017-05-21 01:07:47 +02:00
Leah Neukirchen
b21daa47d6 mscan: squeeze slashes for %F
Fixes #30.
2017-04-27 13:54:10 +02:00
Leah Neukirchen
04b29f4e30 mscan: kill stray tab in format string 2017-03-13 15:59:18 +01:00
Leah Neukirchen
14a12635bd mscan: don't print C0 control symbols 2017-03-13 15:49:30 +01:00
Leah Neukirchen
2b4e3aa66d clean up whitespace 2017-01-26 20:27:26 +01:00
Leah Neukirchen
cf36745b0c mscan: fmt_from: first decode RFC2047, then parse address 2017-01-21 17:40:52 +01:00
Christian Neukirchen
77d7f8c7f6 mscan: style 2016-09-07 20:57:49 +02:00
Ivy Foster
ca8cef1660 Add $MBLAZE environment variable to set profile location
As a side benefit, all callers of blaze822_home_file need only pass
the filename, so the base directory is set in only one place.
2016-09-01 18:50:20 -05:00
Christian Neukirchen
d4f72ab52d mscan: add %I for message-id 2016-08-11 20:32:54 +02:00
Christian Neukirchen
2ad6ae80d8 mscan: make negative width in %f, %s mean "rest minus N" 2016-08-10 18:00:51 +02:00
Christian Neukirchen
b4df49565f mscan: add %S for stripped subject 2016-08-10 17:48:33 +02:00
Christian Neukirchen
923ef6a51e mscan: better width for %F 2016-08-09 21:27:44 +02:00
Christian Neukirchen
4c5a007030 mscan: add width to %b 2016-08-09 21:16:09 +02:00
Christian Neukirchen
56e87c6a10 mscan: u8putstr: force left-alignment 2016-08-09 21:13:54 +02:00
Christian Neukirchen
a5c5e22204 mscan: fix formatting of %f without width, and for %s with width 2016-08-09 21:08:49 +02:00
Christian Neukirchen
20dae518c4 mscan: oneline: fix flag fiddling 2016-08-08 16:13:51 +02:00
Christian Neukirchen
1fece7b090 mscan: oneline: don't show not existing messages as unseen 2016-08-06 18:15:24 +02:00
Christian Neukirchen
516c3ec6f2 mscan: default %F left-aligned 2016-08-05 20:02:49 +02:00
Christian Neukirchen
2c3a1c0049 mscan: silence a warning 2016-08-04 22:39:51 +02:00
Christian Neukirchen
5aafeb8550 mscan: actually show To: in TO: 2016-08-04 22:32:21 +02:00
Christian Neukirchen
a8397824b1 mscan: use Scan-Format from profile by default 2016-08-04 21:43:51 +02:00
Christian Neukirchen
53852d7517 mscan: fmt_date: refactor, add 5-char %d 2016-08-04 21:41:27 +02:00
Christian Neukirchen
c2f9fa7271 mscan: silence %b when !msg 2016-08-04 20:17:07 +02:00
Christian Neukirchen
019a6680f5 mscan: fix %M 2016-08-04 20:16:59 +02:00
Christian Neukirchen
59c00003f6 mscan: adaptive iso date 2016-08-04 20:00:42 +02:00
Christian Neukirchen
e97bf25a4e mscan: look up message number when needed 2016-08-04 19:39:01 +02:00
Christian Neukirchen
3f1fb14ecd mscan: refactor, slight output change 2016-08-04 19:37:22 +02:00
Christian Neukirchen
26f694c91d mscan: support \n and \t 2016-08-04 19:12:20 +02:00
Christian Neukirchen
f628a10ff6 mscan: use format strings 2016-08-04 18:59:46 +02:00
Christian Neukirchen
41474c2e68 rename .santoku to .mblaze 2016-08-01 19:36:23 +02:00