Matthew Fischer | 2 Feb 2008 21:32
Picon

typo in send.c

Mailx seems to have a typo in send.c. It passes SEND_MBOX as a parameter
to mime_write where a "convert" value is expected. I think it should be
passing CONV_NONE instead. Both SEND_MBOX and CONV_NONE have the same
numeric value, though, so it doesn't have any impact on the object code.

--- mailx-12.3.orig/send.c	2007-06-16 09:28:47.000000000 -0600
+++ mailx-12.3/send.c	2007-08-18 21:56:10.000000000 -0600
 <at>  <at>  -968,7 +968,7  <at>  <at> 
 		}
 	}
 	sz += mime_write(buf, len, fp,
-			action == SEND_MBOX ? SEND_MBOX : convert,
+			action == SEND_MBOX ? CONV_NONE : convert,
 			action == SEND_TODISP || action == SEND_TODISP_ALL ||
 					action == SEND_QUOTE ||
 					action == SEND_QUOTE_ALL ?

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Gunnar Ritter | 4 Feb 2008 22:46
Picon
Favicon

Re: typo in send.c

Matthew Fischer <futhark@...> wrote:

> Mailx seems to have a typo in send.c. It passes SEND_MBOX as a parameter
> to mime_write where a "convert" value is expected. I think it should be
> passing CONV_NONE instead. Both SEND_MBOX and CONV_NONE have the same
> numeric value, though, so it doesn't have any impact on the object code.

Yes, that seems reasonable. I have changed it accordingly.

Thank you

Gunnar

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Paul Novak | 14 Feb 2008 18:30
Picon

Double Subject: prompt

I often use mailx to send outgoing messages, eg, "mailx foo@...".
I am first prompted for a "Subject:".  Occasionally (about 1/10 of the time),
I will get a double Subject: prompt (Subject: Subject).  mailx
continues to work,
but I've always found  puzzling.  This happened to me on my Slackware
11.0 system
for a long time, and it's also happening on my new Slackware 12.0 system.
So I looked at the code this morning, in particular the rtty_internal
function in tty.c.  I can't figure out any rhyme or reason for when this
problem occurs: it just seems random.

The tty.c code is way over my head with all of the signal calls.

But taking a step back, rtty_internal is working like this:

It gets invoked and calls fputs to output "Subject:".  Keeps running
and and intermittently sigsetjmp(rewrite,1) succeeds, and then you
jump to the redo: label.  rtty_internal is reinvoked, and
"Subject:" gets printed out again.  Theoretically, I guess sigsetjmp
could succeed again, and you'd end up with a triple Subject: prompt
(that has never happened to me).

My question is since there already is a "redo:" label, the function is
taking into
account some out of the ordinary condition.  It doesn't just error out, it
tries to fix the problem.  When it does that, and reinvokes itself,
shouldn't it take into account that it has already printed out Subject:
one time, and perhaps reinvoke itself like this

    rtty_interal("", cp)
(Continue reading)

Perry Hutchison | 14 Feb 2008 19:22
Favicon

Re: Double Subject: prompt

> I often use mailx to send outgoing messages, eg, "mailx foo@...".
> I am first prompted for a "Subject:".  Occasionally (about 1/10 of
> the time), I will get a double Subject: prompt (Subject: Subject).
> mailx continues to work ... rtty_internal is working like this:
>
> It gets invoked and calls fputs to output "Subject:".  Keeps running
> and and intermittently sigsetjmp(rewrite,1) succeeds, and then you
> jump to the redo: label.  rtty_internal is reinvoked, and "Subject:"
> gets printed out again ... When it does that, and reinvokes itself,
> shouldn't it take into account that it has already printed out
> Subject: one time, and perhaps reinvoke itself like this
>
>     rtty_interal("", cp)
>
> or take some other step to stop the "Subject:" prompt from appearing
> a second time?

I suspect this is intended to handle the case where you suspend
it with ^Z at the "Subject:" prompt -- it reprompts when resumed
to remind you of where you were.

This does not, however, explain what sort of signal might be
involved in the case you are describing.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Gunnar Ritter | 14 Feb 2008 21:46
Picon
Favicon

Re: Double Subject: prompt

"Paul Novak" <k9genius@...> wrote:

> It gets invoked and calls fputs to output "Subject:".  Keeps running
> and and intermittently sigsetjmp(rewrite,1) succeeds,

Try to run this in strace to see what actually happens.

Gunnar

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Thomas Wolff | 26 Feb 2008 15:57

Thunderbird mailbox interoperability

Hi,
I would appreciate if mailx introduces an option to accept DOS 
newlines (CRLF) in mailboxes, in order to be interoperable with 
mailboxes created by Thunderbird.
I know that Unix people (including myself) are not in favor of 
adapting systems to DOS conventions and I will also file a bug 
about this with Thunderbird. But interoperability, like standards, 
is a very high goal in general, for which such reservations could 
be moved aside, I think.

Thanks for considering,
best regards,
Thomas Wolff

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Gunnar Ritter | 26 Feb 2008 22:34
Picon
Favicon

Re: Thunderbird mailbox interoperability

Thomas Wolff <towo@...> wrote:

> I would appreciate if mailx introduces an option to accept DOS 
> newlines (CRLF) in mailboxes, in order to be interoperable with 
> mailboxes created by Thunderbird.
> I know that Unix people (including myself) are not in favor of 
> adapting systems to DOS conventions and I will also file a bug 
> about this with Thunderbird. But interoperability, like standards, 
> is a very high goal in general, for which such reservations could 
> be moved aside, I think.

I'd be fine with this. However, I'm not going to implement
it myself. Please consider sending a patch.

Gunnar

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

Gmane