Re: [PATCH v2] Let mailsplit and mailinfo handle mails with CRLF line-endings From: Alex Riesen <hidden> Date: 2016-06-15 22:47:09 On Tue, Aug 4, 2009 at 23:58, Alex Riesen[off-list ref] 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 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; }
Keyboard shortcuts hback out one level jnext message in thread kprevious message in thread ldrill in Escclose help / fold thread tree ?toggle this help