public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Support DOS line endings
@ 2006-07-07 17:34 Matthew Wilcox
  2006-07-07 22:35 ` Sam Ravnborg
  2006-07-08  3:23 ` Roman Zippel
  0 siblings, 2 replies; 11+ messages in thread
From: Matthew Wilcox @ 2006-07-07 17:34 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: wookey, linux-kernel

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.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>

Index: ./scripts/kconfig/confdata.c
===================================================================
RCS file: /var/cvs/linux-2.6/scripts/kconfig/confdata.c,v
retrieving revision 1.11
diff -u -p -r1.11 confdata.c
--- ./scripts/kconfig/confdata.c	19 Apr 2006 04:56:29 -0000	1.11
+++ ./scripts/kconfig/confdata.c	7 Jul 2006 17:29:16 -0000
@@ -177,6 +177,9 @@ int conf_read_simple(const char *name)
 			p2 = strchr(p, '\n');
 			if (p2)
 				*p2 = 0;
+			p2 = strchr(p, '\r');
+			if (p2)
+				*p2 = 0;
 			sym = sym_find(line + 7);
 			if (!sym) {
 				conf_warning("trying to assign nonexistent symbol %s", line + 7);
@@ -234,6 +237,7 @@ int conf_read_simple(const char *name)
 			}
 			break;
 		case '\n':
+		case '\r':
 			break;
 		default:
 			conf_warning("unexpected data");

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2006-07-19 12:03 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-07 17:34 [PATCH] Support DOS line endings Matthew Wilcox
2006-07-07 22:35 ` Sam Ravnborg
2006-07-08  3:23 ` Roman Zippel
2006-07-13 18:18   ` Sam Ravnborg
2006-07-13 18:29     ` Matthew Wilcox
2006-07-13 18:47     ` Roman Zippel
2006-07-13 19:35       ` Sam Ravnborg
2006-07-13 20:02         ` Matthew Wilcox
2006-07-13 21:07           ` Sam Ravnborg
2006-07-13 21:41             ` Bernd Petrovitsch
2006-07-19 12:02               ` Alistair John Strachan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox