[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: decode in mail
From: |
Sergey Poznyakoff |
Subject: |
Re: decode in mail |
Date: |
Fri, 27 Jul 2001 13:42:25 +0300 |
> ... msglist is expand
> will have to be change to return a structure:
>
> struct {
> int msgno;
> int partno;
> }
>
> Comments?
Yes, it sounds good.
But if the same function (util_expand_msglist) will be used to expand
lists inside the brackets, care should be taken not to allow more than
2 levels of recursion, otherwise a user might issue weird commands like:
print 1[2[3[4]]]
Besides, a question of operator precedence arises. If one types:
print 1-3[2]
should it be equivalent to
print 1,2,3[2]
or
print 1[2],2[2],3[2] ?
I would advocate for the latter.
By the way, if `print 1[2]' prints the part 2, `save 1[2] FILE'
saves it to FILE, then it effectively duplicates the functionality
of proposed `decode' command. We can then make `print 1[2]' behave
the way we discussed for `decode', i.e. do some lookup in
mailcap/mime.types, run appropriate viewer program, etc...
In this case `decode' is superfluous.
Or is it supposed that usual commands print raw contents of the
message part, whereas `decode' outputs decoded contents?
-Sergey