Re: [PATCH] Support DOS line endings
From: Roman Zippel
Date: Fri Jul 07 2006 - 23:41:12 EST
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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/