Re: [PATCH] Support DOS line endings

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

 



Hi,

On Fri, 7 Jul 2006, Matthew Wilcox wrote:

> Kconfig doesn't currently handle config files with DOS line endings.
> While these are, of course, an abomination, etc, etc, it can be handy
> to not have to convert them first.  It's also a tiny patch and even adds
> support for lines ending in just \r or even \n\r.

Did you try the latter? Unless you told fgets() about it I don't see how 
it should work.

>  			if (p2)
>  				*p2 = 0;
> +			p2 = strchr(p, '\r');
> +			if (p2)
> +				*p2 = 0;

I think something like this would be simpler:

	if (p2[-1] == '\r')
		p2[-1] = 0;

bye, Roman
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux