(svn r6875) -Feature: Allow for " to be in console tokens. Escape them with \. eg \".
authorDarkvater
Sat, 21 Oct 2006 22:24:28 +0000
changeset 4905 49b0d1b84fc3
parent 4904 ed65b5e93fbd
child 4906 8a10678a62a3
(svn r6875) -Feature: Allow for " to be in console tokens. Escape them with \. eg \".
console.c
--- a/console.c	Sat Oct 21 19:32:46 2006 +0000
+++ b/console.c	Sat Oct 21 22:24:28 2006 +0000
@@ -1091,6 +1091,12 @@
 		case '"': /* Tokens enclosed in "" are one token */
 			longtoken = !longtoken;
 			break;
+		case '\\': /* Escape character for "" */
+			if (cmdptr[1] == '"' && tstream_i + 1 < lengthof(tokenstream)) {
+				tokenstream[tstream_i++] = *++cmdptr;
+				break;
+			}
+			/* fallthrough */
 		default: /* Normal character */
 			tokenstream[tstream_i++] = *cmdptr;