The Squirrel interpreter. See http://www.squirrel-lang.org/

Dependents:   Squirrel

Files at this revision

API Documentation at this revision

Comitter:
jhnwkmn
Date:
Tue Dec 16 11:39:42 2014 +0000
Parent:
2:f14c6628918a
Commit message:
Accepts \r as line terminator as well.

Changed in this revision

sq/sq.c Show annotated file Show diff for this revision Revisions of this file
diff -r f14c6628918a -r 7268a3ceaffc sq/sq.c
--- a/sq/sq.c	Tue Dec 16 11:22:31 2014 +0000
+++ b/sq/sq.c	Tue Dec 16 11:39:42 2014 +0000
@@ -250,7 +250,7 @@
 			int c;
 			if(done)return;
 			c = getchar();
-			if (c == _SC('\n')) {
+			if ((c == _SC('\n')) || (c == _SC('\r'))) {
 				if (i>0 && buffer[i-1] == _SC('\\'))
 				{
 					buffer[i-1] = _SC('\n');