Signed-off-by: Jeff Epler <jep...@unpythonic.net>
---
Untested, natch.

 src/hal/utils/halcompile.g | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/hal/utils/halcompile.g b/src/hal/utils/halcompile.g
index ca59af3..b489979 100644
--- a/src/hal/utils/halcompile.g
+++ b/src/hal/utils/halcompile.g
@@ -119,6 +119,10 @@ def _parse(rule, text, filename=None):
 def parse(filename):
     initialize()
     f = open(filename).read()
+    if '\r\n' in f:
+        raise SystemExit, "%s:0: File contains DOS-style line endings, cannot 
continue" % filename
+    if '\r' in f:
+        raise SystemExit, "%s:0: File contains Mac-style line endings, cannot 
continue" % filename
     a, b = f.split("\n;;\n", 1)
     p = _parse('File', a + "\n\n", filename)
     if not p: raise SystemExit, 1
-- 
2.1.4


------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to