From: Yakov Lerner Date: Mon, 05 Jun 2006 00:10:46 GMT Subject: Re: Importing Mozilla CVS into git Message-ID: In-Reply-To: On 6/4/06, Linus Torvalds wrote: +static unsigned long autodetect_crlf(unsigned char *src, unsigned long size) > +{ > + unsigned long newsize = 0; > + unsigned char *dst = src; > + unsigned char last = 0; > + > + while (size) { > + unsigned char c = *src++; size--; is missing > + if (last == '\r' && c == '\n') { > + dst[-1] = '\n'; > + } else { > + newsize++; > + dst++; > + if (dst != src) > + dst[-1] = c; > + } > + last = c; > + } > + return newsize; > +} Yakov