[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-mailutils] mail -f option processing
From: |
Helmut Leitner |
Subject: |
[bug-mailutils] mail -f option processing |
Date: |
Tue, 24 Jan 2006 16:21:38 +0100 |
User-agent: |
Mozilla Thunderbird 1.0 (Windows/20041206) |
The program "mail" seems to process the -f option incorrectly.
In a call
mail -f path name
or
mail name
(with "-f path" coming from /etc/mailutils.rc ":mail -f path")
the name is interpreted as another mailbox path and the
stored path is overwritten and lost.
The reason seems to be an incorrect use of the argp interface
in the function parse_opt.
The hack is even noted in the source:
< /* People often tend to separate -f option from its argument
< with a whitespace. This heuristics tries to catch the
< error: */
It catches the error but produces another one.
The option "-f" induces an now-comes-file-name-argument-mode that
is not cleared when the argument actually comes. But this doesn't
allow for a proper handling of a missing argument anyway.
It seems much simpler to just pop the next parameter from the argp
interface that provides a "state->next" for that purpose.
--
Helmut Leitner address@hidden
Graz, Austria www.hls-software.com
- [bug-mailutils] mail -f option processing,
Helmut Leitner <=