Re: [PATCH v2] Let mailsplit and mailinfo handle mails with CRLF line-endings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 5, 2009 at 00:03, Alex Riesen<raa.lkml@xxxxxxxxx> wrote:> On Tue, Aug 4, 2009 at 23:58, Alex Riesen<raa.lkml@xxxxxxxxx> wrote:>> int read_line_with_nul(char *buf, int size, FILE *in)>> {>>        int len = 0, c;>>>>        while (len < size) {>> "for (;;)", of course. Leftover from development process
Ahm... No, its not! Its correct :)Good night, everybody.
>>                c = getc(in);>>                if (c == EOF)>>                        break;>>                buf[len++] = c;>>                if (c == '\n')>>                        break;>>                else if (len == size)>>                        c = 0;>>        }>>        if (c == '\n' && len > 1 && buf[len - 2] == '\r')>>                buf[--len - 1] = '\n';>>        buf[len] = '\0';>>>>        return len;>> }>>>��.n��������+%������w��{.n��������n�r������&��z�ޗ�zf���h���~����������_��+v���)ߣ�m


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]