summary refs log tree commit diff
path: root/src/mail.c (follow)
Commit message (Collapse)AuthorAge
* dash: Fix chkmail loop break conditionJune McEnroe2022-01-21
| | | | | padvance_magic() returns -1 when there are no more paths left, not zero.
* dash: Check sizes of mailboxes, not timesJune McEnroe2022-01-21
| | | | | | This fixes "you have mail" showing right after checking and deleting mail, resulting in a modified but empty mailbox. Also somehow fixes "you have mail" always showing 3(!) times.
* exec: Stricter pathopt parsingHerbert Xu2018-05-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the parsing of pathopt. First of all only %builtin and %func (with arbitrary suffixes) will be recognised. Any other pathopt will be treated as a normal directory. Furthermore, pathopt can now be specified before the directory, rather than after it. In fact, a future version may remove support for pathopt suffixes. Wherever the pathopt is placed, an optional % may be placed after it to terminate the pathopt. This is so that it is less likely that a genuine directory containing a % sign is parsed as a pathopt. Users of padvance outside of exec.c have also been modified: 1) cd(1) will always treat % characters as part of the path. 2) chkmail will continue to accept arbitrary pathopt. 3) find_dot_file will ignore the %builtin pathopt instead of trying to do a stat in the accompanying directory (which is usually the current directory). The patch also removes the clearcmdentry optimisation where we attempt to only partially flush the table where possible. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* exec: Do not allocate stack string in padvanceHerbert Xu2018-05-28
| | | | | | | | | | | Many callers of padvance immediately free the allocated string so this patch moves the stalloc call to the caller. Instead of returning the allocated string, padvance now returns the length to allocate (this may be longer than the actual string length, even including the NUL). For the case where we would previously return NULL, we now return -1. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* Copyright/licence updates and remove all traces of sys/cdefs.hHerbert Xu2005-10-29
| | | | | | | | | | | This change updates the BSD licence to the three-clause version since NetBSD has already done so. This makes dash GPL-compatible. It also adds Christos Zoulas (NetBSD ash maintainer) to the COPYING file. I've added "copyright by Herbert Xu" to most files. Finally all CVS IDs and inclusion of sys/cdefs.h have been removed. The latter is needed for support of klibc.
* Initial import.Herbert Xu2005-09-26