Re: Efficient scather-gather-copy
- From: "Mark Whitlock" <spamtrap@xxxxxxxxxx>
- Date: 13 Apr 2006 12:53:19 -0700
Hynek Schlawack writes :Hynek ,
I'm in the unlucky situation to convert mails from the "\n"-lineendings
to "\r\n"-ones.
You shod probably just run these through a filter program.
What OS are you using ?
If I'm not mistaken, I have to count the lines, alloc
sizeof(mail)+num_of_lines(mail), copy each line seperately with a space
between them to the buffer and replace the "\n" through "\r\n".
How about opening 2 files ,one for input ,one for output.
Read the input ,if it is not a newline ,write it to the output.
If it is a newline ,write return ,then newline to the output.
This should stream pretty fast.
probably missing something,
Mark Whitlock.
.
- Follow-Ups:
- Re: Efficient scather-gather-copy
- From: Hynek Schlawack
- Re: Efficient scather-gather-copy
- References:
- Efficient scather-gather-copy
- From: Hynek Schlawack
- Efficient scather-gather-copy
- Prev by Date: Re: view mbr grub
- Next by Date: GetPrivateProfileInt help
- Previous by thread: Efficient scather-gather-copy
- Next by thread: Re: Efficient scather-gather-copy
- Index(es):