markus schnalke [Wed, 4 Jan 2012 17:29:23 +0000 (18:29 +0100)]
Renamed all standard sequences (e.g. cur->c) and made them globally changeable
The full list:
cur -> c
first -> f
last -> l
next -> n
prev -> p
all -> a
new -> b (mnemonic: one beyond the last)
They are globally changeable in config/config.c
Could be that I'll add the old names again, as convenience aliases.
markus schnalke [Wed, 4 Jan 2012 10:16:12 +0000 (11:16 +0100)]
Fixed bug in brkstring(), newly introduced by the switch to strchr().
strchr() treats the trailing null byte surprisingly:
``The terminating null byte is considered to be part of the string.''
markus schnalke [Wed, 4 Jan 2012 09:06:51 +0000 (10:06 +0100)]
Globally defined the names for the standard sequences.
I'll rework the whole code to use them and not have hard-coded names anymore.
The `new' sequence will be called `beyond' sequence (`b') from now on.
The `unseen' sequence will be set by default to `u' from now on.
The sequence negation will be set by default to `!' from now on.
markus schnalke [Mon, 2 Jan 2012 09:57:24 +0000 (10:57 +0100)]
Renames: s/+outbox/+sent/ and s/cc:/Cc:/
IMO ``sent'' specifies more exactly what it contains. ``outbox'' would
mean to me that these messages are prepared for delivery, but are not
already sent.
markus schnalke [Fri, 23 Dec 2011 11:09:55 +0000 (12:09 +0100)]
Reworked the man page system and some man page contents (mmh-intro).
Now it's possible to have two equally named pages in two different sections.
This appeared to be interesting for mmh(X), but I don't use it now. Let's
see if we keep the new system or even rework it to become simpler.
markus schnalke [Fri, 9 Dec 2011 15:34:57 +0000 (16:34 +0100)]
Completely reworked the path convertion functions
Moved everything (from sbr/getfolder.c and sbr/m_maildir.c) into
sbr/path.c, but actually replaced the code almost completely.
See h/prototypes.h for the function changes.
sbr/path.c provides explaining comments on the functions.
None of them allocates memory automatically.
Additionally:
- Like for other ``files'', `inc -audit file' places file relative
to the cwd, not relative to the mh-dir. This is for consistency.
- Replaced add(foo, NULL) with getcpy(foo), which ist clearer.
markus schnalke [Sun, 20 Nov 2011 11:38:17 +0000 (12:38 +0100)]
The existence of the profile entry Path is already enforced by context_read().
Hence, removed the obscure ``free(path("./", TFOLDER));'' calls.
Still I don't see the sense in these lines, but they won't get executed,
as the condition is checked before (and the program aborts then).
Probably that's obsolete stuff that remained through several reworks.
markus schnalke [Sat, 5 Nov 2011 16:56:07 +0000 (17:56 +0100)]
Introduced FDEF and FCUR for speaking arguments to getfolder().
Maybe it would be better to two separate functions, but I cannot
imagine good names for them ... :-(
markus schnalke [Sat, 5 Nov 2011 13:04:02 +0000 (14:04 +0100)]
Renamed r1bindex() to mhbasename(), to make its function becomes clear.
All calls to r1bindex() had '/' as second argument. For everything else
one can use strrchr(3) instead of r1bindex().
markus schnalke [Tue, 1 Nov 2011 08:29:08 +0000 (09:29 +0100)]
Don't call writev() anymore.
It might be a sexy syscall, but it's not portable and more complex than
the mainstream solution. For sexy source program, go elsewhere!
markus schnalke [Sun, 30 Oct 2011 10:35:54 +0000 (11:35 +0100)]
Removed the draft message in favor for a consistent draft folder facility
- reworked sbr/m_draft.c (of course)
- removed the -draftfolder/-draftmessage/-nodraftfolder switches
- removed the -draft switch from anno and refile
- no more need to question on existing draft message - yay!
Everything is more consistent now. Cornercases went away. :-)
(Also fixed the switch numbering, as already done for other files earlier.)
markus schnalke [Sun, 16 Oct 2011 09:48:09 +0000 (11:48 +0200)]
Removed the whom program, which relayed on post(8) functionality.
We can later add one again, which only expands aliases but does not
require the MTA to support -bv.
markus schnalke [Sun, 16 Oct 2011 08:47:04 +0000 (10:47 +0200)]
Removed the split feature of send.
It would split large messages into several partial ones, using MIME.
But if a message contains one large file attached, it won't solve the
problem. We better go without this feature and leave it to the user.
markus schnalke [Fri, 7 Oct 2011 06:35:27 +0000 (08:35 +0200)]
Rearranged whitespace (and comments) in all the code!
The primary goal was to only indent with tabs and not mix them with spaces.
Also, no more tabs should appear past the first printable char on each line.
Now editing the sources will be much easier, no matter which editor one uses,
and rearranging won't break aligned code.
(Beware, the changeset is huge, but the `diff -w' changes are moderate.)
markus schnalke [Wed, 5 Oct 2011 17:09:27 +0000 (19:09 +0200)]
Removed msh, vmh and wmh.
The latter ones were long time obsolete; now they went away.
Msh has hardly to do with everyday mmh usage, and we don't support bboards
anymore.
This one changeset saves us about 7,000 lines of code. *yay*
markus schnalke [Wed, 5 Oct 2011 09:28:46 +0000 (11:28 +0200)]
Removed --with-{editor,pager} configure options.
We keep defaulting to vi and more, but search in PATH at run time.
Nowadays, both programs should be available via PATH everywhere.
Otherwise, the the path in the profile.
markus schnalke [Tue, 4 Oct 2011 16:36:14 +0000 (18:36 +0200)]
Removed the MTS and post; now we always use /usr/sbin/sendmail -t
Mmh won't talk SMTP (nor POP).
Also moved OfficialName() from /mts/smtp/hosts.c to sbr/addrsbr.c.
Peter Maydell [Tue, 21 Dec 2010 16:50:24 +0000 (16:50 +0000)]
Clean up code in inc.c
Clean up the confusing use of a variable 'i' in inc.c.
The case where it was being used as 'an error occurred
which means we should not truncate the mailspool' is now
called 'incerr' and merged with the equivalent 'p' variable
used in the POP-specific code. Cases where it was being
used as a random temporary are still called 'i' but now
declared with a much more restricted scope.
This fixes a compilation warning for some compilers.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Peter Maydell [Mon, 20 Dec 2010 21:13:32 +0000 (21:13 +0000)]
Suppress tsort diagnostic waffle
tsort produces waffle to standard error if it detects loops in its input.
For our purposes in ordering object files this is harmless, so just send
it all to /dev/null.
Signed-off-by: Peter Maydell <pmaydell@chiark.greenend.org.uk>
Peter Maydell [Mon, 20 Dec 2010 21:13:32 +0000 (21:13 +0000)]
Fix unused-function warnings in lex output
Fix the unused-function warnings in the output of lex. In particular, we
silence a warning about yyunput being static but unused by exposing it as
a global function. This costs us a few hundred bytes in the binary but
the other available solutions are flex-specific or more complicated.
YY_NO_UNPUT used to silence this but no longer works in recent flex.
On the other hand YY_NO_INPUT does work to silence warnings about input().
Signed-off-by: Peter Maydell <pmaydell@chiark.greenend.org.uk>
Peter Maydell [Mon, 20 Dec 2010 21:13:32 +0000 (21:13 +0000)]
Fix used-uninitialised warning in fmt_rfc2047.c
Fix a used-uninitialised warning in fmt_rfc2047.c.
I don't think it can actually be used uninitialised, but the
code is too complicated for the compiler to realise this.
Signed-off-by: Peter Maydell <pmaydell@chiark.greenend.org.uk>
Peter Maydell [Mon, 20 Dec 2010 21:13:32 +0000 (21:13 +0000)]
Fix used-uninitialised warning in new.c
Fix a used-uninitialised warning in new.c by having the check_folders()
routine return first=last=NULL for empty folder lists. This is a more
sensible API anyway. (It would not actually have been possible for
the code to try to use last while it was uninitialised, as it happens.)
Signed-off-by: Peter Maydell <pmaydell@chiark.greenend.org.uk>
Peter Maydell [Mon, 20 Dec 2010 19:54:43 +0000 (19:54 +0000)]
Fix warning in sbr/folder_addmsg.c by code cleanup
Clean up some rather oddly written code in folder_addmsg()
so it is easier to understand for both humans and for the
compiler (and the compiler thus stops complaining about an
uninitialised variable).
Signed-off-by: Peter Maydell <pmaydell@chiark.greenend.org.uk>