On Sat, 13 Sep 2003 23:20:33 +0200 (Romance Daylight Time) Vadim Zeitlin
<[EMAIL PROTECTED]> wrote:

> BTW, if we want to speak SMTP to a local MTA we must
> still have CRLF, not LFs.

I didn't change Smtp code. It gets CRLF strings (converted in composer).

> On Sat, 13 Sep 2003 16:54:50 +0200 (CEST) Robert Vazan <[EMAIL PROTECTED]> wrote:
> 
> RV> In unix_append_msg I read /* copy line, toss out CR from CRLF */. C-client
> RV> converts CRLF to LF when writing to Unix mailbox.
> 
>  Well, it is not called Unix mailbox format for nothing. But MBOX doesn't
> use this, does it?

The point I was trying to make is that no matter what newline type is in
underlying protocol, c-client always wants CRLF.

>  Yes, but it shouldn't be done twice (i.e. removing CRs just to insert them
> again later) because this can be expensive with big messages.

We can have CRLF converter class with functions like:

AssignCRLF(const String&)
AssignLF(const String&)
AssignAutodetect(const String&)
String GetCRLF()
String GetLF()

It would have internal flag indicating which newline type is currently
stored and it would convert itself in Get* functions if needed.

Of course, it's much simpler to convert around c-client calls, because this
way the complexity isn't propagated to all surrounding code. C-client does
very expensive I/O operations with all strings and few extra cycles per
byte won't be noticed (not to mention that memchr and memmove can take less
than one cycle per byte).

> Anyhow, what
> I wanted to say is that it doesn't change anything by itself and I think
> this is what you found, didn't you?

Who doesn't change anything by itself? C-client? C-client *does* change
strings passed to it. It's just accidence that most protocols use CRLF, so
no conversion is needed in these cases.



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Mahogany-Developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-developers

Reply via email to